@vite-hub/workspace 0.5.0 → 0.6.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.
Files changed (112) hide show
  1. package/dist/{abort-BCwpdrN0.js → abort-CQGxJBqa.js} +1 -2
  2. package/dist/{asset-registry-DfBV5kmw.js → asset-registry-0CdRAjIV.js} +2 -3
  3. package/dist/blob-database/postgres.d.ts +2 -3
  4. package/dist/blob-database/postgres.js +1 -2
  5. package/dist/{blob-database-sources-DDZ1wV9w.js → blob-database-sources-CQPAyCz3.js} +1 -2
  6. package/dist/blob-database.d.ts +2 -8
  7. package/dist/blob-database.js +12 -15
  8. package/dist/checkout.d.ts +1 -2
  9. package/dist/checkout.js +3 -4
  10. package/dist/cloudflare.d.ts +1 -5
  11. package/dist/cloudflare.js +1 -2
  12. package/dist/{config-B-863EgC.js → config-CsgNNVAI.js} +1 -2
  13. package/dist/{config-hxABr_Gg.d.ts → config-DeA287c0.d.ts} +1 -5
  14. package/dist/{config-DiyPi3Ff.js → config-jo5QgE1w.js} +18 -27
  15. package/dist/{discard-CNNtCozM.js → discard-BkoLmmmN.js} +1 -2
  16. package/dist/durability.d.ts +2 -5
  17. package/dist/durability.js +4 -5
  18. package/dist/{error-diagnostics-Cth97txN.js → error-diagnostics-B4me-ouV.js} +1 -2
  19. package/dist/{error-diagnostics-C0KyI408.js → error-diagnostics-kKXseq8d.js} +5 -2
  20. package/dist/{errors-DXCZjdUU.d.ts → errors-CnFDXxeJ.d.ts} +0 -2
  21. package/dist/{file-C1DYoGz3.js → file-BrNAXQgY.js} +4 -8
  22. package/dist/{file-metadata-Dv2JZwal.js → file-metadata-Bpsvjw_X.js} +2 -3
  23. package/dist/{files-iHyik8jj.js → files--z2dLC5z.js} +3 -4
  24. package/dist/files.d.ts +6 -10
  25. package/dist/files.js +6 -6
  26. package/dist/{github-CFHl6RI0.js → github-k--_LCrX.js} +7 -9
  27. package/dist/{glob-BitxqDhb.js → glob-BEutagp1.js} +3 -4
  28. package/dist/{glob-Buxfvmyy.js → glob-BreFjNAV.js} +3 -4
  29. package/dist/{history-schema-BBWbpDk4.d.ts → history-schema-BR4UDPHL.d.ts} +0 -2
  30. package/dist/{history-schema-postgres-U_ueRvmO.js → history-schema-postgres-DZepCSBq.js} +0 -1
  31. package/dist/{host-Dmr2Ctem.js → host-C8yZizfk.js} +11 -14
  32. package/dist/{hosted-BktlvkF2.js → hosted-8BTKAtMX.js} +15 -18
  33. package/dist/{hosted-vercel-blob-D0IPAjb1.js → hosted-vercel-blob-B6kygYqn.js} +10 -12
  34. package/dist/hosted-vercel-blob.d.ts +1 -3
  35. package/dist/hosted-vercel-blob.js +1 -2
  36. package/dist/hosted.d.ts +1 -3
  37. package/dist/hosted.js +1 -2
  38. package/dist/index.d.ts +7 -25
  39. package/dist/index.js +18 -22
  40. package/dist/internal/path.d.ts +1 -1
  41. package/dist/internal/path.js +1 -2
  42. package/dist/internal/workspace.d.ts +1 -5
  43. package/dist/internal/workspace.js +2 -3
  44. package/dist/{lifecycle-D6WN2dd_.js → lifecycle-IReZfi0b.js} +9 -10
  45. package/dist/lineage.d.ts +1 -3
  46. package/dist/lineage.js +1 -2
  47. package/dist/loader.d.ts +1 -7
  48. package/dist/loader.js +4 -6
  49. package/dist/{mcp-resources-TtxLNSL6.js → mcp-resources-DeJnbOaw.js} +4 -5
  50. package/dist/{memory-DjzwSng2.js → memory-BlSRrBH1.js} +7 -9
  51. package/dist/{metadata-target-CR0aDtvS.js → metadata-target-CaGLY4ay.js} +15 -23
  52. package/dist/{object-Da1zyPCR.js → object-CAK6UYR5.js} +1 -2
  53. package/dist/{operation-definition-CI2PJGqu.d.ts → operation-definition-CqZkx1Rm.d.ts} +0 -4
  54. package/dist/{operations-Cib30_dt.js → operations-BIaK_uYG.js} +7 -8
  55. package/dist/{operations-dtcU5LkD.js → operations-DS1C4uXd.js} +22 -29
  56. package/dist/operations.d.ts +2 -6
  57. package/dist/operations.js +2 -2
  58. package/dist/{path-BlIBpI7U.js → path-Bb9OIc_F.js} +2 -3
  59. package/dist/{path-zHxQUbqa.d.ts → path-C0uZxDdW.d.ts} +0 -2
  60. package/dist/{path-DrSIenjj.js → path-CuYE8-X6.js} +2 -4
  61. package/dist/{plugins-DKCBrH31.d.ts → plugins-CLc32jvL.d.ts} +1 -3
  62. package/dist/{provider-Fc3M6bEx.js → provider-CN14ewvx.js} +15 -20
  63. package/dist/providers/github/store.d.ts +2 -4
  64. package/dist/providers/github/store.js +1 -2
  65. package/dist/{registry-DpB5PBA4.d.ts → registry-B0g19sdy.d.ts} +1 -5
  66. package/dist/{registry-CedQvQxW.js → registry-BbUg9vJB.js} +4 -5
  67. package/dist/{registry-CLL0TY0L.d.ts → registry-s2Ob9PeX.d.ts} +2 -4
  68. package/dist/{request-scope-Bcv2kD8h.js → request-scope-CXCI_wCb.js} +2 -3
  69. package/dist/{results-DgkZUmTL.js → results-z-HpV9EP.js} +1 -2
  70. package/dist/{rolldown-runtime-rQ84J-ij.js → rolldown-runtime-DnNXxpGL.js} +2 -3
  71. package/dist/{rule-keys-Bsz6jTTF.js → rule-keys-BLEbi1h5.js} +2 -3
  72. package/dist/{rules-OHaPFopX.js → rules-BPDXypZV.js} +6 -8
  73. package/dist/runtime/assets.d.ts +2 -3
  74. package/dist/runtime/assets.js +5 -6
  75. package/dist/runtime/empty-assets-registry.d.ts +1 -3
  76. package/dist/runtime/empty-assets-registry.js +1 -2
  77. package/dist/runtime/empty-registry.d.ts +2 -4
  78. package/dist/runtime/empty-registry.js +1 -2
  79. package/dist/runtime/registry.d.ts +1 -1
  80. package/dist/runtime/registry.js +2 -3
  81. package/dist/runtime/request.d.ts +1 -3
  82. package/dist/runtime/request.js +2 -3
  83. package/dist/runtime/state.d.ts +5 -5
  84. package/dist/runtime/state.js +9 -10
  85. package/dist/runtime/workspace.d.ts +1 -1
  86. package/dist/runtime/workspace.js +1 -2
  87. package/dist/runtime.d.ts +8 -24
  88. package/dist/runtime.js +21 -24
  89. package/dist/{search-BqNV9LnO.js → search-C_nVorq7.js} +3 -4
  90. package/dist/{server-CFtrOPk6.js → server-aa1a4rkV.js} +8 -10
  91. package/dist/server.d.ts +3 -4
  92. package/dist/server.js +1 -2
  93. package/dist/{shared-BgDjxY3J.js → shared-C20Wh1mp.js} +12 -19
  94. package/dist/source-metadata.d.ts +2 -6
  95. package/dist/source-metadata.js +4 -5
  96. package/dist/{state-DBV6VHS6.d.ts → state-BdDfBtOR.d.ts} +5 -15
  97. package/dist/{store-BRMdD8Ft.js → store-cx3OqNTi.js} +11 -14
  98. package/dist/{sync-BezGVzrW.js → sync-BBfR4g5y.js} +6 -7
  99. package/dist/test.d.ts +1 -1
  100. package/dist/test.js +1 -2
  101. package/dist/{types-9DMtFjaa.d.ts → types-Bel5IDmF.d.ts} +0 -2
  102. package/dist/{use-Dv973swc.d.ts → use-CpphIBof.d.ts} +1 -5
  103. package/dist/{use-Dm2tbI5F.js → use-D0DyTMxM.js} +12 -14
  104. package/dist/{use-tools-CMUthOdy.d.ts → use-tools-CAK10LTc.d.ts} +2 -4
  105. package/dist/{use-tools-C1qvhzme.js → use-tools-CHduR5k6.js} +7 -10
  106. package/dist/{utils-C0Au2R16.js → utils-DXP9xfXo.js} +7 -9
  107. package/dist/vite.d.ts +3 -21
  108. package/dist/vite.js +574 -409
  109. package/dist/{vitehub-grants-C8IAl5-M.js → vitehub-grants-Co713QTg.js} +2 -4
  110. package/dist/{workspace-Cw4ycIW-.d.ts → workspace-BOuxrZrP.d.ts} +1 -3
  111. package/dist/{workspace-CFrwWhEm.js → workspace-CLuPkyZR.js} +26 -35
  112. package/package.json +24 -24
@@ -1,4 +1,4 @@
1
- //#region ../internal/src/abort.ts
1
+ // ../internal/src/abort.ts
2
2
  /**
3
3
  * Runs `task` and rejects as soon as `signal` aborts, without waiting for the task.
4
4
  *
@@ -28,5 +28,4 @@ function abortReason(signal, message) {
28
28
  if (signal?.reason !== void 0) return signal.reason;
29
29
  return new DOMException(message, "AbortError");
30
30
  }
31
- //#endregion
32
31
  export { abortable as t };
@@ -1,6 +1,6 @@
1
- import { c as workspaceNotFoundError } from "./path-DrSIenjj.js";
1
+ import { c as workspaceNotFoundError } from "./path-CuYE8-X6.js";
2
2
  import runtimeAssetsRegistry from "#vitehub-workspace-assets-registry";
3
- //#region src/asset-registry.ts
3
+ // src/asset-registry.ts
4
4
  const workspaceAssetsRegistryKey = Symbol.for("vitehub.workspace.assetsRegistry");
5
5
  function workspaceAssetsRegistryGlobal() {
6
6
  const scope = globalThis;
@@ -16,5 +16,4 @@ function useWorkspaceAssets(name) {
16
16
  if (!assets) throw workspaceNotFoundError(name);
17
17
  return assets;
18
18
  }
19
- //#endregion
20
19
  export { useWorkspaceAssets as n, setWorkspaceAssetsRegistry as t };
@@ -1,5 +1,4 @@
1
- import { t as HistoryManifestFile } from "../history-schema-BBWbpDk4.js";
2
- //#region src/storage/history-schema-postgres.d.ts
1
+ import { t as HistoryManifestFile } from "../history-schema-BR4UDPHL.js";
3
2
  type HistoryFileIndex = Record<string, Pick<HistoryManifestFile, "digest" | "size"> & {
4
3
  fingerprint: string;
5
4
  }>;
@@ -421,4 +420,4 @@ export declare const workspaceHistorySchema: {
421
420
  isAlias: false;
422
421
  }>;
423
422
  };
424
- //#endregion
423
+ export {};
@@ -1,2 +1 @@
1
- import { t as workspaceHistorySchema } from "../history-schema-postgres-U_ueRvmO.js";
2
- export { workspaceHistorySchema };
1
+ export { t as workspaceHistorySchema } from "../history-schema-postgres-DZepCSBq.js";
@@ -1,9 +1,8 @@
1
- //#region src/storage/blob-database-sources.ts
1
+ // src/storage/blob-database-sources.ts
2
2
  const blobDatabaseSources = Symbol.for("vitehub.workspace.blobDatabaseSources");
3
3
  function readBlobDatabaseSources(store) {
4
4
  if (typeof store !== "object" || store === null) return void 0;
5
5
  const read = Reflect.get(store, blobDatabaseSources);
6
6
  return typeof read === "function" ? Reflect.apply(read, store, []) : void 0;
7
7
  }
8
- //#endregion
9
8
  export { readBlobDatabaseSources as n, blobDatabaseSources as t };
@@ -1,18 +1,13 @@
1
- import { n as workspaceHistorySchema } from "./history-schema-BBWbpDk4.js";
2
- import { Dn as WorkspaceStoreHistory, En as WorkspaceStore } from "./types-9DMtFjaa.js";
1
+ import { Dn as WorkspaceStoreHistory, En as WorkspaceStore } from "./types-Bel5IDmF.js";
2
+ import { n as workspaceHistorySchema } from "./history-schema-BR4UDPHL.js";
3
3
  import { AnyRelations } from "drizzle-orm";
4
4
  import { PgAsyncDatabase, PgQueryResultHKT } from "drizzle-orm/pg-core";
5
5
  import { BlobStorage } from "@vite-hub/blob";
6
6
  import { RuntimeDrizzleDatabase } from "@vite-hub/database";
7
- //#region src/storage/history-index-postgres.d.ts
8
7
  /** A Postgres Drizzle database with the tables of `workspaceHistorySchema` from `@vite-hub/workspace/blob-database/postgres`. */
9
8
  type PostgresHistoryDatabase = PgAsyncDatabase<PgQueryResultHKT, AnyRelations>;
10
- //#endregion
11
- //#region src/storage/history-index-sqlite.d.ts
12
9
  /** A SQLite, libSQL, or D1 Drizzle database with the tables of `workspaceHistorySchema`. */
13
10
  type SqliteHistoryDatabase = RuntimeDrizzleDatabase<Record<string, unknown>>;
14
- //#endregion
15
- //#region src/storage/blob-database.d.ts
16
11
  type HistoryDatabase = SqliteHistoryDatabase | PostgresHistoryDatabase;
17
12
  interface BlobDatabaseWorkspaceStoreOptions {
18
13
  /**
@@ -56,5 +51,4 @@ interface BlobDatabaseWorkspaceStore extends WorkspaceStore {
56
51
  }
57
52
  /** Blob stores bytes. The Database publishes immutable folder manifests and rejects a commit from a stale head. */
58
53
  export declare function createBlobDatabaseWorkspaceStore(options: BlobDatabaseWorkspaceStoreOptions): BlobDatabaseWorkspaceStore;
59
- //#endregion
60
54
  export { type BlobDatabaseWorkspaceStore, type BlobDatabaseWorkspaceStoreOptions, type BlobDatabaseWorkspaceStoreTarget, workspaceHistorySchema };
@@ -1,18 +1,18 @@
1
- import { n as forkMemoryWorkspaceStore, r as vitehubOwnedPrefix, t as createMemoryWorkspaceStore } from "./memory-DjzwSng2.js";
2
- import { a as workspaceConflict, s as workspaceError, t as normalizeSafeWorkspacePath } from "./path-DrSIenjj.js";
3
- import { n as copyJsonWorkspaceMetadata, t as copyJsonFileMetadata } from "./file-metadata-Dv2JZwal.js";
4
- import { a as isExcludedWorkspacePath, d as sha256, i as decodeFile, o as isWorkspaceBytes, r as contentToBytes } from "./path-BlIBpI7U.js";
5
- import { t as workspaceErrorDiagnostics } from "./error-diagnostics-Cth97txN.js";
6
- import { d as normalizeHistoryPath, f as normalizeHistoryRef, g as validateHistoryMessage, m as rejectHistoryHead, n as createSnapshotFromEntries, p as readHistoryDeleteRef, r as diffSnapshots, u as historyConflict } from "./utils-C0Au2R16.js";
7
- import { a as provideWorkspaceStoreTarget } from "./vitehub-grants-C8IAl5-M.js";
8
- import { t as blobDatabaseSources } from "./blob-database-sources-DDZ1wV9w.js";
9
- import { t as workspaceHistorySchema$1 } from "./history-schema-postgres-U_ueRvmO.js";
1
+ import { n as forkMemoryWorkspaceStore, r as vitehubOwnedPrefix, t as createMemoryWorkspaceStore } from "./memory-BlSRrBH1.js";
2
+ import { a as workspaceConflict, s as workspaceError, t as normalizeSafeWorkspacePath } from "./path-CuYE8-X6.js";
3
+ import { n as copyJsonWorkspaceMetadata, t as copyJsonFileMetadata } from "./file-metadata-Bpsvjw_X.js";
4
+ import { d as normalizeHistoryPath, f as normalizeHistoryRef, g as validateHistoryMessage, m as rejectHistoryHead, n as createSnapshotFromEntries, p as readHistoryDeleteRef, r as diffSnapshots, u as historyConflict } from "./utils-DXP9xfXo.js";
5
+ import { a as isExcludedWorkspacePath, d as sha256, i as decodeFile, o as isWorkspaceBytes, r as contentToBytes } from "./path-Bb9OIc_F.js";
6
+ import { a as provideWorkspaceStoreTarget } from "./vitehub-grants-Co713QTg.js";
7
+ import { t as blobDatabaseSources } from "./blob-database-sources-CQPAyCz3.js";
8
+ import { t as workspaceErrorDiagnostics } from "./error-diagnostics-B4me-ouV.js";
9
+ import { t as workspaceHistorySchema$1 } from "./history-schema-postgres-DZepCSBq.js";
10
10
  import { and, desc, eq, exists, getColumns, gte, inArray, is, isNotNull, isNull, lt, ne, notExists, sql } from "drizzle-orm";
11
11
  import { PgAsyncDatabase } from "drizzle-orm/pg-core/async/db";
12
12
  import { ViteHubError } from "@vite-hub/runtime";
13
13
  import { alias } from "drizzle-orm/pg-core";
14
14
  import { index as index$1, integer as integer$1, primaryKey as primaryKey$1, sqliteTable, text as text$1 } from "drizzle-orm/sqlite-core";
15
- //#region src/storage/history-index-postgres.ts
15
+ // src/storage/history-index-postgres.ts
16
16
  const { workspaceHistoryWorkspaces: workspaces$2, workspaceHistoryRefs: refs$2, workspaceHistoryRevisions: revisions$2, workspaceHistoryObjects: objects$2, workspaceHistoryMetadata: metadata$2 } = workspaceHistorySchema$1;
17
17
  const crossRef = alias(refs$2, "cross_ref");
18
18
  const { fileIndex: _fileIndex, ...revisionColumns } = getColumns(revisions$2);
@@ -271,8 +271,7 @@ const workspaceHistorySchema = {
271
271
  value: text$1("value", { mode: "json" }).$type().notNull()
272
272
  }, (table) => [primaryKey$1({ columns: [table.workspace, table.key] })])
273
273
  };
274
- //#endregion
275
- //#region src/storage/history-index-sqlite.ts
274
+ // src/storage/history-index-sqlite.ts
276
275
  const { workspaceHistoryWorkspaces: workspaces, workspaceHistoryRefs: refs, workspaceHistoryRevisions: revisions, workspaceHistoryObjects: objects, workspaceHistoryMetadata: metadata } = workspaceHistorySchema;
277
276
  function activeObject(workspace, digest) {
278
277
  return sql`${objects.workspace} = ${workspace} and ${objects.size} >= 0
@@ -481,8 +480,7 @@ function sqliteHistoryIndex(db) {
481
480
  }
482
481
  };
483
482
  }
484
- //#endregion
485
- //#region src/storage/blob-database.ts
483
+ // src/storage/blob-database.ts
486
484
  function publicRevision(row) {
487
485
  const revision = {
488
486
  id: row.id,
@@ -1033,5 +1031,4 @@ async function useBlobStore(name) {
1033
1031
  function createBlobDatabaseWorkspaceStore(options) {
1034
1032
  return new ContentAddressedWorkspaceStore(options);
1035
1033
  }
1036
- //#endregion
1037
1034
  export { createBlobDatabaseWorkspaceStore, workspaceHistorySchema };
@@ -1,5 +1,4 @@
1
1
  import { WorkspaceStaleFile } from "./lineage.js";
2
- //#region src/checkout.d.ts
3
2
  /** The lock file at the project root. Commit it: it records the remote revision that each checkout folder matches. */
4
3
  export declare const workspaceLockFile = "vitehub.lock";
5
4
  /** Calls one operation of the app, as `callOperationFromCli()` does. Tests pass a direct call. */
@@ -125,4 +124,4 @@ export declare function formatWorkspaceStatus(status: WorkspaceStatus): string;
125
124
  export declare function localCheckoutStatus(rootDir: string): Promise<WorkspaceStatus[] | undefined>;
126
125
  /** Marks conflicts without markers, such as binary files, as resolved: the local file is what the next push sends. */
127
126
  export declare function resolveWorkspaceConflicts(rootDir: string, workspace: string, paths: readonly string[]): Promise<string[]>;
128
- //#endregion
127
+ export {};
package/dist/checkout.js CHANGED
@@ -1,13 +1,13 @@
1
- import { t as workspaceErrorDiagnostics } from "./error-diagnostics-Cth97txN.js";
1
+ import { t as workspaceErrorDiagnostics } from "./error-diagnostics-B4me-ouV.js";
2
2
  import { staleDerivedFiles } from "./lineage.js";
3
- import { t as workspaceCommitRequestBytes } from "./results-DgkZUmTL.js";
3
+ import { t as workspaceCommitRequestBytes } from "./results-z-HpV9EP.js";
4
4
  import { isRuntimeDiagnostic } from "@vite-hub/runtime";
5
5
  import { basename, dirname, join, relative, resolve, sep } from "node:path";
6
6
  import { createHash, randomBytes } from "node:crypto";
7
7
  import { Diagnostic } from "nostics";
8
8
  import { constants } from "node:fs";
9
9
  import { lstat, mkdir, open, readFile, readdir, rename, rm, writeFile } from "node:fs/promises";
10
- //#region src/checkout.ts
10
+ // src/checkout.ts
11
11
  /** The lock file at the project root. Commit it: it records the remote revision that each checkout folder matches. */
12
12
  const workspaceLockFile = "vitehub.lock";
13
13
  /** A failed remote operation, with the code, message, and fix of the app's diagnostic. */
@@ -845,5 +845,4 @@ async function resolveWorkspaceConflicts(rootDir, workspace, paths) {
845
845
  await saveWorkspaceLock(rootDir, lock, [workspace]);
846
846
  return resolved;
847
847
  }
848
- //#endregion
849
848
  export { assertNoSymlinks, checkoutFailure, conflictMarkerPatterns, folderOf, formatWorkspaceStatus, ignoredName, localCheckoutStatus, mergeText, pullWorkspaces, pushWorkspaces, resolveWorkspaceConflicts, workspaceLockFile, workspaceStatus };
@@ -1,9 +1,6 @@
1
- import { En as WorkspaceStore, s as GitHubWorkspaceStoreOptions, t as CloudflareArtifactsWorkspaceStoreOptions, v as ResolvedWorkspaceModuleOptions } from "./types-9DMtFjaa.js";
1
+ import { En as WorkspaceStore, s as GitHubWorkspaceStoreOptions, t as CloudflareArtifactsWorkspaceStoreOptions, v as ResolvedWorkspaceModuleOptions } from "./types-Bel5IDmF.js";
2
2
  import { configureHostedWorkspaceRuntime } from "./hosted.js";
3
- //#region src/providers/cloudflare/artifacts-store.d.ts
4
3
  export declare function createCloudflareArtifactsWorkspaceStore(options: CloudflareArtifactsWorkspaceStoreOptions, workspaceName: string): WorkspaceStore;
5
- //#endregion
6
- //#region src/cloudflare.d.ts
7
4
  export type CloudflareWorkspaceRuntimeStoreOptions = Partial<CloudflareArtifactsWorkspaceStoreOptions> | (Partial<GitHubWorkspaceStoreOptions> & {
8
5
  driver: "github";
9
6
  });
@@ -13,5 +10,4 @@ export interface CloudflareWorkspaceRuntimeOptions {
13
10
  root?: string;
14
11
  store?: CloudflareWorkspaceRuntimeStoreOptions;
15
12
  }
16
- //#endregion
17
13
  export { type CloudflareArtifactsWorkspaceStoreOptions, type GitHubWorkspaceStoreOptions, type ResolvedWorkspaceModuleOptions, configureHostedWorkspaceRuntime as configureCloudflareWorkspaceRuntime };
@@ -1,2 +1 @@
1
- import { a as createCloudflareArtifactsWorkspaceStore, t as configureHostedWorkspaceRuntime } from "./hosted-BktlvkF2.js";
2
- export { configureHostedWorkspaceRuntime as configureCloudflareWorkspaceRuntime, createCloudflareArtifactsWorkspaceStore };
1
+ export { t as configureCloudflareWorkspaceRuntime, a as createCloudflareArtifactsWorkspaceStore } from "./hosted-8BTKAtMX.js";
@@ -1,4 +1,4 @@
1
- //#region src/runtime/config.ts
1
+ // src/runtime/config.ts
2
2
  const workspaceRuntimeConfigKey = Symbol.for("vitehub.workspace.runtimeConfig");
3
3
  function workspaceRuntimeConfigGlobal() {
4
4
  const scope = globalThis;
@@ -11,5 +11,4 @@ function setWorkspaceRuntimeConfig(config) {
11
11
  function getWorkspaceRuntimeConfig() {
12
12
  return workspaceRuntimeConfigGlobal()[workspaceRuntimeConfigKey] ?? false;
13
13
  }
14
- //#endregion
15
14
  export { setWorkspaceRuntimeConfig as n, getWorkspaceRuntimeConfig as t };
@@ -1,10 +1,7 @@
1
- import { L as WorkspaceDefinition, M as WorkspaceCacheOptions, Pn as WorkspaceValidateMode, Sn as WorkspaceSourceSyncPolicy, Zt as WorkspaceSource, _t as WorkspaceMaterializeMode, en as WorkspaceSourceInput, sn as WorkspaceSourceRequestDescriptor } from "./types-9DMtFjaa.js";
2
- //#region src/sources/request-metadata.d.ts
1
+ import { L as WorkspaceDefinition, M as WorkspaceCacheOptions, Pn as WorkspaceValidateMode, Sn as WorkspaceSourceSyncPolicy, Zt as WorkspaceSource, _t as WorkspaceMaterializeMode, en as WorkspaceSourceInput, sn as WorkspaceSourceRequestDescriptor } from "./types-Bel5IDmF.js";
3
2
  declare function getWorkspaceSourceRequestDescriptor(source: WorkspaceSource): WorkspaceSourceRequestDescriptor | undefined;
4
3
  declare function isWorkspaceSourceRequestOnly(source: WorkspaceSource): boolean;
5
4
  declare function workspaceSourceRequestDescriptorPath(sourceKey: string): string;
6
- //#endregion
7
- //#region src/sources/config.d.ts
8
5
  interface ResolvedWorkspaceSource {
9
6
  key: string;
10
7
  source: WorkspaceSource;
@@ -23,5 +20,4 @@ type WorkspaceSourceMetadata = Pick<ResolvedWorkspaceSource, "cache" | "key" | "
23
20
  declare function normalizeWorkspaceSourcesMetadata(sources: WorkspaceDefinition["sources"]): WorkspaceSourceMetadata[];
24
21
  declare function normalizeWorkspaceSourceMetadata(key: string, input: WorkspaceSourceInput): WorkspaceSourceMetadata;
25
22
  declare function workspaceSourceGrantPaths(key: string, input: WorkspaceSourceInput): string[];
26
- //#endregion
27
23
  export { getWorkspaceSourceRequestDescriptor as a, workspaceSourceGrantPaths as i, normalizeWorkspaceSourceMetadata as n, isWorkspaceSourceRequestOnly as o, normalizeWorkspaceSourcesMetadata as r, workspaceSourceRequestDescriptorPath as s, WorkspaceSourceMetadata as t };
@@ -1,9 +1,9 @@
1
- import { s as workspaceError, t as normalizeSafeWorkspacePath } from "./path-DrSIenjj.js";
2
- import { i as decodeFile, o as isWorkspaceBytes } from "./path-BlIBpI7U.js";
3
- import { t as workspaceErrorDiagnostics } from "./error-diagnostics-Cth97txN.js";
4
- import { t as isRecord } from "./object-Da1zyPCR.js";
5
- import { t as internalErrorDiagnostics } from "./error-diagnostics-C0KyI408.js";
6
- import { t as abortable } from "./abort-BCwpdrN0.js";
1
+ import { s as workspaceError, t as normalizeSafeWorkspacePath } from "./path-CuYE8-X6.js";
2
+ import { i as decodeFile, o as isWorkspaceBytes } from "./path-Bb9OIc_F.js";
3
+ import { t as abortable } from "./abort-CQGxJBqa.js";
4
+ import { t as internalErrorDiagnostics } from "./error-diagnostics-kKXseq8d.js";
5
+ import { t as workspaceErrorDiagnostics } from "./error-diagnostics-B4me-ouV.js";
6
+ import { t as isRecord } from "./object-CAK6UYR5.js";
7
7
  import { posix } from "node:path";
8
8
  import { createHash } from "node:crypto";
9
9
  import { sourceIgnores } from "@vite-hub/source";
@@ -272,8 +272,7 @@ function formatIssues(issues) {
272
272
  if (Array.isArray(issues)) return issues.map((issue) => primitiveRuntimeTag(issue) === "[object String]" ? String(issue) : JSON.stringify(issue)).join("; ");
273
273
  return primitiveRuntimeTag(issues) === "[object String]" ? String(issues) : JSON.stringify(issues);
274
274
  }
275
- //#endregion
276
- //#region src/sources/live.ts
275
+ // src/sources/live.ts
277
276
  const liveSourcePaths = /* @__PURE__ */ new WeakMap();
278
277
  function markLiveWorkspaceSource(source, paths) {
279
278
  liveSourcePaths.set(source, paths);
@@ -282,8 +281,7 @@ function markLiveWorkspaceSource(source, paths) {
282
281
  function getLiveWorkspaceSourcePaths(source) {
283
282
  return liveSourcePaths.get(source);
284
283
  }
285
- //#endregion
286
- //#region src/sources/request-json.ts
284
+ // src/sources/request-json.ts
287
285
  function requestJsonEqual(left, right) {
288
286
  return JSON.stringify(sortJson(left)) === JSON.stringify(sortJson(right));
289
287
  }
@@ -294,8 +292,7 @@ function sortJson(value) {
294
292
  if (prototype !== Object.prototype && prototype !== null) return value;
295
293
  return Object.fromEntries(Object.entries(value).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0).map(([key, item]) => [key, sortJson(item)]));
296
294
  }
297
- //#endregion
298
- //#region src/sources/request-metadata.ts
295
+ // src/sources/request-metadata.ts
299
296
  const requestSourceDescriptors = /* @__PURE__ */ new WeakMap();
300
297
  const requestSourceExecutors = /* @__PURE__ */ new WeakMap();
301
298
  const requestOnlySources = /* @__PURE__ */ new WeakSet();
@@ -332,8 +329,7 @@ function workspaceSourceRequestDescriptorPath(sourceKey) {
332
329
  assertWorkspaceSourceRequestDescriptorKey(sourceKey);
333
330
  return `.vitehub/sources/${sourceKey}.json`;
334
331
  }
335
- //#endregion
336
- //#region src/sources/fetch.ts
332
+ // src/sources/fetch.ts
337
333
  function url(input) {
338
334
  if (typeof input === "function") return resolvableFetchSource(input);
339
335
  return createFetchSource(input);
@@ -649,8 +645,7 @@ function redactedUrl(url) {
649
645
  const parsed = url instanceof URL ? url : new URL(url);
650
646
  return `${parsed.origin}${parsed.pathname}`;
651
647
  }
652
- //#endregion
653
- //#region src/sources/github-ignore.ts
648
+ // src/sources/github-ignore.ts
654
649
  function resolveGitHubIgnore(ignore) {
655
650
  if (ignore === false) return;
656
651
  if (ignore === void 0) return [...sourceIgnores.defaults];
@@ -671,8 +666,7 @@ function runtimeString(value) {
671
666
  function invalidGitHubIgnore() {
672
667
  return workspaceError("[vitehub] GitHub Source ignore must be false, a string, or an array of strings.");
673
668
  }
674
- //#endregion
675
- //#region src/sources/preparation.ts
669
+ // src/sources/preparation.ts
676
670
  const revisionResolutionByContext = /* @__PURE__ */ new WeakMap();
677
671
  async function prepareWorkspaceSource(source, ctx, options = {}) {
678
672
  if (options.refreshRevision) {
@@ -690,8 +684,7 @@ async function prepareWorkspaceSource(source, ctx, options = {}) {
690
684
  await revisionResolution;
691
685
  await source.prepare?.(ctx);
692
686
  }
693
- //#endregion
694
- //#region src/sources/runtime-options.ts
687
+ // src/sources/runtime-options.ts
695
688
  function ownSourceOption(options, key) {
696
689
  return Object.hasOwn(options, key) ? options[key] : void 0;
697
690
  }
@@ -705,8 +698,7 @@ function withWorkspaceRuntimeOptions(source, options) {
705
698
  validate: ownSourceOption(options, "validate")
706
699
  };
707
700
  }
708
- //#endregion
709
- //#region src/sources/config.ts
701
+ // src/sources/config.ts
710
702
  function copyWorkspaceSourceMetadata(source, target) {
711
703
  const livePaths = getLiveWorkspaceSourcePaths(source);
712
704
  if (livePaths) markLiveWorkspaceSource(target, livePaths);
@@ -956,10 +948,10 @@ function inferredSourceFingerprintOptions(family, input) {
956
948
  async function loadInferredWorkspaceSource(family, input) {
957
949
  if (family === "fetch" && isRecord(input)) return createInferredFetchSource(input);
958
950
  if (family === "fetch") return createInferredFetchSource(input);
959
- if (family === "file") return (await import("./file-C1DYoGz3.js").then((n) => n.n)).file(input);
960
- if (family === "github") return (await import("./github-CFHl6RI0.js").then((n) => n.n)).github(input);
961
- if (family === "glob") return (await import("./glob-BitxqDhb.js").then((n) => n.n)).glob(input);
962
- return (await import("./mcp-resources-TtxLNSL6.js").then((n) => n.n)).mcpResources(input);
951
+ if (family === "file") return (await import("./file-BrNAXQgY.js").then((n) => n.n)).file(input);
952
+ if (family === "github") return (await import("./github-k--_LCrX.js").then((n) => n.n)).github(input);
953
+ if (family === "glob") return (await import("./glob-BEutagp1.js").then((n) => n.n)).glob(input);
954
+ return (await import("./mcp-resources-DeJnbOaw.js").then((n) => n.n)).mcpResources(input);
963
955
  }
964
956
  function inferredSourceDefaults(family, input) {
965
957
  if (!isRecord(input)) return family === "file" ? { key: inferredFileSourceKey(input) } : {};
@@ -1072,5 +1064,4 @@ function hasSourceMethods(input) {
1072
1064
  function hasOwn(input, key) {
1073
1065
  return Object.prototype.hasOwnProperty.call(input, key);
1074
1066
  }
1075
- //#endregion
1076
1067
  export { isWorkspaceSourceRequestOnly as _, normalizeWorkspaceSources as a, markLiveWorkspaceSource as b, sourceMountIntersectsPath as c, withWorkspaceRuntimeOptions as d, prepareWorkspaceSource as f, getWorkspaceSourceRequestExecutor as g, getWorkspaceSourceRequestDescriptor as h, normalizeWorkspaceSourceMetadata as i, workspaceSourceGrantPaths as l, url as m, createSourceContext as n, normalizeWorkspaceSourcesMetadata as o, resolveGitHubIgnore as p, normalizeWorkspaceSource as r, sourceMountContainsPath as s, copyWorkspaceSourceMetadata as t, ownSourceOption as u, workspaceSourceRequestDescriptorPath as v, requestJsonEqual as y };
@@ -1,8 +1,7 @@
1
- //#region src/storage/discard.ts
1
+ // src/storage/discard.ts
2
2
  /**
3
3
  * Drops the writes that a Store keeps staged until `snapshot()`, so it loads the branch again on its next call. Only
4
4
  * the GitHub and Cloudflare Artifacts Stores stage writes. Other Stores write through and do not have it.
5
5
  */
6
6
  const workspaceStoreDiscard = Symbol.for("vitehub.workspace.storeDiscard");
7
- //#endregion
8
7
  export { workspaceStoreDiscard as t };
@@ -1,13 +1,10 @@
1
- import { R as WorkspaceDefinitionInput, v as ResolvedWorkspaceModuleOptions } from "./types-9DMtFjaa.js";
1
+ import { R as WorkspaceDefinitionInput, v as ResolvedWorkspaceModuleOptions } from "./types-Bel5IDmF.js";
2
2
  import { Durability, DurabilityContext } from "@vite-hub/runtime/durability";
3
- //#region src/storage/blob-database-sources.d.ts
4
3
  /** The Blob store and Database names of a Blob + Database Store. `undefined` when the app passed an object. */
5
4
  interface BlobDatabaseSources {
6
5
  blob: string | undefined;
7
6
  database: string | undefined;
8
7
  }
9
- //#endregion
10
- //#region src/durability.d.ts
11
8
  /** What the build passes to `workspaceDurability()`. */
12
9
  export interface WorkspaceDurabilityInput {
13
10
  /** The app passes its own `WorkspaceStore` object. */
@@ -28,4 +25,4 @@ export declare function workspaceRegistryDefinitions(registry: Record<string, ()
28
25
  }>): Record<string, WorkspaceDefinitionInput | undefined>;
29
26
  /** Read evaluated Definitions, including Agent Workspace options, with the runtime's store precedence. */
30
27
  export declare function workspaceDefinitionsDurability(definitions: Record<string, WorkspaceDefinitionInput | undefined>, config: false | ResolvedWorkspaceModuleOptions, context: DurabilityContext): Durability[];
31
- //#endregion
28
+ export {};
@@ -1,7 +1,7 @@
1
- import { n as readBlobDatabaseSources } from "./blob-database-sources-DDZ1wV9w.js";
2
- import { c as resolveWorkspaceDefinitionStore, n as isWorkspaceStore } from "./provider-Fc3M6bEx.js";
3
- import { c as workspaceRegistryLoadError, n as normalizeWorkspaceDefinition } from "./registry-CedQvQxW.js";
4
- //#region src/durability.ts
1
+ import { c as workspaceRegistryLoadError, n as normalizeWorkspaceDefinition } from "./registry-BbUg9vJB.js";
2
+ import { n as readBlobDatabaseSources } from "./blob-database-sources-CQPAyCz3.js";
3
+ import { c as resolveWorkspaceDefinitionStore, n as isWorkspaceStore } from "./provider-CN14ewvx.js";
4
+ // src/durability.ts
5
5
  const sharedDrivers = {
6
6
  "cloudflare": "Cloudflare Artifacts.",
7
7
  "github": "A GitHub repository.",
@@ -108,5 +108,4 @@ function workspaceDefinitionsDurability(definitions, config, context) {
108
108
  }));
109
109
  });
110
110
  }
111
- //#endregion
112
111
  export { workspaceDefinitionsDurability, workspaceDurability, workspaceRegistryDefinitions };
@@ -1,5 +1,5 @@
1
1
  import { defineDiagnostics } from "nostics";
2
- //#region src/error-diagnostics.ts
2
+ // src/error-diagnostics.ts
3
3
  const dynamicError = { why: ({ message }) => message === void 0 ? "" : String(message) };
4
4
  /** A code whose call site passes the message as `why`, with the fix that the reader applies. */
5
5
  const withFix = (fix) => ({
@@ -196,5 +196,4 @@ const workspaceErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
196
196
  WORKSPACE_R0077: withFix("Pass the name of the history Database, `database: \"history\"`, or its Drizzle database, `database: () => useDatabase(\"history\").db` with `import { useDatabase } from \"vite-hub/database\"`. The Database can be SQLite, libSQL, D1, or Postgres. A Database Definition from `defineDatabase()` is not a Drizzle database.")
197
197
  }
198
198
  });
199
- //#endregion
200
199
  export { workspaceErrorDiagnostics as t };
@@ -1,5 +1,5 @@
1
1
  import { defineDiagnostics } from "nostics";
2
- //#region ../internal/src/error-diagnostics.ts
2
+ // ../internal/src/error-diagnostics.ts
3
3
  const dynamicError = { why: ({ message }) => message === void 0 ? "" : String(message) };
4
4
  const internalErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
5
5
  docsBase: "https://vitehub.dev/docs/development/diagnostics",
@@ -256,6 +256,10 @@ const internalErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
256
256
  why: ({ minimum }) => `[vitehub] VITEHUB_SECRET must be at least ${minimum} characters. Generate one with \`openssl rand -base64 32\`.`,
257
257
  fix: "Set `VITEHUB_SECRET` to the output of `openssl rand -base64 32`, which has 44 characters."
258
258
  },
259
+ INTERNAL_SITE_TOKEN_TOO_LONG: {
260
+ why: ({ length, maximum }) => `The Site access token is ${length} characters, and an app accepts ${maximum}.`,
261
+ fix: "Open the app with a shorter path, or give the person and the project shorter names, so that the Site access token fits."
262
+ },
259
263
  INTERNAL_SQLITE_ARGUMENT_INVALID: {
260
264
  why: ({ value }) => value === "undefined" ? "undefined cannot be passed as argument to the database" : "Only finite numbers (not Infinity or NaN) can be passed as arguments",
261
265
  fix: "Pass query arguments as finite numbers, strings, booleans, bigints, dates, byte arrays, or null. Replace undefined with null, and check numbers with `Number.isFinite()` before the query."
@@ -270,5 +274,4 @@ const internalErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
270
274
  }
271
275
  }
272
276
  });
273
- //#endregion
274
277
  export { internalErrorDiagnostics as t };
@@ -1,6 +1,4 @@
1
1
  import { ViteHubError } from "@vite-hub/runtime";
2
- //#region src/core/errors.d.ts
3
2
  type WorkspaceErrorCode = "WORKSPACE_CONFLICT" | "WORKSPACE_FAILED" | "WORKSPACE_NOT_FOUND" | "WORKSPACE_PATH_INVALID";
4
3
  declare function isWorkspaceConflict(value: unknown): boolean;
5
- //#endregion
6
4
  export { isWorkspaceConflict as n, WorkspaceErrorCode as t };
@@ -1,11 +1,8 @@
1
- import { n as __exportAll } from "./rolldown-runtime-rQ84J-ij.js";
2
- import { d as withWorkspaceRuntimeOptions, u as ownSourceOption } from "./config-DiyPi3Ff.js";
1
+ import { n as __exportAll } from "./rolldown-runtime-DnNXxpGL.js";
2
+ import { d as withWorkspaceRuntimeOptions, u as ownSourceOption } from "./config-jo5QgE1w.js";
3
3
  import { file } from "@vite-hub/source";
4
- //#region src/sources/file.ts
5
- var file_exports = /* @__PURE__ */ __exportAll({
6
- file: () => file$1,
7
- withFileSourceOptions: () => withFileSourceOptions
8
- });
4
+ // src/sources/file.ts
5
+ var file_exports = /* @__PURE__ */ __exportAll({ file: () => file$1 });
9
6
  function file$1(input) {
10
7
  const options = typeof input === "string" ? { path: input } : input;
11
8
  return withFileSourceOptions(file(options), options);
@@ -18,5 +15,4 @@ function withFileSourceOptions(source, options) {
18
15
  ...probeKeys ? { probeKeys } : {}
19
16
  };
20
17
  }
21
- //#endregion
22
18
  export { file_exports as n, withFileSourceOptions as r, file$1 as t };
@@ -1,5 +1,5 @@
1
- import { s as workspaceError } from "./path-DrSIenjj.js";
2
- //#region src/core/file-metadata.ts
1
+ import { s as workspaceError } from "./path-CuYE8-X6.js";
2
+ // src/core/file-metadata.ts
3
3
  function invalidMetadata(path) {
4
4
  return workspaceError(`[vitehub] Invalid Workspace metadata for ${path}. Metadata must contain only JSON-safe plain objects, dense arrays, strings, booleans, null, and finite numbers other than negative zero.`);
5
5
  }
@@ -57,5 +57,4 @@ function copyJsonFileMetadata(path, metadata, normalizeOptional = false) {
57
57
  if (source && typeof source.value !== "string") throw workspaceError(`[vitehub] Invalid Workspace metadata for ${path}. metadata.source must be a string when provided.`);
58
58
  return copy;
59
59
  }
60
- //#endregion
61
60
  export { copyJsonWorkspaceMetadata as n, copyJsonFileMetadata as t };
@@ -1,6 +1,6 @@
1
- import { l as normalizeWorkspacePath, o as isWorkspaceBytes, s as matchesAny } from "./path-BlIBpI7U.js";
2
- import { f as prepareWorkspaceSource, n as createSourceContext } from "./config-DiyPi3Ff.js";
3
- //#region src/loaders/files.ts
1
+ import { l as normalizeWorkspacePath, o as isWorkspaceBytes, s as matchesAny } from "./path-Bb9OIc_F.js";
2
+ import { f as prepareWorkspaceSource, n as createSourceContext } from "./config-jo5QgE1w.js";
3
+ // src/loaders/files.ts
4
4
  function shouldLoad(path, options) {
5
5
  if (options.include && !matchesAny(path, options.include)) return false;
6
6
  if (options.exclude && matchesAny(path, options.exclude)) return false;
@@ -58,5 +58,4 @@ function files(options = {}) {
58
58
  }
59
59
  };
60
60
  }
61
- //#endregion
62
61
  export { files as t };
package/dist/files.d.ts CHANGED
@@ -1,17 +1,14 @@
1
- import { $ as WorkspaceHistoryDiffOptions, $t as WorkspaceSourceDefinition, A as WorkspaceAuthor, An as WorkspaceStreamFile, At as WorkspaceOptions, B as WorkspaceDiffEntry, Bn as WorkspaceWriteOperation, Bt as WorkspaceScopeName, C as SourceContextWorkspaceFiles, Cn as WorkspaceSourceSyncResult, Ct as WorkspaceMergeConflict, D as WorkspaceAssetPath, Dn as WorkspaceStoreHistory, Dt as WorkspaceName, E as Workspace, En as WorkspaceStore, Et as WorkspaceMergeResolution, F as WorkspaceContentStream, Fn as WorkspaceWriteCommit, Ft as WorkspaceRetainedHistory, G as WorkspaceFileSourceInput, Gt as WorkspaceSessionHost, H as WorkspaceFetchSourceInput, Hn as WorkspaceWriteValidatorResult, Ht as WorkspaceSearchQuery, I as WorkspaceCustomSourceInput, In as WorkspaceWriteErrorHook, It as WorkspaceRevision, J as WorkspaceHistoryChanges, Jt as WorkspaceSessionOptions, K as WorkspaceGitHubSourceInput, Kt as WorkspaceSessionHostFileEntry, L as WorkspaceDefinition, Ln as WorkspaceWriteHook, Lt as WorkspaceRevisionView, M as WorkspaceCacheOptions, Mn as WorkspaceSyncResultDetails, Mt as WorkspacePrepareSessionProgressEvent, N as WorkspaceCapabilities, Nn as WorkspaceSyncSnapshotOptions, Nt as WorkspacePullRequest, O as WorkspaceAssets, On as WorkspaceStoreHistoryCommitOptions, Ot as WorkspaceNameMap, P as WorkspaceContent, Pn as WorkspaceValidateMode, Pt as WorkspaceRebaseOptions, Q as WorkspaceHistoryDeleteRefOptions, Qt as WorkspaceSourceBindingInput, R as WorkspaceDefinitionInput, Rn as WorkspaceWriteInput, Rt as WorkspaceRule, S as SourceContext, Sn as WorkspaceSourceSyncPolicy, St as WorkspaceMergeCommit, T as VercelBlobWorkspaceStoreOptions, Tn as WorkspaceStat, Tt as WorkspaceMergeOptions, U as WorkspaceFetchSourceRequestOptions, Un as WriteFileOptions, Ut as WorkspaceSelectedScope, V as WorkspaceEntry, Vn as WorkspaceWriteValidator, Vt as WorkspaceSearchHit, W as WorkspaceFile, Wt as WorkspaceSession, X as WorkspaceHistoryCommitBase, Xt as WorkspaceSnapshot, Y as WorkspaceHistoryChangesCommitOptions, Yt as WorkspaceSessionWriteFileOptions, Z as WorkspaceHistoryCommitOptions, Zt as WorkspaceSource, _ as ReadFileResult, _n as WorkspaceSourceResolver, _t as WorkspaceMaterializeMode, a as GitHubWorkspaceOption, an as WorkspaceSourceMount, at as WorkspaceHistoryListResult, b as RmOptions, bn as WorkspaceSourceSyncCounts, bt as WorkspaceMaterializeSourcesResult, c as GlobOptions, cn as WorkspaceSourceRequestExecutionInput, ct as WorkspaceHistoryRefOptions, d as LocalWorkspaceStoreOptions, dn as WorkspaceSourceRequestMethod, dt as WorkspaceInstructionBinding, en as WorkspaceSourceInput, et as WorkspaceHistoryExtensions, f as Logger, fn as WorkspaceSourceResolutionContext, ft as WorkspaceInstructionBindingValue, g as ReadFileOptions, gn as WorkspaceSourceResolutionResult, gt as WorkspaceLookupName, h as MkdirOptions, hn as WorkspaceSourceResolutionInvocation, ht as WorkspaceLoaderSource, i as ExecResult, in as WorkspaceSourceMaterializationStatus, it as WorkspaceHistoryListOptions, j as WorkspaceAutoCommitPlan, jn as WorkspaceSyncOptions, jt as WorkspacePlugin, k as WorkspaceAssetsRegistry, kn as WorkspaceStoreOptions, kt as WorkspaceOpenPullRequestOptions, l as ListOptions, ln as WorkspaceSourceRequestExecutionResult, lt as WorkspaceHookContext, m as MemoryWorkspaceStoreOptions, mn as WorkspaceSourceResolutionContextValueReader, mt as WorkspaceLoader, n as DiffOptions, nn as WorkspaceSourceMaterializationCounts, nt as WorkspaceHistoryFileInput, o as GitHubWorkspaceRefs, on as WorkspaceSourceMountOptions, ot as WorkspaceHistoryReader, p as MaybePromise, pn as WorkspaceSourceResolutionContextMap, pt as WorkspaceLastChange, q as WorkspaceGlobSourceInput, qt as WorkspaceSessionHostFiles, r as ExecOptions, rn as WorkspaceSourceMaterializationPathResult, rt as WorkspaceHistoryFilesCommitOptions, s as GitHubWorkspaceStoreOptions, sn as WorkspaceSourceRequestDescriptor, st as WorkspaceHistoryRef, t as CloudflareArtifactsWorkspaceStoreOptions, tn as WorkspaceSourceItem, tt as WorkspaceHistoryFile, u as LoaderContext, un as WorkspaceSourceRequestExecutor, ut as WorkspaceHooks, v as ResolvedWorkspaceModuleOptions, vn as WorkspaceSourceSelection, vt as WorkspaceMaterializeSourcesOptions, w as ValidatedWorkspaceName, wn as WorkspaceSourceSyncStatus, wt as WorkspaceMergeConflictContext, x as SnapshotOptions, xn as WorkspaceSourceSyncPathResult, xt as WorkspaceMcpResourcesSourceInput, y as ResolvedWorkspaceRule, yn as WorkspaceSourceSyncConfig, yt as WorkspaceMaterializeSourcesProgressEvent, z as WorkspaceDiff, zn as WorkspaceWriteMode, zt as WorkspaceRules } from "./types-9DMtFjaa.js";
2
- import { _ as WritableWorkspaceFiles, a as ReadonlyWorkspaceFiles, o as ReadonlyWorkspaceFs, s as UseWorkspaceOptions, u as WorkspaceHistory, v as WritableWorkspaceFs, x as useWorkspaceFiles } from "./use-Dv973swc.js";
3
- import { n as isWorkspaceConflict } from "./errors-DXCZjdUU.js";
4
- import { t as isWorkspaceName } from "./registry-CLL0TY0L.js";
5
- import { n as normalizeSafeWorkspacePath } from "./path-zHxQUbqa.js";
6
- import { t as registerWorkspacePlugin } from "./plugins-DKCBrH31.js";
7
- //#region src/storage/target.d.ts
1
+ import { _ as WritableWorkspaceFiles, a as ReadonlyWorkspaceFiles, o as ReadonlyWorkspaceFs, s as UseWorkspaceOptions, u as WorkspaceHistory, v as WritableWorkspaceFs, x as useWorkspaceFiles } from "./use-CpphIBof.js";
2
+ import { $ as WorkspaceHistoryDiffOptions, $t as WorkspaceSourceDefinition, A as WorkspaceAuthor, An as WorkspaceStreamFile, At as WorkspaceOptions, B as WorkspaceDiffEntry, Bn as WorkspaceWriteOperation, Bt as WorkspaceScopeName, C as SourceContextWorkspaceFiles, Cn as WorkspaceSourceSyncResult, Ct as WorkspaceMergeConflict, D as WorkspaceAssetPath, Dn as WorkspaceStoreHistory, Dt as WorkspaceName, E as Workspace, En as WorkspaceStore, Et as WorkspaceMergeResolution, F as WorkspaceContentStream, Fn as WorkspaceWriteCommit, Ft as WorkspaceRetainedHistory, G as WorkspaceFileSourceInput, Gt as WorkspaceSessionHost, H as WorkspaceFetchSourceInput, Hn as WorkspaceWriteValidatorResult, Ht as WorkspaceSearchQuery, I as WorkspaceCustomSourceInput, In as WorkspaceWriteErrorHook, It as WorkspaceRevision, J as WorkspaceHistoryChanges, Jt as WorkspaceSessionOptions, K as WorkspaceGitHubSourceInput, Kt as WorkspaceSessionHostFileEntry, L as WorkspaceDefinition, Ln as WorkspaceWriteHook, Lt as WorkspaceRevisionView, M as WorkspaceCacheOptions, Mn as WorkspaceSyncResultDetails, Mt as WorkspacePrepareSessionProgressEvent, N as WorkspaceCapabilities, Nn as WorkspaceSyncSnapshotOptions, Nt as WorkspacePullRequest, O as WorkspaceAssets, On as WorkspaceStoreHistoryCommitOptions, Ot as WorkspaceNameMap, P as WorkspaceContent, Pn as WorkspaceValidateMode, Pt as WorkspaceRebaseOptions, Q as WorkspaceHistoryDeleteRefOptions, Qt as WorkspaceSourceBindingInput, R as WorkspaceDefinitionInput, Rn as WorkspaceWriteInput, Rt as WorkspaceRule, S as SourceContext, Sn as WorkspaceSourceSyncPolicy, St as WorkspaceMergeCommit, T as VercelBlobWorkspaceStoreOptions, Tn as WorkspaceStat, Tt as WorkspaceMergeOptions, U as WorkspaceFetchSourceRequestOptions, Un as WriteFileOptions, Ut as WorkspaceSelectedScope, V as WorkspaceEntry, Vn as WorkspaceWriteValidator, Vt as WorkspaceSearchHit, W as WorkspaceFile, Wt as WorkspaceSession, X as WorkspaceHistoryCommitBase, Xt as WorkspaceSnapshot, Y as WorkspaceHistoryChangesCommitOptions, Yt as WorkspaceSessionWriteFileOptions, Z as WorkspaceHistoryCommitOptions, Zt as WorkspaceSource, _ as ReadFileResult, _n as WorkspaceSourceResolver, _t as WorkspaceMaterializeMode, a as GitHubWorkspaceOption, an as WorkspaceSourceMount, at as WorkspaceHistoryListResult, b as RmOptions, bn as WorkspaceSourceSyncCounts, bt as WorkspaceMaterializeSourcesResult, c as GlobOptions, cn as WorkspaceSourceRequestExecutionInput, ct as WorkspaceHistoryRefOptions, d as LocalWorkspaceStoreOptions, dn as WorkspaceSourceRequestMethod, dt as WorkspaceInstructionBinding, en as WorkspaceSourceInput, et as WorkspaceHistoryExtensions, f as Logger, fn as WorkspaceSourceResolutionContext, ft as WorkspaceInstructionBindingValue, g as ReadFileOptions, gn as WorkspaceSourceResolutionResult, gt as WorkspaceLookupName, h as MkdirOptions, hn as WorkspaceSourceResolutionInvocation, ht as WorkspaceLoaderSource, i as ExecResult, in as WorkspaceSourceMaterializationStatus, it as WorkspaceHistoryListOptions, j as WorkspaceAutoCommitPlan, jn as WorkspaceSyncOptions, jt as WorkspacePlugin, k as WorkspaceAssetsRegistry, kn as WorkspaceStoreOptions, kt as WorkspaceOpenPullRequestOptions, l as ListOptions, ln as WorkspaceSourceRequestExecutionResult, lt as WorkspaceHookContext, m as MemoryWorkspaceStoreOptions, mn as WorkspaceSourceResolutionContextValueReader, mt as WorkspaceLoader, n as DiffOptions, nn as WorkspaceSourceMaterializationCounts, nt as WorkspaceHistoryFileInput, o as GitHubWorkspaceRefs, on as WorkspaceSourceMountOptions, ot as WorkspaceHistoryReader, p as MaybePromise, pn as WorkspaceSourceResolutionContextMap, pt as WorkspaceLastChange, q as WorkspaceGlobSourceInput, qt as WorkspaceSessionHostFiles, r as ExecOptions, rn as WorkspaceSourceMaterializationPathResult, rt as WorkspaceHistoryFilesCommitOptions, s as GitHubWorkspaceStoreOptions, sn as WorkspaceSourceRequestDescriptor, st as WorkspaceHistoryRef, t as CloudflareArtifactsWorkspaceStoreOptions, tn as WorkspaceSourceItem, tt as WorkspaceHistoryFile, u as LoaderContext, un as WorkspaceSourceRequestExecutor, ut as WorkspaceHooks, v as ResolvedWorkspaceModuleOptions, vn as WorkspaceSourceSelection, vt as WorkspaceMaterializeSourcesOptions, w as ValidatedWorkspaceName, wn as WorkspaceSourceSyncStatus, wt as WorkspaceMergeConflictContext, x as SnapshotOptions, xn as WorkspaceSourceSyncPathResult, xt as WorkspaceMcpResourcesSourceInput, y as ResolvedWorkspaceRule, yn as WorkspaceSourceSyncConfig, yt as WorkspaceMaterializeSourcesProgressEvent, z as WorkspaceDiff, zn as WorkspaceWriteMode, zt as WorkspaceRules } from "./types-Bel5IDmF.js";
3
+ import { n as isWorkspaceConflict } from "./errors-CnFDXxeJ.js";
4
+ import { t as isWorkspaceName } from "./registry-s2Ob9PeX.js";
5
+ import { n as normalizeSafeWorkspacePath } from "./path-C0uZxDdW.js";
6
+ import { t as registerWorkspacePlugin } from "./plugins-CLc32jvL.js";
8
7
  interface WorkspaceStoreTarget {
9
8
  provider: string;
10
9
  containsPath?(ancestor: string, path: string): Promise<boolean>;
11
10
  }
12
11
  export declare function resolveWorkspaceStoreTarget(source: unknown): Promise<WorkspaceStoreTarget | undefined>;
13
- //#endregion
14
- //#region src/providers/github/cache.d.ts
15
12
  /**
16
13
  * The GitHub answers that the GitHub Store keeps. An answer for a URL that names a commit or tree sha never
17
14
  * changes, so it goes to the shared KV store when the app has one: another server instance reads it there and sends no
@@ -42,5 +39,4 @@ interface GitHubReadStats {
42
39
  export declare function registerWorkspaceKV(store: WorkspaceKV | undefined): void;
43
40
  /** The reads of the GitHub Store in this server instance, for tests and inspection. */
44
41
  export declare function readGitHubReadStats(): GitHubReadStats;
45
- //#endregion
46
42
  export { type CloudflareArtifactsWorkspaceStoreOptions, type DiffOptions, type ExecOptions, type ExecResult, type GitHubReadStats, type GitHubWorkspaceOption, type GitHubWorkspaceRefs, type GitHubWorkspaceStoreOptions, type GlobOptions, type ListOptions, type LoaderContext, type LocalWorkspaceStoreOptions, type Logger, type MaybePromise, type MemoryWorkspaceStoreOptions, type MkdirOptions, type ReadFileOptions, type ReadFileResult, type ReadonlyWorkspaceFiles, type ReadonlyWorkspaceFs, type ResolvedWorkspaceModuleOptions, type ResolvedWorkspaceRule, type RmOptions, type SnapshotOptions, type SourceContext, type SourceContextWorkspaceFiles, type UseWorkspaceOptions, type ValidatedWorkspaceName, type VercelBlobWorkspaceStoreOptions, type Workspace, type WorkspaceAssetPath, type WorkspaceAssets, type WorkspaceAssetsRegistry, type WorkspaceAuthor, type WorkspaceAutoCommitPlan, type WorkspaceCacheOptions, type WorkspaceCapabilities, type WorkspaceContent, type WorkspaceContentStream, type WorkspaceCustomSourceInput, type WorkspaceDefinition, type WorkspaceDefinitionInput, type WorkspaceDiff, type WorkspaceDiffEntry, type WorkspaceEntry, type WorkspaceFetchSourceInput, type WorkspaceFetchSourceRequestOptions, type WorkspaceFile, type WorkspaceFileSourceInput, type WorkspaceGitHubSourceInput, type WorkspaceGlobSourceInput, type WorkspaceHistory, type WorkspaceHistoryChanges, type WorkspaceHistoryChangesCommitOptions, type WorkspaceHistoryCommitBase, type WorkspaceHistoryCommitOptions, type WorkspaceHistoryDeleteRefOptions, type WorkspaceHistoryDiffOptions, type WorkspaceHistoryExtensions, type WorkspaceHistoryFile, type WorkspaceHistoryFileInput, type WorkspaceHistoryFilesCommitOptions, type WorkspaceHistoryListOptions, type WorkspaceHistoryListResult, type WorkspaceHistoryReader, type WorkspaceHistoryRef, type WorkspaceHistoryRefOptions, type WorkspaceHookContext, type WorkspaceHooks, type WorkspaceInstructionBinding, type WorkspaceInstructionBindingValue, type WorkspaceKV, type WorkspaceLastChange, type WorkspaceLoader, type WorkspaceLoaderSource, type WorkspaceLookupName, type WorkspaceMaterializeMode, type WorkspaceMaterializeSourcesOptions, type WorkspaceMaterializeSourcesProgressEvent, type WorkspaceMaterializeSourcesResult, type WorkspaceMcpResourcesSourceInput, type WorkspaceMergeCommit, type WorkspaceMergeConflict, type WorkspaceMergeConflictContext, type WorkspaceMergeOptions, type WorkspaceMergeResolution, type WorkspaceName, type WorkspaceNameMap, type WorkspaceOpenPullRequestOptions, type WorkspaceOptions, type WorkspacePlugin, type WorkspacePrepareSessionProgressEvent, type WorkspacePullRequest, type WorkspaceRebaseOptions, type WorkspaceRetainedHistory, type WorkspaceRevision, type WorkspaceRevisionView, type WorkspaceRule, type WorkspaceRules, type WorkspaceScopeName, type WorkspaceSearchHit, type WorkspaceSearchQuery, type WorkspaceSelectedScope, type WorkspaceSession, type WorkspaceSessionHost, type WorkspaceSessionHostFileEntry, type WorkspaceSessionHostFiles, type WorkspaceSessionOptions, type WorkspaceSessionWriteFileOptions, type WorkspaceSnapshot, type WorkspaceSource, type WorkspaceSourceBindingInput, type WorkspaceSourceDefinition, type WorkspaceSourceInput, type WorkspaceSourceItem, type WorkspaceSourceMaterializationCounts, type WorkspaceSourceMaterializationPathResult, type WorkspaceSourceMaterializationStatus, type WorkspaceSourceMount, type WorkspaceSourceMountOptions, type WorkspaceSourceRequestDescriptor, type WorkspaceSourceRequestExecutionInput, type WorkspaceSourceRequestExecutionResult, type WorkspaceSourceRequestExecutor, type WorkspaceSourceRequestMethod, type WorkspaceSourceResolutionContext, type WorkspaceSourceResolutionContextMap, type WorkspaceSourceResolutionContextValueReader, type WorkspaceSourceResolutionInvocation, type WorkspaceSourceResolutionResult, type WorkspaceSourceResolver, type WorkspaceSourceSelection, type WorkspaceSourceSyncConfig, type WorkspaceSourceSyncCounts, type WorkspaceSourceSyncPathResult, type WorkspaceSourceSyncPolicy, type WorkspaceSourceSyncResult, type WorkspaceSourceSyncStatus, type WorkspaceStat, type WorkspaceStore, type WorkspaceStoreHistory, type WorkspaceStoreHistoryCommitOptions, type WorkspaceStoreOptions, type WorkspaceStoreTarget, type WorkspaceStreamFile, type WorkspaceSyncOptions, type WorkspaceSyncResultDetails, type WorkspaceSyncSnapshotOptions, type WorkspaceValidateMode, type WorkspaceWriteCommit, type WorkspaceWriteErrorHook, type WorkspaceWriteHook, type WorkspaceWriteInput, type WorkspaceWriteMode, type WorkspaceWriteOperation, type WorkspaceWriteValidator, type WorkspaceWriteValidatorResult, type WritableWorkspaceFiles, type WritableWorkspaceFs, type WriteFileOptions, isWorkspaceConflict, isWorkspaceName, normalizeSafeWorkspacePath, registerWorkspacePlugin, useWorkspaceFiles };
package/dist/files.js CHANGED
@@ -1,7 +1,7 @@
1
- import { r as isWorkspaceConflict, t as normalizeSafeWorkspacePath } from "./path-DrSIenjj.js";
2
- import { r as registerWorkspacePlugin } from "./rules-OHaPFopX.js";
3
- import { o as resolveWorkspaceStoreTarget } from "./vitehub-grants-C8IAl5-M.js";
4
- import { E as registerWorkspaceKV, w as readGitHubReadStats } from "./shared-BgDjxY3J.js";
5
- import { t as isWorkspaceName } from "./registry-CedQvQxW.js";
6
- import { r as useWorkspaceFiles } from "./use-Dm2tbI5F.js";
1
+ import { r as useWorkspaceFiles } from "./use-D0DyTMxM.js";
2
+ import { r as isWorkspaceConflict, t as normalizeSafeWorkspacePath } from "./path-CuYE8-X6.js";
3
+ import { t as isWorkspaceName } from "./registry-BbUg9vJB.js";
4
+ import { r as registerWorkspacePlugin } from "./rules-BPDXypZV.js";
5
+ import { o as resolveWorkspaceStoreTarget } from "./vitehub-grants-Co713QTg.js";
6
+ import { E as registerWorkspaceKV, w as readGitHubReadStats } from "./shared-C20Wh1mp.js";
7
7
  export { isWorkspaceConflict, isWorkspaceName, normalizeSafeWorkspacePath, readGitHubReadStats, registerWorkspaceKV, registerWorkspacePlugin, resolveWorkspaceStoreTarget, useWorkspaceFiles };
@@ -1,10 +1,10 @@
1
- import { n as __exportAll } from "./rolldown-runtime-rQ84J-ij.js";
2
- import { s as matchesAny } from "./path-BlIBpI7U.js";
3
- import { t as workspaceErrorDiagnostics } from "./error-diagnostics-Cth97txN.js";
4
- import { M as readForgeEnv, h as readGitHubEnvToken, j as forgeEnv } from "./shared-BgDjxY3J.js";
5
- import { d as withWorkspaceRuntimeOptions, f as prepareWorkspaceSource, p as resolveGitHubIgnore } from "./config-DiyPi3Ff.js";
1
+ import { n as __exportAll } from "./rolldown-runtime-DnNXxpGL.js";
2
+ import { M as readForgeEnv, h as readGitHubEnvToken, j as forgeEnv } from "./shared-C20Wh1mp.js";
3
+ import { s as matchesAny } from "./path-Bb9OIc_F.js";
4
+ import { d as withWorkspaceRuntimeOptions, f as prepareWorkspaceSource, p as resolveGitHubIgnore } from "./config-jo5QgE1w.js";
5
+ import { t as workspaceErrorDiagnostics } from "./error-diagnostics-B4me-ouV.js";
6
6
  import { github } from "@vite-hub/source";
7
- //#region src/env.ts
7
+ // src/env.ts
8
8
  let viteLoadEnv;
9
9
  const viteModuleId = "vite";
10
10
  async function resolveWorkspaceEnv(rootDir, name) {
@@ -29,8 +29,7 @@ async function loadViteEnv(rootDir) {
29
29
  const loadEnv = viteLoadEnv;
30
30
  return loadEnv ? loadEnv("", rootDir, "") : void 0;
31
31
  }
32
- //#endregion
33
- //#region src/sources/github.ts
32
+ // src/sources/github.ts
34
33
  var github_exports = /* @__PURE__ */ __exportAll({ github: () => github$1 });
35
34
  function github$1(input) {
36
35
  if (typeof input === "function") return resolvableGitHubSource(input);
@@ -214,5 +213,4 @@ async function resolveGitHubCliToken() {
214
213
  return;
215
214
  }
216
215
  }
217
- //#endregion
218
216
  export { github_exports as n, github$1 as t };