@diagonal-hq/cli 0.43.2 → 0.43.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.
Files changed (2) hide show
  1. package/README.md +1 -1
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -935,7 +935,7 @@ export default defineRecord<'rooms'>({
935
935
  - `fieldOrder` is a partial list of field keys. Forms and tables show the listed fields first, in list order. The other fields follow in uid order, which is the order in which they were made, because a uid is a UUID version 7. A field without a uid comes last, by key. A key that is not a field of the resource is an error, and so is a key that the list has twice. A new field does not change `fieldOrder`, so two branches that each add a field do not conflict. A reorder in the resource builder writes the complete list, and a field delete removes its key.
936
936
  - `embeddings` is `{ enabled, fields }`. `fields` names fields of the resource, not relation paths.
937
937
  - `dataApi.endpoints` turns off data API endpoints, for example `{ delete_many: { enabled: false } }`. An omitted endpoint stays enabled.
938
- - `static: true` makes the resource a fixed set of records. Each record is a file `records/<key>.ts` of the folder, `export default defineRecord({ uid, ...values })`, for example `defineRecord({ uid: '019a…', name: 'Standard' })` in `records/standard.ts`. A static resource without records needs no record file. A record file in the folder of a resource that is not static is an error, and a record value cannot have the key `uid`. `diagonal check` writes each record's `uid`, a UUID version 7 that is the record id in every environment. The deploy writes the records, and normal record writes to the resource are refused. `Resources.<Name>.records.<key>` holds the record's `uid` and the value of each field, for example `Resources.Rooms.records.studio_a.name`. A page that reads a value sends it to every viewer. A static resource can have the `price` capability. It can also have the `product` capability when `accounting_entity_field` and `revenue_account_field` are unset. The build refuses all other capabilities to prevent capability code from writing to static records. It can have a `belongs_to` or `belongs_to_many` relation only to another static resource, because the relation is stored on its records. A record sets that relation with the `uid` of a target record, or a list of uids for `belongs_to_many`, and the build checks each uid. The deploy writes the target records first, so the build refuses a cycle of these relations, and a relation of a static resource to itself.
938
+ - `static: true` makes the resource a fixed set of records. Each record is a file `records/<key>.ts` of the folder, `export default defineRecord({ uid, ...values })`, for example `defineRecord({ uid: '019a…', name: 'Standard' })` in `records/standard.ts`. A static resource without records needs no record file. A record file in the folder of a resource that is not static is an error, and a record value cannot have the key `uid`. `diagonal check` writes each record's `uid`, a UUID version 7 that is the record id in every environment. The deploy writes the records, and normal record writes to the resource are refused. `Resources.<Name>.records.<key>` holds the record's `uid` and the value of each field, for example `Resources.Rooms.records.studio_a.name`. A page that reads a value sends it to every viewer. A static resource can have the `price` capability. It can also have the `product` capability when `accounting_entity_field` and `revenue_account_field` are unset. The build refuses all other capabilities to prevent capability code from writing to static records. It can have a `belongs_to` or `belongs_to_many` relation only to a static resource, because the relation is stored on its records. A record sets that relation with the `uid` of a target record, or a list of uids for `belongs_to_many`, and the build checks each uid. A cycle can include optional relations or `belongs_to_many` fields. The build refuses a cycle made only of required `belongs_to` fields, including a required `belongs_to` self-relation. The deploy writes the deferred relations after it creates the records. Each side of a `belongs_to_many` pair declares its own list in its record files.
939
939
 
940
940
  There is one `field.<type>` builder for each resource field type, in camel case: `field.eventSchedule()` stores an `event_schedule` field. `field.file()` stores a `file_reference` field, and there is no `field.fileReference()`. `field.longText()` stores a `text` field, the same type as `field.text()`. `fields.generated.d.ts` declares the builders, `fields.generated.js` implements them, and `field-catalog.json` lists their settings. `npm run generate-types` generates the three files from the platform field types. Do not edit them.
941
941
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagonal-hq/cli",
3
- "version": "0.43.2",
3
+ "version": "0.43.3",
4
4
  "description": "The diagonal CLI and the configuration helpers for file-based Diagonal workspaces.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -51,8 +51,8 @@
51
51
  "bun": "1.4.4"
52
52
  },
53
53
  "optionalDependencies": {
54
- "@diagonal-hq/workflow-script-compiler-darwin-arm64": "0.1.0-h61ac1685a46f",
55
- "@diagonal-hq/workflow-script-compiler-linux-x64": "0.1.0-h61ac1685a46f",
56
- "@diagonal-hq/workflow-script-compiler-linux-arm64": "0.1.0-h61ac1685a46f"
54
+ "@diagonal-hq/workflow-script-compiler-darwin-arm64": "0.1.0-hd1359e426e0d",
55
+ "@diagonal-hq/workflow-script-compiler-linux-x64": "0.1.0-hd1359e426e0d",
56
+ "@diagonal-hq/workflow-script-compiler-linux-arm64": "0.1.0-hd1359e426e0d"
57
57
  }
58
58
  }