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.
Files changed (39) hide show
  1. package/README.md +19 -6
  2. package/dist/bin/activerecord.js +1 -1
  3. package/dist/bin/ajv.js +1 -1
  4. package/dist/bin/arktype.js +1 -1
  5. package/dist/bin/atlas.js +1 -1
  6. package/dist/bin/django.js +1 -1
  7. package/dist/bin/docs.d.ts +1 -0
  8. package/dist/bin/docs.js +5 -0
  9. package/dist/bin/drizzle.js +1 -1
  10. package/dist/bin/ecto.js +1 -1
  11. package/dist/bin/efcore.js +1 -1
  12. package/dist/bin/effect.js +1 -1
  13. package/dist/bin/eloquent.js +1 -1
  14. package/dist/bin/er.js +1 -1
  15. package/dist/bin/exposed.js +1 -1
  16. package/dist/bin/gorm.js +1 -1
  17. package/dist/bin/hekireki.js +5 -5
  18. package/dist/bin/kysely.js +1 -1
  19. package/dist/bin/openapi.js +1 -1
  20. package/dist/bin/pydantic.js +1 -1
  21. package/dist/bin/sea-orm.js +1 -1
  22. package/dist/bin/seed.js +1 -1
  23. package/dist/bin/sqlalchemy.js +1 -1
  24. package/dist/bin/typebox.js +1 -1
  25. package/dist/bin/valibot.js +1 -1
  26. package/dist/bin/zod.js +1 -1
  27. package/dist/{bin-DGGtXAJh.js → bin-CeA8S_Qj.js} +6293 -5321
  28. package/dist/{discover-Dyzb_7x-.js → discover-kVbu9DxT.js} +2 -1
  29. package/dist/{emit-CbBm_I0C.js → emit-DF8ehOFH.js} +1 -1
  30. package/dist/{schema-BRtObhQG.js → errors-0PjX4y1Z.js} +218 -2
  31. package/dist/{migrate-B-EMC7CC.js → migrate-U9pCkJTm.js} +4 -3
  32. package/dist/native-engine-D1iZDp41.js +537 -0
  33. package/dist/{plan-DVBOCKsd.js → plan-ChzbNv7_.js} +5 -220
  34. package/dist/{run-BKHmqvBJ.js → run-Caiu7ebD.js} +4 -4
  35. package/dist/schema-DzF7tKzG.js +571 -0
  36. package/dist/{sql-BYvD2bjK.js → sql-DciD3-lE.js} +30 -300
  37. package/dist/{start-KD0RjI3H.js → start-C1n6SWZ3.js} +8 -505
  38. package/package.json +2 -1
  39. 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 | 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-seed` | Schema module for `hekireki seed` | |
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
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/activerecord.ts
4
4
  registerGenerator("activerecord");
5
5
  export {};
package/dist/bin/ajv.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/ajv.ts
4
4
  registerGenerator("ajv");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/arktype.ts
4
4
  registerGenerator("arktype");
5
5
  export {};
package/dist/bin/atlas.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/atlas.ts
4
4
  registerGenerator("atlas");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/django.ts
4
4
  registerGenerator("django");
5
5
  export {};
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
+ // src/bin/docs.ts
4
+ registerGenerator("docs");
5
+ export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/drizzle.ts
4
4
  registerGenerator("drizzle");
5
5
  export {};
package/dist/bin/ecto.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/ecto.ts
4
4
  registerGenerator("ecto");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/efcore.ts
4
4
  registerGenerator("efcore");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/effect.ts
4
4
  registerGenerator("effect");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/eloquent.ts
4
4
  registerGenerator("eloquent");
5
5
  export {};
package/dist/bin/er.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/er.ts
4
4
  registerGenerator("er");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/exposed.ts
4
4
  registerGenerator("exposed");
5
5
  export {};
package/dist/bin/gorm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/gorm.ts
4
4
  registerGenerator("gorm");
5
5
  export {};
@@ -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.45.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-KD0RjI3H.js"));
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-BKHmqvBJ.js"));
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-B-EMC7CC.js"));
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-B-EMC7CC.js"));
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,
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/kysely.ts
4
4
  registerGenerator("kysely");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/openapi.ts
4
4
  registerGenerator("openapi");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/pydantic.ts
4
4
  registerGenerator("pydantic");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/sea-orm.ts
4
4
  registerGenerator("sea-orm");
5
5
  export {};
package/dist/bin/seed.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/seed.ts
4
4
  registerGenerator("seed");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/sqlalchemy.ts
4
4
  registerGenerator("sqlalchemy");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/typebox.ts
4
4
  registerGenerator("typebox");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/valibot.ts
4
4
  registerGenerator("valibot");
5
5
  export {};
package/dist/bin/zod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-DGGtXAJh.js";
2
+ import { t as registerGenerator } from "../bin-CeA8S_Qj.js";
3
3
  // src/bin/zod.ts
4
4
  registerGenerator("zod");
5
5
  export {};