@hyperframes/studio-server 0.8.80 → 0.8.82
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-YGANSFUU.js → chunk-FTDTO3QP.js} +3 -3
- package/dist/{chunk-56JREE33.js → chunk-G6IIFKXY.js} +7 -14
- package/dist/{chunk-56JREE33.js.map → chunk-G6IIFKXY.js.map} +1 -1
- package/dist/{chunk-KOB22VPG.js → chunk-TJQ76IEA.js} +71 -5
- package/dist/chunk-TJQ76IEA.js.map +1 -0
- package/dist/{chunk-P5EJPIH3.js → chunk-W6TFBTP2.js} +7 -6
- package/dist/chunk-W6TFBTP2.js.map +1 -0
- package/dist/helpers/mediaCodecMap.js +1 -1
- package/dist/helpers/mediaProxyPreview.d.ts +1 -1
- package/dist/helpers/mediaProxyPreview.js +3 -3
- package/dist/helpers/proxyTranscoder.js +2 -2
- package/dist/helpers/sourceMutation.js +1 -1
- package/dist/index.d.ts +26 -3
- package/dist/index.js +455 -250
- package/dist/index.js.map +1 -1
- package/dist/{mediaProxyPreview-B7ckRI-l.d.ts → mediaProxyPreview-BMHd9G3N.d.ts} +5 -3
- package/package.json +3 -3
- package/dist/chunk-KOB22VPG.js.map +0 -1
- package/dist/chunk-P5EJPIH3.js.map +0 -1
- /package/dist/{chunk-YGANSFUU.js.map → chunk-FTDTO3QP.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
|
-
import { S as StudioApiAdapter, P as ProjectHistory, a as PreviewDocumentStore, M as MediaProcessingJobState } from './mediaProxyPreview-
|
|
3
|
-
export { C as ClosedWindow, D as DEFAULT_HISTORY_ROOT, b as HISTORY_START, H as HistoryClosedError, c as HistoryEntry, d as HistoryEntrySide, e as HistoryFileChange, f as HistoryListItem, g as HistoryResult, h as HistoryWho, i as HistoryWindow, L as LintResult, j as MAX_WINDOW_IDLE_MS, k as PreviewApiAdapter, l as ProjectHistoryOptions, R as RenderJobState, m as ResolvedProject, n as StudioSelectionResponse, o as StudioSelectionSnapshot, p as StudioSelectionTextField, U as UNDO_MODES, q as UndoMode, r as openProjectHistory } from './mediaProxyPreview-
|
|
2
|
+
import { S as StudioApiAdapter, P as ProjectHistory, a as PreviewDocumentStore, M as MediaProcessingJobState } from './mediaProxyPreview-BMHd9G3N.js';
|
|
3
|
+
export { C as ClosedWindow, D as DEFAULT_HISTORY_ROOT, b as HISTORY_START, H as HistoryClosedError, c as HistoryEntry, d as HistoryEntrySide, e as HistoryFileChange, f as HistoryListItem, g as HistoryResult, h as HistoryWho, i as HistoryWindow, L as LintResult, j as MAX_WINDOW_IDLE_MS, k as PreviewApiAdapter, l as ProjectHistoryOptions, R as RenderJobState, m as ResolvedProject, n as StudioSelectionResponse, o as StudioSelectionSnapshot, p as StudioSelectionTextField, U as UNDO_MODES, q as UndoMode, r as openProjectHistory } from './mediaProxyPreview-BMHd9G3N.js';
|
|
4
4
|
import { SourceMutationTarget } from './helpers/sourceMutation.js';
|
|
5
5
|
export { PatchOperation, dedupeClonedCompositionId, findTargetElement, parseSourceDocument, patchElementInHtml, removeElementFromHtml, splitElementInHtml } from './helpers/sourceMutation.js';
|
|
6
6
|
export { ScreenshotClip, getElementScreenshotClip } from './helpers/screenshotClip.js';
|
|
@@ -59,6 +59,10 @@ declare class HistoryBusyError extends Error {
|
|
|
59
59
|
constructor(pid: number);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
declare class HistoryIdError extends Error {
|
|
63
|
+
constructor(message: string);
|
|
64
|
+
}
|
|
65
|
+
|
|
62
66
|
type Opened = Promise<ProjectHistory | null>;
|
|
63
67
|
/** A host's histories, one per project folder, opened on first use; a new project at the path gets its own. */
|
|
64
68
|
declare function historyCache(open: (projectDir: string) => Opened): {
|
|
@@ -69,6 +73,25 @@ declare function historyCache(open: (projectDir: string) => Opened): {
|
|
|
69
73
|
closeAll: () => Promise<(void | undefined)[]>;
|
|
70
74
|
};
|
|
71
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 PrunedHistory {
|
|
88
|
+
id: string;
|
|
89
|
+
projectDir: string;
|
|
90
|
+
bytes: number;
|
|
91
|
+
}
|
|
92
|
+
/** Removes the histories whose project is gone and that no live process holds. */
|
|
93
|
+
declare function pruneGoneProjectHistories(historyRoot: string, options?: PruneOptions): Promise<PrunedHistory[]>;
|
|
94
|
+
|
|
72
95
|
/** Recursively walk a directory and return relative file paths. A subfolder that is unreadable
|
|
73
96
|
* or removed mid-walk is skipped; any other failure, or an unreadable `dir` itself, throws. */
|
|
74
97
|
declare function walkDir(dir: string, prefix?: string): string[];
|
|
@@ -218,4 +241,4 @@ type BackgroundRemovalRender = (options: {
|
|
|
218
241
|
}>;
|
|
219
242
|
declare function createBackgroundRemovalJob(opts: BackgroundRemovalJobOptions, render: BackgroundRemovalRender): MediaProcessingJobState;
|
|
220
243
|
|
|
221
|
-
export { type AppliedFileMutation, type BackgroundRemovalRender, DELETED_VERSION, type DuplicateElementResult, type FileMutationInput, type FileWriteReceipt, HistoryBusyError, MIME_TYPES, MediaProcessingJobState, PREVIEW_BUNDLE_OPTIONS, ProjectHistory, SourceMutationTarget, StudioApiAdapter, type ThumbnailOutputDimensions, affectsPreview, affectsProjectSignature, applyFileMutations, buildSubCompositionHtml, compositionsAffectedBy, consumeFileWriteReceipt, createBackgroundRemovalJob, createPreviewDocumentStore, createProjectSignature, createStudioApi, duplicateElementInHtml, fileContentVersion, getMimeType, historyCache, identifyFileWrite, requestSubPath, settledFileTag, stampProjectHfIds, thumbnailDeviceScaleFactor, walkDir };
|
|
244
|
+
export { type AppliedFileMutation, type BackgroundRemovalRender, DELETED_VERSION, type DuplicateElementResult, type FileMutationInput, type FileWriteReceipt, HistoryBusyError, HistoryIdError, MIME_TYPES, MediaProcessingJobState, PREVIEW_BUNDLE_OPTIONS, ProjectHistory, type PrunedHistory, SourceMutationTarget, StudioApiAdapter, type ThumbnailOutputDimensions, affectsPreview, affectsProjectSignature, applyFileMutations, buildSubCompositionHtml, compositionsAffectedBy, consumeFileWriteReceipt, createBackgroundRemovalJob, createPreviewDocumentStore, createProjectSignature, createStudioApi, duplicateElementInHtml, fileContentVersion, getMimeType, historyCache, identifyFileWrite, pruneGoneProjectHistories, requestSubPath, settledFileTag, stampProjectHfIds, thumbnailDeviceScaleFactor, walkDir };
|