@appshell/config 0.1.4-alpha.0
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/LICENSE +21 -0
- package/README.md +181 -0
- package/dist/main.js +8 -0
- package/dist/main.js.LICENSE.txt +10 -0
- package/dist/types/configmap.d.ts +7 -0
- package/dist/types/configmap.d.ts.map +1 -0
- package/dist/types/generate.d.ts +10 -0
- package/dist/types/generate.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/mappers/appshell.config.d.ts +3 -0
- package/dist/types/mappers/appshell.config.d.ts.map +1 -0
- package/dist/types/mappers/index.d.ts +2 -0
- package/dist/types/mappers/index.d.ts.map +1 -0
- package/dist/types/types.d.ts +206 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils/copy.d.ts +11 -0
- package/dist/types/utils/copy.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/list.d.ts +10 -0
- package/dist/types/utils/list.d.ts.map +1 -0
- package/dist/types/utils/load.d.ts +14 -0
- package/dist/types/utils/load.d.ts.map +1 -0
- package/dist/types/utils/merge.d.ts +4 -0
- package/dist/types/utils/merge.d.ts.map +1 -0
- package/dist/types/validators/appshell.config.d.ts +4 -0
- package/dist/types/validators/appshell.config.d.ts.map +1 -0
- package/dist/types/validators/appshell.manifest.d.ts +4 -0
- package/dist/types/validators/appshell.manifest.d.ts.map +1 -0
- package/dist/types/validators/index.d.ts +3 -0
- package/dist/types/validators/index.d.ts.map +1 -0
- package/package.json +31 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Lodash <https://lodash.com/>
|
|
4
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
5
|
+
* Released under MIT license <https://lodash.com/license>
|
|
6
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppshellConfig, ConfigMap } from './types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
apply: <T extends object>(obj: T, configMap: ConfigMap) => T;
|
|
4
|
+
create: (config: AppshellConfig<Record<string, unknown>>) => Record<string, string>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=configmap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configmap.d.ts","sourceRoot":"","sources":["../../src/configmap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;;;;;AAkDpD,wBAGE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AppshellManifest } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Compiles all configuration into an appshell manifest
|
|
4
|
+
* @param configsDir directory of configs to compile into an appshell manifest
|
|
5
|
+
* @param searchDepth depth to which app configs should be searched in configsDir
|
|
6
|
+
* @returns an appshell manifest
|
|
7
|
+
*/
|
|
8
|
+
declare const _default: <TMetadata extends Record<string, unknown>>(configsDir: string, searchDepth?: number) => AppshellManifest<TMetadata>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/generate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAI3C;;;;;GAKG;gFACoE,MAAM;AAA7E,wBAaE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @appshell/config package API
|
|
3
|
+
*/
|
|
4
|
+
export { default as configmap } from './configmap';
|
|
5
|
+
export { default as generate } from './generate';
|
|
6
|
+
export type { AppshellConfig, AppshellConfigRemote, AppshellManifest, AppshellRemote, ModuleFederationPluginOptions, Schema, } from './types';
|
|
7
|
+
export * as utils from './utils';
|
|
8
|
+
export * as validators from './validators';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,6BAA6B,EAC7B,MAAM,GACP,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AppshellConfig, AppshellManifest, ConfigMap } from '../types';
|
|
2
|
+
export declare const toAppshellManifest: <TMetadata extends Record<string, unknown>>(config: AppshellConfig, args: ConfigMap) => AppshellManifest<TMetadata>;
|
|
3
|
+
//# sourceMappingURL=appshell.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appshell.config.d.ts","sourceRoot":"","sources":["../../../src/mappers/appshell.config.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,cAAc,EAEd,gBAAgB,EAEhB,SAAS,EACV,MAAM,UAAU,CAAC;AAqDlB,eAAO,MAAM,kBAAkB,sDACrB,cAAc,QAChB,SAAS,gCAQhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mappers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { JSONSchema4, JSONSchema6, JSONSchema7 } from 'json-schema';
|
|
2
|
+
export type Schema = JSONSchema4 | JSONSchema6 | JSONSchema7;
|
|
3
|
+
export type ConfigValidator = {
|
|
4
|
+
validate: <T>(...config: T[]) => void;
|
|
5
|
+
};
|
|
6
|
+
export type ConfigMap = Record<string, string>;
|
|
7
|
+
export type AppshellConfigRemote<TMetadata = Record<string, unknown>> = {
|
|
8
|
+
id: string;
|
|
9
|
+
url: string;
|
|
10
|
+
metadata: TMetadata;
|
|
11
|
+
};
|
|
12
|
+
export type AppshellConfig<TMetadata = Record<string, unknown>> = {
|
|
13
|
+
name?: string;
|
|
14
|
+
remotes?: Record<string, AppshellConfigRemote<TMetadata>>;
|
|
15
|
+
module: ModuleFederationPluginOptions;
|
|
16
|
+
};
|
|
17
|
+
/** Appshell manifest types */
|
|
18
|
+
export type AppshellRemote<TMetadata = Record<string, unknown>> = {
|
|
19
|
+
id: string;
|
|
20
|
+
url: string;
|
|
21
|
+
scope: string;
|
|
22
|
+
module: string;
|
|
23
|
+
metadata: TMetadata;
|
|
24
|
+
};
|
|
25
|
+
export type AppshellManifest<TMetadata = Record<string, unknown>> = {
|
|
26
|
+
remotes: Record<string, AppshellRemote<TMetadata>>;
|
|
27
|
+
modules: Record<string, ModuleFederationPluginOptions>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Advanced configuration for modules that should be exposed by this container.
|
|
31
|
+
*/
|
|
32
|
+
export interface ExposesConfig {
|
|
33
|
+
/**
|
|
34
|
+
* Request to a module that should be exposed by this container.
|
|
35
|
+
*/
|
|
36
|
+
import: string | string[];
|
|
37
|
+
/**
|
|
38
|
+
* Custom chunk name for the exposed module.
|
|
39
|
+
*/
|
|
40
|
+
name?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ExposesObject {
|
|
43
|
+
[index: string]: string | ExposesConfig | string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.
|
|
47
|
+
*/
|
|
48
|
+
export interface LibraryCustomUmdCommentObject {
|
|
49
|
+
/**
|
|
50
|
+
* Set comment for `amd` section in UMD.
|
|
51
|
+
*/
|
|
52
|
+
amd?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Set comment for `commonjs` (exports) section in UMD.
|
|
55
|
+
*/
|
|
56
|
+
commonjs?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Set comment for `commonjs2` (module.exports) section in UMD.
|
|
59
|
+
*/
|
|
60
|
+
commonjs2?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Set comment for `root` (global variable) section in UMD.
|
|
63
|
+
*/
|
|
64
|
+
root?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Description object for all UMD variants of the library name.
|
|
68
|
+
*/
|
|
69
|
+
export interface LibraryCustomUmdObject {
|
|
70
|
+
/**
|
|
71
|
+
* Name of the exposed AMD library in the UMD.
|
|
72
|
+
*/
|
|
73
|
+
amd?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Name of the exposed commonjs export in the UMD.
|
|
76
|
+
*/
|
|
77
|
+
commonjs?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Name of the property exposed globally by a UMD library.
|
|
80
|
+
*/
|
|
81
|
+
root?: string | string[];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Options for library.
|
|
85
|
+
*/
|
|
86
|
+
export interface LibraryOptions {
|
|
87
|
+
/**
|
|
88
|
+
* Add a comment in the UMD wrapper.
|
|
89
|
+
*/
|
|
90
|
+
auxiliaryComment?: string | LibraryCustomUmdCommentObject;
|
|
91
|
+
/**
|
|
92
|
+
* Specify which export should be exposed as library.
|
|
93
|
+
*/
|
|
94
|
+
export?: string | string[];
|
|
95
|
+
/**
|
|
96
|
+
* The name of the library (some types allow unnamed libraries too).
|
|
97
|
+
*/
|
|
98
|
+
name?: string | string[] | LibraryCustomUmdObject;
|
|
99
|
+
/**
|
|
100
|
+
* Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
|
|
101
|
+
*/
|
|
102
|
+
type: string;
|
|
103
|
+
/**
|
|
104
|
+
* If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
|
|
105
|
+
*/
|
|
106
|
+
umdNamedDefine?: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface SharedConfig {
|
|
109
|
+
/**
|
|
110
|
+
* Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
|
|
111
|
+
*/
|
|
112
|
+
eager?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
|
|
115
|
+
*/
|
|
116
|
+
import?: string | false;
|
|
117
|
+
/**
|
|
118
|
+
* Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
|
|
119
|
+
*/
|
|
120
|
+
packageName?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Version requirement from module in share scope.
|
|
123
|
+
*/
|
|
124
|
+
requiredVersion?: string | false;
|
|
125
|
+
/**
|
|
126
|
+
* Module is looked up under this key from the share scope.
|
|
127
|
+
*/
|
|
128
|
+
shareKey?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Share scope name.
|
|
131
|
+
*/
|
|
132
|
+
shareScope?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Allow only a single version of the shared module in share scope (disabled by default).
|
|
135
|
+
*/
|
|
136
|
+
singleton?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
|
|
139
|
+
*/
|
|
140
|
+
strictVersion?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Version of the provided module. Will replace lower matching versions, but not higher.
|
|
143
|
+
*/
|
|
144
|
+
version?: string | false;
|
|
145
|
+
}
|
|
146
|
+
export interface SharedObject {
|
|
147
|
+
[index: string]: string | SharedConfig;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Advanced configuration for container locations from which modules should be resolved and loaded at runtime.
|
|
151
|
+
*/
|
|
152
|
+
export interface RemotesConfig {
|
|
153
|
+
/**
|
|
154
|
+
* Container locations from which modules should be resolved and loaded at runtime.
|
|
155
|
+
*/
|
|
156
|
+
external: string | string[];
|
|
157
|
+
/**
|
|
158
|
+
* The name of the share scope shared with this remote.
|
|
159
|
+
*/
|
|
160
|
+
shareScope?: string;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.
|
|
164
|
+
*/
|
|
165
|
+
export interface RemotesObject {
|
|
166
|
+
[index: string]: string | RemotesConfig | string[];
|
|
167
|
+
}
|
|
168
|
+
export interface ModuleFederationPluginOptions {
|
|
169
|
+
/**
|
|
170
|
+
* Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
|
|
171
|
+
*/
|
|
172
|
+
exposes?: (string | ExposesObject)[] | ExposesObject;
|
|
173
|
+
/**
|
|
174
|
+
* The filename of the container as relative path inside the `output.path` directory.
|
|
175
|
+
*/
|
|
176
|
+
filename?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Options for library.
|
|
179
|
+
*/
|
|
180
|
+
library?: LibraryOptions;
|
|
181
|
+
/**
|
|
182
|
+
* The name of the container.
|
|
183
|
+
*/
|
|
184
|
+
name?: string;
|
|
185
|
+
/**
|
|
186
|
+
* The external type of the remote containers.
|
|
187
|
+
*/
|
|
188
|
+
remoteType?: 'import' | 'var' | 'module' | 'assign' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | 'promise' | 'script' | 'node-commonjs' | string;
|
|
189
|
+
/**
|
|
190
|
+
* Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
|
|
191
|
+
*/
|
|
192
|
+
remotes?: (string | RemotesObject)[] | RemotesObject;
|
|
193
|
+
/**
|
|
194
|
+
* The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
|
|
195
|
+
*/
|
|
196
|
+
runtime?: string | false;
|
|
197
|
+
/**
|
|
198
|
+
* Share scope name used for all shared modules (defaults to 'default').
|
|
199
|
+
*/
|
|
200
|
+
shareScope?: string;
|
|
201
|
+
/**
|
|
202
|
+
* Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
|
|
203
|
+
*/
|
|
204
|
+
shared?: (string | SharedObject)[] | SharedObject;
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,MAAM,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAG/C,MAAM,MAAM,oBAAoB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAA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+
* Safely copies files and makes directories if they don't exist.
|
|
3
|
+
* @param pattern { from: @type string, to: @type string }
|
|
4
|
+
* @returns void
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: (pattern: {
|
|
7
|
+
from: string;
|
|
8
|
+
to: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=copy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../src/utils/copy.ts"],"names":[],"mappings":"AAGA;;;;GAIG;kCACsB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;AAArD,wBAOE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lists all files found in dirPath or its subdirectories
|
|
3
|
+
* @param dirPath directory to search
|
|
4
|
+
* @param depth depth to which the search should execute
|
|
5
|
+
* @param target filename to filter results on
|
|
6
|
+
* @returns list of paths for all files found
|
|
7
|
+
*/
|
|
8
|
+
declare const list: (dirPath: string, depth?: number, target?: string | RegExp) => string[];
|
|
9
|
+
export default list;
|
|
10
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/utils/list.ts"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AACH,QAAA,MAAM,IAAI,YAAa,MAAM,2BAAqB,MAAM,GAAG,MAAM,aAMhE,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the YAML file
|
|
3
|
+
* @param configPath to configuration file
|
|
4
|
+
* @returns a yaml object
|
|
5
|
+
*/
|
|
6
|
+
declare const load: <TSchema>(configPath: string) => TSchema;
|
|
7
|
+
/**
|
|
8
|
+
* Loads the YAML files specified by paths
|
|
9
|
+
* @param paths Paths to configurations to process
|
|
10
|
+
* @returns yaml objects
|
|
11
|
+
*/
|
|
12
|
+
export declare const loadAll: <TSchema>(...paths: string[]) => TSchema[];
|
|
13
|
+
export default load;
|
|
14
|
+
//# sourceMappingURL=load.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/utils/load.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,QAAA,MAAM,IAAI,wBAAyB,MAAM,YAWxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,sBAAuB,MAAM,EAAE,cAA+C,CAAC;AAEnG,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/utils/merge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;6CAUP,eAAe;AAAnD,wBAiBE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appshell.config.d.ts","sourceRoot":"","sources":["../../../src/validators/appshell.config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkB,eAAe,EAAE,MAAM,UAAU,CAAC;;AAgB3D,wBAcqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appshell.manifest.d.ts","sourceRoot":"","sources":["../../../src/validators/appshell.manifest.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,eAAe,EAAE,MAAM,UAAU,CAAC;;AAkB7D,wBAcqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/validators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@appshell/config",
|
|
3
|
+
"version": "0.1.4-alpha.0",
|
|
4
|
+
"description": "Utility for producing a global appshell manifest for module federation micro-frontends",
|
|
5
|
+
"main": "dist/main.js",
|
|
6
|
+
"types": "dist/types/index.d.ts",
|
|
7
|
+
"repository": "https://github.com/navaris/appshell.git",
|
|
8
|
+
"author": "Robert Hamilton <rh@navaris.com>",
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "restricted",
|
|
11
|
+
"registry": "https://registry.npmjs.org/"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "webpack --mode production && yarn build:types",
|
|
15
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
16
|
+
"clean": "rm -rf dist",
|
|
17
|
+
"generate": "node dist/generate.js",
|
|
18
|
+
"start": "webpack --watch --mode development && yarn build:types",
|
|
19
|
+
"stats": "webpack --json > stats.json"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"webpack",
|
|
26
|
+
"module federation",
|
|
27
|
+
"micro-frontends"
|
|
28
|
+
],
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"gitHead": "cd8667dbab1f1c8dec3873bc14282377fee78880"
|
|
31
|
+
}
|