@valbuild/server 0.144.4 → 0.144.5
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,19 @@
|
|
|
1
1
|
# @valbuild/server
|
|
2
2
|
|
|
3
|
+
## 0.144.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#839](https://github.com/valbuild/val/pull/839) [`39e8db3`](https://github.com/valbuild/val/commit/39e8db34cf56c6c43ffff0d3acfe8e0839fa55a9) Thanks [@freekh](https://github.com/freekh)! - A publish that breaks a page no longer stops everyone else publishing. On val.build, the changes it had are held back: the Publish button says how many, and publishes go without them until someone presses Try again or Discard on the failed publish.
|
|
8
|
+
|
|
9
|
+
Publish can be pressed while this tab is still building the last publish. The new publish waits its turn and is built when the current one ends.
|
|
10
|
+
|
|
11
|
+
Discarding a change that is being published now says so, instead of failing silently. From there you can cancel the publish, which then discards the change, or wait for the publish to end.
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`39e8db3`](https://github.com/valbuild/val/commit/39e8db34cf56c6c43ffff0d3acfe8e0839fa55a9)]:
|
|
14
|
+
- @valbuild/ui@0.144.5
|
|
15
|
+
- @valbuild/shared@0.144.5
|
|
16
|
+
|
|
3
17
|
## 0.144.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1029,6 +1029,13 @@ export type OrderedPatches = {
|
|
|
1029
1029
|
* service. Only `ValOpsHttp` fills it.
|
|
1030
1030
|
*/
|
|
1031
1031
|
publishingPatches?: PatchId[];
|
|
1032
|
+
/**
|
|
1033
|
+
* Of these patches, the ones a publish that failed on its content holds back
|
|
1034
|
+
* from later publishes, until Try again or Discard: they are pending, and
|
|
1035
|
+
* not ready to publish. Absent where publishing is not done in jobs, and
|
|
1036
|
+
* from an older content service. Only `ValOpsHttp` fills it.
|
|
1037
|
+
*/
|
|
1038
|
+
heldBackPatches?: PatchId[];
|
|
1032
1039
|
error?: GenericErrorMessage;
|
|
1033
1040
|
errors?: PatchReadError[];
|
|
1034
1041
|
unauthorized?: boolean;
|
|
@@ -1048,6 +1055,8 @@ export type OrderedPatchesMetadata = {
|
|
|
1048
1055
|
patchGroups?: OrderedPatches["patchGroups"];
|
|
1049
1056
|
/** See {@link OrderedPatches.publishingPatches}. */
|
|
1050
1057
|
publishingPatches?: OrderedPatches["publishingPatches"];
|
|
1058
|
+
/** See {@link OrderedPatches.heldBackPatches}. */
|
|
1059
|
+
heldBackPatches?: OrderedPatches["heldBackPatches"];
|
|
1051
1060
|
error?: GenericErrorMessage;
|
|
1052
1061
|
errors?: OrderedPatches["errors"];
|
|
1053
1062
|
unauthorized?: boolean;
|
|
@@ -373,6 +373,8 @@ export declare class ValOpsHttp extends ValOps {
|
|
|
373
373
|
appliedPatches: PatchId[];
|
|
374
374
|
/** Of `patches`, the ones a running publish holds. See {@link OrderedPatches.publishingPatches}. */
|
|
375
375
|
publishingPatches?: PatchId[];
|
|
376
|
+
/** Of `patches`, the ones a failed publish holds back. See {@link OrderedPatches.heldBackPatches}. */
|
|
377
|
+
heldBackPatches?: PatchId[];
|
|
376
378
|
/** The head of the chain. See {@link OrderedPatchesMetadata.headPatchId}. */
|
|
377
379
|
headPatchId?: PatchId | null;
|
|
378
380
|
/** The chain version of that head. See {@link OrderedPatchesMetadata.headVersion}. */
|
|
@@ -9413,6 +9413,8 @@ const GetApplicablePatches = z.z.object({
|
|
|
9413
9413
|
headVersion: z.z.number().optional(),
|
|
9414
9414
|
/** Of `patches`, the ones a running publish holds. See `OrderedPatches.publishingPatches`. */
|
|
9415
9415
|
publishingPatches: z.z.array(internal.PatchId).optional(),
|
|
9416
|
+
/** Of `patches`, the ones a failed publish holds back. See `OrderedPatches.heldBackPatches`. */
|
|
9417
|
+
heldBackPatches: z.z.array(internal.PatchId).optional(),
|
|
9416
9418
|
commits: z.z.array(z.z.object({
|
|
9417
9419
|
commitSha: z.z.string(),
|
|
9418
9420
|
/*
|
|
@@ -9505,7 +9507,9 @@ const DeletePatchesResponse = z.z.object({
|
|
|
9505
9507
|
deleted: z.z.array(PatchId),
|
|
9506
9508
|
errors: z.z.array(z.z.object({
|
|
9507
9509
|
message: z.z.string(),
|
|
9508
|
-
patchId: PatchId
|
|
9510
|
+
patchId: PatchId,
|
|
9511
|
+
/** The publish job holding it, when that is why it was not deleted. */
|
|
9512
|
+
publishJobId: z.z.string().optional()
|
|
9509
9513
|
})).optional(),
|
|
9510
9514
|
/**
|
|
9511
9515
|
* The chain version each branch the delete changed is now at, keyed by
|
|
@@ -10445,6 +10449,10 @@ class ValOpsHttp extends ValOps {
|
|
|
10445
10449
|
...(allPatchData.publishingPatches !== undefined ? {
|
|
10446
10450
|
publishingPatches: allPatchData.publishingPatches
|
|
10447
10451
|
} : {}),
|
|
10452
|
+
// Absent from a content service that does not say, as above.
|
|
10453
|
+
...(allPatchData.heldBackPatches !== undefined ? {
|
|
10454
|
+
heldBackPatches: allPatchData.heldBackPatches
|
|
10455
|
+
} : {}),
|
|
10448
10456
|
/*
|
|
10449
10457
|
* The CHAIN head, not the publish head below. Spread: absent is a content
|
|
10450
10458
|
* service that does not report it, which is not the same as `null`.
|
|
@@ -10877,6 +10885,9 @@ class ValOpsHttp extends ValOps {
|
|
|
10877
10885
|
} : {}),
|
|
10878
10886
|
...(data.publishingPatches !== undefined ? {
|
|
10879
10887
|
publishingPatches: data.publishingPatches
|
|
10888
|
+
} : {}),
|
|
10889
|
+
...(data.heldBackPatches !== undefined ? {
|
|
10890
|
+
heldBackPatches: data.heldBackPatches
|
|
10880
10891
|
} : {})
|
|
10881
10892
|
};
|
|
10882
10893
|
}
|
|
@@ -15717,7 +15728,14 @@ const ValServer = (valModules, options, callbacks) => {
|
|
|
15717
15728
|
message: "Failed to delete patches",
|
|
15718
15729
|
errors: Object.entries(deleteRes.errors).map(([id, error]) => ({
|
|
15719
15730
|
patchId: id,
|
|
15720
|
-
...error
|
|
15731
|
+
...error,
|
|
15732
|
+
/*
|
|
15733
|
+
* Kept, so the Studio can say the change is being published
|
|
15734
|
+
* and offer to cancel that publish: content names the job.
|
|
15735
|
+
*/
|
|
15736
|
+
...("publishJobId" in error && typeof error.publishJobId === "string" ? {
|
|
15737
|
+
publishJobId: error.publishJobId
|
|
15738
|
+
} : {})
|
|
15721
15739
|
}))
|
|
15722
15740
|
}
|
|
15723
15741
|
};
|
|
@@ -19005,8 +19023,18 @@ function createValApiRouter(route, valServerPromise, convert) {
|
|
|
19005
19023
|
}
|
|
19006
19024
|
};
|
|
19007
19025
|
}
|
|
19026
|
+
const resDef = apiEndpoint.res;
|
|
19008
19027
|
if (res.status === 500) {
|
|
19009
19028
|
var _res$json;
|
|
19029
|
+
/*
|
|
19030
|
+
* A failure the route declares goes out as declared, as a success
|
|
19031
|
+
* does below. DELETE /patches says which change was not discarded and
|
|
19032
|
+
* which publish holds it, and collapsed to its message the Studio
|
|
19033
|
+
* could only say "Failed to delete patches" -- not why, nor offer to
|
|
19034
|
+
* cancel that publish. Anything undeclared is still reduced to its
|
|
19035
|
+
* message.
|
|
19036
|
+
*/
|
|
19037
|
+
if (resDef !== null && resDef !== void 0 && resDef.safeParse(res).success) return res;
|
|
19010
19038
|
return {
|
|
19011
19039
|
status: 500,
|
|
19012
19040
|
json: {
|
|
@@ -19014,7 +19042,6 @@ function createValApiRouter(route, valServerPromise, convert) {
|
|
|
19014
19042
|
}
|
|
19015
19043
|
};
|
|
19016
19044
|
}
|
|
19017
|
-
const resDef = apiEndpoint.res;
|
|
19018
19045
|
if (resDef) {
|
|
19019
19046
|
const responseResult = resDef.safeParse(res);
|
|
19020
19047
|
if (!responseResult.success) {
|
|
@@ -9413,6 +9413,8 @@ const GetApplicablePatches = z.z.object({
|
|
|
9413
9413
|
headVersion: z.z.number().optional(),
|
|
9414
9414
|
/** Of `patches`, the ones a running publish holds. See `OrderedPatches.publishingPatches`. */
|
|
9415
9415
|
publishingPatches: z.z.array(internal.PatchId).optional(),
|
|
9416
|
+
/** Of `patches`, the ones a failed publish holds back. See `OrderedPatches.heldBackPatches`. */
|
|
9417
|
+
heldBackPatches: z.z.array(internal.PatchId).optional(),
|
|
9416
9418
|
commits: z.z.array(z.z.object({
|
|
9417
9419
|
commitSha: z.z.string(),
|
|
9418
9420
|
/*
|
|
@@ -9505,7 +9507,9 @@ const DeletePatchesResponse = z.z.object({
|
|
|
9505
9507
|
deleted: z.z.array(PatchId),
|
|
9506
9508
|
errors: z.z.array(z.z.object({
|
|
9507
9509
|
message: z.z.string(),
|
|
9508
|
-
patchId: PatchId
|
|
9510
|
+
patchId: PatchId,
|
|
9511
|
+
/** The publish job holding it, when that is why it was not deleted. */
|
|
9512
|
+
publishJobId: z.z.string().optional()
|
|
9509
9513
|
})).optional(),
|
|
9510
9514
|
/**
|
|
9511
9515
|
* The chain version each branch the delete changed is now at, keyed by
|
|
@@ -10445,6 +10449,10 @@ class ValOpsHttp extends ValOps {
|
|
|
10445
10449
|
...(allPatchData.publishingPatches !== undefined ? {
|
|
10446
10450
|
publishingPatches: allPatchData.publishingPatches
|
|
10447
10451
|
} : {}),
|
|
10452
|
+
// Absent from a content service that does not say, as above.
|
|
10453
|
+
...(allPatchData.heldBackPatches !== undefined ? {
|
|
10454
|
+
heldBackPatches: allPatchData.heldBackPatches
|
|
10455
|
+
} : {}),
|
|
10448
10456
|
/*
|
|
10449
10457
|
* The CHAIN head, not the publish head below. Spread: absent is a content
|
|
10450
10458
|
* service that does not report it, which is not the same as `null`.
|
|
@@ -10877,6 +10885,9 @@ class ValOpsHttp extends ValOps {
|
|
|
10877
10885
|
} : {}),
|
|
10878
10886
|
...(data.publishingPatches !== undefined ? {
|
|
10879
10887
|
publishingPatches: data.publishingPatches
|
|
10888
|
+
} : {}),
|
|
10889
|
+
...(data.heldBackPatches !== undefined ? {
|
|
10890
|
+
heldBackPatches: data.heldBackPatches
|
|
10880
10891
|
} : {})
|
|
10881
10892
|
};
|
|
10882
10893
|
}
|
|
@@ -15717,7 +15728,14 @@ const ValServer = (valModules, options, callbacks) => {
|
|
|
15717
15728
|
message: "Failed to delete patches",
|
|
15718
15729
|
errors: Object.entries(deleteRes.errors).map(([id, error]) => ({
|
|
15719
15730
|
patchId: id,
|
|
15720
|
-
...error
|
|
15731
|
+
...error,
|
|
15732
|
+
/*
|
|
15733
|
+
* Kept, so the Studio can say the change is being published
|
|
15734
|
+
* and offer to cancel that publish: content names the job.
|
|
15735
|
+
*/
|
|
15736
|
+
...("publishJobId" in error && typeof error.publishJobId === "string" ? {
|
|
15737
|
+
publishJobId: error.publishJobId
|
|
15738
|
+
} : {})
|
|
15721
15739
|
}))
|
|
15722
15740
|
}
|
|
15723
15741
|
};
|
|
@@ -19005,8 +19023,18 @@ function createValApiRouter(route, valServerPromise, convert) {
|
|
|
19005
19023
|
}
|
|
19006
19024
|
};
|
|
19007
19025
|
}
|
|
19026
|
+
const resDef = apiEndpoint.res;
|
|
19008
19027
|
if (res.status === 500) {
|
|
19009
19028
|
var _res$json;
|
|
19029
|
+
/*
|
|
19030
|
+
* A failure the route declares goes out as declared, as a success
|
|
19031
|
+
* does below. DELETE /patches says which change was not discarded and
|
|
19032
|
+
* which publish holds it, and collapsed to its message the Studio
|
|
19033
|
+
* could only say "Failed to delete patches" -- not why, nor offer to
|
|
19034
|
+
* cancel that publish. Anything undeclared is still reduced to its
|
|
19035
|
+
* message.
|
|
19036
|
+
*/
|
|
19037
|
+
if (resDef !== null && resDef !== void 0 && resDef.safeParse(res).success) return res;
|
|
19010
19038
|
return {
|
|
19011
19039
|
status: 500,
|
|
19012
19040
|
json: {
|
|
@@ -19014,7 +19042,6 @@ function createValApiRouter(route, valServerPromise, convert) {
|
|
|
19014
19042
|
}
|
|
19015
19043
|
};
|
|
19016
19044
|
}
|
|
19017
|
-
const resDef = apiEndpoint.res;
|
|
19018
19045
|
if (resDef) {
|
|
19019
19046
|
const responseResult = resDef.safeParse(res);
|
|
19020
19047
|
if (!responseResult.success) {
|
|
@@ -9376,6 +9376,8 @@ const GetApplicablePatches = z.object({
|
|
|
9376
9376
|
headVersion: z.number().optional(),
|
|
9377
9377
|
/** Of `patches`, the ones a running publish holds. See `OrderedPatches.publishingPatches`. */
|
|
9378
9378
|
publishingPatches: z.array(PatchId$1).optional(),
|
|
9379
|
+
/** Of `patches`, the ones a failed publish holds back. See `OrderedPatches.heldBackPatches`. */
|
|
9380
|
+
heldBackPatches: z.array(PatchId$1).optional(),
|
|
9379
9381
|
commits: z.array(z.object({
|
|
9380
9382
|
commitSha: z.string(),
|
|
9381
9383
|
/*
|
|
@@ -9468,7 +9470,9 @@ const DeletePatchesResponse = z.object({
|
|
|
9468
9470
|
deleted: z.array(PatchId),
|
|
9469
9471
|
errors: z.array(z.object({
|
|
9470
9472
|
message: z.string(),
|
|
9471
|
-
patchId: PatchId
|
|
9473
|
+
patchId: PatchId,
|
|
9474
|
+
/** The publish job holding it, when that is why it was not deleted. */
|
|
9475
|
+
publishJobId: z.string().optional()
|
|
9472
9476
|
})).optional(),
|
|
9473
9477
|
/**
|
|
9474
9478
|
* The chain version each branch the delete changed is now at, keyed by
|
|
@@ -10408,6 +10412,10 @@ class ValOpsHttp extends ValOps {
|
|
|
10408
10412
|
...(allPatchData.publishingPatches !== undefined ? {
|
|
10409
10413
|
publishingPatches: allPatchData.publishingPatches
|
|
10410
10414
|
} : {}),
|
|
10415
|
+
// Absent from a content service that does not say, as above.
|
|
10416
|
+
...(allPatchData.heldBackPatches !== undefined ? {
|
|
10417
|
+
heldBackPatches: allPatchData.heldBackPatches
|
|
10418
|
+
} : {}),
|
|
10411
10419
|
/*
|
|
10412
10420
|
* The CHAIN head, not the publish head below. Spread: absent is a content
|
|
10413
10421
|
* service that does not report it, which is not the same as `null`.
|
|
@@ -10840,6 +10848,9 @@ class ValOpsHttp extends ValOps {
|
|
|
10840
10848
|
} : {}),
|
|
10841
10849
|
...(data.publishingPatches !== undefined ? {
|
|
10842
10850
|
publishingPatches: data.publishingPatches
|
|
10851
|
+
} : {}),
|
|
10852
|
+
...(data.heldBackPatches !== undefined ? {
|
|
10853
|
+
heldBackPatches: data.heldBackPatches
|
|
10843
10854
|
} : {})
|
|
10844
10855
|
};
|
|
10845
10856
|
}
|
|
@@ -15680,7 +15691,14 @@ const ValServer = (valModules, options, callbacks) => {
|
|
|
15680
15691
|
message: "Failed to delete patches",
|
|
15681
15692
|
errors: Object.entries(deleteRes.errors).map(([id, error]) => ({
|
|
15682
15693
|
patchId: id,
|
|
15683
|
-
...error
|
|
15694
|
+
...error,
|
|
15695
|
+
/*
|
|
15696
|
+
* Kept, so the Studio can say the change is being published
|
|
15697
|
+
* and offer to cancel that publish: content names the job.
|
|
15698
|
+
*/
|
|
15699
|
+
...("publishJobId" in error && typeof error.publishJobId === "string" ? {
|
|
15700
|
+
publishJobId: error.publishJobId
|
|
15701
|
+
} : {})
|
|
15684
15702
|
}))
|
|
15685
15703
|
}
|
|
15686
15704
|
};
|
|
@@ -18968,8 +18986,18 @@ function createValApiRouter(route, valServerPromise, convert) {
|
|
|
18968
18986
|
}
|
|
18969
18987
|
};
|
|
18970
18988
|
}
|
|
18989
|
+
const resDef = apiEndpoint.res;
|
|
18971
18990
|
if (res.status === 500) {
|
|
18972
18991
|
var _res$json;
|
|
18992
|
+
/*
|
|
18993
|
+
* A failure the route declares goes out as declared, as a success
|
|
18994
|
+
* does below. DELETE /patches says which change was not discarded and
|
|
18995
|
+
* which publish holds it, and collapsed to its message the Studio
|
|
18996
|
+
* could only say "Failed to delete patches" -- not why, nor offer to
|
|
18997
|
+
* cancel that publish. Anything undeclared is still reduced to its
|
|
18998
|
+
* message.
|
|
18999
|
+
*/
|
|
19000
|
+
if (resDef !== null && resDef !== void 0 && resDef.safeParse(res).success) return res;
|
|
18973
19001
|
return {
|
|
18974
19002
|
status: 500,
|
|
18975
19003
|
json: {
|
|
@@ -18977,7 +19005,6 @@ function createValApiRouter(route, valServerPromise, convert) {
|
|
|
18977
19005
|
}
|
|
18978
19006
|
};
|
|
18979
19007
|
}
|
|
18980
|
-
const resDef = apiEndpoint.res;
|
|
18981
19008
|
if (resDef) {
|
|
18982
19009
|
const responseResult = resDef.safeParse(res);
|
|
18983
19010
|
if (!responseResult.success) {
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"./package.json": "./package.json"
|
|
17
17
|
},
|
|
18
18
|
"types": "dist/valbuild-server.cjs.d.ts",
|
|
19
|
-
"version": "0.144.
|
|
19
|
+
"version": "0.144.5",
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@prettier/sync": "^0.6.1",
|
|
22
22
|
"@types/jest": "^30.0.0",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"zod": "^4.4.3",
|
|
32
32
|
"zod-validation-error": "^5.0.0",
|
|
33
33
|
"@valbuild/core": "0.144.0",
|
|
34
|
-
"@valbuild/
|
|
35
|
-
"@valbuild/
|
|
34
|
+
"@valbuild/ui": "0.144.5",
|
|
35
|
+
"@valbuild/shared": "0.144.5"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": "^20.19.0 || >=22"
|