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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  ;(function () {
4
- const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.5"};
4
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.6"};
5
5
  if (typeof process === 'undefined') {
6
6
  globalThis.process = { env: env };
7
7
  } else if (process.env) {
@@ -1,5 +1,5 @@
1
1
  ;(function () {
2
- const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.5"};
2
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.6"};
3
3
  if (typeof process === 'undefined') {
4
4
  globalThis.process = { env: env };
5
5
  } else if (process.env) {
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
- let app;
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
- app === null || app === void 0 ? void 0 : app.kill();
796
- const filePath = path__default["default"].resolve(this.devBuildFolder, 'index.js');
797
- app = spawn('node', ['-r', 'source-map-support/register', filePath], { stdio: 'inherit' });
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.5"};
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
- let app;
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
- app === null || app === void 0 ? void 0 : app.kill();
682
- const filePath = path__default["default"].resolve(this.devBuildFolder, 'index.js');
683
- app = spawn('node', ['-r', 'source-map-support/register', filePath], { stdio: 'inherit' });
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
- let app;
641
+ createServer(input) {
642
+ const apps = {};
643
643
  return {
644
644
  name: 'server',
645
645
  writeBundle: () => __awaiter(this, void 0, void 0, function* () {
646
- app === null || app === void 0 ? void 0 : app.kill();
647
- const filePath = path.resolve(this.devBuildFolder, 'index.js');
648
- app = spawn('node', ['-r', 'source-map-support/register', filePath], { stdio: 'inherit' });
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innetjs",
3
- "version": "2.6.0-alpha.5",
3
+ "version": "2.6.0-alpha.6",
4
4
  "description": "CLI for innet boilerplate",
5
5
  "homepage": "https://github.com/d8corp/innetjs",
6
6
  "author": "Mikhail Lysikov <d8corp@mail.ru>",