@stacksjs/defaults 0.75.541 → 0.75.542

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.
@@ -101,11 +101,26 @@ not a frame. Use `createFrameReader()` to split a stream. `--serve` with
101
101
  `--eval` or `--print` evaluates once and exits, which suits `ssh -T`,
102
102
  `docker exec -i` and `kubectl exec -i`.
103
103
 
104
+ ## Previews and the model list
105
+
106
+ `preview.mail('welcome', { name: 'Ada' })` renders a template from
107
+ `resources/emails` and returns a value the result is shown as a page for
108
+ (`{ t: 'html', kind: 'mail', html, text }`). `preview.html(markup, title)` does
109
+ the same for any markup. Rendering one stx view to a string is not offered
110
+ yet: stx does not export it.
111
+
112
+ `session.models()`, or the request `{ "op": "models" }`, lists every model the
113
+ booted app loaded with its table, attribute names and declared relations. It is
114
+ what a relation graph and a completion list are built from.
115
+
104
116
  ## Gotchas
105
117
 
106
118
  - **The database is real.** Mutations are not isolated or rolled back.
107
- - **A returned model is described by its own fields**, hidden ones included.
108
- Do not paste results from production data without looking.
119
+ - **A model is described as a model.** A result that is a model instance is a
120
+ `model` node: its name, table, key, the attributes its `toJSON()` exposes, the
121
+ relations it declares and the ones already loaded. Hidden attributes (a
122
+ password hash) are named under `hidden` and their values never leave the
123
+ process, in frames and in `--print` alike.
109
124
  - **Error positions refer to the compiled snippet**, not the typed source.
110
125
  - **One evaluation at a time.** Calls queue; they share globals.
111
126
  - **A session captures `console` and `process.stdout`/`stderr`** for its whole
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.541",
5
+ "version": "0.75.542",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.541",
5
+ "version": "0.75.542",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,10 +45,10 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/mobile": "0.75.541",
48
+ "@stacksjs/mobile": "0.75.542",
49
49
  "@stacksjs/sanitizer": "^0.2.842",
50
50
  "@stacksjs/stx": "^0.2.842",
51
- "@stacksjs/strings": "0.75.541",
51
+ "@stacksjs/strings": "0.75.542",
52
52
  "@xterm/addon-fit": "^0.11.0",
53
53
  "@xterm/xterm": "^6.0.0",
54
54
  "ts-qr-codes": "^0.1.8"