pecunia-cli 0.0.0 → 0.0.2
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/api.d.mts +1 -1
- package/dist/api.mjs +1 -1
- package/dist/{generators-xnsg6Fwk.mjs → generators-9JxZBCCZ.mjs} +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
- package/README.md +0 -48
package/dist/api.d.mts
CHANGED
package/dist/api.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as generateKyselySchema, n as generateSchema, o as generateDrizzleSchema, r as generatePrismaSchema, t as adapters } from "./generators-
|
|
1
|
+
import { a as generateKyselySchema, n as generateSchema, o as generateDrizzleSchema, r as generatePrismaSchema, t as adapters } from "./generators-9JxZBCCZ.mjs";
|
|
2
2
|
|
|
3
3
|
export { adapters, generateDrizzleSchema, generateKyselySchema, generatePrismaSchema, generateSchema };
|
|
@@ -2,7 +2,7 @@ import fs, { existsSync } from "node:fs";
|
|
|
2
2
|
import fs$1 from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { getMigrations } from "pecunia";
|
|
5
|
-
import { getPaymentTables, initGetFieldName, initGetModelName } from "
|
|
5
|
+
import { getPaymentTables, initGetFieldName, initGetModelName } from "pecunia-core";
|
|
6
6
|
import prettier from "prettier";
|
|
7
7
|
import { produceSchema } from "@mrleebo/prisma-ast";
|
|
8
8
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as getPackageInfo, n as generateSchema } from "./generators-
|
|
2
|
+
import { i as getPackageInfo, n as generateSchema } from "./generators-9JxZBCCZ.mjs";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import fs$1 from "node:fs/promises";
|
|
@@ -9,7 +9,7 @@ import chalk from "chalk";
|
|
|
9
9
|
import prompts from "prompts";
|
|
10
10
|
import yoctoSpinner from "yocto-spinner";
|
|
11
11
|
import * as z from "zod/v4";
|
|
12
|
-
import { PecuniaError } from "
|
|
12
|
+
import { PecuniaError } from "pecunia-core";
|
|
13
13
|
import "prettier";
|
|
14
14
|
import babelPresetReact from "@babel/preset-react";
|
|
15
15
|
import babelPresetTypeScript from "@babel/preset-typescript";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pecunia-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@babel/core": "^7.28.4",
|
|
53
53
|
"@babel/preset-react": "^7.27.1",
|
|
54
54
|
"@babel/preset-typescript": "^7.27.1",
|
|
55
|
-
"
|
|
55
|
+
"pecunia-core": "workspace:*",
|
|
56
56
|
"@better-auth/utils": "catalog:",
|
|
57
57
|
"@clack/prompts": "^0.11.0",
|
|
58
58
|
"@mrleebo/prisma-ast": "^0.13.0",
|
package/README.md
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Better Auth CLI
|
|
2
|
-
|
|
3
|
-
Better Auth comes with a built-in CLI to help you manage the database schema
|
|
4
|
-
needed for both core functionality and plugins.
|
|
5
|
-
|
|
6
|
-
### **Init**
|
|
7
|
-
|
|
8
|
-
The CLI includes an `init` command to add Better Auth to your project.
|
|
9
|
-
|
|
10
|
-
```bash title="terminal"
|
|
11
|
-
npx @better-auth/cli@latest init
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### **Generate**
|
|
15
|
-
|
|
16
|
-
The `generate` command creates the schema required by Better Auth.
|
|
17
|
-
If you’re using a database adapter like Prisma or Drizzle, this command will
|
|
18
|
-
generate the right schema for your ORM.
|
|
19
|
-
If you’re using the built-in Kysely adapter, it will generate an SQL file you
|
|
20
|
-
can run directly on your database.
|
|
21
|
-
|
|
22
|
-
```bash title="terminal"
|
|
23
|
-
npx @better-auth/cli@latest generate
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### **Migrate**
|
|
27
|
-
|
|
28
|
-
The `migrate` command applies the Better Auth schema directly to your database.
|
|
29
|
-
This is available if you’re using the built-in Kysely adapter.
|
|
30
|
-
For other adapters, you’ll need to apply the schema using your ORM’s migration
|
|
31
|
-
tool.
|
|
32
|
-
|
|
33
|
-
```bash title="terminal"
|
|
34
|
-
npx @better-auth/cli@latest migrate
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### **Secret**
|
|
38
|
-
|
|
39
|
-
The CLI also provides a way to generate a secret key for your Better Auth
|
|
40
|
-
instance.
|
|
41
|
-
|
|
42
|
-
```bash title="terminal"
|
|
43
|
-
npx @better-auth/cli@latest secret
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## License
|
|
47
|
-
|
|
48
|
-
MIT
|