@hyperframes/studio-server 0.8.83 → 0.8.84
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/{chunk-EL3UQI46.js → chunk-2YEGCDJW.js} +21 -8
- package/dist/chunk-2YEGCDJW.js.map +1 -0
- package/dist/{chunk-WQ2WF2YJ.js → chunk-I3DRHG52.js} +7 -81
- package/dist/chunk-I3DRHG52.js.map +1 -0
- package/dist/chunk-IG4DRZI2.js +1571 -0
- package/dist/chunk-IG4DRZI2.js.map +1 -0
- package/dist/chunk-PMXUKOC3.js +22 -0
- package/dist/chunk-PMXUKOC3.js.map +1 -0
- package/dist/chunk-TTWLTYSQ.js +79 -0
- package/dist/chunk-TTWLTYSQ.js.map +1 -0
- package/dist/chunk-WUHW3MWG.js +100 -0
- package/dist/chunk-WUHW3MWG.js.map +1 -0
- package/dist/{chunk-HWBORC2U.js → chunk-YUPEBATT.js} +3 -3
- package/dist/{chunk-HWBORC2U.js.map → chunk-YUPEBATT.js.map} +1 -1
- package/dist/helpers/hfIdPersist.d.ts +23 -0
- package/dist/helpers/hfIdPersist.js +13 -0
- package/dist/helpers/hfIdPersist.js.map +1 -0
- package/dist/helpers/mediaCodecMap.js +2 -1
- package/dist/helpers/mediaProxyPreview.d.ts +2 -1
- package/dist/helpers/mediaProxyPreview.js +4 -3
- package/dist/helpers/proxyTranscoder.d.ts +4 -1
- package/dist/helpers/proxyTranscoder.js +7 -2
- package/dist/helpers/safePath.d.ts +22 -0
- package/dist/helpers/safePath.js +27 -0
- package/dist/helpers/safePath.js.map +1 -0
- package/dist/history/index.d.ts +49 -0
- package/dist/history/index.js +29 -0
- package/dist/history/index.js.map +1 -0
- package/dist/index.d.ts +9 -58
- package/dist/index.js +302 -1897
- package/dist/index.js.map +1 -1
- package/dist/{mediaProxyPreview-BMHd9G3N.d.ts → mediaProxyPreview-CLu9FdIr.d.ts} +2 -139
- package/dist/projectHistory-Cm8Mdmmv.d.ts +139 -0
- package/package.json +15 -3
- package/dist/chunk-EL3UQI46.js.map +0 -1
- package/dist/chunk-WQ2WF2YJ.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const isCompositionSource: (html: string) => boolean;
|
|
2
|
+
/** Pins hf-ids into every composition in the project. A host runs it once before it serves or
|
|
3
|
+
* watches the project: an id write during a session reaches Studio as an outside edit and reloads it.
|
|
4
|
+
* A file whose content hash matches the last run's (kept in `.hyperframes`) is not parsed again. */
|
|
5
|
+
declare function stampProjectHfIds(projectDir: string): void;
|
|
6
|
+
/**
|
|
7
|
+
* Read `filePath`, mint any missing `data-hf-id`s, write the stamped content
|
|
8
|
+
* back if new ids were added, and return the stamped content. Every open of the path is
|
|
9
|
+
* no-follow (POSIX) and the write renames a sibling temp file over it, so a symlink swapped
|
|
10
|
+
* in at the path is never read or written through (CodeQL js/file-system-race).
|
|
11
|
+
*
|
|
12
|
+
* Falls back to read-only stamping when the file isn't writable (read-only
|
|
13
|
+
* fs, sandbox) — serving stamped content without persisting is still correct;
|
|
14
|
+
* ids are content-keyed so the SDK mints the same ones from the same bytes.
|
|
15
|
+
*
|
|
16
|
+
* Returns null when the file is missing, unreadable, or not a regular file.
|
|
17
|
+
*
|
|
18
|
+
* A write that lands while ids are minted is kept: the file is replaced only if
|
|
19
|
+
* it still holds the bytes that were stamped, else it is left for the next open or save.
|
|
20
|
+
*/
|
|
21
|
+
declare function stampFileHfIds(filePath: string): string | null;
|
|
22
|
+
|
|
23
|
+
export { isCompositionSource, stampFileHfIds, stampProjectHfIds };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isCompositionSource,
|
|
3
|
+
stampFileHfIds,
|
|
4
|
+
stampProjectHfIds
|
|
5
|
+
} from "../chunk-WUHW3MWG.js";
|
|
6
|
+
import "../chunk-PMXUKOC3.js";
|
|
7
|
+
import "../chunk-TTWLTYSQ.js";
|
|
8
|
+
export {
|
|
9
|
+
isCompositionSource,
|
|
10
|
+
stampFileHfIds,
|
|
11
|
+
stampProjectHfIds
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=hfIdPersist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as PreviewApiAdapter, P as PreviewDocumentStore, i as injectMediaCodecMap, f as injectMediaCodecMapIntoHtml, g as isAutoProxyEnabled, p as proxyEtagSalt, r as resolvePreviewMediaCodecProbeCache } from '../mediaProxyPreview-CLu9FdIr.js';
|
|
2
2
|
import './mediaCodecMap.js';
|
|
3
3
|
import '@hyperframes/core';
|
|
4
4
|
import '@hyperframes/parsers';
|
|
5
5
|
import '@hyperframes/core/compiler';
|
|
6
|
+
import '../projectHistory-Cm8Mdmmv.js';
|
|
@@ -4,9 +4,10 @@ import {
|
|
|
4
4
|
isAutoProxyEnabled,
|
|
5
5
|
proxyEtagSalt,
|
|
6
6
|
resolvePreviewMediaCodecProbeCache
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-YUPEBATT.js";
|
|
8
|
+
import "../chunk-2YEGCDJW.js";
|
|
9
|
+
import "../chunk-I3DRHG52.js";
|
|
10
|
+
import "../chunk-TTWLTYSQ.js";
|
|
10
11
|
export {
|
|
11
12
|
injectMediaCodecMap,
|
|
12
13
|
injectMediaCodecMapIntoHtml,
|
|
@@ -18,6 +18,7 @@ import { ProxyVariant } from './mediaCodecMap.js';
|
|
|
18
18
|
*/
|
|
19
19
|
declare const PROXY_PARAMS_VERSION = "v5";
|
|
20
20
|
declare const TRANSCODE_TIMEOUT_MS: number;
|
|
21
|
+
declare const PROXY_PENDING_RETRY_AFTER_SECONDS = 2;
|
|
21
22
|
declare const DEFAULT_PROXY_WAIT_TIMEOUT_MS: number;
|
|
22
23
|
declare class ProxyTranscodeError extends Error {
|
|
23
24
|
readonly exitCode: number | null;
|
|
@@ -48,6 +49,8 @@ declare function getProxyCachePath(projectDir: string, absoluteSourcePath: strin
|
|
|
48
49
|
/** Test hook: forget remembered transcode failures (module state persists
|
|
49
50
|
* across tests that don't reload the module). */
|
|
50
51
|
declare function clearFailedTranscodesForTest(): void;
|
|
52
|
+
/** Null while a copy for this project is being made; otherwise a mark that moves when any copy finishes. */
|
|
53
|
+
declare function proxyActivityMark(projectDir: string): string | null;
|
|
51
54
|
/**
|
|
52
55
|
* Resolves the cached proxy variant for `absoluteSourcePath`, transcoding it at
|
|
53
56
|
* most once per cache key. Concurrent calls for the same key (including a
|
|
@@ -58,4 +61,4 @@ declare function clearFailedTranscodesForTest(): void;
|
|
|
58
61
|
*/
|
|
59
62
|
declare function resolveProxy(projectDir: string, absoluteSourcePath: string, variant?: ProxyVariant): Promise<string>;
|
|
60
63
|
|
|
61
|
-
export { DEFAULT_PROXY_WAIT_TIMEOUT_MS, FfmpegMissingFilterError, PROXY_PARAMS_VERSION, ProxyCapacityError, ProxySourceOutsideProjectError, ProxyTranscodeError, ProxyWaitTimeoutError, TRANSCODE_TIMEOUT_MS, clearFailedTranscodesForTest, getProxyCachePath, resolveProxy, waitForProxy };
|
|
64
|
+
export { DEFAULT_PROXY_WAIT_TIMEOUT_MS, FfmpegMissingFilterError, PROXY_PARAMS_VERSION, PROXY_PENDING_RETRY_AFTER_SECONDS, ProxyCapacityError, ProxySourceOutsideProjectError, ProxyTranscodeError, ProxyWaitTimeoutError, TRANSCODE_TIMEOUT_MS, clearFailedTranscodesForTest, getProxyCachePath, proxyActivityMark, resolveProxy, waitForProxy };
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
DEFAULT_PROXY_WAIT_TIMEOUT_MS,
|
|
3
3
|
FfmpegMissingFilterError,
|
|
4
4
|
PROXY_PARAMS_VERSION,
|
|
5
|
+
PROXY_PENDING_RETRY_AFTER_SECONDS,
|
|
5
6
|
ProxyCapacityError,
|
|
6
7
|
ProxySourceOutsideProjectError,
|
|
7
8
|
ProxyTranscodeError,
|
|
@@ -9,14 +10,17 @@ import {
|
|
|
9
10
|
TRANSCODE_TIMEOUT_MS,
|
|
10
11
|
clearFailedTranscodesForTest,
|
|
11
12
|
getProxyCachePath,
|
|
13
|
+
proxyActivityMark,
|
|
12
14
|
resolveProxy,
|
|
13
15
|
waitForProxy
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-2YEGCDJW.js";
|
|
17
|
+
import "../chunk-I3DRHG52.js";
|
|
18
|
+
import "../chunk-TTWLTYSQ.js";
|
|
16
19
|
export {
|
|
17
20
|
DEFAULT_PROXY_WAIT_TIMEOUT_MS,
|
|
18
21
|
FfmpegMissingFilterError,
|
|
19
22
|
PROXY_PARAMS_VERSION,
|
|
23
|
+
PROXY_PENDING_RETRY_AFTER_SECONDS,
|
|
20
24
|
ProxyCapacityError,
|
|
21
25
|
ProxySourceOutsideProjectError,
|
|
22
26
|
ProxyTranscodeError,
|
|
@@ -24,6 +28,7 @@ export {
|
|
|
24
28
|
TRANSCODE_TIMEOUT_MS,
|
|
25
29
|
clearFailedTranscodesForTest,
|
|
26
30
|
getProxyCachePath,
|
|
31
|
+
proxyActivityMark,
|
|
27
32
|
resolveProxy,
|
|
28
33
|
waitForProxy
|
|
29
34
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { folderGone, isProjectRootMissing, isSafePath, mkdirWithinProject, realProjectRoot, realpath, resolveWithinProject } from '@hyperframes/core/safe-path';
|
|
2
|
+
|
|
3
|
+
/** The real path; for a path not there (yet, or any more), the nearest existing folder's real path plus the rest. */
|
|
4
|
+
declare function realFilePath(filePath: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* `resolveWithinProject` with every link inside the project resolved now, so a write to the result lands on the
|
|
7
|
+
* file checked here even if a link on the way is retargeted before the write.
|
|
8
|
+
*/
|
|
9
|
+
declare function pinWithinProject(base: string, relativePath: string): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* True when any directory segment of a relative path is a dot-directory or
|
|
12
|
+
* node_modules. Projects that vendor tooling assets under dot-directories
|
|
13
|
+
* (.hyperframes/, .cache/, …) ship example/preset HTML that must not surface
|
|
14
|
+
* as project compositions or studio lint targets (#1384). The file tree is
|
|
15
|
+
* deliberately not filtered — this only gates discovery.
|
|
16
|
+
*/
|
|
17
|
+
declare function isInHiddenOrVendorDir(relPath: string): boolean;
|
|
18
|
+
/** Recursively walk a directory and return relative file paths. A subfolder that is unreadable
|
|
19
|
+
* or removed mid-walk is skipped; any other failure, or an unreadable `dir` itself, throws. */
|
|
20
|
+
declare function walkDir(dir: string, prefix?: string): string[];
|
|
21
|
+
|
|
22
|
+
export { isInHiddenOrVendorDir, pinWithinProject, realFilePath, walkDir };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
folderGone,
|
|
3
|
+
isInHiddenOrVendorDir,
|
|
4
|
+
isProjectRootMissing,
|
|
5
|
+
isSafePath,
|
|
6
|
+
mkdirWithinProject,
|
|
7
|
+
pinWithinProject,
|
|
8
|
+
realFilePath,
|
|
9
|
+
realProjectRoot,
|
|
10
|
+
realpath,
|
|
11
|
+
resolveWithinProject,
|
|
12
|
+
walkDir
|
|
13
|
+
} from "../chunk-TTWLTYSQ.js";
|
|
14
|
+
export {
|
|
15
|
+
folderGone,
|
|
16
|
+
isInHiddenOrVendorDir,
|
|
17
|
+
isProjectRootMissing,
|
|
18
|
+
isSafePath,
|
|
19
|
+
mkdirWithinProject,
|
|
20
|
+
pinWithinProject,
|
|
21
|
+
realFilePath,
|
|
22
|
+
realProjectRoot,
|
|
23
|
+
realpath,
|
|
24
|
+
resolveWithinProject,
|
|
25
|
+
walkDir
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=safePath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { P as ProjectHistory } from '../projectHistory-Cm8Mdmmv.js';
|
|
2
|
+
export { C as ClosedWindow, D as DEFAULT_HISTORY_ROOT, S as HISTORY_START, H as HistoryClosedError, a as HistoryEntry, b as HistoryEntrySide, c as HistoryFileChange, d as HistoryListItem, e as HistoryResult, f as HistoryWho, g as HistoryWindow, M as MAX_WINDOW_IDLE_MS, h as ProjectHistoryOptions, U as UNDO_MODES, i as UndoMode, o as openProjectHistory } from '../projectHistory-Cm8Mdmmv.js';
|
|
3
|
+
|
|
4
|
+
declare class HistoryBusyError extends Error {
|
|
5
|
+
readonly pid: number;
|
|
6
|
+
constructor(pid: number);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare class HistoryIdError extends Error {
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type Opened = Promise<ProjectHistory | null>;
|
|
14
|
+
/** A host's histories, one per project folder, opened on first use; a new project at the path gets its own. */
|
|
15
|
+
declare function historyCache(open: (projectDir: string) => Opened): {
|
|
16
|
+
get: (projectDir: string) => Promise<ProjectHistory | null>;
|
|
17
|
+
/** The history if one was opened, without opening it. */
|
|
18
|
+
peek: (projectDir: string) => Opened | undefined;
|
|
19
|
+
forget: (projectDir: string) => boolean;
|
|
20
|
+
closeAll: () => Promise<(void | undefined)[]>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
interface PruneOptions {
|
|
24
|
+
now?: number;
|
|
25
|
+
/** Reports what would go, with the same checks, and removes nothing. */
|
|
26
|
+
dryRun?: boolean;
|
|
27
|
+
/** Projects under this folder are scratch: their history goes as soon as they do. */
|
|
28
|
+
tempDir?: string;
|
|
29
|
+
/** One history that could not be checked or removed; the rest are still pruned. */
|
|
30
|
+
onError?: (error: unknown) => void;
|
|
31
|
+
/** Starts no further history after this long; the rest wait for the next run. */
|
|
32
|
+
budgetMs?: number;
|
|
33
|
+
}
|
|
34
|
+
interface ProjectHistoryRecord {
|
|
35
|
+
id: string;
|
|
36
|
+
projectDir: string;
|
|
37
|
+
lastUsedMs: number;
|
|
38
|
+
}
|
|
39
|
+
/** Every history whose project is still in the folder it was recorded for; reads only. */
|
|
40
|
+
declare function listProjectHistories(historyRoot: string): ProjectHistoryRecord[];
|
|
41
|
+
interface PrunedHistory {
|
|
42
|
+
id: string;
|
|
43
|
+
projectDir: string;
|
|
44
|
+
bytes: number;
|
|
45
|
+
}
|
|
46
|
+
/** Removes the histories whose project is gone and that no live process holds. */
|
|
47
|
+
declare function pruneGoneProjectHistories(historyRoot: string, options?: PruneOptions): Promise<PrunedHistory[]>;
|
|
48
|
+
|
|
49
|
+
export { HistoryBusyError, HistoryIdError, ProjectHistory, type ProjectHistoryRecord, type PrunedHistory, historyCache, listProjectHistories, pruneGoneProjectHistories };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_HISTORY_ROOT,
|
|
3
|
+
HistoryBusyError,
|
|
4
|
+
HistoryClosedError,
|
|
5
|
+
HistoryIdError,
|
|
6
|
+
MAX_WINDOW_IDLE_MS,
|
|
7
|
+
START,
|
|
8
|
+
UNDO_MODES,
|
|
9
|
+
historyCache,
|
|
10
|
+
listProjectHistories,
|
|
11
|
+
openProjectHistory,
|
|
12
|
+
pruneGoneProjectHistories
|
|
13
|
+
} from "../chunk-IG4DRZI2.js";
|
|
14
|
+
import "../chunk-PMXUKOC3.js";
|
|
15
|
+
import "../chunk-TTWLTYSQ.js";
|
|
16
|
+
export {
|
|
17
|
+
DEFAULT_HISTORY_ROOT,
|
|
18
|
+
START as HISTORY_START,
|
|
19
|
+
HistoryBusyError,
|
|
20
|
+
HistoryClosedError,
|
|
21
|
+
HistoryIdError,
|
|
22
|
+
MAX_WINDOW_IDLE_MS,
|
|
23
|
+
UNDO_MODES,
|
|
24
|
+
historyCache,
|
|
25
|
+
listProjectHistories,
|
|
26
|
+
openProjectHistory,
|
|
27
|
+
pruneGoneProjectHistories
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
|
-
import { S as StudioApiAdapter, P as
|
|
3
|
-
export {
|
|
2
|
+
import { S as StudioApiAdapter, P as PreviewDocumentStore, M as MediaProcessingJobState } from './mediaProxyPreview-CLu9FdIr.js';
|
|
3
|
+
export { L as LintResult, a as PreviewApiAdapter, R as RenderJobState, b as ResolvedProject, c as StudioSelectionResponse, d as StudioSelectionSnapshot, e as StudioSelectionTextField } from './mediaProxyPreview-CLu9FdIr.js';
|
|
4
|
+
export { C as ClosedWindow, D as DEFAULT_HISTORY_ROOT, S as HISTORY_START, H as HistoryClosedError, a as HistoryEntry, b as HistoryEntrySide, c as HistoryFileChange, d as HistoryListItem, e as HistoryResult, f as HistoryWho, g as HistoryWindow, M as MAX_WINDOW_IDLE_MS, P as ProjectHistory, h as ProjectHistoryOptions, U as UNDO_MODES, i as UndoMode, o as openProjectHistory } from './projectHistory-Cm8Mdmmv.js';
|
|
5
|
+
export { HistoryBusyError, HistoryIdError, ProjectHistoryRecord, PrunedHistory, historyCache, listProjectHistories, pruneGoneProjectHistories } from './history/index.js';
|
|
6
|
+
export { walkDir } from './helpers/safePath.js';
|
|
7
|
+
export { stampProjectHfIds } from './helpers/hfIdPersist.js';
|
|
4
8
|
import { SourceMutationTarget } from './helpers/sourceMutation.js';
|
|
5
9
|
export { PatchOperation, dedupeClonedCompositionId, findTargetElement, parseSourceDocument, patchElementInHtml, removeElementFromHtml, splitElementInHtml } from './helpers/sourceMutation.js';
|
|
6
10
|
export { ScreenshotClip, getElementScreenshotClip } from './helpers/screenshotClip.js';
|
|
7
11
|
export { STUDIO_MANUAL_EDITS_PATH, StudioManualEditsRenderScriptOptions, createStudioManualEditsRenderBodyScript, createStudioPositionSeekReapplyScript } from './helpers/manualEditsRenderScript.js';
|
|
8
12
|
export { STUDIO_MOTION_PATH, StudioMotionRenderScriptOptions, createStudioMotionRenderBodyScript } from './helpers/studioMotionRenderScript.js';
|
|
9
|
-
export { isSafePath } from '@hyperframes/core';
|
|
13
|
+
export { isSafePath } from '@hyperframes/core/safe-path';
|
|
14
|
+
import '@hyperframes/core';
|
|
10
15
|
import '@hyperframes/parsers';
|
|
11
16
|
import '@hyperframes/core/compiler';
|
|
12
17
|
import './helpers/mediaCodecMap.js';
|
|
@@ -54,60 +59,6 @@ declare function compositionsAffectedBy(projectDir: string, changedPath: string)
|
|
|
54
59
|
|
|
55
60
|
declare function affectsPreview(projectDir: string, changedPath: string): boolean;
|
|
56
61
|
|
|
57
|
-
declare class HistoryBusyError extends Error {
|
|
58
|
-
readonly pid: number;
|
|
59
|
-
constructor(pid: number);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
declare class HistoryIdError extends Error {
|
|
63
|
-
constructor(message: string);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
type Opened = Promise<ProjectHistory | null>;
|
|
67
|
-
/** A host's histories, one per project folder, opened on first use; a new project at the path gets its own. */
|
|
68
|
-
declare function historyCache(open: (projectDir: string) => Opened): {
|
|
69
|
-
get: (projectDir: string) => Promise<ProjectHistory | null>;
|
|
70
|
-
/** The history if one was opened, without opening it. */
|
|
71
|
-
peek: (projectDir: string) => Opened | undefined;
|
|
72
|
-
forget: (projectDir: string) => boolean;
|
|
73
|
-
closeAll: () => Promise<(void | undefined)[]>;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
interface PruneOptions {
|
|
77
|
-
now?: number;
|
|
78
|
-
/** Reports what would go, with the same checks, and removes nothing. */
|
|
79
|
-
dryRun?: boolean;
|
|
80
|
-
/** Projects under this folder are scratch: their history goes as soon as they do. */
|
|
81
|
-
tempDir?: string;
|
|
82
|
-
/** One history that could not be checked or removed; the rest are still pruned. */
|
|
83
|
-
onError?: (error: unknown) => void;
|
|
84
|
-
/** Starts no further history after this long; the rest wait for the next run. */
|
|
85
|
-
budgetMs?: number;
|
|
86
|
-
}
|
|
87
|
-
interface ProjectHistoryRecord {
|
|
88
|
-
id: string;
|
|
89
|
-
projectDir: string;
|
|
90
|
-
lastUsedMs: number;
|
|
91
|
-
}
|
|
92
|
-
/** Every history whose project is still in the folder it was recorded for; reads only. */
|
|
93
|
-
declare function listProjectHistories(historyRoot: string): ProjectHistoryRecord[];
|
|
94
|
-
interface PrunedHistory {
|
|
95
|
-
id: string;
|
|
96
|
-
projectDir: string;
|
|
97
|
-
bytes: number;
|
|
98
|
-
}
|
|
99
|
-
/** Removes the histories whose project is gone and that no live process holds. */
|
|
100
|
-
declare function pruneGoneProjectHistories(historyRoot: string, options?: PruneOptions): Promise<PrunedHistory[]>;
|
|
101
|
-
|
|
102
|
-
/** Recursively walk a directory and return relative file paths. A subfolder that is unreadable
|
|
103
|
-
* or removed mid-walk is skipped; any other failure, or an unreadable `dir` itself, throws. */
|
|
104
|
-
declare function walkDir(dir: string, prefix?: string): string[];
|
|
105
|
-
|
|
106
|
-
/** Pins hf-ids into every composition in the project. A host runs it once before it serves or
|
|
107
|
-
* watches the project: an id write during a session reaches Studio as an outside edit and reloads it.
|
|
108
|
-
* A file whose content hash matches the last run's (kept in `.hyperframes`) is not parsed again. */
|
|
109
|
-
declare function stampProjectHfIds(projectDir: string): void;
|
|
110
|
-
|
|
111
62
|
interface DuplicateElementResult {
|
|
112
63
|
html: string;
|
|
113
64
|
matched: boolean;
|
|
@@ -248,4 +199,4 @@ type BackgroundRemovalRender = (options: {
|
|
|
248
199
|
}>;
|
|
249
200
|
declare function createBackgroundRemovalJob(opts: BackgroundRemovalJobOptions, render: BackgroundRemovalRender): MediaProcessingJobState;
|
|
250
201
|
|
|
251
|
-
export { type AppliedFileMutation, type BackgroundRemovalRender, DELETED_VERSION, type DuplicateElementResult, type FileMutationInput, type FileWriteReceipt,
|
|
202
|
+
export { type AppliedFileMutation, type BackgroundRemovalRender, DELETED_VERSION, type DuplicateElementResult, type FileMutationInput, type FileWriteReceipt, MIME_TYPES, MediaProcessingJobState, PREVIEW_BUNDLE_OPTIONS, SourceMutationTarget, StudioApiAdapter, type ThumbnailOutputDimensions, affectsPreview, affectsProjectSignature, applyFileMutations, buildSubCompositionHtml, compositionsAffectedBy, consumeFileWriteReceipt, createBackgroundRemovalJob, createPreviewDocumentStore, createProjectSignature, createStudioApi, duplicateElementInHtml, fileContentVersion, getMimeType, identifyFileWrite, requestSubPath, settledFileTag, thumbnailDeviceScaleFactor };
|