@signageos/cli 2.0.0 → 2.2.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/README.md +1 -1
- package/dist/Applet/Generate/Templates/index.css.template +4 -0
- package/dist/Applet/Generate/Templates/index.html.template +12 -0
- package/dist/Applet/Generate/Templates/index.js.template +11 -0
- package/dist/Applet/Generate/Templates/rspack.config.mjs.template +48 -0
- package/dist/Applet/Generate/Templates/tsconfig.js.template +35 -0
- package/dist/Applet/Generate/Templates/webpack.config.js.template +47 -0
- package/dist/Applet/Generate/appletGenerateCommand.d.ts +29 -4
- package/dist/Applet/Generate/appletGenerateCommand.js +204 -142
- package/dist/Applet/Generate/appletGenerateCommand.js.map +1 -1
- package/dist/Applet/appletCommand.d.ts +4 -4
- package/dist/CustomScript/Generate/customScriptGenerateCommand.d.ts +7 -0
- package/dist/CustomScript/Generate/customScriptGenerateCommand.js +77 -0
- package/dist/CustomScript/Generate/customScriptGenerateCommand.js.map +1 -0
- package/dist/CustomScript/Generate/customScriptGenerateFacade.d.ts +13 -0
- package/dist/CustomScript/Generate/customScriptGenerateFacade.js +134 -0
- package/dist/CustomScript/Generate/customScriptGenerateFacade.js.map +1 -0
- package/dist/CustomScript/customScriptCommand.d.ts +8 -2
- package/dist/CustomScript/customScriptCommand.js +2 -1
- package/dist/CustomScript/customScriptCommand.js.map +1 -1
- package/dist/Lib/childProcess.d.ts +7 -0
- package/dist/Lib/childProcess.js +28 -0
- package/dist/Lib/childProcess.js.map +1 -0
- package/dist/Lib/git.d.ts +4 -0
- package/dist/Lib/git.js +109 -0
- package/dist/Lib/git.js.map +1 -0
- package/package.json +3 -2
|
@@ -89,8 +89,9 @@ var child_process = require("child_process");
|
|
|
89
89
|
var chalk_1 = require("chalk");
|
|
90
90
|
var path = require("path");
|
|
91
91
|
var prompts = require("prompts");
|
|
92
|
-
var commandDefinition_1 = require("../../Command/commandDefinition");
|
|
93
92
|
var log_1 = require("@signageos/sdk/dist/Console/log");
|
|
93
|
+
var commandDefinition_1 = require("../../Command/commandDefinition");
|
|
94
|
+
var git_1 = require("../../Lib/git");
|
|
94
95
|
var Language;
|
|
95
96
|
(function (Language) {
|
|
96
97
|
Language["JavaScript"] = "javascript";
|
|
@@ -99,7 +100,7 @@ var Language;
|
|
|
99
100
|
var Bundler;
|
|
100
101
|
(function (Bundler) {
|
|
101
102
|
Bundler["Webpack"] = "webpack";
|
|
102
|
-
Bundler["
|
|
103
|
+
Bundler["Rspack"] = "rspack";
|
|
103
104
|
})(Bundler || (Bundler = {}));
|
|
104
105
|
var GitOptions;
|
|
105
106
|
(function (GitOptions) {
|
|
@@ -114,40 +115,79 @@ var OPTION_LIST = [
|
|
|
114
115
|
{ name: 'target-dir', type: String, description: 'Directory where will be the applet generated to' },
|
|
115
116
|
{ name: 'npm-registry', type: String, description: "NPM registry URL. If you have your private npm registry" },
|
|
116
117
|
{ name: 'language', type: String, description: "Generate applet with \"typescript\" or \"javascript\" source code" },
|
|
117
|
-
{ name: 'bundler', type: String, description: "Generate applet with \"webpack\" (default) or \"
|
|
118
|
-
{ name: 'git', type: String, description: "Init applet as git repository \"no\" (default) or \"yes\"" },
|
|
118
|
+
{ name: 'bundler', type: String, description: "Generate applet with \"webpack\" (default) or \"rspack\"" },
|
|
119
|
+
{ name: 'git', type: String, description: "Init applet as git repository \"no\" (default) or \"yes\"", defaultValue: 'no' },
|
|
119
120
|
];
|
|
120
|
-
var
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
upload: 'sos applet upload',
|
|
137
|
-
clean: 'npx rimraf dist',
|
|
138
|
-
escheck: 'npx es-check --module es5 dist/*.js',
|
|
139
|
-
postbuild: 'npm run escheck',
|
|
121
|
+
var DEPENDENCIES = {
|
|
122
|
+
common: [
|
|
123
|
+
'@signageos/front-applet@latest',
|
|
124
|
+
'@signageos/front-display@14',
|
|
125
|
+
'@signageos/webpack-plugin@latest',
|
|
126
|
+
'es-check@8',
|
|
127
|
+
/* required for transpilation to ES5 */
|
|
128
|
+
'@babel/core@7',
|
|
129
|
+
'@babel/preset-env@7',
|
|
130
|
+
'babel-loader@8',
|
|
131
|
+
'css-loader@6',
|
|
132
|
+
'style-loader@3',
|
|
133
|
+
'core-js@3',
|
|
134
|
+
],
|
|
135
|
+
webpack: ['webpack@5', 'webpack-cli@4', 'webpack-dev-server@4', 'html-webpack-plugin@5'],
|
|
136
|
+
rspack: ['@rspack/core@latest', '@rspack/cli@latest'],
|
|
140
137
|
};
|
|
141
|
-
var
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
var RUNSCRIPTS = {
|
|
139
|
+
common: {
|
|
140
|
+
prepare: 'npm run clean && npm run build',
|
|
141
|
+
upload: 'sos applet upload',
|
|
142
|
+
clean: 'npx rimraf dist',
|
|
143
|
+
escheck: 'npx es-check --module es5 dist/**/*.js',
|
|
144
|
+
postbuild: 'npm run escheck',
|
|
145
|
+
},
|
|
146
|
+
webpack: {
|
|
147
|
+
start: 'webpack serve --mode development',
|
|
148
|
+
build: 'webpack --mode production',
|
|
149
|
+
connect: 'echo "Deprecated command \"npm run connect\". Use \"npm run watch\" instead." && npm run watch',
|
|
150
|
+
watch: 'webpack --watch',
|
|
151
|
+
},
|
|
152
|
+
rspack: {
|
|
153
|
+
start: 'rspack serve',
|
|
154
|
+
build: 'rspack build',
|
|
155
|
+
},
|
|
146
156
|
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Import a file as a string
|
|
159
|
+
* @param relativePath
|
|
160
|
+
* @returns string
|
|
161
|
+
* @throws Will throw an error if the file does not exist
|
|
162
|
+
*/
|
|
163
|
+
var importFileAsString = function (relativePath) {
|
|
164
|
+
return fs.readFileSync(path.resolve(__dirname, relativePath), 'utf-8');
|
|
150
165
|
};
|
|
166
|
+
/**
|
|
167
|
+
* Command definition for generating a new applet.
|
|
168
|
+
* This command facilitates the creation of a basic applet sample with configurable options such as
|
|
169
|
+
* language, bundler, git initialization, and npm registry. It generates the necessary files and
|
|
170
|
+
* installs dependencies based on the selected options.
|
|
171
|
+
* @param {Object} options - The options for generating the applet
|
|
172
|
+
* @param {string} options.name - The name of the applet
|
|
173
|
+
* @param {string} options.appletVersion - The version of the applet
|
|
174
|
+
* @param {string} options.targetDir - The target directory for the applet
|
|
175
|
+
* @param {string} options.npmRegistry - The npm registry URL
|
|
176
|
+
* @param {string} options.language - The language of the applet (typescript or javascript)
|
|
177
|
+
* @param {string} options.bundler - The bundler to use (webpack or rspack)
|
|
178
|
+
* @param {string} options.git - Whether to initialize a git repository (yes or no)
|
|
179
|
+
* @returns {Promise<void>} - A promise that resolves when the applet is generated
|
|
180
|
+
* @example
|
|
181
|
+
* appletGenerate.run({
|
|
182
|
+
* name: 'my-applet',
|
|
183
|
+
* appletVersion: '1.0.0',
|
|
184
|
+
* targetDir: './output',
|
|
185
|
+
* npmRegistry: 'https://registry.npmjs.org/',
|
|
186
|
+
* language: 'typescript',
|
|
187
|
+
* bundler: 'webpack',
|
|
188
|
+
* git: 'yes',
|
|
189
|
+
* });
|
|
190
|
+
*/
|
|
151
191
|
exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
152
192
|
name: 'generate',
|
|
153
193
|
description: 'Generate basic applet sample',
|
|
@@ -156,7 +196,7 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
156
196
|
run: function (options) {
|
|
157
197
|
var _a;
|
|
158
198
|
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
-
var currentDirectory, appletName, response, language, response,
|
|
199
|
+
var currentDirectory, appletName, response, language, response, git, gitFound, response, bundler, response, appletRootDirectory, appletRootDirectoryName, mergedDeps, bundlerConfig, generateFiles, _b, _c, _d, _e, error_1, generateFiles_1, generateFiles_1_1, generateFile, e_1_1, child;
|
|
160
200
|
var _f, _g, e_1, _h;
|
|
161
201
|
return __generator(this, function (_j) {
|
|
162
202
|
switch (_j.label) {
|
|
@@ -178,7 +218,7 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
178
218
|
throw new Error("Missing argument --name <string>");
|
|
179
219
|
}
|
|
180
220
|
if (!NAME_REGEXP.test(appletName)) {
|
|
181
|
-
throw new Error("Name has to
|
|
221
|
+
throw new Error("Name has to start and end with a character (a-zA-Z0-9_)\nRegExp: ".concat(NAME_REGEXP.toString()));
|
|
182
222
|
}
|
|
183
223
|
language = options.language;
|
|
184
224
|
if (!(language === undefined)) return [3 /*break*/, 4];
|
|
@@ -196,17 +236,15 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
196
236
|
language = response.language;
|
|
197
237
|
_j.label = 4;
|
|
198
238
|
case 4:
|
|
199
|
-
|
|
200
|
-
if (!language || !supportedLanguages.includes(language)) {
|
|
201
|
-
throw new Error("Missing or incorrect argument --language <".concat(supportedLanguages.join('|'), ">"));
|
|
202
|
-
}
|
|
239
|
+
checkSupport('language', language, Object.values(Language));
|
|
203
240
|
git = options.git;
|
|
204
|
-
return [4 /*yield*/,
|
|
205
|
-
console.error("Git not found on this machine: ".concat(err));
|
|
206
|
-
})];
|
|
241
|
+
return [4 /*yield*/, (0, git_1.machineHasGit)()];
|
|
207
242
|
case 5:
|
|
208
243
|
gitFound = _j.sent();
|
|
209
|
-
if (!
|
|
244
|
+
if (!gitFound) {
|
|
245
|
+
console.error("Git not found on this machine");
|
|
246
|
+
}
|
|
247
|
+
if (!(git === undefined && gitFound)) return [3 /*break*/, 7];
|
|
210
248
|
return [4 /*yield*/, prompts({
|
|
211
249
|
type: 'select',
|
|
212
250
|
name: 'git',
|
|
@@ -221,47 +259,50 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
221
259
|
git = response.git;
|
|
222
260
|
_j.label = 7;
|
|
223
261
|
case 7:
|
|
224
|
-
|
|
225
|
-
if (!git || !supportedGitOptions.includes(git)) {
|
|
226
|
-
throw new Error("Missing or incorrect argument --git <".concat(supportedGitOptions.join('|'), ">"));
|
|
227
|
-
}
|
|
262
|
+
checkSupport('git', git, Object.values(GitOptions));
|
|
228
263
|
bundler = (_a = options.bundler) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
229
|
-
if (bundler === undefined)
|
|
230
|
-
|
|
231
|
-
|
|
264
|
+
if (!(bundler === undefined)) return [3 /*break*/, 9];
|
|
265
|
+
return [4 /*yield*/, prompts({
|
|
266
|
+
type: 'select',
|
|
267
|
+
name: 'bundler',
|
|
268
|
+
message: "Select bundler of generated applet",
|
|
269
|
+
choices: [
|
|
270
|
+
{ title: Bundler.Webpack, value: Bundler.Webpack },
|
|
271
|
+
{ title: Bundler.Rspack, value: Bundler.Rspack },
|
|
272
|
+
],
|
|
273
|
+
})];
|
|
274
|
+
case 8:
|
|
275
|
+
response = _j.sent();
|
|
276
|
+
bundler = response.bundler;
|
|
277
|
+
_j.label = 9;
|
|
278
|
+
case 9:
|
|
279
|
+
checkSupport('bundler', bundler, Object.values(Bundler));
|
|
232
280
|
appletRootDirectory = options['target-dir'] || path.join(currentDirectory, appletName);
|
|
233
281
|
appletRootDirectoryName = options['target-dir'] || appletName;
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
"\t\t\tnew HtmlWebpackPlugin({\n\t\t\t\ttemplate: 'public/index.html',\n\t\t\t})",
|
|
245
|
-
"\t\t\tnew SignageOSPlugin()",
|
|
246
|
-
],
|
|
247
|
-
};
|
|
248
|
-
if (language === Language.TypeScript) {
|
|
249
|
-
webpackConfigParams.fileExtensions.unshift('.ts', '.tsx');
|
|
250
|
-
webpackConfigParams.rules.push("{ test: /\\.tsx?$/, loader: 'ts-loader' }");
|
|
282
|
+
mergedDeps = __spreadArray([], __read(DEPENDENCIES.common), false);
|
|
283
|
+
switch (bundler) {
|
|
284
|
+
case Bundler.Webpack:
|
|
285
|
+
mergedDeps.push.apply(mergedDeps, __spreadArray([], __read(DEPENDENCIES.webpack), false));
|
|
286
|
+
break;
|
|
287
|
+
case Bundler.Rspack:
|
|
288
|
+
mergedDeps.push.apply(mergedDeps, __spreadArray([], __read(DEPENDENCIES.rspack), false));
|
|
289
|
+
break;
|
|
290
|
+
default:
|
|
291
|
+
throw new Error("Bundler ".concat(bundler, " is not supported"));
|
|
251
292
|
}
|
|
252
293
|
bundlerConfig = (_f = {},
|
|
253
294
|
_f[Bundler.Webpack] = {
|
|
254
295
|
path: path.join(appletRootDirectory, 'webpack.config.js'),
|
|
255
|
-
content: createWebpackConfig(
|
|
296
|
+
content: createWebpackConfig(),
|
|
256
297
|
},
|
|
257
|
-
_f[Bundler.
|
|
258
|
-
path: path.join(appletRootDirectory, '
|
|
259
|
-
content:
|
|
298
|
+
_f[Bundler.Rspack] = {
|
|
299
|
+
path: path.join(appletRootDirectory, 'rspack.config.mjs'),
|
|
300
|
+
content: createRspackConfig(),
|
|
260
301
|
},
|
|
261
302
|
_f);
|
|
262
303
|
generateFiles = [];
|
|
304
|
+
// TypeScript or JavaScript
|
|
263
305
|
if (language === Language.TypeScript) {
|
|
264
|
-
dependencies.push('ts-loader@9', 'typescript');
|
|
265
306
|
generateFiles.push({
|
|
266
307
|
path: path.join(appletRootDirectory, 'src', 'index.ts'),
|
|
267
308
|
content: createIndexTs(),
|
|
@@ -270,6 +311,8 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
270
311
|
path: path.join(appletRootDirectory, 'tsconfig.json'),
|
|
271
312
|
content: createTsConfig(),
|
|
272
313
|
});
|
|
314
|
+
// Extend dependencies for Typescript
|
|
315
|
+
mergedDeps.push('ts-loader@9', 'typescript@5', '@babel/preset-typescript@7', 'ts-node@10');
|
|
273
316
|
}
|
|
274
317
|
else {
|
|
275
318
|
generateFiles.push({
|
|
@@ -277,13 +320,7 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
277
320
|
content: createIndexJs(),
|
|
278
321
|
});
|
|
279
322
|
}
|
|
280
|
-
|
|
281
|
-
generateFiles.push({
|
|
282
|
-
path: path.join(appletRootDirectory, '.gitignore'),
|
|
283
|
-
content: 'node_modules/\n./dist',
|
|
284
|
-
});
|
|
285
|
-
initGitRepository(appletRootDirectory);
|
|
286
|
-
}
|
|
323
|
+
// Create styles
|
|
287
324
|
// TODO sass support
|
|
288
325
|
{
|
|
289
326
|
generateFiles.push({
|
|
@@ -291,6 +328,7 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
291
328
|
content: createIndexCss(),
|
|
292
329
|
});
|
|
293
330
|
}
|
|
331
|
+
// Create custom npm registry config
|
|
294
332
|
if (options['npm-registry']) {
|
|
295
333
|
generateFiles.push({
|
|
296
334
|
path: path.join(appletRootDirectory, '.npmrc'),
|
|
@@ -300,13 +338,15 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
300
338
|
if (!options['applet-version']) {
|
|
301
339
|
throw new Error('Argument --applet-version is required');
|
|
302
340
|
}
|
|
341
|
+
// Add files to project
|
|
303
342
|
_c = (_b = generateFiles).push;
|
|
304
343
|
_g = {
|
|
305
344
|
path: path.join(appletRootDirectory, 'package.json')
|
|
306
345
|
};
|
|
307
346
|
_e = (_d = JSON).stringify;
|
|
308
347
|
return [4 /*yield*/, createPackageConfig(appletName, options['applet-version'], bundler)];
|
|
309
|
-
case
|
|
348
|
+
case 10:
|
|
349
|
+
// Add files to project
|
|
310
350
|
_c.apply(_b, [(_g.content = _e.apply(_d, [_j.sent(), undefined, 2]) + '\n',
|
|
311
351
|
_g)]);
|
|
312
352
|
generateFiles.push(bundlerConfig[bundler]);
|
|
@@ -318,41 +358,60 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
318
358
|
path: path.join(appletRootDirectory, '.sosignore'),
|
|
319
359
|
content: 'node_modules/\n',
|
|
320
360
|
});
|
|
361
|
+
// Create project files
|
|
321
362
|
return [4 /*yield*/, fs.mkdir(appletRootDirectory)];
|
|
322
|
-
case
|
|
363
|
+
case 11:
|
|
364
|
+
// Create project files
|
|
323
365
|
_j.sent();
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
366
|
+
if (!(git === GitOptions.Yes && gitFound)) return [3 /*break*/, 15];
|
|
367
|
+
generateFiles.push({
|
|
368
|
+
path: path.join(appletRootDirectory, '.gitignore'),
|
|
369
|
+
content: 'node_modules/\n./dist',
|
|
370
|
+
});
|
|
371
|
+
_j.label = 12;
|
|
372
|
+
case 12:
|
|
373
|
+
_j.trys.push([12, 14, , 15]);
|
|
374
|
+
return [4 /*yield*/, (0, git_1.initGitRepository)(appletRootDirectory)];
|
|
375
|
+
case 13:
|
|
376
|
+
_j.sent();
|
|
377
|
+
return [3 /*break*/, 15];
|
|
378
|
+
case 14:
|
|
379
|
+
error_1 = _j.sent();
|
|
380
|
+
console.error("Git repository initialization failed: ".concat(error_1));
|
|
381
|
+
return [3 /*break*/, 15];
|
|
382
|
+
case 15:
|
|
383
|
+
_j.trys.push([15, 21, 22, 23]);
|
|
327
384
|
generateFiles_1 = __values(generateFiles), generateFiles_1_1 = generateFiles_1.next();
|
|
328
|
-
_j.label =
|
|
329
|
-
case
|
|
330
|
-
if (!!generateFiles_1_1.done) return [3 /*break*/,
|
|
385
|
+
_j.label = 16;
|
|
386
|
+
case 16:
|
|
387
|
+
if (!!generateFiles_1_1.done) return [3 /*break*/, 20];
|
|
331
388
|
generateFile = generateFiles_1_1.value;
|
|
332
389
|
return [4 /*yield*/, fs.ensureDir(path.dirname(generateFile.path))];
|
|
333
|
-
case
|
|
390
|
+
case 17:
|
|
334
391
|
_j.sent();
|
|
335
392
|
return [4 /*yield*/, fs.writeFile(generateFile.path, generateFile.content)];
|
|
336
|
-
case
|
|
393
|
+
case 18:
|
|
337
394
|
_j.sent();
|
|
338
|
-
_j.label =
|
|
339
|
-
case
|
|
395
|
+
_j.label = 19;
|
|
396
|
+
case 19:
|
|
340
397
|
generateFiles_1_1 = generateFiles_1.next();
|
|
341
|
-
return [3 /*break*/,
|
|
342
|
-
case
|
|
343
|
-
case
|
|
398
|
+
return [3 /*break*/, 16];
|
|
399
|
+
case 20: return [3 /*break*/, 23];
|
|
400
|
+
case 21:
|
|
344
401
|
e_1_1 = _j.sent();
|
|
345
402
|
e_1 = { error: e_1_1 };
|
|
346
|
-
return [3 /*break*/,
|
|
347
|
-
case
|
|
403
|
+
return [3 /*break*/, 23];
|
|
404
|
+
case 22:
|
|
348
405
|
try {
|
|
349
406
|
if (generateFiles_1_1 && !generateFiles_1_1.done && (_h = generateFiles_1.return)) _h.call(generateFiles_1);
|
|
350
407
|
}
|
|
351
408
|
finally { if (e_1) throw e_1.error; }
|
|
352
409
|
return [7 /*endfinally*/];
|
|
353
|
-
case
|
|
410
|
+
case 23:
|
|
411
|
+
// Install dependencies
|
|
412
|
+
console.log('Installing dependencies:\n', mergedDeps);
|
|
354
413
|
process.chdir(appletRootDirectory);
|
|
355
|
-
child = child_process.spawn(NPM_EXECUTABLE, __spreadArray(['install', '--save-dev'], __read(
|
|
414
|
+
child = child_process.spawn(NPM_EXECUTABLE, __spreadArray(['install', '--save-dev'], __read(mergedDeps), false), {
|
|
356
415
|
stdio: 'inherit',
|
|
357
416
|
shell: true,
|
|
358
417
|
});
|
|
@@ -366,53 +425,56 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
366
425
|
});
|
|
367
426
|
},
|
|
368
427
|
});
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
382
|
-
|
|
428
|
+
/**
|
|
429
|
+
* Create package.json config
|
|
430
|
+
*/
|
|
431
|
+
var createPackageConfig = function (name, version, bundler) { return __awaiter(void 0, void 0, void 0, function () {
|
|
432
|
+
var scriptDef;
|
|
433
|
+
return __generator(this, function (_a) {
|
|
434
|
+
scriptDef = __assign({}, RUNSCRIPTS.common);
|
|
435
|
+
switch (bundler) {
|
|
436
|
+
case Bundler.Webpack:
|
|
437
|
+
scriptDef = __assign(__assign({}, scriptDef), RUNSCRIPTS.webpack);
|
|
438
|
+
break;
|
|
439
|
+
case Bundler.Rspack:
|
|
440
|
+
scriptDef = __assign(__assign({}, scriptDef), RUNSCRIPTS.rspack);
|
|
441
|
+
break;
|
|
442
|
+
default:
|
|
443
|
+
throw new Error("Bundler ".concat(bundler, " is not supported"));
|
|
444
|
+
}
|
|
445
|
+
return [2 /*return*/, {
|
|
446
|
+
name: name,
|
|
447
|
+
version: version,
|
|
448
|
+
main: 'dist/index.html',
|
|
449
|
+
scripts: scriptDef,
|
|
450
|
+
files: ['dist'],
|
|
451
|
+
description: 'signageOS applet',
|
|
452
|
+
repository: {},
|
|
453
|
+
license: 'UNLICENSED',
|
|
454
|
+
}];
|
|
383
455
|
});
|
|
384
|
-
}
|
|
385
|
-
var createWebpackConfig = function (
|
|
386
|
-
|
|
387
|
-
var
|
|
388
|
-
|
|
456
|
+
}); };
|
|
457
|
+
var createWebpackConfig = function () { return importFileAsString('./Templates/webpack.config.js.template'); };
|
|
458
|
+
var createRspackConfig = function () { return importFileAsString('./Templates/rspack.config.mjs.template'); };
|
|
459
|
+
var createIndexHtml = function (title) {
|
|
460
|
+
return importFileAsString('./Templates/index.html.template').replaceAll('${title}', title);
|
|
461
|
+
};
|
|
462
|
+
var createIndexCss = function () { return importFileAsString('./Templates/index.css.template'); };
|
|
463
|
+
var createIndexJs = function () { return importFileAsString('./Templates/index.js.template'); };
|
|
389
464
|
var createIndexTs = function () { return createIndexJs(); }; // There is currently no differences
|
|
390
|
-
var
|
|
391
|
-
var createTsConfig = function () { return "{\n\t\"compilerOptions\": {\n\t\t/* Sensible defaults for most projects */\n\t\t\"module\": \"nodenext\",\n\t\t\"moduleResolution\": \"nodenext\",\n\t\t\"target\": \"es6\",\n\t\t\"esModuleInterop\": true,\n\t\t\"skipLibCheck\": true,\n\t\t\"resolveJsonModule\": true,\n\t\t\"moduleDetection\": \"force\",\n\t\t\"isolatedModules\": true,\n\t\t\"forceConsistentCasingInFileNames\": true,\n\n\t\t/* Applet specific */\n\t\t\"downlevelIteration\": true,\n\t\n\t\t/* Type checking */\n\t\t\"strict\": true,\n\t\t\"noUncheckedIndexedAccess\": true,\n\t\t\"noUnusedParameters\": true,\n\t\t\"noUnusedLocals\": true,\n\t\t\n\t\t/* Features */\n\t\t\"experimentalDecorators\": true,\n\t\t\"emitDecoratorMetadata\": true,\n\t\t\"jsx\": \"react\",\n\n\t\t/* Typecheck javascript */\n\t\t\"allowJs\": true,\n\t\t\"checkJs\": true\n\t},\n\t\"include\": [\"src/**/*.ts\"]\n}\n"; };
|
|
392
|
-
var createIndexCss = function () { return "\nbody {\n\tbackground-color: wheat;\n\ttext-align: center;\n}\n"; };
|
|
465
|
+
var createTsConfig = function () { return importFileAsString('./Templates/tsconfig.js.template'); };
|
|
393
466
|
var createNpmRunControl = function (registryUrl) { return "\nregistry=".concat(registryUrl, "\nalways-auth=true\n"); };
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
else if (stderr) {
|
|
407
|
-
reject(stderr);
|
|
408
|
-
}
|
|
409
|
-
else {
|
|
410
|
-
if (verbose) {
|
|
411
|
-
console.log(stdout);
|
|
412
|
-
}
|
|
413
|
-
resolve(stdout);
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
});
|
|
467
|
+
/**
|
|
468
|
+
* Check if the value is present and is one of the supported options
|
|
469
|
+
* @param propName - The name of the property to check
|
|
470
|
+
* @param value - The value to check
|
|
471
|
+
* @param options - The supported options
|
|
472
|
+
* @throws Will throw an error if the value is not present or not one of the supported options
|
|
473
|
+
*/
|
|
474
|
+
var checkSupport = function (propName, value, options) {
|
|
475
|
+
var values = Object.values(options);
|
|
476
|
+
if (!value || !values.includes(value)) {
|
|
477
|
+
throw new Error("Missing or incorrect argument --".concat(propName, " <").concat(values.join('|'), ">"));
|
|
478
|
+
}
|
|
417
479
|
};
|
|
418
480
|
//# sourceMappingURL=appletGenerateCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appletGenerateCommand.js","sourceRoot":"","sources":["../../../src/Applet/Generate/appletGenerateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA+B;AAC/B,6CAA+C;AAC/C,+BAA0B;AAC1B,2BAA6B;AAC7B,iCAAmC;AACnC,qEAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"appletGenerateCommand.js","sourceRoot":"","sources":["../../../src/Applet/Generate/appletGenerateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA+B;AAC/B,6CAA+C;AAC/C,+BAA0B;AAC1B,2BAA6B;AAC7B,iCAAmC;AACnC,uDAAsD;AACtD,qEAA8F;AAC9F,qCAAiE;AAEjE,IAAK,QAGJ;AAHD,WAAK,QAAQ;IACZ,qCAAyB,CAAA;IACzB,qCAAyB,CAAA;AAC1B,CAAC,EAHI,QAAQ,KAAR,QAAQ,QAGZ;AAED,IAAK,OAGJ;AAHD,WAAK,OAAO;IACX,8BAAmB,CAA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AC,wCAAwC,CAAC,EAA5D,CAA4D,CAAC;AAC9F,IAAM,eAAe,GAAG,UAAC,KAAa;IACrC,OAAO,kBAAkB,CAAC,iCAAiC,CAAC,CAAC,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AAC5F,CAAC,CAAC;AACF,IAAM,cAAc,GAAG,cAAM,OAAA,kBAAkB,CAAC,gCAAgC,CAAC,EAApD,CAAoD,CAAC;AAClF,IAAM,aAAa,GAAG,cAAM,OAAA,kBAAkB,CAAC,+BAA+B,CAAC,EAAnD,CAAmD,CAAC;AAChF,IAAM,aAAa,GAAG,cAAM,OAAA,aAAa,EAAE,EAAf,CAAe,CAAC,CAAC,oCAAoC;AACjF,IAAM,cAAc,GAAG,cAAM,OAAA,kBAAkB,CAAC,kCAAkC,CAAC,EAAtD,CAAsD,CAAC;AAEpF,IAAM,mBAAmB,GAAG,UAAC,WAAmB,IAAK,OAAA,qBAC1C,WAAW,yBAErB,EAHoD,CAGpD,CAAC;AAEF;;;;;;GAMG;AACH,IAAM,YAAY,GAAG,UAAC,QAAgB,EAAE,KAAU,EAAE,OAAe;IAClE,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACtC,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QACtC,MAAM,IAAI,KAAK,CAAC,0CAAmC,QAAQ,eAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAG,CAAC,CAAC;KACrF;AACF,CAAC,CAAC"}
|
|
@@ -29,12 +29,12 @@ export declare const applet: {
|
|
|
29
29
|
}, {
|
|
30
30
|
readonly name: "bundler";
|
|
31
31
|
readonly type: StringConstructor;
|
|
32
|
-
readonly description: "Generate applet with \"webpack\" (default) or \"
|
|
33
|
-
readonly defaultValue: "webpack";
|
|
32
|
+
readonly description: "Generate applet with \"webpack\" (default) or \"rspack\"";
|
|
34
33
|
}, {
|
|
35
34
|
readonly name: "git";
|
|
36
35
|
readonly type: StringConstructor;
|
|
37
36
|
readonly description: "Init applet as git repository \"no\" (default) or \"yes\"";
|
|
37
|
+
readonly defaultValue: "no";
|
|
38
38
|
}];
|
|
39
39
|
commands: never[];
|
|
40
40
|
run(options: import("../Command/commandDefinition").CommandLineOptions<readonly [{
|
|
@@ -61,12 +61,12 @@ export declare const applet: {
|
|
|
61
61
|
}, {
|
|
62
62
|
readonly name: "bundler";
|
|
63
63
|
readonly type: StringConstructor;
|
|
64
|
-
readonly description: "Generate applet with \"webpack\" (default) or \"
|
|
65
|
-
readonly defaultValue: "webpack";
|
|
64
|
+
readonly description: "Generate applet with \"webpack\" (default) or \"rspack\"";
|
|
66
65
|
}, {
|
|
67
66
|
readonly name: "git";
|
|
68
67
|
readonly type: StringConstructor;
|
|
69
68
|
readonly description: "Init applet as git repository \"no\" (default) or \"yes\"";
|
|
69
|
+
readonly defaultValue: "no";
|
|
70
70
|
}]>): Promise<void>;
|
|
71
71
|
} | {
|
|
72
72
|
name: "upload";
|