Skip to content

Commit e3547d5

Browse files
authored
Merge pull request #26 from owenr88/release/1.2.9
1.2.9
2 parents 7335d1a + 84b2a38 commit e3547d5

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

packages/cognito-export/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cognito-export",
33
"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",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"bin": "dist/cli.js",

packages/cognito-import/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cognito-import",
33
"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",
55
"main": "dist/index.js",
66
"bin": "dist/cli.js",
77
"repository": {

packages/cognito-import/src/CognitoBase.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ class CognitoBase {
8888
// Set the custom attributes
8989
userPool.UserPool?.SchemaAttributes?.forEach((attr) => {
9090
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()])
9293
}
9394
});
9495
if(Object.keys(this.customAttributes).length) {

packages/cognito-import/src/importer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class CognitoImport extends CognitoBase {
2323
}).data;
2424

2525
// Verify the contents
26+
// TODO: #25 Validate the import schema with the custom attributes in the parent class
2627
const users = ImportSchema.parse(rawUsers);
2728

2829
// Import the users

packages/zod-cognito/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "zod-cognito",
33
"description": "Zod schemas for AWS Cognito User Pools",
4-
"version": "1.2.8",
4+
"version": "1.2.9",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"repository": {

0 commit comments

Comments
 (0)