@valbuild/tanstack 0.132.0 → 0.133.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 +78 -0
- package/dist/declarations/src/server/initValContent.d.ts +6 -5
- package/dist/declarations/src/server/initValServer.d.ts +14 -4
- 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-c38b1075.cjs.dev.js → version-7d59b1f2.cjs.prod.js} +1 -1
- package/dist/{version-d6540d28.cjs.prod.js → version-8deeac5f.cjs.dev.js} +1 -1
- package/dist/{version-61d23009.esm.js → version-ed8bd465.esm.js} +1 -1
- package/package.json +7 -7
- package/server/dist/valbuild-tanstack-server.cjs.dev.js +1 -1
- package/server/dist/valbuild-tanstack-server.cjs.prod.js +1 -1
- package/server/dist/valbuild-tanstack-server.esm.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,83 @@
|
|
|
1
1
|
# @valbuild/tanstack
|
|
2
2
|
|
|
3
|
+
## 0.133.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#700](https://github.com/valbuild/val/pull/700) [`802412b`](https://github.com/valbuild/val/commit/802412b92c06bc1abbca78c86885e39c8710dd83) Thanks [@freekh](https://github.com/freekh)! - http mode no longer needs a git repository
|
|
8
|
+
|
|
9
|
+
A Val app can now run in http mode with no commit and no branch — its content
|
|
10
|
+
service is the store of record, and git is an optional mirror of the code. This
|
|
11
|
+
is what `fs` mode has always done: it has never had git, and it works.
|
|
12
|
+
|
|
13
|
+
Before this, `VAL_API_KEY` and `VAL_SECRET` were not enough. `VAL_GIT_COMMIT`
|
|
14
|
+
and `VAL_GIT_BRANCH` were required too, so a deployment with no commit to name
|
|
15
|
+
either threw at boot or fell through to `fs` mode and reached for a working
|
|
16
|
+
tree that was not there.
|
|
17
|
+
|
|
18
|
+
**Breaking, if you pass `http` options in code.** `gitCommit` and `gitBranch`
|
|
19
|
+
are replaced by one optional `git`:
|
|
20
|
+
|
|
21
|
+
```diff
|
|
22
|
+
initValServer(valModules, config, {
|
|
23
|
+
http: {
|
|
24
|
+
apiKey,
|
|
25
|
+
valSecret,
|
|
26
|
+
- gitCommit: process.env.VAL_GIT_COMMIT,
|
|
27
|
+
- gitBranch: "main",
|
|
28
|
+
+ // Only for a project whose content is mirrored into a repository.
|
|
29
|
+
+ // Omit it entirely otherwise.
|
|
30
|
+
+ git: { commit: process.env.VAL_GIT_COMMIT, branch: "main" },
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`VAL_GIT_COMMIT` and `VAL_GIT_BRANCH` still work and are still read; they are
|
|
36
|
+
simply no longer required. Set both or neither — a commit without a branch, or
|
|
37
|
+
a branch without a commit, is refused at startup with a message naming the
|
|
38
|
+
missing half, rather than failing later at a publish.
|
|
39
|
+
|
|
40
|
+
**What a commit is for, where you have one.** Turning pending patches into new
|
|
41
|
+
`.val.ts` text means reading the current text first, and that read goes to the
|
|
42
|
+
content service at that commit. It is the publish path, not the serving path: a
|
|
43
|
+
committed render reads the source compiled into the build and asks the content
|
|
44
|
+
service nothing. With no repository there is nothing to write `.val.ts` into,
|
|
45
|
+
so a publish records the module's data and its schema and skips the file — and
|
|
46
|
+
that data is what history reads, so nothing is lost.
|
|
47
|
+
|
|
48
|
+
**A publish can now be refused by name, before it is attempted.** If a project
|
|
49
|
+
mirrors its commits into a repository but the running deployment was built
|
|
50
|
+
before that repository existed, it has no commit to write the mirror against.
|
|
51
|
+
Publishing anyway would save the content and silently leave the repository
|
|
52
|
+
behind. The Studio now disables Publish and shows why, and `/save` refuses with
|
|
53
|
+
a `no-base` code instead of failing partway.
|
|
54
|
+
|
|
55
|
+
**Also:** `ValCommit` and `HistoricalCommit` have nullable `parentCommitSha`
|
|
56
|
+
and `clientCommitSha`, and `/stat`'s `commitSha` is optional. A root commit has
|
|
57
|
+
no parent, and a publisher with no repository does not report where it was. If
|
|
58
|
+
you read these fields, handle `null`.
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Updated dependencies [[`2b9a51b`](https://github.com/valbuild/val/commit/2b9a51b7dbe2dff53b7686a4f3b7eb9bc5784fae), [`802412b`](https://github.com/valbuild/val/commit/802412b92c06bc1abbca78c86885e39c8710dd83)]:
|
|
63
|
+
- @valbuild/ui@0.133.0
|
|
64
|
+
- @valbuild/server@0.133.0
|
|
65
|
+
- @valbuild/shared@0.133.0
|
|
66
|
+
- @valbuild/react@0.133.0
|
|
67
|
+
- @valbuild/language-server@0.133.0
|
|
68
|
+
- @valbuild/mcp@0.133.0
|
|
69
|
+
|
|
70
|
+
## 0.132.1
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [[`c9a5cd3`](https://github.com/valbuild/val/commit/c9a5cd3a4ab5908ecb9757b7a95db17a77e3b173), [`f413c5c`](https://github.com/valbuild/val/commit/f413c5cebca27ba82052825abc8c632b6177747e), [`1ddf245`](https://github.com/valbuild/val/commit/1ddf245ec73ad5af8099c3d18d4d33c6a1cc1254), [`a19997a`](https://github.com/valbuild/val/commit/a19997a542e65cc1375837b1bdb11c8af9e10160), [`c07b1ab`](https://github.com/valbuild/val/commit/c07b1abe30e226c80ef7ec4b4f0f5ccdae061c11), [`76c5d41`](https://github.com/valbuild/val/commit/76c5d41c3afa7cc8180d156c9e19fb082af7fba4), [`cbfa2b8`](https://github.com/valbuild/val/commit/cbfa2b884898f1603bde8e5aa5cd9da78778101f), [`f2ac188`](https://github.com/valbuild/val/commit/f2ac1887c11397b597081eef7206063b52b21c5b), [`003419a`](https://github.com/valbuild/val/commit/003419ab72f3069d92e67dfea931d5accc63e730)]:
|
|
75
|
+
- @valbuild/ui@0.132.1
|
|
76
|
+
- @valbuild/server@0.132.1
|
|
77
|
+
- @valbuild/language-server@0.132.1
|
|
78
|
+
- @valbuild/react@0.132.1
|
|
79
|
+
- @valbuild/mcp@0.132.1
|
|
80
|
+
|
|
3
81
|
## 0.132.0
|
|
4
82
|
|
|
5
83
|
### Minor Changes
|
|
@@ -158,11 +158,12 @@ export declare function initValContent(config: ValConfig, valModules: ValModules
|
|
|
158
158
|
* `process.env.VAL_API_KEY` is undefined in a bundle built separately from
|
|
159
159
|
* its dependencies.
|
|
160
160
|
*
|
|
161
|
-
* `
|
|
162
|
-
*
|
|
163
|
-
* these readers and the API have to be given the same one or a
|
|
164
|
-
*
|
|
165
|
-
* running.
|
|
161
|
+
* `git`, where the project has a repository, is what makes this more than
|
|
162
|
+
* bookkeeping: it decides which commit the `.val.ts` mirror is produced
|
|
163
|
+
* against, so these readers and the API have to be given the same one or a
|
|
164
|
+
* publish patches a different version of the file than the site is
|
|
165
|
+
* running. A project with no repository passes no `git` at all, and there
|
|
166
|
+
* is nothing here that can then disagree.
|
|
166
167
|
*/
|
|
167
168
|
http?: ValHttpMode;
|
|
168
169
|
}): {
|
|
@@ -13,10 +13,20 @@ export type ValHttpMode = {
|
|
|
13
13
|
apiKey: string;
|
|
14
14
|
/** Signs the session cookie. Any sufficiently random string. */
|
|
15
15
|
valSecret: string;
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The repository this project's content is mirrored into, if it has one.
|
|
18
|
+
*
|
|
19
|
+
* OPTIONAL, and absent is the normal case for a project whose content
|
|
20
|
+
* service is the store of record: it mints its own commit shas and knows the
|
|
21
|
+
* project's branch, so there is nothing to bake into the build.
|
|
22
|
+
*
|
|
23
|
+
* Where there is one: `commit` is the commit the running code was built
|
|
24
|
+
* from, and it is load bearing. See the note at the use.
|
|
25
|
+
*/
|
|
26
|
+
git?: {
|
|
27
|
+
commit: string;
|
|
28
|
+
branch: string;
|
|
29
|
+
};
|
|
20
30
|
/**
|
|
21
31
|
* Val's content service, when it is not the real one.
|
|
22
32
|
*
|
|
@@ -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-8deeac5f.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-7d59b1f2.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-ed8bd465.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.133.0",
|
|
18
18
|
"main": "dist/valbuild-tanstack.cjs.js",
|
|
19
19
|
"module": "dist/valbuild-tanstack.esm.js",
|
|
20
20
|
"exports": {
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@valbuild/core": "0.130.0",
|
|
46
|
-
"@valbuild/language-server": "0.
|
|
47
|
-
"@valbuild/mcp": "0.
|
|
48
|
-
"@valbuild/react": "0.
|
|
49
|
-
"@valbuild/server": "0.
|
|
50
|
-
"@valbuild/shared": "0.
|
|
51
|
-
"@valbuild/ui": "0.
|
|
46
|
+
"@valbuild/language-server": "0.133.0",
|
|
47
|
+
"@valbuild/mcp": "0.133.0",
|
|
48
|
+
"@valbuild/react": "0.133.0",
|
|
49
|
+
"@valbuild/server": "0.133.0",
|
|
50
|
+
"@valbuild/shared": "0.133.0",
|
|
51
|
+
"@valbuild/ui": "0.133.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@tanstack/react-router": "^1.170.33",
|
|
@@ -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-8deeac5f.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');
|
|
@@ -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-7d59b1f2.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');
|
|
@@ -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-ed8bd465.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';
|