@signageos/webpack-plugin 1.0.8 → 1.0.9
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/config/parameters.d.ts +3 -3
- package/config/parameters.js +6 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +66 -54
- package/dist/index.js.map +1 -1
- package/package.json +28 -28
package/config/parameters.d.ts
CHANGED
package/config/parameters.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
const packageConfig = require(
|
|
1
|
+
const packageConfig = require("../package.json");
|
|
2
2
|
module.exports = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
version: packageConfig.version,
|
|
4
|
+
apiUrl: process.env.API_URL
|
|
5
|
+
? process.env.API_URL
|
|
6
|
+
: "https://api.signageos.io",
|
|
7
|
+
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
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 =
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -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,14 +87,14 @@ var Plugin = /** @class */ (function () {
|
|
|
87
87
|
}
|
|
88
88
|
Plugin.prototype.apply = function (compiler) {
|
|
89
89
|
var _this = this;
|
|
90
|
-
console.log(
|
|
90
|
+
console.log("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(
|
|
97
|
+
compiler.hooks.watchRun.tapPromise("SignageOSPlugin", function (_compiler) { return __awaiter(_this, void 0, void 0, function () {
|
|
98
98
|
var e_1;
|
|
99
99
|
return __generator(this, function (_a) {
|
|
100
100
|
switch (_a.label) {
|
|
@@ -116,11 +116,12 @@ var Plugin = /** @class */ (function () {
|
|
|
116
116
|
_a.trys.push([3, 5, , 6]);
|
|
117
117
|
return [4 /*yield*/, dev.applet.identification.getAppletUidAndVersion(appletPath)];
|
|
118
118
|
case 4:
|
|
119
|
-
appletOptions =
|
|
119
|
+
appletOptions =
|
|
120
|
+
_a.sent();
|
|
120
121
|
return [3 /*break*/, 6];
|
|
121
122
|
case 5:
|
|
122
123
|
e_1 = _a.sent();
|
|
123
|
-
console.warn(chalk.yellow(
|
|
124
|
+
console.warn(chalk.yellow("Applet is not uploaded yet. It cannot be developed on real device."));
|
|
124
125
|
return [3 /*break*/, 6];
|
|
125
126
|
case 6:
|
|
126
127
|
if (!!emulator) return [3 /*break*/, 8];
|
|
@@ -138,12 +139,12 @@ var Plugin = /** @class */ (function () {
|
|
|
138
139
|
}
|
|
139
140
|
});
|
|
140
141
|
}); });
|
|
141
|
-
compiler.hooks.watchClose.tap(
|
|
142
|
+
compiler.hooks.watchClose.tap("SignageOSPlugin", function () { return __awaiter(_this, void 0, void 0, function () {
|
|
142
143
|
return __generator(this, function (_a) {
|
|
143
144
|
switch (_a.label) {
|
|
144
145
|
case 0:
|
|
145
146
|
if (emulator) {
|
|
146
|
-
emulator.stop();
|
|
147
|
+
void emulator.stop();
|
|
147
148
|
emulator = undefined;
|
|
148
149
|
}
|
|
149
150
|
if (!server) return [3 /*break*/, 2];
|
|
@@ -156,21 +157,21 @@ var Plugin = /** @class */ (function () {
|
|
|
156
157
|
}
|
|
157
158
|
});
|
|
158
159
|
}); });
|
|
159
|
-
compiler.hooks.assetEmitted.tap(
|
|
160
|
+
compiler.hooks.assetEmitted.tap("SignageOSPlugin", function (filename, assetEmittedInfo) { return __awaiter(_this, void 0, void 0, function () {
|
|
160
161
|
return __generator(this, function (_a) {
|
|
161
162
|
if (emulator) {
|
|
162
|
-
emulator.notifyEmittedFile(filename, assetEmittedInfo);
|
|
163
|
+
void emulator.notifyEmittedFile(filename, assetEmittedInfo);
|
|
163
164
|
}
|
|
164
165
|
return [2 /*return*/];
|
|
165
166
|
});
|
|
166
167
|
}); });
|
|
167
|
-
compiler.hooks.done.tap(
|
|
168
|
+
compiler.hooks.done.tap("SignageOSPlugin", function (stats) { return __awaiter(_this, void 0, void 0, function () {
|
|
168
169
|
var virtualFs, build, deviceUids;
|
|
169
170
|
return __generator(this, function (_a) {
|
|
170
171
|
switch (_a.label) {
|
|
171
172
|
case 0:
|
|
172
173
|
if (emulator) {
|
|
173
|
-
emulator.notifyDone(stats);
|
|
174
|
+
void emulator.notifyDone(stats);
|
|
174
175
|
}
|
|
175
176
|
if (!(dev && appletOptions)) return [3 /*break*/, 3];
|
|
176
177
|
virtualFs = getCompilationFileSystem(stats.compilation.compiler.outputFileSystem);
|
|
@@ -178,23 +179,23 @@ var Plugin = /** @class */ (function () {
|
|
|
178
179
|
case 1:
|
|
179
180
|
build = _a.sent();
|
|
180
181
|
console.info("Applet ".concat(appletOptions.appletUid, " v").concat(appletOptions.appletVersion, " built into ").concat(build.packageArchivePath));
|
|
181
|
-
debug(
|
|
182
|
+
debug("Applet built files", build.filePaths);
|
|
182
183
|
return [4 /*yield*/, dev.deviceConnect.reloadConnected()];
|
|
183
184
|
case 2:
|
|
184
185
|
deviceUids = (_a.sent()).deviceUids;
|
|
185
|
-
console.info(
|
|
186
|
+
console.info("Connected devices reloaded", deviceUids);
|
|
186
187
|
_a.label = 3;
|
|
187
188
|
case 3: return [2 /*return*/];
|
|
188
189
|
}
|
|
189
190
|
});
|
|
190
191
|
}); });
|
|
191
|
-
process.on(
|
|
192
|
+
process.on("exit", function () {
|
|
192
193
|
if (emulator) {
|
|
193
|
-
emulator.stop();
|
|
194
|
+
void emulator.stop();
|
|
194
195
|
emulator = undefined;
|
|
195
196
|
}
|
|
196
197
|
if (server) {
|
|
197
|
-
server.stop();
|
|
198
|
+
void server.stop();
|
|
198
199
|
server = undefined;
|
|
199
200
|
}
|
|
200
201
|
});
|
|
@@ -204,22 +205,23 @@ var Plugin = /** @class */ (function () {
|
|
|
204
205
|
exports.default = Plugin;
|
|
205
206
|
module.exports = Plugin;
|
|
206
207
|
module.exports.default = Plugin;
|
|
207
|
-
|
|
208
|
+
// Type guard to check if an object is a webpack AssetEmittedInfo
|
|
209
|
+
function isAssetEmittedInfo(obj) {
|
|
210
|
+
return obj && typeof obj === "object" && "source" in obj;
|
|
211
|
+
}
|
|
212
|
+
var APPLET_DIRECTORY_PATH = "/applet";
|
|
208
213
|
function getCurrentOrganizationUid() {
|
|
209
214
|
return __awaiter(this, void 0, void 0, function () {
|
|
210
215
|
var cliOptions, organizationUid;
|
|
211
216
|
return __generator(this, function (_a) {
|
|
212
217
|
switch (_a.label) {
|
|
213
218
|
case 0:
|
|
214
|
-
cliOptions = cliArgs([
|
|
215
|
-
organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION,
|
|
216
|
-
organizationFacade_1.ORGANIZATION_UID_OPTION,
|
|
217
|
-
], { partial: true });
|
|
219
|
+
cliOptions = cliArgs([organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION, organizationFacade_1.ORGANIZATION_UID_OPTION], { partial: true });
|
|
218
220
|
return [4 /*yield*/, (0, organizationFacade_1.getOrganizationUidOrDefaultOrSelect)(cliOptions)];
|
|
219
221
|
case 1:
|
|
220
222
|
organizationUid = _a.sent();
|
|
221
223
|
if (!organizationUid) {
|
|
222
|
-
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."));
|
|
223
225
|
}
|
|
224
226
|
return [2 /*return*/, organizationUid];
|
|
225
227
|
}
|
|
@@ -232,22 +234,26 @@ function createEmulator(options, appletOptions, organizationUid, appletPath) {
|
|
|
232
234
|
return __generator(this, function (_a) {
|
|
233
235
|
try {
|
|
234
236
|
defaultPort_1 = options.port;
|
|
235
|
-
frontDisplayPath = path.dirname(require.resolve(
|
|
236
|
-
|
|
237
|
+
frontDisplayPath = path.dirname(require.resolve("@signageos/front-display/package.json", {
|
|
238
|
+
paths: [appletPath],
|
|
239
|
+
}));
|
|
240
|
+
frontDisplayDistPath_1 = path.join(frontDisplayPath, "dist");
|
|
237
241
|
lastCompilationAssets_1 = {};
|
|
238
242
|
envVars_1 = {
|
|
239
|
-
uid: (appletOptions === null || appletOptions === void 0 ? void 0 : appletOptions.appletUid) ||
|
|
240
|
-
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",
|
|
241
245
|
organizationUid: organizationUid,
|
|
242
246
|
binaryFilePath: "".concat(APPLET_DIRECTORY_PATH, "/index.html"),
|
|
243
|
-
checksum:
|
|
244
|
-
frontAppletVersion:
|
|
245
|
-
frontAppletBinaryFile:
|
|
247
|
+
checksum: "",
|
|
248
|
+
frontAppletVersion: "", // has bundled front applet
|
|
249
|
+
frontAppletBinaryFile: "", // has bundled front applet
|
|
246
250
|
};
|
|
247
251
|
app = express();
|
|
248
252
|
app.use(cors());
|
|
249
|
-
app.get(
|
|
250
|
-
var page = fsExtra
|
|
253
|
+
app.get("/", function (_req, res) {
|
|
254
|
+
var page = fsExtra
|
|
255
|
+
.readFileSync(path.join(frontDisplayDistPath_1, "index.html"))
|
|
256
|
+
.toString();
|
|
251
257
|
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>");
|
|
252
258
|
res.send(page.replace("</head>", "".concat(script, "</head>")));
|
|
253
259
|
});
|
|
@@ -261,22 +267,25 @@ function createEmulator(options, appletOptions, organizationUid, appletPath) {
|
|
|
261
267
|
app.use(APPLET_DIRECTORY_PATH, function (req, res, next) {
|
|
262
268
|
var _a;
|
|
263
269
|
var fileUrl = url.parse(req.url);
|
|
264
|
-
var relativeFilePath = fileUrl.pathname
|
|
265
|
-
|
|
266
|
-
|
|
270
|
+
var relativeFilePath = fileUrl.pathname
|
|
271
|
+
? fileUrl.pathname.substr(1)
|
|
272
|
+
: "";
|
|
273
|
+
if (relativeFilePath === "index.html") {
|
|
274
|
+
if (typeof lastCompilationAssets_1[relativeFilePath] === "undefined") {
|
|
267
275
|
res.status(404).send();
|
|
268
276
|
}
|
|
269
277
|
else {
|
|
270
278
|
// Propagate Hot reload of whole emulator
|
|
271
|
-
var prependFileContent =
|
|
272
|
-
res.setHeader(
|
|
273
|
-
var page = (_a = lastCompilationAssets_1[relativeFilePath].source
|
|
274
|
-
|
|
279
|
+
var prependFileContent = "<script>window.onbeforeunload = function () { window.parent.location.reload(); }</script>";
|
|
280
|
+
res.setHeader("Content-Type", "text/html");
|
|
281
|
+
var page = (_a = lastCompilationAssets_1[relativeFilePath].source
|
|
282
|
+
.source()) === null || _a === void 0 ? void 0 : _a.toString();
|
|
283
|
+
res.send(page.replace("</head>", "".concat(prependFileContent, "</head>")));
|
|
275
284
|
}
|
|
276
285
|
}
|
|
277
|
-
else if (typeof lastCompilationAssets_1[relativeFilePath] !==
|
|
278
|
-
var contentType = mime.getType(relativeFilePath) ||
|
|
279
|
-
res.setHeader(
|
|
286
|
+
else if (typeof lastCompilationAssets_1[relativeFilePath] !== "undefined") {
|
|
287
|
+
var contentType = mime.getType(relativeFilePath) || "application/octet-stream";
|
|
288
|
+
res.setHeader("Content-Type", contentType);
|
|
280
289
|
res.send(lastCompilationAssets_1[relativeFilePath].source.buffer());
|
|
281
290
|
}
|
|
282
291
|
else {
|
|
@@ -286,7 +295,7 @@ function createEmulator(options, appletOptions, organizationUid, appletPath) {
|
|
|
286
295
|
return [2 /*return*/, {
|
|
287
296
|
notifyEmittedFile: function (filename, assetEmittedInfo) {
|
|
288
297
|
try {
|
|
289
|
-
console.log(
|
|
298
|
+
console.log("SOS Applet compilation done");
|
|
290
299
|
if (assetEmittedInfo instanceof Buffer) {
|
|
291
300
|
// Back compatibility for Webpack 4 and less.
|
|
292
301
|
// It's returning Buffer of the emitted asset directly
|
|
@@ -297,8 +306,11 @@ function createEmulator(options, appletOptions, organizationUid, appletPath) {
|
|
|
297
306
|
},
|
|
298
307
|
};
|
|
299
308
|
}
|
|
300
|
-
else {
|
|
301
|
-
|
|
309
|
+
else if (isAssetEmittedInfo(assetEmittedInfo)) {
|
|
310
|
+
// For Webpack 5+, use the type guard to safely access the source property
|
|
311
|
+
lastCompilationAssets_1[filename] = {
|
|
312
|
+
source: assetEmittedInfo.source,
|
|
313
|
+
};
|
|
302
314
|
}
|
|
303
315
|
}
|
|
304
316
|
catch (error) {
|
|
@@ -308,9 +320,9 @@ function createEmulator(options, appletOptions, organizationUid, appletPath) {
|
|
|
308
320
|
},
|
|
309
321
|
notifyDone: function (stats) {
|
|
310
322
|
envVars_1.checksum = stats.compilation.hash;
|
|
311
|
-
debug(
|
|
312
|
-
if (typeof stats.compilation.assets[
|
|
313
|
-
console.warn("Applet has to have ".concat(chalk.green(
|
|
323
|
+
debug("process.env", envVars_1);
|
|
324
|
+
if (typeof stats.compilation.assets["index.html"] === "undefined") {
|
|
325
|
+
console.warn("Applet has to have ".concat(chalk.green("index.html"), " in output files."));
|
|
314
326
|
return;
|
|
315
327
|
}
|
|
316
328
|
},
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["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-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Webpack Plugin for emulating sOS JS API in browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -13,13 +13,16 @@
|
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
15
|
"build": "tsc",
|
|
16
|
-
"lint": "
|
|
16
|
+
"lint": "eslint ./src/ ./tests/",
|
|
17
|
+
"lint:fix": "eslint --fix ./src/ ./tests/",
|
|
18
|
+
"lint:prettier": "prettier \"**/*.+(ts|tsx|json|js)\" --check",
|
|
19
|
+
"lint:prettier:fix": "prettier \"**/*.+(ts|tsx|json|js)\" --write",
|
|
17
20
|
"clean": "rm -rf dist/*",
|
|
18
21
|
"clean-build": "npm run clean && npm run build",
|
|
19
22
|
"test": "mocha",
|
|
20
23
|
"watch": "tsc --watch",
|
|
21
|
-
"check": "npm run depcheck && npx --userconfig ./.npmrc @signageos/lib check-deps",
|
|
22
|
-
"depcheck": "depcheck --
|
|
24
|
+
"check": "npm run depcheck && npx --userconfig ./.npmrc @signageos/lib-ci check-deps",
|
|
25
|
+
"depcheck": "depcheck --config .depcheckrc.json"
|
|
23
26
|
},
|
|
24
27
|
"repository": {
|
|
25
28
|
"type": "git",
|
|
@@ -37,44 +40,41 @@
|
|
|
37
40
|
},
|
|
38
41
|
"homepage": "https://github.com/signageos/webpack-plugin#readme",
|
|
39
42
|
"dependencies": {
|
|
40
|
-
"@signageos/cli": "^
|
|
41
|
-
"@signageos/sdk": "^1.
|
|
42
|
-
"chalk": "
|
|
43
|
-
"command-line-args": "
|
|
43
|
+
"@signageos/cli": "^2.3.1",
|
|
44
|
+
"@signageos/sdk": "^1.27.4",
|
|
45
|
+
"chalk": "4.1.2",
|
|
46
|
+
"command-line-args": "6.0.1",
|
|
44
47
|
"cors": "2.8.5",
|
|
45
|
-
"debug": "4.
|
|
46
|
-
"express": "
|
|
47
|
-
"fs-extra": "11.
|
|
48
|
-
"mime": "2.
|
|
49
|
-
"serve-static": "
|
|
48
|
+
"debug": "4.4.0",
|
|
49
|
+
"express": "5.1.0",
|
|
50
|
+
"fs-extra": "11.3.0",
|
|
51
|
+
"mime": "2.5.2",
|
|
52
|
+
"serve-static": "2.2.0"
|
|
50
53
|
},
|
|
51
54
|
"peerDependencies": {
|
|
52
55
|
"@signageos/front-display": ">=14.0.0",
|
|
53
56
|
"webpack": ">=4.0.0"
|
|
54
57
|
},
|
|
55
58
|
"devDependencies": {
|
|
56
|
-
"@signageos/codestyle": "0.
|
|
57
|
-
"@signageos/front-display": "^14.
|
|
58
|
-
"@types/
|
|
59
|
-
"@types/command-line-args": "5.2.0",
|
|
59
|
+
"@signageos/codestyle": "1.0.0",
|
|
60
|
+
"@signageos/front-display": "^14.18.4",
|
|
61
|
+
"@types/command-line-args": "5.2.3",
|
|
60
62
|
"@types/command-line-usage": "5.0.4",
|
|
61
63
|
"@types/cors": "2.8.17",
|
|
62
64
|
"@types/debug": "4.1.12",
|
|
63
|
-
"@types/express": "
|
|
65
|
+
"@types/express": "5.0.1",
|
|
64
66
|
"@types/fs-extra": "11.0.4",
|
|
65
|
-
"@types/globby": "9.1.0",
|
|
66
67
|
"@types/ini": "4.1.1",
|
|
67
|
-
"@types/mime": "
|
|
68
|
-
"@types/mocha": "10.0.
|
|
69
|
-
"@types/node": "
|
|
70
|
-
"@types/node-fetch": "2.6.
|
|
71
|
-
"@types/serve-static": "1.15.
|
|
68
|
+
"@types/mime": "3.0.4",
|
|
69
|
+
"@types/mocha": "10.0.10",
|
|
70
|
+
"@types/node": "22.15.2",
|
|
71
|
+
"@types/node-fetch": "2.6.12",
|
|
72
|
+
"@types/serve-static": "1.15.7",
|
|
72
73
|
"depcheck": "1.4.7",
|
|
73
|
-
"mocha": "
|
|
74
|
+
"mocha": "11.1.0",
|
|
74
75
|
"ts-node": "10.9.2",
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"webpack": "5.94.0"
|
|
76
|
+
"typescript": "5.8.3",
|
|
77
|
+
"webpack": "5.99.7"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"registry": "https://registry.npmjs.org/",
|