@appshell/runtime 1.0.0-alpha.63 → 1.0.0-alpha.65
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/types/index.d.ts +1 -1
- package/dist/types/wire.d.ts +35 -3
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { ANONYMOUS, getIdentity } from './identity';
|
|
|
3
3
|
export type { Identity } from './identity';
|
|
4
4
|
export { hasVars, readVars, resetVars, setVars } from './store';
|
|
5
5
|
export type { Vars } from './types';
|
|
6
|
-
export type { AppshellIndex, AppshellRemote, Metadata } from './wire';
|
|
6
|
+
export type { AppshellIndex, AppshellRemote, Metadata, ModuleFederationLoader, RemoteLoader, } from './wire';
|
package/dist/types/wire.d.ts
CHANGED
|
@@ -12,14 +12,46 @@
|
|
|
12
12
|
*/
|
|
13
13
|
/** Arbitrary, application-defined description of a remote. Appshell never reads it. */
|
|
14
14
|
export type Metadata = Record<string, unknown>;
|
|
15
|
+
/**
|
|
16
|
+
* How a host loads a remote, named as one kind among possible kinds.
|
|
17
|
+
*
|
|
18
|
+
* scope, module and shareScope are Module Federation's vocabulary, and they used to sit
|
|
19
|
+
* at the top level of a remote where nothing said so — which is what would have made a
|
|
20
|
+
* second framework awkward, not the words themselves. Nested under a kind they are
|
|
21
|
+
* exactly correct, and something like single-spa slots beside them without reinterpreting
|
|
22
|
+
* anything already published.
|
|
23
|
+
*
|
|
24
|
+
* apiVersion follows the house style set by appshell.app.yaml, and the group is appshell's
|
|
25
|
+
* because appshell owns this schema: it decides which fields it stores, even though the
|
|
26
|
+
* fields describe federation concepts. If federation ever needs a different recipe that is
|
|
27
|
+
* a v2, and manifests published under v1 keep meaning what they meant — which matters,
|
|
28
|
+
* because they are immutable and hashed.
|
|
29
|
+
*/
|
|
30
|
+
export type ModuleFederationLoader = {
|
|
31
|
+
apiVersion: 'federation.appshell.org/v1';
|
|
32
|
+
kind: 'ModuleFederation';
|
|
33
|
+
scope: string;
|
|
34
|
+
module: string;
|
|
35
|
+
shareScope?: string;
|
|
36
|
+
/** The entry file the build emits, conventionally remoteEntry.js. */
|
|
37
|
+
filename: string;
|
|
38
|
+
/**
|
|
39
|
+
* What built this, recorded as a fact rather than a constraint.
|
|
40
|
+
*
|
|
41
|
+
* Deliberately not a version range. A range is a claim about the environment, and a
|
|
42
|
+
* package cannot make it: it knows what built it and not what will load it, and the
|
|
43
|
+
* host is what registers the remote. Freezing one into an immutable artifact is the
|
|
44
|
+
* same mistake as freezing its origin.
|
|
45
|
+
*/
|
|
46
|
+
builtWith?: string;
|
|
47
|
+
};
|
|
48
|
+
export type RemoteLoader = ModuleFederationLoader;
|
|
15
49
|
/** A remote the registry has already resolved, so the browser needs no manifest fetch. */
|
|
16
50
|
export type AppshellRemote<TMetadata = Metadata> = {
|
|
17
51
|
id: string;
|
|
18
52
|
manifestUrl: string;
|
|
19
53
|
remoteEntryUrl: string;
|
|
20
|
-
|
|
21
|
-
module: string;
|
|
22
|
-
shareScope?: string;
|
|
54
|
+
loader: RemoteLoader;
|
|
23
55
|
metadata: TMetadata;
|
|
24
56
|
};
|
|
25
57
|
/** Remote key to manifest url. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appshell/runtime",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.65",
|
|
4
4
|
"description": "The shared singleton that delivers a package's runtime configuration to it",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"appshell"
|
|
50
50
|
],
|
|
51
51
|
"license": "MIT",
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "1ce899539b6ab3063880835140a65e590c2dad21"
|
|
53
53
|
}
|