@modern-js/plugin-proxy 2.0.0-beta.0 → 2.0.0-beta.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @modern-js/plugin-proxy
2
2
 
3
+ ## 2.0.0-beta.2
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: chore: v2
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [92f0ead]
12
+ - Updated dependencies [edd1cfb1af]
13
+ - Updated dependencies [cc971eabfc]
14
+ - Updated dependencies [5b9049f2e9]
15
+ - Updated dependencies [92004d1]
16
+ - Updated dependencies [b8bbe036c7]
17
+ - Updated dependencies [d5a31df781]
18
+ - Updated dependencies [dda38c9c3e]
19
+ - Updated dependencies [3bbea92b2a]
20
+ - Updated dependencies [abf3421a75]
21
+ - Updated dependencies [543be9558e]
22
+ - Updated dependencies [14b712da84]
23
+ - @modern-js/utils@2.0.0-beta.2
24
+
25
+ ## 2.0.0-beta.1
26
+
27
+ ### Major Changes
28
+
29
+ - dda38c9: chore: v2
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [92f0ead]
34
+ - Updated dependencies [edd1cfb1af]
35
+ - Updated dependencies [cc971eabfc]
36
+ - Updated dependencies [5b9049f]
37
+ - Updated dependencies [92004d1]
38
+ - Updated dependencies [b8bbe036c7]
39
+ - Updated dependencies [d5a31df781]
40
+ - Updated dependencies [dda38c9]
41
+ - Updated dependencies [3bbea92b2a]
42
+ - Updated dependencies [abf3421]
43
+ - Updated dependencies [543be9558e]
44
+ - Updated dependencies [14b712d]
45
+ - @modern-js/utils@2.0.0-beta.1
46
+
3
47
  ## 2.0.0-beta.0
4
48
 
5
49
  ### Major Changes
@@ -9,7 +9,6 @@ export default (() => {
9
9
  validateSchema() {
10
10
  return PLUGIN_SCHEMAS['@modern-js/plugin-proxy'];
11
11
  },
12
-
13
12
  async afterDev() {
14
13
  const {
15
14
  dev
@@ -17,11 +16,9 @@ export default (() => {
17
16
  const {
18
17
  internalDirectory
19
18
  } = api.useAppContext();
20
-
21
19
  if (!(dev !== null && dev !== void 0 && dev.proxy)) {
22
20
  return;
23
21
  }
24
-
25
22
  const rule = createProxyRule(internalDirectory, dev.proxy);
26
23
  proxyServer = new WhistleProxy({
27
24
  port: 8899,
@@ -29,14 +26,11 @@ export default (() => {
29
26
  });
30
27
  await proxyServer.start();
31
28
  },
32
-
33
29
  beforeExit() {
34
30
  var _proxyServer;
35
-
36
31
  // terminate whistle proxy
37
32
  (_proxyServer = proxyServer) === null || _proxyServer === void 0 ? void 0 : _proxyServer.close();
38
33
  }
39
-
40
34
  })
41
35
  };
42
36
  });
@@ -1,10 +1,11 @@
1
1
  import path from 'path';
2
2
  import { logger, fs } from '@modern-js/utils';
3
+ // FIXME: import DevProxyOptions from somewhere
4
+ // import type { DevProxyOptions } from '@modern-js/core';
3
5
 
4
6
  const createWhistleProxyRule = (ruleDirectory, rules) => {
5
7
  const dest = path.resolve(ruleDirectory, 'proxy.rule.js');
6
8
  let code = `/.*/ enable://intercept\n`;
7
-
8
9
  for (const rule of rules) {
9
10
  const {
10
11
  pattern,
@@ -12,34 +13,27 @@ const createWhistleProxyRule = (ruleDirectory, rules) => {
12
13
  } = rule;
13
14
  code += `${pattern} ${target}\n`;
14
15
  }
15
-
16
16
  fs.outputFileSync(dest, `exports.name = 'modernjs proxy rule';\nexports.rules = \`${code}\`;`);
17
17
  return dest;
18
18
  };
19
-
20
19
  export const createProxyRule = (appDirectory, proxyOptions) => {
21
20
  const rules = [];
22
-
23
21
  if (proxyOptions && typeof proxyOptions === 'string') {
24
22
  return proxyOptions;
25
23
  }
26
-
27
24
  if (typeof proxyOptions === 'object') {
28
25
  for (const pattern of Object.keys(proxyOptions)) {
29
26
  const target = proxyOptions[pattern];
30
-
31
27
  if (!target || typeof target !== 'string') {
32
- logger.error(`dev.proxy.${pattern} value should be string type`); // eslint-disable-next-line no-process-exit
33
-
28
+ logger.error(`dev.proxy.${pattern} value should be string type`);
29
+ // eslint-disable-next-line no-process-exit
34
30
  process.exit(1);
35
31
  }
36
-
37
32
  rules.push({
38
33
  pattern,
39
34
  target
40
35
  });
41
36
  }
42
37
  }
43
-
44
38
  return createWhistleProxyRule(appDirectory, rules);
45
39
  };
@@ -1,9 +1,7 @@
1
1
  import { execSync as nodeExecSync } from 'child_process';
2
-
3
2
  function execSync(cmd) {
4
3
  let stdout;
5
4
  let status = 0;
6
-
7
5
  try {
8
6
  stdout = nodeExecSync(cmd);
9
7
  } catch (err) {
@@ -18,5 +16,4 @@ function execSync(cmd) {
18
16
  status
19
17
  };
20
18
  }
21
-
22
19
  export default execSync;
@@ -10,29 +10,27 @@ export const trustRootCA = () => {
10
10
  const {
11
11
  status
12
12
  } = execSync(`sudo security add-trusted-cert -d -k /Library/Keychains/System.keychain ${defaultRootCA}`);
13
-
14
13
  if (status === 0) {
15
14
  logger.info('Root CA install, you are ready to intercept the https now');
16
15
  } else {
17
16
  logger.info('Failed to trust the root CA, please trust it manually');
18
17
  }
19
- }; // eslint-disable-next-line @typescript-eslint/no-unused-vars
20
-
21
- const isRootCATrusted = () => {// current empty
22
18
  };
23
19
 
20
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
21
+ const isRootCATrusted = () => {
22
+ // current empty
23
+ };
24
24
  export const isRootCAExists = () => {
25
25
  if (fs.existsSync(defaultRootCA)) {
26
26
  return true;
27
27
  }
28
-
29
28
  return false;
30
29
  };
31
30
  export const generateRootCA = () => new Promise((resolve, reject) => {
32
31
  if (fs.existsSync(defaultRootCA)) {
33
32
  fs.removeSync(defaultRootCA);
34
33
  }
35
-
36
34
  fs.ensureDirSync(defaultCertDir);
37
35
  const stream = fs.createWriteStream(defaultRootCA);
38
36
  http.get('http://localhost:8899/cgi-bin/rootca', response => {
@@ -44,7 +42,6 @@ export const generateRootCA = () => new Promise((resolve, reject) => {
44
42
  });
45
43
  }).on('error', err => {
46
44
  fs.unlink(defaultRootCA); // Delete the file
47
-
48
45
  reject(err);
49
46
  });
50
47
  });
@@ -1,23 +1,20 @@
1
1
  import execSync from "./execSync";
2
2
  const networkTypes = ['Ethernet', 'Thunderbolt Ethernet', 'Wi-Fi'];
3
-
4
3
  const getNetworkType = () => {
5
4
  // eslint-disable-next-line @typescript-eslint/prefer-for-of
6
5
  for (let i = 0; i < networkTypes.length; i++) {
7
6
  const type = networkTypes[i];
8
7
  const result = execSync(`networksetup -getwebproxy ${type}`);
9
-
10
8
  if (result.status === 0) {
11
9
  return type;
12
10
  }
13
11
  }
14
-
15
12
  throw new Error('Unknown network type');
16
13
  };
17
-
18
14
  export const enableGlobalProxy = (ip, port) => {
19
- const networkType = getNetworkType(); // && networksetup -setproxybypassdomains ${networkType} localhost localhost
15
+ const networkType = getNetworkType();
20
16
 
17
+ // && networksetup -setproxybypassdomains ${networkType} localhost localhost
21
18
  execSync(`networksetup -setwebproxy ${networkType} ${ip} ${port}`);
22
19
  execSync(`networksetup -setsecurewebproxy ${networkType} ${ip} ${port}`);
23
20
  };
@@ -1,33 +1,25 @@
1
1
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
2
  import path from 'path';
4
3
  import { logger } from '@modern-js/utils';
5
4
  import execSync from "./execSync";
6
5
  import { isRootCAExists, generateRootCA, defaultRootCA, trustRootCA } from "./macCAManager";
7
-
8
6
  const {
9
7
  disableGlobalProxy,
10
8
  enableGlobalProxy
11
9
  } = require("./macProxyManager");
12
-
13
10
  export default class WhistleProxy {
14
11
  constructor(config) {
15
12
  _defineProperty(this, "rule", void 0);
16
-
17
13
  _defineProperty(this, "port", void 0);
18
-
19
14
  _defineProperty(this, "bin", void 0);
20
-
21
15
  _defineProperty(this, "certDir", void 0);
22
-
23
16
  this.rule = config.rule;
24
- this.port = config.port; // unused
17
+ this.port = config.port;
18
+ // unused
25
19
  // this.mode = config.mode; // pureProxy|debug|multiEnv
26
-
27
20
  this.bin = path.resolve(path.dirname(require.resolve('whistle')), 'bin/whistle.js');
28
21
  this.certDir = path.dirname(defaultRootCA);
29
22
  }
30
-
31
23
  async installRootCA() {
32
24
  try {
33
25
  if (!isRootCAExists()) {
@@ -39,7 +31,6 @@ export default class WhistleProxy {
39
31
  throw err;
40
32
  }
41
33
  }
42
-
43
34
  async start() {
44
35
  logger.info(`Starting the proxy server.....`);
45
36
  execSync(`${this.bin} start --certDir=${this.certDir} --port=${this.port}`);
@@ -48,11 +39,9 @@ export default class WhistleProxy {
48
39
  enableGlobalProxy('localhost', this.port);
49
40
  logger.info(`Proxy Server start on localhost:${this.port}\n`);
50
41
  }
51
-
52
42
  close() {
53
43
  execSync(`${this.bin} stop`);
54
44
  disableGlobalProxy();
55
45
  logger.info(`Proxy Server has been closed`);
56
46
  }
57
-
58
47
  }
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _utils = require("@modern-js/utils");
9
-
10
8
  var _createProxyRule = require("./utils/createProxyRule");
11
-
12
9
  var _whistleProxy = _interopRequireDefault(require("./utils/whistleProxy"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  var _default = () => {
17
12
  let proxyServer;
18
13
  return {
@@ -21,7 +16,6 @@ var _default = () => {
21
16
  validateSchema() {
22
17
  return _utils.PLUGIN_SCHEMAS['@modern-js/plugin-proxy'];
23
18
  },
24
-
25
19
  async afterDev() {
26
20
  const {
27
21
  dev
@@ -29,11 +23,9 @@ var _default = () => {
29
23
  const {
30
24
  internalDirectory
31
25
  } = api.useAppContext();
32
-
33
26
  if (!(dev !== null && dev !== void 0 && dev.proxy)) {
34
27
  return;
35
28
  }
36
-
37
29
  const rule = (0, _createProxyRule.createProxyRule)(internalDirectory, dev.proxy);
38
30
  proxyServer = new _whistleProxy.default({
39
31
  port: 8899,
@@ -41,16 +33,12 @@ var _default = () => {
41
33
  });
42
34
  await proxyServer.start();
43
35
  },
44
-
45
36
  beforeExit() {
46
37
  var _proxyServer;
47
-
48
38
  // terminate whistle proxy
49
39
  (_proxyServer = proxyServer) === null || _proxyServer === void 0 ? void 0 : _proxyServer.close();
50
40
  }
51
-
52
41
  })
53
42
  };
54
43
  };
55
-
56
44
  exports.default = _default;
@@ -4,18 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createProxyRule = void 0;
7
-
8
7
  var _path = _interopRequireDefault(require("path"));
9
-
10
8
  var _utils = require("@modern-js/utils");
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  const createWhistleProxyRule = (ruleDirectory, rules) => {
15
11
  const dest = _path.default.resolve(ruleDirectory, 'proxy.rule.js');
16
-
17
12
  let code = `/.*/ enable://intercept\n`;
18
-
19
13
  for (const rule of rules) {
20
14
  const {
21
15
  pattern,
@@ -23,38 +17,28 @@ const createWhistleProxyRule = (ruleDirectory, rules) => {
23
17
  } = rule;
24
18
  code += `${pattern} ${target}\n`;
25
19
  }
26
-
27
20
  _utils.fs.outputFileSync(dest, `exports.name = 'modernjs proxy rule';\nexports.rules = \`${code}\`;`);
28
-
29
21
  return dest;
30
22
  };
31
-
32
23
  const createProxyRule = (appDirectory, proxyOptions) => {
33
24
  const rules = [];
34
-
35
25
  if (proxyOptions && typeof proxyOptions === 'string') {
36
26
  return proxyOptions;
37
27
  }
38
-
39
28
  if (typeof proxyOptions === 'object') {
40
29
  for (const pattern of Object.keys(proxyOptions)) {
41
30
  const target = proxyOptions[pattern];
42
-
43
31
  if (!target || typeof target !== 'string') {
44
- _utils.logger.error(`dev.proxy.${pattern} value should be string type`); // eslint-disable-next-line no-process-exit
45
-
46
-
32
+ _utils.logger.error(`dev.proxy.${pattern} value should be string type`);
33
+ // eslint-disable-next-line no-process-exit
47
34
  process.exit(1);
48
35
  }
49
-
50
36
  rules.push({
51
37
  pattern,
52
38
  target
53
39
  });
54
40
  }
55
41
  }
56
-
57
42
  return createWhistleProxyRule(appDirectory, rules);
58
43
  };
59
-
60
44
  exports.createProxyRule = createProxyRule;
@@ -4,13 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _child_process = require("child_process");
9
-
10
8
  function execSync(cmd) {
11
9
  let stdout;
12
10
  let status = 0;
13
-
14
11
  try {
15
12
  stdout = (0, _child_process.execSync)(cmd);
16
13
  } catch (err) {
@@ -25,6 +22,5 @@ function execSync(cmd) {
25
22
  status
26
23
  };
27
24
  }
28
-
29
25
  var _default = execSync;
30
26
  exports.default = _default;
@@ -4,64 +4,45 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.trustRootCA = exports.isRootCAExists = exports.generateRootCA = exports.defaultRootCA = void 0;
7
-
8
7
  var _os = _interopRequireDefault(require("os"));
9
-
10
8
  var _http = _interopRequireDefault(require("http"));
11
-
12
9
  var _path = _interopRequireDefault(require("path"));
13
-
14
10
  var _utils = require("@modern-js/utils");
15
-
16
11
  var _execSync = _interopRequireDefault(require("./execSync"));
17
-
18
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
13
  const defaultCertDir = _path.default.resolve(_os.default.homedir(), './.whistle-proxy');
21
-
22
14
  const defaultRootCA = _path.default.resolve(defaultCertDir, './rootCA.crt');
23
-
24
15
  exports.defaultRootCA = defaultRootCA;
25
-
26
16
  const trustRootCA = () => {
27
17
  _utils.logger.info(`please type the password to trust the https certificate`);
28
-
29
18
  const {
30
19
  status
31
20
  } = (0, _execSync.default)(`sudo security add-trusted-cert -d -k /Library/Keychains/System.keychain ${defaultRootCA}`);
32
-
33
21
  if (status === 0) {
34
22
  _utils.logger.info('Root CA install, you are ready to intercept the https now');
35
23
  } else {
36
24
  _utils.logger.info('Failed to trust the root CA, please trust it manually');
37
25
  }
38
- }; // eslint-disable-next-line @typescript-eslint/no-unused-vars
39
-
26
+ };
40
27
 
28
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
41
29
  exports.trustRootCA = trustRootCA;
42
-
43
- const isRootCATrusted = () => {// current empty
30
+ const isRootCATrusted = () => {
31
+ // current empty
44
32
  };
45
-
46
33
  const isRootCAExists = () => {
47
34
  if (_utils.fs.existsSync(defaultRootCA)) {
48
35
  return true;
49
36
  }
50
-
51
37
  return false;
52
38
  };
53
-
54
39
  exports.isRootCAExists = isRootCAExists;
55
-
56
40
  const generateRootCA = () => new Promise((resolve, reject) => {
57
41
  if (_utils.fs.existsSync(defaultRootCA)) {
58
42
  _utils.fs.removeSync(defaultRootCA);
59
43
  }
60
-
61
44
  _utils.fs.ensureDirSync(defaultCertDir);
62
-
63
45
  const stream = _utils.fs.createWriteStream(defaultRootCA);
64
-
65
46
  _http.default.get('http://localhost:8899/cgi-bin/rootca', response => {
66
47
  response.pipe(stream);
67
48
  stream.on('finish', () => {
@@ -71,10 +52,7 @@ const generateRootCA = () => new Promise((resolve, reject) => {
71
52
  });
72
53
  }).on('error', err => {
73
54
  _utils.fs.unlink(defaultRootCA); // Delete the file
74
-
75
-
76
55
  reject(err);
77
56
  });
78
57
  });
79
-
80
58
  exports.generateRootCA = generateRootCA;
@@ -4,40 +4,31 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.enableGlobalProxy = exports.disableGlobalProxy = void 0;
7
-
8
7
  var _execSync = _interopRequireDefault(require("./execSync"));
9
-
10
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
9
  const networkTypes = ['Ethernet', 'Thunderbolt Ethernet', 'Wi-Fi'];
13
-
14
10
  const getNetworkType = () => {
15
11
  // eslint-disable-next-line @typescript-eslint/prefer-for-of
16
12
  for (let i = 0; i < networkTypes.length; i++) {
17
13
  const type = networkTypes[i];
18
14
  const result = (0, _execSync.default)(`networksetup -getwebproxy ${type}`);
19
-
20
15
  if (result.status === 0) {
21
16
  return type;
22
17
  }
23
18
  }
24
-
25
19
  throw new Error('Unknown network type');
26
20
  };
27
-
28
21
  const enableGlobalProxy = (ip, port) => {
29
- const networkType = getNetworkType(); // && networksetup -setproxybypassdomains ${networkType} localhost localhost
22
+ const networkType = getNetworkType();
30
23
 
24
+ // && networksetup -setproxybypassdomains ${networkType} localhost localhost
31
25
  (0, _execSync.default)(`networksetup -setwebproxy ${networkType} ${ip} ${port}`);
32
26
  (0, _execSync.default)(`networksetup -setsecurewebproxy ${networkType} ${ip} ${port}`);
33
27
  };
34
-
35
28
  exports.enableGlobalProxy = enableGlobalProxy;
36
-
37
29
  const disableGlobalProxy = () => {
38
30
  const networkType = getNetworkType();
39
31
  (0, _execSync.default)(`networksetup -setwebproxystate ${networkType} off`);
40
32
  (0, _execSync.default)(`networksetup -setsecurewebproxystate ${networkType} off`);
41
33
  };
42
-
43
34
  exports.disableGlobalProxy = disableGlobalProxy;
@@ -4,42 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _path = _interopRequireDefault(require("path"));
9
-
10
8
  var _utils = require("@modern-js/utils");
11
-
12
9
  var _execSync = _interopRequireDefault(require("./execSync"));
13
-
14
10
  var _macCAManager = require("./macCAManager");
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
12
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
-
20
13
  const {
21
14
  disableGlobalProxy,
22
15
  enableGlobalProxy
23
16
  } = require("./macProxyManager");
24
-
25
17
  class WhistleProxy {
26
18
  constructor(config) {
27
19
  _defineProperty(this, "rule", void 0);
28
-
29
20
  _defineProperty(this, "port", void 0);
30
-
31
21
  _defineProperty(this, "bin", void 0);
32
-
33
22
  _defineProperty(this, "certDir", void 0);
34
-
35
23
  this.rule = config.rule;
36
- this.port = config.port; // unused
24
+ this.port = config.port;
25
+ // unused
37
26
  // this.mode = config.mode; // pureProxy|debug|multiEnv
38
-
39
27
  this.bin = _path.default.resolve(_path.default.dirname(require.resolve('whistle')), 'bin/whistle.js');
40
28
  this.certDir = _path.default.dirname(_macCAManager.defaultRootCA);
41
29
  }
42
-
43
30
  async installRootCA() {
44
31
  try {
45
32
  if (!(0, _macCAManager.isRootCAExists)()) {
@@ -51,25 +38,18 @@ class WhistleProxy {
51
38
  throw err;
52
39
  }
53
40
  }
54
-
55
41
  async start() {
56
42
  _utils.logger.info(`Starting the proxy server.....`);
57
-
58
43
  (0, _execSync.default)(`${this.bin} start --certDir=${this.certDir} --port=${this.port}`);
59
44
  (0, _execSync.default)(`${this.bin} use ${this.rule} --force`);
60
45
  await this.installRootCA();
61
46
  enableGlobalProxy('localhost', this.port);
62
-
63
47
  _utils.logger.info(`Proxy Server start on localhost:${this.port}\n`);
64
48
  }
65
-
66
49
  close() {
67
50
  (0, _execSync.default)(`${this.bin} stop`);
68
51
  disableGlobalProxy();
69
-
70
52
  _utils.logger.info(`Proxy Server has been closed`);
71
53
  }
72
-
73
54
  }
74
-
75
55
  exports.default = WhistleProxy;
@@ -1,5 +1,3 @@
1
1
  import type { CliPlugin } from '@modern-js/core';
2
-
3
2
  declare const _default: () => CliPlugin;
4
-
5
3
  export default _default;
@@ -1,2 +1 @@
1
- import type { DevProxyOptions } from '@modern-js/core';
2
- export declare const createProxyRule: (appDirectory: string, proxyOptions: DevProxyOptions) => string;
1
+ export declare const createProxyRule: (appDirectory: string, proxyOptions: any) => string;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.0",
14
+ "version": "2.0.0-beta.2",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -32,17 +32,17 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.18.0",
35
- "@modern-js/utils": "2.0.0-beta.0",
36
- "whistle": "^2.7.18"
35
+ "whistle": "^2.7.18",
36
+ "@modern-js/utils": "2.0.0-beta.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/jest": "^27",
40
40
  "@types/node": "^14",
41
41
  "typescript": "^4",
42
- "@modern-js/core": "2.0.0-beta.0",
43
- "@scripts/build": "2.0.0-beta.0",
44
42
  "jest": "^27",
45
- "@scripts/jest-config": "2.0.0-beta.0"
43
+ "@modern-js/core": "2.0.0-beta.2",
44
+ "@scripts/build": "2.0.0-beta.2",
45
+ "@scripts/jest-config": "2.0.0-beta.2"
46
46
  },
47
47
  "sideEffects": false,
48
48
  "publishConfig": {
@@ -50,9 +50,9 @@
50
50
  "access": "public"
51
51
  },
52
52
  "scripts": {
53
- "new": "modern new",
54
- "dev": "modern build --watch",
55
- "build": "modern build",
53
+ "new": "modern-lib new",
54
+ "dev": "modern-lib build --watch",
55
+ "build": "modern-lib build",
56
56
  "test": "jest --passWithNoTests"
57
57
  }
58
58
  }