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.
- package/cli/commands/index.ts +12 -2
- package/cli/index.ts +6 -2
- package/dist/chunk-4JK3AKWC.mjs +2 -0
- package/dist/chunk-6BUT7DXS.mjs +7953 -0
- package/dist/chunk-NKSCHJ57.js +7953 -0
- package/dist/chunk-XVWH6PJQ.js +2 -0
- package/dist/cli/index.d.mts +2 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +7 -0
- package/dist/cli/index.mjs +7 -0
- package/dist/index.d.mts +195 -0
- package/dist/index.d.ts +195 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/dist/react/index.d.mts +143 -0
- package/dist/react/index.d.ts +143 -0
- package/dist/react/index.js +2 -0
- package/dist/react/index.mjs +2 -0
- package/package.json +37 -20
- package/tsup.config.ts +32 -0
package/cli/commands/index.ts
CHANGED
|
@@ -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 = [
|
|
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
|
-
|
|
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};
|