@valbuild/core 0.73.0 → 0.73.2

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.
@@ -1,6 +1,6 @@
1
1
  import { Json } from "../index.js";
2
2
  import { RemoteSource } from "../source/remote.js";
3
- export declare const DEFAULT_VAL_REMOTE_HOST = "https://remote.val.build";
3
+ export declare const DEFAULT_VAL_REMOTE_HOST = "http://localhost:4000";
4
4
  export declare function convertRemoteSource<Metadata extends {
5
5
  readonly [key: string]: Json;
6
6
  } | undefined = {
@@ -4,7 +4,7 @@ import { Json } from "../Json.js";
4
4
  export declare const FILE_REF_PROP: "_ref";
5
5
  export declare const FILE_REF_SUBTYPE_TAG: "_tag";
6
6
  export type FileMetadata = {
7
- readonly [key: string]: Json;
7
+ mimeType?: string;
8
8
  };
9
9
  /**
10
10
  * A file source represents the path to a (local) file.
@@ -1,5 +1,6 @@
1
1
  import { VAL_EXTENSION } from "./index.js";
2
2
  import { ValConfig } from "../initVal.js";
3
+ import { ImageMetadata } from "../schema/image.js";
3
4
  import { FILE_REF_PROP, FileMetadata } from "./file.js";
4
5
  /**
5
6
  * A remote source represents data that is not stored locally.
@@ -10,7 +11,7 @@ export type RemoteSource<Metadata extends FileMetadata | undefined = FileMetadat
10
11
  readonly metadata?: Metadata;
11
12
  readonly patch_id?: string;
12
13
  };
13
- export declare const initRemote: (config?: ValConfig) => <Metadata extends Record<string, string | number> | undefined>(ref: RemoteRef, metadata?: Metadata | undefined) => RemoteSource<Metadata>;
14
+ export declare const initRemote: (config?: ValConfig) => <Metadata extends ImageMetadata | FileMetadata>(ref: RemoteRef, metadata: Metadata) => RemoteSource<Metadata>;
14
15
  export type RemoteRef = `${string}/file/p/${string}/v/${string}/h/${string}/f/${string}/p/public/val/${string}`;
15
16
  export declare function createRemoteRef(remoteHost: string, { publicProjectId, coreVersion, validationHash, fileHash, filePath, bucket, }: {
16
17
  publicProjectId: string;
@@ -3073,7 +3073,7 @@ function splitRemoteRef(ref) {
3073
3073
  };
3074
3074
  }
3075
3075
 
3076
- var DEFAULT_VAL_REMOTE_HOST = "https://remote.val.build";
3076
+ var DEFAULT_VAL_REMOTE_HOST = "http://localhost:4000";
3077
3077
  function convertRemoteSource(src) {
3078
3078
  if (src !== null && src !== void 0 && src.patch_id) {
3079
3079
  var splitRemoteRefDataRes = splitRemoteRef(src[FILE_REF_PROP]);
@@ -3075,7 +3075,7 @@ function splitRemoteRef(ref) {
3075
3075
  };
3076
3076
  }
3077
3077
 
3078
- var DEFAULT_VAL_REMOTE_HOST = "https://remote.val.build";
3078
+ var DEFAULT_VAL_REMOTE_HOST = "http://localhost:4000";
3079
3079
  function convertRemoteSource(src) {
3080
3080
  if (src !== null && src !== void 0 && src.patch_id) {
3081
3081
  var splitRemoteRefDataRes = splitRemoteRef(src[FILE_REF_PROP]);
@@ -3075,7 +3075,7 @@ function splitRemoteRef(ref) {
3075
3075
  };
3076
3076
  }
3077
3077
 
3078
- var DEFAULT_VAL_REMOTE_HOST = "https://remote.val.build";
3078
+ var DEFAULT_VAL_REMOTE_HOST = "http://localhost:4000";
3079
3079
  function convertRemoteSource(src) {
3080
3080
  if (src !== null && src !== void 0 && src.patch_id) {
3081
3081
  var splitRemoteRefDataRes = splitRemoteRef(src[FILE_REF_PROP]);
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-f6fd3df3.cjs.dev.js');
5
+ var dist_valbuildCore = require('./index-968ee5f8.cjs.dev.js');
6
6
  require('./result-bb1f436e.cjs.dev.js');
7
7
 
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('./index-da9933cf.cjs.prod.js');
5
+ var dist_valbuildCore = require('./index-95daa562.cjs.prod.js');
6
6
  require('./result-787e35f6.cjs.prod.js');
7
7
 
8
8
 
@@ -1,2 +1,2 @@
1
- export { A as ArraySchema, B as BooleanSchema, D as DEFAULT_VAL_REMOTE_HOST, l as DateSchema, F as FATAL_ERROR_TYPES, e as FILE_REF_PROP, f as FILE_REF_SUBTYPE_TAG, k as FileSchema, G as GenericSelector, j as ImageSchema, I as Internal, K as KeyOfSchema, L as LiteralSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, n as RichTextSchema, S as Schema, h as StringSchema, U as UnionSchema, V as VAL_EXTENSION, g as derefPatch, o as deserializeSchema, i as initVal, m as modules } from './index-fee3aa6d.esm.js';
1
+ export { A as ArraySchema, B as BooleanSchema, D as DEFAULT_VAL_REMOTE_HOST, l as DateSchema, F as FATAL_ERROR_TYPES, e as FILE_REF_PROP, f as FILE_REF_SUBTYPE_TAG, k as FileSchema, G as GenericSelector, j as ImageSchema, I as Internal, K as KeyOfSchema, L as LiteralSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, n as RichTextSchema, S as Schema, h as StringSchema, U as UnionSchema, V as VAL_EXTENSION, g as derefPatch, o as deserializeSchema, i as initVal, m as modules } from './index-1a035256.esm.js';
2
2
  import './result-daff1cae.esm.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valbuild/core",
3
- "version": "0.73.0",
3
+ "version": "0.73.2",
4
4
  "private": false,
5
5
  "description": "Val - supercharged hard-coded content",
6
6
  "scripts": {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('../../dist/index-f6fd3df3.cjs.dev.js');
5
+ var dist_valbuildCore = require('../../dist/index-968ee5f8.cjs.dev.js');
6
6
  var result = require('../../dist/result-bb1f436e.cjs.dev.js');
7
7
  var util = require('../../dist/util-b213092b.cjs.dev.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_valbuildCore = require('../../dist/index-da9933cf.cjs.prod.js');
5
+ var dist_valbuildCore = require('../../dist/index-95daa562.cjs.prod.js');
6
6
  var result = require('../../dist/result-787e35f6.cjs.prod.js');
7
7
  var util = require('../../dist/util-030d8a1f.cjs.prod.js');
8
8
 
@@ -1,5 +1,5 @@
1
- import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-fee3aa6d.esm.js';
2
- export { P as PatchError } from '../../dist/index-fee3aa6d.esm.js';
1
+ import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-1a035256.esm.js';
2
+ export { P as PatchError } from '../../dist/index-1a035256.esm.js';
3
3
  import { f as isNonEmpty, e as err, o as ok, m as map, g as flatMap, i as isErr, h as flatMapReduce, j as filterOrElse, k as mapErr, l as map$1, n as all, p as flatten, q as allT } from '../../dist/result-daff1cae.esm.js';
4
4
  import { p as pipe } from '../../dist/util-18613e99.esm.js';
5
5