@sitecore-content-sdk/cli 0.1.0-beta.22 → 0.1.0-beta.24
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.
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.builder = builder;
|
|
7
7
|
exports.args = args;
|
|
8
8
|
exports.handler = handler;
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
9
|
const tools_1 = require("@sitecore-content-sdk/core/tools");
|
|
11
10
|
const load_config_1 = __importDefault(require("../utils/load-config"));
|
|
12
11
|
const config_1 = require("@sitecore-content-sdk/core/config");
|
|
@@ -63,8 +62,7 @@ dashes, or underscores. It can also contain slashes to indicate a subfolder`);
|
|
|
63
62
|
const cliConfig = (0, load_config_1.default)(argv.config);
|
|
64
63
|
const componentPath = regExResult[1];
|
|
65
64
|
const componentName = regExResult[2];
|
|
66
|
-
const
|
|
67
|
-
const outputFilePath = path_1.default.join(componentPath || 'src/components', filename);
|
|
65
|
+
const outputFolder = componentPath || 'src/components';
|
|
68
66
|
const templateName = (_a = argv.templateName) !== null && _a !== void 0 ? _a : (argv.byoc ? config_1.ComponentTemplateType.BYOC : config_1.ComponentTemplateType.DEFAULT);
|
|
69
|
-
(0, tools_1.scaffoldComponent)(
|
|
67
|
+
(0, tools_1.scaffoldComponent)(outputFolder, componentName, templateName, cliConfig.scaffold.templates);
|
|
70
68
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
1
|
import { scaffoldComponent } from '@sitecore-content-sdk/core/tools';
|
|
3
2
|
import loadCliConfig from '../utils/load-config';
|
|
4
3
|
import { ComponentTemplateType } from '@sitecore-content-sdk/core/config';
|
|
@@ -55,8 +54,7 @@ dashes, or underscores. It can also contain slashes to indicate a subfolder`);
|
|
|
55
54
|
const cliConfig = loadCliConfig(argv.config);
|
|
56
55
|
const componentPath = regExResult[1];
|
|
57
56
|
const componentName = regExResult[2];
|
|
58
|
-
const
|
|
59
|
-
const outputFilePath = path.join(componentPath || 'src/components', filename);
|
|
57
|
+
const outputFolder = componentPath || 'src/components';
|
|
60
58
|
const templateName = (_a = argv.templateName) !== null && _a !== void 0 ? _a : (argv.byoc ? ComponentTemplateType.BYOC : ComponentTemplateType.DEFAULT);
|
|
61
|
-
scaffoldComponent(
|
|
59
|
+
scaffoldComponent(outputFolder, componentName, templateName, cliConfig.scaffold.templates);
|
|
62
60
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-content-sdk/cli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.24",
|
|
4
4
|
"description": "Sitecore JSS command-line",
|
|
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/jss/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@sitecore-content-sdk/core": "0.1.0-beta.
|
|
37
|
+
"@sitecore-content-sdk/core": "0.1.0-beta.24",
|
|
38
38
|
"dotenv": "^16.4.7",
|
|
39
39
|
"dotenv-expand": "^12.0.1",
|
|
40
40
|
"resolve": "^1.22.10",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ts-node": "^10.9.1",
|
|
62
62
|
"typescript": "~5.7.3"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "68d52610f8306266df0e0ddba6dc6c4d0f284ba5",
|
|
65
65
|
"files": [
|
|
66
66
|
"dist",
|
|
67
67
|
"types"
|