appflare 0.2.10 → 0.2.12

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.
@@ -108,8 +108,9 @@ export async function runMigrate(
108
108
  loadedConfig.outDirAbs,
109
109
  "drizzle.config.ts",
110
110
  );
111
+ const npxCmd = process.platform === "win32" ? "npx.cmd" : "npx";
111
112
  const drizzleGenerate = Bun.spawn(
112
- ["drizzle-kit", "generate", "--config", drizzleConfigPath],
113
+ [npxCmd, "drizzle-kit", "generate", "--config", drizzleConfigPath],
113
114
  {
114
115
  cwd: packageDir,
115
116
  stdin: "inherit",
@@ -126,7 +127,14 @@ export async function runMigrate(
126
127
  }
127
128
 
128
129
  const databaseName = loadedConfig.config.database[0].databaseName;
129
- const wranglerArgs = ["wrangler", "d1", "migrations", "apply", databaseName];
130
+ const wranglerArgs = [
131
+ npxCmd,
132
+ "wrangler",
133
+ "d1",
134
+ "migrations",
135
+ "apply",
136
+ databaseName,
137
+ ];
130
138
 
131
139
  if (options.local) {
132
140
  wranglerArgs.push("--local");
@@ -190,7 +198,9 @@ export async function runAddAdmin(
190
198
  ].join(" ");
191
199
 
192
200
  const databaseName = loadedConfig.config.database[0].databaseName;
201
+ const npxCmd = process.platform === "win32" ? "npx.cmd" : "npx";
193
202
  const wranglerArgs = [
203
+ npxCmd,
194
204
  "wrangler",
195
205
  "d1",
196
206
  "execute",
package/cli/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env bun
2
1
  import { Command } from "commander";
3
2
  import { runBuild, runDev, runMigrate, runAddAdmin } from "./commands/index";
4
3
 
@@ -105,4 +104,9 @@ program
105
104
  });
106
105
  });
107
106
 
108
- await program.parseAsync(process.argv);
107
+ (async () => {
108
+ await program.parseAsync(process.argv);
109
+ })().catch((error) => {
110
+ console.error(error);
111
+ process.exit(1);
112
+ });
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:true}):c,a));export{m as a,n as b,o as c};