qarpeo 0.1.24 → 0.1.25
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/dist/chunks/wrangler.mjs +3 -2
- package/dist/cli/index.mjs +2 -1
- package/package.json +1 -1
package/dist/chunks/wrangler.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
9
9
|
import { mkdir, writeFile, readFile } from 'node:fs/promises';
|
|
10
10
|
import { defu } from 'defu';
|
|
11
11
|
|
|
12
|
-
const version = "0.1.
|
|
12
|
+
const version = "0.1.25";
|
|
13
13
|
|
|
14
14
|
function scanSchemaExports(schemaFiles) {
|
|
15
15
|
const types = [];
|
|
@@ -348,7 +348,8 @@ function applyD1Migrations(cwd, options = {}) {
|
|
|
348
348
|
execPath = isWindows ? "wrangler.cmd" : "wrangler";
|
|
349
349
|
}
|
|
350
350
|
const dbName = options.dbName || "DB";
|
|
351
|
-
const
|
|
351
|
+
const rootWranglerPath = resolve(cwd, "wrangler.json");
|
|
352
|
+
const wranglerConfigPath = options.wranglerConfigPath || (existsSync(rootWranglerPath) ? rootWranglerPath : resolve(cwd, ".nuxt/wrangler.json"));
|
|
352
353
|
const wranglerArgs = ["d1", "migrations", "apply", dbName];
|
|
353
354
|
if (existsSync(wranglerConfigPath)) {
|
|
354
355
|
wranglerArgs.push("-c", wranglerConfigPath);
|
package/dist/cli/index.mjs
CHANGED
|
@@ -2621,7 +2621,8 @@ const init = defineCommand({
|
|
|
2621
2621
|
binding: "DB",
|
|
2622
2622
|
database_name: `${projectName}-db`,
|
|
2623
2623
|
database_id: existingDbId || "DB_LOCAL_DEV",
|
|
2624
|
-
migrations_dir: "server/db/migrations"
|
|
2624
|
+
migrations_dir: "server/db/migrations",
|
|
2625
|
+
migrations_pattern: "server/db/migrations/*/migration.sql"
|
|
2625
2626
|
}
|
|
2626
2627
|
];
|
|
2627
2628
|
}
|