@valbuild/shared 0.138.0 → 0.138.4

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,29 @@
1
1
  # @valbuild/shared
2
2
 
3
+ ## 0.138.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#770](https://github.com/valbuild/val/pull/770) [`0a885b1`](https://github.com/valbuild/val/commit/0a885b1f0304517b167b959958464066194732d0) Thanks [@freekh](https://github.com/freekh)! - Publishing a Git-connected app-mode project now puts your changes on the site in seconds, instead of waiting for CI.
8
+
9
+ - The Studio builds the site in the browser, the same way it does for a managed project. Val pushes the commit to your repository as before. When nothing but content has changed since the build the site is serving, the browser's build goes live right away. If a developer has pushed code in between, the site waits for CI's build, so their code is never taken off the site.
10
+ - If the browser cannot build, the publish still goes through and CI delivers it. This happens when the page is not cross-origin isolated, or when the build keeps failing. Your changes stay visible in the Studio until the site serves a build that has them.
11
+ - Content that would break a page is caught before anything is pushed to your repository.
12
+
13
+ - [#771](https://github.com/valbuild/val/pull/771) [`58d13a2`](https://github.com/valbuild/val/commit/58d13a2a534421b341b1bf71d02f0a2290fc0d61) Thanks [@freekh](https://github.com/freekh)! - A project created on val.build with a GitHub repository can publish right away. Before, the first publish was refused with "this deployment was not built from one" until the repository's first CI build had finished.
14
+
15
+ While that first build runs, the site is served the template's build. When you publish from it, Val now checks that its content files are exactly the same as the files in your repository. If they are, the publish goes ahead and is pushed to your repository straight away. Your changes stay visible in the Studio until the site serves CI's build of them. If the files differ, the publish is refused, as before.
16
+
17
+ ## 0.138.2
18
+
19
+ ### Patch Changes
20
+
21
+ - [#763](https://github.com/valbuild/val/pull/763) [`2beb226`](https://github.com/valbuild/val/commit/2beb226446c76eb71026f43e04c13943da4a1e31) Thanks [@freekh](https://github.com/freekh)! - When a publish fails because the Studio could not build the site, the editor is now told why. The tab that built it sends its reason with the failed step, so the message reads, for example, "build failed 3 times: Tailwind's '@plugin' is not supported here…" instead of just "build failed 3 times". This needs the content service that accepts the reason; an older one ignores it and shows the message as before.
22
+
23
+ - [#763](https://github.com/valbuild/val/pull/763) [`443cdcd`](https://github.com/valbuild/val/commit/443cdcdfa8948db22a54adef2ad5e18d9f9868e9) Thanks [@freekh](https://github.com/freekh)! - `val publish` now wires the site at the project's branch, which the content service names, instead of the branch the checkout is on. The site's Val saves its edits to the branch it is wired at, so publishing a managed project from a feature branch made every Studio edit land where no publish looks, and Publish answered "nothing to publish". When the two differ, the CLI says so. With a content service that does not name the branch, the checkout's is used, as before.
24
+ - Updated dependencies [[`cf3bbc8`](https://github.com/valbuild/val/commit/cf3bbc8fc89ff349aac5ab101d0b4f28164583e6)]:
25
+ - @valbuild/core@0.138.2
26
+
3
27
  ## 0.138.0
4
28
 
5
29
  ### Minor Changes
@@ -1134,6 +1134,7 @@ export declare const Api: {
1134
1134
  binaryFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1135
1135
  binaryFilesUnread: z.ZodArray<z.ZodString>;
1136
1136
  branch: z.ZodNullable<z.ZodString>;
1137
+ buildable: z.ZodOptional<z.ZodBoolean>;
1137
1138
  }, z.core.$strip>;
1138
1139
  }, z.core.$strip>]>;
1139
1140
  };
@@ -296,6 +296,20 @@ export type ContentPublishApi = {
296
296
  * branch whose tip is that commit has nothing it has not seen.
297
297
  */
298
298
  gitCommit?: string;
299
+ /**
300
+ * Connected: the tab can build this job (the deployment embeds its
301
+ * source). Without it, content goes on to the seal with no build and
302
+ * CI builds the push -- which is what a server that predates tab
303
+ * builds gets, since it never says so.
304
+ */
305
+ tabBuilds?: true;
306
+ /**
307
+ * Connected, a deployment built from no commit: its Val source files
308
+ * (modules and `val.modules.*`), by path from the project root, as git
309
+ * blob shas. The content service compares them with the branch when
310
+ * there is no commit to compare from.
311
+ */
312
+ deploymentFiles?: Record<string, string>;
299
313
  };
300
314
  res: {
301
315
  job: PublishTabJob | null;
@@ -310,6 +324,17 @@ export type ContentPublishApi = {
310
324
  ok: boolean;
311
325
  /** A finished build step: the id of the publish (`POST /publish`) it declared. */
312
326
  build?: string;
327
+ /**
328
+ * Connected, at `build`, instead of `build`: this tab cannot build
329
+ * (no cross-origin isolation, or a deployment that embeds no source).
330
+ * The job goes on without one, and CI builds the push.
331
+ */
332
+ noBuild?: true;
333
+ /**
334
+ * A failed step: why, in the tab's words. The step is still retried;
335
+ * if it fails for good, this is what the editor is told.
336
+ */
337
+ message?: string;
313
338
  };
314
339
  res: {
315
340
  job: PublishTabJob | null;
@@ -96,6 +96,7 @@ declare const buildTargetResponse: z.ZodObject<{
96
96
  css: z.ZodRecord<z.ZodString, z.ZodString>;
97
97
  workerOnly: z.ZodArray<z.ZodString>;
98
98
  }, z.core.$strip>;
99
+ branch: z.ZodOptional<z.ZodString>;
99
100
  }, z.core.$strip>;
100
101
  export type BuildTargetResponse = z.infer<typeof buildTargetResponse>;
101
102
  /**
@@ -184,6 +185,7 @@ declare const updateTargetResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
184
185
  css: z.ZodRecord<z.ZodString, z.ZodString>;
185
186
  workerOnly: z.ZodArray<z.ZodString>;
186
187
  }, z.core.$strip>;
188
+ branch: z.ZodOptional<z.ZodString>;
187
189
  }, z.core.$strip>>;
188
190
  }, z.core.$strip>, z.ZodObject<{
189
191
  status: z.ZodLiteral<"unavailable">;
@@ -2657,7 +2657,14 @@ var Api = {
2657
2657
  /** Binary files whose bytes could not be read back. */
2658
2658
  binaryFilesUnread: zod.z.array(zod.z.string()),
2659
2659
  /** The branch the job publishes to. */
2660
- branch: zod.z.string().nullable()
2660
+ branch: zod.z.string().nullable(),
2661
+ /**
2662
+ * Can the tab build the job from `sourceFiles`? False for a
2663
+ * connected deployment that embeds no source: the tab reports
2664
+ * "no build", and CI builds the push. Absent from older servers,
2665
+ * which only answered buildable jobs.
2666
+ */
2667
+ buildable: zod.z["boolean"]().optional()
2661
2668
  })
2662
2669
  })])
2663
2670
  }
@@ -7442,7 +7449,12 @@ var buildTargetResponse = zod.z.object({
7442
7449
  modules: zod.z.record(zod.z.string(), zod.z.string()),
7443
7450
  css: zod.z.record(zod.z.string(), zod.z.string()),
7444
7451
  workerOnly: zod.z.array(zod.z.string())
7445
- })
7452
+ }),
7453
+ /**
7454
+ * The project's branch: what a build is wired at, so its Val saves where
7455
+ * publishes commit. Optional, for a content service that predates it.
7456
+ */
7457
+ branch: zod.z.string().optional()
7446
7458
  });
7447
7459
  /**
7448
7460
  * `null` files is a real answer: a project that has never published.
@@ -2657,7 +2657,14 @@ var Api = {
2657
2657
  /** Binary files whose bytes could not be read back. */
2658
2658
  binaryFilesUnread: zod.z.array(zod.z.string()),
2659
2659
  /** The branch the job publishes to. */
2660
- branch: zod.z.string().nullable()
2660
+ branch: zod.z.string().nullable(),
2661
+ /**
2662
+ * Can the tab build the job from `sourceFiles`? False for a
2663
+ * connected deployment that embeds no source: the tab reports
2664
+ * "no build", and CI builds the push. Absent from older servers,
2665
+ * which only answered buildable jobs.
2666
+ */
2667
+ buildable: zod.z["boolean"]().optional()
2661
2668
  })
2662
2669
  })])
2663
2670
  }
@@ -7442,7 +7449,12 @@ var buildTargetResponse = zod.z.object({
7442
7449
  modules: zod.z.record(zod.z.string(), zod.z.string()),
7443
7450
  css: zod.z.record(zod.z.string(), zod.z.string()),
7444
7451
  workerOnly: zod.z.array(zod.z.string())
7445
- })
7452
+ }),
7453
+ /**
7454
+ * The project's branch: what a build is wired at, so its Val saves where
7455
+ * publishes commit. Optional, for a content service that predates it.
7456
+ */
7457
+ branch: zod.z.string().optional()
7446
7458
  });
7447
7459
  /**
7448
7460
  * `null` files is a real answer: a project that has never published.
@@ -2650,7 +2650,14 @@ var Api = {
2650
2650
  /** Binary files whose bytes could not be read back. */
2651
2651
  binaryFilesUnread: z.array(z.string()),
2652
2652
  /** The branch the job publishes to. */
2653
- branch: z.string().nullable()
2653
+ branch: z.string().nullable(),
2654
+ /**
2655
+ * Can the tab build the job from `sourceFiles`? False for a
2656
+ * connected deployment that embeds no source: the tab reports
2657
+ * "no build", and CI builds the push. Absent from older servers,
2658
+ * which only answered buildable jobs.
2659
+ */
2660
+ buildable: z["boolean"]().optional()
2654
2661
  })
2655
2662
  })])
2656
2663
  }
@@ -7435,7 +7442,12 @@ var buildTargetResponse = z.object({
7435
7442
  modules: z.record(z.string(), z.string()),
7436
7443
  css: z.record(z.string(), z.string()),
7437
7444
  workerOnly: z.array(z.string())
7438
- })
7445
+ }),
7446
+ /**
7447
+ * The project's branch: what a build is wired at, so its Val saves where
7448
+ * publishes commit. Optional, for a content service that predates it.
7449
+ */
7450
+ branch: z.string().optional()
7439
7451
  });
7440
7452
  /**
7441
7453
  * `null` files is a real answer: a project that has never published.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/shared",
3
- "version": "0.138.0",
3
+ "version": "0.138.4",
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.138.0"
40
+ "@valbuild/core": "0.138.2"
41
41
  },
42
42
  "files": [
43
43
  "CHANGELOG.md",