@remotion/lambda 4.0.495 → 4.0.497
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/deploy-site-from-bundle.d.ts +28 -0
- package/dist/api/deploy-site-from-bundle.js +48 -0
- package/dist/api/deploy-site.d.ts +2 -10
- package/dist/api/deploy-site.js +41 -117
- package/dist/api/upload-dir.js +2 -1
- package/dist/esm/index.mjs +291 -126
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -1
- package/dist/shared/deploy-site-with-bundle.d.ts +31 -0
- package/dist/shared/deploy-site-with-bundle.js +116 -0
- package/dist/shared/get-etag.js +4 -4
- package/dist/shared/multipart-upload-part-size.d.ts +1 -0
- package/dist/shared/multipart-upload-part-size.js +4 -0
- package/dist/shared/validate-bundle-dir.d.ts +1 -0
- package/dist/shared/validate-bundle-dir.js +63 -0
- package/dist/shared/validate-site-name.js +9 -3
- package/package.json +12 -12
- package/remotionlambda-arm64.zip +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ import type { DeployFunctionInput, DeployFunctionOutput } from './api/deploy-fun
|
|
|
7
7
|
import { deployFunction } from './api/deploy-function';
|
|
8
8
|
import type { DeploySiteInput, DeploySiteOutput } from './api/deploy-site';
|
|
9
9
|
import { deploySite } from './api/deploy-site';
|
|
10
|
+
import type { DeploySiteFromBundleInput, DeploySiteFromBundleOutput } from './api/deploy-site-from-bundle';
|
|
11
|
+
import { deploySiteFromBundle } from './api/deploy-site-from-bundle';
|
|
10
12
|
import type { DownloadMediaInput, DownloadMediaOutput } from './api/download-media';
|
|
11
13
|
import { downloadMedia } from './api/download-media';
|
|
12
14
|
import type { GetFunctionInfoInput } from './api/get-function-info';
|
|
@@ -38,6 +40,6 @@ declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region
|
|
|
38
40
|
* @deprecated Import this from `@remotion/lambda-client` instead
|
|
39
41
|
*/
|
|
40
42
|
declare const getSites: ({ region, forceBucketName, forcePathStyle, compatibleOnly, requestHandler, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
41
|
-
export { deleteFunction, deleteRender, deleteSite, deployFunction, deploySite, downloadMedia, estimatePrice, getAwsClient, getCompositionsOnLambda, getFunctionInfo, getFunctions, getOrCreateBucket, getRegions, getRenderProgress, getRolePolicy, getSites, getUserPolicy, LambdaInternals, presignUrl, renderMediaOnLambda, renderStillOnLambda, renderVideoOnLambda, simulatePermissions, validateWebhookSignature, };
|
|
42
|
-
export type { AwsRegion, CustomCredentials, DeleteFunctionInput, DeleteRenderInput, DeleteSiteInput, DeleteSiteOutput, DeployFunctionInput, DeployFunctionOutput, DeploySiteInput, DeploySiteOutput, DownloadMediaInput, DownloadMediaOutput, EnhancedErrorInfo, EstimatePriceInput, FunctionInfo, GetAwsClientInput, GetAwsClientOutput, GetCompositionsOnLambdaInput, GetCompositionsOnLambdaOutput, GetFunctionInfoInput, GetFunctionsInput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderProgressInput, GetSitesInput, GetSitesOutput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderProgress, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, };
|
|
43
|
+
export { deleteFunction, deleteRender, deleteSite, deployFunction, deploySite, deploySiteFromBundle, downloadMedia, estimatePrice, getAwsClient, getCompositionsOnLambda, getFunctionInfo, getFunctions, getOrCreateBucket, getRegions, getRenderProgress, getRolePolicy, getSites, getUserPolicy, LambdaInternals, presignUrl, renderMediaOnLambda, renderStillOnLambda, renderVideoOnLambda, simulatePermissions, validateWebhookSignature, };
|
|
44
|
+
export type { AwsRegion, CustomCredentials, DeleteFunctionInput, DeleteRenderInput, DeleteSiteInput, DeleteSiteOutput, DeployFunctionInput, DeployFunctionOutput, DeploySiteFromBundleInput, DeploySiteFromBundleOutput, DeploySiteInput, DeploySiteOutput, DownloadMediaInput, DownloadMediaOutput, EnhancedErrorInfo, EstimatePriceInput, FunctionInfo, GetAwsClientInput, GetAwsClientOutput, GetCompositionsOnLambdaInput, GetCompositionsOnLambdaOutput, GetFunctionInfoInput, GetFunctionsInput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderProgressInput, GetSitesInput, GetSitesOutput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderProgress, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, };
|
|
43
45
|
export { _InternalOverallRenderProgress };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateWebhookSignature = exports.simulatePermissions = exports.renderVideoOnLambda = exports.renderStillOnLambda = exports.renderMediaOnLambda = exports.presignUrl = exports.LambdaInternals = exports.getUserPolicy = exports.getSites = exports.getRolePolicy = exports.getRenderProgress = exports.getRegions = exports.getOrCreateBucket = exports.getFunctions = exports.getFunctionInfo = exports.getCompositionsOnLambda = exports.getAwsClient = exports.estimatePrice = exports.downloadMedia = exports.deploySite = exports.deployFunction = exports.deleteSite = exports.deleteRender = exports.deleteFunction = void 0;
|
|
3
|
+
exports.validateWebhookSignature = exports.simulatePermissions = exports.renderVideoOnLambda = exports.renderStillOnLambda = exports.renderMediaOnLambda = exports.presignUrl = exports.LambdaInternals = exports.getUserPolicy = exports.getSites = exports.getRolePolicy = exports.getRenderProgress = exports.getRegions = exports.getOrCreateBucket = exports.getFunctions = exports.getFunctionInfo = exports.getCompositionsOnLambda = exports.getAwsClient = exports.estimatePrice = exports.downloadMedia = exports.deploySiteFromBundle = exports.deploySite = exports.deployFunction = exports.deleteSite = exports.deleteRender = exports.deleteFunction = void 0;
|
|
4
4
|
const lambda_client_1 = require("@remotion/lambda-client");
|
|
5
5
|
Object.defineProperty(exports, "deleteFunction", { enumerable: true, get: function () { return lambda_client_1.deleteFunction; } });
|
|
6
6
|
Object.defineProperty(exports, "deleteRender", { enumerable: true, get: function () { return lambda_client_1.deleteRender; } });
|
|
@@ -17,6 +17,8 @@ const deploy_function_1 = require("./api/deploy-function");
|
|
|
17
17
|
Object.defineProperty(exports, "deployFunction", { enumerable: true, get: function () { return deploy_function_1.deployFunction; } });
|
|
18
18
|
const deploy_site_1 = require("./api/deploy-site");
|
|
19
19
|
Object.defineProperty(exports, "deploySite", { enumerable: true, get: function () { return deploy_site_1.deploySite; } });
|
|
20
|
+
const deploy_site_from_bundle_1 = require("./api/deploy-site-from-bundle");
|
|
21
|
+
Object.defineProperty(exports, "deploySiteFromBundle", { enumerable: true, get: function () { return deploy_site_from_bundle_1.deploySiteFromBundle; } });
|
|
20
22
|
const download_media_1 = require("./api/download-media");
|
|
21
23
|
Object.defineProperty(exports, "downloadMedia", { enumerable: true, get: function () { return download_media_1.downloadMedia; } });
|
|
22
24
|
const get_function_info_1 = require("./api/get-function-info");
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AwsRegion, RequestHandler } from '@remotion/lambda-client';
|
|
2
|
+
import { type AwsProvider } from '@remotion/lambda-client';
|
|
3
|
+
import type { FullClientSpecifics, ProviderSpecifics, UploadDirProgress } from '@remotion/serverless';
|
|
4
|
+
export type DeploySiteOutput = Promise<{
|
|
5
|
+
serveUrl: string;
|
|
6
|
+
siteName: string;
|
|
7
|
+
stats: {
|
|
8
|
+
uploadedFiles: number;
|
|
9
|
+
deletedFiles: number;
|
|
10
|
+
untouchedFiles: number;
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export type DeploySiteWithBundleOptions = {
|
|
14
|
+
onUploadProgress?: (upload: UploadDirProgress) => void;
|
|
15
|
+
onDiffingProgress?: (bytes: number, done: boolean) => void;
|
|
16
|
+
bypassBucketNameValidation?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type DeploySiteWithBundleInput = {
|
|
19
|
+
bucketName: string;
|
|
20
|
+
region: AwsRegion;
|
|
21
|
+
siteName: string;
|
|
22
|
+
options: DeploySiteWithBundleOptions;
|
|
23
|
+
privacy: 'public' | 'no-acl';
|
|
24
|
+
throwIfSiteExists: boolean;
|
|
25
|
+
providerSpecifics: ProviderSpecifics<AwsProvider>;
|
|
26
|
+
forcePathStyle: boolean;
|
|
27
|
+
fullClientSpecifics: FullClientSpecifics<AwsProvider>;
|
|
28
|
+
requestHandler: RequestHandler | null;
|
|
29
|
+
getBundle: () => Promise<string>;
|
|
30
|
+
};
|
|
31
|
+
export declare const deploySiteWithBundle: (input: DeploySiteWithBundleInput) => DeploySiteOutput;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deploySiteWithBundle = void 0;
|
|
4
|
+
const lambda_client_1 = require("@remotion/lambda-client");
|
|
5
|
+
const constants_1 = require("@remotion/lambda-client/constants");
|
|
6
|
+
const serverless_1 = require("@remotion/serverless");
|
|
7
|
+
const get_s3_operations_1 = require("./get-s3-operations");
|
|
8
|
+
const validate_site_name_1 = require("./validate-site-name");
|
|
9
|
+
const deleteConcurrency = 10;
|
|
10
|
+
const deploySiteWithBundle = async ({ bucketName, region, siteName, options, privacy, throwIfSiteExists, providerSpecifics, forcePathStyle, fullClientSpecifics, requestHandler, getBundle, }) => {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
lambda_client_1.LambdaClientInternals.validateAwsRegion(region);
|
|
13
|
+
(0, serverless_1.validateBucketName)({
|
|
14
|
+
bucketName,
|
|
15
|
+
bucketNamePrefix: constants_1.REMOTION_BUCKET_PREFIX,
|
|
16
|
+
options: {
|
|
17
|
+
mustStartWithRemotion: !options.bypassBucketNameValidation,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
(0, validate_site_name_1.validateSiteName)(siteName);
|
|
21
|
+
(0, serverless_1.validatePrivacy)(privacy, false);
|
|
22
|
+
const accountId = await providerSpecifics.getAccountId({ region });
|
|
23
|
+
const bucketExists = await providerSpecifics.bucketExists({
|
|
24
|
+
bucketName,
|
|
25
|
+
region,
|
|
26
|
+
expectedBucketOwner: accountId,
|
|
27
|
+
forcePathStyle,
|
|
28
|
+
requestHandler,
|
|
29
|
+
});
|
|
30
|
+
if (!bucketExists) {
|
|
31
|
+
throw new Error(`No bucket with the name ${bucketName} exists`);
|
|
32
|
+
}
|
|
33
|
+
const subFolder = (0, constants_1.getSitesKey)(siteName);
|
|
34
|
+
const [files, bundleDir] = await Promise.all([
|
|
35
|
+
providerSpecifics.listObjects({
|
|
36
|
+
bucketName,
|
|
37
|
+
expectedBucketOwner: accountId,
|
|
38
|
+
region,
|
|
39
|
+
// The `/` is important to not accidentally delete sites with the same name but containing a suffix.
|
|
40
|
+
prefix: `${subFolder}/`,
|
|
41
|
+
forcePathStyle,
|
|
42
|
+
requestHandler,
|
|
43
|
+
}),
|
|
44
|
+
getBundle(),
|
|
45
|
+
]);
|
|
46
|
+
if (throwIfSiteExists && files.length > 0) {
|
|
47
|
+
throw new Error('`throwIfSiteExists` was passed as true, but there are already files in this folder: ' +
|
|
48
|
+
files
|
|
49
|
+
.slice(0, 5)
|
|
50
|
+
.map((f) => f.Key)
|
|
51
|
+
.join(', '));
|
|
52
|
+
}
|
|
53
|
+
(_a = options.onDiffingProgress) === null || _a === void 0 ? void 0 : _a.call(options, 0, false);
|
|
54
|
+
let totalBytes = 0;
|
|
55
|
+
const { toDelete, toUpload, existingCount } = await (0, get_s3_operations_1.getS3DiffOperations)({
|
|
56
|
+
objects: files,
|
|
57
|
+
bundle: bundleDir,
|
|
58
|
+
prefix: subFolder,
|
|
59
|
+
onProgress: (bytes) => {
|
|
60
|
+
var _a;
|
|
61
|
+
totalBytes = bytes;
|
|
62
|
+
(_a = options.onDiffingProgress) === null || _a === void 0 ? void 0 : _a.call(options, bytes, false);
|
|
63
|
+
},
|
|
64
|
+
fullClientSpecifics,
|
|
65
|
+
});
|
|
66
|
+
(_b = options.onDiffingProgress) === null || _b === void 0 ? void 0 : _b.call(options, totalBytes, true);
|
|
67
|
+
const indexHtml = 'index.html';
|
|
68
|
+
const assetsToUpload = toUpload.filter((file) => file !== indexHtml);
|
|
69
|
+
const indexHtmlToUpload = toUpload.filter((file) => file === indexHtml);
|
|
70
|
+
const upload = (filesToUpload) => {
|
|
71
|
+
var _a;
|
|
72
|
+
if (filesToUpload.length === 0) {
|
|
73
|
+
return Promise.resolve();
|
|
74
|
+
}
|
|
75
|
+
return fullClientSpecifics.uploadDir({
|
|
76
|
+
bucket: bucketName,
|
|
77
|
+
region,
|
|
78
|
+
localDir: bundleDir,
|
|
79
|
+
onProgress: (_a = options.onUploadProgress) !== null && _a !== void 0 ? _a : (() => undefined),
|
|
80
|
+
keyPrefix: subFolder,
|
|
81
|
+
privacy,
|
|
82
|
+
toUpload: filesToUpload,
|
|
83
|
+
forcePathStyle,
|
|
84
|
+
requestHandler,
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
await upload(assetsToUpload);
|
|
88
|
+
await upload(indexHtmlToUpload);
|
|
89
|
+
const limit = lambda_client_1.LambdaClientInternals.pLimit(deleteConcurrency);
|
|
90
|
+
await Promise.all(toDelete.map((d) => {
|
|
91
|
+
return limit(() => {
|
|
92
|
+
return providerSpecifics.deleteFile({
|
|
93
|
+
bucketName,
|
|
94
|
+
customCredentials: null,
|
|
95
|
+
key: d.Key,
|
|
96
|
+
region,
|
|
97
|
+
forcePathStyle,
|
|
98
|
+
requestHandler,
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
}));
|
|
102
|
+
return {
|
|
103
|
+
serveUrl: lambda_client_1.LambdaClientInternals.makeS3ServeUrl({
|
|
104
|
+
bucketName,
|
|
105
|
+
subFolder,
|
|
106
|
+
region,
|
|
107
|
+
}),
|
|
108
|
+
siteName,
|
|
109
|
+
stats: {
|
|
110
|
+
uploadedFiles: toUpload.length,
|
|
111
|
+
deletedFiles: toDelete.length,
|
|
112
|
+
untouchedFiles: existingCount,
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
exports.deploySiteWithBundle = deploySiteWithBundle;
|
package/dist/shared/get-etag.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.getEtagOfFile = void 0;
|
|
7
7
|
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
8
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
-
const
|
|
9
|
+
const multipart_upload_part_size_1 = require("./multipart-upload-part-size");
|
|
10
10
|
const md5 = (data) => node_crypto_1.default
|
|
11
11
|
.createHash('md5')
|
|
12
12
|
.update(data)
|
|
@@ -14,15 +14,15 @@ const md5 = (data) => node_crypto_1.default
|
|
|
14
14
|
const getEtagOfFile = (filePath, onProgress) => {
|
|
15
15
|
const calc = async () => {
|
|
16
16
|
const size = await node_fs_1.default.promises.stat(filePath).then((s) => s.size);
|
|
17
|
-
if (size <=
|
|
17
|
+
if (size <= multipart_upload_part_size_1.multipartUploadPartSize) {
|
|
18
18
|
const buffer = await node_fs_1.default.promises.readFile(filePath);
|
|
19
19
|
return `"${md5(buffer)}"`;
|
|
20
20
|
}
|
|
21
21
|
const stream = node_fs_1.default.createReadStream(filePath, {
|
|
22
|
-
highWaterMark:
|
|
22
|
+
highWaterMark: multipart_upload_part_size_1.multipartUploadPartSize,
|
|
23
23
|
});
|
|
24
24
|
const md5Chunks = [];
|
|
25
|
-
const chunksNumber = Math.ceil(size /
|
|
25
|
+
const chunksNumber = Math.ceil(size / multipart_upload_part_size_1.multipartUploadPartSize);
|
|
26
26
|
return new Promise((resolve, reject) => {
|
|
27
27
|
stream.on('data', (c) => {
|
|
28
28
|
md5Chunks.push(md5(c));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const multipartUploadPartSize: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateBundleDir: (bundleDir: unknown) => string;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validateBundleDir = void 0;
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const getPublicPath = (indexHtml) => {
|
|
10
|
+
const match = indexHtml.match(/window\.remotion_publicPath\s*=\s*("(?:[^"\\]|\\.)*")\s*;/);
|
|
11
|
+
if (!match) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
return JSON.parse(match[1]);
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
throw new Error('Could not parse `window.remotion_publicPath` in the bundle index.html.', { cause: error });
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const validateNoDirectorySymlinks = (directory, bundleDir) => {
|
|
22
|
+
for (const entry of node_fs_1.default.readdirSync(directory, { withFileTypes: true })) {
|
|
23
|
+
const entryPath = node_path_1.default.join(directory, entry.name);
|
|
24
|
+
if (entry.isSymbolicLink()) {
|
|
25
|
+
if (node_fs_1.default.statSync(entryPath).isDirectory()) {
|
|
26
|
+
throw new Error(`The bundle directory ${bundleDir} contains a symbolic link to a directory at ${node_path_1.default.relative(bundleDir, entryPath)}. Directory symbolic links are not supported by \`deploySiteFromBundle()\`.`);
|
|
27
|
+
}
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (entry.isDirectory()) {
|
|
31
|
+
validateNoDirectorySymlinks(entryPath, bundleDir);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const validateBundleDir = (bundleDir) => {
|
|
36
|
+
if (typeof bundleDir !== 'string') {
|
|
37
|
+
throw new TypeError(`The \`bundleDir\` must be a string, but received ${JSON.stringify(bundleDir)}.`);
|
|
38
|
+
}
|
|
39
|
+
const resolvedBundleDir = node_path_1.default.resolve(bundleDir);
|
|
40
|
+
if (!node_fs_1.default.existsSync(resolvedBundleDir)) {
|
|
41
|
+
throw new Error(`The bundle directory ${resolvedBundleDir} does not exist. Run \`npx remotion bundle\` or pass a valid \`bundleDir\`.`);
|
|
42
|
+
}
|
|
43
|
+
if (!node_fs_1.default.statSync(resolvedBundleDir).isDirectory()) {
|
|
44
|
+
throw new Error(`The bundle path ${resolvedBundleDir} is not a directory. Pass the directory returned by \`bundle()\` or created by \`npx remotion bundle\`.`);
|
|
45
|
+
}
|
|
46
|
+
const indexHtmlPath = node_path_1.default.join(resolvedBundleDir, 'index.html');
|
|
47
|
+
if (!node_fs_1.default.existsSync(indexHtmlPath) || !node_fs_1.default.statSync(indexHtmlPath).isFile()) {
|
|
48
|
+
throw new Error(`The bundle directory ${resolvedBundleDir} does not contain an index.html file at its root.`);
|
|
49
|
+
}
|
|
50
|
+
const bundleScriptPath = node_path_1.default.join(resolvedBundleDir, 'bundle.js');
|
|
51
|
+
if (!node_fs_1.default.existsSync(bundleScriptPath) ||
|
|
52
|
+
!node_fs_1.default.statSync(bundleScriptPath).isFile()) {
|
|
53
|
+
throw new Error(`The bundle directory ${resolvedBundleDir} does not contain a bundle.js file at its root.`);
|
|
54
|
+
}
|
|
55
|
+
const indexHtml = node_fs_1.default.readFileSync(indexHtmlPath, 'utf8');
|
|
56
|
+
const publicPath = getPublicPath(indexHtml);
|
|
57
|
+
if (publicPath !== './') {
|
|
58
|
+
throw new Error(`The bundle at ${resolvedBundleDir} is not relocatable. Rebuild it using Remotion v4.0.497 or newer.`);
|
|
59
|
+
}
|
|
60
|
+
validateNoDirectorySymlinks(resolvedBundleDir, resolvedBundleDir);
|
|
61
|
+
return resolvedBundleDir;
|
|
62
|
+
};
|
|
63
|
+
exports.validateBundleDir = validateBundleDir;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateSiteName = void 0;
|
|
4
|
+
const VALID_SITE_NAME_RE = /^[-0-9a-zA-Z!_.*'()]+$/;
|
|
4
5
|
const validateSiteName = (siteName) => {
|
|
5
6
|
if (typeof siteName === 'undefined') {
|
|
6
7
|
return;
|
|
7
8
|
}
|
|
8
9
|
if (typeof siteName !== 'string') {
|
|
9
|
-
throw new TypeError(`The '
|
|
10
|
+
throw new TypeError(`The 'siteName' argument must be a string if provided, but is ${JSON.stringify(siteName)}`);
|
|
10
11
|
}
|
|
11
|
-
if (
|
|
12
|
-
throw new Error(
|
|
12
|
+
if (siteName === '.' || siteName === '..') {
|
|
13
|
+
throw new Error('The `siteName` must not be `.` or `..`. You passed: ' + siteName + '.');
|
|
14
|
+
}
|
|
15
|
+
if (!VALID_SITE_NAME_RE.test(siteName)) {
|
|
16
|
+
throw new Error('The `siteName` must match the RegExp `/' +
|
|
17
|
+
VALID_SITE_NAME_RE.source +
|
|
18
|
+
'/`. You passed: ' +
|
|
13
19
|
siteName +
|
|
14
20
|
'. Check for invalid characters.');
|
|
15
21
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lambda",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.497",
|
|
7
7
|
"description": "Render Remotion videos on AWS Lambda",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -28,22 +28,22 @@
|
|
|
28
28
|
"@aws-sdk/client-cloudwatch-logs": "3.986.0",
|
|
29
29
|
"@aws-sdk/client-service-quotas": "3.986.0",
|
|
30
30
|
"@aws-sdk/lib-storage": "3.986.0",
|
|
31
|
-
"@remotion/bundler": "4.0.
|
|
32
|
-
"@remotion/cli": "4.0.
|
|
33
|
-
"@remotion/lambda-client": "4.0.
|
|
34
|
-
"@remotion/renderer": "4.0.
|
|
35
|
-
"@remotion/serverless": "4.0.
|
|
36
|
-
"@remotion/streaming": "4.0.
|
|
31
|
+
"@remotion/bundler": "4.0.497",
|
|
32
|
+
"@remotion/cli": "4.0.497",
|
|
33
|
+
"@remotion/lambda-client": "4.0.497",
|
|
34
|
+
"@remotion/renderer": "4.0.497",
|
|
35
|
+
"@remotion/serverless": "4.0.497",
|
|
36
|
+
"@remotion/streaming": "4.0.497",
|
|
37
37
|
"@smithy/abort-controller": "4.0.1",
|
|
38
|
-
"remotion": "4.0.
|
|
38
|
+
"remotion": "4.0.497",
|
|
39
39
|
"zod": "4.3.6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@remotion/bundler": "4.0.
|
|
42
|
+
"@remotion/bundler": "4.0.497",
|
|
43
43
|
"@types/express": "5.0.1",
|
|
44
44
|
"express": "4.21.0",
|
|
45
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.497",
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.497",
|
|
47
47
|
"mime-types": "2.1.34",
|
|
48
48
|
"@types/mime-types": "2.1.1",
|
|
49
49
|
"@types/minimist": "1.2.2",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@remotion/bundler": "4.0.
|
|
57
|
+
"@remotion/bundler": "4.0.497"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|