@valbuild/server 0.61.0 → 0.62.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/dist/declarations/src/SerializedModuleContent.d.ts +2 -2
- package/dist/declarations/src/Service.d.ts +3 -3
- package/dist/declarations/src/ValServer.d.ts +92 -133
- package/dist/declarations/src/createValApiRouter.d.ts +6 -7
- package/dist/declarations/src/index.d.ts +0 -1
- package/dist/valbuild-server.cjs.dev.js +2621 -1457
- package/dist/valbuild-server.cjs.prod.js +2621 -1457
- package/dist/valbuild-server.esm.js +2625 -1460
- package/package.json +7 -10
- package/dist/declarations/src/LocalValServer.d.ts +0 -62
package/package.json
CHANGED
@@ -12,29 +12,26 @@
|
|
12
12
|
"./package.json": "./package.json"
|
13
13
|
},
|
14
14
|
"types": "dist/valbuild-server.cjs.d.ts",
|
15
|
-
"version": "0.
|
15
|
+
"version": "0.62.0",
|
16
16
|
"scripts": {
|
17
17
|
"typecheck": "tsc --noEmit",
|
18
18
|
"test": "jest",
|
19
19
|
"test:watch": "jest --watch"
|
20
20
|
},
|
21
21
|
"devDependencies": {
|
22
|
-
"@types/
|
23
|
-
"@types/jest": "^29.2.5",
|
24
|
-
"concurrently": "^7.6.0"
|
22
|
+
"@types/jest": "^29.2.5"
|
25
23
|
},
|
26
24
|
"dependencies": {
|
27
|
-
"@valbuild/core": "~0.
|
28
|
-
"@valbuild/shared": "~0.
|
29
|
-
"@valbuild/ui": "~0.
|
30
|
-
"express": "^4.18.2",
|
25
|
+
"@valbuild/core": "~0.62.0",
|
26
|
+
"@valbuild/shared": "~0.62.0",
|
27
|
+
"@valbuild/ui": "~0.62.0",
|
31
28
|
"image-size": "^1.0.2",
|
32
29
|
"minimatch": "^3.0.4",
|
33
|
-
"queue": "^6.0.2",
|
34
30
|
"quickjs-emscripten": "^0.21.1",
|
35
31
|
"sucrase": "^3.34.0",
|
36
32
|
"typescript": "^5.1.3",
|
37
|
-
"zod": "^3.20.6"
|
33
|
+
"zod": "^3.20.6",
|
34
|
+
"zod-validation-error": "^3.3.0"
|
38
35
|
},
|
39
36
|
"engines": {
|
40
37
|
"node": ">=18.17.0"
|
@@ -1,62 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
import { Service } from "./Service.js";
|
3
|
-
import { result } from "@valbuild/core/fp";
|
4
|
-
import { Patch } from "./patch/validation.js";
|
5
|
-
import { ApiGetPatchResponse, ApiPostPatchResponse, ModuleId, PatchId, ApiDeletePatchResponse, FileMetadata, ImageMetadata, ValModules } from "@valbuild/core";
|
6
|
-
import { VAL_ENABLE_COOKIE_NAME, VAL_SESSION_COOKIE, VAL_STATE_COOKIE, ValServerError, ValServerJsonResult, ValServerRedirectResult, ValServerResult, ValSession } from "@valbuild/shared/internal";
|
7
|
-
import { ValServer, ValServerCallbacks } from "./ValServer.js";
|
8
|
-
import { SerializedModuleContent } from "./SerializedModuleContent.js";
|
9
|
-
export type LocalValServerOptions = {
|
10
|
-
service: Service;
|
11
|
-
valEnableRedirectUrl?: string;
|
12
|
-
valDisableRedirectUrl?: string;
|
13
|
-
cacheDir?: string;
|
14
|
-
git: {
|
15
|
-
commit?: string;
|
16
|
-
branch?: string;
|
17
|
-
};
|
18
|
-
};
|
19
|
-
export interface ValServerBufferHost {
|
20
|
-
readBuffer: (fileName: string) => Promise<Buffer | undefined>;
|
21
|
-
}
|
22
|
-
export declare class LocalValServer extends ValServer {
|
23
|
-
readonly valModules: ValModules;
|
24
|
-
readonly options: LocalValServerOptions;
|
25
|
-
readonly callbacks: ValServerCallbacks;
|
26
|
-
private readonly host;
|
27
|
-
private static readonly PATCHES_DIR;
|
28
|
-
private static readonly FILES_DIR;
|
29
|
-
private readonly patchesRootPath;
|
30
|
-
constructor(valModules: ValModules, options: LocalValServerOptions, callbacks: ValServerCallbacks);
|
31
|
-
session(): Promise<ValServerJsonResult<ValSession>>;
|
32
|
-
deletePatches(query: {
|
33
|
-
id?: string[];
|
34
|
-
}): Promise<ValServerJsonResult<ApiDeletePatchResponse>>;
|
35
|
-
postPatches(body: unknown): Promise<ValServerJsonResult<ApiPostPatchResponse>>;
|
36
|
-
getMetadata(): Promise<FileMetadata | ImageMetadata | undefined>;
|
37
|
-
getFiles(filePath: string, query: {
|
38
|
-
sha256?: string;
|
39
|
-
}): Promise<ValServerResult<never, ReadableStream<Uint8Array>>>;
|
40
|
-
getPatches(query: {
|
41
|
-
id?: string[];
|
42
|
-
}): Promise<ValServerJsonResult<ApiGetPatchResponse>>;
|
43
|
-
private getFilePath;
|
44
|
-
private getFileMetadataPath;
|
45
|
-
private getPatchFilePath;
|
46
|
-
private badRequest;
|
47
|
-
protected ensureInitialized(): Promise<result.Result<undefined, ValServerError>>;
|
48
|
-
private getSerializedModules;
|
49
|
-
protected getModule(moduleId: ModuleId): Promise<SerializedModuleContent>;
|
50
|
-
protected getAllModules(treePath: string): Promise<ModuleId[]>;
|
51
|
-
protected execCommit(patches: [PatchId, ModuleId, Patch][]): Promise<{
|
52
|
-
status: 200;
|
53
|
-
json: Record<ModuleId, {
|
54
|
-
patches: {
|
55
|
-
applied: PatchId[];
|
56
|
-
};
|
57
|
-
}>;
|
58
|
-
} | ValServerError>;
|
59
|
-
authorize(): Promise<ValServerRedirectResult<VAL_STATE_COOKIE>>;
|
60
|
-
callback(): Promise<ValServerRedirectResult<VAL_STATE_COOKIE | VAL_SESSION_COOKIE | VAL_ENABLE_COOKIE_NAME>>;
|
61
|
-
logout(): Promise<ValServerResult<VAL_STATE_COOKIE | VAL_SESSION_COOKIE>>;
|
62
|
-
}
|