@esmx/core 3.0.0-rc.59 → 3.0.0-rc.62
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/app.d.ts +27 -27
- package/dist/core.d.ts +274 -272
- package/dist/core.mjs +237 -235
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +0 -6
- package/dist/manifest-json.d.ts +8 -21
- package/dist/module-config.d.ts +39 -144
- package/dist/module-config.mjs +145 -57
- package/dist/module-config.test.mjs +620 -509
- package/dist/pack-config.d.ts +94 -94
- package/dist/render-context.d.ts +465 -465
- package/dist/render-context.mjs +338 -338
- package/dist/utils/cache.d.ts +15 -15
- package/dist/utils/import-map.d.ts +9 -5
- package/dist/utils/import-map.mjs +36 -23
- package/dist/utils/import-map.test.mjs +1139 -103
- package/dist/utils/middleware.d.ts +19 -19
- package/dist/utils/static-import-lexer.d.ts +12 -12
- package/dist/utils/static-import-lexer.mjs +1 -1
- package/package.json +3 -3
- package/src/app.ts +34 -34
- package/src/core.ts +323 -320
- package/src/index.ts +14 -9
- package/src/manifest-json.ts +8 -22
- package/src/module-config.test.ts +636 -637
- package/src/module-config.ts +242 -257
- package/src/pack-config.ts +94 -94
- package/src/render-context.ts +465 -465
- package/src/utils/cache.ts +15 -15
- package/src/utils/import-map.test.ts +1207 -110
- package/src/utils/import-map.ts +63 -29
- package/src/utils/middleware.ts +19 -19
- package/src/utils/static-import-lexer.ts +18 -18
package/src/index.ts
CHANGED
|
@@ -7,15 +7,21 @@ export {
|
|
|
7
7
|
type ScopesMap,
|
|
8
8
|
Esmx
|
|
9
9
|
} from './core';
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
export type {
|
|
11
|
+
ModuleConfig,
|
|
12
|
+
ModuleConfigImportMapping,
|
|
13
|
+
ModuleConfigExportExports,
|
|
14
|
+
ModuleConfigExportExport,
|
|
15
|
+
ModuleConfigExportObject,
|
|
16
|
+
ParsedModuleConfig,
|
|
17
|
+
ParsedModuleConfigExports,
|
|
18
|
+
ParsedModuleConfigExport,
|
|
19
|
+
ParsedModuleConfigEnvironment,
|
|
20
|
+
ParsedModuleConfigLink
|
|
14
21
|
} from './module-config';
|
|
15
|
-
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
parsePackConfig
|
|
22
|
+
export type {
|
|
23
|
+
PackConfig,
|
|
24
|
+
ParsedPackConfig
|
|
19
25
|
} from './pack-config';
|
|
20
26
|
export { type App, createApp } from './app';
|
|
21
27
|
export {
|
|
@@ -33,7 +39,6 @@ export {
|
|
|
33
39
|
export type {
|
|
34
40
|
ManifestJson,
|
|
35
41
|
ManifestJsonChunk,
|
|
36
|
-
ManifestJsonChunkSizes,
|
|
37
42
|
ManifestJsonChunks,
|
|
38
43
|
ManifestJsonExport,
|
|
39
44
|
ManifestJsonExports
|
package/src/manifest-json.ts
CHANGED
|
@@ -13,15 +13,20 @@ export interface ManifestJson {
|
|
|
13
13
|
* Import mappings
|
|
14
14
|
*/
|
|
15
15
|
imports: Record<string, string>;
|
|
16
|
+
/**
|
|
17
|
+
* Scope-specific import mappings
|
|
18
|
+
* Type: Record<scope name, import mappings within that scope>
|
|
19
|
+
*/
|
|
20
|
+
scopes: Record<string, Record<string, string>>;
|
|
16
21
|
/**
|
|
17
22
|
* Export item configuration
|
|
18
23
|
* Type: Record<export path, export item information>
|
|
19
24
|
*/
|
|
20
25
|
exports: ManifestJsonExports;
|
|
21
26
|
/**
|
|
22
|
-
* Build output
|
|
27
|
+
* Build output files
|
|
23
28
|
*/
|
|
24
|
-
|
|
29
|
+
files: string[];
|
|
25
30
|
/**
|
|
26
31
|
* Compiled file information
|
|
27
32
|
* Type: Record<source file, compilation information>
|
|
@@ -48,7 +53,7 @@ export interface ManifestJsonExport {
|
|
|
48
53
|
* - true: Rewrite to '{serviceName}/{exportName}' format
|
|
49
54
|
* - false: Maintain original import paths
|
|
50
55
|
*/
|
|
51
|
-
|
|
56
|
+
pkg: boolean;
|
|
52
57
|
/**
|
|
53
58
|
* File path corresponding to the export item
|
|
54
59
|
*/
|
|
@@ -75,25 +80,6 @@ export interface ManifestJsonChunk {
|
|
|
75
80
|
* Other resource files.
|
|
76
81
|
*/
|
|
77
82
|
resources: string[];
|
|
78
|
-
/**
|
|
79
|
-
* Build output sizes.
|
|
80
|
-
*/
|
|
81
|
-
sizes: ManifestJsonChunkSizes;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface ManifestJsonChunkSizes {
|
|
85
|
-
/**
|
|
86
|
-
* JavaScript file size in bytes
|
|
87
|
-
*/
|
|
88
|
-
js: number;
|
|
89
|
-
/**
|
|
90
|
-
* CSS file size in bytes
|
|
91
|
-
*/
|
|
92
|
-
css: number;
|
|
93
|
-
/**
|
|
94
|
-
* Resource file size in bytes
|
|
95
|
-
*/
|
|
96
|
-
resource: number;
|
|
97
83
|
}
|
|
98
84
|
|
|
99
85
|
/**
|