@hyperframes/studio-server 0.9.26 → 0.9.28-alpha.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/dist/index.d.ts CHANGED
@@ -233,4 +233,57 @@ type BackgroundRemovalRender = (options: {
233
233
  }>;
234
234
  declare function createBackgroundRemovalJob(opts: BackgroundRemovalJobOptions, render: BackgroundRemovalRender): MediaProcessingJobState;
235
235
 
236
- export { type AppliedFileMutation, type BackgroundRemovalRender, DELETED_VERSION, type DuplicateElementResult, type FileMutationInput, type FileWriteReceipt, MAX_UPLOAD_BYTES, MIME_TYPES, MediaProcessingJobState, PREVIEW_BUNDLE_OPTIONS, STUDIO_SIGNATURE_MANIFEST_PATHS, SourceMutationTarget, StudioApiAdapter, type ThumbnailOutputDimensions, affectsPreview, affectsProjectSignature, applyFileMutations, buildSubCompositionHtml, cleanupProxyCache, compositionsAffectedBy, consumeFileWriteReceipt, createBackgroundRemovalJob, createPreviewDocumentStore, createProjectSignature, createProjectSignatureAsync, createStudioApi, duplicateElementInHtml, fileContentVersion, getMimeType, identifyFileWrite, requestSubPath, settledFileTag, thumbnailDeviceScaleFactor };
236
+ type LocalShareAudience = "public" | "team" | "invite" | "private";
237
+ interface LocalShareSpace {
238
+ id: string;
239
+ name: string;
240
+ bound: boolean;
241
+ canCreate: boolean;
242
+ plan?: "free" | "subscribed" | null;
243
+ upgradeUrl?: string | null;
244
+ audiences: LocalShareAudience[];
245
+ used: number | null;
246
+ limit: number | null;
247
+ }
248
+ interface LocalShareState {
249
+ state: "not_shared" | "link_off" | "ready" | "processing" | "failed" | "unavailable";
250
+ url: string | null;
251
+ manageUrl: string;
252
+ changed: boolean | null;
253
+ hasReadyVersion?: boolean;
254
+ failure?: string | null;
255
+ audience: LocalShareAudience | null;
256
+ spaceId: string | null;
257
+ source: "not_checked" | "ready" | "video_only";
258
+ }
259
+ interface LocalShareJob {
260
+ id: string;
261
+ state: "running" | "done" | "failed";
262
+ step: string;
263
+ result: LocalShareState | null;
264
+ error: {
265
+ code: string;
266
+ message: string;
267
+ } | null;
268
+ }
269
+ interface LocalShareSnapshot {
270
+ versionSharing: boolean;
271
+ share: LocalShareState;
272
+ spaces: LocalShareSpace[];
273
+ job: LocalShareJob | null;
274
+ }
275
+ type LocalShareAction = {
276
+ action: "share" | "update" | "access" | "off" | "on" | "login";
277
+ audience?: LocalShareAudience;
278
+ space?: string;
279
+ videoOnly?: boolean;
280
+ };
281
+ type LocalShareInteraction = {
282
+ event: "share_opened";
283
+ link: "none" | "live" | "changed";
284
+ } | {
285
+ event: "share_link_copied";
286
+ via: "copy";
287
+ };
288
+
289
+ export { type AppliedFileMutation, type BackgroundRemovalRender, DELETED_VERSION, type DuplicateElementResult, type FileMutationInput, type FileWriteReceipt, type LocalShareAction, type LocalShareAudience, type LocalShareInteraction, type LocalShareJob, type LocalShareSnapshot, type LocalShareSpace, type LocalShareState, MAX_UPLOAD_BYTES, MIME_TYPES, MediaProcessingJobState, PREVIEW_BUNDLE_OPTIONS, STUDIO_SIGNATURE_MANIFEST_PATHS, SourceMutationTarget, StudioApiAdapter, type ThumbnailOutputDimensions, affectsPreview, affectsProjectSignature, applyFileMutations, buildSubCompositionHtml, cleanupProxyCache, compositionsAffectedBy, consumeFileWriteReceipt, createBackgroundRemovalJob, createPreviewDocumentStore, createProjectSignature, createProjectSignatureAsync, createStudioApi, duplicateElementInHtml, fileContentVersion, getMimeType, identifyFileWrite, requestSubPath, settledFileTag, thumbnailDeviceScaleFactor };
package/dist/index.js CHANGED
@@ -849,13 +849,13 @@ import {
849
849
  writeFileSync,
850
850
  mkdirSync,
851
851
  lstatSync,
852
- mkdtempSync,
853
852
  renameSync,
854
853
  rmSync,
855
854
  statSync
856
855
  } from "fs";
857
856
  import { dirname as dirname2, join as join3 } from "path";
858
857
  import { findFfBinary } from "@hyperframes/parsers/ff-binaries";
858
+ import { createStagingDir } from "@hyperframes/core/atomic-file";
859
859
  var SAMPLE_RATE = 4e3;
860
860
  var PEAK_COUNT = 4e3;
861
861
  var WAVEFORM_CACHE_VERSION = "v2";
@@ -947,7 +947,7 @@ function writeWaveformCache(cachePath, peaks) {
947
947
  if (!isWaveformCacheDirectory(cacheDir)) {
948
948
  throw new Error("Waveform cache must be a directory, not a symlink");
949
949
  }
950
- const stagingDir = mkdtempSync(join3(cacheDir, ".waveform-"));
950
+ const stagingDir = createStagingDir(cacheDir, ".waveform-");
951
951
  try {
952
952
  const stagingPath = join3(stagingDir, "peaks.json");
953
953
  writeFileSync(stagingPath, JSON.stringify(peaks), { flag: "wx" });
@@ -962,7 +962,7 @@ function writeWaveformCache(cachePath, peaks) {
962
962
 
963
963
  // src/helpers/mediaValidation.ts
964
964
  import { spawnSync } from "child_process";
965
- import { mkdtempSync as mkdtempSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
965
+ import { mkdtempSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
966
966
  import { tmpdir } from "os";
967
967
  import { basename, join as join4 } from "path";
968
968
  import { FFPROBE_PATH_ENV, findFfBinary as findFfBinary2 } from "@hyperframes/parsers/ff-binaries";
@@ -1016,7 +1016,7 @@ function checkStreams(stdout, isVideo, isAudio) {
1016
1016
  }
1017
1017
  }
1018
1018
  function validateUploadedMediaBuffer(fileName, buffer, runner = defaultRunner) {
1019
- const tempDir = mkdtempSync2(join4(tmpdir(), "hyperframes-upload-"));
1019
+ const tempDir = mkdtempSync(join4(tmpdir(), "hyperframes-upload-"));
1020
1020
  const tempPath = join4(tempDir, basename(fileName));
1021
1021
  try {
1022
1022
  writeFileSync2(tempPath, buffer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio-server",
3
- "version": "0.9.26",
3
+ "version": "0.9.28-alpha.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/heygen-com/hyperframes",
@@ -88,8 +88,8 @@
88
88
  "linkedom": "^0.18.12",
89
89
  "postcss": "^8.5.8",
90
90
  "postcss-selector-parser": "^7.1.2",
91
- "@hyperframes/core": "0.9.26",
92
- "@hyperframes/parsers": "0.9.26"
91
+ "@hyperframes/core": "0.9.28-alpha.0",
92
+ "@hyperframes/parsers": "0.9.28-alpha.0"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@types/node": "^25.0.10",