@xarc/app-dev 10.0.11 → 10.0.12

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 (133) hide show
  1. package/bin/xrun.js +0 -1
  2. package/config/archetype.js +5 -5
  3. package/config/archetype.js.map +1 -1
  4. package/config/babel/babelrc-client.js +28 -28
  5. package/config/babel/babelrc-client.js.map +1 -1
  6. package/config/babel/babelrc-server.js +1 -1
  7. package/config/babel/babelrc-server.js.map +1 -1
  8. package/config/babel/babelrc.js +32 -32
  9. package/config/babel/babelrc.js.map +1 -1
  10. package/config/babel/common.js +2 -2
  11. package/config/babel/common.js.map +1 -1
  12. package/config/constants.js +1 -1
  13. package/config/constants.js.map +1 -1
  14. package/config/dev-proxy.js +8 -8
  15. package/config/dev-proxy.js.map +1 -1
  16. package/config/env-app.js +2 -2
  17. package/config/env-app.js.map +1 -1
  18. package/config/env-babel.js +3 -3
  19. package/config/env-babel.js.map +1 -1
  20. package/config/env-karma.js +2 -2
  21. package/config/env-karma.js.map +1 -1
  22. package/config/env-proxy.js +3 -3
  23. package/config/env-proxy.js.map +1 -1
  24. package/config/env-webpack.js +3 -3
  25. package/config/env-webpack.js.map +1 -1
  26. package/config/eslint/js/base.js +0 -1
  27. package/config/eslint/js/es5-node.js +0 -1
  28. package/config/eslint/js/es6-node.js +0 -1
  29. package/config/eslint/js/es6-react.js +0 -1
  30. package/config/eslint/js/es6-test.js +0 -1
  31. package/config/eslint/js/opt-eslint-require.js +0 -1
  32. package/config/jest/__mocks__/framework-mock.js +2 -3
  33. package/config/jest/__mocks__/framework-mock.js.map +1 -1
  34. package/config/jest/jest.config.js +1 -1
  35. package/config/jest/jest.config.js.map +1 -1
  36. package/config/karma/browser-settings.js +1 -1
  37. package/config/karma/browser-settings.js.map +1 -1
  38. package/config/karma/entry-xarc.js +0 -1
  39. package/config/karma/entry.js +0 -1
  40. package/config/karma/karma.conf.coverage.js +5 -5
  41. package/config/karma/karma.conf.coverage.js.map +1 -1
  42. package/config/karma/karma.conf.dev.js +2 -2
  43. package/config/karma/karma.conf.dev.js.map +1 -1
  44. package/config/karma/karma.conf.js +2 -2
  45. package/config/karma/karma.conf.js.map +1 -1
  46. package/config/karma/karma.conf.watch.js +4 -4
  47. package/config/karma/karma.conf.watch.js.map +1 -1
  48. package/config/karma/util/load-user-config.js +6 -6
  49. package/config/karma/util/load-user-config.js.map +1 -1
  50. package/config/mocha/setup.js +3 -4
  51. package/config/mocha/setup.js.map +1 -1
  52. package/config/options.js +23 -25
  53. package/config/options.js.map +1 -1
  54. package/config/user-config.js +4 -4
  55. package/config/user-config.js.map +1 -1
  56. package/lib/app-dev-middleware.js +2 -2
  57. package/lib/app-dev-middleware.js.map +1 -1
  58. package/lib/babel-run.js +2 -2
  59. package/lib/babel-run.js.map +1 -1
  60. package/lib/dev-admin/admin-http.js +9 -9
  61. package/lib/dev-admin/admin-http.js.map +1 -1
  62. package/lib/dev-admin/admin-server.js +65 -65
  63. package/lib/dev-admin/admin-server.js.map +1 -1
  64. package/lib/dev-admin/cdn-mock.js +7 -7
  65. package/lib/dev-admin/cdn-mock.js.map +1 -1
  66. package/lib/dev-admin/cleanup.js +3 -3
  67. package/lib/dev-admin/cleanup.js.map +1 -1
  68. package/lib/dev-admin/console-io.js +2 -2
  69. package/lib/dev-admin/console-io.js.map +1 -1
  70. package/lib/dev-admin/dev-http.js +6 -6
  71. package/lib/dev-admin/dev-http.js.map +1 -1
  72. package/lib/dev-admin/dev-server-start.js +5 -5
  73. package/lib/dev-admin/dev-server-start.js.map +1 -1
  74. package/lib/dev-admin/dev-server.js +1 -1
  75. package/lib/dev-admin/dev-server.js.map +1 -1
  76. package/lib/dev-admin/index.js +2 -2
  77. package/lib/dev-admin/index.js.map +1 -1
  78. package/lib/dev-admin/json-formatter-js.js +0 -1
  79. package/lib/dev-admin/log-view.js +0 -1
  80. package/lib/dev-admin/middleware.js +24 -24
  81. package/lib/dev-admin/middleware.js.map +1 -1
  82. package/lib/dev-admin/redbird-proxy.js +50 -50
  83. package/lib/dev-admin/redbird-proxy.js.map +1 -1
  84. package/lib/dev-admin/redbird-spawn.js +10 -10
  85. package/lib/dev-admin/redbird-spawn.js.map +1 -1
  86. package/lib/dev-tasks.d.ts +1 -1
  87. package/lib/dev-tasks.js +134 -133
  88. package/lib/dev-tasks.js.map +1 -1
  89. package/lib/fake-res.js +4 -4
  90. package/lib/fake-res.js.map +1 -1
  91. package/lib/index.js +2 -2
  92. package/lib/index.js.map +1 -1
  93. package/lib/module-processor.js +2 -2
  94. package/lib/module-processor.js.map +1 -1
  95. package/lib/stats-mapper.js +2 -2
  96. package/lib/stats-mapper.js.map +1 -1
  97. package/lib/stats-utils.js +2 -2
  98. package/lib/stats-utils.js.map +1 -1
  99. package/lib/tasks/eslint.js +29 -29
  100. package/lib/tasks/eslint.js.map +1 -1
  101. package/lib/tasks/package-json.js +6 -6
  102. package/lib/tasks/package-json.js.map +1 -1
  103. package/lib/utils.d.ts +1 -1
  104. package/lib/utils.js +20 -19
  105. package/lib/utils.js.map +1 -1
  106. package/package.json +7 -7
  107. package/require.js +0 -1
  108. package/scripts/l10n/flatten-messages.js +0 -1
  109. package/scripts/map-isomorphic-cdn.js +0 -1
  110. package/scripts/merge-isomorphic-assets.js +0 -1
  111. package/scripts/webpack5-jsonp-cdn.js +0 -1
  112. package/src/config/babel/babelrc-client.ts +25 -25
  113. package/src/config/babel/babelrc.ts +26 -26
  114. package/src/config/eslint/js/base.js +0 -1
  115. package/src/config/eslint/js/es5-node.js +0 -1
  116. package/src/config/eslint/js/es6-node.js +0 -1
  117. package/src/config/eslint/js/es6-react.js +0 -1
  118. package/src/config/eslint/js/es6-test.js +0 -1
  119. package/src/config/eslint/js/opt-eslint-require.js +0 -1
  120. package/src/config/jest/__mocks__/framework-mock.ts +3 -3
  121. package/src/config/karma/entry-xarc.js +0 -1
  122. package/src/config/karma/entry.js +0 -1
  123. package/src/config/karma/util/load-user-config.ts +2 -2
  124. package/src/config/mocha/setup.ts +2 -2
  125. package/src/config/options.ts +12 -14
  126. package/src/config/user-config.ts +1 -1
  127. package/src/lib/dev-admin/admin-server.ts +32 -32
  128. package/src/lib/dev-admin/json-formatter-js.js +0 -1
  129. package/src/lib/dev-admin/log-view.js +0 -1
  130. package/src/lib/dev-admin/redbird-proxy.ts +25 -23
  131. package/src/lib/dev-tasks.ts +110 -105
  132. package/src/lib/tasks/eslint.ts +26 -26
  133. package/src/lib/utils.ts +11 -10
@@ -14,7 +14,7 @@ import isCI from "is-ci";
14
14
  import { doCleanup } from "./cleanup";
15
15
  import * as xaa from "xaa";
16
16
  import { formUrl } from "../utils";
17
- import makeOptionalRequire from "optional-require";
17
+ import { makeOptionalRequire } from "optional-require";
18
18
  const optionalRequire = makeOptionalRequire(require);
19
19
 
20
20
  const WT = optionalRequire("worker_threads");
@@ -28,7 +28,7 @@ import { devProxy } from "../../config/dev-proxy";
28
28
  const {
29
29
  settings: { useDevProxy: DEV_PROXY_ENABLED, adminLogLevel },
30
30
  fullDevServer,
31
- controlPaths
31
+ controlPaths,
32
32
  } = devProxy;
33
33
 
34
34
  const ADMIN_LOG_LEVEL = parseInt(adminLogLevel) || 0;
@@ -47,10 +47,10 @@ const PROMPT_SPIN_INTERVAL = 3500;
47
47
 
48
48
  const SERVER_ENVS = {
49
49
  [APP_SERVER_NAME]: {
50
- XARC_BABEL_TARGET: "node"
50
+ XARC_BABEL_TARGET: "node",
51
51
  },
52
52
  [DEV_SERVER_NAME]: {} as any,
53
- [PROXY_SERVER_NAME]: {} as any
53
+ [PROXY_SERVER_NAME]: {} as any,
54
54
  };
55
55
 
56
56
  const getTerminalColumns = () => {
@@ -116,7 +116,7 @@ export class AdminServer {
116
116
  this._fullAppLogUrl = formUrl({ ...fullDevServer, path: controlPaths.appLog });
117
117
  this._adminHttp = new AdminHttp({
118
118
  getLogs: (app: string) => this.getLogs(app),
119
- port: this._opts.port
119
+ port: this._opts.port,
120
120
  });
121
121
  }
122
122
 
@@ -132,7 +132,7 @@ export class AdminServer {
132
132
  name: DEV_ADMIN_STATUS,
133
133
  display: ck`[<green.inverse>DEV ADMIN</>]`,
134
134
  spinner: PROMPT_SPINNER,
135
- spinInterval: PROMPT_SPIN_INTERVAL
135
+ spinInterval: PROMPT_SPIN_INTERVAL,
136
136
  });
137
137
  this.updateStatus("webpack is PENDING");
138
138
  this.handleUserInput();
@@ -255,7 +255,7 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
255
255
  } else if (child.terminate) {
256
256
  child.postMessage("kill");
257
257
  const defer1 = xaa.defer();
258
- child.once("message", msg => defer1.resolve(msg));
258
+ child.once("message", (msg) => defer1.resolve(msg));
259
259
  await xaa.try(() => xaa.runTimeout(defer1.promise, 1000));
260
260
  child.terminate();
261
261
  const defer2 = xaa.defer();
@@ -278,7 +278,7 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
278
278
  await Promise.all([
279
279
  this.kill(DEV_SERVER_NAME, "SIGINT"),
280
280
  this.kill(APP_SERVER_NAME, "SIGINT"),
281
- this.kill(PROXY_SERVER_NAME, "SIGINT")
281
+ this.kill(PROXY_SERVER_NAME, "SIGINT"),
282
282
  ]);
283
283
 
284
284
  this._io.shutdown();
@@ -322,7 +322,7 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
322
322
  x: () => this.kill(DEV_SERVER_NAME, "SIGINT"),
323
323
  z: () => this.toggleFullLogUrlMessage(APP_SERVER_NAME),
324
324
  // dev proxy server
325
- p: () => DEV_PROXY_ENABLED && this.sendMsg(PROXY_SERVER_NAME, { name: "restart" })
325
+ p: () => DEV_PROXY_ENABLED && this.sendMsg(PROXY_SERVER_NAME, { name: "restart" }),
326
326
  };
327
327
 
328
328
  if (str === "^c") {
@@ -401,7 +401,7 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
401
401
  XARC_ADMIN_SERVER: true,
402
402
  // pass admin port to child process
403
403
  XARC_ADMIN_PORT: this._adminHttp._port,
404
- ...SERVER_ENVS[name]
404
+ ...SERVER_ENVS[name],
405
405
  });
406
406
 
407
407
  if (Worker) {
@@ -409,7 +409,7 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
409
409
  } else {
410
410
  const forkOpts: any = {
411
411
  env,
412
- silent: true
412
+ silent: true,
413
413
  };
414
414
 
415
415
  if (options.passThruArgs) {
@@ -446,7 +446,7 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
446
446
  //
447
447
  async startWebpackDevServer(debug = undefined) {
448
448
  const progSig = `<s> [webpack.Progress] `;
449
- const waitStart = async info => {
449
+ const waitStart = async (info) => {
450
450
  const cwdRegex = new RegExp(process.env.XARC_CWD || process.cwd(), "g");
451
451
  let removeTimer;
452
452
  let progLine = "";
@@ -463,8 +463,8 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
463
463
  }, 2000).unref();
464
464
  };
465
465
 
466
- const watchWdsLog = input => {
467
- const processLine = data => {
466
+ const watchWdsLog = (input) => {
467
+ const processLine = (data) => {
468
468
  const line = data.toString();
469
469
  if (line.trim().length < 1) {
470
470
  return;
@@ -474,7 +474,7 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
474
474
  this._io.addItem({
475
475
  name: WDS_PROGRESS,
476
476
  spinner: true,
477
- display: `Webpack Progress`
477
+ display: `Webpack Progress`,
478
478
  });
479
479
  this._io.updateItem(WDS_PROGRESS, progLine);
480
480
  const match = progLine.match(/\d{1,3}%/);
@@ -508,9 +508,9 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
508
508
 
509
509
  this._webpackDevRelay.setWebpackServer(info._child);
510
510
 
511
- return new Promise(resolve => {
511
+ return new Promise((resolve) => {
512
512
  const listenForReport = () =>
513
- info._child.once("message", data => {
513
+ info._child.once("message", (data) => {
514
514
  if (data.name === "webpack-report") {
515
515
  if (data.port) {
516
516
  SERVER_ENVS[PROXY_SERVER_NAME].WEBPACK_DEV_PORT = data.port;
@@ -537,7 +537,7 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
537
537
  exec: Path.join(__dirname, "dev-server.js"),
538
538
  debug: debug || false,
539
539
  skipWatch: debug === "--inspect-brk",
540
- waitStart
540
+ waitStart,
541
541
  });
542
542
  }
543
543
 
@@ -559,7 +559,7 @@ ${proxyItem}<magenta>M</> - Show this menu <magenta>Q</> - Shutdown
559
559
  name: LOG_ALERT,
560
560
  display: ck`[<orange.inverse>ALERT</>]`,
561
561
  spinner: PROMPT_SPINNER,
562
- spinInterval: PROMPT_SPIN_INTERVAL
562
+ spinInterval: PROMPT_SPIN_INTERVAL,
563
563
  });
564
564
  const instruction = `<orange>View full logs at: <cyan.underline>${url}</></> - \
565
565
  <green>Press Z to hide or show this message</>`;
@@ -639,7 +639,7 @@ ${instruction}`
639
639
  }
640
640
  context._showFullLink = undefined;
641
641
  if (store.length > 25000) {
642
- const cleanup = store.filter(x => x !== false);
642
+ const cleanup = store.filter((x) => x !== false);
643
643
  context.store = cleanup.slice(cleanup.length - 9999);
644
644
  }
645
645
  }, delay);
@@ -648,7 +648,7 @@ ${instruction}`
648
648
  saveLineOutput(context) {
649
649
  const { inputs, store } = context;
650
650
 
651
- const handler = data => {
651
+ const handler = (data) => {
652
652
  const timeDiff = Date.now() - context._deferTimestamp;
653
653
  // if an error line has been detected, then only consider other lines following it
654
654
  // within 30 milliseconds as part of it.
@@ -680,7 +680,7 @@ ${instruction}`
680
680
  this._adminHttp.sendLogsToStreamClients();
681
681
  };
682
682
 
683
- inputs.forEach(input => {
683
+ inputs.forEach((input) => {
684
684
  const reader = readline.createInterface({ input });
685
685
  reader.on("line", handler);
686
686
  return reader;
@@ -693,7 +693,7 @@ ${instruction}`
693
693
  tag: this._app,
694
694
  store: [],
695
695
  fullLogUrl: this._fullAppLogUrl,
696
- checkLine: str => {
696
+ checkLine: (str) => {
697
697
  if (
698
698
  !this._fullyStarted &&
699
699
  (str.includes("server running") || str.includes("Server listening"))
@@ -707,7 +707,7 @@ ${instruction}`
707
707
  this.logTime(`App is ready in dev mode, total time took`);
708
708
  }
709
709
  return str;
710
- }
710
+ },
711
711
  };
712
712
 
713
713
  await this.startServer({
@@ -721,12 +721,12 @@ ${instruction}`
721
721
  noTimeoutCheck: skipWatch,
722
722
  passThruArgs: this._passThru,
723
723
  logSaver,
724
- waitStart: async info => {
724
+ waitStart: async (info) => {
725
725
  logSaver.inputs = [info._child.stdout, info._child.stderr];
726
726
  this.saveLineOutput(logSaver);
727
727
  await this.waitForAppServerStart(info);
728
728
  this._webpackDevRelay.setAppServer(info._child);
729
- }
729
+ },
730
730
  });
731
731
  }
732
732
 
@@ -755,7 +755,7 @@ ${instruction}`
755
755
  let lineBuffers = [];
756
756
  let deferWrite;
757
757
 
758
- reader.on("line", data => {
758
+ reader.on("line", (data) => {
759
759
  clearTimeout(deferWrite);
760
760
  deferWrite = setTimeout(() => {
761
761
  output.show(lineBuffers.join("\n"));
@@ -774,7 +774,7 @@ ${instruction}`
774
774
  killKey: "O",
775
775
  debug,
776
776
  exec: Path.join(__dirname, "redbird-spawn"),
777
- waitStart: async info => {
777
+ waitStart: async (info) => {
778
778
  info._child.on("message", (data: any) => {
779
779
  // this._io.show(ck`<orange>proxy message ${JSON.stringify(data)}</>`, this._appPort);
780
780
  if (data.name === "proxy-started") {
@@ -786,7 +786,7 @@ ${instruction}`
786
786
  });
787
787
  this.passThruLineOutput(this._proxy, info._child.stdout, this._io);
788
788
  this.passThruLineOutput(this._proxy, info._child.stderr, this._io);
789
- }
789
+ },
790
790
  });
791
791
  }
792
792
 
@@ -800,7 +800,7 @@ ${instruction}`
800
800
  this.sendMsg(PROXY_SERVER_NAME, {
801
801
  ...update,
802
802
  name: "update-ports",
803
- quiet: true
803
+ quiet: true,
804
804
  });
805
805
  }, 250).unref();
806
806
  }
@@ -822,7 +822,7 @@ ${instruction}`
822
822
  }
823
823
  };
824
824
 
825
- const checkStarted = data => {
825
+ const checkStarted = (data) => {
826
826
  if (started) {
827
827
  return true;
828
828
  }
@@ -912,7 +912,7 @@ ${info.name} - assuming it started.</>`);
912
912
  if (!info._watcher && !info.options.skipWatch && !_.isEmpty(info.options.watch)) {
913
913
  info._watcher = chokidar.watch(info.options.watch, {
914
914
  cwd: process.env.XARC_CWD || process.cwd(),
915
- persistent: true
915
+ persistent: true,
916
916
  });
917
917
  info._watcher.on("change", restart);
918
918
  }
@@ -291,4 +291,3 @@ var a = /(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[0
291
291
  })();
292
292
 
293
293
  /* eslint-enable */
294
- //# fynSourceMap=false
@@ -580,4 +580,3 @@ window.addEventListener("keypress", (event) => {
580
580
  lastEntryId = parseEntryId(hashVal.get("entryId") || "0");
581
581
  updateLevelCheckboxes();
582
582
  // setTimeout(displayLogs, 10);
583
- //# fynSourceMap=false
@@ -5,7 +5,7 @@ import Path from "path";
5
5
  import _ from "lodash";
6
6
  import redbird from "@jchip/redbird";
7
7
  import ck from "chalker";
8
- import makeOptionalRequire from "optional-require";
8
+ import { makeOptionalRequire } from "optional-require";
9
9
  import { devProxy } from "../../config/dev-proxy";
10
10
  import { cdnMock } from "./cdn-mock";
11
11
  import { isValidPort, formUrl } from "../utils";
@@ -17,7 +17,7 @@ const optionalRequire = makeOptionalRequire(require);
17
17
 
18
18
  let APP_RULES = [];
19
19
 
20
- const getNotFoundPage = data => {
20
+ const getNotFoundPage = (data) => {
21
21
  const { protocol, actualHost, expectedHost, port } = data;
22
22
  const adminUrl = formUrl({ protocol, host: expectedHost, port, path: controlPaths.status });
23
23
  /* eslint-disable max-len */
@@ -66,7 +66,7 @@ const getLineForTree = (_rotocol, host) => (tree, [envVarName, port], idx, arr)
66
66
  return ck`${tree} ${boxChar}─<green>${formUrl({
67
67
  protocol: "http",
68
68
  host,
69
- port
69
+ port,
70
70
  })}</> (${portText})\n`;
71
71
  };
72
72
 
@@ -101,7 +101,7 @@ const onStatusRequest = (_req, res) => {
101
101
  <h2>Rules</h2>
102
102
  <ul>
103
103
  ${APP_RULES.map(
104
- x => `<li><pre><a href="${x[0]}">${x[0]}</a> ===&gt; <a href="${x[1]}">${x[1]}</a></pre></li>`
104
+ (x) => `<li><pre><a href="${x[0]}">${x[0]}</a> ===&gt; <a href="${x[1]}">${x[1]}</a></pre></li>`
105
105
  ).join("")}
106
106
  </ul>
107
107
  </body>
@@ -124,7 +124,7 @@ const registerElectrodeDevRules = ({
124
124
  webpackDevPort,
125
125
  restart,
126
126
  enableCdnMock,
127
- noDev
127
+ noDev,
128
128
  }) => {
129
129
  const { dev: devPath, admin: adminPath, hmr: hmrPath, appLog, reporter } = controlPaths;
130
130
  const logEventsPath = `${devPath}/log-events`;
@@ -151,7 +151,7 @@ const registerElectrodeDevRules = ({
151
151
  return [
152
152
  formUrl({ host, protocol, port, ...src }),
153
153
  formUrl({ host, protocol: "http", ...target }),
154
- opts
154
+ opts,
155
155
  ];
156
156
  })
157
157
  .concat(
@@ -162,15 +162,15 @@ const registerElectrodeDevRules = ({
162
162
  formUrl({
163
163
  ...target,
164
164
  protocol: target.protocol || "http",
165
- host: target.host || "127.0.0.1"
165
+ host: target.host || "127.0.0.1",
166
166
  }),
167
- opts
167
+ opts,
168
168
  ];
169
169
  })
170
170
  )
171
- .filter(x => x);
171
+ .filter((x) => x);
172
172
 
173
- appRules.forEach(x => proxy.register(...x));
173
+ appRules.forEach((x) => proxy.register(...x));
174
174
 
175
175
  APP_RULES = APP_RULES.concat(appRules);
176
176
 
@@ -178,14 +178,14 @@ const registerElectrodeDevRules = ({
178
178
  ssl,
179
179
  src: formUrl({ protocol, host, path: controlPaths.exit }),
180
180
  target: `http://localhost:29999/skip`,
181
- onRequest: onExitRequest
181
+ onRequest: onExitRequest,
182
182
  });
183
183
 
184
184
  proxy.register({
185
185
  ssl,
186
186
  src: formUrl({ protocol, host, path: controlPaths.status }),
187
187
  target: `http://localhost:29999/skip`,
188
- onRequest: onStatusRequest
188
+ onRequest: onStatusRequest,
189
189
  });
190
190
 
191
191
  proxy.register({
@@ -227,7 +227,7 @@ const registerElectrodeDevRules = ({
227
227
  }
228
228
 
229
229
  return false;
230
- }
230
+ },
231
231
  });
232
232
 
233
233
  // mock-cdn
@@ -242,7 +242,7 @@ const registerElectrodeDevRules = ({
242
242
  onRequest(req, res) {
243
243
  cdnMock.respondAsset(req, res);
244
244
  return false;
245
- }
245
+ },
246
246
  });
247
247
  }
248
248
  };
@@ -253,9 +253,9 @@ const startProxy = (inOptions = {}) => {
253
253
  {
254
254
  xfwd: false,
255
255
  pino: {
256
- level: "warn"
256
+ level: "warn",
257
257
  },
258
- resolvers: []
258
+ resolvers: [],
259
259
  },
260
260
  settings,
261
261
  inOptions
@@ -286,7 +286,7 @@ View status at <green>${proxyUrls.https || proxyUrls.http}${controlPaths.status}
286
286
  );
287
287
 
288
288
  const urlsShow = Object.keys(proxyUrls)
289
- .map(x => {
289
+ .map((x) => {
290
290
  return ck`<green>${proxyUrls[x]}</>`;
291
291
  })
292
292
  .join(" or ");
@@ -308,15 +308,17 @@ View status at <green>${proxyUrls.https || proxyUrls.http}${controlPaths.status}
308
308
  secure: true,
309
309
  ssl: {
310
310
  port: options.httpsPort,
311
- ...proxyCerts
312
- }
311
+ ...proxyCerts,
312
+ },
313
313
  });
314
314
  }
315
315
 
316
316
  let proxy = redbird(proxyOptions);
317
317
 
318
- const userFiles = ["archetype/config", "src", "test", "config"].map(x => `${x}/dev-proxy-rules`);
319
- const userDevProxyFile = userFiles.find(f => optionalRequire.resolve(Path.resolve(f)));
318
+ const userFiles = ["archetype/config", "src", "test", "config"].map(
319
+ (x) => `${x}/dev-proxy-rules`
320
+ );
321
+ const userDevProxyFile = userFiles.find((f) => optionalRequire.resolve(Path.resolve(f)));
320
322
 
321
323
  const userDevProxy = userDevProxyFile && require(Path.resolve(userDevProxyFile));
322
324
 
@@ -341,7 +343,7 @@ View status at <green>${proxyUrls.https || proxyUrls.http}${controlPaths.status}
341
343
  protocol,
342
344
  actualHost: req.headers.host.split(":")[0],
343
345
  expectedHost: host,
344
- port
346
+ port,
345
347
  })
346
348
  );
347
349
  res.end();
@@ -360,7 +362,7 @@ View status at <green>${proxyUrls.https || proxyUrls.http}${controlPaths.status}
360
362
  port: options.httpPort,
361
363
  appPort: options.appPort,
362
364
  webpackDevPort: options.webpackDevPort,
363
- restart
365
+ restart,
364
366
  } as any);
365
367
  }
366
368