innetjs 3.0.3 → 3.0.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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  ;(function () {
4
- const env = {"__INNETJS__PACKAGE_VERSION":"3.0.3"};
4
+ const env = {"__INNETJS__PACKAGE_VERSION":"3.0.4"};
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":"3.0.3"};
2
+ const env = {"__INNETJS__PACKAGE_VERSION":"3.0.4"};
3
3
  if (typeof process === 'undefined') {
4
4
  globalThis.process = { env: env };
5
5
  } else if (process.env) {
package/bin/innet CHANGED
@@ -483,7 +483,7 @@ class InnetJS {
483
483
  }));
484
484
  });
485
485
  }
486
- run(file) {
486
+ run(file, { config = '' } = {}) {
487
487
  return tslib.__awaiter(this, void 0, void 0, function* () {
488
488
  const input = yield logger__default["default"].start('Check file', () => getFile(file));
489
489
  const folder = yield new Promise((resolve, reject) => {
@@ -505,6 +505,7 @@ class InnetJS {
505
505
  pluginNodeResolve.nodeResolve(),
506
506
  json__default["default"](),
507
507
  ts__default["default"]({
508
+ tsconfig: config || false,
508
509
  compilerOptions: {
509
510
  sourceMap: true,
510
511
  declaration: false,
@@ -814,7 +815,7 @@ class InnetJS {
814
815
  }
815
816
 
816
817
  (function () {
817
- const env = {"__INNETJS__PACKAGE_VERSION":"3.0.3"};
818
+ const env = {"__INNETJS__PACKAGE_VERSION":"3.0.4"};
818
819
  if (typeof process === 'undefined') {
819
820
  globalThis.process = { env: env };
820
821
  } else if (process.env) {
@@ -844,9 +845,10 @@ commander.program
844
845
  commander.program
845
846
  .command('run <file-path>')
846
847
  .description('Run js, ts or tsx file')
848
+ .option('-c, --config <file-path>', 'Config file for TypeScript')
847
849
  .addOption(errorOption)
848
- .action((filePath, { error }) => {
849
- innetJS.run(filePath).catch(e => {
850
+ .action((filePath, { error, config }) => {
851
+ innetJS.run(filePath, { config }).catch(e => {
850
852
  if (error) {
851
853
  console.error(e);
852
854
  process.exit(1);
package/index.d.ts CHANGED
@@ -68,7 +68,9 @@ export declare class InnetJS {
68
68
  error?: boolean;
69
69
  index?: string;
70
70
  }): Promise<void>;
71
- run(file: any): Promise<void>;
71
+ run(file: any, { config }?: {
72
+ config?: string;
73
+ }): Promise<void>;
72
74
  release({ index, pub, min }?: ReleaseOptions): Promise<void>;
73
75
  private _lintUsage;
74
76
  withLint(options: rollup.RollupOptions, prod?: boolean): void;
package/index.js CHANGED
@@ -411,7 +411,7 @@ class InnetJS {
411
411
  }));
412
412
  });
413
413
  }
414
- run(file) {
414
+ run(file, { config = '' } = {}) {
415
415
  return tslib.__awaiter(this, void 0, void 0, function* () {
416
416
  const input = yield logger__default["default"].start('Check file', () => helpers.getFile(file));
417
417
  const folder = yield new Promise((resolve, reject) => {
@@ -433,6 +433,7 @@ class InnetJS {
433
433
  pluginNodeResolve.nodeResolve(),
434
434
  json__default["default"](),
435
435
  ts__default["default"]({
436
+ tsconfig: config || false,
436
437
  compilerOptions: {
437
438
  sourceMap: true,
438
439
  declaration: false,
package/index.mjs CHANGED
@@ -374,7 +374,7 @@ class InnetJS {
374
374
  }));
375
375
  });
376
376
  }
377
- run(file) {
377
+ run(file, { config = '' } = {}) {
378
378
  return __awaiter(this, void 0, void 0, function* () {
379
379
  const input = yield logger.start('Check file', () => getFile(file));
380
380
  const folder = yield new Promise((resolve, reject) => {
@@ -396,6 +396,7 @@ class InnetJS {
396
396
  nodeResolve(),
397
397
  json(),
398
398
  ts({
399
+ tsconfig: config || false,
399
400
  compilerOptions: {
400
401
  sourceMap: true,
401
402
  declaration: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innetjs",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "CLI for innet boilerplate",
5
5
  "homepage": "https://github.com/d8corp/innetjs",
6
6
  "author": "Mikhail Lysikov <d8corp@mail.ru>",