@remotion/cloudrun 4.1.0-alpha10
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/.turbo/turbo-build.log +13 -0
- package/LICENSE.md +41 -0
- package/dist/admin/bundle-installer.d.ts +1 -0
- package/dist/admin/bundle-installer.js +32 -0
- package/dist/admin/bundle-renderLogic.d.ts +1 -0
- package/dist/admin/bundle-renderLogic.js +39 -0
- package/dist/api/check-if-service-exists.d.ts +18 -0
- package/dist/api/check-if-service-exists.js +49 -0
- package/dist/api/create-bucket.d.ts +13 -0
- package/dist/api/create-bucket.js +18 -0
- package/dist/api/delete-service.d.ts +12 -0
- package/dist/api/delete-service.js +19 -0
- package/dist/api/delete-site.d.ts +13 -0
- package/dist/api/delete-site.js +30 -0
- package/dist/api/deploy-service.d.ts +28 -0
- package/dist/api/deploy-service.js +90 -0
- package/dist/api/deploy-site.d.ts +35 -0
- package/dist/api/deploy-site.js +78 -0
- package/dist/api/download-file.d.ts +13 -0
- package/dist/api/download-file.js +30 -0
- package/dist/api/get-buckets.d.ts +10 -0
- package/dist/api/get-buckets.js +23 -0
- package/dist/api/get-or-create-bucket.d.ts +17 -0
- package/dist/api/get-or-create-bucket.js +42 -0
- package/dist/api/get-regions.d.ts +7 -0
- package/dist/api/get-regions.js +13 -0
- package/dist/api/get-service-info.d.ts +23 -0
- package/dist/api/get-service-info.js +34 -0
- package/dist/api/get-services.d.ts +14 -0
- package/dist/api/get-services.js +49 -0
- package/dist/api/get-sites.d.ts +23 -0
- package/dist/api/get-sites.js +49 -0
- package/dist/api/helpers/IService.d.ts +2 -0
- package/dist/api/helpers/IService.js +2 -0
- package/dist/api/helpers/construct-service-deploy-request.d.ts +32 -0
- package/dist/api/helpers/construct-service-deploy-request.js +36 -0
- package/dist/api/helpers/extract-mem-from-url.d.ts +1 -0
- package/dist/api/helpers/extract-mem-from-url.js +9 -0
- package/dist/api/helpers/extract-time-from-url.d.ts +1 -0
- package/dist/api/helpers/extract-time-from-url.js +13 -0
- package/dist/api/helpers/get-auth-client-for-url.d.ts +1 -0
- package/dist/api/helpers/get-auth-client-for-url.js +15 -0
- package/dist/api/helpers/get-cloud-logging-client.d.ts +1 -0
- package/dist/api/helpers/get-cloud-logging-client.js +15 -0
- package/dist/api/helpers/get-cloud-run-client.d.ts +2 -0
- package/dist/api/helpers/get-cloud-run-client.js +15 -0
- package/dist/api/helpers/get-cloud-storage-client.d.ts +2 -0
- package/dist/api/helpers/get-cloud-storage-client.js +14 -0
- package/dist/api/helpers/get-cloudrun-endpoint.d.ts +14 -0
- package/dist/api/helpers/get-cloudrun-endpoint.js +36 -0
- package/dist/api/helpers/get-resource-manager-client.d.ts +2 -0
- package/dist/api/helpers/get-resource-manager-client.js +15 -0
- package/dist/api/helpers/parse-service-name.d.ts +8 -0
- package/dist/api/helpers/parse-service-name.js +24 -0
- package/dist/api/iam-validation/testPermissions.d.ts +20 -0
- package/dist/api/iam-validation/testPermissions.js +48 -0
- package/dist/api/render-media-on-cloudrun.d.ts +78 -0
- package/dist/api/render-media-on-cloudrun.js +144 -0
- package/dist/api/render-still-on-cloudrun.d.ts +49 -0
- package/dist/api/render-still-on-cloudrun.js +76 -0
- package/dist/api/speculate-service-name.d.ts +13 -0
- package/dist/api/speculate-service-name.js +20 -0
- package/dist/api/test/service-names.test.d.ts +1 -0
- package/dist/api/test/service-names.test.js +28 -0
- package/dist/api/upload-dir.d.ts +18 -0
- package/dist/api/upload-dir.js +81 -0
- package/dist/cli/args.d.ts +19 -0
- package/dist/cli/args.js +11 -0
- package/dist/cli/commands/permissions.d.ts +2 -0
- package/dist/cli/commands/permissions.js +23 -0
- package/dist/cli/commands/regions.d.ts +2 -0
- package/dist/cli/commands/regions.js +10 -0
- package/dist/cli/commands/render/helpers/renderArgsCheck.d.ts +9 -0
- package/dist/cli/commands/render/helpers/renderArgsCheck.js +75 -0
- package/dist/cli/commands/render/index.d.ts +2 -0
- package/dist/cli/commands/render/index.js +228 -0
- package/dist/cli/commands/services/deploy.d.ts +2 -0
- package/dist/cli/commands/services/deploy.js +129 -0
- package/dist/cli/commands/services/index.d.ts +5 -0
- package/dist/cli/commands/services/index.js +64 -0
- package/dist/cli/commands/services/ls.d.ts +2 -0
- package/dist/cli/commands/services/ls.js +40 -0
- package/dist/cli/commands/services/rm.d.ts +2 -0
- package/dist/cli/commands/services/rm.js +63 -0
- package/dist/cli/commands/services/rmall.d.ts +2 -0
- package/dist/cli/commands/services/rmall.js +52 -0
- package/dist/cli/commands/sites/create.d.ts +2 -0
- package/dist/cli/commands/sites/create.js +138 -0
- package/dist/cli/commands/sites/index.d.ts +4 -0
- package/dist/cli/commands/sites/index.js +60 -0
- package/dist/cli/commands/sites/ls.d.ts +2 -0
- package/dist/cli/commands/sites/ls.js +40 -0
- package/dist/cli/commands/sites/rm.d.ts +2 -0
- package/dist/cli/commands/sites/rm.js +59 -0
- package/dist/cli/commands/sites/rmall.d.ts +2 -0
- package/dist/cli/commands/sites/rmall.js +38 -0
- package/dist/cli/commands/still.d.ts +2 -0
- package/dist/cli/commands/still.js +129 -0
- package/dist/cli/get-gcp-region.d.ts +2 -0
- package/dist/cli/get-gcp-region.js +19 -0
- package/dist/cli/help.d.ts +1 -0
- package/dist/cli/help.js +38 -0
- package/dist/cli/helpers/confirm.d.ts +4 -0
- package/dist/cli/helpers/confirm.js +12 -0
- package/dist/cli/helpers/date-string.d.ts +1 -0
- package/dist/cli/helpers/date-string.js +9 -0
- package/dist/cli/helpers/progress-bar.d.ts +23 -0
- package/dist/cli/helpers/progress-bar.js +81 -0
- package/dist/cli/helpers/quit.d.ts +1 -0
- package/dist/cli/helpers/quit.js +7 -0
- package/dist/cli/helpers/yes-or-no.d.ts +4 -0
- package/dist/cli/helpers/yes-or-no.js +44 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +56 -0
- package/dist/cli/log.d.ts +26 -0
- package/dist/cli/log.js +5 -0
- package/dist/defaults.d.ts +1 -0
- package/dist/defaults.js +17 -0
- package/dist/functions/helpers/get-composition-from-body.d.ts +2 -0
- package/dist/functions/helpers/get-composition-from-body.js +27 -0
- package/dist/functions/helpers/io.d.ts +11 -0
- package/dist/functions/helpers/io.js +17 -0
- package/dist/functions/helpers/payloads.d.ts +300 -0
- package/dist/functions/helpers/payloads.js +104 -0
- package/dist/functions/index.d.ts +3 -0
- package/dist/functions/index.js +39 -0
- package/dist/functions/render-media-single-thread.d.ts +3 -0
- package/dist/functions/render-media-single-thread.js +103 -0
- package/dist/functions/render-still-single-thread.d.ts +3 -0
- package/dist/functions/render-still-single-thread.js +82 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +31 -0
- package/dist/internals.d.ts +3 -0
- package/dist/internals.js +7 -0
- package/dist/pricing/gcp-regions.d.ts +5 -0
- package/dist/pricing/gcp-regions.js +77 -0
- package/dist/regions.d.ts +2 -0
- package/dist/regions.js +5 -0
- package/dist/shared/bundle-site.d.ts +2 -0
- package/dist/shared/bundle-site.js +5 -0
- package/dist/shared/constants.d.ts +13 -0
- package/dist/shared/constants.js +18 -0
- package/dist/shared/convert-to-serve-url.d.ts +4 -0
- package/dist/shared/convert-to-serve-url.js +14 -0
- package/dist/shared/docs-url.d.ts +1 -0
- package/dist/shared/docs-url.js +4 -0
- package/dist/shared/generate-service-name.d.ts +5 -0
- package/dist/shared/generate-service-name.js +20 -0
- package/dist/shared/get-etag.d.ts +1 -0
- package/dist/shared/get-etag.js +24 -0
- package/dist/shared/get-storage-operations.d.ts +10 -0
- package/dist/shared/get-storage-operations.js +36 -0
- package/dist/shared/make-storage-key.d.ts +1 -0
- package/dist/shared/make-storage-key.js +11 -0
- package/dist/shared/make-storage-url.d.ts +4 -0
- package/dist/shared/make-storage-url.js +7 -0
- package/dist/shared/random-hash.d.ts +3 -0
- package/dist/shared/random-hash.js +14 -0
- package/dist/shared/read-dir.d.ts +9 -0
- package/dist/shared/read-dir.js +57 -0
- package/dist/shared/sa-permissions.json +64 -0
- package/dist/shared/service-version-string.d.ts +1 -0
- package/dist/shared/service-version-string.js +8 -0
- package/dist/shared/validate-bucketname.d.ts +8 -0
- package/dist/shared/validate-bucketname.js +35 -0
- package/dist/shared/validate-cloudrun-url.d.ts +1 -0
- package/dist/shared/validate-cloudrun-url.js +10 -0
- package/dist/shared/validate-gcp-codec.d.ts +4 -0
- package/dist/shared/validate-gcp-codec.js +29 -0
- package/dist/shared/validate-gcp-region.d.ts +2 -0
- package/dist/shared/validate-gcp-region.js +10 -0
- package/dist/shared/validate-image-remotion-version.d.ts +1 -0
- package/dist/shared/validate-image-remotion-version.js +26 -0
- package/dist/shared/validate-privacy.d.ts +2 -0
- package/dist/shared/validate-privacy.js +12 -0
- package/dist/shared/validate-project-id.d.ts +1 -0
- package/dist/shared/validate-project-id.js +17 -0
- package/dist/shared/validate-region.d.ts +1 -0
- package/dist/shared/validate-region.js +15 -0
- package/dist/shared/validate-retries.d.ts +1 -0
- package/dist/shared/validate-retries.js +21 -0
- package/dist/shared/validate-serveurl.d.ts +1 -0
- package/dist/shared/validate-serveurl.js +30 -0
- package/dist/shared/validate-service-name.d.ts +1 -0
- package/dist/shared/validate-service-name.js +9 -0
- package/dist/shared/validate-site-name.d.ts +1 -0
- package/dist/shared/validate-site-name.js +17 -0
- package/package.json +57 -0
- package/readme.md +3 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.servicesRmallCommand = exports.SERVICES_RMALL_SUBCOMMAND = void 0;
|
|
4
|
+
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const delete_service_1 = require("../../../api/delete-service");
|
|
6
|
+
const get_services_1 = require("../../../api/get-services");
|
|
7
|
+
const get_gcp_region_1 = require("../../get-gcp-region");
|
|
8
|
+
const confirm_1 = require("../../helpers/confirm");
|
|
9
|
+
const log_1 = require("../../log");
|
|
10
|
+
const index_1 = require("./index");
|
|
11
|
+
exports.SERVICES_RMALL_SUBCOMMAND = 'rmall';
|
|
12
|
+
const servicesRmallCommand = async () => {
|
|
13
|
+
const region = (0, get_gcp_region_1.getGcpRegion)();
|
|
14
|
+
const fetchingOutput = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
15
|
+
quiet: cli_1.CliInternals.quietFlagProvided(),
|
|
16
|
+
cancelSignal: null,
|
|
17
|
+
updatesDontOverwrite: false,
|
|
18
|
+
indent: false,
|
|
19
|
+
});
|
|
20
|
+
fetchingOutput.update(`Getting services in ${region}...`, false);
|
|
21
|
+
const services = await (0, get_services_1.getServices)({
|
|
22
|
+
region,
|
|
23
|
+
compatibleOnly: false,
|
|
24
|
+
});
|
|
25
|
+
const pluralized = services.length === 1 ? 'service' : 'services';
|
|
26
|
+
fetchingOutput.update(`${services.length} ${pluralized} in ${region}`, false);
|
|
27
|
+
log_1.Log.info();
|
|
28
|
+
log_1.Log.info();
|
|
29
|
+
for (const serv of services) {
|
|
30
|
+
log_1.Log.info((0, index_1.displayServiceInfo)(serv));
|
|
31
|
+
log_1.Log.info();
|
|
32
|
+
const confirmDelete = await (0, confirm_1.confirmCli)({
|
|
33
|
+
delMessage: 'Delete? (Y/n)',
|
|
34
|
+
allowForceFlag: true,
|
|
35
|
+
});
|
|
36
|
+
if (!confirmDelete) {
|
|
37
|
+
log_1.Log.info(`Skipping service - ${serv.serviceName}.`);
|
|
38
|
+
log_1.Log.info();
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const output = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
42
|
+
quiet: cli_1.CliInternals.quietFlagProvided(),
|
|
43
|
+
cancelSignal: null,
|
|
44
|
+
updatesDontOverwrite: false,
|
|
45
|
+
indent: false,
|
|
46
|
+
});
|
|
47
|
+
output.update('Deleting...', false);
|
|
48
|
+
await (0, delete_service_1.deleteService)({ region: serv.region, serviceName: serv.serviceName });
|
|
49
|
+
output.update('Deleted!\n', false);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.servicesRmallCommand = servicesRmallCommand;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sitesCreateSubcommand = exports.SITES_CREATE_SUBCOMMAND = void 0;
|
|
4
|
+
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const config_1 = require("@remotion/cli/config");
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const remotion_1 = require("remotion");
|
|
8
|
+
const _1 = require(".");
|
|
9
|
+
const deploy_site_1 = require("../../../api/deploy-site");
|
|
10
|
+
const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
|
|
11
|
+
const constants_1 = require("../../../shared/constants");
|
|
12
|
+
const validate_site_name_1 = require("../../../shared/validate-site-name");
|
|
13
|
+
const args_1 = require("../../args");
|
|
14
|
+
const get_gcp_region_1 = require("../../get-gcp-region");
|
|
15
|
+
const progress_bar_1 = require("../../helpers/progress-bar");
|
|
16
|
+
const quit_1 = require("../../helpers/quit");
|
|
17
|
+
const log_1 = require("../../log");
|
|
18
|
+
exports.SITES_CREATE_SUBCOMMAND = 'create';
|
|
19
|
+
const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const { file, reason } = cli_1.CliInternals.findEntryPoint(args, remotionRoot);
|
|
22
|
+
if (!file) {
|
|
23
|
+
log_1.Log.error('No entry file passed.');
|
|
24
|
+
log_1.Log.info('Pass an additional argument specifying the entry file of your Remotion project:');
|
|
25
|
+
log_1.Log.info();
|
|
26
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} deploy <entry-file.ts>`);
|
|
27
|
+
(0, quit_1.quit)(1);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
log_1.Log.verbose('Entry point:', file, 'Reason:', reason);
|
|
31
|
+
if (!(0, fs_1.existsSync)(file)) {
|
|
32
|
+
log_1.Log.error(`No file exists at ${file}. Make sure the path exists and try again.`);
|
|
33
|
+
(0, quit_1.quit)(1);
|
|
34
|
+
}
|
|
35
|
+
if ((0, fs_1.lstatSync)(file).isDirectory()) {
|
|
36
|
+
log_1.Log.error(`You passed a path ${file} but it is a directory. Pass a file instead.`);
|
|
37
|
+
(0, quit_1.quit)(1);
|
|
38
|
+
}
|
|
39
|
+
const desiredSiteName = (_a = args_1.parsedCloudrunCli['site-name']) !== null && _a !== void 0 ? _a : undefined;
|
|
40
|
+
if (desiredSiteName !== undefined) {
|
|
41
|
+
(0, validate_site_name_1.validateSiteName)(desiredSiteName);
|
|
42
|
+
}
|
|
43
|
+
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
44
|
+
quiet: cli_1.CliInternals.quietFlagProvided(),
|
|
45
|
+
cancelSignal: null,
|
|
46
|
+
updatesDontOverwrite: false,
|
|
47
|
+
indent: false,
|
|
48
|
+
});
|
|
49
|
+
const multiProgress = {
|
|
50
|
+
bundleProgress: {
|
|
51
|
+
doneIn: null,
|
|
52
|
+
progress: 0,
|
|
53
|
+
},
|
|
54
|
+
bucketProgress: {
|
|
55
|
+
doneIn: null,
|
|
56
|
+
creationState: 'Checking for existing bucket',
|
|
57
|
+
},
|
|
58
|
+
deployProgress: {
|
|
59
|
+
doneIn: null,
|
|
60
|
+
totalSize: null,
|
|
61
|
+
sizeUploaded: 0,
|
|
62
|
+
stats: null,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
const updateProgress = () => {
|
|
66
|
+
progressBar.update([
|
|
67
|
+
(0, progress_bar_1.makeBundleProgress)(multiProgress.bundleProgress),
|
|
68
|
+
(0, progress_bar_1.makeBucketProgress)(multiProgress.bucketProgress),
|
|
69
|
+
(0, progress_bar_1.makeDeployProgressBar)(multiProgress.deployProgress),
|
|
70
|
+
].join('\n'), false);
|
|
71
|
+
};
|
|
72
|
+
const bucketStart = Date.now();
|
|
73
|
+
const region = (0, get_gcp_region_1.getGcpRegion)();
|
|
74
|
+
const { bucketName } = await (0, get_or_create_bucket_1.getOrCreateBucket)({
|
|
75
|
+
region,
|
|
76
|
+
updateBucketState: (state) => {
|
|
77
|
+
multiProgress.bucketProgress.creationState = state;
|
|
78
|
+
updateProgress();
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
multiProgress.bucketProgress.doneIn = Date.now() - bucketStart;
|
|
82
|
+
updateProgress();
|
|
83
|
+
const bundleStart = Date.now();
|
|
84
|
+
const { serveUrl, siteName, stats } = await (0, deploy_site_1.deploySite)({
|
|
85
|
+
entryPoint: file,
|
|
86
|
+
siteName: desiredSiteName,
|
|
87
|
+
bucketName,
|
|
88
|
+
options: {
|
|
89
|
+
onBundleProgress: (progress) => {
|
|
90
|
+
multiProgress.bundleProgress = {
|
|
91
|
+
progress,
|
|
92
|
+
doneIn: progress === 100 ? Date.now() - bundleStart : null,
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
onUploadProgress: (p) => {
|
|
96
|
+
multiProgress.deployProgress = {
|
|
97
|
+
sizeUploaded: p.sizeUploaded,
|
|
98
|
+
totalSize: p.totalSize,
|
|
99
|
+
doneIn: null,
|
|
100
|
+
stats: null,
|
|
101
|
+
};
|
|
102
|
+
updateProgress();
|
|
103
|
+
},
|
|
104
|
+
enableCaching: config_1.ConfigInternals.getWebpackCaching(),
|
|
105
|
+
webpackOverride: (_b = config_1.ConfigInternals.getWebpackOverrideFn()) !== null && _b !== void 0 ? _b : ((f) => f),
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
updateProgress();
|
|
109
|
+
const uploadStart = Date.now();
|
|
110
|
+
const uploadDuration = Date.now() - uploadStart;
|
|
111
|
+
multiProgress.deployProgress = {
|
|
112
|
+
sizeUploaded: 1,
|
|
113
|
+
totalSize: 1,
|
|
114
|
+
doneIn: uploadDuration,
|
|
115
|
+
stats: {
|
|
116
|
+
addedFiles: stats.uploadedFiles,
|
|
117
|
+
removedFiles: stats.deletedFiles,
|
|
118
|
+
untouchedFiles: stats.untouchedFiles,
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
updateProgress();
|
|
122
|
+
log_1.Log.info();
|
|
123
|
+
log_1.Log.info();
|
|
124
|
+
log_1.Log.info('Deployed to GCP Storage!');
|
|
125
|
+
log_1.Log.info();
|
|
126
|
+
log_1.Log.info((0, _1.displaySiteInfo)({
|
|
127
|
+
bucketName,
|
|
128
|
+
id: siteName,
|
|
129
|
+
serveUrl,
|
|
130
|
+
bucketRegion: region,
|
|
131
|
+
}));
|
|
132
|
+
log_1.Log.info();
|
|
133
|
+
log_1.Log.info(cli_1.CliInternals.chalk.blueBright('ℹ️ If you make changes to your code, you need to redeploy the site. You can overwrite the existing site by running:'));
|
|
134
|
+
log_1.Log.info(cli_1.CliInternals.chalk.blueBright(['npx remotion cloudrun sites create', args[0], `--site-name=${siteName}`]
|
|
135
|
+
.filter(remotion_1.Internals.truthy)
|
|
136
|
+
.join(' ')));
|
|
137
|
+
};
|
|
138
|
+
exports.sitesCreateSubcommand = sitesCreateSubcommand;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sitesCommand = exports.displaySiteInfo = exports.SITES_COMMAND = void 0;
|
|
4
|
+
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const constants_1 = require("../../../shared/constants");
|
|
6
|
+
const quit_1 = require("../../helpers/quit");
|
|
7
|
+
const log_1 = require("../../log");
|
|
8
|
+
const create_1 = require("./create");
|
|
9
|
+
const ls_1 = require("./ls");
|
|
10
|
+
const rm_1 = require("./rm");
|
|
11
|
+
const rmall_1 = require("./rmall");
|
|
12
|
+
exports.SITES_COMMAND = 'sites';
|
|
13
|
+
const displaySiteInfo = (site) => {
|
|
14
|
+
const LEFT_COL = 16;
|
|
15
|
+
return [
|
|
16
|
+
'Site: '.padEnd(LEFT_COL, ' ') + ' ' + site.id,
|
|
17
|
+
'Bucket: '.padEnd(LEFT_COL, ' ') + ' ' + site.bucketName,
|
|
18
|
+
'Region: '.padEnd(LEFT_COL, ' ') + ' ' + site.bucketRegion,
|
|
19
|
+
'Serve Url: '.padEnd(LEFT_COL, ' ') + ' ' + site.serveUrl,
|
|
20
|
+
].join('\n');
|
|
21
|
+
};
|
|
22
|
+
exports.displaySiteInfo = displaySiteInfo;
|
|
23
|
+
const printSitesHelp = () => {
|
|
24
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} <subcommand>`);
|
|
25
|
+
log_1.Log.info();
|
|
26
|
+
log_1.Log.info('Available subcommands:');
|
|
27
|
+
log_1.Log.info('');
|
|
28
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${create_1.SITES_CREATE_SUBCOMMAND}`);
|
|
29
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray('Creates a new site based on a Remotion project'));
|
|
30
|
+
cli_1.CliInternals.Log.info();
|
|
31
|
+
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${ls_1.SITES_LS_SUBCOMMAND}`);
|
|
32
|
+
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Lists the sites currently deployed'));
|
|
33
|
+
cli_1.CliInternals.Log.info();
|
|
34
|
+
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rm_1.SITES_RM_COMMAND} <site-id>`);
|
|
35
|
+
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Remove a site from the Cloud Storage bucket.'));
|
|
36
|
+
cli_1.CliInternals.Log.info();
|
|
37
|
+
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rmall_1.SITES_RMALL_COMMAND}`);
|
|
38
|
+
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Remove all sites from the Cloud Storage bucket.'));
|
|
39
|
+
};
|
|
40
|
+
const sitesCommand = (args, remotionRoot) => {
|
|
41
|
+
if (args[0] === ls_1.SITES_LS_SUBCOMMAND) {
|
|
42
|
+
return (0, ls_1.sitesLsSubcommand)();
|
|
43
|
+
}
|
|
44
|
+
if (args[0] === rm_1.SITES_RM_COMMAND) {
|
|
45
|
+
return (0, rm_1.sitesRmSubcommand)(args.slice(1));
|
|
46
|
+
}
|
|
47
|
+
if (args[0] === rmall_1.SITES_RMALL_COMMAND) {
|
|
48
|
+
return (0, rmall_1.sitesRmallSubcommand)();
|
|
49
|
+
}
|
|
50
|
+
if (args[0] === create_1.SITES_CREATE_SUBCOMMAND) {
|
|
51
|
+
return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot);
|
|
52
|
+
}
|
|
53
|
+
if (args[0]) {
|
|
54
|
+
log_1.Log.error(`Subcommand ${args[0]} not found.`);
|
|
55
|
+
printSitesHelp();
|
|
56
|
+
(0, quit_1.quit)(1);
|
|
57
|
+
}
|
|
58
|
+
printSitesHelp();
|
|
59
|
+
};
|
|
60
|
+
exports.sitesCommand = sitesCommand;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sitesLsSubcommand = exports.SITES_LS_SUBCOMMAND = void 0;
|
|
4
|
+
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
const get_sites_1 = require("../../../api/get-sites");
|
|
7
|
+
const args_1 = require("../../args");
|
|
8
|
+
const get_gcp_region_1 = require("../../get-gcp-region");
|
|
9
|
+
const log_1 = require("../../log");
|
|
10
|
+
exports.SITES_LS_SUBCOMMAND = 'ls';
|
|
11
|
+
const sitesLsSubcommand = async () => {
|
|
12
|
+
// check if --allRegions flag is provided
|
|
13
|
+
// if so, list all sites
|
|
14
|
+
// else, list only the sites that are in the current project
|
|
15
|
+
const allRegions = args_1.parsedCloudrunCli['all-regions'];
|
|
16
|
+
const region = allRegions ? 'all regions' : (0, get_gcp_region_1.getGcpRegion)();
|
|
17
|
+
const { sites, buckets } = await (0, get_sites_1.getSites)(region);
|
|
18
|
+
if (buckets.length > 1 && !cli_1.CliInternals.quietFlagProvided() && !allRegions) {
|
|
19
|
+
log_1.Log.warn(`Warning: You have more than one Remotion Cloud Storage bucket in ${region}, but only one is needed. This can lead to conflicts. Remove all but one of them.`);
|
|
20
|
+
}
|
|
21
|
+
const sitesPluralized = sites.length === 1 ? 'site' : 'sites';
|
|
22
|
+
if (!cli_1.CliInternals.quietFlagProvided()) {
|
|
23
|
+
log_1.Log.info(`${sites.length} ${sitesPluralized} in ${region}, in the ${process.env.REMOTION_GCP_PROJECT_ID} project.`);
|
|
24
|
+
}
|
|
25
|
+
if (cli_1.CliInternals.quietFlagProvided()) {
|
|
26
|
+
if (sites.length === 0) {
|
|
27
|
+
log_1.Log.info('()');
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
return log_1.Log.info(sites.map((s) => s.id).join(' '));
|
|
31
|
+
}
|
|
32
|
+
if (sites.length > 0) {
|
|
33
|
+
log_1.Log.info();
|
|
34
|
+
for (const site of sites) {
|
|
35
|
+
log_1.Log.info((0, _1.displaySiteInfo)(site));
|
|
36
|
+
log_1.Log.info();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.sitesLsSubcommand = sitesLsSubcommand;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sitesRmSubcommand = exports.SITES_RM_COMMAND = void 0;
|
|
4
|
+
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
const delete_site_1 = require("../../../api/delete-site");
|
|
7
|
+
const get_sites_1 = require("../../../api/get-sites");
|
|
8
|
+
const constants_1 = require("../../../shared/constants");
|
|
9
|
+
const get_gcp_region_1 = require("../../get-gcp-region");
|
|
10
|
+
const confirm_1 = require("../../helpers/confirm");
|
|
11
|
+
const quit_1 = require("../../helpers/quit");
|
|
12
|
+
const log_1 = require("../../log");
|
|
13
|
+
const ls_1 = require("./ls");
|
|
14
|
+
exports.SITES_RM_COMMAND = 'rm';
|
|
15
|
+
const sitesRmSubcommand = async (args) => {
|
|
16
|
+
if (args.length === 0) {
|
|
17
|
+
log_1.Log.error('No site name was passed. Run the command again and pass another argument <site-name>.');
|
|
18
|
+
log_1.Log.error(`To get a list of sites, run \`${constants_1.BINARY_NAME} ${_1.SITES_COMMAND} ${ls_1.SITES_LS_SUBCOMMAND}\``);
|
|
19
|
+
(0, quit_1.quit)(1);
|
|
20
|
+
}
|
|
21
|
+
if (args[0] === '()') {
|
|
22
|
+
log_1.Log.info('No sites to remove.');
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const region = (0, get_gcp_region_1.getGcpRegion)();
|
|
26
|
+
const infoOutput = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
27
|
+
quiet: cli_1.CliInternals.quietFlagProvided(),
|
|
28
|
+
cancelSignal: null,
|
|
29
|
+
updatesDontOverwrite: false,
|
|
30
|
+
indent: false,
|
|
31
|
+
});
|
|
32
|
+
infoOutput.update(`Checking ${region} for sites...`, false);
|
|
33
|
+
const deployedSites = await (0, get_sites_1.getSites)(region);
|
|
34
|
+
for (const siteName of args) {
|
|
35
|
+
infoOutput.update('Getting site info...', false);
|
|
36
|
+
const site = deployedSites.sites.find((s) => s.id === siteName.trim());
|
|
37
|
+
if (!site) {
|
|
38
|
+
infoOutput.update('', false);
|
|
39
|
+
throw new Error(`${siteName.trim()} was not found in ${region}.`);
|
|
40
|
+
}
|
|
41
|
+
infoOutput.update((0, _1.displaySiteInfo)(site), false);
|
|
42
|
+
log_1.Log.info();
|
|
43
|
+
log_1.Log.info();
|
|
44
|
+
const confirmDelete = await (0, confirm_1.confirmCli)({
|
|
45
|
+
delMessage: 'Delete? (Y/n)',
|
|
46
|
+
allowForceFlag: true,
|
|
47
|
+
});
|
|
48
|
+
if (!confirmDelete) {
|
|
49
|
+
log_1.Log.info('Aborting.');
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
await (0, delete_site_1.deleteSite)({
|
|
53
|
+
bucketName: site.bucketName,
|
|
54
|
+
siteName,
|
|
55
|
+
});
|
|
56
|
+
log_1.Log.info(`Deleted site ${siteName} from bucket ${site.bucketName}.`);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.sitesRmSubcommand = sitesRmSubcommand;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sitesRmallSubcommand = exports.SITES_RMALL_COMMAND = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const delete_site_1 = require("../../../api/delete-site");
|
|
6
|
+
const get_sites_1 = require("../../../api/get-sites");
|
|
7
|
+
const args_1 = require("../../args");
|
|
8
|
+
const get_gcp_region_1 = require("../../get-gcp-region");
|
|
9
|
+
const confirm_1 = require("../../helpers/confirm");
|
|
10
|
+
const log_1 = require("../../log");
|
|
11
|
+
exports.SITES_RMALL_COMMAND = 'rmall';
|
|
12
|
+
const sitesRmallSubcommand = async () => {
|
|
13
|
+
const allRegions = args_1.parsedCloudrunCli['all-regions'];
|
|
14
|
+
const region = allRegions ? 'all regions' : (0, get_gcp_region_1.getGcpRegion)();
|
|
15
|
+
log_1.Log.info(`Retrieving sites in ${region}.`);
|
|
16
|
+
const deployedSites = await (0, get_sites_1.getSites)(region);
|
|
17
|
+
for (const site of deployedSites.sites) {
|
|
18
|
+
log_1.Log.info();
|
|
19
|
+
log_1.Log.info((0, _1.displaySiteInfo)(site));
|
|
20
|
+
log_1.Log.info();
|
|
21
|
+
const confirmDelete = await (0, confirm_1.confirmCli)({
|
|
22
|
+
delMessage: 'Delete? (Y/n)',
|
|
23
|
+
allowForceFlag: true,
|
|
24
|
+
});
|
|
25
|
+
if (!confirmDelete) {
|
|
26
|
+
log_1.Log.info(`Skipping site - ${site.id}.`);
|
|
27
|
+
log_1.Log.info();
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
await (0, delete_site_1.deleteSite)({
|
|
31
|
+
bucketName: site.bucketName,
|
|
32
|
+
siteName: site.id,
|
|
33
|
+
});
|
|
34
|
+
log_1.Log.info(`Deleted site ${site.id} from bucket ${site.bucketName}.`);
|
|
35
|
+
log_1.Log.info();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.sitesRmallSubcommand = sitesRmallSubcommand;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stillCommand = exports.STILL_COMMAND = void 0;
|
|
4
|
+
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const config_1 = require("@remotion/cli/config");
|
|
6
|
+
const renderer_1 = require("@remotion/renderer");
|
|
7
|
+
const remotion_1 = require("remotion");
|
|
8
|
+
const download_file_1 = require("../../api/download-file");
|
|
9
|
+
const render_still_on_cloudrun_1 = require("../../api/render-still-on-cloudrun");
|
|
10
|
+
const validate_serveurl_1 = require("../../shared/validate-serveurl");
|
|
11
|
+
const log_1 = require("../log");
|
|
12
|
+
const renderArgsCheck_1 = require("./render/helpers/renderArgsCheck");
|
|
13
|
+
exports.STILL_COMMAND = 'still';
|
|
14
|
+
const stillCommand = async (args, remotionRoot) => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const { serveUrl, cloudRunUrl, outName, forceBucketName, privacy, downloadName, region, } = await (0, renderArgsCheck_1.renderArgsCheck)(exports.STILL_COMMAND, args);
|
|
17
|
+
const { chromiumOptions, envVariables, inputProps, puppeteerTimeout, jpegQuality, stillFrame, scale, height, width, browserExecutable, port, logLevel, } = await cli_1.CliInternals.getCliOptions({
|
|
18
|
+
type: 'still',
|
|
19
|
+
isLambda: true,
|
|
20
|
+
remotionRoot,
|
|
21
|
+
});
|
|
22
|
+
let composition = args[1];
|
|
23
|
+
if (!composition) {
|
|
24
|
+
log_1.Log.info('No compositions passed. Fetching compositions...');
|
|
25
|
+
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
26
|
+
const server = renderer_1.RenderInternals.prepareServer({
|
|
27
|
+
concurrency: 1,
|
|
28
|
+
indent: false,
|
|
29
|
+
port,
|
|
30
|
+
remotionRoot,
|
|
31
|
+
logLevel,
|
|
32
|
+
webpackConfigOrServeUrl: serveUrl,
|
|
33
|
+
});
|
|
34
|
+
const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
|
|
35
|
+
args,
|
|
36
|
+
compositionIdFromUi: null,
|
|
37
|
+
indent: false,
|
|
38
|
+
serveUrlOrWebpackUrl: serveUrl,
|
|
39
|
+
logLevel,
|
|
40
|
+
browserExecutable,
|
|
41
|
+
chromiumOptions,
|
|
42
|
+
envVariables,
|
|
43
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
44
|
+
data: inputProps,
|
|
45
|
+
indent: undefined,
|
|
46
|
+
staticBase: null,
|
|
47
|
+
}).serializedString,
|
|
48
|
+
port,
|
|
49
|
+
puppeteerInstance: undefined,
|
|
50
|
+
timeoutInMilliseconds: puppeteerTimeout,
|
|
51
|
+
height,
|
|
52
|
+
width,
|
|
53
|
+
server: await server,
|
|
54
|
+
});
|
|
55
|
+
composition = compositionId;
|
|
56
|
+
}
|
|
57
|
+
const { format: imageFormat, source: imageFormatReason } = cli_1.CliInternals.determineFinalStillImageFormat({
|
|
58
|
+
downloadName,
|
|
59
|
+
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
60
|
+
cliFlag: (_a = cli_1.CliInternals.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
|
|
61
|
+
isLambda: true,
|
|
62
|
+
fromUi: null,
|
|
63
|
+
configImageFormat: (_b = config_1.ConfigInternals.getUserPreferredStillImageFormat()) !== null && _b !== void 0 ? _b : null,
|
|
64
|
+
});
|
|
65
|
+
log_1.Log.verbose(`Image format: (${imageFormat}), ${imageFormatReason}`);
|
|
66
|
+
// Todo: Check cloudRunUrl is valid, as the error message is obtuse
|
|
67
|
+
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray(`
|
|
68
|
+
Cloud Run Service URL = ${cloudRunUrl}
|
|
69
|
+
Region = ${region}
|
|
70
|
+
Type = still
|
|
71
|
+
Composition = ${composition}
|
|
72
|
+
Output Bucket = ${forceBucketName}
|
|
73
|
+
Output File = ${outName !== null && outName !== void 0 ? outName : 'out.png'}
|
|
74
|
+
Output File Privacy = ${privacy}
|
|
75
|
+
${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
76
|
+
`.trim()));
|
|
77
|
+
log_1.Log.info();
|
|
78
|
+
const renderStart = Date.now();
|
|
79
|
+
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
80
|
+
quiet: cli_1.CliInternals.quietFlagProvided(),
|
|
81
|
+
cancelSignal: null,
|
|
82
|
+
updatesDontOverwrite: false,
|
|
83
|
+
indent: false,
|
|
84
|
+
});
|
|
85
|
+
let doneIn = null;
|
|
86
|
+
const updateProgress = (newline) => {
|
|
87
|
+
progressBar.update([
|
|
88
|
+
`Rendering on Cloud Run:`,
|
|
89
|
+
`${doneIn === null ? '...' : `Rendered in ${doneIn}ms`}`,
|
|
90
|
+
].join(' '), newline);
|
|
91
|
+
};
|
|
92
|
+
const res = await (0, render_still_on_cloudrun_1.renderStillOnCloudrun)({
|
|
93
|
+
cloudRunUrl,
|
|
94
|
+
serveUrl,
|
|
95
|
+
region,
|
|
96
|
+
inputProps,
|
|
97
|
+
imageFormat,
|
|
98
|
+
composition,
|
|
99
|
+
privacy,
|
|
100
|
+
envVariables,
|
|
101
|
+
frame: stillFrame,
|
|
102
|
+
jpegQuality,
|
|
103
|
+
chromiumOptions,
|
|
104
|
+
scale,
|
|
105
|
+
forceHeight: height,
|
|
106
|
+
forceWidth: width,
|
|
107
|
+
forceBucketName,
|
|
108
|
+
outName,
|
|
109
|
+
logLevel: config_1.ConfigInternals.Logging.getLogLevel(),
|
|
110
|
+
delayRenderTimeoutInMilliseconds: puppeteerTimeout,
|
|
111
|
+
});
|
|
112
|
+
doneIn = Date.now() - renderStart;
|
|
113
|
+
updateProgress(true);
|
|
114
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray(`Cloud Storage Uri = ${res.cloudStorageUri}`));
|
|
115
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray(`Render ID = ${res.renderId}`));
|
|
116
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray(`${Math.round(Number(res.size) / 1000)} KB, Privacy: ${res.privacy}, Bucket: ${res.bucketName}`));
|
|
117
|
+
log_1.Log.info(cli_1.CliInternals.chalk.blue(`○ ${res.publicUrl}`));
|
|
118
|
+
if (downloadName) {
|
|
119
|
+
log_1.Log.info('');
|
|
120
|
+
log_1.Log.info('downloading file...');
|
|
121
|
+
const destination = await (0, download_file_1.downloadFile)({
|
|
122
|
+
bucketName: res.bucketName,
|
|
123
|
+
gsutilURI: res.cloudStorageUri,
|
|
124
|
+
downloadName,
|
|
125
|
+
});
|
|
126
|
+
log_1.Log.info(cli_1.CliInternals.chalk.blueBright(`Downloaded file to ${destination}!`));
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.stillCommand = stillCommand;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGcpRegion = void 0;
|
|
4
|
+
const constants_1 = require("../shared/constants");
|
|
5
|
+
const validate_gcp_region_1 = require("../shared/validate-gcp-region");
|
|
6
|
+
const args_1 = require("./args");
|
|
7
|
+
const getGcpRegion = () => {
|
|
8
|
+
if (args_1.parsedCloudrunCli.region) {
|
|
9
|
+
(0, validate_gcp_region_1.validateGcpRegion)(args_1.parsedCloudrunCli.region);
|
|
10
|
+
return args_1.parsedCloudrunCli.region;
|
|
11
|
+
}
|
|
12
|
+
const envVariable = process.env.REMOTION_GCP_REGION;
|
|
13
|
+
if (envVariable) {
|
|
14
|
+
(0, validate_gcp_region_1.validateGcpRegion)(envVariable);
|
|
15
|
+
return envVariable;
|
|
16
|
+
}
|
|
17
|
+
return constants_1.DEFAULT_REGION;
|
|
18
|
+
};
|
|
19
|
+
exports.getGcpRegion = getGcpRegion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const printHelp: () => void;
|
package/dist/cli/help.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.printHelp = void 0;
|
|
4
|
+
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const constants_1 = require("../shared/constants");
|
|
6
|
+
const permissions_1 = require("./commands/permissions");
|
|
7
|
+
const regions_1 = require("./commands/regions");
|
|
8
|
+
const render_1 = require("./commands/render");
|
|
9
|
+
const services_1 = require("./commands/services");
|
|
10
|
+
const sites_1 = require("./commands/sites");
|
|
11
|
+
const still_1 = require("./commands/still");
|
|
12
|
+
const log_1 = require("./log");
|
|
13
|
+
const packagejson = require('../../package.json');
|
|
14
|
+
const printHelp = () => {
|
|
15
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} ${packagejson.version} © ${new Date().getFullYear()} The Remotion developers`);
|
|
16
|
+
log_1.Log.info();
|
|
17
|
+
log_1.Log.info('Available commands:');
|
|
18
|
+
log_1.Log.info('');
|
|
19
|
+
log_1.Log.info();
|
|
20
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} ${render_1.RENDER_COMMAND}`);
|
|
21
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray('Render Remotion media on GCP Cloud Run.'));
|
|
22
|
+
log_1.Log.info();
|
|
23
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} ${still_1.STILL_COMMAND}`);
|
|
24
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray('Render Remotion still on GCP Cloud Run.'));
|
|
25
|
+
log_1.Log.info();
|
|
26
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} ${services_1.SERVICES_COMMAND}`);
|
|
27
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray('Deploy and manage Cloud Run services on GCP.'));
|
|
28
|
+
log_1.Log.info();
|
|
29
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} ${sites_1.SITES_COMMAND}`);
|
|
30
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray('Deploy and manage Remotion projects.'));
|
|
31
|
+
log_1.Log.info();
|
|
32
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} ${permissions_1.PERMISSIONS_COMMAND}`);
|
|
33
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray('View and validate required GCP permissions.'));
|
|
34
|
+
log_1.Log.info();
|
|
35
|
+
log_1.Log.info(`${constants_1.BINARY_NAME} ${regions_1.REGIONS_COMMAND}`);
|
|
36
|
+
log_1.Log.info(cli_1.CliInternals.chalk.gray('Show the list of GCP regions supported.'));
|
|
37
|
+
};
|
|
38
|
+
exports.printHelp = printHelp;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.confirmCli = void 0;
|
|
4
|
+
const args_1 = require("../args");
|
|
5
|
+
const yes_or_no_1 = require("./yes-or-no");
|
|
6
|
+
const confirmCli = ({ delMessage, allowForceFlag, }) => {
|
|
7
|
+
if (allowForceFlag && args_1.forceFlagProvided) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
return (0, yes_or_no_1.yesOrNo)({ question: delMessage, defaultValue: true });
|
|
11
|
+
};
|
|
12
|
+
exports.confirmCli = confirmCli;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dateString: (date: Date) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dateString = void 0;
|
|
4
|
+
const dateString = (date) => date.getFullYear() +
|
|
5
|
+
'-' +
|
|
6
|
+
String(date.getMonth() + 1).padStart(2, '0') +
|
|
7
|
+
'-' +
|
|
8
|
+
String(date.getDate()).padStart(2, '0');
|
|
9
|
+
exports.dateString = dateString;
|