@supatype/cli 0.3.1 → 0.3.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.
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +168 -158
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +77 -0
- package/dist/api-config-cache.d.ts +20 -0
- package/dist/api-config-cache.d.ts.map +1 -1
- package/dist/api-config-cache.js +27 -0
- package/dist/api-config-cache.js.map +1 -1
- package/dist/augmentation-generator.d.ts.map +1 -1
- package/dist/augmentation-generator.js +126 -26
- package/dist/augmentation-generator.js.map +1 -1
- package/dist/cli-version-embedded.js +1 -1
- package/dist/client-generator.d.ts +3 -0
- package/dist/client-generator.d.ts.map +1 -0
- package/dist/client-generator.js +108 -0
- package/dist/client-generator.js.map +1 -0
- package/dist/commands/functions.d.ts.map +1 -1
- package/dist/commands/functions.js +2 -2
- package/dist/commands/functions.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +3 -3
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +36 -29
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +14 -13
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/seed.d.ts +27 -1
- package/dist/commands/seed.d.ts.map +1 -1
- package/dist/commands/seed.js +206 -33
- package/dist/commands/seed.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +19 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/db-port.d.ts +36 -0
- package/dist/db-port.d.ts.map +1 -0
- package/dist/db-port.js +90 -0
- package/dist/db-port.js.map +1 -0
- package/dist/dev-compose.d.ts.map +1 -1
- package/dist/dev-compose.js +108 -13
- package/dist/dev-compose.js.map +1 -1
- package/dist/engine-client.d.ts +1 -0
- package/dist/engine-client.d.ts.map +1 -1
- package/dist/engine-client.js +47 -2
- package/dist/engine-client.js.map +1 -1
- package/dist/engine-floor.d.ts +27 -4
- package/dist/engine-floor.d.ts.map +1 -1
- package/dist/engine-floor.js +90 -9
- package/dist/engine-floor.js.map +1 -1
- package/dist/functions-context-refresh.d.ts +4 -0
- package/dist/functions-context-refresh.d.ts.map +1 -0
- package/dist/functions-context-refresh.js +26 -0
- package/dist/functions-context-refresh.js.map +1 -0
- package/dist/functions-deno-types.d.ts +9 -0
- package/dist/functions-deno-types.d.ts.map +1 -1
- package/dist/functions-deno-types.js +21 -1
- package/dist/functions-deno-types.js.map +1 -1
- package/dist/gitignore.d.ts +3 -1
- package/dist/gitignore.d.ts.map +1 -1
- package/dist/gitignore.js +35 -6
- package/dist/gitignore.js.map +1 -1
- package/dist/hooks-generator.d.ts.map +1 -1
- package/dist/hooks-generator.js +18 -3
- package/dist/hooks-generator.js.map +1 -1
- package/dist/schema-ast-v2.d.ts.map +1 -1
- package/dist/schema-ast-v2.js +17 -8
- package/dist/schema-ast-v2.js.map +1 -1
- package/dist/seed-connection.d.ts +60 -0
- package/dist/seed-connection.d.ts.map +1 -0
- package/dist/seed-connection.js +90 -0
- package/dist/seed-connection.js.map +1 -0
- package/dist/seed-ir.d.ts +66 -0
- package/dist/seed-ir.d.ts.map +1 -0
- package/dist/seed-ir.js +265 -0
- package/dist/seed-ir.js.map +1 -0
- package/dist/seed-runner.d.ts +44 -0
- package/dist/seed-runner.d.ts.map +1 -0
- package/dist/seed-runner.js +83 -0
- package/dist/seed-runner.js.map +1 -0
- package/dist/seed.d.ts +345 -0
- package/dist/seed.d.ts.map +1 -1
- package/dist/seed.js +138 -0
- package/dist/seed.js.map +1 -1
- package/dist/self-host-compose.d.ts +10 -2
- package/dist/self-host-compose.d.ts.map +1 -1
- package/dist/self-host-compose.js +73 -6
- package/dist/self-host-compose.js.map +1 -1
- package/dist/strict.d.ts +29 -0
- package/dist/strict.d.ts.map +1 -0
- package/dist/strict.js +37 -0
- package/dist/strict.js.map +1 -0
- package/dist/studio-dev-server.d.ts +12 -2
- package/dist/studio-dev-server.d.ts.map +1 -1
- package/dist/studio-dev-server.js +12 -2
- package/dist/studio-dev-server.js.map +1 -1
- package/dist/type-extractor.d.ts.map +1 -1
- package/dist/type-extractor.js +81 -2
- package/dist/type-extractor.js.map +1 -1
- package/dist/type-generation.d.ts +43 -0
- package/dist/type-generation.d.ts.map +1 -1
- package/dist/type-generation.js +93 -2
- package/dist/type-generation.js.map +1 -1
- package/package.json +2 -2
- package/src/api-config-cache.ts +30 -0
- package/src/augmentation-generator.ts +142 -26
- package/src/cli-version-embedded.ts +1 -1
- package/src/client-generator.ts +122 -0
- package/src/commands/functions.ts +5 -2
- package/src/commands/generate.ts +7 -3
- package/src/commands/init.ts +41 -31
- package/src/commands/push.ts +14 -15
- package/src/commands/seed.ts +294 -44
- package/src/commands/update.ts +20 -1
- package/src/db-port.ts +99 -0
- package/src/dev-compose.ts +116 -16
- package/src/engine-client.ts +52 -3
- package/src/engine-floor.ts +100 -9
- package/src/functions-context-refresh.ts +25 -0
- package/src/functions-deno-types.ts +24 -1
- package/src/gitignore.ts +38 -10
- package/src/hooks-generator.ts +21 -6
- package/src/schema-ast-v2.ts +17 -8
- package/src/seed-connection.ts +146 -0
- package/src/seed-ir.ts +311 -0
- package/src/seed-runner.ts +109 -0
- package/src/seed.ts +408 -0
- package/src/self-host-compose.ts +74 -6
- package/src/strict.ts +40 -0
- package/src/studio-dev-server.ts +12 -2
- package/src/type-extractor.ts +109 -2
- package/src/type-generation.ts +111 -2
- package/tests/access-composition.test.ts +123 -0
- package/tests/ast-derived-outputs.test.ts +92 -0
- package/tests/augmentation-generator.test.ts +273 -7
- package/tests/client-generator.test.ts +103 -0
- package/tests/db-port.test.ts +128 -0
- package/tests/engine-floor.test.ts +93 -0
- package/tests/external-database-compose.test.ts +8 -1
- package/tests/fixtures/seed_golden_ir.json +186 -0
- package/tests/functions-context-refresh.test.ts +86 -0
- package/tests/gitignore-secrets.test.ts +90 -0
- package/tests/runtime-contract.test.ts +146 -8
- package/tests/seed-connection.test.ts +158 -0
- package/tests/seed-ir.test.ts +436 -0
- package/tests/strict.test.ts +78 -0
- package/tests/type-extractor.test.ts +34 -0
- package/tsconfig.tsbuildinfo +1 -1
package/dist/commands/seed.js
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `supatype seed`: find the seed files, collect what they describe, hand it to the engine.
|
|
3
|
+
*
|
|
4
|
+
* Discovery and the Cloud guard are what this command already did. The rest is new only in
|
|
5
|
+
* that it collects rather than executes: no connection handling, no SQL, no transaction, no
|
|
6
|
+
* error mapping, because those are the engine's now and six more language runners should not
|
|
7
|
+
* each reimplement them and disagree.
|
|
8
|
+
*
|
|
9
|
+
* Both module shapes are supported. A default-exported function is the new contract and is
|
|
10
|
+
* handed a context; a module with no default export is the old one, which does its work on
|
|
11
|
+
* import and is told so by name. Nothing here removes the old shape.
|
|
12
|
+
*/
|
|
1
13
|
import { existsSync, readdirSync } from "node:fs";
|
|
2
|
-
import { join, resolve } from "node:path";
|
|
3
|
-
import { isLinkedToCloudProject } from "../binary-cache.js";
|
|
4
|
-
import { loadConfig } from "../config.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
14
|
+
import { join, relative, resolve, sep } from "node:path";
|
|
15
|
+
import { isLinkedToCloudProject, pinnedVersion } from "../binary-cache.js";
|
|
16
|
+
import { loadConfig, loadSchemaAst } from "../config.js";
|
|
17
|
+
import { engineRequest, ensureEngine } from "../engine-client.js";
|
|
18
|
+
import { seedUnsupportedByPinnedEngine } from "../engine-floor.js";
|
|
19
|
+
import { pgSchema, projectRootFromConfig, schemaPathFromProject } from "../project-config.js";
|
|
20
|
+
import { DsnNotFound, redact, resolveSeedDsn } from "../seed-connection.js";
|
|
21
|
+
import { collectSeed, SeedCollectionFailed } from "../seed-runner.js";
|
|
22
|
+
import { seedBuilderPathWithDefaults } from "../type-generation.js";
|
|
23
|
+
import { error, info, success, warn } from "../ui/messages.js";
|
|
8
24
|
const SEED_EXT = /\.(ts|mts|tsx)$/;
|
|
9
|
-
/** Seed entries under `seeds/`, sorted by filename
|
|
25
|
+
/** Seed entries under `seeds/`, sorted by filename. */
|
|
10
26
|
export function discoverSeedsDir(cwd, seedsDir) {
|
|
11
27
|
if (!existsSync(seedsDir))
|
|
12
28
|
return [];
|
|
@@ -19,38 +35,195 @@ export function registerSeed(program) {
|
|
|
19
35
|
.command("seed [file]")
|
|
20
36
|
.description("Run database seeds: optional single file; else all seeds/*.ts (alphabetical); else seed.ts")
|
|
21
37
|
.option("--force", "Allow running when the project is linked to Supatype Cloud (dangerous)", false)
|
|
38
|
+
.option("--atomic", "Run every seed file in one transaction", false)
|
|
39
|
+
.option("--status", "Show what has been applied, and what has changed since", false)
|
|
40
|
+
.option("--connection <dsn>", "Database to seed, instead of the resolved one")
|
|
41
|
+
.option("--environment <name>", "Environment name, for an `environment` condition")
|
|
22
42
|
.action(async (file, opts) => {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
43
|
+
const code = await runSeed(file, opts);
|
|
44
|
+
if (code !== 0)
|
|
45
|
+
process.exit(code);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Separated from the action so the exit code is a value rather than a side effect.
|
|
50
|
+
*
|
|
51
|
+
* `0` applied, `1` a seed failed, `2` the run could not start. The split is what lets CI
|
|
52
|
+
* retry one and not the other.
|
|
53
|
+
*/
|
|
54
|
+
export async function runSeed(file, opts) {
|
|
55
|
+
const cwd = process.cwd();
|
|
56
|
+
const config = loadConfig(cwd);
|
|
57
|
+
if (isLinkedToCloudProject(cwd, config) && !opts.force) {
|
|
58
|
+
error("This project is linked to Supatype Cloud. Refusing to run seeds locally.\n" +
|
|
59
|
+
" Pass --force only if you intend to target this linked project (advanced).");
|
|
60
|
+
return 2;
|
|
61
|
+
}
|
|
62
|
+
// Before the connection is resolved and before a builder is looked for: an engine that cannot
|
|
63
|
+
// seed makes both of those pointless, and the pin is the cheapest thing here to read.
|
|
64
|
+
const tooOld = seedUnsupportedByPinnedEngine(pinnedVersion("engine", config));
|
|
65
|
+
if (tooOld !== undefined) {
|
|
66
|
+
error(tooOld);
|
|
67
|
+
return 2;
|
|
68
|
+
}
|
|
69
|
+
let dsn;
|
|
70
|
+
try {
|
|
71
|
+
dsn = resolveSeedDsn(cwd, config, {
|
|
72
|
+
connection: opts.connection,
|
|
73
|
+
allowDerived: true,
|
|
74
|
+
}).dsn;
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
error(e instanceof DsnNotFound ? e.message : String(e));
|
|
78
|
+
return 2;
|
|
79
|
+
}
|
|
80
|
+
await ensureEngine();
|
|
81
|
+
if (opts.status)
|
|
82
|
+
return await reportStatus(dsn);
|
|
83
|
+
const paths = seedPaths(file, cwd, config);
|
|
84
|
+
const missing = paths.filter((p) => !existsSync(p));
|
|
85
|
+
if (missing.length > 0) {
|
|
86
|
+
error(`Seed file(s) not found:\n ${missing.join("\n ")}`);
|
|
87
|
+
return 2;
|
|
88
|
+
}
|
|
89
|
+
const builderPath = locateBuilder(cwd, config);
|
|
90
|
+
if (builderPath === undefined)
|
|
91
|
+
return 2;
|
|
92
|
+
const prepared = [];
|
|
93
|
+
for (const path of paths) {
|
|
94
|
+
const label = toPosix(relative(cwd, path));
|
|
95
|
+
let collected;
|
|
96
|
+
try {
|
|
97
|
+
collected = collectSeed(path, {
|
|
98
|
+
cwd,
|
|
99
|
+
builderPath,
|
|
100
|
+
environment: opts.environment,
|
|
101
|
+
});
|
|
29
102
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (file !== undefined && file.trim() !== "") {
|
|
34
|
-
paths = [resolve(cwd, file)];
|
|
103
|
+
catch (e) {
|
|
104
|
+
error(e instanceof SeedCollectionFailed ? e.message : String(e));
|
|
105
|
+
return 1;
|
|
35
106
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
paths = [resolve(root, "seed.ts")];
|
|
40
|
-
}
|
|
107
|
+
if (collected.stdout.trim().length > 0) {
|
|
108
|
+
for (const line of collected.stdout.trimEnd().split(/\r?\n/))
|
|
109
|
+
info(` ${label}: ${line}`);
|
|
41
110
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
111
|
+
if (collected.result.shape === "legacy") {
|
|
112
|
+
warn(`${label} has no default export, so it ran on import.\n` +
|
|
113
|
+
" Export a default function to have its writes collected, ordered and applied in one transaction.");
|
|
114
|
+
continue;
|
|
46
115
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
116
|
+
prepared.push({
|
|
117
|
+
file: label,
|
|
118
|
+
document: collected.result.ir,
|
|
119
|
+
config: collected.result.config,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
if (prepared.length === 0) {
|
|
123
|
+
info("No seed operations to apply.");
|
|
124
|
+
return 0;
|
|
125
|
+
}
|
|
126
|
+
return await apply(prepared, { cwd, config, dsn, opts });
|
|
127
|
+
}
|
|
128
|
+
// --- Discovery ---
|
|
129
|
+
function seedPaths(file, cwd, config) {
|
|
130
|
+
if (file !== undefined && file.trim() !== "")
|
|
131
|
+
return [resolve(cwd, file)];
|
|
132
|
+
const root = projectRootFromConfig(config, cwd);
|
|
133
|
+
const fromDir = discoverSeedsDir(cwd, join(root, "seeds"));
|
|
134
|
+
return fromDir.length > 0 ? fromDir : [resolve(root, "seed.ts")];
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The generated builder, which the runtime needs for the manifest and the fingerprint.
|
|
138
|
+
*
|
|
139
|
+
* Absent is a setup problem with a one-line remedy rather than a crash: the builder is
|
|
140
|
+
* gitignored by design, so a fresh clone that has not run `generate` is the ordinary case.
|
|
141
|
+
*/
|
|
142
|
+
function locateBuilder(cwd, config) {
|
|
143
|
+
const relativePath = seedBuilderPathWithDefaults(config.output);
|
|
144
|
+
const path = resolve(cwd, relativePath);
|
|
145
|
+
if (!existsSync(path)) {
|
|
146
|
+
error(`The generated seed builder is missing: ${toPosix(relativePath)}\n` +
|
|
147
|
+
" Run `supatype generate`. It needs no database and no running stack.");
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
return path;
|
|
151
|
+
}
|
|
152
|
+
async function apply(prepared, options) {
|
|
153
|
+
const { cwd, config, dsn, opts } = options;
|
|
154
|
+
const ast = loadSchemaAst(schemaPathFromProject(config, cwd), cwd);
|
|
155
|
+
// The engine takes one `--run-once` for the run, so a file asking for it decides for all
|
|
156
|
+
// of them. Said out loud rather than generalised silently, because the difference is
|
|
157
|
+
// whether work someone expected to happen happens.
|
|
158
|
+
const askedRunOnce = prepared.filter((one) => one.config.runOnce === true);
|
|
159
|
+
if (askedRunOnce.length > 0 && askedRunOnce.length !== prepared.length) {
|
|
160
|
+
warn("Some seed files declare `runOnce` and others do not, and the run takes one setting.\n" +
|
|
161
|
+
` Applying it to all of them, because ${askedRunOnce
|
|
162
|
+
.map((one) => one.file)
|
|
163
|
+
.join(", ")} asked for it.`);
|
|
164
|
+
}
|
|
165
|
+
const result = await engineRequest("/seed", {
|
|
166
|
+
ast,
|
|
167
|
+
ir_documents: prepared.map((one) => JSON.stringify({ ...one.document, file: one.file })),
|
|
168
|
+
database_url: dsn,
|
|
169
|
+
schema: pgSchema(config),
|
|
170
|
+
atomic: opts.atomic,
|
|
171
|
+
run_once: askedRunOnce.length > 0,
|
|
172
|
+
...(opts.environment !== undefined ? { environment: opts.environment } : {}),
|
|
173
|
+
});
|
|
174
|
+
return report(result, prepared.length, dsn);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Print what happened to every file, then the outcome.
|
|
178
|
+
*
|
|
179
|
+
* Every file, not just the one that failed: without `--atomic` a failure in the third of
|
|
180
|
+
* five leaves the first two committed, and a report that mentioned only the failure would
|
|
181
|
+
* leave the reader to guess at the rest.
|
|
182
|
+
*/
|
|
183
|
+
function report(result, count, dsn) {
|
|
184
|
+
for (const file of result.files ?? []) {
|
|
185
|
+
const rows = Object.entries(file.written ?? {})
|
|
186
|
+
.map(([model, written]) => `${model} ${written}`)
|
|
187
|
+
.join(", ");
|
|
188
|
+
info(` ${file.file.padEnd(32)} ${file.status}${rows.length > 0 ? ` (${rows})` : ""}`);
|
|
189
|
+
for (const skipped of file.skippedGroups ?? []) {
|
|
190
|
+
info(` condition was false, skipped: ${skipped}`);
|
|
53
191
|
}
|
|
192
|
+
}
|
|
193
|
+
if (result.ok) {
|
|
194
|
+
success(`Seeded ${count} file(s) into ${redact(dsn)}.`);
|
|
195
|
+
return 0;
|
|
196
|
+
}
|
|
197
|
+
const failure = result.error;
|
|
198
|
+
if (failure === undefined) {
|
|
199
|
+
error("The seed failed, and the engine said nothing about why.");
|
|
200
|
+
return 1;
|
|
201
|
+
}
|
|
202
|
+
const where = [failure.file, failure.path].filter((part) => part !== undefined && part !== "");
|
|
203
|
+
error((failure.message ?? failure.kind) +
|
|
204
|
+
(where.length > 0 ? `\n at ${where.join(" ")}` : "") +
|
|
205
|
+
(failure.remedy !== undefined && failure.remedy !== null ? `\n ${failure.remedy}` : ""));
|
|
206
|
+
// Nothing ran because nothing could: the environment, not the seed.
|
|
207
|
+
return failure.kind === "connection" || failure.kind === "document" ? 2 : 1;
|
|
208
|
+
}
|
|
209
|
+
async function reportStatus(dsn) {
|
|
210
|
+
const result = await engineRequest("/seed", {
|
|
211
|
+
database_url: dsn,
|
|
212
|
+
status: true,
|
|
54
213
|
});
|
|
214
|
+
const files = result.files ?? [];
|
|
215
|
+
if (files.length === 0) {
|
|
216
|
+
info(`No seeds have been applied to ${redact(dsn)}.`);
|
|
217
|
+
return 0;
|
|
218
|
+
}
|
|
219
|
+
for (const entry of files) {
|
|
220
|
+
info(` ${entry.file.padEnd(32)} ${entry.status.padEnd(12)} ${entry.appliedAt} ` +
|
|
221
|
+
`${entry.durationMs}ms${entry.drifted ? " changed since it was applied" : ""}`);
|
|
222
|
+
}
|
|
223
|
+
return 0;
|
|
224
|
+
}
|
|
225
|
+
/** Reported with forward slashes, so the message reads the same on every platform. */
|
|
226
|
+
function toPosix(path) {
|
|
227
|
+
return path.split(sep).join("/");
|
|
55
228
|
}
|
|
56
229
|
//# sourceMappingURL=seed.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.js","sourceRoot":"","sources":["../../src/commands/seed.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"seed.js","sourceRoot":"","sources":["../../src/commands/seed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC1E,OAAO,EAAE,UAAU,EAAE,aAAa,EAAuB,MAAM,cAAc,CAAA;AAC7E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3E,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAEnE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE9D,MAAM,QAAQ,GAAG,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AAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,SAAS,IAAI;YAC1E,GAAG,KAAK,CAAC,UAAU,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,EAAE,EAAE,CAClF,CAAA;IACH,CAAC;IACD,OAAO,CAAC,CAAA;AACV,CAAC;AAED,sFAAsF;AACtF,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAmCxC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmIrD"}
|
package/dist/commands/update.js
CHANGED
|
@@ -19,6 +19,20 @@ function resolveConfigFile(cwd) {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* New images alone are not a finished upgrade.
|
|
24
|
+
*
|
|
25
|
+
* Components carry schema with them: grants, policies and the rest are generated by the engine and
|
|
26
|
+
* applied by `push`, not baked into an image. Pulling a newer storage service onto a database that
|
|
27
|
+
* predates its grants leaves every private bucket read refused, and the only clue is in the
|
|
28
|
+
* service's log. The remedy is one command, so it is named here rather than left to be discovered.
|
|
29
|
+
*/
|
|
30
|
+
function pushReminder() {
|
|
31
|
+
plain("");
|
|
32
|
+
info("Run `supatype push` to apply schema changes the new components expect.");
|
|
33
|
+
plain(" Components ship code; grants, policies and functions come from your schema.");
|
|
34
|
+
plain(" Skipping it can leave storage reads and other rules refused until it runs.");
|
|
35
|
+
}
|
|
22
36
|
export function registerUpdate(program) {
|
|
23
37
|
program
|
|
24
38
|
.command("update")
|
|
@@ -30,7 +44,9 @@ export function registerUpdate(program) {
|
|
|
30
44
|
const provider = resolveRuntimeProvider(config);
|
|
31
45
|
if (provider === "docker") {
|
|
32
46
|
if (opts.check) {
|
|
33
|
-
|
|
47
|
+
// There is no `self-host compose pull` subcommand; the earlier text named one and a reader
|
|
48
|
+
// following it got "unknown command". `update` is what pulls.
|
|
49
|
+
info("Docker provider: run `supatype update` without --check to pull the compose images.");
|
|
34
50
|
return;
|
|
35
51
|
}
|
|
36
52
|
const paths = writeSelfHostCompose(cwd, config, { devLocal: true });
|
|
@@ -47,6 +63,7 @@ export function registerUpdate(program) {
|
|
|
47
63
|
exitComposeFailed(status, "Could not pull Compose images.", brand);
|
|
48
64
|
}
|
|
49
65
|
info("Compose images updated.");
|
|
66
|
+
pushReminder();
|
|
50
67
|
return;
|
|
51
68
|
}
|
|
52
69
|
const platform = currentPlatform();
|
|
@@ -129,6 +146,7 @@ export function registerUpdate(program) {
|
|
|
129
146
|
}
|
|
130
147
|
writeFileSync(configPath, text, "utf8");
|
|
131
148
|
info(`${basename(configPath)} updated.`);
|
|
149
|
+
pushReminder();
|
|
132
150
|
});
|
|
133
151
|
}
|
|
134
152
|
//# sourceMappingURL=update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,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+
* The `.env` key that moves it for a dev-local stack, and which takes precedence.
|
|
5
|
+
*
|
|
6
|
+
* Two variables, two deployment shapes: an ordinary self-host stack publishes Postgres at
|
|
7
|
+
* `SUPATYPE_DB_PORT`, and a project with `overrides.engine` publishes it at
|
|
8
|
+
* `SUPATYPE_DEV_DB_PORT` so the host-side engine binary can reach it. Its presence is what marks
|
|
9
|
+
* the second shape, so it wins where both are set.
|
|
10
|
+
*
|
|
11
|
+
* Learned the hard way. The first cut of this file read only `SUPATYPE_DB_PORT`, so on a project
|
|
12
|
+
* with `SUPATYPE_DEV_DB_PORT=54330` it rewrote a correct `DATABASE_URL` to 5432, where nothing was
|
|
13
|
+
* listening. It fixed the bug it was written for and reintroduced it through the other door, which
|
|
14
|
+
* is the exact failure this file exists to prevent.
|
|
15
|
+
*/
|
|
16
|
+
export declare const DEV_DB_PORT_ENV = "SUPATYPE_DEV_DB_PORT";
|
|
17
|
+
/** What compose binds when neither variable is set, and what `init` writes into the URL. */
|
|
18
|
+
export declare const DEFAULT_DB_PORT = 5432;
|
|
19
|
+
/** The port Postgres is published on for this project, from `.env`. */
|
|
20
|
+
export declare function publishedDbPort(env: Record<string, string>): number;
|
|
21
|
+
/** What changed, for the caller to report. */
|
|
22
|
+
export interface DbPortSync {
|
|
23
|
+
from: string;
|
|
24
|
+
to: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Rewrite `DATABASE_URL`'s port to match `SUPATYPE_DB_PORT`, and report it.
|
|
28
|
+
*
|
|
29
|
+
* Returns null when there is nothing to do, which is the common case.
|
|
30
|
+
*
|
|
31
|
+
* Only touches a URL pointing at this machine. A project whose `DATABASE_URL` names a managed
|
|
32
|
+
* Postgres elsewhere has a port that is nothing to do with our compose mapping, and rewriting it
|
|
33
|
+
* would repoint the whole project at a database that does not exist.
|
|
34
|
+
*/
|
|
35
|
+
export declare function syncDatabaseUrlPort(cwd: string): DbPortSync | null;
|
|
36
|
+
//# sourceMappingURL=db-port.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db-port.d.ts","sourceRoot":"","sources":["../src/db-port.ts"],"names":[],"mappings":"AAsBA,mFAAmF;AACnF,eAAO,MAAM,WAAW,qBAAqB,CAAA;AAE7C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,yBAAyB,CAAA;AAErD,4FAA4F;AAC5F,eAAO,MAAM,eAAe,OAAO,CAAA;AAKnC,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAWnE;AAED,8CAA8C;AAC9C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAuBlE"}
|
package/dist/db-port.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep `DATABASE_URL` pointing at the port Postgres is actually published on.
|
|
3
|
+
*
|
|
4
|
+
* `SUPATYPE_DB_PORT` moves the host side of the compose port mapping, so a second project on one
|
|
5
|
+
* machine can avoid a clash. `DATABASE_URL` is what every host-side script uses: seeds, one-off
|
|
6
|
+
* psql, `supatype admin create-user --connection`. `init` writes the URL with 5432 in it and
|
|
7
|
+
* nothing has ever reconciled the two.
|
|
8
|
+
*
|
|
9
|
+
* The result is a project that starts cleanly, serves every request, and fails the first time
|
|
10
|
+
* someone runs `npm run seed`:
|
|
11
|
+
*
|
|
12
|
+
* AggregateError [ECONNREFUSED]: connect ECONNREFUSED 127.0.0.1:5432
|
|
13
|
+
*
|
|
14
|
+
* with the database listening on 5433 and nothing connecting the error to the port variable the
|
|
15
|
+
* person set half an hour earlier. The generated `.env` even carries a comment conceding the
|
|
16
|
+
* assumption: "Self-host compose uses the same DATABASE_URL when Postgres is published on
|
|
17
|
+
* localhost:5432."
|
|
18
|
+
*
|
|
19
|
+
* `SUPATYPE_DB_PORT` is the source of truth, because it is what compose binds. The URL follows it.
|
|
20
|
+
*/
|
|
21
|
+
import { readEnvFile, upsertEnvFile } from "./env-file.js";
|
|
22
|
+
/** The `.env` key that moves the published Postgres port for a self-host stack. */
|
|
23
|
+
export const DB_PORT_ENV = "SUPATYPE_DB_PORT";
|
|
24
|
+
/**
|
|
25
|
+
* The `.env` key that moves it for a dev-local stack, and which takes precedence.
|
|
26
|
+
*
|
|
27
|
+
* Two variables, two deployment shapes: an ordinary self-host stack publishes Postgres at
|
|
28
|
+
* `SUPATYPE_DB_PORT`, and a project with `overrides.engine` publishes it at
|
|
29
|
+
* `SUPATYPE_DEV_DB_PORT` so the host-side engine binary can reach it. Its presence is what marks
|
|
30
|
+
* the second shape, so it wins where both are set.
|
|
31
|
+
*
|
|
32
|
+
* Learned the hard way. The first cut of this file read only `SUPATYPE_DB_PORT`, so on a project
|
|
33
|
+
* with `SUPATYPE_DEV_DB_PORT=54330` it rewrote a correct `DATABASE_URL` to 5432, where nothing was
|
|
34
|
+
* listening. It fixed the bug it was written for and reintroduced it through the other door, which
|
|
35
|
+
* is the exact failure this file exists to prevent.
|
|
36
|
+
*/
|
|
37
|
+
export const DEV_DB_PORT_ENV = "SUPATYPE_DEV_DB_PORT";
|
|
38
|
+
/** What compose binds when neither variable is set, and what `init` writes into the URL. */
|
|
39
|
+
export const DEFAULT_DB_PORT = 5432;
|
|
40
|
+
/** Hosts whose port is ours to correct. Anything else is somebody else's database. */
|
|
41
|
+
const LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
|
|
42
|
+
/** The port Postgres is published on for this project, from `.env`. */
|
|
43
|
+
export function publishedDbPort(env) {
|
|
44
|
+
// Dev-local first: its presence is what says this project publishes for a host-side engine.
|
|
45
|
+
for (const key of [DEV_DB_PORT_ENV, DB_PORT_ENV]) {
|
|
46
|
+
const raw = (env[key] ?? "").trim();
|
|
47
|
+
if (raw === "")
|
|
48
|
+
continue;
|
|
49
|
+
const port = Number(raw);
|
|
50
|
+
// A non-numeric or out-of-range value is the operator's to fix, and compose reports it far
|
|
51
|
+
// better than we can. Falling through keeps this from inventing a port nothing listens on.
|
|
52
|
+
if (Number.isInteger(port) && port > 0 && port < 65536)
|
|
53
|
+
return port;
|
|
54
|
+
}
|
|
55
|
+
return DEFAULT_DB_PORT;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Rewrite `DATABASE_URL`'s port to match `SUPATYPE_DB_PORT`, and report it.
|
|
59
|
+
*
|
|
60
|
+
* Returns null when there is nothing to do, which is the common case.
|
|
61
|
+
*
|
|
62
|
+
* Only touches a URL pointing at this machine. A project whose `DATABASE_URL` names a managed
|
|
63
|
+
* Postgres elsewhere has a port that is nothing to do with our compose mapping, and rewriting it
|
|
64
|
+
* would repoint the whole project at a database that does not exist.
|
|
65
|
+
*/
|
|
66
|
+
export function syncDatabaseUrlPort(cwd) {
|
|
67
|
+
const env = readEnvFile(cwd);
|
|
68
|
+
const raw = (env["DATABASE_URL"] ?? "").trim();
|
|
69
|
+
if (raw === "")
|
|
70
|
+
return null;
|
|
71
|
+
let url;
|
|
72
|
+
try {
|
|
73
|
+
url = new URL(raw);
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// Malformed, so not ours to rewrite: a partial edit here would turn a typo into a URL that
|
|
77
|
+
// parses and points somewhere wrong, which is harder to spot than the typo.
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
if (!LOCAL_HOSTS.has(url.hostname))
|
|
81
|
+
return null;
|
|
82
|
+
const wanted = String(publishedDbPort(env));
|
|
83
|
+
const current = url.port === "" ? String(DEFAULT_DB_PORT) : url.port;
|
|
84
|
+
if (current === wanted)
|
|
85
|
+
return null;
|
|
86
|
+
url.port = wanted;
|
|
87
|
+
upsertEnvFile(cwd, { DATABASE_URL: url.toString() });
|
|
88
|
+
return { from: current, to: wanted };
|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G,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;IAC9C,IAAI,GAAG,KAAK,EAAE;QAAE,OAAO,IAAI,CAAA;IAE3B,IAAI,GAAQ,CAAA;IACZ,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IACpB,CAAC;IAAC,MAAM,CAAC;QACP,2FAA2F;QAC3F,4EAA4E;QAC5E,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAA;IAE/C,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAA;IAC3C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAA;IACpE,IAAI,OAAO,KAAK,MAAM;QAAE,OAAO,IAAI,CAAA;IAEnC,GAAG,CAAC,IAAI,GAAG,MAAM,CAAA;IACjB,aAAa,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IACpD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,CAAA;AACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-compose.d.ts","sourceRoot":"","sources":["../src/dev-compose.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"dev-compose.d.ts","sourceRoot":"","sources":["../src/dev-compose.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,OAAO,EAQL,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAA;AAc5B,OAAO,EASL,KAAK,oBAAoB,EAC1B,MAAM,wBAAw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