hekireki 0.34.0 → 0.37.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 (75) hide show
  1. package/README.md +17 -17
  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/drizzle.js +1 -1
  8. package/dist/bin/ecto.js +1 -1
  9. package/dist/bin/efcore.js +1 -1
  10. package/dist/bin/effect.js +1 -1
  11. package/dist/bin/eloquent.js +1 -1
  12. package/dist/bin/er.js +1 -1
  13. package/dist/bin/exposed.js +1 -1
  14. package/dist/bin/gorm.js +1 -1
  15. package/dist/bin/hekireki.js +80 -20
  16. package/dist/bin/kysely.js +1 -1
  17. package/dist/bin/pydantic.js +1 -1
  18. package/dist/bin/sea-orm.js +1 -1
  19. package/dist/bin/seed.js +1 -1
  20. package/dist/bin/sqlalchemy.js +1 -1
  21. package/dist/bin/typebox.js +1 -1
  22. package/dist/bin/valibot.js +1 -1
  23. package/dist/bin/zod.js +1 -1
  24. package/dist/{bin-B2PLRVJb.js → bin-CVN0pzc4.js} +412 -674
  25. package/dist/{discover-BNQ5gbRn.js → discover-CcuFW0ZA.js} +1 -1
  26. package/dist/{emit-BeblTVH8.js → emit-ALVe1wlq.js} +2 -2
  27. package/dist/{file-Df9ykHXv.js → file-BTbZL3ea.js} +12 -6
  28. package/dist/index.d.ts +1 -1
  29. package/dist/{migrate-Icu7Se0-.js → migrate-DmUsB0Wq.js} +4 -4
  30. package/dist/{plan-EKATG1WY.js → plan-FKGe6CzO.js} +8 -8
  31. package/dist/{utils-ckthTWS0.js → prisma-model-NuNLrPtP.js} +103 -11
  32. package/dist/{run-C13eFGuX.js → run-qU5ejzJJ.js} +17 -19
  33. package/dist/{schema-RYU_i7qd.js → schema-D8vxD4Kv.js} +3 -8
  34. package/dist/{sql-F40UQMF6.js → sql-BWRXT82c.js} +157 -78
  35. package/dist/{start-HLOLxRBL.js → start-DCHq_ac3.js} +57 -98
  36. package/dist/studio/assets/{chip-BasDLVHw.js → chip-DzylbrFL.js} +1 -1
  37. package/dist/studio/assets/{client-D-BDuDx5.js → client-Dntzxukj.js} +1 -1
  38. package/dist/studio/assets/{code-block-Bo0pcw3d.js → code-block-9KOaLIVF.js} +1 -1
  39. package/dist/studio/assets/{codicon-Brq4_Ui5.ttf → codicon-DF1abBS2.ttf} +0 -0
  40. package/dist/studio/assets/{confirm-dialog-GIPt_m1h.js → confirm-dialog-_tJslTz8.js} +1 -1
  41. package/dist/studio/assets/{copy-DVfEjDPw.js → copy-BU2HaQi8.js} +1 -1
  42. package/dist/studio/assets/{copy-button-Di-sHQ2O.js → copy-button-0vjAmGWM.js} +1 -1
  43. package/dist/studio/assets/{dist-CebhqUaX.js → dist-DZceSPCo.js} +1 -1
  44. package/dist/studio/assets/{docs-CnzWByuq.js → docs-CaVCv7nB.js} +1 -1
  45. package/dist/studio/assets/editor.worker-DWPaKKV_.js +33 -0
  46. package/dist/studio/assets/{enums._name-I0mP3WCt.js → enums._name-z71scSmR.js} +1 -1
  47. package/dist/studio/assets/{hooks-B5oExX5W.js → hooks-CIyp76Ha.js} +1 -1
  48. package/dist/studio/assets/{index-CMmzpMBz.js → index-BplvUeah.js} +7 -7
  49. package/dist/studio/assets/{labels-DuphOVul.js → labels-CxkkiH5p.js} +1 -1
  50. package/dist/studio/assets/{lazyRouteComponent-tS2t_LrD.js → lazyRouteComponent-HlW_UM7H.js} +1 -1
  51. package/dist/studio/assets/{lu-cVORv6D3.js → lu-C9ww8Xn7.js} +2 -2
  52. package/dist/studio/assets/{marked-text-tf7-IzXm.js → marked-text-DkIbIGaf.js} +1 -1
  53. package/dist/studio/assets/{models._name-DsOwcKoe.js → models._name-Bf8RXxTl.js} +1 -1
  54. package/dist/studio/assets/{monaco-GJe6VaZ-.js → monaco-B9PsjQQo.js} +1 -1
  55. package/dist/studio/assets/monaco-CT2wGeIj.css +1 -0
  56. package/dist/studio/assets/monaco-dYT_niNG.js +943 -0
  57. package/dist/studio/assets/{not-found-yBWFg0rP.js → not-found-4wswYq0J.js} +1 -1
  58. package/dist/studio/assets/{prisma-CWAhnzN5.js → prisma-BpS-GoYm.js} +1 -1
  59. package/dist/studio/assets/{result-table-CGvil3pc.js → result-table-DvGl9IoJ.js} +1 -1
  60. package/dist/studio/assets/routes-cRDXK5Bp.js +1 -0
  61. package/dist/studio/assets/{schema-gate-BC3i18Tp.js → schema-gate-BvdKOqn1.js} +1 -1
  62. package/dist/studio/assets/{schema-view-C2X5nwuH.js → schema-view-CqNyYGB0.js} +1 -1
  63. package/dist/studio/assets/{sql-CMRDYX3Z.js → sql-iadv3BWl.js} +1 -1
  64. package/dist/studio/assets/{table-bAwthXaP.js → table-DUjzf1P8.js} +1 -1
  65. package/dist/studio/assets/{tabs-DfoRK_ae.js → tabs-DJr-DjH8.js} +1 -1
  66. package/dist/studio/assets/{useFormValidation-B7STfHY3.js → useFormValidation-BB_6NZbP.js} +1 -1
  67. package/dist/studio/assets/{useMatch-DMTwaRaz.js → useMatch-CLknNl5M.js} +1 -1
  68. package/dist/studio/assets/{useMultipleSelectionState-vASeYbQk.js → useMultipleSelectionState-BqzE75CP.js} +1 -1
  69. package/dist/studio/assets/{useOverlayTriggerState-BO95y8NP.js → useOverlayTriggerState-DVeiBmOc.js} +1 -1
  70. package/dist/studio/index.html +10 -10
  71. package/package.json +19 -19
  72. package/dist/studio/assets/editor.worker-BbVB3hfz.js +0 -33
  73. package/dist/studio/assets/monaco-DbPgUJqj.js +0 -880
  74. package/dist/studio/assets/monaco-I0M_1p4d.css +0 -1
  75. package/dist/studio/assets/routes-CBvE-Puz.js +0 -1
package/README.md CHANGED
@@ -26,22 +26,22 @@ generator Hekireki-Zod {
26
26
  }
27
27
  ```
28
28
 
29
- | Provider | Generates | Options |
30
- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------ |
31
- | `hekireki-zod` | [Zod](https://zod.dev/) | `type`, `comment`, `relation`, `zod` (`"v4"`, `"mini"`, `"@hono/zod-openapi"`) |
32
- | `hekireki-valibot`, `hekireki-arktype`, `hekireki-effect`, `hekireki-typebox`, `hekireki-ajv` | Valibot, ArkType, Effect Schema, TypeBox, AJV | `type`, `comment`, `relation` |
33
- | `hekireki-pydantic` | Pydantic | `relation` |
34
- | `hekireki-drizzle`, `hekireki-kysely`, `hekireki-sqlalchemy`, `hekireki-django` | Drizzle, Kysely, SQLAlchemy, Django | |
35
- | `hekireki-activerecord` | Active Record | `locales` |
36
- | `hekireki-gorm` | GORM | `package` |
37
- | `hekireki-sea-orm` | SeaORM | `renameAll` |
38
- | `hekireki-ecto` | Ecto | `app` |
39
- | `hekireki-eloquent` | Eloquent | `namespace` |
40
- | `hekireki-efcore` (PostgreSQL, MySQL, SQLite) | EF Core | `namespace`, `context` |
41
- | `hekireki-exposed` (PostgreSQL) | Exposed | `package`, `dao` |
42
- | `hekireki-atlas` | Atlas HCL | `schemaName` |
43
- | `hekireki-er` | ER diagram | `outputs` (`.md`, `.dbml`, `.png`, `.svg`), `theme` |
44
- | `hekireki-seed` | The schema module `hekireki.config.ts` is typed against | |
29
+ | Provider | Generates | Options |
30
+ | --------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------- |
31
+ | `hekireki-zod` | [Zod](https://zod.dev/) | `type`, `relation`, `zod` (`"v4"`, `"mini"`, `"@hono/zod-openapi"`) |
32
+ | `hekireki-valibot`, `hekireki-arktype`, `hekireki-effect`, `hekireki-typebox`, `hekireki-ajv` | Valibot, ArkType, Effect Schema, TypeBox, AJV | `type`, `relation` |
33
+ | `hekireki-pydantic` | Pydantic | `relation` |
34
+ | `hekireki-drizzle`, `hekireki-kysely`, `hekireki-sqlalchemy`, `hekireki-django` | Drizzle, Kysely, SQLAlchemy, Django | |
35
+ | `hekireki-activerecord` | Active Record | `locales` |
36
+ | `hekireki-gorm` | GORM | `package` |
37
+ | `hekireki-sea-orm` | SeaORM | `renameAll` |
38
+ | `hekireki-ecto` | Ecto | `app` |
39
+ | `hekireki-eloquent` | Eloquent | `namespace` |
40
+ | `hekireki-efcore` (PostgreSQL, MySQL, SQLite) | EF Core | `namespace`, `context` |
41
+ | `hekireki-exposed` (PostgreSQL) | Exposed | `package`, `dao` |
42
+ | `hekireki-atlas` | Atlas HCL | `schemaName` |
43
+ | `hekireki-er` | ER diagram | `outputs` (`.md`, `.dbml`, `.png`, `.svg`), `theme` |
44
+ | `hekireki-seed` | The schema module `hekireki.config.ts` is typed against | |
45
45
 
46
46
  On MySQL, `hekireki-drizzle` reads and writes a `@db.Timestamp` column as UTC, and MySQL converts a
47
47
  `TIMESTAMP` through the connection's `time_zone`: set it to `'+00:00'` on drizzle's connection, as
@@ -282,7 +282,7 @@ nothing and runs no hook, so what the types cannot say is the caller's:
282
282
  ## Studio
283
283
 
284
284
  ```bash
285
- npx hekireki studio # ./prisma/schema.prisma or ./schema.prisma, port 5555
285
+ npx hekireki studio # `schema` of prisma.config.ts, else ./prisma/schema.prisma or ./schema.prisma, port 5555
286
286
  npx hekireki studio --url file:./dev.db
287
287
  ```
288
288
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/activerecord.ts
4
4
  registerGenerator("activerecord");
5
5
  //#endregion
package/dist/bin/ajv.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/ajv.ts
4
4
  registerGenerator("ajv");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/arktype.ts
4
4
  registerGenerator("arktype");
5
5
  //#endregion
package/dist/bin/atlas.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/atlas.ts
4
4
  registerGenerator("atlas");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/django.ts
4
4
  registerGenerator("django");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/drizzle.ts
4
4
  registerGenerator("drizzle");
5
5
  //#endregion
package/dist/bin/ecto.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/ecto.ts
4
4
  registerGenerator("ecto");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/efcore.ts
4
4
  registerGenerator("efcore");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/effect.ts
4
4
  registerGenerator("effect");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/eloquent.ts
4
4
  registerGenerator("eloquent");
5
5
  //#endregion
package/dist/bin/er.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/er.ts
4
4
  registerGenerator("er");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/exposed.ts
4
4
  registerGenerator("exposed");
5
5
  //#endregion
package/dist/bin/gorm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/gorm.ts
4
4
  registerGenerator("gorm");
5
5
  //#endregion
@@ -1,11 +1,69 @@
1
1
  #!/usr/bin/env node
2
- import { t as exists } from "../file-Df9ykHXv.js";
3
- import { NodeRuntime, NodeServices } from "@effect/platform-node";
2
+ import { s as readFile, t as exists } from "../file-BTbZL3ea.js";
3
+ import { runMain } from "@effect/platform-node/NodeRuntime";
4
+ import { layer } from "@effect/platform-node/NodeServices";
4
5
  import { Console, Data, Effect, Schema } from "effect";
5
6
  import path from "node:path";
6
- import { CliError, Command, Flag } from "effect/unstable/cli";
7
+ import { CliError, Command, Flag } from "effect/cli";
7
8
  //#region package.json
8
- var version = "0.34.0";
9
+ var version = "0.37.0";
10
+ //#endregion
11
+ //#region src/schema/path.ts
12
+ /** Where Prisma looks for a schema when neither the command nor prisma.config.ts names one. */
13
+ const DEFAULT_SCHEMA_PATHS = ["prisma/schema.prisma", "schema.prisma"];
14
+ const CONFIG_EXTENSIONS = [
15
+ ".js",
16
+ ".ts",
17
+ ".mjs",
18
+ ".cjs",
19
+ ".mts",
20
+ ".cts"
21
+ ];
22
+ const CONFIG_FILES = [
23
+ "prisma7.config",
24
+ path.join(".config", "prisma7"),
25
+ ...[
26
+ "prisma.config",
27
+ path.join(".config", "prisma"),
28
+ path.join(".config", "prisma.config")
29
+ ].flatMap((name) => [name, path.join(name, "index")])
30
+ ].flatMap((base) => CONFIG_EXTENSIONS.map((extension) => `${base}${extension}`));
31
+ /** The Prisma config file of `dir` as Prisma finds it, with its text; null when there is none. */
32
+ function readPrismaConfig(dir) {
33
+ return Effect.gen(function* () {
34
+ for (const name of CONFIG_FILES) {
35
+ const file = path.join(dir, name);
36
+ const text = yield* readFile(file).pipe(Effect.orElseSucceed(() => null));
37
+ if (text !== null) return {
38
+ file,
39
+ text
40
+ };
41
+ }
42
+ return null;
43
+ });
44
+ }
45
+ /** The `schema` of a Prisma config when it is written as a string; a computed path is not read. */
46
+ function configuredSchema(configText) {
47
+ return /\bschema\s*:\s*["'`]([^"'`]+)["'`]/u.exec(configText)?.[1] ?? null;
48
+ }
49
+ /**
50
+ * The schema Prisma reads in `dir` when the command names none: the `schema` of the Prisma config
51
+ * there, from the config file's own directory as Prisma resolves it, whether or not it exists (so
52
+ * a wrong one is named rather than passed over), else the first default path that exists; null
53
+ * when there is neither.
54
+ */
55
+ function prismaSchemaPath(dir) {
56
+ return Effect.gen(function* () {
57
+ const config = yield* readPrismaConfig(dir);
58
+ const configured = config === null ? null : configuredSchema(config.text);
59
+ if (config !== null && configured !== null) return path.isAbsolute(configured) ? configured : path.join(path.dirname(config.file), configured);
60
+ for (const candidate of DEFAULT_SCHEMA_PATHS) {
61
+ const resolved = path.join(dir, candidate);
62
+ if (yield* exists(resolved)) return resolved;
63
+ }
64
+ return null;
65
+ });
66
+ }
9
67
  //#endregion
10
68
  //#region src/studio/server/constants/index.ts
11
69
  /** Studio only listens on loopback: the API serves the raw schema and runs SQL without authentication. */
@@ -36,12 +94,11 @@ var ServerListenError = class extends Data.TaggedError("ServerListenError") {};
36
94
  //#endregion
37
95
  //#region src/cli/index.ts
38
96
  const COMMAND_NAME = "hekireki";
39
- /** Where `--schema` looks when it is omitted, in order. */
40
- const DEFAULT_SCHEMA_PATHS = ["prisma/schema.prisma", "schema.prisma"];
41
97
  const STATIC_DIR = path.resolve(import.meta.dirname, "../studio");
42
98
  const DatabaseUrl = Schema.String.pipe(Schema.check(Schema.isPattern(/^(?:postgres|postgresql|mysql|file):/u, { message: "a postgres://, postgresql://, mysql:// or file: connection string" })));
43
99
  /**
44
- * The explicit schema when it exists, else the first default path that does.
100
+ * The explicit schema when it exists, else the one Prisma itself reads: the `schema` of
101
+ * prisma.config.ts, then the first default path that exists.
45
102
  *
46
103
  * A path that was typed out and is not there names itself, and the usage block would only bury
47
104
  * it. Nothing typed and nothing found is the other case — the command was run somewhere without
@@ -53,10 +110,11 @@ function resolveSchemaPath(explicit, commandPath) {
53
110
  if (yield* exists(explicit)) return explicit;
54
111
  return yield* new CliError.UserError({ cause: `Schema not found: ${explicit}\n Check the path passed to --schema.` });
55
112
  }
56
- for (const candidate of DEFAULT_SCHEMA_PATHS) if (yield* exists(candidate)) return candidate;
113
+ const found = yield* prismaSchemaPath(".");
114
+ if (found !== null) return found;
57
115
  return yield* new CliError.ShowHelp({
58
116
  commandPath: [...commandPath],
59
- errors: [new CliError.UserError({ cause: `No Prisma schema found (looked for ${DEFAULT_SCHEMA_PATHS.join(", ")}).\n Pass --schema <path> to point at your schema.prisma or a directory of .prisma files.` })]
117
+ errors: [new CliError.UserError({ cause: `No Prisma schema found (looked for \`schema\` in prisma.config.ts, then ${DEFAULT_SCHEMA_PATHS.join(", ")}).\n Pass --schema <path> to point at your schema.prisma or a directory of .prisma files.` })]
60
118
  });
61
119
  });
62
120
  }
@@ -72,15 +130,17 @@ const Port = Schema.Int.check(Schema.isBetween({
72
130
  minimum: 1,
73
131
  maximum: 65535
74
132
  }));
133
+ const RowCount = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
134
+ const Milliseconds = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1));
75
135
  const studioFlags = {
76
136
  port: Flag.Int("port").pipe(Flag.withAlias("p"), Flag.withSchema(Port), Flag.withDescription(`Port to listen on (default: ${DEFAULT_PORT})`), Flag.withMetavar("port"), Flag.withDefault(DEFAULT_PORT)),
77
- schema: Flag.String("schema").pipe(Flag.withAlias("s"), Flag.withDescription(`Path to schema.prisma or a directory of .prisma files (default: ${DEFAULT_SCHEMA_PATHS.join(", then ")})`), Flag.withMetavar("schema.prisma|dir"), Flag.withDefault(null)),
137
+ schema: Flag.String("schema").pipe(Flag.withAlias("s"), Flag.withDescription(`Path to schema.prisma or a directory of .prisma files (default: \`schema\` in prisma.config.ts, then ${DEFAULT_SCHEMA_PATHS.join(", then ")})`), Flag.withMetavar("schema.prisma|dir"), Flag.withDefault(null)),
78
138
  url: Flag.String("url").pipe(Flag.withAlias("u"), Flag.withSchema(DatabaseUrl), Flag.withDescription("Database connection URL for browsing and editing data (default: `url` in hekireki.config.ts, then the variable datasource.url names in prisma.config.ts or the schema, read from the environment or .env; DATABASE_URL when it names none)"), Flag.withMetavar("connection-string"), Flag.withDefault(null))
79
139
  };
80
140
  function runStudio(args) {
81
141
  return Effect.gen(function* () {
82
142
  const schemaPath = yield* resolveSchemaPath(args.schema, [COMMAND_NAME, "studio"]);
83
- const { startStudioServer } = yield* Effect.promise(() => import("../start-HLOLxRBL.js"));
143
+ const { startStudioServer } = yield* Effect.promise(() => import("../start-DCHq_ac3.js"));
84
144
  const started = yield* startStudioServer({
85
145
  schemaPath,
86
146
  port: args.port,
@@ -118,17 +178,17 @@ function studio() {
118
178
  }
119
179
  const seedFlags = {
120
180
  config: Flag.String("config").pipe(Flag.withAlias("c"), Flag.withDescription("Path to the config, a TypeScript file (default: hekireki.config.ts in the working directory)"), Flag.withMetavar("hekireki.config.ts"), Flag.withDefault(null)),
121
- schema: Flag.String("schema").pipe(Flag.withAlias("s"), Flag.withDescription(`Path to schema.prisma or a directory of .prisma files (default: \`schema\` in the config, then ${DEFAULT_SCHEMA_PATHS.join(", then ")})`), Flag.withMetavar("schema.prisma|dir"), Flag.withDefault(null)),
181
+ schema: Flag.String("schema").pipe(Flag.withAlias("s"), Flag.withDescription(`Path to schema.prisma or a directory of .prisma files (default: \`schema\` in hekireki.config.ts, then \`schema\` in prisma.config.ts, then ${DEFAULT_SCHEMA_PATHS.join(", then ")})`), Flag.withMetavar("schema.prisma|dir"), Flag.withDefault(null)),
122
182
  url: Flag.String("url").pipe(Flag.withAlias("u"), Flag.withSchema(DatabaseUrl), Flag.withDescription("Database connection URL to insert into (default: `url` in hekireki.config.ts, then the variable datasource.url names in prisma.config.ts or the schema, read from the environment or .env; DATABASE_URL when it names none)"), Flag.withMetavar("connection-string"), Flag.withDefault(null)),
123
183
  output: Flag.String("sql").pipe(Flag.withDescription("Write the rows to this SQL file instead of inserting them"), Flag.withMetavar("seed.sql"), Flag.withDefault(null)),
124
184
  seed: Flag.Int("seed").pipe(Flag.withDescription("The faker seed; the same seed always gives the same rows (left out: every run differs)"), Flag.withMetavar("n"), Flag.withDefault(null)),
125
- count: Flag.Int("count").pipe(Flag.withAlias("n"), Flag.withDescription("Rows for every faker model, over the per-model counts of the config; models given as data keep their rows (left out: the config decides, and only the configured models are seeded)"), Flag.withMetavar("rows"), Flag.withDefault(null)),
185
+ count: Flag.Int("count").pipe(Flag.withAlias("n"), Flag.withSchema(RowCount), Flag.withDescription("Rows for every faker model, over the per-model counts of the config; models given as data keep their rows (left out: the config decides, and only the configured models are seeded)"), Flag.withMetavar("rows"), Flag.withDefault(null)),
126
186
  locale: Flag.String("locale").pipe(Flag.withAlias("l"), Flag.withDescription("Faker locale, or a comma-separated list tried in order (left out: faker's English)"), Flag.withMetavar("ja,en"), Flag.withDefault(null)),
127
187
  reset: Flag.Boolean("reset").pipe(Flag.withDescription("Delete every row of the seeded tables before inserting"), Flag.withDefault(false))
128
188
  };
129
189
  function runSeedCommand(args) {
130
190
  return Effect.gen(function* () {
131
- const { runSeed, seedBanner } = yield* Effect.promise(() => import("../run-C13eFGuX.js"));
191
+ const { runSeed, seedBanner } = yield* Effect.promise(() => import("../run-qU5ejzJJ.js"));
132
192
  const report = yield* runSeed(args, process.cwd()).pipe(Effect.mapError((error) => new CliError.UserError({ cause: error.message })));
133
193
  yield* Console.log(seedBanner(report));
134
194
  });
@@ -154,10 +214,10 @@ function seed() {
154
214
  ]));
155
215
  }
156
216
  const migrateCheckFlags = {
157
- schema: Flag.String("schema").pipe(Flag.withAlias("s"), Flag.withDescription(`Path to the schema about to be migrated: schema.prisma or a directory of .prisma files (default: ${DEFAULT_SCHEMA_PATHS.join(", then ")})`), Flag.withMetavar("schema.prisma|dir"), Flag.withDefault(null)),
217
+ schema: Flag.String("schema").pipe(Flag.withAlias("s"), Flag.withDescription(`Path to the schema about to be migrated: schema.prisma or a directory of .prisma files (default: \`schema\` in prisma.config.ts, then ${DEFAULT_SCHEMA_PATHS.join(", then ")})`), Flag.withMetavar("schema.prisma|dir"), Flag.withDefault(null)),
158
218
  url: Flag.String("url").pipe(Flag.withAlias("u"), Flag.withSchema(DatabaseUrl), Flag.withDescription("Database connection URL to check, read only (default: `url` in hekireki.config.ts, then the variable datasource.url names in prisma.config.ts or the schema, read from the environment or .env; DATABASE_URL when it names none)"), Flag.withMetavar("connection-string"), Flag.withDefault(null)),
159
219
  decisions: Flag.String("decisions").pipe(Flag.withAlias("d"), Flag.withDescription("Path to the decisions made on the Migrate page of `hekireki studio`: what becomes of the rows that stand in the way (default: .hekireki/migrate.json beside the schema)"), Flag.withMetavar("migrate.json"), Flag.withDefault(null)),
160
- timeout: Flag.Int("timeout").pipe(Flag.withDescription("How long one query may run, in milliseconds, on PostgreSQL and MySQL (default: no limit)"), Flag.withMetavar("ms"), Flag.withDefault(null)),
220
+ timeout: Flag.Int("timeout").pipe(Flag.withSchema(Milliseconds), Flag.withDescription("How long one query may run, in milliseconds, on PostgreSQL and MySQL (default: no limit)"), Flag.withMetavar("ms"), Flag.withDefault(null)),
161
221
  json: Flag.Boolean("json").pipe(Flag.withDescription("Print the report as JSON, every check with its count and SQL"), Flag.withDefault(false))
162
222
  };
163
223
  /** Why the data is not ready, as the command fails with it. */
@@ -171,7 +231,7 @@ function runMigrateCheckCommand(args) {
171
231
  "migrate",
172
232
  "check"
173
233
  ]);
174
- const { checkBanner, checkJson, runMigrateCheck, summarize } = yield* Effect.promise(() => import("../migrate-Icu7Se0-.js"));
234
+ const { checkBanner, checkJson, runMigrateCheck, summarize } = yield* Effect.promise(() => import("../migrate-DmUsB0Wq.js"));
175
235
  const report = yield* runMigrateCheck({
176
236
  ...args,
177
237
  schemaPath,
@@ -218,7 +278,7 @@ function runMigratePlanCommand(args) {
218
278
  "migrate",
219
279
  "plan"
220
280
  ]);
221
- const { checkBanner, planSql, readMigration, runMigrateCheck, summarize, writePlan } = yield* Effect.promise(() => import("../migrate-Icu7Se0-.js"));
281
+ const { checkBanner, planSql, readMigration, runMigrateCheck, summarize, writePlan } = yield* Effect.promise(() => import("../migrate-DmUsB0Wq.js"));
222
282
  const report = yield* runMigrateCheck({
223
283
  ...args,
224
284
  schemaPath,
@@ -277,6 +337,6 @@ function hekireki() {
277
337
  }
278
338
  //#endregion
279
339
  //#region src/bin/hekireki.ts
280
- NodeRuntime.runMain(hekireki().pipe(Effect.provide(NodeServices.layer)));
340
+ runMain(hekireki().pipe(Effect.provide(layer)));
281
341
  //#endregion
282
- export { SSE_PING_MS as _, DatabaseUnavailableError as a, InvalidInputError as c, ServerListenError as d, UnknownFileError as f, PRISMA_FILE_URI as g, MIGRATIONS_POLL_MS as h, DatabaseError as i, SchemaLoadError as l, FORBIDDEN_HOST_MESSAGE as m, ClientUnavailableError as n, FileWriteError as o, UnknownModelError as p, ContractViolationError as r, FormatError as s, ClientQueryError as t, SchemaParseError as u, STUDIO_HOSTNAME as v };
342
+ export { SSE_PING_MS as _, DatabaseUnavailableError as a, prismaSchemaPath as b, InvalidInputError as c, ServerListenError as d, UnknownFileError as f, PRISMA_FILE_URI as g, MIGRATIONS_POLL_MS as h, DatabaseError as i, SchemaLoadError as l, FORBIDDEN_HOST_MESSAGE as m, ClientUnavailableError as n, FileWriteError as o, UnknownModelError as p, ContractViolationError as r, FormatError as s, ClientQueryError as t, SchemaParseError as u, STUDIO_HOSTNAME as v, readPrismaConfig as x, DEFAULT_SCHEMA_PATHS as y };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/kysely.ts
4
4
  registerGenerator("kysely");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/pydantic.ts
4
4
  registerGenerator("pydantic");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/sea-orm.ts
4
4
  registerGenerator("sea-orm");
5
5
  //#endregion
package/dist/bin/seed.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/seed.ts
4
4
  registerGenerator("seed");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/sqlalchemy.ts
4
4
  registerGenerator("sqlalchemy");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/typebox.ts
4
4
  registerGenerator("typebox");
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/valibot.ts
4
4
  registerGenerator("valibot");
5
5
  //#endregion
package/dist/bin/zod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-B2PLRVJb.js";
2
+ import { t as registerGenerator } from "../bin-CVN0pzc4.js";
3
3
  //#region src/bin/zod.ts
4
4
  registerGenerator("zod");
5
5
  //#endregion