Skip to content

Commit

Permalink
Merge pull request #1568 from contentstack/staging
Browse files Browse the repository at this point in the history
DX | 16-09-2024
  • Loading branch information
cs-raj authored Sep 24, 2024
2 parents 34f9d7e + 11724b3 commit 1b3c63f
Show file tree
Hide file tree
Showing 29 changed files with 3,136 additions and 1,275 deletions.
3,169 changes: 2,505 additions & 664 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions packages/contentstack-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli-audit/1.7.0 darwin-arm64 node-v22.2.0
@contentstack/cli-audit/1.7.1 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -269,7 +269,7 @@ EXAMPLES
$ csdx plugins
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.6/src/commands/plugins/index.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/index.ts)_

## `csdx plugins:add PLUGIN`

Expand Down Expand Up @@ -343,7 +343,7 @@ EXAMPLES
$ csdx plugins:inspect myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.6/src/commands/plugins/inspect.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/inspect.ts)_

## `csdx plugins:install PLUGIN`

Expand Down Expand Up @@ -392,7 +392,7 @@ EXAMPLES
$ csdx plugins:install someuser/someplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.6/src/commands/plugins/install.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/install.ts)_

## `csdx plugins:link PATH`

Expand Down Expand Up @@ -422,7 +422,7 @@ EXAMPLES
$ csdx plugins:link myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.6/src/commands/plugins/link.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/link.ts)_

## `csdx plugins:remove [PLUGIN]`

Expand Down Expand Up @@ -463,7 +463,7 @@ FLAGS
--reinstall Reinstall all plugins after uninstalling.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.6/src/commands/plugins/reset.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/reset.ts)_

## `csdx plugins:uninstall [PLUGIN]`

Expand Down Expand Up @@ -491,7 +491,7 @@ EXAMPLES
$ csdx plugins:uninstall myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.6/src/commands/plugins/uninstall.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/uninstall.ts)_

## `csdx plugins:unlink [PLUGIN]`

Expand Down Expand Up @@ -535,5 +535,5 @@ DESCRIPTION
Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.6/src/commands/plugins/update.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/update.ts)_
<!-- commandsstop -->
4 changes: 2 additions & 2 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-audit",
"version": "1.7.0",
"version": "1.7.1",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand Down Expand Up @@ -45,7 +45,7 @@
"nyc": "^15.1.0",
"oclif": "^3",
"shx": "^0.3.4",
"sinon": "^17.0.0",
"sinon": "^19.0.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tslib": "^2.5.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-auth/1.3.20 darwin-arm64 node-v22.2.0
@contentstack/cli-auth/1.3.21 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-auth",
"description": "Contentstack CLI plugin for authentication activities",
"version": "1.3.20",
"version": "1.3.21",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand Down Expand Up @@ -49,7 +49,7 @@
"nyc": "^15.1.0",
"oclif": "^3.8.1",
"rimraf": "^2.7.1",
"sinon": "^15.0.1",
"sinon": "^19.0.0",
"tmp": "^0.2.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-branches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $ npm install -g @contentstack/cli-cm-branches
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-branches/1.1.2 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-branches/1.1.3 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-branches",
"description": "Contentstack CLI plugin to do branches operations",
"version": "1.1.2",
"version": "1.1.3",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down Expand Up @@ -41,7 +41,7 @@
"mocha": "10.1.0",
"nyc": "^15.1.0",
"oclif": "^3.1.2",
"sinon": "^15.0.1",
"sinon": "^19.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-clone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-clone
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-clone/1.11.0 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-clone/1.11.1 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-clone",
"description": "Contentstack stack clone plugin",
"version": "1.11.0",
"version": "1.11.1",
"author": "Contentstack",
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"mocha": "^10.0.0",
"nyc": "^15.1.0",
"oclif": "^3.8.1",
"sinon": "^15.0.1"
"sinon": "^19.0.0"
},
"engines": {
"node": ">=14.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-command",
"description": "Contentstack CLI plugin for configuration",
"version": "1.3.0",
"version": "1.3.1",
"author": "Contentstack",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -34,7 +34,7 @@
"mocha": "10.1.0",
"nyc": "^15.1.0",
"rimraf": "^2.7.1",
"sinon": "^15.0.1",
"sinon": "^19.0.0",
"ts-node": "^8.10.2",
"typescript": "^4.9.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-config/1.7.0 darwin-arm64 node-v22.2.0
@contentstack/cli-config/1.7.1 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-config",
"description": "Contentstack CLI plugin for configuration",
"version": "1.7.0",
"version": "1.7.1",
"author": "Contentstack",
"scripts": {
"build": "npm run clean && npm run compile",
Expand Down Expand Up @@ -47,7 +47,7 @@
"nyc": "^15.1.0",
"oclif": "^3.8.1",
"rimraf": "^2.7.1",
"sinon": "^15.0.1",
"sinon": "^19.0.0",
"tmp": "^0.2.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-export/1.12.0 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-export/1.12.1 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-export/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-export",
"description": "Contentstack CLI plugin to export content from stack",
"version": "1.12.0",
"version": "1.12.1",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"mocha": "10.1.0",
"nyc": "^15.1.0",
"oclif": "^3.8.1",
"sinon": "^15.0.1",
"sinon": "^19.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-import/1.17.0 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-import/1.17.1 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-import",
"description": "Contentstack CLI plugin to import content into stack",
"version": "1.17.0",
"version": "1.17.1",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down Expand Up @@ -46,7 +46,7 @@
"nyc": "^15.1.0",
"oclif": "^3.8.1",
"rimraf": "^2.7.1",
"sinon": "^11.1.1",
"sinon": "^19.0.0",
"tmp": "^0.2.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-launch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-launch
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli-launch/1.2.1 darwin-arm64 node-v22.2.0
@contentstack/cli-launch/1.2.2 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-launch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-launch",
"version": "1.2.1",
"version": "1.2.2",
"description": "Launch related operations",
"author": "Contentstack CLI",
"bin": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ export class CloudFunctions {
).default;
app.use(express.json());
app.use(express.urlencoded({ extended: true }));

app.use((request: Request, response: Response, next) => {
if (!response.getHeader('cache-control')) {
response.setHeader('cache-control', 'no-store');
}
next();
});

app.all(
cloudFunctionResource.apiResourceURI,
async (request: Request, response: Response) => {
Expand All @@ -94,6 +102,11 @@ export class CloudFunctions {
);
}

private isProxyEdgeFile(filename: string): boolean {
const PROXY_EDGE_FILENAME = '[proxy].edge.js';
return filename === PROXY_EDGE_FILENAME;
}

private async parseCloudFunctionResources(): Promise<
CloudFunctionResource[]
> {
Expand All @@ -103,10 +116,9 @@ export class CloudFunctions {
for await (const filePath of filePaths) {
const parsedPath = path.parse(filePath);

if (
parsedPath.ext !== CLOUD_FUNCTIONS_SUPPORTED_EXTENSION ||
!(await this.checkDefaultExport(filePath))
) {
if (this.isProxyEdgeFile(parsedPath.base)
|| parsedPath.ext !== CLOUD_FUNCTIONS_SUPPORTED_EXTENSION
|| !await this.checkDefaultExport(filePath)) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { stub, createSandbox } from 'sinon';
import { cliux } from '@contentstack/cli-utilities';
import fs from 'fs';
import { FileUpload, BaseClass } from '../../../src/adapters';
import { BaseCommand } from '../../../src/commands/launch/base-command';
import { BaseCommand } from '../../../src/base-command';

describe('File Upload', () => {
let inquireStub, prepareApiClientsStub, prepareConfigStub, getConfigStub;
Expand Down Expand Up @@ -152,6 +152,7 @@ describe('File Upload', () => {
{ name: 'NextJs', value: 'NEXTJS' },
{ name: 'Other', value: 'OTHER' },
],
outputDirectories:""
},
};
let archiveMockData = { zipName: 'abc.zip', zipPath: 'path/to/zip', projectName: 'test' };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { stub, createSandbox } from 'sinon';
import { cliux } from '@contentstack/cli-utilities';
import { githubAdapterMockData } from '../mock/index';
import { GitHub, BaseClass } from '../../../src/adapters';
import { BaseCommand } from '../../../src/commands/launch/base-command';
import { BaseCommand } from '../../../src/base-command';

describe('GitHub', () => {
let inquireStub, prepareApiClientsStub, prepareConfigStub, getConfigStub;
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-migrate-rte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-migrate-rte
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-migrate-rte/1.4.18 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-migrate-rte/1.4.19 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-migrate-rte/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-migrate-rte",
"description": "Contentstack CLI plugin to migrate HTML RTE to JSON RTE",
"version": "1.4.18",
"version": "1.4.19",
"author": "contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand All @@ -15,7 +15,7 @@
"lodash": "^4.17.21",
"nock": "^13.1.0",
"omit-deep-lodash": "^1.1.5",
"sinon": "^15.0.1",
"sinon": "^19.0.0",
"uuid": "^9.0.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-utilities",
"version": "1.7.2",
"version": "1.7.3",
"description": "Utilities for contentstack projects",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -78,7 +78,7 @@
"nock": "^13.1.0",
"nyc": "^15.1.0",
"rimraf": "^2.7.1",
"sinon": "^15.0.1",
"sinon": "^19.0.0",
"tmp": "^0.2.2",
"ts-node": "^10.9.1",
"tslib": "^1.13.0",
Expand Down
Loading

0 comments on commit 1b3c63f

Please sign in to comment.