@vizejs/marquette 0.719.0 → 0.720.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/README.md +57 -0
- package/dist/native-build-model-Bc13fH9p.mjs +9 -0
- package/dist/native-build-model-Bc13fH9p.mjs.map +1 -0
- package/dist/native-build-model-D8hXpun_.d.mts +77 -0
- package/dist/native-build-model-D8hXpun_.d.mts.map +1 -0
- package/dist/native-build-profile.schema.json +86 -0
- package/dist/native-build-validate.d.mts +15 -0
- package/dist/native-build-validate.d.mts.map +1 -0
- package/dist/native-build-validate.mjs +140 -0
- package/dist/native-build-validate.mjs.map +1 -0
- package/dist/native-build.d.mts +12 -0
- package/dist/native-build.d.mts.map +1 -0
- package/dist/native-build.mjs +14 -0
- package/dist/native-build.mjs.map +1 -0
- package/dist/navigation.d.mts +40 -0
- package/dist/navigation.d.mts.map +1 -0
- package/dist/navigation.mjs +51 -0
- package/dist/navigation.mjs.map +1 -0
- package/package.json +17 -1
package/README.md
CHANGED
|
@@ -147,6 +147,61 @@ The canonical identifiers use the `native.*` namespace and are emitted in a
|
|
|
147
147
|
stable order. The helper returns fresh values so an adapter may add private
|
|
148
148
|
capabilities without changing the baseline used by another consumer.
|
|
149
149
|
|
|
150
|
+
## Native build profiles
|
|
151
|
+
|
|
152
|
+
Local and hosted native builders consume the same versioned profile. The
|
|
153
|
+
profile selects the application marquette environment, lifecycle
|
|
154
|
+
configuration, platform destinations, signing strategy, capability set, and
|
|
155
|
+
optional update channel without embedding an executor, credentials, or secret
|
|
156
|
+
values:
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
import { defineNativeBuildProfile } from "@vizejs/marquette/native-build";
|
|
160
|
+
|
|
161
|
+
export default defineNativeBuildProfile({
|
|
162
|
+
format: "vize.native-build-profile",
|
|
163
|
+
formatVersion: 1,
|
|
164
|
+
profile: "production",
|
|
165
|
+
configuration: "production",
|
|
166
|
+
environment: "native",
|
|
167
|
+
targets: [
|
|
168
|
+
{ platform: "android", destination: "store", signing: "automatic" },
|
|
169
|
+
{ platform: "ios", destination: "store", signing: "manual" },
|
|
170
|
+
],
|
|
171
|
+
capabilities: ["native.camera", "native.notifications"],
|
|
172
|
+
updates: { channel: "stable", runtimeVersion: "1.4.0" },
|
|
173
|
+
});
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Use `parseNativeBuildProfile` at an untrusted JSON boundary and
|
|
177
|
+
`validateNativeBuildProfile` before scheduling a build. Parsing rejects
|
|
178
|
+
unknown fields, including executor and secret fields. Validation produces
|
|
179
|
+
stable path-ordered diagnostics for portable identifiers, duplicate targets,
|
|
180
|
+
store signing and production policy, update compatibility, and capabilities.
|
|
181
|
+
The published profile schema is available from
|
|
182
|
+
`@vizejs/marquette/native-build/schema` and is embedded by the Rust contract
|
|
183
|
+
crate for native hosts.
|
|
184
|
+
|
|
185
|
+
## Typed navigation
|
|
186
|
+
|
|
187
|
+
`@vizejs/marquette/navigation` derives programmatic navigation directly from
|
|
188
|
+
the route literals in an application marquette. Full `:name` path segments
|
|
189
|
+
accept one string or finite number. A `*name` segment preserves path separators
|
|
190
|
+
while encoding each segment. The host adapter receives only a resolved route,
|
|
191
|
+
environment, and encoded path.
|
|
192
|
+
|
|
193
|
+
```ts
|
|
194
|
+
import { createMarquetteNavigator } from "@vizejs/marquette/navigation";
|
|
195
|
+
|
|
196
|
+
const navigation = createMarquetteNavigator(app, (target) => nativeHost.open(target));
|
|
197
|
+
|
|
198
|
+
navigation.navigate("profile", { userId: "a user" });
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Unknown routes and missing, extra, empty, or non-finite parameters are rejected
|
|
202
|
+
before the target-specific adapter runs. Route identifiers, required parameter
|
|
203
|
+
names, and the owning environment remain inferred from `app`.
|
|
204
|
+
|
|
150
205
|
## Test-run evidence
|
|
151
206
|
|
|
152
207
|
Release-bound test-run evidence records live in their own lazy entries so
|
|
@@ -200,6 +255,8 @@ available from `@vizejs/marquette/test-run/schema`, the decision contract from
|
|
|
200
255
|
`@vizejs/marquette/schema`.
|
|
201
256
|
- The published adapter manifest schema is available from
|
|
202
257
|
`@vizejs/marquette/adapter/schema`.
|
|
258
|
+
- The published native build profile schema is available from
|
|
259
|
+
`@vizejs/marquette/native-build/schema`.
|
|
203
260
|
- Every optional contract field documents its default in JSDoc.
|
|
204
261
|
- Package builds enforce a 1 KiB gzip budget for authoring entries and 3 KiB
|
|
205
262
|
or 4 KiB budgets for the validation entries.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/native-build-model.ts
|
|
2
|
+
/** Stable discriminator for serialized native build profiles. */
|
|
3
|
+
const NATIVE_BUILD_PROFILE_FORMAT = "vize.native-build-profile";
|
|
4
|
+
/** Current serialized native build profile version. */
|
|
5
|
+
const NATIVE_BUILD_PROFILE_FORMAT_VERSION = 1;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { NATIVE_BUILD_PROFILE_FORMAT_VERSION as n, NATIVE_BUILD_PROFILE_FORMAT as t };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=native-build-model-Bc13fH9p.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-build-model-Bc13fH9p.mjs","names":[],"sources":["../src/native-build-model.ts"],"sourcesContent":["/** Stable discriminator for serialized native build profiles. */\nexport const NATIVE_BUILD_PROFILE_FORMAT = \"vize.native-build-profile\" as const;\n\n/** Current serialized native build profile version. */\nexport const NATIVE_BUILD_PROFILE_FORMAT_VERSION = 1 as const;\n\n/** Native application platforms understood by the managed build contract. */\nexport type NativeBuildPlatform = \"android\" | \"ios\";\n\n/** Intended lifecycle stage of a native build. */\nexport type NativeBuildConfiguration = \"development\" | \"preview\" | \"production\";\n\n/** Installation or distribution destination produced by one target. */\nexport type NativeBuildDestination = \"simulator\" | \"device\" | \"store\";\n\n/** How signing material is selected without embedding credentials in the profile. */\nexport type NativeBuildSigning = \"none\" | \"automatic\" | \"manual\";\n\n/** One platform and destination emitted from a native build profile. */\nexport interface NativeBuildTarget {\n /** Native platform to build. */\n readonly platform: NativeBuildPlatform;\n /** Installation or distribution destination. */\n readonly destination: NativeBuildDestination;\n /**\n * Signing selection implemented by the local or hosted executor.\n *\n * Credentials are supplied out of band and never serialized here.\n *\n * @default \"none\"\n */\n readonly signing?: NativeBuildSigning;\n}\n\n/** Over-the-air update selection attached to a native build. */\nexport interface NativeBuildUpdateSelection {\n /** Portable rollout channel identifier. */\n readonly channel: string;\n /** Runtime compatibility version checked before applying an update. */\n readonly runtimeVersion: string;\n}\n\n/**\n * Language-neutral profile consumed unchanged by local and hosted native builders.\n *\n * Execution location, credentials, and secret values deliberately stay outside\n * this record so the exact same profile can be admitted by either executor.\n */\nexport interface NativeBuildProfile {\n /** Serialized record discriminator. */\n readonly format: typeof NATIVE_BUILD_PROFILE_FORMAT;\n /** Serialized contract version. */\n readonly formatVersion: typeof NATIVE_BUILD_PROFILE_FORMAT_VERSION;\n /** Stable profile identifier, such as `development` or `production`. */\n readonly profile: string;\n /** Intended lifecycle stage of the produced artifacts. */\n readonly configuration: NativeBuildConfiguration;\n /** Native environment identifier declared by the application marquette. */\n readonly environment: string;\n /** Non-empty platform and destination matrix. */\n readonly targets: readonly NativeBuildTarget[];\n /**\n * Native capabilities required by every target in this profile.\n *\n * @default []\n */\n readonly capabilities?: readonly string[];\n /** Optional over-the-air update compatibility selection. */\n readonly updates?: NativeBuildUpdateSelection;\n}\n\n/** Stable validation code for a native build profile. */\nexport type NativeBuildProfileDiagnosticCode =\n | \"invalid-format\"\n | \"invalid-format-version\"\n | \"invalid-profile-id\"\n | \"invalid-environment-id\"\n | \"missing-target\"\n | \"duplicate-target\"\n | \"store-requires-production\"\n | \"store-requires-signing\"\n | \"invalid-update-channel\"\n | \"invalid-runtime-version\"\n | \"invalid-capability-id\"\n | \"duplicate-capability\";\n\n/** Deterministic semantic validation diagnostic for a native build profile. */\nexport interface NativeBuildProfileDiagnostic {\n /** Stable machine-readable diagnostic code. */\n readonly code: NativeBuildProfileDiagnosticCode;\n /** JSON-style path of the invalid value. */\n readonly path: string;\n /** Human-readable explanation shared by every executor. */\n readonly message: string;\n}\n"],"mappings":";;AACA,MAAa,8BAA8B;;AAG3C,MAAa,sCAAsC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
//#region src/native-build-model.d.ts
|
|
2
|
+
/** Stable discriminator for serialized native build profiles. */
|
|
3
|
+
declare const NATIVE_BUILD_PROFILE_FORMAT: "vize.native-build-profile";
|
|
4
|
+
/** Current serialized native build profile version. */
|
|
5
|
+
declare const NATIVE_BUILD_PROFILE_FORMAT_VERSION: 1;
|
|
6
|
+
/** Native application platforms understood by the managed build contract. */
|
|
7
|
+
type NativeBuildPlatform = "android" | "ios";
|
|
8
|
+
/** Intended lifecycle stage of a native build. */
|
|
9
|
+
type NativeBuildConfiguration = "development" | "preview" | "production";
|
|
10
|
+
/** Installation or distribution destination produced by one target. */
|
|
11
|
+
type NativeBuildDestination = "simulator" | "device" | "store";
|
|
12
|
+
/** How signing material is selected without embedding credentials in the profile. */
|
|
13
|
+
type NativeBuildSigning = "none" | "automatic" | "manual";
|
|
14
|
+
/** One platform and destination emitted from a native build profile. */
|
|
15
|
+
interface NativeBuildTarget {
|
|
16
|
+
/** Native platform to build. */
|
|
17
|
+
readonly platform: NativeBuildPlatform;
|
|
18
|
+
/** Installation or distribution destination. */
|
|
19
|
+
readonly destination: NativeBuildDestination;
|
|
20
|
+
/**
|
|
21
|
+
* Signing selection implemented by the local or hosted executor.
|
|
22
|
+
*
|
|
23
|
+
* Credentials are supplied out of band and never serialized here.
|
|
24
|
+
*
|
|
25
|
+
* @default "none"
|
|
26
|
+
*/
|
|
27
|
+
readonly signing?: NativeBuildSigning;
|
|
28
|
+
}
|
|
29
|
+
/** Over-the-air update selection attached to a native build. */
|
|
30
|
+
interface NativeBuildUpdateSelection {
|
|
31
|
+
/** Portable rollout channel identifier. */
|
|
32
|
+
readonly channel: string;
|
|
33
|
+
/** Runtime compatibility version checked before applying an update. */
|
|
34
|
+
readonly runtimeVersion: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Language-neutral profile consumed unchanged by local and hosted native builders.
|
|
38
|
+
*
|
|
39
|
+
* Execution location, credentials, and secret values deliberately stay outside
|
|
40
|
+
* this record so the exact same profile can be admitted by either executor.
|
|
41
|
+
*/
|
|
42
|
+
interface NativeBuildProfile {
|
|
43
|
+
/** Serialized record discriminator. */
|
|
44
|
+
readonly format: typeof NATIVE_BUILD_PROFILE_FORMAT;
|
|
45
|
+
/** Serialized contract version. */
|
|
46
|
+
readonly formatVersion: typeof NATIVE_BUILD_PROFILE_FORMAT_VERSION;
|
|
47
|
+
/** Stable profile identifier, such as `development` or `production`. */
|
|
48
|
+
readonly profile: string;
|
|
49
|
+
/** Intended lifecycle stage of the produced artifacts. */
|
|
50
|
+
readonly configuration: NativeBuildConfiguration;
|
|
51
|
+
/** Native environment identifier declared by the application marquette. */
|
|
52
|
+
readonly environment: string;
|
|
53
|
+
/** Non-empty platform and destination matrix. */
|
|
54
|
+
readonly targets: readonly NativeBuildTarget[];
|
|
55
|
+
/**
|
|
56
|
+
* Native capabilities required by every target in this profile.
|
|
57
|
+
*
|
|
58
|
+
* @default []
|
|
59
|
+
*/
|
|
60
|
+
readonly capabilities?: readonly string[];
|
|
61
|
+
/** Optional over-the-air update compatibility selection. */
|
|
62
|
+
readonly updates?: NativeBuildUpdateSelection;
|
|
63
|
+
}
|
|
64
|
+
/** Stable validation code for a native build profile. */
|
|
65
|
+
type NativeBuildProfileDiagnosticCode = "invalid-format" | "invalid-format-version" | "invalid-profile-id" | "invalid-environment-id" | "missing-target" | "duplicate-target" | "store-requires-production" | "store-requires-signing" | "invalid-update-channel" | "invalid-runtime-version" | "invalid-capability-id" | "duplicate-capability";
|
|
66
|
+
/** Deterministic semantic validation diagnostic for a native build profile. */
|
|
67
|
+
interface NativeBuildProfileDiagnostic {
|
|
68
|
+
/** Stable machine-readable diagnostic code. */
|
|
69
|
+
readonly code: NativeBuildProfileDiagnosticCode;
|
|
70
|
+
/** JSON-style path of the invalid value. */
|
|
71
|
+
readonly path: string;
|
|
72
|
+
/** Human-readable explanation shared by every executor. */
|
|
73
|
+
readonly message: string;
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { NativeBuildPlatform as a, NativeBuildProfileDiagnosticCode as c, NativeBuildUpdateSelection as d, NativeBuildDestination as i, NativeBuildSigning as l, NATIVE_BUILD_PROFILE_FORMAT_VERSION as n, NativeBuildProfile as o, NativeBuildConfiguration as r, NativeBuildProfileDiagnostic as s, NATIVE_BUILD_PROFILE_FORMAT as t, NativeBuildTarget as u };
|
|
77
|
+
//# sourceMappingURL=native-build-model-D8hXpun_.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-build-model-D8hXpun_.d.mts","names":[],"sources":["../src/native-build-model.ts"],"mappings":";;cACa,2BAAA;;cAGA,mCAAA;;KAGD,mBAAA;AAHZ;AAAA,KAMY,wBAAA;;KAGA,sBAAA;AATiD;AAAA,KAYjD,kBAAA;;UAGK,iBAAA;EAZc;EAAA,SAcpB,QAAA,EAAU,mBAAA;EAXT;EAAA,SAaD,WAAA,EAAa,sBAAA;;;AAbY;AAGpC;;;;WAkBW,OAAA,GAAU,kBAAA;AAAA;;UAIJ,0BAAA;EAnBa;EAAA,SAqBnB,OAAA;EAlBM;EAAA,SAoBN,cAAc;AAAA;;;;;;;UASR,kBAAA;EAzBN;EAAA,SA2BA,MAAA,SAAe,2BAAA;EAnBf;EAAA,SAqBA,aAAA,SAAsB,mCAAA;EArBM;EAAA,SAuB5B,OAAA;EAnBM;EAAA,SAqBN,aAAA,EAAe,wBAAA;;WAEf,WAAA;EAnBc;EAAA,SAqBd,OAAA,WAAkB,iBAAA;EAZM;;;;;EAAA,SAkBxB,YAAA;EAEU;EAAA,SAAV,OAAA,GAAU,0BAAA;AAAA;;KAIT,gCAAA;;UAeK,4BAAA;EAjCN;EAAA,SAmCA,IAAA,EAAM,gCAAgC;EAjCvB;EAAA,SAmCf,IAAA;EA/BA;EAAA,SAiCA,OAAA;AAAA"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://vize.dev/schemas/native-build-profile-v1.json",
|
|
4
|
+
"title": "Vize native build profile",
|
|
5
|
+
"description": "A native build profile consumed unchanged by local and hosted executors.",
|
|
6
|
+
"$ref": "#/$defs/profile",
|
|
7
|
+
"$defs": {
|
|
8
|
+
"identifier": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*$"
|
|
11
|
+
},
|
|
12
|
+
"runtimeVersion": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[0-9A-Za-z][0-9A-Za-z._+-]*$"
|
|
15
|
+
},
|
|
16
|
+
"target": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["platform", "destination"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"platform": {
|
|
22
|
+
"enum": ["android", "ios"]
|
|
23
|
+
},
|
|
24
|
+
"destination": {
|
|
25
|
+
"enum": ["simulator", "device", "store"]
|
|
26
|
+
},
|
|
27
|
+
"signing": {
|
|
28
|
+
"enum": ["none", "automatic", "manual"],
|
|
29
|
+
"default": "none"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"updates": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["channel", "runtimeVersion"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"channel": {
|
|
39
|
+
"$ref": "#/$defs/identifier"
|
|
40
|
+
},
|
|
41
|
+
"runtimeVersion": {
|
|
42
|
+
"$ref": "#/$defs/runtimeVersion"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"profile": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"required": ["format", "formatVersion", "profile", "configuration", "environment", "targets"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"format": {
|
|
52
|
+
"const": "vize.native-build-profile"
|
|
53
|
+
},
|
|
54
|
+
"formatVersion": {
|
|
55
|
+
"const": 1
|
|
56
|
+
},
|
|
57
|
+
"profile": {
|
|
58
|
+
"$ref": "#/$defs/identifier"
|
|
59
|
+
},
|
|
60
|
+
"configuration": {
|
|
61
|
+
"enum": ["development", "preview", "production"]
|
|
62
|
+
},
|
|
63
|
+
"environment": {
|
|
64
|
+
"$ref": "#/$defs/identifier"
|
|
65
|
+
},
|
|
66
|
+
"targets": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"minItems": 1,
|
|
69
|
+
"items": {
|
|
70
|
+
"$ref": "#/$defs/target"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"capabilities": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"default": [],
|
|
76
|
+
"items": {
|
|
77
|
+
"$ref": "#/$defs/identifier"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"updates": {
|
|
81
|
+
"$ref": "#/$defs/updates"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { o as NativeBuildProfile, s as NativeBuildProfileDiagnostic } from "./native-build-model-D8hXpun_.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/native-build-validate.d.ts
|
|
4
|
+
/** Validates a native build profile without mutating it. */
|
|
5
|
+
declare function validateNativeBuildProfile(profile: NativeBuildProfile): NativeBuildProfileDiagnostic[];
|
|
6
|
+
/**
|
|
7
|
+
* Parses an untrusted native build profile with strict structural checks.
|
|
8
|
+
*
|
|
9
|
+
* Unknown fields and mismatched primitive or enum values throw before a local
|
|
10
|
+
* or hosted executor can inspect semantic diagnostics.
|
|
11
|
+
*/
|
|
12
|
+
declare function parseNativeBuildProfile(value: unknown): NativeBuildProfile;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { parseNativeBuildProfile, validateNativeBuildProfile };
|
|
15
|
+
//# sourceMappingURL=native-build-validate.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-build-validate.d.mts","names":[],"sources":["../src/native-build-validate.ts"],"mappings":";;;;iBA8BgB,0BAAA,CACd,OAAA,EAAS,kBAAA,GACR,4BAA4B;AAF/B;;;;;;AAAA,iBAuIgB,uBAAA,CAAwB,KAAA,YAAiB,kBAAkB"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import "./native-build-model-Bc13fH9p.mjs";
|
|
2
|
+
//#region src/native-build-validate.ts
|
|
3
|
+
const IDENTIFIER = /^[a-z0-9][a-z0-9._-]*$/;
|
|
4
|
+
const RUNTIME_VERSION = /^[0-9A-Za-z][0-9A-Za-z._+-]*$/;
|
|
5
|
+
const CONFIGURATIONS = new Set([
|
|
6
|
+
"development",
|
|
7
|
+
"preview",
|
|
8
|
+
"production"
|
|
9
|
+
]);
|
|
10
|
+
const PLATFORMS = new Set(["android", "ios"]);
|
|
11
|
+
const DESTINATIONS = new Set([
|
|
12
|
+
"simulator",
|
|
13
|
+
"device",
|
|
14
|
+
"store"
|
|
15
|
+
]);
|
|
16
|
+
const SIGNING_MODES = new Set([
|
|
17
|
+
"none",
|
|
18
|
+
"automatic",
|
|
19
|
+
"manual"
|
|
20
|
+
]);
|
|
21
|
+
const DIAGNOSTIC_ORDER = {
|
|
22
|
+
"invalid-format": 0,
|
|
23
|
+
"invalid-format-version": 1,
|
|
24
|
+
"invalid-profile-id": 2,
|
|
25
|
+
"invalid-environment-id": 3,
|
|
26
|
+
"missing-target": 4,
|
|
27
|
+
"duplicate-target": 5,
|
|
28
|
+
"store-requires-production": 6,
|
|
29
|
+
"store-requires-signing": 7,
|
|
30
|
+
"invalid-update-channel": 8,
|
|
31
|
+
"invalid-runtime-version": 9,
|
|
32
|
+
"invalid-capability-id": 10,
|
|
33
|
+
"duplicate-capability": 11
|
|
34
|
+
};
|
|
35
|
+
/** Validates a native build profile without mutating it. */
|
|
36
|
+
function validateNativeBuildProfile(profile) {
|
|
37
|
+
const diagnostics = [];
|
|
38
|
+
if (profile.format !== "vize.native-build-profile") diagnostics.push(diagnostic("invalid-format", "format", "unsupported native build profile format"));
|
|
39
|
+
if (profile.formatVersion !== 1) diagnostics.push(diagnostic("invalid-format-version", "formatVersion", "unsupported native build profile format version"));
|
|
40
|
+
if (!IDENTIFIER.test(profile.profile)) diagnostics.push(diagnostic("invalid-profile-id", "profile", "profile must be a lowercase portable identifier"));
|
|
41
|
+
if (!IDENTIFIER.test(profile.environment)) diagnostics.push(diagnostic("invalid-environment-id", "environment", "environment must be a lowercase portable identifier"));
|
|
42
|
+
if (profile.targets.length === 0) diagnostics.push(diagnostic("missing-target", "targets", "native build profile must declare a target"));
|
|
43
|
+
const seenTargets = /* @__PURE__ */ new Set();
|
|
44
|
+
for (const [index, target] of profile.targets.entries()) {
|
|
45
|
+
const path = `targets.${index}`;
|
|
46
|
+
const key = `${target.platform}:${target.destination}`;
|
|
47
|
+
if (seenTargets.has(key)) diagnostics.push(diagnostic("duplicate-target", path, "platform and destination must be unique within the native build profile"));
|
|
48
|
+
seenTargets.add(key);
|
|
49
|
+
if (target.destination === "store" && profile.configuration !== "production") diagnostics.push(diagnostic("store-requires-production", path, "store targets require the production configuration"));
|
|
50
|
+
if (target.destination === "store" && (target.signing ?? "none") === "none") diagnostics.push(diagnostic("store-requires-signing", `${path}.signing`, "store targets require automatic or manual signing"));
|
|
51
|
+
}
|
|
52
|
+
if (profile.updates !== void 0) {
|
|
53
|
+
if (!IDENTIFIER.test(profile.updates.channel)) diagnostics.push(diagnostic("invalid-update-channel", "updates.channel", "update channel must be a lowercase portable identifier"));
|
|
54
|
+
if (!RUNTIME_VERSION.test(profile.updates.runtimeVersion)) diagnostics.push(diagnostic("invalid-runtime-version", "updates.runtimeVersion", "runtime version must be a portable non-empty version token"));
|
|
55
|
+
}
|
|
56
|
+
const seenCapabilities = /* @__PURE__ */ new Set();
|
|
57
|
+
for (const [index, capability] of (profile.capabilities ?? []).entries()) {
|
|
58
|
+
const path = `capabilities.${index}`;
|
|
59
|
+
if (!IDENTIFIER.test(capability)) diagnostics.push(diagnostic("invalid-capability-id", path, "capability id must be a lowercase portable identifier"));
|
|
60
|
+
if (seenCapabilities.has(capability)) diagnostics.push(diagnostic("duplicate-capability", path, "capability id must be unique within the native build profile"));
|
|
61
|
+
seenCapabilities.add(capability);
|
|
62
|
+
}
|
|
63
|
+
return diagnostics.sort((left, right) => compareText(left.path, right.path) || DIAGNOSTIC_ORDER[left.code] - DIAGNOSTIC_ORDER[right.code] || compareText(left.message, right.message));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Parses an untrusted native build profile with strict structural checks.
|
|
67
|
+
*
|
|
68
|
+
* Unknown fields and mismatched primitive or enum values throw before a local
|
|
69
|
+
* or hosted executor can inspect semantic diagnostics.
|
|
70
|
+
*/
|
|
71
|
+
function parseNativeBuildProfile(value) {
|
|
72
|
+
assertRecord(value, "profile");
|
|
73
|
+
assertKnownFields(value, [
|
|
74
|
+
"format",
|
|
75
|
+
"formatVersion",
|
|
76
|
+
"profile",
|
|
77
|
+
"configuration",
|
|
78
|
+
"environment",
|
|
79
|
+
"targets",
|
|
80
|
+
"capabilities",
|
|
81
|
+
"updates"
|
|
82
|
+
], "profile");
|
|
83
|
+
assertString(value.format, "format");
|
|
84
|
+
if (typeof value.formatVersion !== "number" || !Number.isSafeInteger(value.formatVersion) || value.formatVersion < 0) throw new TypeError("formatVersion must be a safe integer");
|
|
85
|
+
assertString(value.profile, "profile");
|
|
86
|
+
assertEnum(value.configuration, CONFIGURATIONS, "configuration");
|
|
87
|
+
assertString(value.environment, "environment");
|
|
88
|
+
if (!Array.isArray(value.targets)) throw new TypeError("targets must be an array");
|
|
89
|
+
for (const [index, target] of value.targets.entries()) {
|
|
90
|
+
const path = `targets.${index}`;
|
|
91
|
+
assertRecord(target, path);
|
|
92
|
+
assertKnownFields(target, [
|
|
93
|
+
"platform",
|
|
94
|
+
"destination",
|
|
95
|
+
"signing"
|
|
96
|
+
], path);
|
|
97
|
+
assertEnum(target.platform, PLATFORMS, `${path}.platform`);
|
|
98
|
+
assertEnum(target.destination, DESTINATIONS, `${path}.destination`);
|
|
99
|
+
if (target.signing !== void 0) assertEnum(target.signing, SIGNING_MODES, `${path}.signing`);
|
|
100
|
+
}
|
|
101
|
+
if (value.capabilities !== void 0) {
|
|
102
|
+
if (!Array.isArray(value.capabilities)) throw new TypeError("capabilities must be an array");
|
|
103
|
+
for (const [index, capability] of value.capabilities.entries()) assertString(capability, `capabilities.${index}`);
|
|
104
|
+
}
|
|
105
|
+
if (value.updates !== void 0) {
|
|
106
|
+
assertRecord(value.updates, "updates");
|
|
107
|
+
assertKnownFields(value.updates, ["channel", "runtimeVersion"], "updates");
|
|
108
|
+
assertString(value.updates.channel, "updates.channel");
|
|
109
|
+
assertString(value.updates.runtimeVersion, "updates.runtimeVersion");
|
|
110
|
+
}
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
function diagnostic(code, path, message) {
|
|
114
|
+
return {
|
|
115
|
+
code,
|
|
116
|
+
path,
|
|
117
|
+
message
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function assertRecord(value, path) {
|
|
121
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) throw new TypeError(`${path} must be an object`);
|
|
122
|
+
}
|
|
123
|
+
function assertKnownFields(value, expected, path) {
|
|
124
|
+
const known = new Set(expected);
|
|
125
|
+
const unknown = Object.keys(value).find((field) => !known.has(field));
|
|
126
|
+
if (unknown !== void 0) throw new TypeError(`${path} has unknown field ${unknown}`);
|
|
127
|
+
}
|
|
128
|
+
function assertString(value, path) {
|
|
129
|
+
if (typeof value !== "string") throw new TypeError(`${path} must be a string`);
|
|
130
|
+
}
|
|
131
|
+
function assertEnum(value, expected, path) {
|
|
132
|
+
if (typeof value !== "string" || !expected.has(value)) throw new TypeError(`${path} must be a supported string value`);
|
|
133
|
+
}
|
|
134
|
+
function compareText(left, right) {
|
|
135
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { parseNativeBuildProfile, validateNativeBuildProfile };
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=native-build-validate.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-build-validate.mjs","names":[],"sources":["../src/native-build-validate.ts"],"sourcesContent":["import {\n NATIVE_BUILD_PROFILE_FORMAT,\n NATIVE_BUILD_PROFILE_FORMAT_VERSION,\n type NativeBuildProfile,\n type NativeBuildProfileDiagnostic,\n type NativeBuildProfileDiagnosticCode,\n} from \"./native-build-model.js\";\n\nconst IDENTIFIER = /^[a-z0-9][a-z0-9._-]*$/;\nconst RUNTIME_VERSION = /^[0-9A-Za-z][0-9A-Za-z._+-]*$/;\nconst CONFIGURATIONS = new Set([\"development\", \"preview\", \"production\"]);\nconst PLATFORMS = new Set([\"android\", \"ios\"]);\nconst DESTINATIONS = new Set([\"simulator\", \"device\", \"store\"]);\nconst SIGNING_MODES = new Set([\"none\", \"automatic\", \"manual\"]);\nconst DIAGNOSTIC_ORDER: Record<NativeBuildProfileDiagnosticCode, number> = {\n \"invalid-format\": 0,\n \"invalid-format-version\": 1,\n \"invalid-profile-id\": 2,\n \"invalid-environment-id\": 3,\n \"missing-target\": 4,\n \"duplicate-target\": 5,\n \"store-requires-production\": 6,\n \"store-requires-signing\": 7,\n \"invalid-update-channel\": 8,\n \"invalid-runtime-version\": 9,\n \"invalid-capability-id\": 10,\n \"duplicate-capability\": 11,\n};\n\n/** Validates a native build profile without mutating it. */\nexport function validateNativeBuildProfile(\n profile: NativeBuildProfile,\n): NativeBuildProfileDiagnostic[] {\n const diagnostics: NativeBuildProfileDiagnostic[] = [];\n if (profile.format !== NATIVE_BUILD_PROFILE_FORMAT) {\n diagnostics.push(\n diagnostic(\"invalid-format\", \"format\", \"unsupported native build profile format\"),\n );\n }\n if (profile.formatVersion !== NATIVE_BUILD_PROFILE_FORMAT_VERSION) {\n diagnostics.push(\n diagnostic(\n \"invalid-format-version\",\n \"formatVersion\",\n \"unsupported native build profile format version\",\n ),\n );\n }\n if (!IDENTIFIER.test(profile.profile)) {\n diagnostics.push(\n diagnostic(\n \"invalid-profile-id\",\n \"profile\",\n \"profile must be a lowercase portable identifier\",\n ),\n );\n }\n if (!IDENTIFIER.test(profile.environment)) {\n diagnostics.push(\n diagnostic(\n \"invalid-environment-id\",\n \"environment\",\n \"environment must be a lowercase portable identifier\",\n ),\n );\n }\n if (profile.targets.length === 0) {\n diagnostics.push(\n diagnostic(\"missing-target\", \"targets\", \"native build profile must declare a target\"),\n );\n }\n\n const seenTargets = new Set<string>();\n for (const [index, target] of profile.targets.entries()) {\n const path = `targets.${index}`;\n const key = `${target.platform}:${target.destination}`;\n if (seenTargets.has(key)) {\n diagnostics.push(\n diagnostic(\n \"duplicate-target\",\n path,\n \"platform and destination must be unique within the native build profile\",\n ),\n );\n }\n seenTargets.add(key);\n if (target.destination === \"store\" && profile.configuration !== \"production\") {\n diagnostics.push(\n diagnostic(\n \"store-requires-production\",\n path,\n \"store targets require the production configuration\",\n ),\n );\n }\n if (target.destination === \"store\" && (target.signing ?? \"none\") === \"none\") {\n diagnostics.push(\n diagnostic(\n \"store-requires-signing\",\n `${path}.signing`,\n \"store targets require automatic or manual signing\",\n ),\n );\n }\n }\n\n if (profile.updates !== undefined) {\n if (!IDENTIFIER.test(profile.updates.channel)) {\n diagnostics.push(\n diagnostic(\n \"invalid-update-channel\",\n \"updates.channel\",\n \"update channel must be a lowercase portable identifier\",\n ),\n );\n }\n if (!RUNTIME_VERSION.test(profile.updates.runtimeVersion)) {\n diagnostics.push(\n diagnostic(\n \"invalid-runtime-version\",\n \"updates.runtimeVersion\",\n \"runtime version must be a portable non-empty version token\",\n ),\n );\n }\n }\n\n const seenCapabilities = new Set<string>();\n for (const [index, capability] of (profile.capabilities ?? []).entries()) {\n const path = `capabilities.${index}`;\n if (!IDENTIFIER.test(capability)) {\n diagnostics.push(\n diagnostic(\n \"invalid-capability-id\",\n path,\n \"capability id must be a lowercase portable identifier\",\n ),\n );\n }\n if (seenCapabilities.has(capability)) {\n diagnostics.push(\n diagnostic(\n \"duplicate-capability\",\n path,\n \"capability id must be unique within the native build profile\",\n ),\n );\n }\n seenCapabilities.add(capability);\n }\n\n return diagnostics.sort(\n (left, right) =>\n compareText(left.path, right.path) ||\n DIAGNOSTIC_ORDER[left.code] - DIAGNOSTIC_ORDER[right.code] ||\n compareText(left.message, right.message),\n );\n}\n\n/**\n * Parses an untrusted native build profile with strict structural checks.\n *\n * Unknown fields and mismatched primitive or enum values throw before a local\n * or hosted executor can inspect semantic diagnostics.\n */\nexport function parseNativeBuildProfile(value: unknown): NativeBuildProfile {\n assertRecord(value, \"profile\");\n assertKnownFields(\n value,\n [\n \"format\",\n \"formatVersion\",\n \"profile\",\n \"configuration\",\n \"environment\",\n \"targets\",\n \"capabilities\",\n \"updates\",\n ],\n \"profile\",\n );\n assertString(value.format, \"format\");\n if (\n typeof value.formatVersion !== \"number\" ||\n !Number.isSafeInteger(value.formatVersion) ||\n value.formatVersion < 0\n ) {\n throw new TypeError(\"formatVersion must be a safe integer\");\n }\n assertString(value.profile, \"profile\");\n assertEnum(value.configuration, CONFIGURATIONS, \"configuration\");\n assertString(value.environment, \"environment\");\n if (!Array.isArray(value.targets)) throw new TypeError(\"targets must be an array\");\n for (const [index, target] of value.targets.entries()) {\n const path = `targets.${index}`;\n assertRecord(target, path);\n assertKnownFields(target, [\"platform\", \"destination\", \"signing\"], path);\n assertEnum(target.platform, PLATFORMS, `${path}.platform`);\n assertEnum(target.destination, DESTINATIONS, `${path}.destination`);\n if (target.signing !== undefined) {\n assertEnum(target.signing, SIGNING_MODES, `${path}.signing`);\n }\n }\n if (value.capabilities !== undefined) {\n if (!Array.isArray(value.capabilities)) {\n throw new TypeError(\"capabilities must be an array\");\n }\n for (const [index, capability] of value.capabilities.entries()) {\n assertString(capability, `capabilities.${index}`);\n }\n }\n if (value.updates !== undefined) {\n assertRecord(value.updates, \"updates\");\n assertKnownFields(value.updates, [\"channel\", \"runtimeVersion\"], \"updates\");\n assertString(value.updates.channel, \"updates.channel\");\n assertString(value.updates.runtimeVersion, \"updates.runtimeVersion\");\n }\n return value as unknown as NativeBuildProfile;\n}\n\nfunction diagnostic(\n code: NativeBuildProfileDiagnosticCode,\n path: string,\n message: string,\n): NativeBuildProfileDiagnostic {\n return { code, path, message };\n}\n\nfunction assertRecord(value: unknown, path: string): asserts value is Record<string, unknown> {\n if (value == null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new TypeError(`${path} must be an object`);\n }\n}\n\nfunction assertKnownFields(\n value: Record<string, unknown>,\n expected: readonly string[],\n path: string,\n): void {\n const known = new Set(expected);\n const unknown = Object.keys(value).find((field) => !known.has(field));\n if (unknown !== undefined) throw new TypeError(`${path} has unknown field ${unknown}`);\n}\n\nfunction assertString(value: unknown, path: string): asserts value is string {\n if (typeof value !== \"string\") throw new TypeError(`${path} must be a string`);\n}\n\nfunction assertEnum(value: unknown, expected: ReadonlySet<string>, path: string): void {\n if (typeof value !== \"string\" || !expected.has(value)) {\n throw new TypeError(`${path} must be a supported string value`);\n }\n}\n\nfunction compareText(left: string, right: string): number {\n return left < right ? -1 : left > right ? 1 : 0;\n}\n"],"mappings":";;AAQA,MAAM,aAAa;AACnB,MAAM,kBAAkB;AACxB,MAAM,iBAAiB,IAAI,IAAI;CAAC;CAAe;CAAW;AAAY,CAAC;AACvE,MAAM,YAAY,IAAI,IAAI,CAAC,WAAW,KAAK,CAAC;AAC5C,MAAM,eAAe,IAAI,IAAI;CAAC;CAAa;CAAU;AAAO,CAAC;AAC7D,MAAM,gBAAgB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,UAAU,GAAG,KAAK,kBAAkB;AAC/E;AAEA,SAAS,WAAW,OAAgB,UAA+B,MAAoB;CACrF,IAAI,OAAO,UAAU,YAAY,CAAC,SAAS,IAAI,KAAK,GAClD,MAAM,IAAI,UAAU,GAAG,KAAK,kCAAkC;AAElE;AAEA,SAAS,YAAY,MAAc,OAAuB;CACxD,OAAO,OAAO,QAAQ,KAAK,OAAO,QAAQ,IAAI;AAChD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { a as NativeBuildPlatform, c as NativeBuildProfileDiagnosticCode, d as NativeBuildUpdateSelection, i as NativeBuildDestination, l as NativeBuildSigning, n as NATIVE_BUILD_PROFILE_FORMAT_VERSION, o as NativeBuildProfile, r as NativeBuildConfiguration, s as NativeBuildProfileDiagnostic, t as NATIVE_BUILD_PROFILE_FORMAT, u as NativeBuildTarget } from "./native-build-model-D8hXpun_.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/native-build.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Preserves literal profile, environment, platform, and capability types.
|
|
6
|
+
*
|
|
7
|
+
* The function returns its input unchanged so authoring has no runtime cost.
|
|
8
|
+
*/
|
|
9
|
+
declare function defineNativeBuildProfile<const Profile extends NativeBuildProfile>(profile: Profile): Profile;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { NATIVE_BUILD_PROFILE_FORMAT, NATIVE_BUILD_PROFILE_FORMAT_VERSION, type NativeBuildConfiguration, type NativeBuildDestination, type NativeBuildPlatform, type NativeBuildProfile, type NativeBuildProfileDiagnostic, type NativeBuildProfileDiagnosticCode, type NativeBuildSigning, type NativeBuildTarget, type NativeBuildUpdateSelection, defineNativeBuildProfile };
|
|
12
|
+
//# sourceMappingURL=native-build.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-build.d.mts","names":[],"sources":["../src/native-build.ts"],"mappings":";;;;AAqBA;;;;iBAAgB,wBAAA,uBAA+C,kBAAA,EAC7D,OAAA,EAAS,OAAA,GACR,OAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { n as NATIVE_BUILD_PROFILE_FORMAT_VERSION, t as NATIVE_BUILD_PROFILE_FORMAT } from "./native-build-model-Bc13fH9p.mjs";
|
|
2
|
+
//#region src/native-build.ts
|
|
3
|
+
/**
|
|
4
|
+
* Preserves literal profile, environment, platform, and capability types.
|
|
5
|
+
*
|
|
6
|
+
* The function returns its input unchanged so authoring has no runtime cost.
|
|
7
|
+
*/
|
|
8
|
+
function defineNativeBuildProfile(profile) {
|
|
9
|
+
return profile;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { NATIVE_BUILD_PROFILE_FORMAT, NATIVE_BUILD_PROFILE_FORMAT_VERSION, defineNativeBuildProfile };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=native-build.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-build.mjs","names":[],"sources":["../src/native-build.ts"],"sourcesContent":["export {\n NATIVE_BUILD_PROFILE_FORMAT,\n NATIVE_BUILD_PROFILE_FORMAT_VERSION,\n type NativeBuildConfiguration,\n type NativeBuildDestination,\n type NativeBuildPlatform,\n type NativeBuildProfile,\n type NativeBuildProfileDiagnostic,\n type NativeBuildProfileDiagnosticCode,\n type NativeBuildSigning,\n type NativeBuildTarget,\n type NativeBuildUpdateSelection,\n} from \"./native-build-model.js\";\n\nimport type { NativeBuildProfile } from \"./native-build-model.js\";\n\n/**\n * Preserves literal profile, environment, platform, and capability types.\n *\n * The function returns its input unchanged so authoring has no runtime cost.\n */\nexport function defineNativeBuildProfile<const Profile extends NativeBuildProfile>(\n profile: Profile,\n): Profile {\n return profile;\n}\n"],"mappings":";;;;;;;AAqBA,SAAgB,yBACd,SACS;CACT,OAAO;AACT"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { _ as RouteId, f as MarquetteRoute, t as ApplicationMarquette } from "./model-B_mM8AeH.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/navigation.d.ts
|
|
4
|
+
/** Scalar accepted by one authored route-path parameter. */
|
|
5
|
+
type NavigationParameter = string | number;
|
|
6
|
+
type DeclaredRoute<Marquette extends ApplicationMarquette> = Marquette extends {
|
|
7
|
+
readonly routes: readonly (infer Route extends MarquetteRoute)[];
|
|
8
|
+
} ? Route : never;
|
|
9
|
+
type RouteFor<Marquette extends ApplicationMarquette, Id extends RouteId<Marquette>> = Extract<DeclaredRoute<Marquette>, {
|
|
10
|
+
readonly id: Id;
|
|
11
|
+
}>;
|
|
12
|
+
type RoutePath<Marquette extends ApplicationMarquette, Id extends RouteId<Marquette>> = RouteFor<Marquette, Id>["path"];
|
|
13
|
+
type SegmentParameter<Segment extends string> = Segment extends `:${infer Name}` ? Name extends "" ? never : Name : Segment extends `*${infer Name}` ? Name extends "" ? never : Name : never;
|
|
14
|
+
type PathParameter<Path extends string> = Path extends `${infer Segment}/${infer Rest}` ? SegmentParameter<Segment> | PathParameter<Rest> : SegmentParameter<Path>;
|
|
15
|
+
/** Exact route parameters inferred from full `:name` and `*name` path segments. */
|
|
16
|
+
type NavigationParameters<Marquette extends ApplicationMarquette, Id extends RouteId<Marquette>> = { readonly [Name in PathParameter<RoutePath<Marquette, Id>>]: NavigationParameter };
|
|
17
|
+
type NavigationArguments<Marquette extends ApplicationMarquette, Id extends RouteId<Marquette>> = [PathParameter<RoutePath<Marquette, Id>>] extends [never] ? [] : [parameters: NavigationParameters<Marquette, Id>];
|
|
18
|
+
/** Target passed to a host adapter after route parameters are encoded. */
|
|
19
|
+
type ResolvedNavigationTarget<Marquette extends ApplicationMarquette, Id extends RouteId<Marquette> = RouteId<Marquette>> = Id extends RouteId<Marquette> ? {
|
|
20
|
+
/** Authored route identifier. */readonly route: Id; /** Environment that owns the target view. */
|
|
21
|
+
readonly environment: RouteFor<Marquette, Id>["environment"]; /** Resolved path with every parameter percent-encoded. */
|
|
22
|
+
readonly path: `/${string}`;
|
|
23
|
+
} : never;
|
|
24
|
+
/** Programmatic navigation surface inferred from one application marquette. */
|
|
25
|
+
interface MarquetteNavigator<Marquette extends ApplicationMarquette, Result> {
|
|
26
|
+
/** Resolve and deliver one route to the target-specific host adapter. */
|
|
27
|
+
readonly navigate: <const Id extends RouteId<Marquette>>(route: Id, ...arguments_: NavigationArguments<Marquette, Id>) => Result;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Creates a target-neutral, fully inferred programmatic navigator.
|
|
31
|
+
*
|
|
32
|
+
* A `:name` segment accepts one scalar and is encoded as one path segment. A
|
|
33
|
+
* `*name` segment also accepts a scalar, but preserves `/` between its encoded
|
|
34
|
+
* segments. Unknown routes, missing parameters, extra parameters, empty
|
|
35
|
+
* strings, and non-finite numbers fail before the host adapter runs.
|
|
36
|
+
*/
|
|
37
|
+
declare function createMarquetteNavigator<const Marquette extends ApplicationMarquette, Result>(marquette: Marquette, visit: (target: ResolvedNavigationTarget<Marquette>) => Result): MarquetteNavigator<Marquette, Result>;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { MarquetteNavigator, NavigationParameter, NavigationParameters, ResolvedNavigationTarget, createMarquetteNavigator };
|
|
40
|
+
//# sourceMappingURL=navigation.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.mts","names":[],"sources":["../src/navigation.ts"],"mappings":";;;;KAGY,mBAAA;AAAA,KAEP,aAAA,mBAAgC,oBAAA,IAAwB,SAAA;EAAA,SAClD,MAAA,gCAAsC,cAAA;AAAA,IAE7C,KAAA;AAAA,KAGC,QAAA,mBAA2B,oBAAA,aAAiC,OAAA,CAAQ,SAAA,KAAc,OAAA,CACrF,aAAA,CAAc,SAAA;EAAA,SACH,EAAA,EAAI,EAAA;AAAA;AAAA,KAGZ,SAAA,mBAA4B,oBAAA,aAAiC,OAAA,CAAQ,SAAA,KAAc,QAAA,CACtF,SAAA,EACA,EAAA;AAAA,KAGG,gBAAA,2BAA2C,OAAA,4BAC5C,IAAA,sBAEE,IAAA,GACF,OAAO,4BACL,IAAA,sBAEE,IAAA;AAAA,KAGH,aAAA,wBAAqC,IAAA,4CACtC,gBAAA,CAAiB,OAAA,IAAW,aAAA,CAAc,IAAA,IAC1C,gBAAA,CAAiB,IAAA;;KAGT,oBAAA,mBACQ,oBAAA,aACP,OAAA,CAAQ,SAAA,yBAED,aAAA,CAAc,SAAA,CAAU,SAAA,EAAW,EAAA,KAAO,mBAAA;AAAA,KAGzD,mBAAA,mBAAsC,oBAAA,aAAiC,OAAA,CAAQ,SAAA,MAClF,aAAA,CAAc,SAAA,CAAU,SAAA,EAAW,EAAA,4BAGhC,UAAA,EAAY,oBAAA,CAAqB,SAAA,EAAW,EAAA;;KAGrC,wBAAA,mBACQ,oBAAA,aACP,OAAA,CAAQ,SAAA,IAAa,OAAA,CAAQ,SAAA,KAExC,EAAA,SAAW,OAAA,CAAQ,SAAA;EAhD4B,0CAmDhC,KAAA,EAAO,EAAA,EAjDf;EAAA,SAmDQ,WAAA,EAAa,QAAA,CAAS,SAAA,EAAW,EAAA,kBAhD7C;EAAA,SAkDY,IAAA;AAAA;;UAKA,kBAAA,mBAAqC,oBAAA;EAvDW;EAAA,SAyDtD,QAAA,oBAA4B,OAAA,CAAQ,SAAA,GAC3C,KAAA,EAAO,EAAA,KACJ,UAAA,EAAY,mBAAA,CAAoB,SAAA,EAAW,EAAA,MAC3C,MAAA;AAAA;;;;;;;;;iBAWS,wBAAA,yBAAiD,oBAAA,UAC/D,SAAA,EAAW,SAAA,EACX,KAAA,GAAQ,MAAA,EAAQ,wBAAA,CAAyB,SAAA,MAAe,MAAA,GACvD,kBAAA,CAAmB,SAAA,EAAW,MAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//#region src/navigation.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a target-neutral, fully inferred programmatic navigator.
|
|
4
|
+
*
|
|
5
|
+
* A `:name` segment accepts one scalar and is encoded as one path segment. A
|
|
6
|
+
* `*name` segment also accepts a scalar, but preserves `/` between its encoded
|
|
7
|
+
* segments. Unknown routes, missing parameters, extra parameters, empty
|
|
8
|
+
* strings, and non-finite numbers fail before the host adapter runs.
|
|
9
|
+
*/
|
|
10
|
+
function createMarquetteNavigator(marquette, visit) {
|
|
11
|
+
const routes = new Map((marquette.routes ?? []).map((route) => [route.id, route]));
|
|
12
|
+
const navigate = (routeId, parameters = {}) => {
|
|
13
|
+
const route = routes.get(routeId);
|
|
14
|
+
if (route == null) throw new Error(`Unknown navigation route "${routeId}".`);
|
|
15
|
+
return visit({
|
|
16
|
+
route: route.id,
|
|
17
|
+
environment: route.environment,
|
|
18
|
+
path: resolveNavigationPath(routeId, route.path, parameters)
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
return { navigate };
|
|
22
|
+
}
|
|
23
|
+
function resolveNavigationPath(routeId, template, parameters) {
|
|
24
|
+
const expected = parameterSegments(template);
|
|
25
|
+
const expectedNames = new Set(expected.map(({ name }) => name));
|
|
26
|
+
for (const { name } of expected) if (!Object.hasOwn(parameters, name)) throw new Error(`Missing navigation parameter "${name}" for route "${routeId}".`);
|
|
27
|
+
const extra = Object.keys(parameters).filter((name) => !expectedNames.has(name)).sort()[0];
|
|
28
|
+
if (extra != null) throw new Error(`Unexpected navigation parameter "${extra}" for route "${routeId}".`);
|
|
29
|
+
return template.split("/").map((segment) => {
|
|
30
|
+
const parameter = expected.find(({ authored }) => authored === segment);
|
|
31
|
+
if (parameter == null) return segment;
|
|
32
|
+
const value = parameters[parameter.name];
|
|
33
|
+
return encodeParameter(routeId, parameter.name, value, parameter.rest);
|
|
34
|
+
}).join("/");
|
|
35
|
+
}
|
|
36
|
+
function parameterSegments(template) {
|
|
37
|
+
return template.split("/").filter((segment) => (segment.startsWith(":") || segment.startsWith("*")) && segment.length > 1).map((authored) => ({
|
|
38
|
+
authored,
|
|
39
|
+
name: authored.slice(1),
|
|
40
|
+
rest: authored.startsWith("*")
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
function encodeParameter(routeId, name, value, rest) {
|
|
44
|
+
if (typeof value !== "string" && typeof value !== "number" || typeof value === "string" && value.length === 0 || typeof value === "number" && !Number.isFinite(value)) throw new Error(`Invalid navigation parameter "${name}" for route "${routeId}".`);
|
|
45
|
+
const text = String(value);
|
|
46
|
+
return rest ? text.split("/").map(encodeURIComponent).join("/") : encodeURIComponent(text);
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { createMarquetteNavigator };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=navigation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.mjs","names":[],"sources":["../src/navigation.ts"],"sourcesContent":["import type { ApplicationMarquette, MarquetteRoute, RouteId } from \"./model.js\";\n\n/** Scalar accepted by one authored route-path parameter. */\nexport type NavigationParameter = string | number;\n\ntype DeclaredRoute<Marquette extends ApplicationMarquette> = Marquette extends {\n readonly routes: readonly (infer Route extends MarquetteRoute)[];\n}\n ? Route\n : never;\n\ntype RouteFor<Marquette extends ApplicationMarquette, Id extends RouteId<Marquette>> = Extract<\n DeclaredRoute<Marquette>,\n { readonly id: Id }\n>;\n\ntype RoutePath<Marquette extends ApplicationMarquette, Id extends RouteId<Marquette>> = RouteFor<\n Marquette,\n Id\n>[\"path\"];\n\ntype SegmentParameter<Segment extends string> = Segment extends `:${infer Name}`\n ? Name extends \"\"\n ? never\n : Name\n : Segment extends `*${infer Name}`\n ? Name extends \"\"\n ? never\n : Name\n : never;\n\ntype PathParameter<Path extends string> = Path extends `${infer Segment}/${infer Rest}`\n ? SegmentParameter<Segment> | PathParameter<Rest>\n : SegmentParameter<Path>;\n\n/** Exact route parameters inferred from full `:name` and `*name` path segments. */\nexport type NavigationParameters<\n Marquette extends ApplicationMarquette,\n Id extends RouteId<Marquette>,\n> = {\n readonly [Name in PathParameter<RoutePath<Marquette, Id>>]: NavigationParameter;\n};\n\ntype NavigationArguments<Marquette extends ApplicationMarquette, Id extends RouteId<Marquette>> = [\n PathParameter<RoutePath<Marquette, Id>>,\n] extends [never]\n ? []\n : [parameters: NavigationParameters<Marquette, Id>];\n\n/** Target passed to a host adapter after route parameters are encoded. */\nexport type ResolvedNavigationTarget<\n Marquette extends ApplicationMarquette,\n Id extends RouteId<Marquette> = RouteId<Marquette>,\n> =\n Id extends RouteId<Marquette>\n ? {\n /** Authored route identifier. */\n readonly route: Id;\n /** Environment that owns the target view. */\n readonly environment: RouteFor<Marquette, Id>[\"environment\"];\n /** Resolved path with every parameter percent-encoded. */\n readonly path: `/${string}`;\n }\n : never;\n\n/** Programmatic navigation surface inferred from one application marquette. */\nexport interface MarquetteNavigator<Marquette extends ApplicationMarquette, Result> {\n /** Resolve and deliver one route to the target-specific host adapter. */\n readonly navigate: <const Id extends RouteId<Marquette>>(\n route: Id,\n ...arguments_: NavigationArguments<Marquette, Id>\n ) => Result;\n}\n\n/**\n * Creates a target-neutral, fully inferred programmatic navigator.\n *\n * A `:name` segment accepts one scalar and is encoded as one path segment. A\n * `*name` segment also accepts a scalar, but preserves `/` between its encoded\n * segments. Unknown routes, missing parameters, extra parameters, empty\n * strings, and non-finite numbers fail before the host adapter runs.\n */\nexport function createMarquetteNavigator<const Marquette extends ApplicationMarquette, Result>(\n marquette: Marquette,\n visit: (target: ResolvedNavigationTarget<Marquette>) => Result,\n): MarquetteNavigator<Marquette, Result> {\n const routes = new Map<string, MarquetteRoute>(\n (marquette.routes ?? []).map((route) => [route.id, route]),\n );\n\n const navigate = (\n routeId: string,\n parameters: Readonly<Record<string, NavigationParameter>> = {},\n ): Result => {\n const route = routes.get(routeId);\n if (route == null) throw new Error(`Unknown navigation route \"${routeId}\".`);\n\n return visit({\n route: route.id,\n environment: route.environment,\n path: resolveNavigationPath(routeId, route.path, parameters),\n } as ResolvedNavigationTarget<Marquette>);\n };\n\n return {\n navigate: navigate as MarquetteNavigator<Marquette, Result>[\"navigate\"],\n };\n}\n\nfunction resolveNavigationPath(\n routeId: string,\n template: `/${string}`,\n parameters: Readonly<Record<string, NavigationParameter>>,\n): `/${string}` {\n const expected = parameterSegments(template);\n const expectedNames = new Set(expected.map(({ name }) => name));\n\n for (const { name } of expected) {\n if (!Object.hasOwn(parameters, name)) {\n throw new Error(`Missing navigation parameter \"${name}\" for route \"${routeId}\".`);\n }\n }\n\n const extra = Object.keys(parameters)\n .filter((name) => !expectedNames.has(name))\n .sort()[0];\n if (extra != null) {\n throw new Error(`Unexpected navigation parameter \"${extra}\" for route \"${routeId}\".`);\n }\n\n const segments = template.split(\"/\").map((segment) => {\n const parameter = expected.find(({ authored }) => authored === segment);\n if (parameter == null) return segment;\n const value = parameters[parameter.name];\n return encodeParameter(routeId, parameter.name, value, parameter.rest);\n });\n return segments.join(\"/\") as `/${string}`;\n}\n\nfunction parameterSegments(\n template: string,\n): { readonly authored: string; readonly name: string; readonly rest: boolean }[] {\n return template\n .split(\"/\")\n .filter((segment) => (segment.startsWith(\":\") || segment.startsWith(\"*\")) && segment.length > 1)\n .map((authored) => ({\n authored,\n name: authored.slice(1),\n rest: authored.startsWith(\"*\"),\n }));\n}\n\nfunction encodeParameter(routeId: string, name: string, value: unknown, rest: boolean): string {\n if (\n (typeof value !== \"string\" && typeof value !== \"number\") ||\n (typeof value === \"string\" && value.length === 0) ||\n (typeof value === \"number\" && !Number.isFinite(value))\n ) {\n throw new Error(`Invalid navigation parameter \"${name}\" for route \"${routeId}\".`);\n }\n const text = String(value);\n return rest ? text.split(\"/\").map(encodeURIComponent).join(\"/\") : encodeURIComponent(text);\n}\n"],"mappings":";;;;;;;;;AAkFA,SAAgB,yBACd,WACA,OACuC;CACvC,MAAM,SAAS,IAAI,KAChB,UAAU,UAAU,CAAC,GAAG,KAAK,UAAU,CAAC,MAAM,IAAI,KAAK,CAAC,CAC3D;CAEA,MAAM,YACJ,SACA,aAA4D,CAAC,MAClD;EACX,MAAM,QAAQ,OAAO,IAAI,OAAO;EAChC,IAAI,SAAS,MAAM,MAAM,IAAI,MA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Y,MAAM,WAAW,KAC9C,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAEpD,MAAM,IAAI,MAAM,iCAAiC,KAAK,eAAe,QAAQ,GAAG;CAElF,MAAM,OAAO,OAAO,KAAK;CACzB,OAAO,OAAO,KAAK,MAAM,GAAG,EAAE,IAAI,kBAAkB,EAAE,KAAK,GAAG,IAAI,mBAAmB,IAAI;AAC3F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/marquette",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.720.0",
|
|
4
4
|
"description": "Typed application marquettes for every Vize target",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"application-contract",
|
|
@@ -41,6 +41,21 @@
|
|
|
41
41
|
"import": "./dist/adapter.mjs",
|
|
42
42
|
"default": "./dist/adapter.mjs"
|
|
43
43
|
},
|
|
44
|
+
"./native-build": {
|
|
45
|
+
"types": "./dist/native-build.d.mts",
|
|
46
|
+
"import": "./dist/native-build.mjs",
|
|
47
|
+
"default": "./dist/native-build.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./native-build/validate": {
|
|
50
|
+
"types": "./dist/native-build-validate.d.mts",
|
|
51
|
+
"import": "./dist/native-build-validate.mjs",
|
|
52
|
+
"default": "./dist/native-build-validate.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./navigation": {
|
|
55
|
+
"types": "./dist/navigation.d.mts",
|
|
56
|
+
"import": "./dist/navigation.mjs",
|
|
57
|
+
"default": "./dist/navigation.mjs"
|
|
58
|
+
},
|
|
44
59
|
"./test-run": {
|
|
45
60
|
"types": "./dist/test-run.d.mts",
|
|
46
61
|
"import": "./dist/test-run.mjs",
|
|
@@ -73,6 +88,7 @@
|
|
|
73
88
|
},
|
|
74
89
|
"./schema": "./dist/application-contract.schema.json",
|
|
75
90
|
"./adapter/schema": "./dist/adapter-capability-manifest.schema.json",
|
|
91
|
+
"./native-build/schema": "./dist/native-build-profile.schema.json",
|
|
76
92
|
"./test-run/schema": "./dist/test-run-evidence.schema.json",
|
|
77
93
|
"./test-run/admission/schema": "./dist/test-run-admission.schema.json",
|
|
78
94
|
"./test-run/check/schema": "./dist/test-run-check.schema.json",
|