@editframe/vite-plugin 0.25.0-beta.0 → 0.25.1-beta.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.
@@ -0,0 +1,14 @@
1
+ import * as vite0 from "vite";
2
+
3
+ //#region src/index.d.ts
4
+ interface VitePluginEditframeOptions {
5
+ root: string;
6
+ cacheRoot: string;
7
+ }
8
+ declare const vitePluginEditframe: (options: VitePluginEditframeOptions) => {
9
+ name: string;
10
+ configureServer(this: vite0.MinimalPluginContextWithoutEnvironment, server: vite0.ViteDevServer): void;
11
+ };
12
+ //#endregion
13
+ export { vitePluginEditframe };
14
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,22 +1,27 @@
1
1
  {
2
2
  "name": "@editframe/vite-plugin",
3
- "version": "0.25.0-beta.0",
3
+ "version": "0.25.1-beta.0",
4
4
  "description": "Editframe vite plugin",
5
5
  "exports": {
6
- ".": "./dist/index.js",
6
+ ".": {
7
+ "import": {
8
+ "types": "./dist/index.d.ts",
9
+ "default": "./dist/index.js"
10
+ }
11
+ },
7
12
  "./package.json": "./package.json"
8
13
  },
9
14
  "scripts": {
10
15
  "typecheck": "tsc --noEmit --emitDeclarationOnly false",
11
- "build": "tsdown && tsc --emitDeclarationOnly --outDir dist",
16
+ "build": "tsdown",
12
17
  "build:watch": "tsdown --watch"
13
18
  },
14
19
  "type": "module",
15
20
  "author": "",
16
21
  "license": "UNLICENSED",
17
22
  "dependencies": {
18
- "@editframe/api": "0.25.0-beta.0",
19
- "@editframe/assets": "0.25.0-beta.0",
23
+ "@editframe/api": "0.25.1-beta.0",
24
+ "@editframe/assets": "0.25.1-beta.0",
20
25
  "connect": "^3.7.0",
21
26
  "debug": "^4.3.5",
22
27
  "mime": "^4.0.3",
@@ -29,5 +34,17 @@
29
34
  "typescript": "^5.5.4"
30
35
  },
31
36
  "main": "./dist/index.js",
32
- "module": "./dist/index.js"
37
+ "module": "./dist/index.js",
38
+ "types": "./dist/index.d.ts",
39
+ "publishConfig": {
40
+ "exports": {
41
+ ".": {
42
+ "import": {
43
+ "types": "./dist/index.d.ts",
44
+ "default": "./dist/index.js"
45
+ }
46
+ },
47
+ "./package.json": "./package.json"
48
+ }
49
+ }
33
50
  }
package/tsdown.config.ts CHANGED
@@ -5,6 +5,5 @@ import { createTsdownConfig } from "../tsdown.config.base.ts";
5
5
  export default defineConfig(
6
6
  createTsdownConfig({
7
7
  platform: "node",
8
- dts: false, // Using tsc instead due to vite type complexity
9
8
  }),
10
9
  );
@@ -1,73 +0,0 @@
1
- import { z } from "zod";
2
- import type { Client } from "../client.js";
3
- export declare const CreateCaptionFilePayload: z.ZodObject<{
4
- /**
5
- * The md5 hash of the caption file
6
- */
7
- md5: z.ZodString;
8
- /**
9
- * The filename of the caption file
10
- */
11
- filename: z.ZodString;
12
- /**
13
- * The size of the caption file in bytes
14
- */
15
- byte_size: z.ZodNumber;
16
- }, "strip", z.ZodTypeAny, {
17
- md5: string;
18
- filename: string;
19
- byte_size: number;
20
- }, {
21
- md5: string;
22
- filename: string;
23
- byte_size: number;
24
- }>;
25
- export type CreateCaptionFilePayload = z.infer<typeof CreateCaptionFilePayload>;
26
- export interface CreateCaptionFileResult {
27
- /**
28
- * Whether the caption file is complete
29
- */
30
- complete: boolean | null;
31
- /**
32
- * The id of the caption file
33
- */
34
- id: string;
35
- /**
36
- * The md5 hash of the caption file
37
- */
38
- md5: string;
39
- }
40
- export interface LookupCaptionFileByMd5Result {
41
- /**
42
- * Whether the caption file is complete
43
- */
44
- complete: boolean | null;
45
- /**
46
- * The id of the caption file
47
- */
48
- id: string;
49
- /**
50
- * The md5 hash of the caption file
51
- */
52
- md5: string;
53
- }
54
- /**
55
- * Create a caption file
56
- * @param client - The authenticated client to use for the request
57
- * @param payload - The payload to send to the server
58
- * @returns The result of the request
59
- * @example
60
- * ```ts
61
- * const result = await createCaptionFile(client, {
62
- * id: "123",
63
- * filename: "caption.srt",
64
- * });
65
- * console.log(result);
66
- * ```
67
- * @category CaptionFile
68
- * @resource
69
- * @beta
70
- */
71
- export declare const createCaptionFile: (client: Client, payload: CreateCaptionFilePayload) => Promise<CreateCaptionFileResult>;
72
- export declare const uploadCaptionFile: (client: Client, fileId: string, fileStream: ReadableStream, fileSize: number) => Promise<any>;
73
- export declare const lookupCaptionFileByMd5: (client: Client, md5: string) => Promise<LookupCaptionFileByMd5Result | null>;
@@ -1,111 +0,0 @@
1
- import { z } from "zod";
2
- import type { Client } from "../client.js";
3
- export declare const ImageFileMimeTypes: z.ZodEnum<["image/jpeg", "image/png", "image/jpg", "image/webp", "image/svg+xml"]>;
4
- export declare const CreateImageFilePayload: z.ZodEffects<z.ZodObject<{
5
- /**
6
- * The md5 hash of the image file.
7
- */
8
- md5: z.ZodOptional<z.ZodString>;
9
- /**
10
- * The height of the image file in pixels.
11
- */
12
- height: z.ZodOptional<z.ZodNumber>;
13
- /**
14
- * The width of the image file in pixels.
15
- */
16
- width: z.ZodOptional<z.ZodNumber>;
17
- /**
18
- * The mime type of the image file. Optional if the filename has a known file extension.
19
- */
20
- mime_type: z.ZodOptional<z.ZodEnum<["image/jpeg", "image/png", "image/jpg", "image/webp", "image/svg+xml"]>>;
21
- /**
22
- * The filename of the image file.
23
- */
24
- filename: z.ZodString;
25
- /**
26
- * The byte size of the image file.
27
- */
28
- byte_size: z.ZodNumber;
29
- }, "strip", z.ZodTypeAny, {
30
- filename: string;
31
- byte_size: number;
32
- md5?: string | undefined;
33
- height?: number | undefined;
34
- width?: number | undefined;
35
- mime_type?: "image/jpeg" | "image/png" | "image/jpg" | "image/webp" | "image/svg+xml" | undefined;
36
- }, {
37
- filename: string;
38
- byte_size: number;
39
- md5?: string | undefined;
40
- height?: number | undefined;
41
- width?: number | undefined;
42
- mime_type?: "image/jpeg" | "image/png" | "image/jpg" | "image/webp" | "image/svg+xml" | undefined;
43
- }>, {
44
- filename: string;
45
- byte_size: number;
46
- md5?: string | undefined;
47
- height?: number | undefined;
48
- width?: number | undefined;
49
- mime_type?: "image/jpeg" | "image/png" | "image/jpg" | "image/webp" | "image/svg+xml" | undefined;
50
- }, {
51
- filename: string;
52
- byte_size: number;
53
- md5?: string | undefined;
54
- height?: number | undefined;
55
- width?: number | undefined;
56
- mime_type?: "image/jpeg" | "image/png" | "image/jpg" | "image/webp" | "image/svg+xml" | undefined;
57
- }>;
58
- export type CreateImageFilePayload = z.infer<typeof CreateImageFilePayload>;
59
- export interface CreateImageFileResult {
60
- /**
61
- * Whether the image file has been fully uploaded.
62
- */
63
- complete: boolean | null;
64
- /**
65
- * The byte size of the image file.
66
- */
67
- byte_size: number;
68
- /**
69
- * The id of the image file.
70
- */
71
- id: string;
72
- /**
73
- * The md5 hash of the image file.
74
- */
75
- md5: string | null;
76
- }
77
- export interface LookupImageFileByMd5Result {
78
- /**
79
- * Whether the image file has been fully uploaded.
80
- */
81
- complete: boolean | null;
82
- /**
83
- * The byte size of the image file.
84
- */
85
- byte_size: number;
86
- /**
87
- * The id of the image file.
88
- */
89
- id: string;
90
- /**
91
- * md5 hash of the image file.
92
- */
93
- md5: string | null;
94
- /**
95
- * The height of the image file in pixels.
96
- */
97
- height: number | null;
98
- /**
99
- * The width of the image file in pixels.
100
- */
101
- width: number | null;
102
- }
103
- export interface GetImageFileMetadataResult extends LookupImageFileByMd5Result {
104
- }
105
- export declare const createImageFile: (client: Client, payload: CreateImageFilePayload) => Promise<CreateImageFileResult>;
106
- export declare const uploadImageFile: (client: Client, uploadDetails: {
107
- id: string;
108
- byte_size: number;
109
- }, fileStream: ReadableStream, chunkSizeBytes?: number) => import("../uploadChunks.js").IteratorWithPromise<import("../uploadChunks.js").UploadChunkEvent>;
110
- export declare const getImageFileMetadata: (client: Client, id: string) => Promise<GetImageFileMetadataResult | null>;
111
- export declare const lookupImageFileByMd5: (client: Client, md5: string) => Promise<LookupImageFileByMd5Result | null>;
@@ -1,68 +0,0 @@
1
- import { z } from "zod";
2
- import type { Client } from "../client.js";
3
- export declare const CreateISOBMFFFilePayload: z.ZodObject<{
4
- md5: z.ZodString;
5
- filename: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- md5: string;
8
- filename: string;
9
- }, {
10
- md5: string;
11
- filename: string;
12
- }>;
13
- export type CreateISOBMFFFilePayload = z.infer<typeof CreateISOBMFFFilePayload>;
14
- export interface CreateISOBMFFFileResult {
15
- /**
16
- * Whether the fragment index is complete. The fragment index is used internally by editframe to efficiently seek within files.
17
- */
18
- fragment_index_complete: boolean;
19
- /**
20
- * The filename of the isobmff file
21
- */
22
- filename: string;
23
- /**
24
- * The id of the isobmff file
25
- */
26
- id: string;
27
- /**
28
- * The md5 hash of the isobmff file
29
- */
30
- md5: string;
31
- }
32
- export interface LookupISOBMFFFileByMd5Result {
33
- /**
34
- * Whether the fragment index is complete
35
- */
36
- fragment_index_complete: boolean;
37
- /**
38
- * The filename of the isobmff file
39
- */
40
- filename: string;
41
- id: string;
42
- md5: string;
43
- }
44
- export interface GetISOBMFFFileTranscriptionResult {
45
- id: string;
46
- work_slice_ms: number;
47
- isobmff_track: {
48
- duration_ms: number;
49
- };
50
- }
51
- export declare const createISOBMFFFile: (client: Client, payload: CreateISOBMFFFilePayload) => Promise<CreateISOBMFFFileResult>;
52
- export declare const uploadFragmentIndex: (client: Client, fileId: string, fileStream: ReadableStream, fileSize: number) => Promise<any>;
53
- export declare const lookupISOBMFFFileByMd5: (client: Client, md5: string) => Promise<LookupISOBMFFFileByMd5Result | null>;
54
- export declare const getISOBMFFFileTranscription: (client: Client, id: string) => Promise<GetISOBMFFFileTranscriptionResult | null>;
55
- export declare const TranscribeISOBMFFFilePayload: z.ZodObject<{
56
- trackId: z.ZodOptional<z.ZodString>;
57
- }, "strip", z.ZodTypeAny, {
58
- trackId?: string | undefined;
59
- }, {
60
- trackId?: string | undefined;
61
- }>;
62
- export type TranscribeISOBMFFFilePayload = z.infer<typeof TranscribeISOBMFFFilePayload>;
63
- export interface TranscribeISOBMFFFileResult {
64
- id: string;
65
- file_id: string;
66
- track_id: number;
67
- }
68
- export declare const transcribeISOBMFFFile: (client: Client, id: string, payload?: TranscribeISOBMFFFilePayload) => Promise<TranscribeISOBMFFFileResult>;