innetjs 2.4.2 → 2.4.4
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/_virtual/_rollup-plugin-process-env.js +1 -1
- package/_virtual/_rollup-plugin-process-env.mjs +1 -1
- package/bin/innet +14 -3
- package/constants.js +1 -0
- package/constants.mjs +1 -0
- package/index.js +12 -2
- package/index.mjs +12 -2
- package/package.json +1 -1
package/bin/innet
CHANGED
|
@@ -74,6 +74,7 @@ const lintInclude = [
|
|
|
74
74
|
'**/*.tsx',
|
|
75
75
|
'**/*.js',
|
|
76
76
|
'**/*.jsx',
|
|
77
|
+
'**/*.mjs',
|
|
77
78
|
];
|
|
78
79
|
const imageInclude = [
|
|
79
80
|
'**/*.gif',
|
|
@@ -297,6 +298,11 @@ class InnetJS {
|
|
|
297
298
|
}),
|
|
298
299
|
jsx__default["default"](),
|
|
299
300
|
],
|
|
301
|
+
onwarn(warning, warn) {
|
|
302
|
+
if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
|
|
303
|
+
return;
|
|
304
|
+
warn(warning);
|
|
305
|
+
},
|
|
300
306
|
};
|
|
301
307
|
this.withLint(options, true);
|
|
302
308
|
const outputOptions = {
|
|
@@ -348,7 +354,7 @@ class InnetJS {
|
|
|
348
354
|
yield copyFiles(this.publicFolder, this.buildFolder);
|
|
349
355
|
const data = yield fs.promises.readFile(this.publicIndexFile);
|
|
350
356
|
const pkg = yield this.getPackage();
|
|
351
|
-
yield fs.promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl,
|
|
357
|
+
yield fs.promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl, path__default["default"].parse(input[0]).name));
|
|
352
358
|
}
|
|
353
359
|
}));
|
|
354
360
|
if (pkg) {
|
|
@@ -395,6 +401,11 @@ class InnetJS {
|
|
|
395
401
|
}),
|
|
396
402
|
jsx__default["default"](),
|
|
397
403
|
],
|
|
404
|
+
onwarn(warning, warn) {
|
|
405
|
+
if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
|
|
406
|
+
return;
|
|
407
|
+
warn(warning);
|
|
408
|
+
},
|
|
398
409
|
};
|
|
399
410
|
this.withLint(options);
|
|
400
411
|
if (node) {
|
|
@@ -436,7 +447,7 @@ class InnetJS {
|
|
|
436
447
|
}), string({
|
|
437
448
|
include: '**/*.*',
|
|
438
449
|
exclude: stringExcludeDom,
|
|
439
|
-
}), this.createClient(key, cert, pkg,
|
|
450
|
+
}), this.createClient(key, cert, pkg, path__default["default"].parse(input[0]).name), livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))));
|
|
440
451
|
}
|
|
441
452
|
this.withEnv(options, true);
|
|
442
453
|
const watcher = rollup__default["default"].watch(options);
|
|
@@ -791,7 +802,7 @@ class InnetJS {
|
|
|
791
802
|
}
|
|
792
803
|
|
|
793
804
|
(function () {
|
|
794
|
-
const env = {"__INNETJS__PACKAGE_VERSION":"2.4.
|
|
805
|
+
const env = {"__INNETJS__PACKAGE_VERSION":"2.4.4"};
|
|
795
806
|
if (typeof process === 'undefined') {
|
|
796
807
|
globalThis.process = { env: env };
|
|
797
808
|
} else if (process.env) {
|
package/constants.js
CHANGED
package/constants.mjs
CHANGED
package/index.js
CHANGED
|
@@ -187,6 +187,11 @@ class InnetJS {
|
|
|
187
187
|
}),
|
|
188
188
|
jsx__default["default"](),
|
|
189
189
|
],
|
|
190
|
+
onwarn(warning, warn) {
|
|
191
|
+
if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
|
|
192
|
+
return;
|
|
193
|
+
warn(warning);
|
|
194
|
+
},
|
|
190
195
|
};
|
|
191
196
|
this.withLint(options, true);
|
|
192
197
|
const outputOptions = {
|
|
@@ -238,7 +243,7 @@ class InnetJS {
|
|
|
238
243
|
yield copyFiles(this.publicFolder, this.buildFolder);
|
|
239
244
|
const data = yield fs.promises.readFile(this.publicIndexFile);
|
|
240
245
|
const pkg = yield this.getPackage();
|
|
241
|
-
yield fs.promises.writeFile(this.buildIndexFile, yield helpers.convertIndexFile(data, pkg.version, this.baseUrl,
|
|
246
|
+
yield fs.promises.writeFile(this.buildIndexFile, yield helpers.convertIndexFile(data, pkg.version, this.baseUrl, path__default["default"].parse(input[0]).name));
|
|
242
247
|
}
|
|
243
248
|
}));
|
|
244
249
|
if (pkg) {
|
|
@@ -285,6 +290,11 @@ class InnetJS {
|
|
|
285
290
|
}),
|
|
286
291
|
jsx__default["default"](),
|
|
287
292
|
],
|
|
293
|
+
onwarn(warning, warn) {
|
|
294
|
+
if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
|
|
295
|
+
return;
|
|
296
|
+
warn(warning);
|
|
297
|
+
},
|
|
288
298
|
};
|
|
289
299
|
this.withLint(options);
|
|
290
300
|
if (node) {
|
|
@@ -326,7 +336,7 @@ class InnetJS {
|
|
|
326
336
|
}), string({
|
|
327
337
|
include: '**/*.*',
|
|
328
338
|
exclude: constants.stringExcludeDom,
|
|
329
|
-
}), this.createClient(key, cert, pkg,
|
|
339
|
+
}), this.createClient(key, cert, pkg, path__default["default"].parse(input[0]).name), livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))));
|
|
330
340
|
}
|
|
331
341
|
this.withEnv(options, true);
|
|
332
342
|
const watcher = rollup__default["default"].watch(options);
|
package/index.mjs
CHANGED
|
@@ -152,6 +152,11 @@ class InnetJS {
|
|
|
152
152
|
}),
|
|
153
153
|
jsx(),
|
|
154
154
|
],
|
|
155
|
+
onwarn(warning, warn) {
|
|
156
|
+
if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
|
|
157
|
+
return;
|
|
158
|
+
warn(warning);
|
|
159
|
+
},
|
|
155
160
|
};
|
|
156
161
|
this.withLint(options, true);
|
|
157
162
|
const outputOptions = {
|
|
@@ -203,7 +208,7 @@ class InnetJS {
|
|
|
203
208
|
yield copyFiles(this.publicFolder, this.buildFolder);
|
|
204
209
|
const data = yield promises.readFile(this.publicIndexFile);
|
|
205
210
|
const pkg = yield this.getPackage();
|
|
206
|
-
yield promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl,
|
|
211
|
+
yield promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl, path.parse(input[0]).name));
|
|
207
212
|
}
|
|
208
213
|
}));
|
|
209
214
|
if (pkg) {
|
|
@@ -250,6 +255,11 @@ class InnetJS {
|
|
|
250
255
|
}),
|
|
251
256
|
jsx(),
|
|
252
257
|
],
|
|
258
|
+
onwarn(warning, warn) {
|
|
259
|
+
if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
|
|
260
|
+
return;
|
|
261
|
+
warn(warning);
|
|
262
|
+
},
|
|
253
263
|
};
|
|
254
264
|
this.withLint(options);
|
|
255
265
|
if (node) {
|
|
@@ -291,7 +301,7 @@ class InnetJS {
|
|
|
291
301
|
}), string({
|
|
292
302
|
include: '**/*.*',
|
|
293
303
|
exclude: stringExcludeDom,
|
|
294
|
-
}), this.createClient(key, cert, pkg,
|
|
304
|
+
}), this.createClient(key, cert, pkg, path.parse(input[0]).name), livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))));
|
|
295
305
|
}
|
|
296
306
|
this.withEnv(options, true);
|
|
297
307
|
const watcher = rollup.watch(options);
|