|
1 | 1 | //@ts-check |
2 | 2 | /* eslint-disable require-atomic-updates */ |
3 | | -const __dirname = import.meta.dirname; |
| 3 | +import path from "node:path"; |
| 4 | +import { fileURLToPath } from "node:url"; |
| 5 | +const __filename = fileURLToPath(import.meta.url); |
| 6 | +const __dirname = path.dirname(__filename); |
4 | 7 |
|
5 | 8 | import * as inquirer from "@inquirer/prompts"; |
6 | 9 | import fileSelector from "inquirer-file-selector"; |
@@ -124,6 +127,7 @@ async function getDatabaseRunnable(argv /*, priorChoices*/) { |
124 | 127 |
|
125 | 128 | buildCredentials({ |
126 | 129 | ...argv, |
| 130 | + user: "default", |
127 | 131 | database: runnable.choices.regionGroup, |
128 | 132 | }); |
129 | 133 | runnable.fql = `Database.create({ |
@@ -289,11 +293,11 @@ async function getProjectRunnable(argv, priorChoices) { |
289 | 293 | // new db with demo data? create the demo data, then upload the schema |
290 | 294 | await Promise.all([ |
291 | 295 | fsp.cp( |
292 | | - path.join(__dirname, "../lib/schema/demo-collection-schema.fsl"), |
| 296 | + path.join(__dirname, "../src/lib/schema/demo-collection-schema.fsl"), |
293 | 297 | path.join(dirPath, dirName, "collections.fsl"), |
294 | 298 | ), |
295 | 299 | fsp.cp( |
296 | | - path.join(__dirname, "../lib/schema/demo-function-schema.fsl"), |
| 300 | + path.join(__dirname, "../src/lib/schema/demo-function-schema.fsl"), |
297 | 301 | path.join(dirPath, dirName, "functions.fsl"), |
298 | 302 | ), |
299 | 303 | ]); |
|
0 commit comments