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,9 +1,9 @@
|
|
|
1
1
|
import { n as createImageSource } from "../image-gofzZeCm.js";
|
|
2
2
|
import { a as RouteDefinition, c as UrlValueDescriptor, i as LayoutMetadata, n as getRouteDefinition, o as StaticMetadata, s as UrlScalarDescriptor, t as createRouteReference } from "../routes-DnU39R7c.js";
|
|
3
|
-
import { t as mountClient } from "../bootstrap-
|
|
3
|
+
import { t as mountClient } from "../bootstrap-CLVnD5vS.js";
|
|
4
4
|
import { Schema } from "effect";
|
|
5
5
|
//#region ../platform/dist/versions/1/browser/internal/client.js
|
|
6
|
-
const validateValue = Schema.decodeUnknownSync(UrlValueDescriptor);
|
|
6
|
+
const validateValue = Schema.decodeUnknownSync(UrlValueDescriptor, { onExcessProperty: "error" });
|
|
7
7
|
const required = (descriptor) => {
|
|
8
8
|
const checked = validateValue(descriptor);
|
|
9
9
|
return {
|
|
@@ -43,7 +43,7 @@ const bindSchema = () => {
|
|
|
43
43
|
})
|
|
44
44
|
};
|
|
45
45
|
const route = (definition) => {
|
|
46
|
-
Schema.decodeUnknownSync(StaticMetadata)({
|
|
46
|
+
Schema.decodeUnknownSync(StaticMetadata, { onExcessProperty: "error" })({
|
|
47
47
|
title: definition.title,
|
|
48
48
|
meta: definition.meta
|
|
49
49
|
});
|
|
@@ -56,7 +56,7 @@ const bindSchema = () => {
|
|
|
56
56
|
return definition;
|
|
57
57
|
};
|
|
58
58
|
const layout = (definition) => {
|
|
59
|
-
Schema.decodeUnknownSync(LayoutMetadata)({
|
|
59
|
+
Schema.decodeUnknownSync(LayoutMetadata, { onExcessProperty: "error" })({
|
|
60
60
|
title: definition.title,
|
|
61
61
|
titleTemplate: definition.titleTemplate,
|
|
62
62
|
meta: definition.meta
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":[],"sources":["../../../../platform/dist/versions/1/browser/internal/client.js"],"sourcesContent":["import { createImageSource } from \"../image.js\";\nimport { createRouteReference, getRouteDefinition } from \"./routes.js\";\nimport { mountClient } from \"../bootstrap.js\";\nimport { Schema } from \"effect\";\nimport { LayoutMetadata, RouteDefinition, StaticMetadata, UrlScalarDescriptor, UrlValueDescriptor } from \"@ignotum/contracts/routes\";\n//#region src/versions/1/browser/internal/client.ts\nconst validateValue = Schema.decodeUnknownSync(UrlValueDescriptor);\nconst required = (descriptor) => {\n\tconst checked = validateValue(descriptor);\n\treturn {\n\t\tdescriptor: checked,\n\t\tdefault: (value) => ({ descriptor: validateValue({\n\t\t\ttype: \"default\",\n\t\t\tvalue: checked,\n\t\t\tdefault: value\n\t\t}) })\n\t};\n};\nconst bindSchema = () => {\n\tconst values = {\n\t\tstring: () => required({ type: \"string\" }),\n\t\tid: (table) => required({\n\t\t\ttype: \"id\",\n\t\t\ttable\n\t\t}),\n\t\tnumber: () => required({ type: \"number\" }),\n\t\tinteger: () => required({ type: \"integer\" }),\n\t\tboolean: () => required({ type: \"boolean\" }),\n\t\tliteral: (value) => required({\n\t\t\ttype: \"literal\",\n\t\t\tvalue\n\t\t}),\n\t\tliterals: (...values) => required({\n\t\t\ttype: \"literals\",\n\t\t\tvalues\n\t\t}),\n\t\toptional: (value) => ({ descriptor: validateValue({\n\t\t\ttype: \"optional\",\n\t\t\tvalue: value.descriptor\n\t\t}) }),\n\t\tarray: (value) => required({\n\t\t\ttype: \"array\",\n\t\t\tvalue: Schema.decodeUnknownSync(UrlScalarDescriptor)(value.descriptor)\n\t\t})\n\t};\n\tconst route = (definition) => {\n\t\tSchema.decodeUnknownSync(StaticMetadata)({\n\t\t\ttitle: definition.title,\n\t\t\tmeta: definition.meta\n\t\t});\n\t\tconst params = definition.params ?? {};\n\t\tSchema.decodeUnknownSync(RouteDefinition.fields.params)(Object.entries(params).map(([name, value]) => ({\n\t\t\tname,\n\t\t\tvalue: value.descriptor\n\t\t})));\n\t\tfor (const value of Object.values(definition.searchParams ?? {})) validateValue(value.descriptor);\n\t\treturn definition;\n\t};\n\tconst layout = (definition) => {\n\t\tSchema.decodeUnknownSync(LayoutMetadata)({\n\t\t\ttitle: definition.title,\n\t\t\ttitleTemplate: definition.titleTemplate,\n\t\t\tmeta: definition.meta\n\t\t});\n\t\treturn definition;\n\t};\n\treturn {\n\t\troute,\n\t\tlayout,\n\t\tvalues\n\t};\n};\n//#endregion\nexport { bindSchema, createImageSource, createRouteReference, getRouteDefinition, mountClient };\n\n//# sourceMappingURL=client.js.map"],"mappings":";;;;;AAMA,MAAM,gBAAgB,OAAO,kBAAkB,kBAAkB;
|
|
1
|
+
{"version":3,"file":"client.js","names":[],"sources":["../../../../platform/dist/versions/1/browser/internal/client.js"],"sourcesContent":["import { createImageSource } from \"../image.js\";\nimport { createRouteReference, getRouteDefinition } from \"./routes.js\";\nimport { mountClient } from \"../bootstrap.js\";\nimport { Schema } from \"effect\";\nimport { LayoutMetadata, RouteDefinition, StaticMetadata, UrlScalarDescriptor, UrlValueDescriptor } from \"@ignotum/contracts/routes\";\n//#region src/versions/1/browser/internal/client.ts\nconst validateValue = Schema.decodeUnknownSync(UrlValueDescriptor, { onExcessProperty: \"error\" });\nconst required = (descriptor) => {\n\tconst checked = validateValue(descriptor);\n\treturn {\n\t\tdescriptor: checked,\n\t\tdefault: (value) => ({ descriptor: validateValue({\n\t\t\ttype: \"default\",\n\t\t\tvalue: checked,\n\t\t\tdefault: value\n\t\t}) })\n\t};\n};\nconst bindSchema = () => {\n\tconst values = {\n\t\tstring: () => required({ type: \"string\" }),\n\t\tid: (table) => required({\n\t\t\ttype: \"id\",\n\t\t\ttable\n\t\t}),\n\t\tnumber: () => required({ type: \"number\" }),\n\t\tinteger: () => required({ type: \"integer\" }),\n\t\tboolean: () => required({ type: \"boolean\" }),\n\t\tliteral: (value) => required({\n\t\t\ttype: \"literal\",\n\t\t\tvalue\n\t\t}),\n\t\tliterals: (...values) => required({\n\t\t\ttype: \"literals\",\n\t\t\tvalues\n\t\t}),\n\t\toptional: (value) => ({ descriptor: validateValue({\n\t\t\ttype: \"optional\",\n\t\t\tvalue: value.descriptor\n\t\t}) }),\n\t\tarray: (value) => required({\n\t\t\ttype: \"array\",\n\t\t\tvalue: Schema.decodeUnknownSync(UrlScalarDescriptor)(value.descriptor)\n\t\t})\n\t};\n\tconst route = (definition) => {\n\t\tSchema.decodeUnknownSync(StaticMetadata, { onExcessProperty: \"error\" })({\n\t\t\ttitle: definition.title,\n\t\t\tmeta: definition.meta\n\t\t});\n\t\tconst params = definition.params ?? {};\n\t\tSchema.decodeUnknownSync(RouteDefinition.fields.params)(Object.entries(params).map(([name, value]) => ({\n\t\t\tname,\n\t\t\tvalue: value.descriptor\n\t\t})));\n\t\tfor (const value of Object.values(definition.searchParams ?? {})) validateValue(value.descriptor);\n\t\treturn definition;\n\t};\n\tconst layout = (definition) => {\n\t\tSchema.decodeUnknownSync(LayoutMetadata, { onExcessProperty: \"error\" })({\n\t\t\ttitle: definition.title,\n\t\t\ttitleTemplate: definition.titleTemplate,\n\t\t\tmeta: definition.meta\n\t\t});\n\t\treturn definition;\n\t};\n\treturn {\n\t\troute,\n\t\tlayout,\n\t\tvalues\n\t};\n};\n//#endregion\nexport { bindSchema, createImageSource, createRouteReference, getRouteDefinition, mountClient };\n\n//# sourceMappingURL=client.js.map"],"mappings":";;;;;AAMA,MAAM,gBAAgB,OAAO,kBAAkB,oBAAoB,EAAE,kBAAkB,QAAQ,CAAC;AAChG,MAAM,YAAY,eAAe;CAChC,MAAM,UAAU,cAAc,UAAU;CACxC,OAAO;EACN,YAAY;EACZ,UAAU,WAAW,EAAE,YAAY,cAAc;GAChD,MAAM;GACN,OAAO;GACP,SAAS;EACV,CAAC,EAAE;CACJ;AACD;AACA,MAAM,mBAAmB;CACxB,MAAM,SAAS;EACd,cAAc,SAAS,EAAE,MAAM,SAAS,CAAC;EACzC,KAAK,UAAU,SAAS;GACvB,MAAM;GACN;EACD,CAAC;EACD,cAAc,SAAS,EAAE,MAAM,SAAS,CAAC;EACzC,eAAe,SAAS,EAAE,MAAM,UAAU,CAAC;EAC3C,eAAe,SAAS,EAAE,MAAM,UAAU,CAAC;EAC3C,UAAU,UAAU,SAAS;GAC5B,MAAM;GACN;EACD,CAAC;EACD,WAAW,GAAG,WAAW,SAAS;GACjC,MAAM;GACN;EACD,CAAC;EACD,WAAW,WAAW,EAAE,YAAY,cAAc;GACjD,MAAM;GACN,OAAO,MAAM;EACd,CAAC,EAAE;EACH,QAAQ,UAAU,SAAS;GAC1B,MAAM;GACN,OAAO,OAAO,kBAAkB,mBAAmB,CAAC,CAAC,MAAM,UAAU;EACtE,CAAC;CACF;CACA,MAAM,SAAS,eAAe;EAC7B,OAAO,kBAAkB,gBAAgB,EAAE,kBAAkB,QAAQ,CAAC,CAAC,CAAC;GACvE,OAAO,WAAW;GAClB,MAAM,WAAW;EAClB,CAAC;EACD,MAAM,SAAS,WAAW,UAAU,CAAC;EACrC,OAAO,kBAAkB,gBAAgB,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,YAAY;GACtG;GACA,OAAO,MAAM;EACd,EAAE,CAAC;EACH,KAAK,MAAM,SAAS,OAAO,OAAO,WAAW,gBAAgB,CAAC,CAAC,GAAG,cAAc,MAAM,UAAU;EAChG,OAAO;CACR;CACA,MAAM,UAAU,eAAe;EAC9B,OAAO,kBAAkB,gBAAgB,EAAE,kBAAkB,QAAQ,CAAC,CAAC,CAAC;GACvE,OAAO,WAAW;GAClB,eAAe,WAAW;GAC1B,MAAM,WAAW;EAClB,CAAC;EACD,OAAO;CACR;CACA,OAAO;EACN;EACA;EACA;CACD;AACD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b as PaginationPage, c as SchemaDefinitionTypeId, x as IdContext, y as PaginationOptions } from "../types-
|
|
2
|
-
import { c as Result$1, d as TransportObject, f as TransportValue, i as ErrorValue, u as documentNotFound } from "../id-
|
|
3
|
-
import "../result-
|
|
4
|
-
import "../sync-
|
|
5
|
-
import "../id-
|
|
6
|
-
import "../pagination-
|
|
1
|
+
import { b as PaginationPage, c as SchemaDefinitionTypeId, x as IdContext, y as PaginationOptions } from "../types-BeT6F0Pg-DMvRDN0c.js";
|
|
2
|
+
import { c as Result$1, d as TransportObject, f as TransportValue, i as ErrorValue, u as documentNotFound } from "../id-D87q-n2D-CDMwTSUR.js";
|
|
3
|
+
import "../result-Bq32FA7g.js";
|
|
4
|
+
import "../sync-BMmV8oYt.js";
|
|
5
|
+
import "../id-BPFV3D3V.js";
|
|
6
|
+
import "../pagination-BPFV3D3V.js";
|
|
7
7
|
import { Effect, Schema } from "effect";
|
|
8
8
|
//#region ../contracts/dist/runtime/functions.d.ts
|
|
9
9
|
//#region src/runtime/functions.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as GeneratedId } from "../artifact-BB5qzoa6.js";
|
|
2
|
-
import { D as
|
|
3
|
-
import { c as getFunctionSchema, d as evolveStoredFields, o as emptyEnv, r as decodeDefinedEnvironment, s as getFunctionEnvironment, t as SchemaDefinitionTypeId, u as applyValueDefaults } from "../schema-
|
|
4
|
-
import { n as PaginationPageSize, t as PaginationCursor } from "../pagination
|
|
2
|
+
import { D as TransportObjectTypeSchema, G as runtimeFileOccurrencesOf, O as datePathsOf, _ as documentNotFound, d as makeIdContext, h as ErrorValueSchema, k as datePathsOfObject, s as User, x as resultFromEffect } from "../id-rzjaCxeF.js";
|
|
3
|
+
import { c as getFunctionSchema, d as evolveStoredFields, o as emptyEnv, r as decodeDefinedEnvironment, s as getFunctionEnvironment, t as SchemaDefinitionTypeId, u as applyValueDefaults } from "../schema-JtFb4BbG.js";
|
|
4
|
+
import { n as PaginationPageSize, t as PaginationCursor } from "../pagination-CfEleffG.js";
|
|
5
5
|
import { Effect, Predicate, Schema } from "effect";
|
|
6
6
|
//#region ../contracts/dist/runtime/host.js
|
|
7
7
|
const HostDocument = Schema.Struct({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { E as getRouteDefinition, T as createRouteReference, b as RouteReference, f as ReferenceTypes } from "../bootstrap-DjTwGJao-
|
|
1
|
+
import { E as getRouteDefinition, T as createRouteReference, b as RouteReference, f as ReferenceTypes } from "../bootstrap-DjTwGJao-DPi768T4.js";
|
|
2
2
|
export { ReferenceTypes, RouteReference, createRouteReference, getRouteDefinition };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as bindSchema$1 } from "../index-
|
|
1
|
+
import { r as bindSchema$1 } from "../index-BWHInzfU.js";
|
|
2
2
|
//#region ../platform/dist/versions/1/guest/internal/server.d.ts
|
|
3
3
|
//#region src/versions/1/guest/internal/server.d.ts
|
|
4
4
|
declare const bindSchema: typeof bindSchema$1;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as Id, c as SchemaDefinitionTypeId, n as Document, s as SchemaDefinitionOf } from "../types-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { a as Id, c as SchemaDefinitionTypeId, n as Document, s as SchemaDefinitionOf } from "../types-BeT6F0Pg-DMvRDN0c.js";
|
|
2
|
+
import "../index-BWHInzfU.js";
|
|
3
3
|
export { type Document, type Id, type SchemaDefinitionOf, SchemaDefinitionTypeId };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SchemaDefinitionTypeId } from "../schema-
|
|
1
|
+
import { t as SchemaDefinitionTypeId } from "../schema-JtFb4BbG.js";
|
|
2
2
|
export { SchemaDefinitionTypeId };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./types-BeT6F0Pg-DMvRDN0c.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as initial } from "./id-rzjaCxeF.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
+
import "effect/encoding";
|
|
3
4
|
//#region ../contracts/dist/runtime/pagination.js
|
|
4
5
|
const PaginationCursor = Schema.String.check(Schema.isBase64Url()).pipe(Schema.brand("ignotum/runtime/PaginationCursor"));
|
|
5
6
|
const PaginationPageSize = Schema.Int.check(Schema.isBetween({
|
|
@@ -30,4 +31,4 @@ Schema.fromJsonString(CursorPayload);
|
|
|
30
31
|
//#endregion
|
|
31
32
|
export { PaginationPageSize as n, PaginationCursor as t };
|
|
32
33
|
|
|
33
|
-
//# sourceMappingURL=pagination
|
|
34
|
+
//# sourceMappingURL=pagination-CfEleffG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-CfEleffG.js","names":[],"sources":["../../../contracts/dist/runtime/pagination.js"],"sourcesContent":["import { initial } from \"../versioned.js\";\nimport { encodeCanonicalJson } from \"../json.js\";\nimport { Result, Schema } from \"effect\";\nimport { Base64Url } from \"effect/encoding\";\n//#region src/runtime/pagination.ts\nconst PaginationCursor = Schema.String.check(Schema.isBase64Url()).pipe(Schema.brand(\"ignotum/runtime/PaginationCursor\"));\nconst PaginationPageSize = Schema.Int.check(Schema.isBetween({\n\tminimum: 1,\n\tmaximum: 1e3\n})).pipe(Schema.brand(\"ignotum/runtime/PaginationPageSize\"));\nconst PaginationOptions = Schema.Struct({\n\tcursor: Schema.NullOr(PaginationCursor),\n\tpageSize: PaginationPageSize\n});\nconst TablePosition = Schema.Struct({\n\ttype: Schema.Literal(\"Table\"),\n\tcreatedAt: Schema.Int,\n\tid: Schema.String\n});\nconst IndexPosition = Schema.Struct({\n\ttype: Schema.Literal(\"Index\"),\n\tkey: Schema.String.check(Schema.isPattern(/^(?:[0-9a-f]{2})*$/)).pipe(Schema.brand(\"ignotum/runtime/EncodedIndexKey\"))\n});\nconst PaginationPosition = Schema.Union([TablePosition, IndexPosition]);\nconst CursorPayloadV1 = Schema.Struct({\n\tversion: Schema.Literal(1),\n\tquery: Schema.String,\n\tposition: PaginationPosition\n});\nconst CursorPayload = initial(CursorPayloadV1);\nconst CursorPayloadJson = Schema.fromJsonString(CursorPayload);\nconst paginationQueryIdentity = (tableId, index, lower, upper, order) => encodeCanonicalJson([\n\ttableId,\n\tindex,\n\tlower ?? null,\n\tupper ?? null,\n\torder\n]);\nconst encodePaginationCursor = (query, position) => PaginationCursor.make(Base64Url.encode(Schema.encodeSync(CursorPayloadJson)({\n\tversion: 1,\n\tquery,\n\tposition\n})));\nconst decodePaginationCursor = (cursor) => Schema.decodeSync(CursorPayloadJson)(Result.getOrThrow(Base64Url.decodeString(cursor)));\n//#endregion\nexport { PaginationCursor, PaginationOptions, PaginationPageSize, PaginationPosition, decodePaginationCursor, encodePaginationCursor, paginationQueryIdentity };\n\n//# sourceMappingURL=pagination.js.map"],"mappings":";;;;AAKA,MAAM,mBAAmB,OAAO,OAAO,MAAM,OAAO,YAAY,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,kCAAkC,CAAC;AACxH,MAAM,qBAAqB,OAAO,IAAI,MAAM,OAAO,UAAU;CAC5D,SAAS;CACT,SAAS;AACV,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,oCAAoC,CAAC;AACjC,OAAO,OAAO;CACvC,QAAQ,OAAO,OAAO,gBAAgB;CACtC,UAAU;AACX,CAAC;AACD,MAAM,gBAAgB,OAAO,OAAO;CACnC,MAAM,OAAO,QAAQ,OAAO;CAC5B,WAAW,OAAO;CAClB,IAAI,OAAO;AACZ,CAAC;AACD,MAAM,gBAAgB,OAAO,OAAO;CACnC,MAAM,OAAO,QAAQ,OAAO;CAC5B,KAAK,OAAO,OAAO,MAAM,OAAO,UAAU,oBAAoB,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,iCAAiC,CAAC;AACtH,CAAC;AACD,MAAM,qBAAqB,OAAO,MAAM,CAAC,eAAe,aAAa,CAAC;AACtE,MAAM,kBAAkB,OAAO,OAAO;CACrC,SAAS,OAAO,QAAQ,CAAC;CACzB,OAAO,OAAO;CACd,UAAU;AACX,CAAC;AACD,MAAM,gBAAgB,QAAQ,eAAe;AACnB,OAAO,eAAe,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./id-D87q-n2D-CDMwTSUR.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as IdAlphabet, c as SessionEpoch, d as VersionId, f as defineId, i as GeneratedId, l as SubscriptionId, o as InvocationId, r as AppId, u as TableId } from "./artifact-BB5qzoa6.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import { i as WireSuccess, n as WireFailure, r as WireResult, t as FunctionAddress } from "./sync-
|
|
2
|
+
import { A as decodeTransportValue, B as fileLimits, C as endpointUrl, F as RuntimeFileOccurrence, H as grantFileValue, J as DataHistoryId, K as ActivationGeneration, L as fileFormats, N as FileId, P as RuntimeFileMetadata, R as fileGrantUrlOf, S as ServingSelection, T as initial, U as isFileValue, V as fileMimeTypes, W as makeFileValue, Y as InvocationKey, a as SessionResponse, b as pending, f as sessionPath, g as Result$1, i as SessionRequest, j as encodeTransportObject, l as developmentSelectionKey, n as SessionOutcome, o as SessionState, p as sessionRequestsPath, q as AppStateRevision, r as SessionRedirect, t as DevelopmentSelection, u as idLimits, v as failureFromWire, w as sameSelection, z as fileIdOf } from "./id-rzjaCxeF.js";
|
|
3
|
+
import { i as WireSuccess, n as WireFailure, r as WireResult, t as FunctionAddress } from "./sync-DUfp7S5R.js";
|
|
4
4
|
import { a as RouteDefinition, l as appDefinitionLimits, n as getRouteDefinition, r as LayoutDefinition } from "./routes-DnU39R7c.js";
|
|
5
5
|
import { Array as Array$1, Cause, Context, DateTime, Deferred, Effect, ErrorReporter, Layer, ManagedRuntime, Option, Predicate, Schema, Semaphore, String as String$1 } from "effect";
|
|
6
6
|
import { customAlphabet } from "nanoid";
|
|
7
|
-
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/
|
|
7
|
+
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http";
|
|
8
8
|
import { useContext, useEffect, useLayoutEffect, useRef, useState } from "preact/hooks";
|
|
9
9
|
import { createContext, createElement } from "preact";
|
|
10
10
|
//#region ../contracts/dist/json.js
|
|
@@ -298,42 +298,42 @@ var BrowserSession = class BrowserSession extends Context.Service()("ignotum/cli
|
|
|
298
298
|
const readSession = Effect.fn("BrowserSession.read")(function* () {
|
|
299
299
|
return yield* client.get(`${sessionPath}${parameters()}`, { headers: { "x-ignotum-request": "1" } }).pipe(Effect.flatMap(HttpClientResponse.schemaBodyJson(SessionResponse)));
|
|
300
300
|
});
|
|
301
|
-
|
|
302
|
-
const bootstrap = bootstrapLock.withPermits(1)(Effect.gen(function* () {
|
|
301
|
+
const load = (suspendOnError) => bootstrapLock.withPermits(1)(Effect.gen(function* () {
|
|
303
302
|
const admittedGeneration = generation;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
303
|
+
return yield* Effect.gen(function* () {
|
|
304
|
+
const startedAt = performance.now();
|
|
305
|
+
let session = yield* readSession();
|
|
306
|
+
development = session.development === true;
|
|
307
|
+
if (development && selection === void 0) {
|
|
308
|
+
const saved = globalThis.sessionStorage.getItem(developmentSelectionKey);
|
|
309
|
+
const decoded = saved === null ? Option.none() : Schema.decodeOption(selectionJson)(saved);
|
|
310
|
+
selection = Option.getOrElse(decoded, () => ({
|
|
311
|
+
formatVersion: 1,
|
|
312
|
+
username: null,
|
|
313
|
+
epoch: ""
|
|
314
|
+
}));
|
|
315
|
+
if (selection.epoch === "") selection = {
|
|
316
|
+
...selection,
|
|
317
|
+
epoch: yield* ids.generate(SessionEpoch)
|
|
318
|
+
};
|
|
319
|
+
globalThis.sessionStorage.setItem(developmentSelectionKey, Schema.encodeSync(selectionJson)(selection));
|
|
320
|
+
session = yield* readSession();
|
|
321
|
+
}
|
|
322
|
+
if (generation !== admittedGeneration) {
|
|
323
|
+
if (current !== void 0) return current;
|
|
324
|
+
return yield* IdRequestError.make({ message: "Your ID session changed while loading." });
|
|
325
|
+
}
|
|
326
|
+
readOutcome();
|
|
327
|
+
if (session.outcome !== void 0) state = {
|
|
328
|
+
...state,
|
|
329
|
+
outcome: session.outcome
|
|
319
330
|
};
|
|
320
|
-
|
|
321
|
-
session
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
readOutcome();
|
|
328
|
-
if (session.outcome !== void 0) state = {
|
|
329
|
-
...state,
|
|
330
|
-
outcome: session.outcome
|
|
331
|
-
};
|
|
332
|
-
accept(session, session.serverTime + performance.now() - startedAt);
|
|
333
|
-
return session;
|
|
334
|
-
})).pipe(Effect.mapError(() => IdRequestError.make({ message: "Could not load your ID session." })), Effect.tapError((error) => Effect.sync(() => {
|
|
335
|
-
if (generation === bootstrapGeneration) suspend(error.message);
|
|
336
|
-
})));
|
|
331
|
+
accept(session, session.serverTime + performance.now() - startedAt);
|
|
332
|
+
return session;
|
|
333
|
+
}).pipe(Effect.mapError(() => IdRequestError.make({ message: "Could not load your ID session." })), Effect.tapError((error) => suspendOnError && generation === admittedGeneration ? Effect.sync(() => suspend(error.message)) : Effect.void));
|
|
334
|
+
}));
|
|
335
|
+
const bootstrap = load(true);
|
|
336
|
+
const renew = load(false);
|
|
337
337
|
const start = Effect.fn("BrowserSession.start")(function* (intent, profile, returnTo) {
|
|
338
338
|
const session = current ?? (yield* bootstrap);
|
|
339
339
|
if (intent === "requestProfile" && session.user === null) return yield* IdRequestError.make({ message: "Sign in before requesting profile information." });
|
|
@@ -370,6 +370,10 @@ var BrowserSession = class BrowserSession extends Context.Service()("ignotum/cli
|
|
|
370
370
|
checkExpiry();
|
|
371
371
|
return current;
|
|
372
372
|
},
|
|
373
|
+
remainingLeaseMillis: () => {
|
|
374
|
+
checkExpiry();
|
|
375
|
+
return current === void 0 ? 0 : Math.max(0, deadline - performance.now());
|
|
376
|
+
},
|
|
373
377
|
subscribe: (listener) => {
|
|
374
378
|
listeners.add(listener);
|
|
375
379
|
return () => {
|
|
@@ -379,6 +383,7 @@ var BrowserSession = class BrowserSession extends Context.Service()("ignotum/cli
|
|
|
379
383
|
accept,
|
|
380
384
|
suspend,
|
|
381
385
|
bootstrap,
|
|
386
|
+
renew,
|
|
382
387
|
start,
|
|
383
388
|
signOut,
|
|
384
389
|
socketParameters: parameters
|
|
@@ -487,7 +492,7 @@ var RecoveryJournal = class {
|
|
|
487
492
|
}
|
|
488
493
|
if (raw === null) return this.snapshot([], []);
|
|
489
494
|
if (bytes(raw) > RecoveryJournalLimits.maxBytes) return this.discard("full");
|
|
490
|
-
const parsed = Schema.decodeUnknownOption(Schema.fromJsonString(RecoveryJournalRecord))(raw);
|
|
495
|
+
const parsed = Schema.decodeUnknownOption(Schema.fromJsonString(RecoveryJournalRecord), { onExcessProperty: "error" })(raw);
|
|
491
496
|
if (parsed._tag === "None" || parsed.value.appId !== this.options.appId) return this.discard("corrupt");
|
|
492
497
|
if (parsed.value.sessionEpoch !== this.options.sessionEpoch) return this.discard("session-changed");
|
|
493
498
|
this.clientSessionId = parsed.value.clientSessionId;
|
|
@@ -614,7 +619,7 @@ var ManagedUpgrade = class {
|
|
|
614
619
|
try {
|
|
615
620
|
const raw = browser.sessionStorage.getItem(this.key);
|
|
616
621
|
if (raw !== null) {
|
|
617
|
-
const decoded = Schema.decodeOption(TabStateJson)(raw);
|
|
622
|
+
const decoded = Schema.decodeOption(TabStateJson, { onExcessProperty: "error" })(raw);
|
|
618
623
|
if (Option.isSome(decoded) && decoded.value.appId === selection.appId && (decoded.value.target === null || decoded.value.target.appId === selection.appId)) this.tab = decoded.value;
|
|
619
624
|
else this.reportRecovery("Saved update information could not be read. Previous mutation outcomes may be unknown.");
|
|
620
625
|
}
|
|
@@ -1087,6 +1092,14 @@ const ManagedServerMessage = Schema.Union([
|
|
|
1087
1092
|
]);
|
|
1088
1093
|
//#endregion
|
|
1089
1094
|
//#region ../platform/dist/versions/1/browser/managed-client.js
|
|
1095
|
+
const ManagedClientMessageJson = Schema.fromJsonString(ManagedClientMessage);
|
|
1096
|
+
const ManagedWireMessageJson = Schema.fromJsonString(Schema.Unknown);
|
|
1097
|
+
const encodeManagedClientMessage = Schema.encodeSync(ManagedClientMessageJson);
|
|
1098
|
+
const decodeManagedWireMessage = Schema.decodeUnknownOption(ManagedWireMessageJson);
|
|
1099
|
+
const decodeManagedUpgradeRequired = Schema.decodeUnknownOption(ManagedUpgradeRequired);
|
|
1100
|
+
const decodeManagedServerMessage = Schema.decodeUnknownOption(ManagedServerMessage);
|
|
1101
|
+
const maximumTimerMillis = 2147483647;
|
|
1102
|
+
const sessionRefreshLeadMillis = idLimits.leaseMillis - idLimits.refreshMillis;
|
|
1090
1103
|
const issueMessage = (issue) => {
|
|
1091
1104
|
switch (issue) {
|
|
1092
1105
|
case "denied": return "Browser storage is unavailable. Some previous mutation outcomes may be unknown.";
|
|
@@ -1181,7 +1194,7 @@ var ManagedBrowserClient = class {
|
|
|
1181
1194
|
}
|
|
1182
1195
|
retry = () => {
|
|
1183
1196
|
if (this.upgrade.obsolete) this.upgrade.retry();
|
|
1184
|
-
else this.
|
|
1197
|
+
else this.wake();
|
|
1185
1198
|
};
|
|
1186
1199
|
recoverLoad = async () => {
|
|
1187
1200
|
await this.upgrade.check();
|
|
@@ -1198,15 +1211,15 @@ var ManagedBrowserClient = class {
|
|
|
1198
1211
|
};
|
|
1199
1212
|
start() {
|
|
1200
1213
|
if (this.disposed) return;
|
|
1201
|
-
this.browser.addEventListener("pageshow", this.
|
|
1214
|
+
this.browser.addEventListener("pageshow", this.wake);
|
|
1202
1215
|
this.browser.addEventListener("pagehide", this.hide);
|
|
1203
1216
|
this.browser.addEventListener("online", this.resume);
|
|
1204
1217
|
this.browser.addEventListener("offline", this.offline);
|
|
1205
|
-
this.browser.addEventListener("focus", this.
|
|
1218
|
+
this.browser.addEventListener("focus", this.wake);
|
|
1206
1219
|
this.browser.document.addEventListener("visibilitychange", this.visibility);
|
|
1207
1220
|
this.heartbeat = setInterval(() => {
|
|
1208
1221
|
const now = Date.now();
|
|
1209
|
-
if (now - this.lastActivity > 15e3) this.
|
|
1222
|
+
if (now - this.lastActivity > 15e3) this.wake();
|
|
1210
1223
|
this.lastActivity = now;
|
|
1211
1224
|
}, 5e3);
|
|
1212
1225
|
this.connect();
|
|
@@ -1216,7 +1229,38 @@ var ManagedBrowserClient = class {
|
|
|
1216
1229
|
}
|
|
1217
1230
|
send(message) {
|
|
1218
1231
|
if (this.socket?.readyState !== 1) return;
|
|
1219
|
-
this.socket.send(
|
|
1232
|
+
this.socket.send(encodeManagedClientMessage(message));
|
|
1233
|
+
}
|
|
1234
|
+
scheduleSessionRefresh() {
|
|
1235
|
+
if (this.sessionTimer !== void 0) clearTimeout(this.sessionTimer);
|
|
1236
|
+
this.sessionTimer = void 0;
|
|
1237
|
+
if (this.session === void 0) return;
|
|
1238
|
+
const remaining = this.session.remainingLeaseMillis();
|
|
1239
|
+
this.sessionDeadline = Date.now() + remaining;
|
|
1240
|
+
if (remaining >= maximumTimerMillis) return;
|
|
1241
|
+
const lead = Math.min(sessionRefreshLeadMillis, remaining / 2);
|
|
1242
|
+
this.sessionTimer = setTimeout(() => this.refreshSession(), Math.max(0, remaining - lead));
|
|
1243
|
+
}
|
|
1244
|
+
refreshSession() {
|
|
1245
|
+
if (this.disposed || this.upgrade.obsolete || this.session === void 0) return;
|
|
1246
|
+
const generation = this.connectionGeneration;
|
|
1247
|
+
Effect.runPromise(this.session.renew).then((current) => {
|
|
1248
|
+
if (this.disposed || this.upgrade.obsolete || generation !== this.connectionGeneration) return;
|
|
1249
|
+
if (current.sessionEpoch !== this.sessionEpoch || current.viewRevision !== this.sessionViewRevision) {
|
|
1250
|
+
this.connect();
|
|
1251
|
+
return;
|
|
1252
|
+
}
|
|
1253
|
+
this.scheduleSessionRefresh();
|
|
1254
|
+
}, () => {
|
|
1255
|
+
if (this.disposed || this.upgrade.obsolete || generation !== this.connectionGeneration) return;
|
|
1256
|
+
const remaining = this.session?.remainingLeaseMillis() ?? 0;
|
|
1257
|
+
this.sessionDeadline = Date.now() + remaining;
|
|
1258
|
+
if (remaining <= 0) {
|
|
1259
|
+
this.connect();
|
|
1260
|
+
return;
|
|
1261
|
+
}
|
|
1262
|
+
this.sessionTimer = setTimeout(() => this.refreshSession(), Math.min(1e3, remaining));
|
|
1263
|
+
});
|
|
1220
1264
|
}
|
|
1221
1265
|
connect() {
|
|
1222
1266
|
if (this.disposed || this.upgrade.obsolete) return;
|
|
@@ -1261,12 +1305,17 @@ var ManagedBrowserClient = class {
|
|
|
1261
1305
|
}, 1e4);
|
|
1262
1306
|
socket.onmessage = (event) => {
|
|
1263
1307
|
if (this.socket !== socket || this.disposed) return;
|
|
1264
|
-
const
|
|
1308
|
+
const wire = decodeManagedWireMessage(event.data);
|
|
1309
|
+
if (Option.isNone(wire)) {
|
|
1310
|
+
this.upgrade.require();
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
const stable = decodeManagedUpgradeRequired(wire.value);
|
|
1265
1314
|
if (Option.isSome(stable)) {
|
|
1266
1315
|
this.upgrade.require(stable.value.selection);
|
|
1267
1316
|
return;
|
|
1268
1317
|
}
|
|
1269
|
-
const decoded =
|
|
1318
|
+
const decoded = decodeManagedServerMessage(wire.value);
|
|
1270
1319
|
if (Option.isNone(decoded)) {
|
|
1271
1320
|
this.upgrade.require();
|
|
1272
1321
|
return;
|
|
@@ -1302,14 +1351,8 @@ var ManagedBrowserClient = class {
|
|
|
1302
1351
|
if (previousEpoch !== void 0 && (previousEpoch !== message.session.sessionEpoch || this.sessionViewRevision !== message.session.viewRevision)) this.queries.invalidatePrivate();
|
|
1303
1352
|
this.sessionEpoch = message.session.sessionEpoch;
|
|
1304
1353
|
this.sessionViewRevision = message.session.viewRevision;
|
|
1305
|
-
this.sessionDeadline = Date.now() + Math.max(0, message.session.validUntil - message.serverTime);
|
|
1306
|
-
if (this.sessionTimer !== void 0) clearTimeout(this.sessionTimer);
|
|
1307
|
-
this.sessionTimer = setTimeout(() => {
|
|
1308
|
-
this.session?.suspend();
|
|
1309
|
-
this.queries.invalidatePrivate();
|
|
1310
|
-
this.resume();
|
|
1311
|
-
}, Math.min(2147483647, Math.max(0, this.sessionDeadline - Date.now())));
|
|
1312
1354
|
this.session?.accept(message.session, message.serverTime);
|
|
1355
|
+
this.scheduleSessionRefresh();
|
|
1313
1356
|
this.journal = new RecoveryJournal({
|
|
1314
1357
|
appId: this.selection.appId,
|
|
1315
1358
|
sessionEpoch: message.session.sessionEpoch,
|
|
@@ -1574,12 +1617,18 @@ var ManagedBrowserClient = class {
|
|
|
1574
1617
|
};
|
|
1575
1618
|
resume = () => {
|
|
1576
1619
|
if (this.disposed || this.upgrade.obsolete) return;
|
|
1620
|
+
if (this.socket !== void 0 && this.socket.readyState <= WebSocket.OPEN) return;
|
|
1577
1621
|
this.suspended = true;
|
|
1578
1622
|
this.acceptedSocket = void 0;
|
|
1579
1623
|
this.recovery.clear();
|
|
1580
1624
|
this.queries.invalidate(void 0);
|
|
1581
1625
|
this.connect();
|
|
1582
1626
|
};
|
|
1627
|
+
wake = () => {
|
|
1628
|
+
const connected = this.socket !== void 0 && this.socket.readyState <= WebSocket.OPEN && this.acceptedSocket === this.socket;
|
|
1629
|
+
this.resume();
|
|
1630
|
+
if (connected) this.validate();
|
|
1631
|
+
};
|
|
1583
1632
|
offline = () => {
|
|
1584
1633
|
this.suspended = true;
|
|
1585
1634
|
this.acceptedSocket = void 0;
|
|
@@ -1593,8 +1642,8 @@ var ManagedBrowserClient = class {
|
|
|
1593
1642
|
this.socket?.close();
|
|
1594
1643
|
};
|
|
1595
1644
|
visibility = () => {
|
|
1596
|
-
if (this.browser.document.visibilityState === "visible") this.
|
|
1597
|
-
else this.
|
|
1645
|
+
if (this.browser.document.visibilityState === "visible") this.wake();
|
|
1646
|
+
else for (const issue of this.persistPending()) this.upgrade.reportRecovery(issue);
|
|
1598
1647
|
};
|
|
1599
1648
|
dispose() {
|
|
1600
1649
|
if (this.disposed) return;
|
|
@@ -1608,11 +1657,11 @@ var ManagedBrowserClient = class {
|
|
|
1608
1657
|
if (this.sessionTimer !== void 0) clearTimeout(this.sessionTimer);
|
|
1609
1658
|
if (this.heartbeat !== void 0) clearInterval(this.heartbeat);
|
|
1610
1659
|
for (const timer of this.recoveryTimers) clearTimeout(timer);
|
|
1611
|
-
this.browser.removeEventListener("pageshow", this.
|
|
1660
|
+
this.browser.removeEventListener("pageshow", this.wake);
|
|
1612
1661
|
this.browser.removeEventListener("pagehide", this.hide);
|
|
1613
1662
|
this.browser.removeEventListener("online", this.resume);
|
|
1614
1663
|
this.browser.removeEventListener("offline", this.offline);
|
|
1615
|
-
this.browser.removeEventListener("focus", this.
|
|
1664
|
+
this.browser.removeEventListener("focus", this.wake);
|
|
1616
1665
|
this.browser.document.removeEventListener("visibilitychange", this.visibility);
|
|
1617
1666
|
this.upgrade.dispose();
|
|
1618
1667
|
}
|
|
@@ -2174,7 +2223,7 @@ const decodeRouteInputs = Effect.fn("Routing.decodeRouteInputs")(function* (inpu
|
|
|
2174
2223
|
const sameValue = (left, right) => Array$1.isArray(left) && Array$1.isArray(right) ? left.length === right.length && left.every((value, index) => value === right[index]) : left === right;
|
|
2175
2224
|
const buildUrl = Effect.fn("Routing.buildUrl")(function* (input, values = {}) {
|
|
2176
2225
|
const { route, pattern } = yield* validateDefinition(input);
|
|
2177
|
-
const navigation = yield* Schema.decodeUnknownEffect(BuildInput)(values).pipe(Effect.mapError(() => invalid("params", "The URL navigation input is invalid.")));
|
|
2226
|
+
const navigation = yield* Schema.decodeUnknownEffect(BuildInput, { onExcessProperty: "error" })(values).pipe(Effect.mapError(() => invalid("params", "The URL navigation input is invalid.")));
|
|
2178
2227
|
const params = yield* inputRecord(navigation.params, route.params, "params");
|
|
2179
2228
|
const searchParams = yield* inputRecord(navigation.searchParams, route.searchParams, "searchParams");
|
|
2180
2229
|
const segments = [];
|
|
@@ -2248,7 +2297,7 @@ const NavigationInput = Schema.Struct({
|
|
|
2248
2297
|
const useNavigate = () => {
|
|
2249
2298
|
const router = useRouter();
|
|
2250
2299
|
const [navigate] = useState(() => Object.assign((reference, ...args) => {
|
|
2251
|
-
const options = Schema.decodeUnknownSync(NavigationInput)(args[0] ?? {});
|
|
2300
|
+
const options = Schema.decodeUnknownSync(NavigationInput, { onExcessProperty: "error" })(args[0] ?? {});
|
|
2252
2301
|
return router.navigate(destinationHref(reference, options), options);
|
|
2253
2302
|
}, {
|
|
2254
2303
|
back: router.back,
|
|
@@ -2417,4 +2466,4 @@ function Redirect(props) {
|
|
|
2417
2466
|
//#endregion
|
|
2418
2467
|
export { Files as C, BrowserSession as S, matchPattern as _, url as a, syncClientInternals as b, useMatch as c, useRoute as d, useRouterSnapshot as f, matchDirectory as g, compilePatterns as h, RouterContext as i, useNavigate as l, parseLocation as m, NavLink as n, useBlocker as o, decodeRouteInputs as p, Redirect as r, useLocation as s, Link as t, useNavigation as u, SyncClient as v, ClientInfrastructureError as w, syncRuntime as x, mountManagedSync as y };
|
|
2419
2468
|
|
|
2420
|
-
//# sourceMappingURL=router-
|
|
2469
|
+
//# sourceMappingURL=router-CfNPtoVO.js.map
|