@valbuild/cli 0.150.23 → 0.152.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 +21 -0
- package/cli/dist/valbuild-cli-cli.cjs.dev.js +96 -2
- package/cli/dist/valbuild-cli-cli.cjs.prod.js +96 -2
- package/cli/dist/valbuild-cli-cli.esm.js +97 -3
- package/package.json +7 -7
- package/src/publish/contentHost.ts +10 -4
- package/src/publish/credentials.test.ts +3 -0
- package/src/version.ts +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @valbuild/cli
|
|
2
2
|
|
|
3
|
+
## 0.152.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`3bb76d7`](https://github.com/valbuild/val/commit/3bb76d74d82b499aa15023838d63018a70fd7ce7), [`08a3977`](https://github.com/valbuild/val/commit/08a39779dbe43702a72ae57cbf8cf29b14e64672)]:
|
|
8
|
+
- @valbuild/server@0.152.0
|
|
9
|
+
- @valbuild/shared@0.152.0
|
|
10
|
+
- @valbuild/language-server@0.152.0
|
|
11
|
+
|
|
12
|
+
## 0.151.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#1011](https://github.com/valbuild/val/pull/1011) [`4edd384`](https://github.com/valbuild/val/commit/4edd384cf04a25836df77aae6d88378f8750a761) Thanks [@freekh](https://github.com/freekh)! - Requests that `@valbuild/server` and the `val` CLI send to Val Build now carry an `x-val-client` header naming the package and its version, for example `x-val-client: @valbuild/server@0.150.24`. It lets Val Build see which versions are still in use, and which old endpoints they still call, before anything is retired. The header holds no credential and nothing about your site's visitors, and nothing changes in how your app behaves.
|
|
17
|
+
- Updated dependencies [[`33c8b80`](https://github.com/valbuild/val/commit/33c8b80f877f1c3bec3cb61ef41dea9d2efcf908), [`59faf33`](https://github.com/valbuild/val/commit/59faf332418af836617e09150fb89007e468394e), [`abf6148`](https://github.com/valbuild/val/commit/abf6148a255abe795620fede66006462bccb8322), [`1f08b65`](https://github.com/valbuild/val/commit/1f08b6517adeac27fd9e43c7bf726976daefee3b), [`a325152`](https://github.com/valbuild/val/commit/a325152856a881faec84c112fcf226828739f563), [`f5110c9`](https://github.com/valbuild/val/commit/f5110c9aa2a0a6ff0586e9f0f2a29eb1baef557d), [`04bae7e`](https://github.com/valbuild/val/commit/04bae7e54e6b191fc70f45e6f10bbce820b6069c), [`4fd35f3`](https://github.com/valbuild/val/commit/4fd35f321fe510cfb5b9b679ca14ce2b9e852d40), [`346e6fd`](https://github.com/valbuild/val/commit/346e6fdc8e242bf826ab66a729eacd9f8d4be1a6), [`b0ad7f4`](https://github.com/valbuild/val/commit/b0ad7f496f2dc0384b8df847b1d77becf617b7bf), [`3aff85e`](https://github.com/valbuild/val/commit/3aff85e9a40cb0879285b86fd41fa8167db1bb5e), [`809873c`](https://github.com/valbuild/val/commit/809873cd7dd2c17e261b7e92716397a6bb4d6e56), [`560abd9`](https://github.com/valbuild/val/commit/560abd9df36e52e63b6592b03a8040396320df00), [`be276e7`](https://github.com/valbuild/val/commit/be276e76f5849fcc421398abdb7e114f3de4d3e8), [`4dc1481`](https://github.com/valbuild/val/commit/4dc1481cfb7cad4072bdbeaeb51b2b2ad43a9f5d), [`4edd384`](https://github.com/valbuild/val/commit/4edd384cf04a25836df77aae6d88378f8750a761)]:
|
|
18
|
+
- @valbuild/server@0.151.0
|
|
19
|
+
- @valbuild/shared@0.151.0
|
|
20
|
+
- @valbuild/core@0.151.0
|
|
21
|
+
- @valbuild/tanstack-build@0.151.0
|
|
22
|
+
- @valbuild/language-server@0.151.0
|
|
23
|
+
|
|
3
24
|
## 0.150.23
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -3004,6 +3004,96 @@ async function buildArtifacts(options) {
|
|
|
3004
3004
|
}
|
|
3005
3005
|
}
|
|
3006
3006
|
|
|
3007
|
+
var packageJson = {
|
|
3008
|
+
name: "@valbuild/cli",
|
|
3009
|
+
"private": false,
|
|
3010
|
+
version: "0.152.0",
|
|
3011
|
+
description: "Val CLI tools",
|
|
3012
|
+
repository: {
|
|
3013
|
+
type: "git",
|
|
3014
|
+
url: "git+https://github.com/valbuild/val.git"
|
|
3015
|
+
},
|
|
3016
|
+
bin: {
|
|
3017
|
+
val: "./bin.js"
|
|
3018
|
+
},
|
|
3019
|
+
exports: {
|
|
3020
|
+
"./cli": {
|
|
3021
|
+
module: "./cli/dist/valbuild-cli-cli.esm.js",
|
|
3022
|
+
"default": "./cli/dist/valbuild-cli-cli.cjs.js"
|
|
3023
|
+
},
|
|
3024
|
+
"./package.json": "./package.json"
|
|
3025
|
+
},
|
|
3026
|
+
scripts: {
|
|
3027
|
+
start: "tsx src/cli.ts --",
|
|
3028
|
+
typecheck: "tsc --noEmit"
|
|
3029
|
+
},
|
|
3030
|
+
dependencies: {
|
|
3031
|
+
"@valbuild/core": "workspace:*",
|
|
3032
|
+
"@valbuild/eslint-plugin": "workspace:*",
|
|
3033
|
+
"@valbuild/language-server": "workspace:*",
|
|
3034
|
+
"@valbuild/server": "workspace:*",
|
|
3035
|
+
"@valbuild/shared": "workspace:*",
|
|
3036
|
+
chalk: "^6.0.0",
|
|
3037
|
+
chokidar: "^5.0.0",
|
|
3038
|
+
"fast-glob": "^3.3.3",
|
|
3039
|
+
jszip: "^3.10.1",
|
|
3040
|
+
meow: "^9.0.0",
|
|
3041
|
+
picocolors: "^1.1.1",
|
|
3042
|
+
zod: "^4.4.3",
|
|
3043
|
+
"zod-validation-error": "^5.0.0"
|
|
3044
|
+
},
|
|
3045
|
+
peerDependencies: {
|
|
3046
|
+
prettier: "*",
|
|
3047
|
+
typescript: ">=5.0.0",
|
|
3048
|
+
"@valbuild/tanstack-build": "workspace:^",
|
|
3049
|
+
rolldown: ">=1.2.5",
|
|
3050
|
+
"@tanstack/router-generator": ">=1.167.0",
|
|
3051
|
+
"@tanstack/router-plugin": ">=1.168.0"
|
|
3052
|
+
},
|
|
3053
|
+
peerDependenciesMeta: {
|
|
3054
|
+
"@valbuild/tanstack-build": {
|
|
3055
|
+
optional: true
|
|
3056
|
+
},
|
|
3057
|
+
rolldown: {
|
|
3058
|
+
optional: true
|
|
3059
|
+
},
|
|
3060
|
+
"@tanstack/router-generator": {
|
|
3061
|
+
optional: true
|
|
3062
|
+
},
|
|
3063
|
+
"@tanstack/router-plugin": {
|
|
3064
|
+
optional: true
|
|
3065
|
+
}
|
|
3066
|
+
},
|
|
3067
|
+
preconstruct: {
|
|
3068
|
+
entrypoints: [
|
|
3069
|
+
"cli.ts"
|
|
3070
|
+
]
|
|
3071
|
+
},
|
|
3072
|
+
engines: {
|
|
3073
|
+
node: "^22.13.0 || >=23.5.0"
|
|
3074
|
+
},
|
|
3075
|
+
devDependencies: {
|
|
3076
|
+
"@jest/globals": "^30.5.0",
|
|
3077
|
+
"@prettier/sync": "^0.6.1",
|
|
3078
|
+
"@tanstack/router-generator": "1.167.32",
|
|
3079
|
+
"@tanstack/router-plugin": "1.168.34",
|
|
3080
|
+
"@valbuild/tanstack-build": "workspace:*",
|
|
3081
|
+
prettier: "~3.8.5",
|
|
3082
|
+
rolldown: "1.2.9",
|
|
3083
|
+
tsx: "^4.23.12"
|
|
3084
|
+
}
|
|
3085
|
+
};
|
|
3086
|
+
|
|
3087
|
+
/**
|
|
3088
|
+
* This package's version, inlined at build time.
|
|
3089
|
+
*
|
|
3090
|
+
* The same static JSON import `@valbuild/server` uses (see its
|
|
3091
|
+
* `src/version.ts`): `require` does not exist in an ESM bundle, and
|
|
3092
|
+
* preconstruct inlines the import. A default import because preconstruct's
|
|
3093
|
+
* `@rollup/plugin-json` is configured `namedExports: false`.
|
|
3094
|
+
*/
|
|
3095
|
+
const VERSION = packageJson.version;
|
|
3096
|
+
|
|
3007
3097
|
/**
|
|
3008
3098
|
* The one host `val publish` talks to.
|
|
3009
3099
|
*
|
|
@@ -3094,8 +3184,12 @@ async function requestJson(options) {
|
|
|
3094
3184
|
try {
|
|
3095
3185
|
res = await fetchImpl(options.url, {
|
|
3096
3186
|
method: options.method,
|
|
3097
|
-
headers:
|
|
3098
|
-
|
|
3187
|
+
headers: {
|
|
3188
|
+
// Which `val` is asking. See `VAL_CLIENT_HEADER` in @valbuild/shared.
|
|
3189
|
+
...internal.valClientHeaders("@valbuild/cli", VERSION),
|
|
3190
|
+
...(options.method === "GET" ? {} : {
|
|
3191
|
+
"Content-Type": "application/json"
|
|
3192
|
+
}),
|
|
3099
3193
|
...options.headers
|
|
3100
3194
|
},
|
|
3101
3195
|
...(options.method === "GET" ? {} : {
|
|
@@ -3004,6 +3004,96 @@ async function buildArtifacts(options) {
|
|
|
3004
3004
|
}
|
|
3005
3005
|
}
|
|
3006
3006
|
|
|
3007
|
+
var packageJson = {
|
|
3008
|
+
name: "@valbuild/cli",
|
|
3009
|
+
"private": false,
|
|
3010
|
+
version: "0.152.0",
|
|
3011
|
+
description: "Val CLI tools",
|
|
3012
|
+
repository: {
|
|
3013
|
+
type: "git",
|
|
3014
|
+
url: "git+https://github.com/valbuild/val.git"
|
|
3015
|
+
},
|
|
3016
|
+
bin: {
|
|
3017
|
+
val: "./bin.js"
|
|
3018
|
+
},
|
|
3019
|
+
exports: {
|
|
3020
|
+
"./cli": {
|
|
3021
|
+
module: "./cli/dist/valbuild-cli-cli.esm.js",
|
|
3022
|
+
"default": "./cli/dist/valbuild-cli-cli.cjs.js"
|
|
3023
|
+
},
|
|
3024
|
+
"./package.json": "./package.json"
|
|
3025
|
+
},
|
|
3026
|
+
scripts: {
|
|
3027
|
+
start: "tsx src/cli.ts --",
|
|
3028
|
+
typecheck: "tsc --noEmit"
|
|
3029
|
+
},
|
|
3030
|
+
dependencies: {
|
|
3031
|
+
"@valbuild/core": "workspace:*",
|
|
3032
|
+
"@valbuild/eslint-plugin": "workspace:*",
|
|
3033
|
+
"@valbuild/language-server": "workspace:*",
|
|
3034
|
+
"@valbuild/server": "workspace:*",
|
|
3035
|
+
"@valbuild/shared": "workspace:*",
|
|
3036
|
+
chalk: "^6.0.0",
|
|
3037
|
+
chokidar: "^5.0.0",
|
|
3038
|
+
"fast-glob": "^3.3.3",
|
|
3039
|
+
jszip: "^3.10.1",
|
|
3040
|
+
meow: "^9.0.0",
|
|
3041
|
+
picocolors: "^1.1.1",
|
|
3042
|
+
zod: "^4.4.3",
|
|
3043
|
+
"zod-validation-error": "^5.0.0"
|
|
3044
|
+
},
|
|
3045
|
+
peerDependencies: {
|
|
3046
|
+
prettier: "*",
|
|
3047
|
+
typescript: ">=5.0.0",
|
|
3048
|
+
"@valbuild/tanstack-build": "workspace:^",
|
|
3049
|
+
rolldown: ">=1.2.5",
|
|
3050
|
+
"@tanstack/router-generator": ">=1.167.0",
|
|
3051
|
+
"@tanstack/router-plugin": ">=1.168.0"
|
|
3052
|
+
},
|
|
3053
|
+
peerDependenciesMeta: {
|
|
3054
|
+
"@valbuild/tanstack-build": {
|
|
3055
|
+
optional: true
|
|
3056
|
+
},
|
|
3057
|
+
rolldown: {
|
|
3058
|
+
optional: true
|
|
3059
|
+
},
|
|
3060
|
+
"@tanstack/router-generator": {
|
|
3061
|
+
optional: true
|
|
3062
|
+
},
|
|
3063
|
+
"@tanstack/router-plugin": {
|
|
3064
|
+
optional: true
|
|
3065
|
+
}
|
|
3066
|
+
},
|
|
3067
|
+
preconstruct: {
|
|
3068
|
+
entrypoints: [
|
|
3069
|
+
"cli.ts"
|
|
3070
|
+
]
|
|
3071
|
+
},
|
|
3072
|
+
engines: {
|
|
3073
|
+
node: "^22.13.0 || >=23.5.0"
|
|
3074
|
+
},
|
|
3075
|
+
devDependencies: {
|
|
3076
|
+
"@jest/globals": "^30.5.0",
|
|
3077
|
+
"@prettier/sync": "^0.6.1",
|
|
3078
|
+
"@tanstack/router-generator": "1.167.32",
|
|
3079
|
+
"@tanstack/router-plugin": "1.168.34",
|
|
3080
|
+
"@valbuild/tanstack-build": "workspace:*",
|
|
3081
|
+
prettier: "~3.8.5",
|
|
3082
|
+
rolldown: "1.2.9",
|
|
3083
|
+
tsx: "^4.23.12"
|
|
3084
|
+
}
|
|
3085
|
+
};
|
|
3086
|
+
|
|
3087
|
+
/**
|
|
3088
|
+
* This package's version, inlined at build time.
|
|
3089
|
+
*
|
|
3090
|
+
* The same static JSON import `@valbuild/server` uses (see its
|
|
3091
|
+
* `src/version.ts`): `require` does not exist in an ESM bundle, and
|
|
3092
|
+
* preconstruct inlines the import. A default import because preconstruct's
|
|
3093
|
+
* `@rollup/plugin-json` is configured `namedExports: false`.
|
|
3094
|
+
*/
|
|
3095
|
+
const VERSION = packageJson.version;
|
|
3096
|
+
|
|
3007
3097
|
/**
|
|
3008
3098
|
* The one host `val publish` talks to.
|
|
3009
3099
|
*
|
|
@@ -3094,8 +3184,12 @@ async function requestJson(options) {
|
|
|
3094
3184
|
try {
|
|
3095
3185
|
res = await fetchImpl(options.url, {
|
|
3096
3186
|
method: options.method,
|
|
3097
|
-
headers:
|
|
3098
|
-
|
|
3187
|
+
headers: {
|
|
3188
|
+
// Which `val` is asking. See `VAL_CLIENT_HEADER` in @valbuild/shared.
|
|
3189
|
+
...internal.valClientHeaders("@valbuild/cli", VERSION),
|
|
3190
|
+
...(options.method === "GET" ? {} : {
|
|
3191
|
+
"Content-Type": "application/json"
|
|
3192
|
+
}),
|
|
3099
3193
|
...options.headers
|
|
3100
3194
|
},
|
|
3101
3195
|
...(options.method === "GET" ? {} : {
|
|
@@ -6,7 +6,7 @@ import { glob } from 'fast-glob';
|
|
|
6
6
|
import { Internal, DEFAULT_VAL_REMOTE_HOST, DEFAULT_CONTENT_HOST } from '@valbuild/core';
|
|
7
7
|
import { createPrettierFormatter, askOncePerHost, createService, createValModuleFileInspector, fixHandlers, createFixPatch, getModulePathRange, findJsonEntryFilePath, createJsonEntryPathMap, createModulePathMap, findAndEvalValConfigFile, getSettings, uploadRemoteFile, createDefaultValFSHost, filesOfVideo, startValLogin, awaitValLoginConfirmation, persistPersonalAccessToken, ValLoginError, loadValModules, safeReadGit, ValOpsHttp, ValOpsFS, getPersonalAccessTokenPath, parsePersonalAccessTokenFile, formatPatchSourceError, APP_MODE_REQUIRES_REMOTE_FILES } from '@valbuild/server';
|
|
8
8
|
import fs from 'fs/promises';
|
|
9
|
-
import { resolveSchemaSourceFixes, isRepairedOnSave, traverseSchemaSource, parseBuildTarget, parseDeclare, parseArtifacts, parseVerify, parsePromote, parseStatus, parsePublishToken, PublishProtocolError, parseProblems } from '@valbuild/shared/internal';
|
|
9
|
+
import { resolveSchemaSourceFixes, isRepairedOnSave, traverseSchemaSource, valClientHeaders, parseBuildTarget, parseDeclare, parseArtifacts, parseVerify, parsePromote, parseStatus, parsePublishToken, PublishProtocolError, parseProblems } from '@valbuild/shared/internal';
|
|
10
10
|
import fs$1 from 'fs';
|
|
11
11
|
import ts from 'typescript';
|
|
12
12
|
import { spawn } from 'child_process';
|
|
@@ -2969,6 +2969,96 @@ async function buildArtifacts(options) {
|
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
2971
|
|
|
2972
|
+
var packageJson = {
|
|
2973
|
+
name: "@valbuild/cli",
|
|
2974
|
+
"private": false,
|
|
2975
|
+
version: "0.152.0",
|
|
2976
|
+
description: "Val CLI tools",
|
|
2977
|
+
repository: {
|
|
2978
|
+
type: "git",
|
|
2979
|
+
url: "git+https://github.com/valbuild/val.git"
|
|
2980
|
+
},
|
|
2981
|
+
bin: {
|
|
2982
|
+
val: "./bin.js"
|
|
2983
|
+
},
|
|
2984
|
+
exports: {
|
|
2985
|
+
"./cli": {
|
|
2986
|
+
module: "./cli/dist/valbuild-cli-cli.esm.js",
|
|
2987
|
+
"default": "./cli/dist/valbuild-cli-cli.cjs.js"
|
|
2988
|
+
},
|
|
2989
|
+
"./package.json": "./package.json"
|
|
2990
|
+
},
|
|
2991
|
+
scripts: {
|
|
2992
|
+
start: "tsx src/cli.ts --",
|
|
2993
|
+
typecheck: "tsc --noEmit"
|
|
2994
|
+
},
|
|
2995
|
+
dependencies: {
|
|
2996
|
+
"@valbuild/core": "workspace:*",
|
|
2997
|
+
"@valbuild/eslint-plugin": "workspace:*",
|
|
2998
|
+
"@valbuild/language-server": "workspace:*",
|
|
2999
|
+
"@valbuild/server": "workspace:*",
|
|
3000
|
+
"@valbuild/shared": "workspace:*",
|
|
3001
|
+
chalk: "^6.0.0",
|
|
3002
|
+
chokidar: "^5.0.0",
|
|
3003
|
+
"fast-glob": "^3.3.3",
|
|
3004
|
+
jszip: "^3.10.1",
|
|
3005
|
+
meow: "^9.0.0",
|
|
3006
|
+
picocolors: "^1.1.1",
|
|
3007
|
+
zod: "^4.4.3",
|
|
3008
|
+
"zod-validation-error": "^5.0.0"
|
|
3009
|
+
},
|
|
3010
|
+
peerDependencies: {
|
|
3011
|
+
prettier: "*",
|
|
3012
|
+
typescript: ">=5.0.0",
|
|
3013
|
+
"@valbuild/tanstack-build": "workspace:^",
|
|
3014
|
+
rolldown: ">=1.2.5",
|
|
3015
|
+
"@tanstack/router-generator": ">=1.167.0",
|
|
3016
|
+
"@tanstack/router-plugin": ">=1.168.0"
|
|
3017
|
+
},
|
|
3018
|
+
peerDependenciesMeta: {
|
|
3019
|
+
"@valbuild/tanstack-build": {
|
|
3020
|
+
optional: true
|
|
3021
|
+
},
|
|
3022
|
+
rolldown: {
|
|
3023
|
+
optional: true
|
|
3024
|
+
},
|
|
3025
|
+
"@tanstack/router-generator": {
|
|
3026
|
+
optional: true
|
|
3027
|
+
},
|
|
3028
|
+
"@tanstack/router-plugin": {
|
|
3029
|
+
optional: true
|
|
3030
|
+
}
|
|
3031
|
+
},
|
|
3032
|
+
preconstruct: {
|
|
3033
|
+
entrypoints: [
|
|
3034
|
+
"cli.ts"
|
|
3035
|
+
]
|
|
3036
|
+
},
|
|
3037
|
+
engines: {
|
|
3038
|
+
node: "^22.13.0 || >=23.5.0"
|
|
3039
|
+
},
|
|
3040
|
+
devDependencies: {
|
|
3041
|
+
"@jest/globals": "^30.5.0",
|
|
3042
|
+
"@prettier/sync": "^0.6.1",
|
|
3043
|
+
"@tanstack/router-generator": "1.167.32",
|
|
3044
|
+
"@tanstack/router-plugin": "1.168.34",
|
|
3045
|
+
"@valbuild/tanstack-build": "workspace:*",
|
|
3046
|
+
prettier: "~3.8.5",
|
|
3047
|
+
rolldown: "1.2.9",
|
|
3048
|
+
tsx: "^4.23.12"
|
|
3049
|
+
}
|
|
3050
|
+
};
|
|
3051
|
+
|
|
3052
|
+
/**
|
|
3053
|
+
* This package's version, inlined at build time.
|
|
3054
|
+
*
|
|
3055
|
+
* The same static JSON import `@valbuild/server` uses (see its
|
|
3056
|
+
* `src/version.ts`): `require` does not exist in an ESM bundle, and
|
|
3057
|
+
* preconstruct inlines the import. A default import because preconstruct's
|
|
3058
|
+
* `@rollup/plugin-json` is configured `namedExports: false`.
|
|
3059
|
+
*/
|
|
3060
|
+
const VERSION = packageJson.version;
|
|
3061
|
+
|
|
2972
3062
|
/**
|
|
2973
3063
|
* The one host `val publish` talks to.
|
|
2974
3064
|
*
|
|
@@ -3059,8 +3149,12 @@ async function requestJson(options) {
|
|
|
3059
3149
|
try {
|
|
3060
3150
|
res = await fetchImpl(options.url, {
|
|
3061
3151
|
method: options.method,
|
|
3062
|
-
headers:
|
|
3063
|
-
|
|
3152
|
+
headers: {
|
|
3153
|
+
// Which `val` is asking. See `VAL_CLIENT_HEADER` in @valbuild/shared.
|
|
3154
|
+
...valClientHeaders("@valbuild/cli", VERSION),
|
|
3155
|
+
...(options.method === "GET" ? {} : {
|
|
3156
|
+
"Content-Type": "application/json"
|
|
3157
|
+
}),
|
|
3064
3158
|
...options.headers
|
|
3065
3159
|
},
|
|
3066
3160
|
...(options.method === "GET" ? {} : {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valbuild/cli",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.152.0",
|
|
5
5
|
"description": "Val CLI tools",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"picocolors": "^1.1.1",
|
|
27
27
|
"zod": "^4.4.3",
|
|
28
28
|
"zod-validation-error": "^5.0.0",
|
|
29
|
-
"@valbuild/core": "0.
|
|
29
|
+
"@valbuild/core": "0.151.0",
|
|
30
30
|
"@valbuild/eslint-plugin": "0.150.13",
|
|
31
|
-
"@valbuild/language-server": "0.
|
|
32
|
-
"@valbuild/server": "0.
|
|
33
|
-
"@valbuild/shared": "0.
|
|
31
|
+
"@valbuild/language-server": "0.152.0",
|
|
32
|
+
"@valbuild/server": "0.152.0",
|
|
33
|
+
"@valbuild/shared": "0.152.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"prettier": "*",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"rolldown": ">=1.2.5",
|
|
39
39
|
"@tanstack/router-generator": ">=1.167.0",
|
|
40
40
|
"@tanstack/router-plugin": ">=1.168.0",
|
|
41
|
-
"@valbuild/tanstack-build": "^0.
|
|
41
|
+
"@valbuild/tanstack-build": "^0.151.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"@valbuild/tanstack-build": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"prettier": "~3.8.5",
|
|
71
71
|
"rolldown": "1.2.9",
|
|
72
72
|
"tsx": "^4.23.12",
|
|
73
|
-
"@valbuild/tanstack-build": "0.
|
|
73
|
+
"@valbuild/tanstack-build": "0.151.0"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"start": "tsx src/cli.ts --",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_CONTENT_HOST } from "@valbuild/core";
|
|
2
|
+
import { valClientHeaders } from "@valbuild/shared/internal";
|
|
3
|
+
import { VERSION } from "../version";
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* The one host `val publish` talks to.
|
|
@@ -105,10 +107,14 @@ async function requestJson(options: {
|
|
|
105
107
|
try {
|
|
106
108
|
res = await fetchImpl(options.url, {
|
|
107
109
|
method: options.method,
|
|
108
|
-
headers:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
headers: {
|
|
111
|
+
// Which `val` is asking. See `VAL_CLIENT_HEADER` in @valbuild/shared.
|
|
112
|
+
...valClientHeaders("@valbuild/cli", VERSION),
|
|
113
|
+
...(options.method === "GET"
|
|
114
|
+
? {}
|
|
115
|
+
: { "Content-Type": "application/json" }),
|
|
116
|
+
...options.headers,
|
|
117
|
+
},
|
|
112
118
|
...(options.method === "GET"
|
|
113
119
|
? {}
|
|
114
120
|
: { body: JSON.stringify(options.body ?? {}) }),
|
|
@@ -3,6 +3,7 @@ import http from "http";
|
|
|
3
3
|
import os from "os";
|
|
4
4
|
import path from "path";
|
|
5
5
|
import { resolvePublishCredential } from "./credentials";
|
|
6
|
+
import { VERSION } from "../version";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* A fake content service.
|
|
@@ -167,6 +168,8 @@ describe("the publish credential", () => {
|
|
|
167
168
|
// further: what publishes is the ten minute token that came back.
|
|
168
169
|
expect(request.headers["x-val-pat"]).toBe(A_PAT);
|
|
169
170
|
expect(request.headers.authorization).toBeUndefined();
|
|
171
|
+
// Which `val` asked, so Val Build can tell old CLIs from new ones.
|
|
172
|
+
expect(request.headers["x-val-client"]).toBe(`@valbuild/cli@${VERSION}`);
|
|
170
173
|
} finally {
|
|
171
174
|
await content.close();
|
|
172
175
|
}
|
package/src/version.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This package's version, inlined at build time.
|
|
3
|
+
*
|
|
4
|
+
* The same static JSON import `@valbuild/server` uses (see its
|
|
5
|
+
* `src/version.ts`): `require` does not exist in an ESM bundle, and
|
|
6
|
+
* preconstruct inlines the import. A default import because preconstruct's
|
|
7
|
+
* `@rollup/plugin-json` is configured `namedExports: false`.
|
|
8
|
+
*/
|
|
9
|
+
import packageJson from "../package.json";
|
|
10
|
+
|
|
11
|
+
export const VERSION: string = packageJson.version;
|