@valbuild/server 0.153.6 → 0.154.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.
- package/CHANGELOG.md +17 -0
- package/browser/dist/valbuild-server-browser.cjs.dev.js +2 -2
- package/browser/dist/valbuild-server-browser.cjs.prod.js +2 -2
- package/browser/dist/valbuild-server-browser.esm.js +2 -2
- package/dist/{ValRouter-480ecf99.cjs.dev.js → ValRouter-1f427c38.cjs.dev.js} +51 -7
- package/dist/{ValRouter-f4f5348d.esm.js → ValRouter-558dc66d.esm.js} +51 -7
- package/dist/{ValRouter-b12133a1.cjs.prod.js → ValRouter-cd6e854a.cjs.prod.js} +51 -7
- package/dist/{ValRouterCore-cbf1de67.cjs.dev.js → ValRouterCore-0c088c9e.cjs.dev.js} +62 -8
- package/dist/{ValRouterCore-3d7d2581.cjs.prod.js → ValRouterCore-4be8eaf1.cjs.prod.js} +62 -8
- package/dist/{ValRouterCore-c418ffb7.esm.js → ValRouterCore-fe985e4c.esm.js} +62 -8
- package/dist/declarations/src/patch/ts/syntax.d.ts +22 -0
- package/dist/{inTabFetch-cb415a9d.esm.js → inTabFetch-877e7d11.esm.js} +1 -1
- package/dist/{inTabFetch-99450193.cjs.dev.js → inTabFetch-c8966e73.cjs.dev.js} +1 -1
- package/dist/{inTabFetch-5ef58dda.cjs.prod.js → inTabFetch-f6694ad2.cjs.prod.js} +1 -1
- package/dist/{publishKit-c2bcff27.esm.js → publishKit-0709423c.esm.js} +3 -3
- package/dist/{publishKit-f98d8cd1.cjs.dev.js → publishKit-cfe1273d.cjs.dev.js} +2 -2
- package/dist/{publishKit-482747e2.cjs.prod.js → publishKit-e7f7db7c.cjs.prod.js} +2 -2
- package/dist/valbuild-server.cjs.dev.js +2 -2
- package/dist/valbuild-server.cjs.prod.js +2 -2
- package/dist/valbuild-server.esm.js +4 -4
- package/internal/browser/dist/valbuild-server-internal-browser.cjs.dev.js +2 -2
- package/internal/browser/dist/valbuild-server-internal-browser.cjs.prod.js +2 -2
- package/internal/browser/dist/valbuild-server-internal-browser.esm.js +2 -2
- package/internal/dist/valbuild-server-internal.cjs.dev.js +2 -2
- package/internal/dist/valbuild-server-internal.cjs.prod.js +2 -2
- package/internal/dist/valbuild-server-internal.esm.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @valbuild/server
|
|
2
2
|
|
|
3
|
+
## 0.154.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1067](https://github.com/valbuild/val/pull/1067) [`70bd897`](https://github.com/valbuild/val/commit/70bd89741d23f89407ddab56de2a70ad62e79fee) Thanks [@freekh](https://github.com/freekh)! - Two answers from `/api/val/patches` no longer tell the Studio something false when the content service behind it fails part of the way.
|
|
8
|
+
|
|
9
|
+
- **Discarding a change while the content service is down no longer looks like it worked.** If the content service answered with an error or could not be reached, `DELETE /api/val/patches` answered 200 with every patch as deleted. The Studio then forgot changes that still existed: a reload brought them back, and the next publish could ship a change you had discarded. It now answers 502 with the content service's reason, and the Studio keeps the change and says the discard failed.
|
|
10
|
+
- **An edit made while someone else is editing is no longer stuck unsaved.** A batch of edits is saved one patch at a time, so another editor's change can land between two of yours. When it did, the server answered the conflict without saying the first patch had been saved, the Studio sent that patch again, and the content service refused it as one it already had. The save then retried forever and the edit after it was never saved. The conflict now names what was saved, as the other partial failures already did, and the Studio sends only the rest.
|
|
11
|
+
|
|
12
|
+
- [#1068](https://github.com/valbuild/val/pull/1068) [`0b1cbe6`](https://github.com/valbuild/val/commit/0b1cbe6858094b21fa15a8fa9b88d5f4304d68e1) Thanks [@freekh](https://github.com/freekh)! - Saving an edit no longer fails with `Converting circular structure to JSON` when a `.val.ts` file uses object spreads, such as `{ title: "…", ...noMedia, learnMore: null }`.
|
|
13
|
+
|
|
14
|
+
An edit to a key written out after every spread in its object is now saved, and the spread is left as it is. An edit to a key a spread supplies, or one a later spread may override, is refused with a message that names the file, the line and the spread, so you know which value to write out — before, any spread anywhere along the edited path refused the save, and the refusal itself crashed `/save` with a 500.
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`d2956df`](https://github.com/valbuild/val/commit/d2956df9d82f7cba1cd26a754ccbd0fa10a5d641), [`c71a92c`](https://github.com/valbuild/val/commit/c71a92ccc40eed16c9b2669d6b26efee51240eea), [`9ee9bdf`](https://github.com/valbuild/val/commit/9ee9bdf8f1feb57b2ab2f70c82a8c839256f8687), [`af4f6fc`](https://github.com/valbuild/val/commit/af4f6fc2b2f344ca474fc80664365a6fac4325b1), [`70bd897`](https://github.com/valbuild/val/commit/70bd89741d23f89407ddab56de2a70ad62e79fee), [`d85f2d7`](https://github.com/valbuild/val/commit/d85f2d75c3dd2732ad1fb9f0c6c0023f4f5de834), [`7f49d72`](https://github.com/valbuild/val/commit/7f49d72b5d2a447025cfec474ff1d85b21e4333e)]:
|
|
17
|
+
- @valbuild/ui@0.154.0
|
|
18
|
+
- @valbuild/shared@0.154.0
|
|
19
|
+
|
|
3
20
|
## 0.153.6
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var inTabFetch = require('../../dist/inTabFetch-
|
|
5
|
+
var inTabFetch = require('../../dist/inTabFetch-c8966e73.cjs.dev.js');
|
|
6
6
|
require('@valbuild/core');
|
|
7
|
-
require('../../dist/ValRouterCore-
|
|
7
|
+
require('../../dist/ValRouterCore-0c088c9e.cjs.dev.js');
|
|
8
8
|
require('zod');
|
|
9
9
|
require('@valbuild/shared/internal');
|
|
10
10
|
require('zod-validation-error');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var inTabFetch = require('../../dist/inTabFetch-
|
|
5
|
+
var inTabFetch = require('../../dist/inTabFetch-f6694ad2.cjs.prod.js');
|
|
6
6
|
require('@valbuild/core');
|
|
7
|
-
require('../../dist/ValRouterCore-
|
|
7
|
+
require('../../dist/ValRouterCore-4be8eaf1.cjs.prod.js');
|
|
8
8
|
require('zod');
|
|
9
9
|
require('@valbuild/shared/internal');
|
|
10
10
|
require('zod-validation-error');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { c as createInTabValFetch } from '../../dist/inTabFetch-
|
|
1
|
+
export { c as createInTabValFetch } from '../../dist/inTabFetch-877e7d11.esm.js';
|
|
2
2
|
import '@valbuild/core';
|
|
3
|
-
import '../../dist/ValRouterCore-
|
|
3
|
+
import '../../dist/ValRouterCore-fe985e4c.esm.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '@valbuild/shared/internal';
|
|
6
6
|
import 'zod-validation-error';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@valbuild/core');
|
|
4
4
|
var server = require('@valbuild/ui/server');
|
|
5
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
5
|
+
var ValRouterCore = require('./ValRouterCore-0c088c9e.cjs.dev.js');
|
|
6
6
|
var path = require('path');
|
|
7
7
|
var ts = require('typescript');
|
|
8
8
|
var z = require('zod');
|
|
@@ -135,17 +135,61 @@ function evaluateExpression(value) {
|
|
|
135
135
|
return fp.result.err(new ValSyntaxError("Expression must be a literal", value));
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Finds the property `key` is written as in an object literal, for an edit to
|
|
141
|
+
* write into.
|
|
142
|
+
*
|
|
143
|
+
* An object may spread another into itself (`{ ...noMedia, code: null }`): the
|
|
144
|
+
* module evaluates it, so the value reads fine, and an edit to a key written
|
|
145
|
+
* out AFTER every spread can go ahead - that property is the one that wins.
|
|
146
|
+
* What cannot is an edit to a key a spread might supply or override, since we
|
|
147
|
+
* would be writing a value the module does not end up with. Those are
|
|
148
|
+
* refused, naming the spread, so the author knows which line to write out.
|
|
149
|
+
*/
|
|
138
150
|
function findObjectPropertyAssignment(value, key) {
|
|
139
|
-
|
|
151
|
+
const spreads = value.properties.filter(ts__default["default"].isSpreadAssignment);
|
|
152
|
+
return fp.pipe(validateObjectProperties(value.properties.filter(property => !ts__default["default"].isSpreadAssignment(property))), fp.result.flatMap(assignments => {
|
|
140
153
|
const matchingAssignments = assignments.filter(assignment => assignment.name.text === key);
|
|
141
|
-
if (matchingAssignments.length === 0) return fp.result.ok(undefined);
|
|
142
154
|
if (matchingAssignments.length > 1) {
|
|
143
155
|
return fp.result.err(new ValSyntaxError(`Object key "${key}" is ambiguous`, value));
|
|
144
156
|
}
|
|
145
157
|
const [assignment] = matchingAssignments;
|
|
158
|
+
if (assignment === undefined) {
|
|
159
|
+
if (spreads.length > 0) {
|
|
160
|
+
return fp.result.err(new ValSyntaxError(`Cannot edit "${key}": it is not written out in this object, so it may come from ${spreadNames(spreads)}. Write "${key}" out after the spread to make it editable`, spreads[spreads.length - 1]));
|
|
161
|
+
}
|
|
162
|
+
return fp.result.ok(undefined);
|
|
163
|
+
}
|
|
164
|
+
const overriding = spreads.filter(spread => spread.pos > assignment.pos);
|
|
165
|
+
if (overriding.length > 0) {
|
|
166
|
+
return fp.result.err(new ValSyntaxError(`Cannot edit "${key}": ${spreadNames(overriding)} comes after it and may override it. Move "${key}" after the spread to make it editable`, assignment));
|
|
167
|
+
}
|
|
146
168
|
return fp.result.ok(assignment);
|
|
147
169
|
}));
|
|
148
170
|
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Finds the property `key` is written as, for a REMOVE: stricter than
|
|
174
|
+
* {@link findObjectPropertyAssignment}, because removing a key from an object
|
|
175
|
+
* that spreads another into it is refused outright. The key's own property may
|
|
176
|
+
* be all that hides a value the spread supplies, and removing it would bring
|
|
177
|
+
* that value back - and for a `.jsonValues()` entry, delete its file as well.
|
|
178
|
+
*
|
|
179
|
+
* Every remove goes through this, so the two that exist (a value, and a
|
|
180
|
+
* `.jsonValues()` entry) cannot disagree about it.
|
|
181
|
+
*/
|
|
182
|
+
function findObjectPropertyAssignmentToRemove(value, key) {
|
|
183
|
+
const spreads = value.properties.filter(ts__default["default"].isSpreadAssignment);
|
|
184
|
+
if (spreads.length > 0) {
|
|
185
|
+
return fp.result.err(new ValSyntaxError(`Cannot remove "${key}" from an object that spreads another into it: ${spreadNames(spreads)} may have a "${key}" of its own, and removing this one would bring it back`, value));
|
|
186
|
+
}
|
|
187
|
+
return findObjectPropertyAssignment(value, key);
|
|
188
|
+
}
|
|
189
|
+
function spreadNames(spreads) {
|
|
190
|
+
// Not `getText()`: it needs parent pointers, and the parsers here do not set them.
|
|
191
|
+
return spreads.map(spread => ts__default["default"].isIdentifier(spread.expression) ? `"...${spread.expression.text}"` : "a spread").join(", ");
|
|
192
|
+
}
|
|
149
193
|
function validateInitializers(nodes) {
|
|
150
194
|
for (const node of nodes) {
|
|
151
195
|
if (ts__default["default"].isSpreadElement(node)) {
|
|
@@ -277,7 +321,7 @@ function removeValJsonEntry(document, recordPath, key) {
|
|
|
277
321
|
if (!ts__default["default"].isObjectLiteralExpression(recordNode)) {
|
|
278
322
|
return fp.result.err(new patch.PatchError("Cannot remove jsonValues entry: record source is not an object literal"));
|
|
279
323
|
}
|
|
280
|
-
return fp.pipe(
|
|
324
|
+
return fp.pipe(findObjectPropertyAssignmentToRemove(recordNode, key), fp.result.flatMap(assignment => {
|
|
281
325
|
if (!assignment) {
|
|
282
326
|
return fp.result.err(new patch.PatchError(`Cannot remove jsonValues entry '${key}': it does not exist`));
|
|
283
327
|
}
|
|
@@ -492,7 +536,7 @@ function removeFromNode(document, node, key) {
|
|
|
492
536
|
if (ts__default["default"].isArrayLiteralExpression(node)) {
|
|
493
537
|
return fp.pipe(parseAndValidateArrayInboundsIndex(key, node.elements), fp.result.map(index => removeAt(document, node.elements, index)));
|
|
494
538
|
} else if (ts__default["default"].isObjectLiteralExpression(node)) {
|
|
495
|
-
return fp.pipe(
|
|
539
|
+
return fp.pipe(findObjectPropertyAssignmentToRemove(node, key), fp.result.flatMap(assignment => {
|
|
496
540
|
if (!assignment) {
|
|
497
541
|
return fp.result.err(new patch.PatchError("Cannot remove object element which does not exist"));
|
|
498
542
|
}
|
|
@@ -2205,7 +2249,7 @@ function createFsSketchpadStore(rootDir, now = () => new Date()) {
|
|
|
2205
2249
|
* as a bundler does.
|
|
2206
2250
|
*/
|
|
2207
2251
|
function loadTypeScriptKit() {
|
|
2208
|
-
return Promise.resolve().then(function () { return require('./publishKit-
|
|
2252
|
+
return Promise.resolve().then(function () { return require('./publishKit-cfe1273d.cjs.dev.js'); });
|
|
2209
2253
|
}
|
|
2210
2254
|
|
|
2211
2255
|
/** Serializes a schema, or gives up quietly — serialization errors are reported elsewhere. */
|
|
@@ -5020,7 +5064,7 @@ async function stagedModuleSources(files) {
|
|
|
5020
5064
|
parseValFile,
|
|
5021
5065
|
analyzeValModule,
|
|
5022
5066
|
evaluateModuleSource
|
|
5023
|
-
} = await Promise.resolve().then(function () { return require('./publishKit-
|
|
5067
|
+
} = await Promise.resolve().then(function () { return require('./publishKit-cfe1273d.cjs.dev.js'); });
|
|
5024
5068
|
const sources = {};
|
|
5025
5069
|
for (const {
|
|
5026
5070
|
path,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Internal, deserializeSchema, DEFAULT_CONTENT_HOST, DEFAULT_VAL_REMOTE_HOST } from '@valbuild/core';
|
|
2
2
|
import { createUIRequestHandler } from '@valbuild/ui/server';
|
|
3
|
-
import { r as resolveExistingJsonPath, s as summaryOf, m as matchesFilter, h as byUpdatedAt, n as newSketchpad, i as isSketchpadId, j as applySketchpadChange, k as ValOps, V as VAL_CLIENT_HEADERS, l as isSafePatchId, o as isMediaFilePath, M as MEDIA_FILE_PATH_ACCEPTS, p as bufferFromDataUrl, q as getFieldsForType, u as uploadRemoteFile, d as getFileExt, t as isPublicFilePath, w as guessMimeTypeFromPath, x as createMetadataFromBuffer, D as DEFAULT_ANALYTICS_INGEST_URL, e as ValOpsMemory, y as sessionAuth, z as isHttpOps, A as isHlsMasterPlaylist, B as sumHlsSegmentDurations, C as parseHlsMasterVariants, E as largestHlsVariant, F as fallbackRefOf, G as mapHlsUris, H as movedRemoteHost, J as needsHostCheck, K as rewriteRefHost, L as fallbackRemoteHost, N as checkRemoteFiles, O as ValServer, P as setRequestGuard, Q as parseAllowedHosts, R as createValRequestHandler } from './ValRouterCore-
|
|
3
|
+
import { r as resolveExistingJsonPath, s as summaryOf, m as matchesFilter, h as byUpdatedAt, n as newSketchpad, i as isSketchpadId, j as applySketchpadChange, k as ValOps, V as VAL_CLIENT_HEADERS, l as isSafePatchId, o as isMediaFilePath, M as MEDIA_FILE_PATH_ACCEPTS, p as bufferFromDataUrl, q as getFieldsForType, u as uploadRemoteFile, d as getFileExt, t as isPublicFilePath, w as guessMimeTypeFromPath, x as createMetadataFromBuffer, D as DEFAULT_ANALYTICS_INGEST_URL, e as ValOpsMemory, y as sessionAuth, z as isHttpOps, A as isHlsMasterPlaylist, B as sumHlsSegmentDurations, C as parseHlsMasterVariants, E as largestHlsVariant, F as fallbackRefOf, G as mapHlsUris, H as movedRemoteHost, J as needsHostCheck, K as rewriteRefHost, L as fallbackRemoteHost, N as checkRemoteFiles, O as ValServer, P as setRequestGuard, Q as parseAllowedHosts, R as createValRequestHandler } from './ValRouterCore-fe985e4c.esm.js';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import ts from 'typescript';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -101,17 +101,61 @@ function evaluateExpression(value) {
|
|
|
101
101
|
return result.err(new ValSyntaxError("Expression must be a literal", value));
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Finds the property `key` is written as in an object literal, for an edit to
|
|
107
|
+
* write into.
|
|
108
|
+
*
|
|
109
|
+
* An object may spread another into itself (`{ ...noMedia, code: null }`): the
|
|
110
|
+
* module evaluates it, so the value reads fine, and an edit to a key written
|
|
111
|
+
* out AFTER every spread can go ahead - that property is the one that wins.
|
|
112
|
+
* What cannot is an edit to a key a spread might supply or override, since we
|
|
113
|
+
* would be writing a value the module does not end up with. Those are
|
|
114
|
+
* refused, naming the spread, so the author knows which line to write out.
|
|
115
|
+
*/
|
|
104
116
|
function findObjectPropertyAssignment(value, key) {
|
|
105
|
-
|
|
117
|
+
const spreads = value.properties.filter(ts.isSpreadAssignment);
|
|
118
|
+
return pipe(validateObjectProperties(value.properties.filter(property => !ts.isSpreadAssignment(property))), result.flatMap(assignments => {
|
|
106
119
|
const matchingAssignments = assignments.filter(assignment => assignment.name.text === key);
|
|
107
|
-
if (matchingAssignments.length === 0) return result.ok(undefined);
|
|
108
120
|
if (matchingAssignments.length > 1) {
|
|
109
121
|
return result.err(new ValSyntaxError(`Object key "${key}" is ambiguous`, value));
|
|
110
122
|
}
|
|
111
123
|
const [assignment] = matchingAssignments;
|
|
124
|
+
if (assignment === undefined) {
|
|
125
|
+
if (spreads.length > 0) {
|
|
126
|
+
return result.err(new ValSyntaxError(`Cannot edit "${key}": it is not written out in this object, so it may come from ${spreadNames(spreads)}. Write "${key}" out after the spread to make it editable`, spreads[spreads.length - 1]));
|
|
127
|
+
}
|
|
128
|
+
return result.ok(undefined);
|
|
129
|
+
}
|
|
130
|
+
const overriding = spreads.filter(spread => spread.pos > assignment.pos);
|
|
131
|
+
if (overriding.length > 0) {
|
|
132
|
+
return result.err(new ValSyntaxError(`Cannot edit "${key}": ${spreadNames(overriding)} comes after it and may override it. Move "${key}" after the spread to make it editable`, assignment));
|
|
133
|
+
}
|
|
112
134
|
return result.ok(assignment);
|
|
113
135
|
}));
|
|
114
136
|
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Finds the property `key` is written as, for a REMOVE: stricter than
|
|
140
|
+
* {@link findObjectPropertyAssignment}, because removing a key from an object
|
|
141
|
+
* that spreads another into it is refused outright. The key's own property may
|
|
142
|
+
* be all that hides a value the spread supplies, and removing it would bring
|
|
143
|
+
* that value back - and for a `.jsonValues()` entry, delete its file as well.
|
|
144
|
+
*
|
|
145
|
+
* Every remove goes through this, so the two that exist (a value, and a
|
|
146
|
+
* `.jsonValues()` entry) cannot disagree about it.
|
|
147
|
+
*/
|
|
148
|
+
function findObjectPropertyAssignmentToRemove(value, key) {
|
|
149
|
+
const spreads = value.properties.filter(ts.isSpreadAssignment);
|
|
150
|
+
if (spreads.length > 0) {
|
|
151
|
+
return result.err(new ValSyntaxError(`Cannot remove "${key}" from an object that spreads another into it: ${spreadNames(spreads)} may have a "${key}" of its own, and removing this one would bring it back`, value));
|
|
152
|
+
}
|
|
153
|
+
return findObjectPropertyAssignment(value, key);
|
|
154
|
+
}
|
|
155
|
+
function spreadNames(spreads) {
|
|
156
|
+
// Not `getText()`: it needs parent pointers, and the parsers here do not set them.
|
|
157
|
+
return spreads.map(spread => ts.isIdentifier(spread.expression) ? `"...${spread.expression.text}"` : "a spread").join(", ");
|
|
158
|
+
}
|
|
115
159
|
function validateInitializers(nodes) {
|
|
116
160
|
for (const node of nodes) {
|
|
117
161
|
if (ts.isSpreadElement(node)) {
|
|
@@ -243,7 +287,7 @@ function removeValJsonEntry(document, recordPath, key) {
|
|
|
243
287
|
if (!ts.isObjectLiteralExpression(recordNode)) {
|
|
244
288
|
return result.err(new PatchError("Cannot remove jsonValues entry: record source is not an object literal"));
|
|
245
289
|
}
|
|
246
|
-
return pipe(
|
|
290
|
+
return pipe(findObjectPropertyAssignmentToRemove(recordNode, key), result.flatMap(assignment => {
|
|
247
291
|
if (!assignment) {
|
|
248
292
|
return result.err(new PatchError(`Cannot remove jsonValues entry '${key}': it does not exist`));
|
|
249
293
|
}
|
|
@@ -458,7 +502,7 @@ function removeFromNode(document, node, key) {
|
|
|
458
502
|
if (ts.isArrayLiteralExpression(node)) {
|
|
459
503
|
return pipe(parseAndValidateArrayInboundsIndex(key, node.elements), result.map(index => removeAt(document, node.elements, index)));
|
|
460
504
|
} else if (ts.isObjectLiteralExpression(node)) {
|
|
461
|
-
return pipe(
|
|
505
|
+
return pipe(findObjectPropertyAssignmentToRemove(node, key), result.flatMap(assignment => {
|
|
462
506
|
if (!assignment) {
|
|
463
507
|
return result.err(new PatchError("Cannot remove object element which does not exist"));
|
|
464
508
|
}
|
|
@@ -2171,7 +2215,7 @@ function createFsSketchpadStore(rootDir, now = () => new Date()) {
|
|
|
2171
2215
|
* as a bundler does.
|
|
2172
2216
|
*/
|
|
2173
2217
|
function loadTypeScriptKit() {
|
|
2174
|
-
return import('./publishKit-
|
|
2218
|
+
return import('./publishKit-0709423c.esm.js');
|
|
2175
2219
|
}
|
|
2176
2220
|
|
|
2177
2221
|
/** Serializes a schema, or gives up quietly — serialization errors are reported elsewhere. */
|
|
@@ -4986,7 +5030,7 @@ async function stagedModuleSources(files) {
|
|
|
4986
5030
|
parseValFile,
|
|
4987
5031
|
analyzeValModule,
|
|
4988
5032
|
evaluateModuleSource
|
|
4989
|
-
} = await import('./publishKit-
|
|
5033
|
+
} = await import('./publishKit-0709423c.esm.js');
|
|
4990
5034
|
const sources = {};
|
|
4991
5035
|
for (const {
|
|
4992
5036
|
path,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@valbuild/core');
|
|
4
4
|
var server = require('@valbuild/ui/server');
|
|
5
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
5
|
+
var ValRouterCore = require('./ValRouterCore-4be8eaf1.cjs.prod.js');
|
|
6
6
|
var path = require('path');
|
|
7
7
|
var ts = require('typescript');
|
|
8
8
|
var z = require('zod');
|
|
@@ -135,17 +135,61 @@ function evaluateExpression(value) {
|
|
|
135
135
|
return fp.result.err(new ValSyntaxError("Expression must be a literal", value));
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Finds the property `key` is written as in an object literal, for an edit to
|
|
141
|
+
* write into.
|
|
142
|
+
*
|
|
143
|
+
* An object may spread another into itself (`{ ...noMedia, code: null }`): the
|
|
144
|
+
* module evaluates it, so the value reads fine, and an edit to a key written
|
|
145
|
+
* out AFTER every spread can go ahead - that property is the one that wins.
|
|
146
|
+
* What cannot is an edit to a key a spread might supply or override, since we
|
|
147
|
+
* would be writing a value the module does not end up with. Those are
|
|
148
|
+
* refused, naming the spread, so the author knows which line to write out.
|
|
149
|
+
*/
|
|
138
150
|
function findObjectPropertyAssignment(value, key) {
|
|
139
|
-
|
|
151
|
+
const spreads = value.properties.filter(ts__default["default"].isSpreadAssignment);
|
|
152
|
+
return fp.pipe(validateObjectProperties(value.properties.filter(property => !ts__default["default"].isSpreadAssignment(property))), fp.result.flatMap(assignments => {
|
|
140
153
|
const matchingAssignments = assignments.filter(assignment => assignment.name.text === key);
|
|
141
|
-
if (matchingAssignments.length === 0) return fp.result.ok(undefined);
|
|
142
154
|
if (matchingAssignments.length > 1) {
|
|
143
155
|
return fp.result.err(new ValSyntaxError(`Object key "${key}" is ambiguous`, value));
|
|
144
156
|
}
|
|
145
157
|
const [assignment] = matchingAssignments;
|
|
158
|
+
if (assignment === undefined) {
|
|
159
|
+
if (spreads.length > 0) {
|
|
160
|
+
return fp.result.err(new ValSyntaxError(`Cannot edit "${key}": it is not written out in this object, so it may come from ${spreadNames(spreads)}. Write "${key}" out after the spread to make it editable`, spreads[spreads.length - 1]));
|
|
161
|
+
}
|
|
162
|
+
return fp.result.ok(undefined);
|
|
163
|
+
}
|
|
164
|
+
const overriding = spreads.filter(spread => spread.pos > assignment.pos);
|
|
165
|
+
if (overriding.length > 0) {
|
|
166
|
+
return fp.result.err(new ValSyntaxError(`Cannot edit "${key}": ${spreadNames(overriding)} comes after it and may override it. Move "${key}" after the spread to make it editable`, assignment));
|
|
167
|
+
}
|
|
146
168
|
return fp.result.ok(assignment);
|
|
147
169
|
}));
|
|
148
170
|
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Finds the property `key` is written as, for a REMOVE: stricter than
|
|
174
|
+
* {@link findObjectPropertyAssignment}, because removing a key from an object
|
|
175
|
+
* that spreads another into it is refused outright. The key's own property may
|
|
176
|
+
* be all that hides a value the spread supplies, and removing it would bring
|
|
177
|
+
* that value back - and for a `.jsonValues()` entry, delete its file as well.
|
|
178
|
+
*
|
|
179
|
+
* Every remove goes through this, so the two that exist (a value, and a
|
|
180
|
+
* `.jsonValues()` entry) cannot disagree about it.
|
|
181
|
+
*/
|
|
182
|
+
function findObjectPropertyAssignmentToRemove(value, key) {
|
|
183
|
+
const spreads = value.properties.filter(ts__default["default"].isSpreadAssignment);
|
|
184
|
+
if (spreads.length > 0) {
|
|
185
|
+
return fp.result.err(new ValSyntaxError(`Cannot remove "${key}" from an object that spreads another into it: ${spreadNames(spreads)} may have a "${key}" of its own, and removing this one would bring it back`, value));
|
|
186
|
+
}
|
|
187
|
+
return findObjectPropertyAssignment(value, key);
|
|
188
|
+
}
|
|
189
|
+
function spreadNames(spreads) {
|
|
190
|
+
// Not `getText()`: it needs parent pointers, and the parsers here do not set them.
|
|
191
|
+
return spreads.map(spread => ts__default["default"].isIdentifier(spread.expression) ? `"...${spread.expression.text}"` : "a spread").join(", ");
|
|
192
|
+
}
|
|
149
193
|
function validateInitializers(nodes) {
|
|
150
194
|
for (const node of nodes) {
|
|
151
195
|
if (ts__default["default"].isSpreadElement(node)) {
|
|
@@ -277,7 +321,7 @@ function removeValJsonEntry(document, recordPath, key) {
|
|
|
277
321
|
if (!ts__default["default"].isObjectLiteralExpression(recordNode)) {
|
|
278
322
|
return fp.result.err(new patch.PatchError("Cannot remove jsonValues entry: record source is not an object literal"));
|
|
279
323
|
}
|
|
280
|
-
return fp.pipe(
|
|
324
|
+
return fp.pipe(findObjectPropertyAssignmentToRemove(recordNode, key), fp.result.flatMap(assignment => {
|
|
281
325
|
if (!assignment) {
|
|
282
326
|
return fp.result.err(new patch.PatchError(`Cannot remove jsonValues entry '${key}': it does not exist`));
|
|
283
327
|
}
|
|
@@ -492,7 +536,7 @@ function removeFromNode(document, node, key) {
|
|
|
492
536
|
if (ts__default["default"].isArrayLiteralExpression(node)) {
|
|
493
537
|
return fp.pipe(parseAndValidateArrayInboundsIndex(key, node.elements), fp.result.map(index => removeAt(document, node.elements, index)));
|
|
494
538
|
} else if (ts__default["default"].isObjectLiteralExpression(node)) {
|
|
495
|
-
return fp.pipe(
|
|
539
|
+
return fp.pipe(findObjectPropertyAssignmentToRemove(node, key), fp.result.flatMap(assignment => {
|
|
496
540
|
if (!assignment) {
|
|
497
541
|
return fp.result.err(new patch.PatchError("Cannot remove object element which does not exist"));
|
|
498
542
|
}
|
|
@@ -2205,7 +2249,7 @@ function createFsSketchpadStore(rootDir, now = () => new Date()) {
|
|
|
2205
2249
|
* as a bundler does.
|
|
2206
2250
|
*/
|
|
2207
2251
|
function loadTypeScriptKit() {
|
|
2208
|
-
return Promise.resolve().then(function () { return require('./publishKit-
|
|
2252
|
+
return Promise.resolve().then(function () { return require('./publishKit-e7f7db7c.cjs.prod.js'); });
|
|
2209
2253
|
}
|
|
2210
2254
|
|
|
2211
2255
|
/** Serializes a schema, or gives up quietly — serialization errors are reported elsewhere. */
|
|
@@ -5020,7 +5064,7 @@ async function stagedModuleSources(files) {
|
|
|
5020
5064
|
parseValFile,
|
|
5021
5065
|
analyzeValModule,
|
|
5022
5066
|
evaluateModuleSource
|
|
5023
|
-
} = await Promise.resolve().then(function () { return require('./publishKit-
|
|
5067
|
+
} = await Promise.resolve().then(function () { return require('./publishKit-e7f7db7c.cjs.prod.js'); });
|
|
5024
5068
|
const sources = {};
|
|
5025
5069
|
for (const {
|
|
5026
5070
|
path,
|
|
@@ -4700,17 +4700,24 @@ class ValOps {
|
|
|
4700
4700
|
return fp.result.ok(entries);
|
|
4701
4701
|
};
|
|
4702
4702
|
const collectPatchError = (err, patchId, op) => {
|
|
4703
|
+
/*
|
|
4704
|
+
* A `ValSyntaxError` holds the TypeScript node it is about, and a
|
|
4705
|
+
* node's `parent` points back up the tree: it is a cycle, so it must
|
|
4706
|
+
* never reach `JSON.stringify` - here, in the response, or in the
|
|
4707
|
+
* caller's own logging. Turn it into the message and the place in the
|
|
4708
|
+
* file it was about, which is all anyone downstream can use anyway.
|
|
4709
|
+
*/
|
|
4710
|
+
const reported = err instanceof patch.PatchError ? [err] : flattenSyntaxErrors(err).map(syntaxError => ({
|
|
4711
|
+
message: formatSyntaxErrorAt(path, tsSourceFile, syntaxError),
|
|
4712
|
+
filePath: path
|
|
4713
|
+
}));
|
|
4703
4714
|
core.Internal.log.error("Could not patch", JSON.stringify({
|
|
4704
4715
|
path,
|
|
4705
4716
|
patchId,
|
|
4706
|
-
|
|
4717
|
+
errors: reported.map(formatPatchSourceError),
|
|
4707
4718
|
op
|
|
4708
4719
|
}, null, 2));
|
|
4709
|
-
|
|
4710
|
-
errors.push(...err);
|
|
4711
|
-
} else {
|
|
4712
|
-
errors.push(err);
|
|
4713
|
-
}
|
|
4720
|
+
errors.push(...reported);
|
|
4714
4721
|
};
|
|
4715
4722
|
const appliedPatches = [];
|
|
4716
4723
|
const triedPatches = [];
|
|
@@ -5669,6 +5676,26 @@ function isFileSource(value) {
|
|
|
5669
5676
|
* only wants a sentence reads it the same way.
|
|
5670
5677
|
*/
|
|
5671
5678
|
|
|
5679
|
+
function flattenSyntaxErrors(tree) {
|
|
5680
|
+
return Array.isArray(tree) ? tree.flatMap(flattenSyntaxErrors) : [tree];
|
|
5681
|
+
}
|
|
5682
|
+
|
|
5683
|
+
/**
|
|
5684
|
+
* `formatSyntaxError` without importing `./patch/ts/syntax`, which imports
|
|
5685
|
+
* `typescript` - this file has to bundle for a browser (see demo mode).
|
|
5686
|
+
* The node's own methods are all it needs.
|
|
5687
|
+
*/
|
|
5688
|
+
function formatSyntaxErrorAt(path, sourceFile, error) {
|
|
5689
|
+
if (error.node.pos < 0) {
|
|
5690
|
+
// A node made by a factory has no place in the file.
|
|
5691
|
+
return `${path}: ${error.message}`;
|
|
5692
|
+
}
|
|
5693
|
+
const {
|
|
5694
|
+
line,
|
|
5695
|
+
character
|
|
5696
|
+
} = sourceFile.getLineAndCharacterOfPosition(error.node.getStart(sourceFile));
|
|
5697
|
+
return `${path}:${line + 1}:${character + 1} ${error.message}`;
|
|
5698
|
+
}
|
|
5672
5699
|
function formatPatchSourceError(error) {
|
|
5673
5700
|
if ("message" in error) {
|
|
5674
5701
|
return error.message;
|
|
@@ -6382,7 +6409,7 @@ var packageJson = {
|
|
|
6382
6409
|
],
|
|
6383
6410
|
exports: true
|
|
6384
6411
|
},
|
|
6385
|
-
version: "0.
|
|
6412
|
+
version: "0.154.0",
|
|
6386
6413
|
scripts: {
|
|
6387
6414
|
typecheck: "tsc --noEmit",
|
|
6388
6415
|
test: "jest",
|
|
@@ -9338,11 +9365,19 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
9338
9365
|
const createPatchRes = await serverOps.createPatch(patch.path, patch.patch, patch.patchId, parentRef, sessionId, authorId);
|
|
9339
9366
|
if (fp.result.isErr(createPatchRes)) {
|
|
9340
9367
|
if (createPatchRes.error.errorType === "patch-head-conflict") {
|
|
9368
|
+
/*
|
|
9369
|
+
* The patches before this one in the batch ARE saved: each is
|
|
9370
|
+
* its own write, and someone else's can land between two of
|
|
9371
|
+
* ours. Reported as a 200 would report them, so the client does
|
|
9372
|
+
* not send them again -- the content service refuses a patch it
|
|
9373
|
+
* already has.
|
|
9374
|
+
*/
|
|
9341
9375
|
return {
|
|
9342
9376
|
status: 409,
|
|
9343
9377
|
json: {
|
|
9344
9378
|
type: "patch-head-conflict",
|
|
9345
|
-
message: "The change was written against a different starting point than the server has."
|
|
9379
|
+
message: "The change was written against a different starting point than the server has.",
|
|
9380
|
+
...savedSoFar()
|
|
9346
9381
|
}
|
|
9347
9382
|
};
|
|
9348
9383
|
} else if (createPatchRes.error.errorType === "plan-refused") {
|
|
@@ -9507,6 +9542,25 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
9507
9542
|
}
|
|
9508
9543
|
const ids = query.id;
|
|
9509
9544
|
const deleteRes = await serverOps.deletePatches(ids);
|
|
9545
|
+
if ("error" in deleteRes && deleteRes.error !== undefined) {
|
|
9546
|
+
/*
|
|
9547
|
+
* The store failed -- the content service, or in fs mode the patch
|
|
9548
|
+
* store's lock or log -- so nothing is known to be deleted.
|
|
9549
|
+
* Answered as a failure, never as the 200 below: that names every
|
|
9550
|
+
* id as deleted, and the Studio forgets patches that still exist --
|
|
9551
|
+
* a reload brings the change back, and the next publish ships it.
|
|
9552
|
+
*/
|
|
9553
|
+
core.Internal.log.error("Failed to delete patches", deleteRes.error);
|
|
9554
|
+
return {
|
|
9555
|
+
status: 502,
|
|
9556
|
+
json: {
|
|
9557
|
+
message: deleteRes.error.message,
|
|
9558
|
+
...(typeof deleteRes.error.details === "string" ? {
|
|
9559
|
+
details: deleteRes.error.details
|
|
9560
|
+
} : {})
|
|
9561
|
+
}
|
|
9562
|
+
};
|
|
9563
|
+
}
|
|
9510
9564
|
if (deleteRes.errors && Object.keys(deleteRes.errors).length > 0) {
|
|
9511
9565
|
core.Internal.log.error("Failed to delete patches", deleteRes.errors);
|
|
9512
9566
|
return {
|
|
@@ -4700,17 +4700,24 @@ class ValOps {
|
|
|
4700
4700
|
return fp.result.ok(entries);
|
|
4701
4701
|
};
|
|
4702
4702
|
const collectPatchError = (err, patchId, op) => {
|
|
4703
|
+
/*
|
|
4704
|
+
* A `ValSyntaxError` holds the TypeScript node it is about, and a
|
|
4705
|
+
* node's `parent` points back up the tree: it is a cycle, so it must
|
|
4706
|
+
* never reach `JSON.stringify` - here, in the response, or in the
|
|
4707
|
+
* caller's own logging. Turn it into the message and the place in the
|
|
4708
|
+
* file it was about, which is all anyone downstream can use anyway.
|
|
4709
|
+
*/
|
|
4710
|
+
const reported = err instanceof patch.PatchError ? [err] : flattenSyntaxErrors(err).map(syntaxError => ({
|
|
4711
|
+
message: formatSyntaxErrorAt(path, tsSourceFile, syntaxError),
|
|
4712
|
+
filePath: path
|
|
4713
|
+
}));
|
|
4703
4714
|
core.Internal.log.error("Could not patch", JSON.stringify({
|
|
4704
4715
|
path,
|
|
4705
4716
|
patchId,
|
|
4706
|
-
|
|
4717
|
+
errors: reported.map(formatPatchSourceError),
|
|
4707
4718
|
op
|
|
4708
4719
|
}, null, 2));
|
|
4709
|
-
|
|
4710
|
-
errors.push(...err);
|
|
4711
|
-
} else {
|
|
4712
|
-
errors.push(err);
|
|
4713
|
-
}
|
|
4720
|
+
errors.push(...reported);
|
|
4714
4721
|
};
|
|
4715
4722
|
const appliedPatches = [];
|
|
4716
4723
|
const triedPatches = [];
|
|
@@ -5669,6 +5676,26 @@ function isFileSource(value) {
|
|
|
5669
5676
|
* only wants a sentence reads it the same way.
|
|
5670
5677
|
*/
|
|
5671
5678
|
|
|
5679
|
+
function flattenSyntaxErrors(tree) {
|
|
5680
|
+
return Array.isArray(tree) ? tree.flatMap(flattenSyntaxErrors) : [tree];
|
|
5681
|
+
}
|
|
5682
|
+
|
|
5683
|
+
/**
|
|
5684
|
+
* `formatSyntaxError` without importing `./patch/ts/syntax`, which imports
|
|
5685
|
+
* `typescript` - this file has to bundle for a browser (see demo mode).
|
|
5686
|
+
* The node's own methods are all it needs.
|
|
5687
|
+
*/
|
|
5688
|
+
function formatSyntaxErrorAt(path, sourceFile, error) {
|
|
5689
|
+
if (error.node.pos < 0) {
|
|
5690
|
+
// A node made by a factory has no place in the file.
|
|
5691
|
+
return `${path}: ${error.message}`;
|
|
5692
|
+
}
|
|
5693
|
+
const {
|
|
5694
|
+
line,
|
|
5695
|
+
character
|
|
5696
|
+
} = sourceFile.getLineAndCharacterOfPosition(error.node.getStart(sourceFile));
|
|
5697
|
+
return `${path}:${line + 1}:${character + 1} ${error.message}`;
|
|
5698
|
+
}
|
|
5672
5699
|
function formatPatchSourceError(error) {
|
|
5673
5700
|
if ("message" in error) {
|
|
5674
5701
|
return error.message;
|
|
@@ -6382,7 +6409,7 @@ var packageJson = {
|
|
|
6382
6409
|
],
|
|
6383
6410
|
exports: true
|
|
6384
6411
|
},
|
|
6385
|
-
version: "0.
|
|
6412
|
+
version: "0.154.0",
|
|
6386
6413
|
scripts: {
|
|
6387
6414
|
typecheck: "tsc --noEmit",
|
|
6388
6415
|
test: "jest",
|
|
@@ -9338,11 +9365,19 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
9338
9365
|
const createPatchRes = await serverOps.createPatch(patch.path, patch.patch, patch.patchId, parentRef, sessionId, authorId);
|
|
9339
9366
|
if (fp.result.isErr(createPatchRes)) {
|
|
9340
9367
|
if (createPatchRes.error.errorType === "patch-head-conflict") {
|
|
9368
|
+
/*
|
|
9369
|
+
* The patches before this one in the batch ARE saved: each is
|
|
9370
|
+
* its own write, and someone else's can land between two of
|
|
9371
|
+
* ours. Reported as a 200 would report them, so the client does
|
|
9372
|
+
* not send them again -- the content service refuses a patch it
|
|
9373
|
+
* already has.
|
|
9374
|
+
*/
|
|
9341
9375
|
return {
|
|
9342
9376
|
status: 409,
|
|
9343
9377
|
json: {
|
|
9344
9378
|
type: "patch-head-conflict",
|
|
9345
|
-
message: "The change was written against a different starting point than the server has."
|
|
9379
|
+
message: "The change was written against a different starting point than the server has.",
|
|
9380
|
+
...savedSoFar()
|
|
9346
9381
|
}
|
|
9347
9382
|
};
|
|
9348
9383
|
} else if (createPatchRes.error.errorType === "plan-refused") {
|
|
@@ -9507,6 +9542,25 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
9507
9542
|
}
|
|
9508
9543
|
const ids = query.id;
|
|
9509
9544
|
const deleteRes = await serverOps.deletePatches(ids);
|
|
9545
|
+
if ("error" in deleteRes && deleteRes.error !== undefined) {
|
|
9546
|
+
/*
|
|
9547
|
+
* The store failed -- the content service, or in fs mode the patch
|
|
9548
|
+
* store's lock or log -- so nothing is known to be deleted.
|
|
9549
|
+
* Answered as a failure, never as the 200 below: that names every
|
|
9550
|
+
* id as deleted, and the Studio forgets patches that still exist --
|
|
9551
|
+
* a reload brings the change back, and the next publish ships it.
|
|
9552
|
+
*/
|
|
9553
|
+
core.Internal.log.error("Failed to delete patches", deleteRes.error);
|
|
9554
|
+
return {
|
|
9555
|
+
status: 502,
|
|
9556
|
+
json: {
|
|
9557
|
+
message: deleteRes.error.message,
|
|
9558
|
+
...(typeof deleteRes.error.details === "string" ? {
|
|
9559
|
+
details: deleteRes.error.details
|
|
9560
|
+
} : {})
|
|
9561
|
+
}
|
|
9562
|
+
};
|
|
9563
|
+
}
|
|
9510
9564
|
if (deleteRes.errors && Object.keys(deleteRes.errors).length > 0) {
|
|
9511
9565
|
core.Internal.log.error("Failed to delete patches", deleteRes.errors);
|
|
9512
9566
|
return {
|
|
@@ -4694,17 +4694,24 @@ class ValOps {
|
|
|
4694
4694
|
return result.ok(entries);
|
|
4695
4695
|
};
|
|
4696
4696
|
const collectPatchError = (err, patchId, op) => {
|
|
4697
|
+
/*
|
|
4698
|
+
* A `ValSyntaxError` holds the TypeScript node it is about, and a
|
|
4699
|
+
* node's `parent` points back up the tree: it is a cycle, so it must
|
|
4700
|
+
* never reach `JSON.stringify` - here, in the response, or in the
|
|
4701
|
+
* caller's own logging. Turn it into the message and the place in the
|
|
4702
|
+
* file it was about, which is all anyone downstream can use anyway.
|
|
4703
|
+
*/
|
|
4704
|
+
const reported = err instanceof PatchError ? [err] : flattenSyntaxErrors(err).map(syntaxError => ({
|
|
4705
|
+
message: formatSyntaxErrorAt(path, tsSourceFile, syntaxError),
|
|
4706
|
+
filePath: path
|
|
4707
|
+
}));
|
|
4697
4708
|
Internal.log.error("Could not patch", JSON.stringify({
|
|
4698
4709
|
path,
|
|
4699
4710
|
patchId,
|
|
4700
|
-
|
|
4711
|
+
errors: reported.map(formatPatchSourceError),
|
|
4701
4712
|
op
|
|
4702
4713
|
}, null, 2));
|
|
4703
|
-
|
|
4704
|
-
errors.push(...err);
|
|
4705
|
-
} else {
|
|
4706
|
-
errors.push(err);
|
|
4707
|
-
}
|
|
4714
|
+
errors.push(...reported);
|
|
4708
4715
|
};
|
|
4709
4716
|
const appliedPatches = [];
|
|
4710
4717
|
const triedPatches = [];
|
|
@@ -5663,6 +5670,26 @@ function isFileSource(value) {
|
|
|
5663
5670
|
* only wants a sentence reads it the same way.
|
|
5664
5671
|
*/
|
|
5665
5672
|
|
|
5673
|
+
function flattenSyntaxErrors(tree) {
|
|
5674
|
+
return Array.isArray(tree) ? tree.flatMap(flattenSyntaxErrors) : [tree];
|
|
5675
|
+
}
|
|
5676
|
+
|
|
5677
|
+
/**
|
|
5678
|
+
* `formatSyntaxError` without importing `./patch/ts/syntax`, which imports
|
|
5679
|
+
* `typescript` - this file has to bundle for a browser (see demo mode).
|
|
5680
|
+
* The node's own methods are all it needs.
|
|
5681
|
+
*/
|
|
5682
|
+
function formatSyntaxErrorAt(path, sourceFile, error) {
|
|
5683
|
+
if (error.node.pos < 0) {
|
|
5684
|
+
// A node made by a factory has no place in the file.
|
|
5685
|
+
return `${path}: ${error.message}`;
|
|
5686
|
+
}
|
|
5687
|
+
const {
|
|
5688
|
+
line,
|
|
5689
|
+
character
|
|
5690
|
+
} = sourceFile.getLineAndCharacterOfPosition(error.node.getStart(sourceFile));
|
|
5691
|
+
return `${path}:${line + 1}:${character + 1} ${error.message}`;
|
|
5692
|
+
}
|
|
5666
5693
|
function formatPatchSourceError(error) {
|
|
5667
5694
|
if ("message" in error) {
|
|
5668
5695
|
return error.message;
|
|
@@ -6376,7 +6403,7 @@ var packageJson = {
|
|
|
6376
6403
|
],
|
|
6377
6404
|
exports: true
|
|
6378
6405
|
},
|
|
6379
|
-
version: "0.
|
|
6406
|
+
version: "0.154.0",
|
|
6380
6407
|
scripts: {
|
|
6381
6408
|
typecheck: "tsc --noEmit",
|
|
6382
6409
|
test: "jest",
|
|
@@ -9332,11 +9359,19 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
9332
9359
|
const createPatchRes = await serverOps.createPatch(patch.path, patch.patch, patch.patchId, parentRef, sessionId, authorId);
|
|
9333
9360
|
if (result.isErr(createPatchRes)) {
|
|
9334
9361
|
if (createPatchRes.error.errorType === "patch-head-conflict") {
|
|
9362
|
+
/*
|
|
9363
|
+
* The patches before this one in the batch ARE saved: each is
|
|
9364
|
+
* its own write, and someone else's can land between two of
|
|
9365
|
+
* ours. Reported as a 200 would report them, so the client does
|
|
9366
|
+
* not send them again -- the content service refuses a patch it
|
|
9367
|
+
* already has.
|
|
9368
|
+
*/
|
|
9335
9369
|
return {
|
|
9336
9370
|
status: 409,
|
|
9337
9371
|
json: {
|
|
9338
9372
|
type: "patch-head-conflict",
|
|
9339
|
-
message: "The change was written against a different starting point than the server has."
|
|
9373
|
+
message: "The change was written against a different starting point than the server has.",
|
|
9374
|
+
...savedSoFar()
|
|
9340
9375
|
}
|
|
9341
9376
|
};
|
|
9342
9377
|
} else if (createPatchRes.error.errorType === "plan-refused") {
|
|
@@ -9501,6 +9536,25 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
9501
9536
|
}
|
|
9502
9537
|
const ids = query.id;
|
|
9503
9538
|
const deleteRes = await serverOps.deletePatches(ids);
|
|
9539
|
+
if ("error" in deleteRes && deleteRes.error !== undefined) {
|
|
9540
|
+
/*
|
|
9541
|
+
* The store failed -- the content service, or in fs mode the patch
|
|
9542
|
+
* store's lock or log -- so nothing is known to be deleted.
|
|
9543
|
+
* Answered as a failure, never as the 200 below: that names every
|
|
9544
|
+
* id as deleted, and the Studio forgets patches that still exist --
|
|
9545
|
+
* a reload brings the change back, and the next publish ships it.
|
|
9546
|
+
*/
|
|
9547
|
+
Internal.log.error("Failed to delete patches", deleteRes.error);
|
|
9548
|
+
return {
|
|
9549
|
+
status: 502,
|
|
9550
|
+
json: {
|
|
9551
|
+
message: deleteRes.error.message,
|
|
9552
|
+
...(typeof deleteRes.error.details === "string" ? {
|
|
9553
|
+
details: deleteRes.error.details
|
|
9554
|
+
} : {})
|
|
9555
|
+
}
|
|
9556
|
+
};
|
|
9557
|
+
}
|
|
9504
9558
|
if (deleteRes.errors && Object.keys(deleteRes.errors).length > 0) {
|
|
9505
9559
|
Internal.log.error("Failed to delete patches", deleteRes.errors);
|
|
9506
9560
|
return {
|
|
@@ -36,6 +36,28 @@ export declare function deepValidateExpression(value: ts.Expression): result.Res
|
|
|
36
36
|
* Evaluates the expression as a JSON value
|
|
37
37
|
*/
|
|
38
38
|
export declare function evaluateExpression(value: ts.Expression): result.Result<JSONValue, ValSyntaxErrorTree>;
|
|
39
|
+
/**
|
|
40
|
+
* Finds the property `key` is written as in an object literal, for an edit to
|
|
41
|
+
* write into.
|
|
42
|
+
*
|
|
43
|
+
* An object may spread another into itself (`{ ...noMedia, code: null }`): the
|
|
44
|
+
* module evaluates it, so the value reads fine, and an edit to a key written
|
|
45
|
+
* out AFTER every spread can go ahead - that property is the one that wins.
|
|
46
|
+
* What cannot is an edit to a key a spread might supply or override, since we
|
|
47
|
+
* would be writing a value the module does not end up with. Those are
|
|
48
|
+
* refused, naming the spread, so the author knows which line to write out.
|
|
49
|
+
*/
|
|
39
50
|
export declare function findObjectPropertyAssignment(value: ts.ObjectLiteralExpression, key: string): result.Result<LiteralPropertyAssignment | undefined, ValSyntaxErrorTree>;
|
|
51
|
+
/**
|
|
52
|
+
* Finds the property `key` is written as, for a REMOVE: stricter than
|
|
53
|
+
* {@link findObjectPropertyAssignment}, because removing a key from an object
|
|
54
|
+
* that spreads another into it is refused outright. The key's own property may
|
|
55
|
+
* be all that hides a value the spread supplies, and removing it would bring
|
|
56
|
+
* that value back - and for a `.jsonValues()` entry, delete its file as well.
|
|
57
|
+
*
|
|
58
|
+
* Every remove goes through this, so the two that exist (a value, and a
|
|
59
|
+
* `.jsonValues()` entry) cannot disagree about it.
|
|
60
|
+
*/
|
|
61
|
+
export declare function findObjectPropertyAssignmentToRemove(value: ts.ObjectLiteralExpression, key: string): result.Result<LiteralPropertyAssignment | undefined, ValSyntaxErrorTree>;
|
|
40
62
|
export declare function validateInitializers(nodes: ReadonlyArray<ts.Expression>): ValSyntaxErrorTree | undefined;
|
|
41
63
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_CONTENT_HOST } from '@valbuild/core';
|
|
2
|
-
import { e as ValOpsMemory, S as bytesToBase64, O as ValServer, R as createValRequestHandler } from './ValRouterCore-
|
|
2
|
+
import { e as ValOpsMemory, S as bytesToBase64, O as ValServer, R as createValRequestHandler } from './ValRouterCore-fe985e4c.esm.js';
|
|
3
3
|
|
|
4
4
|
const NO_SESSIONS = "Val: sessions are not available here -- this server runs in the browser, " + "has no secret to sign them with, and serves without authenticating.";
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var core = require('@valbuild/core');
|
|
4
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
4
|
+
var ValRouterCore = require('./ValRouterCore-0c088c9e.cjs.dev.js');
|
|
5
5
|
|
|
6
6
|
const NO_SESSIONS = "Val: sessions are not available here -- this server runs in the browser, " + "has no secret to sign them with, and serves without authenticating.";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var core = require('@valbuild/core');
|
|
4
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
4
|
+
var ValRouterCore = require('./ValRouterCore-4be8eaf1.cjs.prod.js');
|
|
5
5
|
|
|
6
6
|
const NO_SESSIONS = "Val: sessions are not available here -- this server runs in the browser, " + "has no secret to sign them with, and serves without authenticating.";
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
2
|
import { result, pipe } from '@valbuild/core/fp';
|
|
3
|
-
import { a as analyzeValModule, c as analyzeJsonValuesEntries, T as TSOps } from './ValRouter-
|
|
4
|
-
export { c as analyzeJsonValuesEntries, a as analyzeValModule, a8 as evaluateModuleSource, i as insertValJsonEntry, a9 as jsonValuesRecordKeys, r as removeValJsonEntry } from './ValRouter-
|
|
5
|
-
import { Y as bytesToUtf8, Z as posixPath } from './ValRouterCore-
|
|
3
|
+
import { a as analyzeValModule, c as analyzeJsonValuesEntries, T as TSOps } from './ValRouter-558dc66d.esm.js';
|
|
4
|
+
export { c as analyzeJsonValuesEntries, a as analyzeValModule, a8 as evaluateModuleSource, i as insertValJsonEntry, a9 as jsonValuesRecordKeys, r as removeValJsonEntry } from './ValRouter-558dc66d.esm.js';
|
|
5
|
+
import { Y as bytesToUtf8, Z as posixPath } from './ValRouterCore-fe985e4c.esm.js';
|
|
6
6
|
import '@valbuild/core';
|
|
7
7
|
import '@valbuild/ui/server';
|
|
8
8
|
import 'path';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var ts = require('typescript');
|
|
4
4
|
var fp = require('@valbuild/core/fp');
|
|
5
|
-
var ValRouter = require('./ValRouter-
|
|
6
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
5
|
+
var ValRouter = require('./ValRouter-1f427c38.cjs.dev.js');
|
|
6
|
+
var ValRouterCore = require('./ValRouterCore-0c088c9e.cjs.dev.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
require('@valbuild/ui/server');
|
|
9
9
|
require('path');
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var ts = require('typescript');
|
|
4
4
|
var fp = require('@valbuild/core/fp');
|
|
5
|
-
var ValRouter = require('./ValRouter-
|
|
6
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
5
|
+
var ValRouter = require('./ValRouter-cd6e854a.cjs.prod.js');
|
|
6
|
+
var ValRouterCore = require('./ValRouterCore-4be8eaf1.cjs.prod.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
require('@valbuild/ui/server');
|
|
9
9
|
require('path');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ValRouter = require('./ValRouter-
|
|
5
|
+
var ValRouter = require('./ValRouter-1f427c38.cjs.dev.js');
|
|
6
6
|
var patch = require('@valbuild/core/patch');
|
|
7
7
|
var fp = require('@valbuild/core/fp');
|
|
8
8
|
var core = require('@valbuild/core');
|
|
@@ -11,7 +11,7 @@ var path = require('path');
|
|
|
11
11
|
var fs = require('fs');
|
|
12
12
|
var vm = require('node:vm');
|
|
13
13
|
var node_module = require('node:module');
|
|
14
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
14
|
+
var ValRouterCore = require('./ValRouterCore-0c088c9e.cjs.dev.js');
|
|
15
15
|
var internal = require('@valbuild/shared/internal');
|
|
16
16
|
var sucrase = require('sucrase');
|
|
17
17
|
var fs$1 = require('fs/promises');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ValRouter = require('./ValRouter-
|
|
5
|
+
var ValRouter = require('./ValRouter-cd6e854a.cjs.prod.js');
|
|
6
6
|
var patch = require('@valbuild/core/patch');
|
|
7
7
|
var fp = require('@valbuild/core/fp');
|
|
8
8
|
var core = require('@valbuild/core');
|
|
@@ -11,7 +11,7 @@ var path = require('path');
|
|
|
11
11
|
var fs = require('fs');
|
|
12
12
|
var vm = require('node:vm');
|
|
13
13
|
var node_module = require('node:module');
|
|
14
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
14
|
+
var ValRouterCore = require('./ValRouterCore-4be8eaf1.cjs.prod.js');
|
|
15
15
|
var internal = require('@valbuild/shared/internal');
|
|
16
16
|
var sucrase = require('sucrase');
|
|
17
17
|
var fs$1 = require('fs/promises');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TSOps, a as analyzeValModule, f as flatMapErrors, b as formatSyntaxError, c as analyzeJsonValuesEntries, r as removeValJsonEntry, i as insertValJsonEntry, d as collectionReferencePatches, e as checkGalleryFiles, h as handleVideoUploadRemote, g as handleVideoDownloadRemote, j as handleVideosetMetadata, k as handleVideosetUploadRemote, l as handleVideosetCheckRemote, m as handleVideosetCheckAllFiles, n as canReadVideoMetadata, u as unreadableVideoMetadataMessage, o as localFilesWarning, p as openRemoteUploadSession, q as uploadBytesToRemote, s as getPersonalAccessTokenPath, V as ValOpsFS } from './ValRouter-
|
|
2
|
-
export { F as APP_MODE_REQUIRES_REMOTE_FILES, V as ValOpsFS, X as ValOpsHttp, a as analyzeValModule, R as checkRemoteRef, x as contentFromEnv, H as createFixPatch, t as createValApiRouter, D as createValOps, v as createValServer, a0 as decodeJwtWithoutVerifying, _ as describePatchStoreProblems, S as downloadFileFromRemote, a2 as encodeJwt, M as extractFileMetadata, L as extractImageMetadata, N as extractVideoMetadata, O as extractVideoMetadataFromFile, P as filesOfVideo, J as filesOfVideosetEntry, G as formatSyntaxErrorTree, U as getCachedRemoteFileDir, W as getCachedRemoteFilePath, a1 as getExpire, s as getPersonalAccessTokenPath, Q as getValidationErrorFileRef, m as handleVideosetCheckAllFiles, l as handleVideosetCheckRemote, j as handleVideosetMetadata, k as handleVideosetUploadRemote, C as initHandlerOptions, z as layeredSnapshot, Y as loadTypeScriptKit, K as parsePersonalAccessTokenFile, y as proposalFromEnv, A as proposalSnapshot, B as proposalSnapshotForReaders, Z as readPatchStore, E as resolveRemoteFileAuth, w as safeReadGit, $ as verifyJwt, I as videosetEntryVideoSchema } from './ValRouter-
|
|
1
|
+
import { T as TSOps, a as analyzeValModule, f as flatMapErrors, b as formatSyntaxError, c as analyzeJsonValuesEntries, r as removeValJsonEntry, i as insertValJsonEntry, d as collectionReferencePatches, e as checkGalleryFiles, h as handleVideoUploadRemote, g as handleVideoDownloadRemote, j as handleVideosetMetadata, k as handleVideosetUploadRemote, l as handleVideosetCheckRemote, m as handleVideosetCheckAllFiles, n as canReadVideoMetadata, u as unreadableVideoMetadataMessage, o as localFilesWarning, p as openRemoteUploadSession, q as uploadBytesToRemote, s as getPersonalAccessTokenPath, V as ValOpsFS } from './ValRouter-558dc66d.esm.js';
|
|
2
|
+
export { F as APP_MODE_REQUIRES_REMOTE_FILES, V as ValOpsFS, X as ValOpsHttp, a as analyzeValModule, R as checkRemoteRef, x as contentFromEnv, H as createFixPatch, t as createValApiRouter, D as createValOps, v as createValServer, a0 as decodeJwtWithoutVerifying, _ as describePatchStoreProblems, S as downloadFileFromRemote, a2 as encodeJwt, M as extractFileMetadata, L as extractImageMetadata, N as extractVideoMetadata, O as extractVideoMetadataFromFile, P as filesOfVideo, J as filesOfVideosetEntry, G as formatSyntaxErrorTree, U as getCachedRemoteFileDir, W as getCachedRemoteFilePath, a1 as getExpire, s as getPersonalAccessTokenPath, Q as getValidationErrorFileRef, m as handleVideosetCheckAllFiles, l as handleVideosetCheckRemote, j as handleVideosetMetadata, k as handleVideosetUploadRemote, C as initHandlerOptions, z as layeredSnapshot, Y as loadTypeScriptKit, K as parsePersonalAccessTokenFile, y as proposalFromEnv, A as proposalSnapshot, B as proposalSnapshotForReaders, Z as readPatchStore, E as resolveRemoteFileAuth, w as safeReadGit, $ as verifyJwt, I as videosetEntryVideoSchema } from './ValRouter-558dc66d.esm.js';
|
|
3
3
|
import { applyPatch, PatchError, JSONOps, deepClone } from '@valbuild/core/patch';
|
|
4
4
|
import { pipe, result } from '@valbuild/core/fp';
|
|
5
5
|
import { derefPatch, Internal, extractValModules, DEFAULT_CONTENT_HOST } from '@valbuild/core';
|
|
@@ -9,8 +9,8 @@ import path from 'path';
|
|
|
9
9
|
import fs from 'fs';
|
|
10
10
|
import vm from 'node:vm';
|
|
11
11
|
import { Module } from 'node:module';
|
|
12
|
-
import { r as resolveExistingJsonPath, f as findNestedJsonValuesRecords, v as validateJsonValuesEntries, g as getNewJsonEntryPaths, a as formatPatchSourceError, V as VAL_CLIENT_HEADERS } from './ValRouterCore-
|
|
13
|
-
export { I as InMemoryPatchStore, e as ValOpsMemory, b as askOncePerHost, a as formatPatchSourceError, d as getFileExt, c as getSettings, u as uploadRemoteFile } from './ValRouterCore-
|
|
12
|
+
import { r as resolveExistingJsonPath, f as findNestedJsonValuesRecords, v as validateJsonValuesEntries, g as getNewJsonEntryPaths, a as formatPatchSourceError, V as VAL_CLIENT_HEADERS } from './ValRouterCore-fe985e4c.esm.js';
|
|
13
|
+
export { I as InMemoryPatchStore, e as ValOpsMemory, b as askOncePerHost, a as formatPatchSourceError, d as getFileExt, c as getSettings, u as uploadRemoteFile } from './ValRouterCore-fe985e4c.esm.js';
|
|
14
14
|
import { isJsonValuesRootOp, rebaseContentOp, classifyJsonValuesOp, richTextImageSchema } from '@valbuild/shared/internal';
|
|
15
15
|
export { classifyJsonValuesOp, rebaseContentOp } from '@valbuild/shared/internal';
|
|
16
16
|
import { transform } from 'sucrase';
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var inTabFetch = require('../../../dist/inTabFetch-
|
|
5
|
+
var inTabFetch = require('../../../dist/inTabFetch-c8966e73.cjs.dev.js');
|
|
6
6
|
var draftReads = require('../../../dist/draftReads-df44e629.cjs.dev.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
|
-
require('../../../dist/ValRouterCore-
|
|
8
|
+
require('../../../dist/ValRouterCore-0c088c9e.cjs.dev.js');
|
|
9
9
|
require('zod');
|
|
10
10
|
require('@valbuild/shared/internal');
|
|
11
11
|
require('zod-validation-error');
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var inTabFetch = require('../../../dist/inTabFetch-
|
|
5
|
+
var inTabFetch = require('../../../dist/inTabFetch-f6694ad2.cjs.prod.js');
|
|
6
6
|
var draftReads = require('../../../dist/draftReads-0dcddf72.cjs.prod.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
|
-
require('../../../dist/ValRouterCore-
|
|
8
|
+
require('../../../dist/ValRouterCore-4be8eaf1.cjs.prod.js');
|
|
9
9
|
require('zod');
|
|
10
10
|
require('@valbuild/shared/internal');
|
|
11
11
|
require('zod-validation-error');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as createInTabVal } from '../../../dist/inTabFetch-
|
|
1
|
+
export { a as createInTabVal } from '../../../dist/inTabFetch-877e7d11.esm.js';
|
|
2
2
|
export { s as serverDraftSource } from '../../../dist/draftReads-1f29aedd.esm.js';
|
|
3
3
|
import '@valbuild/core';
|
|
4
|
-
import '../../../dist/ValRouterCore-
|
|
4
|
+
import '../../../dist/ValRouterCore-fe985e4c.esm.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '@valbuild/shared/internal';
|
|
7
7
|
import 'zod-validation-error';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ValRouter = require('../../dist/ValRouter-
|
|
5
|
+
var ValRouter = require('../../dist/ValRouter-1f427c38.cjs.dev.js');
|
|
6
6
|
var draftReads = require('../../dist/draftReads-df44e629.cjs.dev.js');
|
|
7
|
-
var ValRouterCore = require('../../dist/ValRouterCore-
|
|
7
|
+
var ValRouterCore = require('../../dist/ValRouterCore-0c088c9e.cjs.dev.js');
|
|
8
8
|
require('@valbuild/core');
|
|
9
9
|
require('@valbuild/ui/server');
|
|
10
10
|
require('path');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ValRouter = require('../../dist/ValRouter-
|
|
5
|
+
var ValRouter = require('../../dist/ValRouter-cd6e854a.cjs.prod.js');
|
|
6
6
|
var draftReads = require('../../dist/draftReads-0dcddf72.cjs.prod.js');
|
|
7
|
-
var ValRouterCore = require('../../dist/ValRouterCore-
|
|
7
|
+
var ValRouterCore = require('../../dist/ValRouterCore-4be8eaf1.cjs.prod.js');
|
|
8
8
|
require('@valbuild/core');
|
|
9
9
|
require('@valbuild/ui/server');
|
|
10
10
|
require('path');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { a3 as createValRuntime, a4 as proposalAsBuilt, a5 as servingBuildOf, a6 as stagedAfterBuild, a7 as valRuntime } from '../../dist/ValRouter-
|
|
1
|
+
export { a3 as createValRuntime, a4 as proposalAsBuilt, a5 as servingBuildOf, a6 as stagedAfterBuild, a7 as valRuntime } from '../../dist/ValRouter-558dc66d.esm.js';
|
|
2
2
|
export { d as draftForRequest, r as readDraftChanges, s as serverDraftSource } from '../../dist/draftReads-1f29aedd.esm.js';
|
|
3
|
-
export { W as HEAD_BUDGET_BYTES, X as HEAD_VERSIONS_PER_MODULE, T as ValHead, U as headWork } from '../../dist/ValRouterCore-
|
|
3
|
+
export { W as HEAD_BUDGET_BYTES, X as HEAD_VERSIONS_PER_MODULE, T as ValHead, U as headWork } from '../../dist/ValRouterCore-fe985e4c.esm.js';
|
|
4
4
|
import '@valbuild/core';
|
|
5
5
|
import '@valbuild/ui/server';
|
|
6
6
|
import 'path';
|
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"exports": true
|
|
39
39
|
},
|
|
40
|
-
"version": "0.
|
|
40
|
+
"version": "0.154.0",
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@prettier/sync": "^0.6.1",
|
|
43
43
|
"@types/jest": "^30.0.0",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"typescript": "^6.0.3",
|
|
52
52
|
"zod": "^4.6.6",
|
|
53
53
|
"zod-validation-error": "^5.0.0",
|
|
54
|
-
"@valbuild/shared": "0.153.6",
|
|
55
54
|
"@valbuild/core": "0.153.5",
|
|
56
|
-
"@valbuild/ui": "0.
|
|
55
|
+
"@valbuild/ui": "0.154.0",
|
|
56
|
+
"@valbuild/shared": "0.154.0"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": "^20.19.0 || >=22"
|