innetjs 2.0.11 → 2.0.12
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/bin/innet +5 -9
- package/index.d.ts +1 -1
- package/index.es6.js +4 -8
- package/index.js +4 -8
- package/package.json +1 -1
package/bin/innet
CHANGED
|
@@ -387,11 +387,11 @@ class InnetJS {
|
|
|
387
387
|
options.output.format = 'cjs';
|
|
388
388
|
options.external = Object.keys((pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) || {});
|
|
389
389
|
options.plugins.push(pluginNodeResolve.nodeResolve({
|
|
390
|
-
moduleDirectories: [path__default["default"].resolve(this.srcFolder, 'node_modules')]
|
|
390
|
+
moduleDirectories: [path__default["default"].resolve(this.srcFolder, 'node_modules')],
|
|
391
391
|
}), string({
|
|
392
392
|
include: '**/*.*',
|
|
393
393
|
exclude: stringExcludeNode,
|
|
394
|
-
}), this.createServer(
|
|
394
|
+
}), this.createServer());
|
|
395
395
|
}
|
|
396
396
|
else {
|
|
397
397
|
const key = path__default["default"].basename(this.sslKey) !== this.sslKey
|
|
@@ -602,23 +602,19 @@ class InnetJS {
|
|
|
602
602
|
})
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
|
-
createServer(
|
|
605
|
+
createServer() {
|
|
606
606
|
let app;
|
|
607
607
|
return {
|
|
608
608
|
writeBundle: () => __awaiter(this, void 0, void 0, function* () {
|
|
609
609
|
app === null || app === void 0 ? void 0 : app.kill();
|
|
610
|
-
const filePath = path__default["default"].resolve(this.
|
|
611
|
-
let data = yield fs__default["default"].readFile(filePath, 'UTF-8');
|
|
612
|
-
const regExp = new RegExp(`require\\('(${external.join('|')})'\\)`, 'g');
|
|
613
|
-
data = data.replace(regExp, `require('${path__default["default"].resolve(this.projectFolder, 'node_modules', '$1')}')`);
|
|
614
|
-
yield fs__default["default"].writeFile(filePath, data);
|
|
610
|
+
const filePath = path__default["default"].resolve(this.devBuildFolder, 'index.js');
|
|
615
611
|
app = spawn('node', ['-r', 'source-map-support/register', filePath], { stdio: 'inherit' });
|
|
616
612
|
})
|
|
617
613
|
};
|
|
618
614
|
}
|
|
619
615
|
}
|
|
620
616
|
|
|
621
|
-
var version = "2.0.
|
|
617
|
+
var version = "2.0.12";
|
|
622
618
|
|
|
623
619
|
require('dotenv').config();
|
|
624
620
|
const innetJS = new InnetJS();
|
package/index.d.ts
CHANGED
package/index.es6.js
CHANGED
|
@@ -356,11 +356,11 @@ class InnetJS {
|
|
|
356
356
|
options.output.format = 'cjs';
|
|
357
357
|
options.external = Object.keys((pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) || {});
|
|
358
358
|
options.plugins.push(nodeResolve({
|
|
359
|
-
moduleDirectories: [path$1.resolve(this.srcFolder, 'node_modules')]
|
|
359
|
+
moduleDirectories: [path$1.resolve(this.srcFolder, 'node_modules')],
|
|
360
360
|
}), string({
|
|
361
361
|
include: '**/*.*',
|
|
362
362
|
exclude: stringExcludeNode,
|
|
363
|
-
}), this.createServer(
|
|
363
|
+
}), this.createServer());
|
|
364
364
|
}
|
|
365
365
|
else {
|
|
366
366
|
const key = path$1.basename(this.sslKey) !== this.sslKey
|
|
@@ -571,16 +571,12 @@ class InnetJS {
|
|
|
571
571
|
})
|
|
572
572
|
};
|
|
573
573
|
}
|
|
574
|
-
createServer(
|
|
574
|
+
createServer() {
|
|
575
575
|
let app;
|
|
576
576
|
return {
|
|
577
577
|
writeBundle: () => __awaiter(this, void 0, void 0, function* () {
|
|
578
578
|
app === null || app === void 0 ? void 0 : app.kill();
|
|
579
|
-
const filePath = path$1.resolve(this.
|
|
580
|
-
let data = yield fs.readFile(filePath, 'UTF-8');
|
|
581
|
-
const regExp = new RegExp(`require\\('(${external.join('|')})'\\)`, 'g');
|
|
582
|
-
data = data.replace(regExp, `require('${path$1.resolve(this.projectFolder, 'node_modules', '$1')}')`);
|
|
583
|
-
yield fs.writeFile(filePath, data);
|
|
579
|
+
const filePath = path$1.resolve(this.devBuildFolder, 'index.js');
|
|
584
580
|
app = spawn('node', ['-r', 'source-map-support/register', filePath], { stdio: 'inherit' });
|
|
585
581
|
})
|
|
586
582
|
};
|
package/index.js
CHANGED
|
@@ -385,11 +385,11 @@ class InnetJS {
|
|
|
385
385
|
options.output.format = 'cjs';
|
|
386
386
|
options.external = Object.keys((pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) || {});
|
|
387
387
|
options.plugins.push(pluginNodeResolve.nodeResolve({
|
|
388
|
-
moduleDirectories: [path__default["default"].resolve(this.srcFolder, 'node_modules')]
|
|
388
|
+
moduleDirectories: [path__default["default"].resolve(this.srcFolder, 'node_modules')],
|
|
389
389
|
}), string({
|
|
390
390
|
include: '**/*.*',
|
|
391
391
|
exclude: stringExcludeNode,
|
|
392
|
-
}), this.createServer(
|
|
392
|
+
}), this.createServer());
|
|
393
393
|
}
|
|
394
394
|
else {
|
|
395
395
|
const key = path__default["default"].basename(this.sslKey) !== this.sslKey
|
|
@@ -600,16 +600,12 @@ class InnetJS {
|
|
|
600
600
|
})
|
|
601
601
|
};
|
|
602
602
|
}
|
|
603
|
-
createServer(
|
|
603
|
+
createServer() {
|
|
604
604
|
let app;
|
|
605
605
|
return {
|
|
606
606
|
writeBundle: () => __awaiter(this, void 0, void 0, function* () {
|
|
607
607
|
app === null || app === void 0 ? void 0 : app.kill();
|
|
608
|
-
const filePath = path__default["default"].resolve(this.
|
|
609
|
-
let data = yield fs__default["default"].readFile(filePath, 'UTF-8');
|
|
610
|
-
const regExp = new RegExp(`require\\('(${external.join('|')})'\\)`, 'g');
|
|
611
|
-
data = data.replace(regExp, `require('${path__default["default"].resolve(this.projectFolder, 'node_modules', '$1')}')`);
|
|
612
|
-
yield fs__default["default"].writeFile(filePath, data);
|
|
608
|
+
const filePath = path__default["default"].resolve(this.devBuildFolder, 'index.js');
|
|
613
609
|
app = spawn('node', ['-r', 'source-map-support/register', filePath], { stdio: 'inherit' });
|
|
614
610
|
})
|
|
615
611
|
};
|