@remotion/serverless-client 4.0.364 → 4.0.366
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/esm/index.mjs +1 -1
- package/package.json +5 -5
- package/.turbo/turbo-formatting.log +0 -4
- package/.turbo/turbo-lint.log +0 -15
- package/.turbo/turbo-make.log +0 -3
- package/bundle.ts +0 -15
- package/dist/test/best-frames.test.d.ts +0 -1
- package/dist/test/best-frames.test.js +0 -16
- package/dist/test/dont-contain-forbidden.test.d.ts +0 -1
- package/dist/test/dont-contain-forbidden.test.js +0 -18
- package/dist/test/expected-out-name.test.d.ts +0 -1
- package/dist/test/expected-out-name.test.js +0 -168
- package/dist/test/min-max.test.d.ts +0 -1
- package/dist/test/min-max.test.js +0 -24
- package/dist/test/most-expensive-chunks.test.d.ts +0 -1
- package/dist/test/most-expensive-chunks.test.js +0 -163
- package/eslint.config.mjs +0 -5
- package/src/await.ts +0 -1
- package/src/best-frames-per-function-param.ts +0 -18
- package/src/calculate-chunk-times.ts +0 -42
- package/src/compress-props.ts +0 -179
- package/src/constants.ts +0 -408
- package/src/docs-url.ts +0 -1
- package/src/error-category.ts +0 -14
- package/src/estimate-price-from-bucket.ts +0 -59
- package/src/expected-out-name.ts +0 -83
- package/src/format-costs-info.ts +0 -24
- package/src/get-custom-out-name.ts +0 -44
- package/src/get-files-in-folder.ts +0 -6
- package/src/get-or-create-bucket.ts +0 -85
- package/src/get-overall-progress-from-storage.ts +0 -47
- package/src/get-overall-progress.ts +0 -42
- package/src/index.ts +0 -125
- package/src/input-props-keys.ts +0 -7
- package/src/inspect-error.ts +0 -63
- package/src/make-bucket-name.ts +0 -9
- package/src/make-timeout-error.ts +0 -51
- package/src/make-timeout-message.ts +0 -118
- package/src/min-max.ts +0 -34
- package/src/most-expensive-chunks.ts +0 -46
- package/src/overall-render-progress.ts +0 -30
- package/src/progress.ts +0 -330
- package/src/provider-implementation.ts +0 -268
- package/src/render-has-audio-video.ts +0 -28
- package/src/render-metadata.ts +0 -61
- package/src/render-progress.ts +0 -58
- package/src/return-values.ts +0 -45
- package/src/serialize-artifact.ts +0 -66
- package/src/stream-to-string.ts +0 -14
- package/src/streaming/streaming.ts +0 -148
- package/src/test/best-frames.test.ts +0 -15
- package/src/test/dont-contain-forbidden.test.ts +0 -14
- package/src/test/expected-out-name.test.ts +0 -200
- package/src/test/min-max.test.ts +0 -25
- package/src/test/most-expensive-chunks.test.ts +0 -167
- package/src/truthy.ts +0 -5
- package/src/types.ts +0 -82
- package/src/validate-bucket-name.ts +0 -34
- package/src/validate-download-behavior.ts +0 -26
- package/src/validate-frames-per-function.ts +0 -125
- package/src/validate-outname.ts +0 -63
- package/src/validate-privacy.ts +0 -20
- package/src/validate-webhook.ts +0 -18
- package/src/webhook-types.ts +0 -36
- package/src/write-error-to-storage.ts +0 -23
- package/tsconfig.json +0 -18
- package/tsconfig.tsbuildinfo +0 -1
package/src/validate-outname.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type {AudioCodec, Codec} from '@remotion/renderer';
|
|
2
|
-
import {NoReactAPIs} from '@remotion/renderer/pure';
|
|
3
|
-
import type {OutNameInputWithoutCredentials} from './constants';
|
|
4
|
-
import {validateBucketName} from './validate-bucket-name';
|
|
5
|
-
|
|
6
|
-
const validateS3Key = (s3Key: string) => {
|
|
7
|
-
if (typeof s3Key !== 'string') {
|
|
8
|
-
throw new TypeError(
|
|
9
|
-
'The S3 key must be a string. Passed an object of type ' + typeof s3Key,
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
|
|
14
|
-
if (!s3Key.match(/^([0-9a-zA-Z-!_.*'()/:&$@=;+,?]+)/g)) {
|
|
15
|
-
throw new Error(
|
|
16
|
-
"The S3 Key must match the RegExp `/^([0-9a-zA-Z-!_.*'()/:&$@=;+,?]+)/g`. You passed: " +
|
|
17
|
-
s3Key +
|
|
18
|
-
'. Check for invalid characters.',
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const validateOutname = ({
|
|
24
|
-
outName,
|
|
25
|
-
codec,
|
|
26
|
-
audioCodecSetting,
|
|
27
|
-
separateAudioTo,
|
|
28
|
-
bucketNamePrefix,
|
|
29
|
-
}: {
|
|
30
|
-
outName: OutNameInputWithoutCredentials | undefined | null;
|
|
31
|
-
codec: Codec | null;
|
|
32
|
-
audioCodecSetting: AudioCodec | null;
|
|
33
|
-
separateAudioTo: string | null;
|
|
34
|
-
bucketNamePrefix: string;
|
|
35
|
-
}) => {
|
|
36
|
-
if (typeof outName === 'undefined' || outName === null) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (typeof outName !== 'string') {
|
|
41
|
-
validateS3Key(outName.key);
|
|
42
|
-
validateBucketName({
|
|
43
|
-
bucketName: outName.bucketName,
|
|
44
|
-
bucketNamePrefix,
|
|
45
|
-
options: {
|
|
46
|
-
mustStartWithRemotion: false,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (codec) {
|
|
53
|
-
NoReactAPIs.validateOutputFilename({
|
|
54
|
-
codec,
|
|
55
|
-
audioCodecSetting,
|
|
56
|
-
extension: NoReactAPIs.getExtensionOfFilename(outName) as string,
|
|
57
|
-
preferLossless: false,
|
|
58
|
-
separateAudioTo,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
validateS3Key(outName);
|
|
63
|
-
};
|
package/src/validate-privacy.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type {Privacy} from './constants';
|
|
2
|
-
|
|
3
|
-
export function validatePrivacy(
|
|
4
|
-
privacy: unknown,
|
|
5
|
-
allowPrivate: boolean,
|
|
6
|
-
): asserts privacy is Privacy {
|
|
7
|
-
if (typeof privacy !== 'string') {
|
|
8
|
-
throw new TypeError('Privacy must be a string');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if (!allowPrivate && privacy === 'private') {
|
|
12
|
-
throw new TypeError('Privacy must be either "public" or "no-acl"');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (privacy !== 'private' && privacy !== 'public' && privacy !== 'no-acl') {
|
|
16
|
-
throw new TypeError(
|
|
17
|
-
'Privacy must be either "private", "public" or "no-acl"',
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
}
|
package/src/validate-webhook.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type {WebhookOption} from './constants';
|
|
2
|
-
|
|
3
|
-
export const MAX_WEBHOOK_CUSTOM_DATA_SIZE = 1024;
|
|
4
|
-
|
|
5
|
-
export const validateWebhook = (webhook?: WebhookOption | null) => {
|
|
6
|
-
if (typeof webhook === 'undefined' || webhook === null) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
if (webhook.customData) {
|
|
11
|
-
const size = JSON.stringify(webhook.customData).length;
|
|
12
|
-
if (size > MAX_WEBHOOK_CUSTOM_DATA_SIZE) {
|
|
13
|
-
throw new Error(
|
|
14
|
-
`Webhook "customData" must be less than ${MAX_WEBHOOK_CUSTOM_DATA_SIZE} bytes. Current size: ${size} bytes.`,
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
};
|
package/src/webhook-types.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type {AfterRenderCost} from './constants';
|
|
2
|
-
import type {EnhancedErrorInfo} from './write-error-to-storage';
|
|
3
|
-
|
|
4
|
-
type StaticWebhookPayload = {
|
|
5
|
-
renderId: string;
|
|
6
|
-
expectedBucketOwner: string;
|
|
7
|
-
bucketName: string;
|
|
8
|
-
customData: Record<string, unknown> | null;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export type WebhookErrorPayload = StaticWebhookPayload & {
|
|
12
|
-
type: 'error';
|
|
13
|
-
errors: {
|
|
14
|
-
message: string;
|
|
15
|
-
name: string;
|
|
16
|
-
stack: string;
|
|
17
|
-
}[];
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export type WebhookSuccessPayload = StaticWebhookPayload & {
|
|
21
|
-
type: 'success';
|
|
22
|
-
lambdaErrors: EnhancedErrorInfo[];
|
|
23
|
-
outputUrl: string | undefined;
|
|
24
|
-
outputFile: string | undefined;
|
|
25
|
-
timeToFinish: number | undefined;
|
|
26
|
-
costs: AfterRenderCost;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export type WebhookTimeoutPayload = StaticWebhookPayload & {
|
|
30
|
-
type: 'timeout';
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export type WebhookPayload =
|
|
34
|
-
| WebhookErrorPayload
|
|
35
|
-
| WebhookSuccessPayload
|
|
36
|
-
| WebhookTimeoutPayload;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type {FileNameAndSize} from './get-files-in-folder';
|
|
2
|
-
|
|
3
|
-
export type FunctionErrorInfo = {
|
|
4
|
-
type: 'renderer' | 'browser' | 'stitcher' | 'webhook' | 'artifact';
|
|
5
|
-
message: string;
|
|
6
|
-
name: string;
|
|
7
|
-
stack: string;
|
|
8
|
-
frame: number | null;
|
|
9
|
-
chunk: number | null;
|
|
10
|
-
isFatal: boolean;
|
|
11
|
-
attempt: number;
|
|
12
|
-
willRetry: boolean;
|
|
13
|
-
totalAttempts: number;
|
|
14
|
-
tmpDir: {files: FileNameAndSize[]; total: number} | null;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export type EnhancedErrorInfo = FunctionErrorInfo & {
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Will always be an empty string.
|
|
20
|
-
*/
|
|
21
|
-
s3Location: string;
|
|
22
|
-
explanation: string | null;
|
|
23
|
-
};
|
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig.settings.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"composite": true,
|
|
5
|
-
"rootDir": "./src",
|
|
6
|
-
"outDir": "dist",
|
|
7
|
-
"skipLibCheck": true
|
|
8
|
-
},
|
|
9
|
-
"include": ["src"],
|
|
10
|
-
"references": [
|
|
11
|
-
{
|
|
12
|
-
"path": "../licensing"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"path": "../streaming"
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|