@sitecore-content-sdk/cli 1.3.0-canary.25 → 1.3.0-canary.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/scripts/project/build.js +1 -1
- package/dist/cjs/scripts/project/component/add.js +6 -1
- package/dist/cjs/scripts/project/component/generate-map.js +3 -1
- package/dist/cjs/scripts/project/component/index.js +1 -1
- package/dist/cjs/scripts/project/component/scaffold.js +4 -1
- package/dist/cjs/scripts/project/index.js +1 -1
- package/dist/esm/scripts/project/build.js +1 -1
- package/dist/esm/scripts/project/component/add.js +6 -1
- package/dist/esm/scripts/project/component/generate-map.js +3 -1
- package/dist/esm/scripts/project/component/index.js +1 -1
- package/dist/esm/scripts/project/component/scaffold.js +4 -1
- package/dist/esm/scripts/project/index.js +1 -1
- package/package.json +3 -3
- package/types/scripts/project/build.d.ts +1 -1
- package/types/scripts/project/build.d.ts.map +1 -1
- package/types/scripts/project/component/add.d.ts.map +1 -1
- package/types/scripts/project/component/generate-map.d.ts.map +1 -1
- package/types/scripts/project/component/scaffold.d.ts.map +1 -1
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.builder = exports.describe = exports.command = void 0;
|
|
16
16
|
exports.handler = handler;
|
|
17
17
|
const load_config_1 = __importDefault(require("../../utils/load-config"));
|
|
18
|
-
exports.command = 'build';
|
|
18
|
+
exports.command = ['build', 'b'];
|
|
19
19
|
exports.describe = 'Performs build time automation';
|
|
20
20
|
exports.builder = {
|
|
21
21
|
config: {
|
|
@@ -81,28 +81,33 @@ function args(yargs) {
|
|
|
81
81
|
type: 'string',
|
|
82
82
|
describe: 'The authentication token.',
|
|
83
83
|
demandOption: true,
|
|
84
|
+
alias: 't',
|
|
84
85
|
})
|
|
85
86
|
.option('target-path', {
|
|
86
87
|
requiresArg: false,
|
|
87
88
|
type: 'string',
|
|
88
89
|
describe: 'The relative target path for the component.\n(Example: components/Promo.WithText.ts)',
|
|
90
|
+
alias: 'p',
|
|
89
91
|
})
|
|
90
92
|
.option('skip-component-map', {
|
|
91
93
|
requiresArg: false,
|
|
92
94
|
type: 'boolean',
|
|
93
95
|
describe: 'If true, skips the component map generation.',
|
|
94
96
|
default: false,
|
|
97
|
+
alias: 's',
|
|
95
98
|
})
|
|
96
99
|
.option('overwrite', {
|
|
97
100
|
requiresArg: false,
|
|
98
101
|
type: 'boolean',
|
|
99
102
|
describe: 'If true, overwrites the existing component.',
|
|
100
103
|
default: false,
|
|
104
|
+
alias: 'o',
|
|
101
105
|
})
|
|
102
106
|
.option('config', {
|
|
103
107
|
requiresArg: false,
|
|
104
108
|
type: 'string',
|
|
105
109
|
describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
|
|
110
|
+
alias: 'c',
|
|
106
111
|
});
|
|
107
112
|
}
|
|
108
113
|
/**
|
|
@@ -110,7 +115,7 @@ function args(yargs) {
|
|
|
110
115
|
*/
|
|
111
116
|
function builder(yargs) {
|
|
112
117
|
/* istanbul ignore next */
|
|
113
|
-
return yargs.command('add <component-id>', 'Adds a component', args, handler);
|
|
118
|
+
return yargs.command(['add <component-id>', 'a <component-id>'], 'Adds a component', args, handler);
|
|
114
119
|
}
|
|
115
120
|
/**
|
|
116
121
|
* Validates the target path. If no target path is provided, returns true.
|
|
@@ -12,7 +12,7 @@ const load_config_1 = __importDefault(require("../../../utils/load-config"));
|
|
|
12
12
|
* @param {Argv} yargs
|
|
13
13
|
*/
|
|
14
14
|
function builder(yargs) {
|
|
15
|
-
return yargs.command('generate-map', 'Generates component map based on provided paths', args, handler);
|
|
15
|
+
return yargs.command(['generate-map', 'g'], 'Generates component map based on provided paths', args, handler);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* @param {Argv} yargs
|
|
@@ -24,11 +24,13 @@ function args(yargs) {
|
|
|
24
24
|
type: 'boolean',
|
|
25
25
|
describe: 'If true, watches for changes in the specified paths and updates the component map accordingly.',
|
|
26
26
|
default: false,
|
|
27
|
+
alias: 'w',
|
|
27
28
|
})
|
|
28
29
|
.option('config', {
|
|
29
30
|
requiresArg: false,
|
|
30
31
|
type: 'string',
|
|
31
32
|
describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
|
|
33
|
+
alias: 'c',
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
@@ -41,7 +41,7 @@ const generateMap = __importStar(require("./generate-map"));
|
|
|
41
41
|
*/
|
|
42
42
|
function builder(yargs) {
|
|
43
43
|
return yargs.command({
|
|
44
|
-
command: 'component',
|
|
44
|
+
command: ['component', 'c'],
|
|
45
45
|
describe: 'Performs component level operations',
|
|
46
46
|
builder: (_yargs) => {
|
|
47
47
|
_yargs = _yargs
|
|
@@ -13,7 +13,7 @@ const config_1 = require("@sitecore-content-sdk/core/config");
|
|
|
13
13
|
* @param {Argv} yargs
|
|
14
14
|
*/
|
|
15
15
|
function builder(yargs) {
|
|
16
|
-
return yargs.command('scaffold <componentName>', 'Scaffolds a new component', args, handler);
|
|
16
|
+
return yargs.command(['scaffold <componentName>', 's <componentName>'], 'Scaffolds a new component', args, handler);
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* @param {Argv} yargs
|
|
@@ -31,17 +31,20 @@ dashes, or underscores. It can also contain slashes to indicate a subfolder. Exa
|
|
|
31
31
|
requiresArg: false,
|
|
32
32
|
type: 'string',
|
|
33
33
|
describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
|
|
34
|
+
alias: 'c',
|
|
34
35
|
})
|
|
35
36
|
.option('templateName', {
|
|
36
37
|
requiresArg: false,
|
|
37
38
|
type: 'string',
|
|
38
39
|
describe: 'Name of the template that will be used to scaffold the component. Can be configured in the cli.config.',
|
|
40
|
+
alias: 't',
|
|
39
41
|
})
|
|
40
42
|
.option('byoc', {
|
|
41
43
|
requiresArg: false,
|
|
42
44
|
type: 'boolean',
|
|
43
45
|
describe: 'If true, scaffolds a byoc component.',
|
|
44
46
|
default: false,
|
|
47
|
+
alias: 'b',
|
|
45
48
|
});
|
|
46
49
|
}
|
|
47
50
|
/**
|
|
@@ -41,7 +41,7 @@ const component = __importStar(require("./component"));
|
|
|
41
41
|
*/
|
|
42
42
|
function builder(yargs) {
|
|
43
43
|
return yargs.command({
|
|
44
|
-
command: 'project',
|
|
44
|
+
command: ['project', 'p'],
|
|
45
45
|
describe: 'Performs project level operations',
|
|
46
46
|
builder: (_yargs) => {
|
|
47
47
|
_yargs = _yargs
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import loadCliConfig from '../../utils/load-config';
|
|
11
|
-
export const command = 'build';
|
|
11
|
+
export const command = ['build', 'b'];
|
|
12
12
|
export const describe = 'Performs build time automation';
|
|
13
13
|
export const builder = {
|
|
14
14
|
config: {
|
|
@@ -38,28 +38,33 @@ export function args(yargs) {
|
|
|
38
38
|
type: 'string',
|
|
39
39
|
describe: 'The authentication token.',
|
|
40
40
|
demandOption: true,
|
|
41
|
+
alias: 't',
|
|
41
42
|
})
|
|
42
43
|
.option('target-path', {
|
|
43
44
|
requiresArg: false,
|
|
44
45
|
type: 'string',
|
|
45
46
|
describe: 'The relative target path for the component.\n(Example: components/Promo.WithText.ts)',
|
|
47
|
+
alias: 'p',
|
|
46
48
|
})
|
|
47
49
|
.option('skip-component-map', {
|
|
48
50
|
requiresArg: false,
|
|
49
51
|
type: 'boolean',
|
|
50
52
|
describe: 'If true, skips the component map generation.',
|
|
51
53
|
default: false,
|
|
54
|
+
alias: 's',
|
|
52
55
|
})
|
|
53
56
|
.option('overwrite', {
|
|
54
57
|
requiresArg: false,
|
|
55
58
|
type: 'boolean',
|
|
56
59
|
describe: 'If true, overwrites the existing component.',
|
|
57
60
|
default: false,
|
|
61
|
+
alias: 'o',
|
|
58
62
|
})
|
|
59
63
|
.option('config', {
|
|
60
64
|
requiresArg: false,
|
|
61
65
|
type: 'string',
|
|
62
66
|
describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
|
|
67
|
+
alias: 'c',
|
|
63
68
|
});
|
|
64
69
|
}
|
|
65
70
|
/**
|
|
@@ -67,7 +72,7 @@ export function args(yargs) {
|
|
|
67
72
|
*/
|
|
68
73
|
export function builder(yargs) {
|
|
69
74
|
/* istanbul ignore next */
|
|
70
|
-
return yargs.command('add <component-id>', 'Adds a component', args, handler);
|
|
75
|
+
return yargs.command(['add <component-id>', 'a <component-id>'], 'Adds a component', args, handler);
|
|
71
76
|
}
|
|
72
77
|
/**
|
|
73
78
|
* Validates the target path. If no target path is provided, returns true.
|
|
@@ -4,7 +4,7 @@ import loadCliConfig from '../../../utils/load-config';
|
|
|
4
4
|
* @param {Argv} yargs
|
|
5
5
|
*/
|
|
6
6
|
export function builder(yargs) {
|
|
7
|
-
return yargs.command('generate-map', 'Generates component map based on provided paths', args, handler);
|
|
7
|
+
return yargs.command(['generate-map', 'g'], 'Generates component map based on provided paths', args, handler);
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* @param {Argv} yargs
|
|
@@ -16,11 +16,13 @@ export function args(yargs) {
|
|
|
16
16
|
type: 'boolean',
|
|
17
17
|
describe: 'If true, watches for changes in the specified paths and updates the component map accordingly.',
|
|
18
18
|
default: false,
|
|
19
|
+
alias: 'w',
|
|
19
20
|
})
|
|
20
21
|
.option('config', {
|
|
21
22
|
requiresArg: false,
|
|
22
23
|
type: 'string',
|
|
23
24
|
describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
|
|
25
|
+
alias: 'c',
|
|
24
26
|
});
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
@@ -5,7 +5,7 @@ import { ComponentTemplateType } from '@sitecore-content-sdk/core/config';
|
|
|
5
5
|
* @param {Argv} yargs
|
|
6
6
|
*/
|
|
7
7
|
export function builder(yargs) {
|
|
8
|
-
return yargs.command('scaffold <componentName>', 'Scaffolds a new component', args, handler);
|
|
8
|
+
return yargs.command(['scaffold <componentName>', 's <componentName>'], 'Scaffolds a new component', args, handler);
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* @param {Argv} yargs
|
|
@@ -23,17 +23,20 @@ dashes, or underscores. It can also contain slashes to indicate a subfolder. Exa
|
|
|
23
23
|
requiresArg: false,
|
|
24
24
|
type: 'string',
|
|
25
25
|
describe: 'Path to the `sitecore.cli.config` file. Supports both JavaScript (`.js`) and TypeScript (`.ts`) formats',
|
|
26
|
+
alias: 'c',
|
|
26
27
|
})
|
|
27
28
|
.option('templateName', {
|
|
28
29
|
requiresArg: false,
|
|
29
30
|
type: 'string',
|
|
30
31
|
describe: 'Name of the template that will be used to scaffold the component. Can be configured in the cli.config.',
|
|
32
|
+
alias: 't',
|
|
31
33
|
})
|
|
32
34
|
.option('byoc', {
|
|
33
35
|
requiresArg: false,
|
|
34
36
|
type: 'boolean',
|
|
35
37
|
describe: 'If true, scaffolds a byoc component.',
|
|
36
38
|
default: false,
|
|
39
|
+
alias: 'b',
|
|
37
40
|
});
|
|
38
41
|
}
|
|
39
42
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-content-sdk/cli",
|
|
3
|
-
"version": "1.3.0-canary.
|
|
3
|
+
"version": "1.3.0-canary.27",
|
|
4
4
|
"description": "Sitecore Content SDK CLI",
|
|
5
5
|
"main": "dist/cjs/cli.js",
|
|
6
6
|
"module": "dist/esm/cli.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"url": "https://github.com/sitecore/content-sdk/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@sitecore-content-sdk/core": "1.3.0-canary.
|
|
37
|
+
"@sitecore-content-sdk/core": "1.3.0-canary.27",
|
|
38
38
|
"chokidar": "^4.0.3",
|
|
39
39
|
"dotenv": "^16.5.0",
|
|
40
40
|
"dotenv-expand": "^12.0.2",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"ts-node": "^10.9.1",
|
|
72
72
|
"typescript": "~5.8.3"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "3ca9c04e31695a2c0b6abec32c5edc4c54640c62",
|
|
75
75
|
"files": [
|
|
76
76
|
"dist",
|
|
77
77
|
"types"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/scripts/project/build.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/scripts/project/build.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,UAAiB,CAAC;AAEtC,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AAEzD,eAAO,MAAM,OAAO;;;;;;CAOnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,SAAS,iBAW5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../../src/scripts/project/component/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAK7B,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAO1D,eAAO,MAAM,SAAS,GACpB,aAAa,IAAI,CAAC,OAAO,KAAK,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,qBAAqB,CAAC,SAKjG,CAAC;AAEF,KAAK,OAAO,GAAG;IACb;;OAEG;IACH,WAAW,EAAE,MAAM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+1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-map.d.ts","sourceRoot":"","sources":["../../../../src/scripts/project/component/generate-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAI7B;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC,4BAOtD;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"generate-map.d.ts","sourceRoot":"","sources":["../../../../src/scripts/project/component/generate-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAI7B;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC,4BAOtD;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC;;;;GAiBnD;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,kBAAkB,QAqC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/scripts/project/component/scaffold.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,sBAOhD;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC;;;;;;;;
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/scripts/project/component/scaffold.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,sBAOhD;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC;;;;;;;;GA8B7C;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,YAAY,QAsBzC"}
|