@ghentcdh/create-crouton 0.0.1-alpha.37 → 0.0.1-alpha.39

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 CHANGED
@@ -18940,9 +18940,19 @@ var FieldInputSchema = external_exports.object({
18940
18940
  // auto-derived from the Zod model/sibling FK column if omitted
18941
18941
  /** FK field on the child model pointing back to the parent, e.g. `"workId"`. Defaults to `${parentModel}Id`. */
18942
18942
  foreignKey: external_exports.string().optional(),
18943
+ /** Override the Prisma relation field name when it differs from the column id. */
18944
+ relation: external_exports.string().optional(),
18943
18945
  /** Override the display order in form views. Lower values come first. */
18944
18946
  position: external_exports.number().optional(),
18945
18947
  // default: source order
18948
+ /**
18949
+ * Value to pre-fill this field with on the create form. Injected into the
18950
+ * generated form view's JSON Schema as `properties[id].default`, which
18951
+ * `parseValue({})` (see `@ghentcdh/crouton-vue`'s `form-def.ts`) applies when
18952
+ * opening a blank record. Not applicable to `format: "relation"` fields —
18953
+ * relation columns are excluded from the picked data schema entirely.
18954
+ */
18955
+ defaultValue: external_exports.unknown().optional(),
18946
18956
  options: external_exports.union([RelationFieldInputOptionsSchema, external_exports.unknown()]).optional(),
18947
18957
  /** Nested array detail layout (renders via `detailFixed`). */
18948
18958
  detail: DetailConfigSchema.optional()
@@ -19321,6 +19331,21 @@ var CroutonConfigSchema = external_exports.object({
19321
19331
  autoSave: external_exports.boolean().default(true)
19322
19332
  });
19323
19333
 
19334
+ // ../crouton-core/src/lib/view/view.schema.ts
19335
+ var ViewColumnConfigSchema = external_exports.object({
19336
+ id: external_exports.string(),
19337
+ label: external_exports.string().optional(),
19338
+ sortable: external_exports.boolean().optional(),
19339
+ searchable: external_exports.boolean().optional(),
19340
+ fieldInput: FieldInputSchema.optional()
19341
+ });
19342
+ var ViewConfigSchema = external_exports.object({
19343
+ json_schema: external_exports.record(external_exports.string(), external_exports.unknown()),
19344
+ ui_schema: external_exports.record(external_exports.string(), external_exports.unknown()),
19345
+ columns: external_exports.array(ViewColumnConfigSchema),
19346
+ defaultSort: external_exports.string().optional()
19347
+ });
19348
+
19324
19349
  // ../crouton-codegen/src/util.ts
19325
19350
  import { access } from "fs/promises";
19326
19351
 
@@ -19582,7 +19607,7 @@ var runCreate = async (name, opts) => {
19582
19607
  const tokens = {
19583
19608
  name,
19584
19609
  Name: toTitle(name),
19585
- version: true ? "0.0.1-alpha.37" : "latest",
19610
+ version: true ? "0.0.1-alpha.39" : "latest",
19586
19611
  year: String((/* @__PURE__ */ new Date()).getFullYear()),
19587
19612
  pmRun: pm === "npm" ? "npm run" : pm,
19588
19613
  urlEnv: "DATABASE_URL",