@valbuild/shared 0.63.1 → 0.64.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/shared",
3
- "version": "0.63.1",
3
+ "version": "0.64.0",
4
4
  "private": false,
5
5
  "description": "Val shared types and utilities",
6
6
  "scripts": {
@@ -29,9 +29,10 @@
29
29
  "exports": true
30
30
  },
31
31
  "dependencies": {
32
- "@valbuild/core": "~0.63.1",
32
+ "@valbuild/core": "~0.64.0",
33
33
  "marked": "^9.0.3",
34
- "zod": "^3.22.4"
34
+ "zod": "^3.22.4",
35
+ "zod-validation-error": "^3.3.0"
35
36
  },
36
37
  "files": [
37
38
  "dist",
@@ -1,39 +0,0 @@
1
- import { Json, ModuleFilePath, PatchId, SerializedSchema, ValApi } from "@valbuild/core";
2
- import { result } from "@valbuild/core/fp";
3
- import { Patch, PatchError } from "@valbuild/core/patch";
4
- export declare class ValStore {
5
- private readonly api;
6
- private readonly subscribers;
7
- private readonly listeners;
8
- private readonly drafts;
9
- private readonly schema;
10
- constructor(api: ValApi);
11
- reloadPaths(paths: ModuleFilePath[]): Promise<void>;
12
- reset(): Promise<void>;
13
- getModule(path: ModuleFilePath, refetch?: boolean): Promise<result.Ok<{
14
- source: Json;
15
- schema: SerializedSchema;
16
- }> | result.Err<{
17
- message: string;
18
- }>>;
19
- applyPatch(path: ModuleFilePath, patchIds: PatchId[], patch: Patch): Promise<result.Result<Record<ModuleFilePath, {
20
- patchIds: PatchId[];
21
- }>, PatchError | {
22
- message: string;
23
- }>>;
24
- private emitEvent;
25
- initialize(): Promise<result.Result<ModuleFilePath[], {
26
- message: string;
27
- details: {
28
- fetchError: {
29
- message: string;
30
- statusCode?: number;
31
- };
32
- };
33
- }>>;
34
- subscribe: (paths: ModuleFilePath[]) => (listener: () => void) => () => void;
35
- private emitChange;
36
- getSnapshot: (paths: ModuleFilePath[]) => () => Record<ModuleFilePath, Json> | undefined;
37
- getServerSnapshot: (paths: ModuleFilePath[]) => () => Record<ModuleFilePath, Json> | undefined;
38
- get: (paths: ModuleFilePath[]) => Record<ModuleFilePath, Json> | undefined;
39
- }
@@ -1,4 +0,0 @@
1
- export declare const EXT_TO_MIME_TYPES: Record<string, string>;
2
- export declare const MIME_TYPES_TO_EXT: {
3
- [k: string]: string;
4
- };
@@ -1,3 +0,0 @@
1
- export declare function getMimeType(base64Url: string): string | undefined;
2
- export declare function mimeTypeToFileExt(mimeType: string): string;
3
- export declare function filenameToMimeType(filename: string): string | undefined;
@@ -1,2 +0,0 @@
1
- export * from "./convertMimeType.js";
2
- export * from "./all.js";