innetjs 2.0.12 → 2.1.1

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.
Files changed (4) hide show
  1. package/bin/innet +12 -4
  2. package/index.es6.js +11 -3
  3. package/index.js +11 -3
  4. package/package.json +17 -17
package/bin/innet CHANGED
@@ -196,9 +196,15 @@ const readline = require('readline');
196
196
  const execAsync = util.promisify(exec);
197
197
  const copyFiles = util.promisify(fs__default["default"].copy);
198
198
  require('dotenv').config();
199
+ const REG_CLEAR_TEXT = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
200
+ function normalizeEnv(value) {
201
+ if (value) {
202
+ return value.replace(/\${([a-zA-Z0-9]+)}/g, (placeholder, placeholderId) => { var _a; return (_a = process.env[placeholderId]) !== null && _a !== void 0 ? _a : placeholder; });
203
+ }
204
+ }
199
205
  const innetEnv = Object.keys(process.env).reduce((result, key) => {
200
206
  if (key.startsWith('INNETJS_')) {
201
- result[key] = process.env[key];
207
+ result[key] = normalizeEnv(process.env[key]);
202
208
  }
203
209
  return result;
204
210
  }, {});
@@ -378,7 +384,7 @@ class InnetJS {
378
384
  compilerOptions: {
379
385
  sourceMap: true
380
386
  }
381
- }
387
+ },
382
388
  }),
383
389
  jsx__default["default"](),
384
390
  ],
@@ -442,7 +448,9 @@ class InnetJS {
442
448
  console.log(`ERROR in ${file}:${line + 1}:${column + 1}`);
443
449
  }
444
450
  else if (e.error.code === 'PLUGIN_ERROR' && ['rpt2', 'commonjs'].includes(e.error.plugin)) {
445
- const [, file, line, column] = e.error.message.match(/^[^(]+(src[^(]+)\((\d+),(\d+)\)/) || [];
451
+ const [, file, line, column] = e.error.message
452
+ .replace(REG_CLEAR_TEXT, '')
453
+ .match(/^(src[^:]+):(\d+):(\d+)/) || [];
446
454
  logger__default["default"].end('Bundling', e.error.message);
447
455
  if (file) {
448
456
  console.log(`ERROR in ${file}:${line}:${column}`);
@@ -614,7 +622,7 @@ class InnetJS {
614
622
  }
615
623
  }
616
624
 
617
- var version = "2.0.12";
625
+ var version = "2.1.1";
618
626
 
619
627
  require('dotenv').config();
620
628
  const innetJS = new InnetJS();
package/index.es6.js CHANGED
@@ -165,9 +165,15 @@ const readline = require('readline');
165
165
  const execAsync = promisify(exec);
166
166
  const copyFiles = promisify(fs.copy);
167
167
  require('dotenv').config();
168
+ const REG_CLEAR_TEXT = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
169
+ function normalizeEnv(value) {
170
+ if (value) {
171
+ return value.replace(/\${([a-zA-Z0-9]+)}/g, (placeholder, placeholderId) => { var _a; return (_a = process.env[placeholderId]) !== null && _a !== void 0 ? _a : placeholder; });
172
+ }
173
+ }
168
174
  const innetEnv = Object.keys(process.env).reduce((result, key) => {
169
175
  if (key.startsWith('INNETJS_')) {
170
- result[key] = process.env[key];
176
+ result[key] = normalizeEnv(process.env[key]);
171
177
  }
172
178
  return result;
173
179
  }, {});
@@ -347,7 +353,7 @@ class InnetJS {
347
353
  compilerOptions: {
348
354
  sourceMap: true
349
355
  }
350
- }
356
+ },
351
357
  }),
352
358
  jsx(),
353
359
  ],
@@ -411,7 +417,9 @@ class InnetJS {
411
417
  console.log(`ERROR in ${file}:${line + 1}:${column + 1}`);
412
418
  }
413
419
  else if (e.error.code === 'PLUGIN_ERROR' && ['rpt2', 'commonjs'].includes(e.error.plugin)) {
414
- const [, file, line, column] = e.error.message.match(/^[^(]+(src[^(]+)\((\d+),(\d+)\)/) || [];
420
+ const [, file, line, column] = e.error.message
421
+ .replace(REG_CLEAR_TEXT, '')
422
+ .match(/^(src[^:]+):(\d+):(\d+)/) || [];
415
423
  logger.end('Bundling', e.error.message);
416
424
  if (file) {
417
425
  console.log(`ERROR in ${file}:${line}:${column}`);
package/index.js CHANGED
@@ -194,9 +194,15 @@ const readline = require('readline');
194
194
  const execAsync = util.promisify(exec);
195
195
  const copyFiles = util.promisify(fs__default["default"].copy);
196
196
  require('dotenv').config();
197
+ const REG_CLEAR_TEXT = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
198
+ function normalizeEnv(value) {
199
+ if (value) {
200
+ return value.replace(/\${([a-zA-Z0-9]+)}/g, (placeholder, placeholderId) => { var _a; return (_a = process.env[placeholderId]) !== null && _a !== void 0 ? _a : placeholder; });
201
+ }
202
+ }
197
203
  const innetEnv = Object.keys(process.env).reduce((result, key) => {
198
204
  if (key.startsWith('INNETJS_')) {
199
- result[key] = process.env[key];
205
+ result[key] = normalizeEnv(process.env[key]);
200
206
  }
201
207
  return result;
202
208
  }, {});
@@ -376,7 +382,7 @@ class InnetJS {
376
382
  compilerOptions: {
377
383
  sourceMap: true
378
384
  }
379
- }
385
+ },
380
386
  }),
381
387
  jsx__default["default"](),
382
388
  ],
@@ -440,7 +446,9 @@ class InnetJS {
440
446
  console.log(`ERROR in ${file}:${line + 1}:${column + 1}`);
441
447
  }
442
448
  else if (e.error.code === 'PLUGIN_ERROR' && ['rpt2', 'commonjs'].includes(e.error.plugin)) {
443
- const [, file, line, column] = e.error.message.match(/^[^(]+(src[^(]+)\((\d+),(\d+)\)/) || [];
449
+ const [, file, line, column] = e.error.message
450
+ .replace(REG_CLEAR_TEXT, '')
451
+ .match(/^(src[^:]+):(\d+):(\d+)/) || [];
444
452
  logger__default["default"].end('Bundling', e.error.message);
445
453
  if (file) {
446
454
  console.log(`ERROR in ${file}:${line}:${column}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innetjs",
3
- "version": "2.0.12",
3
+ "version": "2.1.1",
4
4
  "description": "CLI for innet boilerplate",
5
5
  "homepage": "https://github.com/d8corp/innetjs",
6
6
  "author": "Mikhail Lysikov <d8corp@mail.ru>",
@@ -32,26 +32,26 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@cantinc/logger": "^1.1.0",
35
- "@rollup/plugin-commonjs": "^22.0.2",
36
- "@rollup/plugin-eslint": "^8.0.2",
37
- "@rollup/plugin-image": "^2.1.1",
38
- "@rollup/plugin-json": "^4.1.0",
39
- "@rollup/plugin-node-resolve": "^13.3.0",
40
- "address": "^1.2.0",
41
- "autoprefixer": "^10.4.8",
42
- "axios": "^0.27.2",
35
+ "@rollup/plugin-commonjs": "^23.0.2",
36
+ "@rollup/plugin-eslint": "^9.0.1",
37
+ "@rollup/plugin-image": "^3.0.1",
38
+ "@rollup/plugin-json": "^5.0.1",
39
+ "@rollup/plugin-node-resolve": "^15.0.1",
40
+ "address": "^1.2.1",
41
+ "autoprefixer": "^10.4.13",
42
+ "axios": "^1.1.3",
43
43
  "chalk": "^4.1.2",
44
44
  "cli-select": "^1.1.2",
45
- "commander": "^9.4.0",
46
- "dotenv": "^16.0.1",
47
- "express": "^4.18.1",
45
+ "commander": "^9.4.1",
46
+ "dotenv": "^16.0.3",
47
+ "express": "^4.18.2",
48
48
  "express-http-proxy": "^1.6.3",
49
49
  "fs-extra": "^10.1.0",
50
50
  "lines-and-columns": "^2.0.3",
51
- "node-sass": "^7.0.1",
52
- "postcss": "^8.4.16",
51
+ "postcss": "^8.4.18",
52
+ "sass": "^1.55.0",
53
53
  "prompts": "^2.4.2",
54
- "rollup": "^2.77.2",
54
+ "rollup": "^2.79.1",
55
55
  "rollup-plugin-filesize": "^9.1.2",
56
56
  "rollup-plugin-inject-process-env": "^1.3.1",
57
57
  "rollup-plugin-innet-jsx": "^1.3.0",
@@ -59,9 +59,9 @@
59
59
  "rollup-plugin-string": "^3.0.0",
60
60
  "rollup-plugin-styles": "^4.0.0",
61
61
  "rollup-plugin-terser": "^7.0.2",
62
- "rollup-plugin-typescript2": "^0.32.1",
62
+ "rollup-plugin-typescript2": "^0.33.0",
63
63
  "tmp": "^0.2.1",
64
- "typescript": "^4.7.4",
64
+ "typescript": "^4.8.4",
65
65
  "unzipper": "^0.10.11"
66
66
  }
67
67
  }