@valbuild/tanstack 0.131.0 → 0.132.0
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 +45 -0
- package/dist/declarations/src/server/initValContent.d.ts +20 -0
- package/dist/valbuild-tanstack.cjs.dev.js +1 -1
- package/dist/valbuild-tanstack.cjs.prod.js +1 -1
- package/dist/valbuild-tanstack.esm.js +1 -1
- package/dist/{version-b5c8e13d.esm.js → version-61d23009.esm.js} +1 -1
- package/dist/{version-022ed31c.cjs.prod.js → version-c38b1075.cjs.dev.js} +1 -1
- package/dist/{version-4c4e9ed0.cjs.dev.js → version-d6540d28.cjs.prod.js} +1 -1
- package/package.json +4 -4
- package/server/dist/valbuild-tanstack-server.cjs.dev.js +3 -3
- package/server/dist/valbuild-tanstack-server.cjs.prod.js +3 -3
- package/server/dist/valbuild-tanstack-server.esm.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @valbuild/tanstack
|
|
2
2
|
|
|
3
|
+
## 0.132.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#689](https://github.com/valbuild/val/pull/689) [`c1c93c1`](https://github.com/valbuild/val/commit/c1c93c1431072b37b4098bcdc49ebe207e3a28d5) Thanks [@freekh](https://github.com/freekh)! - `initValContent` takes an `http` option, so the content readers can be put in
|
|
8
|
+
http mode.
|
|
9
|
+
|
|
10
|
+
They build a Val server of their own — they resolve content by asking it, not by
|
|
11
|
+
calling the API over HTTP — so the mode question is put to them separately.
|
|
12
|
+
`initValServer` has had `http` for a while; these readers did not, which meant a
|
|
13
|
+
host could configure its API for http mode and leave the half of Val that
|
|
14
|
+
renders its pages inferring a mode instead. Where the credentials are handed to
|
|
15
|
+
Val in code rather than through the environment there is nothing to infer from,
|
|
16
|
+
because `process.env.VAL_API_KEY` is undefined in a bundle built separately from
|
|
17
|
+
its dependencies.
|
|
18
|
+
|
|
19
|
+
Pass the same object both halves get. `gitCommit` is the field that is silently
|
|
20
|
+
wrong rather than loudly missing: every read in this mode fetches the module's
|
|
21
|
+
path from the content service at that commit, so readers given a different one
|
|
22
|
+
from the API resolve a different version of the same file — a draft render
|
|
23
|
+
showing content that is neither the draft nor what the site serves, with nothing
|
|
24
|
+
failing anywhere.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [#689](https://github.com/valbuild/val/pull/689) [`d0d684b`](https://github.com/valbuild/val/commit/d0d684bdd62d2d9a2cddff38beadf9175f55bf91) Thanks [@freekh](https://github.com/freekh)! - A probe for the seams a host that BUILDS rather than deploys depends on.
|
|
29
|
+
|
|
30
|
+
`examples/tanstack/scripts/hostPublishProbe.ts` configures both halves of Val in
|
|
31
|
+
`http` mode and drives a publish through `publishOverride`, against
|
|
32
|
+
`e2e/mock-content-host`. Nothing exercised those two together: `e2e/http/` drives
|
|
33
|
+
the Studio, and `publishOverride` has no UI to drive it from.
|
|
34
|
+
|
|
35
|
+
What it pins is the ordering. A host whose publish is a build must commit
|
|
36
|
+
_first_ — building first hands its builder content the content service does not
|
|
37
|
+
have yet, so every read in the new build resolves the commit from before the
|
|
38
|
+
save, and the site shows pre-save content with the edits already consumed, with
|
|
39
|
+
nothing failing to say so.
|
|
40
|
+
|
|
41
|
+
No product code changed.
|
|
42
|
+
|
|
43
|
+
- Updated dependencies [[`72cc676`](https://github.com/valbuild/val/commit/72cc6765e92a6e72b5c09ddd9eed8efa7ce899f2)]:
|
|
44
|
+
- @valbuild/server@0.132.0
|
|
45
|
+
- @valbuild/language-server@0.132.0
|
|
46
|
+
- @valbuild/mcp@0.132.0
|
|
47
|
+
|
|
3
48
|
## 0.131.0
|
|
4
49
|
|
|
5
50
|
### Minor Changes
|
|
@@ -2,6 +2,7 @@ import { type StegaOfSource } from "@valbuild/react/stega";
|
|
|
2
2
|
import { SelectorSource, SelectorOf, GenericSelector, ValConfig, ValModules, ValModule, SourceObject, JsonSource } from "@valbuild/core";
|
|
3
3
|
import { ValServer, type ValPatchStore } from "@valbuild/server";
|
|
4
4
|
import { type ValDraftMode } from "./valDraftMode.js";
|
|
5
|
+
import type { ValHttpMode } from "./initValServer.js";
|
|
5
6
|
declare const initFetchValStega: (config: ValConfig, valApiEndpoints: string, valServerPromise: Promise<ValServer>, isEnabled: () => Promise<boolean>, getHeaders: () => Promise<{
|
|
6
7
|
get(name: string): string | null;
|
|
7
8
|
}>, getCookies: () => Promise<{
|
|
@@ -145,6 +146,25 @@ export declare function initValContent(config: ValConfig, valModules: ValModules
|
|
|
145
146
|
* hardest kind of wrong to notice.
|
|
146
147
|
*/
|
|
147
148
|
unsafelyAllowUnauthenticated?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Put these readers in `http` mode. Pass the SAME object `initValServer`
|
|
151
|
+
* got.
|
|
152
|
+
*
|
|
153
|
+
* Separate for the same reason {@link sourceFiles} is: these readers have
|
|
154
|
+
* a Val server of their own, so the mode question is put to them
|
|
155
|
+
* independently. Answering it only for `initValServer` leaves them
|
|
156
|
+
* inferring -- and on a host that hands Val its credentials in code rather
|
|
157
|
+
* than through the environment, there is nothing to infer FROM, since
|
|
158
|
+
* `process.env.VAL_API_KEY` is undefined in a bundle built separately from
|
|
159
|
+
* its dependencies.
|
|
160
|
+
*
|
|
161
|
+
* `gitCommit` is what makes this more than bookkeeping here: every read
|
|
162
|
+
* fetches the module's path from the content service AT THAT COMMIT, so
|
|
163
|
+
* these readers and the API have to be given the same one or a draft
|
|
164
|
+
* render resolves a different version of the file than the site is
|
|
165
|
+
* running.
|
|
166
|
+
*/
|
|
167
|
+
http?: ValHttpMode;
|
|
148
168
|
}): {
|
|
149
169
|
fetchValStega: ReturnType<typeof initFetchValStega>;
|
|
150
170
|
fetchValKeyStega: ReturnType<typeof initFetchValKeyStega>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = require('./version-
|
|
5
|
+
var version = require('./version-c38b1075.cjs.dev.js');
|
|
6
6
|
var createForOfIteratorHelper = require('./createForOfIteratorHelper-e75681d7.cjs.dev.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var stega = require('@valbuild/react/stega');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = require('./version-
|
|
5
|
+
var version = require('./version-d6540d28.cjs.prod.js');
|
|
6
6
|
var createForOfIteratorHelper = require('./createForOfIteratorHelper-0324e063.cjs.prod.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var stega = require('@valbuild/react/stega');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _asyncToGenerator, a as _regenerator, r as readValEnableCookie, V as VERSION$1 } from './version-
|
|
1
|
+
import { _ as _asyncToGenerator, a as _regenerator, r as readValEnableCookie, V as VERSION$1 } from './version-61d23009.esm.js';
|
|
2
2
|
import { _ as _objectSpread2, a as _slicedToArray, b as _createForOfIteratorHelper } from './createForOfIteratorHelper-485c2ce1.esm.js';
|
|
3
3
|
import { Internal as Internal$1, initVal as initVal$1, DEFAULT_CONTENT_HOST } from '@valbuild/core';
|
|
4
4
|
import * as core from '@valbuild/core';
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"tanstack-router",
|
|
15
15
|
"react"
|
|
16
16
|
],
|
|
17
|
-
"version": "0.
|
|
17
|
+
"version": "0.132.0",
|
|
18
18
|
"main": "dist/valbuild-tanstack.cjs.js",
|
|
19
19
|
"module": "dist/valbuild-tanstack.esm.js",
|
|
20
20
|
"exports": {
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@valbuild/core": "0.130.0",
|
|
46
|
+
"@valbuild/language-server": "0.132.0",
|
|
47
|
+
"@valbuild/mcp": "0.132.0",
|
|
46
48
|
"@valbuild/react": "0.130.0",
|
|
47
|
-
"@valbuild/server": "0.
|
|
48
|
-
"@valbuild/mcp": "0.131.0",
|
|
49
|
-
"@valbuild/language-server": "0.131.0",
|
|
49
|
+
"@valbuild/server": "0.132.0",
|
|
50
50
|
"@valbuild/shared": "0.130.0",
|
|
51
51
|
"@valbuild/ui": "0.130.0"
|
|
52
52
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = require('../../dist/version-
|
|
5
|
+
var version = require('../../dist/version-c38b1075.cjs.dev.js');
|
|
6
6
|
var core = require('@valbuild/core');
|
|
7
7
|
var createForOfIteratorHelper = require('../../dist/createForOfIteratorHelper-e75681d7.cjs.dev.js');
|
|
8
8
|
var server = require('@valbuild/server');
|
|
@@ -993,7 +993,7 @@ function initValContent(config, valModules, opts) {
|
|
|
993
993
|
var isEnabled = function isEnabled() {
|
|
994
994
|
return draftMode.isEnabled();
|
|
995
995
|
};
|
|
996
|
-
var valServerPromise = server.createValServer(valModules, valApiEndpoints, createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2({
|
|
996
|
+
var valServerPromise = server.createValServer(valModules, valApiEndpoints, createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2({
|
|
997
997
|
versions: {
|
|
998
998
|
// `next` is the field name in the wire contract; see initValServer.
|
|
999
999
|
next: tanstackVersion,
|
|
@@ -1005,7 +1005,7 @@ function initValContent(config, valModules, opts) {
|
|
|
1005
1005
|
patchStore: opts.patchStore
|
|
1006
1006
|
} : {}), (opts === null || opts === void 0 ? void 0 : opts.unsafelyAllowUnauthenticated) !== undefined ? {
|
|
1007
1007
|
unsafelyAllowUnauthenticated: opts.unsafelyAllowUnauthenticated
|
|
1008
|
-
} : {}), config, {
|
|
1008
|
+
} : {}), (opts === null || opts === void 0 ? void 0 : opts.http) !== undefined ? opts.http : {}), config, {
|
|
1009
1009
|
isEnabled: isEnabled,
|
|
1010
1010
|
onEnable: function onEnable() {
|
|
1011
1011
|
return draftMode.enable();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = require('../../dist/version-
|
|
5
|
+
var version = require('../../dist/version-d6540d28.cjs.prod.js');
|
|
6
6
|
var core = require('@valbuild/core');
|
|
7
7
|
var createForOfIteratorHelper = require('../../dist/createForOfIteratorHelper-0324e063.cjs.prod.js');
|
|
8
8
|
var server = require('@valbuild/server');
|
|
@@ -993,7 +993,7 @@ function initValContent(config, valModules, opts) {
|
|
|
993
993
|
var isEnabled = function isEnabled() {
|
|
994
994
|
return draftMode.isEnabled();
|
|
995
995
|
};
|
|
996
|
-
var valServerPromise = server.createValServer(valModules, valApiEndpoints, createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2({
|
|
996
|
+
var valServerPromise = server.createValServer(valModules, valApiEndpoints, createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2(createForOfIteratorHelper._objectSpread2({
|
|
997
997
|
versions: {
|
|
998
998
|
// `next` is the field name in the wire contract; see initValServer.
|
|
999
999
|
next: tanstackVersion,
|
|
@@ -1005,7 +1005,7 @@ function initValContent(config, valModules, opts) {
|
|
|
1005
1005
|
patchStore: opts.patchStore
|
|
1006
1006
|
} : {}), (opts === null || opts === void 0 ? void 0 : opts.unsafelyAllowUnauthenticated) !== undefined ? {
|
|
1007
1007
|
unsafelyAllowUnauthenticated: opts.unsafelyAllowUnauthenticated
|
|
1008
|
-
} : {}), config, {
|
|
1008
|
+
} : {}), (opts === null || opts === void 0 ? void 0 : opts.http) !== undefined ? opts.http : {}), config, {
|
|
1009
1009
|
isEnabled: isEnabled,
|
|
1010
1010
|
onEnable: function onEnable() {
|
|
1011
1011
|
return draftMode.enable();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _asyncToGenerator, a as _regenerator, V as VERSION, s as setValEnableCookieReader } from '../../dist/version-
|
|
1
|
+
import { _ as _asyncToGenerator, a as _regenerator, V as VERSION, s as setValEnableCookieReader } from '../../dist/version-61d23009.esm.js';
|
|
2
2
|
import { Internal } from '@valbuild/core';
|
|
3
3
|
import { _ as _objectSpread2, a as _slicedToArray, d as _defineProperty } from '../../dist/createForOfIteratorHelper-485c2ce1.esm.js';
|
|
4
4
|
import { createValApiRouter, createValServer } from '@valbuild/server';
|
|
@@ -972,7 +972,7 @@ function initValContent(config, valModules, opts) {
|
|
|
972
972
|
var isEnabled = function isEnabled() {
|
|
973
973
|
return draftMode.isEnabled();
|
|
974
974
|
};
|
|
975
|
-
var valServerPromise = createValServer(valModules, valApiEndpoints, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
975
|
+
var valServerPromise = createValServer(valModules, valApiEndpoints, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
976
976
|
versions: {
|
|
977
977
|
// `next` is the field name in the wire contract; see initValServer.
|
|
978
978
|
next: tanstackVersion,
|
|
@@ -984,7 +984,7 @@ function initValContent(config, valModules, opts) {
|
|
|
984
984
|
patchStore: opts.patchStore
|
|
985
985
|
} : {}), (opts === null || opts === void 0 ? void 0 : opts.unsafelyAllowUnauthenticated) !== undefined ? {
|
|
986
986
|
unsafelyAllowUnauthenticated: opts.unsafelyAllowUnauthenticated
|
|
987
|
-
} : {}), config, {
|
|
987
|
+
} : {}), (opts === null || opts === void 0 ? void 0 : opts.http) !== undefined ? opts.http : {}), config, {
|
|
988
988
|
isEnabled: isEnabled,
|
|
989
989
|
onEnable: function onEnable() {
|
|
990
990
|
return draftMode.enable();
|