apps 0.0.1-beta.0 → 0.0.1-beta.1
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 +97 -4
- package/framework-reference.json +1 -1
- package/js/{chunk-BPEFS4YF.js → chunk-2HHMABB6.js} +70 -14
- package/js/{chunk-SBKHUC5L.js → chunk-4LPG6RCH.js} +2 -2
- package/js/{chunk-LOKGDT6B.js → chunk-6IIO4NPI.js} +5 -4
- package/js/chunk-6YBRWRK3.js +160 -0
- package/js/{chunk-7JXHF5IF.js → chunk-BMOIAIVR.js} +1 -1
- package/js/chunk-CZ7CSFO4.js +39 -0
- package/js/{chunk-YDR4CPJA.js → chunk-EVJUVWN2.js} +8 -8
- package/js/{chunk-2OTCEKL2.js → chunk-FW5HBOIK.js} +2352 -1493
- package/js/{chunk-EP6AEUZO.js → chunk-FZJOYIZO.js} +1 -1
- package/js/{chunk-WIDTG42X.js → chunk-G7IE6BKC.js} +79 -26
- package/js/{chunk-VFUZI3NY.js → chunk-HDJH3RPR.js} +4 -4
- package/js/{chunk-HP7E42X6.js → chunk-IHQ4ML7K.js} +693 -219
- package/js/{chunk-Q2FD5IBM.js → chunk-KOXMLKTM.js} +430 -41
- package/js/{chunk-D6BKYP2L.js → chunk-M6ZRRIBI.js} +4 -4
- package/js/chunk-NCYXZN2G.js +6274 -0
- package/js/{chunk-3ANFZFCV.js → chunk-OHRT55C4.js} +15 -15
- package/js/{chunk-R6JMJSVT.js → chunk-PLCMJREA.js} +2 -2
- package/js/{chunk-C24KEZXR.js → chunk-PZ36XMXW.js} +36 -2
- package/js/{chunk-W7Q5EOTS.js → chunk-QKHR7BMF.js} +32 -32
- package/js/{chunk-X3YBZCJW.js → chunk-RBAC33PQ.js} +59 -38
- package/js/{chunk-36DNRFZQ.js → chunk-SATWJKN6.js} +1 -1
- package/js/chunk-SWPD52J7.js +35 -0
- package/js/{chunk-BKVL7XAJ.js → chunk-TE4KO4HI.js} +1 -1
- package/js/chunk-W7D7WVSY.js +18 -0
- package/js/{chunk-KWTCHVLT.js → chunk-X7SFGU4Q.js} +47 -51
- package/js/chunk-YEJOQEII.js +104 -0
- package/js/{chunk-OWD2YICM.js → chunk-ZCAMUXSG.js} +116 -87
- package/js/chunk-ZJWDMTE3.js +63 -0
- package/js/chunk-ZTFQHGEB.js +80 -0
- package/js/client.js +11 -11
- package/js/contracts.js +81 -25
- package/js/effect.js +20 -15
- package/js/graphql.js +223 -121
- package/js/host.js +75 -19
- package/js/index.js +191 -51
- package/js/mcp/effect.js +24 -17
- package/js/mcp/stdio.js +22 -17
- package/js/mcp.js +109 -24
- package/js/openapi.js +43897 -143
- package/js/operations/approval.js +1 -1
- package/js/react.js +4 -4
- package/js/skills/effect.js +12 -0
- package/js/skills.js +857 -0
- package/js/storage/facet.js +7 -7
- package/js/ui/auth/contracts.js +6 -6
- package/js/ui/auth.js +8 -8
- package/js/ui/contracts.js +5 -5
- package/js/ui/serving.js +12 -12
- package/package.json +9 -1
- package/runtime.json +1 -1
- package/types/app-cache/src/contracts/cache.d.ts +79 -0
- package/types/app-cache/src/index.d.ts +35 -0
- package/types/apps/src/contracts/api-response-error.d.ts +43 -0
- package/types/apps/src/contracts/app.d.ts +11 -0
- package/types/apps/src/contracts/cache.d.ts +41 -0
- package/types/apps/src/contracts/dynamic-skills.d.ts +10 -0
- package/types/apps/src/contracts/dynamic-tools.d.ts +13 -0
- package/types/apps/src/contracts/graphql.d.ts +18 -1
- package/types/apps/src/contracts/host.d.ts +200 -7
- package/types/apps/src/contracts/mcp.d.ts +3 -1
- package/types/apps/src/contracts/openapi-compile.d.ts +11 -0
- package/types/apps/src/contracts/openapi-document.d.ts +53 -0
- package/types/apps/src/contracts/openapi.d.ts +150 -30
- package/types/apps/src/contracts/provider-error.d.ts +15 -0
- package/types/apps/src/contracts/provider.d.ts +18 -1
- package/types/apps/src/contracts/skills.d.ts +113 -0
- package/types/apps/src/contracts/swagger-client.d.ts +29 -0
- package/types/apps/src/graphql.d.ts +6 -6
- package/types/apps/src/host.d.ts +1 -0
- package/types/apps/src/implementation/account-operations.d.ts +122 -3
- package/types/apps/src/implementation/app.d.ts +1 -1
- package/types/apps/src/implementation/cache-session.d.ts +7 -0
- package/types/apps/src/implementation/cache.d.ts +6 -0
- package/types/apps/src/implementation/catalog-cache.d.ts +29 -0
- package/types/apps/src/implementation/dynamic-skills.d.ts +7 -0
- package/types/apps/src/implementation/dynamic-tools.d.ts +8 -0
- package/types/apps/src/implementation/elicitation.d.ts +12 -12
- package/types/apps/src/implementation/git.d.ts +25 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +10 -0
- package/types/apps/src/implementation/graphql.d.ts +81 -3
- package/types/apps/src/implementation/inflate.d.ts +16 -0
- package/types/apps/src/implementation/input-problems.d.ts +3 -0
- package/types/apps/src/implementation/mcp-call.d.ts +3 -2
- package/types/apps/src/implementation/mcp-catalog.d.ts +12 -0
- package/types/apps/src/implementation/mcp-client.d.ts +9 -8
- package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
- package/types/apps/src/implementation/mcp-tools.d.ts +6 -3
- package/types/apps/src/implementation/mcp.d.ts +39 -2
- package/types/apps/src/implementation/openapi-compile.d.ts +119 -0
- package/types/apps/src/implementation/openapi-document.d.ts +53 -0
- package/types/apps/src/implementation/openapi-request.d.ts +11 -4
- package/types/apps/src/implementation/openapi-source.d.ts +36 -0
- package/types/apps/src/implementation/openapi.d.ts +39 -3
- package/types/apps/src/implementation/provider-error.d.ts +10 -0
- package/types/apps/src/implementation/schema.d.ts +11 -5
- package/types/apps/src/implementation/skill-files.d.ts +10 -0
- package/types/apps/src/implementation/skills.d.ts +43 -0
- package/types/apps/src/index.d.ts +7 -0
- package/types/apps/src/mcp.d.ts +5 -5
- package/types/apps/src/openapi.d.ts +3 -1
- package/types/apps/src/skills.d.ts +72 -0
- package/types/telemetry/src/config.d.ts +2 -0
- package/js/chunk-22WRQZT7.js +0 -389
- package/js/chunk-MLKGABMK.js +0 -9
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
text,
|
|
20
20
|
uint8Array,
|
|
21
21
|
urlParams
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QKHR7BMF.js";
|
|
23
23
|
import {
|
|
24
24
|
JsonValue
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SATWJKN6.js";
|
|
26
26
|
import {
|
|
27
27
|
Cause,
|
|
28
28
|
Defect,
|
|
@@ -118,12 +118,12 @@ import {
|
|
|
118
118
|
transformEffect,
|
|
119
119
|
transformPull,
|
|
120
120
|
void_2 as void_
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-FW5HBOIK.js";
|
|
122
122
|
import {
|
|
123
123
|
__export
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-CZ7CSFO4.js";
|
|
125
125
|
|
|
126
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
126
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApi.js
|
|
127
127
|
var HttpApi_exports = {};
|
|
128
128
|
__export(HttpApi_exports, {
|
|
129
129
|
AdditionalSchemas: () => AdditionalSchemas,
|
|
@@ -133,7 +133,7 @@ __export(HttpApi_exports, {
|
|
|
133
133
|
reflect: () => reflect
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
136
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiEndpoint.js
|
|
137
137
|
var HttpApiEndpoint_exports = {};
|
|
138
138
|
__export(HttpApiEndpoint_exports, {
|
|
139
139
|
delete: () => del,
|
|
@@ -151,7 +151,7 @@ __export(HttpApiEndpoint_exports, {
|
|
|
151
151
|
query: () => query
|
|
152
152
|
});
|
|
153
153
|
|
|
154
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
154
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiSchema.js
|
|
155
155
|
var HttpApiSchema_exports = {};
|
|
156
156
|
__export(HttpApiSchema_exports, {
|
|
157
157
|
Accepted: () => Accepted,
|
|
@@ -192,7 +192,7 @@ __export(HttpApiSchema_exports, {
|
|
|
192
192
|
withHeaders: () => withHeaders
|
|
193
193
|
});
|
|
194
194
|
|
|
195
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
195
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/encoding/Sse.js
|
|
196
196
|
var SseErrorTypeId = "~effect/encoding/Sse/SseError";
|
|
197
197
|
var EventTooLarge = class extends (/* @__PURE__ */ TaggedError("EventTooLarge")) {
|
|
198
198
|
get message() {
|
|
@@ -425,7 +425,7 @@ var Retry = class _Retry extends (/* @__PURE__ */ TaggedClass("Retry")) {
|
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
|
|
428
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
428
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiSchema.js
|
|
429
429
|
var StreamSchemaTypeId = "~effect/httpapi/HttpApiSchema/Stream";
|
|
430
430
|
function status(code) {
|
|
431
431
|
const statusCode = typeof code === "string" ? fromLiteral(code) : code;
|
|
@@ -655,14 +655,14 @@ function getStatusErrorSchema(schema) {
|
|
|
655
655
|
return getStatusError(schema.ast);
|
|
656
656
|
}
|
|
657
657
|
|
|
658
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
658
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/internal/mediaType.js
|
|
659
659
|
function normalize(contentType) {
|
|
660
660
|
const normalized = contentType.toLowerCase().trim();
|
|
661
661
|
const index = normalized.indexOf(";");
|
|
662
662
|
return index === -1 ? normalized : normalized.slice(0, index).trim();
|
|
663
663
|
}
|
|
664
664
|
|
|
665
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
665
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiEndpoint.js
|
|
666
666
|
var TypeId = "~effect/httpapi/HttpApiEndpoint";
|
|
667
667
|
var isHttpApiEndpoint = (u) => hasProperty(u, TypeId);
|
|
668
668
|
function getPayloadSchemas(endpoint2) {
|
|
@@ -989,7 +989,7 @@ var del = /* @__PURE__ */ make3("DELETE");
|
|
|
989
989
|
var head = /* @__PURE__ */ make3("HEAD");
|
|
990
990
|
var options = /* @__PURE__ */ make3("OPTIONS");
|
|
991
991
|
|
|
992
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
992
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApi.js
|
|
993
993
|
var TypeId2 = "~effect/httpapi/HttpApi";
|
|
994
994
|
var isHttpApi = (u) => hasProperty(u, TypeId2);
|
|
995
995
|
var Proto2 = {
|
|
@@ -1109,7 +1109,7 @@ var AdditionalSchemas = class extends (/* @__PURE__ */ Service()("effect/httpapi
|
|
|
1109
1109
|
var ParseOptions = class extends (/* @__PURE__ */ Service()("effect/httpapi/HttpApi/ParseOptions")) {
|
|
1110
1110
|
};
|
|
1111
1111
|
|
|
1112
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1112
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/internal/path.js
|
|
1113
1113
|
var emptyParamNames = /* @__PURE__ */ new Set();
|
|
1114
1114
|
function getParamNames(schema) {
|
|
1115
1115
|
if (schema === void 0) return emptyParamNames;
|
|
@@ -1117,7 +1117,7 @@ function getParamNames(schema) {
|
|
|
1117
1117
|
return isObjects(ast) && ast.indexSignatures.length === 0 ? new Set(ast.propertySignatures.map((ps) => String(ps.name))) : void 0;
|
|
1118
1118
|
}
|
|
1119
1119
|
|
|
1120
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1120
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiClient.js
|
|
1121
1121
|
var HttpApiClient_exports = {};
|
|
1122
1122
|
__export(HttpApiClient_exports, {
|
|
1123
1123
|
endpoint: () => endpoint,
|
|
@@ -1632,7 +1632,7 @@ function getEncodePayloadSchemaFromBody(schema, method) {
|
|
|
1632
1632
|
return out;
|
|
1633
1633
|
}
|
|
1634
1634
|
|
|
1635
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1635
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/httpapi/HttpApiGroup.js
|
|
1636
1636
|
var HttpApiGroup_exports = {};
|
|
1637
1637
|
__export(HttpApiGroup_exports, {
|
|
1638
1638
|
isHttpApiGroup: () => isHttpApiGroup,
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
RowMetadata,
|
|
10
10
|
defaultDatabaseLimits,
|
|
11
11
|
defaultDatabaseRuntimeLimits
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BMOIAIVR.js";
|
|
13
13
|
import {
|
|
14
14
|
Clock_exports,
|
|
15
15
|
Effect_exports,
|
|
16
16
|
Encoding_exports,
|
|
17
17
|
Schema_exports,
|
|
18
18
|
Semaphore_exports
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FW5HBOIK.js";
|
|
20
20
|
|
|
21
21
|
// ../app-data/src/implementation/schema.ts
|
|
22
22
|
var metadata = /* @__PURE__ */ new Set(["id", "createdAt", "updatedAt"]);
|
|
@@ -1,9 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decoderOf
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2HHMABB6.js";
|
|
4
4
|
import {
|
|
5
5
|
Effect_exports
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FW5HBOIK.js";
|
|
7
|
+
|
|
8
|
+
// src/implementation/authoring.ts
|
|
9
|
+
var NativeCallback = /* @__PURE__ */ Symbol("apps.NativeCallback");
|
|
10
|
+
var fromPromise = (callback) => (...args) => {
|
|
11
|
+
if (NativeCallback in callback) {
|
|
12
|
+
const native = callback[NativeCallback];
|
|
13
|
+
return native(...args);
|
|
14
|
+
}
|
|
15
|
+
return Effect_exports.tryPromise({ try: () => callback(...args), catch: (error) => error });
|
|
16
|
+
};
|
|
17
|
+
var toPromise = (operation, signal) => {
|
|
18
|
+
const native = (...args) => Effect_exports.suspend(() => {
|
|
19
|
+
if (signal === void 0) return operation(...args);
|
|
20
|
+
if (signal.aborted) return Effect_exports.interrupt;
|
|
21
|
+
const cancelled = Effect_exports.callback((resume) => {
|
|
22
|
+
if (signal.aborted) {
|
|
23
|
+
resume(Effect_exports.interrupt);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const abort = () => resume(Effect_exports.interrupt);
|
|
27
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
28
|
+
return Effect_exports.sync(() => signal.removeEventListener("abort", abort));
|
|
29
|
+
});
|
|
30
|
+
return Effect_exports.raceFirst(
|
|
31
|
+
cancelled,
|
|
32
|
+
Effect_exports.suspend(() => operation(...args))
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
return Object.assign((...args) => Effect_exports.runPromise(native(...args)), {
|
|
36
|
+
[NativeCallback]: native
|
|
37
|
+
});
|
|
38
|
+
};
|
|
7
39
|
|
|
8
40
|
// src/implementation/operations.ts
|
|
9
41
|
var NativeOperation = /* @__PURE__ */ Symbol("apps.Operation");
|
|
@@ -51,6 +83,8 @@ var query = (options, run) => make("query", options, run);
|
|
|
51
83
|
var mutation = (options, run) => make("mutation", options, run);
|
|
52
84
|
|
|
53
85
|
export {
|
|
86
|
+
fromPromise,
|
|
87
|
+
toPromise,
|
|
54
88
|
operationDeclaration,
|
|
55
89
|
nativeOperation,
|
|
56
90
|
withApproval,
|
|
@@ -211,12 +211,12 @@ import {
|
|
|
211
211
|
withFiber,
|
|
212
212
|
withParentSpan,
|
|
213
213
|
zero2 as zero
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-FW5HBOIK.js";
|
|
215
215
|
import {
|
|
216
216
|
__export
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-CZ7CSFO4.js";
|
|
218
218
|
|
|
219
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
219
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpClientRequest.js
|
|
220
220
|
var HttpClientRequest_exports = {};
|
|
221
221
|
__export(HttpClientRequest_exports, {
|
|
222
222
|
accept: () => accept,
|
|
@@ -269,7 +269,7 @@ __export(HttpClientRequest_exports, {
|
|
|
269
269
|
updateUrl: () => updateUrl
|
|
270
270
|
});
|
|
271
271
|
|
|
272
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
272
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpBody.js
|
|
273
273
|
var HttpBody_exports = {};
|
|
274
274
|
__export(HttpBody_exports, {
|
|
275
275
|
Empty: () => Empty,
|
|
@@ -500,11 +500,11 @@ var fileContentLength = /* @__PURE__ */ fnUntraced(function* (size, method, opti
|
|
|
500
500
|
var file = (path, options3) => flatMap(FileSystem, (fs) => flatMap(fs.stat(path), (info) => map(fileContentLength(info.size, "file", options3), (contentLength) => stream(fs.stream(path, options3), options3?.contentType, contentLength))));
|
|
501
501
|
var fileFromInfo = (path, info, options3) => flatMap(FileSystem, (fs) => map(fileContentLength(info.size, "fileFromInfo", options3), (contentLength) => stream(fs.stream(path, options3), options3?.contentType, contentLength)));
|
|
502
502
|
|
|
503
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
503
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpMethod.js
|
|
504
504
|
var hasBody = (method) => method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE";
|
|
505
505
|
var allShort = [["GET", "get"], ["POST", "post"], ["PUT", "put"], ["DELETE", "del"], ["PATCH", "patch"], ["HEAD", "head"], ["OPTIONS", "options"], ["TRACE", "trace"], ["QUERY", "query"]];
|
|
506
506
|
|
|
507
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
507
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/internal/httpBody.js
|
|
508
508
|
var updateHeaders = (headers, body) => {
|
|
509
509
|
if (body._tag === "Empty" || body._tag === "FormData") {
|
|
510
510
|
return remove2(remove2(headers, "content-type"), "content-length");
|
|
@@ -520,7 +520,7 @@ var parseContentLength = (contentLength) => {
|
|
|
520
520
|
return Number.isSafeInteger(parsed) ? parsed : void 0;
|
|
521
521
|
};
|
|
522
522
|
|
|
523
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
523
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/Url.js
|
|
524
524
|
var UrlError = class extends (/* @__PURE__ */ TaggedError("UrlError")) {
|
|
525
525
|
};
|
|
526
526
|
var make = (url, params, hash) => try_({
|
|
@@ -548,7 +548,7 @@ var baseUrl = () => {
|
|
|
548
548
|
return void 0;
|
|
549
549
|
};
|
|
550
550
|
|
|
551
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
551
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpClientRequest.js
|
|
552
552
|
var TypeId2 = "~effect/http/HttpClientRequest";
|
|
553
553
|
var isHttpClientRequest = (u) => hasProperty(u, TypeId2);
|
|
554
554
|
var Proto2 = {
|
|
@@ -758,7 +758,7 @@ var toWeb = (self, options3) => contextWith((context2) => fromResult(toWebResult
|
|
|
758
758
|
signal: options3?.signal
|
|
759
759
|
})));
|
|
760
760
|
|
|
761
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
761
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpClient.js
|
|
762
762
|
var HttpClient_exports = {};
|
|
763
763
|
__export(HttpClient_exports, {
|
|
764
764
|
HttpClient: () => HttpClient,
|
|
@@ -803,7 +803,7 @@ __export(HttpClient_exports, {
|
|
|
803
803
|
withScope: () => withScope
|
|
804
804
|
});
|
|
805
805
|
|
|
806
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
806
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpClientError.js
|
|
807
807
|
var HttpClientError_exports = {};
|
|
808
808
|
__export(HttpClientError_exports, {
|
|
809
809
|
DecodeError: () => DecodeError,
|
|
@@ -987,7 +987,7 @@ var HttpClientErrorSchema = class _HttpClientErrorSchema extends (/* @__PURE__ *
|
|
|
987
987
|
}
|
|
988
988
|
};
|
|
989
989
|
|
|
990
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
990
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpIncomingMessage.js
|
|
991
991
|
var TypeId4 = "~effect/http/HttpIncomingMessage";
|
|
992
992
|
var schemaBodyJson2 = (schema, options3) => {
|
|
993
993
|
const decode = decodeEffect(toCodecJson(schema));
|
|
@@ -1026,7 +1026,7 @@ var inspect = (self, that) => {
|
|
|
1026
1026
|
return obj;
|
|
1027
1027
|
};
|
|
1028
1028
|
|
|
1029
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1029
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpClientResponse.js
|
|
1030
1030
|
var TypeId5 = "~effect/http/HttpClientResponse";
|
|
1031
1031
|
var fromWeb2 = (request, source) => new WebHttpClientResponse(request, source);
|
|
1032
1032
|
var filterStatus = /* @__PURE__ */ dual(2, (self, f) => suspend(() => f(self.status) ? succeed2(self) : fail3(new HttpClientError({
|
|
@@ -1166,7 +1166,7 @@ var WebHttpClientResponse = class extends Class {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
};
|
|
1168
1168
|
|
|
1169
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1169
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpTraceContext.js
|
|
1170
1170
|
var HttpTraceContext_exports = {};
|
|
1171
1171
|
__export(HttpTraceContext_exports, {
|
|
1172
1172
|
b3: () => b3,
|
|
@@ -1245,7 +1245,7 @@ var w3c = (headers) => {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
};
|
|
1247
1247
|
|
|
1248
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1248
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpClient.js
|
|
1249
1249
|
var TypeId6 = "~effect/http/HttpClient";
|
|
1250
1250
|
var isHttpClient = (u) => hasProperty(u, TypeId6);
|
|
1251
1251
|
var HttpClient = /* @__PURE__ */ Service("effect/HttpClient");
|
|
@@ -1745,7 +1745,7 @@ var isTransientHttpError = (error) => isHttpClientError(error) && (error.reason.
|
|
|
1745
1745
|
var isTooManyRequestsHttpClientError = (error) => isHttpClientError(error) && error.reason._tag === "StatusCodeError" && error.reason.response.status === 429;
|
|
1746
1746
|
var isTransientResponse = (response) => response.status === 408 || response.status === 429 || response.status === 500 || response.status === 502 || response.status === 503 || response.status === 504;
|
|
1747
1747
|
|
|
1748
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1748
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/Template.js
|
|
1749
1749
|
function make4(strings, ...args) {
|
|
1750
1750
|
const argsLength = args.length;
|
|
1751
1751
|
const values = new Array(argsLength);
|
|
@@ -1839,7 +1839,7 @@ function isSuccess2(u) {
|
|
|
1839
1839
|
return isExit(u) && u._tag === "Success";
|
|
1840
1840
|
}
|
|
1841
1841
|
|
|
1842
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1842
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpServerResponse.js
|
|
1843
1843
|
var HttpServerResponse_exports = {};
|
|
1844
1844
|
__export(HttpServerResponse_exports, {
|
|
1845
1845
|
empty: () => empty9,
|
|
@@ -1881,11 +1881,11 @@ __export(HttpServerResponse_exports, {
|
|
|
1881
1881
|
urlParams: () => urlParams2
|
|
1882
1882
|
});
|
|
1883
1883
|
|
|
1884
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1884
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/internal/headers.js
|
|
1885
1885
|
var Proto4 = /* @__PURE__ */ Object.getPrototypeOf(empty4);
|
|
1886
1886
|
var emptyMutableUnsafe = () => Object.create(Proto4);
|
|
1887
1887
|
|
|
1888
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
1888
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpServerResponse.js
|
|
1889
1889
|
var TypeId7 = "~effect/http/HttpServerResponse";
|
|
1890
1890
|
var isHttpServerResponse = (u) => hasProperty(u, TypeId7);
|
|
1891
1891
|
var empty9 = (options3) => makeResponse({
|
|
@@ -2413,10 +2413,10 @@ var fromWeb3 = (response) => {
|
|
|
2413
2413
|
return self;
|
|
2414
2414
|
};
|
|
2415
2415
|
|
|
2416
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
2416
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpServerRespondable.js
|
|
2417
2417
|
var symbol = "~effect/http/HttpServerRespondable";
|
|
2418
2418
|
|
|
2419
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
2419
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpServerError.js
|
|
2420
2420
|
var TypeId8 = "~effect/http/HttpServerError";
|
|
2421
2421
|
var HttpServerError = class extends (/* @__PURE__ */ TaggedError("HttpServerError")) {
|
|
2422
2422
|
constructor(props) {
|
|
@@ -2516,7 +2516,7 @@ var formatRequestMessage = (reason, description, info) => {
|
|
|
2516
2516
|
return description ? `${prefix}: ${description}` : prefix;
|
|
2517
2517
|
};
|
|
2518
2518
|
|
|
2519
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
2519
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/MultipartParser/internal/contentType.js
|
|
2520
2520
|
var paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u{10ffff}]|\\[\v\u0020-\u{10ffff}])*"|[!#$%&'*+.^\w`|~-]+) */gu;
|
|
2521
2521
|
var quotedPairRE = /\\([\v\u0020-\u{10ffff}])/gu;
|
|
2522
2522
|
var mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
|
|
@@ -2567,7 +2567,7 @@ function parse(header, withoutSlash = false) {
|
|
|
2567
2567
|
return result;
|
|
2568
2568
|
}
|
|
2569
2569
|
|
|
2570
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
2570
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/MultipartParser/internal/headers.js
|
|
2571
2571
|
var constMaxPairs = 100;
|
|
2572
2572
|
var constMaxSize = 16 * 1024;
|
|
2573
2573
|
var State = {
|
|
@@ -2772,7 +2772,7 @@ function make5() {
|
|
|
2772
2772
|
};
|
|
2773
2773
|
}
|
|
2774
2774
|
|
|
2775
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
2775
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/MultipartParser/internal/search.js
|
|
2776
2776
|
function makeState(needle_) {
|
|
2777
2777
|
const needle = new TextEncoder().encode(needle_);
|
|
2778
2778
|
const needleLength = needle.length;
|
|
@@ -2892,7 +2892,7 @@ function make6(needle, callback2, seed, minimumChunkLength) {
|
|
|
2892
2892
|
};
|
|
2893
2893
|
}
|
|
2894
2894
|
|
|
2895
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
2895
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/MultipartParser/internal/multipart.js
|
|
2896
2896
|
var State2 = {
|
|
2897
2897
|
headers: 0,
|
|
2898
2898
|
body: 1
|
|
@@ -3136,12 +3136,12 @@ function decodeField(info, value) {
|
|
|
3136
3136
|
return getDecoder(info.contentTypeParameters.charset ?? "utf-8").decode(value);
|
|
3137
3137
|
}
|
|
3138
3138
|
|
|
3139
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3139
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/MultipartParser.js
|
|
3140
3140
|
var make8 = make7;
|
|
3141
3141
|
var defaultIsFile2 = defaultIsFile;
|
|
3142
3142
|
var decodeField2 = decodeField;
|
|
3143
3143
|
|
|
3144
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3144
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/Multipart.js
|
|
3145
3145
|
var TypeId9 = "~effect/http/Multipart";
|
|
3146
3146
|
var MultipartErrorTypeId = "~effect/http/Multipart/MultipartError";
|
|
3147
3147
|
var toMultipartError = (cause) => hasProperty(cause, MultipartErrorTypeId) ? cause : MultipartError.fromReason("InternalError", cause);
|
|
@@ -3443,7 +3443,7 @@ var FieldMimeTypes = /* @__PURE__ */ Reference("effect/http/Multipart/FieldMimeT
|
|
|
3443
3443
|
defaultValue: /* @__PURE__ */ constant(["application/json"])
|
|
3444
3444
|
});
|
|
3445
3445
|
|
|
3446
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3446
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpServerRequest.js
|
|
3447
3447
|
var HttpServerRequest_exports = {};
|
|
3448
3448
|
__export(HttpServerRequest_exports, {
|
|
3449
3449
|
HttpServerRequest: () => HttpServerRequest,
|
|
@@ -3468,7 +3468,7 @@ __export(HttpServerRequest_exports, {
|
|
|
3468
3468
|
upgradeChannel: () => upgradeChannel
|
|
3469
3469
|
});
|
|
3470
3470
|
|
|
3471
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3471
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/socket/Socket.js
|
|
3472
3472
|
var encoder2 = /* @__PURE__ */ new TextEncoder();
|
|
3473
3473
|
var readerBytes = (self) => map(self.reader, ({
|
|
3474
3474
|
pull
|
|
@@ -3639,7 +3639,7 @@ var toChannel = (self) => toChannelWithReader(self, readerBytes(self));
|
|
|
3639
3639
|
var toChannelWith = () => (self) => toChannel(self);
|
|
3640
3640
|
var defaultHighWaterMark = 64 * 1024;
|
|
3641
3641
|
|
|
3642
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
3642
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpServerRequest.js
|
|
3643
3643
|
var TypeId10 = "~effect/http/HttpServerRequest";
|
|
3644
3644
|
var HttpServerRequest = /* @__PURE__ */ Service("effect/http/HttpServerRequest");
|
|
3645
3645
|
var ParsedSearchParams = class extends (/* @__PURE__ */ Service()("effect/http/ParsedSearchParams")) {
|
|
@@ -4176,7 +4176,7 @@ var toWeb3 = (self, options3) => contextWith((context2) => fromResult(toWebResul
|
|
|
4176
4176
|
signal: options3?.signal
|
|
4177
4177
|
})));
|
|
4178
4178
|
|
|
4179
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
4179
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpMiddleware.js
|
|
4180
4180
|
var loggerDisabledRequests = /* @__PURE__ */ new WeakSet();
|
|
4181
4181
|
var withLoggerDisabled = (self) => withFiber((fiber) => {
|
|
4182
4182
|
const request = getUnsafe(fiber.context, HttpServerRequest);
|
|
@@ -4184,7 +4184,7 @@ var withLoggerDisabled = (self) => withFiber((fiber) => {
|
|
|
4184
4184
|
return self;
|
|
4185
4185
|
});
|
|
4186
4186
|
|
|
4187
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
4187
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpRouter.js
|
|
4188
4188
|
var HttpRouter = /* @__PURE__ */ Service("effect/http/HttpRouter");
|
|
4189
4189
|
var removeTrailingSlash = (path) => path.endsWith("/") ? path.slice(0, -1) : path;
|
|
4190
4190
|
var prefixPath = /* @__PURE__ */ dual(2, (self, prefix) => {
|
|
@@ -4266,7 +4266,7 @@ var getMiddleware = (context2) => {
|
|
|
4266
4266
|
};
|
|
4267
4267
|
var disableLogger = middleware(withLoggerDisabled).layer;
|
|
4268
4268
|
|
|
4269
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@
|
|
4269
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/unstable/http/HttpStatus.js
|
|
4270
4270
|
var codeByLiteral = {
|
|
4271
4271
|
Continue: 100,
|
|
4272
4272
|
SwitchingProtocols: 101,
|
|
@@ -1,60 +1,78 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseDatabaseSchema,
|
|
3
3
|
promiseTable
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PLCMJREA.js";
|
|
5
5
|
import {
|
|
6
|
+
fromPromise,
|
|
6
7
|
nativeOperation
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PZ36XMXW.js";
|
|
8
9
|
import {
|
|
9
10
|
ScheduleTiming
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IHQ4ML7K.js";
|
|
11
12
|
import {
|
|
12
13
|
decoderOf,
|
|
13
14
|
isSchema,
|
|
14
15
|
storageFieldOf
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2HHMABB6.js";
|
|
16
17
|
import {
|
|
17
18
|
AppStorageUnavailable
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FZJOYIZO.js";
|
|
19
20
|
import {
|
|
20
21
|
JsonValue
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SATWJKN6.js";
|
|
22
23
|
import {
|
|
23
24
|
Effect_exports,
|
|
24
25
|
Schema_exports
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FW5HBOIK.js";
|
|
26
27
|
|
|
27
|
-
// src/
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const native = callback[NativeCallback];
|
|
32
|
-
return native(...args);
|
|
33
|
-
}
|
|
34
|
-
return Effect_exports.tryPromise({ try: () => callback(...args), catch: (error) => error });
|
|
28
|
+
// ../app-cache/src/contracts/cache.ts
|
|
29
|
+
var CacheError = class extends Schema_exports.TaggedError()("CacheError", {
|
|
30
|
+
reason: Schema_exports.Literals(["unavailable", "storage", "invalid", "capacity", "timeout"])
|
|
31
|
+
}) {
|
|
35
32
|
};
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
signal.addEventListener("abort", abort, { once: true });
|
|
47
|
-
return Effect_exports.sync(() => signal.removeEventListener("abort", abort));
|
|
48
|
-
});
|
|
49
|
-
return Effect_exports.raceFirst(
|
|
50
|
-
cancelled,
|
|
51
|
-
Effect_exports.suspend(() => operation(...args))
|
|
52
|
-
);
|
|
53
|
-
});
|
|
54
|
-
return Object.assign((...args) => Effect_exports.runPromise(native(...args)), {
|
|
55
|
-
[NativeCallback]: native
|
|
56
|
-
});
|
|
33
|
+
var cacheLimits = {
|
|
34
|
+
keyBytes: 8192,
|
|
35
|
+
entryBytes: 2e6,
|
|
36
|
+
batchBytes: 8e6,
|
|
37
|
+
batchEntries: 128,
|
|
38
|
+
totalBytes: 128e6,
|
|
39
|
+
totalEntries: 1e5,
|
|
40
|
+
retentionMs: 7 * 24 * 60 * 60 * 1e3,
|
|
41
|
+
loadTimeoutMs: 9e4,
|
|
42
|
+
leaseMs: 12e4
|
|
57
43
|
};
|
|
44
|
+
var Key = Schema_exports.String.check(Schema_exports.isPattern(/^[a-f0-9]{64}$/));
|
|
45
|
+
var Time = Schema_exports.Finite.check(Schema_exports.isGreaterThanOrEqualTo(0));
|
|
46
|
+
var CacheEntry = Schema_exports.Struct({
|
|
47
|
+
value: Schema_exports.Json,
|
|
48
|
+
version: Schema_exports.String,
|
|
49
|
+
freshUntil: Time,
|
|
50
|
+
staleUntil: Time
|
|
51
|
+
});
|
|
52
|
+
var CacheCommand = Schema_exports.Union([
|
|
53
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("read"), keys: Schema_exports.Array(Key) }),
|
|
54
|
+
Schema_exports.Struct({
|
|
55
|
+
operation: Schema_exports.Literal("claim"),
|
|
56
|
+
key: Key,
|
|
57
|
+
version: Schema_exports.NullOr(Schema_exports.String)
|
|
58
|
+
}),
|
|
59
|
+
Schema_exports.Struct({
|
|
60
|
+
operation: Schema_exports.Literal("publish"),
|
|
61
|
+
key: Key,
|
|
62
|
+
lease: Schema_exports.String,
|
|
63
|
+
entry: CacheEntry
|
|
64
|
+
}),
|
|
65
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("release"), key: Key, lease: Schema_exports.String }),
|
|
66
|
+
Schema_exports.Struct({
|
|
67
|
+
operation: Schema_exports.Literal("write"),
|
|
68
|
+
entries: Schema_exports.Array(Schema_exports.Struct({ key: Key, entry: CacheEntry }))
|
|
69
|
+
}),
|
|
70
|
+
Schema_exports.Struct({ operation: Schema_exports.Literal("invalidate"), key: Key })
|
|
71
|
+
]);
|
|
72
|
+
var CacheReply = Schema_exports.Union([
|
|
73
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(true), value: Schema_exports.Json }),
|
|
74
|
+
Schema_exports.Struct({ ok: Schema_exports.Literal(false), error: CacheError })
|
|
75
|
+
]);
|
|
58
76
|
|
|
59
77
|
// src/implementation/workflows.ts
|
|
60
78
|
var NativeWorkflow = /* @__PURE__ */ Symbol("apps.Workflow");
|
|
@@ -233,8 +251,11 @@ var unavailableStorage = {
|
|
|
233
251
|
};
|
|
234
252
|
|
|
235
253
|
export {
|
|
236
|
-
|
|
237
|
-
|
|
254
|
+
CacheError,
|
|
255
|
+
cacheLimits,
|
|
256
|
+
CacheEntry,
|
|
257
|
+
CacheCommand,
|
|
258
|
+
CacheReply,
|
|
238
259
|
workflow,
|
|
239
260
|
isApp,
|
|
240
261
|
toEffectApp,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Schema_exports
|
|
3
|
+
} from "./chunk-FW5HBOIK.js";
|
|
4
|
+
|
|
5
|
+
// src/contracts/api-response-error.ts
|
|
6
|
+
var ApiErrorRecovery = Schema_exports.Struct({
|
|
7
|
+
action: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(1024)),
|
|
8
|
+
instructions: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(4096))
|
|
9
|
+
});
|
|
10
|
+
var ApiErrorResponse = Schema_exports.Struct({
|
|
11
|
+
code: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(128)),
|
|
12
|
+
status: Schema_exports.Int.check(Schema_exports.isBetween({ minimum: 400, maximum: 599 })),
|
|
13
|
+
message: Schema_exports.NonEmptyString.check(Schema_exports.isMaxLength(4096)),
|
|
14
|
+
recovery: Schema_exports.optionalKey(ApiErrorRecovery)
|
|
15
|
+
});
|
|
16
|
+
var OpenapiResponseError = class extends Schema_exports.TaggedError()(
|
|
17
|
+
"OpenapiResponseError",
|
|
18
|
+
ApiErrorResponse.fields
|
|
19
|
+
) {
|
|
20
|
+
};
|
|
21
|
+
var OpenapiErrorLimits = Schema_exports.Struct({
|
|
22
|
+
maxBodyBytes: Schema_exports.Int.check(Schema_exports.isGreaterThan(0)),
|
|
23
|
+
readTimeoutMs: Schema_exports.Int.check(Schema_exports.isGreaterThan(0))
|
|
24
|
+
});
|
|
25
|
+
var defaultOpenapiErrorLimits = OpenapiErrorLimits.make({
|
|
26
|
+
maxBodyBytes: 65536,
|
|
27
|
+
readTimeoutMs: 2e3
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
ApiErrorRecovery,
|
|
32
|
+
ApiErrorResponse,
|
|
33
|
+
OpenapiResponseError,
|
|
34
|
+
defaultOpenapiErrorLimits
|
|
35
|
+
};
|