@signageos/webpack-plugin 0.3.1 → 1.0.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 +4 -5
- package/config/parameters.d.ts +1 -0
- package/config/parameters.js +2 -0
- package/dist/index.d.ts +18 -4
- package/dist/index.js +171 -111
- package/dist/index.js.map +1 -1
- package/package.json +6 -10
- package/dist/ConnectControl/apiHelper.d.ts +0 -3
- package/dist/ConnectControl/apiHelper.js +0 -90
- package/dist/ConnectControl/apiHelper.js.map +0 -1
- package/dist/ConnectControl/helper.d.ts +0 -11
- package/dist/ConnectControl/helper.js +0 -247
- package/dist/ConnectControl/helper.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# signageOS Emulator Webpack Plugin
|
|
2
2
|
|
|
3
|
-
signageOS webpack plugin which allows
|
|
3
|
+
signageOS webpack plugin which allows debugging signageOS application in the browser environment locally
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
```bash
|
|
@@ -18,11 +18,10 @@ exports = module.exports = {
|
|
|
18
18
|
plugins: [
|
|
19
19
|
// ...
|
|
20
20
|
new SignageOSPlugin({
|
|
21
|
-
https: true, // default false
|
|
22
21
|
port: 8083, // default 8090
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
publicUrl: 'http://192.168.1.113:8083', // default http://localhost:8090
|
|
23
|
+
appletPort: 8091, // default 8091
|
|
24
|
+
appletPublicUrl: 'http://192.168.1.113:8084', // default http://localhost:8091
|
|
26
25
|
}),
|
|
27
26
|
],
|
|
28
27
|
};
|
package/config/parameters.d.ts
CHANGED
package/config/parameters.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import * as webpack from 'webpack';
|
|
2
2
|
export interface IWebpackOptions {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Emulator port.
|
|
5
|
+
* @default 8090
|
|
6
|
+
*/
|
|
4
7
|
port?: number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @default http://localhost:8090
|
|
10
|
+
*/
|
|
11
|
+
publicUrl?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom applet server port.
|
|
14
|
+
* @default 8091
|
|
15
|
+
*/
|
|
16
|
+
appletPort?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Public url of local machine applet server.
|
|
19
|
+
* @default http://localhost:8091
|
|
20
|
+
*/
|
|
21
|
+
appletPublicUrl?: string;
|
|
8
22
|
}
|
|
9
23
|
export default class Plugin {
|
|
10
24
|
private options;
|
package/dist/index.js
CHANGED
|
@@ -60,8 +60,7 @@ var chalk = require("chalk");
|
|
|
60
60
|
var cliArgs = require("command-line-args");
|
|
61
61
|
var debug_1 = require("debug");
|
|
62
62
|
var organizationFacade_1 = require("@signageos/cli/dist/Organization/organizationFacade");
|
|
63
|
-
var
|
|
64
|
-
var createDomain_1 = require("@signageos/cli/dist/Emulator/createDomain");
|
|
63
|
+
var sdk_1 = require("@signageos/sdk");
|
|
65
64
|
var debug = (0, debug_1.default)('@signageos/webpack-plugin:index');
|
|
66
65
|
function getCompilationFileSystem(possibleFs) {
|
|
67
66
|
var fileSystem = possibleFs;
|
|
@@ -76,26 +75,66 @@ function getCompilationFileSystem(possibleFs) {
|
|
|
76
75
|
}
|
|
77
76
|
return fileSystem;
|
|
78
77
|
}
|
|
78
|
+
var DEFAULT_WEBPACK_OPTIONS = {
|
|
79
|
+
port: 8090,
|
|
80
|
+
appletPort: 8091,
|
|
81
|
+
};
|
|
79
82
|
var Plugin = /** @class */ (function () {
|
|
80
83
|
function Plugin(options) {
|
|
81
84
|
if (options === void 0) { options = {}; }
|
|
82
85
|
this.options = options;
|
|
83
|
-
this.options = __assign({
|
|
86
|
+
this.options = __assign(__assign({}, DEFAULT_WEBPACK_OPTIONS), this.options);
|
|
84
87
|
}
|
|
85
88
|
Plugin.prototype.apply = function (compiler) {
|
|
86
89
|
var _this = this;
|
|
87
90
|
console.log('SOS Plugin started');
|
|
91
|
+
var appletPath = compiler.context;
|
|
92
|
+
var organizationUid;
|
|
88
93
|
var emulator;
|
|
94
|
+
var server;
|
|
95
|
+
var appletOptions;
|
|
96
|
+
var dev;
|
|
89
97
|
compiler.hooks.watchRun.tapPromise('SignageOSPlugin', function (_compiler) { return __awaiter(_this, void 0, void 0, function () {
|
|
98
|
+
var e_1;
|
|
90
99
|
return __generator(this, function (_a) {
|
|
91
100
|
switch (_a.label) {
|
|
92
101
|
case 0:
|
|
93
|
-
if (!!
|
|
94
|
-
return [4 /*yield*/,
|
|
102
|
+
if (!!organizationUid) return [3 /*break*/, 2];
|
|
103
|
+
return [4 /*yield*/, getCurrentOrganizationUid()];
|
|
95
104
|
case 1:
|
|
96
|
-
|
|
105
|
+
organizationUid = _a.sent();
|
|
97
106
|
_a.label = 2;
|
|
98
|
-
case 2:
|
|
107
|
+
case 2:
|
|
108
|
+
if (!dev) {
|
|
109
|
+
dev = (0, sdk_1.createDevelopment)({
|
|
110
|
+
organizationUid: organizationUid,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
if (!!appletOptions) return [3 /*break*/, 6];
|
|
114
|
+
_a.label = 3;
|
|
115
|
+
case 3:
|
|
116
|
+
_a.trys.push([3, 5, , 6]);
|
|
117
|
+
return [4 /*yield*/, dev.applet.identification.getAppletUidAndVersion(appletPath)];
|
|
118
|
+
case 4:
|
|
119
|
+
appletOptions = _a.sent();
|
|
120
|
+
return [3 /*break*/, 6];
|
|
121
|
+
case 5:
|
|
122
|
+
e_1 = _a.sent();
|
|
123
|
+
console.warn(chalk.yellow('Applet is not uploaded yet. It cannot be developed on real device.'));
|
|
124
|
+
return [3 /*break*/, 6];
|
|
125
|
+
case 6:
|
|
126
|
+
if (!!emulator) return [3 /*break*/, 8];
|
|
127
|
+
return [4 /*yield*/, createEmulator(this.options, appletOptions, organizationUid, appletPath)];
|
|
128
|
+
case 7:
|
|
129
|
+
emulator = _a.sent();
|
|
130
|
+
_a.label = 8;
|
|
131
|
+
case 8:
|
|
132
|
+
if (!(!server && appletOptions)) return [3 /*break*/, 10];
|
|
133
|
+
return [4 /*yield*/, dev.applet.serve.serve(__assign(__assign({}, appletOptions), { port: this.options.appletPort, publicUrl: this.options.appletPublicUrl }))];
|
|
134
|
+
case 9:
|
|
135
|
+
server = _a.sent();
|
|
136
|
+
_a.label = 10;
|
|
137
|
+
case 10: return [2 /*return*/];
|
|
99
138
|
}
|
|
100
139
|
});
|
|
101
140
|
}); });
|
|
@@ -105,6 +144,10 @@ var Plugin = /** @class */ (function () {
|
|
|
105
144
|
emulator.stop();
|
|
106
145
|
emulator = undefined;
|
|
107
146
|
}
|
|
147
|
+
if (server) {
|
|
148
|
+
server.stop();
|
|
149
|
+
server = undefined;
|
|
150
|
+
}
|
|
108
151
|
return [2 /*return*/];
|
|
109
152
|
});
|
|
110
153
|
}); });
|
|
@@ -117,17 +160,26 @@ var Plugin = /** @class */ (function () {
|
|
|
117
160
|
});
|
|
118
161
|
}); });
|
|
119
162
|
compiler.hooks.done.tap('SignageOSPlugin', function (stats) { return __awaiter(_this, void 0, void 0, function () {
|
|
163
|
+
var virtualFs, build, deviceUids;
|
|
120
164
|
return __generator(this, function (_a) {
|
|
121
165
|
switch (_a.label) {
|
|
122
166
|
case 0:
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
167
|
+
if (emulator) {
|
|
168
|
+
emulator.notifyDone(stats);
|
|
169
|
+
}
|
|
170
|
+
if (!(dev && appletOptions)) return [3 /*break*/, 3];
|
|
171
|
+
virtualFs = getCompilationFileSystem(stats.compilation.compiler.outputFileSystem);
|
|
172
|
+
return [4 /*yield*/, dev.applet.build.build(__assign(__assign({ appletPath: appletPath }, appletOptions), { fileSystems: [nativeFs, virtualFs] }))];
|
|
126
173
|
case 1:
|
|
127
|
-
_a.sent();
|
|
128
|
-
(
|
|
129
|
-
|
|
130
|
-
|
|
174
|
+
build = _a.sent();
|
|
175
|
+
console.info("Applet ".concat(appletOptions.appletUid, " v").concat(appletOptions.appletVersion, " built into ").concat(build.packageArchivePath));
|
|
176
|
+
debug('Applet built files', build.filePaths);
|
|
177
|
+
return [4 /*yield*/, dev.deviceConnect.reloadConnected()];
|
|
178
|
+
case 2:
|
|
179
|
+
deviceUids = (_a.sent()).deviceUids;
|
|
180
|
+
console.info('Connected devices reloaded', deviceUids);
|
|
181
|
+
_a.label = 3;
|
|
182
|
+
case 3: return [2 /*return*/];
|
|
131
183
|
}
|
|
132
184
|
});
|
|
133
185
|
}); });
|
|
@@ -136,6 +188,10 @@ var Plugin = /** @class */ (function () {
|
|
|
136
188
|
emulator.stop();
|
|
137
189
|
emulator = undefined;
|
|
138
190
|
}
|
|
191
|
+
if (server) {
|
|
192
|
+
server.stop();
|
|
193
|
+
server = undefined;
|
|
194
|
+
}
|
|
139
195
|
});
|
|
140
196
|
};
|
|
141
197
|
return Plugin;
|
|
@@ -144,118 +200,122 @@ exports.default = Plugin;
|
|
|
144
200
|
module.exports = Plugin;
|
|
145
201
|
module.exports.default = Plugin;
|
|
146
202
|
var APPLET_DIRECTORY_PATH = '/applet';
|
|
147
|
-
function
|
|
148
|
-
var _a;
|
|
203
|
+
function getCurrentOrganizationUid() {
|
|
149
204
|
return __awaiter(this, void 0, void 0, function () {
|
|
150
|
-
var
|
|
151
|
-
return __generator(this, function (
|
|
152
|
-
switch (
|
|
205
|
+
var cliOptions, organizationUid;
|
|
206
|
+
return __generator(this, function (_a) {
|
|
207
|
+
switch (_a.label) {
|
|
153
208
|
case 0:
|
|
154
|
-
|
|
155
|
-
projectPath = process.cwd();
|
|
156
|
-
defaultPort = options.port;
|
|
157
|
-
frontDisplayPath = path.dirname(require.resolve('@signageos/front-display/package.json', { paths: [projectPath] }));
|
|
158
|
-
frontDisplayDistPath_1 = path.join(frontDisplayPath, 'dist');
|
|
159
|
-
packagePath = path.join(projectPath, 'package.json');
|
|
160
|
-
packageConfig = fsExtra.pathExistsSync(packagePath)
|
|
161
|
-
? JSON.parse(fsExtra.readFileSync(packagePath).toString())
|
|
162
|
-
: { version: '0.0.0' };
|
|
163
|
-
currentOptions = cliArgs([
|
|
209
|
+
cliOptions = cliArgs([
|
|
164
210
|
organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION,
|
|
165
211
|
organizationFacade_1.ORGANIZATION_UID_OPTION,
|
|
166
212
|
], { partial: true });
|
|
167
|
-
return [4 /*yield*/, (0, organizationFacade_1.getOrganizationUidOrDefaultOrSelect)(
|
|
213
|
+
return [4 /*yield*/, (0, organizationFacade_1.getOrganizationUidOrDefaultOrSelect)(cliOptions)];
|
|
168
214
|
case 1:
|
|
169
|
-
organizationUid =
|
|
215
|
+
organizationUid = _a.sent();
|
|
170
216
|
if (!organizationUid) {
|
|
171
217
|
throw new Error("No default organization selected. Use ".concat(chalk.green('sos organization set-default'), " first."));
|
|
172
218
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
219
|
+
return [2 /*return*/, organizationUid];
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
function createEmulator(options, appletOptions, organizationUid, appletPath) {
|
|
225
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
226
|
+
var defaultPort_1, frontDisplayPath, frontDisplayDistPath_1, lastCompilationAssets_1, envVars_1, app, server_1;
|
|
227
|
+
return __generator(this, function (_a) {
|
|
228
|
+
try {
|
|
229
|
+
defaultPort_1 = options.port;
|
|
230
|
+
frontDisplayPath = path.dirname(require.resolve('@signageos/front-display/package.json', { paths: [appletPath] }));
|
|
231
|
+
frontDisplayDistPath_1 = path.join(frontDisplayPath, 'dist');
|
|
232
|
+
lastCompilationAssets_1 = {};
|
|
233
|
+
envVars_1 = {
|
|
234
|
+
uid: (appletOptions === null || appletOptions === void 0 ? void 0 : appletOptions.appletUid) || '__default_timing__',
|
|
235
|
+
version: (appletOptions === null || appletOptions === void 0 ? void 0 : appletOptions.appletVersion) || '0.0.0',
|
|
236
|
+
organizationUid: organizationUid,
|
|
237
|
+
binaryFilePath: "".concat(APPLET_DIRECTORY_PATH, "/index.html"),
|
|
238
|
+
checksum: '',
|
|
239
|
+
frontAppletVersion: '',
|
|
240
|
+
frontAppletBinaryFile: '', // has bundled front applet
|
|
241
|
+
};
|
|
242
|
+
app = express();
|
|
243
|
+
app.use(cors());
|
|
244
|
+
app.get('/', function (_req, res) {
|
|
245
|
+
res.send("<script>\n\t\t\t\t\twindow.__SOS_BUNDLED_APPLET = {};\n\t\t\t\t\twindow.__SOS_BUNDLED_APPLET.binaryFile = location.origin + ".concat(JSON.stringify(envVars_1.binaryFilePath), ";\n\t\t\t\t\twindow.__SOS_BUNDLED_APPLET.uid = ").concat(JSON.stringify(envVars_1.uid), ";\n\t\t\t\t\twindow.__SOS_BUNDLED_APPLET.version = ").concat(JSON.stringify(envVars_1.version), ";\n\t\t\t\t\twindow.__SOS_BUNDLED_APPLET.checksum = ").concat(JSON.stringify(envVars_1.checksum), ";\n\t\t\t\t\twindow.__SOS_BUNDLED_APPLET.frontAppletVersion = ").concat(JSON.stringify(envVars_1.frontAppletVersion), ";\n\t\t\t\t\twindow.__SOS_BUNDLED_APPLET.frontAppletBinaryFile = ").concat(JSON.stringify(envVars_1.frontAppletBinaryFile), ";\n\t\t\t\t\twindow.__SOS_AUTO_VERIFICATION = {};\n\t\t\t\t\twindow.__SOS_AUTO_VERIFICATION.organizationUid = ").concat(JSON.stringify(envVars_1.organizationUid), ";\n\t\t\t\t</script>")
|
|
246
|
+
+ fsExtra.readFileSync(path.join(frontDisplayDistPath_1, 'index.html')).toString());
|
|
247
|
+
});
|
|
248
|
+
app.use(serveStatic(frontDisplayDistPath_1));
|
|
249
|
+
server_1 = http.createServer(app);
|
|
250
|
+
server_1.listen(defaultPort_1, function () {
|
|
251
|
+
var _a;
|
|
252
|
+
var emulatorUrl = (_a = options.publicUrl) !== null && _a !== void 0 ? _a : "http://localhost:".concat(defaultPort_1);
|
|
253
|
+
console.log("Emulator is running at ".concat(chalk.blue(chalk.bold(emulatorUrl))));
|
|
254
|
+
});
|
|
255
|
+
app.use(APPLET_DIRECTORY_PATH, function (req, res, next) {
|
|
256
|
+
var fileUrl = url.parse(req.url);
|
|
257
|
+
var relativeFilePath = fileUrl.pathname ? fileUrl.pathname.substr(1) : '';
|
|
258
|
+
if (relativeFilePath === 'index.html') {
|
|
259
|
+
if (typeof lastCompilationAssets_1[relativeFilePath] === 'undefined') {
|
|
260
|
+
res.status(404).send();
|
|
212
261
|
}
|
|
213
262
|
else {
|
|
214
|
-
|
|
263
|
+
// Propagate Hot reload of whole emulator
|
|
264
|
+
var prependFileContent = '<script>window.onunload = function () { window.parent.location.reload(); }</script>';
|
|
265
|
+
res.setHeader('Content-Type', 'text/html');
|
|
266
|
+
res.send(prependFileContent + lastCompilationAssets_1[relativeFilePath].source.source());
|
|
215
267
|
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
268
|
+
}
|
|
269
|
+
else if (typeof lastCompilationAssets_1[relativeFilePath] !== 'undefined') {
|
|
270
|
+
var contentType = mime.getType(relativeFilePath) || 'application/octet-stream';
|
|
271
|
+
res.setHeader('Content-Type', contentType);
|
|
272
|
+
res.send(lastCompilationAssets_1[relativeFilePath].source.buffer());
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
next();
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
return [2 /*return*/, {
|
|
279
|
+
notifyEmittedFile: function (filename, assetEmittedInfo) {
|
|
280
|
+
try {
|
|
281
|
+
console.log('SOS Applet compilation done');
|
|
282
|
+
if (assetEmittedInfo instanceof Buffer) {
|
|
283
|
+
// Back compatibility for Webpack 4 and less.
|
|
284
|
+
// It's returning Buffer of the emitted asset directly
|
|
285
|
+
lastCompilationAssets_1[filename] = {
|
|
286
|
+
source: {
|
|
287
|
+
source: function () { return assetEmittedInfo; },
|
|
288
|
+
buffer: function () { return assetEmittedInfo; },
|
|
289
|
+
},
|
|
290
|
+
};
|
|
238
291
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
envVars_1.checksum = stats.compilation.hash;
|
|
242
|
-
debug('process.env', envVars_1);
|
|
243
|
-
if (typeof stats.compilation.assets['index.html'] === 'undefined') {
|
|
244
|
-
console.warn("Applet has to have ".concat(chalk.green('index.html'), " in output files."));
|
|
245
|
-
return;
|
|
292
|
+
else {
|
|
293
|
+
lastCompilationAssets_1[filename] = assetEmittedInfo;
|
|
246
294
|
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
295
|
+
}
|
|
296
|
+
catch (error) {
|
|
297
|
+
console.error(error);
|
|
298
|
+
process.exit(1);
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
notifyDone: function (stats) {
|
|
302
|
+
envVars_1.checksum = stats.compilation.hash;
|
|
303
|
+
debug('process.env', envVars_1);
|
|
304
|
+
if (typeof stats.compilation.assets['index.html'] === 'undefined') {
|
|
305
|
+
console.warn("Applet has to have ".concat(chalk.green('index.html'), " in output files."));
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
stop: function () {
|
|
310
|
+
server_1.close();
|
|
311
|
+
},
|
|
312
|
+
}];
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
console.error(error);
|
|
316
|
+
process.exit(1);
|
|
258
317
|
}
|
|
318
|
+
return [2 /*return*/];
|
|
259
319
|
});
|
|
260
320
|
});
|
|
261
321
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAAmC;AACnC,2BAA6B;AAC7B,2BAA6B;AAC7B,yBAA2B;AAC3B,2BAA6B;AAC7B,2BAA6B;AAC7B,kCAAoC;AACpC,6BAA+B;AAC/B,0CAA4C;AAC5C,6BAA+B;AAC/B,2CAA6C;AAC7C,+BAA0B;AAC1B,0FAI6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAAmC;AACnC,2BAA6B;AAC7B,2BAA6B;AAC7B,yBAA2B;AAC3B,2BAA6B;AAC7B,2BAA6B;AAC7B,kCAAoC;AACpC,6BAA+B;AAC/B,0CAA4C;AAC5C,6BAA+B;AAC/B,2CAA6C;AAC7C,+BAA0B;AAC1B,0FAI6D;AAC7D,sCAAmD;AAInD,IAAM,KAAK,GAAG,IAAA,eAAK,EAAC,iCA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yCAC9B;qCACD,CAAC;iCACF;qCAAM;oCACN,uBAAqB,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC;iCACnD;6BACD;4BAAC,OAAO,KAAK,EAAE;gCACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gCACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;6BAChB;wBACF,CAAC;wBACD,UAAU,EAAV,UAAW,KAAoB;4BAC9B,SAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,IAAK,CAAC;4BAC3C,KAAK,CAAC,aAAa,EAAE,SAAO,CAAC,CAAC;4BAE9B,IAAI,OAAO,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,WAAW,EAAE;gCAClE,OAAO,CAAC,IAAI,CAAC,6BAAsB,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,sBAAmB,CAAC,CAAC;gCACjF,OAAO;6BACP;wBACF,CAAC;wBACD,IAAI;4BACH,QAAM,CAAC,KAAK,EAAE,CAAC;wBAChB,CAAC;qBACD,EAAC;aACF;YAAC,OAAO,KAAK,EAAE;gBACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aAChB;;;;CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signageos/webpack-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Webpack Plugin for emulating sOS JS API in browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"test": "mocha",
|
|
20
20
|
"watch": "tsc --watch",
|
|
21
21
|
"check": "npm run depcheck && npx --userconfig ./.npmrc @signageos/lib check-deps",
|
|
22
|
-
"depcheck": "depcheck --specials=tslint,webpack,mocha --parsers='**/*.ts:typescript,**/*.js:es6' --detectors='requireCallExpression,importDeclaration' --ignore-dirs='dist' --ignores='@types/*,@signageos/codestyle,mocha,depcheck,webpack'"
|
|
22
|
+
"depcheck": "depcheck --specials=tslint,webpack,mocha --parsers='**/*.ts:typescript,**/*.js:es6' --detectors='requireCallExpression,importDeclaration' --ignore-dirs='dist' --ignores='@types/*,@signageos/codestyle,mocha,depcheck,webpack,@signageos/front-display'"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
@@ -37,17 +37,14 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://github.com/signageos/webpack-plugin#readme",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@signageos/cli": "1.
|
|
41
|
-
"@signageos/sdk": "1.
|
|
42
|
-
"@types/archiver": "5.1.0",
|
|
43
|
-
"archiver": "5.0.2",
|
|
40
|
+
"@signageos/cli": "1.2.0",
|
|
41
|
+
"@signageos/sdk": "1.19.0",
|
|
44
42
|
"chalk": "3.0.0",
|
|
45
43
|
"command-line-args": "5.2.1",
|
|
46
44
|
"cors": "2.8.5",
|
|
47
45
|
"debug": "4.1.1",
|
|
48
46
|
"express": "4.17.1",
|
|
49
47
|
"fs-extra": "8.1.0",
|
|
50
|
-
"lodash": "4.17.21",
|
|
51
48
|
"mime": "2.4.4",
|
|
52
49
|
"serve-static": "1.14.1"
|
|
53
50
|
},
|
|
@@ -56,8 +53,8 @@
|
|
|
56
53
|
"webpack": "^5.0.0"
|
|
57
54
|
},
|
|
58
55
|
"devDependencies": {
|
|
59
|
-
"@signageos/codestyle": "0.0.
|
|
60
|
-
"@signageos/front-display": "11.
|
|
56
|
+
"@signageos/codestyle": "0.0.23",
|
|
57
|
+
"@signageos/front-display": "11.3.0",
|
|
61
58
|
"@types/chalk": "2.2.0",
|
|
62
59
|
"@types/command-line-args": "5.2.0",
|
|
63
60
|
"@types/command-line-usage": "5.0.2",
|
|
@@ -67,7 +64,6 @@
|
|
|
67
64
|
"@types/fs-extra": "8.1.0",
|
|
68
65
|
"@types/globby": "9.1.0",
|
|
69
66
|
"@types/ini": "1.3.30",
|
|
70
|
-
"@types/lodash": "4.14.168",
|
|
71
67
|
"@types/mime": "2.0.1",
|
|
72
68
|
"@types/mocha": "7.0.2",
|
|
73
69
|
"@types/node": "16.18.3",
|
|
@@ -1,90 +0,0 @@
|
|
|
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
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
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;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.createOrganizationRestApi = exports.API_URL = void 0;
|
|
51
|
-
var RestApi_1 = require("@signageos/sdk/dist/RestApi/RestApi");
|
|
52
|
-
var sosControlHelper_1 = require("@signageos/sdk/dist/SosHelper/sosControlHelper");
|
|
53
|
-
var parameters = require("../../config/parameters");
|
|
54
|
-
exports.API_URL = parameters.apiUrl;
|
|
55
|
-
function createOrganizationRestApi() {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
57
|
-
var config, accountAuth, accountOptions, organization, organizationAuth, organizationOptions;
|
|
58
|
-
return __generator(this, function (_a) {
|
|
59
|
-
switch (_a.label) {
|
|
60
|
-
case 0: return [4 /*yield*/, (0, sosControlHelper_1.loadConfig)()];
|
|
61
|
-
case 1:
|
|
62
|
-
config = _a.sent();
|
|
63
|
-
accountAuth = {
|
|
64
|
-
url: exports.API_URL,
|
|
65
|
-
auth: {
|
|
66
|
-
clientId: config.identification,
|
|
67
|
-
secret: config.apiSecurityToken,
|
|
68
|
-
},
|
|
69
|
-
version: 'v1',
|
|
70
|
-
};
|
|
71
|
-
accountOptions = __assign({}, accountAuth);
|
|
72
|
-
return [4 /*yield*/, new RestApi_1.default(accountAuth, accountOptions).organization.get(config.defaultOrganizationUid)];
|
|
73
|
-
case 2:
|
|
74
|
-
organization = _a.sent();
|
|
75
|
-
organizationAuth = {
|
|
76
|
-
url: exports.API_URL,
|
|
77
|
-
auth: {
|
|
78
|
-
clientId: organization.oauthClientId,
|
|
79
|
-
secret: organization.oauthClientSecret,
|
|
80
|
-
},
|
|
81
|
-
version: 'v1',
|
|
82
|
-
};
|
|
83
|
-
organizationOptions = __assign({}, organizationAuth);
|
|
84
|
-
return [2 /*return*/, new RestApi_1.default(organizationAuth, organizationOptions)];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
exports.createOrganizationRestApi = createOrganizationRestApi;
|
|
90
|
-
//# sourceMappingURL=apiHelper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiHelper.js","sourceRoot":"","sources":["../../src/ConnectControl/apiHelper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+DAA0D;AAC1D,mFAA4E;AAC5E,oDAAsD;AAEzC,QAAA,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC;AAEzC,SAAsB,yBAAyB;;;;;wBAE/B,qBAAM,IAAA,6BAAU,GAAE,EAAA;;oBAA3B,MAAM,GAAG,SAAkB;oBAC3B,WAAW,GAAoB;wBACpC,GAAG,EAAE,eAAO;wBACZ,IAAI,EAAE;4BACL,QAAQ,EAAE,MAAM,CAAC,cAAe;4BAChC,MAAM,EAAE,MAAM,CAAC,gBAAiB;yBAChC;wBACD,OAAO,EAAE,IAAY;qBACrB,CAAC;oBACI,cAAc,gBAChB,WAAW,CACd,CAAC;oBACmB,qBAAM,IAAI,iBAAO,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,sBAAuB,CAAC,EAAA;;oBAA9G,YAAY,GAAG,SAA+F;oBAC9G,gBAAgB,GAAoB;wBACzC,GAAG,EAAE,eAAO;wBACZ,IAAI,EAAE;4BACL,QAAQ,EAAE,YAAY,CAAC,aAAc;4BACrC,MAAM,EAAE,YAAY,CAAC,iBAAkB;yBACvC;wBACD,OAAO,EAAE,IAAY;qBACrB,CAAC;oBACI,mBAAmB,gBACrB,gBAAgB,CACnB,CAAC;oBACF,sBAAO,IAAI,iBAAO,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,EAAC;;;;CAC1D;AA3BD,8DA2BC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import * as nativeFs from "fs";
|
|
3
|
-
declare type FileSystem = typeof nativeFs;
|
|
4
|
-
export declare const ignoredFiles: string[];
|
|
5
|
-
export declare function reloadConnectedDevices(): Promise<void>;
|
|
6
|
-
export declare function loadConnectedDeviceUids(): Promise<string[]>;
|
|
7
|
-
export declare function createAllAppletZips(outputFileSystem: FileSystem): Promise<string[]>;
|
|
8
|
-
export declare function createAppletZip(deviceUid: string, outputFileSystem: FileSystem): Promise<string>;
|
|
9
|
-
export declare function getAllFiles(directory: string, outputFileSystem: FileSystem): Promise<string[]>;
|
|
10
|
-
export declare function getAppletFileRelativePath(fileAbsolutePath: string, directoryAbsolutePath: string): string;
|
|
11
|
-
export {};
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
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
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
-
if (ar || !(i in from)) {
|
|
41
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
-
ar[i] = from[i];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.getAppletFileRelativePath = exports.getAllFiles = exports.createAppletZip = exports.createAllAppletZips = exports.loadConnectedDeviceUids = exports.reloadConnectedDevices = exports.ignoredFiles = void 0;
|
|
49
|
-
var os = require("os");
|
|
50
|
-
var _ = require("lodash");
|
|
51
|
-
var fsExtra = require("fs-extra");
|
|
52
|
-
var nativeFs = require("fs");
|
|
53
|
-
var path = require("path");
|
|
54
|
-
var IPowerAction_1 = require("@signageos/sdk/dist/RestApi/Device/PowerAction/IPowerAction");
|
|
55
|
-
var apiHelper_1 = require("./apiHelper");
|
|
56
|
-
var archiver = require("archiver");
|
|
57
|
-
var CONNECT_DIRECTORY = 'signageos';
|
|
58
|
-
var connectRuntimeDirPath = path.join(os.tmpdir(), CONNECT_DIRECTORY);
|
|
59
|
-
exports.ignoredFiles = ["node_modules", "package-lock.json", "src", "public", ".gitignore", "README.md"];
|
|
60
|
-
function reloadConnectedDevices() {
|
|
61
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
62
|
-
var connectedDeviceUids, resApi_1;
|
|
63
|
-
var _this = this;
|
|
64
|
-
return __generator(this, function (_a) {
|
|
65
|
-
switch (_a.label) {
|
|
66
|
-
case 0: return [4 /*yield*/, loadConnectedDeviceUids()];
|
|
67
|
-
case 1:
|
|
68
|
-
connectedDeviceUids = _a.sent();
|
|
69
|
-
if (!(connectedDeviceUids.length >= 1)) return [3 /*break*/, 4];
|
|
70
|
-
return [4 /*yield*/, (0, apiHelper_1.createOrganizationRestApi)()];
|
|
71
|
-
case 2:
|
|
72
|
-
resApi_1 = _a.sent();
|
|
73
|
-
return [4 /*yield*/, Promise.all(connectedDeviceUids.map(function (deviceUid) { return __awaiter(_this, void 0, void 0, function () {
|
|
74
|
-
var error_1;
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0:
|
|
78
|
-
_a.trys.push([0, 2, , 3]);
|
|
79
|
-
return [4 /*yield*/, resApi_1.device.powerAction.set(deviceUid, {
|
|
80
|
-
devicePowerAction: IPowerAction_1.DevicePowerAction.AppletReload,
|
|
81
|
-
})];
|
|
82
|
-
case 1:
|
|
83
|
-
_a.sent();
|
|
84
|
-
console.log("Successfully reloaded device ".concat(deviceUid, " "));
|
|
85
|
-
return [3 /*break*/, 3];
|
|
86
|
-
case 2:
|
|
87
|
-
error_1 = _a.sent();
|
|
88
|
-
console.log("Reload Failed", error_1);
|
|
89
|
-
return [3 /*break*/, 3];
|
|
90
|
-
case 3: return [2 /*return*/];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
}); }))];
|
|
94
|
-
case 3:
|
|
95
|
-
_a.sent();
|
|
96
|
-
_a.label = 4;
|
|
97
|
-
case 4: return [2 /*return*/];
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
exports.reloadConnectedDevices = reloadConnectedDevices;
|
|
103
|
-
function loadConnectedDeviceUids() {
|
|
104
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
-
var connectFileContent, connectedDeviceUids, _i, connectFileContent_1, file;
|
|
106
|
-
return __generator(this, function (_a) {
|
|
107
|
-
switch (_a.label) {
|
|
108
|
-
case 0: return [4 /*yield*/, fsExtra.pathExists(connectRuntimeDirPath)];
|
|
109
|
-
case 1:
|
|
110
|
-
if (!(_a.sent())) {
|
|
111
|
-
return [2 /*return*/, []];
|
|
112
|
-
}
|
|
113
|
-
return [4 /*yield*/, fsExtra.readdir(connectRuntimeDirPath)];
|
|
114
|
-
case 2:
|
|
115
|
-
connectFileContent = _a.sent();
|
|
116
|
-
connectedDeviceUids = [];
|
|
117
|
-
if (!(connectFileContent.length >= 1)) return [3 /*break*/, 6];
|
|
118
|
-
_i = 0, connectFileContent_1 = connectFileContent;
|
|
119
|
-
_a.label = 3;
|
|
120
|
-
case 3:
|
|
121
|
-
if (!(_i < connectFileContent_1.length)) return [3 /*break*/, 6];
|
|
122
|
-
file = connectFileContent_1[_i];
|
|
123
|
-
return [4 /*yield*/, fsExtra.stat(path.join(connectRuntimeDirPath, file))];
|
|
124
|
-
case 4:
|
|
125
|
-
if ((_a.sent()).isDirectory()) {
|
|
126
|
-
connectedDeviceUids.push(file);
|
|
127
|
-
}
|
|
128
|
-
_a.label = 5;
|
|
129
|
-
case 5:
|
|
130
|
-
_i++;
|
|
131
|
-
return [3 /*break*/, 3];
|
|
132
|
-
case 6: return [2 /*return*/, connectedDeviceUids];
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
exports.loadConnectedDeviceUids = loadConnectedDeviceUids;
|
|
138
|
-
function createAllAppletZips(outputFileSystem) {
|
|
139
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
140
|
-
var connectedDeviceUids, packageZipPaths;
|
|
141
|
-
var _this = this;
|
|
142
|
-
return __generator(this, function (_a) {
|
|
143
|
-
switch (_a.label) {
|
|
144
|
-
case 0: return [4 /*yield*/, loadConnectedDeviceUids()];
|
|
145
|
-
case 1:
|
|
146
|
-
connectedDeviceUids = _a.sent();
|
|
147
|
-
return [4 /*yield*/, Promise.all(connectedDeviceUids.map(function (deviceUid) { return __awaiter(_this, void 0, void 0, function () {
|
|
148
|
-
return __generator(this, function (_a) {
|
|
149
|
-
switch (_a.label) {
|
|
150
|
-
case 0: return [4 /*yield*/, createAppletZip(deviceUid, outputFileSystem)];
|
|
151
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
}); }))];
|
|
155
|
-
case 2:
|
|
156
|
-
packageZipPaths = _a.sent();
|
|
157
|
-
return [2 /*return*/, packageZipPaths];
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
exports.createAllAppletZips = createAllAppletZips;
|
|
163
|
-
function createAppletZip(deviceUid, outputFileSystem) {
|
|
164
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
165
|
-
var archive, deviceConnectDir, packageZipPath, output, actualDirectory, outputFiles, realFiles, oldRealFiles, _i, oldRealFiles_1, fileAbsolutePath, fileRelativePath, _a, outputFiles_1, fileAbsolutePath, fileRelativePath, promise;
|
|
166
|
-
return __generator(this, function (_b) {
|
|
167
|
-
switch (_b.label) {
|
|
168
|
-
case 0:
|
|
169
|
-
archive = archiver('zip');
|
|
170
|
-
deviceConnectDir = path.join(connectRuntimeDirPath, deviceUid);
|
|
171
|
-
packageZipPath = path.join(deviceConnectDir, "package.zip" + "".concat(deviceUid));
|
|
172
|
-
output = fsExtra.createWriteStream(packageZipPath);
|
|
173
|
-
archive.pipe(output);
|
|
174
|
-
actualDirectory = process.cwd();
|
|
175
|
-
return [4 /*yield*/, getAllFiles(actualDirectory, outputFileSystem)];
|
|
176
|
-
case 1:
|
|
177
|
-
outputFiles = _b.sent();
|
|
178
|
-
return [4 /*yield*/, getAllFiles(actualDirectory, nativeFs)];
|
|
179
|
-
case 2:
|
|
180
|
-
realFiles = _b.sent();
|
|
181
|
-
oldRealFiles = _.difference(realFiles, outputFiles);
|
|
182
|
-
// First put all old real files from general file system to zip
|
|
183
|
-
for (_i = 0, oldRealFiles_1 = oldRealFiles; _i < oldRealFiles_1.length; _i++) {
|
|
184
|
-
fileAbsolutePath = oldRealFiles_1[_i];
|
|
185
|
-
fileRelativePath = getAppletFileRelativePath(fileAbsolutePath, actualDirectory);
|
|
186
|
-
archive.append(nativeFs.createReadStream(fileAbsolutePath), { name: fileRelativePath });
|
|
187
|
-
}
|
|
188
|
-
// Then extend zip with files from output file system (which is usually in memory FS from webpack in memory compilation)
|
|
189
|
-
for (_a = 0, outputFiles_1 = outputFiles; _a < outputFiles_1.length; _a++) {
|
|
190
|
-
fileAbsolutePath = outputFiles_1[_a];
|
|
191
|
-
fileRelativePath = getAppletFileRelativePath(fileAbsolutePath, actualDirectory);
|
|
192
|
-
archive.append(outputFileSystem.createReadStream(fileAbsolutePath), { name: fileRelativePath });
|
|
193
|
-
}
|
|
194
|
-
promise = new Promise(function (resolve, reject) {
|
|
195
|
-
archive.on('end', function () { return resolve(); });
|
|
196
|
-
archive.on('error', function (error) { return reject(error); });
|
|
197
|
-
});
|
|
198
|
-
archive.finalize();
|
|
199
|
-
return [4 /*yield*/, promise];
|
|
200
|
-
case 3:
|
|
201
|
-
_b.sent();
|
|
202
|
-
return [2 /*return*/, packageZipPath];
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
exports.createAppletZip = createAppletZip;
|
|
208
|
-
function getAllFiles(directory, outputFileSystem) {
|
|
209
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
210
|
-
var fileList, files, _i, files_1, file, p, _a;
|
|
211
|
-
return __generator(this, function (_b) {
|
|
212
|
-
switch (_b.label) {
|
|
213
|
-
case 0:
|
|
214
|
-
fileList = [];
|
|
215
|
-
files = outputFileSystem.readdirSync(directory);
|
|
216
|
-
_i = 0, files_1 = files;
|
|
217
|
-
_b.label = 1;
|
|
218
|
-
case 1:
|
|
219
|
-
if (!(_i < files_1.length)) return [3 /*break*/, 5];
|
|
220
|
-
file = files_1[_i];
|
|
221
|
-
if (!!exports.ignoredFiles.includes(file)) return [3 /*break*/, 4];
|
|
222
|
-
p = path.join(directory, file);
|
|
223
|
-
if (!outputFileSystem.statSync(p).isDirectory()) return [3 /*break*/, 3];
|
|
224
|
-
_a = [__spreadArray([], fileList, true)];
|
|
225
|
-
return [4 /*yield*/, getAllFiles(p, outputFileSystem)];
|
|
226
|
-
case 2:
|
|
227
|
-
fileList = __spreadArray.apply(void 0, _a.concat([(_b.sent()), true]));
|
|
228
|
-
return [3 /*break*/, 4];
|
|
229
|
-
case 3:
|
|
230
|
-
fileList.push(p);
|
|
231
|
-
_b.label = 4;
|
|
232
|
-
case 4:
|
|
233
|
-
_i++;
|
|
234
|
-
return [3 /*break*/, 1];
|
|
235
|
-
case 5: return [2 /*return*/, fileList];
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
exports.getAllFiles = getAllFiles;
|
|
241
|
-
function getAppletFileRelativePath(fileAbsolutePath, directoryAbsolutePath) {
|
|
242
|
-
var directoryAbsolutePathNormalized = path.normalize(directoryAbsolutePath);
|
|
243
|
-
var fileAbsolutePathNormalized = path.normalize(fileAbsolutePath);
|
|
244
|
-
return fileAbsolutePathNormalized.substring(directoryAbsolutePathNormalized.length + 1);
|
|
245
|
-
}
|
|
246
|
-
exports.getAppletFileRelativePath = getAppletFileRelativePath;
|
|
247
|
-
//# sourceMappingURL=helper.js.map
|
|
@@ -1 +0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