apps 0.0.1-beta.37 → 0.0.1-beta.39
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/framework-reference.json +1 -1
- package/js/{chunk-GHDZEEPO.js → chunk-27TDXHRX.js} +395 -82
- package/js/{chunk-KOOJUMLR.js → chunk-3MMG2H6M.js} +2 -2
- package/js/{chunk-LQBR7AI7.js → chunk-3V575NIW.js} +217 -19
- package/js/{chunk-U74JVKTQ.js → chunk-5NIEOXRZ.js} +7 -7
- package/js/{chunk-BWUHMKHQ.js → chunk-5TJA7364.js} +2 -2
- package/js/{chunk-7KEKFBV7.js → chunk-7CSHVXVR.js} +3 -3
- package/js/{chunk-3LRFKLUX.js → chunk-BO4US6DZ.js} +9 -49
- package/js/{chunk-A4O72Z3A.js → chunk-DKUEYTYD.js} +167 -30
- package/js/{chunk-ENJCQWVF.js → chunk-E4BWL7KQ.js} +3 -3
- package/js/{chunk-CAOHGMNW.js → chunk-F3TBO2U3.js} +7 -94
- package/js/{chunk-POOIHRPF.js → chunk-GHXRRFZA.js} +11 -34
- package/js/{chunk-RSNZDT4L.js → chunk-JTMDWPCH.js} +2 -2
- package/js/{chunk-YW333DH3.js → chunk-KANDIVIH.js} +4 -4
- package/js/{chunk-2FWXCU5I.js → chunk-KAQD3DTI.js} +1 -1
- package/js/{chunk-QQKHJ72Y.js → chunk-LVWX4UWK.js} +9 -9
- package/js/{chunk-KEZ4YZSP.js → chunk-MLHNVYHT.js} +2 -2
- package/js/{chunk-IJQ5LE74.js → chunk-MXDKXAY4.js} +363 -401
- package/js/{chunk-BI6R577B.js → chunk-P7MGDPFD.js} +2 -2
- package/js/{chunk-24EIFQYZ.js → chunk-PCV73KVK.js} +35 -10
- package/js/{chunk-JU7F4PRK.js → chunk-RIXVGVA6.js} +2 -2
- package/js/{chunk-D45FU4TZ.js → chunk-SDHD6J37.js} +3 -3
- package/js/{chunk-UCOMVHGW.js → chunk-U5PFZDVB.js} +2 -2
- package/js/{chunk-PHO7HXTC.js → chunk-VIU2XXA7.js} +294 -47
- package/js/{chunk-TADLIUEU.js → chunk-VJQXXOQ3.js} +2 -2
- package/js/{chunk-NHCFIWN5.js → chunk-W2NV54JD.js} +1 -1
- package/js/{chunk-BI45HZWM.js → chunk-YQ35E7KS.js} +1 -1
- package/js/{chunk-WDBUOIWV.js → chunk-ZUKBIHMK.js} +3 -3
- package/js/client.js +13 -17
- package/js/contracts.js +16 -21
- package/js/effect.js +19 -24
- package/js/graphql.js +21 -26
- package/js/host.js +19 -24
- package/js/index.js +13 -26
- package/js/mcp/effect.js +21 -26
- package/js/mcp/stdio.js +21 -26
- package/js/mcp.js +23 -28
- package/js/openapi.js +17 -21
- package/js/react.js +2 -3
- package/js/skills/effect.js +6 -7
- package/js/skills.js +15 -17
- package/js/storage/facet.js +1 -214
- package/js/ui/auth/contracts.js +2 -2
- package/js/ui/auth.js +5 -5
- package/js/ui/contracts.js +5 -6
- package/js/ui/serving.js +10 -11
- package/package.json +1 -2
- package/runtime.json +1 -1
- package/types/apps/src/contracts/app.d.ts +0 -2
- package/types/apps/src/contracts/context.d.ts +12 -11
- package/types/apps/src/contracts/host.d.ts +10 -8
- package/types/apps/src/contracts/live.d.ts +2 -0
- package/types/apps/src/contracts/operations.d.ts +3 -3
- package/types/apps/src/contracts/protocol-version.d.ts +2 -2
- package/types/apps/src/contracts/protocols/10.d.ts +1450 -0
- package/types/apps/src/contracts/protocols/4.d.ts +3 -3
- package/types/apps/src/contracts/protocols/5.d.ts +1 -1
- package/types/apps/src/contracts/protocols/6.d.ts +1 -1
- package/types/apps/src/contracts/protocols/7.d.ts +1 -1
- package/types/apps/src/contracts/sql.d.ts +58 -0
- package/types/apps/src/facet.d.ts +4 -5
- package/types/apps/src/implementation/openapi-compile.d.ts +2 -2
- package/types/apps/src/implementation/schema.d.ts +1 -10
- package/types/apps/src/implementation/sql.d.ts +66 -0
- package/types/apps/src/index.d.ts +1 -2
- package/types/telemetry/src/transport.d.ts +8 -1
- package/js/chunk-73AV3JVU.js +0 -186
- package/js/chunk-HDAQBRT5.js +0 -1254
- package/js/chunk-IU7CCCUC.js +0 -630
- package/js/chunk-NHUHTWAF.js +0 -0
- package/js/chunk-V5DWGYRK.js +0 -268
- package/js/chunk-Y3XN4X4Q.js +0 -19
- package/types/app-data/src/implementation/cursor.d.ts +0 -10
- package/types/app-data/src/implementation/index-key.d.ts +0 -7
- package/types/app-data/src/implementation/promise.d.ts +0 -68
- package/types/app-data/src/implementation/range.d.ts +0 -8
- package/types/app-data/src/implementation/schema.d.ts +0 -18
- package/types/app-data/src/implementation/sqlite.d.ts +0 -11
- package/types/app-data/src/index.d.ts +0 -4
- package/types/apps/src/contracts/storage.d.ts +0 -68
- package/types/apps/src/implementation/storage.d.ts +0 -15
package/js/openapi.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
protocolOperations,
|
|
10
10
|
protocolRouter
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U5PFZDVB.js";
|
|
12
12
|
import {
|
|
13
13
|
OpenapiCompileError,
|
|
14
14
|
OpenapiCompileErrorCode,
|
|
@@ -27,57 +27,53 @@ import {
|
|
|
27
27
|
isOpenapiTextMedia,
|
|
28
28
|
openapiBinaryResultSchema,
|
|
29
29
|
openapiMediaKind
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-BO4US6DZ.js";
|
|
31
31
|
import {
|
|
32
32
|
failOnNetworkRefusal
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-SDHD6J37.js";
|
|
34
|
+
import "./chunk-5TJA7364.js";
|
|
35
35
|
import {
|
|
36
36
|
fromPromise,
|
|
37
37
|
nativeOperation,
|
|
38
38
|
routerDeclaration,
|
|
39
39
|
toPromise
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-7CSHVXVR.js";
|
|
41
41
|
import {
|
|
42
42
|
accountProviderError,
|
|
43
43
|
httpProviderError
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-NHUHTWAF.js";
|
|
44
|
+
} from "./chunk-E4BWL7KQ.js";
|
|
46
45
|
import {
|
|
47
46
|
ApiErrorRecovery,
|
|
48
47
|
ApiErrorResponse,
|
|
49
48
|
OpenapiResponseError,
|
|
50
49
|
RouterMeta,
|
|
51
50
|
defaultOpenapiErrorLimits
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-73AV3JVU.js";
|
|
51
|
+
} from "./chunk-3V575NIW.js";
|
|
54
52
|
import {
|
|
55
53
|
NetworkRefused,
|
|
56
54
|
ProviderError,
|
|
57
55
|
cacheLimits
|
|
58
|
-
} from "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
56
|
+
} from "./chunk-P7MGDPFD.js";
|
|
57
|
+
import "./chunk-MLHNVYHT.js";
|
|
58
|
+
import "./chunk-PCV73KVK.js";
|
|
61
59
|
import {
|
|
62
60
|
FetchHttpClient_exports
|
|
63
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-VJQXXOQ3.js";
|
|
64
62
|
import {
|
|
65
63
|
jsonSchema,
|
|
66
64
|
lazyJsonSchemaDecoder,
|
|
67
65
|
once,
|
|
68
66
|
wrap
|
|
69
|
-
} from "./chunk-
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-2FWXCU5I.js";
|
|
67
|
+
} from "./chunk-GHXRRFZA.js";
|
|
68
|
+
import "./chunk-KAQD3DTI.js";
|
|
72
69
|
import {
|
|
73
70
|
JsonObject
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-V5DWGYRK.js";
|
|
71
|
+
} from "./chunk-YQ35E7KS.js";
|
|
72
|
+
import "./chunk-VIU2XXA7.js";
|
|
77
73
|
import {
|
|
78
74
|
HttpClientRequest_exports,
|
|
79
75
|
HttpClient_exports
|
|
80
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-3MMG2H6M.js";
|
|
81
77
|
import {
|
|
82
78
|
Base64_exports,
|
|
83
79
|
Deferred_exports,
|
|
@@ -90,7 +86,7 @@ import {
|
|
|
90
86
|
SchemaIssue_exports,
|
|
91
87
|
Schema_exports,
|
|
92
88
|
Stream_exports
|
|
93
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-MXDKXAY4.js";
|
|
94
90
|
import "./chunk-CZ7CSFO4.js";
|
|
95
91
|
|
|
96
92
|
// src/implementation/swagger-client.ts
|
package/js/react.js
CHANGED
|
@@ -2,11 +2,10 @@ import {
|
|
|
2
2
|
AsyncResult_exports,
|
|
3
3
|
AtomRegistry_exports,
|
|
4
4
|
queryCommitted
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-HDAQBRT5.js";
|
|
5
|
+
} from "./chunk-DKUEYTYD.js";
|
|
7
6
|
import {
|
|
8
7
|
Option_exports
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MXDKXAY4.js";
|
|
10
9
|
import "./chunk-CZ7CSFO4.js";
|
|
11
10
|
|
|
12
11
|
// src/react.ts
|
package/js/skills/effect.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
folderSkillsEffect,
|
|
3
3
|
skillFromFiles
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-IJQ5LE74.js";
|
|
4
|
+
} from "../chunk-5TJA7364.js";
|
|
5
|
+
import "../chunk-MLHNVYHT.js";
|
|
6
|
+
import "../chunk-KAQD3DTI.js";
|
|
7
|
+
import "../chunk-VIU2XXA7.js";
|
|
8
|
+
import "../chunk-3MMG2H6M.js";
|
|
9
|
+
import "../chunk-MXDKXAY4.js";
|
|
11
10
|
import "../chunk-CZ7CSFO4.js";
|
|
12
11
|
export {
|
|
13
12
|
folderSkillsEffect,
|
package/js/skills.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catalogCache,
|
|
3
3
|
catalogScope
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-KANDIVIH.js";
|
|
5
|
+
import "./chunk-RIXVGVA6.js";
|
|
6
6
|
import {
|
|
7
7
|
failOnNetworkRefusal
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SDHD6J37.js";
|
|
9
9
|
import {
|
|
10
10
|
folderSkillsEffect,
|
|
11
11
|
skillFromFiles
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5TJA7364.js";
|
|
13
13
|
import {
|
|
14
14
|
accountProviderError,
|
|
15
15
|
httpProviderError
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-NHUHTWAF.js";
|
|
16
|
+
} from "./chunk-E4BWL7KQ.js";
|
|
18
17
|
import {
|
|
19
18
|
NetworkRefused,
|
|
20
19
|
ProviderError,
|
|
21
20
|
networkRefusalStatus
|
|
22
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-P7MGDPFD.js";
|
|
23
22
|
import {
|
|
24
23
|
AppSkillMetadata,
|
|
25
24
|
AppSkillSource,
|
|
@@ -29,29 +28,28 @@ import {
|
|
|
29
28
|
SkillLoadFailed,
|
|
30
29
|
SkillServiceName,
|
|
31
30
|
skillLoadLimits
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-MLHNVYHT.js";
|
|
32
|
+
import "./chunk-PCV73KVK.js";
|
|
34
33
|
import {
|
|
35
34
|
FetchHttpClient_exports
|
|
36
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-VJQXXOQ3.js";
|
|
37
36
|
import {
|
|
38
37
|
wrap
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-V5DWGYRK.js";
|
|
38
|
+
} from "./chunk-GHXRRFZA.js";
|
|
39
|
+
import "./chunk-KAQD3DTI.js";
|
|
40
|
+
import "./chunk-YQ35E7KS.js";
|
|
41
|
+
import "./chunk-VIU2XXA7.js";
|
|
44
42
|
import {
|
|
45
43
|
HttpBody_exports,
|
|
46
44
|
HttpClient_exports
|
|
47
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-3MMG2H6M.js";
|
|
48
46
|
import {
|
|
49
47
|
Base64_exports,
|
|
50
48
|
Effect_exports,
|
|
51
49
|
Ref_exports,
|
|
52
50
|
Schema_exports,
|
|
53
51
|
Stream_exports
|
|
54
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-MXDKXAY4.js";
|
|
55
53
|
import "./chunk-CZ7CSFO4.js";
|
|
56
54
|
|
|
57
55
|
// src/implementation/inflate.ts
|
package/js/storage/facet.js
CHANGED
|
@@ -1,220 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SqlClient,
|
|
3
|
-
SqlError,
|
|
4
|
-
UnknownError,
|
|
5
|
-
classifySqliteError,
|
|
6
|
-
defaultTransforms,
|
|
7
|
-
layer,
|
|
8
|
-
make as make3,
|
|
9
|
-
makeCompilerSqlite
|
|
10
|
-
} from "../chunk-HDAQBRT5.js";
|
|
11
|
-
import {
|
|
12
|
-
makeSqliteDatabase
|
|
13
|
-
} from "../chunk-IU7CCCUC.js";
|
|
14
|
-
import "../chunk-NHUHTWAF.js";
|
|
15
|
-
import "../chunk-73AV3JVU.js";
|
|
16
|
-
import "../chunk-V5DWGYRK.js";
|
|
17
|
-
import {
|
|
18
|
-
Effect_exports,
|
|
19
|
-
PreventSchedulerYield,
|
|
20
|
-
Scope,
|
|
21
|
-
Semaphore_exports,
|
|
22
|
-
Service,
|
|
23
|
-
add,
|
|
24
|
-
addFinalizer,
|
|
25
|
-
as,
|
|
26
|
-
asVoid,
|
|
27
|
-
assignProperty2 as assignProperty,
|
|
28
|
-
callback,
|
|
29
|
-
catchCauseFilter2 as catchCauseFilter,
|
|
30
|
-
die,
|
|
31
|
-
effectContext,
|
|
32
|
-
fail3 as fail,
|
|
33
|
-
fail4 as fail2,
|
|
34
|
-
fail5 as fail3,
|
|
35
|
-
findDefect,
|
|
36
|
-
flatten,
|
|
37
|
-
fromIteratorSucceed,
|
|
38
|
-
gen,
|
|
39
|
-
getCurrent,
|
|
40
|
-
getOption,
|
|
41
|
-
getUnsafe,
|
|
42
|
-
identity,
|
|
43
|
-
isFailure2 as isFailure,
|
|
44
|
-
make,
|
|
45
|
-
make6 as make2,
|
|
46
|
-
map3 as map,
|
|
47
|
-
mapArray,
|
|
48
|
-
onExit,
|
|
49
|
-
promise,
|
|
50
|
-
provide2 as provide,
|
|
51
|
-
provideContext,
|
|
52
|
-
provideService,
|
|
53
|
-
succeed4 as succeed,
|
|
54
|
-
suspend,
|
|
55
|
-
suspend2,
|
|
56
|
-
tap,
|
|
57
|
-
try_2 as try_,
|
|
58
|
-
uninterruptibleMask,
|
|
59
|
-
void_,
|
|
60
|
-
withFiber
|
|
61
|
-
} from "../chunk-IJQ5LE74.js";
|
|
62
1
|
import "../chunk-CZ7CSFO4.js";
|
|
63
2
|
|
|
64
|
-
// ../../node_modules/.bun/@effect+sql-sqlite-do@4.0.1+ff18a43d1df18ff8/node_modules/@effect/sql-sqlite-do/dist/SqliteClient.js
|
|
65
|
-
var ATTR_DB_SYSTEM_NAME = "db.system.name";
|
|
66
|
-
var classifyError = (cause, message, operation) => classifySqliteError(cause, {
|
|
67
|
-
message,
|
|
68
|
-
operation
|
|
69
|
-
});
|
|
70
|
-
var TypeId = "~@effect/sql-sqlite-do/SqliteClient";
|
|
71
|
-
var SqliteClient = /* @__PURE__ */ Service("@effect/sql-sqlite-do/SqliteClient");
|
|
72
|
-
var SqliteTransaction = /* @__PURE__ */ Service("@effect/sql-sqlite-do/SqliteClient/SqliteTransaction");
|
|
73
|
-
var unsupportedTransaction = (message, operation) => new SqlError({
|
|
74
|
-
reason: new UnknownError({
|
|
75
|
-
cause: new Error(message),
|
|
76
|
-
message,
|
|
77
|
-
operation
|
|
78
|
-
})
|
|
79
|
-
});
|
|
80
|
-
var makeUnsupportedWithTransaction = (message) => (_effect) => fail2(unsupportedTransaction(message, "transaction"));
|
|
81
|
-
var makeStorageBackedWithTransaction = (storage, connection, semaphore) => (effect) => withFiber((fiber) => {
|
|
82
|
-
const services = fiber.context;
|
|
83
|
-
const connOption = getOption(services, SqliteTransaction);
|
|
84
|
-
if (connOption._tag === "Some" && connOption.value[0] !== connection) {
|
|
85
|
-
return fail2(unsupportedTransaction("Transactions cannot use a connection from a different SQLite client", "transaction"));
|
|
86
|
-
}
|
|
87
|
-
const depth = connOption._tag === "Some" ? connOption.value[1] + 1 : 0;
|
|
88
|
-
const effectWithTxn = provideContext(effect, add(services, SqliteTransaction, [connection, depth]));
|
|
89
|
-
const transaction = callback((resume) => {
|
|
90
|
-
let interrupted = false;
|
|
91
|
-
const promise2 = storage.transaction((txn) => new Promise((resolve) => {
|
|
92
|
-
if (interrupted) return resolve();
|
|
93
|
-
resume(onExit(effectWithTxn, (exit) => {
|
|
94
|
-
if (isFailure(exit)) {
|
|
95
|
-
txn.rollback();
|
|
96
|
-
}
|
|
97
|
-
resolve();
|
|
98
|
-
return flatten(promise(() => promise2));
|
|
99
|
-
}));
|
|
100
|
-
})).then(() => void_, (cause) => {
|
|
101
|
-
const exit = fail(new SqlError({
|
|
102
|
-
reason: classifyError(cause, "Failed transaction", "transaction")
|
|
103
|
-
}));
|
|
104
|
-
resume(exit);
|
|
105
|
-
return exit;
|
|
106
|
-
});
|
|
107
|
-
return suspend(() => {
|
|
108
|
-
interrupted = true;
|
|
109
|
-
return asVoid(promise(() => promise2));
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
return connOption._tag === "Some" ? transaction : semaphore.withPermits(1)(transaction);
|
|
113
|
-
}).pipe(
|
|
114
|
-
// The storage transaction closes the input gate, blocking dispatcher tasks until it completes.
|
|
115
|
-
provideService(PreventSchedulerYield, true)
|
|
116
|
-
);
|
|
117
|
-
var make4 = (options) => gen(function* () {
|
|
118
|
-
const compiler = makeCompilerSqlite(options.transformQueryNames);
|
|
119
|
-
const transformRows = options.transformResultNames ? defaultTransforms(options.transformResultNames).array : void 0;
|
|
120
|
-
const db = options.storage?.sql ?? options.db;
|
|
121
|
-
if (db === void 0) {
|
|
122
|
-
return yield* die("SqliteClient.make requires either a Durable Object storage or sql storage");
|
|
123
|
-
}
|
|
124
|
-
const sqlStorage = db;
|
|
125
|
-
const makeConnection = gen(function* () {
|
|
126
|
-
function* runIterator(sql, params = []) {
|
|
127
|
-
const cursor = sqlStorage.exec(sql, ...params);
|
|
128
|
-
const columns = cursor.columnNames;
|
|
129
|
-
for (const result of cursor.raw()) {
|
|
130
|
-
const obj = {};
|
|
131
|
-
for (let i = 0; i < columns.length; i++) {
|
|
132
|
-
const value = result[i];
|
|
133
|
-
assignProperty(obj, columns[i], value instanceof ArrayBuffer ? new Uint8Array(value) : value);
|
|
134
|
-
}
|
|
135
|
-
yield obj;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
const runStatement = (sql, params = []) => try_({
|
|
139
|
-
try: () => Array.from(runIterator(sql, params)),
|
|
140
|
-
catch: (cause) => new SqlError({
|
|
141
|
-
reason: classifyError(cause, "Failed to execute statement", "execute")
|
|
142
|
-
})
|
|
143
|
-
});
|
|
144
|
-
const runValues = (sql, params = []) => try_({
|
|
145
|
-
try: () => Array.from(sqlStorage.exec(sql, ...params).raw(), (row) => {
|
|
146
|
-
for (let i = 0; i < row.length; i++) {
|
|
147
|
-
const value = row[i];
|
|
148
|
-
if (value instanceof ArrayBuffer) {
|
|
149
|
-
row[i] = new Uint8Array(value);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return row;
|
|
153
|
-
}),
|
|
154
|
-
catch: (cause) => new SqlError({
|
|
155
|
-
reason: classifyError(cause, "Failed to execute statement", "execute")
|
|
156
|
-
})
|
|
157
|
-
});
|
|
158
|
-
return identity({
|
|
159
|
-
execute(sql, params, transformRows2) {
|
|
160
|
-
return transformRows2 ? map(runStatement(sql, params), transformRows2) : runStatement(sql, params);
|
|
161
|
-
},
|
|
162
|
-
executeRaw(sql, params) {
|
|
163
|
-
return runStatement(sql, params);
|
|
164
|
-
},
|
|
165
|
-
executeValues(sql, params) {
|
|
166
|
-
return runValues(sql, params);
|
|
167
|
-
},
|
|
168
|
-
executeValuesUnprepared(sql, params) {
|
|
169
|
-
return runValues(sql, params);
|
|
170
|
-
},
|
|
171
|
-
executeUnprepared(sql, params, transformRows2) {
|
|
172
|
-
return transformRows2 ? map(runStatement(sql, params), transformRows2) : runStatement(sql, params);
|
|
173
|
-
},
|
|
174
|
-
executeStream(sql, params, transformRows2) {
|
|
175
|
-
return suspend2(() => {
|
|
176
|
-
const iterator = runIterator(sql, params);
|
|
177
|
-
return fromIteratorSucceed(iterator, 128);
|
|
178
|
-
}).pipe(catchCauseFilter(findDefect, (defect) => fail3(new SqlError({
|
|
179
|
-
reason: classifyError(defect, "Failed to execute statement", "execute")
|
|
180
|
-
}))), transformRows2 ? mapArray((chunk) => transformRows2(chunk)) : identity);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
});
|
|
184
|
-
const semaphore = yield* make2(1);
|
|
185
|
-
const connection = yield* makeConnection;
|
|
186
|
-
const acquirer = semaphore.withPermits(1)(succeed(connection));
|
|
187
|
-
const transactionAcquirer = uninterruptibleMask((restore) => {
|
|
188
|
-
const fiber = getCurrent();
|
|
189
|
-
const scope = getUnsafe(fiber.context, Scope);
|
|
190
|
-
return as(tap(restore(semaphore.take(1)), () => addFinalizer(scope, semaphore.release(1))), connection);
|
|
191
|
-
});
|
|
192
|
-
const client = yield* make3({
|
|
193
|
-
acquirer,
|
|
194
|
-
compiler,
|
|
195
|
-
transactionAcquirer,
|
|
196
|
-
transactionService: SqliteTransaction,
|
|
197
|
-
spanAttributes: [...options.spanAttributes ? Object.entries(options.spanAttributes) : [], [ATTR_DB_SYSTEM_NAME, "sqlite"]],
|
|
198
|
-
transformRows
|
|
199
|
-
});
|
|
200
|
-
return Object.assign(client, {
|
|
201
|
-
[TypeId]: TypeId,
|
|
202
|
-
config: options,
|
|
203
|
-
withTransaction: options.storage ? makeStorageBackedWithTransaction(options.storage, connection, semaphore) : makeUnsupportedWithTransaction("Transactions require Durable Object storage; pass ctx.storage as the storage option")
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
var layer2 = (config) => effectContext(map(make4(config), (client) => make(SqliteClient, client).pipe(add(SqlClient, client)))).pipe(provide(layer));
|
|
207
|
-
|
|
208
3
|
// src/facet.ts
|
|
209
|
-
var facetStorage = (storage) =>
|
|
210
|
-
const transactions = Semaphore_exports.makeUnsafe(1);
|
|
211
|
-
const run = (write) => (schema, work) => Effect_exports.gen(function* () {
|
|
212
|
-
const sql = yield* SqlClient;
|
|
213
|
-
const database = yield* makeSqliteDatabase({ sql, schema, crypto });
|
|
214
|
-
return yield* database[write ? "mutate" : "read"](work);
|
|
215
|
-
}).pipe(Effect_exports.provide(layer2({ storage })), transactions.withPermits(1));
|
|
216
|
-
return { read: run(false), mutate: run(true) };
|
|
217
|
-
};
|
|
4
|
+
var facetStorage = (storage) => storage;
|
|
218
5
|
export {
|
|
219
6
|
facetStorage
|
|
220
7
|
};
|
package/js/ui/auth/contracts.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
AppSignInFailure,
|
|
6
6
|
AppSignInId,
|
|
7
7
|
appSignInCallbackPath
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-W2NV54JD.js";
|
|
9
|
+
import "../../chunk-MXDKXAY4.js";
|
|
10
10
|
import "../../chunk-CZ7CSFO4.js";
|
|
11
11
|
export {
|
|
12
12
|
AppReturnPath,
|
package/js/ui/auth.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
appRedirect,
|
|
4
4
|
appSignInCallback,
|
|
5
5
|
appSignInFailed
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-JTMDWPCH.js";
|
|
7
7
|
import {
|
|
8
8
|
AppReturnPath,
|
|
9
9
|
AppSignInCallback,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
AppSignInFailure,
|
|
12
12
|
AppSignInId,
|
|
13
13
|
appSignInCallbackPath
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-W2NV54JD.js";
|
|
15
|
+
import "../chunk-VJQXXOQ3.js";
|
|
16
|
+
import "../chunk-3MMG2H6M.js";
|
|
17
|
+
import "../chunk-MXDKXAY4.js";
|
|
18
18
|
import "../chunk-CZ7CSFO4.js";
|
|
19
19
|
export {
|
|
20
20
|
AppReturnPath,
|
package/js/ui/contracts.js
CHANGED
|
@@ -7,12 +7,11 @@ import {
|
|
|
7
7
|
UiOperation,
|
|
8
8
|
UiSnapshot,
|
|
9
9
|
UiUnauthorized
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-IJQ5LE74.js";
|
|
10
|
+
} from "../chunk-ZUKBIHMK.js";
|
|
11
|
+
import "../chunk-YQ35E7KS.js";
|
|
12
|
+
import "../chunk-VIU2XXA7.js";
|
|
13
|
+
import "../chunk-3MMG2H6M.js";
|
|
14
|
+
import "../chunk-MXDKXAY4.js";
|
|
16
15
|
import "../chunk-CZ7CSFO4.js";
|
|
17
16
|
export {
|
|
18
17
|
AppUiApi,
|
package/js/ui/serving.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appPrivateHeaders
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-JTMDWPCH.js";
|
|
4
|
+
import "../chunk-W2NV54JD.js";
|
|
5
5
|
import {
|
|
6
6
|
UiForbidden
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-ZUKBIHMK.js";
|
|
8
8
|
import {
|
|
9
9
|
CurrentTelemetryConfig
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-V5DWGYRK.js";
|
|
10
|
+
} from "../chunk-PCV73KVK.js";
|
|
11
|
+
import "../chunk-VJQXXOQ3.js";
|
|
12
|
+
import "../chunk-KAQD3DTI.js";
|
|
13
|
+
import "../chunk-YQ35E7KS.js";
|
|
14
|
+
import "../chunk-VIU2XXA7.js";
|
|
16
15
|
import {
|
|
17
16
|
HttpServerRequest_exports,
|
|
18
17
|
HttpServerResponse_exports
|
|
19
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-3MMG2H6M.js";
|
|
20
19
|
import {
|
|
21
20
|
Effect_exports
|
|
22
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-MXDKXAY4.js";
|
|
23
22
|
import "../chunk-CZ7CSFO4.js";
|
|
24
23
|
|
|
25
24
|
// src/implementation/browser-scripts.gen.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apps",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.39",
|
|
4
4
|
"description": "TypeScript apps with typed tools, accounts, storage, and UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -95,7 +95,6 @@
|
|
|
95
95
|
],
|
|
96
96
|
"dependencies": {
|
|
97
97
|
"effect": "4.0.1",
|
|
98
|
-
"@effect/sql-sqlite-do": "4.0.1",
|
|
99
98
|
"@cloudflare/workers-types": "5.20260729.1"
|
|
100
99
|
},
|
|
101
100
|
"peerDependencies": {
|