@remotion/lambda 4.0.187 → 4.0.188
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/api/__mocks__/clean-items.d.ts +2 -0
- package/dist/api/__mocks__/clean-items.js +24 -0
- package/dist/api/__mocks__/create-function.d.ts +2 -0
- package/dist/api/__mocks__/create-function.js +21 -0
- package/dist/api/__mocks__/delete-function.d.ts +2 -0
- package/dist/api/__mocks__/delete-function.js +9 -0
- package/dist/api/__mocks__/get-functions.d.ts +2 -0
- package/dist/api/__mocks__/get-functions.js +9 -0
- package/dist/api/__mocks__/upload-dir.d.ts +3 -0
- package/dist/api/__mocks__/upload-dir.js +47 -0
- package/dist/api/bucket-exists.d.ts +3 -6
- package/dist/api/bucket-exists.js +5 -5
- package/dist/api/clean-items.d.ts +4 -3
- package/dist/api/clean-items.js +7 -7
- package/dist/api/create-bucket.d.ts +3 -5
- package/dist/api/create-bucket.js +6 -6
- package/dist/api/create-function.d.ts +1 -1
- package/dist/api/delete-function.d.ts +1 -1
- package/dist/api/delete-render.d.ts +10 -3
- package/dist/api/delete-render.js +27 -19
- package/dist/api/delete-site.d.ts +7 -2
- package/dist/api/delete-site.js +23 -15
- package/dist/api/deploy-function.d.ts +1 -1
- package/dist/api/deploy-function.js +2 -2
- package/dist/api/deploy-site.d.ts +9 -5
- package/dist/api/deploy-site.js +11 -12
- package/dist/api/download-media.d.ts +8 -3
- package/dist/api/download-media.js +24 -15
- package/dist/api/estimate-price.d.ts +1 -1
- package/dist/api/get-aws-client.d.ts +4 -2
- package/dist/api/get-aws-client.js +2 -2
- package/dist/api/get-buckets.d.ts +4 -4
- package/dist/api/get-buckets.js +12 -14
- package/dist/api/get-compositions-on-lambda.js +7 -6
- package/dist/api/get-function-info.d.ts +1 -1
- package/dist/api/get-functions.d.ts +1 -1
- package/dist/api/get-or-create-bucket.d.ts +3 -19
- package/dist/api/get-or-create-bucket.js +5 -39
- package/dist/api/get-regions.d.ts +1 -1
- package/dist/api/get-regions.js +1 -2
- package/dist/api/get-render-progress.d.ts +4 -3
- package/dist/api/get-render-progress.js +2 -2
- package/dist/api/get-sites.d.ts +6 -1
- package/dist/api/get-sites.js +21 -14
- package/dist/api/iam-validation/role-permissions.js +2 -1
- package/dist/api/iam-validation/simulate-rule.d.ts +1 -1
- package/dist/api/iam-validation/simulate.d.ts +1 -1
- package/dist/api/iam-validation/user-permissions.js +2 -1
- package/dist/api/make-lambda-payload.d.ts +8 -9
- package/dist/api/make-lambda-payload.js +15 -13
- package/dist/api/mock-functions.d.ts +1 -1
- package/dist/api/presign-url.d.ts +1 -1
- package/dist/api/presign-url.js +4 -4
- package/dist/api/render-media-on-lambda.d.ts +5 -6
- package/dist/api/render-media-on-lambda.js +5 -5
- package/dist/api/render-still-on-lambda.d.ts +8 -6
- package/dist/api/render-still-on-lambda.js +6 -5
- package/dist/api/upload-dir.d.ts +2 -2
- package/dist/api/upload-dir.js +2 -2
- package/dist/cli/args.d.ts +2 -3
- package/dist/cli/commands/render/progress.d.ts +2 -2
- package/dist/cli/commands/render/progress.js +6 -5
- package/dist/cli/commands/render/render.d.ts +3 -1
- package/dist/cli/commands/render/render.js +3 -2
- package/dist/cli/commands/sites/create.d.ts +3 -1
- package/dist/cli/commands/sites/create.js +6 -5
- package/dist/cli/commands/sites/index.d.ts +3 -1
- package/dist/cli/commands/sites/index.js +4 -4
- package/dist/cli/commands/sites/rm.d.ts +3 -1
- package/dist/cli/commands/sites/rm.js +4 -3
- package/dist/cli/commands/sites/rmall.d.ts +3 -1
- package/dist/cli/commands/sites/rmall.js +4 -3
- package/dist/cli/commands/still.d.ts +3 -1
- package/dist/cli/commands/still.js +3 -2
- package/dist/cli/get-aws-region.d.ts +1 -1
- package/dist/cli/helpers/__mocks__/quit.d.ts +1 -0
- package/dist/cli/helpers/__mocks__/quit.js +7 -0
- package/dist/cli/index.d.ts +3 -1
- package/dist/cli/index.js +8 -7
- package/dist/client.d.ts +4 -5
- package/dist/functions/aws-implementation.d.ts +11 -0
- package/dist/functions/aws-implementation.js +49 -0
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
- package/dist/functions/compositions.d.ts +3 -2
- package/dist/functions/compositions.js +18 -15
- package/dist/functions/helpers/__mocks__/get-browser-instance.d.ts +3 -0
- package/dist/functions/helpers/__mocks__/get-browser-instance.js +12 -0
- package/dist/functions/helpers/__mocks__/leak-detection.d.ts +4 -0
- package/dist/functions/helpers/__mocks__/leak-detection.js +9 -0
- package/dist/functions/helpers/__mocks__/timer.d.ts +2 -0
- package/dist/functions/helpers/__mocks__/timer.js +10 -0
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts +5 -3
- package/dist/functions/helpers/calculate-price-from-bucket.js +2 -3
- package/dist/functions/helpers/cleanup-props.d.ts +4 -2
- package/dist/functions/helpers/cleanup-props.js +5 -4
- package/dist/functions/helpers/concat-videos.d.ts +2 -2
- package/dist/functions/helpers/create-post-render-data.d.ts +8 -8
- package/dist/functions/helpers/create-post-render-data.js +1 -1
- package/dist/functions/helpers/expected-out-name.d.ts +4 -4
- package/dist/functions/helpers/find-output-file-in-bucket.d.ts +8 -7
- package/dist/functions/helpers/find-output-file-in-bucket.js +5 -6
- package/dist/functions/helpers/get-browser-instance.d.ts +3 -2
- package/dist/functions/helpers/get-browser-instance.js +3 -4
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/get-current-region.js +3 -3
- package/dist/functions/helpers/get-custom-out-name.d.ts +5 -5
- package/dist/functions/helpers/get-folder-files.d.ts +2 -0
- package/dist/functions/helpers/get-folder-files.js +38 -0
- package/dist/functions/helpers/get-output-url-from-metadata.d.ts +4 -3
- package/dist/functions/helpers/get-output-url-from-metadata.js +4 -5
- package/dist/functions/helpers/get-overall-progress-s3.d.ts +5 -4
- package/dist/functions/helpers/get-overall-progress-s3.js +5 -7
- package/dist/functions/helpers/get-progress.d.ts +8 -7
- package/dist/functions/helpers/get-progress.js +7 -5
- package/dist/functions/helpers/inspect-errors.d.ts +1 -1
- package/dist/functions/helpers/inspect-errors.js +4 -4
- package/dist/functions/helpers/io.d.ts +3 -36
- package/dist/functions/helpers/io.js +3 -104
- package/dist/functions/helpers/lifecycle.d.ts +3 -9
- package/dist/functions/helpers/lifecycle.js +6 -16
- package/dist/functions/helpers/make-aws-artifact.d.ts +3 -0
- package/dist/functions/helpers/make-aws-artifact.js +12 -0
- package/dist/functions/helpers/make-timeout-error.d.ts +5 -4
- package/dist/functions/helpers/make-timeout-error.js +2 -1
- package/dist/functions/helpers/make-timeout-message.d.ts +5 -3
- package/dist/functions/helpers/make-timeout-message.js +8 -9
- package/dist/functions/helpers/merge-chunks.d.ts +10 -10
- package/dist/functions/helpers/merge-chunks.js +7 -8
- package/dist/functions/helpers/overall-render-progress.d.ts +18 -23
- package/dist/functions/helpers/overall-render-progress.js +5 -5
- package/dist/functions/helpers/print-cloudwatch-helper.d.ts +2 -2
- package/dist/functions/helpers/print-logging-helper.d.ts +4 -0
- package/dist/functions/helpers/print-logging-helper.js +12 -0
- package/dist/functions/helpers/read-with-progress.d.ts +4 -3
- package/dist/functions/helpers/read-with-progress.js +2 -2
- package/dist/functions/helpers/render-has-audio-video.d.ts +3 -2
- package/dist/functions/helpers/stream-renderer.d.ts +7 -4
- package/dist/functions/helpers/stream-renderer.js +11 -10
- package/dist/functions/helpers/streamify-response.d.ts +0 -20
- package/dist/functions/helpers/streamify-response.js +1 -62
- package/dist/functions/helpers/validate-composition.d.ts +5 -3
- package/dist/functions/helpers/validate-composition.js +2 -3
- package/dist/functions/index.d.ts +5 -3
- package/dist/functions/index.js +98 -72
- package/dist/functions/info.d.ts +1 -1
- package/dist/functions/info.js +2 -2
- package/dist/functions/launch.d.ts +3 -2
- package/dist/functions/launch.js +54 -41
- package/dist/functions/progress.d.ts +6 -3
- package/dist/functions/progress.js +5 -4
- package/dist/functions/provider-implementation.d.ts +0 -0
- package/dist/functions/provider-implementation.js +1 -0
- package/dist/functions/renderer.d.ts +9 -3
- package/dist/functions/renderer.js +30 -22
- package/dist/functions/start.d.ts +3 -2
- package/dist/functions/start.js +13 -16
- package/dist/functions/still.d.ts +8 -18
- package/dist/functions/still.js +47 -46
- package/dist/index.d.ts +4 -6
- package/dist/internals.d.ts +16 -14
- package/dist/io/delete-file.d.ts +3 -0
- package/dist/io/delete-file.js +12 -0
- package/dist/io/head-file.d.ts +3 -0
- package/dist/io/head-file.js +13 -0
- package/dist/io/list-objects.d.ts +3 -0
- package/dist/io/list-objects.js +58 -0
- package/dist/io/read-file.d.ts +9 -0
- package/dist/io/read-file.js +14 -0
- package/dist/io/write-file.d.ts +5 -0
- package/dist/io/write-file.js +51 -0
- package/dist/pricing/aws-regions.d.ts +0 -3
- package/dist/pricing/aws-regions.js +0 -44
- package/dist/pricing/price-per-1-s.d.ts +1 -1
- package/dist/regions.d.ts +3 -2
- package/dist/regions.js +43 -3
- package/dist/shared/__mocks__/aws-clients.d.ts +2 -0
- package/dist/shared/__mocks__/aws-clients.js +62 -0
- package/dist/shared/__mocks__/bundle-site.d.ts +2 -0
- package/dist/shared/__mocks__/bundle-site.js +32 -0
- package/dist/shared/__mocks__/check-credentials.d.ts +1 -0
- package/dist/shared/__mocks__/check-credentials.js +5 -0
- package/dist/shared/__mocks__/get-account-id.d.ts +2 -0
- package/dist/shared/__mocks__/get-account-id.js +11 -0
- package/dist/shared/__mocks__/read-dir.d.ts +2 -0
- package/dist/shared/__mocks__/read-dir.js +13 -0
- package/dist/shared/aws-clients.d.ts +6 -29
- package/dist/shared/aws-clients.js +7 -177
- package/dist/shared/call-lambda.d.ts +8 -9
- package/dist/shared/call-lambda.js +16 -3
- package/dist/shared/check-credentials.js +2 -2
- package/dist/shared/cleanup-serialized-input-props.d.ts +8 -6
- package/dist/shared/cleanup-serialized-input-props.js +7 -8
- package/dist/shared/compress-props.d.ts +8 -6
- package/dist/shared/compress-props.js +11 -14
- package/dist/shared/constants.d.ts +10 -288
- package/dist/shared/constants.js +1 -46
- package/dist/shared/content-disposition-header.d.ts +1 -6
- package/dist/shared/content-disposition-header.js +2 -2
- package/dist/shared/convert-to-serve-url.d.ts +2 -2
- package/dist/shared/convert-to-serve-url.js +3 -3
- package/dist/shared/get-account-id.d.ts +1 -1
- package/dist/shared/get-aws-urls.d.ts +2 -2
- package/dist/shared/get-credentials.d.ts +9 -0
- package/dist/shared/get-credentials.js +53 -0
- package/dist/shared/get-function-version.d.ts +1 -1
- package/dist/shared/get-function-version.js +2 -1
- package/dist/shared/get-s3-client.d.ts +5 -0
- package/dist/shared/get-s3-client.js +13 -0
- package/dist/shared/get-service-client.d.ts +22 -0
- package/dist/shared/get-service-client.js +117 -0
- package/dist/shared/hosted-layers.d.ts +1 -1
- package/dist/shared/invoke-webhook.d.ts +1 -1
- package/dist/shared/lambda-insights-extensions.d.ts +1 -1
- package/dist/shared/lifecycle-rules.d.ts +4 -3
- package/dist/shared/lifecycle-rules.js +3 -3
- package/dist/shared/make-s3-url.d.ts +1 -1
- package/dist/shared/random-hash.d.ts +1 -3
- package/dist/shared/random-hash.js +3 -4
- package/dist/shared/return-values.d.ts +10 -11
- package/dist/shared/validate-aws-region.d.ts +1 -1
- package/dist/shared/validate-aws-region.js +3 -3
- package/dist/shared/validate-bucketname.d.ts +0 -4
- package/dist/shared/validate-bucketname.js +3 -23
- package/dist/shared/validate-lambda-codec.d.ts +2 -4
- package/dist/shared/validate-lambda-codec.js +3 -13
- package/dist/shared/validate-outname.js +2 -2
- package/dist/shared/validate-privacy.d.ts +1 -1
- package/dist/shared/validate-webhook.d.ts +1 -1
- package/package.json +11 -9
- package/remotionlambda-arm64.zip +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cleanItems = void 0;
|
|
4
|
+
const mock_store_1 = require("../../test/mocks/mock-store");
|
|
5
|
+
const cleanItems = (input) => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
for (const item of input.list) {
|
|
8
|
+
(_a = input.onBeforeItemDeleted) === null || _a === void 0 ? void 0 : _a.call(input, {
|
|
9
|
+
bucketName: input.bucket,
|
|
10
|
+
itemName: item,
|
|
11
|
+
});
|
|
12
|
+
(0, mock_store_1.mockDeleteS3File)({
|
|
13
|
+
key: item,
|
|
14
|
+
bucketName: input.bucket,
|
|
15
|
+
region: input.region,
|
|
16
|
+
});
|
|
17
|
+
(_b = input.onAfterItemDeleted) === null || _b === void 0 ? void 0 : _b.call(input, {
|
|
18
|
+
bucketName: input.bucket,
|
|
19
|
+
itemName: item,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return Promise.resolve([]);
|
|
23
|
+
};
|
|
24
|
+
exports.cleanItems = cleanItems;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createFunction = void 0;
|
|
4
|
+
const version_1 = require("remotion/version");
|
|
5
|
+
const defaults_1 = require("../../defaults");
|
|
6
|
+
const mock_functions_1 = require("../mock-functions");
|
|
7
|
+
const createFunction = (input) => {
|
|
8
|
+
if (!input.alreadyCreated) {
|
|
9
|
+
(0, mock_functions_1.addFunction)({
|
|
10
|
+
functionName: input.functionName,
|
|
11
|
+
memorySizeInMb: defaults_1.DEFAULT_MEMORY_SIZE,
|
|
12
|
+
timeoutInSeconds: input.timeoutInSeconds,
|
|
13
|
+
version: version_1.VERSION,
|
|
14
|
+
diskSizeInMb: defaults_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB,
|
|
15
|
+
}, input.region);
|
|
16
|
+
}
|
|
17
|
+
return Promise.resolve({
|
|
18
|
+
FunctionName: input.functionName,
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.createFunction = createFunction;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteFunction = void 0;
|
|
4
|
+
const mock_functions_1 = require("../mock-functions");
|
|
5
|
+
const deleteFunction = ({ region, functionName }) => {
|
|
6
|
+
(0, mock_functions_1.deleteMockFunction)(functionName, region);
|
|
7
|
+
return Promise.resolve();
|
|
8
|
+
};
|
|
9
|
+
exports.deleteFunction = deleteFunction;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFunctions = void 0;
|
|
4
|
+
const version_1 = require("remotion/version");
|
|
5
|
+
const mock_functions_1 = require("../mock-functions");
|
|
6
|
+
const getFunctions = ({ region, compatibleOnly }) => {
|
|
7
|
+
return Promise.resolve((0, mock_functions_1.getAllMockFunctions)(region, compatibleOnly ? version_1.VERSION : null));
|
|
8
|
+
};
|
|
9
|
+
exports.getFunctions = getFunctions;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uploadDir = exports.getDirFiles = void 0;
|
|
4
|
+
const mock_store_1 = require("../../test/mocks/mock-store");
|
|
5
|
+
const getDirFiles = (dir) => {
|
|
6
|
+
if (dir === '/path/to/bundle-1') {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
name: 'bundle.js',
|
|
10
|
+
content: 'console.log("Hello World")',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'styles.css',
|
|
14
|
+
content: 'body {background: red}',
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
if (dir === '/path/to/bundle-2') {
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
name: 'bundle.js',
|
|
22
|
+
content: 'console.log("Hello World")',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'styles2.css',
|
|
26
|
+
content: 'body {background: red}',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
throw new Error('could not get dir for ' + dir);
|
|
31
|
+
};
|
|
32
|
+
exports.getDirFiles = getDirFiles;
|
|
33
|
+
const uploadDir = (input) => {
|
|
34
|
+
const files = (0, exports.getDirFiles)(input.localDir);
|
|
35
|
+
for (const file of files) {
|
|
36
|
+
(0, mock_store_1.writeMockS3File)({
|
|
37
|
+
privacy: input.privacy,
|
|
38
|
+
bucketName: input.bucket,
|
|
39
|
+
body: file.content,
|
|
40
|
+
// Should not use path.join here because on Windows it's not / separator
|
|
41
|
+
key: [input.keyPrefix, file.name].join('/'),
|
|
42
|
+
region: input.region,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return Promise.resolve();
|
|
46
|
+
};
|
|
47
|
+
exports.uploadDir = uploadDir;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
region: AwsRegion;
|
|
5
|
-
expectedBucketOwner: string | null;
|
|
6
|
-
}) => Promise<boolean>;
|
|
1
|
+
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
2
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
3
|
+
export declare const bucketExistsInRegionImplementation: ProviderSpecifics<AwsProvider>['bucketExists'];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.bucketExistsInRegionImplementation = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const get_s3_client_1 = require("../shared/get-s3-client");
|
|
6
|
+
const bucketExistsInRegionImplementation = async ({ bucketName, region, expectedBucketOwner }) => {
|
|
7
7
|
var _a;
|
|
8
8
|
try {
|
|
9
|
-
const bucket = await (0,
|
|
9
|
+
const bucket = await (0, get_s3_client_1.getS3Client)(region, null).send(new client_s3_1.GetBucketLocationCommand({
|
|
10
10
|
Bucket: bucketName,
|
|
11
11
|
ExpectedBucketOwner: expectedBucketOwner !== null && expectedBucketOwner !== void 0 ? expectedBucketOwner : undefined,
|
|
12
12
|
}));
|
|
@@ -19,4 +19,4 @@ const bucketExistsInRegion = async ({ bucketName, region, expectedBucketOwner, }
|
|
|
19
19
|
throw err;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
exports.
|
|
22
|
+
exports.bucketExistsInRegionImplementation = bucketExistsInRegionImplementation;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const cleanItems: ({ bucket, onAfterItemDeleted, onBeforeItemDeleted, region, list, }: {
|
|
1
|
+
import type { CloudProvider, ProviderSpecifics } from '@remotion/serverless';
|
|
2
|
+
export declare const cleanItems: <Provider extends CloudProvider<string, Record<string, unknown>>>({ bucket, onAfterItemDeleted, onBeforeItemDeleted, region, list, providerSpecifics, }: {
|
|
3
3
|
bucket: string;
|
|
4
|
-
region:
|
|
4
|
+
region: Provider["region"];
|
|
5
5
|
list: string[];
|
|
6
6
|
onBeforeItemDeleted: (data: {
|
|
7
7
|
bucketName: string;
|
|
@@ -11,4 +11,5 @@ export declare const cleanItems: ({ bucket, onAfterItemDeleted, onBeforeItemDele
|
|
|
11
11
|
bucketName: string;
|
|
12
12
|
itemName: string;
|
|
13
13
|
}) => void;
|
|
14
|
+
providerSpecifics: ProviderSpecifics<Provider>;
|
|
14
15
|
}) => Promise<void[]>;
|
package/dist/api/clean-items.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.cleanItems = void 0;
|
|
4
|
-
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
|
-
const aws_clients_1 = require("../shared/aws-clients");
|
|
6
4
|
const p_limit_1 = require("../shared/p-limit");
|
|
7
5
|
const limit = (0, p_limit_1.pLimit)(10);
|
|
8
|
-
const cleanItems = ({ bucket, onAfterItemDeleted, onBeforeItemDeleted, region, list, }) => {
|
|
6
|
+
const cleanItems = ({ bucket, onAfterItemDeleted, onBeforeItemDeleted, region, list, providerSpecifics, }) => {
|
|
9
7
|
return Promise.all(list.map((object) => limit(async () => {
|
|
10
8
|
onBeforeItemDeleted({
|
|
11
9
|
bucketName: bucket,
|
|
12
10
|
itemName: object,
|
|
13
11
|
});
|
|
14
|
-
await
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
await providerSpecifics.deleteFile({
|
|
13
|
+
bucketName: bucket,
|
|
14
|
+
key: object,
|
|
15
|
+
region,
|
|
16
|
+
customCredentials: null,
|
|
17
|
+
});
|
|
18
18
|
onAfterItemDeleted({
|
|
19
19
|
bucketName: bucket,
|
|
20
20
|
itemName: object,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
bucketName: string;
|
|
5
|
-
}) => Promise<void>;
|
|
1
|
+
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
2
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
3
|
+
export declare const createBucket: ProviderSpecifics<AwsProvider>['createBucket'];
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createBucket = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
|
-
const
|
|
6
|
-
const createBucket = async ({ region, bucketName
|
|
7
|
-
await (0,
|
|
5
|
+
const get_s3_client_1 = require("../shared/get-s3-client");
|
|
6
|
+
const createBucket = async ({ region, bucketName }) => {
|
|
7
|
+
await (0, get_s3_client_1.getS3Client)(region, null).send(new client_s3_1.CreateBucketCommand({
|
|
8
8
|
Bucket: bucketName,
|
|
9
9
|
}));
|
|
10
10
|
try {
|
|
11
|
-
await (0,
|
|
11
|
+
await (0, get_s3_client_1.getS3Client)(region, null).send(new client_s3_1.DeleteBucketOwnershipControlsCommand({
|
|
12
12
|
Bucket: bucketName,
|
|
13
13
|
}));
|
|
14
14
|
}
|
|
@@ -19,7 +19,7 @@ const createBucket = async ({ region, bucketName, }) => {
|
|
|
19
19
|
throw err;
|
|
20
20
|
}
|
|
21
21
|
try {
|
|
22
|
-
await (0,
|
|
22
|
+
await (0, get_s3_client_1.getS3Client)(region, null).send(new client_s3_1.DeletePublicAccessBlockCommand({
|
|
23
23
|
Bucket: bucketName,
|
|
24
24
|
}));
|
|
25
25
|
}
|
|
@@ -30,7 +30,7 @@ const createBucket = async ({ region, bucketName, }) => {
|
|
|
30
30
|
throw err;
|
|
31
31
|
}
|
|
32
32
|
try {
|
|
33
|
-
await (0,
|
|
33
|
+
await (0, get_s3_client_1.getS3Client)(region, null).send(new client_s3_1.PutBucketAclCommand({
|
|
34
34
|
Bucket: bucketName,
|
|
35
35
|
ACL: 'public-read',
|
|
36
36
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
import type { AwsRegion } from '../
|
|
2
|
+
import type { AwsRegion } from '../regions';
|
|
3
3
|
export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, ephemerealStorageInMb, customRoleArn, enableLambdaInsights, enableV5Runtime, logLevel, vpcSubnetIds, vpcSecurityGroupIds, }: {
|
|
4
4
|
createCloudWatchLogGroup: boolean;
|
|
5
5
|
region: AwsRegion;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type
|
|
1
|
+
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
2
|
+
import { type CustomCredentials } from '@remotion/serverless/client';
|
|
3
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
4
|
+
import type { AwsRegion } from '../regions';
|
|
3
5
|
export type DeleteRenderInput = {
|
|
4
6
|
region: AwsRegion;
|
|
5
7
|
bucketName: string;
|
|
6
8
|
renderId: string;
|
|
7
|
-
customCredentials?: CustomCredentials
|
|
9
|
+
customCredentials?: CustomCredentials<AwsProvider>;
|
|
8
10
|
};
|
|
11
|
+
export declare const internalDeleteRender: (input: DeleteRenderInput & {
|
|
12
|
+
providerSpecifics: ProviderSpecifics<AwsProvider>;
|
|
13
|
+
}) => Promise<{
|
|
14
|
+
freedBytes: number;
|
|
15
|
+
}>;
|
|
9
16
|
/**
|
|
10
17
|
* @description Deletes a render artifact and it's metadata given it's renderId.
|
|
11
18
|
* @see [Documentation](https://remotion.dev/docs/lambda/deleterender)
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteRender = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
exports.deleteRender = exports.internalDeleteRender = void 0;
|
|
4
|
+
const client_1 = require("@remotion/serverless/client");
|
|
5
|
+
const aws_implementation_1 = require("../functions/aws-implementation");
|
|
6
6
|
const get_overall_progress_s3_1 = require("../functions/helpers/get-overall-progress-s3");
|
|
7
|
-
const io_1 = require("../functions/helpers/io");
|
|
8
7
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
9
8
|
const clean_items_1 = require("./clean-items");
|
|
10
|
-
|
|
11
|
-
* @description Deletes a render artifact and it's metadata given it's renderId.
|
|
12
|
-
* @see [Documentation](https://remotion.dev/docs/lambda/deleterender)
|
|
13
|
-
* @param params.region The AWS region in which the media resides.
|
|
14
|
-
* @param params.bucketName The `bucketName` that was specified during the render
|
|
15
|
-
* @param params.renderId The `renderId` that was obtained after triggering the render.
|
|
16
|
-
* @param params.customCredentials If the file was saved to a foreign cloud, pass credentials for reading from it.
|
|
17
|
-
*/
|
|
18
|
-
const deleteRender = async (input) => {
|
|
9
|
+
const internalDeleteRender = async (input) => {
|
|
19
10
|
var _a;
|
|
20
11
|
const expectedBucketOwner = await (0, get_account_id_1.getAccountId)({
|
|
21
12
|
region: input.region,
|
|
@@ -25,21 +16,22 @@ const deleteRender = async (input) => {
|
|
|
25
16
|
expectedBucketOwner,
|
|
26
17
|
region: input.region,
|
|
27
18
|
renderId: input.renderId,
|
|
19
|
+
providerSpecifics: input.providerSpecifics,
|
|
28
20
|
});
|
|
29
21
|
// Render did not start yet
|
|
30
22
|
if (progress.renderMetadata === null) {
|
|
31
23
|
return { freedBytes: 0 };
|
|
32
24
|
}
|
|
33
|
-
const { key, renderBucketName, customCredentials } = (0,
|
|
34
|
-
await
|
|
25
|
+
const { key, renderBucketName, customCredentials } = (0, client_1.getExpectedOutName)(progress.renderMetadata, input.bucketName, (_a = input.customCredentials) !== null && _a !== void 0 ? _a : null);
|
|
26
|
+
await input.providerSpecifics.deleteFile({
|
|
35
27
|
bucketName: renderBucketName,
|
|
36
28
|
customCredentials,
|
|
37
29
|
key,
|
|
38
30
|
region: input.region,
|
|
39
31
|
});
|
|
40
|
-
let files = await
|
|
32
|
+
let files = await input.providerSpecifics.listObjects({
|
|
41
33
|
bucketName: input.bucketName,
|
|
42
|
-
prefix: (0,
|
|
34
|
+
prefix: (0, client_1.rendersPrefix)(input.renderId),
|
|
43
35
|
region: input.region,
|
|
44
36
|
expectedBucketOwner,
|
|
45
37
|
});
|
|
@@ -55,10 +47,11 @@ const deleteRender = async (input) => {
|
|
|
55
47
|
onAfterItemDeleted: () => undefined,
|
|
56
48
|
onBeforeItemDeleted: () => undefined,
|
|
57
49
|
region: input.region,
|
|
50
|
+
providerSpecifics: input.providerSpecifics,
|
|
58
51
|
});
|
|
59
|
-
files = await
|
|
52
|
+
files = await input.providerSpecifics.listObjects({
|
|
60
53
|
bucketName: input.bucketName,
|
|
61
|
-
prefix: (0,
|
|
54
|
+
prefix: (0, client_1.rendersPrefix)(input.renderId),
|
|
62
55
|
region: input.region,
|
|
63
56
|
expectedBucketOwner,
|
|
64
57
|
});
|
|
@@ -67,4 +60,19 @@ const deleteRender = async (input) => {
|
|
|
67
60
|
freedBytes: totalSize,
|
|
68
61
|
};
|
|
69
62
|
};
|
|
63
|
+
exports.internalDeleteRender = internalDeleteRender;
|
|
64
|
+
/**
|
|
65
|
+
* @description Deletes a render artifact and it's metadata given it's renderId.
|
|
66
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/deleterender)
|
|
67
|
+
* @param params.region The AWS region in which the media resides.
|
|
68
|
+
* @param params.bucketName The `bucketName` that was specified during the render
|
|
69
|
+
* @param params.renderId The `renderId` that was obtained after triggering the render.
|
|
70
|
+
* @param params.customCredentials If the file was saved to a foreign cloud, pass credentials for reading from it.
|
|
71
|
+
*/
|
|
72
|
+
const deleteRender = (input) => {
|
|
73
|
+
return (0, exports.internalDeleteRender)({
|
|
74
|
+
...input,
|
|
75
|
+
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
76
|
+
});
|
|
77
|
+
};
|
|
70
78
|
exports.deleteRender = deleteRender;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
2
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
3
|
+
import type { AwsRegion } from '../regions';
|
|
2
4
|
export type DeleteSiteInput = {
|
|
3
5
|
bucketName: string;
|
|
4
6
|
siteName: string;
|
|
@@ -11,6 +13,9 @@ export type DeleteSiteInput = {
|
|
|
11
13
|
export type DeleteSiteOutput = {
|
|
12
14
|
totalSizeInBytes: number;
|
|
13
15
|
};
|
|
16
|
+
export declare const internalDeleteSite: ({ bucketName, siteName, region, onAfterItemDeleted, providerSpecifics, }: DeleteSiteInput & {
|
|
17
|
+
providerSpecifics: ProviderSpecifics<AwsProvider>;
|
|
18
|
+
}) => Promise<DeleteSiteOutput>;
|
|
14
19
|
/**
|
|
15
20
|
*
|
|
16
21
|
* @description Deletes a deployed site from your S3 bucket. The opposite of deploySite().
|
|
@@ -21,4 +26,4 @@ export type DeleteSiteOutput = {
|
|
|
21
26
|
* @param params.onAfterItemDeleted Function that gets called after each file that gets deleted, useful for showing progress.
|
|
22
27
|
* @returns {Promise<DeleteSiteOutput>} Object containing info about how much space was freed.
|
|
23
28
|
*/
|
|
24
|
-
export declare const deleteSite: (
|
|
29
|
+
export declare const deleteSite: (props: DeleteSiteInput) => Promise<DeleteSiteOutput>;
|
package/dist/api/delete-site.js
CHANGED
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteSite = void 0;
|
|
3
|
+
exports.deleteSite = exports.internalDeleteSite = void 0;
|
|
4
4
|
const defaults_1 = require("../defaults");
|
|
5
|
-
const
|
|
5
|
+
const aws_implementation_1 = require("../functions/aws-implementation");
|
|
6
6
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
7
7
|
const clean_items_1 = require("./clean-items");
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @description Deletes a deployed site from your S3 bucket. The opposite of deploySite().
|
|
11
|
-
* @see [Documentation](https://remotion.dev/docs/lambda/deletesite)
|
|
12
|
-
* @param params.bucketName The S3 bucket name where the site resides in.
|
|
13
|
-
* @param params.siteName The ID of the site that you want to delete.
|
|
14
|
-
* @param {AwsRegion} params.region The region in where the S3 bucket resides in.
|
|
15
|
-
* @param params.onAfterItemDeleted Function that gets called after each file that gets deleted, useful for showing progress.
|
|
16
|
-
* @returns {Promise<DeleteSiteOutput>} Object containing info about how much space was freed.
|
|
17
|
-
*/
|
|
18
|
-
const deleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, }) => {
|
|
8
|
+
const internalDeleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, providerSpecifics, }) => {
|
|
19
9
|
const accountId = await (0, get_account_id_1.getAccountId)({ region });
|
|
20
|
-
let files = await
|
|
10
|
+
let files = await providerSpecifics.listObjects({
|
|
21
11
|
bucketName,
|
|
22
12
|
// The `/` is important to not accidentially delete sites with the same name but containing a suffix.
|
|
23
13
|
prefix: `${(0, defaults_1.getSitesKey)(siteName)}/`,
|
|
@@ -36,8 +26,9 @@ const deleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, })
|
|
|
36
26
|
onAfterItemDeleted: onAfterItemDeleted !== null && onAfterItemDeleted !== void 0 ? onAfterItemDeleted : (() => undefined),
|
|
37
27
|
onBeforeItemDeleted: () => undefined,
|
|
38
28
|
region,
|
|
29
|
+
providerSpecifics,
|
|
39
30
|
});
|
|
40
|
-
files = await
|
|
31
|
+
files = await providerSpecifics.listObjects({
|
|
41
32
|
bucketName,
|
|
42
33
|
// The `/` is important to not accidentially delete sites with the same name but containing a suffix.
|
|
43
34
|
prefix: `${(0, defaults_1.getSitesKey)(siteName)}/`,
|
|
@@ -49,4 +40,21 @@ const deleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, })
|
|
|
49
40
|
totalSizeInBytes: totalSize,
|
|
50
41
|
};
|
|
51
42
|
};
|
|
43
|
+
exports.internalDeleteSite = internalDeleteSite;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @description Deletes a deployed site from your S3 bucket. The opposite of deploySite().
|
|
47
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/deletesite)
|
|
48
|
+
* @param params.bucketName The S3 bucket name where the site resides in.
|
|
49
|
+
* @param params.siteName The ID of the site that you want to delete.
|
|
50
|
+
* @param {AwsRegion} params.region The region in where the S3 bucket resides in.
|
|
51
|
+
* @param params.onAfterItemDeleted Function that gets called after each file that gets deleted, useful for showing progress.
|
|
52
|
+
* @returns {Promise<DeleteSiteOutput>} Object containing info about how much space was freed.
|
|
53
|
+
*/
|
|
54
|
+
const deleteSite = (props) => {
|
|
55
|
+
return (0, exports.internalDeleteSite)({
|
|
56
|
+
...props,
|
|
57
|
+
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
58
|
+
});
|
|
59
|
+
};
|
|
52
60
|
exports.deleteSite = deleteSite;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
import type { AwsRegion } from '../
|
|
2
|
+
import type { AwsRegion } from '../regions';
|
|
3
3
|
type MandatoryParameters = {
|
|
4
4
|
createCloudWatchLogGroup: boolean;
|
|
5
5
|
cloudWatchLogRetentionPeriodInDays?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deployFunction = exports.internalDeployFunction = void 0;
|
|
4
|
-
const
|
|
4
|
+
const error_handling_1 = require("@remotion/renderer/error-handling");
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
6
|
const version_1 = require("remotion/version");
|
|
7
7
|
const get_functions_1 = require("../api/get-functions");
|
|
@@ -66,7 +66,7 @@ const internalDeployFunction = async (params) => {
|
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
exports.internalDeployFunction = internalDeployFunction;
|
|
69
|
-
const errorHandled =
|
|
69
|
+
const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(exports.internalDeployFunction);
|
|
70
70
|
/**
|
|
71
71
|
* @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
|
|
72
72
|
* @see [Documentation](https://www.remotion.dev/docs/lambda/deployfunction)
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type GitSource, type WebpackOverrideFn } from '@remotion/bundler';
|
|
2
2
|
import type { ToOptions } from '@remotion/renderer';
|
|
3
3
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
5
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
6
|
+
import type { AwsRegion } from '../regions';
|
|
5
7
|
import type { UploadDirProgress } from './upload-dir';
|
|
6
8
|
type MandatoryParameters = {
|
|
7
9
|
entryPoint: string;
|
|
@@ -59,11 +61,11 @@ export declare const internalDeploySite: (args_0: MandatoryParameters & {
|
|
|
59
61
|
getValue: ({ commandLine }: {
|
|
60
62
|
commandLine: Record<string, unknown>;
|
|
61
63
|
}) => {
|
|
62
|
-
value: "
|
|
64
|
+
value: "verbose" | "info" | "warn" | "error";
|
|
63
65
|
source: string;
|
|
64
66
|
};
|
|
65
|
-
setConfig: (newLogLevel: "
|
|
66
|
-
type: "
|
|
67
|
+
setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
68
|
+
type: "verbose" | "info" | "warn" | "error";
|
|
67
69
|
};
|
|
68
70
|
readonly throwIfSiteExists: {
|
|
69
71
|
cliFlag: string;
|
|
@@ -80,7 +82,9 @@ export declare const internalDeploySite: (args_0: MandatoryParameters & {
|
|
|
80
82
|
ssrName: string;
|
|
81
83
|
type: boolean;
|
|
82
84
|
};
|
|
83
|
-
}>
|
|
85
|
+
}> & {
|
|
86
|
+
providerSpecifics: ProviderSpecifics<AwsProvider>;
|
|
87
|
+
}) => Promise<{
|
|
84
88
|
serveUrl: string;
|
|
85
89
|
siteName: string;
|
|
86
90
|
stats: {
|
package/dist/api/deploy-site.js
CHANGED
|
@@ -4,31 +4,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.deploySite = exports.internalDeploySite = void 0;
|
|
7
|
-
const
|
|
7
|
+
const error_handling_1 = require("@remotion/renderer/error-handling");
|
|
8
|
+
const client_1 = require("@remotion/serverless/client");
|
|
8
9
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
-
const
|
|
10
|
+
const aws_implementation_1 = require("../functions/aws-implementation");
|
|
10
11
|
const bundle_site_1 = require("../shared/bundle-site");
|
|
11
12
|
const constants_1 = require("../shared/constants");
|
|
12
13
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
13
14
|
const get_s3_operations_1 = require("../shared/get-s3-operations");
|
|
14
15
|
const make_s3_url_1 = require("../shared/make-s3-url");
|
|
15
|
-
const random_hash_1 = require("../shared/random-hash");
|
|
16
16
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
17
|
-
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
18
17
|
const validate_privacy_1 = require("../shared/validate-privacy");
|
|
19
18
|
const validate_site_name_1 = require("../shared/validate-site-name");
|
|
20
|
-
const bucket_exists_1 = require("./bucket-exists");
|
|
21
19
|
const upload_dir_1 = require("./upload-dir");
|
|
22
|
-
const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options, region, privacy, gitSource, throwIfSiteExists, }) => {
|
|
20
|
+
const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options, region, privacy, gitSource, throwIfSiteExists, providerSpecifics, }) => {
|
|
23
21
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
24
22
|
(0, validate_aws_region_1.validateAwsRegion)(region);
|
|
25
|
-
(0,
|
|
23
|
+
(0, client_1.validateBucketName)(bucketName, {
|
|
26
24
|
mustStartWithRemotion: !(options === null || options === void 0 ? void 0 : options.bypassBucketNameValidation),
|
|
27
25
|
});
|
|
28
26
|
(0, validate_site_name_1.validateSiteName)(siteName);
|
|
29
27
|
(0, validate_privacy_1.validatePrivacy)(privacy, false);
|
|
30
28
|
const accountId = await (0, get_account_id_1.getAccountId)({ region });
|
|
31
|
-
const bucketExists = await
|
|
29
|
+
const bucketExists = await providerSpecifics.bucketExists({
|
|
32
30
|
bucketName,
|
|
33
31
|
region,
|
|
34
32
|
expectedBucketOwner: accountId,
|
|
@@ -38,7 +36,7 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
|
|
|
38
36
|
}
|
|
39
37
|
const subFolder = (0, constants_1.getSitesKey)(siteName);
|
|
40
38
|
const [files, bundled] = await Promise.all([
|
|
41
|
-
|
|
39
|
+
providerSpecifics.listObjects({
|
|
42
40
|
bucketName,
|
|
43
41
|
expectedBucketOwner: accountId,
|
|
44
42
|
region,
|
|
@@ -86,7 +84,7 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
|
|
|
86
84
|
toUpload,
|
|
87
85
|
}),
|
|
88
86
|
Promise.all(toDelete.map((d) => {
|
|
89
|
-
return
|
|
87
|
+
return providerSpecifics.deleteFile({
|
|
90
88
|
bucketName,
|
|
91
89
|
customCredentials: null,
|
|
92
90
|
key: d.Key,
|
|
@@ -109,7 +107,7 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
|
|
|
109
107
|
},
|
|
110
108
|
};
|
|
111
109
|
};
|
|
112
|
-
exports.internalDeploySite =
|
|
110
|
+
exports.internalDeploySite = (0, error_handling_1.wrapWithErrorHandling)(mandatoryDeploySite);
|
|
113
111
|
/**
|
|
114
112
|
* @description Deploys a Remotion project to an S3 bucket to prepare it for rendering on AWS Lambda.
|
|
115
113
|
* @see [Documentation](https://remotion.dev/docs/lambda/deploysite)
|
|
@@ -128,10 +126,11 @@ const deploySite = (args) => {
|
|
|
128
126
|
gitSource: (_a = args.gitSource) !== null && _a !== void 0 ? _a : null,
|
|
129
127
|
options: (_b = args.options) !== null && _b !== void 0 ? _b : {},
|
|
130
128
|
privacy: (_c = args.privacy) !== null && _c !== void 0 ? _c : 'public',
|
|
131
|
-
siteName: (_d = args.siteName) !== null && _d !== void 0 ? _d :
|
|
129
|
+
siteName: (_d = args.siteName) !== null && _d !== void 0 ? _d : aws_implementation_1.awsImplementation.randomHash(),
|
|
132
130
|
indent: false,
|
|
133
131
|
logLevel: 'info',
|
|
134
132
|
throwIfSiteExists: (_e = args.throwIfSiteExists) !== null && _e !== void 0 ? _e : false,
|
|
133
|
+
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
135
134
|
});
|
|
136
135
|
};
|
|
137
136
|
exports.deploySite = deploySite;
|