@umijs/core 4.0.62 → 4.0.64

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.
@@ -27,6 +27,7 @@ export declare class Service {
27
27
  framework?: IFrameworkType;
28
28
  prepare?: {
29
29
  buildResult: BuildResult;
30
+ fileImports?: Record<string, Declaration[]>;
30
31
  };
31
32
  [key: string]: any;
32
33
  };
@@ -144,4 +145,52 @@ export interface IServicePluginAPI {
144
145
  registerPresets: (presets: any[]) => void;
145
146
  registerPlugins: (plugins: (Plugin | {})[]) => void;
146
147
  }
148
+ declare type DeclareKind = 'value' | 'type';
149
+ declare type Declaration = {
150
+ type: 'ImportDeclaration';
151
+ source: string;
152
+ specifiers: Array<SimpleImportSpecifier>;
153
+ importKind: DeclareKind;
154
+ start: number;
155
+ end: number;
156
+ } | {
157
+ type: 'DynamicImport';
158
+ source: string;
159
+ start: number;
160
+ end: number;
161
+ } | {
162
+ type: 'ExportNamedDeclaration';
163
+ source: string;
164
+ specifiers: Array<SimpleExportSpecifier>;
165
+ exportKind: DeclareKind;
166
+ start: number;
167
+ end: number;
168
+ } | {
169
+ type: 'ExportAllDeclaration';
170
+ source: string;
171
+ start: number;
172
+ end: number;
173
+ };
174
+ declare type SimpleImportSpecifier = {
175
+ type: 'ImportDefaultSpecifier';
176
+ local: string;
177
+ } | {
178
+ type: 'ImportNamespaceSpecifier';
179
+ local: string;
180
+ imported: string;
181
+ } | {
182
+ type: 'ImportNamespaceSpecifier';
183
+ local?: string;
184
+ };
185
+ declare type SimpleExportSpecifier = {
186
+ type: 'ExportDefaultSpecifier';
187
+ exported: string;
188
+ } | {
189
+ type: 'ExportNamespaceSpecifier';
190
+ exported?: string;
191
+ } | {
192
+ type: 'ExportSpecifier';
193
+ exported: string;
194
+ local: string;
195
+ };
147
196
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/core",
3
- "version": "4.0.62",
3
+ "version": "4.0.64",
4
4
  "homepage": "https://github.com/umijs/umi/tree/master/packages/core#readme",
5
5
  "bugs": "https://github.com/umijs/umi/issues",
6
6
  "repository": {
@@ -15,8 +15,8 @@
15
15
  "compiled"
16
16
  ],
17
17
  "dependencies": {
18
- "@umijs/bundler-utils": "4.0.62",
19
- "@umijs/utils": "4.0.62"
18
+ "@umijs/bundler-utils": "4.0.64",
19
+ "@umijs/utils": "4.0.64"
20
20
  },
21
21
  "devDependencies": {
22
22
  "dotenv": "16.0.0",