nextjs-drizzle-gen 0.2.1 → 0.2.3
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/index.js +4 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { program } from "commander";
|
|
5
|
+
import { createRequire } from "module";
|
|
5
6
|
|
|
6
7
|
// src/generators/model.ts
|
|
7
8
|
import * as path4 from "path";
|
|
@@ -1361,6 +1362,8 @@ Note: Schema in ${config.dbPath}/schema.ts was not modified.`);
|
|
|
1361
1362
|
}
|
|
1362
1363
|
|
|
1363
1364
|
// src/index.ts
|
|
1365
|
+
var require2 = createRequire(import.meta.url);
|
|
1366
|
+
var { version } = require2("../package.json");
|
|
1364
1367
|
function handleError(error) {
|
|
1365
1368
|
if (error instanceof Error) {
|
|
1366
1369
|
log.error(error.message);
|
|
@@ -1369,7 +1372,7 @@ function handleError(error) {
|
|
|
1369
1372
|
}
|
|
1370
1373
|
process.exit(1);
|
|
1371
1374
|
}
|
|
1372
|
-
program.name("drizzle-gen").description("Rails-like generators for Next.js + Drizzle").version(
|
|
1375
|
+
program.name("drizzle-gen").description("Rails-like generators for Next.js + Drizzle").version(version);
|
|
1373
1376
|
program.command("model <name> [fields...]").description(
|
|
1374
1377
|
`Generate a Drizzle schema model
|
|
1375
1378
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextjs-drizzle-gen",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Rails-like generators for Next.js + Drizzle ORM projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"drizzle-gen": "dist/index.js"
|
|
7
|
+
"drizzle-gen": "dist/index.js",
|
|
8
|
+
"nextjs-drizzle-gen": "dist/index.js"
|
|
8
9
|
},
|
|
9
10
|
"main": "dist/index.js",
|
|
10
11
|
"types": "dist/index.d.ts",
|