@signageos/cli 2.3.1 → 2.3.2

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.
Files changed (127) hide show
  1. package/README.md +1 -0
  2. package/dist/Applet/Build/appletBuildCommand.js +28 -72
  3. package/dist/Applet/Generate/Templates/rspack.config.mjs.template +12 -12
  4. package/dist/Applet/Generate/appletGenerateCommand.d.ts +23 -62
  5. package/dist/Applet/Generate/appletGenerateCommand.js +398 -365
  6. package/dist/Applet/Start/appletStartCommand.js +69 -131
  7. package/dist/Applet/Test/Upload/appletTestRunCommand.js +89 -177
  8. package/dist/Applet/Test/Upload/appletTestRunFacade.js +4 -27
  9. package/dist/Applet/Test/Upload/appletTestUploadCommand.js +98 -223
  10. package/dist/Applet/Test/Upload/appletTestUploadFacade.js +39 -102
  11. package/dist/Applet/Test/appletTestCommand.js +6 -36
  12. package/dist/Applet/Upload/appletUploadCommand.js +199 -305
  13. package/dist/Applet/Upload/appletUploadCommandHelper.js +103 -138
  14. package/dist/Applet/Upload/appletUploadFacade.d.ts +2 -2
  15. package/dist/Applet/Upload/appletUploadFacade.js +172 -263
  16. package/dist/Applet/Upload/appletUploadFacadeHelper.js +39 -52
  17. package/dist/Applet/appletCommand.d.ts +22 -62
  18. package/dist/Applet/appletCommand.js +9 -39
  19. package/dist/Applet/appletErrors.js +5 -24
  20. package/dist/Applet/appletFacade.js +106 -141
  21. package/dist/Applet/appletServerHelper.js +16 -53
  22. package/dist/Auth/loginCommand.js +96 -137
  23. package/dist/Cache/tmpCache.js +35 -13
  24. package/dist/Cli/helper.js +1 -2
  25. package/dist/Cli/packageVersion.js +82 -123
  26. package/dist/Command/commandDefinition.js +0 -1
  27. package/dist/Command/commandProcessor.js +40 -129
  28. package/dist/Command/globalArgs.js +7 -5
  29. package/dist/CommandLine/IProgressBar.js +0 -1
  30. package/dist/CommandLine/progressBarFactory.js +31 -11
  31. package/dist/CustomScript/Generate/customScriptGenerateCommand.js +17 -56
  32. package/dist/CustomScript/Generate/customScriptGenerateFacade.js +82 -106
  33. package/dist/CustomScript/Upload/customScriptUploadCommand.js +44 -120
  34. package/dist/CustomScript/customScriptCommand.js +6 -36
  35. package/dist/CustomScript/customScriptFacade.js +175 -294
  36. package/dist/Device/Connect/connectCommand.js +72 -136
  37. package/dist/Device/Content/setContentCommand.js +33 -78
  38. package/dist/Device/PowerAction/powerActionCommand.js +22 -65
  39. package/dist/Device/deviceCommand.js +7 -37
  40. package/dist/Device/deviceFacade.js +67 -123
  41. package/dist/Emulator/IEmulator.js +0 -1
  42. package/dist/Emulator/createDomain.js +33 -12
  43. package/dist/Emulator/emulatorFacade.js +74 -131
  44. package/dist/Emulator/emulatorFactory.js +112 -124
  45. package/dist/Firmware/Upload/firmwareUploadCommand.js +133 -221
  46. package/dist/Firmware/Upload/firmwareUploadFacade.js +64 -110
  47. package/dist/Firmware/Upload/firmwareUploadHelper.js +27 -5
  48. package/dist/Firmware/firmwareCommand.js +5 -35
  49. package/dist/Lib/archive.js +45 -60
  50. package/dist/Lib/childProcess.js +27 -5
  51. package/dist/Lib/fileSystem.js +62 -82
  52. package/dist/Lib/git.d.ts +1 -1
  53. package/dist/Lib/git.js +44 -82
  54. package/dist/Organization/Get/organizationGetCommand.js +14 -50
  55. package/dist/Organization/List/organizationListCommand.js +12 -46
  56. package/dist/Organization/SetDefault/organizationSetDefaultCommand.js +18 -56
  57. package/dist/Organization/organizationCommand.js +7 -37
  58. package/dist/Organization/organizationFacade.js +97 -172
  59. package/dist/RunControl/runControlHelper.js +11 -60
  60. package/dist/Timer/wait.js +1 -2
  61. package/dist/Timing/List/timingListCommand.js +20 -62
  62. package/dist/Timing/timingCommand.js +5 -35
  63. package/dist/generalCommand.js +1 -2
  64. package/dist/helper.js +48 -109
  65. package/dist/index.js +15 -45
  66. package/dist/parameters.js +17 -40
  67. package/package.json +16 -18
  68. package/dist/Applet/Build/appletBuildCommand.js.map +0 -1
  69. package/dist/Applet/Generate/appletGenerateCommand.js.map +0 -1
  70. package/dist/Applet/Start/appletStartCommand.js.map +0 -1
  71. package/dist/Applet/Test/Upload/appletTestRunCommand.js.map +0 -1
  72. package/dist/Applet/Test/Upload/appletTestRunFacade.js.map +0 -1
  73. package/dist/Applet/Test/Upload/appletTestUploadCommand.js.map +0 -1
  74. package/dist/Applet/Test/Upload/appletTestUploadFacade.js.map +0 -1
  75. package/dist/Applet/Test/appletTestCommand.js.map +0 -1
  76. package/dist/Applet/Upload/appletUploadCommand.js.map +0 -1
  77. package/dist/Applet/Upload/appletUploadCommandHelper.js.map +0 -1
  78. package/dist/Applet/Upload/appletUploadFacade.js.map +0 -1
  79. package/dist/Applet/Upload/appletUploadFacadeHelper.js.map +0 -1
  80. package/dist/Applet/appletCommand.js.map +0 -1
  81. package/dist/Applet/appletErrors.js.map +0 -1
  82. package/dist/Applet/appletFacade.js.map +0 -1
  83. package/dist/Applet/appletServerHelper.js.map +0 -1
  84. package/dist/Auth/loginCommand.js.map +0 -1
  85. package/dist/Cache/tmpCache.js.map +0 -1
  86. package/dist/Cli/helper.js.map +0 -1
  87. package/dist/Cli/packageVersion.js.map +0 -1
  88. package/dist/Command/commandDefinition.js.map +0 -1
  89. package/dist/Command/commandProcessor.js.map +0 -1
  90. package/dist/Command/globalArgs.js.map +0 -1
  91. package/dist/CommandLine/IProgressBar.js.map +0 -1
  92. package/dist/CommandLine/progressBarFactory.js.map +0 -1
  93. package/dist/CustomScript/Generate/customScriptGenerateCommand.js.map +0 -1
  94. package/dist/CustomScript/Generate/customScriptGenerateFacade.js.map +0 -1
  95. package/dist/CustomScript/Upload/customScriptUploadCommand.js.map +0 -1
  96. package/dist/CustomScript/customScriptCommand.js.map +0 -1
  97. package/dist/CustomScript/customScriptFacade.js.map +0 -1
  98. package/dist/Device/Connect/connectCommand.js.map +0 -1
  99. package/dist/Device/Content/setContentCommand.js.map +0 -1
  100. package/dist/Device/PowerAction/powerActionCommand.js.map +0 -1
  101. package/dist/Device/deviceCommand.js.map +0 -1
  102. package/dist/Device/deviceFacade.js.map +0 -1
  103. package/dist/Emulator/IEmulator.js.map +0 -1
  104. package/dist/Emulator/createDomain.js.map +0 -1
  105. package/dist/Emulator/emulatorFacade.js.map +0 -1
  106. package/dist/Emulator/emulatorFactory.js.map +0 -1
  107. package/dist/Firmware/Upload/firmwareUploadCommand.js.map +0 -1
  108. package/dist/Firmware/Upload/firmwareUploadFacade.js.map +0 -1
  109. package/dist/Firmware/Upload/firmwareUploadHelper.js.map +0 -1
  110. package/dist/Firmware/firmwareCommand.js.map +0 -1
  111. package/dist/Lib/archive.js.map +0 -1
  112. package/dist/Lib/childProcess.js.map +0 -1
  113. package/dist/Lib/fileSystem.js.map +0 -1
  114. package/dist/Lib/git.js.map +0 -1
  115. package/dist/Organization/Get/organizationGetCommand.js.map +0 -1
  116. package/dist/Organization/List/organizationListCommand.js.map +0 -1
  117. package/dist/Organization/SetDefault/organizationSetDefaultCommand.js.map +0 -1
  118. package/dist/Organization/organizationCommand.js.map +0 -1
  119. package/dist/Organization/organizationFacade.js.map +0 -1
  120. package/dist/RunControl/runControlHelper.js.map +0 -1
  121. package/dist/Timer/wait.js.map +0 -1
  122. package/dist/Timing/List/timingListCommand.js.map +0 -1
  123. package/dist/Timing/timingCommand.js.map +0 -1
  124. package/dist/generalCommand.js.map +0 -1
  125. package/dist/helper.js.map +0 -1
  126. package/dist/index.js.map +0 -1
  127. package/dist/parameters.js.map +0 -1
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -8,40 +31,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
31
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
32
  });
10
33
  };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
36
  };
38
37
  Object.defineProperty(exports, "__esModule", { value: true });
39
38
  exports.getAppletEntryFileRelativePath = exports.getAppletEntryFileAbsolutePath = exports.getAppletBinaryFileAbsolutePath = exports.getAppletDirectoryAbsolutePath = exports.APPLET_PATH_OPTION = exports.ENTRY_FILE_PATH_OPTION = void 0;
40
- var log_1 = require("@signageos/sdk/dist/Console/log");
41
- var fs = require("fs-extra");
42
- var path = require("path");
43
- var packageConfig_1 = require("@signageos/sdk/dist/FileSystem/packageConfig");
44
- var chalk_1 = require("chalk");
39
+ const log_1 = require("@signageos/sdk/dist/Console/log");
40
+ const fs = __importStar(require("fs-extra"));
41
+ const path = __importStar(require("path"));
42
+ const packageConfig_1 = require("@signageos/sdk/dist/FileSystem/packageConfig");
43
+ const chalk_1 = __importDefault(require("chalk"));
45
44
  exports.ENTRY_FILE_PATH_OPTION = {
46
45
  name: 'entry-file-path',
47
46
  type: String,
@@ -52,132 +51,98 @@ exports.APPLET_PATH_OPTION = {
52
51
  type: String,
53
52
  description: 'Path to the applet file or the project folder depending on the entry file. Relative to the command or absolute.',
54
53
  };
55
- var DEFAULT_APPLET_DIR_PATH = '.';
56
- var DEFAULT_APPLET_ENTRY_FILE_PATH = 'dist/index.html';
57
- var DEFAULT_APPLET_BINARY_FILE_PATH = 'dist/index.html';
54
+ const DEFAULT_APPLET_DIR_PATH = '.';
55
+ const DEFAULT_APPLET_ENTRY_FILE_PATH = 'dist/index.html';
56
+ const DEFAULT_APPLET_BINARY_FILE_PATH = 'dist/index.html';
58
57
  function getAppletDirectoryAbsolutePath(currentDirectory, options) {
59
- return __awaiter(this, void 0, void 0, function () {
60
- var appletDirectoryPath, appletDirectoryPathExists, isDirectory;
61
- return __generator(this, function (_a) {
62
- switch (_a.label) {
63
- case 0:
64
- appletDirectoryPath = options['applet-path'];
65
- if (!appletDirectoryPath) {
66
- appletDirectoryPath = DEFAULT_APPLET_DIR_PATH;
67
- }
68
- if (!path.isAbsolute(appletDirectoryPath)) {
69
- appletDirectoryPath = path.join(currentDirectory, appletDirectoryPath);
70
- }
71
- if (appletDirectoryPath.length > 1 && appletDirectoryPath[appletDirectoryPath.length - 1] === '/') {
72
- appletDirectoryPath = appletDirectoryPath.substring(0, appletDirectoryPath.length - 1);
73
- }
74
- (0, log_1.log)('info', "\nUse applet project directory path: ".concat(appletDirectoryPath));
75
- return [4 /*yield*/, fs.pathExists(appletDirectoryPath)];
76
- case 1:
77
- appletDirectoryPathExists = _a.sent();
78
- if (!appletDirectoryPathExists) {
79
- throw new Error("Applet project directory not found: ".concat(appletDirectoryPath));
80
- }
81
- return [4 /*yield*/, fs.stat(appletDirectoryPath)];
82
- case 2:
83
- isDirectory = (_a.sent()).isDirectory();
84
- if (!isDirectory) {
85
- throw new Error("Applet project path is not a directory: ".concat(appletDirectoryPath));
86
- }
87
- return [2 /*return*/, appletDirectoryPath];
88
- }
89
- });
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ let appletDirectoryPath = options['applet-path'];
60
+ if (!appletDirectoryPath) {
61
+ appletDirectoryPath = DEFAULT_APPLET_DIR_PATH;
62
+ }
63
+ if (!path.isAbsolute(appletDirectoryPath)) {
64
+ appletDirectoryPath = path.join(currentDirectory, appletDirectoryPath);
65
+ }
66
+ if (appletDirectoryPath.length > 1 && appletDirectoryPath[appletDirectoryPath.length - 1] === '/') {
67
+ appletDirectoryPath = appletDirectoryPath.substring(0, appletDirectoryPath.length - 1);
68
+ }
69
+ (0, log_1.log)('info', `\nUse applet project directory path: ${appletDirectoryPath}`);
70
+ const appletDirectoryPathExists = yield fs.pathExists(appletDirectoryPath);
71
+ if (!appletDirectoryPathExists) {
72
+ throw new Error(`Applet project directory not found: ${appletDirectoryPath}`);
73
+ }
74
+ const isDirectory = (yield fs.stat(appletDirectoryPath)).isDirectory();
75
+ if (!isDirectory) {
76
+ throw new Error(`Applet project path is not a directory: ${appletDirectoryPath}`);
77
+ }
78
+ return appletDirectoryPath;
90
79
  });
91
80
  }
92
81
  exports.getAppletDirectoryAbsolutePath = getAppletDirectoryAbsolutePath;
93
82
  function getAppletBinaryFileAbsolutePath(currentDirectory, options) {
94
- return __awaiter(this, void 0, void 0, function () {
95
- var appletBinaryFilePath, appletBinaryFilePathExists, isFile;
96
- return __generator(this, function (_a) {
97
- switch (_a.label) {
98
- case 0:
99
- appletBinaryFilePath = options['applet-path'];
100
- if (!appletBinaryFilePath) {
101
- appletBinaryFilePath = DEFAULT_APPLET_BINARY_FILE_PATH;
102
- }
103
- if (!path.isAbsolute(appletBinaryFilePath)) {
104
- appletBinaryFilePath = path.join(currentDirectory, appletBinaryFilePath);
105
- }
106
- (0, log_1.log)('info', "\nUse applet binary file: ".concat(appletBinaryFilePath));
107
- return [4 /*yield*/, fs.pathExists(appletBinaryFilePath)];
108
- case 1:
109
- appletBinaryFilePathExists = _a.sent();
110
- if (!appletBinaryFilePathExists) {
111
- throw new Error("Applet binary file not found: ".concat(appletBinaryFilePath));
112
- }
113
- return [4 /*yield*/, fs.stat(appletBinaryFilePath)];
114
- case 2:
115
- isFile = (_a.sent()).isFile();
116
- if (!isFile) {
117
- throw new Error("Applet binary path is not a file: ".concat(appletBinaryFilePath));
118
- }
119
- return [2 /*return*/, appletBinaryFilePath];
120
- }
121
- });
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ let appletBinaryFilePath = options['applet-path'];
85
+ if (!appletBinaryFilePath) {
86
+ appletBinaryFilePath = DEFAULT_APPLET_BINARY_FILE_PATH;
87
+ }
88
+ if (!path.isAbsolute(appletBinaryFilePath)) {
89
+ appletBinaryFilePath = path.join(currentDirectory, appletBinaryFilePath);
90
+ }
91
+ (0, log_1.log)('info', `\nUse applet binary file: ${appletBinaryFilePath}`);
92
+ const appletBinaryFilePathExists = yield fs.pathExists(appletBinaryFilePath);
93
+ if (!appletBinaryFilePathExists) {
94
+ throw new Error(`Applet binary file not found: ${appletBinaryFilePath}`);
95
+ }
96
+ const isFile = (yield fs.stat(appletBinaryFilePath)).isFile();
97
+ if (!isFile) {
98
+ throw new Error(`Applet binary path is not a file: ${appletBinaryFilePath}`);
99
+ }
100
+ return appletBinaryFilePath;
122
101
  });
123
102
  }
124
103
  exports.getAppletBinaryFileAbsolutePath = getAppletBinaryFileAbsolutePath;
125
104
  function getAppletEntryFileAbsolutePath(currentDirectory, options) {
126
- return __awaiter(this, void 0, void 0, function () {
127
- var appletEntryFilePath, packageConfig, appletEntryFilePathExists, isFile;
128
- return __generator(this, function (_a) {
129
- switch (_a.label) {
130
- case 0:
131
- appletEntryFilePath = options['entry-file-path'];
132
- if (!!appletEntryFilePath) return [3 /*break*/, 2];
133
- return [4 /*yield*/, (0, packageConfig_1.loadPackage)(currentDirectory)];
134
- case 1:
135
- packageConfig = _a.sent();
136
- appletEntryFilePath = packageConfig === null || packageConfig === void 0 ? void 0 : packageConfig.main;
137
- _a.label = 2;
138
- case 2:
139
- if (!appletEntryFilePath) {
140
- appletEntryFilePath = DEFAULT_APPLET_ENTRY_FILE_PATH;
141
- }
142
- if (!path.isAbsolute(appletEntryFilePath)) {
143
- appletEntryFilePath = path.join(currentDirectory, appletEntryFilePath);
144
- }
145
- (0, log_1.log)('info', "\nUse applet entry file: ".concat(appletEntryFilePath));
146
- return [4 /*yield*/, fs.pathExists(appletEntryFilePath)];
147
- case 3:
148
- appletEntryFilePathExists = _a.sent();
149
- if (!appletEntryFilePathExists) {
150
- throw new Error("Applet entry file not found: ".concat(appletEntryFilePath, "\nDid you forget to build your applet by ").concat(chalk_1.default.green('sos applet build'), "?"));
151
- }
152
- return [4 /*yield*/, fs.stat(appletEntryFilePath)];
153
- case 4:
154
- isFile = (_a.sent()).isFile();
155
- if (!isFile) {
156
- throw new Error("Applet entry path is not a file: ".concat(appletEntryFilePath));
157
- }
158
- return [2 /*return*/, appletEntryFilePath];
159
- }
160
- });
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ let appletEntryFilePath = options['entry-file-path'];
107
+ if (!appletEntryFilePath) {
108
+ const packageConfig = yield (0, packageConfig_1.loadPackage)(currentDirectory);
109
+ appletEntryFilePath = packageConfig === null || packageConfig === void 0 ? void 0 : packageConfig.main;
110
+ }
111
+ if (!appletEntryFilePath) {
112
+ appletEntryFilePath = DEFAULT_APPLET_ENTRY_FILE_PATH;
113
+ }
114
+ if (!path.isAbsolute(appletEntryFilePath)) {
115
+ appletEntryFilePath = path.join(currentDirectory, appletEntryFilePath);
116
+ }
117
+ (0, log_1.log)('info', `\nUse applet entry file: ${appletEntryFilePath}`);
118
+ const appletEntryFilePathExists = yield fs.pathExists(appletEntryFilePath);
119
+ if (!appletEntryFilePathExists) {
120
+ throw new Error(`Applet entry file not found: ${appletEntryFilePath}\nDid you forget to build your applet by ${chalk_1.default.green('sos applet build')}?`);
121
+ }
122
+ const isFile = (yield fs.stat(appletEntryFilePath)).isFile();
123
+ if (!isFile) {
124
+ throw new Error(`Applet entry path is not a file: ${appletEntryFilePath}`);
125
+ }
126
+ return appletEntryFilePath;
161
127
  });
162
128
  }
163
129
  exports.getAppletEntryFileAbsolutePath = getAppletEntryFileAbsolutePath;
164
130
  function getAppletEntryFileRelativePath(entryFileAbsolutePath, appletDirectoryAbsolutePath) {
165
- var appletDirectoryAbsolutePathNormalized = path.normalize(appletDirectoryAbsolutePath);
166
- var entryFileAbsolutePathNormalized = path.normalize(entryFileAbsolutePath);
131
+ const appletDirectoryAbsolutePathNormalized = path.normalize(appletDirectoryAbsolutePath);
132
+ const entryFileAbsolutePathNormalized = path.normalize(entryFileAbsolutePath);
167
133
  if (!path.isAbsolute(entryFileAbsolutePathNormalized)) {
168
- throw new Error("Internal Error: Try input relative entry file path. Current path: ".concat(entryFileAbsolutePathNormalized));
134
+ throw new Error(`Internal Error: Try input relative entry file path. Current path: ${entryFileAbsolutePathNormalized}`);
169
135
  }
170
136
  if (!path.isAbsolute(appletDirectoryAbsolutePathNormalized)) {
171
- throw new Error("Internal Error: Try input relative applet directory path. Current path: ".concat(appletDirectoryAbsolutePathNormalized));
137
+ throw new Error(`Internal Error: Try input relative applet directory path. Current path: ${appletDirectoryAbsolutePathNormalized}`);
172
138
  }
173
- var isEntryFileInAppletDir = entryFileAbsolutePathNormalized.startsWith(appletDirectoryAbsolutePathNormalized);
139
+ const isEntryFileInAppletDir = entryFileAbsolutePathNormalized.startsWith(appletDirectoryAbsolutePathNormalized);
174
140
  if (!isEntryFileInAppletDir) {
175
- throw new Error("Applet entry file must be in the applet directory." +
176
- "\nEntry file path: ".concat(entryFileAbsolutePathNormalized) +
177
- "\nApplet directory path: ".concat(appletDirectoryAbsolutePathNormalized));
141
+ throw new Error(`Applet entry file must be in the applet directory.` +
142
+ `\nEntry file path: ${entryFileAbsolutePathNormalized}` +
143
+ `\nApplet directory path: ${appletDirectoryAbsolutePathNormalized}`);
178
144
  }
179
- var entryFileRelativePath = entryFileAbsolutePathNormalized.substring(appletDirectoryAbsolutePathNormalized.length + 1);
145
+ const entryFileRelativePath = entryFileAbsolutePathNormalized.substring(appletDirectoryAbsolutePathNormalized.length + 1);
180
146
  return entryFileRelativePath;
181
147
  }
182
148
  exports.getAppletEntryFileRelativePath = getAppletEntryFileRelativePath;
183
- //# sourceMappingURL=appletUploadCommandHelper.js.map
@@ -19,7 +19,7 @@ export declare const updateMultiFileApplet: (parameters: {
19
19
  directoryPath: string;
20
20
  files: string[];
21
21
  };
22
- progressBar?: ProgressBar | undefined;
22
+ progressBar?: ProgressBar;
23
23
  }) => Promise<void>;
24
24
  export declare const createSingleFileApplet: (parameters: {
25
25
  restApi: RestApi;
@@ -40,5 +40,5 @@ export declare const createMultiFileFileApplet: (parameters: {
40
40
  directoryPath: string;
41
41
  files: string[];
42
42
  };
43
- progressBar?: ProgressBar | undefined;
43
+ progressBar?: ProgressBar;
44
44
  }) => Promise<void>;