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 LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Contentstack
Copyright (c) 2025 Contentstack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
639 changes: 461 additions & 178 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"@oclif/plugin-help": "^5.2.20",
"@oclif/plugin-plugins": "^5.4.22",
"@oclif/plugin-plugins": "^5.4.24",
"chalk": "^4.1.2",
"fast-csv": "^4.3.6",
"fs-extra": "^11.2.0",
Expand All @@ -31,7 +31,7 @@
},
"devDependencies": {
"@contentstack/cli-dev-dependencies": "^1.2.4",
"@oclif/test": "^4.1.4",
"@oclif/test": "^4.1.6",
"@types/chai": "^4.3.20",
"@types/fs-extra": "^11.0.4",
"@types/mocha": "^10.0.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"devDependencies": {
"@fancy-test/nock": "^0.1.1",
"@oclif/plugin-help": "^5.2.20",
"@oclif/test": "^4.1.4",
"@oclif/test": "^4.1.6",
"@types/chai": "^4.3.20",
"@types/inquirer": "^9.0.7",
"@types/mkdirp": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"tar": "^6.2.1 "
},
"devDependencies": {
"@oclif/test": "^4.1.4",
"@oclif/test": "^4.1.6",
"@types/inquirer": "^9.0.7",
"@types/mkdirp": "^1.0.2",
"@types/node": "^14.18.63",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@contentstack/cli-config": "~1.9.0",
"@contentstack/cli-dev-dependencies": "~1.2.4",
"@oclif/plugin-help": "^5.2.20",
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/flat": "^5.0.5",
"assert": "^2.1.0",
"chai": "^4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.4",
"@oclif/test": "^4.1.6",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint-config-oclif": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.4",
"@oclif/test": "^4.1.6",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint-config-oclif": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"contentstack": "^3.22.1"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/chai": "^4.3.20",
"@types/mkdirp": "^1.0.2",
"@types/mocha": "^8.2.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/chai": "^4.3.20",
"@types/inquirer": "^9.0.7",
"@types/mkdirp": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-dev-dependencies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@oclif/core": "^3.27.0",
"lodash": "^4.17.21",
"fancy-test": "^2.0.42",
"@oclif/test": "^4.1.3"
"@oclif/test": "^4.1.6"
},
"devDependencies": {
"@types/node": "^14.18.63",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export-to-csv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"mkdirp": "^3.0.1"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/chai": "^4.3.20",
"@types/mocha": "^10.0.10",
"chai": "^4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@contentstack/cli-config": "~1.9.0",
"@contentstack/cli-dev-dependencies": "~1.2.4",
"@oclif/plugin-help": "^5.2.20",
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/big-json": "^3.2.5",
"@types/mkdirp": "^1.0.2",
"@types/progress-stream": "^2.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import-setup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/big-json": "^3.2.5",
"@types/bluebird": "^3.5.42",
"@types/chai": "^4.3.20",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/big-json": "^3.2.5",
"@types/bluebird": "^3.5.42",
"@types/chai": "^4.3.20",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-launch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/adm-zip": "^0.5.7",
"@types/chai": "^4.3.20",
"@types/esm": "^3.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-migrate-rte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint-config-oclif": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"globby": "^10.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"devDependencies": {
"@contentstack/cli-dev-dependencies": "^1.2.4",
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/chai": "^4.3.20",
"@types/inquirer": "^9.0.7",
"@types/mkdirp": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-variants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"license": "MIT",
"devDependencies": {
"@contentstack/cli-dev-dependencies": "^1.2.4",
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.6",
"@types/chai": "^4.3.20",
"@types/node": "^20.17.9",
"chai": "^4.5.0",
Expand Down
41 changes: 40 additions & 1 deletion packages/contentstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli/1.32.2 darwin-arm64 node-v22.8.0
@contentstack/cli/1.33.0 darwin-arm64 node-v22.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -119,6 +119,7 @@ USAGE
* [`csdx plugins:unlink [PLUGIN]`](#csdx-pluginsunlink-plugin)
* [`csdx plugins:update`](#csdx-pluginsupdate)
* [`csdx tokens`](#csdx-tokens)
* [`csdx tsgen`](#csdx-tsgen)
* [`csdx whoami`](#csdx-whoami)

## `csdx audit`
Expand Down Expand Up @@ -4165,6 +4166,44 @@ EXAMPLES
$ csdx auth:tokens
```

## `csdx tsgen`

generate TypeScript typings from a Stack

```
USAGE
$ csdx tsgen -a <value> -o <value> [-p <value>] [-d] [--branch <value>] [--include-system-fields]
[--api-type rest|graphql] [--namespace <value>]

FLAGS
-a, --token-alias=<value> (required) delivery token alias
-d, --[no-]doc include documentation comments
-o, --output=<value> (required) full path to output
-p, --prefix=<value> interface prefix, e.g. "I"
--api-type=<option> [default: rest] [Optional] Please enter an API type to generate the type definitions.
<options: rest|graphql>
--branch=<value> branch
--include-system-fields include system fields in generated types
--namespace=<value> [Optional]Please enter a namespace for the GraphQL API type to organize the generated
types.

DESCRIPTION
generate TypeScript typings from a Stack

EXAMPLES
$ 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" --api-type graphql

$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --api-type graphql --namespace "GraphQL"
```

_See code: [contentstack-cli-tsgen](https://github.com/Contentstack-Solutions/contentstack-cli-tsgen/blob/v3.0.1/src/commands/tsgen.ts)_

## `csdx whoami`

Display current users email address
Expand Down
16 changes: 9 additions & 7 deletions packages/contentstack/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli",
"description": "Command-line tool (CLI) to interact with Contentstack",
"version": "1.32.2",
"version": "1.33.0",
"author": "Contentstack",
"bin": {
"csdx": "./bin/run.js"
Expand All @@ -27,25 +27,26 @@
"@contentstack/cli-cm-bootstrap": "~1.13.0",
"@contentstack/cli-cm-branches": "~1.2.0",
"@contentstack/cli-cm-bulk-publish": "~1.7.1",
"@contentstack/cli-cm-export": "~1.14.1",
"@contentstack/cli-cm-clone": "~1.13.0",
"@contentstack/cli-cm-export": "~1.14.1",
"@contentstack/cli-cm-export-to-csv": "~1.7.3",
"@contentstack/cli-cm-import": "~1.19.3",
"@contentstack/cli-cm-import-setup": "1.0.0-beta.1",
"@contentstack/cli-cm-migrate-rte": "~1.4.20",
"@contentstack/cli-cm-seed": "~1.10.0",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-config": "~1.9.0",
"@contentstack/cli-launch": "~1.3.1",
"@contentstack/cli-migration": "~1.6.4",
"@contentstack/cli-utilities": "~1.8.0",
"@contentstack/management": "~1.18.4",
"@contentstack/cli-variants": "~1.1.4",
"@contentstack/cli-cm-import-setup": "1.0.0-beta.1",
"@contentstack/management": "~1.18.4",
"@oclif/core": "^3.27.0",
"@oclif/plugin-help": "^5.2.20",
"@oclif/plugin-not-found": "^2.4.3",
"@oclif/plugin-plugins": "^5.4.22",
"@oclif/plugin-plugins": "^5.4.24",
"chalk": "^4.1.2",
"contentstack-cli-tsgen": "^3.0.1",
"debug": "^4.4.0",
"figlet": "^1.8.0",
"inquirer": "8.2.6",
Expand All @@ -57,7 +58,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.4",
"@oclif/test": "^4.1.6",
"@types/chai": "^4.3.20",
"@types/inquirer": "^9.0.7",
"@types/mkdirp": "^1.0.2",
Expand Down Expand Up @@ -152,7 +153,8 @@
"@contentstack/cli-cm-branches",
"@contentstack/cli-launch",
"@contentstack/cli-audit",
"@contentstack/cli-cm-import-setup"
"@contentstack/cli-cm-import-setup",
"contentstack-cli-tsgen"
],
"hooks": {
"prerun": [
Expand Down
Loading
Loading