@signageos/cli 1.4.3 → 1.5.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 CHANGED
@@ -70,13 +70,14 @@ npm start
70
70
  # Build your applet production environment
71
71
  npm run build
72
72
  ```
73
- | Argument | Description | Default value |
74
- |------------------------------|--------------------------------------|----------------|
75
- | --name *(required)* | Name your applet | STDIN |
76
- | --version *(optional)* | Initial version | 0.0.0 |
77
- | --target-dir *(optional)* | Generate applet project to directory | ${PWD}/${name} |
78
- | --npm-registry *(optional)* | NPM registry URL (for private npm) | |
79
- | --language *(optional)* | Generate applet with "typescript" or "javascript" source code | STDIN |
73
+ | Argument | Description | Default value |
74
+ |-----------------------------|---------------------------------------------------------------|----------------|
75
+ | --name *(required)* | Name your applet | STDIN |
76
+ | --version *(optional)* | Initial version | 0.0.0 |
77
+ | --target-dir *(optional)* | Generate applet project to directory | ${PWD}/${name} |
78
+ | --npm-registry *(optional)* | NPM registry URL (for private npm) | |
79
+ | --language *(optional)* | Generate applet with "typescript" or "javascript" source code | STDIN |
80
+ | --bundler *(optional)* | Generate applet with "webpack" or "esbuild" bundler | webpack |
80
81
 
81
82
  > ! Windows users note:
82
83
  > There are unresolved issue with NPX tool on Windows clients when your username contains spaces (e.g.: `John Doe`).
@@ -20,6 +20,11 @@ declare const OPTION_LIST: readonly [{
20
20
  readonly name: "language";
21
21
  readonly type: StringConstructor;
22
22
  readonly description: "Generate applet with \"typescript\" or \"javascript\" source code";
23
+ }, {
24
+ readonly name: "bundler";
25
+ readonly type: StringConstructor;
26
+ readonly description: "Generate applet with \"webpack\" (default) or \"esbuild\" bundler";
27
+ readonly defaultValue: "webpack";
23
28
  }];
24
29
  export declare const appletGenerate: {
25
30
  name: "generate";
@@ -45,6 +50,11 @@ export declare const appletGenerate: {
45
50
  readonly name: "language";
46
51
  readonly type: StringConstructor;
47
52
  readonly description: "Generate applet with \"typescript\" or \"javascript\" source code";
53
+ }, {
54
+ readonly name: "bundler";
55
+ readonly type: StringConstructor;
56
+ readonly description: "Generate applet with \"webpack\" (default) or \"esbuild\" bundler";
57
+ readonly defaultValue: "webpack";
48
58
  }];
49
59
  commands: never[];
50
60
  run(options: CommandLineOptions<typeof OPTION_LIST>): Promise<void>;
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
14
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
15
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -35,17 +46,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
46
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
47
  }
37
48
  };
38
- var __values = (this && this.__values) || function(o) {
39
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
40
- if (m) return m.call(o);
41
- if (o && typeof o.length === "number") return {
42
- next: function () {
43
- if (o && i >= o.length) o = void 0;
44
- return { value: o && o[i++], done: !o };
45
- }
46
- };
47
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
48
- };
49
49
  var __read = (this && this.__read) || function (o, n) {
50
50
  var m = typeof Symbol === "function" && o[Symbol.iterator];
51
51
  if (!m) return o;
@@ -71,6 +71,17 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
71
71
  }
72
72
  return to.concat(ar || Array.prototype.slice.call(from));
73
73
  };
74
+ var __values = (this && this.__values) || function(o) {
75
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
76
+ if (m) return m.call(o);
77
+ if (o && typeof o.length === "number") return {
78
+ next: function () {
79
+ if (o && i >= o.length) o = void 0;
80
+ return { value: o && o[i++], done: !o };
81
+ }
82
+ };
83
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
84
+ };
74
85
  Object.defineProperty(exports, "__esModule", { value: true });
75
86
  exports.appletGenerate = void 0;
76
87
  var fs = require("fs-extra");
@@ -85,6 +96,11 @@ var Language;
85
96
  Language["JavaScript"] = "javascript";
86
97
  Language["TypeScript"] = "typescript";
87
98
  })(Language || (Language = {}));
99
+ var Bundler;
100
+ (function (Bundler) {
101
+ Bundler["Webpack"] = "webpack";
102
+ Bundler["Esbuild"] = "esbuild";
103
+ })(Bundler || (Bundler = {}));
88
104
  var NAME_REGEXP = /^\w(\w|\d|-)*\w$/;
89
105
  var NPM_EXECUTABLE = 'npm';
90
106
  var OPTION_LIST = [
@@ -93,18 +109,56 @@ var OPTION_LIST = [
93
109
  { name: 'target-dir', type: String, description: 'Directory where will be the applet generated to' },
94
110
  { name: 'npm-registry', type: String, description: "NPM registry URL. If you have your private npm registry" },
95
111
  { name: 'language', type: String, description: "Generate applet with \"typescript\" or \"javascript\" source code" },
112
+ { name: 'bundler', type: String, description: "Generate applet with \"webpack\" (default) or \"esbuild\" bundler", defaultValue: 'webpack' },
113
+ ];
114
+ var COMMON_DEPENDENCIES = [
115
+ '@signageos/front-applet@latest',
116
+ '@signageos/front-display@latest',
117
+ ];
118
+ var WEBPACK_DEPENDENCIES = [
119
+ '@signageos/webpack-plugin@latest',
120
+ '@babel/core@7',
121
+ '@babel/preset-env@7',
122
+ 'babel-loader@8',
123
+ 'css-loader@6',
124
+ 'html-webpack-plugin@5',
125
+ 'style-loader@3',
126
+ 'webpack@5',
127
+ 'webpack-dev-server@4',
128
+ 'webpack-cli@4',
96
129
  ];
130
+ var ESBUILD_DEPENDENCIES = [
131
+ '@signageos/lib@latest',
132
+ 'esbuild@latest',
133
+ 'es-check@latest',
134
+ ];
135
+ var COMMON_SCRIPTS = {
136
+ prepare: "npm run clean && npm run build",
137
+ upload: "sos applet upload",
138
+ clean: "npx rimraf dist",
139
+ escheck: "es-check --module es5 dist/*.js",
140
+ postbuild: "npm run escheck",
141
+ };
142
+ var WEBPACK_SCRIPTS = {
143
+ start: "webpack serve --mode development",
144
+ build: "webpack --mode production && npm run escheck",
145
+ connect: "webpack --watch",
146
+ };
147
+ var ESBUILD_SCRIPTS = {
148
+ build: "node ./esbuild.config.mjs",
149
+ };
97
150
  exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
98
151
  name: 'generate',
99
152
  description: 'Generate basic applet sample',
100
153
  optionList: OPTION_LIST,
101
154
  commands: [],
102
155
  run: function (options) {
156
+ var _a;
103
157
  return __awaiter(this, void 0, void 0, function () {
104
- var currentDirectory, appletName, response, language, response, supportedLanguages, appletRootDirectory, appletRootDirectoryName, entryFileName, dependencies, fileExtensions, imports, rules, plugins, generateFiles, _a, _b, _c, _d, generateFiles_1, generateFiles_1_1, generateFile, e_1_1, child;
105
- var _e, e_1, _f;
106
- return __generator(this, function (_g) {
107
- switch (_g.label) {
158
+ var currentDirectory, appletName, response, language, response, supportedLanguages, bundler, appletRootDirectory, appletRootDirectoryName, dependencies, webpackConfigParams, bundlerConfig, generateFiles, _b, _c, _d, _e, generateFiles_1, generateFiles_1_1, generateFile, e_1_1, child;
159
+ var _f, _g, e_1, _h;
160
+ return __generator(this, function (_j) {
161
+ switch (_j.label) {
108
162
  case 0:
109
163
  currentDirectory = process.cwd();
110
164
  appletName = options.name;
@@ -115,9 +169,9 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
115
169
  message: "Type applet name",
116
170
  })];
117
171
  case 1:
118
- response = _g.sent();
172
+ response = _j.sent();
119
173
  appletName = response.name;
120
- _g.label = 2;
174
+ _j.label = 2;
121
175
  case 2:
122
176
  if (!appletName) {
123
177
  throw new Error("Missing argument --name <string>");
@@ -137,49 +191,54 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
137
191
  ],
138
192
  })];
139
193
  case 3:
140
- response = _g.sent();
194
+ response = _j.sent();
141
195
  language = response.language;
142
- _g.label = 4;
196
+ _j.label = 4;
143
197
  case 4:
144
198
  supportedLanguages = Object.values(Language);
145
199
  if (!language || !supportedLanguages.includes(language)) {
146
200
  throw new Error("Missing or incorrect argument --language <".concat(supportedLanguages.join('|'), ">"));
147
201
  }
202
+ bundler = (_a = options.bundler) === null || _a === void 0 ? void 0 : _a.toLowerCase();
203
+ if (bundler === undefined) {
204
+ bundler = Bundler.Webpack;
205
+ }
148
206
  appletRootDirectory = options['target-dir'] || path.join(currentDirectory, appletName);
149
207
  appletRootDirectoryName = options['target-dir'] || appletName;
150
- entryFileName = 'index';
151
- dependencies = [
152
- '@signageos/front-applet@latest',
153
- '@signageos/front-display@latest',
154
- '@signageos/webpack-plugin@latest',
155
- '@babel/core@7',
156
- '@babel/preset-env@7',
157
- 'babel-loader@8',
158
- 'css-loader@6',
159
- 'html-webpack-plugin@5',
160
- 'style-loader@3',
161
- 'webpack@5',
162
- 'webpack-dev-server@4',
163
- 'webpack-cli@4',
164
- ];
165
- fileExtensions = ['.js'];
166
- imports = [
167
- "const HtmlWebpackPlugin = require('html-webpack-plugin')",
168
- "const SignageOSPlugin = require('@signageos/webpack-plugin')",
169
- ];
170
- rules = [
171
- "\t\t\t{\n\t\t\t\ttest: /^(.(?!\\.module\\.css))*\\.css$/,\n\t\t\t\tuse: ['style-loader', 'css-loader'],\n\t\t\t}",
172
- "\t\t\t{\n\t\t\t\ttest: /\\.jsx?$/,\n\t\t\t\tloader: 'babel-loader',\n\t\t\t\toptions: { presets: [require.resolve('@babel/preset-env')] },\n\t\t\t\tenforce: 'post',\n\t\t\t}",
173
- ];
174
- plugins = [
175
- "\t\t\tnew HtmlWebpackPlugin({\n\t\t\t\ttemplate: 'public/index.html',\n\t\t\t})",
176
- "\t\t\tnew SignageOSPlugin()",
177
- ];
208
+ dependencies = __spreadArray(__spreadArray([], __read(COMMON_DEPENDENCIES), false), __read((bundler === 'esbuild' ? ESBUILD_DEPENDENCIES : WEBPACK_DEPENDENCIES)), false);
209
+ webpackConfigParams = {
210
+ entryFileName: 'index',
211
+ fileExtensions: ['.js'],
212
+ imports: [
213
+ "const HtmlWebpackPlugin = require('html-webpack-plugin')",
214
+ "const SignageOSPlugin = require('@signageos/webpack-plugin')",
215
+ ],
216
+ rules: [
217
+ "\t\t\t{\n\t\t\t\ttest: /^(.(?!\\.module\\.css))*\\.css$/,\n\t\t\t\tuse: ['style-loader', 'css-loader'],\n\t\t\t}",
218
+ "\t\t\t{\n\t\t\t\ttest: /\\.jsx?$/,\n\t\t\t\tloader: 'babel-loader',\n\t\t\t\toptions: { presets: [require.resolve('@babel/preset-env')] },\n\t\t\t\tenforce: 'post',\n\t\t\t}",
219
+ ],
220
+ plugins: [
221
+ "\t\t\tnew HtmlWebpackPlugin({\n\t\t\t\ttemplate: 'public/index.html',\n\t\t\t})",
222
+ "\t\t\tnew SignageOSPlugin()",
223
+ ],
224
+ };
225
+ bundlerConfig = (_f = {},
226
+ _f[Bundler.Webpack] = {
227
+ path: path.join(appletRootDirectory, 'webpack.config.js'),
228
+ content: createWebpackConfig(webpackConfigParams.entryFileName, webpackConfigParams.fileExtensions, webpackConfigParams.imports, webpackConfigParams.rules, webpackConfigParams.plugins),
229
+ },
230
+ _f[Bundler.Esbuild] = {
231
+ path: path.join(appletRootDirectory, 'esbuild.config.mjs'),
232
+ content: createEsbuildConfig(),
233
+ },
234
+ _f);
178
235
  generateFiles = [];
179
236
  if (language === Language.TypeScript) {
180
237
  dependencies.push('ts-loader@9', 'typescript');
181
- fileExtensions.unshift('.ts', '.tsx');
182
- rules.push("{ test: /\\.tsx?$/, loader: 'ts-loader' }");
238
+ if (bundler === Bundler.Webpack) {
239
+ webpackConfigParams.fileExtensions.unshift('.ts', '.tsx');
240
+ webpackConfigParams.rules.push("{ test: /\\.tsx?$/, loader: 'ts-loader' }");
241
+ }
183
242
  generateFiles.push({
184
243
  path: path.join(appletRootDirectory, 'src', 'index.ts'),
185
244
  content: createIndexTs(),
@@ -211,19 +270,16 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
211
270
  if (!options['applet-version']) {
212
271
  throw new Error('Argument --applet-version is required');
213
272
  }
214
- _b = (_a = generateFiles).push;
215
- _e = {
273
+ _c = (_b = generateFiles).push;
274
+ _g = {
216
275
  path: path.join(appletRootDirectory, 'package.json')
217
276
  };
218
- _d = (_c = JSON).stringify;
219
- return [4 /*yield*/, createPackageConfig(appletName, options['applet-version'])];
277
+ _e = (_d = JSON).stringify;
278
+ return [4 /*yield*/, createPackageConfig(appletName, options['applet-version'], bundler)];
220
279
  case 5:
221
- _b.apply(_a, [(_e.content = _d.apply(_c, [_g.sent(), undefined, 2]) + '\n',
222
- _e)]);
223
- generateFiles.push({
224
- path: path.join(appletRootDirectory, 'webpack.config.js'),
225
- content: createWebpackConfig(entryFileName, fileExtensions, imports, rules, plugins),
226
- });
280
+ _c.apply(_b, [(_g.content = _e.apply(_d, [_j.sent(), undefined, 2]) + '\n',
281
+ _g)]);
282
+ generateFiles.push(bundlerConfig[bundler]);
227
283
  generateFiles.push({
228
284
  path: path.join(appletRootDirectory, 'public', 'index.html'),
229
285
  content: createIndexHtml(appletName),
@@ -234,33 +290,33 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
234
290
  });
235
291
  return [4 /*yield*/, fs.mkdir(appletRootDirectory)];
236
292
  case 6:
237
- _g.sent();
238
- _g.label = 7;
293
+ _j.sent();
294
+ _j.label = 7;
239
295
  case 7:
240
- _g.trys.push([7, 13, 14, 15]);
296
+ _j.trys.push([7, 13, 14, 15]);
241
297
  generateFiles_1 = __values(generateFiles), generateFiles_1_1 = generateFiles_1.next();
242
- _g.label = 8;
298
+ _j.label = 8;
243
299
  case 8:
244
300
  if (!!generateFiles_1_1.done) return [3 /*break*/, 12];
245
301
  generateFile = generateFiles_1_1.value;
246
302
  return [4 /*yield*/, fs.ensureDir(path.dirname(generateFile.path))];
247
303
  case 9:
248
- _g.sent();
304
+ _j.sent();
249
305
  return [4 /*yield*/, fs.writeFile(generateFile.path, generateFile.content)];
250
306
  case 10:
251
- _g.sent();
252
- _g.label = 11;
307
+ _j.sent();
308
+ _j.label = 11;
253
309
  case 11:
254
310
  generateFiles_1_1 = generateFiles_1.next();
255
311
  return [3 /*break*/, 8];
256
312
  case 12: return [3 /*break*/, 15];
257
313
  case 13:
258
- e_1_1 = _g.sent();
314
+ e_1_1 = _j.sent();
259
315
  e_1 = { error: e_1_1 };
260
316
  return [3 /*break*/, 15];
261
317
  case 14:
262
318
  try {
263
- if (generateFiles_1_1 && !generateFiles_1_1.done && (_f = generateFiles_1.return)) _f.call(generateFiles_1);
319
+ if (generateFiles_1_1 && !generateFiles_1_1.done && (_h = generateFiles_1.return)) _h.call(generateFiles_1);
264
320
  }
265
321
  finally { if (e_1) throw e_1.error; }
266
322
  return [7 /*endfinally*/];
@@ -280,23 +336,14 @@ exports.appletGenerate = (0, commandDefinition_1.createCommandDefinition)({
280
336
  });
281
337
  },
282
338
  });
283
- function createPackageConfig(name, version) {
339
+ function createPackageConfig(name, version, bundler) {
284
340
  return __awaiter(this, void 0, void 0, function () {
285
341
  return __generator(this, function (_a) {
286
342
  return [2 /*return*/, {
287
343
  name: name,
288
344
  version: version,
289
345
  main: 'dist/index.html',
290
- scripts: {
291
- start: "webpack serve --mode development",
292
- prepare: "npm run clean && npm run build",
293
- upload: "sos applet upload",
294
- clean: "npx rimraf dist",
295
- escheck: "npx es-check es5 dist/*.js",
296
- build: "webpack --mode production && npm run escheck",
297
- postbuild: "npm run escheck",
298
- connect: "webpack --watch",
299
- },
346
+ scripts: __assign(__assign({}, COMMON_SCRIPTS), (bundler === 'esbuild' ? ESBUILD_SCRIPTS : WEBPACK_SCRIPTS)),
300
347
  files: ['dist'],
301
348
  description: "signageOS applet",
302
349
  repository: {},
@@ -306,6 +353,7 @@ function createPackageConfig(name, version) {
306
353
  });
307
354
  }
308
355
  var createWebpackConfig = function (entryFileName, fileExtensions, imports, rules, plugins) { return "\n".concat(imports.join(';\n'), "\n\nexports = module.exports = {\n\tentry: ").concat(JSON.stringify('./src/' + entryFileName), ",\n\ttarget: ").concat(JSON.stringify(['web', 'es5']), ",\n\tinfrastructureLogging: {\n\t\tlevel: 'warn',\n\t},\n\toutput: {\n\t\tfilename: 'index.js',\n\t},\n\tresolve: {\n\t\textensions: ").concat(JSON.stringify(fileExtensions), ",\n\t},\n\tmodule: {\n\t\trules: [\n").concat(rules.join(',\n'), "\n\t\t],\n\t},\n\tplugins: [\n").concat(plugins.join(',\n'), "\n\t],\n};\n"); };
356
+ var createEsbuildConfig = function () { return "\nimport { Bundler } from '@signageos/lib/dist/ESBuild/Bundler.js';\nimport { stopwatch } from '@signageos/lib/dist/ESBuild/utils/stopwatch.js';\nimport { context } from 'esbuild';\n\nconst bundler = new Bundler({\n\toutdir: './dist',\n\tparameters: {},\n\targv: process.argv,\n});\n\nawait stopwatch('Building the applet', [\n\tasync () => {\n\t\tawait stopwatch('Bundling', async () => {\n\t\t\tawait bundler.writeIndexFile('./public/index.html');\n\t\t\tconst ctx = await context({\n\t\t\t\tentryPoints: ['./src/index.ts'],\n\t\t\t\toutdir: './dist',\n\t\t\t\tplatform: 'browser',\n\t\t\t\tbundle: true,\n\t\t\t\tminify: true,\n\t\t\t});\n\t\t\tawait bundler.build(ctx);\n\t\t});\n\t\tawait stopwatch('Transpiling to ES5', [\n\t\t\tbundler.transpileToES5({\n\t\t\t\tminify: true,\n\t\t\t\tenv: {\n\t\t\t\t\ttargets: {\n\t\t\t\t\t\tchrome: '28',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t]);\n\t},\n]);\n"; };
309
357
  var createIndexHtml = function (title) { return "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"utf-8\" />\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\" />\n\t<meta name=\"theme-color\" content=\"#000000\" />\n\t<title>".concat(title, "</title>\n</head>\n<body>\n\t<h1>Hello ").concat(title, "</h1>\n\t<div id=\"root\"></div>\n</body>\n</html>\n"); };
310
358
  var createIndexTs = function () { return createIndexJs(); }; // There is currently no differences
311
359
  var createIndexJs = function () { return "\nrequire('./index.css');\n\nimport sos from '@signageos/front-applet';\n\n// Wait on sos data are ready (https://docs.signageos.io/api/js/content/latest/js-applet-basics#onready)\nsos.onReady().then(async function () {\n\tconst contentElement = document.getElementById('root');\n\tconsole.log('sOS is ready');\n\tcontentElement.innerHTML = 'sOS is ready';\n});\n"; };
@@ -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,uDAAsD;AAEtD,IAAK,QAGJ;AAHD,WAAK,QAAQ;IACZ,qCAAyB,CAAA;IACzB,qCAAyB,CAAA;AAC1B,CAAC,EAHI,QAAQ,KAAR,QAAQ,QAGZ;AAED,IAAM,WAAW,GAAG,kBAAkB,CAAC;AACvC,IAAM,cAAc,GAAG,KAAK,CAAC;AAO7B,IAAM,WAAW,GAAG;IACnB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,qCAA8B,WAAW,CAAC,QAAQ,EAAE,CAAE,EAAE;IACnG,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,8CAA8C,EAAE,YAAY,EAAE,OAAO,EAAE;IAC5H,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,iDAAiD,EAAE;I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ringConstructor;
28
28
  readonly description: "Generate applet with \"typescript\" or \"javascript\" source code";
29
+ }, {
30
+ readonly name: "bundler";
31
+ readonly type: StringConstructor;
32
+ readonly description: "Generate applet with \"webpack\" (default) or \"esbuild\" bundler";
33
+ readonly defaultValue: "webpack";
29
34
  }];
30
35
  commands: never[];
31
36
  run(options: import("../Command/commandDefinition").CommandLineOptions<readonly [{
@@ -49,6 +54,11 @@ export declare const applet: {
49
54
  readonly name: "language";
50
55
  readonly type: StringConstructor;
51
56
  readonly description: "Generate applet with \"typescript\" or \"javascript\" source code";
57
+ }, {
58
+ readonly name: "bundler";
59
+ readonly type: StringConstructor;
60
+ readonly description: "Generate applet with \"webpack\" (default) or \"esbuild\" bundler";
61
+ readonly defaultValue: "webpack";
52
62
  }]>): Promise<void>;
53
63
  } | {
54
64
  name: "upload";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signageos/cli",
3
- "version": "1.4.3",
3
+ "version": "1.5.0",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  ".env",
@@ -29,15 +29,15 @@
29
29
  },
30
30
  "license": "MIT",
31
31
  "engines": {
32
- "node": "12",
33
- "npm": "6"
32
+ "node": "20",
33
+ "npm": "10"
34
34
  },
35
35
  "bin": {
36
36
  "sos": "./dist/index.js"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@istanbuljs/nyc-config-typescript": "1.0.2",
40
- "@signageos/codestyle": "0.0.23",
40
+ "@signageos/codestyle": "0.3.0",
41
41
  "@types/chalk": "2.2.0",
42
42
  "@types/child-process-promise": "2.2.1",
43
43
  "@types/cli-progress": "3.7.0",
package/CHANGELOG.md DELETED
@@ -1,284 +0,0 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
- and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
-
7
- ## [1.4.3] - 2024-08-19
8
- ### Fixed
9
- - Reverted the change of the `--update-package-config` argument. It is updated in `package.json` only when the argument is specified
10
-
11
- ## [1.4.2] - 2024-07-11
12
- ### Fixed
13
- - Applet UID is now always inserted in the `package.json` file during the applet upload process if not found or the `--update-package-config` argument is specified
14
-
15
- ## [1.4.1] - 2023-10-02
16
- ### Fixed
17
- - Auth0 compatibility (auto select)
18
-
19
- ## [1.4.0] - 2023-09-25
20
- ### Added
21
- - Update readme
22
- - Auth0 compatibility
23
-
24
- ## [1.3.1] - 2023-08-29
25
-
26
- ## [1.3.0] - 2023-05-19
27
- ### Fixed
28
- - New version announcement has a link to the changelog
29
- - Command for Applet Generate will produce correct RegExp in `webpack.config.js` with proper escaping of dots using backslashes
30
- - ES check for ES5 output applet code is done after every build (to prevent problems in real devices)
31
- - Use `apiUrl` config from `~/.sosrc` file if specified for all commands (rather than default value `https://api.signageos.io`)
32
-
33
- ### Added
34
- - New argument for commands Applet Generate `--language=typescript` that will produce the sample code written in TypeScript rather than JavaScript. Default is `--language=javascript`.
35
-
36
- ## [1.2.1] - 2023-04-01
37
- ### Fixed
38
- - `sos applet start --hot-reload` Reload devices when no one has connected yet
39
- - `sos applet start --hot-reload` works correctly even on Windows systems
40
-
41
- ## [1.2.0] - 2023-03-29
42
- ### Fixed
43
- - Console output of `npm start` of generated applet shows correct URL of emulator
44
- - The `--entry-file` can be now ommited when the `package.json` has the `main` property set
45
- - The `sos device connect` is looking for the applet in server by `name` instead of required `uid` in `package.json` `sos.appletUid` property
46
- - The `.git` folder is ignored automatically when the `.gitignore` file is used
47
-
48
- ### Added
49
- - Allow customize `--server-port` and `--server-public-url` for `sos device connect` command
50
- - New `sos applet build` command that will build current applet as a `.package.zip` file (same that is built and used on device when uploading applet)
51
-
52
- ### Deprecated
53
- - Remove support of experimental version of webpack-plugin v0.2. Use version v1+ instead
54
-
55
- ## [1.1.5] - 2023-01-02
56
- ### Fixed
57
- - Respect argument `--api-url` as priority over `SOS_API_URL` environment variable and default value
58
- - Log info/warning output into stderr instead of stdout
59
-
60
- ## [1.1.4] - 2022-11-25
61
- ### Fixed
62
- - Removed unused `display.appcache` file from Emulator (replaced with `serviceWorker.js`)
63
-
64
- ## [1.1.3] - 2022-10-31
65
- ### Fixed
66
- - Removed `--module=false` argument from es-check of `sos applet generate` sample applet
67
-
68
- ## [1.1.2] - 2022-10-21
69
- ### Fixed
70
- - Loading of emulators for command `sos applet start` from currently configured organization (via `~/.sosrc` file, `defaultOrganizationUid` property).
71
-
72
- ## [1.1.1] - 2022-08-04
73
- ### Fixed
74
- - Invoke rebuild applet version after upload only when some files were changed
75
-
76
- ## [1.1.0] - 2022-07-20
77
- ### Added
78
- - Config API url via the config file `~/.sosrc`
79
-
80
- ### Fixed
81
- - Parametrizing Applet UID using `--applet-uid` option
82
- - Ignoring `node_modules/` from applet uploading
83
-
84
- ## [1.0.4] - 2022-07-18
85
- ### Fixed
86
- - Uploading single file applet with front-applet version
87
- - Uploading applet files will invoke building applet only once at the end
88
- - CLI version in User-Agent header (e.g.: `signageOS_CLI/1.0.4`)
89
-
90
- ## [1.0.3] - 2022-06-14
91
- ### Fixed
92
- - Applet generate using Webpack 5
93
-
94
- ## [1.0.2] - 2022-05-06
95
- ### Fixed
96
- - Usage of @signageos/lib dependency
97
-
98
- ## [1.0.1] - 2022-05-06
99
- ### Fixed
100
- - Upgrade underlying SDK
101
-
102
- ## [1.0.0] - 2022-04-06
103
- ### Added
104
- - The appletUid does not have to be hardcoded inside package.json and is auto-detected from current organization based on name
105
- - Support for profiles inside the ~/.sosrc file using ini `[profile xxx]` sections and SOS_PROFILE env. var. or `--profile` argument
106
-
107
- ### Fixed
108
- - When default organization is not set it asks for saving it to the current ~/.sosrc file
109
-
110
- ### Changed
111
- - The option `--no-update-package-config` is reversed into option `--update-package-config` and by default the package.json is not updated. See README.
112
- - The `defaultOrganizationUid` is now always used as default for all commands instead of selecting one. Use argument `--no-default-organization` or remove line `defaultOrganizationUid` from `~/.sosrc` to prevent this.
113
-
114
- ## [0.10.3] - 2022-01-18
115
- ### Fixed
116
- - Compatibility with peer dependency for front-display version 9.13.0+ (because of changed API)
117
-
118
- ## [0.10.2] - 2021-12-17
119
- ### Fixed
120
- - Listing timings
121
- - Creating applet without sos.appletUid in package.json
122
-
123
- ## [0.10.1] - 2021-12-12
124
- ### Fixed
125
- - Bug showing error `Invalid ecmascript version` when building generated applet
126
-
127
- ## [0.10.0] - 2021-11-05
128
- ### Added
129
- - Applet uid & version can be specified as environment variables `SOS_APPLET_UID` & `SOS_APPLET_VERSION`.
130
- - Command `sos applet upload` optionally accepts `--no-update-package-config` argument which prevents updating package.json config.
131
- - Allow parametrize credentials using environment variables `SOS_API_IDENTIFICATION` & `SOS_API_SECURITY_TOKEN`.
132
- - Allow parametrize default organization using environment variable `SOS_ORGANIZATION_UID`.
133
- - Uploading applet tests command
134
- - Running applet tests command
135
-
136
- ### Fixed
137
- - When uploading new applet, package.json sos is merged recursively.
138
-
139
- ## [0.9.3] - 2021-10-20
140
- ### Fixed
141
- - Command `sos applet upload` works stably even on win32 platform
142
-
143
- ## [0.9.2] - 2021-03-11
144
- ### Fixed
145
- - Uploading firmware specifying type (`android` & `linux` accepts firmware type. E.g.: `rpi`, `rpi4`, `benq_sl550`)
146
-
147
- ## [0.9.1] - 2021-02-17
148
- ### Fixed
149
- - `sos applet start` works properly even for remote machine using IP address (not just for localhost)
150
-
151
- ## [0.9.0] - 2021-02-02
152
- ### Added
153
- - Deploy applet do device using `sos device set-content --applet-uid < > --device-uid < >`
154
- - New command for Applet reload `sos device power-action`
155
- - Connecting to device and upload applet from local computer
156
- - One emulator per account is used and its uid is stored in .sosrc file
157
-
158
- ## [0.8.4] - 2021-01-05
159
- ### Fixed
160
- - Command for generation of applet is generating multi-file applet now (not deprecated single-file).
161
- - Add missing useful NPM scripts into generated applet
162
-
163
- ## [0.8.3] - 2020-10-22
164
- ### Fixed
165
- - Optimize authentication for all REST API requests with new token ID (please do the `sos login` again to perform this changes on your machine)
166
- - Make checking new available version of CLI only once in an hour
167
-
168
- ## [0.8.2] - 2020-10-13
169
- ### Security
170
- - Fix dependabot alerts
171
-
172
- ## [0.8.1] - 2020-09-24
173
- ### Fixed
174
- - applet upload won't fail with error "Request failed with status code 404. Body: Could not delete the file"
175
-
176
- ## [0.8.0] - 2020-08-27
177
- ### Added
178
- - `verbose` flag to show all files when uploading multifile applet
179
- - `yes` flag to skip confirmation process and upload right away
180
- - in package.json file of the uploaded applet specify files to upload in `files` list (they will be uploaded regardless of all ignores), also supports glob patterns
181
- - in generated applet, `files` list is already added with `dist` directry by default
182
-
183
- ### Fixed
184
- - show error on particular file when upload was unsuccessfull (i.e when uploading empty file)
185
-
186
- ## [0.7.1] - 2020-06-22
187
- ### Fixed
188
- - Applet file upload sets the content type of files as well
189
-
190
- ## [0.7.0] - 2020-03-05
191
- ### Changed
192
- - Applet generate version option renamed to applet-version
193
-
194
- ### Removed
195
- - `@signageos/webpack-plugin` is separated to self repository
196
-
197
- ### Added
198
- - Version option
199
- - Applet generate accepts optional argument for `--npm-registry`
200
-
201
- ### Fixed
202
- - Warnings during installation `npm i @signageos/cli -g`
203
-
204
- ### Security
205
- - Audit fixes based on `npm audit`
206
- - Upgrade base node version engine to LTS 12
207
-
208
- ## [0.6.2] - 2020-02-06
209
- ### Fixed
210
- - Issues with entry file paths on Windows
211
-
212
- ## [0.6.1] - 2020-01-17
213
- ### Fixed
214
- - Discrepancy between project and applet dirs naming
215
- - Issues with file paths on Windows
216
- - Configure webpack plugin with options. `https`, `port`, `public`, `useLocalIp`, `host`
217
-
218
- ## [0.6.0] - 2020-01-13
219
- ### Added
220
- - Upload multi file applet
221
- - Firmware upload
222
- - Multi file applet emulator
223
-
224
- ## [0.5.0] - 2019-11-28
225
- ### Added
226
- - Support multiple files of applet in Webpack Plugin
227
-
228
- ### Fixed
229
- - Allow CORS in webpack plugin 8090 emulator proxy port for develop applet externally
230
- - Universal assets supported for webpack plugin (images, fonts, binaries etc.)
231
- - Make more memory efficient proxy of emulator webpack plugin
232
- - Compatibility with Node.js >= 8 (no upper limit)
233
-
234
- ## [0.4.4] - 2019-09-24
235
- ### Fixed
236
- - Do transpile applet code always with babel-loader to allow run it on any old device out of box
237
-
238
- ## [0.4.3] - 2019-09-24
239
- ### Fixed
240
- - Upgrade versions of front-applet (JS API) & front-display (Emulator) for generated applet
241
-
242
- ## [0.4.2] - 2019-09-23
243
- ### Fixed
244
- - Applet generator will generate applet which works on older platforms (SSSP, Tizen 2, WebOS 3, BrightSign 7)
245
-
246
- ## [0.4.1] - 2019-09-23
247
- ### Fixed
248
- - Default API & BOX url are api.signageos.io & box.signageos.io
249
-
250
- ## [0.4.0] - 2019-09-21
251
- ### Added
252
- - Upload applet to cloud using `sos applet upload`
253
-
254
- ### Fixed
255
- - Build production webpack will not start emulator
256
- - Live Reload webpack plugin of applet will trigger sos.onReady event
257
- - Errors are printed in red color
258
-
259
- ## [0.3.2] - 2019-09-05
260
- ### Fixed
261
- - Default env variables for sos command (for example api.signageos.io host)
262
-
263
- ## [0.3.1] - 2019-09-05
264
- ### Fixed
265
- - Private dependency from private npm registry (now it can install any user)
266
-
267
- ## [0.3.0] - 2019-09-05
268
- ### Added
269
- - Login account using username/email and password to access other REST resources `sos login`
270
- - Organization listing of currently logged account `sos organization list` & `sos organization get`
271
- - Timing listing of specific device and organization `sos timing list`
272
- - Webpack Plugin which allows run generated applet in local emulator
273
- - Allow set-default organization of current logged user (useful for Webpack Plugin)
274
-
275
- ### Fixed
276
- - New UI for `--help` guide
277
- - `--api-url` will change the base url for REST API
278
- - .env file is looked for in default location first
279
- - Publishing public npm registry
280
-
281
- ## [0.1.0] - 2019-08-02
282
- ### Added
283
- - Package is available in npm registry https://www.npmjs.com/package/@signageos/cli
284
- - Applet generation command to create vanilla JS applet `sos applet generate --name my-new-applet`