Skip to content
Merged
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions src/commands/tsgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts"',
'$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" -p "I"',
'$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --no-doc',
'$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --include-referenced-entry',
'$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --api-type graphql',
'$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --api-type graphql --namespace "GraphQL" ',
];
Expand Down Expand Up @@ -92,6 +93,12 @@
default: false,
}),

"include-referenced-entry": flags.boolean({
description: "include ReferencedEntry interface in generated types",
default: false,
allowNo: true,
}),

"api-type": flags.string({
default: "rest",
multiple: false,
Expand All @@ -117,6 +124,7 @@
const branch = flags.branch;
const includeSystemFields = flags["include-system-fields"];
const includeEditableTags = flags["include-editable-tags"];
const includeReferencedEntry = flags["include-referenced-entry"];
const namespace = flags.namespace;

const outputPath = createOutputPath(filePath);
Expand Down Expand Up @@ -200,6 +208,7 @@
prefix,
systemFields: includeSystemFields,
isEditableTags: includeEditableTags,
includeReferencedEntry,

Check failure on line 211 in src/commands/tsgen.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Object literal may only specify known properties, and 'includeReferencedEntry' does not exist in type 'GenerateTSBase'.

Check failure on line 211 in src/commands/tsgen.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Object literal may only specify known properties, and 'includeReferencedEntry' does not exist in type 'GenerateTSBase'.
});

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