innetjs 2.3.2 → 2.3.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/bin/innet +9 -8
- package/index.d.ts +1 -1
- package/index.js +9 -8
- package/index.mjs +9 -8
- package/package.json +1 -1
package/bin/innet
CHANGED
|
@@ -196,6 +196,7 @@ const REG_TJSX = /\.[tj]sx?$/;
|
|
|
196
196
|
const REG_EXT = /\.([^.]+)$/;
|
|
197
197
|
const scriptExtensions = ['ts', 'js', 'tsx', 'jsx'];
|
|
198
198
|
const indexExt = scriptExtensions.join(',');
|
|
199
|
+
console.log('!!!!!!!!!');
|
|
199
200
|
class InnetJS {
|
|
200
201
|
constructor({ envPrefix = process.env.INNETJS_ENV_PREFIX || 'INNETJS_', projectFolder = process.env.PROJECT_FOLDER || '', baseUrl = process.env.BASE_URL || '/', publicFolder = process.env.PUBLIC_FOLDER || 'public', releaseFolder = process.env.RELEASE_FOLDER || 'release', buildFolder = process.env.BUILD_FOLDER || 'build', srcFolder = process.env.SRC_FOLDER || 'src', sourcemap = process.env.SOURCEMAP ? process.env.SOURCEMAP === 'true' : false, cssModules = process.env.CSS_MODULES ? process.env.CSS_MODULES === 'true' : true, cssInJs = process.env.CSS_IN_JS ? process.env.CSS_IN_JS === 'true' : true, sslKey = process.env.SSL_KEY || 'localhost.key', sslCrt = process.env.SSL_CRT || 'localhost.crt', proxy = process.env.PROXY || '', port = process.env.PORT ? +process.env.PORT : 3000, api = process.env.API || '/api/?*', } = {}) {
|
|
201
202
|
this.projectFolder = path__default["default"].resolve(projectFolder);
|
|
@@ -296,7 +297,7 @@ class InnetJS {
|
|
|
296
297
|
jsx__default["default"](),
|
|
297
298
|
],
|
|
298
299
|
};
|
|
299
|
-
this.withLint(options);
|
|
300
|
+
this.withLint(options, true);
|
|
300
301
|
const outputOptions = {
|
|
301
302
|
dir: this.buildFolder,
|
|
302
303
|
sourcemap: this.sourcemap,
|
|
@@ -316,7 +317,7 @@ class InnetJS {
|
|
|
316
317
|
mode: this.cssInJs ? 'inject' : 'extract',
|
|
317
318
|
url: true,
|
|
318
319
|
plugins: [autoprefixer__default["default"]()],
|
|
319
|
-
|
|
320
|
+
autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
|
|
320
321
|
sourceMap: this.sourcemap,
|
|
321
322
|
minimize: true,
|
|
322
323
|
}), string({
|
|
@@ -417,7 +418,7 @@ class InnetJS {
|
|
|
417
418
|
mode: this.cssInJs ? 'inject' : 'extract',
|
|
418
419
|
url: true,
|
|
419
420
|
plugins: [autoprefixer__default["default"]()],
|
|
420
|
-
|
|
421
|
+
autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
|
|
421
422
|
sourceMap: true,
|
|
422
423
|
}), string({
|
|
423
424
|
include: '**/*.*',
|
|
@@ -558,16 +559,15 @@ class InnetJS {
|
|
|
558
559
|
styles__default["default"]({
|
|
559
560
|
mode: this.cssInJs ? 'inject' : 'extract',
|
|
560
561
|
plugins: [autoprefixer__default["default"]()],
|
|
561
|
-
|
|
562
|
+
autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
|
|
562
563
|
minimize: true,
|
|
563
|
-
autoModules: true,
|
|
564
564
|
}),
|
|
565
565
|
pluginNodeResolve.nodeResolve(),
|
|
566
566
|
external__default["default"](),
|
|
567
567
|
],
|
|
568
568
|
};
|
|
569
569
|
this.withLint(options);
|
|
570
|
-
this.withEnv(options);
|
|
570
|
+
this.withEnv(options, true);
|
|
571
571
|
const bundle = yield rollup__default["default"].rollup(options);
|
|
572
572
|
yield bundle.write(options.output);
|
|
573
573
|
yield bundle.close();
|
|
@@ -644,13 +644,14 @@ class InnetJS {
|
|
|
644
644
|
}
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
withLint(options) {
|
|
647
|
+
withLint(options, prod = false) {
|
|
648
648
|
if (this._lintUsage === undefined) {
|
|
649
649
|
this._lintUsage = fs__default["default"].existsSync(path__default["default"].join(this.projectFolder, '.eslintrc'));
|
|
650
650
|
}
|
|
651
651
|
if (this._lintUsage) {
|
|
652
652
|
options.plugins.push(eslint__default["default"]({
|
|
653
653
|
include: lintInclude,
|
|
654
|
+
throwOnError: prod,
|
|
654
655
|
}));
|
|
655
656
|
}
|
|
656
657
|
}
|
|
@@ -769,7 +770,7 @@ class InnetJS {
|
|
|
769
770
|
}
|
|
770
771
|
|
|
771
772
|
(function () {
|
|
772
|
-
const env = {"__INNETJS__PACKAGE_VERSION":"2.3.
|
|
773
|
+
const env = {"__INNETJS__PACKAGE_VERSION":"2.3.4"};
|
|
773
774
|
if (typeof process === 'undefined') {
|
|
774
775
|
globalThis.process = { env: env };
|
|
775
776
|
} else if (process.env) {
|
package/index.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare class InnetJS {
|
|
|
63
63
|
run(file: any): Promise<void>;
|
|
64
64
|
release({ index, pub }?: ReleaseOptions): Promise<void>;
|
|
65
65
|
private _lintUsage;
|
|
66
|
-
withLint(options: rollup.RollupOptions): void;
|
|
66
|
+
withLint(options: rollup.RollupOptions, prod?: boolean): void;
|
|
67
67
|
withEnv(options: rollup.RollupOptions, virtual?: boolean): void;
|
|
68
68
|
increaseVersion(release: string): Promise<void>;
|
|
69
69
|
getPackage(): Promise<Record<string, any>>;
|
package/index.js
CHANGED
|
@@ -73,7 +73,7 @@ var typescript__default = /*#__PURE__*/_interopDefaultLegacy(typescript);
|
|
|
73
73
|
var tmp__default = /*#__PURE__*/_interopDefaultLegacy(tmp);
|
|
74
74
|
|
|
75
75
|
;(function () {
|
|
76
|
-
const env = {"__INNETJS__PACKAGE_VERSION":"2.3.
|
|
76
|
+
const env = {"__INNETJS__PACKAGE_VERSION":"2.3.4"};
|
|
77
77
|
if (typeof process === 'undefined') {
|
|
78
78
|
globalThis.process = { env: env };
|
|
79
79
|
} else if (process.env) {
|
|
@@ -95,6 +95,7 @@ const REG_TJSX = /\.[tj]sx?$/;
|
|
|
95
95
|
const REG_EXT = /\.([^.]+)$/;
|
|
96
96
|
const scriptExtensions = ['ts', 'js', 'tsx', 'jsx'];
|
|
97
97
|
const indexExt = scriptExtensions.join(',');
|
|
98
|
+
console.log('!!!!!!!!!');
|
|
98
99
|
class InnetJS {
|
|
99
100
|
constructor({ envPrefix = process.env.INNETJS_ENV_PREFIX || 'INNETJS_', projectFolder = process.env.PROJECT_FOLDER || '', baseUrl = process.env.BASE_URL || '/', publicFolder = process.env.PUBLIC_FOLDER || 'public', releaseFolder = process.env.RELEASE_FOLDER || 'release', buildFolder = process.env.BUILD_FOLDER || 'build', srcFolder = process.env.SRC_FOLDER || 'src', sourcemap = process.env.SOURCEMAP ? process.env.SOURCEMAP === 'true' : false, cssModules = process.env.CSS_MODULES ? process.env.CSS_MODULES === 'true' : true, cssInJs = process.env.CSS_IN_JS ? process.env.CSS_IN_JS === 'true' : true, sslKey = process.env.SSL_KEY || 'localhost.key', sslCrt = process.env.SSL_CRT || 'localhost.crt', proxy = process.env.PROXY || '', port = process.env.PORT ? +process.env.PORT : 3000, api = process.env.API || '/api/?*', } = {}) {
|
|
100
101
|
this.projectFolder = path__default["default"].resolve(projectFolder);
|
|
@@ -195,7 +196,7 @@ class InnetJS {
|
|
|
195
196
|
jsx__default["default"](),
|
|
196
197
|
],
|
|
197
198
|
};
|
|
198
|
-
this.withLint(options);
|
|
199
|
+
this.withLint(options, true);
|
|
199
200
|
const outputOptions = {
|
|
200
201
|
dir: this.buildFolder,
|
|
201
202
|
sourcemap: this.sourcemap,
|
|
@@ -215,7 +216,7 @@ class InnetJS {
|
|
|
215
216
|
mode: this.cssInJs ? 'inject' : 'extract',
|
|
216
217
|
url: true,
|
|
217
218
|
plugins: [autoprefixer__default["default"]()],
|
|
218
|
-
|
|
219
|
+
autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
|
|
219
220
|
sourceMap: this.sourcemap,
|
|
220
221
|
minimize: true,
|
|
221
222
|
}), string({
|
|
@@ -316,7 +317,7 @@ class InnetJS {
|
|
|
316
317
|
mode: this.cssInJs ? 'inject' : 'extract',
|
|
317
318
|
url: true,
|
|
318
319
|
plugins: [autoprefixer__default["default"]()],
|
|
319
|
-
|
|
320
|
+
autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
|
|
320
321
|
sourceMap: true,
|
|
321
322
|
}), string({
|
|
322
323
|
include: '**/*.*',
|
|
@@ -457,16 +458,15 @@ class InnetJS {
|
|
|
457
458
|
styles__default["default"]({
|
|
458
459
|
mode: this.cssInJs ? 'inject' : 'extract',
|
|
459
460
|
plugins: [autoprefixer__default["default"]()],
|
|
460
|
-
|
|
461
|
+
autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
|
|
461
462
|
minimize: true,
|
|
462
|
-
autoModules: true,
|
|
463
463
|
}),
|
|
464
464
|
pluginNodeResolve.nodeResolve(),
|
|
465
465
|
external__default["default"](),
|
|
466
466
|
],
|
|
467
467
|
};
|
|
468
468
|
this.withLint(options);
|
|
469
|
-
this.withEnv(options);
|
|
469
|
+
this.withEnv(options, true);
|
|
470
470
|
const bundle = yield rollup__default["default"].rollup(options);
|
|
471
471
|
yield bundle.write(options.output);
|
|
472
472
|
yield bundle.close();
|
|
@@ -543,13 +543,14 @@ class InnetJS {
|
|
|
543
543
|
}
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
|
-
withLint(options) {
|
|
546
|
+
withLint(options, prod = false) {
|
|
547
547
|
if (this._lintUsage === undefined) {
|
|
548
548
|
this._lintUsage = fs__default["default"].existsSync(path__default["default"].join(this.projectFolder, '.eslintrc'));
|
|
549
549
|
}
|
|
550
550
|
if (this._lintUsage) {
|
|
551
551
|
options.plugins.push(eslint__default["default"]({
|
|
552
552
|
include: constants.lintInclude,
|
|
553
|
+
throwOnError: prod,
|
|
553
554
|
}));
|
|
554
555
|
}
|
|
555
556
|
}
|
package/index.mjs
CHANGED
|
@@ -38,7 +38,7 @@ import { reporter, convertIndexFile, getFile } from './helpers.mjs';
|
|
|
38
38
|
import { updateDotenv } from './updateDotenv.mjs';
|
|
39
39
|
|
|
40
40
|
;(function () {
|
|
41
|
-
const env = {"__INNETJS__PACKAGE_VERSION":"2.3.
|
|
41
|
+
const env = {"__INNETJS__PACKAGE_VERSION":"2.3.4"};
|
|
42
42
|
if (typeof process === 'undefined') {
|
|
43
43
|
globalThis.process = { env: env };
|
|
44
44
|
} else if (process.env) {
|
|
@@ -60,6 +60,7 @@ const REG_TJSX = /\.[tj]sx?$/;
|
|
|
60
60
|
const REG_EXT = /\.([^.]+)$/;
|
|
61
61
|
const scriptExtensions = ['ts', 'js', 'tsx', 'jsx'];
|
|
62
62
|
const indexExt = scriptExtensions.join(',');
|
|
63
|
+
console.log('!!!!!!!!!');
|
|
63
64
|
class InnetJS {
|
|
64
65
|
constructor({ envPrefix = process.env.INNETJS_ENV_PREFIX || 'INNETJS_', projectFolder = process.env.PROJECT_FOLDER || '', baseUrl = process.env.BASE_URL || '/', publicFolder = process.env.PUBLIC_FOLDER || 'public', releaseFolder = process.env.RELEASE_FOLDER || 'release', buildFolder = process.env.BUILD_FOLDER || 'build', srcFolder = process.env.SRC_FOLDER || 'src', sourcemap = process.env.SOURCEMAP ? process.env.SOURCEMAP === 'true' : false, cssModules = process.env.CSS_MODULES ? process.env.CSS_MODULES === 'true' : true, cssInJs = process.env.CSS_IN_JS ? process.env.CSS_IN_JS === 'true' : true, sslKey = process.env.SSL_KEY || 'localhost.key', sslCrt = process.env.SSL_CRT || 'localhost.crt', proxy = process.env.PROXY || '', port = process.env.PORT ? +process.env.PORT : 3000, api = process.env.API || '/api/?*', } = {}) {
|
|
65
66
|
this.projectFolder = path.resolve(projectFolder);
|
|
@@ -160,7 +161,7 @@ class InnetJS {
|
|
|
160
161
|
jsx(),
|
|
161
162
|
],
|
|
162
163
|
};
|
|
163
|
-
this.withLint(options);
|
|
164
|
+
this.withLint(options, true);
|
|
164
165
|
const outputOptions = {
|
|
165
166
|
dir: this.buildFolder,
|
|
166
167
|
sourcemap: this.sourcemap,
|
|
@@ -180,7 +181,7 @@ class InnetJS {
|
|
|
180
181
|
mode: this.cssInJs ? 'inject' : 'extract',
|
|
181
182
|
url: true,
|
|
182
183
|
plugins: [autoprefixer()],
|
|
183
|
-
|
|
184
|
+
autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
|
|
184
185
|
sourceMap: this.sourcemap,
|
|
185
186
|
minimize: true,
|
|
186
187
|
}), string({
|
|
@@ -281,7 +282,7 @@ class InnetJS {
|
|
|
281
282
|
mode: this.cssInJs ? 'inject' : 'extract',
|
|
282
283
|
url: true,
|
|
283
284
|
plugins: [autoprefixer()],
|
|
284
|
-
|
|
285
|
+
autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
|
|
285
286
|
sourceMap: true,
|
|
286
287
|
}), string({
|
|
287
288
|
include: '**/*.*',
|
|
@@ -422,16 +423,15 @@ class InnetJS {
|
|
|
422
423
|
styles({
|
|
423
424
|
mode: this.cssInJs ? 'inject' : 'extract',
|
|
424
425
|
plugins: [autoprefixer()],
|
|
425
|
-
|
|
426
|
+
autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
|
|
426
427
|
minimize: true,
|
|
427
|
-
autoModules: true,
|
|
428
428
|
}),
|
|
429
429
|
nodeResolve(),
|
|
430
430
|
external(),
|
|
431
431
|
],
|
|
432
432
|
};
|
|
433
433
|
this.withLint(options);
|
|
434
|
-
this.withEnv(options);
|
|
434
|
+
this.withEnv(options, true);
|
|
435
435
|
const bundle = yield rollup.rollup(options);
|
|
436
436
|
yield bundle.write(options.output);
|
|
437
437
|
yield bundle.close();
|
|
@@ -508,13 +508,14 @@ class InnetJS {
|
|
|
508
508
|
}
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
|
-
withLint(options) {
|
|
511
|
+
withLint(options, prod = false) {
|
|
512
512
|
if (this._lintUsage === undefined) {
|
|
513
513
|
this._lintUsage = fs.existsSync(path.join(this.projectFolder, '.eslintrc'));
|
|
514
514
|
}
|
|
515
515
|
if (this._lintUsage) {
|
|
516
516
|
options.plugins.push(eslint({
|
|
517
517
|
include: lintInclude,
|
|
518
|
+
throwOnError: prod,
|
|
518
519
|
}));
|
|
519
520
|
}
|
|
520
521
|
}
|