| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.lambdaCommand = exports.tryPrintLambdaHelp = void 0; | |
| const studio_server_1 = require("@remotion/studio-server"); | |
| const log_1 = require("./log"); | |
| const tryPrintLambdaHelp = (remotionRoot, args, logLevel) => { | |
| let path; | |
| try { | |
| path = require.resolve('@remotion/lambda/internal/help', { | |
| paths: [remotionRoot], | |
| }); | |
| } | |
| catch (_a) { | |
| return false; | |
| } | |
| try { | |
| const { printHelp } = require(path); | |
| if (typeof printHelp !== 'function') { | |
| return false; | |
| } | |
| printHelp(args, logLevel); | |
| return true; | |
| } | |
| catch (_b) { | |
| return false; | |
| } | |
| }; | |
| exports.tryPrintLambdaHelp = tryPrintLambdaHelp; | |
| const lambdaCommand = async (remotionRoot, args, logLevel) => { | |
| try { | |
| const path = require.resolve('@remotion/lambda', { | |
| paths: [remotionRoot], | |
| }); | |
| const { LambdaInternals } = require(path); | |
| await LambdaInternals.executeCommand(args, remotionRoot, logLevel); | |
| process.exit(0); | |
| } | |
| catch (err) { | |
| const manager = studio_server_1.StudioServerInternals.getPackageManager({ | |
| remotionRoot, | |
| packageManager: undefined, | |
| dirUp: 0, | |
| logLevel, | |
| }); | |
| const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand; | |
| log_1.Log.error({ indent: false, logLevel }, err); | |
| log_1.Log.error({ indent: false, logLevel }, 'Remotion Lambda is not installed.'); | |
| log_1.Log.info({ indent: false, logLevel }, ''); | |
| log_1.Log.info({ indent: false, logLevel }, 'You can install it using:'); | |
| log_1.Log.info({ indent: false, logLevel }, `${installCommand} @remotion/lambda@${studio_server_1.StudioServerInternals.getRemotionVersion()}`); | |
| process.exit(1); | |
| } | |
| }; | |
| exports.lambdaCommand = lambdaCommand; | |
Xet Storage Details
- Size:
- 1.94 kB
- Xet hash:
- d558409d0c85e28087a35b32183c5da5b6cead293e26a782d1cb592b4a4ebf88
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.