@valbuild/shared 0.139.0 → 0.139.1
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 +15 -0
- package/dist/declarations/src/internal/ApiRoutes.d.ts +13 -4
- package/internal/dist/valbuild-shared-internal.cjs.dev.js +34 -6
- package/internal/dist/valbuild-shared-internal.cjs.prod.js +34 -6
- package/internal/dist/valbuild-shared-internal.esm.js +34 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @valbuild/shared
|
|
2
2
|
|
|
3
|
+
## 0.139.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#781](https://github.com/valbuild/val/pull/781) [`5ea70ce`](https://github.com/valbuild/val/commit/5ea70cefde3c74961cfa76b4a5f4c333b850b60a) Thanks [@freekh](https://github.com/freekh)! - Every open Studio now shows the same changes, staged the same way, as a reload would.
|
|
8
|
+
|
|
9
|
+
- Staging or unstaging a change in one browser or tab now shows up in your other open Studios right away, without a reload, and publishing from any of them ships the same set.
|
|
10
|
+
- A change you stage before you have made any edit of your own is saved straight away, instead of being kept in the tab until your first edit and lost if you reloaded first.
|
|
11
|
+
- If staging a change fails, the Studio now goes back to showing what is actually saved, instead of keeping the failed change on screen until a reload.
|
|
12
|
+
|
|
13
|
+
This needs the Val Build content service released alongside this version.
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`db13bed`](https://github.com/valbuild/val/commit/db13bed902f9f9147feb5be07ce47fe8b5b143f9)]:
|
|
16
|
+
- @valbuild/core@0.139.1
|
|
17
|
+
|
|
3
18
|
## 0.139.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -442,6 +442,13 @@ export declare const Api: {
|
|
|
442
442
|
headCommitSha: z.ZodOptional<z.ZodString>;
|
|
443
443
|
headPatchId: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
|
|
444
444
|
headVersion: z.ZodOptional<z.ZodNumber>;
|
|
445
|
+
patchGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
446
|
+
patchGroupId: z.ZodString;
|
|
447
|
+
authorId: z.ZodNullable<z.ZodString>;
|
|
448
|
+
createdAt: z.ZodString;
|
|
449
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
450
|
+
patchIds: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
451
|
+
}, z.core.$strip>>>;
|
|
445
452
|
commits: z.ZodArray<z.ZodObject<{
|
|
446
453
|
commitSha: z.ZodString;
|
|
447
454
|
clientCommitSha: z.ZodNullable<z.ZodString>;
|
|
@@ -863,7 +870,7 @@ export declare const Api: {
|
|
|
863
870
|
PUT: {
|
|
864
871
|
req: {
|
|
865
872
|
body: z.ZodObject<{
|
|
866
|
-
patchGroupId: z.ZodString
|
|
873
|
+
patchGroupId: z.ZodOptional<z.ZodString>;
|
|
867
874
|
patchIds: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
868
875
|
withPatchIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
|
|
869
876
|
}, z.core.$strip>;
|
|
@@ -894,15 +901,16 @@ export declare const Api: {
|
|
|
894
901
|
}, z.core.$strip>, z.ZodObject<{
|
|
895
902
|
status: z.ZodLiteral<200>;
|
|
896
903
|
json: z.ZodObject<{
|
|
897
|
-
patchGroupId: z.ZodString
|
|
904
|
+
patchGroupId: z.ZodNullable<z.ZodString>;
|
|
898
905
|
patchIds: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
906
|
+
headVersion: z.ZodOptional<z.ZodNumber>;
|
|
899
907
|
}, z.core.$strip>;
|
|
900
908
|
}, z.core.$strip>]>;
|
|
901
909
|
};
|
|
902
910
|
DELETE: {
|
|
903
911
|
req: {
|
|
904
912
|
body: z.ZodObject<{
|
|
905
|
-
patchGroupId: z.ZodString
|
|
913
|
+
patchGroupId: z.ZodOptional<z.ZodString>;
|
|
906
914
|
patchIds: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
907
915
|
withPatchIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
|
|
908
916
|
}, z.core.$strip>;
|
|
@@ -933,8 +941,9 @@ export declare const Api: {
|
|
|
933
941
|
}, z.core.$strip>, z.ZodObject<{
|
|
934
942
|
status: z.ZodLiteral<200>;
|
|
935
943
|
json: z.ZodObject<{
|
|
936
|
-
patchGroupId: z.ZodString
|
|
944
|
+
patchGroupId: z.ZodNullable<z.ZodString>;
|
|
937
945
|
patchIds: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
946
|
+
headVersion: z.ZodOptional<z.ZodNumber>;
|
|
938
947
|
}, z.core.$strip>;
|
|
939
948
|
}, z.core.$strip>]>;
|
|
940
949
|
};
|
|
@@ -2028,6 +2028,14 @@ var Api = {
|
|
|
2028
2028
|
* highest version. Optional, for the same reason `headPatchId` is.
|
|
2029
2029
|
*/
|
|
2030
2030
|
headVersion: zod.z.number().optional(),
|
|
2031
|
+
/**
|
|
2032
|
+
* Every group on the branch and which listed patches it holds,
|
|
2033
|
+
* read with the list and `headVersion`. What a Studio's view of
|
|
2034
|
+
* the groups is taken from, so a stage or an unstage made in
|
|
2035
|
+
* another browser reaches it with the next stat. Absent where
|
|
2036
|
+
* the content service has no groups.
|
|
2037
|
+
*/
|
|
2038
|
+
patchGroups: zod.z.array(PatchGroup).optional(),
|
|
2031
2039
|
commits: zod.z.array(ValCommit),
|
|
2032
2040
|
/**
|
|
2033
2041
|
* The publishes the content service knows about.
|
|
@@ -2427,7 +2435,12 @@ var Api = {
|
|
|
2427
2435
|
PUT: {
|
|
2428
2436
|
req: {
|
|
2429
2437
|
body: zod.z.object({
|
|
2430
|
-
|
|
2438
|
+
/**
|
|
2439
|
+
* The group to stage into. Absent means the caller's open group on
|
|
2440
|
+
* the branch, created if there is none — which is what the Studio
|
|
2441
|
+
* sends, so a stage never has to wait for a group to exist.
|
|
2442
|
+
*/
|
|
2443
|
+
patchGroupId: zod.z.string().optional(),
|
|
2431
2444
|
/** What the user asked to stage. */
|
|
2432
2445
|
patchIds: zod.z.array(PatchId),
|
|
2433
2446
|
/*
|
|
@@ -2465,15 +2478,23 @@ var Api = {
|
|
|
2465
2478
|
}), zod.z.object({
|
|
2466
2479
|
status: zod.z.literal(200),
|
|
2467
2480
|
json: zod.z.object({
|
|
2468
|
-
|
|
2469
|
-
|
|
2481
|
+
/** `null` for an unstage when the caller has no open group. */
|
|
2482
|
+
patchGroupId: zod.z.string().nullable(),
|
|
2483
|
+
patchIds: zod.z.array(PatchId),
|
|
2484
|
+
/**
|
|
2485
|
+
* The chain version the change committed at. The client keeps its
|
|
2486
|
+
* own view of the change until a stat at least this new shows it.
|
|
2487
|
+
* Absent from a content service that predates it.
|
|
2488
|
+
*/
|
|
2489
|
+
headVersion: zod.z.number().optional()
|
|
2470
2490
|
})
|
|
2471
2491
|
})])
|
|
2472
2492
|
},
|
|
2473
2493
|
DELETE: {
|
|
2474
2494
|
req: {
|
|
2475
2495
|
body: zod.z.object({
|
|
2476
|
-
|
|
2496
|
+
/** See the PUT. Absent with no open group is a no-op. */
|
|
2497
|
+
patchGroupId: zod.z.string().optional(),
|
|
2477
2498
|
/** What the user asked to unstage. */
|
|
2478
2499
|
patchIds: zod.z.array(PatchId),
|
|
2479
2500
|
/** What has to go with it: everything built on top of it. */
|
|
@@ -2498,8 +2519,15 @@ var Api = {
|
|
|
2498
2519
|
}), zod.z.object({
|
|
2499
2520
|
status: zod.z.literal(200),
|
|
2500
2521
|
json: zod.z.object({
|
|
2501
|
-
|
|
2502
|
-
|
|
2522
|
+
/** `null` for an unstage when the caller has no open group. */
|
|
2523
|
+
patchGroupId: zod.z.string().nullable(),
|
|
2524
|
+
patchIds: zod.z.array(PatchId),
|
|
2525
|
+
/**
|
|
2526
|
+
* The chain version the change committed at. The client keeps its
|
|
2527
|
+
* own view of the change until a stat at least this new shows it.
|
|
2528
|
+
* Absent from a content service that predates it.
|
|
2529
|
+
*/
|
|
2530
|
+
headVersion: zod.z.number().optional()
|
|
2503
2531
|
})
|
|
2504
2532
|
})])
|
|
2505
2533
|
}
|
|
@@ -2028,6 +2028,14 @@ var Api = {
|
|
|
2028
2028
|
* highest version. Optional, for the same reason `headPatchId` is.
|
|
2029
2029
|
*/
|
|
2030
2030
|
headVersion: zod.z.number().optional(),
|
|
2031
|
+
/**
|
|
2032
|
+
* Every group on the branch and which listed patches it holds,
|
|
2033
|
+
* read with the list and `headVersion`. What a Studio's view of
|
|
2034
|
+
* the groups is taken from, so a stage or an unstage made in
|
|
2035
|
+
* another browser reaches it with the next stat. Absent where
|
|
2036
|
+
* the content service has no groups.
|
|
2037
|
+
*/
|
|
2038
|
+
patchGroups: zod.z.array(PatchGroup).optional(),
|
|
2031
2039
|
commits: zod.z.array(ValCommit),
|
|
2032
2040
|
/**
|
|
2033
2041
|
* The publishes the content service knows about.
|
|
@@ -2427,7 +2435,12 @@ var Api = {
|
|
|
2427
2435
|
PUT: {
|
|
2428
2436
|
req: {
|
|
2429
2437
|
body: zod.z.object({
|
|
2430
|
-
|
|
2438
|
+
/**
|
|
2439
|
+
* The group to stage into. Absent means the caller's open group on
|
|
2440
|
+
* the branch, created if there is none — which is what the Studio
|
|
2441
|
+
* sends, so a stage never has to wait for a group to exist.
|
|
2442
|
+
*/
|
|
2443
|
+
patchGroupId: zod.z.string().optional(),
|
|
2431
2444
|
/** What the user asked to stage. */
|
|
2432
2445
|
patchIds: zod.z.array(PatchId),
|
|
2433
2446
|
/*
|
|
@@ -2465,15 +2478,23 @@ var Api = {
|
|
|
2465
2478
|
}), zod.z.object({
|
|
2466
2479
|
status: zod.z.literal(200),
|
|
2467
2480
|
json: zod.z.object({
|
|
2468
|
-
|
|
2469
|
-
|
|
2481
|
+
/** `null` for an unstage when the caller has no open group. */
|
|
2482
|
+
patchGroupId: zod.z.string().nullable(),
|
|
2483
|
+
patchIds: zod.z.array(PatchId),
|
|
2484
|
+
/**
|
|
2485
|
+
* The chain version the change committed at. The client keeps its
|
|
2486
|
+
* own view of the change until a stat at least this new shows it.
|
|
2487
|
+
* Absent from a content service that predates it.
|
|
2488
|
+
*/
|
|
2489
|
+
headVersion: zod.z.number().optional()
|
|
2470
2490
|
})
|
|
2471
2491
|
})])
|
|
2472
2492
|
},
|
|
2473
2493
|
DELETE: {
|
|
2474
2494
|
req: {
|
|
2475
2495
|
body: zod.z.object({
|
|
2476
|
-
|
|
2496
|
+
/** See the PUT. Absent with no open group is a no-op. */
|
|
2497
|
+
patchGroupId: zod.z.string().optional(),
|
|
2477
2498
|
/** What the user asked to unstage. */
|
|
2478
2499
|
patchIds: zod.z.array(PatchId),
|
|
2479
2500
|
/** What has to go with it: everything built on top of it. */
|
|
@@ -2498,8 +2519,15 @@ var Api = {
|
|
|
2498
2519
|
}), zod.z.object({
|
|
2499
2520
|
status: zod.z.literal(200),
|
|
2500
2521
|
json: zod.z.object({
|
|
2501
|
-
|
|
2502
|
-
|
|
2522
|
+
/** `null` for an unstage when the caller has no open group. */
|
|
2523
|
+
patchGroupId: zod.z.string().nullable(),
|
|
2524
|
+
patchIds: zod.z.array(PatchId),
|
|
2525
|
+
/**
|
|
2526
|
+
* The chain version the change committed at. The client keeps its
|
|
2527
|
+
* own view of the change until a stat at least this new shows it.
|
|
2528
|
+
* Absent from a content service that predates it.
|
|
2529
|
+
*/
|
|
2530
|
+
headVersion: zod.z.number().optional()
|
|
2503
2531
|
})
|
|
2504
2532
|
})])
|
|
2505
2533
|
}
|
|
@@ -2021,6 +2021,14 @@ var Api = {
|
|
|
2021
2021
|
* highest version. Optional, for the same reason `headPatchId` is.
|
|
2022
2022
|
*/
|
|
2023
2023
|
headVersion: z.number().optional(),
|
|
2024
|
+
/**
|
|
2025
|
+
* Every group on the branch and which listed patches it holds,
|
|
2026
|
+
* read with the list and `headVersion`. What a Studio's view of
|
|
2027
|
+
* the groups is taken from, so a stage or an unstage made in
|
|
2028
|
+
* another browser reaches it with the next stat. Absent where
|
|
2029
|
+
* the content service has no groups.
|
|
2030
|
+
*/
|
|
2031
|
+
patchGroups: z.array(PatchGroup).optional(),
|
|
2024
2032
|
commits: z.array(ValCommit),
|
|
2025
2033
|
/**
|
|
2026
2034
|
* The publishes the content service knows about.
|
|
@@ -2420,7 +2428,12 @@ var Api = {
|
|
|
2420
2428
|
PUT: {
|
|
2421
2429
|
req: {
|
|
2422
2430
|
body: z.object({
|
|
2423
|
-
|
|
2431
|
+
/**
|
|
2432
|
+
* The group to stage into. Absent means the caller's open group on
|
|
2433
|
+
* the branch, created if there is none — which is what the Studio
|
|
2434
|
+
* sends, so a stage never has to wait for a group to exist.
|
|
2435
|
+
*/
|
|
2436
|
+
patchGroupId: z.string().optional(),
|
|
2424
2437
|
/** What the user asked to stage. */
|
|
2425
2438
|
patchIds: z.array(PatchId),
|
|
2426
2439
|
/*
|
|
@@ -2458,15 +2471,23 @@ var Api = {
|
|
|
2458
2471
|
}), z.object({
|
|
2459
2472
|
status: z.literal(200),
|
|
2460
2473
|
json: z.object({
|
|
2461
|
-
|
|
2462
|
-
|
|
2474
|
+
/** `null` for an unstage when the caller has no open group. */
|
|
2475
|
+
patchGroupId: z.string().nullable(),
|
|
2476
|
+
patchIds: z.array(PatchId),
|
|
2477
|
+
/**
|
|
2478
|
+
* The chain version the change committed at. The client keeps its
|
|
2479
|
+
* own view of the change until a stat at least this new shows it.
|
|
2480
|
+
* Absent from a content service that predates it.
|
|
2481
|
+
*/
|
|
2482
|
+
headVersion: z.number().optional()
|
|
2463
2483
|
})
|
|
2464
2484
|
})])
|
|
2465
2485
|
},
|
|
2466
2486
|
DELETE: {
|
|
2467
2487
|
req: {
|
|
2468
2488
|
body: z.object({
|
|
2469
|
-
|
|
2489
|
+
/** See the PUT. Absent with no open group is a no-op. */
|
|
2490
|
+
patchGroupId: z.string().optional(),
|
|
2470
2491
|
/** What the user asked to unstage. */
|
|
2471
2492
|
patchIds: z.array(PatchId),
|
|
2472
2493
|
/** What has to go with it: everything built on top of it. */
|
|
@@ -2491,8 +2512,15 @@ var Api = {
|
|
|
2491
2512
|
}), z.object({
|
|
2492
2513
|
status: z.literal(200),
|
|
2493
2514
|
json: z.object({
|
|
2494
|
-
|
|
2495
|
-
|
|
2515
|
+
/** `null` for an unstage when the caller has no open group. */
|
|
2516
|
+
patchGroupId: z.string().nullable(),
|
|
2517
|
+
patchIds: z.array(PatchId),
|
|
2518
|
+
/**
|
|
2519
|
+
* The chain version the change committed at. The client keeps its
|
|
2520
|
+
* own view of the change until a stat at least this new shows it.
|
|
2521
|
+
* Absent from a content service that predates it.
|
|
2522
|
+
*/
|
|
2523
|
+
headVersion: z.number().optional()
|
|
2496
2524
|
})
|
|
2497
2525
|
})])
|
|
2498
2526
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valbuild/shared",
|
|
3
|
-
"version": "0.139.
|
|
3
|
+
"version": "0.139.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Val shared types and utilities",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"flexsearch": "^0.8.212",
|
|
38
38
|
"zod": "^4.4.3",
|
|
39
39
|
"zod-validation-error": "^5.0.0",
|
|
40
|
-
"@valbuild/core": "0.139.
|
|
40
|
+
"@valbuild/core": "0.139.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"CHANGELOG.md",
|