innetjs 2.0.6 → 2.0.9

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 CHANGED
@@ -26,6 +26,7 @@ var jsx = require('rollup-plugin-innet-jsx');
26
26
  var filesize = require('rollup-plugin-filesize');
27
27
  var image = require('@rollup/plugin-image');
28
28
  var eslint = require('@rollup/plugin-eslint');
29
+ var injectEnv = require('rollup-plugin-inject-process-env');
29
30
  var linesAndColumns = require('lines-and-columns');
30
31
  var unzipper = require('unzipper');
31
32
  var commander = require('commander');
@@ -54,6 +55,7 @@ var jsx__default = /*#__PURE__*/_interopDefaultLegacy(jsx);
54
55
  var filesize__default = /*#__PURE__*/_interopDefaultLegacy(filesize);
55
56
  var image__default = /*#__PURE__*/_interopDefaultLegacy(image);
56
57
  var eslint__default = /*#__PURE__*/_interopDefaultLegacy(eslint);
58
+ var injectEnv__default = /*#__PURE__*/_interopDefaultLegacy(injectEnv);
57
59
 
58
60
  /******************************************************************************
59
61
  Copyright (c) Microsoft Corporation.
@@ -173,11 +175,11 @@ function getFile(file) {
173
175
  }
174
176
  return file;
175
177
  }
176
- function convertIndexFile(data, version) {
178
+ function convertIndexFile(data, version, baseUrl) {
177
179
  return __awaiter(this, void 0, void 0, function* () {
178
180
  return data
179
181
  .toString()
180
- .replace('</head>', `<script type="module" defer src="index.js${version ? `?v=${version}` : ''}"></script></head>`);
182
+ .replace('</head>', `<script type="module" defer src="${baseUrl}index.js${version ? `?v=${version}` : ''}"></script></head>`);
181
183
  });
182
184
  }
183
185
  const reporter = (options, outputOptions, info) => {
@@ -192,8 +194,14 @@ const readline = require('readline');
192
194
  const execAsync = util.promisify(exec);
193
195
  const copyFiles = util.promisify(fs__default["default"].copy);
194
196
  require('dotenv').config();
197
+ const innetEnv = Object.keys(process.env).reduce((result, key) => {
198
+ if (key.startsWith('INNETJS_')) {
199
+ result[key] = process.env[key];
200
+ }
201
+ return result;
202
+ }, {});
195
203
  class InnetJS {
196
- constructor({ projectFolder = process.env.PROJECT_FOLDER || '', publicFolder = process.env.PUBLIC_FOLDER || 'public', 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/?*', } = {}) {
204
+ constructor({ projectFolder = process.env.PROJECT_FOLDER || '', baseUrl = process.env.BASE_URL || '/', publicFolder = process.env.PUBLIC_FOLDER || 'public', 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/?*', } = {}) {
197
205
  this.projectFolder = path__default["default"].resolve(projectFolder);
198
206
  this.publicFolder = path__default["default"].resolve(publicFolder);
199
207
  this.buildFolder = path__default["default"].resolve(buildFolder);
@@ -210,6 +218,7 @@ class InnetJS {
210
218
  this.port = port;
211
219
  this.proxy = proxy;
212
220
  this.api = api;
221
+ this.baseUrl = baseUrl;
213
222
  }
214
223
  // Methods
215
224
  init(appName, { template, force = false } = {}) {
@@ -294,7 +303,9 @@ class InnetJS {
294
303
  include: lintIncludeDom,
295
304
  }),
296
305
  ...inputOptions.plugins,
297
- pluginNodeResolve.nodeResolve(),
306
+ pluginNodeResolve.nodeResolve({
307
+ browser: true,
308
+ }),
298
309
  image__default["default"](),
299
310
  styles__default["default"]({
300
311
  mode: this.cssInJs ? 'inject' : 'extract',
@@ -308,6 +319,7 @@ class InnetJS {
308
319
  include: '**/*.*',
309
320
  exclude: stringExcludeDom,
310
321
  }),
322
+ injectEnv__default["default"](innetEnv),
311
323
  ];
312
324
  outputOptions.format = 'es';
313
325
  outputOptions.plugins = [
@@ -325,7 +337,7 @@ class InnetJS {
325
337
  yield copyFiles(this.publicFolder, this.buildFolder);
326
338
  const data = yield fs.promises.readFile(this.publicIndexFile);
327
339
  const pkg = yield this.getPackage();
328
- yield fs.promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version));
340
+ yield fs.promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl));
329
341
  }
330
342
  }));
331
343
  if (pkg) {
@@ -354,7 +366,7 @@ class InnetJS {
354
366
  preserveEntrySignatures: 'strict',
355
367
  output: {
356
368
  dir: this.devBuildFolder,
357
- sourcemap: true
369
+ sourcemap: true,
358
370
  },
359
371
  plugins: [
360
372
  commonjs__default["default"](),
@@ -396,7 +408,9 @@ class InnetJS {
396
408
  include: lintIncludeDom,
397
409
  }),
398
410
  ...options.plugins,
399
- pluginNodeResolve.nodeResolve(),
411
+ pluginNodeResolve.nodeResolve({
412
+ browser: true,
413
+ }),
400
414
  image__default["default"](),
401
415
  styles__default["default"]({
402
416
  mode: this.cssInJs ? 'inject' : 'extract',
@@ -410,7 +424,8 @@ class InnetJS {
410
424
  exclude: stringExcludeDom,
411
425
  }),
412
426
  this.createClient(key, cert, pkg),
413
- livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {})))
427
+ livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))),
428
+ injectEnv__default["default"](innetEnv),
414
429
  ];
415
430
  }
416
431
  const watcher = rollup__default["default"].watch(options);
@@ -542,7 +557,7 @@ class InnetJS {
542
557
  app = express__default["default"]();
543
558
  const update = () => __awaiter(this, void 0, void 0, function* () {
544
559
  const data = yield fs.promises.readFile(this.publicIndexFile);
545
- yield fs.promises.writeFile(this.devBuildIndexFile, yield convertIndexFile(data, pkg.version));
560
+ yield fs.promises.writeFile(this.devBuildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl));
546
561
  });
547
562
  fs__default["default"].watch(this.publicIndexFile, update);
548
563
  yield update();
@@ -601,7 +616,7 @@ class InnetJS {
601
616
  }
602
617
  }
603
618
 
604
- var version = "2.0.6";
619
+ var version = "2.0.9";
605
620
 
606
621
  require('dotenv').config();
607
622
  const innetJS = new InnetJS();
package/helpers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
2
  import { FileSizeRender } from 'rollup-plugin-filesize';
3
3
  export declare function getFile(file: any): any;
4
- export declare function convertIndexFile(data: Buffer, version: string): Promise<string>;
4
+ export declare function convertIndexFile(data: Buffer, version: string, baseUrl: string): Promise<string>;
5
5
  export declare const reporter: FileSizeRender<string | Promise<string>>;
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  declare type Extensions = 'js' | 'ts' | 'tsx' | 'jsx';
2
2
  export default class InnetJS {
3
+ baseUrl: string;
3
4
  projectFolder: string;
4
5
  publicFolder: string;
5
6
  buildFolder: string;
@@ -18,8 +19,9 @@ export default class InnetJS {
18
19
  api: string;
19
20
  private projectExtension;
20
21
  private package;
21
- constructor({ projectFolder, publicFolder, buildFolder, srcFolder, sourcemap, cssModules, cssInJs, sslKey, sslCrt, proxy, port, api, }?: {
22
+ constructor({ projectFolder, baseUrl, publicFolder, buildFolder, srcFolder, sourcemap, cssModules, cssInJs, sslKey, sslCrt, proxy, port, api, }?: {
22
23
  projectFolder?: string;
24
+ baseUrl?: string;
23
25
  publicFolder?: string;
24
26
  buildFolder?: string;
25
27
  srcFolder?: string;
package/index.es6.js CHANGED
@@ -23,6 +23,7 @@ import jsx from 'rollup-plugin-innet-jsx';
23
23
  import filesize from 'rollup-plugin-filesize';
24
24
  import image from '@rollup/plugin-image';
25
25
  import eslint from '@rollup/plugin-eslint';
26
+ import injectEnv from 'rollup-plugin-inject-process-env';
26
27
  import { LinesAndColumns } from 'lines-and-columns';
27
28
  import { Parse } from 'unzipper';
28
29
 
@@ -144,11 +145,11 @@ function getFile(file) {
144
145
  }
145
146
  return file;
146
147
  }
147
- function convertIndexFile(data, version) {
148
+ function convertIndexFile(data, version, baseUrl) {
148
149
  return __awaiter(this, void 0, void 0, function* () {
149
150
  return data
150
151
  .toString()
151
- .replace('</head>', `<script type="module" defer src="index.js${version ? `?v=${version}` : ''}"></script></head>`);
152
+ .replace('</head>', `<script type="module" defer src="${baseUrl}index.js${version ? `?v=${version}` : ''}"></script></head>`);
152
153
  });
153
154
  }
154
155
  const reporter = (options, outputOptions, info) => {
@@ -163,8 +164,14 @@ const readline = require('readline');
163
164
  const execAsync = promisify(exec);
164
165
  const copyFiles = promisify(fs.copy);
165
166
  require('dotenv').config();
167
+ const innetEnv = Object.keys(process.env).reduce((result, key) => {
168
+ if (key.startsWith('INNETJS_')) {
169
+ result[key] = process.env[key];
170
+ }
171
+ return result;
172
+ }, {});
166
173
  class InnetJS {
167
- constructor({ projectFolder = process.env.PROJECT_FOLDER || '', publicFolder = process.env.PUBLIC_FOLDER || 'public', 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/?*', } = {}) {
174
+ constructor({ projectFolder = process.env.PROJECT_FOLDER || '', baseUrl = process.env.BASE_URL || '/', publicFolder = process.env.PUBLIC_FOLDER || 'public', 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/?*', } = {}) {
168
175
  this.projectFolder = path$1.resolve(projectFolder);
169
176
  this.publicFolder = path$1.resolve(publicFolder);
170
177
  this.buildFolder = path$1.resolve(buildFolder);
@@ -181,6 +188,7 @@ class InnetJS {
181
188
  this.port = port;
182
189
  this.proxy = proxy;
183
190
  this.api = api;
191
+ this.baseUrl = baseUrl;
184
192
  }
185
193
  // Methods
186
194
  init(appName, { template, force = false } = {}) {
@@ -265,7 +273,9 @@ class InnetJS {
265
273
  include: lintIncludeDom,
266
274
  }),
267
275
  ...inputOptions.plugins,
268
- nodeResolve(),
276
+ nodeResolve({
277
+ browser: true,
278
+ }),
269
279
  image(),
270
280
  styles({
271
281
  mode: this.cssInJs ? 'inject' : 'extract',
@@ -279,6 +289,7 @@ class InnetJS {
279
289
  include: '**/*.*',
280
290
  exclude: stringExcludeDom,
281
291
  }),
292
+ injectEnv(innetEnv),
282
293
  ];
283
294
  outputOptions.format = 'es';
284
295
  outputOptions.plugins = [
@@ -296,7 +307,7 @@ class InnetJS {
296
307
  yield copyFiles(this.publicFolder, this.buildFolder);
297
308
  const data = yield promises.readFile(this.publicIndexFile);
298
309
  const pkg = yield this.getPackage();
299
- yield promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version));
310
+ yield promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl));
300
311
  }
301
312
  }));
302
313
  if (pkg) {
@@ -325,7 +336,7 @@ class InnetJS {
325
336
  preserveEntrySignatures: 'strict',
326
337
  output: {
327
338
  dir: this.devBuildFolder,
328
- sourcemap: true
339
+ sourcemap: true,
329
340
  },
330
341
  plugins: [
331
342
  commonjs(),
@@ -367,7 +378,9 @@ class InnetJS {
367
378
  include: lintIncludeDom,
368
379
  }),
369
380
  ...options.plugins,
370
- nodeResolve(),
381
+ nodeResolve({
382
+ browser: true,
383
+ }),
371
384
  image(),
372
385
  styles({
373
386
  mode: this.cssInJs ? 'inject' : 'extract',
@@ -381,7 +394,8 @@ class InnetJS {
381
394
  exclude: stringExcludeDom,
382
395
  }),
383
396
  this.createClient(key, cert, pkg),
384
- livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {})))
397
+ livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))),
398
+ injectEnv(innetEnv),
385
399
  ];
386
400
  }
387
401
  const watcher = rollup.watch(options);
@@ -513,7 +527,7 @@ class InnetJS {
513
527
  app = express();
514
528
  const update = () => __awaiter(this, void 0, void 0, function* () {
515
529
  const data = yield promises.readFile(this.publicIndexFile);
516
- yield promises.writeFile(this.devBuildIndexFile, yield convertIndexFile(data, pkg.version));
530
+ yield promises.writeFile(this.devBuildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl));
517
531
  });
518
532
  fs.watch(this.publicIndexFile, update);
519
533
  yield update();
package/index.js CHANGED
@@ -25,6 +25,7 @@ var jsx = require('rollup-plugin-innet-jsx');
25
25
  var filesize = require('rollup-plugin-filesize');
26
26
  var image = require('@rollup/plugin-image');
27
27
  var eslint = require('@rollup/plugin-eslint');
28
+ var injectEnv = require('rollup-plugin-inject-process-env');
28
29
  var linesAndColumns = require('lines-and-columns');
29
30
  var unzipper = require('unzipper');
30
31
 
@@ -52,6 +53,7 @@ var jsx__default = /*#__PURE__*/_interopDefaultLegacy(jsx);
52
53
  var filesize__default = /*#__PURE__*/_interopDefaultLegacy(filesize);
53
54
  var image__default = /*#__PURE__*/_interopDefaultLegacy(image);
54
55
  var eslint__default = /*#__PURE__*/_interopDefaultLegacy(eslint);
56
+ var injectEnv__default = /*#__PURE__*/_interopDefaultLegacy(injectEnv);
55
57
 
56
58
  /******************************************************************************
57
59
  Copyright (c) Microsoft Corporation.
@@ -171,11 +173,11 @@ function getFile(file) {
171
173
  }
172
174
  return file;
173
175
  }
174
- function convertIndexFile(data, version) {
176
+ function convertIndexFile(data, version, baseUrl) {
175
177
  return __awaiter(this, void 0, void 0, function* () {
176
178
  return data
177
179
  .toString()
178
- .replace('</head>', `<script type="module" defer src="index.js${version ? `?v=${version}` : ''}"></script></head>`);
180
+ .replace('</head>', `<script type="module" defer src="${baseUrl}index.js${version ? `?v=${version}` : ''}"></script></head>`);
179
181
  });
180
182
  }
181
183
  const reporter = (options, outputOptions, info) => {
@@ -190,8 +192,14 @@ const readline = require('readline');
190
192
  const execAsync = util.promisify(exec);
191
193
  const copyFiles = util.promisify(fs__default["default"].copy);
192
194
  require('dotenv').config();
195
+ const innetEnv = Object.keys(process.env).reduce((result, key) => {
196
+ if (key.startsWith('INNETJS_')) {
197
+ result[key] = process.env[key];
198
+ }
199
+ return result;
200
+ }, {});
193
201
  class InnetJS {
194
- constructor({ projectFolder = process.env.PROJECT_FOLDER || '', publicFolder = process.env.PUBLIC_FOLDER || 'public', 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/?*', } = {}) {
202
+ constructor({ projectFolder = process.env.PROJECT_FOLDER || '', baseUrl = process.env.BASE_URL || '/', publicFolder = process.env.PUBLIC_FOLDER || 'public', 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/?*', } = {}) {
195
203
  this.projectFolder = path__default["default"].resolve(projectFolder);
196
204
  this.publicFolder = path__default["default"].resolve(publicFolder);
197
205
  this.buildFolder = path__default["default"].resolve(buildFolder);
@@ -208,6 +216,7 @@ class InnetJS {
208
216
  this.port = port;
209
217
  this.proxy = proxy;
210
218
  this.api = api;
219
+ this.baseUrl = baseUrl;
211
220
  }
212
221
  // Methods
213
222
  init(appName, { template, force = false } = {}) {
@@ -292,7 +301,9 @@ class InnetJS {
292
301
  include: lintIncludeDom,
293
302
  }),
294
303
  ...inputOptions.plugins,
295
- pluginNodeResolve.nodeResolve(),
304
+ pluginNodeResolve.nodeResolve({
305
+ browser: true,
306
+ }),
296
307
  image__default["default"](),
297
308
  styles__default["default"]({
298
309
  mode: this.cssInJs ? 'inject' : 'extract',
@@ -306,6 +317,7 @@ class InnetJS {
306
317
  include: '**/*.*',
307
318
  exclude: stringExcludeDom,
308
319
  }),
320
+ injectEnv__default["default"](innetEnv),
309
321
  ];
310
322
  outputOptions.format = 'es';
311
323
  outputOptions.plugins = [
@@ -323,7 +335,7 @@ class InnetJS {
323
335
  yield copyFiles(this.publicFolder, this.buildFolder);
324
336
  const data = yield fs.promises.readFile(this.publicIndexFile);
325
337
  const pkg = yield this.getPackage();
326
- yield fs.promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version));
338
+ yield fs.promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl));
327
339
  }
328
340
  }));
329
341
  if (pkg) {
@@ -352,7 +364,7 @@ class InnetJS {
352
364
  preserveEntrySignatures: 'strict',
353
365
  output: {
354
366
  dir: this.devBuildFolder,
355
- sourcemap: true
367
+ sourcemap: true,
356
368
  },
357
369
  plugins: [
358
370
  commonjs__default["default"](),
@@ -394,7 +406,9 @@ class InnetJS {
394
406
  include: lintIncludeDom,
395
407
  }),
396
408
  ...options.plugins,
397
- pluginNodeResolve.nodeResolve(),
409
+ pluginNodeResolve.nodeResolve({
410
+ browser: true,
411
+ }),
398
412
  image__default["default"](),
399
413
  styles__default["default"]({
400
414
  mode: this.cssInJs ? 'inject' : 'extract',
@@ -408,7 +422,8 @@ class InnetJS {
408
422
  exclude: stringExcludeDom,
409
423
  }),
410
424
  this.createClient(key, cert, pkg),
411
- livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {})))
425
+ livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))),
426
+ injectEnv__default["default"](innetEnv),
412
427
  ];
413
428
  }
414
429
  const watcher = rollup__default["default"].watch(options);
@@ -540,7 +555,7 @@ class InnetJS {
540
555
  app = express__default["default"]();
541
556
  const update = () => __awaiter(this, void 0, void 0, function* () {
542
557
  const data = yield fs.promises.readFile(this.publicIndexFile);
543
- yield fs.promises.writeFile(this.devBuildIndexFile, yield convertIndexFile(data, pkg.version));
558
+ yield fs.promises.writeFile(this.devBuildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl));
544
559
  });
545
560
  fs__default["default"].watch(this.publicIndexFile, update);
546
561
  yield update();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innetjs",
3
- "version": "2.0.6",
3
+ "version": "2.0.9",
4
4
  "description": "CLI for innet boilerplate",
5
5
  "homepage": "https://github.com/d8corp/innetjs",
6
6
  "author": "Mikhail Lysikov <d8corp@mail.ru>",
@@ -52,6 +52,7 @@
52
52
  "prompts": "^2.4.2",
53
53
  "rollup": "^2.77.2",
54
54
  "rollup-plugin-filesize": "^9.1.2",
55
+ "rollup-plugin-inject-process-env": "^1.3.1",
55
56
  "rollup-plugin-innet-jsx": "^1.3.0",
56
57
  "rollup-plugin-livereload": "^2.0.5",
57
58
  "rollup-plugin-string": "^3.0.0",