create-svc 0.1.74 → 0.1.75

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.74",
3
+ "version": "0.1.75",
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",
@@ -62,7 +62,7 @@ test("scaffolds all runtime/framework variants with shared cloudrun config", asy
62
62
  expect(serviceConfig).toContain('"kind": "microservice"');
63
63
  expect(serviceConfig).toContain(`"runtime": "${variant.runtime}"`);
64
64
  expect(serviceConfig).toContain(`"framework": "${variant.framework}"`);
65
- expect(serviceConfig).toContain('"module": "buf.build/anmho/dns-api"');
65
+ expect(serviceConfig).toContain('"module": "buf.build/anmho-services/dns-api"');
66
66
  expect(serviceConfig).toContain('"cloudflare_vault_path": "prod/providers/cloudflare"');
67
67
  expect(serviceConfig).toContain('"issuer": "https://auth.anmho.com/api/auth"');
68
68
  expect(serviceConfig).toContain('"audience": "api://dns-api"');
@@ -204,7 +204,7 @@ test("scaffolds all runtime/framework variants with shared cloudrun config", asy
204
204
  expect(mainGo).toContain("NewWaitlistService");
205
205
  expect(mainGo).toContain("WaitlistServiceName");
206
206
  const bufConfig = await Bun.file(join(generatedRoot, "buf.yaml")).text();
207
- expect(bufConfig).toContain("name: buf.build/anmho/dns-api");
207
+ expect(bufConfig).toContain("name: buf.build/anmho-services/dns-api");
208
208
  } else {
209
209
  expect(goMod).not.toContain("connectrpc.com/connect");
210
210
  expect(mainGo).toContain("NewWaitlistService");
@@ -451,7 +451,7 @@ async function writeSdkMode(mode: "local" | "remote", published?: PublishedSdk)
451
451
  }
452
452
 
453
453
  function bufModule() {
454
- return config.buf.module || `buf.build/anmho/${config.serviceName}`;
454
+ return config.buf.module || `buf.build/anmho-services/${config.serviceName}`;
455
455
  }
456
456
 
457
457
  function ensureBufModule(authEnv: Record<string, string>) {
@@ -47,7 +47,7 @@ export const config = {
47
47
  vaultPath: vault.temporal_path || "prod/providers/temporal",
48
48
  },
49
49
  buf: {
50
- module: serviceConfig.buf?.module || `buf.build/anmho/${serviceConfig.service_id}`,
50
+ module: serviceConfig.buf?.module || `buf.build/anmho-services/${serviceConfig.service_id}`,
51
51
  vaultMount: vault.mount || "secret",
52
52
  vaultPath: vault.buf_path || "prod/providers/buf",
53
53
  },
@@ -48,14 +48,14 @@ test("service sdk publish pushes the named Buf module and selects remote SDK mod
48
48
  "#!/bin/sh",
49
49
  `echo "$@" >> "${bufLog}"`,
50
50
  `printf '%s' "$BUF_TOKEN" > "${tokenLog}"`,
51
- 'if [ "$1 $2 $3 $4" = "registry module info buf.build/anmho/sdk-proof" ]; then',
51
+ 'if [ "$1 $2 $3 $4" = "registry module info buf.build/anmho-services/sdk-proof" ]; then',
52
52
  " exit 1",
53
53
  "fi",
54
- 'if [ "$1 $2 $3 $4" = "registry module create buf.build/anmho/sdk-proof" ] && [ "$5 $6" = "--visibility private" ]; then',
54
+ 'if [ "$1 $2 $3 $4" = "registry module create buf.build/anmho-services/sdk-proof" ] && [ "$5 $6" = "--visibility private" ]; then',
55
55
  " exit 0",
56
56
  "fi",
57
57
  'if [ "$1 $2 $3 $4" = "registry module commit list" ]; then',
58
- ' printf \'{"commits":[{"name":"buf.build/anmho/sdk-proof:commit-123","digest":"b5:abc123","create_time":"2026-05-25T12:00:00Z"}]}\'',
58
+ ' printf \'{"commits":[{"name":"buf.build/anmho-services/sdk-proof:commit-123","digest":"b5:abc123","create_time":"2026-05-25T12:00:00Z"}]}\'',
59
59
  " exit 0",
60
60
  "fi",
61
61
  'if [ "$1" = "push" ]; then',
@@ -81,17 +81,17 @@ test("service sdk publish pushes the named Buf module and selects remote SDK mod
81
81
  expect(result.stderr.toString()).not.toContain("test-token");
82
82
  expect((await readFile(bufLog, "utf8")).trim()).toBe(
83
83
  [
84
- "registry module info buf.build/anmho/sdk-proof",
85
- "registry module create buf.build/anmho/sdk-proof --visibility private",
84
+ "registry module info buf.build/anmho-services/sdk-proof",
85
+ "registry module create buf.build/anmho-services/sdk-proof --visibility private",
86
86
  "push",
87
- "registry module commit list buf.build/anmho/sdk-proof --format json --page-size 1",
87
+ "registry module commit list buf.build/anmho-services/sdk-proof --format json --page-size 1",
88
88
  ].join("\n")
89
89
  );
90
90
  expect((await readFile(tokenLog, "utf8")).trim()).toBe("test-token");
91
91
  const sdkState = JSON.parse(await Bun.file(join(generatedRoot, ".service", "sdk.json")).text());
92
92
  expect(sdkState).toMatchObject({
93
93
  mode: "remote",
94
- module: "buf.build/anmho/sdk-proof",
94
+ module: "buf.build/anmho-services/sdk-proof",
95
95
  localPath: "./gen/waitlist/v1",
96
96
  remote: {
97
97
  commit: "commit-123",
@@ -100,7 +100,7 @@ test("service sdk publish pushes the named Buf module and selects remote SDK mod
100
100
  },
101
101
  });
102
102
  const bufConfig = await Bun.file(join(generatedRoot, "buf.yaml")).text();
103
- expect(bufConfig).toContain("name: buf.build/anmho/sdk-proof");
103
+ expect(bufConfig).toContain("name: buf.build/anmho-services/sdk-proof");
104
104
  });
105
105
 
106
106
  test("formatSdkModeDetail reports the recorded remote SDK commit", () => {
@@ -108,15 +108,15 @@ test("formatSdkModeDetail reports the recorded remote SDK commit", () => {
108
108
  formatSdkModeDetail(
109
109
  {
110
110
  mode: "remote",
111
- module: "buf.build/anmho/sdk-proof",
111
+ module: "buf.build/anmho-services/sdk-proof",
112
112
  remote: {
113
113
  commit: "commit-123",
114
114
  digest: "b5:abc123",
115
115
  },
116
116
  },
117
- "buf.build/anmho/fallback"
117
+ "buf.build/anmho-services/fallback"
118
118
  )
119
- ).toBe("remote: buf.build/anmho/sdk-proof@commit-123 (b5:abc123)");
119
+ ).toBe("remote: buf.build/anmho-services/sdk-proof@commit-123 (b5:abc123)");
120
120
  });
121
121
 
122
122
  test("service sdk use-remote records the current Buf commit", async () => {
@@ -132,7 +132,7 @@ test("service sdk use-remote records the current Buf commit", async () => {
132
132
  [
133
133
  "#!/bin/sh",
134
134
  'if [ "$1 $2 $3 $4" = "registry module commit list" ]; then',
135
- ' printf \'{"commits":[{"name":"buf.build/anmho/sdk-proof:commit-456","digest":"b5:def456"}]}\'',
135
+ ' printf \'{"commits":[{"name":"buf.build/anmho-services/sdk-proof:commit-456","digest":"b5:def456"}]}\'',
136
136
  "fi",
137
137
  "exit 0",
138
138
  "",
@@ -172,7 +172,7 @@ test("service sdk publish leaves local SDK mode when Buf push fails", async () =
172
172
  `${JSON.stringify(
173
173
  {
174
174
  mode: "local",
175
- module: "buf.build/anmho/sdk-proof",
175
+ module: "buf.build/anmho-services/sdk-proof",
176
176
  localPath: "./gen/waitlist/v1",
177
177
  updatedAt: "2026-05-25T00:00:00.000Z",
178
178
  },
@@ -86,7 +86,7 @@
86
86
  },
87
87
 
88
88
  "buf": {
89
- "module": "buf.build/anmho/{{SERVICE_ID}}"
89
+ "module": "buf.build/anmho-services/{{SERVICE_ID}}"
90
90
  },
91
91
 
92
92
  "observability": {
@@ -1,7 +1,7 @@
1
1
  version: v2
2
2
  modules:
3
3
  - path: protos
4
- name: buf.build/anmho/{{SERVICE_ID}}
4
+ name: buf.build/anmho-services/{{SERVICE_ID}}
5
5
  lint:
6
6
  use:
7
7
  - STANDARD