-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(cognito): revert re-organization and use @internal instead so that base class is not exported #11056
Conversation
hey @RomainMuller - I added the when running /**
* Options to integrate with the various social identity providers.
*
* @internal
*/
class UserPoolIdentityProviderBase extends core_1.Resource {
constructor(scope, id, props) {
super(scope, id);
this.props = props;
props.userPool.registerIdentityProvider(this);
}
/**
* @experimental
*/
configureAttributeMapping() {
if (!this.props.attributeMapping) {
return undefined;
}
let mapping = {};
mapping = Object.entries(this.props.attributeMapping)
.filter(([k, _]) => k !== 'custom') // 'custom' handled later separately
.reduce((agg, [k, v]) => {
return { ...agg, [attr_names_1.StandardAttributeNames[k]]: v.attributeName };
}, mapping);
if (this.props.attributeMapping.custom) {
mapping = Object.entries(this.props.attributeMapping.custom).reduce((agg, [k, v]) => {
return { ...agg, [k]: v.attributeName };
}, mapping);
}
if (Object.keys(mapping).length === 0) {
return undefined;
}
return mapping;
}
}
exports.UserPoolIdentityProviderBase = UserPoolIdentityProviderBase; I'm admittedly unsure about how to verify that the |
$ cdk-build
[2020-10-23T00:35:21.105] [ERROR] jsii/compiler - Compilation errors prevented the JSII assembly from being created
dist/js/package/lib/user-pool-idps/amazon.d.ts:2:10 - error TS2305: Module '"./base"' has no exported member 'UserPoolIdentityProviderBase'.
2 import { UserPoolIdentityProviderBase, UserPoolIdentityProviderProps } from './base';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dist/js/package/lib/user-pool-idps/amazon.d.ts:2:40 - error TS2305: Module '"./base"' has no exported member 'UserPoolIdentityProviderProps'.
2 import { UserPoolIdentityProviderBase, UserPoolIdentityProviderProps } from './base';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dist/js/package/lib/user-pool-idps/facebook.d.ts:2:10 - error TS2305: Module '"./base"' has no exported member 'UserPoolIdentityProviderBase'.
2 import { UserPoolIdentityProviderBase, UserPoolIdentityProviderProps } from './base';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dist/js/package/lib/user-pool-idps/facebook.d.ts:2:40 - error TS2305: Module '"./base"' has no exported member 'UserPoolIdentityProviderProps'.
2 import { UserPoolIdentityProviderBase, UserPoolIdentityProviderProps } from './base';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dist/js/package/lib/user-pool-idps/google.d.ts:2:10 - error TS2305: Module '"./base"' has no exported member 'UserPoolIdentityProviderBase'.
2 import { UserPoolIdentityProviderBase, UserPoolIdentityProviderProps } from './base';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dist/js/package/lib/user-pool-idps/google.d.ts:2:40 - error TS2305: Module '"./base"' has no exported member 'UserPoolIdentityProviderProps'.
2 import { UserPoolIdentityProviderBase, UserPoolIdentityProviderProps } from './base';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: /Users/shivlaks/code/aws-cdk/node_modules/jsii/bin/jsii --silence-warnings=reserved-word exited with error code 1
Build failed.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
This needs aws/jsii#2172 |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This reverts commit from #10925 which folded all implementations of
UserPoolIdentityProviderBase
into a single file.
It was desirable to maintain our original code organization but we also did not want to export the base class
In light of guidance provided in aws/jsii#2159, reverted back to original code organization and added
the
@internal
decorator on the base class in a private directoryBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license