File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,10 +11,6 @@ process.env.NODE_OPTIONS = "--openssl-legacy-provider";
1111const S3_REGION = "us-east-1" ;
1212const BUCKET_NAME = "cloudfront-integration-bundles" ;
1313
14- // Serverless package command - modify if your packaging command changes.
15- const SERVERLESS_CMD =
16- "mv handlerViewerRequest.js handlerViewerRequest.js.base && mv handlerViewerRequest.js.garnished handlerViewerRequest.js && serverless package --package garnished_dist && mv handlerViewerRequest.js.base handlerViewerRequest.js" ;
17-
1814// -----------------------------------------------------------------------------
1915// Module Imports
2016// -----------------------------------------------------------------------------
@@ -165,27 +161,6 @@ async function getFunctionCode() {
165161 return response . data ;
166162}
167163
168- /**
169- * Packages the garnished code using the serverless framework.
170- * This function temporarily renames files to ensure correct packaging.
171- *
172- * @returns {Promise<string> } - Resolves with the stdout output of the packaging command.
173- */
174- /*function serverlessPackage() {
175- return new Promise((resolve, reject) => {
176- exec(SERVERLESS_CMD, (err, stdout, stderr) => {
177- console.log("stdout:", stdout);
178- console.log("stderr:", stderr);
179- if (err) {
180- console.error("Error during packaging:", err);
181- reject(err);
182- } else {
183- resolve(stdout);
184- }
185- });
186- });
187- }*/
188-
189164/**
190165 * Packages the garnished code using the serverless framework.
191166 * This function temporarily renames files to ensure correct packaging.
You can’t perform that action at this time.
0 commit comments