Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ fileignoreconfig:
- filename: src/commands/tsgen.ts
checksum: b797eacb07acbf02dc0092c2453a6e13360f3b4c5fb54dc7f9a762cdd092fd0a
- filename: package-lock.json
checksum: 306cc0f75f3685ad2651283d15db8052026e9c65314e009b6a3e5fc26a872bbc
checksum: 47f65f035595b46e68adc7baba9fcad24e41453057a3cfd1eeace54a8e93d34c
version: "1.0"
16 changes: 9 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"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": {
"@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": {
Expand Down
8 changes: 8 additions & 0 deletions src/commands/tsgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default class TypeScriptCodeGeneratorCommand extends Command {
const defaultRegions = [
"US",
"EU",
"AU",
"AZURE_NA",
"AZURE_EU",
"GCP_NA",
Expand Down Expand Up @@ -86,6 +87,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,
Expand All @@ -110,6 +116,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);
Expand Down Expand Up @@ -192,6 +199,7 @@ export default class TypeScriptCodeGeneratorCommand extends Command {
includeDocumentation: includeDocumentation,
prefix,
systemFields: includeSystemFields,
isEditableTags: includeEditableTags,
});

fs.writeFileSync(outputPath, result || "");
Expand Down