innetjs 2.6.0-alpha.5 → 2.6.0-alpha.6
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 +11 -7
- package/index.d.ts +1 -1
- package/index.js +10 -6
- package/index.mjs +10 -6
- package/package.json +1 -1
package/bin/innet
CHANGED
|
@@ -422,7 +422,7 @@ class InnetJS {
|
|
|
422
422
|
options.plugins.push(pluginNodeResolve.nodeResolve(), string({
|
|
423
423
|
include: '**/*.*',
|
|
424
424
|
exclude: stringExcludeNode,
|
|
425
|
-
}), this.createServer());
|
|
425
|
+
}), this.createServer(input));
|
|
426
426
|
}
|
|
427
427
|
else {
|
|
428
428
|
const key = path__default["default"].basename(this.sslKey) !== this.sslKey
|
|
@@ -787,21 +787,25 @@ class InnetJS {
|
|
|
787
787
|
}),
|
|
788
788
|
};
|
|
789
789
|
}
|
|
790
|
-
createServer() {
|
|
791
|
-
|
|
790
|
+
createServer(input) {
|
|
791
|
+
const apps = {};
|
|
792
792
|
return {
|
|
793
793
|
name: 'server',
|
|
794
794
|
writeBundle: () => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
795
|
-
|
|
796
|
-
const
|
|
797
|
-
|
|
795
|
+
var _a;
|
|
796
|
+
for (const file of input) {
|
|
797
|
+
const { name } = path__default["default"].parse(file);
|
|
798
|
+
(_a = apps[name]) === null || _a === void 0 ? void 0 : _a.kill();
|
|
799
|
+
const filePath = path__default["default"].resolve(this.devBuildFolder, `${name}.js`);
|
|
800
|
+
apps[name] = spawn('node', ['-r', 'source-map-support/register', filePath], { stdio: 'inherit' });
|
|
801
|
+
}
|
|
798
802
|
}),
|
|
799
803
|
};
|
|
800
804
|
}
|
|
801
805
|
}
|
|
802
806
|
|
|
803
807
|
(function () {
|
|
804
|
-
const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.
|
|
808
|
+
const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.6"};
|
|
805
809
|
if (typeof process === 'undefined') {
|
|
806
810
|
globalThis.process = { env: env };
|
|
807
811
|
} else if (process.env) {
|
package/index.d.ts
CHANGED
|
@@ -72,5 +72,5 @@ export declare class InnetJS {
|
|
|
72
72
|
increaseVersion(release: string): Promise<void>;
|
|
73
73
|
getPackage(): Promise<Record<string, any>>;
|
|
74
74
|
createClient(key: any, cert: any, pkg: any, index: string, inject: boolean): rollup.Plugin;
|
|
75
|
-
createServer(): rollup.Plugin;
|
|
75
|
+
createServer(input: string[]): rollup.Plugin;
|
|
76
76
|
}
|
package/index.js
CHANGED
|
@@ -308,7 +308,7 @@ class InnetJS {
|
|
|
308
308
|
options.plugins.push(pluginNodeResolve.nodeResolve(), string({
|
|
309
309
|
include: '**/*.*',
|
|
310
310
|
exclude: constants.stringExcludeNode,
|
|
311
|
-
}), this.createServer());
|
|
311
|
+
}), this.createServer(input));
|
|
312
312
|
}
|
|
313
313
|
else {
|
|
314
314
|
const key = path__default["default"].basename(this.sslKey) !== this.sslKey
|
|
@@ -673,14 +673,18 @@ class InnetJS {
|
|
|
673
673
|
}),
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
|
-
createServer() {
|
|
677
|
-
|
|
676
|
+
createServer(input) {
|
|
677
|
+
const apps = {};
|
|
678
678
|
return {
|
|
679
679
|
name: 'server',
|
|
680
680
|
writeBundle: () => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
681
|
-
|
|
682
|
-
const
|
|
683
|
-
|
|
681
|
+
var _a;
|
|
682
|
+
for (const file of input) {
|
|
683
|
+
const { name } = path__default["default"].parse(file);
|
|
684
|
+
(_a = apps[name]) === null || _a === void 0 ? void 0 : _a.kill();
|
|
685
|
+
const filePath = path__default["default"].resolve(this.devBuildFolder, `${name}.js`);
|
|
686
|
+
apps[name] = spawn('node', ['-r', 'source-map-support/register', filePath], { stdio: 'inherit' });
|
|
687
|
+
}
|
|
684
688
|
}),
|
|
685
689
|
};
|
|
686
690
|
}
|
package/index.mjs
CHANGED
|
@@ -273,7 +273,7 @@ class InnetJS {
|
|
|
273
273
|
options.plugins.push(nodeResolve(), string({
|
|
274
274
|
include: '**/*.*',
|
|
275
275
|
exclude: stringExcludeNode,
|
|
276
|
-
}), this.createServer());
|
|
276
|
+
}), this.createServer(input));
|
|
277
277
|
}
|
|
278
278
|
else {
|
|
279
279
|
const key = path.basename(this.sslKey) !== this.sslKey
|
|
@@ -638,14 +638,18 @@ class InnetJS {
|
|
|
638
638
|
}),
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
|
-
createServer() {
|
|
642
|
-
|
|
641
|
+
createServer(input) {
|
|
642
|
+
const apps = {};
|
|
643
643
|
return {
|
|
644
644
|
name: 'server',
|
|
645
645
|
writeBundle: () => __awaiter(this, void 0, void 0, function* () {
|
|
646
|
-
|
|
647
|
-
const
|
|
648
|
-
|
|
646
|
+
var _a;
|
|
647
|
+
for (const file of input) {
|
|
648
|
+
const { name } = path.parse(file);
|
|
649
|
+
(_a = apps[name]) === null || _a === void 0 ? void 0 : _a.kill();
|
|
650
|
+
const filePath = path.resolve(this.devBuildFolder, `${name}.js`);
|
|
651
|
+
apps[name] = spawn('node', ['-r', 'source-map-support/register', filePath], { stdio: 'inherit' });
|
|
652
|
+
}
|
|
649
653
|
}),
|
|
650
654
|
};
|
|
651
655
|
}
|