umi 4.0.0-beta.3 → 4.0.0-beta.7

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/dist/cli/node.js CHANGED
@@ -12,7 +12,7 @@ function checkVersion() {
12
12
  }
13
13
  exports.checkVersion = checkVersion;
14
14
  function checkLocal() {
15
- if (__filename.includes('packages/umi')) {
15
+ if (__filename.includes(`packages/${constants_1.FRAMEWORK_NAME}`)) {
16
16
  utils_1.logger.info('@local');
17
17
  }
18
18
  }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  import { IServicePluginAPI, PluginAPI } from '@umijs/core';
2
+ import * as utils from '@umijs/utils';
2
3
  export declare type IApi = PluginAPI & IServicePluginAPI;
3
4
  export * from './service/service';
5
+ export { utils };
package/dist/index.js CHANGED
@@ -6,8 +6,23 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
6
6
  if (k2 === undefined) k2 = k;
7
7
  o[k2] = m[k];
8
8
  }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
9
21
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
22
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
23
  };
12
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.utils = void 0;
26
+ const utils = __importStar(require("@umijs/utils"));
27
+ exports.utils = utils;
13
28
  __exportStar(require("./service/service"), exports);
@@ -19,10 +19,7 @@ class Service extends core_1.Service {
19
19
  constructor(opts) {
20
20
  process.env.UMI_DIR = (0, path_1.dirname)(require.resolve('../../package'));
21
21
  const cwd = (0, cwd_1.getCwd)();
22
- super(Object.assign(Object.assign({}, opts), { env: process.env.NODE_ENV, cwd, defaultConfigFiles: constants_1.DEFAULT_CONFIG_FILES, frameworkName: constants_1.FRAMEWORK_NAME, presets: [
23
- require.resolve('@umijs/preset-built-in'),
24
- ...((opts === null || opts === void 0 ? void 0 : opts.presets) || []),
25
- ], plugins: [
22
+ super(Object.assign(Object.assign({}, opts), { env: process.env.NODE_ENV, cwd, defaultConfigFiles: constants_1.DEFAULT_CONFIG_FILES, frameworkName: constants_1.FRAMEWORK_NAME, presets: [require.resolve('@umijs/preset-umi'), ...((opts === null || opts === void 0 ? void 0 : opts.presets) || [])], plugins: [
26
23
  (0, fs_1.existsSync)((0, path_1.join)(cwd, 'plugin.ts')) && (0, path_1.join)(cwd, 'plugin.ts'),
27
24
  (0, fs_1.existsSync)((0, path_1.join)(cwd, 'plugin.js')) && (0, path_1.join)(cwd, 'plugin.js'),
28
25
  ].filter(Boolean) }));
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export type { IApi } from '@umijs/preset-built-in';
1
+ export type { IApi } from '@umijs/preset-umi';
2
2
  export * from '@umijs/renderer-react';
3
3
  export * from './dist/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umi",
3
- "version": "4.0.0-beta.3",
3
+ "version": "4.0.0-beta.7",
4
4
  "description": "umi",
5
5
  "main": "dist/index.js",
6
6
  "module": "index.esm.js",
@@ -35,10 +35,10 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@umijs/core": "4.0.0-beta.3",
39
- "@umijs/preset-built-in": "4.0.0-beta.3",
40
- "@umijs/renderer-react": "4.0.0-beta.3",
41
- "@umijs/utils": "4.0.0-beta.3",
38
+ "@umijs/core": "4.0.0-beta.7",
39
+ "@umijs/preset-umi": "4.0.0-beta.7",
40
+ "@umijs/renderer-react": "4.0.0-beta.7",
41
+ "@umijs/utils": "4.0.0-beta.7",
42
42
  "v8-compile-cache": "2.3.0"
43
43
  }
44
44
  }