@onivoro/onix 20.0.19 → 20.0.21
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/functions/extract-project-build-outputs.function.js +3 -5
- package/src/functions/extract-project-build-outputs.function.js.map +1 -1
- package/src/functions/push-image-to-ecr-wrapped.function.js +1 -1
- package/src/functions/push-image-to-ecr-wrapped.function.js.map +1 -1
- package/src/functions/push-image-to-ecr.function.d.ts +2 -3
- package/src/functions/push-image-to-ecr.function.js +4 -3
- package/src/functions/push-image-to-ecr.function.js.map +1 -1
package/package.json
CHANGED
|
@@ -5,14 +5,12 @@ const devkit_1 = require("@nx/devkit");
|
|
|
5
5
|
const extract_project_configuration_function_1 = require("./extract-project-configuration.function");
|
|
6
6
|
const interpolate_function_1 = require("./interpolate.function");
|
|
7
7
|
function extractProjectBuildOutputs(context, projectName) {
|
|
8
|
-
var _a, _b
|
|
8
|
+
var _a, _b;
|
|
9
9
|
const projectConfiguration = (0, extract_project_configuration_function_1.extractProjectConfiguration)(context, projectName);
|
|
10
10
|
if (projectConfiguration) {
|
|
11
11
|
if ((_a = projectConfiguration === null || projectConfiguration === void 0 ? void 0 : projectConfiguration.targets) === null || _a === void 0 ? void 0 : _a.build) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
console.warn({ things });
|
|
15
|
-
return (((_c = projectConfiguration.targets.build.options) === null || _c === void 0 ? void 0 : _c.outputPath) || projectConfiguration.targets.build.outputs || []).map((_) => (0, interpolate_function_1.interpolate)(context, _));
|
|
12
|
+
const output = ((_b = projectConfiguration.targets.build.options) === null || _b === void 0 ? void 0 : _b.outputPath) || projectConfiguration.targets.build.outputs || [];
|
|
13
|
+
return (output instanceof Array ? output : [output]).map((_) => (0, interpolate_function_1.interpolate)(context, _));
|
|
16
14
|
}
|
|
17
15
|
else {
|
|
18
16
|
devkit_1.logger.warn(`project "${projectName}" does not have a "build" target`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-project-build-outputs.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/extract-project-build-outputs.function.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"extract-project-build-outputs.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/extract-project-build-outputs.function.ts"],"names":[],"mappings":";;AAIA,gEAcC;AAlBD,uCAAqD;AACrD,qGAAuF;AACvF,iEAAqD;AAErD,SAAgB,0BAA0B,CAAC,OAAwB,EAAE,WAAmB;;IACpF,MAAM,oBAAoB,GAAG,IAAA,oEAA2B,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAE/E,IAAI,oBAAoB,EAAE,CAAC;QACvB,IAAI,MAAA,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,OAAO,0CAAE,KAAK,EAAE,CAAC;YACvC,MAAM,MAAM,GAAG,CAAA,MAAA,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,0CAAE,UAAU,KAAI,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;YAE1H,OAAO,CAAC,MAAM,YAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,IAAA,kCAAW,EAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;QACrG,CAAC;aAAM,CAAC;YACJ,eAAM,CAAC,IAAI,CAAC,YAAY,WAAW,kCAAkC,CAAC,CAAA;QAC1E,CAAC;IACL,CAAC;IAED,OAAO,EAAE,CAAC;AACd,CAAC"}
|
|
@@ -8,7 +8,7 @@ function pushImageToECRWrapped(_) {
|
|
|
8
8
|
const { ecr, profile } = _;
|
|
9
9
|
const [registryId, region, repoColonTag] = ecr.replace('amazonaws.com', '').replace('dkr.ecr.', '').replace('/', '').split('.');
|
|
10
10
|
const [repositoryName, imageTag] = repoColonTag.split(':');
|
|
11
|
-
return yield (0, push_image_to_ecr_function_1.pushImageToECR)({ registryId, region,
|
|
11
|
+
return yield (0, push_image_to_ecr_function_1.pushImageToECR)({ registryId, region, ecr, profile });
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=push-image-to-ecr-wrapped.function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-image-to-ecr-wrapped.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/push-image-to-ecr-wrapped.function.ts"],"names":[],"mappings":";;AAEA,sDAMC;;AARD,6EAA8D;AAE9D,SAAsB,qBAAqB,CAAC,CAAmC;;QAC7E,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChI,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE3D,OAAO,MAAM,IAAA,2CAAc,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"push-image-to-ecr-wrapped.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/push-image-to-ecr-wrapped.function.ts"],"names":[],"mappings":";;AAEA,sDAMC;;AARD,6EAA8D;AAE9D,SAAsB,qBAAqB,CAAC,CAAmC;;QAC7E,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChI,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE3D,OAAO,MAAM,IAAA,2CAAc,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export interface PushImageConfig {
|
|
2
2
|
region: string;
|
|
3
|
-
|
|
4
|
-
imageTag: string;
|
|
3
|
+
ecr: string;
|
|
5
4
|
registryId: string;
|
|
6
5
|
profile: string;
|
|
7
6
|
}
|
|
8
|
-
export declare function pushImageToECR({ region,
|
|
7
|
+
export declare function pushImageToECR({ region, ecr, registryId, profile }: PushImageConfig): Promise<void>;
|
|
@@ -6,7 +6,7 @@ const client_ecr_1 = require("@aws-sdk/client-ecr");
|
|
|
6
6
|
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
function pushImageToECR(_a) {
|
|
9
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ region,
|
|
9
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ region, ecr, registryId, profile }) {
|
|
10
10
|
var _b, _c;
|
|
11
11
|
try {
|
|
12
12
|
const config = { region, credentials: profile ? (0, credential_providers_1.fromIni)({ profile }) : undefined };
|
|
@@ -29,8 +29,9 @@ function pushImageToECR(_a) {
|
|
|
29
29
|
`-p ${password} ` +
|
|
30
30
|
registryEndpoint, { stdio: 'inherit' });
|
|
31
31
|
// Tag image
|
|
32
|
-
const remoteImage = `${registryEndpoint.replace('https://', '')}/${
|
|
33
|
-
(0, child_process_1.execSync)(`docker tag ${
|
|
32
|
+
const remoteImage = `${registryEndpoint.replace('https://', '')}/${ecr}`;
|
|
33
|
+
(0, child_process_1.execSync)(`docker tag ${ecr} ${remoteImage}`, { stdio: 'inherit' });
|
|
34
|
+
// execSync(`docker tag ${repositoryName}:${imageTag} ${remoteImage}`, { stdio: 'inherit' });
|
|
34
35
|
// Push image
|
|
35
36
|
(0, child_process_1.execSync)(`docker push ${remoteImage}`, { stdio: 'inherit' });
|
|
36
37
|
console.log('Successfully pushed image to ECR');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-image-to-ecr.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/push-image-to-ecr.function.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"push-image-to-ecr.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/push-image-to-ecr.function.ts"],"names":[],"mappings":";;AAWA,wCAoDC;;AA/DD,oDAA+F;AAC/F,wEAAwD;AACxD,iDAAyC;AASzC,SAAsB,cAAc;iEAAC,EACnC,MAAM,EACN,GAAG,EACH,UAAU,EACV,OAAO,EACS;;QAChB,IAAI,CAAC;YACH,MAAM,MAAM,GAAoB,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,IAAA,8BAAO,EAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;YACpG,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,MAAM,CAAC,CAAC;YAExC,MAAM,WAAW,GAAG,IAAI,yCAA4B,CAAC;gBACnD,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;aACnD,CAAC,CAAC;YACH,MAAM,YAAY,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAEvD,IAAI,CAAC,CAAA,MAAA,MAAA,YAAY,CAAC,iBAAiB,0CAAG,CAAC,CAAC,0CAAE,kBAAkB,CAAA,EAAE,CAAC;gBAC7D,MAAM,IAAI,KAAK,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