@payfit/nx-core 4.33.4-ephemeral-hello-lambda-3be9a6c.0 → 4.33.4-ephemeral-hello-lambda-48605aa.0
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/package.json +1 -1
- package/src/index.js +1 -1
- package/src/utils/oci.js +6 -1
- package/src/utils/oci.js.map +1 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
package/src/utils/oci.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.pushEmptyImageToEcr = pushEmptyImageToEcr;
|
|
4
|
+
const consola_1 = require("consola");
|
|
4
5
|
const exec_1 = require("./exec");
|
|
5
6
|
async function pushEmptyImageToEcr(lambdaEcrRepository, tag, pathToPackageJson) {
|
|
6
7
|
if (!process.env.AWS_ECR_REGISTRY) {
|
|
@@ -15,8 +16,12 @@ async function pushEmptyImageToEcr(lambdaEcrRepository, tag, pathToPackageJson)
|
|
|
15
16
|
if (!pathToPackageJson) {
|
|
16
17
|
throw new Error('Path to package.json is not provided');
|
|
17
18
|
}
|
|
18
|
-
(0, exec_1.exec)(`oras push ${process.env.AWS_ECR_REGISTRY}/${lambdaEcrRepository}:${tag} --artifact-type application/vnd.payfit.lambda.manifest ${pathToPackageJson}`, {
|
|
19
|
+
const uploadToOci = await (0, exec_1.exec)(`oras push ${process.env.AWS_ECR_REGISTRY}/${lambdaEcrRepository}:${tag} --artifact-type application/vnd.payfit.lambda.manifest ${pathToPackageJson}`, {
|
|
19
20
|
throwOnError: true,
|
|
20
21
|
});
|
|
22
|
+
consola_1.consola.log(uploadToOci.stdout);
|
|
23
|
+
if (uploadToOci.exitCode !== 0) {
|
|
24
|
+
throw new Error(`Failed to push empty image to ECR: ${uploadToOci.stderr || 'Unknown error'}`);
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
//# sourceMappingURL=oci.js.map
|
package/src/utils/oci.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oci.js","sourceRoot":"","sources":["../../../../../packages/nx-core/src/utils/oci.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"oci.js","sourceRoot":"","sources":["../../../../../packages/nx-core/src/utils/oci.ts"],"names":[],"mappings":";;AAIA,kDA6BC;AAjCD,qCAAiC;AAEjC,iCAA6B;AAEtB,KAAK,UAAU,mBAAmB,CACvC,mBAA2B,EAC3B,GAAW,EACX,iBAAyB;IAEzB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;IACrE,CAAC;IACD,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;IAC1D,CAAC;IACD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC;IACD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;IACzD,CAAC;IACD,MAAM,WAAW,GAAG,MAAM,IAAA,WAAI,EAC5B,aAAa,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,mBAAmB,IAAI,GAAG,2DAA2D,iBAAiB,EAAE,EACrJ;QACE,YAAY,EAAE,IAAI;KACnB,CACF,CAAA;IACD,iBAAO,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAC/B,IAAI,WAAW,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CACb,sCAAsC,WAAW,CAAC,MAAM,IAAI,eAAe,EAAE,CAC9E,CAAA;IACH,CAAC;AACH,CAAC"}
|