hekireki 0.45.0 → 0.47.0
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/README.md +19 -6
- package/dist/bin/activerecord.js +1 -1
- package/dist/bin/ajv.js +1 -1
- package/dist/bin/arktype.js +1 -1
- package/dist/bin/atlas.js +1 -1
- package/dist/bin/django.js +1 -1
- package/dist/bin/docs.d.ts +1 -0
- package/dist/bin/docs.js +5 -0
- package/dist/bin/drizzle.js +1 -1
- package/dist/bin/ecto.js +1 -1
- package/dist/bin/efcore.js +1 -1
- package/dist/bin/effect.js +1 -1
- package/dist/bin/eloquent.js +1 -1
- package/dist/bin/er.js +1 -1
- package/dist/bin/exposed.js +1 -1
- package/dist/bin/gorm.js +1 -1
- package/dist/bin/hekireki.js +5 -5
- package/dist/bin/kysely.js +1 -1
- package/dist/bin/openapi.js +1 -1
- package/dist/bin/pydantic.js +1 -1
- package/dist/bin/sea-orm.js +1 -1
- package/dist/bin/seed.js +1 -1
- package/dist/bin/sqlalchemy.js +1 -1
- package/dist/bin/typebox.js +1 -1
- package/dist/bin/valibot.js +1 -1
- package/dist/bin/zod.js +1 -1
- package/dist/{bin-DGGtXAJh.js → bin-CeA8S_Qj.js} +6293 -5321
- package/dist/{discover-Dyzb_7x-.js → discover-kVbu9DxT.js} +2 -1
- package/dist/{emit-CbBm_I0C.js → emit-DF8ehOFH.js} +1 -1
- package/dist/{schema-BRtObhQG.js → errors-0PjX4y1Z.js} +218 -2
- package/dist/{migrate-B-EMC7CC.js → migrate-U9pCkJTm.js} +4 -3
- package/dist/native-engine-D1iZDp41.js +537 -0
- package/dist/{plan-DVBOCKsd.js → plan-ChzbNv7_.js} +5 -220
- package/dist/{run-BKHmqvBJ.js → run-Caiu7ebD.js} +4 -4
- package/dist/schema-DzF7tKzG.js +571 -0
- package/dist/{sql-BYvD2bjK.js → sql-DciD3-lE.js} +30 -300
- package/dist/{start-KD0RjI3H.js → start-C1n6SWZ3.js} +8 -505
- package/package.json +2 -1
- package/dist/prisma-model-D98BBcmY.js +0 -287
package/README.md
CHANGED
|
@@ -76,18 +76,31 @@ each other's rows alike.
|
|
|
76
76
|
|
|
77
77
|
### Database and documents
|
|
78
78
|
|
|
79
|
-
| Provider | Writes
|
|
80
|
-
| ------------------ |
|
|
81
|
-
| `hekireki-atlas` | Atlas HCL
|
|
82
|
-
| `hekireki-openapi` | OpenAPI 3.1 (`.yaml`, `.json`)
|
|
83
|
-
| `hekireki-er` | ER diagram
|
|
84
|
-
| `hekireki-
|
|
79
|
+
| Provider | Writes | Options |
|
|
80
|
+
| ------------------ | ----------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
81
|
+
| `hekireki-atlas` | Atlas HCL | `schemaName` (`public`, `main` on SQLite) |
|
|
82
|
+
| `hekireki-openapi` | OpenAPI 3.1 (`.yaml`, `.json`) | `title`, `version`, `paths`: the CRUD of each model |
|
|
83
|
+
| `hekireki-er` | ER diagram | `outputs`: files, one per extension (`.md`, `.dbml`, `.png`, `.svg`); `theme` (`light`, `dark`) |
|
|
84
|
+
| `hekireki-docs` | Schema docs (`README.md`, diagrams) | `output`: the directory; `theme` (`light`, `dark`) |
|
|
85
|
+
| `hekireki-seed` | Schema module for `hekireki seed` | |
|
|
85
86
|
|
|
86
87
|
`hekireki-atlas` writes the tables as Prisma Migrate makes them, so `atlas schema diff` against a
|
|
87
88
|
database Prisma made has nothing to change. `hekireki-openapi` writes them as the
|
|
88
89
|
`components.schemas` Atlas's template writes, `///` comments as descriptions; with `paths`, each
|
|
89
90
|
model gets `GET` and `POST /users` and `GET`, `PATCH` and `DELETE /users/{id}`.
|
|
90
91
|
|
|
92
|
+
`hekireki-docs` writes the schema's docs into the directory `output` names: `README.md`, every
|
|
93
|
+
model with its fields, constraints, defaults, indexes, relations both ways, `CREATE TABLE` and
|
|
94
|
+
queries, and every enum, each described by its `///` comment; `er.svg`, the ER
|
|
95
|
+
diagram it opens with; and `tables/<Model>.svg`, one diagram per model with a relation, of the
|
|
96
|
+
model and the models it joins. The definitions are what `prisma migrate diff --from-empty` writes
|
|
97
|
+
for PostgreSQL, MySQL and SQLite. The queries (every row, how many, with the relations, one by its
|
|
98
|
+
key, a create, update and delete) are shown in Prisma Client beside the SQL they send, compiled by
|
|
99
|
+
the query compiler of the project's own `@prisma/client` (Prisma 7 or newer); without one, they
|
|
100
|
+
are shown as code. Nothing connects to a database for either.
|
|
101
|
+
[example/generated/docs](https://github.com/nakita628/hekireki/tree/main/example/generated/docs)
|
|
102
|
+
is such a directory.
|
|
103
|
+
|
|
91
104
|
Every generator keeps Prisma's names: a model or field without `@map` keeps the name it has in the
|
|
92
105
|
schema, and each ORM is told so where its own convention would say otherwise. What each generator
|
|
93
106
|
does beyond that, and what it leaves to the caller, is in
|
package/dist/bin/activerecord.js
CHANGED
package/dist/bin/ajv.js
CHANGED
package/dist/bin/arktype.js
CHANGED
package/dist/bin/atlas.js
CHANGED
package/dist/bin/django.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/bin/docs.js
ADDED
package/dist/bin/drizzle.js
CHANGED
package/dist/bin/ecto.js
CHANGED
package/dist/bin/efcore.js
CHANGED
package/dist/bin/effect.js
CHANGED
package/dist/bin/eloquent.js
CHANGED
package/dist/bin/er.js
CHANGED
package/dist/bin/exposed.js
CHANGED
package/dist/bin/gorm.js
CHANGED
package/dist/bin/hekireki.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Console, Data, Effect, Schema } from "effect";
|
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { CliError, Command, Flag } from "effect/cli";
|
|
8
8
|
// package.json
|
|
9
|
-
var version = "0.
|
|
9
|
+
var version = "0.47.0";
|
|
10
10
|
// src/schema/path.ts
|
|
11
11
|
/** Where Prisma looks for a schema when neither the command nor prisma.config.ts names one. */
|
|
12
12
|
const DEFAULT_SCHEMA_PATHS = ["prisma/schema.prisma", "schema.prisma"];
|
|
@@ -135,7 +135,7 @@ const studioFlags = {
|
|
|
135
135
|
function runStudio(args) {
|
|
136
136
|
return Effect.gen(function* () {
|
|
137
137
|
const schemaPath = yield* resolveSchemaPath(args.schema, [COMMAND_NAME, "studio"]);
|
|
138
|
-
const { startStudioServer } = yield* Effect.promise(() => import("../start-
|
|
138
|
+
const { startStudioServer } = yield* Effect.promise(() => import("../start-C1n6SWZ3.js"));
|
|
139
139
|
const started = yield* startStudioServer({
|
|
140
140
|
schemaPath,
|
|
141
141
|
port: args.port,
|
|
@@ -183,7 +183,7 @@ const seedFlags = {
|
|
|
183
183
|
};
|
|
184
184
|
function runSeedCommand(args) {
|
|
185
185
|
return Effect.gen(function* () {
|
|
186
|
-
const { runSeed, seedBanner } = yield* Effect.promise(() => import("../run-
|
|
186
|
+
const { runSeed, seedBanner } = yield* Effect.promise(() => import("../run-Caiu7ebD.js"));
|
|
187
187
|
const report = yield* runSeed(args, process.cwd()).pipe(Effect.mapError((error) => new CliError.UserError({ cause: error.message })));
|
|
188
188
|
yield* Console.log(seedBanner(report));
|
|
189
189
|
});
|
|
@@ -226,7 +226,7 @@ function runMigrateCheckCommand(args) {
|
|
|
226
226
|
"migrate",
|
|
227
227
|
"check"
|
|
228
228
|
]);
|
|
229
|
-
const { checkBanner, checkJson, runMigrateCheck, summarize } = yield* Effect.promise(() => import("../migrate-
|
|
229
|
+
const { checkBanner, checkJson, runMigrateCheck, summarize } = yield* Effect.promise(() => import("../migrate-U9pCkJTm.js"));
|
|
230
230
|
const report = yield* runMigrateCheck({
|
|
231
231
|
...args,
|
|
232
232
|
schemaPath,
|
|
@@ -273,7 +273,7 @@ function runMigratePlanCommand(args) {
|
|
|
273
273
|
"migrate",
|
|
274
274
|
"plan"
|
|
275
275
|
]);
|
|
276
|
-
const { checkBanner, planSql, readMigration, runMigrateCheck, summarize, writePlan } = yield* Effect.promise(() => import("../migrate-
|
|
276
|
+
const { checkBanner, planSql, readMigration, runMigrateCheck, summarize, writePlan } = yield* Effect.promise(() => import("../migrate-U9pCkJTm.js"));
|
|
277
277
|
const report = yield* runMigrateCheck({
|
|
278
278
|
...args,
|
|
279
279
|
schemaPath,
|
package/dist/bin/kysely.js
CHANGED
package/dist/bin/openapi.js
CHANGED
package/dist/bin/pydantic.js
CHANGED
package/dist/bin/sea-orm.js
CHANGED
package/dist/bin/seed.js
CHANGED
package/dist/bin/sqlalchemy.js
CHANGED
package/dist/bin/typebox.js
CHANGED
package/dist/bin/valibot.js
CHANGED
package/dist/bin/zod.js
CHANGED