@valbuild/shared 0.136.2 → 0.136.8

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,22 @@
1
1
  # @valbuild/shared
2
2
 
3
+ ## 0.136.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`35577be`](https://github.com/valbuild/val/commit/35577be50981fec35fc27ee9435a092a26909395)]:
8
+ - @valbuild/core@0.136.8
9
+
10
+ ## 0.136.3
11
+
12
+ ### Patch Changes
13
+
14
+ - [#726](https://github.com/valbuild/val/pull/726) [`3b19534`](https://github.com/valbuild/val/commit/3b19534bb7aa16452a104906d9594083c3bc3e89) Thanks [@freekh](https://github.com/freekh)! - A Studio publish of a project with no repository now ships every edit that was saved, and keeps the site styled.
15
+
16
+ - A host that embeds the project's source can hand it to Val as `projectSource` (`initValServer(..., { http: { projectSource } })`). A publish then patches that text, not text fetched from the content service at a commit, which a project with no repository does not have. The build platform's wiring passes the build's own source, so `.val.ts` can be rendered for a project made on `/new`. Before, its first save produced no files, and the build that followed carried none of the save's edits.
17
+ - New route `GET /api/val/built-source`: the `.val.ts` text of every module changed since the running build, with every commit since it applied. The Studio builds from it, so an edit whose own publish failed, and a Finish publishing, are no longer left out of the next build.
18
+ - A Studio build that compiles no stylesheet (a browser cannot run Tailwind `@plugin`s) keeps the live site's. A Studio save never changes a stylesheet or a component, so the live CSS is still the right one.
19
+
3
20
  ## 0.136.2
4
21
 
5
22
  ### Patch Changes
@@ -1022,6 +1022,51 @@ export declare const Api: {
1022
1022
  }, z.core.$strip>]>;
1023
1023
  };
1024
1024
  };
1025
+ /**
1026
+ * The `.val.ts` text of every module that changed since the RUNNING build,
1027
+ * with every commit since it applied, for a build made in the browser.
1028
+ *
1029
+ * A Studio build starts from the source stored with the live build. A commit
1030
+ * whose own publish failed -- or the first commit of a project that started
1031
+ * as a copy of a template -- is in content and in no stored source, so a build
1032
+ * that added only its own save's files shipped without it. Only this server
1033
+ * can render those commits back into text: content keeps a managed project's
1034
+ * content as Source, not as files.
1035
+ *
1036
+ * Committed patches only. A pending one is somebody's unpublished work, and
1037
+ * is not this build's to ship. 409 where there is nothing to answer with: a
1038
+ * project with a repository, or a build that did not embed its source.
1039
+ */
1040
+ "/built-source": {
1041
+ GET: {
1042
+ req: {
1043
+ cookies: {
1044
+ val_session: z.ZodOptional<z.ZodString>;
1045
+ };
1046
+ };
1047
+ res: z.ZodUnion<readonly [z.ZodObject<{
1048
+ status: z.ZodLiteral<401>;
1049
+ json: z.ZodObject<{
1050
+ message: z.ZodString;
1051
+ }, z.core.$strip>;
1052
+ }, z.core.$strip>, z.ZodObject<{
1053
+ status: z.ZodLiteral<409>;
1054
+ json: z.ZodObject<{
1055
+ message: z.ZodString;
1056
+ }, z.core.$strip>;
1057
+ }, z.core.$strip>, z.ZodObject<{
1058
+ status: z.ZodLiteral<500>;
1059
+ json: z.ZodObject<{
1060
+ message: z.ZodString;
1061
+ }, z.core.$strip>;
1062
+ }, z.core.$strip>, z.ZodObject<{
1063
+ status: z.ZodLiteral<200>;
1064
+ json: z.ZodObject<{
1065
+ files: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
1066
+ }, z.core.$strip>;
1067
+ }, z.core.$strip>]>;
1068
+ };
1069
+ };
1025
1070
  "/profiles": {
1026
1071
  GET: {
1027
1072
  req: {
@@ -2506,6 +2506,43 @@ var Api = {
2506
2506
  })])
2507
2507
  }
2508
2508
  },
2509
+ /**
2510
+ * The `.val.ts` text of every module that changed since the RUNNING build,
2511
+ * with every commit since it applied, for a build made in the browser.
2512
+ *
2513
+ * A Studio build starts from the source stored with the live build. A commit
2514
+ * whose own publish failed -- or the first commit of a project that started
2515
+ * as a copy of a template -- is in content and in no stored source, so a build
2516
+ * that added only its own save's files shipped without it. Only this server
2517
+ * can render those commits back into text: content keeps a managed project's
2518
+ * content as Source, not as files.
2519
+ *
2520
+ * Committed patches only. A pending one is somebody's unpublished work, and
2521
+ * is not this build's to ship. 409 where there is nothing to answer with: a
2522
+ * project with a repository, or a build that did not embed its source.
2523
+ */
2524
+ "/built-source": {
2525
+ GET: {
2526
+ req: {
2527
+ cookies: {
2528
+ val_session: zod.z.string().optional()
2529
+ }
2530
+ },
2531
+ res: zod.z.union([unauthorizedResponse, zod.z.object({
2532
+ status: zod.z.literal(409),
2533
+ json: GenericError
2534
+ }), zod.z.object({
2535
+ status: zod.z.literal(500),
2536
+ json: GenericError
2537
+ }), zod.z.object({
2538
+ status: zod.z.literal(200),
2539
+ json: zod.z.object({
2540
+ /** By path, as `/save`'s `sourceFiles`. `null` is a deleted file. */
2541
+ files: zod.z.record(zod.z.string(), zod.z.string().nullable())
2542
+ })
2543
+ })])
2544
+ }
2545
+ },
2509
2546
  "/profiles": {
2510
2547
  GET: {
2511
2548
  req: {
@@ -2506,6 +2506,43 @@ var Api = {
2506
2506
  })])
2507
2507
  }
2508
2508
  },
2509
+ /**
2510
+ * The `.val.ts` text of every module that changed since the RUNNING build,
2511
+ * with every commit since it applied, for a build made in the browser.
2512
+ *
2513
+ * A Studio build starts from the source stored with the live build. A commit
2514
+ * whose own publish failed -- or the first commit of a project that started
2515
+ * as a copy of a template -- is in content and in no stored source, so a build
2516
+ * that added only its own save's files shipped without it. Only this server
2517
+ * can render those commits back into text: content keeps a managed project's
2518
+ * content as Source, not as files.
2519
+ *
2520
+ * Committed patches only. A pending one is somebody's unpublished work, and
2521
+ * is not this build's to ship. 409 where there is nothing to answer with: a
2522
+ * project with a repository, or a build that did not embed its source.
2523
+ */
2524
+ "/built-source": {
2525
+ GET: {
2526
+ req: {
2527
+ cookies: {
2528
+ val_session: zod.z.string().optional()
2529
+ }
2530
+ },
2531
+ res: zod.z.union([unauthorizedResponse, zod.z.object({
2532
+ status: zod.z.literal(409),
2533
+ json: GenericError
2534
+ }), zod.z.object({
2535
+ status: zod.z.literal(500),
2536
+ json: GenericError
2537
+ }), zod.z.object({
2538
+ status: zod.z.literal(200),
2539
+ json: zod.z.object({
2540
+ /** By path, as `/save`'s `sourceFiles`. `null` is a deleted file. */
2541
+ files: zod.z.record(zod.z.string(), zod.z.string().nullable())
2542
+ })
2543
+ })])
2544
+ }
2545
+ },
2509
2546
  "/profiles": {
2510
2547
  GET: {
2511
2548
  req: {
@@ -2499,6 +2499,43 @@ var Api = {
2499
2499
  })])
2500
2500
  }
2501
2501
  },
2502
+ /**
2503
+ * The `.val.ts` text of every module that changed since the RUNNING build,
2504
+ * with every commit since it applied, for a build made in the browser.
2505
+ *
2506
+ * A Studio build starts from the source stored with the live build. A commit
2507
+ * whose own publish failed -- or the first commit of a project that started
2508
+ * as a copy of a template -- is in content and in no stored source, so a build
2509
+ * that added only its own save's files shipped without it. Only this server
2510
+ * can render those commits back into text: content keeps a managed project's
2511
+ * content as Source, not as files.
2512
+ *
2513
+ * Committed patches only. A pending one is somebody's unpublished work, and
2514
+ * is not this build's to ship. 409 where there is nothing to answer with: a
2515
+ * project with a repository, or a build that did not embed its source.
2516
+ */
2517
+ "/built-source": {
2518
+ GET: {
2519
+ req: {
2520
+ cookies: {
2521
+ val_session: z.string().optional()
2522
+ }
2523
+ },
2524
+ res: z.union([unauthorizedResponse, z.object({
2525
+ status: z.literal(409),
2526
+ json: GenericError
2527
+ }), z.object({
2528
+ status: z.literal(500),
2529
+ json: GenericError
2530
+ }), z.object({
2531
+ status: z.literal(200),
2532
+ json: z.object({
2533
+ /** By path, as `/save`'s `sourceFiles`. `null` is a deleted file. */
2534
+ files: z.record(z.string(), z.string().nullable())
2535
+ })
2536
+ })])
2537
+ }
2538
+ },
2502
2539
  "/profiles": {
2503
2540
  GET: {
2504
2541
  req: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/shared",
3
- "version": "0.136.2",
3
+ "version": "0.136.8",
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.136.1"
40
+ "@valbuild/core": "0.136.8"
41
41
  },
42
42
  "files": [
43
43
  "CHANGELOG.md",