umi 4.0.0-canary.20220713.1 → 4.0.0-canary.20220718.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.
package/dist/cli/cli.d.ts CHANGED
@@ -3,3 +3,4 @@ interface IOpts {
3
3
  }
4
4
  export declare function run(opts?: IOpts): Promise<void>;
5
5
  export {};
6
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":"AAWA,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAsB,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,iBAoCrC"}
package/dist/cli/dev.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export declare function dev(): void;
2
+ //# sourceMappingURL=dev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/cli/dev.ts"],"names":[],"mappings":"AAEA,wBAAgB,GAAG,SAiBlB"}
@@ -4,3 +4,4 @@ interface IOpts {
4
4
  }
5
5
  export default function start({ scriptPath }: IOpts): import("child_process").ChildProcess;
6
6
  export {};
7
+ //# sourceMappingURL=fork.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fork.d.ts","sourceRoot":"","sources":["../../src/cli/fork.ts"],"names":[],"mappings":";AAIA,UAAU,KAAK;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,wCA0ClD"}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=forkedDev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forkedDev.d.ts","sourceRoot":"","sources":["../../src/cli/forkedDev.ts"],"names":[],"mappings":""}
@@ -2,3 +2,4 @@ export declare function checkVersion(): void;
2
2
  export declare function checkLocal(): void;
3
3
  export declare function setNodeTitle(name?: string): void;
4
4
  export declare function setNoDeprecation(): void;
5
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/cli/node.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,SAQ3B;AAED,wBAAgB,UAAU,SAIzB;AAED,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,QAIzC;AAED,wBAAgB,gBAAgB,SAK/B"}
@@ -32,3 +32,4 @@ export declare class PluginManager {
32
32
  }): PluginManager;
33
33
  }
34
34
  export {};
35
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/client/plugin.ts"],"names":[],"mappings":"AAEA,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B;AAED,qBAAa,aAAa;IACxB,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC9B,KAAK,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAM;gBACK,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE;IAIzC,QAAQ,CAAC,MAAM,EAAE,OAAO;IAaxB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAqB3B,YAAY,CAAC,EACX,GAAG,EACH,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,KAAK,GACN,EAAE;QACD,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,gBAAgB,CAAC;QACvB,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;IAuFD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,OAAO,EAAE,CAAA;KAAE;CAShE"}
@@ -4,3 +4,4 @@ export declare function compose({ fns, args, }: {
4
4
  args?: object;
5
5
  }): any;
6
6
  export declare function isPromiseLike(obj: any): boolean;
7
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/client/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAErD;AAED,wBAAgB,OAAO,CAAC,EACtB,GAAG,EACH,IAAI,GACL,EAAE;IACD,GAAG,EAAE,CAAC,QAAQ,GAAG,GAAG,CAAC,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,OAMA;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,WAErC"}
@@ -2,3 +2,4 @@ export declare const MIN_NODE_VERSION = 14;
2
2
  export declare const DEV_COMMAND = "dev";
3
3
  export declare const DEFAULT_CONFIG_FILES: string[];
4
4
  export declare const FRAMEWORK_NAME = "umi";
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,WAAW,QAAQ,CAAC;AACjC,eAAO,MAAM,oBAAoB,UAKhC,CAAC;AACF,eAAO,MAAM,cAAc,QAAQ,CAAC"}
@@ -3,3 +3,4 @@ import type { IConfig } from '@umijs/preset-umi';
3
3
  declare type ConfigType = IConfigFromPlugins & IConfig;
4
4
  export declare function defineConfig(config: ConfigType): ConfigType;
5
5
  export {};
6
+ //# sourceMappingURL=defineConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineConfig.d.ts","sourceRoot":"","sources":["../src/defineConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,aAAK,UAAU,GAAG,kBAAkB,GAAG,OAAO,CAAC;AAE/C,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAE3D"}
@@ -6,3 +6,4 @@ export declare function defineMock(mockData: {
6
6
  [key: string]: MockDeclare;
7
7
  };
8
8
  export {};
9
+ //# sourceMappingURL=defineMock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineMock.d.ts","sourceRoot":"","sources":["../src/defineMock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAE9E,aAAK,WAAW,GACZ,MAAM,GACN,MAAM,GACN,IAAI,GACJ,SAAS,GACT,OAAO,GACP,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,cAAc,CAAC;AAEnB,wBAAgB,UAAU,CAAC,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE;;EAElE"}
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export { defineConfig } from './defineConfig';
4
4
  export { defineMock } from './defineMock';
5
5
  export * from './service/service';
6
6
  export declare type IApi = PluginAPI & IServicePluginAPI;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,oBAAY,IAAI,GAAG,SAAS,GAAG,iBAAiB,CAAC"}
@@ -3,3 +3,4 @@ import * as httpProxyMiddleware from '@umijs/bundler-webpack/compiled/http-proxy
3
3
  export { createServerRoutes } from '@umijs/server';
4
4
  export * from '@umijs/utils';
5
5
  export { httpProxyMiddleware, express };
6
+ //# sourceMappingURL=pluginUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluginUtils.d.ts","sourceRoot":"","sources":["../src/pluginUtils.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAC5D,OAAO,KAAK,mBAAmB,MAAM,uDAAuD,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC"}
@@ -1 +1,2 @@
1
1
  export declare function getCwd(): string;
2
+ //# sourceMappingURL=cwd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cwd.d.ts","sourceRoot":"","sources":["../../src/service/cwd.ts"],"names":[],"mappings":"AAEA,wBAAgB,MAAM,WAOrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=requireHook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requireHook.d.ts","sourceRoot":"","sources":["../../src/service/requireHook.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const path_1 = require("path");
4
+ const hookPropertyMap = new Map([
5
+ ['umi', (0, path_1.join)(__dirname, '../index.js')],
6
+ ['umi/plugin-utils', (0, path_1.join)(__dirname, '../../plugin-utils.js')],
7
+ ]);
8
+ const mod = require('module');
9
+ const resolveFilename = mod._resolveFilename;
10
+ mod._resolveFilename = function (request, parent, isMain, options) {
11
+ const hookResolved = hookPropertyMap.get(request);
12
+ if (hookResolved)
13
+ request = hookResolved;
14
+ return resolveFilename.call(mod, request, parent, isMain, options);
15
+ };
@@ -6,3 +6,4 @@ export declare class Service extends CoreService {
6
6
  args?: any;
7
7
  }): Promise<void>;
8
8
  }
9
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/service/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAMrD,qBAAa,OAAQ,SAAQ,WAAW;gBAC1B,IAAI,CAAC,EAAE,GAAG;IAsBhB,IAAI,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAA;KAAE;CAa9C"}
@@ -10,6 +10,11 @@ class Service extends core_1.Service {
10
10
  constructor(opts) {
11
11
  process.env.UMI_DIR = (0, path_1.dirname)(require.resolve('../../package'));
12
12
  const cwd = (0, cwd_1.getCwd)();
13
+ // Why?
14
+ // plugin import from umi but don't explicitly depend on it
15
+ // and we may also have old umi installed
16
+ // ref: https://github.com/umijs/umi/issues/8342#issuecomment-1182654076
17
+ require('./requireHook');
13
18
  super({
14
19
  ...opts,
15
20
  env: process.env.NODE_ENV,
package/dist/test.d.ts CHANGED
@@ -117,3 +117,4 @@ export declare function configUmiAlias(config: Config.InitialOptions): Promise<P
117
117
  watchman: boolean;
118
118
  watchPlugins: (string | [string, Record<string, unknown>])[];
119
119
  }>>;
120
+ //# sourceMappingURL=test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,cAAc,aAAa,CAAC;AAE5B,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,GAAG,EAAE,MAAM,GACV,MAAM,CAkBR;AAID,wBAAsB,WAAW,iBAShC;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAejE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umi",
3
- "version": "4.0.0-canary.20220713.1",
3
+ "version": "4.0.0-canary.20220718.1",
4
4
  "description": "umi",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/umi#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -38,15 +38,15 @@
38
38
  "test": "umi-scripts jest-turbo"
39
39
  },
40
40
  "dependencies": {
41
- "@umijs/bundler-utils": "4.0.0-canary.20220713.1",
42
- "@umijs/bundler-webpack": "4.0.0-canary.20220713.1",
43
- "@umijs/core": "4.0.0-canary.20220713.1",
44
- "@umijs/lint": "4.0.0-canary.20220713.1",
45
- "@umijs/preset-umi": "4.0.0-canary.20220713.1",
46
- "@umijs/renderer-react": "4.0.0-canary.20220713.1",
47
- "@umijs/server": "4.0.0-canary.20220713.1",
48
- "@umijs/test": "4.0.0-canary.20220713.1",
49
- "@umijs/utils": "4.0.0-canary.20220713.1",
41
+ "@umijs/bundler-utils": "4.0.0-canary.20220718.1",
42
+ "@umijs/bundler-webpack": "4.0.0-canary.20220718.1",
43
+ "@umijs/core": "4.0.0-canary.20220718.1",
44
+ "@umijs/lint": "4.0.0-canary.20220718.1",
45
+ "@umijs/preset-umi": "4.0.0-canary.20220718.1",
46
+ "@umijs/renderer-react": "4.0.0-canary.20220718.1",
47
+ "@umijs/server": "4.0.0-canary.20220718.1",
48
+ "@umijs/test": "4.0.0-canary.20220718.1",
49
+ "@umijs/utils": "4.0.0-canary.20220718.1",
50
50
  "prettier-plugin-organize-imports": "^2.3.4",
51
51
  "prettier-plugin-packagejson": "^2.2.17"
52
52
  },