@vite-hub/workspace 0.0.1 → 0.0.3

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.
Files changed (95) hide show
  1. package/README.md +225 -17
  2. package/dist/{ai-Bk3LLnit.js → ai-Ce3PtWFW.js} +160 -29
  3. package/dist/ai-nmHdzjCM.d.ts +162 -0
  4. package/dist/ai.d.ts +2 -85
  5. package/dist/ai.js +1 -1
  6. package/dist/asset-registry-CaG9b7tf.js +19 -0
  7. package/dist/cloudflare.d.ts +18 -0
  8. package/dist/cloudflare.js +2 -0
  9. package/dist/collections/client.d.ts +39 -0
  10. package/dist/collections/client.js +137 -0
  11. package/dist/collections.d.ts +59 -0
  12. package/dist/collections.js +159 -0
  13. package/dist/config-3I1BnsdO.d.ts +28 -0
  14. package/dist/config-CDoyls2X.js +30 -0
  15. package/dist/config-CZLO0m9h.js +7811 -0
  16. package/dist/file-CHfsZpso.js +23 -0
  17. package/dist/{files-DbsIjBya.js → files-QRV55OCx.js} +6 -5
  18. package/dist/github-CfA5vpJ5.js +189 -0
  19. package/dist/glob-D0vD_wRY.js +17 -0
  20. package/dist/host-CAnbugpI.js +370 -0
  21. package/dist/hosted-C1-tTTTf.js +581 -0
  22. package/dist/{providers/vercel/blob-store.js → hosted-vercel-blob-CWBILDVo.js} +100 -19
  23. package/dist/hosted-vercel-blob.d.ts +15 -0
  24. package/dist/hosted-vercel-blob.js +2 -0
  25. package/dist/hosted.d.ts +18 -0
  26. package/dist/hosted.js +2 -0
  27. package/dist/index.d.ts +129 -102
  28. package/dist/index.js +477 -599
  29. package/dist/lifecycle-BYoa9hVb.js +176 -0
  30. package/dist/loader.d.ts +1 -1
  31. package/dist/loader.js +1 -1
  32. package/dist/mountx.d.ts +10 -0
  33. package/dist/mountx.js +143 -0
  34. package/dist/nitro.d.ts +2 -31
  35. package/dist/nitro.js +2 -2
  36. package/dist/nuxt.d.ts +26 -0
  37. package/dist/nuxt.js +36 -0
  38. package/dist/path-CNI6wKIU.js +115 -0
  39. package/dist/{provider-BZuKAV4e.js → provider-C3_elpEh.js} +142 -37
  40. package/dist/providers/github/store.d.ts +6 -0
  41. package/dist/providers/github/store.js +2 -0
  42. package/dist/publish.d.ts +3 -2
  43. package/dist/publish.js +48 -142
  44. package/dist/{registry-D4Qzq26I.d.ts → registry-BIQVCBWI.d.ts} +3 -2
  45. package/dist/registry-CqyDTW9Y.js +74 -0
  46. package/dist/request-execution-u9mgUXKX.js +80 -0
  47. package/dist/runtime/assets.d.ts +2 -1
  48. package/dist/runtime/assets.js +5 -5
  49. package/dist/runtime/empty-assets-registry.d.ts +1 -1
  50. package/dist/runtime/empty-registry.d.ts +1 -1
  51. package/dist/runtime/state.d.ts +4 -21
  52. package/dist/runtime/state.js +7 -4
  53. package/dist/runtime/workspace.d.ts +2 -0
  54. package/dist/runtime/workspace.js +2 -0
  55. package/dist/runtime-options-BsPSv5O7.js +13 -0
  56. package/dist/runtime.d.ts +38 -0
  57. package/dist/runtime.js +626 -0
  58. package/dist/{search-DtaEyjpO.js → search-C4REyHj9.js} +2 -2
  59. package/dist/server.d.ts +65 -0
  60. package/dist/server.js +355 -0
  61. package/dist/shared-jfogBrd5.js +273 -0
  62. package/dist/source-metadata.d.ts +2 -0
  63. package/dist/source-metadata.js +2 -0
  64. package/dist/state-TTqa3x3Y.d.ts +25 -0
  65. package/dist/store-Bs1SLh55.js +414 -0
  66. package/dist/sync-DiuDmSGk.js +269 -0
  67. package/dist/target-D4Bqb1eH.js +11 -0
  68. package/dist/test.d.ts +1 -1
  69. package/dist/test.js +1 -1
  70. package/dist/types-60Yn149G.d.ts +612 -0
  71. package/dist/use-CUFSnFCS.d.ts +86 -0
  72. package/dist/use-CsV3oIxH.js +336 -0
  73. package/dist/vite-tbfDxtlu.js +2191 -0
  74. package/dist/vite.d.ts +33 -5
  75. package/dist/vite.js +2 -131
  76. package/dist/workspace-66SKyiec.d.ts +6 -0
  77. package/dist/workspace-C4k92Ow8.js +1460 -0
  78. package/package.json +143 -62
  79. package/dist/asset-registry-CMuQbyvl.js +0 -14
  80. package/dist/cloudflare-env-DL94Uvpz.js +0 -12
  81. package/dist/config-CvS-7sre.js +0 -49
  82. package/dist/errors-BUL8SoFS.js +0 -21
  83. package/dist/lifecycle-uD82JeGh.js +0 -92
  84. package/dist/module-8LZUMEXC.js +0 -922
  85. package/dist/path-BVv9OXhg.js +0 -63
  86. package/dist/providers/cloudflare/artifacts-store.d.ts +0 -6
  87. package/dist/providers/cloudflare/artifacts-store.js +0 -384
  88. package/dist/providers/vercel/blob-store.d.ts +0 -6
  89. package/dist/registry-Cnr0NoKv.js +0 -932
  90. package/dist/runtime/nitro-plugin.d.ts +0 -6
  91. package/dist/runtime/nitro-plugin.js +0 -14
  92. package/dist/sandbox-DtGXCWRq.js +0 -198
  93. package/dist/types-CwNcWTdt.d.ts +0 -378
  94. package/dist/utils-BtAm_K5P.js +0 -51
  95. /package/dist/{chunk-DrSxFLj_.js → chunk-8H4AJuhK.js} +0 -0
package/package.json CHANGED
@@ -1,26 +1,29 @@
1
1
  {
2
2
  "name": "@vite-hub/workspace",
3
- "version": "0.0.1",
4
- "description": "Agent-oriented filesystem state and Vite/Nitro integration for ViteHub.",
5
- "author": "onmax <maximogarciamtnez@gmail.com>",
6
- "license": "Apache-2.0",
3
+ "version": "0.0.3",
4
+ "description": "Agent-oriented filesystem state and Vite integration for ViteHub.",
5
+ "keywords": [
6
+ "cloudflare",
7
+ "vercel",
8
+ "vite",
9
+ "vitehub",
10
+ "workspace"
11
+ ],
7
12
  "homepage": "https://github.com/vite-hub/vitehub#readme",
13
+ "bugs": "https://github.com/vite-hub/vitehub/issues",
14
+ "license": "Apache-2.0",
15
+ "author": "onmax <maximogarciamtnez@gmail.com>",
8
16
  "repository": {
9
17
  "type": "git",
10
18
  "url": "git+https://github.com/vite-hub/vitehub.git",
11
19
  "directory": "packages/workspace"
12
20
  },
13
- "bugs": "https://github.com/vite-hub/vitehub/issues",
14
- "keywords": [
15
- "vitehub",
16
- "vite",
17
- "nitro",
18
- "workspace",
19
- "cloudflare",
20
- "vercel"
21
+ "files": [
22
+ "dist",
23
+ "package.json"
21
24
  ],
22
- "sideEffects": false,
23
25
  "type": "module",
26
+ "sideEffects": false,
24
27
  "types": "./dist/index.d.ts",
25
28
  "imports": {
26
29
  "#vitehub-workspace-assets-registry": {
@@ -33,73 +36,151 @@
33
36
  }
34
37
  },
35
38
  "exports": {
36
- ".": "./dist/index.js",
37
- "./ai": "./dist/ai.js",
38
- "./loader": "./dist/loader.js",
39
- "./nitro": "./dist/nitro.js",
40
- "./publish": "./dist/publish.js",
41
- "./test": "./dist/test.js",
42
- "./vite": "./dist/vite.js",
39
+ ".": {
40
+ "types": "./dist/index.d.ts",
41
+ "import": "./dist/index.js"
42
+ },
43
+ "./ai": {
44
+ "types": "./dist/ai.d.ts",
45
+ "import": "./dist/ai.js"
46
+ },
47
+ "./cloudflare": {
48
+ "types": "./dist/cloudflare.d.ts",
49
+ "import": "./dist/cloudflare.js"
50
+ },
51
+ "./collections": {
52
+ "types": "./dist/collections.d.ts",
53
+ "import": "./dist/collections.js"
54
+ },
55
+ "./collections/client": {
56
+ "types": "./dist/collections/client.d.ts",
57
+ "import": "./dist/collections/client.js"
58
+ },
59
+ "./loader": {
60
+ "types": "./dist/loader.d.ts",
61
+ "import": "./dist/loader.js"
62
+ },
63
+ "./mountx": {
64
+ "types": "./dist/mountx.d.ts",
65
+ "import": "./dist/mountx.js"
66
+ },
67
+ "./nitro": {
68
+ "types": "./dist/nitro.d.ts",
69
+ "import": "./dist/nitro.js"
70
+ },
71
+ "./nuxt": {
72
+ "types": "./dist/nuxt.d.ts",
73
+ "import": "./dist/nuxt.js"
74
+ },
75
+ "./publish": {
76
+ "types": "./dist/publish.d.ts",
77
+ "import": "./dist/publish.js"
78
+ },
79
+ "./runtime": {
80
+ "types": "./dist/runtime.d.ts",
81
+ "import": "./dist/runtime.js"
82
+ },
83
+ "./server": {
84
+ "types": "./dist/server.d.ts",
85
+ "import": "./dist/server.js"
86
+ },
87
+ "./source-metadata": {
88
+ "types": "./dist/source-metadata.d.ts",
89
+ "import": "./dist/source-metadata.js"
90
+ },
91
+ "./test": {
92
+ "types": "./dist/test.d.ts",
93
+ "import": "./dist/test.js"
94
+ },
95
+ "./vite": {
96
+ "types": "./dist/vite.d.ts",
97
+ "import": "./dist/vite.js"
98
+ },
43
99
  "./package.json": "./package.json",
44
- "./internal/runtime/assets": "./dist/runtime/assets.js",
45
- "./internal/runtime/empty-assets-registry": "./dist/runtime/empty-assets-registry.js",
46
- "./internal/runtime/empty-registry": "./dist/runtime/empty-registry.js",
47
- "./internal/runtime/nitro-plugin": "./dist/runtime/nitro-plugin.js",
48
- "./internal/runtime/state": "./dist/runtime/state.js",
49
- "./internal/stores/cloudflare-artifacts": "./dist/providers/cloudflare/artifacts-store.js",
50
- "./internal/stores/vercel-blob": "./dist/providers/vercel/blob-store.js"
100
+ "./internal/runtime/assets": {
101
+ "types": "./dist/runtime/assets.d.ts",
102
+ "import": "./dist/runtime/assets.js"
103
+ },
104
+ "./internal/runtime/hosted": {
105
+ "types": "./dist/hosted.d.ts",
106
+ "import": "./dist/hosted.js"
107
+ },
108
+ "./internal/runtime/hosted-vercel-blob": {
109
+ "types": "./dist/hosted-vercel-blob.d.ts",
110
+ "import": "./dist/hosted-vercel-blob.js"
111
+ },
112
+ "./internal/runtime/state": {
113
+ "types": "./dist/runtime/state.d.ts",
114
+ "import": "./dist/runtime/state.js"
115
+ },
116
+ "./internal/runtime/workspace": {
117
+ "types": "./dist/runtime/workspace.d.ts",
118
+ "import": "./dist/runtime/workspace.js"
119
+ },
120
+ "./internal/stores/github": {
121
+ "types": "./dist/providers/github/store.d.ts",
122
+ "import": "./dist/providers/github/store.js"
123
+ }
51
124
  },
52
- "files": [
53
- "dist",
54
- "package.json"
55
- ],
56
125
  "dependencies": {
57
- "defu": "^6.1.4",
58
- "exsolve": "^1.0.8",
59
- "files-sdk": "^1.2.0",
60
- "isomorphic-git": "^1.37.6",
61
- "jiti": "^2.6.1",
62
- "minimatch": "^10.1.1",
63
- "@vite-hub/shell": "0.0.1",
64
- "@vite-hub/source": "0.0.1"
126
+ "@vercel/nft": "^1.10.2",
127
+ "defu": "^6.1.7",
128
+ "exsolve": "^1.1.0",
129
+ "h3": "2.0.1-rc.25",
130
+ "isomorphic-git": "^1.38.7",
131
+ "jiti": "^2.7.0",
132
+ "mountx": "0.0.2",
133
+ "minimatch": "^10.2.5",
134
+ "mrmime": "^2.0.1",
135
+ "ofetch": "^1.5.1",
136
+ "@vite-hub/box": "0.0.3",
137
+ "@vite-hub/markdown-template": "0.0.3",
138
+ "@vite-hub/source": "0.0.3",
139
+ "@vite-hub/runtime": "0.0.3"
140
+ },
141
+ "devDependencies": {
142
+ "@types/node": "^24.13.3",
143
+ "@vercel/blob": "^2.6.1",
144
+ "ai": "7.0.19",
145
+ "ocache": "^0.1.5",
146
+ "publint": "^0.3.21",
147
+ "typescript": "^6.0.3",
148
+ "vite": "^8.0.8",
149
+ "vite-plus": "^0.1.24",
150
+ "vitest": "^4.1.4",
151
+ "vue": "^3.5.0",
152
+ "@vite-hub/env": "0.0.3",
153
+ "@vite-hub/internal": "0.0.1",
154
+ "@vite-hub/shell": "0.0.3"
65
155
  },
66
156
  "peerDependencies": {
67
- "ai": "^6.0.0",
68
- "nitro": "^3.0.0-0",
157
+ "@vercel/blob": "^2.6.1",
158
+ "ai": "^6.0.0 || ^7.0.0-0",
69
159
  "vite": ">=8.0.0",
70
- "@vite-hub/sandbox": "0.0.1"
160
+ "vue": "^3.5.0",
161
+ "@vite-hub/shell": "0.0.3"
71
162
  },
72
163
  "peerDependenciesMeta": {
73
- "@vite-hub/sandbox": {
164
+ "@vercel/blob": {
74
165
  "optional": true
75
166
  },
76
- "nitro": {
167
+ "@vite-hub/shell": {
77
168
  "optional": true
78
169
  },
79
170
  "vite": {
80
171
  "optional": true
172
+ },
173
+ "vue": {
174
+ "optional": true
81
175
  }
82
176
  },
83
- "devDependencies": {
84
- "@types/node": "^25.6.0",
85
- "ai": "^6.0.172",
86
- "nitro": "3.0.260311-beta",
87
- "ocache": "^0.1.4",
88
- "ofetch": "^1.5.1",
89
- "publint": "^0.3.15",
90
- "tsdown": "^0.21.8",
91
- "tsx": "^4.21.0",
92
- "typescript": "^6.0.2",
93
- "vite": "^8.0.8",
94
- "vitest": "^4.1.4",
95
- "@vite-hub/internal": "0.0.1",
96
- "@vite-hub/sandbox": "0.0.1"
177
+ "engines": {
178
+ "node": ">=24.0.0"
97
179
  },
98
180
  "scripts": {
99
- "build": "tsdown --tsconfig tsconfig.build.json",
100
- "dev": "tsdown --watch",
101
- "test:e2e": "tsx ./test/e2e.ts",
181
+ "build": "vp pack",
182
+ "dev": "vp pack --watch",
102
183
  "typecheck": "tsc --noEmit -p ./tsconfig.json",
103
- "test": "pnpm --filter @vite-hub/workspace... build && vitest run"
184
+ "test": "vp run -t @vite-hub/workspace#build && vp test"
104
185
  }
105
186
  }
@@ -1,14 +0,0 @@
1
- import { n as WorkspaceNotFoundError } from "./errors-BUL8SoFS.js";
2
- import workspaceAssetsRegistry from "#vitehub-workspace-assets-registry";
3
- //#region src/asset-registry.ts
4
- let assetsRegistry = workspaceAssetsRegistry;
5
- function setWorkspaceAssetsRegistry(registry) {
6
- assetsRegistry = registry;
7
- }
8
- function useWorkspaceAssets(name) {
9
- const assets = assetsRegistry[name];
10
- if (!assets) throw new WorkspaceNotFoundError(name);
11
- return assets;
12
- }
13
- //#endregion
14
- export { useWorkspaceAssets as n, setWorkspaceAssetsRegistry as t };
@@ -1,12 +0,0 @@
1
- import { AsyncLocalStorage } from "node:async_hooks";
2
- //#region ../internal/src/runtime/cloudflare-env.ts
3
- let activeEnv;
4
- const activeEnvStorage = new AsyncLocalStorage();
5
- function getActiveCloudflareEnv() {
6
- return activeEnvStorage.getStore() ?? activeEnv ?? globalThis.__env__;
7
- }
8
- function getActiveCloudflareBinding(name) {
9
- return getActiveCloudflareEnv()?.[name];
10
- }
11
- //#endregion
12
- export { getActiveCloudflareBinding as t };
@@ -1,49 +0,0 @@
1
- import { i as normalizeSafeWorkspacePath } from "./path-BVv9OXhg.js";
2
- import { defu } from "defu";
3
- //#region src/sources/config.ts
4
- const liveSourcePaths = /* @__PURE__ */ new WeakMap();
5
- function markLiveWorkspaceSource(source, paths) {
6
- liveSourcePaths.set(source, paths);
7
- return source;
8
- }
9
- function createSourceContext(definition) {
10
- return {
11
- rootDir: definition.rootDir || process.cwd(),
12
- sourceRootDir: definition.sourceRootDir,
13
- workspace: definition.name
14
- };
15
- }
16
- function normalizeWorkspaceSources(sources) {
17
- if (!sources) return [];
18
- return Object.entries(sources).map(([key, source]) => normalizeWorkspaceSource(key, source)).sort((left, right) => right.mountPath.length - left.mountPath.length || left.key.localeCompare(right.key));
19
- }
20
- function normalizeWorkspaceSource(key, source) {
21
- const mount = normalizeSourceMount(source);
22
- const cache = mount.cache ?? normalizeSourceCache(source) ?? false;
23
- return {
24
- key,
25
- source,
26
- mountPath: normalizeSafeWorkspacePath(typeof mount.path === "string" ? mount.path : key, { allowEmpty: true }),
27
- materialize: mount.materialize || source.materialize || (cache ? "lazy" : "build"),
28
- cache,
29
- validate: mount.validate ?? source.validate ?? false,
30
- livePaths: liveSourcePaths.get(source),
31
- readonly: true
32
- };
33
- }
34
- function sourceMountContainsPath(source, workspacePath) {
35
- return workspacePath === source.mountPath || !!source.mountPath && workspacePath.startsWith(`${source.mountPath}/`);
36
- }
37
- function sourceMountIntersectsPath(source, workspacePath) {
38
- return !workspacePath || !source.mountPath || sourceMountContainsPath(source, workspacePath) || source.mountPath.startsWith(`${workspacePath}/`);
39
- }
40
- function normalizeSourceMount(source) {
41
- if (typeof source.mount === "string") return { path: source.mount };
42
- return source.mount || {};
43
- }
44
- function normalizeSourceCache(source) {
45
- if (source.cache === false) return false;
46
- if (source.cache) return defu(source.cache, {});
47
- }
48
- //#endregion
49
- export { sourceMountIntersectsPath as a, sourceMountContainsPath as i, markLiveWorkspaceSource as n, normalizeWorkspaceSources as r, createSourceContext as t };
@@ -1,21 +0,0 @@
1
- //#region src/core/errors.ts
2
- var WorkspaceError = class extends Error {
3
- constructor(message, options) {
4
- super(message, options);
5
- this.name = "WorkspaceError";
6
- }
7
- };
8
- var WorkspaceNotFoundError = class extends WorkspaceError {
9
- constructor(name) {
10
- super(`[vitehub] Workspace "${name}" is not registered.`);
11
- this.name = "WorkspaceNotFoundError";
12
- }
13
- };
14
- var WorkspacePathError = class extends WorkspaceError {
15
- constructor(path) {
16
- super(`[vitehub] Workspace path escapes the workspace root: ${JSON.stringify(path)}.`);
17
- this.name = "WorkspacePathError";
18
- }
19
- };
20
- //#endregion
21
- export { WorkspaceNotFoundError as n, WorkspacePathError as r, WorkspaceError as t };
@@ -1,92 +0,0 @@
1
- import { t as __exportAll } from "./chunk-DrSxFLj_.js";
2
- import { o as normalizeWorkspacePath } from "./path-BVv9OXhg.js";
3
- import { r as normalizeWorkspaceSources, t as createSourceContext } from "./config-CvS-7sre.js";
4
- import { t as files } from "./files-DbsIjBya.js";
5
- //#region src/lifecycle.ts
6
- var lifecycle_exports = /* @__PURE__ */ __exportAll({
7
- publishWorkspaceSnapshot: () => publishWorkspaceSnapshot,
8
- syncWorkspaceDefinition: () => syncWorkspaceDefinition
9
- });
10
- const buildSourcesMetaKey = "workspace:build-sources";
11
- async function publishWorkspaceSnapshot(definition, store, snapshot) {
12
- for (const publisher of definition.publish || []) await publisher.publish({
13
- workspace: definition,
14
- store,
15
- rootDir: definition.rootDir || process.cwd(),
16
- snapshot
17
- });
18
- }
19
- async function syncWorkspaceDefinition(definition, store) {
20
- const loaders = definition.loaders?.length ? definition.loaders : [files()];
21
- const hasExplicitLoaders = !!definition.loaders?.length;
22
- const ctxSource = createSourceContext(definition);
23
- const buildSources = normalizeWorkspaceSources(definition.sources).filter((source) => source.materialize === "build");
24
- if (!await reconcileBuildSourceMounts(store, buildSources) && !hasExplicitLoaders) return;
25
- const normalizedSources = buildSources.map((source) => createMountedBuildSource(source));
26
- const ctx = {
27
- workspace: definition.name,
28
- rootDir: ctxSource.rootDir,
29
- sourceRootDir: ctxSource.sourceRootDir,
30
- sources: normalizedSources,
31
- store,
32
- parseData: async (input) => input.data,
33
- generateDigest: (input) => JSON.stringify(input),
34
- logger: console
35
- };
36
- for (const loader of loaders) await loader.load(ctx);
37
- await publishWorkspaceSnapshot(definition, store, await store.snapshot({ name: "sync" }));
38
- }
39
- async function reconcileBuildSourceMounts(store, currentSources) {
40
- const previousSources = await readSyncedBuildSources(store);
41
- const hasBuildSourceState = previousSources.length > 0 || currentSources.length > 0;
42
- const resetPaths = [...new Set([...previousSources.map((source) => source.mountPath), ...currentSources.map((source) => source.mountPath)])];
43
- for (const mountPath of resetPaths.filter(Boolean).sort((a, b) => b.length - a.length)) await store.rm(mountPath, {
44
- recursive: true,
45
- force: true
46
- });
47
- for (const source of [...previousSources, ...currentSources].filter((source) => !source.mountPath)) await removeRootBuildSourceFiles(store, source);
48
- for (const mountPath of [...new Set(currentSources.map((source) => source.mountPath))].filter(Boolean).sort((a, b) => a.length - b.length)) await store.mkdir(mountPath, { recursive: true });
49
- await store.setMeta?.(buildSourcesMetaKey, currentSources.map(({ key, mountPath }) => ({
50
- key,
51
- mountPath
52
- })));
53
- return hasBuildSourceState;
54
- }
55
- async function readSyncedBuildSources(store) {
56
- const value = await store.getMeta?.(buildSourcesMetaKey);
57
- if (!Array.isArray(value)) return [];
58
- return value.filter(isSyncedBuildSource);
59
- }
60
- async function removeRootBuildSourceFiles(store, source) {
61
- const entries = await store.list("", { recursive: true });
62
- await Promise.all(entries.map(async (entry) => {
63
- if (entry.type !== "file") return;
64
- if ((await store.readFile(entry.path))?.metadata?.source === source.key) await store.rm(entry.path, { force: true });
65
- }));
66
- }
67
- function isSyncedBuildSource(value) {
68
- return !!value && typeof value === "object" && typeof value.key === "string" && typeof value.mountPath === "string";
69
- }
70
- function createMountedBuildSource(source) {
71
- return {
72
- ...source.source,
73
- key: source.key,
74
- async getKeys(ctx) {
75
- return await source.source.getKeys(ctx);
76
- },
77
- async getItem(key, ctx) {
78
- const item = await source.source.getItem(key, ctx);
79
- const path = normalizeWorkspacePath(`${source.mountPath}/${item.path || item.key}`);
80
- return {
81
- ...item,
82
- path,
83
- metadata: {
84
- ...item.metadata,
85
- source: source.key
86
- }
87
- };
88
- }
89
- };
90
- }
91
- //#endregion
92
- export { syncWorkspaceDefinition as n, lifecycle_exports as t };