@valbuild/server 0.150.11 → 0.150.13
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 +23 -0
- package/browser/dist/valbuild-server-browser.cjs.dev.js +5 -2
- package/browser/dist/valbuild-server-browser.cjs.prod.js +5 -2
- package/browser/dist/valbuild-server-browser.esm.js +5 -2
- package/dist/{ValRouterCore-89be7c3e.cjs.prod.js → ValRouterCore-e5a916eb.cjs.prod.js} +108 -1
- package/dist/{ValRouterCore-9a04a007.esm.js → ValRouterCore-f328843e.esm.js} +108 -1
- package/dist/{ValRouterCore-e0824c6c.cjs.dev.js → ValRouterCore-f5d6d448.cjs.dev.js} +108 -1
- package/dist/declarations/src/ValRouter.d.ts +6 -0
- package/dist/declarations/src/ValServer.d.ts +9 -0
- package/dist/declarations/src/browser/inTabFetch.d.ts +3 -0
- package/dist/{getJsonEntryAtCommit-a0304334.esm.js → getJsonEntryAtCommit-08387cef.esm.js} +1 -1
- package/dist/{getJsonEntryAtCommit-067eaced.cjs.dev.js → getJsonEntryAtCommit-e1946be3.cjs.dev.js} +1 -1
- package/dist/{getJsonEntryAtCommit-f6ae1e72.cjs.prod.js → getJsonEntryAtCommit-fbd7665f.cjs.prod.js} +1 -1
- package/dist/valbuild-server.cjs.dev.js +8 -1
- package/dist/valbuild-server.cjs.prod.js +8 -1
- package/dist/valbuild-server.esm.js +9 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @valbuild/server
|
|
2
2
|
|
|
3
|
+
## 0.150.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`295a925`](https://github.com/valbuild/val/commit/295a92513fe0356fafc78978bd0a6d32866f1dbe), [`0cd38eb`](https://github.com/valbuild/val/commit/0cd38eb62c80e2b3989aa45a6c9c75b02fc27cd1), [`0e490a9`](https://github.com/valbuild/val/commit/0e490a9b6e44b1e3d70e914d2b16009335124c4b)]:
|
|
8
|
+
- @valbuild/ui@0.150.13
|
|
9
|
+
- @valbuild/shared@0.150.13
|
|
10
|
+
|
|
11
|
+
## 0.150.12
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#977](https://github.com/valbuild/val/pull/977) [`55f565e`](https://github.com/valbuild/val/commit/55f565eefe470d1a7cda436d628aec2f7ad61969) Thanks [@freekh](https://github.com/freekh)! - The Studio now shows which versions of Val it runs. Open the Account panel (the button at the foot of the left rail) and click the grey line at the bottom, for example `TanStack · Val 0.150.8`, to see:
|
|
16
|
+
|
|
17
|
+
- what your app's server runs: `@valbuild/next` or `@valbuild/tanstack`, `@valbuild/core` and `@valbuild/server`
|
|
18
|
+
- what the Studio in your browser loaded: `@valbuild/ui`, and the `@valbuild/core` bundled into it
|
|
19
|
+
|
|
20
|
+
**Copy all** puts the list on the clipboard, ready to paste into a bug report. The server's half comes from a new `GET /api/val/versions` route, which needs the same sign-in as the rest of the Studio. If your server's Val is older than the Studio, the list says so and still shows the Studio's half.
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`e39a373`](https://github.com/valbuild/val/commit/e39a3730624cbf3a5434d4fb0d13be26f44280db), [`d47537a`](https://github.com/valbuild/val/commit/d47537a40ca7ca0c6a5e7b80f1dfb18791fc5bc1), [`55f565e`](https://github.com/valbuild/val/commit/55f565eefe470d1a7cda436d628aec2f7ad61969)]:
|
|
23
|
+
- @valbuild/ui@0.150.12
|
|
24
|
+
- @valbuild/shared@0.150.12
|
|
25
|
+
|
|
3
26
|
## 0.150.11
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var core = require('@valbuild/core');
|
|
6
|
-
var ValRouterCore = require('../../dist/ValRouterCore-
|
|
6
|
+
var ValRouterCore = require('../../dist/ValRouterCore-f5d6d448.cjs.dev.js');
|
|
7
7
|
require('@valbuild/shared/internal');
|
|
8
8
|
require('zod');
|
|
9
9
|
require('zod-validation-error');
|
|
@@ -92,7 +92,10 @@ function createInTabValFetch(valModules, options) {
|
|
|
92
92
|
patchStore: options.patchStore,
|
|
93
93
|
unsafelyAllowUnauthenticated: true,
|
|
94
94
|
valContentUrl: core.DEFAULT_CONTENT_HOST,
|
|
95
|
-
config: options.config
|
|
95
|
+
config: options.config,
|
|
96
|
+
...(options.framework !== undefined ? {
|
|
97
|
+
framework: options.framework
|
|
98
|
+
} : {})
|
|
96
99
|
};
|
|
97
100
|
const server = ValRouterCore.ValServer(valModules, serverConfig, {
|
|
98
101
|
// Draft content is the only content a demo has.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var core = require('@valbuild/core');
|
|
6
|
-
var ValRouterCore = require('../../dist/ValRouterCore-
|
|
6
|
+
var ValRouterCore = require('../../dist/ValRouterCore-e5a916eb.cjs.prod.js');
|
|
7
7
|
require('@valbuild/shared/internal');
|
|
8
8
|
require('zod');
|
|
9
9
|
require('zod-validation-error');
|
|
@@ -92,7 +92,10 @@ function createInTabValFetch(valModules, options) {
|
|
|
92
92
|
patchStore: options.patchStore,
|
|
93
93
|
unsafelyAllowUnauthenticated: true,
|
|
94
94
|
valContentUrl: core.DEFAULT_CONTENT_HOST,
|
|
95
|
-
config: options.config
|
|
95
|
+
config: options.config,
|
|
96
|
+
...(options.framework !== undefined ? {
|
|
97
|
+
framework: options.framework
|
|
98
|
+
} : {})
|
|
96
99
|
};
|
|
97
100
|
const server = ValRouterCore.ValServer(valModules, serverConfig, {
|
|
98
101
|
// Draft content is the only content a demo has.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_CONTENT_HOST } from '@valbuild/core';
|
|
2
|
-
import { j as ValOpsMemory, E as bytesToBase64, y as ValServer, z as createValRequestHandler } from '../../dist/ValRouterCore-
|
|
2
|
+
import { j as ValOpsMemory, E as bytesToBase64, y as ValServer, z as createValRequestHandler } from '../../dist/ValRouterCore-f328843e.esm.js';
|
|
3
3
|
import '@valbuild/shared/internal';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'zod-validation-error';
|
|
@@ -88,7 +88,10 @@ function createInTabValFetch(valModules, options) {
|
|
|
88
88
|
patchStore: options.patchStore,
|
|
89
89
|
unsafelyAllowUnauthenticated: true,
|
|
90
90
|
valContentUrl: DEFAULT_CONTENT_HOST,
|
|
91
|
-
config: options.config
|
|
91
|
+
config: options.config,
|
|
92
|
+
...(options.framework !== undefined ? {
|
|
93
|
+
framework: options.framework
|
|
94
|
+
} : {})
|
|
92
95
|
};
|
|
93
96
|
const server = ValServer(valModules, serverConfig, {
|
|
94
97
|
// Draft content is the only content a demo has.
|
|
@@ -5475,6 +5475,78 @@ function mapStatus(status) {
|
|
|
5475
5475
|
return 500;
|
|
5476
5476
|
}
|
|
5477
5477
|
|
|
5478
|
+
var packageJson = {
|
|
5479
|
+
name: "@valbuild/server",
|
|
5480
|
+
"private": false,
|
|
5481
|
+
description: "Val - integrated server",
|
|
5482
|
+
repository: {
|
|
5483
|
+
type: "git",
|
|
5484
|
+
url: "git+https://github.com/valbuild/val.git"
|
|
5485
|
+
},
|
|
5486
|
+
main: "dist/valbuild-server.cjs.js",
|
|
5487
|
+
module: "dist/valbuild-server.esm.js",
|
|
5488
|
+
exports: {
|
|
5489
|
+
".": {
|
|
5490
|
+
module: "./dist/valbuild-server.esm.js",
|
|
5491
|
+
"default": "./dist/valbuild-server.cjs.js"
|
|
5492
|
+
},
|
|
5493
|
+
"./browser": {
|
|
5494
|
+
module: "./browser/dist/valbuild-server-browser.esm.js",
|
|
5495
|
+
"default": "./browser/dist/valbuild-server-browser.cjs.js"
|
|
5496
|
+
},
|
|
5497
|
+
"./package.json": "./package.json"
|
|
5498
|
+
},
|
|
5499
|
+
types: "dist/valbuild-server.cjs.d.ts",
|
|
5500
|
+
preconstruct: {
|
|
5501
|
+
entrypoints: [
|
|
5502
|
+
"./index.ts",
|
|
5503
|
+
"./browser/index.ts"
|
|
5504
|
+
],
|
|
5505
|
+
exports: true
|
|
5506
|
+
},
|
|
5507
|
+
version: "0.150.13",
|
|
5508
|
+
scripts: {
|
|
5509
|
+
typecheck: "tsc --noEmit",
|
|
5510
|
+
test: "jest",
|
|
5511
|
+
"test:watch": "jest --watch"
|
|
5512
|
+
},
|
|
5513
|
+
devDependencies: {
|
|
5514
|
+
"@prettier/sync": "^0.6.1",
|
|
5515
|
+
"@types/jest": "^30.0.0",
|
|
5516
|
+
prettier: "~3.8.5"
|
|
5517
|
+
},
|
|
5518
|
+
dependencies: {
|
|
5519
|
+
"@valbuild/core": "workspace:*",
|
|
5520
|
+
"@valbuild/shared": "workspace:*",
|
|
5521
|
+
"@valbuild/ui": "workspace:*",
|
|
5522
|
+
chokidar: "^5.0.0",
|
|
5523
|
+
"image-size": "^2.0.2",
|
|
5524
|
+
minimatch: "^10.2.6",
|
|
5525
|
+
sucrase: "^3.35.1",
|
|
5526
|
+
typescript: "^6.0.3",
|
|
5527
|
+
zod: "^4.4.3",
|
|
5528
|
+
"zod-validation-error": "^5.0.0"
|
|
5529
|
+
},
|
|
5530
|
+
engines: {
|
|
5531
|
+
node: "^20.19.0 || >=22"
|
|
5532
|
+
},
|
|
5533
|
+
files: [
|
|
5534
|
+
"CHANGELOG.md",
|
|
5535
|
+
"dist",
|
|
5536
|
+
"browser"
|
|
5537
|
+
]
|
|
5538
|
+
};
|
|
5539
|
+
|
|
5540
|
+
/**
|
|
5541
|
+
* This package's version, inlined at build time.
|
|
5542
|
+
*
|
|
5543
|
+
* The same static JSON import `@valbuild/next` and `@valbuild/tanstack` use,
|
|
5544
|
+
* for the reason theirs gives: `require` does not exist in an ESM bundle, and
|
|
5545
|
+
* preconstruct inlines the import. Read by the Studio's version list
|
|
5546
|
+
* (`/versions`), which is the only place it is shown.
|
|
5547
|
+
*/
|
|
5548
|
+
const VERSION = packageJson.version;
|
|
5549
|
+
|
|
5478
5550
|
/** What {@link ValServerOptions.publishOverride} is given. */
|
|
5479
5551
|
|
|
5480
5552
|
/** What a publish reports back, in either shape. */
|
|
@@ -6378,6 +6450,41 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
6378
6450
|
};
|
|
6379
6451
|
}
|
|
6380
6452
|
},
|
|
6453
|
+
/*
|
|
6454
|
+
* The versions of Val's packages on the server, for the list at the foot
|
|
6455
|
+
* of the Studio's account panel. Behind the same sign-in as everything
|
|
6456
|
+
* else: a version is a small thing to give away, but it says which
|
|
6457
|
+
* advisories a site is open to.
|
|
6458
|
+
*/
|
|
6459
|
+
"/versions": {
|
|
6460
|
+
GET: async req => {
|
|
6461
|
+
const auth = getAuth(req.cookies);
|
|
6462
|
+
if (auth.error) {
|
|
6463
|
+
return {
|
|
6464
|
+
status: 401,
|
|
6465
|
+
json: {
|
|
6466
|
+
message: auth.error
|
|
6467
|
+
}
|
|
6468
|
+
};
|
|
6469
|
+
}
|
|
6470
|
+
if (isHttpOps(serverOps) && !("id" in auth)) {
|
|
6471
|
+
return {
|
|
6472
|
+
status: 401,
|
|
6473
|
+
json: {
|
|
6474
|
+
message: "Unauthorized"
|
|
6475
|
+
}
|
|
6476
|
+
};
|
|
6477
|
+
}
|
|
6478
|
+
return {
|
|
6479
|
+
status: 200,
|
|
6480
|
+
json: {
|
|
6481
|
+
framework: options.framework ?? null,
|
|
6482
|
+
core: core.Internal.VERSION.core,
|
|
6483
|
+
server: VERSION
|
|
6484
|
+
}
|
|
6485
|
+
};
|
|
6486
|
+
}
|
|
6487
|
+
},
|
|
6381
6488
|
//#region stat
|
|
6382
6489
|
"/stat": {
|
|
6383
6490
|
POST: async req => {
|
|
@@ -9135,7 +9242,7 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
9135
9242
|
// TypeScript compiler. See `patch/ts/publishKit.ts`.
|
|
9136
9243
|
const {
|
|
9137
9244
|
getJsonEntryAtCommit
|
|
9138
|
-
} = await Promise.resolve().then(function () { return require('./getJsonEntryAtCommit-
|
|
9245
|
+
} = await Promise.resolve().then(function () { return require('./getJsonEntryAtCommit-fbd7665f.cjs.prod.js'); });
|
|
9139
9246
|
const res = await getJsonEntryAtCommit(serverOps, req.query.commit_sha, req.query.path, req.query.key);
|
|
9140
9247
|
if (fp.result.isErr(res)) {
|
|
9141
9248
|
return historyErrorResponse(res.error);
|
|
@@ -5469,6 +5469,78 @@ function mapStatus(status) {
|
|
|
5469
5469
|
return 500;
|
|
5470
5470
|
}
|
|
5471
5471
|
|
|
5472
|
+
var packageJson = {
|
|
5473
|
+
name: "@valbuild/server",
|
|
5474
|
+
"private": false,
|
|
5475
|
+
description: "Val - integrated server",
|
|
5476
|
+
repository: {
|
|
5477
|
+
type: "git",
|
|
5478
|
+
url: "git+https://github.com/valbuild/val.git"
|
|
5479
|
+
},
|
|
5480
|
+
main: "dist/valbuild-server.cjs.js",
|
|
5481
|
+
module: "dist/valbuild-server.esm.js",
|
|
5482
|
+
exports: {
|
|
5483
|
+
".": {
|
|
5484
|
+
module: "./dist/valbuild-server.esm.js",
|
|
5485
|
+
"default": "./dist/valbuild-server.cjs.js"
|
|
5486
|
+
},
|
|
5487
|
+
"./browser": {
|
|
5488
|
+
module: "./browser/dist/valbuild-server-browser.esm.js",
|
|
5489
|
+
"default": "./browser/dist/valbuild-server-browser.cjs.js"
|
|
5490
|
+
},
|
|
5491
|
+
"./package.json": "./package.json"
|
|
5492
|
+
},
|
|
5493
|
+
types: "dist/valbuild-server.cjs.d.ts",
|
|
5494
|
+
preconstruct: {
|
|
5495
|
+
entrypoints: [
|
|
5496
|
+
"./index.ts",
|
|
5497
|
+
"./browser/index.ts"
|
|
5498
|
+
],
|
|
5499
|
+
exports: true
|
|
5500
|
+
},
|
|
5501
|
+
version: "0.150.13",
|
|
5502
|
+
scripts: {
|
|
5503
|
+
typecheck: "tsc --noEmit",
|
|
5504
|
+
test: "jest",
|
|
5505
|
+
"test:watch": "jest --watch"
|
|
5506
|
+
},
|
|
5507
|
+
devDependencies: {
|
|
5508
|
+
"@prettier/sync": "^0.6.1",
|
|
5509
|
+
"@types/jest": "^30.0.0",
|
|
5510
|
+
prettier: "~3.8.5"
|
|
5511
|
+
},
|
|
5512
|
+
dependencies: {
|
|
5513
|
+
"@valbuild/core": "workspace:*",
|
|
5514
|
+
"@valbuild/shared": "workspace:*",
|
|
5515
|
+
"@valbuild/ui": "workspace:*",
|
|
5516
|
+
chokidar: "^5.0.0",
|
|
5517
|
+
"image-size": "^2.0.2",
|
|
5518
|
+
minimatch: "^10.2.6",
|
|
5519
|
+
sucrase: "^3.35.1",
|
|
5520
|
+
typescript: "^6.0.3",
|
|
5521
|
+
zod: "^4.4.3",
|
|
5522
|
+
"zod-validation-error": "^5.0.0"
|
|
5523
|
+
},
|
|
5524
|
+
engines: {
|
|
5525
|
+
node: "^20.19.0 || >=22"
|
|
5526
|
+
},
|
|
5527
|
+
files: [
|
|
5528
|
+
"CHANGELOG.md",
|
|
5529
|
+
"dist",
|
|
5530
|
+
"browser"
|
|
5531
|
+
]
|
|
5532
|
+
};
|
|
5533
|
+
|
|
5534
|
+
/**
|
|
5535
|
+
* This package's version, inlined at build time.
|
|
5536
|
+
*
|
|
5537
|
+
* The same static JSON import `@valbuild/next` and `@valbuild/tanstack` use,
|
|
5538
|
+
* for the reason theirs gives: `require` does not exist in an ESM bundle, and
|
|
5539
|
+
* preconstruct inlines the import. Read by the Studio's version list
|
|
5540
|
+
* (`/versions`), which is the only place it is shown.
|
|
5541
|
+
*/
|
|
5542
|
+
const VERSION = packageJson.version;
|
|
5543
|
+
|
|
5472
5544
|
/** What {@link ValServerOptions.publishOverride} is given. */
|
|
5473
5545
|
|
|
5474
5546
|
/** What a publish reports back, in either shape. */
|
|
@@ -6372,6 +6444,41 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
6372
6444
|
};
|
|
6373
6445
|
}
|
|
6374
6446
|
},
|
|
6447
|
+
/*
|
|
6448
|
+
* The versions of Val's packages on the server, for the list at the foot
|
|
6449
|
+
* of the Studio's account panel. Behind the same sign-in as everything
|
|
6450
|
+
* else: a version is a small thing to give away, but it says which
|
|
6451
|
+
* advisories a site is open to.
|
|
6452
|
+
*/
|
|
6453
|
+
"/versions": {
|
|
6454
|
+
GET: async req => {
|
|
6455
|
+
const auth = getAuth(req.cookies);
|
|
6456
|
+
if (auth.error) {
|
|
6457
|
+
return {
|
|
6458
|
+
status: 401,
|
|
6459
|
+
json: {
|
|
6460
|
+
message: auth.error
|
|
6461
|
+
}
|
|
6462
|
+
};
|
|
6463
|
+
}
|
|
6464
|
+
if (isHttpOps(serverOps) && !("id" in auth)) {
|
|
6465
|
+
return {
|
|
6466
|
+
status: 401,
|
|
6467
|
+
json: {
|
|
6468
|
+
message: "Unauthorized"
|
|
6469
|
+
}
|
|
6470
|
+
};
|
|
6471
|
+
}
|
|
6472
|
+
return {
|
|
6473
|
+
status: 200,
|
|
6474
|
+
json: {
|
|
6475
|
+
framework: options.framework ?? null,
|
|
6476
|
+
core: Internal.VERSION.core,
|
|
6477
|
+
server: VERSION
|
|
6478
|
+
}
|
|
6479
|
+
};
|
|
6480
|
+
}
|
|
6481
|
+
},
|
|
6375
6482
|
//#region stat
|
|
6376
6483
|
"/stat": {
|
|
6377
6484
|
POST: async req => {
|
|
@@ -9129,7 +9236,7 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
9129
9236
|
// TypeScript compiler. See `patch/ts/publishKit.ts`.
|
|
9130
9237
|
const {
|
|
9131
9238
|
getJsonEntryAtCommit
|
|
9132
|
-
} = await import('./getJsonEntryAtCommit-
|
|
9239
|
+
} = await import('./getJsonEntryAtCommit-08387cef.esm.js');
|
|
9133
9240
|
const res = await getJsonEntryAtCommit(serverOps, req.query.commit_sha, req.query.path, req.query.key);
|
|
9134
9241
|
if (result.isErr(res)) {
|
|
9135
9242
|
return historyErrorResponse(res.error);
|
|
@@ -5475,6 +5475,78 @@ function mapStatus(status) {
|
|
|
5475
5475
|
return 500;
|
|
5476
5476
|
}
|
|
5477
5477
|
|
|
5478
|
+
var packageJson = {
|
|
5479
|
+
name: "@valbuild/server",
|
|
5480
|
+
"private": false,
|
|
5481
|
+
description: "Val - integrated server",
|
|
5482
|
+
repository: {
|
|
5483
|
+
type: "git",
|
|
5484
|
+
url: "git+https://github.com/valbuild/val.git"
|
|
5485
|
+
},
|
|
5486
|
+
main: "dist/valbuild-server.cjs.js",
|
|
5487
|
+
module: "dist/valbuild-server.esm.js",
|
|
5488
|
+
exports: {
|
|
5489
|
+
".": {
|
|
5490
|
+
module: "./dist/valbuild-server.esm.js",
|
|
5491
|
+
"default": "./dist/valbuild-server.cjs.js"
|
|
5492
|
+
},
|
|
5493
|
+
"./browser": {
|
|
5494
|
+
module: "./browser/dist/valbuild-server-browser.esm.js",
|
|
5495
|
+
"default": "./browser/dist/valbuild-server-browser.cjs.js"
|
|
5496
|
+
},
|
|
5497
|
+
"./package.json": "./package.json"
|
|
5498
|
+
},
|
|
5499
|
+
types: "dist/valbuild-server.cjs.d.ts",
|
|
5500
|
+
preconstruct: {
|
|
5501
|
+
entrypoints: [
|
|
5502
|
+
"./index.ts",
|
|
5503
|
+
"./browser/index.ts"
|
|
5504
|
+
],
|
|
5505
|
+
exports: true
|
|
5506
|
+
},
|
|
5507
|
+
version: "0.150.13",
|
|
5508
|
+
scripts: {
|
|
5509
|
+
typecheck: "tsc --noEmit",
|
|
5510
|
+
test: "jest",
|
|
5511
|
+
"test:watch": "jest --watch"
|
|
5512
|
+
},
|
|
5513
|
+
devDependencies: {
|
|
5514
|
+
"@prettier/sync": "^0.6.1",
|
|
5515
|
+
"@types/jest": "^30.0.0",
|
|
5516
|
+
prettier: "~3.8.5"
|
|
5517
|
+
},
|
|
5518
|
+
dependencies: {
|
|
5519
|
+
"@valbuild/core": "workspace:*",
|
|
5520
|
+
"@valbuild/shared": "workspace:*",
|
|
5521
|
+
"@valbuild/ui": "workspace:*",
|
|
5522
|
+
chokidar: "^5.0.0",
|
|
5523
|
+
"image-size": "^2.0.2",
|
|
5524
|
+
minimatch: "^10.2.6",
|
|
5525
|
+
sucrase: "^3.35.1",
|
|
5526
|
+
typescript: "^6.0.3",
|
|
5527
|
+
zod: "^4.4.3",
|
|
5528
|
+
"zod-validation-error": "^5.0.0"
|
|
5529
|
+
},
|
|
5530
|
+
engines: {
|
|
5531
|
+
node: "^20.19.0 || >=22"
|
|
5532
|
+
},
|
|
5533
|
+
files: [
|
|
5534
|
+
"CHANGELOG.md",
|
|
5535
|
+
"dist",
|
|
5536
|
+
"browser"
|
|
5537
|
+
]
|
|
5538
|
+
};
|
|
5539
|
+
|
|
5540
|
+
/**
|
|
5541
|
+
* This package's version, inlined at build time.
|
|
5542
|
+
*
|
|
5543
|
+
* The same static JSON import `@valbuild/next` and `@valbuild/tanstack` use,
|
|
5544
|
+
* for the reason theirs gives: `require` does not exist in an ESM bundle, and
|
|
5545
|
+
* preconstruct inlines the import. Read by the Studio's version list
|
|
5546
|
+
* (`/versions`), which is the only place it is shown.
|
|
5547
|
+
*/
|
|
5548
|
+
const VERSION = packageJson.version;
|
|
5549
|
+
|
|
5478
5550
|
/** What {@link ValServerOptions.publishOverride} is given. */
|
|
5479
5551
|
|
|
5480
5552
|
/** What a publish reports back, in either shape. */
|
|
@@ -6378,6 +6450,41 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
6378
6450
|
};
|
|
6379
6451
|
}
|
|
6380
6452
|
},
|
|
6453
|
+
/*
|
|
6454
|
+
* The versions of Val's packages on the server, for the list at the foot
|
|
6455
|
+
* of the Studio's account panel. Behind the same sign-in as everything
|
|
6456
|
+
* else: a version is a small thing to give away, but it says which
|
|
6457
|
+
* advisories a site is open to.
|
|
6458
|
+
*/
|
|
6459
|
+
"/versions": {
|
|
6460
|
+
GET: async req => {
|
|
6461
|
+
const auth = getAuth(req.cookies);
|
|
6462
|
+
if (auth.error) {
|
|
6463
|
+
return {
|
|
6464
|
+
status: 401,
|
|
6465
|
+
json: {
|
|
6466
|
+
message: auth.error
|
|
6467
|
+
}
|
|
6468
|
+
};
|
|
6469
|
+
}
|
|
6470
|
+
if (isHttpOps(serverOps) && !("id" in auth)) {
|
|
6471
|
+
return {
|
|
6472
|
+
status: 401,
|
|
6473
|
+
json: {
|
|
6474
|
+
message: "Unauthorized"
|
|
6475
|
+
}
|
|
6476
|
+
};
|
|
6477
|
+
}
|
|
6478
|
+
return {
|
|
6479
|
+
status: 200,
|
|
6480
|
+
json: {
|
|
6481
|
+
framework: options.framework ?? null,
|
|
6482
|
+
core: core.Internal.VERSION.core,
|
|
6483
|
+
server: VERSION
|
|
6484
|
+
}
|
|
6485
|
+
};
|
|
6486
|
+
}
|
|
6487
|
+
},
|
|
6381
6488
|
//#region stat
|
|
6382
6489
|
"/stat": {
|
|
6383
6490
|
POST: async req => {
|
|
@@ -9135,7 +9242,7 @@ const ValServer = (valModules, options, callbacks, platform) => {
|
|
|
9135
9242
|
// TypeScript compiler. See `patch/ts/publishKit.ts`.
|
|
9136
9243
|
const {
|
|
9137
9244
|
getJsonEntryAtCommit
|
|
9138
|
-
} = await Promise.resolve().then(function () { return require('./getJsonEntryAtCommit-
|
|
9245
|
+
} = await Promise.resolve().then(function () { return require('./getJsonEntryAtCommit-e1946be3.cjs.dev.js'); });
|
|
9139
9246
|
const res = await getJsonEntryAtCommit(serverOps, req.query.commit_sha, req.query.path, req.query.key);
|
|
9140
9247
|
if (fp.result.isErr(res)) {
|
|
9141
9248
|
return historyErrorResponse(res.error);
|
|
@@ -4,7 +4,13 @@ import { ValServer, ValServerCallbacks } from "./ValServer.js";
|
|
|
4
4
|
type Versions = {
|
|
5
5
|
versions?: {
|
|
6
6
|
core?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The framework binding's version, whichever binding it is: the field is
|
|
9
|
+
* named for the first one, and admin.val.build reads it by that name.
|
|
10
|
+
*/
|
|
7
11
|
next?: string;
|
|
12
|
+
/** Which binding `next` is the version of. */
|
|
13
|
+
framework?: "next" | "tanstack";
|
|
8
14
|
};
|
|
9
15
|
};
|
|
10
16
|
import type { ValPatchStore } from "./ValOpsMemory.js";
|
|
@@ -16,6 +16,15 @@ export type ValServerOptions = {
|
|
|
16
16
|
apiKey?: string;
|
|
17
17
|
project?: string;
|
|
18
18
|
config: ValConfig;
|
|
19
|
+
/**
|
|
20
|
+
* The framework binding this server runs under, and its version: shown in
|
|
21
|
+
* the Studio's version list (`/versions`) and nowhere else. Absent where no
|
|
22
|
+
* binding said -- the demo, a test -- and the list then names no framework.
|
|
23
|
+
*/
|
|
24
|
+
framework?: {
|
|
25
|
+
name: "next" | "tanstack";
|
|
26
|
+
version: string;
|
|
27
|
+
};
|
|
19
28
|
/**
|
|
20
29
|
* Called after a save has applied its patches, with the files it produced.
|
|
21
30
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ValConfig, type ValModules } from "@valbuild/core";
|
|
2
|
+
import { type ValServerConfig } from "../ValServer.js";
|
|
2
3
|
import type { ValPatchStore } from "../ValOpsMemory.js";
|
|
3
4
|
/** A `fetch`, as far as the Studio's client calls one. */
|
|
4
5
|
export type InTabFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
@@ -24,4 +25,6 @@ export declare function createInTabValFetch(valModules: ValModules, options: {
|
|
|
24
25
|
patchStore?: ValPatchStore;
|
|
25
26
|
/** The path the Studio's client calls. */
|
|
26
27
|
route?: string;
|
|
28
|
+
/** The binding that started it, for the Studio's version list. */
|
|
29
|
+
framework?: ValServerConfig["framework"];
|
|
27
30
|
}): InTabFetch;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
-
import { F as bytesToUtf8, G as posixPath } from './ValRouterCore-
|
|
2
|
+
import { F as bytesToUtf8, G as posixPath } from './ValRouterCore-f328843e.esm.js';
|
|
3
3
|
import { result } from '@valbuild/core/fp';
|
|
4
4
|
import { a as analyzeValModule, c as analyzeJsonValuesEntries } from './jsonValuesModule-427d68c8.esm.js';
|
|
5
5
|
import '@valbuild/core';
|
package/dist/{getJsonEntryAtCommit-067eaced.cjs.dev.js → getJsonEntryAtCommit-e1946be3.cjs.dev.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var ts = require('typescript');
|
|
4
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
4
|
+
var ValRouterCore = require('./ValRouterCore-f5d6d448.cjs.dev.js');
|
|
5
5
|
var fp = require('@valbuild/core/fp');
|
|
6
6
|
var jsonValuesModule = require('./jsonValuesModule-8ae503a8.cjs.dev.js');
|
|
7
7
|
require('@valbuild/core');
|
package/dist/{getJsonEntryAtCommit-f6ae1e72.cjs.prod.js → getJsonEntryAtCommit-fbd7665f.cjs.prod.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var ts = require('typescript');
|
|
4
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
4
|
+
var ValRouterCore = require('./ValRouterCore-e5a916eb.cjs.prod.js');
|
|
5
5
|
var fp = require('@valbuild/core/fp');
|
|
6
6
|
var jsonValuesModule = require('./jsonValuesModule-d1bb8d8f.cjs.prod.js');
|
|
7
7
|
require('@valbuild/core');
|
|
@@ -12,7 +12,7 @@ var path = require('path');
|
|
|
12
12
|
var fs = require('fs');
|
|
13
13
|
var vm = require('node:vm');
|
|
14
14
|
var node_module = require('node:module');
|
|
15
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
15
|
+
var ValRouterCore = require('./ValRouterCore-f5d6d448.cjs.dev.js');
|
|
16
16
|
var server = require('@valbuild/ui/server');
|
|
17
17
|
var z = require('zod');
|
|
18
18
|
var zodValidationError = require('zod-validation-error');
|
|
@@ -13742,11 +13742,18 @@ commitPrepared,
|
|
|
13742
13742
|
* `ValServerOptions.publishOverride`.
|
|
13743
13743
|
*/
|
|
13744
13744
|
publishOverride) {
|
|
13745
|
+
var _opts$versions;
|
|
13745
13746
|
const valServerConfig = await initHandlerOptions(route, opts, config);
|
|
13746
13747
|
return ValRouterCore.ValServer(valModules, {
|
|
13747
13748
|
formatter,
|
|
13748
13749
|
commitPrepared,
|
|
13749
13750
|
publishOverride,
|
|
13751
|
+
...((_opts$versions = opts.versions) !== null && _opts$versions !== void 0 && _opts$versions.framework && opts.versions.next ? {
|
|
13752
|
+
framework: {
|
|
13753
|
+
name: opts.versions.framework,
|
|
13754
|
+
version: opts.versions.next
|
|
13755
|
+
}
|
|
13756
|
+
} : {}),
|
|
13750
13757
|
...valServerConfig
|
|
13751
13758
|
}, callbacks, nodePlatform);
|
|
13752
13759
|
}
|
|
@@ -12,7 +12,7 @@ var path = require('path');
|
|
|
12
12
|
var fs = require('fs');
|
|
13
13
|
var vm = require('node:vm');
|
|
14
14
|
var node_module = require('node:module');
|
|
15
|
-
var ValRouterCore = require('./ValRouterCore-
|
|
15
|
+
var ValRouterCore = require('./ValRouterCore-e5a916eb.cjs.prod.js');
|
|
16
16
|
var server = require('@valbuild/ui/server');
|
|
17
17
|
var z = require('zod');
|
|
18
18
|
var zodValidationError = require('zod-validation-error');
|
|
@@ -13742,11 +13742,18 @@ commitPrepared,
|
|
|
13742
13742
|
* `ValServerOptions.publishOverride`.
|
|
13743
13743
|
*/
|
|
13744
13744
|
publishOverride) {
|
|
13745
|
+
var _opts$versions;
|
|
13745
13746
|
const valServerConfig = await initHandlerOptions(route, opts, config);
|
|
13746
13747
|
return ValRouterCore.ValServer(valModules, {
|
|
13747
13748
|
formatter,
|
|
13748
13749
|
commitPrepared,
|
|
13749
13750
|
publishOverride,
|
|
13751
|
+
...((_opts$versions = opts.versions) !== null && _opts$versions !== void 0 && _opts$versions.framework && opts.versions.next ? {
|
|
13752
|
+
framework: {
|
|
13753
|
+
name: opts.versions.framework,
|
|
13754
|
+
version: opts.versions.next
|
|
13755
|
+
}
|
|
13756
|
+
} : {}),
|
|
13750
13757
|
...valServerConfig
|
|
13751
13758
|
}, callbacks, nodePlatform);
|
|
13752
13759
|
}
|
|
@@ -10,8 +10,8 @@ import path from 'path';
|
|
|
10
10
|
import fs from 'fs';
|
|
11
11
|
import vm from 'node:vm';
|
|
12
12
|
import { Module } from 'node:module';
|
|
13
|
-
import { r as resolveExistingJsonPath, f as findNestedJsonValuesRecords, v as validateJsonValuesEntries, i as isJsonValuesRootOp, a as rebaseContentOp, c as classifyJsonValuesOp, V as ValOps, b as bufferFromDataUrl, g as getFieldsForType, u as uploadRemoteFile, d as getFileExt, e as guessMimeTypeFromPath, h as createMetadataFromBuffer, j as ValOpsMemory, k as isHlsMasterPlaylist, s as sumHlsSegmentDurations, p as parseHlsMasterVariants, l as largestHlsVariant, m as fallbackRefOf, n as mapHlsUris, o as movedRemoteHost, q as needsHostCheck, t as rewriteRefHost, w as fallbackRemoteHost, x as checkRemoteFiles, y as ValServer, z as createValRequestHandler, A as getNewJsonEntryPaths, B as formatPatchSourceError } from './ValRouterCore-
|
|
14
|
-
export { I as InMemoryPatchStore, j as ValOpsMemory, C as askOncePerHost, c as classifyJsonValuesOp, B as formatPatchSourceError, d as getFileExt, D as getSettings, a as rebaseContentOp, u as uploadRemoteFile } from './ValRouterCore-
|
|
13
|
+
import { r as resolveExistingJsonPath, f as findNestedJsonValuesRecords, v as validateJsonValuesEntries, i as isJsonValuesRootOp, a as rebaseContentOp, c as classifyJsonValuesOp, V as ValOps, b as bufferFromDataUrl, g as getFieldsForType, u as uploadRemoteFile, d as getFileExt, e as guessMimeTypeFromPath, h as createMetadataFromBuffer, j as ValOpsMemory, k as isHlsMasterPlaylist, s as sumHlsSegmentDurations, p as parseHlsMasterVariants, l as largestHlsVariant, m as fallbackRefOf, n as mapHlsUris, o as movedRemoteHost, q as needsHostCheck, t as rewriteRefHost, w as fallbackRemoteHost, x as checkRemoteFiles, y as ValServer, z as createValRequestHandler, A as getNewJsonEntryPaths, B as formatPatchSourceError } from './ValRouterCore-f328843e.esm.js';
|
|
14
|
+
export { I as InMemoryPatchStore, j as ValOpsMemory, C as askOncePerHost, c as classifyJsonValuesOp, B as formatPatchSourceError, d as getFileExt, D as getSettings, a as rebaseContentOp, u as uploadRemoteFile } from './ValRouterCore-f328843e.esm.js';
|
|
15
15
|
import { createUIRequestHandler } from '@valbuild/ui/server';
|
|
16
16
|
import z$1, { z } from 'zod';
|
|
17
17
|
import { fromError } from 'zod-validation-error';
|
|
@@ -13706,11 +13706,18 @@ commitPrepared,
|
|
|
13706
13706
|
* `ValServerOptions.publishOverride`.
|
|
13707
13707
|
*/
|
|
13708
13708
|
publishOverride) {
|
|
13709
|
+
var _opts$versions;
|
|
13709
13710
|
const valServerConfig = await initHandlerOptions(route, opts, config);
|
|
13710
13711
|
return ValServer(valModules, {
|
|
13711
13712
|
formatter,
|
|
13712
13713
|
commitPrepared,
|
|
13713
13714
|
publishOverride,
|
|
13715
|
+
...((_opts$versions = opts.versions) !== null && _opts$versions !== void 0 && _opts$versions.framework && opts.versions.next ? {
|
|
13716
|
+
framework: {
|
|
13717
|
+
name: opts.versions.framework,
|
|
13718
|
+
version: opts.versions.next
|
|
13719
|
+
}
|
|
13720
|
+
} : {}),
|
|
13714
13721
|
...valServerConfig
|
|
13715
13722
|
}, callbacks, nodePlatform);
|
|
13716
13723
|
}
|
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"exports": true
|
|
29
29
|
},
|
|
30
|
-
"version": "0.150.
|
|
30
|
+
"version": "0.150.13",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@prettier/sync": "^0.6.1",
|
|
33
33
|
"@types/jest": "^30.0.0",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"typescript": "^6.0.3",
|
|
42
42
|
"zod": "^4.4.3",
|
|
43
43
|
"zod-validation-error": "^5.0.0",
|
|
44
|
-
"@valbuild/shared": "0.150.11",
|
|
45
44
|
"@valbuild/core": "0.150.3",
|
|
46
|
-
"@valbuild/
|
|
45
|
+
"@valbuild/shared": "0.150.13",
|
|
46
|
+
"@valbuild/ui": "0.150.13"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": "^20.19.0 || >=22"
|