igniteui-cli 14.6.5 → 14.7.0
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/lib/commands/start.js +8 -3
- package/lib/templates/ReactTemplate.js +11 -7
- package/package.json +4 -4
- package/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/github-pages.yml +1 -1
- package/templates/react/igr-ts/projects/_base/files/src/setupTests.ts +0 -1
- package/templates/react/igr-ts/projects/_base/files/vite.config.ts +1 -0
package/lib/commands/start.js
CHANGED
|
@@ -40,11 +40,16 @@ const path = __importStar(require("path"));
|
|
|
40
40
|
const resolve = __importStar(require("resolve"));
|
|
41
41
|
const build_1 = __importDefault(require("./build"));
|
|
42
42
|
const execSyncNpmStart = (port, options) => {
|
|
43
|
+
const args = ['start'];
|
|
43
44
|
if (port) {
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
// Validate port is a number to prevent command injection
|
|
46
|
+
if (!Number.isInteger(port) || port < 0 || port > 65535) {
|
|
47
|
+
cli_core_1.Util.error(`Invalid port number: ${port}`, "red");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
args.push('--', `--port=${port}`);
|
|
46
51
|
}
|
|
47
|
-
cli_core_1.Util.
|
|
52
|
+
cli_core_1.Util.spawnSync('npm', args, options);
|
|
48
53
|
};
|
|
49
54
|
const command = {
|
|
50
55
|
command: "start",
|
|
@@ -114,8 +114,9 @@ class ReactTemplate {
|
|
|
114
114
|
// tslint:disable:no-submodule-imports
|
|
115
115
|
const components = require("@igniteui/cli-core/packages/components");
|
|
116
116
|
const igResPath = path.join(projectPath, this.igniteResources);
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
try {
|
|
118
|
+
const fd = fs.openSync(igResPath, fs.constants.O_RDWR | fs.constants.O_CREAT);
|
|
119
|
+
let igniteuiResFile = fs.readFileSync(fd, "utf8");
|
|
119
120
|
const freeVersionPath = "ignite-ui/";
|
|
120
121
|
const fullVersionPath = "@infragistics/ignite-ui-full/en/";
|
|
121
122
|
const dvPath = "@infragistics/ignite-ui-full/en/js/infragistics.dv.js";
|
|
@@ -126,15 +127,18 @@ class ReactTemplate {
|
|
|
126
127
|
igniteuiResFile = igniteuiResFile.replace(freeVersionPath, fullVersionPath);
|
|
127
128
|
igniteuiResFile = igniteuiResFile.replace("-lite", "");
|
|
128
129
|
}
|
|
129
|
-
fs.
|
|
130
|
+
fs.ftruncateSync(fd, 0);
|
|
131
|
+
fs.writeSync(fd, igniteuiResFile, 0);
|
|
130
132
|
}
|
|
131
133
|
if (dvDep && !igniteuiResFile.includes(dvPath)) {
|
|
132
|
-
fs.
|
|
133
|
-
|
|
134
|
+
const endPos = fs.fstatSync(fd).size;
|
|
135
|
+
fs.writeSync(fd, `\r\n// Ignite UI Charts Required JavaScript File\r\nimport "${dvPath}";\r\n`, endPos);
|
|
134
136
|
}
|
|
137
|
+
fs.closeSync(fd);
|
|
135
138
|
}
|
|
136
|
-
|
|
137
|
-
cli_core_1.Util.
|
|
139
|
+
catch (err) {
|
|
140
|
+
cli_core_1.Util.error(`Error while updating igniteuiResources.js: ${err.message}`);
|
|
141
|
+
throw err;
|
|
138
142
|
}
|
|
139
143
|
}
|
|
140
144
|
getNavText(name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-cli",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.7.0",
|
|
4
4
|
"description": "CLI tool for creating Ignite UI projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"all": true
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@igniteui/angular-templates": "~20.1.
|
|
74
|
-
"@igniteui/cli-core": "~14.
|
|
75
|
-
"@inquirer/prompts": "^
|
|
73
|
+
"@igniteui/angular-templates": "~20.1.1470",
|
|
74
|
+
"@igniteui/cli-core": "~14.7.0",
|
|
75
|
+
"@inquirer/prompts": "^7.9.0",
|
|
76
76
|
"@types/yargs": "^17.0.33",
|
|
77
77
|
"chalk": "^5.3.0",
|
|
78
78
|
"glob": "^11.0.0",
|
package/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/github-pages.yml
CHANGED
|
@@ -39,7 +39,7 @@ jobs:
|
|
|
39
39
|
find ./dist/assets -type f -name "*.js" -exec sed -i 's|src/assets|${{ github.event.repository.name }}/assets|g' {} +;
|
|
40
40
|
find ./dist/assets -type f -name "*.js" -exec sed -i 's|/static-data/|/${{ github.event.repository.name }}/static-data/|g' {} +
|
|
41
41
|
- name: Copy Resources to dist
|
|
42
|
-
run: mkdir -p ./dist/assets && cp -R ./src/assets/* ./dist/assets
|
|
42
|
+
run: if [ -d "./src/assets" ]; then mkdir -p ./dist/assets && cp -R ./src/assets/* ./dist/assets/; fi
|
|
43
43
|
- name: SPA routing handling
|
|
44
44
|
run: cp ./dist/index.html ./dist/404.html
|
|
45
45
|
- name: Upload build artifact to GitHub Pages
|