Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint 52 release #105

Merged
merged 10 commits into from
Mar 4, 2024
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @contentstack/security-admin
4 changes: 2 additions & 2 deletions .github/workflows/secrets-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fetch-depth: 0

- name: Install Expect, jq and Python
run: sudo apt-get install -y expect jq python3 python3-pip wkhtmltopdf
run: sudo apt-get update --fix-missing && sudo apt-get install -y expect jq python3 python3-pip wkhtmltopdf

- name: Install Python packages
run: pip install pandas json2html tabulate
Expand Down Expand Up @@ -51,4 +51,4 @@ jobs:
- name: Check the status of talisman scan
run: |
# if [[ ${{ steps.run_talisman.outcome }} == "success" ]]; then exit 0; else echo "Download the Talisman scan report from Artifact: ${{ steps.upload_report.outputs.artifact-url }}" && exit 1; fi
echo "Download the Talisman scan report from Artifact: ${{ steps.upload_report.outputs.artifact-url }}";
echo "Download the Talisman scan report from Artifact: ${{ steps.upload_report.outputs.artifact-url }}";
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "contentstack-cli-tsgen",
"description": "Generate TypeScript typings from a Stack.",
"version": "2.3.1",
"version": "2.3.2",
"author": "Michael Davis",
"bugs": "https://github.com/Contentstack-Solutions/contentstack-cli-tsgen/issues",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tsgen/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export default function (userOptions: TSGenOptions) {
define_interface(contentType, options.systemFields),
'{',
['/**', "Version", '*/'].join(' '),
[`version: `,contentType._version,';'].join(' '),
[`_version: `,contentType._version,';'].join(' '),
visit_fields(contentType.schema),
'}',
]
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/boolean.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("builtin boolean field", () => {
"export interface IBoolean
{
/** Version */
version: 2 ;
_version: 2 ;
title: string ;
boolean?: boolean ;
}"
Expand Down
4 changes: 2 additions & 2 deletions tests/tsgen/defaults.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("default single content block", () => {
"export interface IMetadataSingleContentBlock
{
/** Version */
version: 2 ;
_version: 2 ;
title: string ;
}"
`);
Expand All @@ -44,7 +44,7 @@ describe("default single webpage", () => {
"export interface IMetadataSingleWebpage
{
/** Version */
version: 2 ;
_version: 2 ;
title: string ;
url: string ;
}"
Expand Down
4 changes: 2 additions & 2 deletions tests/tsgen/global.fields.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("global fields", () => {
"export interface ISeo
{
/** Version */
version: ;
_version: ;
keywords?: string ;
description?: string ;
}"
Expand All @@ -37,7 +37,7 @@ describe("global fields", () => {
"export interface IGlobalFields
{
/** Version */
version: 2 ;
_version: 2 ;
title: string ;
seo?: ISeo ;
}"
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/group.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe("group", () => {
"export interface Group
{
/** Version */
version: 3 ;
_version: 3 ;
title: string ;
multiple_group_max_limit?: [{
number?: number | null ;
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/isodate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("builtin isodate field", () => {
"export interface Isodate
{
/** Version */
version: 2 ;
_version: 2 ;
title: string ;
date?: string | null ;
date_required: string ;
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/jsdoc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("jsdoc", () => {
export interface Jsdoc
{
/** Version */
version: 3 ;
_version: 3 ;
/** Name */
title: string ;
/** Age */
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/modular.blocks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("modular blocks", () => {
"export interface ModularBlocks
{
/** Version */
version: 2 ;
_version: 2 ;
title: string ;
url: string ;
modular_blocks?: ({string_block: {single_line?: string ;
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/number.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("builtin number field", () => {
"export interface Number
{
/** Version */
version: 2 ;
_version: 2 ;
title: string ;
url: string ;
number?: number | null ;
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("all options", () => {
"export interface Options
{
/** Version */
version: 4 ;
_version: 4 ;
title: string ;
url: string ;
single_line_textbox_not_required?: string ;
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/references.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("references", () => {
"export interface IReferenceParent
{
/** Version */
version: 5 ;
_version: 5 ;
title: string ;
url: string ;
single_reference: (IReferenceChild)[] ;
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/select.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("select (dropdown)", () => {
"export interface Select
{
/** Version */
version: 5 ;
_version: 5 ;
title: string ;
select_single_value?: (\\"Option 1\\" | \\"Option 2\\" | \\"Option 3\\") | null ;
select_single_value_required: (\\"Test 1\\" | \\"Test 2\\" | \\"Test 3\\") ;
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/string.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("builtin string fields", () => {
"export interface BuiltinStrings
{
/** Version */
version: 4 ;
_version: 4 ;
title: string ;
single_line?: string ;
multi_line?: string ;
Expand Down
2 changes: 1 addition & 1 deletion tests/tsgen/taxonomies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe("builtin taxonomies field", () => {
"export interface ITaxonomy
{
/** Version */
version: 2 ;
_version: 2 ;
title: string ;
boolean?: boolean ;
taxonomies?: ITaxonomy[] ;
Expand Down
Loading