transloadit 4.0.7 → 4.1.2
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/CHANGELOG.md +37 -0
- package/README.md +200 -21
- package/dist/ApiError.d.ts +1 -1
- package/dist/ApiError.d.ts.map +1 -1
- package/dist/ApiError.js.map +1 -1
- package/dist/Transloadit.d.ts +23 -4
- package/dist/Transloadit.d.ts.map +1 -1
- package/dist/Transloadit.js +62 -28
- package/dist/Transloadit.js.map +1 -1
- package/dist/apiTypes.d.ts +1 -1
- package/dist/apiTypes.d.ts.map +1 -1
- package/dist/cli/OutputCtl.d.ts +46 -0
- package/dist/cli/OutputCtl.d.ts.map +1 -0
- package/dist/cli/OutputCtl.js +85 -0
- package/dist/cli/OutputCtl.js.map +1 -0
- package/dist/cli/commands/BaseCommand.d.ts +23 -0
- package/dist/cli/commands/BaseCommand.d.ts.map +1 -0
- package/dist/cli/commands/BaseCommand.js +52 -0
- package/dist/cli/commands/BaseCommand.js.map +1 -0
- package/dist/cli/commands/assemblies.d.ts +93 -0
- package/dist/cli/commands/assemblies.d.ts.map +1 -0
- package/dist/cli/commands/assemblies.js +1021 -0
- package/dist/cli/commands/assemblies.js.map +1 -0
- package/dist/cli/commands/auth.d.ts +28 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +280 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/bills.d.ts +14 -0
- package/dist/cli/commands/bills.d.ts.map +1 -0
- package/dist/cli/commands/bills.js +69 -0
- package/dist/cli/commands/bills.js.map +1 -0
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +39 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/notifications.d.ts +16 -0
- package/dist/cli/commands/notifications.d.ts.map +1 -0
- package/dist/cli/commands/notifications.js +44 -0
- package/dist/cli/commands/notifications.js.map +1 -0
- package/dist/cli/commands/templates.d.ts +81 -0
- package/dist/cli/commands/templates.d.ts.map +1 -0
- package/dist/cli/commands/templates.js +428 -0
- package/dist/cli/commands/templates.js.map +1 -0
- package/dist/cli/helpers.d.ts +13 -0
- package/dist/cli/helpers.d.ts.map +1 -0
- package/dist/cli/helpers.js +39 -0
- package/dist/cli/helpers.js.map +1 -0
- package/dist/cli/template-last-modified.d.ts +10 -0
- package/dist/cli/template-last-modified.d.ts.map +1 -0
- package/dist/cli/template-last-modified.js +134 -0
- package/dist/cli/template-last-modified.js.map +1 -0
- package/dist/cli/types.d.ts +152 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +64 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli.d.ts +2 -12
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +11 -256
- package/dist/cli.js.map +1 -1
- package/dist/tus.d.ts +2 -1
- package/dist/tus.d.ts.map +1 -1
- package/dist/tus.js +33 -5
- package/dist/tus.js.map +1 -1
- package/package.json +12 -7
- package/src/ApiError.ts +2 -1
- package/src/Transloadit.ts +98 -39
- package/src/apiTypes.ts +1 -1
- package/src/cli/OutputCtl.ts +115 -0
- package/src/cli/commands/BaseCommand.ts +71 -0
- package/src/cli/commands/assemblies.ts +1373 -0
- package/src/cli/commands/auth.ts +354 -0
- package/src/cli/commands/bills.ts +91 -0
- package/src/cli/commands/index.ts +65 -0
- package/src/cli/commands/notifications.ts +63 -0
- package/src/cli/commands/templates.ts +556 -0
- package/src/cli/helpers.ts +50 -0
- package/src/cli/template-last-modified.ts +156 -0
- package/src/cli/types.ts +183 -0
- package/src/cli.ts +12 -305
- package/src/tus.ts +37 -5
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,IAAI,MAAM,W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E,CAAC;QACnB,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC7B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAE,OAAM;IAE1C,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1B,OAAO,CAAC,KAAK,CAAE,KAAe,CAAC,OAAO,CAAC,CAAA;QACvC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAA;IACtB,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,kBAAkB,EAAE,CAAA"}
|
package/dist/tus.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ interface SendTusRequestOptions {
|
|
|
11
11
|
requestedChunkSize: number;
|
|
12
12
|
uploadConcurrency: number;
|
|
13
13
|
onProgress: (options: UploadProgress) => void;
|
|
14
|
+
signal?: AbortSignal;
|
|
14
15
|
}
|
|
15
|
-
export declare function sendTusRequest({ streamsMap, assembly, requestedChunkSize, uploadConcurrency, onProgress, }: SendTusRequestOptions): Promise<void>;
|
|
16
|
+
export declare function sendTusRequest({ streamsMap, assembly, requestedChunkSize, uploadConcurrency, onProgress, signal, }: SendTusRequestOptions): Promise<void>;
|
|
16
17
|
export {};
|
|
17
18
|
//# sourceMappingURL=tus.d.ts.map
|
package/dist/tus.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tus.d.ts","sourceRoot":"","sources":["../src/tus.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"tus.d.ts","sourceRoot":"","sources":["../src/tus.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAK3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAItD,MAAM,WAAW,MAAM;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,QAAQ,CAAA;CACjB;AAED,UAAU,qBAAqB;IAC7B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,QAAQ,EAAE,cAAc,CAAA;IACxB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;IAC7C,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED,wBAAsB,cAAc,CAAC,EACnC,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,MAAM,GACP,EAAE,qBAAqB,iBAsIvB"}
|
package/dist/tus.js
CHANGED
|
@@ -4,7 +4,7 @@ import debug from 'debug';
|
|
|
4
4
|
import pMap from 'p-map';
|
|
5
5
|
import { Upload } from 'tus-js-client';
|
|
6
6
|
const log = debug('transloadit');
|
|
7
|
-
export async function sendTusRequest({ streamsMap, assembly, requestedChunkSize, uploadConcurrency, onProgress, }) {
|
|
7
|
+
export async function sendTusRequest({ streamsMap, assembly, requestedChunkSize, uploadConcurrency, onProgress, signal, }) {
|
|
8
8
|
const streamLabels = Object.keys(streamsMap);
|
|
9
9
|
let totalBytes = 0;
|
|
10
10
|
let lastEmittedProgress = 0;
|
|
@@ -12,6 +12,9 @@ export async function sendTusRequest({ streamsMap, assembly, requestedChunkSize,
|
|
|
12
12
|
const haveUnknownLengthStreams = streamLabels.some((label) => !streamsMap[label]?.path);
|
|
13
13
|
// Initialize size data
|
|
14
14
|
await pMap(streamLabels, async (label) => {
|
|
15
|
+
// Check if aborted before each operation
|
|
16
|
+
if (signal?.aborted)
|
|
17
|
+
throw new Error('Upload aborted');
|
|
15
18
|
const streamInfo = streamsMap[label];
|
|
16
19
|
if (!streamInfo) {
|
|
17
20
|
throw new Error(`Stream info not found for label: ${label}`);
|
|
@@ -22,7 +25,7 @@ export async function sendTusRequest({ streamsMap, assembly, requestedChunkSize,
|
|
|
22
25
|
sizes[label] = size;
|
|
23
26
|
totalBytes += size;
|
|
24
27
|
}
|
|
25
|
-
}, { concurrency: 5 });
|
|
28
|
+
}, { concurrency: 5, signal });
|
|
26
29
|
const uploadProgresses = {};
|
|
27
30
|
async function uploadSingleStream(label) {
|
|
28
31
|
uploadProgresses[label] = 0;
|
|
@@ -61,11 +64,28 @@ export async function sendTusRequest({ streamsMap, assembly, requestedChunkSize,
|
|
|
61
64
|
}
|
|
62
65
|
};
|
|
63
66
|
const filename = path ? basename(path) : label;
|
|
64
|
-
await new Promise((
|
|
67
|
+
await new Promise((resolvePromise, rejectPromise) => {
|
|
65
68
|
if (!assembly.assembly_ssl_url) {
|
|
66
|
-
|
|
69
|
+
rejectPromise(new Error('assembly_ssl_url is not present in the assembly status'));
|
|
67
70
|
return;
|
|
68
71
|
}
|
|
72
|
+
// Check if already aborted before starting
|
|
73
|
+
if (signal?.aborted) {
|
|
74
|
+
rejectPromise(new Error('Upload aborted'));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
// Wrap resolve/reject to clean up abort listener
|
|
78
|
+
let abortHandler;
|
|
79
|
+
const resolve = (payload) => {
|
|
80
|
+
if (abortHandler)
|
|
81
|
+
signal?.removeEventListener('abort', abortHandler);
|
|
82
|
+
resolvePromise(payload);
|
|
83
|
+
};
|
|
84
|
+
const reject = (err) => {
|
|
85
|
+
if (abortHandler)
|
|
86
|
+
signal?.removeEventListener('abort', abortHandler);
|
|
87
|
+
rejectPromise(err);
|
|
88
|
+
};
|
|
69
89
|
const tusOptions = {
|
|
70
90
|
endpoint: assembly.tus_url,
|
|
71
91
|
metadata: {
|
|
@@ -85,10 +105,18 @@ export async function sendTusRequest({ streamsMap, assembly, requestedChunkSize,
|
|
|
85
105
|
if (uploadLengthDeferred)
|
|
86
106
|
tusOptions.uploadLengthDeferred = uploadLengthDeferred;
|
|
87
107
|
const tusUpload = new Upload(stream, tusOptions);
|
|
108
|
+
// Handle abort signal
|
|
109
|
+
if (signal) {
|
|
110
|
+
abortHandler = () => {
|
|
111
|
+
tusUpload.abort();
|
|
112
|
+
reject(new Error('Upload aborted'));
|
|
113
|
+
};
|
|
114
|
+
signal.addEventListener('abort', abortHandler, { once: true });
|
|
115
|
+
}
|
|
88
116
|
tusUpload.start();
|
|
89
117
|
});
|
|
90
118
|
log(label, 'upload done');
|
|
91
119
|
}
|
|
92
|
-
await pMap(streamLabels, uploadSingleStream, { concurrency: uploadConcurrency });
|
|
120
|
+
await pMap(streamLabels, uploadSingleStream, { concurrency: uploadConcurrency, signal });
|
|
93
121
|
}
|
|
94
122
|
//# sourceMappingURL=tus.js.map
|
package/dist/tus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tus.js","sourceRoot":"","sources":["../src/tus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,IAAI,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"tus.js","sourceRoot":"","sources":["../src/tus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,IAAI,MAAM,OAAO,CAAA;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAItC,MAAM,GAAG,GAAG,KAAK,CAAC,aAAa,CAAC,CAAA;AAgBhC,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EACnC,UAAU,EACV,QAAQ,EACR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AE,UAAU,CAAC,CAAA;YAEhD,sBAAsB;YACtB,IAAI,MAAM,EAAE,CAAC;gBACX,YAAY,GAAG,GAAG,EAAE;oBAClB,SAAS,CAAC,KAAK,EAAE,CAAA;oBACjB,MAAM,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAA;gBACrC,CAAC,CAAA;gBACD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;YAChE,CAAC;YAED,SAAS,CAAC,KAAK,EAAE,CAAA;QACnB,CAAC,CAAC,CAAA;QAEF,GAAG,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;IAC3B,CAAC;IAED,MAAM,IAAI,CAAC,YAAY,EAAE,kBAAkB,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,CAAA;AAC1F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "transloadit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Node.js SDK for Transloadit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"mp3"
|
|
13
13
|
],
|
|
14
14
|
"author": "Tim Koschuetzki <tim@transloadit.com>",
|
|
15
|
-
"packageManager": "yarn@4.
|
|
15
|
+
"packageManager": "yarn@4.12.0",
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">= 20"
|
|
18
18
|
},
|
|
@@ -20,12 +20,17 @@
|
|
|
20
20
|
"@aws-sdk/client-s3": "^3.891.0",
|
|
21
21
|
"@aws-sdk/s3-request-presigner": "^3.891.0",
|
|
22
22
|
"@transloadit/sev-logger": "^0.0.15",
|
|
23
|
+
"clipanion": "^4.0.0-rc.4",
|
|
23
24
|
"debug": "^4.4.3",
|
|
25
|
+
"dotenv": "^17.2.3",
|
|
24
26
|
"form-data": "^4.0.4",
|
|
25
27
|
"got": "14.4.9",
|
|
26
28
|
"into-stream": "^9.0.0",
|
|
27
29
|
"is-stream": "^4.0.1",
|
|
30
|
+
"node-watch": "^0.7.4",
|
|
28
31
|
"p-map": "^7.0.3",
|
|
32
|
+
"p-queue": "^9.0.1",
|
|
33
|
+
"recursive-readdir": "^2.2.3",
|
|
29
34
|
"tus-js-client": "^4.3.1",
|
|
30
35
|
"type-fest": "^4.41.0",
|
|
31
36
|
"zod": "3.25.76"
|
|
@@ -33,14 +38,16 @@
|
|
|
33
38
|
"devDependencies": {
|
|
34
39
|
"@biomejs/biome": "^2.2.4",
|
|
35
40
|
"@types/debug": "^4.1.12",
|
|
41
|
+
"@types/recursive-readdir": "^2.2.4",
|
|
36
42
|
"@types/temp": "^0.9.4",
|
|
37
43
|
"@vitest/coverage-v8": "^3.2.4",
|
|
38
44
|
"badge-maker": "^5.0.2",
|
|
39
|
-
"dotenv": "^17.2.2",
|
|
40
45
|
"execa": "9.6.0",
|
|
46
|
+
"image-size": "^2.0.2",
|
|
41
47
|
"nock": "^14.0.10",
|
|
42
48
|
"npm-run-all": "^4.1.5",
|
|
43
49
|
"p-retry": "^7.0.0",
|
|
50
|
+
"rimraf": "^6.1.2",
|
|
44
51
|
"temp": "^0.9.4",
|
|
45
52
|
"tsx": "4.20.5",
|
|
46
53
|
"typescript": "5.9.2",
|
|
@@ -61,12 +68,10 @@
|
|
|
61
68
|
"lint:js": "biome check .",
|
|
62
69
|
"lint": "npm-run-all --parallel 'lint:js'",
|
|
63
70
|
"fix": "npm-run-all --serial 'fix:js'",
|
|
64
|
-
"next:update": "next-update --keep true --tldr",
|
|
65
71
|
"prepack": "rm -f tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo && tsc --build tsconfig.build.json",
|
|
66
72
|
"test:unit": "vitest run --coverage ./test/unit",
|
|
67
|
-
"test:
|
|
68
|
-
"test
|
|
69
|
-
"test": "yarn test:unit"
|
|
73
|
+
"test:e2e": "vitest run ./test/e2e",
|
|
74
|
+
"test": "vitest run --coverage"
|
|
70
75
|
},
|
|
71
76
|
"license": "MIT",
|
|
72
77
|
"main": "./dist/Transloadit.js",
|
package/src/ApiError.ts
CHANGED
package/src/Transloadit.ts
CHANGED
|
@@ -3,28 +3,23 @@ import { createHmac, randomUUID } from 'node:crypto'
|
|
|
3
3
|
import { constants, createReadStream } from 'node:fs'
|
|
4
4
|
import { access } from 'node:fs/promises'
|
|
5
5
|
import type { Readable } from 'node:stream'
|
|
6
|
+
import { setTimeout as delay } from 'node:timers/promises'
|
|
6
7
|
import debug from 'debug'
|
|
7
8
|
import FormData from 'form-data'
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
type Headers,
|
|
11
|
-
HTTPError,
|
|
12
|
-
type OptionsOfJSONResponseBody,
|
|
13
|
-
RequestError,
|
|
14
|
-
type RetryOptions,
|
|
15
|
-
} from 'got'
|
|
9
|
+
import type { Delays, Headers, OptionsOfJSONResponseBody, RetryOptions } from 'got'
|
|
10
|
+
import got, { HTTPError, RequestError } from 'got'
|
|
16
11
|
import intoStream, { type Input as IntoStreamInput } from 'into-stream'
|
|
17
12
|
import { isReadableStream, isStream } from 'is-stream'
|
|
18
13
|
import pMap from 'p-map'
|
|
19
14
|
import packageJson from '../package.json' with { type: 'json' }
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
assemblyStatusSchema,
|
|
15
|
+
import type { TransloaditErrorResponseBody } from './ApiError.ts'
|
|
16
|
+
import { ApiError } from './ApiError.ts'
|
|
17
|
+
import type {
|
|
18
|
+
AssemblyIndex,
|
|
19
|
+
AssemblyIndexItem,
|
|
20
|
+
AssemblyStatus,
|
|
27
21
|
} from './alphalib/types/assemblyStatus.ts'
|
|
22
|
+
import { assemblyIndexSchema, assemblyStatusSchema } from './alphalib/types/assemblyStatus.ts'
|
|
28
23
|
import { zodParseWithContext } from './alphalib/zodParseWithContext.ts'
|
|
29
24
|
import type {
|
|
30
25
|
BaseResponse,
|
|
@@ -50,7 +45,8 @@ import type {
|
|
|
50
45
|
import InconsistentResponseError from './InconsistentResponseError.ts'
|
|
51
46
|
import PaginationStream from './PaginationStream.ts'
|
|
52
47
|
import PollingTimeoutError from './PollingTimeoutError.ts'
|
|
53
|
-
import {
|
|
48
|
+
import type { Stream } from './tus.ts'
|
|
49
|
+
import { sendTusRequest } from './tus.ts'
|
|
54
50
|
|
|
55
51
|
// See https://github.com/sindresorhus/got/tree/v11.8.6?tab=readme-ov-file#errors
|
|
56
52
|
// Expose relevant errors
|
|
@@ -95,6 +91,11 @@ export interface CreateAssemblyOptions {
|
|
|
95
91
|
onUploadProgress?: (uploadProgress: UploadProgress) => void
|
|
96
92
|
onAssemblyProgress?: AssemblyProgress
|
|
97
93
|
assemblyId?: string
|
|
94
|
+
/**
|
|
95
|
+
* Optional AbortSignal to cancel the assembly creation and upload.
|
|
96
|
+
* When aborted, any in-flight HTTP requests and TUS uploads will be cancelled.
|
|
97
|
+
*/
|
|
98
|
+
signal?: AbortSignal
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
export interface AwaitAssemblyCompletionOptions {
|
|
@@ -102,6 +103,17 @@ export interface AwaitAssemblyCompletionOptions {
|
|
|
102
103
|
timeout?: number
|
|
103
104
|
interval?: number
|
|
104
105
|
startTimeMs?: number
|
|
106
|
+
/**
|
|
107
|
+
* Optional AbortSignal to cancel polling.
|
|
108
|
+
* When aborted, the polling loop will stop and throw an AbortError.
|
|
109
|
+
*/
|
|
110
|
+
signal?: AbortSignal
|
|
111
|
+
/**
|
|
112
|
+
* Optional callback invoked before each poll iteration.
|
|
113
|
+
* Return `false` to stop polling early and return the current assembly status.
|
|
114
|
+
* Useful for watch mode where a newer job may supersede the current one.
|
|
115
|
+
*/
|
|
116
|
+
onPoll?: () => boolean | undefined
|
|
105
117
|
}
|
|
106
118
|
|
|
107
119
|
export interface SmartCDNUrlOptions {
|
|
@@ -236,6 +248,7 @@ export class Transloadit {
|
|
|
236
248
|
files = {},
|
|
237
249
|
uploads = {},
|
|
238
250
|
assemblyId,
|
|
251
|
+
signal,
|
|
239
252
|
} = opts
|
|
240
253
|
|
|
241
254
|
// Keep track of how long the request took
|
|
@@ -293,12 +306,18 @@ export class Transloadit {
|
|
|
293
306
|
stream.pause()
|
|
294
307
|
}
|
|
295
308
|
|
|
296
|
-
// If any stream emits error, we want to handle this and exit with error
|
|
309
|
+
// If any stream emits error, we want to handle this and exit with error.
|
|
310
|
+
// This promise races against createAssemblyAndUpload() below via Promise.race().
|
|
311
|
+
// When createAssemblyAndUpload wins the race, this promise becomes "orphaned" -
|
|
312
|
+
// it's no longer awaited, but stream error handlers remain attached.
|
|
313
|
+
// The no-op catch prevents Node's unhandled rejection warning if a stream
|
|
314
|
+
// errors after the race is already won.
|
|
297
315
|
const streamErrorPromise = new Promise<AssemblyStatus>((_resolve, reject) => {
|
|
298
316
|
for (const { stream } of allStreams) {
|
|
299
317
|
stream.on('error', reject)
|
|
300
318
|
}
|
|
301
319
|
})
|
|
320
|
+
streamErrorPromise.catch(() => {})
|
|
302
321
|
|
|
303
322
|
const createAssemblyAndUpload = async () => {
|
|
304
323
|
const result: AssemblyStatus = await this._remoteJson({
|
|
@@ -309,6 +328,7 @@ export class Transloadit {
|
|
|
309
328
|
fields: {
|
|
310
329
|
tus_num_expected_upload_files: allStreams.length,
|
|
311
330
|
},
|
|
331
|
+
signal,
|
|
312
332
|
})
|
|
313
333
|
checkResult(result)
|
|
314
334
|
|
|
@@ -319,6 +339,7 @@ export class Transloadit {
|
|
|
319
339
|
onProgress: onUploadProgress,
|
|
320
340
|
requestedChunkSize,
|
|
321
341
|
uploadConcurrency,
|
|
342
|
+
signal,
|
|
322
343
|
})
|
|
323
344
|
}
|
|
324
345
|
|
|
@@ -333,6 +354,7 @@ export class Transloadit {
|
|
|
333
354
|
timeout,
|
|
334
355
|
onAssemblyProgress,
|
|
335
356
|
startTimeMs,
|
|
357
|
+
signal,
|
|
336
358
|
})
|
|
337
359
|
checkResult(awaitResult)
|
|
338
360
|
return awaitResult
|
|
@@ -352,12 +374,27 @@ export class Transloadit {
|
|
|
352
374
|
timeout,
|
|
353
375
|
startTimeMs = getHrTimeMs(),
|
|
354
376
|
interval = 1000,
|
|
377
|
+
signal,
|
|
378
|
+
onPoll,
|
|
355
379
|
}: AwaitAssemblyCompletionOptions = {},
|
|
356
380
|
): Promise<AssemblyStatus> {
|
|
357
381
|
assert.ok(assemblyId)
|
|
358
382
|
|
|
383
|
+
let lastResult: AssemblyStatus | undefined
|
|
384
|
+
|
|
359
385
|
while (true) {
|
|
360
|
-
|
|
386
|
+
// Check if caller wants to stop polling early
|
|
387
|
+
if (onPoll?.() === false && lastResult) {
|
|
388
|
+
return lastResult
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// Check if aborted before making the request
|
|
392
|
+
if (signal?.aborted) {
|
|
393
|
+
throw signal.reason ?? new DOMException('Aborted', 'AbortError')
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const result = await this.getAssembly(assemblyId, { signal })
|
|
397
|
+
lastResult = result
|
|
361
398
|
|
|
362
399
|
// If 'ok' is not in result, it implies a terminal state (e.g., error, completed, canceled).
|
|
363
400
|
// If 'ok' is present, then we check if it's one of the non-terminal polling states.
|
|
@@ -385,7 +422,21 @@ export class Transloadit {
|
|
|
385
422
|
if (timeout != null && nowMs - startTimeMs >= timeout) {
|
|
386
423
|
throw new PollingTimeoutError('Polling timed out')
|
|
387
424
|
}
|
|
388
|
-
|
|
425
|
+
|
|
426
|
+
// Make the sleep abortable, ensuring listener cleanup to prevent memory leaks
|
|
427
|
+
await new Promise<void>((resolve, reject) => {
|
|
428
|
+
const timeoutId = setTimeout(() => {
|
|
429
|
+
signal?.removeEventListener('abort', onAbort)
|
|
430
|
+
resolve()
|
|
431
|
+
}, interval)
|
|
432
|
+
|
|
433
|
+
function onAbort() {
|
|
434
|
+
clearTimeout(timeoutId)
|
|
435
|
+
reject(signal?.reason ?? new DOMException('Aborted', 'AbortError'))
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
signal?.addEventListener('abort', onAbort, { once: true })
|
|
439
|
+
})
|
|
389
440
|
}
|
|
390
441
|
}
|
|
391
442
|
|
|
@@ -460,7 +511,7 @@ export class Transloadit {
|
|
|
460
511
|
assemblyId: string,
|
|
461
512
|
params: ReplayAssemblyNotificationParams = {},
|
|
462
513
|
): Promise<ReplayAssemblyNotificationResponse> {
|
|
463
|
-
return this._remoteJson({
|
|
514
|
+
return await this._remoteJson({
|
|
464
515
|
urlSuffix: `/assembly_notifications/${assemblyId}/replay`,
|
|
465
516
|
method: 'post',
|
|
466
517
|
...(Object.keys(params).length > 0 && { params }),
|
|
@@ -517,11 +568,16 @@ export class Transloadit {
|
|
|
517
568
|
* Get an Assembly
|
|
518
569
|
*
|
|
519
570
|
* @param assemblyId the Assembly Id
|
|
571
|
+
* @param options optional request options
|
|
520
572
|
* @returns the retrieved Assembly
|
|
521
573
|
*/
|
|
522
|
-
async getAssembly(
|
|
574
|
+
async getAssembly(
|
|
575
|
+
assemblyId: string,
|
|
576
|
+
options?: { signal?: AbortSignal },
|
|
577
|
+
): Promise<AssemblyStatus> {
|
|
523
578
|
const rawResult = await this._remoteJson<Record<string, unknown>, OptionalAuthParams>({
|
|
524
579
|
urlSuffix: `/assemblies/${assemblyId}`,
|
|
580
|
+
signal: options?.signal,
|
|
525
581
|
})
|
|
526
582
|
|
|
527
583
|
const parsedResult = zodParseWithContext(assemblyStatusSchema, rawResult)
|
|
@@ -545,7 +601,7 @@ export class Transloadit {
|
|
|
545
601
|
async createTemplateCredential(
|
|
546
602
|
params: CreateTemplateCredentialParams,
|
|
547
603
|
): Promise<TemplateCredentialResponse> {
|
|
548
|
-
return this._remoteJson({
|
|
604
|
+
return await this._remoteJson({
|
|
549
605
|
urlSuffix: '/template_credentials',
|
|
550
606
|
method: 'post',
|
|
551
607
|
params: params || {},
|
|
@@ -563,7 +619,7 @@ export class Transloadit {
|
|
|
563
619
|
credentialId: string,
|
|
564
620
|
params: CreateTemplateCredentialParams,
|
|
565
621
|
): Promise<TemplateCredentialResponse> {
|
|
566
|
-
return this._remoteJson({
|
|
622
|
+
return await this._remoteJson({
|
|
567
623
|
urlSuffix: `/template_credentials/${credentialId}`,
|
|
568
624
|
method: 'put',
|
|
569
625
|
params: params || {},
|
|
@@ -577,7 +633,7 @@ export class Transloadit {
|
|
|
577
633
|
* @returns when the Credential is deleted
|
|
578
634
|
*/
|
|
579
635
|
async deleteTemplateCredential(credentialId: string): Promise<BaseResponse> {
|
|
580
|
-
return this._remoteJson({
|
|
636
|
+
return await this._remoteJson({
|
|
581
637
|
urlSuffix: `/template_credentials/${credentialId}`,
|
|
582
638
|
method: 'delete',
|
|
583
639
|
})
|
|
@@ -590,7 +646,7 @@ export class Transloadit {
|
|
|
590
646
|
* @returns when the Credential is retrieved
|
|
591
647
|
*/
|
|
592
648
|
async getTemplateCredential(credentialId: string): Promise<TemplateCredentialResponse> {
|
|
593
|
-
return this._remoteJson({
|
|
649
|
+
return await this._remoteJson({
|
|
594
650
|
urlSuffix: `/template_credentials/${credentialId}`,
|
|
595
651
|
method: 'get',
|
|
596
652
|
})
|
|
@@ -605,7 +661,7 @@ export class Transloadit {
|
|
|
605
661
|
async listTemplateCredentials(
|
|
606
662
|
params?: ListTemplateCredentialsParams,
|
|
607
663
|
): Promise<TemplateCredentialsResponse> {
|
|
608
|
-
return this._remoteJson({
|
|
664
|
+
return await this._remoteJson({
|
|
609
665
|
urlSuffix: '/template_credentials',
|
|
610
666
|
method: 'get',
|
|
611
667
|
params: params || {},
|
|
@@ -625,7 +681,7 @@ export class Transloadit {
|
|
|
625
681
|
* @returns when the template is created
|
|
626
682
|
*/
|
|
627
683
|
async createTemplate(params: CreateTemplateParams): Promise<TemplateResponse> {
|
|
628
|
-
return this._remoteJson({
|
|
684
|
+
return await this._remoteJson({
|
|
629
685
|
urlSuffix: '/templates',
|
|
630
686
|
method: 'post',
|
|
631
687
|
params: params || {},
|
|
@@ -640,7 +696,7 @@ export class Transloadit {
|
|
|
640
696
|
* @returns when the template is edited
|
|
641
697
|
*/
|
|
642
698
|
async editTemplate(templateId: string, params: EditTemplateParams): Promise<TemplateResponse> {
|
|
643
|
-
return this._remoteJson({
|
|
699
|
+
return await this._remoteJson({
|
|
644
700
|
urlSuffix: `/templates/${templateId}`,
|
|
645
701
|
method: 'put',
|
|
646
702
|
params: params || {},
|
|
@@ -654,7 +710,7 @@ export class Transloadit {
|
|
|
654
710
|
* @returns when the template is deleted
|
|
655
711
|
*/
|
|
656
712
|
async deleteTemplate(templateId: string): Promise<BaseResponse> {
|
|
657
|
-
return this._remoteJson({
|
|
713
|
+
return await this._remoteJson({
|
|
658
714
|
urlSuffix: `/templates/${templateId}`,
|
|
659
715
|
method: 'delete',
|
|
660
716
|
})
|
|
@@ -667,7 +723,7 @@ export class Transloadit {
|
|
|
667
723
|
* @returns when the template is retrieved
|
|
668
724
|
*/
|
|
669
725
|
async getTemplate(templateId: string): Promise<TemplateResponse> {
|
|
670
|
-
return this._remoteJson({
|
|
726
|
+
return await this._remoteJson({
|
|
671
727
|
urlSuffix: `/templates/${templateId}`,
|
|
672
728
|
method: 'get',
|
|
673
729
|
})
|
|
@@ -682,7 +738,7 @@ export class Transloadit {
|
|
|
682
738
|
async listTemplates(
|
|
683
739
|
params?: ListTemplatesParams,
|
|
684
740
|
): Promise<PaginationListWithCount<ListedTemplate>> {
|
|
685
|
-
return this._remoteJson({
|
|
741
|
+
return await this._remoteJson({
|
|
686
742
|
urlSuffix: '/templates',
|
|
687
743
|
method: 'get',
|
|
688
744
|
params: params || {},
|
|
@@ -702,7 +758,7 @@ export class Transloadit {
|
|
|
702
758
|
*/
|
|
703
759
|
async getBill(month: string): Promise<BillResponse> {
|
|
704
760
|
assert.ok(month, 'month is required')
|
|
705
|
-
return this._remoteJson({
|
|
761
|
+
return await this._remoteJson({
|
|
706
762
|
urlSuffix: `/bill/${month}`,
|
|
707
763
|
method: 'get',
|
|
708
764
|
})
|
|
@@ -799,14 +855,14 @@ export class Transloadit {
|
|
|
799
855
|
if (params == null) {
|
|
800
856
|
params = {}
|
|
801
857
|
}
|
|
802
|
-
if (params
|
|
803
|
-
params
|
|
858
|
+
if (params.auth == null) {
|
|
859
|
+
params.auth = {}
|
|
804
860
|
}
|
|
805
|
-
if (params
|
|
806
|
-
params
|
|
861
|
+
if (params.auth.key == null) {
|
|
862
|
+
params.auth.key = this._authKey
|
|
807
863
|
}
|
|
808
|
-
if (params
|
|
809
|
-
params
|
|
864
|
+
if (params.auth.expires == null) {
|
|
865
|
+
params.auth.expires = this._getExpiresDate()
|
|
810
866
|
}
|
|
811
867
|
|
|
812
868
|
return JSON.stringify(params)
|
|
@@ -830,6 +886,7 @@ export class Transloadit {
|
|
|
830
886
|
params?: TParams
|
|
831
887
|
fields?: Fields
|
|
832
888
|
headers?: Headers
|
|
889
|
+
signal?: AbortSignal
|
|
833
890
|
}): Promise<TRet> {
|
|
834
891
|
const {
|
|
835
892
|
urlSuffix,
|
|
@@ -839,6 +896,7 @@ export class Transloadit {
|
|
|
839
896
|
params = {},
|
|
840
897
|
fields,
|
|
841
898
|
headers,
|
|
899
|
+
signal,
|
|
842
900
|
} = opts
|
|
843
901
|
|
|
844
902
|
// Allow providing either a `urlSuffix` or a full `url`
|
|
@@ -871,6 +929,7 @@ export class Transloadit {
|
|
|
871
929
|
...headers,
|
|
872
930
|
},
|
|
873
931
|
responseType: 'json',
|
|
932
|
+
signal,
|
|
874
933
|
}
|
|
875
934
|
|
|
876
935
|
try {
|
|
@@ -904,7 +963,7 @@ export class Transloadit {
|
|
|
904
963
|
const { retryIn: retryInSec } = body.info
|
|
905
964
|
logWarn(`Rate limit reached, retrying request in approximately ${retryInSec} seconds.`)
|
|
906
965
|
const retryInMs = 1000 * (retryInSec * (1 + 0.1 * Math.random()))
|
|
907
|
-
await
|
|
966
|
+
await delay(retryInMs)
|
|
908
967
|
// Retry
|
|
909
968
|
} else {
|
|
910
969
|
throw new ApiError({
|
package/src/apiTypes.ts
CHANGED
|
@@ -44,7 +44,7 @@ export type ListAssembliesParams = OptionalAuthParams & {
|
|
|
44
44
|
|
|
45
45
|
export type ReplayAssemblyParams = Pick<
|
|
46
46
|
CreateAssemblyParams,
|
|
47
|
-
'auth' | 'template_id' | 'notify_url' | 'fields'
|
|
47
|
+
'auth' | 'template_id' | 'notify_url' | 'fields' | 'steps'
|
|
48
48
|
> & {
|
|
49
49
|
reparse_template?: number
|
|
50
50
|
}
|