File tree Expand file tree Collapse file tree 5 files changed +6
-4
lines changed Expand file tree Collapse file tree 5 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " cognito-export" ,
3
3
"description" : " A simple CLI tool and JavaScript package for exporting users from an AWS Cognito user pool." ,
4
- "version" : " 1.2.8 " ,
4
+ "version" : " 1.2.9 " ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
7
7
"bin" : " dist/cli.js" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " cognito-import" ,
3
3
"description" : " A simple CLI tool and JavaScript package for importing users into an AWS Cognito user pool." ,
4
- "version" : " 1.2.8 " ,
4
+ "version" : " 1.2.9 " ,
5
5
"main" : " dist/index.js" ,
6
6
"bin" : " dist/cli.js" ,
7
7
"repository" : {
Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ class CognitoBase {
88
88
// Set the custom attributes
89
89
userPool . UserPool ?. SchemaAttributes ?. forEach ( ( attr ) => {
90
90
if ( attr . Name && attr . Name . startsWith ( "custom:" ) ) {
91
- this . customAttributes [ attr . Name ] = attr . AttributeDataType === "String" ? z . string ( ) : z . number ( ) ;
91
+ // TODO: #24 We know the data type of the custom attribute, so we should validate against it
92
+ this . customAttributes [ attr . Name ] = z . union ( [ z . string ( ) , z . number ( ) ] )
92
93
}
93
94
} ) ;
94
95
if ( Object . keys ( this . customAttributes ) . length ) {
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export class CognitoImport extends CognitoBase {
23
23
} ) . data ;
24
24
25
25
// Verify the contents
26
+ // TODO: #25 Validate the import schema with the custom attributes in the parent class
26
27
const users = ImportSchema . parse ( rawUsers ) ;
27
28
28
29
// Import the users
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " zod-cognito" ,
3
3
"description" : " Zod schemas for AWS Cognito User Pools" ,
4
- "version" : " 1.2.8 " ,
4
+ "version" : " 1.2.9 " ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
7
7
"repository" : {
You can’t perform that action at this time.
0 commit comments