create-svc 0.1.25 → 0.1.26

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.25",
3
+ "version": "0.1.26",
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",
@@ -1,4 +1,5 @@
1
1
  import type { ScaffoldConfig } from "./scaffold";
2
+ import { dirname } from "node:path";
2
3
 
3
4
  type CommandOptions = {
4
5
  cwd: string;
@@ -169,7 +170,7 @@ function requireCommand(name: string) {
169
170
  function run(command: string, args: string[], options: CommandOptions): CommandResult {
170
171
  const result = Bun.spawnSync([command, ...args], {
171
172
  cwd: options.cwd,
172
- env: process.env,
173
+ env: postScaffoldEnv(),
173
174
  stdin: options.input === undefined ? undefined : encoder.encode(options.input),
174
175
  stdout: options.allowFailure || options.quiet ? "pipe" : "inherit",
175
176
  stderr: options.allowFailure || options.quiet ? "pipe" : "inherit",
@@ -188,3 +189,11 @@ function run(command: string, args: string[], options: CommandOptions): CommandR
188
189
  stderr,
189
190
  };
190
191
  }
192
+
193
+ function postScaffoldEnv() {
194
+ const currentBinDir = dirname(Bun.argv[1] ?? "");
195
+ return {
196
+ ...process.env,
197
+ PATH: currentBinDir ? `${currentBinDir}:${process.env.PATH ?? ""}` : process.env.PATH,
198
+ };
199
+ }