@ultrst-armada/kloks 2.1.0 → 2.2.0
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/package.json +3 -3
- package/packages/backend/dist/{chunk-6BL5DXFZ.js → chunk-CTBVXX5C.js} +1 -1
- package/packages/backend/dist/{chunk-3UZFKB4M.js → chunk-DMBDZHJF.js} +1 -1
- package/packages/backend/dist/{chunk-OT2PSPBK.js → chunk-F6CHRGJ6.js} +3 -3
- package/packages/backend/dist/{chunk-5UVJDX7Q.js → chunk-HJE4CVKY.js} +3 -10
- package/packages/backend/dist/{chunk-QYWVZBI6.js → chunk-HYSBT3MP.js} +1 -1
- package/packages/backend/dist/{chunk-JGR6BJVX.js → chunk-O25T5KCE.js} +1 -1
- package/packages/backend/dist/{chunk-5GW5PJWQ.js → chunk-PECE5QKV.js} +4 -9
- package/packages/backend/dist/{chunk-HRJCGJTR.js → chunk-SR3DALCH.js} +4 -4
- package/packages/backend/dist/{chunk-IKDYKRVH.js → chunk-T7R6Q7TZ.js} +4 -4
- package/packages/backend/dist/{chunk-EQFZX3JT.js → chunk-UVNKDM7N.js} +1 -1
- package/packages/backend/dist/{chunk-NZWCPJDJ.js → chunk-WPN3SMIT.js} +2 -2
- package/packages/backend/dist/{chunk-YFMHT77Z.js → chunk-X57LLCAQ.js} +2 -5
- package/packages/backend/dist/{chunk-NFK6YFTA.js → chunk-YZNQA3FU.js} +1 -1
- package/packages/backend/dist/{chunk-U7T65YUP.js → chunk-ZSH73LE5.js} +209 -1
- package/packages/backend/dist/{client-JXGCPWEA.js → client-5SGUJCV5.js} +1 -1
- package/packages/backend/dist/core/b2ExplorerContext.d.ts +41 -0
- package/packages/backend/dist/core/b2ExplorerOperations.d.ts +2 -0
- package/packages/backend/dist/core/b2ExplorerOperations.test.d.ts +1 -0
- package/packages/backend/dist/index.js +12 -12
- package/packages/backend/dist/krnl-services.js +1 -1
- package/packages/backend/dist/node.js +14 -14
- package/packages/backend/dist/provider-services/google/drive.js +2 -2
- package/packages/backend/dist/provider-services/google/gemini.js +2 -2
- package/packages/backend/dist/provider-services/google/index.js +2 -2
- package/packages/backend/dist/provider-services/index.js +11 -11
- package/packages/backend/dist/provider-services/node.js +13 -13
- package/packages/backend/dist/provider-services/storage/backblaze-b2.js +2 -2
- package/packages/backend/dist/provider-services/storage/contract.d.ts +1 -1
- package/packages/backend/dist/provider-services/storage/dropbox.js +4 -4
- package/packages/backend/dist/provider-services/storage/github.js +4 -4
- package/packages/backend/dist/provider-services/storage/node.js +9 -9
- package/packages/backend/dist/provider-services/storage.js +8 -8
- package/packages/backend/package.json +1 -1
- package/packages/state-graph/dist/browser.js +9 -9
- package/packages/state-graph/dist/index.js +9 -9
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultrst-armada/kloks",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
8
8
|
},
|
|
9
|
-
"description": "Kloks
|
|
9
|
+
"description": "Kloks — Public Backend, State-Graph, Audio/MIDI & Service Package Library built on KrnlTS (@kloks/*)",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "./index.js",
|
|
12
12
|
"module": "./index.js",
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
"verify:package-exports": "node scripts/verify-package-exports.mjs"
|
|
347
347
|
},
|
|
348
348
|
"dependencies": {
|
|
349
|
-
"@dinilmusick/gutts": "
|
|
349
|
+
"@dinilmusick/gutts": "2.2.0",
|
|
350
350
|
"@webcontainer/api": "^1.6.4",
|
|
351
351
|
"ws": "^8.18.0",
|
|
352
352
|
"zod": "^3.24.1",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
continueDropboxFolder,
|
|
3
3
|
listDropboxFolder
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PECE5QKV.js";
|
|
5
5
|
import {
|
|
6
6
|
normalizeStoragePath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HJE4CVKY.js";
|
|
8
8
|
|
|
9
9
|
// src/provider-services/storage/dropbox.ts
|
|
10
10
|
function toDropboxPath(path) {
|
|
@@ -59,7 +59,7 @@ function createDropboxStorageService(connection, transport = fetch) {
|
|
|
59
59
|
async delete(path) {
|
|
60
60
|
const target = toDropboxPath(path);
|
|
61
61
|
if (!target) throw new Error("Refusing to delete the Dropbox root");
|
|
62
|
-
const { createProviderClient } = await import("./client-
|
|
62
|
+
const { createProviderClient } = await import("./client-5SGUJCV5.js");
|
|
63
63
|
await createProviderClient(connection, transport).request({
|
|
64
64
|
path: "/2/files/delete_v2",
|
|
65
65
|
method: "POST",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/provider-services/storage/contract.ts
|
|
2
|
+
import { normalizeStoragePath } from "@dinilmusick/gutts/urls/safety";
|
|
2
3
|
var UnsupportedStorageOperation = class extends Error {
|
|
3
4
|
constructor(providerId, operation) {
|
|
4
5
|
super(`Storage provider ${providerId} does not support ${operation} through this adapter`);
|
|
@@ -14,14 +15,6 @@ function assertStorageOperation(service, operation) {
|
|
|
14
15
|
if (!service.capabilities[operation])
|
|
15
16
|
throw new UnsupportedStorageOperation(service.providerId, operation);
|
|
16
17
|
}
|
|
17
|
-
function normalizeStoragePath(path = "") {
|
|
18
|
-
if (path.includes("\\") || path.includes("?") || path.includes("#") || /[\x00-\x1f]/.test(path))
|
|
19
|
-
throw new Error("Invalid storage path");
|
|
20
|
-
const parts = path.replace(/^\/+|\/+$/g, "").split("/").filter(Boolean);
|
|
21
|
-
if (parts.some((p) => p === "." || p === ".." || p === "%2e" || p === "%2e%2e"))
|
|
22
|
-
throw new Error("Storage path traversal is not permitted");
|
|
23
|
-
return parts.join("/");
|
|
24
|
-
}
|
|
25
18
|
function readOnlyService(id) {
|
|
26
19
|
return {
|
|
27
20
|
read: async () => {
|
|
@@ -39,6 +32,6 @@ function readOnlyService(id) {
|
|
|
39
32
|
export {
|
|
40
33
|
UnsupportedStorageOperation,
|
|
41
34
|
assertStorageOperation,
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
readOnlyService,
|
|
36
|
+
normalizeStoragePath
|
|
44
37
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X57LLCAQ.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveProviderServiceId
|
|
6
6
|
} from "./chunk-FKK23J2A.js";
|
|
7
7
|
|
|
8
8
|
// src/provider-services/storage-providers.ts
|
|
9
|
+
import { encodeSafePathSegments } from "@dinilmusick/gutts/urls/safety";
|
|
9
10
|
function serviceConnection(connection, provider) {
|
|
10
11
|
if (resolveProviderServiceId(connection.providerId) !== provider)
|
|
11
12
|
throw new Error("Credential provider does not match the requested service");
|
|
@@ -16,12 +17,6 @@ function githubName(value) {
|
|
|
16
17
|
throw new Error("Invalid GitHub repository owner or name");
|
|
17
18
|
return value;
|
|
18
19
|
}
|
|
19
|
-
function safeRepositoryPath(path) {
|
|
20
|
-
const parts = path.split("/");
|
|
21
|
-
if (parts.some((part) => part === "" || part === "." || part === ".."))
|
|
22
|
-
throw new Error("Invalid repository path");
|
|
23
|
-
return parts.map(encodeURIComponent).join("/");
|
|
24
|
-
}
|
|
25
20
|
async function listGitHubRepositories(connection, transport = fetch, page = 1) {
|
|
26
21
|
if (!Number.isSafeInteger(page) || page < 1 || page > 1e4)
|
|
27
22
|
throw new Error("Invalid GitHub repositories page");
|
|
@@ -37,7 +32,7 @@ async function listGitHubRepositories(connection, transport = fetch, page = 1) {
|
|
|
37
32
|
return data;
|
|
38
33
|
}
|
|
39
34
|
async function listGitHubRepositoryContents(connection, owner, repo, path = "", transport = fetch) {
|
|
40
|
-
const suffix = path ? "/" +
|
|
35
|
+
const suffix = path ? "/" + encodeSafePathSegments(path) : "";
|
|
41
36
|
const { data } = await createProviderClient(serviceConnection(connection, "github"), transport).request({
|
|
42
37
|
path: `/repos/${githubName(owner)}/${githubName(repo)}/contents${suffix}`
|
|
43
38
|
});
|
|
@@ -54,7 +49,7 @@ async function listGitLabProjects(connection, transport = fetch) {
|
|
|
54
49
|
async function listGitLabRepositoryTree(connection, project, path = "", transport = fetch) {
|
|
55
50
|
const key = String(project).trim();
|
|
56
51
|
if (!key || key.includes("?") || key.includes("#")) throw new Error("GitLab project required");
|
|
57
|
-
if (path)
|
|
52
|
+
if (path) encodeSafePathSegments(path);
|
|
58
53
|
const { data } = await createProviderClient(serviceConnection(connection, "gitlab"), transport).request({
|
|
59
54
|
path: `/api/v4/projects/${encodeURIComponent(key)}/repository/tree`,
|
|
60
55
|
query: { per_page: 100, ...path ? { path } : {} }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchCloudflareCapacity,
|
|
3
3
|
fetchVercelCapacity
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YZNQA3FU.js";
|
|
5
5
|
import {
|
|
6
6
|
getGeminiQuotaStatus,
|
|
7
7
|
listGeminiModels
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DMBDZHJF.js";
|
|
9
9
|
import {
|
|
10
10
|
getGoogleAccountProfile,
|
|
11
11
|
listCloudflareAccounts,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
listCloudflareWorkers,
|
|
14
14
|
listVercelDeployments,
|
|
15
15
|
listVercelProjects
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UVNKDM7N.js";
|
|
17
17
|
import {
|
|
18
18
|
continueDropboxFolder,
|
|
19
19
|
listDropboxFolder,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
listGitHubRepositoryContents,
|
|
22
22
|
listGitLabProjects,
|
|
23
23
|
listGitLabRepositoryTree
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PECE5QKV.js";
|
|
25
25
|
import {
|
|
26
26
|
b2ListBuckets,
|
|
27
27
|
b2ListFileNames
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createDropboxStorageService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F6CHRGJ6.js";
|
|
4
4
|
import {
|
|
5
5
|
createGitHubStorageService
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WPN3SMIT.js";
|
|
7
7
|
import {
|
|
8
8
|
createGoogleDriveStorageService
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CTBVXX5C.js";
|
|
10
10
|
import {
|
|
11
11
|
createBackblazeB2StorageService
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O25T5KCE.js";
|
|
13
13
|
|
|
14
14
|
// src/provider-services/storage/service.ts
|
|
15
15
|
var CONTRACTS = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listGitHubRepositories,
|
|
3
3
|
listGitHubRepositoryContents
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PECE5QKV.js";
|
|
5
5
|
import {
|
|
6
6
|
UnsupportedStorageOperation,
|
|
7
7
|
normalizeStoragePath
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HJE4CVKY.js";
|
|
9
9
|
|
|
10
10
|
// src/provider-services/storage/github.ts
|
|
11
11
|
function splitRepo(path) {
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-FKK23J2A.js";
|
|
5
5
|
|
|
6
6
|
// src/provider-services/client.ts
|
|
7
|
+
import { resolveTrustedApiUrl } from "@dinilmusick/gutts/urls/safety";
|
|
7
8
|
var origins = {
|
|
8
9
|
cloudflare: "https://api.cloudflare.com",
|
|
9
10
|
vercel: "https://api.vercel.com",
|
|
@@ -23,11 +24,7 @@ function createProviderClient(connection, transport = fetch) {
|
|
|
23
24
|
if (!connection.accountId || !connection.credential?.trim())
|
|
24
25
|
throw new Error("A vault account and credential are required");
|
|
25
26
|
async function request(options) {
|
|
26
|
-
|
|
27
|
-
throw new Error("Only provider-relative API paths are permitted");
|
|
28
|
-
const target = new URL(options.path, origin);
|
|
29
|
-
if (target.origin !== origin || /(?:^|\/)\.\.(?:\/|$)/.test(decodeURIComponent(target.pathname)))
|
|
30
|
-
throw new Error("Provider URL crossed the allowed origin");
|
|
27
|
+
const target = resolveTrustedApiUrl(origin, options.path);
|
|
31
28
|
for (const [key, value] of Object.entries(options.query || {}))
|
|
32
29
|
target.searchParams.set(key, String(value));
|
|
33
30
|
const headers = { Accept: "application/json" };
|
|
@@ -49,7 +49,10 @@ import {
|
|
|
49
49
|
resolveUserFromToken
|
|
50
50
|
} from "./chunk-2COYZMUJ.js";
|
|
51
51
|
import {
|
|
52
|
-
|
|
52
|
+
authorizeB2,
|
|
53
|
+
b2DownloadFile,
|
|
54
|
+
b2ListBuckets,
|
|
55
|
+
b2UploadFile
|
|
53
56
|
} from "./chunk-I6T64MLT.js";
|
|
54
57
|
import {
|
|
55
58
|
GOOGLE_DRIVE_WORKSPACE_SCOPE,
|
|
@@ -62,6 +65,202 @@ import {
|
|
|
62
65
|
createServiceDefinition
|
|
63
66
|
} from "@ultrst-armada/krnl";
|
|
64
67
|
|
|
68
|
+
// src/core/b2ExplorerContext.ts
|
|
69
|
+
function safeB2ExplorerPath(value) {
|
|
70
|
+
if (typeof value !== "string" || !value || value.startsWith("/") || value.includes("\\") || /[\x00-\x1f\x7f]/.test(value)) {
|
|
71
|
+
throw new Error("B2 object path must be a safe relative path.");
|
|
72
|
+
}
|
|
73
|
+
if (value.split("/").some((part) => !part || part === "." || part === "..")) {
|
|
74
|
+
throw new Error("B2 object path contains an unsafe component.");
|
|
75
|
+
}
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
async function resolveB2ExplorerContext(input) {
|
|
79
|
+
const userId = String(input.userId || "").trim();
|
|
80
|
+
const connectionId = String(input.connectionId || "").trim();
|
|
81
|
+
if (!userId || !connectionId) throw new Error("Verified owner and opaque connection ID are required.");
|
|
82
|
+
const connection = await resolveUserStorageConnectionSecret(
|
|
83
|
+
userId,
|
|
84
|
+
connectionId,
|
|
85
|
+
(sql, params) => queryUnifiedDb(sql, params, input.env),
|
|
86
|
+
"backblaze_b2"
|
|
87
|
+
);
|
|
88
|
+
if (!connection || connection.enabled === false) {
|
|
89
|
+
throw new Error("The selected B2 connection is unavailable to this user.");
|
|
90
|
+
}
|
|
91
|
+
const keyId = String(connection.b2KeyId || connection.keyId || connection.accessKeyId || "").trim();
|
|
92
|
+
const applicationKey = String(connection.b2ApplicationKey || connection.applicationKey || connection.appKey || connection.secretAccessKey || "").trim();
|
|
93
|
+
if (!keyId || !applicationKey) throw new Error("The saved B2 connection has no server-side credential.");
|
|
94
|
+
const [auth, buckets] = await Promise.all([
|
|
95
|
+
authorizeB2(keyId, applicationKey),
|
|
96
|
+
b2ListBuckets(keyId, applicationKey)
|
|
97
|
+
]);
|
|
98
|
+
return { auth, keyId, applicationKey, buckets };
|
|
99
|
+
}
|
|
100
|
+
function selectB2ExplorerBucket(context, bucketId, bucketName) {
|
|
101
|
+
const selected = context.buckets.find(
|
|
102
|
+
(b) => (!bucketId || b.bucketId === bucketId) && (!bucketName || b.bucketName === bucketName)
|
|
103
|
+
);
|
|
104
|
+
if (!selected || !selected.bucketId || !selected.bucketName || !bucketId && !bucketName) {
|
|
105
|
+
throw new Error("The selected B2 bucket is not available to this connection.");
|
|
106
|
+
}
|
|
107
|
+
return selected;
|
|
108
|
+
}
|
|
109
|
+
async function postB2Explorer(auth, endpoint, payload) {
|
|
110
|
+
const res = await fetch(`${auth.apiUrl}/b2api/v2/${endpoint}`, {
|
|
111
|
+
method: "POST",
|
|
112
|
+
headers: { Authorization: auth.authorizationToken, "Content-Type": "application/json" },
|
|
113
|
+
body: JSON.stringify(payload),
|
|
114
|
+
signal: AbortSignal.timeout(2e4)
|
|
115
|
+
});
|
|
116
|
+
if (!res.ok) throw new Error(`B2 ${endpoint} failed with HTTP ${res.status}.`);
|
|
117
|
+
return res.json();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// src/core/b2ExplorerOperations.ts
|
|
121
|
+
function required(value, name) {
|
|
122
|
+
if (!value || !value.trim()) throw new Error(`B2 ${name} is required.`);
|
|
123
|
+
return value.trim();
|
|
124
|
+
}
|
|
125
|
+
function decodedBytes(value) {
|
|
126
|
+
if (typeof value !== "string" || !value || value.length > 36e6 || !/^[A-Za-z0-9+/]*={0,2}$/.test(value)) {
|
|
127
|
+
throw new Error("B2 base64 content is missing, malformed or too large.");
|
|
128
|
+
}
|
|
129
|
+
const raw = atob(value);
|
|
130
|
+
if (raw.length > 25 * 1024 * 1024) throw new Error("B2 upload exceeds the 25 MiB Explorer limit.");
|
|
131
|
+
return Uint8Array.from(raw, (char) => char.charCodeAt(0));
|
|
132
|
+
}
|
|
133
|
+
async function listVersions(context, bucketId, prefix) {
|
|
134
|
+
const found = [];
|
|
135
|
+
let startFileName;
|
|
136
|
+
let startFileId;
|
|
137
|
+
for (let page = 0; page < 100; page++) {
|
|
138
|
+
const data = await postB2Explorer(context.auth, "b2_list_file_versions", {
|
|
139
|
+
bucketId,
|
|
140
|
+
prefix,
|
|
141
|
+
maxFileCount: 1e3,
|
|
142
|
+
...startFileName ? { startFileName, startFileId } : {}
|
|
143
|
+
});
|
|
144
|
+
if (!Array.isArray(data.files)) throw new Error("B2 version listing returned invalid data.");
|
|
145
|
+
found.push(...data.files);
|
|
146
|
+
if (!data.nextFileName) return found;
|
|
147
|
+
if (data.nextFileName === startFileName && data.nextFileId === startFileId) {
|
|
148
|
+
throw new Error("B2 version cursor did not advance.");
|
|
149
|
+
}
|
|
150
|
+
startFileName = data.nextFileName;
|
|
151
|
+
startFileId = data.nextFileId;
|
|
152
|
+
}
|
|
153
|
+
throw new Error("B2 version listing exceeded the safe pagination limit.");
|
|
154
|
+
}
|
|
155
|
+
async function deleteVersions(context, bucketId, prefix, exactFile, exactId) {
|
|
156
|
+
const versions = (await listVersions(context, bucketId, prefix)).filter(
|
|
157
|
+
(f) => typeof f.fileName === "string" && (exactFile ? f.fileName === exactFile : f.fileName.startsWith(prefix)) && (!exactId || f.fileId === exactId)
|
|
158
|
+
);
|
|
159
|
+
if (exactId && versions.length !== 1) throw new Error("The B2 file version is not present in the selected bucket.");
|
|
160
|
+
let deletedCount = 0;
|
|
161
|
+
for (const file of versions) {
|
|
162
|
+
if (!file.fileId || !file.fileName) throw new Error("B2 version metadata is incomplete; deletion cancelled.");
|
|
163
|
+
await postB2Explorer(context.auth, "b2_delete_file_version", {
|
|
164
|
+
fileName: file.fileName,
|
|
165
|
+
fileId: file.fileId
|
|
166
|
+
});
|
|
167
|
+
deletedCount++;
|
|
168
|
+
}
|
|
169
|
+
return { deletedCount };
|
|
170
|
+
}
|
|
171
|
+
async function executeB2Explorer(input) {
|
|
172
|
+
const action = input.action;
|
|
173
|
+
const actions = [
|
|
174
|
+
"listBuckets",
|
|
175
|
+
"createBucket",
|
|
176
|
+
"deleteBucket",
|
|
177
|
+
"listFiles",
|
|
178
|
+
"createFolder",
|
|
179
|
+
"uploadFile",
|
|
180
|
+
"readFile",
|
|
181
|
+
"deleteFile",
|
|
182
|
+
"deleteFolder"
|
|
183
|
+
];
|
|
184
|
+
if (!actions.includes(action)) throw new Error("Unsupported B2 Explorer operation.");
|
|
185
|
+
if (!input.userId || !input.connectionId) throw new Error("Verified owner and connection ID are required.");
|
|
186
|
+
if (["uploadFile", "readFile", "deleteFile"].includes(action)) safeB2ExplorerPath(input.fileName);
|
|
187
|
+
if (["createFolder", "deleteFolder"].includes(action)) safeB2ExplorerPath(input.folderPath);
|
|
188
|
+
const ctx = await resolveB2ExplorerContext(input);
|
|
189
|
+
if (action === "listBuckets") {
|
|
190
|
+
return ctx.buckets.map(({ bucketId, bucketName, bucketType, bucketInfo, revision }) => ({ bucketId, bucketName, bucketType, bucketInfo, revision }));
|
|
191
|
+
}
|
|
192
|
+
if (action === "createBucket") {
|
|
193
|
+
const bucketName = required(input.bucketName, "bucket name");
|
|
194
|
+
if (!/^[A-Za-z0-9-]{6,50}$/.test(bucketName)) throw new Error("B2 bucket name is invalid.");
|
|
195
|
+
if (input.bucketType && !["allPrivate", "allPublic"].includes(input.bucketType)) {
|
|
196
|
+
throw new Error("B2 bucket type is invalid.");
|
|
197
|
+
}
|
|
198
|
+
if (ctx.auth.allowed?.bucketId || ctx.auth.allowed?.bucketName || ctx.auth.allowed?.buckets?.length) {
|
|
199
|
+
throw new Error("This B2 key is restricted to an existing bucket.");
|
|
200
|
+
}
|
|
201
|
+
return postB2Explorer(ctx.auth, "b2_create_bucket", {
|
|
202
|
+
accountId: ctx.auth.accountId,
|
|
203
|
+
bucketName,
|
|
204
|
+
bucketType: input.bucketType || "allPrivate"
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
const bucket = selectB2ExplorerBucket(ctx, input.bucketId, input.bucketName);
|
|
208
|
+
if (action === "deleteBucket") {
|
|
209
|
+
const connections = await listUserStorageConnections(
|
|
210
|
+
input.userId,
|
|
211
|
+
(sql, params) => queryUnifiedDb(sql, params, input.env)
|
|
212
|
+
);
|
|
213
|
+
if (connections.some((connection) => connection.provider === "backblaze_b2" && (connection.b2BucketName === bucket.bucketName || connection.bucketName === bucket.bucketName))) {
|
|
214
|
+
throw new Error("Cannot delete a bucket assigned to a saved workspace storage connection.");
|
|
215
|
+
}
|
|
216
|
+
await postB2Explorer(ctx.auth, "b2_delete_bucket", {
|
|
217
|
+
accountId: ctx.auth.accountId,
|
|
218
|
+
bucketId: bucket.bucketId
|
|
219
|
+
});
|
|
220
|
+
return { success: true };
|
|
221
|
+
}
|
|
222
|
+
if (action === "listFiles") {
|
|
223
|
+
const prefix = input.prefix ? safeB2ExplorerPath(input.prefix.replace(/\/$/, "")) : "";
|
|
224
|
+
const files = [];
|
|
225
|
+
let startFileName;
|
|
226
|
+
for (let page = 0; page < 100; page++) {
|
|
227
|
+
const data = await postB2Explorer(ctx.auth, "b2_list_file_names", {
|
|
228
|
+
bucketId: bucket.bucketId,
|
|
229
|
+
prefix,
|
|
230
|
+
maxFileCount: 1e3,
|
|
231
|
+
...startFileName ? { startFileName } : {}
|
|
232
|
+
});
|
|
233
|
+
if (!Array.isArray(data.files)) throw new Error("B2 file listing returned invalid data.");
|
|
234
|
+
files.push(...data.files);
|
|
235
|
+
if (!data.nextFileName) return { files };
|
|
236
|
+
if (data.nextFileName === startFileName) throw new Error("B2 file cursor did not advance.");
|
|
237
|
+
startFileName = data.nextFileName;
|
|
238
|
+
}
|
|
239
|
+
throw new Error("B2 file listing exceeded the safe pagination limit.");
|
|
240
|
+
}
|
|
241
|
+
if (action === "createFolder") {
|
|
242
|
+
const fileName = `${safeB2ExplorerPath(input.folderPath)}/.bzEmpty`;
|
|
243
|
+
const file = await b2UploadFile(ctx.keyId, ctx.applicationKey, bucket.bucketName, fileName, new Uint8Array(0));
|
|
244
|
+
return { file, folderPath: input.folderPath };
|
|
245
|
+
}
|
|
246
|
+
if (action === "uploadFile") {
|
|
247
|
+
const fileName = safeB2ExplorerPath(input.fileName);
|
|
248
|
+
return b2UploadFile(ctx.keyId, ctx.applicationKey, bucket.bucketName, fileName, decodedBytes(input.fileBase64), input.contentType || "b2/x-auto");
|
|
249
|
+
}
|
|
250
|
+
if (action === "readFile") {
|
|
251
|
+
return b2DownloadFile(ctx.keyId, ctx.applicationKey, bucket.bucketName, safeB2ExplorerPath(input.fileName));
|
|
252
|
+
}
|
|
253
|
+
if (action === "deleteFile") {
|
|
254
|
+
const fileName = safeB2ExplorerPath(input.fileName);
|
|
255
|
+
return deleteVersions(ctx, bucket.bucketId, fileName, fileName, input.fileId);
|
|
256
|
+
}
|
|
257
|
+
if (action === "deleteFolder") {
|
|
258
|
+
const prefix = safeB2ExplorerPath(input.folderPath) + "/";
|
|
259
|
+
return deleteVersions(ctx, bucket.bucketId, prefix);
|
|
260
|
+
}
|
|
261
|
+
throw new Error("Unsupported B2 Explorer operation.");
|
|
262
|
+
}
|
|
263
|
+
|
|
65
264
|
// src/core/storageConnectionRuntimeCore.ts
|
|
66
265
|
function makeQuery(env) {
|
|
67
266
|
return (sql, params) => queryUnifiedDb(sql, params, env);
|
|
@@ -426,6 +625,15 @@ var StorageServiceDefinition = createServiceDefinition({
|
|
|
426
625
|
name: "createBackblazeConnection",
|
|
427
626
|
handler: async (input) => createBackblazeStorageConnection(input, (sql, params) => queryUnifiedDb(sql, params, input.env))
|
|
428
627
|
},
|
|
628
|
+
/**
|
|
629
|
+
* Connection-bound Explorer API. Never accepts direct provider credentials;
|
|
630
|
+
* all B2 calls resolve the verified user's encrypted canonical connection.
|
|
631
|
+
*/
|
|
632
|
+
executeBackblazeExplorer: {
|
|
633
|
+
id: "StorageService.executeBackblazeExplorer",
|
|
634
|
+
name: "executeBackblazeExplorer",
|
|
635
|
+
handler: async (input) => executeB2Explorer(input)
|
|
636
|
+
},
|
|
429
637
|
listBackblazeConnectionBuckets: {
|
|
430
638
|
id: "StorageService.listBackblazeConnectionBuckets",
|
|
431
639
|
name: "listBackblazeConnectionBuckets",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file b2ExplorerContext.ts
|
|
3
|
+
* @description Owner-bound B2 Explorer connection, bucket scope and safe REST.
|
|
4
|
+
* Credentials remain inside this server-only canonical Kloks layer.
|
|
5
|
+
*/
|
|
6
|
+
import { type B2AuthData } from './b2DirectCore.js';
|
|
7
|
+
export type B2ExplorerAction = 'listBuckets' | 'createBucket' | 'deleteBucket' | 'listFiles' | 'createFolder' | 'uploadFile' | 'readFile' | 'deleteFile' | 'deleteFolder';
|
|
8
|
+
export interface B2ExplorerInput {
|
|
9
|
+
action: B2ExplorerAction;
|
|
10
|
+
userId: string;
|
|
11
|
+
connectionId: string;
|
|
12
|
+
bucketId?: string;
|
|
13
|
+
bucketName?: string;
|
|
14
|
+
bucketType?: 'allPublic' | 'allPrivate';
|
|
15
|
+
fileName?: string;
|
|
16
|
+
fileId?: string;
|
|
17
|
+
fileBase64?: string;
|
|
18
|
+
folderPath?: string;
|
|
19
|
+
prefix?: string;
|
|
20
|
+
contentType?: string;
|
|
21
|
+
env?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export type B2ExplorerBucket = {
|
|
24
|
+
bucketId: string;
|
|
25
|
+
bucketName: string;
|
|
26
|
+
bucketType?: string;
|
|
27
|
+
bucketInfo?: Record<string, unknown>;
|
|
28
|
+
revision?: number;
|
|
29
|
+
};
|
|
30
|
+
export interface B2ExplorerContext {
|
|
31
|
+
auth: B2AuthData;
|
|
32
|
+
keyId: string;
|
|
33
|
+
applicationKey: string;
|
|
34
|
+
buckets: B2ExplorerBucket[];
|
|
35
|
+
}
|
|
36
|
+
export declare function safeB2ExplorerPath(value: unknown): string;
|
|
37
|
+
/** Only use an exact saved connection owned by the verified caller. */
|
|
38
|
+
export declare function resolveB2ExplorerContext(input: B2ExplorerInput): Promise<B2ExplorerContext>;
|
|
39
|
+
/** Restrict operations to bucket IDs explicitly discovered for this credential. */
|
|
40
|
+
export declare function selectB2ExplorerBucket(context: B2ExplorerContext, bucketId?: string, bucketName?: string): B2ExplorerBucket;
|
|
41
|
+
export declare function postB2Explorer(auth: B2AuthData, endpoint: string, payload: Record<string, unknown>): Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./chunk-GVMVYC6C.js";
|
|
2
1
|
import "./chunk-2Y2EXYDK.js";
|
|
3
2
|
import "./chunk-RABSY2JU.js";
|
|
3
|
+
import "./chunk-GVMVYC6C.js";
|
|
4
4
|
import {
|
|
5
5
|
calculateProviderCapacity
|
|
6
6
|
} from "./chunk-5SXOQAAX.js";
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
fetchCloudflareCapacity,
|
|
21
21
|
fetchVercelCapacity
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YZNQA3FU.js";
|
|
23
23
|
import {
|
|
24
24
|
getGeminiQuotaStatus,
|
|
25
25
|
listGeminiModels
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DMBDZHJF.js";
|
|
27
27
|
import {
|
|
28
28
|
getGoogleAccountProfile,
|
|
29
29
|
listCloudflareAccounts,
|
|
@@ -31,18 +31,18 @@ import {
|
|
|
31
31
|
listCloudflareWorkers,
|
|
32
32
|
listVercelDeployments,
|
|
33
33
|
listVercelProjects
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-UVNKDM7N.js";
|
|
35
35
|
import {
|
|
36
36
|
createCanonicalStorageService,
|
|
37
37
|
getCanonicalStorageCapabilities,
|
|
38
38
|
listCanonicalStorageProviders
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-T7R6Q7TZ.js";
|
|
40
40
|
import {
|
|
41
41
|
createDropboxStorageService
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-F6CHRGJ6.js";
|
|
43
43
|
import {
|
|
44
44
|
createGitHubStorageService
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-WPN3SMIT.js";
|
|
46
46
|
import {
|
|
47
47
|
continueDropboxFolder,
|
|
48
48
|
listDropboxFolder,
|
|
@@ -50,13 +50,13 @@ import {
|
|
|
50
50
|
listGitHubRepositoryContents,
|
|
51
51
|
listGitLabProjects,
|
|
52
52
|
listGitLabRepositoryTree
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-PECE5QKV.js";
|
|
54
54
|
import {
|
|
55
55
|
createGoogleDriveStorageService
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-CTBVXX5C.js";
|
|
57
57
|
import {
|
|
58
58
|
createProviderClient
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-X57LLCAQ.js";
|
|
60
60
|
import {
|
|
61
61
|
getProviderService,
|
|
62
62
|
getProviderServicePath,
|
|
@@ -68,13 +68,13 @@ import {
|
|
|
68
68
|
} from "./chunk-FKK23J2A.js";
|
|
69
69
|
import {
|
|
70
70
|
createBackblazeB2StorageService
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-O25T5KCE.js";
|
|
72
72
|
import {
|
|
73
73
|
UnsupportedStorageOperation,
|
|
74
74
|
assertStorageOperation,
|
|
75
75
|
normalizeStoragePath,
|
|
76
76
|
readOnlyService
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-HJE4CVKY.js";
|
|
78
78
|
import {
|
|
79
79
|
BaseApiRoute,
|
|
80
80
|
createSSEResponse,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
krnlStorageServiceFacade,
|
|
28
28
|
krnlWorkspaceServiceDefinition,
|
|
29
29
|
krnlWorkspaceServiceFacade
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZSH73LE5.js";
|
|
31
31
|
import "./chunk-DJ457D5D.js";
|
|
32
32
|
import "./chunk-FZKBTF34.js";
|
|
33
33
|
import "./chunk-23LS4LWC.js";
|
|
@@ -72,10 +72,10 @@ import {
|
|
|
72
72
|
GoogleAccountProviderService,
|
|
73
73
|
GoogleDriveProviderService,
|
|
74
74
|
VercelProviderService
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-SR3DALCH.js";
|
|
76
76
|
import {
|
|
77
77
|
CanonicalStorageProviderService
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-HYSBT3MP.js";
|
|
79
79
|
import "./chunk-LV55WKZR.js";
|
|
80
80
|
import "./chunk-WVDSMTW3.js";
|
|
81
81
|
import {
|
|
@@ -108,18 +108,18 @@ import {
|
|
|
108
108
|
import {
|
|
109
109
|
WorkspaceCloneSyncEngine
|
|
110
110
|
} from "./chunk-CDRHYO44.js";
|
|
111
|
-
import "./chunk-
|
|
112
|
-
import "./chunk-
|
|
113
|
-
import "./chunk-
|
|
114
|
-
import "./chunk-
|
|
115
|
-
import "./chunk-
|
|
116
|
-
import "./chunk-
|
|
117
|
-
import "./chunk-
|
|
118
|
-
import "./chunk-
|
|
119
|
-
import "./chunk-
|
|
111
|
+
import "./chunk-YZNQA3FU.js";
|
|
112
|
+
import "./chunk-DMBDZHJF.js";
|
|
113
|
+
import "./chunk-UVNKDM7N.js";
|
|
114
|
+
import "./chunk-T7R6Q7TZ.js";
|
|
115
|
+
import "./chunk-F6CHRGJ6.js";
|
|
116
|
+
import "./chunk-WPN3SMIT.js";
|
|
117
|
+
import "./chunk-PECE5QKV.js";
|
|
118
|
+
import "./chunk-CTBVXX5C.js";
|
|
119
|
+
import "./chunk-X57LLCAQ.js";
|
|
120
120
|
import "./chunk-FKK23J2A.js";
|
|
121
|
-
import "./chunk-
|
|
122
|
-
import "./chunk-
|
|
121
|
+
import "./chunk-O25T5KCE.js";
|
|
122
|
+
import "./chunk-HJE4CVKY.js";
|
|
123
123
|
import {
|
|
124
124
|
BaseApiRoute,
|
|
125
125
|
createSSEResponse,
|
|
@@ -231,7 +231,7 @@ import {
|
|
|
231
231
|
readUserWorkspaceStorageFile,
|
|
232
232
|
verifyGoogleDriveAuthorizationState,
|
|
233
233
|
writeUserWorkspaceStorageFile
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-ZSH73LE5.js";
|
|
235
235
|
import {
|
|
236
236
|
getPrimarySrklDeploymentUrl,
|
|
237
237
|
getSrklAccounts,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGoogleDriveStorageService
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-CTBVXX5C.js";
|
|
4
4
|
import {
|
|
5
5
|
getProviderService
|
|
6
6
|
} from "../../chunk-FKK23J2A.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-HJE4CVKY.js";
|
|
8
8
|
import {
|
|
9
9
|
GOOGLE_DRIVE_WORKSPACE_SCOPE,
|
|
10
10
|
GoogleDriveWorkspaceService
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getGeminiQuotaStatus,
|
|
3
3
|
listGeminiModels
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-DMBDZHJF.js";
|
|
5
|
+
import "../../chunk-X57LLCAQ.js";
|
|
6
6
|
import "../../chunk-FKK23J2A.js";
|
|
7
7
|
export {
|
|
8
8
|
getGeminiQuotaStatus,
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
fetchCloudflareCapacity,
|
|
6
6
|
fetchVercelCapacity
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-YZNQA3FU.js";
|
|
8
8
|
import {
|
|
9
9
|
getGeminiQuotaStatus,
|
|
10
10
|
listGeminiModels
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-DMBDZHJF.js";
|
|
12
12
|
import {
|
|
13
13
|
getGoogleAccountProfile,
|
|
14
14
|
listCloudflareAccounts,
|
|
@@ -16,18 +16,18 @@ import {
|
|
|
16
16
|
listCloudflareWorkers,
|
|
17
17
|
listVercelDeployments,
|
|
18
18
|
listVercelProjects
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-UVNKDM7N.js";
|
|
20
20
|
import {
|
|
21
21
|
createCanonicalStorageService,
|
|
22
22
|
getCanonicalStorageCapabilities,
|
|
23
23
|
listCanonicalStorageProviders
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-T7R6Q7TZ.js";
|
|
25
25
|
import {
|
|
26
26
|
createDropboxStorageService
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-F6CHRGJ6.js";
|
|
28
28
|
import {
|
|
29
29
|
createGitHubStorageService
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-WPN3SMIT.js";
|
|
31
31
|
import {
|
|
32
32
|
continueDropboxFolder,
|
|
33
33
|
listDropboxFolder,
|
|
@@ -35,13 +35,13 @@ import {
|
|
|
35
35
|
listGitHubRepositoryContents,
|
|
36
36
|
listGitLabProjects,
|
|
37
37
|
listGitLabRepositoryTree
|
|
38
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-PECE5QKV.js";
|
|
39
39
|
import {
|
|
40
40
|
createGoogleDriveStorageService
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-CTBVXX5C.js";
|
|
42
42
|
import {
|
|
43
43
|
createProviderClient
|
|
44
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-X57LLCAQ.js";
|
|
45
45
|
import {
|
|
46
46
|
getProviderService,
|
|
47
47
|
getProviderServicePath,
|
|
@@ -53,13 +53,13 @@ import {
|
|
|
53
53
|
} from "../chunk-FKK23J2A.js";
|
|
54
54
|
import {
|
|
55
55
|
createBackblazeB2StorageService
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-O25T5KCE.js";
|
|
57
57
|
import {
|
|
58
58
|
UnsupportedStorageOperation,
|
|
59
59
|
assertStorageOperation,
|
|
60
60
|
normalizeStoragePath,
|
|
61
61
|
readOnlyService
|
|
62
|
-
} from "../chunk-
|
|
62
|
+
} from "../chunk-HJE4CVKY.js";
|
|
63
63
|
import {
|
|
64
64
|
authorizeB2,
|
|
65
65
|
b2DownloadFile,
|
|
@@ -8,22 +8,22 @@ import {
|
|
|
8
8
|
GoogleAccountProviderService,
|
|
9
9
|
GoogleDriveProviderService,
|
|
10
10
|
VercelProviderService
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-SR3DALCH.js";
|
|
12
12
|
import {
|
|
13
13
|
CanonicalStorageProviderService
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-HYSBT3MP.js";
|
|
15
|
+
import "../chunk-YZNQA3FU.js";
|
|
16
|
+
import "../chunk-DMBDZHJF.js";
|
|
17
|
+
import "../chunk-UVNKDM7N.js";
|
|
18
|
+
import "../chunk-T7R6Q7TZ.js";
|
|
19
|
+
import "../chunk-F6CHRGJ6.js";
|
|
20
|
+
import "../chunk-WPN3SMIT.js";
|
|
21
|
+
import "../chunk-PECE5QKV.js";
|
|
22
|
+
import "../chunk-CTBVXX5C.js";
|
|
23
|
+
import "../chunk-X57LLCAQ.js";
|
|
24
24
|
import "../chunk-FKK23J2A.js";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-O25T5KCE.js";
|
|
26
|
+
import "../chunk-HJE4CVKY.js";
|
|
27
27
|
import "../chunk-I6T64MLT.js";
|
|
28
28
|
import "../chunk-EMSSTOOK.js";
|
|
29
29
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createBackblazeB2StorageService
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-O25T5KCE.js";
|
|
4
|
+
import "../../chunk-HJE4CVKY.js";
|
|
5
5
|
import "../../chunk-I6T64MLT.js";
|
|
6
6
|
export {
|
|
7
7
|
createBackblazeB2StorageService
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { normalizeStoragePath } from '@dinilmusick/gutts/urls/safety';
|
|
1
2
|
/** Provider-neutral storage APIs. Credential and tenant authorization remain caller-owned. */
|
|
2
3
|
export type StorageProviderId = 'github' | 'backblaze-b2' | 'dropbox' | 'google-drive';
|
|
3
4
|
export type StorageKind = 'bucket' | 'repository' | 'folder' | 'file';
|
|
@@ -37,7 +38,6 @@ export declare class UnsupportedStorageOperation extends Error {
|
|
|
37
38
|
}
|
|
38
39
|
/** Check capability before performing an operation; no stubs or false support. */
|
|
39
40
|
export declare function assertStorageOperation(service: CanonicalStorageService, operation: StorageOperation): void;
|
|
40
|
-
export declare function normalizeStoragePath(path?: string): string;
|
|
41
41
|
export declare function readOnlyService(id: StorageProviderId): {
|
|
42
42
|
read: (path: string) => Promise<Uint8Array>;
|
|
43
43
|
write: (path: string, content: Uint8Array | string) => Promise<void>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createDropboxStorageService
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-F6CHRGJ6.js";
|
|
4
|
+
import "../../chunk-PECE5QKV.js";
|
|
5
|
+
import "../../chunk-X57LLCAQ.js";
|
|
6
6
|
import "../../chunk-FKK23J2A.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-HJE4CVKY.js";
|
|
8
8
|
import "../../chunk-I6T64MLT.js";
|
|
9
9
|
import "../../chunk-EMSSTOOK.js";
|
|
10
10
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGitHubStorageService
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-WPN3SMIT.js";
|
|
4
|
+
import "../../chunk-PECE5QKV.js";
|
|
5
|
+
import "../../chunk-X57LLCAQ.js";
|
|
6
6
|
import "../../chunk-FKK23J2A.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-HJE4CVKY.js";
|
|
8
8
|
import "../../chunk-I6T64MLT.js";
|
|
9
9
|
import "../../chunk-EMSSTOOK.js";
|
|
10
10
|
export {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CanonicalStorageProviderService
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-HYSBT3MP.js";
|
|
4
|
+
import "../../chunk-T7R6Q7TZ.js";
|
|
5
|
+
import "../../chunk-F6CHRGJ6.js";
|
|
6
|
+
import "../../chunk-WPN3SMIT.js";
|
|
7
|
+
import "../../chunk-PECE5QKV.js";
|
|
8
|
+
import "../../chunk-CTBVXX5C.js";
|
|
9
|
+
import "../../chunk-X57LLCAQ.js";
|
|
10
10
|
import "../../chunk-FKK23J2A.js";
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-O25T5KCE.js";
|
|
12
|
+
import "../../chunk-HJE4CVKY.js";
|
|
13
13
|
import "../../chunk-I6T64MLT.js";
|
|
14
14
|
import "../../chunk-EMSSTOOK.js";
|
|
15
15
|
export {
|
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
createCanonicalStorageService,
|
|
3
3
|
getCanonicalStorageCapabilities,
|
|
4
4
|
listCanonicalStorageProviders
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-T7R6Q7TZ.js";
|
|
6
|
+
import "../chunk-F6CHRGJ6.js";
|
|
7
|
+
import "../chunk-WPN3SMIT.js";
|
|
8
|
+
import "../chunk-PECE5QKV.js";
|
|
9
|
+
import "../chunk-CTBVXX5C.js";
|
|
10
|
+
import "../chunk-X57LLCAQ.js";
|
|
11
11
|
import "../chunk-FKK23J2A.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-O25T5KCE.js";
|
|
13
13
|
import {
|
|
14
14
|
UnsupportedStorageOperation,
|
|
15
15
|
assertStorageOperation,
|
|
16
16
|
normalizeStoragePath,
|
|
17
17
|
readOnlyService
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-HJE4CVKY.js";
|
|
19
19
|
import "../chunk-I6T64MLT.js";
|
|
20
20
|
import "../chunk-EMSSTOOK.js";
|
|
21
21
|
export {
|
|
@@ -262,15 +262,6 @@ import {
|
|
|
262
262
|
instantiateSubgraph
|
|
263
263
|
} from "./chunk-OXUDG6HE.js";
|
|
264
264
|
import "./chunk-RHRXPY2U.js";
|
|
265
|
-
import {
|
|
266
|
-
LifecycleCycleError,
|
|
267
|
-
LifecycleGraph,
|
|
268
|
-
SKIPO_STATE,
|
|
269
|
-
SkipoStateEngine,
|
|
270
|
-
useLifecycleScope,
|
|
271
|
-
useSkipoBind,
|
|
272
|
-
useSkipoState
|
|
273
|
-
} from "./chunk-EW4ACSZB.js";
|
|
274
265
|
import {
|
|
275
266
|
CommandApi,
|
|
276
267
|
GhostStore,
|
|
@@ -285,6 +276,15 @@ import {
|
|
|
285
276
|
CustomViewWindow,
|
|
286
277
|
DEFAULT_GRAPH_SETTINGS
|
|
287
278
|
} from "./chunk-5KP74NMF.js";
|
|
279
|
+
import {
|
|
280
|
+
LifecycleCycleError,
|
|
281
|
+
LifecycleGraph,
|
|
282
|
+
SKIPO_STATE,
|
|
283
|
+
SkipoStateEngine,
|
|
284
|
+
useLifecycleScope,
|
|
285
|
+
useSkipoBind,
|
|
286
|
+
useSkipoState
|
|
287
|
+
} from "./chunk-EW4ACSZB.js";
|
|
288
288
|
import {
|
|
289
289
|
AttractionEngine,
|
|
290
290
|
GhostInferenceEngine,
|
|
@@ -262,15 +262,6 @@ import {
|
|
|
262
262
|
instantiateSubgraph
|
|
263
263
|
} from "./chunk-OXUDG6HE.js";
|
|
264
264
|
import "./chunk-RHRXPY2U.js";
|
|
265
|
-
import {
|
|
266
|
-
LifecycleCycleError,
|
|
267
|
-
LifecycleGraph,
|
|
268
|
-
SKIPO_STATE,
|
|
269
|
-
SkipoStateEngine,
|
|
270
|
-
useLifecycleScope,
|
|
271
|
-
useSkipoBind,
|
|
272
|
-
useSkipoState
|
|
273
|
-
} from "./chunk-EW4ACSZB.js";
|
|
274
265
|
import {
|
|
275
266
|
CommandApi,
|
|
276
267
|
GhostStore,
|
|
@@ -285,6 +276,15 @@ import {
|
|
|
285
276
|
CustomViewWindow,
|
|
286
277
|
DEFAULT_GRAPH_SETTINGS
|
|
287
278
|
} from "./chunk-5KP74NMF.js";
|
|
279
|
+
import {
|
|
280
|
+
LifecycleCycleError,
|
|
281
|
+
LifecycleGraph,
|
|
282
|
+
SKIPO_STATE,
|
|
283
|
+
SkipoStateEngine,
|
|
284
|
+
useLifecycleScope,
|
|
285
|
+
useSkipoBind,
|
|
286
|
+
useSkipoState
|
|
287
|
+
} from "./chunk-EW4ACSZB.js";
|
|
288
288
|
import {
|
|
289
289
|
AttractionEngine,
|
|
290
290
|
GhostInferenceEngine,
|