@happyvertical/smrt-assets 0.60.10 → 0.60.12
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/AGENTS.md +5 -0
- package/README.md +38 -2
- package/dist/asset-store.d.ts +15 -3
- package/dist/asset-store.d.ts.map +1 -1
- package/dist/chunks/{files-runtime-KsFTbJR0.js → files-runtime-MnHRkfnd.js} +5 -2
- package/dist/chunks/{files-runtime-KsFTbJR0.js.map → files-runtime-MnHRkfnd.js.map} +1 -1
- package/dist/chunks/local-asset-locator-v4zTxVgM.js +59 -0
- package/dist/chunks/local-asset-locator-v4zTxVgM.js.map +1 -0
- package/dist/files-runtime.d.ts +2 -0
- package/dist/files-runtime.d.ts.map +1 -1
- package/dist/filesystem.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -8
- package/dist/index.js.map +1 -1
- package/dist/local-asset-locator.d.ts +14 -0
- package/dist/local-asset-locator.d.ts.map +1 -0
- package/dist/locator.d.ts +2 -0
- package/dist/locator.d.ts.map +1 -0
- package/dist/locator.js +2 -0
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +12 -5
- package/dist/smrt-knowledge.okf.md +7 -2
- package/package.json +12 -8
package/AGENTS.md
CHANGED
|
@@ -21,6 +21,11 @@ Provider-agnostic asset management with versioning, type classification, and gen
|
|
|
21
21
|
failures other than not-found. The caller owns receipt fencing/serialization.
|
|
22
22
|
`removeFile(asset)` removes only bytes for recovery cleanup, including an
|
|
23
23
|
already-pruned owner record; `remove(asset)` also deletes the owner record.
|
|
24
|
+
Opt into `asset-local:<key>` writes with
|
|
25
|
+
`{ type: 'local', basePath: absoluteRoot, locatorMode: 'relative' }`.
|
|
26
|
+
Keep the root app-owned; portable paths must resolve beneath it without links.
|
|
27
|
+
See [portable local storage](README.md#portable-local-storage) for adoption and
|
|
28
|
+
the legacy locator boundary.
|
|
24
29
|
- **Ownership rule**: base/domain-owned asset relationships should live on noun join tables such as `content_assets`, `profile_assets`, `event_assets`, `place_assets`, and `product_assets`; keep `AssetAssociation` for generic/provenance links like image derivation.
|
|
25
30
|
|
|
26
31
|
## Runtime surface
|
package/README.md
CHANGED
|
@@ -97,10 +97,46 @@ photo.folderId = folder.id;
|
|
|
97
97
|
await photo.save();
|
|
98
98
|
|
|
99
99
|
// AssetStore -- provider-agnostic file I/O + record creation
|
|
100
|
-
const store = new AssetStore(
|
|
101
|
-
await store.store(
|
|
100
|
+
const store = await new AssetStore(assetRoot, collection).initialize();
|
|
101
|
+
await store.store('screenshot', buffer, { mimeType: 'image/png' });
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
+
## Portable local storage
|
|
105
|
+
|
|
106
|
+
For a new desktop installation, pass the same portable storage configuration
|
|
107
|
+
to each asset runtime, worker, and service that handles its managed files:
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
const assets = await createAssetRuntime({
|
|
111
|
+
db,
|
|
112
|
+
storage: { type: 'local', basePath: assetRoot, locatorMode: 'relative' },
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Use an absolute, app-owned `assetRoot`. The store persists
|
|
117
|
+
`asset-local:<key>`, for example `asset-local:document/17f6.txt`.
|
|
118
|
+
The key is a raw, slash-separated path under the configured root and
|
|
119
|
+
contains no URL escaping. Use ASCII letters, digits, underscores, and
|
|
120
|
+
hyphens in type slugs and IDs. The store rejects traversal, absolute keys,
|
|
121
|
+
Windows device names, links at or below the root, and non-regular files. Keep
|
|
122
|
+
the root and its contents under app control; the filesystem checks assume
|
|
123
|
+
no concurrent changes by an untrusted local process.
|
|
124
|
+
|
|
125
|
+
When copying an installation, copy the database and the asset directory
|
|
126
|
+
together, keep each file's path within the directory, and set `basePath`
|
|
127
|
+
to the copied directory. Read, preserve, and remove assets through the
|
|
128
|
+
runtime. A storage resolver may choose a path for a portable write, but
|
|
129
|
+
later reads and deletes must use the stored key in the built-in local
|
|
130
|
+
filesystem for that runtime.
|
|
131
|
+
|
|
132
|
+
The option changes new writes only. Existing local options and S3
|
|
133
|
+
locators keep their formats. A built-in local store can read portable
|
|
134
|
+
locators whether or not it opts in to writing them. In portable mode,
|
|
135
|
+
an existing `file://` locator can still be read or removed when it
|
|
136
|
+
identifies a valid key inside the configured root; changing the root
|
|
137
|
+
does not relocate such records. Start with fresh desktop data or handle
|
|
138
|
+
existing absolute locators before moving an installation.
|
|
139
|
+
|
|
104
140
|
## API
|
|
105
141
|
|
|
106
142
|
### Models (SmrtObject)
|
package/dist/asset-store.d.ts
CHANGED
|
@@ -42,7 +42,16 @@ export interface StoreOptions {
|
|
|
42
42
|
* Provider options for configuring the filesystem backend.
|
|
43
43
|
* Accepts any @happyvertical/files options or a simple basePath string for local storage.
|
|
44
44
|
*/
|
|
45
|
-
export type ProviderOptions = GetFilesystemOptions | string;
|
|
45
|
+
export type ProviderOptions = GetFilesystemOptions | PortableLocalAssetStorageOptions | string;
|
|
46
|
+
/** Opt into portable locators for managed files under a trusted local root. */
|
|
47
|
+
export interface PortableLocalAssetStorageOptions extends Extract<GetFilesystemOptions, {
|
|
48
|
+
type?: 'local';
|
|
49
|
+
}> {
|
|
50
|
+
type: 'local';
|
|
51
|
+
basePath: string;
|
|
52
|
+
locatorMode: 'relative';
|
|
53
|
+
}
|
|
54
|
+
type AssetProviderOptions = Exclude<ProviderOptions, string>;
|
|
46
55
|
/**
|
|
47
56
|
* Asset storage operation currently being resolved.
|
|
48
57
|
*/
|
|
@@ -60,7 +69,7 @@ export interface AssetStorageResolveRequest {
|
|
|
60
69
|
sourceUri: string;
|
|
61
70
|
mimeType?: string;
|
|
62
71
|
typeSlug?: string;
|
|
63
|
-
defaultProviderOptions:
|
|
72
|
+
defaultProviderOptions: AssetProviderOptions;
|
|
64
73
|
defaultFilesystem: FilesystemInterface;
|
|
65
74
|
}
|
|
66
75
|
/**
|
|
@@ -110,6 +119,7 @@ export interface AssetStoreOptions {
|
|
|
110
119
|
export declare class AssetStore {
|
|
111
120
|
private readonly collection;
|
|
112
121
|
private fs;
|
|
122
|
+
private localRoot?;
|
|
113
123
|
private readonly fsOptions;
|
|
114
124
|
private readonly fsCache;
|
|
115
125
|
private readonly resolver?;
|
|
@@ -220,13 +230,15 @@ export declare class AssetStore {
|
|
|
220
230
|
removeFile(asset: Asset): Promise<void>;
|
|
221
231
|
/** Delete bytes and the owner record. Storage-only recovery uses removeFile. */
|
|
222
232
|
remove(asset: Asset): Promise<void>;
|
|
233
|
+
private requestPath;
|
|
223
234
|
/**
|
|
224
235
|
* Extract filesystem path from a sourceUri.
|
|
225
|
-
* Handles file://, s3://, and plain paths.
|
|
236
|
+
* Handles portable local locators, file://, s3://, and plain paths.
|
|
226
237
|
*
|
|
227
238
|
* @param sourceUri - Asset sourceUri (e.g., 'file:///path/to/file.mp4', 's3://bucket/key')
|
|
228
239
|
* @returns Filesystem path
|
|
229
240
|
*/
|
|
230
241
|
static pathFromUri(sourceUri: string): string;
|
|
231
242
|
}
|
|
243
|
+
export {};
|
|
232
244
|
//# sourceMappingURL=asset-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-store.d.ts","sourceRoot":"","sources":["../src/asset-store.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"asset-store.d.ts","sourceRoot":"","sources":["../src/asset-store.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe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G;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,GAAG,IAAI,CAAC;IAY1E;;;;OAIG;IACG,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAqB7C,gFAAgF;IAC1E,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzC,OAAO,CAAC,WAAW;IAUnB;;;;;;OAMG;IACH,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAa9C"}
|
|
@@ -11,11 +11,14 @@ async function loadFilesModule() {
|
|
|
11
11
|
async function getFilesystemLazy(options) {
|
|
12
12
|
return (await loadFilesModule()).getFilesystem(options);
|
|
13
13
|
}
|
|
14
|
+
function isBuiltinLocalFilesystem(filesystem) {
|
|
15
|
+
return !!filesModule && filesystem instanceof filesModule.LocalFilesystemProvider;
|
|
16
|
+
}
|
|
14
17
|
function isFileNotFoundError(error) {
|
|
15
18
|
if (filesModule && error instanceof filesModule.FileNotFoundError) return true;
|
|
16
19
|
return error instanceof Error && error.name === "FileNotFoundError";
|
|
17
20
|
}
|
|
18
21
|
//#endregion
|
|
19
|
-
export {
|
|
22
|
+
export { registerFilesModule as i, isBuiltinLocalFilesystem as n, isFileNotFoundError as r, getFilesystemLazy as t };
|
|
20
23
|
|
|
21
|
-
//# sourceMappingURL=files-runtime-
|
|
24
|
+
//# sourceMappingURL=files-runtime-MnHRkfnd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files-runtime-
|
|
1
|
+
{"version":3,"file":"files-runtime-MnHRkfnd.js","names":[],"sources":["../../src/files-runtime.ts"],"sourcesContent":["/**\n * Lazy boundary to `@happyvertical/files` (#1977/#1979).\n *\n * The files SDK statically imports @aws-sdk/client-s3 and reaches googleapis\n * from its root, and smrt-assets is reachable from provider-neutral consumer\n * graphs (profiles → assets), so AssetStore must not import it eagerly.\n *\n * - Runtimes with node_modules (Node, tsx, vite dev, externalized SSR) load\n * the SDK on first file operation via a bundler-invisible import.\n * - Fully-bundled deployments opt in explicitly with\n * `import '@happyvertical/smrt-assets/filesystem'` at server startup.\n */\nimport type {\n FilesystemInterface,\n GetFilesystemOptions,\n} from '@happyvertical/files';\nimport { importOptionalDependency } from '@happyvertical/smrt-core';\n\ntype FilesModule = typeof import('@happyvertical/files');\n\nlet filesModule: FilesModule | undefined;\n\n/**\n * Registers the statically-imported files SDK module. Called by the\n * `@happyvertical/smrt-assets/filesystem` entry point.\n */\nexport function registerFilesModule(mod: FilesModule): void {\n filesModule = mod;\n}\n\nasync function loadFilesModule(): Promise<FilesModule> {\n if (!filesModule) {\n filesModule = (await importOptionalDependency(\n '@happyvertical/files',\n \"Import '@happyvertical/smrt-assets/filesystem' during server startup to enable asset file storage in bundled builds.\",\n )) as FilesModule;\n }\n return filesModule;\n}\n\n/** Lazy equivalent of the files SDK's `getFilesystem`. */\nexport async function getFilesystemLazy(\n options: GetFilesystemOptions,\n): Promise<FilesystemInterface> {\n const mod = await loadFilesModule();\n return mod.getFilesystem(options);\n}\n\n/** Recognize the SDK's built-in Node filesystem, not an injected adapter. */\nexport function isBuiltinLocalFilesystem(\n filesystem: FilesystemInterface,\n): boolean {\n return (\n !!filesModule && filesystem instanceof filesModule.LocalFilesystemProvider\n );\n}\n\n/**\n * True when `error` is the files SDK's FileNotFoundError. Uses the loaded\n * module's class when available and falls back to an `error.name` check so\n * resolver-injected filesystems built against another SDK copy still match.\n */\nexport function isFileNotFoundError(error: unknown): boolean {\n if (filesModule && error instanceof filesModule.FileNotFoundError) {\n return true;\n }\n return error instanceof Error && error.name === 'FileNotFoundError';\n}\n"],"mappings":";;AAoBA,IAAI;AAMG,SAAS,oBAAoB,KAAwB;CAC1D,cAAc;AAChB;AAEA,eAAe,kBAAwC;CACrD,IAAI,CAAC,aACH,cAAe,MAAM,yBACnB,wBACA,sHACF;CAEF,OAAO;AACT;AAGA,eAAsB,kBACpB,SAC8B;CAE9B,QAAO,MADW,gBAAgB,EAAA,CACvB,cAAc,OAAO;AAClC;AAGO,SAAS,yBACd,YACS;CACT,OACE,CAAC,CAAC,eAAe,sBAAsB,YAAY;AAEvD;AAOO,SAAS,oBAAoB,OAAyB;CAC3D,IAAI,eAAe,iBAAiB,YAAY,mBAC9C,OAAO;CAET,OAAO,iBAAiB,SAAS,MAAM,SAAS;AAClD"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//#region src/local-asset-locator.ts
|
|
2
|
+
var PREFIX = "asset-local:";
|
|
3
|
+
function isLocalAssetLocator(value) {
|
|
4
|
+
return value.startsWith(PREFIX);
|
|
5
|
+
}
|
|
6
|
+
function makeLocalAssetLocator(key) {
|
|
7
|
+
validateKey(key);
|
|
8
|
+
return PREFIX + key;
|
|
9
|
+
}
|
|
10
|
+
function localAssetKey(locator) {
|
|
11
|
+
if (!isLocalAssetLocator(locator)) throw new Error("Expected a portable local asset locator");
|
|
12
|
+
const key = locator.slice(12);
|
|
13
|
+
validateKey(key);
|
|
14
|
+
return key;
|
|
15
|
+
}
|
|
16
|
+
function validateKey(key) {
|
|
17
|
+
for (const segment of key.split("/")) if (!/^[A-Za-z0-9_-]/.test(segment) || /[^A-Za-z0-9_.-]/.test(segment) || segment.includes("..") || segment.endsWith(".") || /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(?:\.|$)/i.test(segment)) throw new Error("Invalid portable local asset key");
|
|
18
|
+
}
|
|
19
|
+
function requireLocalAssetRoot(root) {
|
|
20
|
+
if (typeof process === "undefined" || !process.getBuiltinModule) throw new Error("Portable local asset storage requires Node.js");
|
|
21
|
+
const { isAbsolute, resolve } = process.getBuiltinModule("node:path");
|
|
22
|
+
if (typeof root !== "string" || !isAbsolute(root)) throw new Error("Portable local asset storage requires an absolute basePath");
|
|
23
|
+
return resolve(root);
|
|
24
|
+
}
|
|
25
|
+
function keyFromLegacyFileLocator(root, locator) {
|
|
26
|
+
const { sep } = process.getBuiltinModule("node:path");
|
|
27
|
+
const { fileURLToPath, pathToFileURL } = process.getBuiltinModule("node:url");
|
|
28
|
+
const normalizeSeparators = (path) => sep === "\\" ? path.replaceAll("\\", "/") : path;
|
|
29
|
+
const prefix = `file://${normalizeSeparators(root).replace(/\/$/, "")}/`;
|
|
30
|
+
let candidate = normalizeSeparators(locator);
|
|
31
|
+
if (!candidate.startsWith(prefix)) try {
|
|
32
|
+
const decoded = fileURLToPath(locator);
|
|
33
|
+
if (pathToFileURL(decoded).href === locator) candidate = `file://${normalizeSeparators(decoded)}`;
|
|
34
|
+
} catch {}
|
|
35
|
+
if (!candidate.startsWith(prefix)) throw new Error("Portable local asset locator must stay under the configured root");
|
|
36
|
+
const key = candidate.slice(prefix.length);
|
|
37
|
+
validateKey(key);
|
|
38
|
+
return key;
|
|
39
|
+
}
|
|
40
|
+
async function checkLocalAssetPath(root, key) {
|
|
41
|
+
validateKey(key);
|
|
42
|
+
const { lstat } = process.getBuiltinModule("node:fs/promises");
|
|
43
|
+
const { join } = process.getBuiltinModule("node:path");
|
|
44
|
+
const segments = ["", ...key.split("/")];
|
|
45
|
+
let path = root;
|
|
46
|
+
for (const [index, segment] of segments.entries()) {
|
|
47
|
+
if (segment) path = join(path, segment);
|
|
48
|
+
const stat = await lstat(path).catch((error) => {
|
|
49
|
+
if (error.code === "ENOENT") return void 0;
|
|
50
|
+
throw error;
|
|
51
|
+
});
|
|
52
|
+
if (!stat) return;
|
|
53
|
+
if (index === segments.length - 1 ? !stat.isFile() || stat.nlink > 1 : !stat.isDirectory()) throw new Error("Invalid portable local asset path");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { makeLocalAssetLocator as a, localAssetKey as i, isLocalAssetLocator as n, requireLocalAssetRoot as o, keyFromLegacyFileLocator as r, checkLocalAssetPath as t };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=local-asset-locator-v4zTxVgM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-asset-locator-v4zTxVgM.js","names":[],"sources":["../../src/local-asset-locator.ts"],"sourcesContent":["const PREFIX = 'asset-local:';\n\n/** Identify the portable locator namespace without accepting the key yet. */\nexport function isLocalAssetLocator(value: string): boolean {\n return value.startsWith(PREFIX);\n}\n\n/** Encode a validated raw key as a persisted local asset locator. */\nexport function makeLocalAssetLocator(key: string): string {\n validateKey(key);\n return PREFIX + key;\n}\n\n/** Decode a portable locator to a validated key relative to the asset root. */\nexport function localAssetKey(locator: string): string {\n if (!isLocalAssetLocator(locator)) {\n throw new Error('Expected a portable local asset locator');\n }\n const key = locator.slice(PREFIX.length);\n validateKey(key);\n return key;\n}\n\nfunction validateKey(key: string): void {\n for (const segment of key.split('/')) {\n if (\n !/^[A-Za-z0-9_-]/.test(segment) ||\n /[^A-Za-z0-9_.-]/.test(segment) ||\n segment.includes('..') ||\n segment.endsWith('.') ||\n /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(?:\\.|$)/i.test(segment)\n ) {\n throw new Error('Invalid portable local asset key');\n }\n }\n}\n\n// Like the files SDK, Node filesystem APIs are only loaded when storage is\n// used. Asset models remain importable from provider-neutral entry points.\nexport function requireLocalAssetRoot(root: string): string {\n if (typeof process === 'undefined' || !process.getBuiltinModule) {\n throw new Error('Portable local asset storage requires Node.js');\n }\n const { isAbsolute, resolve } = process.getBuiltinModule('node:path');\n if (typeof root !== 'string' || !isAbsolute(root)) {\n throw new Error(\n 'Portable local asset storage requires an absolute basePath',\n );\n }\n return resolve(root);\n}\n\nexport function keyFromLegacyFileLocator(\n root: string,\n locator: string,\n): string {\n const { sep } = process.getBuiltinModule('node:path');\n const { fileURLToPath, pathToFileURL } = process.getBuiltinModule('node:url');\n const normalizeSeparators = (path: string) =>\n sep === '\\\\' ? path.replaceAll('\\\\', '/') : path;\n const prefix = `file://${normalizeSeparators(root).replace(/\\/$/, '')}/`;\n let candidate = normalizeSeparators(locator);\n if (!candidate.startsWith(prefix)) {\n // Logical import uses pathToFileURL, unlike the old AssetStore's raw\n // file:// interpolation. Only accept a canonical round trip: URL parsing\n // must not silently hide traversal, separators, a query or a fragment.\n try {\n const decoded = fileURLToPath(locator);\n if (pathToFileURL(decoded).href === locator) {\n candidate = `file://${normalizeSeparators(decoded)}`;\n }\n } catch {\n // Reject malformed URLs via the same containment check.\n }\n }\n if (!candidate.startsWith(prefix)) {\n throw new Error(\n 'Portable local asset locator must stay under the configured root',\n );\n }\n const key = candidate.slice(prefix.length);\n validateKey(key);\n return key;\n}\n\n/**\n * Refuse links and non-files beneath the trusted configured root. This\n * inspection assumes the host prevents untrusted concurrent filesystem edits.\n */\nexport async function checkLocalAssetPath(\n root: string,\n key: string,\n): Promise<void> {\n validateKey(key);\n const { lstat } = process.getBuiltinModule('node:fs/promises');\n const { join } = process.getBuiltinModule('node:path');\n const segments = ['', ...key.split('/')];\n let path = root;\n for (const [index, segment] of segments.entries()) {\n if (segment) path = join(path, segment);\n const stat = await lstat(path).catch((error: NodeJS.ErrnoException) => {\n if (error.code === 'ENOENT') return undefined;\n throw error;\n });\n if (!stat) return;\n const leaf = index === segments.length - 1;\n if (leaf ? !stat.isFile() || stat.nlink > 1 : !stat.isDirectory()) {\n throw new Error('Invalid portable local asset path');\n }\n }\n}\n"],"mappings":";AAAA,IAAM,SAAS;AAGR,SAAS,oBAAoB,OAAwB;CAC1D,OAAO,MAAM,WAAW,MAAM;AAChC;AAGO,SAAS,sBAAsB,KAAqB;CACzD,YAAY,GAAG;CACf,OAAO,SAAS;AAClB;AAGO,SAAS,cAAc,SAAyB;CACrD,IAAI,CAAC,oBAAoB,OAAO,GAC9B,MAAM,IAAI,MAAM,yCAAyC;CAE3D,MAAM,MAAM,QAAQ,MAAM,EAAa;CACvC,YAAY,GAAG;CACf,OAAO;AACT;AAEA,SAAS,YAAY,KAAmB;CACtC,KAAA,MAAW,WAAW,IAAI,MAAM,GAAG,G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AW,CAAC,IAAI,GAAG,IAAI,MAAM,GAAG,CAAC;CACvC,IAAI,OAAO;CACX,KAAA,MAAW,CAAC,OAAO,YAAY,SAAS,QAAQ,GAAG;EACjD,IAAI,SAAS,OAAO,KAAK,MAAM,OAAO;EACtC,MAAM,OAAO,MAAM,MAAM,IAAI,CAAA,CAAE,OAAO,UAAiC;GACrE,IAAI,MAAM,SAAS,UAAU,OAAO,KAAA;GACpC,MAAM;EACR,CAAC;EACD,IAAI,CAAC,MAAM;EAEX,IADa,UAAU,SAAS,SAAS,IAC9B,CAAC,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,YAAY,GAC9D,MAAM,IAAI,MAAM,mCAAmC;CAEvD;AACF"}
|
package/dist/files-runtime.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ type FilesModule = typeof import('@happyvertical/files');
|
|
|
19
19
|
export declare function registerFilesModule(mod: FilesModule): void;
|
|
20
20
|
/** Lazy equivalent of the files SDK's `getFilesystem`. */
|
|
21
21
|
export declare function getFilesystemLazy(options: GetFilesystemOptions): Promise<FilesystemInterface>;
|
|
22
|
+
/** Recognize the SDK's built-in Node filesystem, not an injected adapter. */
|
|
23
|
+
export declare function isBuiltinLocalFilesystem(filesystem: FilesystemInterface): boolean;
|
|
22
24
|
/**
|
|
23
25
|
* True when `error` is the files SDK's FileNotFoundError. Uses the loaded
|
|
24
26
|
* module's class when available and falls back to an `error.name` check so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files-runtime.d.ts","sourceRoot":"","sources":["../src/files-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG,cAAc,sBAAsB,CAAC,CAAC;AAIzD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAE1D;AAYD,0DAA0D;AAC1D,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAG9B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAK3D"}
|
|
1
|
+
{"version":3,"file":"files-runtime.d.ts","sourceRoot":"","sources":["../src/files-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG,cAAc,sBAAsB,CAAC,CAAC;AAIzD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAE1D;AAYD,0DAA0D;AAC1D,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAG9B;AAED,6EAA6E;AAC7E,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,mBAAmB,GAC9B,OAAO,CAIT;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAK3D"}
|
package/dist/filesystem.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as registerFilesModule } from "./chunks/files-runtime-MnHRkfnd.js";
|
|
2
2
|
import { registerOptionalDependency } from "@happyvertical/smrt-core";
|
|
3
3
|
import * as files from "@happyvertical/files";
|
|
4
4
|
import { FileNotFoundError, getFilesystem } from "@happyvertical/files";
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export { AssetRuntime, type AssetRuntimeDb, type AssetRuntimeLike, type AssetRun
|
|
|
18
18
|
export { AssetServeError, type ResolvedAssetBytes, resolveAssetForServing, type ServeAssetOptions, serveAsset, } from "./asset-serving.js";
|
|
19
19
|
export { AssetStatus } from "./asset-status.js";
|
|
20
20
|
export { AssetStatusCollection } from "./asset-statuses.js";
|
|
21
|
-
export { type AssetStorageOperation, type AssetStorageResolution, type AssetStorageResolveRequest, type AssetStorageResolver, AssetStore, type AssetStoreOptions, type ProviderOptions, type StoreOptions, } from "./asset-store.js";
|
|
21
|
+
export { type AssetStorageOperation, type AssetStorageResolution, type AssetStorageResolveRequest, type AssetStorageResolver, AssetStore, type AssetStoreOptions, type PortableLocalAssetStorageOptions, type ProviderOptions, type StoreOptions, } from "./asset-store.js";
|
|
22
22
|
export { AssetTag, type AssetTagOptions } from "./asset-tag.js";
|
|
23
23
|
export { AssetTagCollection } from "./asset-tags.js";
|
|
24
24
|
export { AssetType } from "./asset-type.js";
|
|
@@ -27,6 +27,7 @@ export { ASSET_TAG_CONTEXT, AssetCollection, type AssetTagInput, assetTagSlug, }
|
|
|
27
27
|
export { getFilesystemLazy, isFileNotFoundError, registerFilesModule, } from "./files-runtime.js";
|
|
28
28
|
export { Folder } from "./folder.js";
|
|
29
29
|
export { FolderCollection } from "./folders.js";
|
|
30
|
+
export { isLocalAssetLocator, localAssetKey, makeLocalAssetLocator, } from "./local-asset-locator.js";
|
|
30
31
|
export { type MediaBundleFileDescriptor, type MediaBundleGpsTrackPoint, type MediaBundleInspection, type MediaBundleInspectionLike, type MediaBundleNormalizedMetadata, type MediaBundleSupportFileInspection, type MediaSupportFileVisibility, type PersistMediaBundleAssetInput, type PersistMediaBundleAssociationInput, type PersistMediaBundleInspectionOptions, type PersistMediaBundleInspectionResult, type PersistMediaBundleMetadataArtifactInput, persistMediaBundleInspection, type SmrtMediaBundlePersistenceAdapter, } from "./media-bundle-persistence.js";
|
|
31
32
|
export { type AssetOwnerCollection, type AssetOwnerRecord, addOwnedAssetFromCollection, assertAssetLinkable, assertValidOwnedAssetRelationship, assertValidOwnedAssetSortOrder, getOwnedAssetsFromCollection, OWNED_ASSET_RELATIONSHIP_PATTERN, removeOwnedAssetFromCollection, resolveOwnedAssetsById, } from "./owned-asset-helpers.js";
|
|
32
33
|
export { type PrivateAssetAccess, type PrivateAssetMetadata, type PrivateAssetMetadataRequest, withPrivateAssetAccess, } from "./private-asset-access.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,wBAAwB,CAAC;AAGhC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAsB,CAAC;AAClE,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,2BAA2B,EAC3B,KAAK,qBAAqB,EAC1B,+BAA+B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,GACzB,MAAM,yBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,WAAW,EACX,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,SAAS,GACf,MAAM,wBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAmB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAoB,CAAC;AAE9D,OAAO,EACL,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,KAAK,qBAAqB,EA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