ignotum 0.0.17 → 0.0.19
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 +73 -62
- package/dist/cli/Undici-C6Asbalt.mjs +30 -0
- package/dist/cli/Undici-C6Asbalt.mjs.map +1 -0
- package/dist/cli/bin.mjs +739 -24023
- package/dist/cli/bin.mjs.map +1 -1
- package/dist/platform/_headers +1 -1
- package/dist/platform/_ignotum/v1.1/client.js +12 -0
- package/dist/runtime/{api-BnUKx9cj-D49Tf0rX.d.ts → api-BnUKx9cj-K-F-SOLs.d.ts} +4 -4
- package/dist/runtime/{api-C-tltz6s.js → api-CrrSjYL1.js} +2 -2
- package/dist/runtime/{api-C-tltz6s.js.map → api-CrrSjYL1.js.map} +1 -1
- package/dist/runtime/{bootstrap-DlNIfH-r.js → bootstrap-CLVnD5vS.js} +4 -4
- package/dist/runtime/bootstrap-CLVnD5vS.js.map +1 -0
- package/dist/runtime/{bootstrap-DjTwGJao-DBx5zdFI.d.ts → bootstrap-DjTwGJao-DPi768T4.d.ts} +3 -3
- package/dist/runtime/client.d.ts +9 -9
- package/dist/runtime/client.js +4 -4
- package/dist/runtime/id-BPFV3D3V.d.ts +1 -0
- package/dist/runtime/{id-7an3nxTu-DZJSM5xh.d.ts → id-D87q-n2D-CDMwTSUR.d.ts} +2 -2
- package/dist/runtime/{id-BrEnxY-r.js → id-rzjaCxeF.js} +11 -2
- package/dist/runtime/{id-BrEnxY-r.js.map → id-rzjaCxeF.js.map} +1 -1
- package/dist/runtime/{index-Biaw5vdF.d.ts → index-BWHInzfU.d.ts} +3 -3
- package/dist/runtime/internal/api.d.ts +1 -1
- package/dist/runtime/internal/api.js +1 -1
- package/dist/runtime/internal/bootstrap.d.ts +1 -1
- package/dist/runtime/internal/bootstrap.js +1 -1
- package/dist/runtime/internal/client.d.ts +1 -1
- package/dist/runtime/internal/client.js +4 -4
- package/dist/runtime/internal/client.js.map +1 -1
- package/dist/runtime/internal/host.d.ts +6 -6
- package/dist/runtime/internal/host.js +3 -3
- package/dist/runtime/internal/routes.d.ts +1 -1
- package/dist/runtime/internal/server.d.ts +1 -1
- package/dist/runtime/internal/server.js +1 -1
- package/dist/runtime/internal/types.d.ts +2 -2
- package/dist/runtime/internal/types.js +1 -1
- package/dist/runtime/pagination-BPFV3D3V.d.ts +1 -0
- package/dist/runtime/{pagination--f4kMKf6.js → pagination-CfEleffG.js} +3 -2
- package/dist/runtime/pagination-CfEleffG.js.map +1 -0
- package/dist/runtime/result-Bq32FA7g.d.ts +1 -0
- package/dist/runtime/{router-C1eC9yy5.js → router-CfNPtoVO.js} +109 -60
- package/dist/runtime/router-CfNPtoVO.js.map +1 -0
- package/dist/runtime/{schema-BSjepoNF.js → schema-JtFb4BbG.js} +3 -3
- package/dist/runtime/{schema-BSjepoNF.js.map → schema-JtFb4BbG.js.map} +1 -1
- package/dist/runtime/server.d.ts +5 -5
- package/dist/runtime/server.js +2 -2
- package/dist/runtime/{sync-By2hX5ev.d.ts → sync-BMmV8oYt.d.ts} +2 -2
- package/dist/runtime/{sync-BwgS19Xy.js → sync-DUfp7S5R.js} +2 -2
- package/dist/runtime/{sync-BwgS19Xy.js.map → sync-DUfp7S5R.js.map} +1 -1
- package/dist/runtime/{types-DeCCyqLU-CHx7KFtx.d.ts → types-BeT6F0Pg-DMvRDN0c.d.ts} +5 -5
- package/package.json +10 -9
- package/src/cli/app-configuration.ts +44 -5
- package/src/cli/auth-client.ts +3 -3
- package/src/cli/build/managed-server.ts +3 -2
- package/src/cli/build/server.ts +2 -2
- package/src/cli/command.ts +19 -11
- package/src/cli/control-client.ts +2 -2
- package/src/cli/deploy.ts +27 -2
- package/src/cli/dev.ts +1 -1
- package/src/cli/managed-dev-platform.ts +13 -4
- package/src/cli/module-boundaries.ts +1 -1
- package/src/cli/new-app.ts +35 -6
- package/src/cli/package-manager.ts +1 -1
- package/src/cli/path.ts +11 -0
- package/src/cli/route-codegen.ts +2 -1
- package/src/cli/route-static.ts +10 -4
- package/src/cli/typecheck.ts +66 -0
- package/src/cli/upload-journal.ts +3 -3
- package/src/dev-runtime/database.ts +1 -1
- package/src/dev-runtime/files.ts +1 -1
- package/src/dev-runtime/managed-functions.ts +3 -2
- package/src/dev-runtime/managed-sync.ts +114 -105
- package/src/dev-runtime/managed-websocket.ts +11 -7
- package/src/dev-runtime/migrations.ts +2 -2
- package/src/dev-runtime/sync.ts +3 -3
- package/dist/platform/_ignotum/v1.0/client.js +0 -12
- package/dist/runtime/bootstrap-DlNIfH-r.js.map +0 -1
- package/dist/runtime/id-BI08JkmR.d.ts +0 -1
- package/dist/runtime/pagination--f4kMKf6.js.map +0 -1
- package/dist/runtime/pagination-BI08JkmR.d.ts +0 -1
- package/dist/runtime/result-BkziOG1L.d.ts +0 -1
- package/dist/runtime/router-C1eC9yy5.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as InternalServerError, g as FileValue, i as ErrorValue } from "./id-
|
|
2
|
-
import "./result-
|
|
3
|
-
import { t as FunctionAddress } from "./sync-
|
|
1
|
+
import { a as InternalServerError, g as FileValue, i as ErrorValue } from "./id-D87q-n2D-CDMwTSUR.js";
|
|
2
|
+
import "./result-Bq32FA7g.js";
|
|
3
|
+
import { t as FunctionAddress } from "./sync-BMmV8oYt.js";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
//#region ../platform/dist/api-BnUKx9cj.d.ts
|
|
6
6
|
//#region src/versions/1/common/api.d.ts
|
|
@@ -44,4 +44,4 @@ declare const functionPathOf: <Kind extends FunctionKind, Args, Success, Failure
|
|
|
44
44
|
declare function createApi<Modules>(): Api<Modules>;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { functionPathOf as a, createApi as i, FunctionReference as n, MutationInput as r, Api as t };
|
|
47
|
-
//# sourceMappingURL=api-BnUKx9cj-
|
|
47
|
+
//# sourceMappingURL=api-BnUKx9cj-K-F-SOLs.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FunctionAddress } from "./sync-
|
|
1
|
+
import { t as FunctionAddress } from "./sync-DUfp7S5R.js";
|
|
2
2
|
import { Predicate } from "effect";
|
|
3
3
|
//#region ../platform/dist/versions/1/common/api.js
|
|
4
4
|
const FunctionReferenceTypeId = Symbol.for("ignotum/internal/api/FunctionReference");
|
|
@@ -28,4 +28,4 @@ function createApi() {
|
|
|
28
28
|
//#endregion
|
|
29
29
|
export { functionPathOf as n, createApi as t };
|
|
30
30
|
|
|
31
|
-
//# sourceMappingURL=api-
|
|
31
|
+
//# sourceMappingURL=api-CrrSjYL1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-
|
|
1
|
+
{"version":3,"file":"api-CrrSjYL1.js","names":[],"sources":["../../../platform/dist/versions/1/common/api.js"],"sourcesContent":["import { Predicate } from \"effect\";\nimport { FunctionAddress } from \"@ignotum/contracts/runtime/sync\";\n//#region src/versions/1/common/api.ts\nconst FunctionReferenceTypeId = Symbol.for(\"ignotum/internal/api/FunctionReference\");\nconst functionPathOf = (reference) => reference[FunctionReferenceTypeId];\nconst makeModuleReference = (moduleName) => {\n\tconst references = /* @__PURE__ */ new Map();\n\treturn new Proxy({}, { get: (_target, functionName) => {\n\t\tif (!Predicate.isString(functionName)) return;\n\t\tconst existing = references.get(functionName);\n\t\tif (existing !== void 0) return existing;\n\t\tconst reference = { [FunctionReferenceTypeId]: FunctionAddress.make(`api.${moduleName}.${functionName}`) };\n\t\treferences.set(functionName, reference);\n\t\treturn reference;\n\t} });\n};\nfunction createApi() {\n\tconst modules = /* @__PURE__ */ new Map();\n\treturn new Proxy({}, { get: (_target, moduleName) => {\n\t\tif (!Predicate.isString(moduleName)) return;\n\t\tconst existing = modules.get(moduleName);\n\t\tif (existing !== void 0) return existing;\n\t\tconst moduleReference = makeModuleReference(moduleName);\n\t\tmodules.set(moduleName, moduleReference);\n\t\treturn moduleReference;\n\t} });\n}\n//#endregion\nexport { createApi, functionPathOf };\n\n//# sourceMappingURL=api.js.map"],"mappings":";;;AAGA,MAAM,0BAA0B,OAAO,IAAI,wCAAwC;AACnF,MAAM,kBAAkB,cAAc,UAAU;AAChD,MAAM,uBAAuB,eAAe;CAC3C,MAAM,6BAA6B,IAAI,IAAI;CAC3C,OAAO,IAAI,MAAM,CAAC,GAAG,EAAE,MAAM,SAAS,iBAAiB;EACtD,IAAI,CAAC,UAAU,SAAS,YAAY,GAAG;EACvC,MAAM,WAAW,WAAW,IAAI,YAAY;EAC5C,IAAI,aAAa,KAAK,GAAG,OAAO;EAChC,MAAM,YAAY,GAAG,0BAA0B,gBAAgB,KAAK,OAAO,WAAW,GAAG,cAAc,EAAE;EACzG,WAAW,IAAI,cAAc,SAAS;EACtC,OAAO;CACR,EAAE,CAAC;AACJ;AACA,SAAS,YAAY;CACpB,MAAM,0BAA0B,IAAI,IAAI;CACxC,OAAO,IAAI,MAAM,CAAC,GAAG,EAAE,MAAM,SAAS,eAAe;EACpD,IAAI,CAAC,UAAU,SAAS,UAAU,GAAG;EACrC,MAAM,WAAW,QAAQ,IAAI,UAAU;EACvC,IAAI,aAAa,KAAK,GAAG,OAAO;EAChC,MAAM,kBAAkB,oBAAoB,UAAU;EACtD,QAAQ,IAAI,YAAY,eAAe;EACvC,OAAO;CACR,EAAE,CAAC;AACJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as matchPattern, f as useRouterSnapshot, g as matchDirectory, h as compilePatterns, i as RouterContext, m as parseLocation, p as decodeRouteInputs, y as mountManagedSync } from "./router-
|
|
1
|
+
import { E as upgrade, S as ServingSelection, T as initial } from "./id-rzjaCxeF.js";
|
|
2
|
+
import { _ as matchPattern, f as useRouterSnapshot, g as matchDirectory, h as compilePatterns, i as RouterContext, m as parseLocation, p as decodeRouteInputs, y as mountManagedSync } from "./router-CfNPtoVO.js";
|
|
3
3
|
import { i as LayoutMetadata, l as appDefinitionLimits, o as StaticMetadata } from "./routes-DnU39R7c.js";
|
|
4
4
|
import { Deferred, Effect, Predicate, Schema } from "effect";
|
|
5
5
|
import { useErrorBoundary, useLayoutEffect, useState } from "preact/hooks";
|
|
@@ -22,7 +22,7 @@ var InvalidMetadata = class extends Schema.TaggedError()("InvalidMetadata", { me
|
|
|
22
22
|
* `remove` names managed tags absent from this result, including after navigation.
|
|
23
23
|
*/
|
|
24
24
|
const resolveMetadata = Effect.fn("Routing.resolveMetadata")(function* (input) {
|
|
25
|
-
const { applicationName, layouts, page, outcome } = yield* Schema.decodeEffect(MetadataInput)(input).pipe(Effect.mapError(() => InvalidMetadata.make({ message: "Static metadata is invalid." })));
|
|
25
|
+
const { applicationName, layouts, page, outcome } = yield* Schema.decodeEffect(MetadataInput, { onExcessProperty: "error" })(input).pipe(Effect.mapError(() => InvalidMetadata.make({ message: "Static metadata is invalid." })));
|
|
26
26
|
let title = applicationName;
|
|
27
27
|
let template;
|
|
28
28
|
let description;
|
|
@@ -913,4 +913,4 @@ const mountClient = (registration, selection) => {
|
|
|
913
913
|
//#endregion
|
|
914
914
|
export { mountClient as t };
|
|
915
915
|
|
|
916
|
-
//# sourceMappingURL=bootstrap-
|
|
916
|
+
//# sourceMappingURL=bootstrap-CLVnD5vS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap-CLVnD5vS.js","names":["Versioned.upgrade","Versioned.initial"],"sources":["../../../shared/dist/routing/metadata.js","../../../shared/dist/routing.js","../../../platform/dist/versions/1/browser/router-history.js","../../../platform/dist/versions/1/browser/router-store.js","../../../platform/dist/versions/1/browser/route-boundaries.js","../../../platform/dist/versions/1/browser/bootstrap.js"],"sourcesContent":["import { Effect, Schema } from \"effect\";\nimport { LayoutMetadata, StaticMetadata, appDefinitionLimits } from \"@ignotum/contracts/routes\";\n//#region src/routing/metadata.ts\nconst MetadataInput = Schema.Struct({\n\tapplicationName: Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(256)),\n\tlayouts: Schema.Array(LayoutMetadata).check(Schema.isMaxLength(appDefinitionLimits.layouts)),\n\tpage: Schema.optional(StaticMetadata),\n\toutcome: Schema.Literals([\n\t\t\"Matched\",\n\t\t\"Invalid\",\n\t\t\"NotFound\"\n\t])\n}).annotate({ parseOptions: { onExcessProperty: \"error\" } });\nvar InvalidMetadata = class extends Schema.TaggedError()(\"InvalidMetadata\", { message: Schema.String }) {};\n/**\n* Layouts run from outermost to nearest. Values remain plain text: document writers must escape\n* HTML text and attributes, and browser writers must use textContent and setAttribute.\n* `remove` names managed tags absent from this result, including after navigation.\n*/\nconst resolveMetadata = Effect.fn(\"Routing.resolveMetadata\")(function* (input) {\n\tconst { applicationName, layouts, page, outcome } = yield* Schema.decodeEffect(MetadataInput, { onExcessProperty: \"error\" })(input).pipe(Effect.mapError(() => InvalidMetadata.make({ message: \"Static metadata is invalid.\" })));\n\tlet title = applicationName;\n\tlet template;\n\tlet description;\n\tlet robots;\n\tfor (const layout of layouts) {\n\t\ttitle = layout.title ?? title;\n\t\ttemplate = layout.titleTemplate ?? template;\n\t\tdescription = layout.meta?.description ?? description;\n\t\trobots = layout.meta?.robots ?? robots;\n\t}\n\tconst matchedPage = outcome === \"NotFound\" ? void 0 : page;\n\tconst pageTitle = matchedPage?.title;\n\tif (pageTitle !== void 0) title = template === void 0 ? pageTitle : template.replace(\"%s\", () => pageTitle);\n\tdescription = matchedPage?.meta?.description ?? description;\n\trobots = outcome === \"Matched\" ? matchedPage?.meta?.robots ?? robots : \"noindex\";\n\tconst remove = [];\n\tif (description === void 0) remove.push(\"description\");\n\tif (robots === void 0) remove.push(\"robots\");\n\treturn {\n\t\ttitle,\n\t\tmeta: {\n\t\t\tdescription,\n\t\t\trobots\n\t\t},\n\t\tremove\n\t};\n});\n//#endregion\nexport { InvalidMetadata, MetadataInput, resolveMetadata };\n\n//# sourceMappingURL=metadata.js.map","import { RoutingDefinitionError, compilePatterns, matchDirectory, matchPattern, parsePattern, validateRoutePattern } from \"./routing/pattern.js\";\nimport { InvalidUrl, ParsedLocation, PartialLocation, UrlIssue, buildUrl, decodeRouteInputs, parseLocation } from \"./routing/url.js\";\nimport { InvalidMetadata, MetadataInput, resolveMetadata } from \"./routing/metadata.js\";\nimport { Effect } from \"effect\";\n//#region src/routing/index.ts\nconst reservedSegments = (segments) => segments[0] === \"_ignotum\";\n/** Accept a root-relative location before a URL parser can discard invalid dot segments. */\nconst matchLocation = Effect.fn(\"Routing.matchLocation\")(function* (patterns, input) {\n\tconst parsed = yield* parseLocation(input).pipe(Effect.result);\n\tif (parsed._tag === \"Failure\") {\n\t\tconst error = parsed.failure;\n\t\tconst partial = error.partial;\n\t\tconst segments = partial?.segments ?? [];\n\t\tconst reserved = reservedSegments(segments);\n\t\tconst branch = partial?.pathComplete ? matchPattern(patterns, segments) : matchDirectory(patterns, segments);\n\t\treturn {\n\t\t\t_tag: \"Invalid\",\n\t\t\tstatus: 400,\n\t\t\troute: !reserved && partial?.pathComplete ? branch.route : void 0,\n\t\t\tlayouts: reserved ? [] : branch.layouts,\n\t\t\treserved,\n\t\t\tlocation: void 0,\n\t\t\tissues: error.issues\n\t\t};\n\t}\n\tconst location = parsed.success;\n\tconst reserved = reservedSegments(location.segments);\n\tconst branch = matchPattern(patterns, location.segments);\n\tif (reserved || branch.route === void 0) return {\n\t\t_tag: \"NotFound\",\n\t\tstatus: 404,\n\t\tlayouts: reserved ? [] : branch.layouts,\n\t\treserved,\n\t\tlocation\n\t};\n\tconst route = branch.route;\n\tconst decoded = yield* decodeRouteInputs(route, branch.params, location.search).pipe(Effect.result);\n\tif (decoded._tag === \"Failure\") return {\n\t\t_tag: \"Invalid\",\n\t\tstatus: 400,\n\t\troute,\n\t\tlayouts: branch.layouts,\n\t\treserved: false,\n\t\tlocation,\n\t\tissues: decoded.failure.issues\n\t};\n\treturn {\n\t\t_tag: \"Matched\",\n\t\tstatus: 200,\n\t\troute,\n\t\tlayouts: branch.layouts,\n\t\treserved: false,\n\t\tlocation,\n\t\t...decoded.success\n\t};\n});\n/** Contains no URL, decoded values, or request-specific validation issues. */\nconst documentVariant = (outcome) => ({\n\toutcome: outcome._tag,\n\trouteId: outcome._tag === \"NotFound\" ? null : outcome.route?.id ?? null,\n\tlayoutIds: outcome.layouts.map((layout) => layout.id),\n\treserved: outcome.reserved\n});\nconst documentVariantKey = (outcome) => {\n\tconst variant = documentVariant(outcome);\n\treturn JSON.stringify([\n\t\tvariant.outcome,\n\t\tvariant.routeId,\n\t\tvariant.layoutIds,\n\t\tvariant.reserved\n\t]);\n};\n//#endregion\nexport { InvalidMetadata, InvalidUrl, MetadataInput, ParsedLocation, PartialLocation, RoutingDefinitionError, UrlIssue, buildUrl, compilePatterns, decodeRouteInputs, documentVariant, documentVariantKey, matchDirectory, matchLocation, matchPattern, parseLocation, parsePattern, resolveMetadata, validateRoutePattern };\n\n//# sourceMappingURL=routing.js.map","import { Deferred, Effect, Schema } from \"effect\";\nimport * as Versioned from \"@ignotum/contracts/versioned\";\n//#region src/versions/1/browser/router-history.ts\nconst HistoryEntryV1 = Schema.Struct({\n\tformatVersion: Schema.Literal(1),\n\tkey: Schema.String\n});\nconst HistoryEntryV2 = Schema.Struct({\n\tformatVersion: Schema.Literal(2),\n\tkey: Schema.String,\n\tindex: Schema.NullOr(Schema.Int)\n});\nconst HistoryEntry = Versioned.upgrade(Versioned.initial(HistoryEntryV1), HistoryEntryV2, (old) => ({\n\tformatVersion: 2,\n\tkey: old.key,\n\tindex: null\n}));\nconst HistoryState = Schema.Struct({ __ignotumRouter: HistoryEntry });\nconst StateObject = Schema.Record(Schema.String, Schema.Unknown);\nconst hrefOf = (browser) => `${browser.location.pathname}${browser.location.search}${browser.location.hash}`;\n/** Serializes router corrections to native traversal without adding duplicate entries. */\nvar RouterHistory = class {\n\tbrowser;\n\tonTraversal;\n\tcommitted;\n\tactual;\n\tpositions = /* @__PURE__ */ new Map();\n\tseeking;\n\toriginalScrollRestoration;\n\tdirection = -1;\n\tscrollPending = false;\n\texpectedKey;\n\tscroll = /* @__PURE__ */ new Map();\n\tconstructor(browser, onTraversal) {\n\t\tthis.browser = browser;\n\t\tthis.onTraversal = onTraversal;\n\t\tconst parsed = Schema.decodeUnknownOption(HistoryState)(browser.history.state);\n\t\tconst entry = parsed._tag === \"Some\" ? parsed.value.__ignotumRouter : void 0;\n\t\tthis.actual = this.committed = {\n\t\t\tkey: entry?.key ?? browser.crypto.randomUUID(),\n\t\t\tindex: entry?.index ?? 0,\n\t\t\thref: hrefOf(browser)\n\t\t};\n\t\tthis.write(this.actual, false);\n\t\tthis.originalScrollRestoration = browser.history.scrollRestoration;\n\t\tbrowser.history.scrollRestoration = \"manual\";\n\t\tbrowser.addEventListener(\"popstate\", this.onPop);\n\t\tbrowser.addEventListener(\"scroll\", this.saveScroll);\n\t}\n\twrite(position, push) {\n\t\tconst parsed = Schema.decodeUnknownOption(StateObject)(this.browser.history.state);\n\t\tconst owned = { __ignotumRouter: Schema.encodeSync(HistoryEntry)({\n\t\t\tformatVersion: 2,\n\t\t\tkey: position.key,\n\t\t\tindex: position.index\n\t\t}) };\n\t\tconst state = parsed._tag === \"Some\" ? {\n\t\t\t...parsed.value,\n\t\t\t...owned\n\t\t} : owned;\n\t\tif (push) this.browser.history.pushState(state, \"\", position.href);\n\t\telse this.browser.history.replaceState(state, \"\", position.href);\n\t\tthis.positions.set(position.key, position.index);\n\t}\n\tsaveScroll = () => {\n\t\tif (this.scrollPending) return;\n\t\tthis.scroll.set(this.committed.key, {\n\t\t\tx: this.browser.scrollX,\n\t\t\ty: this.browser.scrollY\n\t\t});\n\t};\n\tcaptureScroll() {\n\t\tthis.saveScroll();\n\t\tthis.scrollPending = true;\n\t\treturn this.scroll.get(this.committed.key) ?? {\n\t\t\tx: this.browser.scrollX,\n\t\t\ty: this.browser.scrollY\n\t\t};\n\t}\n\tfinishScroll() {\n\t\tthis.scrollPending = false;\n\t\tthis.saveScroll();\n\t}\n\trestoreSourceScroll() {\n\t\tif (!this.scrollPending) return;\n\t\tconst saved = this.scroll.get(this.committed.key);\n\t\tif (saved !== void 0) this.browser.scrollTo(saved.x, saved.y);\n\t\tthis.finishScroll();\n\t}\n\tonPop = () => {\n\t\tconst parsed = Schema.decodeUnknownOption(HistoryState)(this.browser.history.state);\n\t\tconst entry = parsed._tag === \"Some\" ? parsed.value.__ignotumRouter : void 0;\n\t\tconst key = entry?.key ?? this.browser.crypto.randomUUID();\n\t\tconst index = entry?.index ?? this.positions.get(key) ?? this.actual.index + this.direction;\n\t\tthis.actual = {\n\t\t\tkey,\n\t\t\tindex,\n\t\t\thref: hrefOf(this.browser)\n\t\t};\n\t\tthis.write(this.actual, false);\n\t\tconst expected = this.expectedKey;\n\t\tthis.expectedKey = void 0;\n\t\tconst seeking = this.seeking;\n\t\tif (seeking !== void 0 && (expected === key || seeking.position.key === key)) {\n\t\t\tthis.advanceSeek();\n\t\t\treturn;\n\t\t}\n\t\tif (seeking !== void 0) {\n\t\t\tthis.seeking = void 0;\n\t\t\tEffect.runSync(Deferred.succeed(seeking.done, false));\n\t\t}\n\t\tthis.onTraversal(this.actual);\n\t};\n\tadvanceSeek() {\n\t\tconst seeking = this.seeking;\n\t\tif (seeking === void 0 || this.expectedKey !== void 0) return;\n\t\tif (this.actual.key === seeking.position.key) {\n\t\t\tthis.seeking = void 0;\n\t\t\tEffect.runSync(Deferred.succeed(seeking.done, true));\n\t\t} else {\n\t\t\tthis.expectedKey = seeking.position.key;\n\t\t\tthis.browser.history.go(seeking.position.index - this.actual.index);\n\t\t}\n\t}\n\tseek(position) {\n\t\tif (this.seeking !== void 0) {\n\t\t\tif (this.seeking.position.key === position.key) return Effect.runPromise(Deferred.await(this.seeking.done));\n\t\t\tEffect.runSync(Deferred.succeed(this.seeking.done, false));\n\t\t}\n\t\tconst done = Deferred.makeUnsafe();\n\t\tthis.seeking = {\n\t\t\tposition,\n\t\t\tdone\n\t\t};\n\t\tthis.advanceSeek();\n\t\treturn Effect.runPromise(Deferred.await(done));\n\t}\n\tcommit(position, kind) {\n\t\tif (kind === \"push\" || kind === \"replace\") this.write(position, kind === \"push\");\n\t\tthis.actual = this.committed = position;\n\t}\n\tback = () => {\n\t\tthis.direction = -1;\n\t\tthis.browser.history.back();\n\t};\n\tforward = () => {\n\t\tthis.direction = 1;\n\t\tthis.browser.history.forward();\n\t};\n\tdispose() {\n\t\tthis.browser.removeEventListener(\"popstate\", this.onPop);\n\t\tthis.browser.removeEventListener(\"scroll\", this.saveScroll);\n\t\tthis.browser.history.scrollRestoration = this.originalScrollRestoration;\n\t\tif (this.seeking !== void 0) Effect.runSync(Deferred.succeed(this.seeking.done, false));\n\t}\n};\n//#endregion\nexport { RouterHistory };\n\n//# sourceMappingURL=router-history.js.map","import { RouterHistory } from \"./router-history.js\";\nimport { Deferred, Effect, Predicate, Schema } from \"effect\";\nimport { ServingSelection } from \"@ignotum/contracts/execution\";\nimport { compilePatterns, matchLocation, resolveMetadata } from \"@ignotum/shared/routing\";\n//#region src/versions/1/browser/router-store.ts\nconst ErrorComponent = Schema.declare((value) => Predicate.isFunction(value));\nconst InvalidComponent = Schema.declare((value) => Predicate.isFunction(value));\nconst NotFoundComponent = Schema.declare((value) => Predicate.isFunction(value));\nconst PageModule = Schema.Struct({\n\terror: Schema.optional(ErrorComponent),\n\tinvalid: Schema.optional(InvalidComponent),\n\tcomponent: Schema.declare((value) => Predicate.isFunction(value))\n});\nconst LayoutModule = Schema.Struct({\n\terror: Schema.optional(ErrorComponent),\n\tinvalid: Schema.optional(InvalidComponent),\n\tnotFound: Schema.optional(NotFoundComponent),\n\tcomponent: Schema.declare((value) => Predicate.isFunction(value))\n});\nconst ModuleExports = Schema.Record(Schema.String, Schema.Unknown);\nvar BranchLoadError = class extends Schema.TaggedError()(\"BranchLoadError\", {\n\terror: Schema.Unknown,\n\tbranch: Schema.declare((value) => Predicate.isObject(value))\n}) {};\nconst locationOf = (href, key, origin) => {\n\tconst parsed = new URL(href, origin);\n\tlet hash = parsed.hash.slice(1);\n\ttry {\n\t\thash = decodeURIComponent(hash);\n\t} catch {}\n\treturn {\n\t\tpathname: parsed.pathname,\n\t\tsearch: parsed.search,\n\t\thash,\n\t\tkey\n\t};\n};\n/** One store per mount. Load caches contain code and CSS only, never component/query state. */\nvar RouterStore = class {\n\tregistration;\n\tbrowser;\n\tselection;\n\tpatterns;\n\tlisteners = /* @__PURE__ */ new Set();\n\tmodules = /* @__PURE__ */ new Map();\n\tstyles = /* @__PURE__ */ new Map();\n\tstyleCleanups = /* @__PURE__ */ new Set();\n\tredirects = /* @__PURE__ */ new Set();\n\thistory;\n\tblockers = /* @__PURE__ */ new Set();\n\tblocked;\n\tupgrading = false;\n\tadmission;\n\tserial = 0;\n\ttransition;\n\tcommittedHref;\n\tdisposed = false;\n\tstarted = false;\n\tsnapshot = {\n\t\tlocation: void 0,\n\t\tbranch: void 0,\n\t\tnavigation: { status: \"idle\" },\n\t\tfailure: void 0,\n\t\tcommit: 0\n\t};\n\tconstructor(registration, selection, browser) {\n\t\tthis.registration = registration;\n\t\tthis.browser = browser;\n\t\tthis.selection = Schema.decodeSync(ServingSelection)(selection);\n\t\tthis.patterns = Effect.runSync(compilePatterns(registration.routes, registration.layouts));\n\t\tfor (const reference of [...registration.routes.map((route) => route.page), ...registration.layouts.map((layout) => layout.module)]) if (!registration.modules.has(reference.module)) throw new Error(`Client module '${reference.module}' is missing from registration.`);\n\t}\n\tgetSnapshot = () => this.snapshot;\n\tsubscribe = (listener) => {\n\t\tthis.listeners.add(listener);\n\t\treturn () => this.listeners.delete(listener);\n\t};\n\tupdate(snapshot) {\n\t\tthis.snapshot = snapshot;\n\t\tfor (const listener of this.listeners) listener();\n\t}\n\tstart() {\n\t\tif (this.started) throw new Error(\"The Ignotum router has already started.\");\n\t\tthis.started = true;\n\t\tthis.history = new RouterHistory(this.browser, this.onTraversal);\n\t\tthis.browser.addEventListener(\"beforeunload\", this.onBeforeUnload);\n\t\tconst position = this.history.committed;\n\t\treturn this.transitionTo(position.href, \"initial\", position.key, {}, position);\n\t}\n\tonTraversal = (position) => {\n\t\tthis.redirects.clear();\n\t\tthis.history?.seek(this.history.committed);\n\t\tthis.transitionTo(position.href, \"traverse\", position.key, {}, position);\n\t};\n\tback = () => this.history?.back();\n\tforward = () => this.history?.forward();\n\tonBeforeUnload = (event) => {\n\t\tif (this.upgrading || this.blockers.size === 0) return;\n\t\tevent.preventDefault();\n\t\tevent.returnValue = \"\";\n\t};\n\t/** Internal platform upgrade entry; route confirmation never delays this reload. */\n\tstopForUpgrade = () => {\n\t\tif (this.disposed) return;\n\t\tthis.upgrading = true;\n\t\tthis.browser.removeEventListener(\"beforeunload\", this.onBeforeUnload);\n\t\tthis.blockers.clear();\n\t\tthis.cancelPending();\n\t};\n\tupgrade = () => {\n\t\tif (this.disposed) return;\n\t\tthis.stopForUpgrade();\n\t\tthis.browser.location.reload();\n\t};\n\tsetAdmission(admission) {\n\t\tthis.admission = admission;\n\t}\n\tsetBlocker(id, when) {\n\t\tif (when) this.blockers.add(id);\n\t\telse this.blockers.delete(id);\n\t\tif (!when && this.blocked?.remaining.delete(id) === true) this.releaseBlocked();\n\t}\n\tgetBlocker(id) {\n\t\tconst blocked = this.blocked;\n\t\tconst from = this.snapshot.location;\n\t\tif (blocked === void 0 || from === void 0 || !blocked.remaining.has(id)) return { status: \"idle\" };\n\t\treturn {\n\t\t\tstatus: \"blocked\",\n\t\t\tfrom,\n\t\t\tto: blocked.transition.location,\n\t\t\tproceed: () => {\n\t\t\t\tif (this.blocked !== blocked) return;\n\t\t\t\tblocked.remaining.delete(id);\n\t\t\t\tthis.releaseBlocked();\n\t\t\t},\n\t\t\treset: () => {\n\t\t\t\tif (this.blocked !== blocked) return;\n\t\t\t\tthis.cancelPending();\n\t\t\t\tthis.update({\n\t\t\t\t\t...this.snapshot,\n\t\t\t\t\tnavigation: { status: \"idle\" }\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n\treleaseBlocked() {\n\t\tconst blocked = this.blocked;\n\t\tif (blocked === void 0) return;\n\t\tif (blocked.remaining.size === 0) {\n\t\t\tthis.blocked = void 0;\n\t\t\tthis.loadTransition(blocked.transition);\n\t\t} else this.update({ ...this.snapshot });\n\t}\n\tnavigate(href, options = {}, redirect = false) {\n\t\tif (this.disposed || this.upgrading) return Promise.resolve({ status: \"cancelled\" });\n\t\tif (!redirect) this.redirects.clear();\n\t\tif (href === this.committedHref) {\n\t\t\tthis.cancelPending();\n\t\t\tthis.update({\n\t\t\t\t...this.snapshot,\n\t\t\t\tnavigation: { status: \"idle\" },\n\t\t\t\tfailure: void 0\n\t\t\t});\n\t\t\treturn Promise.resolve({ status: \"committed\" });\n\t\t}\n\t\tif (redirect) {\n\t\t\tif (this.committedHref !== void 0) this.redirects.add(this.committedHref);\n\t\t\tif (this.redirects.has(href) || this.redirects.size >= 32) {\n\t\t\t\tconst error = /* @__PURE__ */ new Error(`Ignotum redirect loop at '${href}'.`);\n\t\t\t\tthis.cancelPending();\n\t\t\t\tthis.update({\n\t\t\t\t\t...this.snapshot,\n\t\t\t\t\tnavigation: { status: \"idle\" },\n\t\t\t\t\tfailure: {\n\t\t\t\t\t\terror,\n\t\t\t\t\t\tretry: () => {\n\t\t\t\t\t\t\tthis.redirects.clear();\n\t\t\t\t\t\t\tthis.navigate(href, options, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn Promise.resolve({\n\t\t\t\t\tstatus: \"failed\",\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst key = options.replace === true ? this.snapshot.location?.key ?? this.browser.crypto.randomUUID() : this.browser.crypto.randomUUID();\n\t\treturn this.transitionTo(href, options.replace === true ? \"replace\" : \"push\", key, options);\n\t}\n\tpreload = async (href) => {\n\t\tif (this.disposed || this.upgrading || this.admission !== void 0 && !await this.admission.validate()) return;\n\t\tconst outcome = Effect.runSync(matchLocation(this.patterns, href));\n\t\tawait this.loadBranch(outcome, false);\n\t};\n\tcancelPending() {\n\t\tif (this.history !== void 0) this.history.seek(this.history.committed);\n\t\tthis.blocked = void 0;\n\t\tif (this.transition !== void 0) Effect.runSync(Deferred.succeed(this.transition.completion, { status: \"cancelled\" }));\n\t\tthis.transition = void 0;\n\t}\n\ttransitionTo(href, kind, key, options = {}, historyPosition) {\n\t\tif (this.disposed || this.upgrading) return Promise.resolve({ status: \"cancelled\" });\n\t\tconst sourceScroll = this.history?.captureScroll() ?? {\n\t\t\tx: this.browser.scrollX,\n\t\t\ty: this.browser.scrollY\n\t\t};\n\t\tthis.cancelPending();\n\t\tconst location = locationOf(href, key, this.browser.location.origin);\n\t\tconst previous = this.snapshot.location;\n\t\tconst searchOnly = previous !== void 0 && previous.pathname === location.pathname && previous.hash === location.hash;\n\t\tconst completion = Deferred.makeUnsafe();\n\t\tconst position = historyPosition ?? {\n\t\t\tkey,\n\t\t\thref,\n\t\t\tindex: (this.history?.committed.index ?? 0) + (kind === \"push\" ? 1 : 0)\n\t\t};\n\t\tconst transition = {\n\t\t\tid: ++this.serial,\n\t\t\thref,\n\t\t\tlocation,\n\t\t\tkind,\n\t\t\tcompletion,\n\t\t\tposition,\n\t\t\tscroll: options.scroll ?? (searchOnly ? \"preserve\" : \"auto\"),\n\t\t\tsearchOnly,\n\t\t\tsourceScroll\n\t\t};\n\t\tthis.transition = transition;\n\t\tif (kind !== \"initial\" && this.blockers.size > 0 && this.snapshot.location !== void 0) {\n\t\t\tthis.blocked = {\n\t\t\t\ttransition,\n\t\t\t\tremaining: new Set(this.blockers)\n\t\t\t};\n\t\t\tthis.update({\n\t\t\t\t...this.snapshot,\n\t\t\t\tnavigation: { status: \"idle\" },\n\t\t\t\tfailure: void 0\n\t\t\t});\n\t\t} else this.loadTransition(transition);\n\t\treturn Effect.runPromise(Deferred.await(completion));\n\t}\n\tloadTransition(transition) {\n\t\tconst { href, location, kind } = transition;\n\t\tconst outcome = Effect.runSync(matchLocation(this.patterns, href));\n\t\tthis.update({\n\t\t\t...this.snapshot,\n\t\t\tnavigation: {\n\t\t\t\tstatus: \"loading\",\n\t\t\t\tto: location\n\t\t\t},\n\t\t\tfailure: void 0\n\t\t});\n\t\tconst load = async () => {\n\t\t\tif (this.admission !== void 0 && !await this.admission.validate()) throw new Error(\"The app must verify its current selection before navigating.\");\n\t\t\tif (this.upgrading || this.disposed) throw new Error(\"The app is updating.\");\n\t\t\treturn this.loadBranch(outcome);\n\t\t};\n\t\tload().then(async (branch) => {\n\t\t\tif (this.transition !== transition || this.disposed) return;\n\t\t\ttry {\n\t\t\t\tconst history = this.history;\n\t\t\t\tif (history !== void 0) {\n\t\t\t\t\tif (!await history.seek(history.committed) || this.transition !== transition || this.disposed) return;\n\t\t\t\t\tif (kind === \"traverse\") {\n\t\t\t\t\t\tif (!await history.seek(transition.position) || this.transition !== transition || this.disposed) return;\n\t\t\t\t\t}\n\t\t\t\t\thistory.commit(transition.position, kind);\n\t\t\t\t}\n\t\t\t\tthis.applyMetadata(outcome);\n\t\t\t\tthis.committedHref = href;\n\t\t\t\tthis.update({\n\t\t\t\t\tlocation,\n\t\t\t\t\tbranch,\n\t\t\t\t\tnavigation: { status: \"idle\" },\n\t\t\t\t\tfailure: void 0,\n\t\t\t\t\tcommit: transition.id\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tthis.fail(transition, error);\n\t\t\t}\n\t\t}, (error) => {\n\t\t\tthis.fail(transition, error);\n\t\t\tif (!this.upgrading) this.admission?.recoverLoad();\n\t\t});\n\t}\n\t/** Called by the mounted view after Preact has committed the destination DOM. */\n\trendered(commit) {\n\t\tif (this.transition?.id !== commit || this.snapshot.commit !== commit) {\n\t\t\tif (this.snapshot.navigation.status === \"idle\" && this.blocked === void 0) this.history?.restoreSourceScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst transition = this.transition;\n\t\tconst document = this.browser.document;\n\t\tif (!transition.searchOnly) {\n\t\t\tconst target = document.querySelector(\"#app main, #app [role=main]\") ?? document.getElementById(\"app\");\n\t\t\tif (target !== null) {\n\t\t\t\tif (!target.hasAttribute(\"tabindex\")) target.setAttribute(\"tabindex\", \"-1\");\n\t\t\t\ttarget.focus({ preventScroll: true });\n\t\t\t}\n\t\t}\n\t\tconst saved = this.history?.scroll.get(transition.location.key);\n\t\tif (transition.kind === \"traverse\" && saved !== void 0) this.browser.scrollTo(saved.x, saved.y);\n\t\telse if (transition.scroll === \"auto\") {\n\t\t\tconst target = transition.location.hash === \"\" ? null : document.getElementById(transition.location.hash);\n\t\t\tif (target !== null) target.scrollIntoView();\n\t\t\telse this.browser.scrollTo(0, 0);\n\t\t} else this.browser.scrollTo(transition.sourceScroll.x, transition.sourceScroll.y);\n\t\tthis.history?.finishScroll();\n\t\tEffect.runSync(Deferred.succeed(this.transition.completion, { status: \"committed\" }));\n\t\tthis.transition = void 0;\n\t}\n\tfail(transition, error) {\n\t\tif (this.transition !== transition || this.disposed) return;\n\t\tthis.transition = void 0;\n\t\tconst loadFailure = error instanceof BranchLoadError ? error : void 0;\n\t\tconst originalError = loadFailure === void 0 ? error : loadFailure.error;\n\t\tthis.update({\n\t\t\t...this.snapshot,\n\t\t\tnavigation: { status: \"idle\" },\n\t\t\tfailure: {\n\t\t\t\terror: originalError,\n\t\t\t\tbranch: transition.kind === \"initial\" ? void 0 : loadFailure?.branch,\n\t\t\t\tretry: () => {\n\t\t\t\t\tthis.transitionTo(transition.href, transition.kind, transition.location.key, { scroll: transition.scroll }, transition.position);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tEffect.runSync(Deferred.succeed(transition.completion, {\n\t\t\tstatus: \"failed\",\n\t\t\terror: originalError\n\t\t}));\n\t}\n\tloadStyle(href) {\n\t\tconst absolute = new URL(href, this.browser.location.origin).href;\n\t\tconst cached = this.styles.get(absolute);\n\t\tif (cached !== void 0) return cached;\n\t\tconst document = this.browser.document;\n\t\tconst existing = Array.from(document.querySelectorAll(\"link[rel=\\\"stylesheet\\\"]\")).find((link) => link.href === absolute);\n\t\tif (existing?.sheet !== null && existing?.sheet !== void 0) return Promise.resolve();\n\t\tconst link = existing ?? document.createElement(\"link\");\n\t\tconst promise = Effect.runPromise(Effect.callback((resume) => {\n\t\t\tconst cleanup = () => {\n\t\t\t\tlink.removeEventListener(\"load\", onLoad);\n\t\t\t\tlink.removeEventListener(\"error\", onError);\n\t\t\t\tthis.styleCleanups.delete(cancel);\n\t\t\t};\n\t\t\tconst onLoad = () => {\n\t\t\t\tcleanup();\n\t\t\t\tresume(Effect.void);\n\t\t\t};\n\t\t\tconst onError = () => {\n\t\t\t\tcleanup();\n\t\t\t\tlink.remove();\n\t\t\t\tresume(Effect.fail(/* @__PURE__ */ new Error(`Could not load route stylesheet '${href}'.`)));\n\t\t\t};\n\t\t\tconst cancel = () => {\n\t\t\t\tcleanup();\n\t\t\t\tif (existing === void 0) link.remove();\n\t\t\t\tresume(Effect.fail(/* @__PURE__ */ new Error(\"Router disposed.\")));\n\t\t\t};\n\t\t\tthis.styleCleanups.add(cancel);\n\t\t\tlink.addEventListener(\"load\", onLoad);\n\t\t\tlink.addEventListener(\"error\", onError);\n\t\t\tif (existing === void 0) {\n\t\t\t\tlink.rel = \"stylesheet\";\n\t\t\t\tlink.crossOrigin = \"anonymous\";\n\t\t\t\tlink.href = absolute;\n\t\t\t\tdocument.head.append(link);\n\t\t\t}\n\t\t\treturn Effect.sync(cleanup);\n\t\t})).catch((error) => {\n\t\t\tthis.styles.delete(absolute);\n\t\t\tthrow error;\n\t\t});\n\t\tthis.styles.set(absolute, promise);\n\t\treturn promise;\n\t}\n\tloadModule(id) {\n\t\tconst cached = this.modules.get(id);\n\t\tif (cached !== void 0) return cached;\n\t\tconst module = this.registration.modules.get(id);\n\t\tif (module === void 0) return Promise.reject(/* @__PURE__ */ new Error(`Client module '${id}' is not registered.`));\n\t\tconst loaded = Promise.resolve().then(module.load).then(Schema.decodeUnknownSync(ModuleExports)).catch((error) => {\n\t\t\tthis.modules.delete(id);\n\t\t\tthrow error;\n\t\t});\n\t\tthis.modules.set(id, loaded);\n\t\treturn loaded;\n\t}\n\tasync loadExport(reference) {\n\t\tconst exports = await this.loadModule(reference.module);\n\t\tif (!Object.hasOwn(exports, reference.exportName)) throw new Error(`Module '${reference.module}' has no '${reference.exportName}' export.`);\n\t\treturn exports[reference.exportName];\n\t}\n\tasync loadBranch(outcome, withStyles = true) {\n\t\tconst route = outcome._tag === \"NotFound\" ? void 0 : outcome.route;\n\t\tconst available = /* @__PURE__ */ new Map();\n\t\ttry {\n\t\t\tconst [layouts, page] = await Promise.all([\n\t\t\t\tPromise.all(outcome.layouts.map(async (layout) => {\n\t\t\t\t\tconst [loaded] = await Promise.all([this.loadExport(layout.module).then(Schema.decodeUnknownSync(LayoutModule)), withStyles ? Promise.all((this.registration.modules.get(layout.module.module)?.styles ?? []).map((href) => this.loadStyle(href))) : void 0]);\n\t\t\t\t\tconst result = {\n\t\t\t\t\t\tid: layout.id,\n\t\t\t\t\t\t...loaded\n\t\t\t\t\t};\n\t\t\t\t\tavailable.set(layout.id, result);\n\t\t\t\t\treturn result;\n\t\t\t\t})),\n\t\t\t\troute === void 0 ? void 0 : this.loadExport(route.page).then(Schema.decodeUnknownSync(PageModule)),\n\t\t\t\tPromise.all(withStyles ? [...this.registration.styles ?? [], ...route === void 0 ? [] : this.registration.modules.get(route.page.module)?.styles ?? []].map(async (href) => this.loadStyle(href)) : [])\n\t\t\t]);\n\t\t\treturn {\n\t\t\t\toutcome,\n\t\t\t\tlayouts,\n\t\t\t\tpage: page?.component,\n\t\t\t\tpageBoundaries: page\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconst layouts = [];\n\t\t\tfor (const definition of outcome.layouts) {\n\t\t\t\tconst loaded = available.get(definition.id);\n\t\t\t\tif (loaded === void 0) break;\n\t\t\t\tlayouts.push(loaded);\n\t\t\t}\n\t\t\tthrow BranchLoadError.make({\n\t\t\t\terror,\n\t\t\t\tbranch: {\n\t\t\t\t\toutcome,\n\t\t\t\t\tlayouts,\n\t\t\t\t\tpage: void 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tsetRenderError(error) {\n\t\tif (this.snapshot.branch !== void 0) this.applyMetadata(this.snapshot.branch.outcome, error);\n\t}\n\tapplyMetadata(outcome, renderError = false) {\n\t\tconst resolved = Effect.runSync(resolveMetadata({\n\t\t\tapplicationName: this.registration.applicationName,\n\t\t\tlayouts: outcome.layouts.map((layout) => layout.metadata),\n\t\t\tpage: outcome._tag === \"NotFound\" ? void 0 : outcome.route?.metadata,\n\t\t\toutcome: renderError ? \"Invalid\" : outcome._tag\n\t\t}));\n\t\tconst document = this.browser.document;\n\t\tdocument.title = resolved.title;\n\t\tfor (const name of [\"description\", \"robots\"]) {\n\t\t\tconst tags = Array.from(document.head.querySelectorAll(`meta[name=\"${name}\"]`));\n\t\t\tconst value = resolved.meta[name];\n\t\t\tif (value === void 0) {\n\t\t\t\tfor (const tag of tags) tag.remove();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst tag = tags.shift() ?? document.createElement(\"meta\");\n\t\t\tfor (const duplicate of tags) duplicate.remove();\n\t\t\ttag.name = name;\n\t\t\ttag.content = value;\n\t\t\tif (!tag.isConnected) document.head.append(tag);\n\t\t}\n\t}\n\tdispose() {\n\t\tthis.disposed = true;\n\t\tthis.cancelPending();\n\t\tthis.history?.dispose();\n\t\tthis.browser.removeEventListener(\"beforeunload\", this.onBeforeUnload);\n\t\tfor (const cleanup of this.styleCleanups) cleanup();\n\t\tthis.listeners.clear();\n\t}\n};\n//#endregion\nexport { BranchLoadError, RouterStore };\n\n//# sourceMappingURL=router-store.js.map","import { useErrorBoundary, useState } from \"preact/hooks\";\nimport { Fragment, createElement } from \"preact\";\n//#region src/versions/1/browser/route-boundaries.ts\nconst DefaultError = ({ error, retry }) => createElement(\"div\", { role: \"alert\" }, error instanceof Error ? error.message : \"This page could not load or render. \", createElement(\"button\", { onClick: retry }, \"Retry\"));\nconst Boundary = ({ children, component, branch, router, onRetry }) => {\n\tconst [failure, setFailure] = useState();\n\tconst [, reset] = useErrorBoundary((error) => {\n\t\tsetFailure({\n\t\t\tbranch,\n\t\t\terror\n\t\t});\n\t\trouter.setRenderError(true);\n\t});\n\treturn failure?.branch !== branch ? children : createElement(component, {\n\t\terror: failure.error,\n\t\tretry: () => {\n\t\t\trouter.setRenderError(false);\n\t\t\tonRetry?.();\n\t\t\tsetFailure(void 0);\n\t\t\treset();\n\t\t}\n\t});\n};\nconst Branch = ({ branch, location, router, failure }) => {\n\tconst outcome = branch.outcome;\n\tlet child;\n\tlet lastLayout = branch.layouts.length - 1;\n\tlet boundaryOwner;\n\tif (outcome._tag === \"Matched\" && branch.page !== void 0) child = createElement(branch.page, {\n\t\tkey: outcome.route.id,\n\t\tparams: outcome.params,\n\t\tsearchParams: outcome.searchParams\n\t});\n\telse if (outcome._tag === \"Invalid\" && branch.pageBoundaries?.invalid !== void 0) child = createElement(branch.pageBoundaries.invalid, {\n\t\tlocation,\n\t\tissues: outcome.issues\n\t});\n\telse {\n\t\tchild = createElement(\"main\", { \"data-ignotum-outcome\": outcome._tag }, outcome._tag === \"Invalid\" ? \"Invalid URL\" : \"Page not found\");\n\t\tfor (let index = lastLayout; index >= 0; index--) {\n\t\t\tconst layout = branch.layouts[index];\n\t\t\tif (outcome._tag === \"Invalid\" && layout.invalid !== void 0) {\n\t\t\t\tchild = createElement(layout.invalid, {\n\t\t\t\t\tlocation,\n\t\t\t\t\tissues: outcome.issues\n\t\t\t\t});\n\t\t\t\tlastLayout = index;\n\t\t\t\tboundaryOwner = index;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (outcome._tag === \"NotFound\" && layout.notFound !== void 0) {\n\t\t\t\tchild = createElement(layout.notFound, { location });\n\t\t\t\tlastLayout = index;\n\t\t\t\tboundaryOwner = index;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif (branch.pageBoundaries?.error !== void 0 && outcome._tag === \"Matched\") child = createElement(Boundary, {\n\t\tkey: \"page-boundary\",\n\t\tcomponent: branch.pageBoundaries.error,\n\t\tbranch,\n\t\trouter,\n\t\tchildren: child\n\t});\n\tlet sharedLayouts = 0;\n\twhile (sharedLayouts <= lastLayout && branch.layouts[sharedLayouts]?.id === failure?.branch?.layouts[sharedLayouts]?.id) sharedLayouts++;\n\tconst loadFailure = failure === void 0 ? null : createElement(LoadFailure, {\n\t\tfailure,\n\t\trouter,\n\t\tlayouts: branch.layouts.slice(0, sharedLayouts)\n\t});\n\tfor (let index = lastLayout; index >= 0; index--) {\n\t\tconst layout = branch.layouts[index];\n\t\tif (layout.error !== void 0 && index !== boundaryOwner) child = createElement(Boundary, {\n\t\t\tkey: layout.id,\n\t\t\tcomponent: layout.error,\n\t\t\tbranch,\n\t\t\trouter,\n\t\t\tchildren: child\n\t\t});\n\t\tchild = createElement(layout.component, {\n\t\t\tkey: layout.id,\n\t\t\tchildren: createElement(Fragment, {}, child, index === sharedLayouts - 1 ? loadFailure : null)\n\t\t});\n\t}\n\treturn createElement(Boundary, {\n\t\tcomponent: DefaultError,\n\t\tbranch,\n\t\trouter,\n\t\tchildren: createElement(Fragment, {}, child, sharedLayouts === 0 ? loadFailure : null)\n\t});\n};\nconst LoadFailure = ({ failure, router, layouts }) => {\n\tconst branch = failure.branch;\n\tif (branch === void 0) return createElement(\"div\", { \"data-ignotum-load-error\": \"\" }, createElement(DefaultError, failure));\n\tlet child = createElement(DefaultError, failure);\n\tlet found = false;\n\tfor (const layout of [...layouts ?? branch.layouts].reverse()) {\n\t\tif (layout.error === void 0) continue;\n\t\tif (!found) {\n\t\t\tchild = createElement(layout.error, {\n\t\t\t\terror: failure.error,\n\t\t\t\tretry: failure.retry\n\t\t\t});\n\t\t\tfound = true;\n\t\t} else child = createElement(Boundary, {\n\t\t\tcomponent: layout.error,\n\t\t\tbranch,\n\t\t\trouter,\n\t\t\tonRetry: failure.retry,\n\t\t\tchildren: child\n\t\t});\n\t}\n\treturn createElement(\"div\", { \"data-ignotum-load-error\": \"\" }, createElement(Boundary, {\n\t\tcomponent: DefaultError,\n\t\tbranch,\n\t\trouter,\n\t\tonRetry: failure.retry,\n\t\tchildren: child\n\t}));\n};\n//#endregion\nexport { Branch, DefaultError, LoadFailure };\n\n//# sourceMappingURL=route-boundaries.js.map","import { mountManagedSync } from \"./sync.js\";\nimport { RouterStore } from \"./router-store.js\";\nimport { RouterContext, useRouterSnapshot } from \"./router.js\";\nimport { Branch, LoadFailure } from \"./route-boundaries.js\";\nimport { useLayoutEffect, useState } from \"preact/hooks\";\nimport { Fragment, createElement, render } from \"preact\";\n//#region src/versions/1/browser/bootstrap.ts\nconst RouterView = ({ router }) => {\n\tconst snapshot = useRouterSnapshot(router);\n\tuseLayoutEffect(() => {\n\t\trouter.rendered(snapshot.commit);\n\t}, [router, snapshot]);\n\treturn createElement(RouterContext.Provider, { value: router }, snapshot.branch === void 0 || snapshot.location === void 0 ? createElement(\"div\", { role: \"status\" }, snapshot.failure === void 0 ? \"Loading…\" : null) : createElement(Branch, {\n\t\tbranch: snapshot.branch,\n\t\tlocation: snapshot.location,\n\t\trouter,\n\t\tfailure: snapshot.failure\n\t}), snapshot.failure !== void 0 && snapshot.branch === void 0 ? createElement(LoadFailure, {\n\t\tfailure: snapshot.failure,\n\t\trouter\n\t}) : null);\n};\nconst mounts = /* @__PURE__ */ new WeakSet();\nconst ManagedStatus = ({ client }) => {\n\tconst [snapshot, setSnapshot] = useState(client.upgrade.getSnapshot);\n\tuseLayoutEffect(() => client.upgrade.subscribe(() => setSnapshot(client.upgrade.getSnapshot())), [client]);\n\tif (snapshot.phase === \"ready\" && snapshot.recovery.length === 0) return null;\n\treturn createElement(\"aside\", {\n\t\t\"data-ignotum-update\": snapshot.phase,\n\t\trole: snapshot.phase === \"error\" ? \"alert\" : \"status\"\n\t}, snapshot.message ?? (snapshot.phase === \"connecting\" ? \"Connecting to the app…\" : null), snapshot.recovery.length === 0 ? null : createElement(\"ul\", null, snapshot.recovery.map((message) => createElement(\"li\", { key: message }, message))), snapshot.phase === \"error\" ? createElement(\"button\", {\n\t\ttype: \"button\",\n\t\tonClick: () => client.retry()\n\t}, \"Reload app\") : null, snapshot.recovery.length === 0 ? null : createElement(\"button\", {\n\t\ttype: \"button\",\n\t\tonClick: client.upgrade.dismissRecovery\n\t}, \"Dismiss\"));\n};\n/** The platform owns mounting. Generated registrations contain no Preact render/bootstrap code. */\nconst mountClient = (registration, selection) => {\n\tconst root = window.document.getElementById(\"app\");\n\tif (root === null) throw new Error(\"Ignotum mount element is missing.\");\n\tif (mounts.has(root)) throw new Error(\"The Ignotum client is already mounted.\");\n\tconst router = new RouterStore(registration, selection, window);\n\tconst managed = mountManagedSync(selection, window, {\n\t\tstopAdmission: router.stopForUpgrade,\n\t\treload: router.upgrade\n\t});\n\trouter.setAdmission({\n\t\tvalidate: managed.client.validate,\n\t\trecoverLoad: managed.client.recoverLoad\n\t});\n\trender(createElement(Fragment, null, createElement(ManagedStatus, { client: managed.client }), createElement(RouterView, { router })), root);\n\tconst ready = managed.client.whenReady().then((accepted) => accepted ? router.start() : { status: \"cancelled\" });\n\tmounts.add(root);\n\tlet disposed = false;\n\treturn {\n\t\tready,\n\t\tupgrade: () => managed.client.upgrade.require(),\n\t\tdispose: () => {\n\t\t\tif (disposed) return;\n\t\t\tdisposed = true;\n\t\t\tmounts.delete(root);\n\t\t\trouter.dispose();\n\t\t\tmanaged.dispose();\n\t\t\trender(null, root);\n\t\t}\n\t};\n};\n//#endregion\nexport { mountClient };\n\n//# sourceMappingURL=bootstrap.js.map"],"mappings":";;;;;;;AAGA,MAAM,gBAAgB,OAAO,OAAO;CACnC,iBAAiB,OAAO,OAAO,MAAM,OAAO,YAAY,CAAC,GAAG,OAAO,YAAY,GAAG,CAAC;CACnF,SAAS,OAAO,MAAM,cAAc,CAAC,CAAC,MAAM,OAAO,YAAY,oBAAoB,OAAO,CAAC;CAC3F,MAAM,OAAO,SAAS,cAAc;CACpC,SAAS,OAAO,SAAS;EACxB;EACA;EACA;CACD,CAAC;AACF,CAAC,CAAC,CAAC,SAAS,EAAE,cAAc,EAAE,kBAAkB,QAAQ,EAAE,CAAC;AAC3D,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AC,GAAG,cAAc,YAAY,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI;CAC3I,MAAM,QAAQ,QAAQ,OAAO,UAAU,CAAC,CAAC,MAAM,aAAa,WAAW,OAAO,MAAM,IAAI,EAAE,QAAQ,YAAY,CAAC;CAC/G,OAAO,IAAI,IAAI;CACf,IAAI,WAAW;CACf,OAAO;EACN;EACA,eAAe,QAAQ,OAAO,QAAQ,QAAQ;EAC9C,eAAe;GACd,IAAI,UAAU;GACd,WAAW;GACX,OAAO,OAAO,IAAI;GAClB,OAAO,QAAQ;GACf,QAAQ,QAAQ;GAChB,OAAO,MAAM,IAAI;EAClB;CACD;AACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as Id } from "./types-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { a as Id } from "./types-BeT6F0Pg-DMvRDN0c.js";
|
|
2
|
+
import "./index-BWHInzfU.js";
|
|
3
3
|
import { Effect, Schema } from "effect";
|
|
4
4
|
import { ComponentChildren, ComponentType, JSX } from "preact";
|
|
5
5
|
//#region ../platform/dist/image-RbN1SSCI.d.ts
|
|
@@ -542,4 +542,4 @@ declare const mountClient: (registration: ClientRegistration, selection: Serving
|
|
|
542
542
|
};
|
|
543
543
|
//#endregion
|
|
544
544
|
export { ImageSource as A, UrlValues as C, mountClient as D, getRouteDefinition as E, Image as O, UrlValue$1 as S, createRouteReference as T, RouteLocation as _, InvalidRouteProps as a, RouteReference as b, NavigationResult as c, PathFields as d, ReferenceTypes as f, RouteInputs as g, RouteErrorProps as h, InputFields as i, createImageSource as j, ImageProps as k, NavigationState as l, RequiredUrlValue as m, ClientRegistration as n, LayoutDefinition$1 as o, RegisteredClientModule as p, DecodedFields as r, NavigationOptions as s, BlockerState as t, PageDefinition as u, RouteMatch as v, bindSchema$1 as w, UrlFields as x, RouteProps as y };
|
|
545
|
-
//# sourceMappingURL=bootstrap-DjTwGJao-
|
|
545
|
+
//# sourceMappingURL=bootstrap-DjTwGJao-DPi768T4.d.ts.map
|
package/dist/runtime/client.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as ImageSource, O as Image, _ as RouteLocation, b as RouteReference, c as NavigationResult, f as ReferenceTypes, g as RouteInputs, k as ImageProps, l as NavigationState, s as NavigationOptions, t as BlockerState, v as RouteMatch, y as RouteProps } from "./bootstrap-DjTwGJao-
|
|
2
|
-
import { C as SessionOutcome, S as ProfileField, T as UserId, b as PaginationPage, w as User, y as PaginationOptions } from "./types-
|
|
3
|
-
import { a as InternalServerError, g as FileValue, h as FileMimeType, i as ErrorValue, l as SettledResult, m as FileMetadata, o as Match, p as FileFormat, s as QueryResult$1 } from "./id-
|
|
4
|
-
import "./result-
|
|
5
|
-
import "./sync-
|
|
6
|
-
import "./id-
|
|
7
|
-
import { n as FunctionReference } from "./api-BnUKx9cj-
|
|
8
|
-
import "./pagination-
|
|
1
|
+
import { A as ImageSource, O as Image, _ as RouteLocation, b as RouteReference, c as NavigationResult, f as ReferenceTypes, g as RouteInputs, k as ImageProps, l as NavigationState, s as NavigationOptions, t as BlockerState, v as RouteMatch, y as RouteProps } from "./bootstrap-DjTwGJao-DPi768T4.js";
|
|
2
|
+
import { C as SessionOutcome, S as ProfileField, T as UserId, b as PaginationPage, w as User, y as PaginationOptions } from "./types-BeT6F0Pg-DMvRDN0c.js";
|
|
3
|
+
import { a as InternalServerError, g as FileValue, h as FileMimeType, i as ErrorValue, l as SettledResult, m as FileMetadata, o as Match, p as FileFormat, s as QueryResult$1 } from "./id-D87q-n2D-CDMwTSUR.js";
|
|
4
|
+
import "./result-Bq32FA7g.js";
|
|
5
|
+
import "./sync-BMmV8oYt.js";
|
|
6
|
+
import "./id-BPFV3D3V.js";
|
|
7
|
+
import { n as FunctionReference } from "./api-BnUKx9cj-K-F-SOLs.js";
|
|
8
|
+
import "./pagination-BPFV3D3V.js";
|
|
9
9
|
import { Cause, Context as Context$1, Effect, Layer, Schema } from "effect";
|
|
10
10
|
import { Dispatch, Reducer, StateUpdater, useCallback, useContext, useDebugValue, useEffect, useErrorBoundary, useId as useElementId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState } from "preact/hooks";
|
|
11
11
|
import { AnyComponent, Attributes, ClassAttributes, Component, ComponentChild, ComponentChildren, ComponentClass, ComponentConstructor, ComponentFactory, ComponentProps, ComponentType, Consumer, Context, ContextType, ErrorInfo, Fragment, FunctionComponent, FunctionalComponent, JSX, JSX as JSX$1, Key, PreactConsumer, PreactContext, PreactDOMAttributes, PreactProvider, Provider, Ref, RefCallback, RefObject, RenderableProps, TargetedAnimationEvent, TargetedClipboardEvent, TargetedCommandEvent, TargetedCompositionEvent, TargetedDragEvent, TargetedEvent, TargetedFocusEvent, TargetedInputEvent, TargetedKeyboardEvent, TargetedMouseEvent, TargetedPictureInPictureEvent, TargetedPointerEvent, TargetedSnapEvent, TargetedSubmitEvent, TargetedToggleEvent, TargetedTouchEvent, TargetedTransitionEvent, TargetedUIEvent, TargetedWheelEvent, VNode, cloneElement, createContext, createElement, createRef, h, isValidElement, toChildArray } from "preact";
|
|
@@ -25,7 +25,7 @@ declare const Query: {
|
|
|
25
25
|
skip: QuerySkip;
|
|
26
26
|
};
|
|
27
27
|
//#endregion
|
|
28
|
-
//#region ../platform/dist/id-
|
|
28
|
+
//#region ../platform/dist/id-CfotK_TR.d.ts
|
|
29
29
|
type IdState = {
|
|
30
30
|
readonly status: "pending";
|
|
31
31
|
readonly outcome?: SessionOutcome;
|
package/dist/runtime/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as Files, S as BrowserSession, a as url, b as syncClientInternals, c as useMatch, d as useRoute, l as useNavigate, n as NavLink, o as useBlocker, r as Redirect, s as useLocation, t as Link, u as useNavigation, v as SyncClient, w as ClientInfrastructureError, x as syncRuntime } from "./router-
|
|
3
|
-
import { n as functionPathOf } from "./api-
|
|
4
|
-
import { n as PaginationPageSize } from "./pagination
|
|
1
|
+
import { b as pending, g as Result$2, j as encodeTransportObject, y as inspectResult } from "./id-rzjaCxeF.js";
|
|
2
|
+
import { C as Files, S as BrowserSession, a as url, b as syncClientInternals, c as useMatch, d as useRoute, l as useNavigate, n as NavLink, o as useBlocker, r as Redirect, s as useLocation, t as Link, u as useNavigation, v as SyncClient, w as ClientInfrastructureError, x as syncRuntime } from "./router-CfNPtoVO.js";
|
|
3
|
+
import { n as functionPathOf } from "./api-CrrSjYL1.js";
|
|
4
|
+
import { n as PaginationPageSize } from "./pagination-CfEleffG.js";
|
|
5
5
|
import { t as Image } from "./image-gofzZeCm.js";
|
|
6
6
|
import { Effect, Schema } from "effect";
|
|
7
7
|
import { useCallback, useCallback as useCallback$1, useContext, useDebugValue, useDebugValue as useDebugValue$1, useEffect, useEffect as useEffect$1, useErrorBoundary, useId as useElementId, useImperativeHandle, useLayoutEffect, useMemo, useMemo as useMemo$1, useReducer, useRef, useState, useState as useState$1 } from "preact/hooks";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./types-BeT6F0Pg-DMvRDN0c.js";
|
|
@@ -163,11 +163,11 @@ declare const Result$1: {
|
|
|
163
163
|
try: typeof tryResult;
|
|
164
164
|
};
|
|
165
165
|
//#endregion
|
|
166
|
-
//#region ../contracts/dist/id-
|
|
166
|
+
//#region ../contracts/dist/id-D87q-n2D.d.ts
|
|
167
167
|
declare const GeneratedId: Schema.brand<Schema.String, "ignotum/id"> & {
|
|
168
168
|
readonly idPrefix: undefined;
|
|
169
169
|
};
|
|
170
170
|
type GeneratedId = typeof GeneratedId.Type;
|
|
171
171
|
//#endregion
|
|
172
172
|
export { fileFormats as _, InternalServerError as a, Result$1 as c, TransportObject as d, TransportValue as f, FileValue as g, FileMimeType as h, ErrorValue as i, SettledResult as l, FileMetadata as m, DocumentNotFoundValue as n, Match as o, FileFormat as p, ErrorBrand as r, QueryResult as s, GeneratedId as t, documentNotFound as u };
|
|
173
|
-
//# sourceMappingURL=id-
|
|
173
|
+
//# sourceMappingURL=id-D87q-n2D-CDMwTSUR.d.ts.map
|
|
@@ -469,6 +469,15 @@ const SessionOutcome = Schema.Literals([
|
|
|
469
469
|
"ProfileUpdated",
|
|
470
470
|
"Cancelled"
|
|
471
471
|
]);
|
|
472
|
+
const idLimits = {
|
|
473
|
+
sessionMillis: 2592e6,
|
|
474
|
+
leaseMillis: 3e4,
|
|
475
|
+
refreshMillis: 2e4,
|
|
476
|
+
requestMillis: 6e5,
|
|
477
|
+
codeMillis: 6e4,
|
|
478
|
+
requestBytes: 16384,
|
|
479
|
+
pendingRequests: 5
|
|
480
|
+
};
|
|
472
481
|
const platformRevision = {
|
|
473
482
|
major: 1,
|
|
474
483
|
minor: 0
|
|
@@ -483,6 +492,6 @@ const DevelopmentSelection = initial(Schema.Struct({
|
|
|
483
492
|
}));
|
|
484
493
|
const developmentSelectionKey = "ignotum.id.development";
|
|
485
494
|
//#endregion
|
|
486
|
-
export {
|
|
495
|
+
export { decodeTransportValue as A, fileLimits as B, endpointUrl as C, TransportObjectTypeSchema as D, upgrade as E, RuntimeFileOccurrence as F, runtimeFileOccurrencesOf as G, grantFileValue as H, constrainedFileValue as I, DataHistoryId as J, ActivationGeneration as K, fileFormats as L, FileFormat as M, FileId as N, datePathsOf as O, RuntimeFileMetadata as P, fileGrantUrlOf as R, ServingSelection as S, initial as T, isFileValue as U, fileMimeTypes as V, makeFileValue as W, InvocationKey as Y, documentNotFound as _, SessionResponse as a, pending as b, UserId as c, makeIdContext as d, sessionPath as f, Result$1 as g, ErrorValueSchema as h, SessionRequest as i, encodeTransportObject as j, datePathsOfObject as k, developmentSelectionKey as l, ErrorBrand as m, SessionOutcome as n, SessionState as o, sessionRequestsPath as p, AppStateRevision as q, SessionRedirect as r, User as s, DevelopmentSelection as t, idLimits as u, failureFromWire as v, sameSelection as w, resultFromEffect as x, inspectResult as y, fileIdOf as z };
|
|
487
496
|
|
|
488
|
-
//# sourceMappingURL=id-
|
|
497
|
+
//# sourceMappingURL=id-rzjaCxeF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id-BrEnxY-r.js","names":["Result"],"sources":["../../../contracts/dist/runtime/identity.js","../../../contracts/dist/schema/file.js","../../../contracts/dist/runtime/value.js","../../../contracts/dist/versioned.js","../../../contracts/dist/deployment.js","../../../contracts/dist/runtime/result.js","../../../contracts/dist/id.js"],"sourcesContent":["import { AppId, AuthAccountId, AuthDeviceCodeId, AuthInternalId, AuthInvitationId, AuthMemberId, AuthSessionId, AuthVerificationId, ConnectionId, DevDatabaseLockId, InvocationId, PlatformPrincipalId, RequestId, RuntimeRequestNonce, SubscriptionId, TableId, TeamId, VersionId, defineId } from \"./id.js\";\nimport { Schema } from \"effect\";\n//#region src/runtime/identity.ts\nconst InvocationKey = Schema.String.pipe(Schema.brand(\"ignotum/hosted/InvocationKey\"));\nconst ActivationGeneration = Schema.Natural.pipe(Schema.brand(\"ignotum/hosted/ActivationGeneration\"));\nconst AppStateRevision = Schema.Natural.pipe(Schema.brand(\"ignotum/hosted/AppStateRevision\"));\nconst VersionNumber = Schema.Int.check(Schema.isGreaterThan(0)).pipe(Schema.brand(\"ignotum/hosted/VersionNumber\"));\nconst ClientApiVersion = Schema.Int.check(Schema.isGreaterThan(0)).pipe(Schema.brand(\"ignotum/platform/ClientApiVersion\"));\nconst ServerApiVersion = Schema.Int.check(Schema.isGreaterThan(0)).pipe(Schema.brand(\"ignotum/platform/ServerApiVersion\"));\nconst CapabilityId = Schema.String.check(Schema.isTrimmed(), Schema.isPattern(/^[a-z][a-z0-9]*(?:[./-][a-z0-9]+)*$/), Schema.isMaxLength(128)).pipe(Schema.brand(\"ignotum/platform/CapabilityId\"));\nconst ProtocolVersion = Schema.Int.check(Schema.isGreaterThan(0)).pipe(Schema.brand(\"ignotum/platform/ProtocolVersion\"));\nconst DataHistoryId = defineId(\"hist\", \"ignotum/hosted/DataHistoryId\");\n//#endregion\nexport { ActivationGeneration, AppId, AppStateRevision, AuthAccountId, AuthDeviceCodeId, AuthInternalId, AuthInvitationId, AuthMemberId, AuthSessionId, AuthVerificationId, CapabilityId, ClientApiVersion, ConnectionId, DataHistoryId, DevDatabaseLockId, InvocationId, InvocationKey, PlatformPrincipalId, ProtocolVersion, RequestId, RuntimeRequestNonce, ServerApiVersion, SubscriptionId, TableId, TeamId, VersionId, VersionNumber };\n\n//# sourceMappingURL=identity.js.map","import { defineId } from \"../runtime/id.js\";\nimport { Predicate, Schema, SchemaGetter } from \"effect\";\n//#region src/schema/file.ts\nconst fileFormats = [\n\t\"jpeg\",\n\t\"png\",\n\t\"webp\",\n\t\"avif\",\n\t\"gif\"\n];\nconst FileFormat = Schema.Literals(fileFormats);\nconst fileMimeTypes = {\n\tavif: \"image/avif\",\n\tgif: \"image/gif\",\n\tjpeg: \"image/jpeg\",\n\tpng: \"image/png\",\n\twebp: \"image/webp\"\n};\nconst fileLimits = {\n\tactiveGrantsPerConnection: 1024,\n\tdistinctFilesPerQuerySnapshot: 256,\n\tfileBytes: 10485760,\n\tfilesPerMutation: 8,\n\tfilenameBytes: 255,\n\tmutationBytes: 26214400,\n\tpreparationLifetimeMillis: 9e5,\n\tstagedBytesPerApp: 104857600\n};\nconst FileId = Object.assign(Schema.String.pipe(Schema.check(Schema.isPattern(/^file_[0-9A-Za-z_-]{20,128}$/)), Schema.brand(\"ignotum/file/FileId\")), { idPrefix: \"file\" });\nconst FileUploadToken = defineId(\"upload\", \"ignotum/file/FileUploadToken\");\nconst FileGrantToken = defineId(\"grant\", \"ignotum/file/FileGrantToken\");\nconst FileValueTypeId = Symbol.for(\"ignotum/file/FileValue\");\nconst FileGrantTypeId = Symbol.for(\"ignotum/file/FileGrant\");\nconst isFileValue = (value) => Predicate.isObject(value) && Predicate.hasProperty(value, FileValueTypeId) && Predicate.isObject(value[FileValueTypeId]) && Predicate.hasProperty(value[FileValueTypeId], \"id\") && Schema.is(FileId)(value[FileValueTypeId].id) && Predicate.hasProperty(value, \"format\") && Schema.is(FileFormat)(value.format) && Predicate.hasProperty(value, \"name\") && Predicate.isString(value.name) && Predicate.hasProperty(value, \"size\") && Predicate.isNumber(value.size) && Predicate.hasProperty(value, \"mimeType\") && value.mimeType === fileMimeTypes[value.format];\nconst buildFileValue = (id, metadata, grantUrl) => {\n\tconst value = {\n\t\tformat: metadata.format,\n\t\tmimeType: fileMimeTypes[metadata.format],\n\t\tname: metadata.name,\n\t\tsize: metadata.size\n\t};\n\tObject.defineProperty(value, FileValueTypeId, {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\tvalue: Object.freeze({ id }),\n\t\twritable: false\n\t});\n\tif (grantUrl !== void 0) Object.defineProperty(value, FileGrantTypeId, {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\tvalue: grantUrl,\n\t\twritable: false\n\t});\n\treturn Object.freeze(value);\n};\nconst makeFileValue = (id, metadata) => buildFileValue(id, metadata);\nconst fileIdOf = (value) => value[FileValueTypeId].id;\nconst grantFileValue = (value, url) => {\n\treturn buildFileValue(fileIdOf(value), value, url);\n};\nconst fileGrantUrlOf = (value) => value[FileGrantTypeId];\nconst EncodedFileValue = Schema.Struct({\n\t$ignotum: Schema.Literal(\"file\"),\n\tid: FileId,\n\tformat: FileFormat,\n\tname: Schema.String,\n\tsize: Schema.Int.check(Schema.isBetween({\n\t\tminimum: 0,\n\t\tmaximum: fileLimits.fileBytes\n\t}))\n});\nconst RuntimeFileMetadata = Schema.Struct({\n\tid: FileId,\n\tformat: FileFormat,\n\tname: Schema.String,\n\tsize: Schema.Int.check(Schema.isBetween({\n\t\tminimum: 0,\n\t\tmaximum: fileLimits.fileBytes\n\t}))\n});\nconst FilePath = Schema.Array(Schema.Union([Schema.String, Schema.Natural]));\nconst RuntimeFileOccurrence = Schema.Struct({\n\tpath: FilePath,\n\tfile: RuntimeFileMetadata\n});\nconst DecodedFileValue = Schema.declare(isFileValue, { title: \"FileValue\" });\nconst FileValue = EncodedFileValue.pipe(Schema.decodeTo(DecodedFileValue, {\n\tdecode: SchemaGetter.transform((encoded) => makeFileValue(encoded.id, {\n\t\tformat: encoded.format,\n\t\tname: encoded.name,\n\t\tsize: encoded.size\n\t})),\n\tencode: SchemaGetter.transform((value) => ({\n\t\t$ignotum: \"file\",\n\t\tformat: value.format,\n\t\tid: fileIdOf(value),\n\t\tname: value.name,\n\t\tsize: value.size\n\t}))\n}));\nconst constrainedFileValue = (formats, maxBytes) => FileValue.pipe(Schema.check(Schema.makeFilter((value) => {\n\tconst issues = [];\n\tif (!formats.includes(value.format)) issues.push({\n\t\tpath: [\"format\"],\n\t\tissue: `File format '${value.format}' is not allowed by this field.`\n\t});\n\tif (value.size > maxBytes) issues.push({\n\t\tpath: [\"size\"],\n\t\tissue: `File size ${value.size} exceeds this field's ${maxBytes} byte limit.`\n\t});\n\treturn issues;\n})));\nconst collectFileOccurrences = (value, path, occurrences) => {\n\tif (isFileValue(value)) {\n\t\toccurrences.push({\n\t\t\tfile: value,\n\t\t\tpath\n\t\t});\n\t\treturn;\n\t}\n\tif (globalThis.Array.isArray(value)) {\n\t\tfor (const [index, child] of value.entries()) collectFileOccurrences(child, [...path, index], occurrences);\n\t\treturn;\n\t}\n\tif (!Predicate.isObject(value) || Predicate.isDate(value)) return;\n\tfor (const [key, child] of Object.entries(value)) collectFileOccurrences(child, [...path, key], occurrences);\n};\nconst fileOccurrencesOf = (value) => {\n\tconst occurrences = [];\n\tcollectFileOccurrences(value, [], occurrences);\n\treturn occurrences;\n};\nconst runtimeFileOccurrencesOf = (value) => fileOccurrencesOf(value).map(({ file, path }) => ({\n\tpath,\n\tfile: {\n\t\tformat: file.format,\n\t\tid: fileIdOf(file),\n\t\tname: file.name,\n\t\tsize: file.size\n\t}\n}));\nconst collectEncodedFileOccurrences = (value, path, occurrences) => {\n\tif (Schema.is(EncodedFileValue)(value)) {\n\t\tconst file = Schema.decodeUnknownSync(EncodedFileValue)(value);\n\t\toccurrences.push({\n\t\t\tpath,\n\t\t\tfile: {\n\t\t\t\tformat: file.format,\n\t\t\t\tid: file.id,\n\t\t\t\tname: file.name,\n\t\t\t\tsize: file.size\n\t\t\t}\n\t\t});\n\t\treturn;\n\t}\n\tif (globalThis.Array.isArray(value)) {\n\t\tfor (const [index, child] of value.entries()) collectEncodedFileOccurrences(child, [...path, index], occurrences);\n\t\treturn;\n\t}\n\tif (!Schema.is(Schema.JsonObject)(value)) return;\n\tfor (const [key, child] of Object.entries(value)) collectEncodedFileOccurrences(child, [...path, key], occurrences);\n};\nconst encodedFileOccurrencesOf = (value) => {\n\tconst occurrences = [];\n\tcollectEncodedFileOccurrences(value, [], occurrences);\n\treturn occurrences;\n};\n//#endregion\nexport { EncodedFileValue, FileFormat, FileGrantToken, FileGrantTypeId, FileId, FilePath, FileUploadToken, FileValue, FileValueTypeId, RuntimeFileMetadata, RuntimeFileOccurrence, constrainedFileValue, encodedFileOccurrencesOf, fileFormats, fileGrantUrlOf, fileIdOf, fileLimits, fileMimeTypes, fileOccurrencesOf, grantFileValue, isFileValue, makeFileValue, runtimeFileOccurrencesOf };\n\n//# sourceMappingURL=file.js.map","import { EncodedFileValue, FileValue, isFileValue } from \"../schema/file.js\";\nimport { Predicate, Schema } from \"effect\";\n//#region src/runtime/value.ts\nconst TransportValueSchema = Schema.suspend(() => Schema.Union([\n\tSchema.Null,\n\tSchema.Boolean,\n\tSchema.Finite,\n\tSchema.String,\n\tSchema.Date,\n\tFileValue,\n\tSchema.Array(TransportValueSchema),\n\tSchema.Record(Schema.String, Schema.UndefinedOr(TransportValueSchema))\n]));\nconst TransportValueTypeSchema = Schema.toType(TransportValueSchema);\nconst TransportObjectTypeSchema = Schema.Record(Schema.String, Schema.UndefinedOr(TransportValueTypeSchema));\nconst encodeTransportValue = (value) => {\n\tif (Predicate.isDate(value)) return Schema.encodeSync(Schema.DateFromMillis)(value);\n\tif (isFileValue(value)) return Schema.encodeSync(FileValue)(value);\n\tif (globalThis.Array.isArray(value)) return value.map(encodeTransportValue);\n\tif (Predicate.isNumber(value)) return Schema.decodeSync(Schema.Finite)(value);\n\tif (Predicate.isNull(value) || Predicate.isString(value) || Predicate.isBoolean(value)) return value;\n\treturn Object.fromEntries(Object.entries(value).flatMap(([key, child]) => child === void 0 ? [] : [[key, encodeTransportValue(child)]]));\n};\nconst encodeTransportObject = (value) => Schema.decodeUnknownSync(Schema.JsonObject)(encodeTransportValue(Schema.decodeUnknownSync(TransportObjectTypeSchema)(value)));\nconst collectDatePaths = (value, path, paths) => {\n\tif (Predicate.isDate(value)) {\n\t\tSchema.decodeSync(Schema.Date)(value);\n\t\tpaths.push(path);\n\t\treturn;\n\t}\n\tif (isFileValue(value)) return;\n\tif (globalThis.Array.isArray(value)) {\n\t\tfor (const [index, child] of value.entries()) collectDatePaths(child, [...path, index], paths);\n\t\treturn;\n\t}\n\tif (value === void 0 || Predicate.isNull(value) || Predicate.isString(value) || Predicate.isNumber(value) || Predicate.isBoolean(value)) return;\n\tfor (const [key, child] of Object.entries(value)) collectDatePaths(child, [...path, key], paths);\n};\nconst datePathsOf = (value) => {\n\tconst paths = [];\n\tcollectDatePaths(value, [], paths);\n\treturn paths;\n};\nconst datePathsOfObject = (value) => datePathsOf(Schema.decodeUnknownSync(TransportObjectTypeSchema)(value));\nconst pathKey = (path) => JSON.stringify(path);\nconst decodeTransportValueAt = (value, path, encodedDatePaths) => {\n\tif (encodedDatePaths.has(pathKey(path))) return Schema.decodeUnknownSync(Schema.DateFromMillis)(value);\n\tif (Schema.is(EncodedFileValue)(value)) return Schema.decodeSync(FileValue)(value);\n\tif (globalThis.Array.isArray(value)) return value.map((item, index) => decodeTransportValueAt(item, [...path, index], encodedDatePaths));\n\tif (Predicate.isNull(value) || Predicate.isString(value) || Predicate.isNumber(value) || Predicate.isBoolean(value)) return value;\n\treturn Object.fromEntries(Object.entries(value).map(([key, item]) => [key, decodeTransportValueAt(item, [...path, key], encodedDatePaths)]));\n};\nconst decodeTransportValue = (value, datePaths) => decodeTransportValueAt(value, [], new Set(datePaths.map(pathKey)));\nconst decodeTransportObject = (value, datePaths) => {\n\tconst encodedDatePaths = new Set(datePaths.map(pathKey));\n\treturn Object.fromEntries(Object.entries(value).map(([key, child]) => [key, decodeTransportValueAt(child, [key], encodedDatePaths)]));\n};\n//#endregion\nexport { TransportObjectTypeSchema, TransportValueSchema, TransportValueTypeSchema, datePathsOf, datePathsOfObject, decodeTransportObject, decodeTransportValue, encodeTransportObject, encodeTransportValue };\n\n//# sourceMappingURL=value.js.map","import { Schema, SchemaGetter } from \"effect\";\n//#region src/versioned.ts\n/** Registers the first revision of a long-lived format. */\nconst initial = (schema) => schema;\n/** Adds one adjacent migration and keeps encoding on the new current revision. */\nconst upgrade = (previous, current, migrate) => {\n\tconst accepted = Schema.Union([previous, current]);\n\tconst isCurrent = Schema.is(current);\n\treturn accepted.pipe(Schema.decodeTo(Schema.toType(current), {\n\t\tdecode: SchemaGetter.transform((value) => {\n\t\t\tif (isCurrent(value)) return value;\n\t\t\treturn migrate(value);\n\t\t}),\n\t\tencode: SchemaGetter.transform((value) => value)\n\t}));\n};\n//#endregion\nexport { initial, upgrade };\n\n//# sourceMappingURL=versioned.js.map","import { AppId } from \"./runtime/id.js\";\nimport { ActivationGeneration, DataHistoryId, VersionNumber } from \"./runtime/identity.js\";\nimport { initial } from \"./versioned.js\";\nimport { Sha256 } from \"./artifact.js\";\nimport { Schema } from \"effect\";\n//#region src/deployment.ts\nconst strict = (fields) => Schema.Struct(fields).annotate({ parseOptions: { onExcessProperty: \"error\" } });\nconst NonnegativeInteger = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0), Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER));\nconst PositiveInteger = NonnegativeInteger.check(Schema.isGreaterThan(0));\nconst PlatformRevision = strict({\n\tmajor: PositiveInteger,\n\tminor: NonnegativeInteger\n});\nconst PlatformRequirement = strict({\n\tmajor: PositiveInteger,\n\tminimumMinor: NonnegativeInteger\n});\nconst compareRevisions = (left, right) => left.major - right.major || left.minor - right.minor;\nconst supportsRequirement = (revision, requirement) => revision.major === requirement.major && revision.minor >= requirement.minimumMinor;\nconst revisionPrefix = (revision) => `/_ignotum/v${revision.major}.${revision.minor}`;\nconst PlatformEndpoint = Schema.Literals([\n\t\"client.js\",\n\t\"selection\",\n\t\"sync\",\n\t\"session\",\n\t\"session/requests\",\n\t\"session/callback\"\n]);\nconst endpointUrl = (revision, endpoint) => `${revisionPrefix(revision)}/${endpoint}`;\nconst RevisionSegment = Schema.String.check(Schema.isPattern(/^v[1-9][0-9]*\\.(?:0|[1-9][0-9]*)$/));\n/** Decode the path segment before consulting the deployed revision registry. */\nconst parseRevision = (segment) => {\n\tconst [major, minor] = Schema.decodeUnknownSync(RevisionSegment)(segment).slice(1).split(\".\").map(Number);\n\treturn Schema.decodeUnknownSync(PlatformRevision)({\n\t\tmajor,\n\t\tminor\n\t});\n};\nconst ServingSelectionV1 = strict({\n\tformatVersion: Schema.Literal(1),\n\tappId: AppId,\n\tversionNumber: VersionNumber.check(Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER)),\n\tplatform: PlatformRevision,\n\tactivationGeneration: ActivationGeneration.check(Schema.isGreaterThan(0), Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER)),\n\tdeploymentEpoch: PositiveInteger,\n\tdataHistoryId: DataHistoryId\n});\nconst ServingSelection = initial(ServingSelectionV1);\nconst sameSelection = (left, right) => left.appId === right.appId && left.versionNumber === right.versionNumber && compareRevisions(left.platform, right.platform) === 0 && left.activationGeneration === right.activationGeneration && left.deploymentEpoch === right.deploymentEpoch && left.dataHistoryId === right.dataHistoryId;\n/** Separate wire generation from both persisted format and platform revisions. */\nconst BrowserHandshake = strict({\n\tdeploymentProtocol: Schema.Literal(3),\n\tselection: ServingSelection\n});\nconst retention = {\n\treadyAgeMs: 6048e5,\n\tnewestReadyCount: 3,\n\tuploadAgeMs: 864e5\n};\nconst TransitionV1 = strict({\n\tformatVersion: Schema.Literal(1),\n\toperationId: Schema.NonEmptyString,\n\tsource: Schema.NullOr(ServingSelection),\n\ttarget: ServingSelection,\n\tphase: Schema.Literals([\n\t\t\"Closing\",\n\t\t\"Preparing\",\n\t\t\"Committed\",\n\t\t\"Opening\",\n\t\t\"Complete\",\n\t\t\"Aborting\",\n\t\t\"Aborted\"\n\t])\n}).check(Schema.makeFilter((transition) => {\n\tif (transition.source === null) return void 0;\n\tif (transition.source.appId !== transition.target.appId) return \"A transition belongs to one app\";\n\tif (transition.target.activationGeneration <= transition.source.activationGeneration) return \"A transition must advance the activation generation, including rollback\";\n})).annotate({ parseOptions: { onExcessProperty: \"error\" } });\nconst AppTransition = initial(TransitionV1);\nconst RevisionMap = Schema.Array(PlatformRevision).check(Schema.makeFilter((revisions) => new Set(revisions.map((revision) => revision.major)).size === revisions.length ? void 0 : \"Select exactly one minor for each supported major\"));\nconst MaintenanceV1 = strict({\n\tformatVersion: Schema.Literal(1),\n\toperationId: Schema.NonEmptyString,\n\tdeploymentEpoch: PositiveInteger,\n\tphase: Schema.Literals([\n\t\t\"Closing\",\n\t\t\"Deploying\",\n\t\t\"Verifying\",\n\t\t\"Resuming\",\n\t\t\"Complete\"\n\t]),\n\texpectedBuild: Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/)),\n\tpreviousBuild: Schema.NullOr(Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/))),\n\taborted: Schema.Boolean,\n\tprevious: RevisionMap,\n\ttarget: RevisionMap,\n\tdiagnostic: Schema.NullOr(Schema.String.check(Schema.isMaxLength(4096))),\n\tcursor: Schema.NullOr(Schema.NonEmptyString)\n}).check(Schema.makeFilter((journal) => journal.aborted && journal.previousBuild === null ? \"Bootstrap has no previous build to restore\" : void 0));\nconst MaintenanceJournal = initial(MaintenanceV1);\nconst effectiveDeploymentRevisions = (journal) => journal.aborted ? journal.previous : journal.target;\nconst effectiveDeploymentBuild = (journal) => journal.aborted ? journal.previousBuild : journal.expectedBuild;\nconst DeploymentServiceReadiness = Schema.Struct({\n\tbuildSha256: Sha256,\n\trevisions: Schema.Array(PlatformRevision)\n});\n//#endregion\nexport { AppTransition, BrowserHandshake, DeploymentServiceReadiness, MaintenanceJournal, PlatformEndpoint, PlatformRequirement, PlatformRevision, ServingSelection, compareRevisions, effectiveDeploymentBuild, effectiveDeploymentRevisions, endpointUrl, parseRevision, retention, revisionPrefix, sameSelection, supportsRequirement };\n\n//# sourceMappingURL=deployment.js.map","import { RequestId } from \"./id.js\";\nimport { decodeTransportObject } from \"./value.js\";\nimport { Brand, Effect, Effectable, Function, Option, Predicate, Schema } from \"effect\";\n//#region src/runtime/result.ts\nconst ResultTypeId = Symbol.for(\"ignotum/runtime/result/Result\");\nconst CompletedResultTypeId = Symbol.for(\"ignotum/runtime/result/Completed\");\nconst PendingResultTypeId = Symbol.for(\"ignotum/runtime/result/Pending\");\nconst ErrorBrand = \"ignotum/error\";\nconst makeErrorValue = Brand.nominal();\nconst ErrorValueSchema = Schema.StructWithRest(Schema.Struct({ _tag: Schema.String }), [Schema.Record(Schema.String, Schema.Json)]).pipe(Schema.brand(ErrorBrand));\nvar InternalServerErrorCause = class extends Schema.TaggedError()(\"InternalServerError\", { requestId: RequestId }) {};\nconst InternalServerError = InternalServerErrorCause;\nconst InternalServerErrorSchema = InternalServerErrorCause.pipe(Schema.brand(ErrorBrand));\nconst effectOf = (value) => Predicate.hasProperty(value, ResultTypeId) ? value[ResultTypeId] : Effect.succeed(value);\nfunction makeResultEffectBase() {\n\tconst Base = function() {};\n\tBase.prototype = Effectable.Prototype({\n\t\tlabel: \"IgnotumResult\",\n\t\tevaluate() {\n\t\t\treturn this[ResultTypeId];\n\t\t}\n\t});\n\treturn Base;\n}\nconst ResultEffectBase = makeResultEffectBase();\nvar ResultOperation = class ResultOperation extends ResultEffectBase {\n\t[ResultTypeId];\n\tconstructor(effect, completed) {\n\t\tsuper();\n\t\tthis[ResultTypeId] = effect;\n\t\tif (completed !== void 0) Object.defineProperty(this, CompletedResultTypeId, { value: completed });\n\t}\n\tcatch(cases) {\n\t\tconst effectCases = {};\n\t\tfor (const [tag, handler] of Object.entries(cases)) if (Predicate.isFunction(handler)) effectCases[tag] = (failure) => effectOf(handler(failure));\n\t\tconst runtimeEffect = this[ResultTypeId];\n\t\tconst caught = Effect.catchTags(runtimeEffect, effectCases);\n\t\treturn new ResultOperation(caught);\n\t}\n};\nvar PendingQueryResult = class {\n\t[PendingResultTypeId] = PendingResultTypeId;\n};\nconst inspectResult = (value) => {\n\tif (!Predicate.hasProperty(value, CompletedResultTypeId)) return void 0;\n\treturn value[CompletedResultTypeId];\n};\nconst effectFromResult = (result) => result[ResultTypeId];\nconst resultFromEffect = (effect) => new ResultOperation(effect);\nconst isFailureResult = (result) => Predicate.hasProperty(result, CompletedResultTypeId) && Predicate.isObject(result[CompletedResultTypeId]) && Predicate.hasProperty(result[CompletedResultTypeId], \"type\") && result[CompletedResultTypeId].type === \"Failure\";\nconst succeed = (value) => new ResultOperation(Effect.succeed(value), {\n\ttype: \"Success\",\n\tvalue\n});\nconst fail = (error) => new ResultOperation(Effect.fail(error), {\n\ttype: \"Failure\",\n\terror\n});\nconst tryResult = (body) => {\n\treturn new ResultOperation(Effect.gen(body));\n};\nconst match = Function.dual(2, (result, matchers) => {\n\tif (result instanceof PendingQueryResult) {\n\t\tif (matchers.pending === void 0) throw new Error(\"A pending Result requires a pending matcher.\");\n\t\treturn matchers.pending();\n\t}\n\tif (!Predicate.hasProperty(result, ResultTypeId)) throw new Error(\"Unknown Result implementation.\");\n\tconst inspected = inspectResult(result);\n\tif (inspected?.type === \"Success\") {\n\t\tconst value = inspected.value;\n\t\treturn matchers.value(value);\n\t}\n\tif (!isFailureResult(result)) throw new Error(\"Unknown or incomplete Result operation.\");\n\tconst error = result[CompletedResultTypeId].error;\n\tif (error._tag === \"InternalServerError\") {\n\t\tconst internalError = Schema.decodeUnknownSync(InternalServerErrorSchema)(error);\n\t\tconst handler = matchers.internalError;\n\t\tif (handler === void 0) throw internalError;\n\t\treturn handler(internalError);\n\t}\n\tconst errorMatcher = matchers.error;\n\tif (errorMatcher === void 0) throw new Error(`No matcher was provided for ${error._tag}.`);\n\tif (Predicate.isFunction(errorMatcher)) return errorMatcher(error);\n\tconst handlers = errorMatcher;\n\tconst handler = Object.hasOwn(handlers, error._tag) ? handlers[error._tag] : void 0;\n\tif (handler === void 0) throw new Error(`No matcher was provided for ${error._tag}.`);\n\treturn handler(error);\n});\nconst pending = () => new PendingQueryResult();\nconst failureFromWire = (error, datePaths = []) => {\n\tconst internalError = Schema.decodeUnknownOption(InternalServerErrorSchema)(error);\n\tif (Option.isSome(internalError)) return fail(internalError.value);\n\tconst decoded = Schema.decodeUnknownOption(ErrorValueSchema)(error);\n\tif (Option.isNone(decoded)) throw new Error(\"The server returned an invalid application error.\");\n\tconst restored = decodeTransportObject(decoded.value, datePaths);\n\treturn fail(makeErrorValue({\n\t\t...restored,\n\t\t_tag: decoded.value._tag\n\t}));\n};\nconst documentNotFound = (table, id) => Brand.nominal()({\n\t_tag: \"DocumentNotFound\",\n\ttable,\n\tid\n});\nconst Result = {\n\tfail,\n\tmatch,\n\tsucceed,\n\ttry: tryResult\n};\n//#endregion\nexport { ErrorBrand, ErrorValueSchema, InternalServerError, InternalServerErrorSchema, Result, documentNotFound, effectFromResult, failureFromWire, inspectResult, match, pending, resultFromEffect };\n\n//# sourceMappingURL=result.js.map","import { initial } from \"./versioned.js\";\nimport { endpointUrl } from \"./deployment.js\";\nimport { encodeCanonicalJson } from \"./json.js\";\nimport { ErrorBrand, resultFromEffect } from \"./runtime/result.js\";\nimport { Effect, Schema } from \"effect\";\n//#region src/id.ts\nconst DevelopmentUsername = Schema.String.check(Schema.isPattern(/^[a-z][a-z0-9_-]{0,63}$/));\nconst UserId = DevelopmentUsername.pipe(Schema.brand(\"ignotum/id/UserId\"));\nconst User = Schema.Struct({\n\tid: UserId,\n\tname: Schema.optional(Schema.String),\n\temail: Schema.optional(Schema.String),\n\timage: Schema.optional(Schema.String)\n});\nconst ProfileField = Schema.Literals([\n\t\"name\",\n\t\"email\",\n\t\"image\"\n]);\nconst ProfileFields = Schema.Array(ProfileField).check(Schema.isUnique());\nconst IdRequired = Schema.TaggedStruct(\"IdRequired\", {}).pipe(Schema.brand(ErrorBrand));\nconst makeIdContext = (read) => ({\n\tcurrent: () => resultFromEffect(read),\n\trequire: () => resultFromEffect(read.pipe(Effect.flatMap((user) => user === null ? Effect.fail(IdRequired.make({})) : Effect.succeed(user))))\n});\nconst SessionState = Schema.Struct({\n\tsessionEpoch: Schema.String,\n\tviewRevision: Schema.Natural,\n\tuser: Schema.NullOr(User),\n\tvalidUntil: Schema.Finite\n});\nconst SessionResponse = Schema.Struct({\n\tdevelopment: Schema.optional(Schema.Literal(true)),\n\toutcome: Schema.optional(Schema.Literals([\n\t\t\"SignedIn\",\n\t\t\"ProfileUpdated\",\n\t\t\"Cancelled\"\n\t])),\n\t...SessionState.fields,\n\tserverTime: Schema.Finite,\n\texpiresAt: Schema.Finite\n});\nconst ReturnPath = Schema.String.check(Schema.makeFilter((value) => {\n\tif (!value.startsWith(\"/\") || value.startsWith(\"//\") || value.includes(\"\\\\\")) return false;\n\tconst url = new URL(value, \"https://app.ignotum.invalid\");\n\treturn url.origin === \"https://app.ignotum.invalid\" && url.pathname !== \"/_ignotum\" && !url.pathname.startsWith(\"/_ignotum/\");\n}, { message: \"Return to a path within this app.\" }));\nconst SessionRequest = Schema.Struct({\n\tintent: Schema.Literals([\"signIn\", \"requestProfile\"]),\n\tprofile: ProfileFields,\n\treturnTo: ReturnPath,\n\tsessionEpoch: Schema.String\n});\nconst SessionRedirect = Schema.Struct({\n\tredirectUrl: Schema.String,\n\texpiresAt: Schema.Finite\n});\nconst SessionOutcome = Schema.Literals([\n\t\"SignedIn\",\n\t\"ProfileUpdated\",\n\t\"Cancelled\"\n]);\nconst idLimits = {\n\tsessionMillis: 2592e6,\n\tleaseMillis: 3e4,\n\trefreshMillis: 2e4,\n\trequestMillis: 6e5,\n\tcodeMillis: 6e4,\n\trequestBytes: 16384,\n\tpendingRequests: 5\n};\nconst platformRevision = {\n\tmajor: 1,\n\tminor: 0\n};\nconst sessionPath = endpointUrl(platformRevision, \"session\");\nconst sessionRequestsPath = endpointUrl(platformRevision, \"session/requests\");\nconst sessionCallbackPath = endpointUrl(platformRevision, \"session/callback\");\nconst sessionCookieName = \"__Host-ignotum-session\";\nconst idImagePath = \"/_ignotum/v1.0/id/image/\";\nconst idViewKey = (session) => encodeCanonicalJson([session.user, session.viewRevision]);\nconst DevelopmentSelectionV1 = Schema.Struct({\n\tformatVersion: Schema.Literal(1),\n\tusername: Schema.NullOr(DevelopmentUsername),\n\tepoch: Schema.String\n});\nconst DevelopmentSelection = initial(DevelopmentSelectionV1);\nconst developmentSelectionKey = \"ignotum.id.development\";\n//#endregion\nexport { DevelopmentSelection, DevelopmentUsername, IdRequired, ProfileField, ProfileFields, ReturnPath, SessionOutcome, SessionRedirect, SessionRequest, SessionResponse, SessionState, User, UserId, developmentSelectionKey, idImagePath, idLimits, idViewKey, makeIdContext, sessionCallbackPath, sessionCookieName, sessionPath, sessionRequestsPath };\n\n//# sourceMappingURL=id.js.map"],"mappings":";;;AAGA,MAAM,gBAAgB,OAAO,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AACrF,MAAM,uBAAuB,OAAO,QAAQ,KAAK,OAAO,MAAM,qCAAqC,CAAC;AACpG,MAAM,mBAAmB,OAAO,QAAQ,KAAK,OAAO,MAAM,iCAAiC,CAAC;AAC5F,MAAM,gBAAgB,OAAO,IAAI,MAAM,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,8BAA8B,CAAC;AACxF,OAAO,IAAI,MAAM,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,mCAAmC,CAAC;AAChG,OAAO,IAAI,MAAM,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,mCAAmC,CAAC;AACpG,OAAO,OAAO,MAAM,OAAO,UAAU,GAAG,OAAO,UAAU,qCAAqC,GAAG,OAAO,YAAY,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;CACpB,WAAW,OAAO;AACnB,CAAC;AACD,MAAM,iBAAiB,OAAO,SAAS;CACtC;CACA;CACA;AACD,CAAC;AAUD,MAAM,mBAAmB;CACxB,OAAO;CACP,OAAO;AACR;AACA,MAAM,cAAc,YAAY,kBAAkB,SAAS;AAC3D,MAAM,sBAAsB,YAAY,kBAAkB,kBAAkB;AAChD,YAAY,kBAAkB,kBAAkB;AAS5E,MAAM,uBAAuB,QALE,OAAO,OAAO;CAC5C,eAAe,OAAO,QAAQ,CAAC;CAC/B,UAAU,OAAO,OAAO,mBAAmB;CAC3C,OAAO,OAAO;AACf,CACqC,CAAsB;AAC3D,MAAM,0BAA0B"}
|
|
1
|
+
{"version":3,"file":"id-rzjaCxeF.js","names":["Result"],"sources":["../../../contracts/dist/runtime/identity.js","../../../contracts/dist/schema/file.js","../../../contracts/dist/runtime/value.js","../../../contracts/dist/versioned.js","../../../contracts/dist/deployment.js","../../../contracts/dist/runtime/result.js","../../../contracts/dist/id.js"],"sourcesContent":["import { AppId, AuthAccountId, AuthDeviceCodeId, AuthInternalId, AuthInvitationId, AuthMemberId, AuthSessionId, AuthVerificationId, ConnectionId, DevDatabaseLockId, InvocationId, PlatformPrincipalId, RequestId, RuntimeRequestNonce, SubscriptionId, TableId, TeamId, VersionId, defineId } from \"./id.js\";\nimport { Schema } from \"effect\";\n//#region src/runtime/identity.ts\nconst InvocationKey = Schema.String.pipe(Schema.brand(\"ignotum/hosted/InvocationKey\"));\nconst ActivationGeneration = Schema.Natural.pipe(Schema.brand(\"ignotum/hosted/ActivationGeneration\"));\nconst AppStateRevision = Schema.Natural.pipe(Schema.brand(\"ignotum/hosted/AppStateRevision\"));\nconst VersionNumber = Schema.Int.check(Schema.isGreaterThan(0)).pipe(Schema.brand(\"ignotum/hosted/VersionNumber\"));\nconst ClientApiVersion = Schema.Int.check(Schema.isGreaterThan(0)).pipe(Schema.brand(\"ignotum/platform/ClientApiVersion\"));\nconst ServerApiVersion = Schema.Int.check(Schema.isGreaterThan(0)).pipe(Schema.brand(\"ignotum/platform/ServerApiVersion\"));\nconst CapabilityId = Schema.String.check(Schema.isTrimmed(), Schema.isPattern(/^[a-z][a-z0-9]*(?:[./-][a-z0-9]+)*$/), Schema.isMaxLength(128)).pipe(Schema.brand(\"ignotum/platform/CapabilityId\"));\nconst ProtocolVersion = Schema.Int.check(Schema.isGreaterThan(0)).pipe(Schema.brand(\"ignotum/platform/ProtocolVersion\"));\nconst DataHistoryId = defineId(\"hist\", \"ignotum/hosted/DataHistoryId\");\n//#endregion\nexport { ActivationGeneration, AppId, AppStateRevision, AuthAccountId, AuthDeviceCodeId, AuthInternalId, AuthInvitationId, AuthMemberId, AuthSessionId, AuthVerificationId, CapabilityId, ClientApiVersion, ConnectionId, DataHistoryId, DevDatabaseLockId, InvocationId, InvocationKey, PlatformPrincipalId, ProtocolVersion, RequestId, RuntimeRequestNonce, ServerApiVersion, SubscriptionId, TableId, TeamId, VersionId, VersionNumber };\n\n//# sourceMappingURL=identity.js.map","import { defineId } from \"../runtime/id.js\";\nimport { Predicate, Schema, SchemaGetter } from \"effect\";\n//#region src/schema/file.ts\nconst fileFormats = [\n\t\"jpeg\",\n\t\"png\",\n\t\"webp\",\n\t\"avif\",\n\t\"gif\"\n];\nconst FileFormat = Schema.Literals(fileFormats);\nconst fileMimeTypes = {\n\tavif: \"image/avif\",\n\tgif: \"image/gif\",\n\tjpeg: \"image/jpeg\",\n\tpng: \"image/png\",\n\twebp: \"image/webp\"\n};\nconst fileLimits = {\n\tactiveGrantsPerConnection: 1024,\n\tdistinctFilesPerQuerySnapshot: 256,\n\tfileBytes: 10485760,\n\tfilesPerMutation: 8,\n\tfilenameBytes: 255,\n\tmutationBytes: 26214400,\n\tpreparationLifetimeMillis: 9e5,\n\tstagedBytesPerApp: 104857600\n};\nconst FileId = Object.assign(Schema.String.pipe(Schema.check(Schema.isPattern(/^file_[0-9A-Za-z_-]{20,128}$/)), Schema.brand(\"ignotum/file/FileId\")), { idPrefix: \"file\" });\nconst FileUploadToken = defineId(\"upload\", \"ignotum/file/FileUploadToken\");\nconst FileGrantToken = defineId(\"grant\", \"ignotum/file/FileGrantToken\");\nconst FileValueTypeId = Symbol.for(\"ignotum/file/FileValue\");\nconst FileGrantTypeId = Symbol.for(\"ignotum/file/FileGrant\");\nconst isFileValue = (value) => Predicate.isObject(value) && Predicate.hasProperty(value, FileValueTypeId) && Predicate.isObject(value[FileValueTypeId]) && Predicate.hasProperty(value[FileValueTypeId], \"id\") && Schema.is(FileId)(value[FileValueTypeId].id) && Predicate.hasProperty(value, \"format\") && Schema.is(FileFormat)(value.format) && Predicate.hasProperty(value, \"name\") && Predicate.isString(value.name) && Predicate.hasProperty(value, \"size\") && Predicate.isNumber(value.size) && Predicate.hasProperty(value, \"mimeType\") && value.mimeType === fileMimeTypes[value.format];\nconst buildFileValue = (id, metadata, grantUrl) => {\n\tconst value = {\n\t\tformat: metadata.format,\n\t\tmimeType: fileMimeTypes[metadata.format],\n\t\tname: metadata.name,\n\t\tsize: metadata.size\n\t};\n\tObject.defineProperty(value, FileValueTypeId, {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\tvalue: Object.freeze({ id }),\n\t\twritable: false\n\t});\n\tif (grantUrl !== void 0) Object.defineProperty(value, FileGrantTypeId, {\n\t\tconfigurable: false,\n\t\tenumerable: false,\n\t\tvalue: grantUrl,\n\t\twritable: false\n\t});\n\treturn Object.freeze(value);\n};\nconst makeFileValue = (id, metadata) => buildFileValue(id, metadata);\nconst fileIdOf = (value) => value[FileValueTypeId].id;\nconst grantFileValue = (value, url) => {\n\treturn buildFileValue(fileIdOf(value), value, url);\n};\nconst fileGrantUrlOf = (value) => value[FileGrantTypeId];\nconst EncodedFileValue = Schema.Struct({\n\t$ignotum: Schema.Literal(\"file\"),\n\tid: FileId,\n\tformat: FileFormat,\n\tname: Schema.String,\n\tsize: Schema.Int.check(Schema.isBetween({\n\t\tminimum: 0,\n\t\tmaximum: fileLimits.fileBytes\n\t}))\n});\nconst RuntimeFileMetadata = Schema.Struct({\n\tid: FileId,\n\tformat: FileFormat,\n\tname: Schema.String,\n\tsize: Schema.Int.check(Schema.isBetween({\n\t\tminimum: 0,\n\t\tmaximum: fileLimits.fileBytes\n\t}))\n});\nconst FilePath = Schema.Array(Schema.Union([Schema.String, Schema.Natural]));\nconst RuntimeFileOccurrence = Schema.Struct({\n\tpath: FilePath,\n\tfile: RuntimeFileMetadata\n});\nconst DecodedFileValue = Schema.declare(isFileValue, { title: \"FileValue\" });\nconst FileValue = EncodedFileValue.pipe(Schema.decodeTo(DecodedFileValue, {\n\tdecode: SchemaGetter.transform((encoded) => makeFileValue(encoded.id, {\n\t\tformat: encoded.format,\n\t\tname: encoded.name,\n\t\tsize: encoded.size\n\t})),\n\tencode: SchemaGetter.transform((value) => ({\n\t\t$ignotum: \"file\",\n\t\tformat: value.format,\n\t\tid: fileIdOf(value),\n\t\tname: value.name,\n\t\tsize: value.size\n\t}))\n}));\nconst constrainedFileValue = (formats, maxBytes) => FileValue.pipe(Schema.check(Schema.makeFilter((value) => {\n\tconst issues = [];\n\tif (!formats.includes(value.format)) issues.push({\n\t\tpath: [\"format\"],\n\t\tissue: `File format '${value.format}' is not allowed by this field.`\n\t});\n\tif (value.size > maxBytes) issues.push({\n\t\tpath: [\"size\"],\n\t\tissue: `File size ${value.size} exceeds this field's ${maxBytes} byte limit.`\n\t});\n\treturn issues;\n})));\nconst collectFileOccurrences = (value, path, occurrences) => {\n\tif (isFileValue(value)) {\n\t\toccurrences.push({\n\t\t\tfile: value,\n\t\t\tpath\n\t\t});\n\t\treturn;\n\t}\n\tif (globalThis.Array.isArray(value)) {\n\t\tfor (const [index, child] of value.entries()) collectFileOccurrences(child, [...path, index], occurrences);\n\t\treturn;\n\t}\n\tif (!Predicate.isObject(value) || Predicate.isDate(value)) return;\n\tfor (const [key, child] of Object.entries(value)) collectFileOccurrences(child, [...path, key], occurrences);\n};\nconst fileOccurrencesOf = (value) => {\n\tconst occurrences = [];\n\tcollectFileOccurrences(value, [], occurrences);\n\treturn occurrences;\n};\nconst runtimeFileOccurrencesOf = (value) => fileOccurrencesOf(value).map(({ file, path }) => ({\n\tpath,\n\tfile: {\n\t\tformat: file.format,\n\t\tid: fileIdOf(file),\n\t\tname: file.name,\n\t\tsize: file.size\n\t}\n}));\nconst collectEncodedFileOccurrences = (value, path, occurrences) => {\n\tif (Schema.is(EncodedFileValue)(value)) {\n\t\tconst file = Schema.decodeUnknownSync(EncodedFileValue)(value);\n\t\toccurrences.push({\n\t\t\tpath,\n\t\t\tfile: {\n\t\t\t\tformat: file.format,\n\t\t\t\tid: file.id,\n\t\t\t\tname: file.name,\n\t\t\t\tsize: file.size\n\t\t\t}\n\t\t});\n\t\treturn;\n\t}\n\tif (globalThis.Array.isArray(value)) {\n\t\tfor (const [index, child] of value.entries()) collectEncodedFileOccurrences(child, [...path, index], occurrences);\n\t\treturn;\n\t}\n\tif (!Schema.is(Schema.JsonObject)(value)) return;\n\tfor (const [key, child] of Object.entries(value)) collectEncodedFileOccurrences(child, [...path, key], occurrences);\n};\nconst encodedFileOccurrencesOf = (value) => {\n\tconst occurrences = [];\n\tcollectEncodedFileOccurrences(value, [], occurrences);\n\treturn occurrences;\n};\n//#endregion\nexport { EncodedFileValue, FileFormat, FileGrantToken, FileGrantTypeId, FileId, FilePath, FileUploadToken, FileValue, FileValueTypeId, RuntimeFileMetadata, RuntimeFileOccurrence, constrainedFileValue, encodedFileOccurrencesOf, fileFormats, fileGrantUrlOf, fileIdOf, fileLimits, fileMimeTypes, fileOccurrencesOf, grantFileValue, isFileValue, makeFileValue, runtimeFileOccurrencesOf };\n\n//# sourceMappingURL=file.js.map","import { EncodedFileValue, FileValue, isFileValue } from \"../schema/file.js\";\nimport { Predicate, Schema } from \"effect\";\n//#region src/runtime/value.ts\nconst TransportValueSchema = Schema.suspend(() => Schema.Union([\n\tSchema.Null,\n\tSchema.Boolean,\n\tSchema.Finite,\n\tSchema.String,\n\tSchema.Date,\n\tFileValue,\n\tSchema.Array(TransportValueSchema),\n\tSchema.Record(Schema.String, Schema.UndefinedOr(TransportValueSchema))\n]));\nconst TransportValueTypeSchema = Schema.toType(TransportValueSchema);\nconst TransportObjectTypeSchema = Schema.Record(Schema.String, Schema.UndefinedOr(TransportValueTypeSchema));\nconst encodeTransportValue = (value) => {\n\tif (Predicate.isDate(value)) return Schema.encodeSync(Schema.DateFromMillis)(value);\n\tif (isFileValue(value)) return Schema.encodeSync(FileValue)(value);\n\tif (globalThis.Array.isArray(value)) return value.map(encodeTransportValue);\n\tif (Predicate.isNumber(value)) return Schema.decodeSync(Schema.Finite)(value);\n\tif (Predicate.isNull(value) || Predicate.isString(value) || Predicate.isBoolean(value)) return value;\n\treturn Object.fromEntries(Object.entries(value).flatMap(([key, child]) => child === void 0 ? [] : [[key, encodeTransportValue(child)]]));\n};\nconst encodeTransportObject = (value) => Schema.decodeUnknownSync(Schema.JsonObject)(encodeTransportValue(Schema.decodeUnknownSync(TransportObjectTypeSchema)(value)));\nconst collectDatePaths = (value, path, paths) => {\n\tif (Predicate.isDate(value)) {\n\t\tSchema.decodeSync(Schema.Date)(value);\n\t\tpaths.push(path);\n\t\treturn;\n\t}\n\tif (isFileValue(value)) return;\n\tif (globalThis.Array.isArray(value)) {\n\t\tfor (const [index, child] of value.entries()) collectDatePaths(child, [...path, index], paths);\n\t\treturn;\n\t}\n\tif (value === void 0 || Predicate.isNull(value) || Predicate.isString(value) || Predicate.isNumber(value) || Predicate.isBoolean(value)) return;\n\tfor (const [key, child] of Object.entries(value)) collectDatePaths(child, [...path, key], paths);\n};\nconst datePathsOf = (value) => {\n\tconst paths = [];\n\tcollectDatePaths(value, [], paths);\n\treturn paths;\n};\nconst datePathsOfObject = (value) => datePathsOf(Schema.decodeUnknownSync(TransportObjectTypeSchema)(value));\nconst pathKey = (path) => JSON.stringify(path);\nconst decodeTransportValueAt = (value, path, encodedDatePaths) => {\n\tif (encodedDatePaths.has(pathKey(path))) return Schema.decodeUnknownSync(Schema.DateFromMillis)(value);\n\tif (Schema.is(EncodedFileValue)(value)) return Schema.decodeSync(FileValue)(value);\n\tif (globalThis.Array.isArray(value)) return value.map((item, index) => decodeTransportValueAt(item, [...path, index], encodedDatePaths));\n\tif (Predicate.isNull(value) || Predicate.isString(value) || Predicate.isNumber(value) || Predicate.isBoolean(value)) return value;\n\treturn Object.fromEntries(Object.entries(value).map(([key, item]) => [key, decodeTransportValueAt(item, [...path, key], encodedDatePaths)]));\n};\nconst decodeTransportValue = (value, datePaths) => decodeTransportValueAt(value, [], new Set(datePaths.map(pathKey)));\nconst decodeTransportObject = (value, datePaths) => {\n\tconst encodedDatePaths = new Set(datePaths.map(pathKey));\n\treturn Object.fromEntries(Object.entries(value).map(([key, child]) => [key, decodeTransportValueAt(child, [key], encodedDatePaths)]));\n};\n//#endregion\nexport { TransportObjectTypeSchema, TransportValueSchema, TransportValueTypeSchema, datePathsOf, datePathsOfObject, decodeTransportObject, decodeTransportValue, encodeTransportObject, encodeTransportValue };\n\n//# sourceMappingURL=value.js.map","import { Schema, SchemaGetter } from \"effect\";\n//#region src/versioned.ts\n/** Registers the first revision of a long-lived format. */\nconst initial = (schema) => schema;\n/** Adds one adjacent migration and keeps encoding on the new current revision. */\nconst upgrade = (previous, current, migrate) => {\n\tconst accepted = Schema.Union([previous, current]);\n\tconst isCurrent = Schema.is(current);\n\treturn accepted.pipe(Schema.decodeTo(Schema.toType(current), {\n\t\tdecode: SchemaGetter.transform((value) => {\n\t\t\tif (isCurrent(value)) return value;\n\t\t\treturn migrate(value);\n\t\t}),\n\t\tencode: SchemaGetter.transform((value) => value)\n\t}));\n};\n//#endregion\nexport { initial, upgrade };\n\n//# sourceMappingURL=versioned.js.map","import { AppId } from \"./runtime/id.js\";\nimport { ActivationGeneration, DataHistoryId, VersionNumber } from \"./runtime/identity.js\";\nimport { initial } from \"./versioned.js\";\nimport { Sha256 } from \"./artifact.js\";\nimport { Schema } from \"effect\";\n//#region src/deployment.ts\nconst strict = (fields) => Schema.Struct(fields).annotate({ parseOptions: { onExcessProperty: \"error\" } });\nconst NonnegativeInteger = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0), Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER));\nconst PositiveInteger = NonnegativeInteger.check(Schema.isGreaterThan(0));\nconst PlatformRevision = strict({\n\tmajor: PositiveInteger,\n\tminor: NonnegativeInteger\n});\nconst PlatformRequirement = strict({\n\tmajor: PositiveInteger,\n\tminimumMinor: NonnegativeInteger\n});\nconst compareRevisions = (left, right) => left.major - right.major || left.minor - right.minor;\nconst supportsRequirement = (revision, requirement) => revision.major === requirement.major && revision.minor >= requirement.minimumMinor;\nconst revisionPrefix = (revision) => `/_ignotum/v${revision.major}.${revision.minor}`;\nconst PlatformEndpoint = Schema.Literals([\n\t\"client.js\",\n\t\"selection\",\n\t\"sync\",\n\t\"session\",\n\t\"session/requests\",\n\t\"session/callback\"\n]);\nconst endpointUrl = (revision, endpoint) => `${revisionPrefix(revision)}/${endpoint}`;\nconst RevisionSegment = Schema.String.check(Schema.isPattern(/^v[1-9][0-9]*\\.(?:0|[1-9][0-9]*)$/));\n/** Decode the path segment before consulting the deployed revision registry. */\nconst parseRevision = (segment) => {\n\tconst [major, minor] = Schema.decodeUnknownSync(RevisionSegment)(segment).slice(1).split(\".\").map(Number);\n\treturn Schema.decodeUnknownSync(PlatformRevision)({\n\t\tmajor,\n\t\tminor\n\t});\n};\nconst ServingSelectionV1 = strict({\n\tformatVersion: Schema.Literal(1),\n\tappId: AppId,\n\tversionNumber: VersionNumber.check(Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER)),\n\tplatform: PlatformRevision,\n\tactivationGeneration: ActivationGeneration.check(Schema.isGreaterThan(0), Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER)),\n\tdeploymentEpoch: PositiveInteger,\n\tdataHistoryId: DataHistoryId\n});\nconst ServingSelection = initial(ServingSelectionV1);\nconst sameSelection = (left, right) => left.appId === right.appId && left.versionNumber === right.versionNumber && compareRevisions(left.platform, right.platform) === 0 && left.activationGeneration === right.activationGeneration && left.deploymentEpoch === right.deploymentEpoch && left.dataHistoryId === right.dataHistoryId;\n/** Separate wire generation from both persisted format and platform revisions. */\nconst BrowserHandshake = strict({\n\tdeploymentProtocol: Schema.Literal(3),\n\tselection: ServingSelection\n});\nconst retention = {\n\treadyAgeMs: 6048e5,\n\tnewestReadyCount: 3,\n\tuploadAgeMs: 864e5\n};\nconst TransitionV1 = strict({\n\tformatVersion: Schema.Literal(1),\n\toperationId: Schema.NonEmptyString,\n\tsource: Schema.NullOr(ServingSelection),\n\ttarget: ServingSelection,\n\tphase: Schema.Literals([\n\t\t\"Closing\",\n\t\t\"Preparing\",\n\t\t\"Committed\",\n\t\t\"Opening\",\n\t\t\"Complete\",\n\t\t\"Aborting\",\n\t\t\"Aborted\"\n\t])\n}).check(Schema.makeFilter((transition) => {\n\tif (transition.source === null) return void 0;\n\tif (transition.source.appId !== transition.target.appId) return \"A transition belongs to one app\";\n\tif (transition.target.activationGeneration <= transition.source.activationGeneration) return \"A transition must advance the activation generation, including rollback\";\n})).annotate({ parseOptions: { onExcessProperty: \"error\" } });\nconst AppTransition = initial(TransitionV1);\nconst RevisionMap = Schema.Array(PlatformRevision).check(Schema.makeFilter((revisions) => new Set(revisions.map((revision) => revision.major)).size === revisions.length ? void 0 : \"Select exactly one minor for each supported major\"));\nconst MaintenanceV1 = strict({\n\tformatVersion: Schema.Literal(1),\n\toperationId: Schema.NonEmptyString,\n\tdeploymentEpoch: PositiveInteger,\n\tphase: Schema.Literals([\n\t\t\"Closing\",\n\t\t\"Deploying\",\n\t\t\"Verifying\",\n\t\t\"Resuming\",\n\t\t\"Complete\"\n\t]),\n\texpectedBuild: Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/)),\n\tpreviousBuild: Schema.NullOr(Schema.String.check(Schema.isPattern(/^[a-f0-9]{64}$/))),\n\taborted: Schema.Boolean,\n\tprevious: RevisionMap,\n\ttarget: RevisionMap,\n\tdiagnostic: Schema.NullOr(Schema.String.check(Schema.isMaxLength(4096))),\n\tcursor: Schema.NullOr(Schema.NonEmptyString)\n}).check(Schema.makeFilter((journal) => journal.aborted && journal.previousBuild === null ? \"Bootstrap has no previous build to restore\" : void 0));\nconst MaintenanceJournal = initial(MaintenanceV1);\nconst effectiveDeploymentRevisions = (journal) => journal.aborted ? journal.previous : journal.target;\nconst effectiveDeploymentBuild = (journal) => journal.aborted ? journal.previousBuild : journal.expectedBuild;\nconst DeploymentServiceReadiness = Schema.Struct({\n\tbuildSha256: Sha256,\n\trevisions: Schema.Array(PlatformRevision)\n});\n//#endregion\nexport { AppTransition, BrowserHandshake, DeploymentServiceReadiness, MaintenanceJournal, PlatformEndpoint, PlatformRequirement, PlatformRevision, ServingSelection, compareRevisions, effectiveDeploymentBuild, effectiveDeploymentRevisions, endpointUrl, parseRevision, retention, revisionPrefix, sameSelection, supportsRequirement };\n\n//# sourceMappingURL=deployment.js.map","import { RequestId } from \"./id.js\";\nimport { decodeTransportObject } from \"./value.js\";\nimport { Brand, Effect, Effectable, Function, Option, Predicate, Schema } from \"effect\";\n//#region src/runtime/result.ts\nconst ResultTypeId = Symbol.for(\"ignotum/runtime/result/Result\");\nconst CompletedResultTypeId = Symbol.for(\"ignotum/runtime/result/Completed\");\nconst PendingResultTypeId = Symbol.for(\"ignotum/runtime/result/Pending\");\nconst ErrorBrand = \"ignotum/error\";\nconst makeErrorValue = Brand.nominal();\nconst ErrorValueSchema = Schema.StructWithRest(Schema.Struct({ _tag: Schema.String }), [Schema.Record(Schema.String, Schema.Json)]).pipe(Schema.brand(ErrorBrand));\nvar InternalServerErrorCause = class extends Schema.TaggedError()(\"InternalServerError\", { requestId: RequestId }) {};\nconst InternalServerError = InternalServerErrorCause;\nconst InternalServerErrorSchema = InternalServerErrorCause.pipe(Schema.brand(ErrorBrand));\nconst effectOf = (value) => Predicate.hasProperty(value, ResultTypeId) ? value[ResultTypeId] : Effect.succeed(value);\nfunction makeResultEffectBase() {\n\tconst Base = function() {};\n\tBase.prototype = Effectable.Prototype({\n\t\tlabel: \"IgnotumResult\",\n\t\tevaluate() {\n\t\t\treturn this[ResultTypeId];\n\t\t}\n\t});\n\treturn Base;\n}\nconst ResultEffectBase = makeResultEffectBase();\nvar ResultOperation = class ResultOperation extends ResultEffectBase {\n\t[ResultTypeId];\n\tconstructor(effect, completed) {\n\t\tsuper();\n\t\tthis[ResultTypeId] = effect;\n\t\tif (completed !== void 0) Object.defineProperty(this, CompletedResultTypeId, { value: completed });\n\t}\n\tcatch(cases) {\n\t\tconst effectCases = {};\n\t\tfor (const [tag, handler] of Object.entries(cases)) if (Predicate.isFunction(handler)) effectCases[tag] = (failure) => effectOf(handler(failure));\n\t\tconst runtimeEffect = this[ResultTypeId];\n\t\tconst caught = Effect.catchTags(runtimeEffect, effectCases);\n\t\treturn new ResultOperation(caught);\n\t}\n};\nvar PendingQueryResult = class {\n\t[PendingResultTypeId] = PendingResultTypeId;\n};\nconst inspectResult = (value) => {\n\tif (!Predicate.hasProperty(value, CompletedResultTypeId)) return void 0;\n\treturn value[CompletedResultTypeId];\n};\nconst effectFromResult = (result) => result[ResultTypeId];\nconst resultFromEffect = (effect) => new ResultOperation(effect);\nconst isFailureResult = (result) => Predicate.hasProperty(result, CompletedResultTypeId) && Predicate.isObject(result[CompletedResultTypeId]) && Predicate.hasProperty(result[CompletedResultTypeId], \"type\") && result[CompletedResultTypeId].type === \"Failure\";\nconst succeed = (value) => new ResultOperation(Effect.succeed(value), {\n\ttype: \"Success\",\n\tvalue\n});\nconst fail = (error) => new ResultOperation(Effect.fail(error), {\n\ttype: \"Failure\",\n\terror\n});\nconst tryResult = (body) => {\n\treturn new ResultOperation(Effect.gen(body));\n};\nconst match = Function.dual(2, (result, matchers) => {\n\tif (result instanceof PendingQueryResult) {\n\t\tif (matchers.pending === void 0) throw new Error(\"A pending Result requires a pending matcher.\");\n\t\treturn matchers.pending();\n\t}\n\tif (!Predicate.hasProperty(result, ResultTypeId)) throw new Error(\"Unknown Result implementation.\");\n\tconst inspected = inspectResult(result);\n\tif (inspected?.type === \"Success\") {\n\t\tconst value = inspected.value;\n\t\treturn matchers.value(value);\n\t}\n\tif (!isFailureResult(result)) throw new Error(\"Unknown or incomplete Result operation.\");\n\tconst error = result[CompletedResultTypeId].error;\n\tif (error._tag === \"InternalServerError\") {\n\t\tconst internalError = Schema.decodeUnknownSync(InternalServerErrorSchema)(error);\n\t\tconst handler = matchers.internalError;\n\t\tif (handler === void 0) throw internalError;\n\t\treturn handler(internalError);\n\t}\n\tconst errorMatcher = matchers.error;\n\tif (errorMatcher === void 0) throw new Error(`No matcher was provided for ${error._tag}.`);\n\tif (Predicate.isFunction(errorMatcher)) return errorMatcher(error);\n\tconst handlers = errorMatcher;\n\tconst handler = Object.hasOwn(handlers, error._tag) ? handlers[error._tag] : void 0;\n\tif (handler === void 0) throw new Error(`No matcher was provided for ${error._tag}.`);\n\treturn handler(error);\n});\nconst pending = () => new PendingQueryResult();\nconst failureFromWire = (error, datePaths = []) => {\n\tconst internalError = Schema.decodeUnknownOption(InternalServerErrorSchema)(error);\n\tif (Option.isSome(internalError)) return fail(internalError.value);\n\tconst decoded = Schema.decodeUnknownOption(ErrorValueSchema)(error);\n\tif (Option.isNone(decoded)) throw new Error(\"The server returned an invalid application error.\");\n\tconst restored = decodeTransportObject(decoded.value, datePaths);\n\treturn fail(makeErrorValue({\n\t\t...restored,\n\t\t_tag: decoded.value._tag\n\t}));\n};\nconst documentNotFound = (table, id) => Brand.nominal()({\n\t_tag: \"DocumentNotFound\",\n\ttable,\n\tid\n});\nconst Result = {\n\tfail,\n\tmatch,\n\tsucceed,\n\ttry: tryResult\n};\n//#endregion\nexport { ErrorBrand, ErrorValueSchema, InternalServerError, InternalServerErrorSchema, Result, documentNotFound, effectFromResult, failureFromWire, inspectResult, match, pending, resultFromEffect };\n\n//# sourceMappingURL=result.js.map","import { initial } from \"./versioned.js\";\nimport { endpointUrl } from \"./deployment.js\";\nimport { encodeCanonicalJson } from \"./json.js\";\nimport { ErrorBrand, resultFromEffect } from \"./runtime/result.js\";\nimport { Effect, Schema } from \"effect\";\n//#region src/id.ts\nconst DevelopmentUsername = Schema.String.check(Schema.isPattern(/^[a-z][a-z0-9_-]{0,63}$/));\nconst UserId = DevelopmentUsername.pipe(Schema.brand(\"ignotum/id/UserId\"));\nconst User = Schema.Struct({\n\tid: UserId,\n\tname: Schema.optional(Schema.String),\n\temail: Schema.optional(Schema.String),\n\timage: Schema.optional(Schema.String)\n});\nconst ProfileField = Schema.Literals([\n\t\"name\",\n\t\"email\",\n\t\"image\"\n]);\nconst ProfileFields = Schema.Array(ProfileField).check(Schema.isUnique());\nconst IdRequired = Schema.TaggedStruct(\"IdRequired\", {}).pipe(Schema.brand(ErrorBrand));\nconst makeIdContext = (read) => ({\n\tcurrent: () => resultFromEffect(read),\n\trequire: () => resultFromEffect(read.pipe(Effect.flatMap((user) => user === null ? Effect.fail(IdRequired.make({})) : Effect.succeed(user))))\n});\nconst SessionState = Schema.Struct({\n\tsessionEpoch: Schema.String,\n\tviewRevision: Schema.Natural,\n\tuser: Schema.NullOr(User),\n\tvalidUntil: Schema.Finite\n});\nconst SessionResponse = Schema.Struct({\n\tdevelopment: Schema.optional(Schema.Literal(true)),\n\toutcome: Schema.optional(Schema.Literals([\n\t\t\"SignedIn\",\n\t\t\"ProfileUpdated\",\n\t\t\"Cancelled\"\n\t])),\n\t...SessionState.fields,\n\tserverTime: Schema.Finite,\n\texpiresAt: Schema.Finite\n});\nconst ReturnPath = Schema.String.check(Schema.makeFilter((value) => {\n\tif (!value.startsWith(\"/\") || value.startsWith(\"//\") || value.includes(\"\\\\\")) return false;\n\tconst url = new URL(value, \"https://app.ignotum.invalid\");\n\treturn url.origin === \"https://app.ignotum.invalid\" && url.pathname !== \"/_ignotum\" && !url.pathname.startsWith(\"/_ignotum/\");\n}, { message: \"Return to a path within this app.\" }));\nconst SessionRequest = Schema.Struct({\n\tintent: Schema.Literals([\"signIn\", \"requestProfile\"]),\n\tprofile: ProfileFields,\n\treturnTo: ReturnPath,\n\tsessionEpoch: Schema.String\n});\nconst SessionRedirect = Schema.Struct({\n\tredirectUrl: Schema.String,\n\texpiresAt: Schema.Finite\n});\nconst SessionOutcome = Schema.Literals([\n\t\"SignedIn\",\n\t\"ProfileUpdated\",\n\t\"Cancelled\"\n]);\nconst idLimits = {\n\tsessionMillis: 2592e6,\n\tleaseMillis: 3e4,\n\trefreshMillis: 2e4,\n\trequestMillis: 6e5,\n\tcodeMillis: 6e4,\n\trequestBytes: 16384,\n\tpendingRequests: 5\n};\nconst platformRevision = {\n\tmajor: 1,\n\tminor: 0\n};\nconst sessionPath = endpointUrl(platformRevision, \"session\");\nconst sessionRequestsPath = endpointUrl(platformRevision, \"session/requests\");\nconst sessionCallbackPath = endpointUrl(platformRevision, \"session/callback\");\nconst sessionCookieName = \"__Host-ignotum-session\";\nconst idImagePath = \"/_ignotum/v1.0/id/image/\";\nconst idViewKey = (session) => encodeCanonicalJson([session.user, session.viewRevision]);\nconst DevelopmentSelectionV1 = Schema.Struct({\n\tformatVersion: Schema.Literal(1),\n\tusername: Schema.NullOr(DevelopmentUsername),\n\tepoch: Schema.String\n});\nconst DevelopmentSelection = initial(DevelopmentSelectionV1);\nconst developmentSelectionKey = \"ignotum.id.development\";\n//#endregion\nexport { DevelopmentSelection, DevelopmentUsername, IdRequired, ProfileField, ProfileFields, ReturnPath, SessionOutcome, SessionRedirect, SessionRequest, SessionResponse, SessionState, User, UserId, developmentSelectionKey, idImagePath, idLimits, idViewKey, makeIdContext, sessionCallbackPath, sessionCookieName, sessionPath, sessionRequestsPath };\n\n//# sourceMappingURL=id.js.map"],"mappings":";;;AAGA,MAAM,gBAAgB,OAAO,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AACrF,MAAM,uBAAuB,OAAO,QAAQ,KAAK,OAAO,MAAM,qCAAqC,CAAC;AACpG,MAAM,mBAAmB,OAAO,QAAQ,KAAK,OAA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IAAI,KAAK,MAAM,SAAS,IAAI,GAAG,OAAO;CACrF,MAAM,MAAM,IAAI,IAAI,OAAO,6BAA6B;CACxD,OAAO,IAAI,WAAW,iCAAiC,IAAI,aAAa,eAAe,CAAC,IAAI,SAAS,WAAW,YAAY;AAC7H,GAAG,EAAE,SAAS,oCAAoC,CAAC,CAAC;AACpD,MAAM,iBAAiB,OAAO,OAAO;CACpC,QAAQ,OAAO,SAAS,CAAC,UAAU,gBAAgB,CAAC;CACpD,SAAS;CACT,UAAU;CACV,cAAc,OAAO;AACtB,CAAC;AACD,MAAM,kBAAkB,OAAO,OAAO;CACrC,aAAa,OAAO;CACpB,WAAW,OAAO;AACnB,CAAC;AACD,MAAM,iBAAiB,OAAO,SAAS;CACtC;CACA;CACA;AACD,CAAC;AACD,MAAM,WAAW;CAChB,eAAe;CACf,aAAa;CACb,eAAe;CACf,eAAe;CACf,YAAY;CACZ,cAAc;CACd,iBAAiB;AAClB;AACA,MAAM,mBAAmB;CACxB,OAAO;CACP,OAAO;AACR;AACA,MAAM,cAAc,YAAY,kBAAkB,SAAS;AAC3D,MAAM,sBAAsB,YAAY,kBAAkB,kBAAkB;AAChD,YAAY,kBAAkB,kBAAkB;AAS5E,MAAM,uBAAuB,QALE,OAAO,OAAO;CAC5C,eAAe,OAAO,QAAQ,CAAC;CAC/B,UAAU,OAAO,OAAO,mBAAmB;CAC3C,OAAO,OAAO;AACf,CACqC,CAAsB;AAC3D,MAAM,0BAA0B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as table, a as Id, b as PaginationPage, d as BoundValues, f as IdTargetsOf, g as UnresolvedReferencesTypeId, h as TableDefinition, i as EnvironmentType, n as Document, o as SchemaDefinitionContract, p as IndexDefinitions, t as DefinedEnv, u as emptyEnv, v as values, x as IdContext, y as PaginationOptions } from "./types-
|
|
2
|
-
import { c as Result$1, g as FileValue, i as ErrorValue, n as DocumentNotFoundValue } from "./id-
|
|
1
|
+
import { _ as table, a as Id, b as PaginationPage, d as BoundValues, f as IdTargetsOf, g as UnresolvedReferencesTypeId, h as TableDefinition, i as EnvironmentType, n as Document, o as SchemaDefinitionContract, p as IndexDefinitions, t as DefinedEnv, u as emptyEnv, v as values, x as IdContext, y as PaginationOptions } from "./types-BeT6F0Pg-DMvRDN0c.js";
|
|
2
|
+
import { c as Result$1, g as FileValue, i as ErrorValue, n as DocumentNotFoundValue } from "./id-D87q-n2D-CDMwTSUR.js";
|
|
3
3
|
import { Effect, Schema } from "effect";
|
|
4
4
|
//#region ../contracts/dist/schema/index.d.ts
|
|
5
5
|
//#region src/schema/definition.d.ts
|
|
@@ -181,4 +181,4 @@ declare function bindSchema<const Definition extends Tables>(schema: DefinedSche
|
|
|
181
181
|
declare function bindSchema<const Definition extends Tables, const Environment extends DefinedEnv>(schema: DefinedSchema<Definition>, environment: Environment): SchemaBindings<Definition, Environment>;
|
|
182
182
|
//#endregion
|
|
183
183
|
export { defineSchema as i, SchemaAuthoring as n, bindSchema as r, DefinedSchema as t };
|
|
184
|
-
//# sourceMappingURL=index-
|
|
184
|
+
//# sourceMappingURL=index-BWHInzfU.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as functionPathOf, i as createApi, n as FunctionReference, r as MutationInput, t as Api } from "../api-BnUKx9cj-
|
|
1
|
+
import { a as functionPathOf, i as createApi, n as FunctionReference, r as MutationInput, t as Api } from "../api-BnUKx9cj-K-F-SOLs.js";
|
|
2
2
|
export { Api, FunctionReference, MutationInput, createApi, functionPathOf };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as functionPathOf, t as createApi } from "../api-
|
|
1
|
+
import { n as functionPathOf, t as createApi } from "../api-CrrSjYL1.js";
|
|
2
2
|
export { createApi, functionPathOf };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as mountClient } from "../bootstrap-DjTwGJao-
|
|
1
|
+
import { D as mountClient } from "../bootstrap-DjTwGJao-DPi768T4.js";
|
|
2
2
|
export { mountClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as mountClient } from "../bootstrap-
|
|
1
|
+
import { t as mountClient } from "../bootstrap-CLVnD5vS.js";
|
|
2
2
|
export { mountClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as UrlValues, D as mountClient, E as getRouteDefinition, S as UrlValue$1, T as createRouteReference, a as InvalidRouteProps, d as PathFields, h as RouteErrorProps, i as InputFields, j as createImageSource, m as RequiredUrlValue, n as ClientRegistration, o as LayoutDefinition$1, p as RegisteredClientModule, r as DecodedFields, u as PageDefinition, w as bindSchema$1, x as UrlFields } from "../bootstrap-DjTwGJao-
|
|
1
|
+
import { C as UrlValues, D as mountClient, E as getRouteDefinition, S as UrlValue$1, T as createRouteReference, a as InvalidRouteProps, d as PathFields, h as RouteErrorProps, i as InputFields, j as createImageSource, m as RequiredUrlValue, n as ClientRegistration, o as LayoutDefinition$1, p as RegisteredClientModule, r as DecodedFields, u as PageDefinition, w as bindSchema$1, x as UrlFields } from "../bootstrap-DjTwGJao-DPi768T4.js";
|
|
2
2
|
export { type ClientRegistration, DecodedFields, InputFields, InvalidRouteProps, LayoutDefinition$1 as LayoutDefinition, PageDefinition, PathFields, type RegisteredClientModule, RequiredUrlValue, RouteErrorProps, UrlFields, UrlValue$1 as UrlValue, UrlValues, bindSchema$1 as bindSchema, createImageSource, createRouteReference, getRouteDefinition, mountClient };
|