ignotum 0.0.2 → 0.0.4
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 +23 -7
- package/dist/cli/bin.mjs +32313 -751
- package/dist/cli/bin.mjs.map +1 -1
- package/dist/runtime/{api-Cpx57mk3.d.ts → api-D2bsAz4T.d.ts} +3 -2
- package/dist/runtime/{api-BXXIZc_Q.js → api-DtX8qPrq.js} +58 -27
- package/dist/runtime/api-DtX8qPrq.js.map +1 -0
- package/dist/runtime/client.d.ts +11 -4
- package/dist/runtime/client.js +343 -79
- package/dist/runtime/client.js.map +1 -1
- package/dist/runtime/{result-B2W-z2wG.js → descriptor-t6BOEGw9-BTHR-ZMv.js} +119 -4
- package/dist/runtime/descriptor-t6BOEGw9-BTHR-ZMv.js.map +1 -0
- package/dist/runtime/id-Btwac71X-B9OeBzvq.d.ts +9 -0
- package/dist/runtime/id-D570vudg.js +26 -0
- package/dist/runtime/id-D570vudg.js.map +1 -0
- package/dist/runtime/{index-BgWROoyk.d.ts → index-Dl_VQGmA.d.ts} +114 -31
- package/dist/runtime/internal/api.d.ts +1 -1
- package/dist/runtime/internal/api.js +1 -1
- package/dist/runtime/internal/host.d.ts +44 -0
- package/dist/runtime/internal/host.js +213 -0
- package/dist/runtime/internal/host.js.map +1 -0
- package/dist/runtime/internal/server.d.ts +1 -1
- package/dist/runtime/internal/server.js +1 -1
- package/dist/runtime/internal/types.d.ts +1 -1
- package/dist/runtime/internal/types.js +1 -1
- package/dist/runtime/{result-C1ZdsM6Y.d.ts → result-BgcHn25t.d.ts} +21 -6
- package/dist/runtime/schema-B-jMZEbs.js +227 -0
- package/dist/runtime/schema-B-jMZEbs.js.map +1 -0
- package/dist/runtime/server.d.ts +2 -2
- package/dist/runtime/server.js +2 -2
- package/package.json +15 -5
- package/src/cli/agent-files.ts +6 -2
- package/src/cli/app-configuration.ts +135 -0
- package/src/cli/bin.ts +24 -1
- package/src/cli/build/artifact.ts +95 -0
- package/src/cli/build/client.ts +103 -0
- package/src/cli/build/server.ts +526 -0
- package/src/cli/client-config.ts +141 -0
- package/src/cli/client-entry.ts +152 -0
- package/src/cli/client-plugin.ts +86 -16
- package/src/cli/codegen.ts +5 -5
- package/src/cli/command.ts +41 -9
- package/src/cli/control-client.ts +343 -0
- package/src/cli/deploy.ts +217 -0
- package/src/cli/dev.ts +43 -108
- package/src/cli/module-boundaries.ts +183 -0
- package/src/cli/{new-project.ts → new-app.ts} +86 -86
- package/src/cli/package-manager.ts +9 -9
- package/src/client/app.ts +15 -0
- package/src/client/errors.ts +1 -17
- package/src/client/index.ts +2 -0
- package/src/client/sync.ts +172 -120
- package/src/dev-runtime/database.ts +253 -96
- package/src/dev-runtime/dev-database.ts +14 -14
- package/src/dev-runtime/functions.ts +57 -88
- package/src/dev-runtime/id.ts +2 -10
- package/src/dev-runtime/migrations.ts +68 -0
- package/src/dev-runtime/sync.ts +266 -83
- package/src/internal/function-definition.ts +77 -0
- package/src/internal/host.ts +1 -0
- package/src/internal/http-paths.ts +3 -1
- package/dist/runtime/api-BXXIZc_Q.js.map +0 -1
- package/dist/runtime/result-B2W-z2wG.js.map +0 -1
- package/dist/runtime/schema-CNEVLF7D.js +0 -116
- package/dist/runtime/schema-CNEVLF7D.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { i as InternalServerError, r as ErrorValue } from "./result-
|
|
1
|
+
import { i as InternalServerError, r as ErrorValue } from "./result-BgcHn25t.js";
|
|
2
|
+
import "./id-Btwac71X-B9OeBzvq.js";
|
|
2
3
|
import { Effect, Schema } from "effect";
|
|
3
4
|
//#region ../contracts/dist/runtime/sync.d.ts
|
|
4
5
|
declare const FunctionAddress: Schema.TemplateLiteral<readonly ["api.", Schema.String, ".", Schema.String]>;
|
|
@@ -44,4 +45,4 @@ declare const functionPathOf: <Kind extends FunctionKind, Args, Success, Failure
|
|
|
44
45
|
declare function createApi<Modules>(): Api<Modules>;
|
|
45
46
|
//#endregion
|
|
46
47
|
export { functionPathOf as i, FunctionReference as n, createApi as r, Api as t };
|
|
47
|
-
//# sourceMappingURL=api-
|
|
48
|
+
//# sourceMappingURL=api-D2bsAz4T.d.ts.map
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { a as InvocationId, c as SubscriptionId, n as DeploymentId, t as AppId } from "./id-D570vudg.js";
|
|
1
2
|
import { Predicate, Schema } from "effect";
|
|
3
|
+
//#region ../contracts/dist/runtime/identity.js
|
|
4
|
+
const InvocationKey = Schema.String.pipe(Schema.brand("ignotum/hosted/InvocationKey"));
|
|
5
|
+
const DeploymentGeneration = Schema.Natural.pipe(Schema.brand("ignotum/hosted/DeploymentGeneration"));
|
|
6
|
+
const AppStateRevision = Schema.Natural.pipe(Schema.brand("ignotum/hosted/AppStateRevision"));
|
|
7
|
+
//#endregion
|
|
2
8
|
//#region ../contracts/dist/runtime/sync.js
|
|
3
9
|
const FunctionNamePart = Schema.String.check(Schema.isPattern(/^[A-Za-z_$][A-Za-z0-9_$]*$/));
|
|
4
10
|
Schema.TemplateLiteralParser([
|
|
@@ -13,8 +19,6 @@ const FunctionAddress = Schema.TemplateLiteral([
|
|
|
13
19
|
".",
|
|
14
20
|
FunctionNamePart
|
|
15
21
|
]);
|
|
16
|
-
const SubscriptionId = Schema.Natural.pipe(Schema.brand("ignotum/sync/SubscriptionId"));
|
|
17
|
-
const RequestId = Schema.Natural.pipe(Schema.brand("ignotum/sync/RequestId"));
|
|
18
22
|
const Subscribe = Schema.Struct({
|
|
19
23
|
type: Schema.Literal("Subscribe"),
|
|
20
24
|
id: SubscriptionId,
|
|
@@ -25,52 +29,70 @@ const Unsubscribe = Schema.Struct({
|
|
|
25
29
|
type: Schema.Literal("Unsubscribe"),
|
|
26
30
|
id: SubscriptionId
|
|
27
31
|
});
|
|
28
|
-
const
|
|
29
|
-
type: Schema.Literal("
|
|
30
|
-
id:
|
|
32
|
+
const Invoke = Schema.Struct({
|
|
33
|
+
type: Schema.Literal("Invoke"),
|
|
34
|
+
id: InvocationId,
|
|
35
|
+
kind: Schema.Literal("Mutation"),
|
|
31
36
|
function: FunctionAddress,
|
|
32
37
|
args: Schema.Json
|
|
33
38
|
});
|
|
34
39
|
const ClientMessage = Schema.Union([
|
|
35
40
|
Subscribe,
|
|
36
41
|
Unsubscribe,
|
|
37
|
-
|
|
42
|
+
Invoke
|
|
38
43
|
]);
|
|
39
|
-
const
|
|
40
|
-
type: Schema.Literal("
|
|
44
|
+
const SubscriptionOperation = Schema.Struct({
|
|
45
|
+
type: Schema.Literal("Subscription"),
|
|
41
46
|
id: SubscriptionId
|
|
42
47
|
});
|
|
43
|
-
const
|
|
44
|
-
type: Schema.Literal("
|
|
45
|
-
id:
|
|
48
|
+
const InvocationOperation = Schema.Struct({
|
|
49
|
+
type: Schema.Literal("Invocation"),
|
|
50
|
+
id: InvocationId
|
|
46
51
|
});
|
|
47
|
-
const Operation = Schema.Union([
|
|
52
|
+
const Operation = Schema.Union([SubscriptionOperation, InvocationOperation]);
|
|
48
53
|
const DatePath = Schema.Array(Schema.Union([Schema.String, Schema.Natural]));
|
|
49
54
|
const DatePaths = Schema.Array(DatePath);
|
|
50
|
-
const
|
|
55
|
+
const WireSuccess = Schema.Struct({
|
|
51
56
|
type: Schema.Literal("Success"),
|
|
52
57
|
value: Schema.optional(Schema.Json),
|
|
53
58
|
dates: Schema.optional(DatePaths)
|
|
54
|
-
})
|
|
59
|
+
});
|
|
60
|
+
const WireFailure = Schema.Struct({
|
|
55
61
|
type: Schema.Literal("Failure"),
|
|
56
62
|
error: Schema.Json,
|
|
57
63
|
dates: Schema.optional(DatePaths)
|
|
58
|
-
})
|
|
59
|
-
const
|
|
60
|
-
|
|
64
|
+
});
|
|
65
|
+
const WireResult = Schema.Union([WireSuccess, WireFailure]);
|
|
66
|
+
const SyncHandshake = Schema.Struct({
|
|
67
|
+
type: Schema.Literal("Handshake"),
|
|
68
|
+
appId: AppId,
|
|
69
|
+
deploymentId: DeploymentId,
|
|
70
|
+
generation: DeploymentGeneration
|
|
71
|
+
});
|
|
72
|
+
const Snapshot = Schema.Struct({
|
|
73
|
+
type: Schema.Literal("Snapshot"),
|
|
61
74
|
id: SubscriptionId,
|
|
62
|
-
result: WireResult
|
|
75
|
+
result: WireResult,
|
|
76
|
+
revision: AppStateRevision
|
|
77
|
+
});
|
|
78
|
+
const SyncResultSuccess = Schema.Struct({
|
|
79
|
+
type: Schema.Literal("Result"),
|
|
80
|
+
id: InvocationId,
|
|
81
|
+
result: WireSuccess,
|
|
82
|
+
committedRevision: AppStateRevision
|
|
63
83
|
});
|
|
64
|
-
const
|
|
65
|
-
type: Schema.Literal("
|
|
66
|
-
id:
|
|
67
|
-
result:
|
|
84
|
+
const SyncResultFailure = Schema.Struct({
|
|
85
|
+
type: Schema.Literal("Result"),
|
|
86
|
+
id: InvocationId,
|
|
87
|
+
result: WireFailure
|
|
68
88
|
});
|
|
69
89
|
const ProtocolErrorCode = Schema.Literals([
|
|
70
90
|
"DuplicateOperationId",
|
|
71
91
|
"FunctionUnavailable",
|
|
72
92
|
"InvalidArguments",
|
|
73
93
|
"InvalidMessage",
|
|
94
|
+
"InvocationIdConflict",
|
|
95
|
+
"ResourceLimitExceeded",
|
|
74
96
|
"UnknownFunction",
|
|
75
97
|
"WrongFunctionKind"
|
|
76
98
|
]);
|
|
@@ -80,10 +102,19 @@ const ProtocolError = Schema.Struct({
|
|
|
80
102
|
code: ProtocolErrorCode,
|
|
81
103
|
message: Schema.String
|
|
82
104
|
});
|
|
105
|
+
const DeploymentChanged = Schema.Struct({
|
|
106
|
+
type: Schema.Literal("DeploymentChanged"),
|
|
107
|
+
deploymentId: DeploymentId,
|
|
108
|
+
generation: DeploymentGeneration
|
|
109
|
+
});
|
|
110
|
+
const DeploymentChangedCloseCode = 4409;
|
|
83
111
|
const ServerMessage = Schema.Union([
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
112
|
+
SyncHandshake,
|
|
113
|
+
Snapshot,
|
|
114
|
+
SyncResultSuccess,
|
|
115
|
+
SyncResultFailure,
|
|
116
|
+
ProtocolError,
|
|
117
|
+
DeploymentChanged
|
|
87
118
|
]);
|
|
88
119
|
const ClientMessageJson = Schema.fromJsonString(ClientMessage);
|
|
89
120
|
const ServerMessageJson = Schema.fromJsonString(ServerMessage);
|
|
@@ -114,6 +145,6 @@ function createApi() {
|
|
|
114
145
|
} });
|
|
115
146
|
}
|
|
116
147
|
//#endregion
|
|
117
|
-
export {
|
|
148
|
+
export { FunctionAddress as a, ServerMessageJson as c, WireSuccess as d, AppStateRevision as f, DeploymentChangedCloseCode as i, WireFailure as l, InvocationKey as m, functionPathOf as n, Operation as o, DeploymentGeneration as p, ClientMessageJson as r, ProtocolErrorCode as s, createApi as t, WireResult as u };
|
|
118
149
|
|
|
119
|
-
//# sourceMappingURL=api-
|
|
150
|
+
//# sourceMappingURL=api-DtX8qPrq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-DtX8qPrq.js","names":[],"sources":["../../../contracts/dist/runtime/identity.js","../../../contracts/dist/runtime/sync.js","../../src/internal/api.ts"],"sourcesContent":["import { AppId, ConnectionId, DeploymentId, DevDatabaseLockId, InvocationId, PlatformPrincipalId, RequestId, RuntimeRequestNonce, SubscriptionId, TableId, TeamId } from \"./id.js\";\nimport { Schema } from \"effect\";\n//#region src/runtime/identity.ts\nconst InvocationKey = Schema.String.pipe(Schema.brand(\"ignotum/hosted/InvocationKey\"));\nconst DeploymentGeneration = Schema.Natural.pipe(Schema.brand(\"ignotum/hosted/DeploymentGeneration\"));\nconst AppStateRevision = Schema.Natural.pipe(Schema.brand(\"ignotum/hosted/AppStateRevision\"));\n//#endregion\nexport { AppId, AppStateRevision, ConnectionId, DeploymentGeneration, DeploymentId, DevDatabaseLockId, InvocationId, InvocationKey, PlatformPrincipalId, RequestId, RuntimeRequestNonce, SubscriptionId, TableId, TeamId };\n\n//# sourceMappingURL=identity.js.map","import { AppId, DeploymentId, InvocationId, SubscriptionId } from \"./id.js\";\nimport { AppStateRevision, DeploymentGeneration } from \"./identity.js\";\nimport { TransportValueSchema, datePathsOf, datePathsOfObject, decodeTransportObject, decodeTransportValue, encodeTransportObject, encodeTransportValue } from \"./value.js\";\nimport { Schema } from \"effect\";\n//#region src/runtime/sync.ts\nconst FunctionNamePart = Schema.String.check(Schema.isPattern(/^[A-Za-z_$][A-Za-z0-9_$]*$/));\nconst ApiFunctionAddressParts = Schema.TemplateLiteralParser([\n\t\"api.\",\n\tFunctionNamePart,\n\t\".\",\n\tFunctionNamePart\n]);\nconst FunctionAddress = Schema.TemplateLiteral([\n\t\"api.\",\n\tFunctionNamePart,\n\t\".\",\n\tFunctionNamePart\n]);\nconst apiFunctionParts = (address) => {\n\tconst [, moduleName, , functionName] = Schema.decodeSync(ApiFunctionAddressParts)(address);\n\treturn {\n\t\tfunctionName,\n\t\tmoduleName\n\t};\n};\nconst Subscribe = Schema.Struct({\n\ttype: Schema.Literal(\"Subscribe\"),\n\tid: SubscriptionId,\n\tfunction: FunctionAddress,\n\targs: Schema.Json\n});\nconst Unsubscribe = Schema.Struct({\n\ttype: Schema.Literal(\"Unsubscribe\"),\n\tid: SubscriptionId\n});\nconst Invoke = Schema.Struct({\n\ttype: Schema.Literal(\"Invoke\"),\n\tid: InvocationId,\n\tkind: Schema.Literal(\"Mutation\"),\n\tfunction: FunctionAddress,\n\targs: Schema.Json\n});\nconst ClientMessage = Schema.Union([\n\tSubscribe,\n\tUnsubscribe,\n\tInvoke\n]);\nconst SubscriptionOperation = Schema.Struct({\n\ttype: Schema.Literal(\"Subscription\"),\n\tid: SubscriptionId\n});\nconst InvocationOperation = Schema.Struct({\n\ttype: Schema.Literal(\"Invocation\"),\n\tid: InvocationId\n});\nconst Operation = Schema.Union([SubscriptionOperation, InvocationOperation]);\nconst DatePath = Schema.Array(Schema.Union([Schema.String, Schema.Natural]));\nconst DatePaths = Schema.Array(DatePath);\nconst WireSuccess = Schema.Struct({\n\ttype: Schema.Literal(\"Success\"),\n\tvalue: Schema.optional(Schema.Json),\n\tdates: Schema.optional(DatePaths)\n});\nconst WireFailure = Schema.Struct({\n\ttype: Schema.Literal(\"Failure\"),\n\terror: Schema.Json,\n\tdates: Schema.optional(DatePaths)\n});\nconst WireResult = Schema.Union([WireSuccess, WireFailure]);\nconst SyncHandshake = Schema.Struct({\n\ttype: Schema.Literal(\"Handshake\"),\n\tappId: AppId,\n\tdeploymentId: DeploymentId,\n\tgeneration: DeploymentGeneration\n});\nconst Snapshot = Schema.Struct({\n\ttype: Schema.Literal(\"Snapshot\"),\n\tid: SubscriptionId,\n\tresult: WireResult,\n\trevision: AppStateRevision\n});\nconst SyncResultSuccess = Schema.Struct({\n\ttype: Schema.Literal(\"Result\"),\n\tid: InvocationId,\n\tresult: WireSuccess,\n\tcommittedRevision: AppStateRevision\n});\nconst SyncResultFailure = Schema.Struct({\n\ttype: Schema.Literal(\"Result\"),\n\tid: InvocationId,\n\tresult: WireFailure\n});\nconst ProtocolErrorCode = Schema.Literals([\n\t\"DuplicateOperationId\",\n\t\"FunctionUnavailable\",\n\t\"InvalidArguments\",\n\t\"InvalidMessage\",\n\t\"InvocationIdConflict\",\n\t\"ResourceLimitExceeded\",\n\t\"UnknownFunction\",\n\t\"WrongFunctionKind\"\n]);\nconst ProtocolError = Schema.Struct({\n\ttype: Schema.Literal(\"ProtocolError\"),\n\toperation: Schema.optional(Operation),\n\tcode: ProtocolErrorCode,\n\tmessage: Schema.String\n});\nconst DeploymentChanged = Schema.Struct({\n\ttype: Schema.Literal(\"DeploymentChanged\"),\n\tdeploymentId: DeploymentId,\n\tgeneration: DeploymentGeneration\n});\nconst DeploymentChangedCloseCode = 4409;\nconst ServerMessage = Schema.Union([\n\tSyncHandshake,\n\tSnapshot,\n\tSyncResultSuccess,\n\tSyncResultFailure,\n\tProtocolError,\n\tDeploymentChanged\n]);\nconst ClientMessageJson = Schema.fromJsonString(ClientMessage);\nconst ServerMessageJson = Schema.fromJsonString(ServerMessage);\n//#endregion\nexport { ClientMessage, ClientMessageJson, DatePath, DeploymentChanged, DeploymentChangedCloseCode, FunctionAddress, FunctionNamePart, InvocationId, Operation, ProtocolErrorCode, ServerMessage, ServerMessageJson, SubscriptionId, SyncHandshake, TransportValueSchema, WireFailure, WireResult, WireSuccess, apiFunctionParts, datePathsOf, datePathsOfObject, decodeTransportObject, decodeTransportValue, encodeTransportObject, encodeTransportValue };\n\n//# sourceMappingURL=sync.js.map","import { Predicate } from \"effect\";\nimport type { Effect } from \"effect\";\n\nimport type { ErrorValue, InternalServerError } from \"@ignotum/contracts/runtime/result\";\nimport { FunctionAddress } from \"@ignotum/contracts/runtime/sync\";\n\nconst FunctionReferenceTypeId: unique symbol = Symbol.for(\"ignotum/internal/api/FunctionReference\");\ndeclare const FunctionReferenceTypesTypeId: unique symbol;\n\ntype FunctionKind = \"Mutation\" | \"Query\";\n\nexport interface FunctionReference<\n Kind extends FunctionKind,\n Args,\n Success,\n Failure extends ErrorValue,\n> {\n readonly [FunctionReferenceTypeId]: FunctionAddress;\n readonly [FunctionReferenceTypesTypeId]?: {\n readonly kind: Kind;\n readonly args: Args;\n readonly value: Success;\n readonly error: Failure;\n };\n}\n\ntype ReferenceTypes<Reference> = Reference extends {\n readonly [FunctionReferenceTypesTypeId]?: infer Types;\n}\n ? Exclude<Types, undefined>\n : never;\n\nexport declare namespace FunctionReference {\n type Args<Reference> =\n ReferenceTypes<Reference> extends { readonly args: infer Args } ? Args : never;\n type Failure<Reference> =\n ReferenceTypes<Reference> extends {\n readonly error: infer Failure;\n }\n ? Failure\n : never;\n type Kind<Reference> =\n ReferenceTypes<Reference> extends { readonly kind: infer Kind } ? Kind : never;\n type Success<Reference> =\n ReferenceTypes<Reference> extends {\n readonly value: infer Success;\n }\n ? Success\n : never;\n}\n\ntype ReferenceOf<Definition> = Definition extends {\n readonly _tag: infer Kind extends FunctionKind;\n readonly handler: (\n ...arguments_: infer HandlerArguments\n ) => Generator<infer Yielded, infer Success, never>;\n}\n ? HandlerArguments extends readonly [infer _Context, ...infer Rest]\n ? FunctionReference<\n Kind,\n Rest extends readonly [infer Args, ...ReadonlyArray<unknown>] ? Args : void,\n Success,\n | (Yielded extends Effect.Effect<unknown, infer Failure extends ErrorValue, never>\n ? Failure\n : never)\n | InternalServerError\n >\n : never\n : never;\n\ntype ApiModule<Module> = {\n readonly [FunctionName in keyof Module as FunctionName extends string\n ? ReferenceOf<Module[FunctionName]> extends never\n ? never\n : FunctionName\n : never]: ReferenceOf<Module[FunctionName]>;\n};\n\nexport type Api<Modules> = {\n readonly [ModuleName in keyof Modules]: ApiModule<Modules[ModuleName]>;\n};\n\nexport const functionPathOf = <\n Kind extends FunctionKind,\n Args,\n Success,\n Failure extends ErrorValue,\n>(\n reference: FunctionReference<Kind, Args, Success, Failure>,\n) => reference[FunctionReferenceTypeId];\n\nconst makeModuleReference = (moduleName: string) => {\n const references = new Map<string, object>();\n\n return new Proxy(\n {},\n {\n get: (_target, functionName) => {\n if (!Predicate.isString(functionName)) {\n return undefined;\n }\n\n const existing = references.get(functionName);\n if (existing !== undefined) {\n return existing;\n }\n\n const reference = {\n [FunctionReferenceTypeId]: FunctionAddress.make(`api.${moduleName}.${functionName}`),\n };\n references.set(functionName, reference);\n return reference;\n },\n },\n );\n};\n\nexport function createApi<Modules>(): Api<Modules>;\nexport function createApi() {\n const modules = new Map<string, object>();\n\n return new Proxy(\n {},\n {\n get: (_target, moduleName) => {\n if (!Predicate.isString(moduleName)) {\n return undefined;\n }\n\n const existing = modules.get(moduleName);\n if (existing !== undefined) {\n return existing;\n }\n\n const moduleReference = makeModuleReference(moduleName);\n modules.set(moduleName, moduleReference);\n return moduleReference;\n },\n },\n );\n}\n"],"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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AAW,IAAI,YAAY;EAC5C,IAAI,aAAa,KAAA,GACf,OAAO;EAGT,MAAM,YAAY,GACf,0BAA0B,gBAAgB,KAAK,OAAO,WAAW,GAAG,cAAc,EACrF;EACA,WAAW,IAAI,cAAc,SAAS;EACtC,OAAO;CACT,EACF,CACF;AACF;AAGA,SAAgB,YAAY;CAC1B,MAAM,0BAAU,IAAI,IAAoB;CAExC,OAAO,IAAI,MACT,CAAC,GACD,EACE,MAAM,SAAS,eAAe;EAC5B,IAAI,CAAC,UAAU,SAAS,UAAU,GAChC;EAGF,MAAM,WAAW,QAAQ,IAAI,UAAU;EACvC,IAAI,aAAa,KAAA,GACf,OAAO;EAGT,MAAM,kBAAkB,oBAAoB,UAAU;EACtD,QAAQ,IAAI,YAAY,eAAe;EACvC,OAAO;CACT,EACF,CACF;AACF"}
|
package/dist/runtime/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Match, c as SettledResult, i as InternalServerError, o as QueryResult$1, r as ErrorValue } from "./result-
|
|
2
|
-
import { n as FunctionReference } from "./api-
|
|
1
|
+
import { a as Match, c as SettledResult, i as InternalServerError, o as QueryResult$1, r as ErrorValue } from "./result-BgcHn25t.js";
|
|
2
|
+
import { n as FunctionReference } from "./api-D2bsAz4T.js";
|
|
3
3
|
import { Dispatch, Reducer, StateUpdater, useCallback, useContext, useDebugValue, useEffect, useErrorBoundary, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState } from "preact/hooks";
|
|
4
|
-
import { AnyComponent, Attributes, ClassAttributes, Component, ComponentChild, ComponentChildren, ComponentClass, ComponentConstructor, ComponentFactory, ComponentProps, ComponentType, Consumer, Context, ContextType, ErrorInfo, Fragment, FunctionComponent, FunctionalComponent, JSX, 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";
|
|
4
|
+
import { AnyComponent, Attributes, ClassAttributes, Component, ComponentChild, ComponentChildren, ComponentClass, ComponentConstructor, ComponentFactory, ComponentProps, ComponentType, ComponentType as ComponentType$1, Consumer, Context, ContextType, ErrorInfo, Fragment, FunctionComponent, FunctionalComponent, JSX, 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";
|
|
5
5
|
//#region src/client/query.d.ts
|
|
6
6
|
declare const QuerySkipTypeId: unique symbol;
|
|
7
7
|
interface QuerySkip {
|
|
@@ -18,6 +18,13 @@ declare function useQuery<Args extends object, Success, Failure extends ErrorVal
|
|
|
18
18
|
type Mutation<Args, Success, Failure extends ErrorValue> = [Args] extends [void] ? () => Promise<SettledResult<Success, Failure>> : (args: Args) => Promise<SettledResult<Success, Failure>>;
|
|
19
19
|
declare const useMutation: <Args extends object | void, Success, Failure extends ErrorValue>(reference: FunctionReference<"Mutation", Args, Success, Failure>) => Mutation<Args, Success, Failure>;
|
|
20
20
|
//#endregion
|
|
21
|
+
//#region src/client/app.d.ts
|
|
22
|
+
interface AppDefinition<Component extends ComponentType$1<{}> = ComponentType$1<{}>> {
|
|
23
|
+
readonly component: Component;
|
|
24
|
+
readonly title: string;
|
|
25
|
+
}
|
|
26
|
+
declare const app: <Component extends ComponentType$1<{}>>(definition: AppDefinition<Component>) => AppDefinition<Component>;
|
|
27
|
+
//#endregion
|
|
21
28
|
//#region src/client/index.d.ts
|
|
22
29
|
declare const Result: {
|
|
23
30
|
match: Match;
|
|
@@ -25,5 +32,5 @@ declare const Result: {
|
|
|
25
32
|
type Result<Value, Error extends ErrorValue> = SettledResult<Value, Error>;
|
|
26
33
|
type QueryResult<Value, Error extends ErrorValue> = QueryResult$1<Value, Error>;
|
|
27
34
|
//#endregion
|
|
28
|
-
export { type AnyComponent, type Attributes, type ClassAttributes, Component, type ComponentChild, type ComponentChildren, type ComponentClass, type ComponentConstructor, type ComponentFactory, type ComponentProps, type ComponentType, type Consumer, type Context, type ContextType, type Dispatch, type ErrorInfo, Fragment, type FunctionComponent, type FunctionalComponent, type InternalServerError, type JSX, type Key, type PreactConsumer, type PreactContext, type PreactDOMAttributes, type PreactProvider, type Provider, Query, QueryResult, type QuerySkip, type Reducer, type Ref, type RefCallback, type RefObject, type RenderableProps, Result, type StateUpdater, type TargetedAnimationEvent, type TargetedClipboardEvent, type TargetedCommandEvent, type TargetedCompositionEvent, type TargetedDragEvent, type TargetedEvent, type TargetedFocusEvent, type TargetedInputEvent, type TargetedKeyboardEvent, type TargetedMouseEvent, type TargetedPictureInPictureEvent, type TargetedPointerEvent, type TargetedSnapEvent, type TargetedSubmitEvent, type TargetedToggleEvent, type TargetedTouchEvent, type TargetedTransitionEvent, type TargetedUIEvent, type TargetedWheelEvent, type VNode, cloneElement, createContext, createElement, createRef, h, isValidElement, toChildArray, useCallback, useContext, useDebugValue, useEffect, useErrorBoundary, useId, useImperativeHandle, useLayoutEffect, useMemo, useMutation, useQuery, useReducer, useRef, useState };
|
|
35
|
+
export { type AnyComponent, type AppDefinition, type Attributes, type ClassAttributes, Component, type ComponentChild, type ComponentChildren, type ComponentClass, type ComponentConstructor, type ComponentFactory, type ComponentProps, type ComponentType, type Consumer, type Context, type ContextType, type Dispatch, type ErrorInfo, Fragment, type FunctionComponent, type FunctionalComponent, type InternalServerError, type JSX, type Key, type PreactConsumer, type PreactContext, type PreactDOMAttributes, type PreactProvider, type Provider, Query, QueryResult, type QuerySkip, type Reducer, type Ref, type RefCallback, type RefObject, type RenderableProps, Result, type StateUpdater, type TargetedAnimationEvent, type TargetedClipboardEvent, type TargetedCommandEvent, type TargetedCompositionEvent, type TargetedDragEvent, type TargetedEvent, type TargetedFocusEvent, type TargetedInputEvent, type TargetedKeyboardEvent, type TargetedMouseEvent, type TargetedPictureInPictureEvent, type TargetedPointerEvent, type TargetedSnapEvent, type TargetedSubmitEvent, type TargetedToggleEvent, type TargetedTouchEvent, type TargetedTransitionEvent, type TargetedUIEvent, type TargetedWheelEvent, type VNode, app, cloneElement, createContext, createElement, createRef, h, isValidElement, toChildArray, useCallback, useContext, useDebugValue, useEffect, useErrorBoundary, useId, useImperativeHandle, useLayoutEffect, useMemo, useMutation, useQuery, useReducer, useRef, useState };
|
|
29
36
|
//# sourceMappingURL=client.d.ts.map
|