create-svc 0.1.27 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/scaffold.test.ts
CHANGED
|
@@ -176,6 +176,8 @@ test("scaffolds all runtime/framework variants with shared cloudrun config", asy
|
|
|
176
176
|
expect(makefile).toContain("bun run ./scripts/wait-for-db.ts");
|
|
177
177
|
expect(makefile).toContain("bun run ./scripts/dev.ts go run ./cmd/server");
|
|
178
178
|
expect(await Bun.file(join(generatedRoot, "atlas.hcl")).exists()).toBeTrue();
|
|
179
|
+
const atlasConfig = await Bun.file(join(generatedRoot, "atlas.hcl")).text();
|
|
180
|
+
expect(atlasConfig).toContain('revisions_schema = "public"');
|
|
179
181
|
expect(await Bun.file(join(generatedRoot, "migrations", "atlas.sum")).exists()).toBeTrue();
|
|
180
182
|
expect(await Bun.file(join(generatedRoot, "cmd", "migrate", "main.go")).exists()).toBeFalse();
|
|
181
183
|
expect(await Bun.file(join(generatedRoot, "internal", "temporal", "worker.go")).exists()).toBeTrue();
|
|
@@ -128,7 +128,11 @@ function runLanguageTask(task: "migrate", env?: Record<string, string | undefine
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
if (task === "migrate") {
|
|
131
|
-
|
|
131
|
+
if (env?.DATABASE_URL) {
|
|
132
|
+
run("atlas", ["migrate", "apply", "--env", "local"], { env });
|
|
133
|
+
} else {
|
|
134
|
+
run("make", ["migrate"], { env });
|
|
135
|
+
}
|
|
132
136
|
return `${task} finished`;
|
|
133
137
|
}
|
|
134
138
|
|