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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-svc",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "Local microservice bootstrap CLI for Cloud Run and Workers services with Neon-backed data.",
5
5
  "module": "index.ts",
6
6
  "type": "module",
@@ -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
- run("make", ["migrate"], { env });
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
 
@@ -4,5 +4,6 @@ env "local" {
4
4
 
5
5
  migration {
6
6
  dir = "file://migrations"
7
+ revisions_schema = "public"
7
8
  }
8
9
  }
@@ -4,5 +4,6 @@ env "local" {
4
4
 
5
5
  migration {
6
6
  dir = "file://migrations"
7
+ revisions_schema = "public"
7
8
  }
8
9
  }