Skip to content

Commit

Permalink
handled the log creation at specific dir
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj committed Oct 9, 2024
1 parent 4f1e6be commit 00a26fe
Show file tree
Hide file tree
Showing 9 changed files with 1,908 additions and 1,462 deletions.
2,158 changes: 1,291 additions & 867 deletions package-lock.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions packages/contentstack-launch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,43 @@
"/oclif.manifest.json"
],
"dependencies": {
"@apollo/client": "^3.7.9",
"@apollo/client": "^3.11.8",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"@oclif/core": "^3.26.5",
"@oclif/core": "^3.27.0",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^5.0.0",
"@types/express": "^4.17.17",
"@types/express-serve-static-core": "^4.17.34",
"adm-zip": "^0.5.10",
"@oclif/plugin-plugins": "^5.4.14",
"@types/express": "^4.17.21",
"@types/express-serve-static-core": "^4.19.6",
"adm-zip": "^0.5.16",
"chalk": "^4.1.2",
"cross-fetch": "^3.1.5",
"dotenv": "^16.0.3",
"cross-fetch": "^3.1.8",
"dotenv": "^16.4.5",
"esm": "^3.2.25",
"express": "^4.21.0",
"express": "^4.21.1",
"form-data": "^4.0.0",
"graphql": "^16.8.1",
"graphql": "^16.9.0",
"ini": "^3.0.1",
"lodash": "^4.17.21",
"open": "^8.4.2",
"winston": "^3.8.2"
"winston": "^3.15.0"
},
"devDependencies": {
"@oclif/test": "^2.5.6",
"@types/adm-zip": "^0.5.0",
"@types/chai": "^4",
"@types/esm": "^3.2.0",
"@types/ini": "^1.3.31",
"@types/lodash": "^4.14.195",
"@types/node": "^16.18.12",
"chai": "^4",
"@types/adm-zip": "^0.5.5",
"@types/chai": "^4.3.20",
"@types/esm": "^3.2.2",
"@types/ini": "^1.3.34",
"@types/lodash": "^4.17.10",
"@types/node": "^16.18.113",
"chai": "^4.5.0",
"eslint": "^7.32.0",
"eslint-config-oclif": "^4",
"eslint-config-oclif-typescript": "^3.0.8",
"oclif": "^3.11.3",
"shx": "^0.3.3",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"eslint-config-oclif-typescript": "^3.1.12",
"oclif": "^3.17.2",
"shx": "^0.3.4",
"ts-node": "^10.9.2",
"tslib": "^2.7.0",
"typescript": "^4.9.5"
},
"oclif": {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $ npm install -g @contentstack/cli-migration
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-migration/1.6.2 darwin-arm64 node-v22.2.0
@contentstack/cli-migration/1.6.3 darwin-arm64 node-v22.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
18 changes: 9 additions & 9 deletions packages/contentstack-migration/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"name": "@contentstack/cli-migration",
"version": "1.6.2",
"version": "1.6.3",
"author": "@contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"async": "^3.2.4",
"async": "^3.2.6",
"callsites": "^3.1.0",
"cardinal": "^2.1.1",
"chalk": "^4.1.0",
"dot-object": "^2.1.4",
"dotenv": "^16.0.3",
"dot-object": "^2.1.5",
"dotenv": "^16.4.5",
"listr": "^0.14.3",
"winston": "^3.7.2"
"winston": "^3.15.0"
},
"devDependencies": {
"@oclif/test": "^2.5.6",
"chai": "^4.3.4",
"chai": "^4.5.0",
"eslint": "^8.18.0",
"globby": "^10.0.2",
"husky": "^8.0.3",
"jsdoc": "^4.0.0",
"jsdoc-to-markdown": "^8.0.0",
"jsdoc": "^4.0.3",
"jsdoc-to-markdown": "^8.0.3",
"mkdirp": "^1.0.4",
"nock": "^13.1.1",
"nock": "^13.5.5",
"nyc": "^15.1.0",
"oclif": "^3.11.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-migration/src/utils/error-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function removeSpecialCharacter(str) {
}

module.exports = (errors, filePath) => {
const logger = new MigrationLogger(process.cwd());
const logger = new MigrationLogger(process.env.CS_CLI_LOG_PATH ?? process.cwd());

const errorsByFile = groupBy(errors, 'file');
const messages = [];
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-migration/src/utils/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const customFormat = printf(({ level, message }) => {
});

function init(logFileName) {
const logsDir = resolve('logs');
const logsDir = resolve(process.env.CS_CLI_LOG_PATH?? process.cwd(),'logs');
// Create dir if does not exist
makeDir(logsDir);

Expand Down
17 changes: 9 additions & 8 deletions 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.27.0 darwin-arm64 node-v22.2.0
@contentstack/cli/1.27.1 darwin-arm64 node-v22.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -3525,7 +3525,7 @@ EXAMPLES
$ csdx plugins
```

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

## `csdx plugins:add PLUGIN`

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

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

## `csdx plugins:install PLUGIN`

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

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

## `csdx plugins:link PATH`

Expand All @@ -3668,6 +3668,7 @@ FLAGS
DESCRIPTION
Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
Expand All @@ -3678,7 +3679,7 @@ EXAMPLES
$ csdx plugins:link myplugin
```

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

## `csdx plugins:remove [PLUGIN]`

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

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

## `csdx plugins:uninstall [PLUGIN]`

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

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

## `csdx plugins:unlink [PLUGIN]`

Expand Down Expand Up @@ -3791,7 +3792,7 @@ DESCRIPTION
Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/update.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/update.ts)_

## `csdx tokens`

Expand Down
4 changes: 2 additions & 2 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.27.0",
"version": "1.27.1",
"author": "Contentstack",
"bin": {
"csdx": "./bin/run.js"
Expand Down Expand Up @@ -36,7 +36,7 @@
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-config": "~1.7.3",
"@contentstack/cli-launch": "~1.2.3",
"@contentstack/cli-migration": "~1.6.2",
"@contentstack/cli-migration": "~1.6.3",
"@contentstack/cli-utilities": "~1.8.0",
"@contentstack/management": "~1.17.0",
"@contentstack/cli-variants": "~1.1.0",
Expand Down
Loading

0 comments on commit 00a26fe

Please sign in to comment.