@valbuild/core 0.136.1 → 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,15 @@
1
1
  # @valbuild/core
2
2
 
3
+ ## 0.136.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#737](https://github.com/valbuild/val/pull/737) [`35577be`](https://github.com/valbuild/val/commit/35577be50981fec35fc27ee9435a092a26909395) Thanks [@freekh](https://github.com/freekh)! - After a publish, the Studio no longer loses edits or applies a list reorder twice while the new build is rolling out.
8
+
9
+ The Studio shows the content built into the page it loaded, with the unpublished changes on top. Which changes those are comes from the server, and the server lists them relative to its own build. For a while after a publish the two can be different builds: a tab opened before the publish keeps its page, and a managed project's new build reaches each location up to a minute apart. The Studio then applied one build's list of changes to another build's content. Published edits went missing, or were applied a second time, which is invisible for a text replacement but reorders a list again, or removes the wrong item.
10
+
11
+ The server already says which build answered (`sourcesSha`), and the Studio now computes the same fingerprint for the content it holds. When the two differ, it fetches the answering build's content and puts it in place together with that build's list of changes, in one step, so nothing on screen shows a half-updated state. Going back to its own build needs no fetch. When they match, which is almost always, nothing extra is requested.
12
+
3
13
  ## 0.136.1
4
14
 
5
15
  ### Patch Changes
@@ -70,6 +70,21 @@ export type ValModuleShas = {
70
70
  * exactly. That is the property the promotion relies on: only the modules whose
71
71
  * source actually moved change anything.
72
72
  */
73
+ /**
74
+ * The `sourcesSha` fold on its own: path and source, in `val.modules` order.
75
+ *
76
+ * Separate from {@link computeValModuleShas} because the Studio needs it and
77
+ * has nothing else that fold takes. It is how a client tells whether the base
78
+ * it is showing is the base a server's `/stat` answer is relative to: the chain
79
+ * a server announces is the patches ITS build does not contain, so applying it
80
+ * to another build's source loses edits or applies them twice. Both sides call
81
+ * this one implementation, so the comparison is only ever between two runs of
82
+ * the same code.
83
+ */
84
+ export declare function computeSourcesSha(entries: readonly {
85
+ path: string;
86
+ source: unknown;
87
+ }[]): string;
73
88
  export declare function computeValModuleShas(config: ValModules["config"], entries: readonly ValModuleShaEntry[], moduleErrors: readonly ExtractedModuleError[]): ValModuleShas;
74
89
  /**
75
90
  * Extracts schemas and sources from a ValModules registry and computes the
@@ -1,6 +1,6 @@
1
1
  export { initVal, type ConfigDirectory } from "./initVal.js";
2
2
  export { modules, type ValModules } from "./modules.js";
3
- export { extractValModules, computeValModuleShas, type ExtractedValModules, type ValModuleShaEntry, type ValModuleShas, type ExtractedModuleError, } from "./extractValModules.js";
3
+ export { extractValModules, computeValModuleShas, computeSourcesSha, type ExtractedValModules, type ValModuleShaEntry, type ValModuleShas, type ExtractedModuleError, } from "./extractValModules.js";
4
4
  export type { InitVal, ValConfig, ValConstructor, ContentConstructor, } from "./initVal.js";
5
5
  export { Schema, type SerializedSchema, type SelectorOfSchema } from "./schema/index.js";
6
6
  export { hasRemoteFileSchema, hasMediaSchema, } from "./schema/hasRemoteFileSchema.js";
@@ -12611,9 +12611,41 @@ function collectObjectRecursive(item, collector) {
12611
12611
  * exactly. That is the property the promotion relies on: only the modules whose
12612
12612
  * source actually moved change anything.
12613
12613
  */
12614
+ /**
12615
+ * The `sourcesSha` fold on its own: path and source, in `val.modules` order.
12616
+ *
12617
+ * Separate from {@link computeValModuleShas} because the Studio needs it and
12618
+ * has nothing else that fold takes. It is how a client tells whether the base
12619
+ * it is showing is the base a server's `/stat` answer is relative to: the chain
12620
+ * a server announces is the patches ITS build does not contain, so applying it
12621
+ * to another build's source loses edits or applies them twice. Both sides call
12622
+ * this one implementation, so the comparison is only ever between two runs of
12623
+ * the same code.
12624
+ */
12625
+ function computeSourcesSha(entries) {
12626
+ var sourcesSha = "";
12627
+ var _iterator = result._createForOfIteratorHelper(entries),
12628
+ _step;
12629
+ try {
12630
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
12631
+ var _step$value = _step.value,
12632
+ path = _step$value.path,
12633
+ source = _step$value.source;
12634
+ sourcesSha = hash(sourcesSha + JSON.stringify({
12635
+ path: path,
12636
+ source: source
12637
+ }));
12638
+ }
12639
+ } catch (err) {
12640
+ _iterator.e(err);
12641
+ } finally {
12642
+ _iterator.f();
12643
+ }
12644
+ return sourcesSha;
12645
+ }
12614
12646
  function computeValModuleShas(config, entries, moduleErrors) {
12615
12647
  var configSha = hash(JSON.stringify(config));
12616
- var sourcesSha = "";
12648
+ var sourcesSha = computeSourcesSha(entries);
12617
12649
  var baseSha = configSha;
12618
12650
  // NOTE: schemaSha is deliberately NOT seeded with configSha. It is compared
12619
12651
  // across bundles (the server extracts from the Node bundle, the editor SPA
@@ -12624,18 +12656,14 @@ function computeValModuleShas(config, entries, moduleErrors) {
12624
12656
  // server-only env vars and therefore `undefined` in the browser. Seeding with
12625
12657
  // them made the two sides disagree on every production load.
12626
12658
  var schemaSha = "";
12627
- var _iterator = result._createForOfIteratorHelper(entries),
12628
- _step;
12659
+ var _iterator2 = result._createForOfIteratorHelper(entries),
12660
+ _step2;
12629
12661
  try {
12630
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
12631
- var entry = _step.value;
12662
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
12663
+ var entry = _step2.value;
12632
12664
  var path = entry.path,
12633
12665
  source = entry.source,
12634
12666
  serializedSchema = entry.serializedSchema;
12635
- sourcesSha = hash(sourcesSha + JSON.stringify({
12636
- path: path,
12637
- source: source
12638
- }));
12639
12667
  baseSha = hash(baseSha + JSON.stringify({
12640
12668
  path: path,
12641
12669
  schema: serializedSchema,
@@ -12653,9 +12681,9 @@ function computeValModuleShas(config, entries, moduleErrors) {
12653
12681
  }));
12654
12682
  }
12655
12683
  } catch (err) {
12656
- _iterator.e(err);
12684
+ _iterator2.e(err);
12657
12685
  } finally {
12658
- _iterator.f();
12686
+ _iterator2.f();
12659
12687
  }
12660
12688
  return {
12661
12689
  baseSha: baseSha,
@@ -12677,7 +12705,7 @@ function extractValModules(_x) {
12677
12705
  }
12678
12706
  function _extractValModules() {
12679
12707
  _extractValModules = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(valModules) {
12680
- var moduleErrors, addModuleError, sources, schemas, serializedSchemas, shaEntries, moduleIdx, module, at, value, path, schema, source, serializedSchema, pathM, _iterator2, _step2, error, _iterator3, _step3, _error, _t, _t2;
12708
+ var moduleErrors, addModuleError, sources, schemas, serializedSchemas, shaEntries, moduleIdx, module, at, value, path, schema, source, serializedSchema, pathM, _iterator3, _step3, error, _iterator4, _step4, _error, _t, _t2;
12681
12709
  return _regenerator().w(function (_context) {
12682
12710
  while (1) switch (_context.p = _context.n) {
12683
12711
  case 0:
@@ -12824,10 +12852,10 @@ function _extractValModules() {
12824
12852
  // Appended AFTER the loop on purpose: each entry's `moduleErrorsAt` is the
12825
12853
  // error count at the time it was folded in, so the SHAs stay a function of
12826
12854
  // the modules themselves.
12827
- _iterator2 = result._createForOfIteratorHelper(resolveSettingsModule(serializedSchemas).errors);
12855
+ _iterator3 = result._createForOfIteratorHelper(resolveSettingsModule(serializedSchemas).errors);
12828
12856
  try {
12829
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
12830
- error = _step2.value;
12857
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
12858
+ error = _step3.value;
12831
12859
  moduleErrors.push(error);
12832
12860
  }
12833
12861
  // Same kind of rule, same reason it is here: a view cycle is a property of the
@@ -12835,20 +12863,20 @@ function _extractValModules() {
12835
12863
  // catches it either — a view stores a pointer, not content, so there is no
12836
12864
  // data cycle for a source walk to trip over.
12837
12865
  } catch (err) {
12838
- _iterator2.e(err);
12866
+ _iterator3.e(err);
12839
12867
  } finally {
12840
- _iterator2.f();
12868
+ _iterator3.f();
12841
12869
  }
12842
- _iterator3 = result._createForOfIteratorHelper(viewCycleErrors(serializedSchemas));
12870
+ _iterator4 = result._createForOfIteratorHelper(viewCycleErrors(serializedSchemas));
12843
12871
  try {
12844
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
12845
- _error = _step3.value;
12872
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
12873
+ _error = _step4.value;
12846
12874
  moduleErrors.push(_error);
12847
12875
  }
12848
12876
  } catch (err) {
12849
- _iterator3.e(err);
12877
+ _iterator4.e(err);
12850
12878
  } finally {
12851
- _iterator3.f();
12879
+ _iterator4.f();
12852
12880
  }
12853
12881
  return _context.a(2, _objectSpread2(_objectSpread2({
12854
12882
  sources: sources,
@@ -14167,7 +14195,7 @@ function isPageRouter(routerId) {
14167
14195
 
14168
14196
  var corePackageJson = {
14169
14197
  name: "@valbuild/core",
14170
- version: "0.136.1",
14198
+ version: "0.136.8",
14171
14199
  "private": false,
14172
14200
  description: "Val - supercharged hard-coded content",
14173
14201
  repository: {
@@ -14419,6 +14447,7 @@ exports._slicedToArray = _slicedToArray;
14419
14447
  exports._toConsumableArray = _toConsumableArray;
14420
14448
  exports._typeof = _typeof;
14421
14449
  exports.assistantAvailability = assistantAvailability;
14450
+ exports.computeSourcesSha = computeSourcesSha;
14422
14451
  exports.computeValModuleShas = computeValModuleShas;
14423
14452
  exports.declaredKeySetOf = declaredKeySetOf;
14424
14453
  exports.derefPatch = derefPatch;
@@ -12609,9 +12609,41 @@ function collectObjectRecursive(item, collector) {
12609
12609
  * exactly. That is the property the promotion relies on: only the modules whose
12610
12610
  * source actually moved change anything.
12611
12611
  */
12612
+ /**
12613
+ * The `sourcesSha` fold on its own: path and source, in `val.modules` order.
12614
+ *
12615
+ * Separate from {@link computeValModuleShas} because the Studio needs it and
12616
+ * has nothing else that fold takes. It is how a client tells whether the base
12617
+ * it is showing is the base a server's `/stat` answer is relative to: the chain
12618
+ * a server announces is the patches ITS build does not contain, so applying it
12619
+ * to another build's source loses edits or applies them twice. Both sides call
12620
+ * this one implementation, so the comparison is only ever between two runs of
12621
+ * the same code.
12622
+ */
12623
+ function computeSourcesSha(entries) {
12624
+ var sourcesSha = "";
12625
+ var _iterator = _createForOfIteratorHelper(entries),
12626
+ _step;
12627
+ try {
12628
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
12629
+ var _step$value = _step.value,
12630
+ path = _step$value.path,
12631
+ source = _step$value.source;
12632
+ sourcesSha = hash(sourcesSha + JSON.stringify({
12633
+ path: path,
12634
+ source: source
12635
+ }));
12636
+ }
12637
+ } catch (err) {
12638
+ _iterator.e(err);
12639
+ } finally {
12640
+ _iterator.f();
12641
+ }
12642
+ return sourcesSha;
12643
+ }
12612
12644
  function computeValModuleShas(config, entries, moduleErrors) {
12613
12645
  var configSha = hash(JSON.stringify(config));
12614
- var sourcesSha = "";
12646
+ var sourcesSha = computeSourcesSha(entries);
12615
12647
  var baseSha = configSha;
12616
12648
  // NOTE: schemaSha is deliberately NOT seeded with configSha. It is compared
12617
12649
  // across bundles (the server extracts from the Node bundle, the editor SPA
@@ -12622,18 +12654,14 @@ function computeValModuleShas(config, entries, moduleErrors) {
12622
12654
  // server-only env vars and therefore `undefined` in the browser. Seeding with
12623
12655
  // them made the two sides disagree on every production load.
12624
12656
  var schemaSha = "";
12625
- var _iterator = _createForOfIteratorHelper(entries),
12626
- _step;
12657
+ var _iterator2 = _createForOfIteratorHelper(entries),
12658
+ _step2;
12627
12659
  try {
12628
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
12629
- var entry = _step.value;
12660
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
12661
+ var entry = _step2.value;
12630
12662
  var path = entry.path,
12631
12663
  source = entry.source,
12632
12664
  serializedSchema = entry.serializedSchema;
12633
- sourcesSha = hash(sourcesSha + JSON.stringify({
12634
- path: path,
12635
- source: source
12636
- }));
12637
12665
  baseSha = hash(baseSha + JSON.stringify({
12638
12666
  path: path,
12639
12667
  schema: serializedSchema,
@@ -12651,9 +12679,9 @@ function computeValModuleShas(config, entries, moduleErrors) {
12651
12679
  }));
12652
12680
  }
12653
12681
  } catch (err) {
12654
- _iterator.e(err);
12682
+ _iterator2.e(err);
12655
12683
  } finally {
12656
- _iterator.f();
12684
+ _iterator2.f();
12657
12685
  }
12658
12686
  return {
12659
12687
  baseSha: baseSha,
@@ -12675,7 +12703,7 @@ function extractValModules(_x) {
12675
12703
  }
12676
12704
  function _extractValModules() {
12677
12705
  _extractValModules = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(valModules) {
12678
- var moduleErrors, addModuleError, sources, schemas, serializedSchemas, shaEntries, moduleIdx, module, at, value, path, schema, source, serializedSchema, pathM, _iterator2, _step2, error, _iterator3, _step3, _error, _t, _t2;
12706
+ var moduleErrors, addModuleError, sources, schemas, serializedSchemas, shaEntries, moduleIdx, module, at, value, path, schema, source, serializedSchema, pathM, _iterator3, _step3, error, _iterator4, _step4, _error, _t, _t2;
12679
12707
  return _regenerator().w(function (_context) {
12680
12708
  while (1) switch (_context.p = _context.n) {
12681
12709
  case 0:
@@ -12822,10 +12850,10 @@ function _extractValModules() {
12822
12850
  // Appended AFTER the loop on purpose: each entry's `moduleErrorsAt` is the
12823
12851
  // error count at the time it was folded in, so the SHAs stay a function of
12824
12852
  // the modules themselves.
12825
- _iterator2 = _createForOfIteratorHelper(resolveSettingsModule(serializedSchemas).errors);
12853
+ _iterator3 = _createForOfIteratorHelper(resolveSettingsModule(serializedSchemas).errors);
12826
12854
  try {
12827
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
12828
- error = _step2.value;
12855
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
12856
+ error = _step3.value;
12829
12857
  moduleErrors.push(error);
12830
12858
  }
12831
12859
  // Same kind of rule, same reason it is here: a view cycle is a property of the
@@ -12833,20 +12861,20 @@ function _extractValModules() {
12833
12861
  // catches it either — a view stores a pointer, not content, so there is no
12834
12862
  // data cycle for a source walk to trip over.
12835
12863
  } catch (err) {
12836
- _iterator2.e(err);
12864
+ _iterator3.e(err);
12837
12865
  } finally {
12838
- _iterator2.f();
12866
+ _iterator3.f();
12839
12867
  }
12840
- _iterator3 = _createForOfIteratorHelper(viewCycleErrors(serializedSchemas));
12868
+ _iterator4 = _createForOfIteratorHelper(viewCycleErrors(serializedSchemas));
12841
12869
  try {
12842
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
12843
- _error = _step3.value;
12870
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
12871
+ _error = _step4.value;
12844
12872
  moduleErrors.push(_error);
12845
12873
  }
12846
12874
  } catch (err) {
12847
- _iterator3.e(err);
12875
+ _iterator4.e(err);
12848
12876
  } finally {
12849
- _iterator3.f();
12877
+ _iterator4.f();
12850
12878
  }
12851
12879
  return _context.a(2, _objectSpread2(_objectSpread2({
12852
12880
  sources: sources,
@@ -14165,7 +14193,7 @@ function isPageRouter(routerId) {
14165
14193
 
14166
14194
  var corePackageJson = {
14167
14195
  name: "@valbuild/core",
14168
- version: "0.136.1",
14196
+ version: "0.136.8",
14169
14197
  "private": false,
14170
14198
  description: "Val - supercharged hard-coded content",
14171
14199
  repository: {
@@ -14371,4 +14399,4 @@ function tryJsonParse(str) {
14371
14399
  }
14372
14400
  }
14373
14401
 
14374
- export { DateTimeSchema as $, ArraySchema as A, BooleanSchema as B, resolveSettingsModule as C, DEFAULT_CONTENT_HOST as D, localeTagError as E, FATAL_ERROR_TYPES as F, GenericSelector as G, localeOfValue as H, Internal as I, declaredKeySetOf as J, missingDeclaredKeys as K, LocaleSchema as L, ModuleFilePathSep as M, NumberSchema as N, ObjectSchema as O, PatchError as P, discriminatedUnionBranchOf as Q, RecordSchema as R, Schema as S, THEME_LOGO_DIRECTORY as T, ColorSchema as U, VAL_EXTENSION as V, CodeSchema as W, CODE_LANGUAGES as X, COLOR_FORMATS as Y, DEFAULT_COLOR_FORMAT as Z, _typeof as _, _slicedToArray as a, KeyOfSchema as a0, ValViewSchema as a1, isValViewSource as a2, RouteSchema as a3, RichTextSchema as a4, DiscriminatedUnionSchema as a5, EnumSchema as a6, LiteralSchema as a7, deserializeSchema as a8, previewScope as a9, isInlineRender as aa, parseNextJsRoutePattern as ab, parseTanStackRoutePattern as ac, tanStackSegmentsOfRoutePath as ad, validateUrlAgainstPattern as ae, getSourcePathFromRoute as af, isPageRouter as ag, _createClass as b, _classCallCheck as c, _toConsumableArray as d, DEFAULT_APP_HOST as e, DEFAULT_STATIC_HOST as f, extractValModules as g, computeValModuleShas as h, initVal as i, hasRemoteFileSchema as j, hasMediaSchema as k, DEFAULT_VAL_REMOTE_HOST as l, modules as m, derefPatch as n, StringSchema as o, ImageSchema as p, FileSchema as q, DateSchema as r, splitModuleFilePathAndModulePath as s, SettingsSchema as t, ASSISTANT_SETTINGS_MAX_LENGTH as u, THEME_RADIUS_STEPS as v, THEME_RADIUS_LENGTHS as w, assistantAvailability as x, SETTINGS_MODULE_CONVENTION as y, isRootModuleFilePath as z };
14402
+ export { DEFAULT_COLOR_FORMAT as $, ArraySchema as A, BooleanSchema as B, isRootModuleFilePath as C, DEFAULT_CONTENT_HOST as D, resolveSettingsModule as E, FATAL_ERROR_TYPES as F, GenericSelector as G, localeTagError as H, Internal as I, localeOfValue as J, declaredKeySetOf as K, LocaleSchema as L, ModuleFilePathSep as M, NumberSchema as N, ObjectSchema as O, PatchError as P, missingDeclaredKeys as Q, RecordSchema as R, Schema as S, THEME_LOGO_DIRECTORY as T, discriminatedUnionBranchOf as U, VAL_EXTENSION as V, ColorSchema as W, CodeSchema as X, CODE_LANGUAGES as Y, COLOR_FORMATS as Z, _typeof as _, _slicedToArray as a, DateTimeSchema as a0, KeyOfSchema as a1, ValViewSchema as a2, isValViewSource as a3, RouteSchema as a4, RichTextSchema as a5, DiscriminatedUnionSchema as a6, EnumSchema as a7, LiteralSchema as a8, deserializeSchema as a9, previewScope as aa, isInlineRender as ab, parseNextJsRoutePattern as ac, parseTanStackRoutePattern as ad, tanStackSegmentsOfRoutePath as ae, validateUrlAgainstPattern as af, getSourcePathFromRoute as ag, isPageRouter as ah, _createClass as b, _classCallCheck as c, _toConsumableArray as d, DEFAULT_APP_HOST as e, DEFAULT_STATIC_HOST as f, extractValModules as g, computeValModuleShas as h, initVal as i, computeSourcesSha as j, hasRemoteFileSchema as k, hasMediaSchema as l, modules as m, DEFAULT_VAL_REMOTE_HOST as n, derefPatch as o, StringSchema as p, ImageSchema as q, FileSchema as r, splitModuleFilePathAndModulePath as s, DateSchema as t, SettingsSchema as u, ASSISTANT_SETTINGS_MAX_LENGTH as v, THEME_RADIUS_STEPS as w, THEME_RADIUS_LENGTHS as x, assistantAvailability as y, SETTINGS_MODULE_CONVENTION as z };
@@ -12611,9 +12611,41 @@ function collectObjectRecursive(item, collector) {
12611
12611
  * exactly. That is the property the promotion relies on: only the modules whose
12612
12612
  * source actually moved change anything.
12613
12613
  */
12614
+ /**
12615
+ * The `sourcesSha` fold on its own: path and source, in `val.modules` order.
12616
+ *
12617
+ * Separate from {@link computeValModuleShas} because the Studio needs it and
12618
+ * has nothing else that fold takes. It is how a client tells whether the base
12619
+ * it is showing is the base a server's `/stat` answer is relative to: the chain
12620
+ * a server announces is the patches ITS build does not contain, so applying it
12621
+ * to another build's source loses edits or applies them twice. Both sides call
12622
+ * this one implementation, so the comparison is only ever between two runs of
12623
+ * the same code.
12624
+ */
12625
+ function computeSourcesSha(entries) {
12626
+ var sourcesSha = "";
12627
+ var _iterator = result._createForOfIteratorHelper(entries),
12628
+ _step;
12629
+ try {
12630
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
12631
+ var _step$value = _step.value,
12632
+ path = _step$value.path,
12633
+ source = _step$value.source;
12634
+ sourcesSha = hash(sourcesSha + JSON.stringify({
12635
+ path: path,
12636
+ source: source
12637
+ }));
12638
+ }
12639
+ } catch (err) {
12640
+ _iterator.e(err);
12641
+ } finally {
12642
+ _iterator.f();
12643
+ }
12644
+ return sourcesSha;
12645
+ }
12614
12646
  function computeValModuleShas(config, entries, moduleErrors) {
12615
12647
  var configSha = hash(JSON.stringify(config));
12616
- var sourcesSha = "";
12648
+ var sourcesSha = computeSourcesSha(entries);
12617
12649
  var baseSha = configSha;
12618
12650
  // NOTE: schemaSha is deliberately NOT seeded with configSha. It is compared
12619
12651
  // across bundles (the server extracts from the Node bundle, the editor SPA
@@ -12624,18 +12656,14 @@ function computeValModuleShas(config, entries, moduleErrors) {
12624
12656
  // server-only env vars and therefore `undefined` in the browser. Seeding with
12625
12657
  // them made the two sides disagree on every production load.
12626
12658
  var schemaSha = "";
12627
- var _iterator = result._createForOfIteratorHelper(entries),
12628
- _step;
12659
+ var _iterator2 = result._createForOfIteratorHelper(entries),
12660
+ _step2;
12629
12661
  try {
12630
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
12631
- var entry = _step.value;
12662
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
12663
+ var entry = _step2.value;
12632
12664
  var path = entry.path,
12633
12665
  source = entry.source,
12634
12666
  serializedSchema = entry.serializedSchema;
12635
- sourcesSha = hash(sourcesSha + JSON.stringify({
12636
- path: path,
12637
- source: source
12638
- }));
12639
12667
  baseSha = hash(baseSha + JSON.stringify({
12640
12668
  path: path,
12641
12669
  schema: serializedSchema,
@@ -12653,9 +12681,9 @@ function computeValModuleShas(config, entries, moduleErrors) {
12653
12681
  }));
12654
12682
  }
12655
12683
  } catch (err) {
12656
- _iterator.e(err);
12684
+ _iterator2.e(err);
12657
12685
  } finally {
12658
- _iterator.f();
12686
+ _iterator2.f();
12659
12687
  }
12660
12688
  return {
12661
12689
  baseSha: baseSha,
@@ -12677,7 +12705,7 @@ function extractValModules(_x) {
12677
12705
  }
12678
12706
  function _extractValModules() {
12679
12707
  _extractValModules = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(valModules) {
12680
- var moduleErrors, addModuleError, sources, schemas, serializedSchemas, shaEntries, moduleIdx, module, at, value, path, schema, source, serializedSchema, pathM, _iterator2, _step2, error, _iterator3, _step3, _error, _t, _t2;
12708
+ var moduleErrors, addModuleError, sources, schemas, serializedSchemas, shaEntries, moduleIdx, module, at, value, path, schema, source, serializedSchema, pathM, _iterator3, _step3, error, _iterator4, _step4, _error, _t, _t2;
12681
12709
  return _regenerator().w(function (_context) {
12682
12710
  while (1) switch (_context.p = _context.n) {
12683
12711
  case 0:
@@ -12824,10 +12852,10 @@ function _extractValModules() {
12824
12852
  // Appended AFTER the loop on purpose: each entry's `moduleErrorsAt` is the
12825
12853
  // error count at the time it was folded in, so the SHAs stay a function of
12826
12854
  // the modules themselves.
12827
- _iterator2 = result._createForOfIteratorHelper(resolveSettingsModule(serializedSchemas).errors);
12855
+ _iterator3 = result._createForOfIteratorHelper(resolveSettingsModule(serializedSchemas).errors);
12828
12856
  try {
12829
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
12830
- error = _step2.value;
12857
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
12858
+ error = _step3.value;
12831
12859
  moduleErrors.push(error);
12832
12860
  }
12833
12861
  // Same kind of rule, same reason it is here: a view cycle is a property of the
@@ -12835,20 +12863,20 @@ function _extractValModules() {
12835
12863
  // catches it either — a view stores a pointer, not content, so there is no
12836
12864
  // data cycle for a source walk to trip over.
12837
12865
  } catch (err) {
12838
- _iterator2.e(err);
12866
+ _iterator3.e(err);
12839
12867
  } finally {
12840
- _iterator2.f();
12868
+ _iterator3.f();
12841
12869
  }
12842
- _iterator3 = result._createForOfIteratorHelper(viewCycleErrors(serializedSchemas));
12870
+ _iterator4 = result._createForOfIteratorHelper(viewCycleErrors(serializedSchemas));
12843
12871
  try {
12844
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
12845
- _error = _step3.value;
12872
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
12873
+ _error = _step4.value;
12846
12874
  moduleErrors.push(_error);
12847
12875
  }
12848
12876
  } catch (err) {
12849
- _iterator3.e(err);
12877
+ _iterator4.e(err);
12850
12878
  } finally {
12851
- _iterator3.f();
12879
+ _iterator4.f();
12852
12880
  }
12853
12881
  return _context.a(2, _objectSpread2(_objectSpread2({
12854
12882
  sources: sources,
@@ -14167,7 +14195,7 @@ function isPageRouter(routerId) {
14167
14195
 
14168
14196
  var corePackageJson = {
14169
14197
  name: "@valbuild/core",
14170
- version: "0.136.1",
14198
+ version: "0.136.8",
14171
14199
  "private": false,
14172
14200
  description: "Val - supercharged hard-coded content",
14173
14201
  repository: {
@@ -14419,6 +14447,7 @@ exports._slicedToArray = _slicedToArray;
14419
14447
  exports._toConsumableArray = _toConsumableArray;
14420
14448
  exports._typeof = _typeof;
14421
14449
  exports.assistantAvailability = assistantAvailability;
14450
+ exports.computeSourcesSha = computeSourcesSha;
14422
14451
  exports.computeValModuleShas = computeValModuleShas;
14423
14452
  exports.declaredKeySetOf = declaredKeySetOf;
14424
14453
  exports.derefPatch = derefPatch;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-a9e97674.cjs.dev.js');
5
+ var dist_valbuildCore = require('./index-afbcf0ca.cjs.dev.js');
6
6
  require('./result-bb1f436e.cjs.dev.js');
7
7
 
8
8
 
@@ -47,6 +47,7 @@ exports.THEME_RADIUS_STEPS = dist_valbuildCore.THEME_RADIUS_STEPS;
47
47
  exports.VAL_EXTENSION = dist_valbuildCore.VAL_EXTENSION;
48
48
  exports.ValViewSchema = dist_valbuildCore.ValViewSchema;
49
49
  exports.assistantAvailability = dist_valbuildCore.assistantAvailability;
50
+ exports.computeSourcesSha = dist_valbuildCore.computeSourcesSha;
50
51
  exports.computeValModuleShas = dist_valbuildCore.computeValModuleShas;
51
52
  exports.declaredKeySetOf = dist_valbuildCore.declaredKeySetOf;
52
53
  exports.derefPatch = dist_valbuildCore.derefPatch;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-ab3e94a0.cjs.prod.js');
5
+ var dist_valbuildCore = require('./index-2545d3b4.cjs.prod.js');
6
6
  require('./result-787e35f6.cjs.prod.js');
7
7
 
8
8
 
@@ -47,6 +47,7 @@ exports.THEME_RADIUS_STEPS = dist_valbuildCore.THEME_RADIUS_STEPS;
47
47
  exports.VAL_EXTENSION = dist_valbuildCore.VAL_EXTENSION;
48
48
  exports.ValViewSchema = dist_valbuildCore.ValViewSchema;
49
49
  exports.assistantAvailability = dist_valbuildCore.assistantAvailability;
50
+ exports.computeSourcesSha = dist_valbuildCore.computeSourcesSha;
50
51
  exports.computeValModuleShas = dist_valbuildCore.computeValModuleShas;
51
52
  exports.declaredKeySetOf = dist_valbuildCore.declaredKeySetOf;
52
53
  exports.derefPatch = dist_valbuildCore.derefPatch;
@@ -1,2 +1,2 @@
1
- export { u as ASSISTANT_SETTINGS_MAX_LENGTH, A as ArraySchema, B as BooleanSchema, X as CODE_LANGUAGES, Y as COLOR_FORMATS, W as CodeSchema, U as ColorSchema, e as DEFAULT_APP_HOST, Z as DEFAULT_COLOR_FORMAT, D as DEFAULT_CONTENT_HOST, f as DEFAULT_STATIC_HOST, l as DEFAULT_VAL_REMOTE_HOST, r as DateSchema, $ as DateTimeSchema, a5 as DiscriminatedUnionSchema, a6 as EnumSchema, F as FATAL_ERROR_TYPES, q as FileSchema, G as GenericSelector, p as ImageSchema, I as Internal, a0 as KeyOfSchema, a7 as LiteralSchema, L as LocaleSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, a4 as RichTextSchema, a3 as RouteSchema, y as SETTINGS_MODULE_CONVENTION, S as Schema, t as SettingsSchema, o as StringSchema, T as THEME_LOGO_DIRECTORY, w as THEME_RADIUS_LENGTHS, v as THEME_RADIUS_STEPS, V as VAL_EXTENSION, a1 as ValViewSchema, x as assistantAvailability, h as computeValModuleShas, J as declaredKeySetOf, n as derefPatch, a8 as deserializeSchema, Q as discriminatedUnionBranchOf, g as extractValModules, af as getSourcePathFromRoute, k as hasMediaSchema, j as hasRemoteFileSchema, i as initVal, aa as isInlineRender, ag as isPageRouter, z as isRootModuleFilePath, a2 as isValViewSource, H as localeOfValue, E as localeTagError, K as missingDeclaredKeys, m as modules, ab as parseNextJsRoutePattern, ac as parseTanStackRoutePattern, a9 as previewScope, C as resolveSettingsModule, ad as tanStackSegmentsOfRoutePath, ae as validateUrlAgainstPattern } from './index-3b96790c.esm.js';
1
+ export { v as ASSISTANT_SETTINGS_MAX_LENGTH, A as ArraySchema, B as BooleanSchema, Y as CODE_LANGUAGES, Z as COLOR_FORMATS, X as CodeSchema, W as ColorSchema, e as DEFAULT_APP_HOST, $ as DEFAULT_COLOR_FORMAT, D as DEFAULT_CONTENT_HOST, f as DEFAULT_STATIC_HOST, n as DEFAULT_VAL_REMOTE_HOST, t as DateSchema, a0 as DateTimeSchema, a6 as DiscriminatedUnionSchema, a7 as EnumSchema, F as FATAL_ERROR_TYPES, r as FileSchema, G as GenericSelector, q as ImageSchema, I as Internal, a1 as KeyOfSchema, a8 as LiteralSchema, L as LocaleSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, a5 as RichTextSchema, a4 as RouteSchema, z as SETTINGS_MODULE_CONVENTION, S as Schema, u as SettingsSchema, p as StringSchema, T as THEME_LOGO_DIRECTORY, x as THEME_RADIUS_LENGTHS, w as THEME_RADIUS_STEPS, V as VAL_EXTENSION, a2 as ValViewSchema, y as assistantAvailability, j as computeSourcesSha, h as computeValModuleShas, K as declaredKeySetOf, o as derefPatch, a9 as deserializeSchema, U as discriminatedUnionBranchOf, g as extractValModules, ag as getSourcePathFromRoute, l as hasMediaSchema, k as hasRemoteFileSchema, i as initVal, ab as isInlineRender, ah as isPageRouter, C as isRootModuleFilePath, a3 as isValViewSource, J as localeOfValue, H as localeTagError, Q as missingDeclaredKeys, m as modules, ac as parseNextJsRoutePattern, ad as parseTanStackRoutePattern, aa as previewScope, E as resolveSettingsModule, ae as tanStackSegmentsOfRoutePath, af as validateUrlAgainstPattern } from './index-962a8ac3.esm.js';
2
2
  import './result-daff1cae.esm.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/core",
3
- "version": "0.136.1",
3
+ "version": "0.136.8",
4
4
  "private": false,
5
5
  "description": "Val - supercharged hard-coded content",
6
6
  "repository": {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('../../dist/index-a9e97674.cjs.dev.js');
5
+ var dist_valbuildCore = require('../../dist/index-afbcf0ca.cjs.dev.js');
6
6
  var result = require('../../dist/result-bb1f436e.cjs.dev.js');
7
7
  var util = require('../../dist/util-b213092b.cjs.dev.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('../../dist/index-ab3e94a0.cjs.prod.js');
5
+ var dist_valbuildCore = require('../../dist/index-2545d3b4.cjs.prod.js');
6
6
  var result = require('../../dist/result-787e35f6.cjs.prod.js');
7
7
  var util = require('../../dist/util-030d8a1f.cjs.prod.js');
8
8
 
@@ -1,5 +1,5 @@
1
- import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-3b96790c.esm.js';
2
- export { P as PatchError } from '../../dist/index-3b96790c.esm.js';
1
+ import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-962a8ac3.esm.js';
2
+ export { P as PatchError } from '../../dist/index-962a8ac3.esm.js';
3
3
  import { f as isNonEmpty, e as err, o as ok, m as map, g as flatMap, i as isErr, h as flatMapReduce, j as filterOrElse, k as mapErr, l as map$1, n as all, p as flatten, q as allT } from '../../dist/result-daff1cae.esm.js';
4
4
  import { p as pipe } from '../../dist/util-18613e99.esm.js';
5
5