@valbuild/server 0.150.17 → 0.150.19

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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @valbuild/server
2
2
 
3
+ ## 0.150.19
4
+
5
+ ### Patch Changes
6
+
7
+ - [#996](https://github.com/valbuild/val/pull/996) [`17fa9ab`](https://github.com/valbuild/val/commit/17fa9ab7d86d3dc304109b8f5222f46f22bd5770) Thanks [@freekh](https://github.com/freekh)! - **The design tab's quick preview is made by Val Build, and shows itself after each change.** Where Val Build builds your project's proposals, a quick preview is bundled there rather than in your browser. It is the same build a Build of the same files makes, so pressing Build afterwards is quicker too. The design tab no longer needs a cross-origin isolated page or a builder tab for it, and it shows each change on its own about a second after the files stop changing.
8
+
9
+ The proposal is also typechecked in the background after each change, and whenever it is built. The assistant hears about type errors on its next step, can ask where the typecheck is with `typecheck_status`, and is told to call `typecheck` only once its edits are done.
10
+
11
+ Projects Val Build does not build yet make quick previews in the browser as before, and don't start them on their own.
12
+
13
+ Not yet: a change that uses a Tailwind class the site doesn't use yet shows without that class's styles, in a quick preview and in a build alike. Studio builds still ship the live site's stylesheet, and compiling stylesheets on Val Build comes next.
14
+
15
+ - Updated dependencies [[`17fa9ab`](https://github.com/valbuild/val/commit/17fa9ab7d86d3dc304109b8f5222f46f22bd5770)]:
16
+ - @valbuild/ui@0.150.19
17
+
18
+ ## 0.150.18
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [[`43f72c8`](https://github.com/valbuild/val/commit/43f72c85c2114fe9a0ce536204858d2d3c05f962)]:
23
+ - @valbuild/shared@0.150.18
24
+ - @valbuild/ui@0.150.18
25
+
3
26
  ## 0.150.17
4
27
 
5
28
  ### Patch Changes
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@valbuild/core');
6
- var ValRouterCore = require('../../dist/ValRouterCore-71b88a4c.cjs.dev.js');
6
+ var ValRouterCore = require('../../dist/ValRouterCore-de8f4917.cjs.dev.js');
7
7
  require('@valbuild/shared/internal');
8
8
  require('zod');
9
9
  require('zod-validation-error');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@valbuild/core');
6
- var ValRouterCore = require('../../dist/ValRouterCore-6cae8ef3.cjs.prod.js');
6
+ var ValRouterCore = require('../../dist/ValRouterCore-080665a2.cjs.prod.js');
7
7
  require('@valbuild/shared/internal');
8
8
  require('zod');
9
9
  require('zod-validation-error');
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_CONTENT_HOST } from '@valbuild/core';
2
- import { o as ValOpsMemory, M as bytesToBase64, F as ValServer, G as createValRequestHandler } from '../../dist/ValRouterCore-8ec75007.esm.js';
2
+ import { o as ValOpsMemory, M as bytesToBase64, F as ValServer, G as createValRequestHandler } from '../../dist/ValRouterCore-98eeccbe.esm.js';
3
3
  import '@valbuild/shared/internal';
4
4
  import 'zod';
5
5
  import 'zod-validation-error';
@@ -5509,7 +5509,7 @@ var packageJson = {
5509
5509
  ],
5510
5510
  exports: true
5511
5511
  },
5512
- version: "0.150.17",
5512
+ version: "0.150.19",
5513
5513
  scripts: {
5514
5514
  typecheck: "tsc --noEmit",
5515
5515
  test: "jest",
@@ -9695,7 +9695,7 @@ const ValServer = (valModules, options, callbacks, platform) => {
9695
9695
  // TypeScript compiler. See `patch/ts/publishKit.ts`.
9696
9696
  const {
9697
9697
  getJsonEntryAtCommit
9698
- } = await Promise.resolve().then(function () { return require('./getJsonEntryAtCommit-4649bb37.cjs.prod.js'); });
9698
+ } = await Promise.resolve().then(function () { return require('./getJsonEntryAtCommit-4e6661b7.cjs.prod.js'); });
9699
9699
  const res = await getJsonEntryAtCommit(serverOps, req.query.commit_sha, req.query.path, req.query.key);
9700
9700
  if (fp.result.isErr(res)) {
9701
9701
  return historyErrorResponse(res.error);
@@ -5503,7 +5503,7 @@ var packageJson = {
5503
5503
  ],
5504
5504
  exports: true
5505
5505
  },
5506
- version: "0.150.17",
5506
+ version: "0.150.19",
5507
5507
  scripts: {
5508
5508
  typecheck: "tsc --noEmit",
5509
5509
  test: "jest",
@@ -9689,7 +9689,7 @@ const ValServer = (valModules, options, callbacks, platform) => {
9689
9689
  // TypeScript compiler. See `patch/ts/publishKit.ts`.
9690
9690
  const {
9691
9691
  getJsonEntryAtCommit
9692
- } = await import('./getJsonEntryAtCommit-a5932dc3.esm.js');
9692
+ } = await import('./getJsonEntryAtCommit-4c2e4b5c.esm.js');
9693
9693
  const res = await getJsonEntryAtCommit(serverOps, req.query.commit_sha, req.query.path, req.query.key);
9694
9694
  if (result.isErr(res)) {
9695
9695
  return historyErrorResponse(res.error);
@@ -5509,7 +5509,7 @@ var packageJson = {
5509
5509
  ],
5510
5510
  exports: true
5511
5511
  },
5512
- version: "0.150.17",
5512
+ version: "0.150.19",
5513
5513
  scripts: {
5514
5514
  typecheck: "tsc --noEmit",
5515
5515
  test: "jest",
@@ -9695,7 +9695,7 @@ const ValServer = (valModules, options, callbacks, platform) => {
9695
9695
  // TypeScript compiler. See `patch/ts/publishKit.ts`.
9696
9696
  const {
9697
9697
  getJsonEntryAtCommit
9698
- } = await Promise.resolve().then(function () { return require('./getJsonEntryAtCommit-54478fa6.cjs.dev.js'); });
9698
+ } = await Promise.resolve().then(function () { return require('./getJsonEntryAtCommit-3f0fa4eb.cjs.dev.js'); });
9699
9699
  const res = await getJsonEntryAtCommit(serverOps, req.query.commit_sha, req.query.path, req.query.key);
9700
9700
  if (fp.result.isErr(res)) {
9701
9701
  return historyErrorResponse(res.error);
@@ -325,6 +325,9 @@ export declare class ValOpsHttp extends ValOps {
325
325
  * keeps it only for the inputs it was made from. Without it the tab's
326
326
  * Types check, and the assistant's `typecheck`, had nothing to show.
327
327
  *
328
+ * And a quick preview: the browser half of a build of the staged files,
329
+ * which Val Build makes and nothing serves.
330
+ *
328
331
  * The rest stay the proposal's own: Update from the site and the lockfile
329
332
  * are answered from the proposal's build and schemas, and bringing back a
330
333
  * point's code is the Studio at its address finishing a restore.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var ts = require('typescript');
4
- var ValRouterCore = require('./ValRouterCore-71b88a4c.cjs.dev.js');
4
+ var ValRouterCore = require('./ValRouterCore-de8f4917.cjs.dev.js');
5
5
  var fp = require('@valbuild/core/fp');
6
6
  var jsonValuesModule = require('./jsonValuesModule-8ae503a8.cjs.dev.js');
7
7
  require('@valbuild/core');
@@ -1,5 +1,5 @@
1
1
  import ts from 'typescript';
2
- import { N as bytesToUtf8, O as posixPath } from './ValRouterCore-8ec75007.esm.js';
2
+ import { N as bytesToUtf8, O as posixPath } from './ValRouterCore-98eeccbe.esm.js';
3
3
  import { result } from '@valbuild/core/fp';
4
4
  import { a as analyzeValModule, c as analyzeJsonValuesEntries } from './jsonValuesModule-427d68c8.esm.js';
5
5
  import '@valbuild/core';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var ts = require('typescript');
4
- var ValRouterCore = require('./ValRouterCore-6cae8ef3.cjs.prod.js');
4
+ var ValRouterCore = require('./ValRouterCore-080665a2.cjs.prod.js');
5
5
  var fp = require('@valbuild/core/fp');
6
6
  var jsonValuesModule = require('./jsonValuesModule-d1bb8d8f.cjs.prod.js');
7
7
  require('@valbuild/core');
@@ -12,7 +12,7 @@ var path = require('path');
12
12
  var fs = require('fs');
13
13
  var vm = require('node:vm');
14
14
  var node_module = require('node:module');
15
- var ValRouterCore = require('./ValRouterCore-71b88a4c.cjs.dev.js');
15
+ var ValRouterCore = require('./ValRouterCore-de8f4917.cjs.dev.js');
16
16
  var server = require('@valbuild/ui/server');
17
17
  var z = require('zod');
18
18
  var zodValidationError = require('zod-validation-error');
@@ -6096,7 +6096,7 @@ class ValOpsHttp extends ValRouterCore.ValOps {
6096
6096
  const one = /^\/[0-9a-f]{20}$/.test(path);
6097
6097
  if (one) return method === "GET" || method === "PATCH";
6098
6098
  if (method === "GET") return /^\/[0-9a-f]{20}\/(merge-checks|files|merge-trees|build-target|preparation)$/.test(path);
6099
- return method === "POST" && /^\/[0-9a-f]{20}\/(close|reopen|setup\/retry|merge|files|lockfile|typecheck|build|verify|update-from-site|restore-code)$/.test(path);
6099
+ return method === "POST" && /^\/[0-9a-f]{20}\/(close|reopen|setup\/retry|merge|files|lockfile|typecheck|build|quick-preview|verify|update-from-site|restore-code)$/.test(path);
6100
6100
  }
6101
6101
 
6102
6102
  /**
@@ -6111,7 +6111,7 @@ class ValOpsHttp extends ValRouterCore.ValOps {
6111
6111
  */
6112
6112
  static proposalFilesWrite(method, path) {
6113
6113
  if (method !== "POST") return null;
6114
- const match = /^\/([0-9a-f]{20})\/(files|lockfile|typecheck|build|update-from-site|restore-code)$/.exec(path);
6114
+ const match = /^\/([0-9a-f]{20})\/(files|lockfile|typecheck|build|quick-preview|update-from-site|restore-code)$/.exec(path);
6115
6115
  return match === null ? null : {
6116
6116
  name: match[1],
6117
6117
  write: match[2]
@@ -6132,11 +6132,14 @@ class ValOpsHttp extends ValRouterCore.ValOps {
6132
6132
  * keeps it only for the inputs it was made from. Without it the tab's
6133
6133
  * Types check, and the assistant's `typecheck`, had nothing to show.
6134
6134
  *
6135
+ * And a quick preview: the browser half of a build of the staged files,
6136
+ * which Val Build makes and nothing serves.
6137
+ *
6135
6138
  * The rest stay the proposal's own: Update from the site and the lockfile
6136
6139
  * are answered from the proposal's build and schemas, and bringing back a
6137
6140
  * point's code is the Studio at its address finishing a restore.
6138
6141
  */
6139
- static SITE_MAY_WRITE = new Set(["files", "build", "typecheck"]);
6142
+ static SITE_MAY_WRITE = new Set(["files", "build", "quick-preview", "typecheck"]);
6140
6143
 
6141
6144
  /**
6142
6145
  * Whether this server may make a write to a proposal's files: the
@@ -12,7 +12,7 @@ var path = require('path');
12
12
  var fs = require('fs');
13
13
  var vm = require('node:vm');
14
14
  var node_module = require('node:module');
15
- var ValRouterCore = require('./ValRouterCore-6cae8ef3.cjs.prod.js');
15
+ var ValRouterCore = require('./ValRouterCore-080665a2.cjs.prod.js');
16
16
  var server = require('@valbuild/ui/server');
17
17
  var z = require('zod');
18
18
  var zodValidationError = require('zod-validation-error');
@@ -6096,7 +6096,7 @@ class ValOpsHttp extends ValRouterCore.ValOps {
6096
6096
  const one = /^\/[0-9a-f]{20}$/.test(path);
6097
6097
  if (one) return method === "GET" || method === "PATCH";
6098
6098
  if (method === "GET") return /^\/[0-9a-f]{20}\/(merge-checks|files|merge-trees|build-target|preparation)$/.test(path);
6099
- return method === "POST" && /^\/[0-9a-f]{20}\/(close|reopen|setup\/retry|merge|files|lockfile|typecheck|build|verify|update-from-site|restore-code)$/.test(path);
6099
+ return method === "POST" && /^\/[0-9a-f]{20}\/(close|reopen|setup\/retry|merge|files|lockfile|typecheck|build|quick-preview|verify|update-from-site|restore-code)$/.test(path);
6100
6100
  }
6101
6101
 
6102
6102
  /**
@@ -6111,7 +6111,7 @@ class ValOpsHttp extends ValRouterCore.ValOps {
6111
6111
  */
6112
6112
  static proposalFilesWrite(method, path) {
6113
6113
  if (method !== "POST") return null;
6114
- const match = /^\/([0-9a-f]{20})\/(files|lockfile|typecheck|build|update-from-site|restore-code)$/.exec(path);
6114
+ const match = /^\/([0-9a-f]{20})\/(files|lockfile|typecheck|build|quick-preview|update-from-site|restore-code)$/.exec(path);
6115
6115
  return match === null ? null : {
6116
6116
  name: match[1],
6117
6117
  write: match[2]
@@ -6132,11 +6132,14 @@ class ValOpsHttp extends ValRouterCore.ValOps {
6132
6132
  * keeps it only for the inputs it was made from. Without it the tab's
6133
6133
  * Types check, and the assistant's `typecheck`, had nothing to show.
6134
6134
  *
6135
+ * And a quick preview: the browser half of a build of the staged files,
6136
+ * which Val Build makes and nothing serves.
6137
+ *
6135
6138
  * The rest stay the proposal's own: Update from the site and the lockfile
6136
6139
  * are answered from the proposal's build and schemas, and bringing back a
6137
6140
  * point's code is the Studio at its address finishing a restore.
6138
6141
  */
6139
- static SITE_MAY_WRITE = new Set(["files", "build", "typecheck"]);
6142
+ static SITE_MAY_WRITE = new Set(["files", "build", "quick-preview", "typecheck"]);
6140
6143
 
6141
6144
  /**
6142
6145
  * Whether this server may make a write to a proposal's files: the
@@ -10,8 +10,8 @@ import path from 'path';
10
10
  import fs from 'fs';
11
11
  import vm from 'node:vm';
12
12
  import { Module } from 'node:module';
13
- import { r as resolveExistingJsonPath, f as findNestedJsonValuesRecords, v as validateJsonValuesEntries, i as isJsonValuesRootOp, a as rebaseContentOp, c as classifyJsonValuesOp, s as summaryOf, m as matchesFilter, b as byUpdatedAt, n as newSketchpad, d as isSketchpadId, e as applySketchpadChange, V as ValOps, g as bufferFromDataUrl, h as getFieldsForType, u as uploadRemoteFile, j as getFileExt, k as guessMimeTypeFromPath, l as createMetadataFromBuffer, D as DEFAULT_ANALYTICS_INGEST_URL, o as ValOpsMemory, p as isHlsMasterPlaylist, q as sumHlsSegmentDurations, t as parseHlsMasterVariants, w as largestHlsVariant, x as fallbackRefOf, y as mapHlsUris, z as movedRemoteHost, A as needsHostCheck, B as rewriteRefHost, C as fallbackRemoteHost, E as checkRemoteFiles, F as ValServer, G as createValRequestHandler, H as getNewJsonEntryPaths, I as formatPatchSourceError } from './ValRouterCore-8ec75007.esm.js';
14
- export { L as InMemoryPatchStore, o as ValOpsMemory, J as askOncePerHost, c as classifyJsonValuesOp, I as formatPatchSourceError, j as getFileExt, K as getSettings, a as rebaseContentOp, u as uploadRemoteFile } from './ValRouterCore-8ec75007.esm.js';
13
+ import { r as resolveExistingJsonPath, f as findNestedJsonValuesRecords, v as validateJsonValuesEntries, i as isJsonValuesRootOp, a as rebaseContentOp, c as classifyJsonValuesOp, s as summaryOf, m as matchesFilter, b as byUpdatedAt, n as newSketchpad, d as isSketchpadId, e as applySketchpadChange, V as ValOps, g as bufferFromDataUrl, h as getFieldsForType, u as uploadRemoteFile, j as getFileExt, k as guessMimeTypeFromPath, l as createMetadataFromBuffer, D as DEFAULT_ANALYTICS_INGEST_URL, o as ValOpsMemory, p as isHlsMasterPlaylist, q as sumHlsSegmentDurations, t as parseHlsMasterVariants, w as largestHlsVariant, x as fallbackRefOf, y as mapHlsUris, z as movedRemoteHost, A as needsHostCheck, B as rewriteRefHost, C as fallbackRemoteHost, E as checkRemoteFiles, F as ValServer, G as createValRequestHandler, H as getNewJsonEntryPaths, I as formatPatchSourceError } from './ValRouterCore-98eeccbe.esm.js';
14
+ export { L as InMemoryPatchStore, o as ValOpsMemory, J as askOncePerHost, c as classifyJsonValuesOp, I as formatPatchSourceError, j as getFileExt, K as getSettings, a as rebaseContentOp, u as uploadRemoteFile } from './ValRouterCore-98eeccbe.esm.js';
15
15
  import { createUIRequestHandler } from '@valbuild/ui/server';
16
16
  import z$1, { z } from 'zod';
17
17
  import { fromError } from 'zod-validation-error';
@@ -6060,7 +6060,7 @@ class ValOpsHttp extends ValOps {
6060
6060
  const one = /^\/[0-9a-f]{20}$/.test(path);
6061
6061
  if (one) return method === "GET" || method === "PATCH";
6062
6062
  if (method === "GET") return /^\/[0-9a-f]{20}\/(merge-checks|files|merge-trees|build-target|preparation)$/.test(path);
6063
- return method === "POST" && /^\/[0-9a-f]{20}\/(close|reopen|setup\/retry|merge|files|lockfile|typecheck|build|verify|update-from-site|restore-code)$/.test(path);
6063
+ return method === "POST" && /^\/[0-9a-f]{20}\/(close|reopen|setup\/retry|merge|files|lockfile|typecheck|build|quick-preview|verify|update-from-site|restore-code)$/.test(path);
6064
6064
  }
6065
6065
 
6066
6066
  /**
@@ -6075,7 +6075,7 @@ class ValOpsHttp extends ValOps {
6075
6075
  */
6076
6076
  static proposalFilesWrite(method, path) {
6077
6077
  if (method !== "POST") return null;
6078
- const match = /^\/([0-9a-f]{20})\/(files|lockfile|typecheck|build|update-from-site|restore-code)$/.exec(path);
6078
+ const match = /^\/([0-9a-f]{20})\/(files|lockfile|typecheck|build|quick-preview|update-from-site|restore-code)$/.exec(path);
6079
6079
  return match === null ? null : {
6080
6080
  name: match[1],
6081
6081
  write: match[2]
@@ -6096,11 +6096,14 @@ class ValOpsHttp extends ValOps {
6096
6096
  * keeps it only for the inputs it was made from. Without it the tab's
6097
6097
  * Types check, and the assistant's `typecheck`, had nothing to show.
6098
6098
  *
6099
+ * And a quick preview: the browser half of a build of the staged files,
6100
+ * which Val Build makes and nothing serves.
6101
+ *
6099
6102
  * The rest stay the proposal's own: Update from the site and the lockfile
6100
6103
  * are answered from the proposal's build and schemas, and bringing back a
6101
6104
  * point's code is the Studio at its address finishing a restore.
6102
6105
  */
6103
- static SITE_MAY_WRITE = new Set(["files", "build", "typecheck"]);
6106
+ static SITE_MAY_WRITE = new Set(["files", "build", "quick-preview", "typecheck"]);
6104
6107
 
6105
6108
  /**
6106
6109
  * Whether this server may make a write to a proposal's files: the
package/package.json CHANGED
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "exports": true
29
29
  },
30
- "version": "0.150.17",
30
+ "version": "0.150.19",
31
31
  "devDependencies": {
32
32
  "@prettier/sync": "^0.6.1",
33
33
  "@types/jest": "^30.0.0",
@@ -41,9 +41,9 @@
41
41
  "typescript": "^6.0.3",
42
42
  "zod": "^4.4.3",
43
43
  "zod-validation-error": "^5.0.0",
44
- "@valbuild/core": "0.150.3",
45
- "@valbuild/shared": "0.150.17",
46
- "@valbuild/ui": "0.150.16"
44
+ "@valbuild/shared": "0.150.18",
45
+ "@valbuild/ui": "0.150.19",
46
+ "@valbuild/core": "0.150.3"
47
47
  },
48
48
  "engines": {
49
49
  "node": "^20.19.0 || >=22"