From ac3a60ccdde6df6ab453739d4858c4f21a36a27f Mon Sep 17 00:00:00 2001 From: Netraj Patel Date: Mon, 30 Jun 2025 15:00:17 +0530 Subject: [PATCH 1/3] AWS AU support added --- src/commands/tsgen.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands/tsgen.ts b/src/commands/tsgen.ts index 35b182d..778771c 100644 --- a/src/commands/tsgen.ts +++ b/src/commands/tsgen.ts @@ -34,6 +34,7 @@ export default class TypeScriptCodeGeneratorCommand extends Command { const defaultRegions = [ "US", "EU", + "AU", "AZURE_NA", "AZURE_EU", "GCP_NA", From d31fb7c0572ac14df18a510fffc45306588c3e20 Mon Sep 17 00:00:00 2001 From: naman-contentstack Date: Mon, 30 Jun 2025 15:56:40 +0530 Subject: [PATCH 2/3] add support for editable tags --- .talismanrc | 2 +- package-lock.json | 37 ++++++++++++++++++++++++++++++++----- package.json | 2 +- src/commands/tsgen.ts | 7 +++++++ 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/.talismanrc b/.talismanrc index ef771d1..e1c1f11 100644 --- a/.talismanrc +++ b/.talismanrc @@ -7,5 +7,5 @@ fileignoreconfig: - filename: src/commands/tsgen.ts checksum: b797eacb07acbf02dc0092c2453a6e13360f3b4c5fb54dc7f9a762cdd092fd0a - filename: package-lock.json - checksum: 306cc0f75f3685ad2651283d15db8052026e9c65314e009b6a3e5fc26a872bbc + checksum: 041d601bc767ec76b5df6107579154e15003cf7059da990c43f325130e4db532 version: "1.0" diff --git a/package-lock.json b/package-lock.json index 4c5518c..a7ea16f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "contentstack-cli-tsgen", - "version": "4.1.0", + "version": "4.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "contentstack-cli-tsgen", - "version": "4.1.0", + "version": "4.2.0", "license": "MIT", "dependencies": { "@contentstack/cli-command": "^1.5.0", @@ -1363,7 +1363,9 @@ } }, "node_modules/@contentstack/core": { - "version": "1.2.1", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@contentstack/core/-/core-1.2.2.tgz", + "integrity": "sha512-oi//dTXeaaPL6N6KnR9+4tWq4JPUltYgpY9eLEKOf3eHWRu2PCVOwT8dR9QOBErt3Q3Ln2PpUSsbjhgY26nbxQ==", "license": "MIT", "dependencies": { "axios": "^1.8.4", @@ -1374,7 +1376,9 @@ } }, "node_modules/@contentstack/delivery-sdk": { - "version": "4.7.0", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/@contentstack/delivery-sdk/-/delivery-sdk-4.7.1.tgz", + "integrity": "sha512-cRNIeqaOtQ3PPWW513sqwcvtIo91Acl3wDnIxWnFMSwCyc1uZEk1rk5bR+DJtZo/P3CSUrBUvvQihTDaejAXXg==", "license": "MIT", "dependencies": { "@contentstack/core": "^1.2.0", @@ -1408,6 +1412,8 @@ }, "node_modules/@contentstack/types-generator": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@contentstack/types-generator/-/types-generator-3.2.0.tgz", + "integrity": "sha512-tfENsqHSBvX4fw7CrRyLdIIl/ySbdtA5Yog8tzdrWcFcuB1bb0hmr1sbMrdi6jTFp7ljDOHV9F8JpoGPuUlqUQ==", "license": "MIT", "dependencies": { "@contentstack/delivery-sdk": "^4.7.0", @@ -1740,6 +1746,8 @@ }, "node_modules/@gql2ts/from-schema": { "version": "2.0.0-4", + "resolved": "https://registry.npmjs.org/@gql2ts/from-schema/-/from-schema-2.0.0-4.tgz", + "integrity": "sha512-dx9OCgL5A6IiDecIFxKyfbpzCsEI6dbyCLlYwQU0dzr+L3IN0YkEIpNtPmO83W1MRZAi34G1AiKZBgbRcT0S9g==", "license": "ISC", "dependencies": { "@gql2ts/language-typescript": "^2.0.0-0", @@ -1752,6 +1760,8 @@ }, "node_modules/@gql2ts/language-typescript": { "version": "2.0.0-0", + "resolved": "https://registry.npmjs.org/@gql2ts/language-typescript/-/language-typescript-2.0.0-0.tgz", + "integrity": "sha512-7jxNsQutjQ5rUfOxNZuovUXFldIA5hhIjQh95aJLQIRYKBVDCIceM6QpCCbf1iuhwx4P23jx1kc/4uLsAJHnug==", "hasInstallScript": true, "license": "ISC", "dependencies": { @@ -1761,6 +1771,8 @@ }, "node_modules/@gql2ts/util": { "version": "2.0.0-0", + "resolved": "https://registry.npmjs.org/@gql2ts/util/-/util-2.0.0-0.tgz", + "integrity": "sha512-lMUYZZtoo31klzenNvJ4cMYzFbs3T4peT7fSlCAq1EEthbIuXFtrY8aFIa2Y5BdrnhoHFYDgdlYbr3xJ0j1teA==", "license": "ISC", "peerDependencies": { "graphql": ">= 0.10 <15" @@ -5343,6 +5355,8 @@ }, "node_modules/axios-mock-adapter": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-2.1.0.tgz", + "integrity": "sha512-AZUe4OjECGCNNssH8SOdtneiQELsqTsat3SQQCWLPjN436/H+L9AjWfV7bF+Zg/YL9cgbhrz5671hoh+Tbn98w==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -6300,6 +6314,8 @@ }, "node_modules/dedent": { "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "license": "MIT" }, "node_modules/deep-is": { @@ -8774,6 +8790,9 @@ }, "node_modules/graphql": { "version": "14.7.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz", + "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==", + "deprecated": "No longer supported; please update to a newer version. Details: https://github.com/graphql/graphql-js#version-support", "license": "MIT", "peer": true, "dependencies": { @@ -8939,6 +8958,8 @@ }, "node_modules/humps": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/humps/-/humps-2.0.1.tgz", + "integrity": "sha512-E0eIbrFWUhwfXJmsbdjRQFQPrl5pTEoKlz163j1mTqqUnU9PgR4AgB8AIITzuB3vLBdxZXyZ9TDIrwB2OASz4g==", "license": "MIT" }, "node_modules/iconv-lite": { @@ -9576,6 +9597,8 @@ }, "node_modules/is-buffer": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "funding": [ { "type": "github", @@ -10064,6 +10087,8 @@ }, "node_modules/iterall": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", "license": "MIT", "peer": true }, @@ -12825,7 +12850,9 @@ } }, "node_modules/prettier": { - "version": "3.5.3", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" diff --git a/package.json b/package.json index 0a6d2fd..d97548a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "contentstack-cli-tsgen", "description": "Generate TypeScript typings from a Stack.", - "version": "4.1.0", + "version": "4.2.0", "author": "Michael Davis", "bugs": "https://github.com/Contentstack-Solutions/contentstack-cli-tsgen/issues", "dependencies": { diff --git a/src/commands/tsgen.ts b/src/commands/tsgen.ts index 35b182d..5abd7d7 100644 --- a/src/commands/tsgen.ts +++ b/src/commands/tsgen.ts @@ -86,6 +86,11 @@ export default class TypeScriptCodeGeneratorCommand extends Command { default: false, }), + "include-editable-tags": flags.boolean({ + description: "include editable tags in generated types", + default: false, + }), + "api-type": flags.string({ default: "rest", multiple: false, @@ -110,6 +115,7 @@ export default class TypeScriptCodeGeneratorCommand extends Command { const filePath = flags.output; const branch = flags.branch; const includeSystemFields = flags["include-system-fields"]; + const includeEditableTags = flags["include-editable-tags"]; const namespace = flags.namespace; const outputPath = createOutputPath(filePath); @@ -192,6 +198,7 @@ export default class TypeScriptCodeGeneratorCommand extends Command { includeDocumentation: includeDocumentation, prefix, systemFields: includeSystemFields, + isEditableTags: includeEditableTags, }); fs.writeFileSync(outputPath, result || ""); From 1dd83ae9e62a059699b03a00c322587f25eaf99c Mon Sep 17 00:00:00 2001 From: naman-contentstack Date: Mon, 7 Jul 2025 16:03:12 +0530 Subject: [PATCH 3/3] update type-gen to latest version --- .talismanrc | 2 +- package-lock.json | 33 ++++----------------------------- package.json | 2 +- 3 files changed, 6 insertions(+), 31 deletions(-) diff --git a/.talismanrc b/.talismanrc index e1c1f11..26a0423 100644 --- a/.talismanrc +++ b/.talismanrc @@ -7,5 +7,5 @@ fileignoreconfig: - filename: src/commands/tsgen.ts checksum: b797eacb07acbf02dc0092c2453a6e13360f3b4c5fb54dc7f9a762cdd092fd0a - filename: package-lock.json - checksum: 041d601bc767ec76b5df6107579154e15003cf7059da990c43f325130e4db532 + checksum: 47f65f035595b46e68adc7baba9fcad24e41453057a3cfd1eeace54a8e93d34c version: "1.0" diff --git a/package-lock.json b/package-lock.json index a7ea16f..4f856ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@contentstack/cli-command": "^1.5.0", "@contentstack/cli-utilities": "^1.11.0", - "@contentstack/types-generator": "^3.2.0", + "@contentstack/types-generator": "^3.3.0", "dotenv": "^16.4.7" }, "devDependencies": { @@ -1364,8 +1364,6 @@ }, "node_modules/@contentstack/core": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@contentstack/core/-/core-1.2.2.tgz", - "integrity": "sha512-oi//dTXeaaPL6N6KnR9+4tWq4JPUltYgpY9eLEKOf3eHWRu2PCVOwT8dR9QOBErt3Q3Ln2PpUSsbjhgY26nbxQ==", "license": "MIT", "dependencies": { "axios": "^1.8.4", @@ -1377,8 +1375,6 @@ }, "node_modules/@contentstack/delivery-sdk": { "version": "4.7.1", - "resolved": "https://registry.npmjs.org/@contentstack/delivery-sdk/-/delivery-sdk-4.7.1.tgz", - "integrity": "sha512-cRNIeqaOtQ3PPWW513sqwcvtIo91Acl3wDnIxWnFMSwCyc1uZEk1rk5bR+DJtZo/P3CSUrBUvvQihTDaejAXXg==", "license": "MIT", "dependencies": { "@contentstack/core": "^1.2.0", @@ -1411,9 +1407,9 @@ } }, "node_modules/@contentstack/types-generator": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@contentstack/types-generator/-/types-generator-3.2.0.tgz", - "integrity": "sha512-tfENsqHSBvX4fw7CrRyLdIIl/ySbdtA5Yog8tzdrWcFcuB1bb0hmr1sbMrdi6jTFp7ljDOHV9F8JpoGPuUlqUQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@contentstack/types-generator/-/types-generator-3.3.0.tgz", + "integrity": "sha512-tZ296IuLZibmfKnp1+nz0DhsMz2DEwY1goHa+N6GIgh5LTrbNvCKlB6v75AX1SsYQxK6n0LKgFmikLh4e+W/cg==", "license": "MIT", "dependencies": { "@contentstack/delivery-sdk": "^4.7.0", @@ -1746,8 +1742,6 @@ }, "node_modules/@gql2ts/from-schema": { "version": "2.0.0-4", - "resolved": "https://registry.npmjs.org/@gql2ts/from-schema/-/from-schema-2.0.0-4.tgz", - "integrity": "sha512-dx9OCgL5A6IiDecIFxKyfbpzCsEI6dbyCLlYwQU0dzr+L3IN0YkEIpNtPmO83W1MRZAi34G1AiKZBgbRcT0S9g==", "license": "ISC", "dependencies": { "@gql2ts/language-typescript": "^2.0.0-0", @@ -1760,8 +1754,6 @@ }, "node_modules/@gql2ts/language-typescript": { "version": "2.0.0-0", - "resolved": "https://registry.npmjs.org/@gql2ts/language-typescript/-/language-typescript-2.0.0-0.tgz", - "integrity": "sha512-7jxNsQutjQ5rUfOxNZuovUXFldIA5hhIjQh95aJLQIRYKBVDCIceM6QpCCbf1iuhwx4P23jx1kc/4uLsAJHnug==", "hasInstallScript": true, "license": "ISC", "dependencies": { @@ -1771,8 +1763,6 @@ }, "node_modules/@gql2ts/util": { "version": "2.0.0-0", - "resolved": "https://registry.npmjs.org/@gql2ts/util/-/util-2.0.0-0.tgz", - "integrity": "sha512-lMUYZZtoo31klzenNvJ4cMYzFbs3T4peT7fSlCAq1EEthbIuXFtrY8aFIa2Y5BdrnhoHFYDgdlYbr3xJ0j1teA==", "license": "ISC", "peerDependencies": { "graphql": ">= 0.10 <15" @@ -5355,8 +5345,6 @@ }, "node_modules/axios-mock-adapter": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-2.1.0.tgz", - "integrity": "sha512-AZUe4OjECGCNNssH8SOdtneiQELsqTsat3SQQCWLPjN436/H+L9AjWfV7bF+Zg/YL9cgbhrz5671hoh+Tbn98w==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -6314,8 +6302,6 @@ }, "node_modules/dedent": { "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "license": "MIT" }, "node_modules/deep-is": { @@ -8790,9 +8776,6 @@ }, "node_modules/graphql": { "version": "14.7.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz", - "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==", - "deprecated": "No longer supported; please update to a newer version. Details: https://github.com/graphql/graphql-js#version-support", "license": "MIT", "peer": true, "dependencies": { @@ -8958,8 +8941,6 @@ }, "node_modules/humps": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/humps/-/humps-2.0.1.tgz", - "integrity": "sha512-E0eIbrFWUhwfXJmsbdjRQFQPrl5pTEoKlz163j1mTqqUnU9PgR4AgB8AIITzuB3vLBdxZXyZ9TDIrwB2OASz4g==", "license": "MIT" }, "node_modules/iconv-lite": { @@ -9597,8 +9578,6 @@ }, "node_modules/is-buffer": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "funding": [ { "type": "github", @@ -10087,8 +10066,6 @@ }, "node_modules/iterall": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", "license": "MIT", "peer": true }, @@ -12851,8 +12828,6 @@ }, "node_modules/prettier": { "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" diff --git a/package.json b/package.json index d97548a..9d3088a 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dependencies": { "@contentstack/cli-command": "^1.5.0", "@contentstack/cli-utilities": "^1.11.0", - "@contentstack/types-generator": "^3.2.0", + "@contentstack/types-generator": "^3.3.0", "dotenv": "^16.4.7" }, "devDependencies": {