@vite-hub/workspace 0.4.1 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -19
- package/dist/{abort-BCwpdrN0.js → abort-CQGxJBqa.js} +1 -2
- package/dist/{asset-registry-DfBV5kmw.js → asset-registry-0CdRAjIV.js} +2 -3
- package/dist/blob-database/postgres.d.ts +423 -0
- package/dist/blob-database/postgres.js +1 -0
- package/dist/blob-database-sources-CQPAyCz3.js +8 -0
- package/dist/blob-database.d.ts +29 -449
- package/dist/blob-database.js +636 -210
- package/dist/checkout.d.ts +1 -2
- package/dist/checkout.js +3 -4
- package/dist/cloudflare.d.ts +1 -5
- package/dist/cloudflare.js +1 -2
- package/dist/{config-B-863EgC.js → config-CsgNNVAI.js} +1 -2
- package/dist/{config-CDeGd0RB.d.ts → config-DeA287c0.d.ts} +1 -5
- package/dist/{config-D1QENneP.js → config-jo5QgE1w.js} +18 -27
- package/dist/{discard-CNNtCozM.js → discard-BkoLmmmN.js} +1 -2
- package/dist/durability.d.ts +10 -4
- package/dist/durability.js +47 -6
- package/dist/{error-diagnostics-B5s9kNEA.js → error-diagnostics-B4me-ouV.js} +11 -4
- package/dist/{error-diagnostics-CQ4BUqRe.js → error-diagnostics-kKXseq8d.js} +10 -3
- package/dist/{path-uxLkzrZm.d.ts → errors-CnFDXxeJ.d.ts} +0 -3
- package/dist/{file-CqG9zqiF.js → file-BrNAXQgY.js} +4 -8
- package/dist/{target-Dm9dHAVJ.js → file-metadata-Bpsvjw_X.js} +3 -32
- package/dist/{files-B6wpAhEx.js → files--z2dLC5z.js} +3 -4
- package/dist/files.d.ts +12 -8
- package/dist/files.js +7 -6
- package/dist/{github-DKAlO0Vh.js → github-k--_LCrX.js} +7 -9
- package/dist/{glob-BOqSKzSg.js → glob-BEutagp1.js} +9 -10
- package/dist/{glob-Cjxms1t7.js → glob-BreFjNAV.js} +3 -4
- package/dist/history-schema-BR4UDPHL.d.ts +434 -0
- package/dist/history-schema-postgres-DZepCSBq.js +40 -0
- package/dist/{host-Bf1a2uo_.js → host-C8yZizfk.js} +153 -22
- package/dist/{hosted-zG7HJaE4.js → hosted-8BTKAtMX.js} +27 -21
- package/dist/{hosted-vercel-blob-AbXG8fvR.js → hosted-vercel-blob-B6kygYqn.js} +10 -12
- package/dist/hosted-vercel-blob.d.ts +1 -3
- package/dist/hosted-vercel-blob.js +1 -2
- package/dist/hosted.d.ts +1 -3
- package/dist/hosted.js +1 -2
- package/dist/index.d.ts +11 -41
- package/dist/index.js +34 -116
- package/dist/internal/path.d.ts +1 -1
- package/dist/internal/path.js +1 -2
- package/dist/internal/workspace.d.ts +10 -0
- package/dist/internal/workspace.js +85 -0
- package/dist/{lifecycle-D8FdpBod.js → lifecycle-IReZfi0b.js} +15 -13
- package/dist/lineage.d.ts +1 -3
- package/dist/lineage.js +1 -2
- package/dist/loader.d.ts +1 -7
- package/dist/loader.js +4 -6
- package/dist/{mcp-resources-DntxtmDU.js → mcp-resources-DeJnbOaw.js} +4 -5
- package/dist/{memory-D5jq9HZW.js → memory-BlSRrBH1.js} +19 -13
- package/dist/{metadata-target-DDoOQNp1.js → metadata-target-CaGLY4ay.js} +214 -77
- package/dist/{object-Da1zyPCR.js → object-CAK6UYR5.js} +1 -2
- package/dist/{operation-definition-nmRu_O3V.d.ts → operation-definition-CqZkx1Rm.d.ts} +8 -6
- package/dist/{operations-DsY2MQnG.js → operations-CtRDU3cA.js} +34 -29
- package/dist/{operations-D8uCpzhM.js → operations-DfbqHWAe.js} +7 -8
- package/dist/operations.d.ts +2 -6
- package/dist/operations.js +2 -2
- package/dist/{path--wrT_Azm.js → path-Bb9OIc_F.js} +3 -19
- package/dist/{path-zHxQUbqa.d.ts → path-C0uZxDdW.d.ts} +0 -2
- package/dist/{path-DrSIenjj.js → path-CuYE8-X6.js} +2 -4
- package/dist/{plugins-CsrXCA1Q.d.ts → plugins-CLc32jvL.d.ts} +1 -3
- package/dist/{provider-sm9uzkLg.js → provider-CN14ewvx.js} +30 -22
- package/dist/providers/github/store.d.ts +2 -4
- package/dist/providers/github/store.js +1 -2
- package/dist/{registry-CFl1Htyc.d.ts → registry-B0g19sdy.d.ts} +5 -8
- package/dist/{registry-DmVfUe4K.js → registry-BbUg9vJB.js} +10 -6
- package/dist/registry-s2Ob9PeX.d.ts +9 -0
- package/dist/{request-scope-Dw5n8bMC.js → request-scope-CXCI_wCb.js} +4 -4
- package/dist/{results-DgkZUmTL.js → results-z-HpV9EP.js} +1 -2
- package/dist/{rolldown-runtime-rQ84J-ij.js → rolldown-runtime-DnNXxpGL.js} +2 -3
- package/dist/rule-keys-BLEbi1h5.js +18 -0
- package/dist/rules-BPDXypZV.js +267 -0
- package/dist/runtime/assets.d.ts +2 -3
- package/dist/runtime/assets.js +5 -6
- package/dist/runtime/empty-assets-registry.d.ts +1 -3
- package/dist/runtime/empty-assets-registry.js +1 -2
- package/dist/runtime/empty-registry.d.ts +2 -4
- package/dist/runtime/empty-registry.js +1 -2
- package/dist/runtime/registry.d.ts +2 -2
- package/dist/runtime/registry.js +2 -3
- package/dist/runtime/request.d.ts +1 -3
- package/dist/runtime/request.js +2 -3
- package/dist/runtime/state.d.ts +5 -4
- package/dist/runtime/state.js +18 -7
- package/dist/runtime/workspace.d.ts +1 -1
- package/dist/runtime/workspace.js +1 -2
- package/dist/runtime.d.ts +9 -24
- package/dist/runtime.js +29 -25
- package/dist/{search-C_RfoM2j.js → search-C_nVorq7.js} +3 -4
- package/dist/{server-Cd4-iCh5.js → server-aa1a4rkV.js} +8 -10
- package/dist/server.d.ts +3 -4
- package/dist/server.js +1 -2
- package/dist/{shared-ovXVSV3-.js → shared-C20Wh1mp.js} +23 -19
- package/dist/source-metadata.d.ts +2 -6
- package/dist/source-metadata.js +4 -5
- package/dist/state-BdDfBtOR.d.ts +17 -0
- package/dist/{store-NZoRto-Y.js → store-cx3OqNTi.js} +42 -44
- package/dist/{sync-CrT8zjwc.js → sync-BBfR4g5y.js} +6 -7
- package/dist/test.d.ts +1 -1
- package/dist/test.js +1 -2
- package/dist/{types-1Z-tKK3g.d.ts → types-Bel5IDmF.d.ts} +52 -6
- package/dist/{use-CjbF8EO9.d.ts → use-CpphIBof.d.ts} +20 -32
- package/dist/{use-B0o5HoBl.js → use-D0DyTMxM.js} +19 -21
- package/dist/use-tools-CAK10LTc.d.ts +10 -0
- package/dist/{state-Cb_hIyAw.js → use-tools-CHduR5k6.js} +8 -24
- package/dist/{utils-Dw-WULEZ.js → utils-DXP9xfXo.js} +80 -273
- package/dist/vite.d.ts +30 -19
- package/dist/vite.js +1481 -1617
- package/dist/vitehub-grants-Co713QTg.js +36 -0
- package/dist/workspace-BOuxrZrP.d.ts +5 -0
- package/dist/{workspace-DvKu5PRa.js → workspace-CLuPkyZR.js} +28 -36
- package/package.json +34 -24
- package/dist/registry-CwryP59t.d.ts +0 -9
- package/dist/state-C-YtsaiJ.d.ts +0 -35
- package/dist/workspace-CIXgHeyX.d.ts +0 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
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 };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { n as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { d as withWorkspaceRuntimeOptions, u as ownSourceOption } from "./config-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
var glob_exports = /* @__PURE__ */ __exportAll({ glob: () => glob
|
|
6
|
-
function glob
|
|
7
|
-
const
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-DnNXxpGL.js";
|
|
2
|
+
import { d as withWorkspaceRuntimeOptions, u as ownSourceOption } from "./config-jo5QgE1w.js";
|
|
3
|
+
import * as source from "@vite-hub/source";
|
|
4
|
+
// src/sources/glob.ts
|
|
5
|
+
var glob_exports = /* @__PURE__ */ __exportAll({ glob: () => glob });
|
|
6
|
+
function glob(options) {
|
|
7
|
+
const fileSource = source.glob({
|
|
8
8
|
...options,
|
|
9
9
|
keyCache: options.keyCache ?? !isLazySource(options)
|
|
10
10
|
});
|
|
11
|
-
return withWorkspaceRuntimeOptions(
|
|
11
|
+
return withWorkspaceRuntimeOptions(fileSource, options);
|
|
12
12
|
}
|
|
13
13
|
function isLazySource(options) {
|
|
14
14
|
const materialize = ownSourceOption(options, "materialize");
|
|
@@ -17,5 +17,4 @@ function isLazySource(options) {
|
|
|
17
17
|
const mountMaterialize = typeof mount === "object" ? ownSourceOption(mount, "materialize") : void 0;
|
|
18
18
|
return mountMaterialize === "lazy" || mountMaterialize === "startup";
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
export { glob_exports as n, glob$1 as t };
|
|
20
|
+
export { glob_exports as n, glob as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as normalizeSafeWorkspacePath } from "./path-
|
|
2
|
-
import { l as normalizeWorkspacePath } from "./path
|
|
1
|
+
import { t as normalizeSafeWorkspacePath } from "./path-CuYE8-X6.js";
|
|
2
|
+
import { l as normalizeWorkspacePath } from "./path-Bb9OIc_F.js";
|
|
3
3
|
import { Minimatch } from "minimatch";
|
|
4
|
-
|
|
4
|
+
// src/core/glob.ts
|
|
5
5
|
function createWorkspaceGlobMatcher(pattern, options = {}) {
|
|
6
6
|
const requestedCwd = options.cwd === "." ? "" : options.cwd;
|
|
7
7
|
let cwd;
|
|
@@ -26,5 +26,4 @@ function createWorkspaceGlobMatcher(pattern, options = {}) {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { createWorkspaceGlobMatcher as t };
|
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
interface HistoryManifestFile {
|
|
2
|
+
digest: string;
|
|
3
|
+
size: number;
|
|
4
|
+
mediaType: string;
|
|
5
|
+
metadata?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
/** Include these tables in a Database Definition and apply its migrations. */
|
|
8
|
+
declare const workspaceHistorySchema: {
|
|
9
|
+
workspaceHistoryWorkspaces: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
10
|
+
name: "workspace_history_workspaces";
|
|
11
|
+
schema: undefined;
|
|
12
|
+
columns: {
|
|
13
|
+
workspace: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
14
|
+
name: string;
|
|
15
|
+
tableName: "workspace_history_workspaces";
|
|
16
|
+
dataType: "string";
|
|
17
|
+
data: string;
|
|
18
|
+
driverParam: string;
|
|
19
|
+
notNull: true;
|
|
20
|
+
hasDefault: false;
|
|
21
|
+
isPrimaryKey: true;
|
|
22
|
+
isAutoincrement: false;
|
|
23
|
+
hasRuntimeDefault: false;
|
|
24
|
+
enumValues: [string, ...string[]];
|
|
25
|
+
baseColumn: never;
|
|
26
|
+
identity: undefined;
|
|
27
|
+
generated: undefined;
|
|
28
|
+
}, {}>;
|
|
29
|
+
deleted: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
30
|
+
name: string;
|
|
31
|
+
tableName: "workspace_history_workspaces";
|
|
32
|
+
dataType: "boolean";
|
|
33
|
+
data: boolean;
|
|
34
|
+
driverParam: number;
|
|
35
|
+
notNull: true;
|
|
36
|
+
hasDefault: true;
|
|
37
|
+
isPrimaryKey: false;
|
|
38
|
+
isAutoincrement: false;
|
|
39
|
+
hasRuntimeDefault: false;
|
|
40
|
+
enumValues: undefined;
|
|
41
|
+
baseColumn: never;
|
|
42
|
+
identity: undefined;
|
|
43
|
+
generated: undefined;
|
|
44
|
+
}, {}>;
|
|
45
|
+
};
|
|
46
|
+
dialect: "sqlite";
|
|
47
|
+
isAlias: false;
|
|
48
|
+
}>;
|
|
49
|
+
workspaceHistoryRefs: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
50
|
+
name: "workspace_history_refs";
|
|
51
|
+
schema: undefined;
|
|
52
|
+
columns: {
|
|
53
|
+
workspace: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
54
|
+
name: string;
|
|
55
|
+
tableName: "workspace_history_refs";
|
|
56
|
+
dataType: "string";
|
|
57
|
+
data: string;
|
|
58
|
+
driverParam: string;
|
|
59
|
+
notNull: true;
|
|
60
|
+
hasDefault: false;
|
|
61
|
+
isPrimaryKey: false;
|
|
62
|
+
isAutoincrement: false;
|
|
63
|
+
hasRuntimeDefault: false;
|
|
64
|
+
enumValues: [string, ...string[]];
|
|
65
|
+
baseColumn: never;
|
|
66
|
+
identity: undefined;
|
|
67
|
+
generated: undefined;
|
|
68
|
+
}, {}>;
|
|
69
|
+
ref: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
70
|
+
name: string;
|
|
71
|
+
tableName: "workspace_history_refs";
|
|
72
|
+
dataType: "string";
|
|
73
|
+
data: string;
|
|
74
|
+
driverParam: string;
|
|
75
|
+
notNull: true;
|
|
76
|
+
hasDefault: false;
|
|
77
|
+
isPrimaryKey: false;
|
|
78
|
+
isAutoincrement: false;
|
|
79
|
+
hasRuntimeDefault: false;
|
|
80
|
+
enumValues: [string, ...string[]];
|
|
81
|
+
baseColumn: never;
|
|
82
|
+
identity: undefined;
|
|
83
|
+
generated: undefined;
|
|
84
|
+
}, {}>;
|
|
85
|
+
head: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
86
|
+
name: string;
|
|
87
|
+
tableName: "workspace_history_refs";
|
|
88
|
+
dataType: "string";
|
|
89
|
+
data: string;
|
|
90
|
+
driverParam: string;
|
|
91
|
+
notNull: false;
|
|
92
|
+
hasDefault: false;
|
|
93
|
+
isPrimaryKey: false;
|
|
94
|
+
isAutoincrement: false;
|
|
95
|
+
hasRuntimeDefault: false;
|
|
96
|
+
enumValues: [string, ...string[]];
|
|
97
|
+
baseColumn: never;
|
|
98
|
+
identity: undefined;
|
|
99
|
+
generated: undefined;
|
|
100
|
+
}, {}>;
|
|
101
|
+
sequence: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
102
|
+
name: string;
|
|
103
|
+
tableName: "workspace_history_refs";
|
|
104
|
+
dataType: "number int53";
|
|
105
|
+
data: number;
|
|
106
|
+
driverParam: number;
|
|
107
|
+
notNull: true;
|
|
108
|
+
hasDefault: true;
|
|
109
|
+
isPrimaryKey: false;
|
|
110
|
+
isAutoincrement: false;
|
|
111
|
+
hasRuntimeDefault: false;
|
|
112
|
+
enumValues: undefined;
|
|
113
|
+
baseColumn: never;
|
|
114
|
+
identity: undefined;
|
|
115
|
+
generated: undefined;
|
|
116
|
+
}, {}>;
|
|
117
|
+
};
|
|
118
|
+
dialect: "sqlite";
|
|
119
|
+
isAlias: false;
|
|
120
|
+
}>;
|
|
121
|
+
workspaceHistoryRevisions: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
122
|
+
name: "workspace_history_revisions";
|
|
123
|
+
schema: undefined;
|
|
124
|
+
columns: {
|
|
125
|
+
workspace: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
126
|
+
name: string;
|
|
127
|
+
tableName: "workspace_history_revisions";
|
|
128
|
+
dataType: "string";
|
|
129
|
+
data: string;
|
|
130
|
+
driverParam: string;
|
|
131
|
+
notNull: true;
|
|
132
|
+
hasDefault: false;
|
|
133
|
+
isPrimaryKey: false;
|
|
134
|
+
isAutoincrement: false;
|
|
135
|
+
hasRuntimeDefault: false;
|
|
136
|
+
enumValues: [string, ...string[]];
|
|
137
|
+
baseColumn: never;
|
|
138
|
+
identity: undefined;
|
|
139
|
+
generated: undefined;
|
|
140
|
+
}, {}>;
|
|
141
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
142
|
+
name: string;
|
|
143
|
+
tableName: "workspace_history_revisions";
|
|
144
|
+
dataType: "string";
|
|
145
|
+
data: string;
|
|
146
|
+
driverParam: string;
|
|
147
|
+
notNull: true;
|
|
148
|
+
hasDefault: false;
|
|
149
|
+
isPrimaryKey: false;
|
|
150
|
+
isAutoincrement: false;
|
|
151
|
+
hasRuntimeDefault: false;
|
|
152
|
+
enumValues: [string, ...string[]];
|
|
153
|
+
baseColumn: never;
|
|
154
|
+
identity: undefined;
|
|
155
|
+
generated: undefined;
|
|
156
|
+
}, {}>;
|
|
157
|
+
ref: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
158
|
+
name: string;
|
|
159
|
+
tableName: "workspace_history_revisions";
|
|
160
|
+
dataType: "string";
|
|
161
|
+
data: string;
|
|
162
|
+
driverParam: string;
|
|
163
|
+
notNull: true;
|
|
164
|
+
hasDefault: false;
|
|
165
|
+
isPrimaryKey: false;
|
|
166
|
+
isAutoincrement: false;
|
|
167
|
+
hasRuntimeDefault: false;
|
|
168
|
+
enumValues: [string, ...string[]];
|
|
169
|
+
baseColumn: never;
|
|
170
|
+
identity: undefined;
|
|
171
|
+
generated: undefined;
|
|
172
|
+
}, {}>;
|
|
173
|
+
parentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
174
|
+
name: string;
|
|
175
|
+
tableName: "workspace_history_revisions";
|
|
176
|
+
dataType: "string";
|
|
177
|
+
data: string;
|
|
178
|
+
driverParam: string;
|
|
179
|
+
notNull: false;
|
|
180
|
+
hasDefault: false;
|
|
181
|
+
isPrimaryKey: false;
|
|
182
|
+
isAutoincrement: false;
|
|
183
|
+
hasRuntimeDefault: false;
|
|
184
|
+
enumValues: [string, ...string[]];
|
|
185
|
+
baseColumn: never;
|
|
186
|
+
identity: undefined;
|
|
187
|
+
generated: undefined;
|
|
188
|
+
}, {}>;
|
|
189
|
+
sequence: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
190
|
+
name: string;
|
|
191
|
+
tableName: "workspace_history_revisions";
|
|
192
|
+
dataType: "number int53";
|
|
193
|
+
data: number;
|
|
194
|
+
driverParam: number;
|
|
195
|
+
notNull: true;
|
|
196
|
+
hasDefault: false;
|
|
197
|
+
isPrimaryKey: false;
|
|
198
|
+
isAutoincrement: false;
|
|
199
|
+
hasRuntimeDefault: false;
|
|
200
|
+
enumValues: undefined;
|
|
201
|
+
baseColumn: never;
|
|
202
|
+
identity: undefined;
|
|
203
|
+
generated: undefined;
|
|
204
|
+
}, {}>;
|
|
205
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
206
|
+
name: string;
|
|
207
|
+
tableName: "workspace_history_revisions";
|
|
208
|
+
dataType: "string";
|
|
209
|
+
data: string;
|
|
210
|
+
driverParam: string;
|
|
211
|
+
notNull: true;
|
|
212
|
+
hasDefault: false;
|
|
213
|
+
isPrimaryKey: false;
|
|
214
|
+
isAutoincrement: false;
|
|
215
|
+
hasRuntimeDefault: false;
|
|
216
|
+
enumValues: [string, ...string[]];
|
|
217
|
+
baseColumn: never;
|
|
218
|
+
identity: undefined;
|
|
219
|
+
generated: undefined;
|
|
220
|
+
}, {}>;
|
|
221
|
+
message: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
222
|
+
name: string;
|
|
223
|
+
tableName: "workspace_history_revisions";
|
|
224
|
+
dataType: "string";
|
|
225
|
+
data: string;
|
|
226
|
+
driverParam: string;
|
|
227
|
+
notNull: false;
|
|
228
|
+
hasDefault: false;
|
|
229
|
+
isPrimaryKey: false;
|
|
230
|
+
isAutoincrement: false;
|
|
231
|
+
hasRuntimeDefault: false;
|
|
232
|
+
enumValues: [string, ...string[]];
|
|
233
|
+
baseColumn: never;
|
|
234
|
+
identity: undefined;
|
|
235
|
+
generated: undefined;
|
|
236
|
+
}, {}>;
|
|
237
|
+
metadata: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
238
|
+
name: string;
|
|
239
|
+
tableName: "workspace_history_revisions";
|
|
240
|
+
dataType: "object json";
|
|
241
|
+
data: Record<string, unknown>;
|
|
242
|
+
driverParam: string;
|
|
243
|
+
notNull: false;
|
|
244
|
+
hasDefault: false;
|
|
245
|
+
isPrimaryKey: false;
|
|
246
|
+
isAutoincrement: false;
|
|
247
|
+
hasRuntimeDefault: false;
|
|
248
|
+
enumValues: undefined;
|
|
249
|
+
baseColumn: never;
|
|
250
|
+
identity: undefined;
|
|
251
|
+
generated: undefined;
|
|
252
|
+
}, {}>;
|
|
253
|
+
files: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
254
|
+
name: string;
|
|
255
|
+
tableName: "workspace_history_revisions";
|
|
256
|
+
dataType: "number int53";
|
|
257
|
+
data: number;
|
|
258
|
+
driverParam: number;
|
|
259
|
+
notNull: true;
|
|
260
|
+
hasDefault: false;
|
|
261
|
+
isPrimaryKey: false;
|
|
262
|
+
isAutoincrement: false;
|
|
263
|
+
hasRuntimeDefault: false;
|
|
264
|
+
enumValues: undefined;
|
|
265
|
+
baseColumn: never;
|
|
266
|
+
identity: undefined;
|
|
267
|
+
generated: undefined;
|
|
268
|
+
}, {}>;
|
|
269
|
+
bytes: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
270
|
+
name: string;
|
|
271
|
+
tableName: "workspace_history_revisions";
|
|
272
|
+
dataType: "number int53";
|
|
273
|
+
data: number;
|
|
274
|
+
driverParam: number;
|
|
275
|
+
notNull: true;
|
|
276
|
+
hasDefault: false;
|
|
277
|
+
isPrimaryKey: false;
|
|
278
|
+
isAutoincrement: false;
|
|
279
|
+
hasRuntimeDefault: false;
|
|
280
|
+
enumValues: undefined;
|
|
281
|
+
baseColumn: never;
|
|
282
|
+
identity: undefined;
|
|
283
|
+
generated: undefined;
|
|
284
|
+
}, {}>;
|
|
285
|
+
entries: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
286
|
+
name: string;
|
|
287
|
+
tableName: "workspace_history_revisions";
|
|
288
|
+
dataType: "object json";
|
|
289
|
+
data: Record<string, HistoryManifestFile>;
|
|
290
|
+
driverParam: string;
|
|
291
|
+
notNull: true;
|
|
292
|
+
hasDefault: false;
|
|
293
|
+
isPrimaryKey: false;
|
|
294
|
+
isAutoincrement: false;
|
|
295
|
+
hasRuntimeDefault: false;
|
|
296
|
+
enumValues: undefined;
|
|
297
|
+
baseColumn: never;
|
|
298
|
+
identity: undefined;
|
|
299
|
+
generated: undefined;
|
|
300
|
+
}, {}>;
|
|
301
|
+
committed: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
302
|
+
name: string;
|
|
303
|
+
tableName: "workspace_history_revisions";
|
|
304
|
+
dataType: "boolean";
|
|
305
|
+
data: boolean;
|
|
306
|
+
driverParam: number;
|
|
307
|
+
notNull: true;
|
|
308
|
+
hasDefault: true;
|
|
309
|
+
isPrimaryKey: false;
|
|
310
|
+
isAutoincrement: false;
|
|
311
|
+
hasRuntimeDefault: false;
|
|
312
|
+
enumValues: undefined;
|
|
313
|
+
baseColumn: never;
|
|
314
|
+
identity: undefined;
|
|
315
|
+
generated: undefined;
|
|
316
|
+
}, {}>;
|
|
317
|
+
};
|
|
318
|
+
dialect: "sqlite";
|
|
319
|
+
isAlias: false;
|
|
320
|
+
}>;
|
|
321
|
+
workspaceHistoryObjects: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
322
|
+
name: "workspace_history_objects";
|
|
323
|
+
schema: undefined;
|
|
324
|
+
columns: {
|
|
325
|
+
workspace: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
326
|
+
name: string;
|
|
327
|
+
tableName: "workspace_history_objects";
|
|
328
|
+
dataType: "string";
|
|
329
|
+
data: string;
|
|
330
|
+
driverParam: string;
|
|
331
|
+
notNull: true;
|
|
332
|
+
hasDefault: false;
|
|
333
|
+
isPrimaryKey: false;
|
|
334
|
+
isAutoincrement: false;
|
|
335
|
+
hasRuntimeDefault: false;
|
|
336
|
+
enumValues: [string, ...string[]];
|
|
337
|
+
baseColumn: never;
|
|
338
|
+
identity: undefined;
|
|
339
|
+
generated: undefined;
|
|
340
|
+
}, {}>;
|
|
341
|
+
digest: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
342
|
+
name: string;
|
|
343
|
+
tableName: "workspace_history_objects";
|
|
344
|
+
dataType: "string";
|
|
345
|
+
data: string;
|
|
346
|
+
driverParam: string;
|
|
347
|
+
notNull: true;
|
|
348
|
+
hasDefault: false;
|
|
349
|
+
isPrimaryKey: false;
|
|
350
|
+
isAutoincrement: false;
|
|
351
|
+
hasRuntimeDefault: false;
|
|
352
|
+
enumValues: [string, ...string[]];
|
|
353
|
+
baseColumn: never;
|
|
354
|
+
identity: undefined;
|
|
355
|
+
generated: undefined;
|
|
356
|
+
}, {}>;
|
|
357
|
+
size: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
358
|
+
name: string;
|
|
359
|
+
tableName: "workspace_history_objects";
|
|
360
|
+
dataType: "number int53";
|
|
361
|
+
data: number;
|
|
362
|
+
driverParam: number;
|
|
363
|
+
notNull: true;
|
|
364
|
+
hasDefault: false;
|
|
365
|
+
isPrimaryKey: false;
|
|
366
|
+
isAutoincrement: false;
|
|
367
|
+
hasRuntimeDefault: false;
|
|
368
|
+
enumValues: undefined;
|
|
369
|
+
baseColumn: never;
|
|
370
|
+
identity: undefined;
|
|
371
|
+
generated: undefined;
|
|
372
|
+
}, {}>;
|
|
373
|
+
};
|
|
374
|
+
dialect: "sqlite";
|
|
375
|
+
isAlias: false;
|
|
376
|
+
}>;
|
|
377
|
+
workspaceHistoryMetadata: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
378
|
+
name: "workspace_history_metadata";
|
|
379
|
+
schema: undefined;
|
|
380
|
+
columns: {
|
|
381
|
+
workspace: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
382
|
+
name: string;
|
|
383
|
+
tableName: "workspace_history_metadata";
|
|
384
|
+
dataType: "string";
|
|
385
|
+
data: string;
|
|
386
|
+
driverParam: string;
|
|
387
|
+
notNull: true;
|
|
388
|
+
hasDefault: false;
|
|
389
|
+
isPrimaryKey: false;
|
|
390
|
+
isAutoincrement: false;
|
|
391
|
+
hasRuntimeDefault: false;
|
|
392
|
+
enumValues: [string, ...string[]];
|
|
393
|
+
baseColumn: never;
|
|
394
|
+
identity: undefined;
|
|
395
|
+
generated: undefined;
|
|
396
|
+
}, {}>;
|
|
397
|
+
key: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
398
|
+
name: string;
|
|
399
|
+
tableName: "workspace_history_metadata";
|
|
400
|
+
dataType: "string";
|
|
401
|
+
data: string;
|
|
402
|
+
driverParam: string;
|
|
403
|
+
notNull: true;
|
|
404
|
+
hasDefault: false;
|
|
405
|
+
isPrimaryKey: false;
|
|
406
|
+
isAutoincrement: false;
|
|
407
|
+
hasRuntimeDefault: false;
|
|
408
|
+
enumValues: [string, ...string[]];
|
|
409
|
+
baseColumn: never;
|
|
410
|
+
identity: undefined;
|
|
411
|
+
generated: undefined;
|
|
412
|
+
}, {}>;
|
|
413
|
+
value: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
414
|
+
name: string;
|
|
415
|
+
tableName: "workspace_history_metadata";
|
|
416
|
+
dataType: "object json";
|
|
417
|
+
data: unknown;
|
|
418
|
+
driverParam: string;
|
|
419
|
+
notNull: true;
|
|
420
|
+
hasDefault: false;
|
|
421
|
+
isPrimaryKey: false;
|
|
422
|
+
isAutoincrement: false;
|
|
423
|
+
hasRuntimeDefault: false;
|
|
424
|
+
enumValues: undefined;
|
|
425
|
+
baseColumn: never;
|
|
426
|
+
identity: undefined;
|
|
427
|
+
generated: undefined;
|
|
428
|
+
}, {}>;
|
|
429
|
+
};
|
|
430
|
+
dialect: "sqlite";
|
|
431
|
+
isAlias: false;
|
|
432
|
+
}>;
|
|
433
|
+
};
|
|
434
|
+
export { workspaceHistorySchema as n, HistoryManifestFile as t };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { bigint, boolean, index, integer, json, jsonb, pgTable, primaryKey, text } from "drizzle-orm/pg-core";
|
|
2
|
+
/** Include these tables in a Postgres Database Definition and apply its migrations. */
|
|
3
|
+
const workspaceHistorySchema = {
|
|
4
|
+
workspaceHistoryWorkspaces: pgTable("workspace_history_workspaces", {
|
|
5
|
+
workspace: text("workspace").primaryKey(),
|
|
6
|
+
deleted: boolean("deleted").notNull().default(false)
|
|
7
|
+
}),
|
|
8
|
+
workspaceHistoryRefs: pgTable("workspace_history_refs", {
|
|
9
|
+
workspace: text("workspace").notNull(),
|
|
10
|
+
ref: text("ref").notNull(),
|
|
11
|
+
head: text("head"),
|
|
12
|
+
sequence: integer("sequence").notNull().default(0)
|
|
13
|
+
}, (table) => [primaryKey({ columns: [table.workspace, table.ref] })]),
|
|
14
|
+
workspaceHistoryRevisions: pgTable("workspace_history_revisions", {
|
|
15
|
+
workspace: text("workspace").notNull(),
|
|
16
|
+
id: text("id").notNull(),
|
|
17
|
+
ref: text("ref").notNull(),
|
|
18
|
+
parentId: text("parent_id"),
|
|
19
|
+
sequence: integer("sequence").notNull(),
|
|
20
|
+
createdAt: text("created_at").notNull(),
|
|
21
|
+
message: text("message"),
|
|
22
|
+
metadata: json("metadata").$type(),
|
|
23
|
+
files: integer("files").notNull(),
|
|
24
|
+
bytes: bigint("bytes", { mode: "number" }).notNull(),
|
|
25
|
+
entries: json("entries").$type().notNull(),
|
|
26
|
+
fileIndex: jsonb("file_index").$type().notNull(),
|
|
27
|
+
committed: boolean("committed").notNull().default(false)
|
|
28
|
+
}, (table) => [primaryKey({ columns: [table.workspace, table.id] }), index("workspace_history_timeline").on(table.workspace, table.ref, table.committed, table.sequence)]),
|
|
29
|
+
workspaceHistoryObjects: pgTable("workspace_history_objects", {
|
|
30
|
+
workspace: text("workspace").notNull(),
|
|
31
|
+
digest: text("digest").notNull(),
|
|
32
|
+
size: bigint("size", { mode: "number" }).notNull()
|
|
33
|
+
}, (table) => [primaryKey({ columns: [table.workspace, table.digest] })]),
|
|
34
|
+
workspaceHistoryMetadata: pgTable("workspace_history_metadata", {
|
|
35
|
+
workspace: text("workspace").notNull(),
|
|
36
|
+
key: text("key").notNull(),
|
|
37
|
+
value: json("value").$type().notNull()
|
|
38
|
+
}, (table) => [primaryKey({ columns: [table.workspace, table.key] })])
|
|
39
|
+
};
|
|
40
|
+
export { workspaceHistorySchema as t };
|