@signageos/webpack-plugin 1.0.9 → 1.0.10
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/.env +1 -0
- package/config/parameters.d.ts +2 -2
- package/config/parameters.js +3 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +73 -79
- package/dist/index.js.map +1 -1
- package/package.json +28 -14
package/.env
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
SOS_API_URL=https://api.automated.test.signageos.io
|
package/config/parameters.d.ts
CHANGED
package/config/parameters.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
const packageConfig = require(
|
|
1
|
+
const packageConfig = require('../package.json');
|
|
2
2
|
module.exports = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
? process.env.API_URL
|
|
6
|
-
: "https://api.signageos.io",
|
|
3
|
+
version: packageConfig.version,
|
|
4
|
+
apiUrl: process.env.SOS_API_URL ? process.env.SOS_API_URL : 'https://api.signageos.io',
|
|
7
5
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as webpack from
|
|
1
|
+
import * as webpack from 'webpack';
|
|
2
2
|
export interface IWebpackOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Emulator port.
|
|
@@ -21,7 +21,7 @@ export interface IWebpackOptions {
|
|
|
21
21
|
appletPublicUrl?: string;
|
|
22
22
|
}
|
|
23
23
|
export default class Plugin {
|
|
24
|
-
private options;
|
|
24
|
+
private readonly options;
|
|
25
25
|
constructor(options?: IWebpackOptions);
|
|
26
26
|
apply(compiler: webpack.Compiler): void;
|
|
27
27
|
}
|
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var path = require("path");
|
|
|
52
52
|
var http = require("http");
|
|
53
53
|
var url = require("url");
|
|
54
54
|
var cors = require("cors");
|
|
55
|
-
var
|
|
55
|
+
var mime_1 = require("mime");
|
|
56
56
|
var fsExtra = require("fs-extra");
|
|
57
57
|
var nativeFs = require("fs");
|
|
58
58
|
var serveStatic = require("serve-static");
|
|
@@ -61,16 +61,16 @@ 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
63
|
var sdk_1 = require("@signageos/sdk");
|
|
64
|
-
var debug = (0, debug_1.default)(
|
|
64
|
+
var debug = (0, debug_1.default)('@signageos/webpack-plugin:index');
|
|
65
65
|
function getCompilationFileSystem(possibleFs) {
|
|
66
66
|
var fileSystem = possibleFs;
|
|
67
|
-
if (!(
|
|
67
|
+
if (!('createReadStream' in fileSystem)) {
|
|
68
68
|
// TODO uncomment this warning when webpack-dev-server is fixed for device connected builds (currently webpack --watch is supported)
|
|
69
69
|
/*console.warn(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
'The environment is running in not standard mode. '
|
|
71
|
+
+ 'Try to use `npm start` or `webpack-dev-server` instead. '
|
|
72
|
+
+ 'The real FS will be used as failover.',
|
|
73
|
+
);*/
|
|
74
74
|
fileSystem = nativeFs;
|
|
75
75
|
}
|
|
76
76
|
return fileSystem;
|
|
@@ -87,64 +87,64 @@ var Plugin = /** @class */ (function () {
|
|
|
87
87
|
}
|
|
88
88
|
Plugin.prototype.apply = function (compiler) {
|
|
89
89
|
var _this = this;
|
|
90
|
-
console.
|
|
90
|
+
console.info('SOS Plugin started');
|
|
91
91
|
var appletPath = compiler.context;
|
|
92
92
|
var organizationUid;
|
|
93
93
|
var emulator;
|
|
94
94
|
var server;
|
|
95
95
|
var appletOptions;
|
|
96
96
|
var dev;
|
|
97
|
-
compiler.hooks.watchRun.tapPromise(
|
|
98
|
-
var
|
|
99
|
-
return __generator(this, function (
|
|
100
|
-
switch (
|
|
97
|
+
compiler.hooks.watchRun.tapPromise('SignageOSPlugin', function (_compiler) { return __awaiter(_this, void 0, void 0, function () {
|
|
98
|
+
var _a, _b;
|
|
99
|
+
return __generator(this, function (_c) {
|
|
100
|
+
switch (_c.label) {
|
|
101
101
|
case 0:
|
|
102
102
|
if (!!organizationUid) return [3 /*break*/, 2];
|
|
103
103
|
return [4 /*yield*/, getCurrentOrganizationUid()];
|
|
104
104
|
case 1:
|
|
105
|
-
organizationUid =
|
|
106
|
-
|
|
105
|
+
organizationUid = _c.sent();
|
|
106
|
+
_c.label = 2;
|
|
107
107
|
case 2:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
}
|
|
108
|
+
dev !== null && dev !== void 0 ? dev : (dev = (0, sdk_1.createDevelopment)({
|
|
109
|
+
organizationUid: organizationUid,
|
|
110
|
+
}));
|
|
113
111
|
if (!!appletOptions) return [3 /*break*/, 6];
|
|
114
|
-
|
|
112
|
+
_c.label = 3;
|
|
115
113
|
case 3:
|
|
116
|
-
|
|
114
|
+
_c.trys.push([3, 5, , 6]);
|
|
117
115
|
return [4 /*yield*/, dev.applet.identification.getAppletUidAndVersion(appletPath)];
|
|
118
116
|
case 4:
|
|
119
|
-
appletOptions =
|
|
120
|
-
_a.sent();
|
|
117
|
+
appletOptions = _c.sent();
|
|
121
118
|
return [3 /*break*/, 6];
|
|
122
119
|
case 5:
|
|
123
|
-
|
|
124
|
-
console.warn(chalk.yellow(
|
|
120
|
+
_a = _c.sent();
|
|
121
|
+
console.warn(chalk.yellow('Applet is not uploaded yet. It cannot be developed on real device.'));
|
|
125
122
|
return [3 /*break*/, 6];
|
|
126
123
|
case 6:
|
|
127
|
-
if (
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
_a.label = 8;
|
|
124
|
+
if (!(emulator !== null && emulator !== void 0)) return [3 /*break*/, 7];
|
|
125
|
+
_b = emulator;
|
|
126
|
+
return [3 /*break*/, 9];
|
|
127
|
+
case 7: return [4 /*yield*/, createEmulator(this.options, appletOptions, organizationUid, appletPath)];
|
|
132
128
|
case 8:
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
_b = (emulator = _c.sent());
|
|
130
|
+
_c.label = 9;
|
|
135
131
|
case 9:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
132
|
+
_b;
|
|
133
|
+
if (!(!server && appletOptions)) return [3 /*break*/, 11];
|
|
134
|
+
return [4 /*yield*/, dev.applet.serve.serve(__assign(__assign({}, appletOptions), { port: this.options.appletPort, publicUrl: this.options.appletPublicUrl }))];
|
|
135
|
+
case 10:
|
|
136
|
+
server = _c.sent();
|
|
137
|
+
_c.label = 11;
|
|
138
|
+
case 11: return [2 /*return*/];
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
}); });
|
|
142
|
-
compiler.hooks.watchClose.tap(
|
|
142
|
+
compiler.hooks.watchClose.tap('SignageOSPlugin', function () { return __awaiter(_this, void 0, void 0, function () {
|
|
143
143
|
return __generator(this, function (_a) {
|
|
144
144
|
switch (_a.label) {
|
|
145
145
|
case 0:
|
|
146
146
|
if (emulator) {
|
|
147
|
-
|
|
147
|
+
emulator.stop();
|
|
148
148
|
emulator = undefined;
|
|
149
149
|
}
|
|
150
150
|
if (!server) return [3 /*break*/, 2];
|
|
@@ -157,21 +157,21 @@ var Plugin = /** @class */ (function () {
|
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
}); });
|
|
160
|
-
compiler.hooks.assetEmitted.tap(
|
|
160
|
+
compiler.hooks.assetEmitted.tap('SignageOSPlugin', function (filename, assetEmittedInfo) { return __awaiter(_this, void 0, void 0, function () {
|
|
161
161
|
return __generator(this, function (_a) {
|
|
162
162
|
if (emulator) {
|
|
163
|
-
|
|
163
|
+
emulator.notifyEmittedFile(filename, assetEmittedInfo);
|
|
164
164
|
}
|
|
165
165
|
return [2 /*return*/];
|
|
166
166
|
});
|
|
167
167
|
}); });
|
|
168
|
-
compiler.hooks.done.tap(
|
|
168
|
+
compiler.hooks.done.tap('SignageOSPlugin', function (stats) { return __awaiter(_this, void 0, void 0, function () {
|
|
169
169
|
var virtualFs, build, deviceUids;
|
|
170
170
|
return __generator(this, function (_a) {
|
|
171
171
|
switch (_a.label) {
|
|
172
172
|
case 0:
|
|
173
173
|
if (emulator) {
|
|
174
|
-
|
|
174
|
+
emulator.notifyDone(stats);
|
|
175
175
|
}
|
|
176
176
|
if (!(dev && appletOptions)) return [3 /*break*/, 3];
|
|
177
177
|
virtualFs = getCompilationFileSystem(stats.compilation.compiler.outputFileSystem);
|
|
@@ -179,19 +179,19 @@ var Plugin = /** @class */ (function () {
|
|
|
179
179
|
case 1:
|
|
180
180
|
build = _a.sent();
|
|
181
181
|
console.info("Applet ".concat(appletOptions.appletUid, " v").concat(appletOptions.appletVersion, " built into ").concat(build.packageArchivePath));
|
|
182
|
-
debug(
|
|
182
|
+
debug('Applet built files', build.filePaths);
|
|
183
183
|
return [4 /*yield*/, dev.deviceConnect.reloadConnected()];
|
|
184
184
|
case 2:
|
|
185
185
|
deviceUids = (_a.sent()).deviceUids;
|
|
186
|
-
console.info(
|
|
186
|
+
console.info('Connected devices reloaded', deviceUids);
|
|
187
187
|
_a.label = 3;
|
|
188
188
|
case 3: return [2 /*return*/];
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
}); });
|
|
192
|
-
process.on(
|
|
192
|
+
process.on('exit', function () {
|
|
193
193
|
if (emulator) {
|
|
194
|
-
|
|
194
|
+
emulator.stop();
|
|
195
195
|
emulator = undefined;
|
|
196
196
|
}
|
|
197
197
|
if (server) {
|
|
@@ -207,9 +207,9 @@ module.exports = Plugin;
|
|
|
207
207
|
module.exports.default = Plugin;
|
|
208
208
|
// Type guard to check if an object is a webpack AssetEmittedInfo
|
|
209
209
|
function isAssetEmittedInfo(obj) {
|
|
210
|
-
return obj && typeof obj ===
|
|
210
|
+
return obj && typeof obj === 'object' && 'source' in obj;
|
|
211
211
|
}
|
|
212
|
-
var APPLET_DIRECTORY_PATH =
|
|
212
|
+
var APPLET_DIRECTORY_PATH = '/applet';
|
|
213
213
|
function getCurrentOrganizationUid() {
|
|
214
214
|
return __awaiter(this, void 0, void 0, function () {
|
|
215
215
|
var cliOptions, organizationUid;
|
|
@@ -221,7 +221,7 @@ function getCurrentOrganizationUid() {
|
|
|
221
221
|
case 1:
|
|
222
222
|
organizationUid = _a.sent();
|
|
223
223
|
if (!organizationUid) {
|
|
224
|
-
throw new Error("No default organization selected. Use ".concat(chalk.green(
|
|
224
|
+
throw new Error("No default organization selected. Use ".concat(chalk.green('sos organization set-default'), " first."));
|
|
225
225
|
}
|
|
226
226
|
return [2 /*return*/, organizationUid];
|
|
227
227
|
}
|
|
@@ -234,58 +234,53 @@ function createEmulator(options, appletOptions, organizationUid, appletPath) {
|
|
|
234
234
|
return __generator(this, function (_a) {
|
|
235
235
|
try {
|
|
236
236
|
defaultPort_1 = options.port;
|
|
237
|
-
frontDisplayPath = path.dirname(require.resolve(
|
|
237
|
+
frontDisplayPath = path.dirname(require.resolve('@signageos/front-display/package.json', {
|
|
238
238
|
paths: [appletPath],
|
|
239
239
|
}));
|
|
240
|
-
frontDisplayDistPath_1 = path.join(frontDisplayPath,
|
|
240
|
+
frontDisplayDistPath_1 = path.join(frontDisplayPath, 'dist');
|
|
241
241
|
lastCompilationAssets_1 = {};
|
|
242
242
|
envVars_1 = {
|
|
243
|
-
uid: (appletOptions === null || appletOptions === void 0 ? void 0 : appletOptions.appletUid) ||
|
|
244
|
-
version: (appletOptions === null || appletOptions === void 0 ? void 0 : appletOptions.appletVersion) ||
|
|
243
|
+
uid: (appletOptions === null || appletOptions === void 0 ? void 0 : appletOptions.appletUid) || '__default_timing__',
|
|
244
|
+
version: (appletOptions === null || appletOptions === void 0 ? void 0 : appletOptions.appletVersion) || '0.0.0',
|
|
245
245
|
organizationUid: organizationUid,
|
|
246
246
|
binaryFilePath: "".concat(APPLET_DIRECTORY_PATH, "/index.html"),
|
|
247
|
-
checksum:
|
|
248
|
-
frontAppletVersion:
|
|
249
|
-
frontAppletBinaryFile:
|
|
247
|
+
checksum: '',
|
|
248
|
+
frontAppletVersion: '', // has bundled front applet
|
|
249
|
+
frontAppletBinaryFile: '', // has bundled front applet
|
|
250
250
|
};
|
|
251
251
|
app = express();
|
|
252
252
|
app.use(cors());
|
|
253
|
-
app.get(
|
|
254
|
-
var page = fsExtra
|
|
255
|
-
.readFileSync(path.join(frontDisplayDistPath_1, "index.html"))
|
|
256
|
-
.toString();
|
|
253
|
+
app.get('/', function (_req, res) {
|
|
254
|
+
var page = fsExtra.readFileSync(path.join(frontDisplayDistPath_1, 'index.html')).toString();
|
|
257
255
|
var script = "\n<script>\n\twindow.__SOS_BUNDLED_APPLET = {};\n\twindow.__SOS_BUNDLED_APPLET.binaryFile = location.origin + ".concat(JSON.stringify(envVars_1.binaryFilePath), ";\n\twindow.__SOS_BUNDLED_APPLET.uid = ").concat(JSON.stringify(envVars_1.uid), ";\n\twindow.__SOS_BUNDLED_APPLET.version = ").concat(JSON.stringify(envVars_1.version), ";\n\twindow.__SOS_BUNDLED_APPLET.checksum = ").concat(JSON.stringify(envVars_1.checksum), ";\n\twindow.__SOS_BUNDLED_APPLET.frontAppletVersion = ").concat(JSON.stringify(envVars_1.frontAppletVersion), ";\n\twindow.__SOS_BUNDLED_APPLET.frontAppletBinaryFile = ").concat(JSON.stringify(envVars_1.frontAppletBinaryFile), ";\n\twindow.__SOS_AUTO_VERIFICATION = {};\n\twindow.__SOS_AUTO_VERIFICATION.organizationUid = ").concat(JSON.stringify(envVars_1.organizationUid), ";\n</script>");
|
|
258
|
-
res.send(page.replace(
|
|
256
|
+
res.send(page.replace('</head>', "".concat(script, "</head>")));
|
|
259
257
|
});
|
|
260
258
|
app.use(serveStatic(frontDisplayDistPath_1));
|
|
261
259
|
server_1 = http.createServer(app);
|
|
262
260
|
server_1.listen(defaultPort_1, function () {
|
|
263
261
|
var _a;
|
|
264
262
|
var emulatorUrl = (_a = options.publicUrl) !== null && _a !== void 0 ? _a : "http://localhost:".concat(defaultPort_1);
|
|
265
|
-
console.
|
|
263
|
+
console.info("Emulator is running at ".concat(chalk.blue(chalk.bold(emulatorUrl))));
|
|
266
264
|
});
|
|
267
265
|
app.use(APPLET_DIRECTORY_PATH, function (req, res, next) {
|
|
268
266
|
var _a;
|
|
269
267
|
var fileUrl = url.parse(req.url);
|
|
270
|
-
var relativeFilePath = fileUrl.pathname
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
if (relativeFilePath === "index.html") {
|
|
274
|
-
if (typeof lastCompilationAssets_1[relativeFilePath] === "undefined") {
|
|
268
|
+
var relativeFilePath = fileUrl.pathname ? fileUrl.pathname.substr(1) : '';
|
|
269
|
+
if (relativeFilePath === 'index.html') {
|
|
270
|
+
if (typeof lastCompilationAssets_1[relativeFilePath] === 'undefined') {
|
|
275
271
|
res.status(404).send();
|
|
276
272
|
}
|
|
277
273
|
else {
|
|
278
274
|
// Propagate Hot reload of whole emulator
|
|
279
|
-
var prependFileContent =
|
|
280
|
-
res.setHeader(
|
|
281
|
-
var page = (_a = lastCompilationAssets_1[relativeFilePath].source
|
|
282
|
-
|
|
283
|
-
res.send(page.replace("</head>", "".concat(prependFileContent, "</head>")));
|
|
275
|
+
var prependFileContent = '<script>window.onbeforeunload = function () { window.parent.location.reload(); }</script>';
|
|
276
|
+
res.setHeader('Content-Type', 'text/html');
|
|
277
|
+
var page = (_a = lastCompilationAssets_1[relativeFilePath].source.source()) === null || _a === void 0 ? void 0 : _a.toString();
|
|
278
|
+
res.send(page.replace('</head>', "".concat(prependFileContent, "</head>")));
|
|
284
279
|
}
|
|
285
280
|
}
|
|
286
|
-
else if (typeof lastCompilationAssets_1[relativeFilePath] !==
|
|
287
|
-
var contentType =
|
|
288
|
-
res.setHeader(
|
|
281
|
+
else if (typeof lastCompilationAssets_1[relativeFilePath] !== 'undefined') {
|
|
282
|
+
var contentType = mime_1.default.getType(relativeFilePath) || 'application/octet-stream';
|
|
283
|
+
res.setHeader('Content-Type', contentType);
|
|
289
284
|
res.send(lastCompilationAssets_1[relativeFilePath].source.buffer());
|
|
290
285
|
}
|
|
291
286
|
else {
|
|
@@ -295,7 +290,7 @@ function createEmulator(options, appletOptions, organizationUid, appletPath) {
|
|
|
295
290
|
return [2 /*return*/, {
|
|
296
291
|
notifyEmittedFile: function (filename, assetEmittedInfo) {
|
|
297
292
|
try {
|
|
298
|
-
console.
|
|
293
|
+
console.info('SOS Applet compilation done');
|
|
299
294
|
if (assetEmittedInfo instanceof Buffer) {
|
|
300
295
|
// Back compatibility for Webpack 4 and less.
|
|
301
296
|
// It's returning Buffer of the emitted asset directly
|
|
@@ -320,10 +315,9 @@ function createEmulator(options, appletOptions, organizationUid, appletPath) {
|
|
|
320
315
|
},
|
|
321
316
|
notifyDone: function (stats) {
|
|
322
317
|
envVars_1.checksum = stats.compilation.hash;
|
|
323
|
-
debug(
|
|
324
|
-
if (typeof stats.compilation.assets[
|
|
325
|
-
console.warn("Applet has to have ".concat(chalk.green(
|
|
326
|
-
return;
|
|
318
|
+
debug('process.env', envVars_1);
|
|
319
|
+
if (typeof stats.compilation.assets['index.html'] === 'undefined') {
|
|
320
|
+
console.warn("Applet has to have ".concat(chalk.green('index.html'), " in output files."));
|
|
327
321
|
}
|
|
328
322
|
},
|
|
329
323
|
stop: function () {
|
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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAAmC;AACnC,2BAA6B;AAC7B,2BAA6B;AAC7B,yBAA2B;AAC3B,2BAA6B;AAC7B,6BAAwB;AACxB,kCAAoC;AACpC,6BAA+B;AAC/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K,CAAC,aAAa,EAAE,SAAO,CAAC,CAAC;4BAE9B,IAAI,OAAO,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,WAAW,EAAE,CAAC;gCACnE,OAAO,CAAC,IAAI,CAAC,6BAAsB,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,sBAAmB,CAAC,CAAC;4BAClF,CAAC;wBACF,CAAC;wBACD,IAAI;4BACH,QAAM,CAAC,KAAK,EAAE,CAAC;wBAChB,CAAC;qBACD,EAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACjB,CAAC;;;;CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signageos/webpack-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Webpack Plugin for emulating sOS JS API in browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -12,16 +12,18 @@
|
|
|
12
12
|
"config"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
+
"clean": "rm -rf dist/*",
|
|
16
|
+
"clean-build": "npm run clean && npm run build",
|
|
17
|
+
"clean-build-public": "npm run clean-build",
|
|
15
18
|
"build": "tsc",
|
|
16
|
-
"lint": "eslint
|
|
17
|
-
"lint:fix": "eslint --fix
|
|
19
|
+
"lint": "eslint",
|
|
20
|
+
"lint:fix": "eslint --fix",
|
|
18
21
|
"lint:prettier": "prettier \"**/*.+(ts|tsx|json|js)\" --check",
|
|
19
22
|
"lint:prettier:fix": "prettier \"**/*.+(ts|tsx|json|js)\" --write",
|
|
20
|
-
"clean": "rm -rf dist/*",
|
|
21
|
-
"clean-build": "npm run clean && npm run build",
|
|
22
23
|
"test": "mocha",
|
|
23
24
|
"watch": "tsc --watch",
|
|
24
25
|
"check": "npm run depcheck && npx --userconfig ./.npmrc @signageos/lib-ci check-deps",
|
|
26
|
+
"check-types": "tsc --noEmit",
|
|
25
27
|
"depcheck": "depcheck --config .depcheckrc.json"
|
|
26
28
|
},
|
|
27
29
|
"repository": {
|
|
@@ -33,36 +35,48 @@
|
|
|
33
35
|
"signageOS",
|
|
34
36
|
"plugin"
|
|
35
37
|
],
|
|
36
|
-
"author": "signageOS
|
|
38
|
+
"author": "signageOS <dev@signageos.io>",
|
|
37
39
|
"license": "ISC",
|
|
38
40
|
"bugs": {
|
|
39
41
|
"url": "https://github.com/signageos/webpack-plugin/issues"
|
|
40
42
|
},
|
|
41
43
|
"homepage": "https://github.com/signageos/webpack-plugin#readme",
|
|
42
44
|
"dependencies": {
|
|
43
|
-
"@signageos/cli": "^2.
|
|
44
|
-
"@signageos/sdk": "^
|
|
45
|
+
"@signageos/cli": "^2.6.0",
|
|
46
|
+
"@signageos/sdk": "^2.0.2",
|
|
45
47
|
"chalk": "4.1.2",
|
|
46
48
|
"command-line-args": "6.0.1",
|
|
47
49
|
"cors": "2.8.5",
|
|
48
|
-
"debug": "4.4.
|
|
49
|
-
"express": "
|
|
50
|
+
"debug": "4.4.1",
|
|
51
|
+
"express": "4.21.2",
|
|
50
52
|
"fs-extra": "11.3.0",
|
|
51
|
-
"mime": "
|
|
53
|
+
"mime": "4.0.7",
|
|
52
54
|
"serve-static": "2.2.0"
|
|
53
55
|
},
|
|
56
|
+
"overrides": {
|
|
57
|
+
"underscore": "^1.13.6",
|
|
58
|
+
"mongoose": "^8.9.5",
|
|
59
|
+
"socket.io-parser": "^4.2.4",
|
|
60
|
+
"debug": "4.4.1",
|
|
61
|
+
"ms": "^2.1.3",
|
|
62
|
+
"qs": "^6.13.0",
|
|
63
|
+
"connect": "^3.7.0",
|
|
64
|
+
"parsejson": "0.0.3",
|
|
65
|
+
"parseuri": "3.0.2",
|
|
66
|
+
"socket.io-client": "^4.8.1"
|
|
67
|
+
},
|
|
54
68
|
"peerDependencies": {
|
|
55
69
|
"@signageos/front-display": ">=14.0.0",
|
|
56
70
|
"webpack": ">=4.0.0"
|
|
57
71
|
},
|
|
58
72
|
"devDependencies": {
|
|
59
|
-
"@signageos/codestyle": "1.0
|
|
60
|
-
"@signageos/front-display": "^14.
|
|
73
|
+
"@signageos/codestyle": "2.1.0",
|
|
74
|
+
"@signageos/front-display": "^14.22.0",
|
|
61
75
|
"@types/command-line-args": "5.2.3",
|
|
62
76
|
"@types/command-line-usage": "5.0.4",
|
|
63
77
|
"@types/cors": "2.8.17",
|
|
64
78
|
"@types/debug": "4.1.12",
|
|
65
|
-
"@types/express": "
|
|
79
|
+
"@types/express": "4.17.21",
|
|
66
80
|
"@types/fs-extra": "11.0.4",
|
|
67
81
|
"@types/ini": "4.1.1",
|
|
68
82
|
"@types/mime": "3.0.4",
|