@signageos/webpack-plugin 0.3.0 → 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 -117
- package/dist/index.js.map +1 -1
- package/package.json +10 -13
- package/CHANGELOG.md +0 -41
- 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/package-lock.json +0 -5427
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,124 +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
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
var contentType = mime.getType(relativeFilePath) || 'application/octet-stream';
|
|
216
|
-
res.setHeader('Content-Type', contentType);
|
|
217
|
-
res.send(lastCompilationAssets_1[relativeFilePath].source.buffer());
|
|
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();
|
|
218
261
|
}
|
|
219
262
|
else {
|
|
220
|
-
|
|
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());
|
|
221
267
|
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
+
};
|
|
244
291
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
envVars_1.checksum = stats.compilation.hash;
|
|
248
|
-
debug('process.env', envVars_1);
|
|
249
|
-
if (typeof stats.compilation.assets['index.html'] === 'undefined') {
|
|
250
|
-
console.warn("Applet has to have ".concat(chalk.green('index.html'), " in output files."));
|
|
251
|
-
return;
|
|
292
|
+
else {
|
|
293
|
+
lastCompilationAssets_1[filename] = assetEmittedInfo;
|
|
252
294
|
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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);
|
|
264
317
|
}
|
|
318
|
+
return [2 /*return*/];
|
|
265
319
|
});
|
|
266
320
|
});
|
|
267
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;AAC7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AAM,EAAE;oCACvC,6CAA6C;oCAC7C,sDAAsD;oCACtD,uBAAqB,CAAC,QAAQ,CAAC,GAAG;wCACjC,MAAM,EAAE;4CACP,MAAM,EAAE,cAAM,OAAA,gBAAgB,EAAhB,CAAgB;4CAC9B,MAAM,EAAE,cAAM,OAAA,gBAAgB,EAAhB,CAAgB;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,40 +37,37 @@
|
|
|
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
|
},
|
|
54
51
|
"peerDependencies": {
|
|
55
|
-
"@signageos/front-display": ">=
|
|
52
|
+
"@signageos/front-display": ">=11.0.0",
|
|
56
53
|
"webpack": "^5.0.0"
|
|
57
54
|
},
|
|
58
55
|
"devDependencies": {
|
|
59
|
-
"@signageos/codestyle": "0.0.
|
|
56
|
+
"@signageos/codestyle": "0.0.23",
|
|
57
|
+
"@signageos/front-display": "11.3.0",
|
|
60
58
|
"@types/chalk": "2.2.0",
|
|
61
59
|
"@types/command-line-args": "5.2.0",
|
|
62
60
|
"@types/command-line-usage": "5.0.2",
|
|
63
61
|
"@types/cors": "2.8.6",
|
|
64
62
|
"@types/debug": "4.1.5",
|
|
65
|
-
"@types/express": "4.17.
|
|
63
|
+
"@types/express": "4.17.14",
|
|
66
64
|
"@types/fs-extra": "8.1.0",
|
|
67
65
|
"@types/globby": "9.1.0",
|
|
68
66
|
"@types/ini": "1.3.30",
|
|
69
|
-
"@types/lodash": "4.14.168",
|
|
70
67
|
"@types/mime": "2.0.1",
|
|
71
68
|
"@types/mocha": "7.0.2",
|
|
72
|
-
"@types/node": "
|
|
73
|
-
"@types/serve-static": "1.
|
|
69
|
+
"@types/node": "16.18.3",
|
|
70
|
+
"@types/serve-static": "1.15.0",
|
|
74
71
|
"depcheck": "1.4.3",
|
|
75
72
|
"mocha": "8.4.0",
|
|
76
73
|
"ts-node": "8.6.2",
|
package/CHANGELOG.md
DELETED
|
@@ -1,41 +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
|
-
## [0.3.0] - 2022-06-14
|
|
8
|
-
### Added
|
|
9
|
-
- Support for Webpack 5
|
|
10
|
-
|
|
11
|
-
## [0.2.0] - 2022-04-06
|
|
12
|
-
### Added
|
|
13
|
-
- Ask for organization when default is not set yet and offer to save the default organization
|
|
14
|
-
|
|
15
|
-
## [0.1.2] - 2022-01-18
|
|
16
|
-
### Fixed
|
|
17
|
-
- Compatibility with peer dependency for front-display version 9.13.0+ (because of changed API)
|
|
18
|
-
|
|
19
|
-
## [0.1.1] - 2021-02-22
|
|
20
|
-
### Fixed
|
|
21
|
-
- `localhost:8090` based development of applet works now
|
|
22
|
-
|
|
23
|
-
## [0.1.0] - 2021-01-29
|
|
24
|
-
### Added
|
|
25
|
-
- Reloading connected devices after build.
|
|
26
|
-
|
|
27
|
-
## [0.0.4] - 2020-10-13
|
|
28
|
-
### Fixed
|
|
29
|
-
- Remove unnecessary dependencies to keep plugin small
|
|
30
|
-
|
|
31
|
-
### Security
|
|
32
|
-
- Fix dependabot alerts
|
|
33
|
-
|
|
34
|
-
## [0.0.2] - 2020-03-04
|
|
35
|
-
### Fixed
|
|
36
|
-
- Public registry release
|
|
37
|
-
- Universal import for any modules style
|
|
38
|
-
|
|
39
|
-
## [0.0.1]
|
|
40
|
-
### Added
|
|
41
|
-
- Package is available in npm registry https://www.npmjs.com/package/@signageos/webpack-plugin (moved from @signageos/cli)
|