pagezero 0.6.0 → 1.0.0-rc.1
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 +1 -1
- package/src/commands/init.ts +5 -15
package/package.json
CHANGED
package/src/commands/init.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { input } from "@inquirer/prompts"
|
|
2
|
-
import {
|
|
2
|
+
import { $ } from "bun"
|
|
3
3
|
import chalk from "chalk"
|
|
4
4
|
import { spinner } from "../utils"
|
|
5
5
|
|
|
@@ -26,20 +26,10 @@ export async function init() {
|
|
|
26
26
|
$`bun run setup`.quiet().cwd(projectName),
|
|
27
27
|
)
|
|
28
28
|
|
|
29
|
-
//
|
|
30
|
-
await spinner(`
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
wranglerJson.d1_databases[0].database_name = `${projectName}-development`
|
|
34
|
-
wranglerJson.env.production.d1_databases[0].database_name = `${projectName}-production`
|
|
35
|
-
wranglerJson.env.preview.d1_databases[0].database_name = `${projectName}-preview`
|
|
36
|
-
wranglerJson.env.test.d1_databases[0].database_name = `${projectName}-test`
|
|
37
|
-
wranglerJson.env.production.d1_databases[0].database_id = "<DATABASE_ID>"
|
|
38
|
-
wranglerJson.env.preview.d1_databases[0].database_id = "<DATABASE_ID>"
|
|
39
|
-
await write(
|
|
40
|
-
`${projectName}/wrangler.json`,
|
|
41
|
-
JSON.stringify(wranglerJson, null, 2),
|
|
42
|
-
)
|
|
29
|
+
// Configure wrangler.json
|
|
30
|
+
await spinner(`configuring wrangler.json`, async () => {
|
|
31
|
+
await $`bun run setup:wrangler`.quiet().cwd(projectName)
|
|
32
|
+
await $`bun run check:fix`.quiet().cwd(projectName)
|
|
43
33
|
})
|
|
44
34
|
|
|
45
35
|
// Initialize git repository
|