@onivoro/onix 20.0.55 → 20.3.1
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/executors.json +19 -29
- package/package.json +1 -6
- package/src/executors/build-cli/executor.d.ts +3 -2
- package/src/executors/build-cli/executor.js +14 -11
- package/src/executors/build-cli/executor.js.map +1 -1
- package/src/executors/build-cli/schema.d.ts +3 -1
- package/src/executors/build-cli/schema.json +7 -2
- package/src/executors/db/executor.js +20 -0
- package/src/executors/db/executor.js.map +1 -0
- package/src/executors/db/schema.d.ts +6 -0
- package/src/executors/{typeorm → db}/schema.json +7 -3
- package/src/executors/deploy/executor.d.ts +4 -0
- package/src/executors/deploy/executor.js +33 -0
- package/src/executors/deploy/executor.js.map +1 -0
- package/src/executors/deploy/schema.d.ts +5 -0
- package/src/executors/deploy/schema.json +28 -0
- package/src/executors/docker/executor.d.ts +4 -0
- package/src/executors/docker/executor.js +24 -0
- package/src/executors/docker/executor.js.map +1 -0
- package/src/executors/{docker-run → docker}/schema.d.ts +1 -1
- package/src/executors/{docker-run → docker}/schema.json +4 -4
- package/src/executors/gen/executor.d.ts +4 -0
- package/src/executors/gen/executor.js +19 -0
- package/src/executors/gen/executor.js.map +1 -0
- package/src/executors/gen/schema.d.ts +3 -0
- package/src/executors/gen/schema.json +14 -0
- package/src/executors/local/executor.d.ts +3 -2
- package/src/executors/local/executor.js +20 -9
- package/src/executors/local/executor.js.map +1 -1
- package/src/executors/local/schema.d.ts +3 -2
- package/src/executors/local/schema.json +12 -5
- package/src/executors/playwright/executor.d.ts +3 -2
- package/src/executors/playwright/executor.js +15 -11
- package/src/executors/playwright/executor.js.map +1 -1
- package/src/executors/playwright/schema.d.ts +0 -1
- package/src/executors/playwright/schema.json +1 -5
- package/src/{inference → functions}/add-db-target.function.js.map +1 -1
- package/src/{inference → functions}/add-db-targets.function.js.map +1 -1
- package/src/{inference → functions}/add-docker-deploy-target.function.js.map +1 -1
- package/src/{inference → functions}/add-docker-deploy-targets.function.js.map +1 -1
- package/src/{inference → functions}/add-docker-target.function.js.map +1 -1
- package/src/{inference → functions}/add-docker-targets.function.js +1 -1
- package/src/{inference → functions}/add-docker-targets.function.js.map +1 -1
- package/src/{inference → functions}/add-gen-target.function.js.map +1 -1
- package/src/{inference → functions}/add-serve-target.function.js.map +1 -1
- package/src/{inference → functions}/add-serve-targets.function.js +1 -1
- package/src/{inference → functions}/add-serve-targets.function.js.map +1 -1
- package/src/{inference → functions}/build-onix-targets.function.js.map +1 -1
- package/src/functions/create-nodes-internal.function.d.ts +0 -0
- package/src/functions/create-nodes-internal.function.js +1 -0
- package/src/functions/create-nodes-internal.function.js.map +1 -0
- package/src/{inference → functions}/normalize-options.function.js.map +1 -1
- package/src/functions/push-image-to-ecr-wrapped.function.js +1 -2
- package/src/functions/push-image-to-ecr-wrapped.function.js.map +1 -1
- package/src/functions/push-image-to-ecr.function.d.ts +3 -2
- package/src/functions/push-image-to-ecr.function.js +18 -39
- package/src/functions/push-image-to-ecr.function.js.map +1 -1
- package/src/{inference → functions}/read-targets-cache.function.js.map +1 -1
- package/src/{inference → functions}/write-targets-to-cache.function.js.map +1 -1
- package/src/index.d.ts +7 -15
- package/src/index.js +7 -15
- package/src/index.js.map +1 -1
- package/src/plugins/plugin.js +4 -4
- package/src/executors/deploy-ecs/executor.js +0 -82
- package/src/executors/deploy-ecs/executor.js.map +0 -1
- package/src/executors/deploy-ecs/schema.d.ts +0 -9
- package/src/executors/deploy-ecs/schema.json +0 -32
- package/src/executors/deploy-lambda/executor.d.ts +0 -3
- package/src/executors/deploy-lambda/executor.js +0 -18
- package/src/executors/deploy-lambda/executor.js.map +0 -1
- package/src/executors/deploy-lambda/schema.d.ts +0 -3
- package/src/executors/deploy-lambda/schema.json +0 -57
- package/src/executors/docker-run/executor.d.ts +0 -3
- package/src/executors/docker-run/executor.js +0 -14
- package/src/executors/docker-run/executor.js.map +0 -1
- package/src/executors/openapi-gen/executor.d.ts +0 -3
- package/src/executors/openapi-gen/executor.js +0 -11
- package/src/executors/openapi-gen/executor.js.map +0 -1
- package/src/executors/openapi-gen/schema.d.ts +0 -5
- package/src/executors/openapi-gen/schema.json +0 -25
- package/src/executors/typeorm/executor.d.ts +0 -3
- package/src/executors/typeorm/executor.js +0 -15
- package/src/executors/typeorm/executor.js.map +0 -1
- package/src/executors/typeorm/schema.d.ts +0 -5
- package/src/executors/xray/executor.d.ts +0 -3
- package/src/executors/xray/executor.js +0 -21
- package/src/executors/xray/executor.js.map +0 -1
- package/src/executors/xray/schema.d.ts +0 -1
- package/src/executors/xray/schema.json +0 -9
- package/src/functions/deploy-lambda.function.d.ts +0 -17
- package/src/functions/deploy-lambda.function.js +0 -74
- package/src/functions/deploy-lambda.function.js.map +0 -1
- package/src/functions/executor-factory.function.d.ts +0 -5
- package/src/functions/executor-factory.function.js +0 -20
- package/src/functions/executor-factory.function.js.map +0 -1
- package/src/functions/extract-project-build-assets.function.d.ts +0 -2
- package/src/functions/extract-project-build-assets.function.js +0 -19
- package/src/functions/extract-project-build-assets.function.js.map +0 -1
- package/src/functions/extract-project-build-outputs.function.d.ts +0 -2
- package/src/functions/extract-project-build-outputs.function.js +0 -21
- package/src/functions/extract-project-build-outputs.function.js.map +0 -1
- package/src/functions/extract-project-configuration.function.d.ts +0 -2
- package/src/functions/extract-project-configuration.function.js +0 -14
- package/src/functions/extract-project-configuration.function.js.map +0 -1
- package/src/functions/extract-target-configuration.function.d.ts +0 -2
- package/src/functions/extract-target-configuration.function.js +0 -8
- package/src/functions/extract-target-configuration.function.js.map +0 -1
- package/src/functions/interpolate.function.d.ts +0 -2
- package/src/functions/interpolate.function.js +0 -8
- package/src/functions/interpolate.function.js.map +0 -1
- package/src/functions/load-env-file.function.d.ts +0 -1
- package/src/functions/load-env-file.function.js +0 -17
- package/src/functions/load-env-file.function.js.map +0 -1
- package/src/functions/pm.function.d.ts +0 -2
- package/src/functions/pm.function.js +0 -20
- package/src/functions/pm.function.js.map +0 -1
- package/src/functions/pmx.function.d.ts +0 -3
- package/src/functions/pmx.function.js +0 -21
- package/src/functions/pmx.function.js.map +0 -1
- package/src/functions/resolve-aws-credentials.function.d.ts +0 -1
- package/src/functions/resolve-aws-credentials.function.js +0 -15
- package/src/functions/resolve-aws-credentials.function.js.map +0 -1
- package/src/functions/restart-ecs-service.function.d.ts +0 -6
- package/src/functions/restart-ecs-service.function.js +0 -34
- package/src/functions/restart-ecs-service.function.js.map +0 -1
- package/src/webpack/patch-nx-source-map-paths.function.d.ts +0 -9
- package/src/webpack/patch-nx-source-map-paths.function.js +0 -13
- package/src/webpack/patch-nx-source-map-paths.function.js.map +0 -1
- package/src/webpack/patch-nx-source-maps.plugin.d.ts +0 -2
- package/src/webpack/patch-nx-source-maps.plugin.js +0 -11
- package/src/webpack/patch-nx-source-maps.plugin.js.map +0 -1
- /package/src/executors/{deploy-ecs → db}/executor.d.ts +0 -0
- /package/src/{inference → functions}/add-db-target.function.d.ts +0 -0
- /package/src/{inference → functions}/add-db-target.function.js +0 -0
- /package/src/{inference → functions}/add-db-targets.function.d.ts +0 -0
- /package/src/{inference → functions}/add-db-targets.function.js +0 -0
- /package/src/{inference → functions}/add-docker-deploy-target.function.d.ts +0 -0
- /package/src/{inference → functions}/add-docker-deploy-target.function.js +0 -0
- /package/src/{inference → functions}/add-docker-deploy-targets.function.d.ts +0 -0
- /package/src/{inference → functions}/add-docker-deploy-targets.function.js +0 -0
- /package/src/{inference → functions}/add-docker-target.function.d.ts +0 -0
- /package/src/{inference → functions}/add-docker-target.function.js +0 -0
- /package/src/{inference → functions}/add-docker-targets.function.d.ts +0 -0
- /package/src/{inference → functions}/add-gen-target.function.d.ts +0 -0
- /package/src/{inference → functions}/add-gen-target.function.js +0 -0
- /package/src/{inference → functions}/add-serve-target.function.d.ts +0 -0
- /package/src/{inference → functions}/add-serve-target.function.js +0 -0
- /package/src/{inference → functions}/add-serve-targets.function.d.ts +0 -0
- /package/src/{inference → functions}/build-onix-targets.function.d.ts +0 -0
- /package/src/{inference → functions}/build-onix-targets.function.js +0 -0
- /package/src/{inference → functions}/normalize-options.function.d.ts +0 -0
- /package/src/{inference → functions}/normalize-options.function.js +0 -0
- /package/src/{inference → functions}/read-targets-cache.function.d.ts +0 -0
- /package/src/{inference → functions}/read-targets-cache.function.js +0 -0
- /package/src/{inference → functions}/write-targets-to-cache.function.d.ts +0 -0
- /package/src/{inference → functions}/write-targets-to-cache.function.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-docker-deploy-targets.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"add-docker-deploy-targets.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/add-docker-deploy-targets.function.ts"],"names":[],"mappings":";;AAIA,wDAIG;AANH,2FAA4E;AAE5E,SAAgB,sBAAsB,CAAC,UAAuB,EAAE,OAAiD,EAAE,WAAgB,EAAE,WAAW;IAC5I,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE;QAC9E,IAAA,yDAAqB,EAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-docker-target.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"add-docker-target.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/add-docker-target.function.ts"],"names":[],"mappings":";;AAGA,0CAkBC;AAlBD,SAAgB,eAAe,CAAC,WAAmB,EAAE,MAA8B,EAAE,OAAiD,EAAE,WAAgB,EAAE,WAAW;IACjK,MAAM,UAAU,GAAG,qBAAqB,WAAW,EAAE,CAAC;IACtD,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAC9C,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAExC,IAAI,GAAG,EAAE,CAAC;QACN,OAAO,CAAC,UAAU,CAAC,GAAG;YAClB,OAAO,EAAE,yBAAyB,SAAS,oBAAoB,SAAS,IAAI,IAAI,gBAAgB,IAAI,iBAAiB,OAAO,MAAM,GAAG,GAAG;YACxI,OAAO,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE;YAC/B,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE;gBACN,YAAY,EAAE,CAAC,QAAQ,CAAC;gBACxB,WAAW,EAAE,+BAA+B;aAC/C;SACJ,CAAC;IACN,CAAC;AACL,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addDockerTargets = addDockerTargets;
|
|
4
|
-
const add_docker_target_function_1 = require("
|
|
4
|
+
const add_docker_target_function_1 = require("./add-docker-target.function");
|
|
5
5
|
function addDockerTargets(onixConfig, targets, projectJson, namedInputs) {
|
|
6
6
|
Object.entries(onixConfig.environments || {}).forEach(([environment, config]) => {
|
|
7
7
|
(0, add_docker_target_function_1.addDockerTarget)(environment, config, targets, projectJson, namedInputs);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-docker-targets.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"add-docker-targets.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/add-docker-targets.function.ts"],"names":[],"mappings":";;AAIA,4CAIG;AANH,6EAA+D;AAE/D,SAAgB,gBAAgB,CAAC,UAAuB,EAAE,OAAiD,EAAE,WAAgB,EAAE,WAAW;IACtI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE;QAC9E,IAAA,4CAAe,EAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-gen-target.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"add-gen-target.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/add-gen-target.function.ts"],"names":[],"mappings":";;AAIA,oCA2BC;AA7BD,wFAA0E;AAE1E,SAAgB,YAAY,CAAC,UAAuB,EAAE,OAAiD,EAAE,WAAgB,EAAE,WAAW;IAClI,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC;IAEjD,IAAI,aAAa,IAAI,UAAU,EAAE,CAAC;QAC9B,MAAM,UAAU,GAAG,qBAAqB,CAAC;QAEzC,MAAM,OAAO,GAAG,UAAU,aAAa,gBAAgB,aAAa,+FAA+F,UAAU,iCAAiC,aAAa,EAAE,CAAC;QAE9N,OAAO,CAAC,UAAU,CAAC,GAAG;YACpB,OAAO;YACP,OAAO,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE;YAC/B,KAAK,EAAE,IAAI;YACX,SAAS,EAAE,CAAC,IAAI,4CAAe,EAAE,CAAC;YAClC,MAAM,EAAE;gBACN,GAAG,CAAC,YAAY,IAAI,WAAW;oBAC7B,CAAC,CAAC,CAAC,YAAY,EAAE,aAAa,CAAC;oBAC/B,CAAC,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;gBAC5B;oBACE,oBAAoB,EAAE,EAAE;iBACzB;aACF;YACD,QAAQ,EAAE;gBACR,YAAY,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;gBACnC,WAAW,EAAE,8BAA8B;aAC5C;SACF,CAAC;IACN,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-serve-target.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"add-serve-target.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/add-serve-target.function.ts"],"names":[],"mappings":";;AAGA,wCAuBC;AAvBD,SAAgB,cAAc,CAAC,WAAmB,EAAE,MAA8B,EAAE,OAAiD,EAAE,WAAgB,EAAE,WAAW;IAClK,MAAM,eAAe,GAAG,OAAO,CAAC;IAChC,MAAM,UAAU,GAAG,cAAc,WAAW,EAAE,CAAC;IAC/C,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACnC,OAAO,CAAC,UAAU,CAAC,GAAG;QACpB,OAAO,EAAE,UAAU,MAAM,IAAI,OAAO,kBAAkB,WAAW,CAAC,IAAI,QAAQ;QAC9E,OAAO,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE;QAC/B,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,CAAC,IAAI,eAAe,EAAE,CAAC;QAClC,MAAM,EAAE;YACN,GAAG,CAAC,YAAY,IAAI,WAAW;gBAC7B,CAAC,CAAC,CAAC,YAAY,EAAE,aAAa,CAAC;gBAC/B,CAAC,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YAC5B;gBACE,oBAAoB,EAAE,EAAE;aACzB;SACF;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE;YACR,YAAY,EAAE,CAAC,YAAY,CAAC;YAC5B,WAAW,EAAE,oDAAoD;SAClE;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addServeTargets = addServeTargets;
|
|
4
|
-
const add_serve_target_function_1 = require("
|
|
4
|
+
const add_serve_target_function_1 = require("./add-serve-target.function");
|
|
5
5
|
function addServeTargets(onixConfig, targets, projectJson, namedInputs) {
|
|
6
6
|
Object.entries(onixConfig.environments || {}).forEach(([environment, config]) => {
|
|
7
7
|
(0, add_serve_target_function_1.addServeTarget)(environment, config, targets, projectJson, namedInputs);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-serve-targets.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"add-serve-targets.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/add-serve-targets.function.ts"],"names":[],"mappings":";;AAIA,0CAIC;AAND,2EAA6D;AAE7D,SAAgB,eAAe,CAAC,UAAuB,EAAE,OAAiD,EAAE,WAAgB,EAAE,WAAW;IACvI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE;QAC9E,IAAA,0CAAc,EAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-onix-targets.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"build-onix-targets.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/build-onix-targets.function.ts"],"names":[],"mappings":";;AAaA,4CAgCC;;AA7CD,uCAA2G;AAG3G,2BAAkC;AAElC,4EAAuE;AACvE,+BAA4B;AAC5B,6EAA+D;AAC/D,+EAAiE;AACjE,uEAAyD;AACzD,uEAAyD;AACzD,6FAA8E;AAE9E,SAAsB,gBAAgB,CAClC,cAAsB,EACtB,WAAmB,EACnB,OAA2B,EAC3B,OAA2B;;QAE3B,MAAM,sBAAsB,GAAG,IAAA,0BAAiB,EAC5C,OAAO,CAAC,aAAa,EACrB,cAAc,CACjB,CAAC;QAEF,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,aAAa,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;QACjF,MAAM,WAAW,GAAG,IAAA,kBAAS,EAAC,IAAA,iBAAY,EAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;QAEtE,MAAM,OAAO,GAAwC,EAAE,CAAC;QAExD,eAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QAEpC,MAAM,UAAU,GAAgB,OAAO,CAAC,sBAAsB,CAAC,CAAC;QAEhE,eAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAExB,MAAM,WAAW,GAAG,IAAA,iCAAc,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAEzD,IAAA,4CAAe,EAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QAC/D,IAAA,8CAAgB,EAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QAChE,IAAA,2DAAsB,EAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QACtE,IAAA,sCAAY,EAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QAC5D,IAAA,sCAAY,EAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QAE5D,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IACjC,CAAC;CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=create-nodes-internal.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-nodes-internal.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/create-nodes-internal.function.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"normalize-options.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/normalize-options.function.ts"],"names":[],"mappings":";;AAEA,4CASC;AATD,SAAgB,gBAAgB,CAAC,OAA2B;;IACxD,OAAO,aAAP,OAAO,cAAP,OAAO,IAAP,OAAO,GAAK,EAAE,EAAC;IACf,MAAA,OAAO,CAAC,eAAe,oCAAvB,OAAO,CAAC,eAAe,GAAK,OAAO,EAAC;IACpC,MAAA,OAAO,CAAC,eAAe,oCAAvB,OAAO,CAAC,eAAe,GAAK,OAAO,EAAC;IACpC,MAAA,OAAO,CAAC,iBAAiB,oCAAzB,OAAO,CAAC,iBAAiB,GAAK,SAAS,EAAC;IACxC,MAAA,OAAO,CAAC,cAAc,oCAAtB,OAAO,CAAC,cAAc,GAAK,MAAM,EAAC;IAClC,MAAA,OAAO,CAAC,qBAAqB,oCAA7B,OAAO,CAAC,qBAAqB,GAAK,cAAc,EAAC;IACjD,MAAA,OAAO,CAAC,mBAAmB,oCAA3B,OAAO,CAAC,mBAAmB,GAAK,WAAW,EAAC;IAC5C,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.pushImageToECRWrapped = pushImageToECRWrapped;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const push_image_to_ecr_function_1 = require("./push-image-to-ecr.function");
|
|
6
|
-
// TODO: DELETE THIS ABSTRACTION NOW THAT THE UNDERLYING FUNCTION ISN'T GOING TO CHANGE
|
|
7
6
|
function pushImageToECRWrapped(_) {
|
|
8
7
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
8
|
const { ecr, profile } = _;
|
|
10
9
|
const [registryId, region, repoColonTag] = ecr.replace('amazonaws.com', '').replace('dkr.ecr.', '').replace('/', '').split('.');
|
|
11
10
|
const [repositoryName, imageTag] = repoColonTag.split(':');
|
|
12
|
-
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, repositoryName, imageTag, profile });
|
|
13
12
|
});
|
|
14
13
|
}
|
|
15
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":";;
|
|
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,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export interface PushImageConfig {
|
|
2
2
|
region: string;
|
|
3
|
-
|
|
3
|
+
repositoryName: string;
|
|
4
|
+
imageTag: string;
|
|
4
5
|
registryId: string;
|
|
5
6
|
profile: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function pushImageToECR({ region,
|
|
8
|
+
export declare function pushImageToECR({ region, repositoryName, imageTag, registryId, profile }: PushImageConfig): Promise<void>;
|
|
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.pushImageToECR = pushImageToECR;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const client_ecr_1 = require("@aws-sdk/client-ecr");
|
|
6
|
-
const
|
|
6
|
+
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
|
-
const resolve_aws_credentials_function_1 = require("./resolve-aws-credentials.function");
|
|
9
8
|
function pushImageToECR(_a) {
|
|
10
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ region,
|
|
9
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ region, repositoryName, imageTag, registryId, profile }) {
|
|
11
10
|
var _b, _c;
|
|
12
11
|
try {
|
|
13
|
-
const config = { region, credentials: (0,
|
|
12
|
+
const config = { region, credentials: (0, credential_providers_1.fromIni)({ profile }) };
|
|
14
13
|
const ecrClient = new client_ecr_1.ECRClient(config);
|
|
15
14
|
const authCommand = new client_ecr_1.GetAuthorizationTokenCommand({
|
|
16
15
|
registryIds: registryId ? [registryId] : undefined
|
|
@@ -19,45 +18,25 @@ function pushImageToECR(_a) {
|
|
|
19
18
|
if (!((_c = (_b = authResponse.authorizationData) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.authorizationToken)) {
|
|
20
19
|
throw new Error('Failed to get authorization token');
|
|
21
20
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const [u, p] = authToken.split(':');
|
|
28
|
-
username = u;
|
|
29
|
-
password = p;
|
|
30
|
-
registryEndpoint = authResponse.authorizationData[0].proxyEndpoint;
|
|
31
|
-
if (!registryEndpoint) {
|
|
32
|
-
throw new Error('Failed to get registry endpoint and auth credentials');
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
devkit_1.logger.error('Failed to get registry endpoint and auth credentials');
|
|
37
|
-
throw error;
|
|
38
|
-
}
|
|
39
|
-
try {
|
|
40
|
-
(0, child_process_1.execSync)('docker login ' +
|
|
41
|
-
`-u ${username} ` +
|
|
42
|
-
`-p ${password} ` +
|
|
43
|
-
registryEndpoint, { stdio: 'inherit' });
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
throw new Error(`Docker login failed with username "${username}"`);
|
|
47
|
-
}
|
|
48
|
-
const pushCommand = `docker push ${ecr}`;
|
|
49
|
-
try {
|
|
50
|
-
(0, child_process_1.execSync)(pushCommand, { stdio: 'inherit' });
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
devkit_1.logger.error(`Docker push command failed: ${pushCommand}`);
|
|
54
|
-
throw error;
|
|
21
|
+
const authToken = Buffer.from(authResponse.authorizationData[0].authorizationToken, 'base64').toString('utf-8');
|
|
22
|
+
const [username, password] = authToken.split(':');
|
|
23
|
+
const registryEndpoint = authResponse.authorizationData[0].proxyEndpoint;
|
|
24
|
+
if (!registryEndpoint) {
|
|
25
|
+
throw new Error('Failed to get registry endpoint');
|
|
55
26
|
}
|
|
27
|
+
(0, child_process_1.execSync)('docker login ' +
|
|
28
|
+
`-u ${username} ` +
|
|
29
|
+
`-p ${password} ` +
|
|
30
|
+
registryEndpoint, { stdio: 'inherit' });
|
|
31
|
+
// Tag image
|
|
32
|
+
const remoteImage = `${registryEndpoint.replace('https://', '')}/${repositoryName}:${imageTag}`;
|
|
33
|
+
(0, child_process_1.execSync)(`docker tag ${repositoryName}:${imageTag} ${remoteImage}`, { stdio: 'inherit' });
|
|
34
|
+
// Push image
|
|
35
|
+
(0, child_process_1.execSync)(`docker push ${remoteImage}`, { stdio: 'inherit' });
|
|
56
36
|
console.log('Successfully pushed image to ECR');
|
|
57
37
|
}
|
|
58
38
|
catch (error) {
|
|
59
|
-
|
|
60
|
-
devkit_1.logger.error(error === null || error === void 0 ? void 0 : error.message);
|
|
39
|
+
console.error('Error pushing image to ECR:', error);
|
|
61
40
|
throw error;
|
|
62
41
|
}
|
|
63
42
|
});
|
|
@@ -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":";;AAYA,wCAsDC;;AAlED,oDAA+F;AAC/F,wEAAwD;AACxD,iDAAyC;AAUzC,SAAsB,cAAc;iEAAC,EACnC,MAAM,EACN,cAAc,EACd,QAAQ,EACR,UAAU,EACV,OAAO,EACS;;QAChB,IAAI,CAAC;YACH,MAAM,MAAM,GAAoB,EAAE,MAAM,EAAE,WAAW,EAAE,IAAA,8BAAO,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YAC9E,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,CAAC,mCAAmC,CAAC,CAAC;YACvD,CAAC;YAED,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAC3B,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,kBAAkB,EACpD,QAAQ,CACT,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACpB,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAElD,MAAM,gBAAgB,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;YACzE,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACtB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;YACrD,CAAC;YAED,IAAA,wBAAQ,EAAC,eAAe;gBACtB,MAAM,QAAQ,GAAG;gBACjB,MAAM,QAAQ,GAAG;gBACjB,gBAAgB,EAChB,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;YAEF,YAAY;YACZ,MAAM,WAAW,GAAG,GAAG,gBAAgB,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,cAAc,IAAI,QAAQ,EAAE,CAAC;YAChG,IAAA,wBAAQ,EAAC,cAAc,cAAc,IAAI,QAAQ,IAAI,WAAW,EAAE,EAChE,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;YAEF,aAAa;YACb,IAAA,wBAAQ,EAAC,eAAe,WAAW,EAAE,EACnC,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;YAEF,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAClD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;YACpD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-targets-cache.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"read-targets-cache.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/read-targets-cache.function.ts"],"names":[],"mappings":";;AAIA,4CAEC;AAND,uCAA0C;AAC1C,2BAAgC;AAGhC,SAAgB,gBAAgB,CAAC,SAAiB;IAChD,OAAO,IAAA,eAAU,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAA,qBAAY,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-targets-to-cache.function.js","sourceRoot":"","sources":["../../../../onix/src/
|
|
1
|
+
{"version":3,"file":"write-targets-to-cache.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/write-targets-to-cache.function.ts"],"names":[],"mappings":";;AAGA,kDAEC;AALD,uCAA2C;AAG3C,SAAgB,mBAAmB,CAAC,SAAS,EAAE,OAAsC;IACjF,IAAA,sBAAa,EAAC,SAAS,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;AAC5C,CAAC;AAAA,CAAC"}
|
package/src/index.d.ts
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
export { playwrightConfig } from './utils/playwright.config';
|
|
2
2
|
export * from './types/onix-config.type';
|
|
3
3
|
export * from './plugins/plugin';
|
|
4
|
-
export * from './functions/
|
|
5
|
-
export * from './functions/
|
|
6
|
-
export * from './functions/
|
|
7
|
-
export * from './functions/
|
|
4
|
+
export * from './functions/add-docker-target.function';
|
|
5
|
+
export * from './functions/add-docker-targets.function';
|
|
6
|
+
export * from './functions/add-serve-target.function';
|
|
7
|
+
export * from './functions/add-serve-targets.function';
|
|
8
|
+
export * from './functions/build-onix-targets.function';
|
|
8
9
|
export * from './functions/normalize-output-path.function';
|
|
9
|
-
export * from './functions/
|
|
10
|
-
export * from './functions/
|
|
11
|
-
export * from './inference/add-docker-target.function';
|
|
12
|
-
export * from './inference/add-docker-targets.function';
|
|
13
|
-
export * from './inference/add-serve-target.function';
|
|
14
|
-
export * from './inference/add-serve-targets.function';
|
|
15
|
-
export * from './inference/build-onix-targets.function';
|
|
16
|
-
export * from './inference/read-targets-cache.function';
|
|
17
|
-
export * from './inference/write-targets-to-cache.function';
|
|
18
|
-
export * from './webpack/patch-nx-source-map-paths.function';
|
|
19
|
-
export * from './webpack/patch-nx-source-maps.plugin';
|
|
10
|
+
export * from './functions/read-targets-cache.function';
|
|
11
|
+
export * from './functions/write-targets-to-cache.function';
|
package/src/index.js
CHANGED
|
@@ -6,20 +6,12 @@ var playwright_config_1 = require("./utils/playwright.config");
|
|
|
6
6
|
Object.defineProperty(exports, "playwrightConfig", { enumerable: true, get: function () { return playwright_config_1.playwrightConfig; } });
|
|
7
7
|
tslib_1.__exportStar(require("./types/onix-config.type"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./plugins/plugin"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./functions/
|
|
10
|
-
tslib_1.__exportStar(require("./functions/
|
|
11
|
-
tslib_1.__exportStar(require("./functions/
|
|
12
|
-
tslib_1.__exportStar(require("./functions/
|
|
9
|
+
tslib_1.__exportStar(require("./functions/add-docker-target.function"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./functions/add-docker-targets.function"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./functions/add-serve-target.function"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./functions/add-serve-targets.function"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./functions/build-onix-targets.function"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("./functions/normalize-output-path.function"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./functions/
|
|
15
|
-
tslib_1.__exportStar(require("./functions/
|
|
16
|
-
tslib_1.__exportStar(require("./inference/add-docker-target.function"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./inference/add-docker-targets.function"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./inference/add-serve-target.function"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./inference/add-serve-targets.function"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("./inference/build-onix-targets.function"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./inference/read-targets-cache.function"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("./inference/write-targets-to-cache.function"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("./webpack/patch-nx-source-map-paths.function"), exports);
|
|
24
|
-
tslib_1.__exportStar(require("./webpack/patch-nx-source-maps.plugin"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./functions/read-targets-cache.function"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./functions/write-targets-to-cache.function"), exports);
|
|
25
17
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../onix/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAA6D;AAApD,qHAAA,gBAAgB,OAAA;AAEzB,mEAAyC;AAEzC,2DAAiC;AAEjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../onix/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAA6D;AAApD,qHAAA,gBAAgB,OAAA;AAEzB,mEAAyC;AAEzC,2DAAiC;AAEjC,iFAAuD;AACvD,kFAAwD;AACxD,gFAAsD;AACtD,iFAAuD;AACvD,kFAAwD;AACxD,qFAA2D;AAC3D,kFAAwD;AACxD,sFAA4D"}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -9,11 +9,11 @@ const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculat
|
|
|
9
9
|
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
10
10
|
const js_1 = require("@nx/js");
|
|
11
11
|
const file_hasher_1 = require("nx/src/hasher/file-hasher");
|
|
12
|
-
const read_targets_cache_function_1 = require("../
|
|
13
|
-
const write_targets_to_cache_function_1 = require("../
|
|
14
|
-
const normalize_options_function_1 = require("../
|
|
12
|
+
const read_targets_cache_function_1 = require("../functions/read-targets-cache.function");
|
|
13
|
+
const write_targets_to_cache_function_1 = require("../functions/write-targets-to-cache.function");
|
|
14
|
+
const normalize_options_function_1 = require("../functions/normalize-options.function");
|
|
15
15
|
const onix_config_glob_constant_1 = require("../constants/onix-config-glob.constant");
|
|
16
|
-
const build_onix_targets_function_1 = require("../
|
|
16
|
+
const build_onix_targets_function_1 = require("../functions/build-onix-targets.function");
|
|
17
17
|
const createDependencies = () => [];
|
|
18
18
|
exports.createDependencies = createDependencies;
|
|
19
19
|
exports.createNodesV2 = [
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const child_process_1 = require("child_process");
|
|
6
|
-
const push_image_to_ecr_wrapped_function_1 = require("../../functions/push-image-to-ecr-wrapped.function");
|
|
7
|
-
const extract_project_build_outputs_function_1 = require("../../functions/extract-project-build-outputs.function");
|
|
8
|
-
const extract_project_build_assets_function_1 = require("../../functions/extract-project-build-assets.function");
|
|
9
|
-
const path_1 = require("path");
|
|
10
|
-
const extract_project_configuration_function_1 = require("../../functions/extract-project-configuration.function");
|
|
11
|
-
const restart_ecs_service_function_1 = require("../../functions/restart-ecs-service.function");
|
|
12
|
-
const pmx_function_1 = require("../../functions/pmx.function");
|
|
13
|
-
const stdio = 'inherit';
|
|
14
|
-
const uiAssetFolderName = 'ui';
|
|
15
|
-
const executor = (options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
-
const { ecr, profile, dockerfile, ui, region, cluster, service } = options;
|
|
17
|
-
(0, pmx_function_1.pmxSpawn)(context, `nx build ${context.projectName}`);
|
|
18
|
-
try {
|
|
19
|
-
const [apiProjectAssetPath] = (0, extract_project_build_assets_function_1.extractProjectBuildAssets)(context, context.projectName);
|
|
20
|
-
const [apiProjectOutput] = (0, extract_project_build_outputs_function_1.extractProjectBuildOutputs)(context, context.projectName);
|
|
21
|
-
if (ui) {
|
|
22
|
-
if (apiProjectAssetPath) {
|
|
23
|
-
const [webProjectOutputs] = (0, extract_project_build_outputs_function_1.extractProjectBuildOutputs)(context, ui);
|
|
24
|
-
if (webProjectOutputs === null || webProjectOutputs === void 0 ? void 0 : webProjectOutputs.length) {
|
|
25
|
-
(0, pmx_function_1.pmxSpawn)(context, `nx build ${ui}`);
|
|
26
|
-
const projectConfiguration = (0, extract_project_configuration_function_1.extractProjectConfiguration)(context, context.projectName);
|
|
27
|
-
const [projectDist] = apiProjectOutput.split(projectConfiguration.root);
|
|
28
|
-
const [__, projectAssetsPath] = apiProjectAssetPath.split(projectConfiguration.sourceRoot);
|
|
29
|
-
const projectDistAssetPathForUi = (0, path_1.join)(projectDist, projectConfiguration.root, projectAssetsPath, uiAssetFolderName);
|
|
30
|
-
[webProjectOutputs].forEach(output => {
|
|
31
|
-
(0, child_process_1.execSync)(`cp -R ${output} ${projectDistAssetPathForUi}`);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
devkit_1.logger.warn(`unable to locate target "build" outputs within project configuration for specified webProjectName "${ui}"`);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
devkit_1.logger.warn(`unable to locate target "build" asset path (expecting targets.build.options.assets -> ["things/and/stuff"]) within project configuration for project "${context.projectName}"`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
const [projectOutput] = (0, extract_project_build_outputs_function_1.extractProjectBuildOutputs)(context, context.projectName);
|
|
43
|
-
devkit_1.logger.warn({ projectOutput });
|
|
44
|
-
const dockerCommand = `docker build --build-arg="APP_DIST=${projectOutput}" -f ${dockerfile} -t ${ecr} .`;
|
|
45
|
-
devkit_1.logger.warn({ dockerCommand });
|
|
46
|
-
try {
|
|
47
|
-
(0, child_process_1.execSync)(dockerCommand, { stdio });
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
devkit_1.logger.error({ error, detail: 'docker build failed' });
|
|
51
|
-
throw error;
|
|
52
|
-
}
|
|
53
|
-
try {
|
|
54
|
-
yield (0, push_image_to_ecr_wrapped_function_1.pushImageToECRWrapped)({ ecr, profile });
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
devkit_1.logger.error({ error, detail: 'docker push failed' });
|
|
58
|
-
throw error;
|
|
59
|
-
}
|
|
60
|
-
if (region && cluster && service) {
|
|
61
|
-
try {
|
|
62
|
-
yield (0, restart_ecs_service_function_1.updateEcsService)({ profile, region, cluster, service });
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
devkit_1.logger.error({ error, detail: 'ECS service update failed' });
|
|
66
|
-
throw error;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
success: true,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
devkit_1.logger.error(error === null || error === void 0 ? void 0 : error.message);
|
|
75
|
-
devkit_1.logger.error({ error });
|
|
76
|
-
return {
|
|
77
|
-
success: false,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
exports.default = executor;
|
|
82
|
-
//# sourceMappingURL=executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/deploy-ecs/executor.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/schema",
|
|
3
|
-
"version": 2,
|
|
4
|
-
"title": "Db executor",
|
|
5
|
-
"description": "",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"ecr": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "Name of the ECR repository and tag (conventionally separated by a colon)"
|
|
11
|
-
},
|
|
12
|
-
"dockerfile": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"description": "Path and name of the Dockerfile"
|
|
15
|
-
},
|
|
16
|
-
"profile": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "AWS profile name (which must be defined in the ~/.aws/credentials file) if AWS keys aren't defined as env vars"
|
|
19
|
-
},
|
|
20
|
-
"ui": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"description": "Name of the web/UI project to include in the assets included in the Docker image"
|
|
23
|
-
},
|
|
24
|
-
"cluster": { "type": "string", "description": "AWS cluster for identifying the ECS service to redeploy"},
|
|
25
|
-
"region": { "type": "string", "description": "AWS region for identifying the ECS service to redeploy"},
|
|
26
|
-
"service": { "type": "string", "description": "AWS service for identifying the ECS service to redeploy"},
|
|
27
|
-
},
|
|
28
|
-
"required": [
|
|
29
|
-
"ecr",
|
|
30
|
-
"dockerfile"
|
|
31
|
-
]
|
|
32
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const child_process_1 = require("child_process");
|
|
5
|
-
const extract_project_build_outputs_function_1 = require("../../functions/extract-project-build-outputs.function");
|
|
6
|
-
const deploy_lambda_function_1 = require("../../functions/deploy-lambda.function");
|
|
7
|
-
const pmx_function_1 = require("../../functions/pmx.function");
|
|
8
|
-
const pm_function_1 = require("../../functions/pm.function");
|
|
9
|
-
const executor_factory_function_1 = require("../../functions/executor-factory.function");
|
|
10
|
-
const stdio = 'inherit';
|
|
11
|
-
exports.default = (0, executor_factory_function_1.executorFactory)((options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
-
const { functionName, region, bucket, profile, roleArn, environment, memorySize, delayMs, handler, runtime } = options;
|
|
13
|
-
const [apiProjectOutput] = (0, extract_project_build_outputs_function_1.extractProjectBuildOutputs)(context, context.projectName);
|
|
14
|
-
(0, pmx_function_1.pmxSpawn)(context, `nx build ${context.projectName}`);
|
|
15
|
-
(0, child_process_1.execSync)((0, pm_function_1.pm)(context).install, { stdio, cwd: apiProjectOutput });
|
|
16
|
-
yield (0, deploy_lambda_function_1.deployLambda)({ functionName: functionName || context.projectName, sourcePath: apiProjectOutput, region, bucket, roleArn, profile, environment, memorySize, delayMs, handler, runtime });
|
|
17
|
-
}));
|
|
18
|
-
//# sourceMappingURL=executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/deploy-lambda/executor.ts"],"names":[],"mappings":";;;AAEA,iDAAyC;AACzC,mHAAoG;AACpG,mFAAsE;AACtE,+DAAwD;AACxD,6DAAiD;AACjD,yFAA4E;AAE5E,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB,kBAAe,IAAA,2CAAe,EAAC,CAC7B,OAAuB,EACvB,OAAwB,EACxB,EAAE;IACF,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACvH,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAA,mEAA0B,EAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAEpF,IAAA,uBAAQ,EAAC,OAAO,EAAE,YAAY,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACrD,IAAA,wBAAQ,EAAC,IAAA,gBAAE,EAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAEhE,MAAM,IAAA,qCAAY,EAAC,EAAE,YAAY,EAAE,YAAY,IAAI,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;AAEhM,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/schema",
|
|
3
|
-
"version": 2,
|
|
4
|
-
"title": "Deploy Lambda executor",
|
|
5
|
-
"description": "",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"bucket": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "Name of the S3 bucket to use for uploading Lambda artifacts"
|
|
11
|
-
},
|
|
12
|
-
"functionName": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"description": "Name to use for lambda. Defaults to context.projectName for clarity"
|
|
15
|
-
},
|
|
16
|
-
"profile": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "AWS profile name (which must be defined in the ~/.aws/credentials file) if AWS keys aren't defined as env vars"
|
|
19
|
-
},
|
|
20
|
-
"region": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"description": "AWS region for identifying the ECS service to redeploy"
|
|
23
|
-
},
|
|
24
|
-
"roleArn": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"description": "AWS IAM role ARN the Lambda will assume"
|
|
27
|
-
},
|
|
28
|
-
"runtime": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"description": "NodeJS runtime version"
|
|
31
|
-
},
|
|
32
|
-
"handler": {
|
|
33
|
-
"type": "string",
|
|
34
|
-
"description": "Lambda handler resolution expression. Defaults to main.handler"
|
|
35
|
-
},
|
|
36
|
-
"memorySize": {
|
|
37
|
-
"type": "number",
|
|
38
|
-
"description": "Lambda allocated memory in MB"
|
|
39
|
-
},
|
|
40
|
-
"delayMs": {
|
|
41
|
-
"type": "number",
|
|
42
|
-
"description": "Delay in millis to wait after creating the Lambda (hacky)"
|
|
43
|
-
},
|
|
44
|
-
"environment": {
|
|
45
|
-
"type": "object",
|
|
46
|
-
"additionalProperties": {
|
|
47
|
-
"type": "string"
|
|
48
|
-
},
|
|
49
|
-
"description": "Environment variables structured as an object"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"required": [
|
|
53
|
-
"bucket",
|
|
54
|
-
"region",
|
|
55
|
-
"roleArn"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const child_process_1 = require("child_process");
|
|
6
|
-
const executor_factory_function_1 = require("../../functions/executor-factory.function");
|
|
7
|
-
exports.default = (0, executor_factory_function_1.executorFactory)((options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
-
const { envFile, ecr, port } = options;
|
|
9
|
-
const envFileExpression = envFile ? ` --env-file "${envFile}"` : '';
|
|
10
|
-
const command = `open http://localhost:${port} & docker run -p ${port}:${port} --env="PORT=${port}"${envFileExpression} "${ecr}"`;
|
|
11
|
-
devkit_1.logger.info(command);
|
|
12
|
-
(0, child_process_1.execSync)(command);
|
|
13
|
-
}));
|
|
14
|
-
//# sourceMappingURL=executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/docker-run/executor.ts"],"names":[],"mappings":";;;AAAA,uCAAqD;AAErD,iDAAyC;AACzC,yFAA4E;AAE5E,kBAAe,IAAA,2CAAe,EAAC,CAC7B,OAAuB,EACvB,OAAwB,EACxB,EAAE;IACF,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEvC,MAAM,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,gBAAgB,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IACpE,MAAM,OAAO,GAAG,yBAAyB,IAAI,oBAAoB,IAAI,IAAI,IAAI,gBAAgB,IAAI,IAAI,iBAAiB,KAAK,GAAG,GAAG,CAAC;IAElI,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAErB,IAAA,wBAAQ,EAAC,OAAO,CAAC,CAAC;AACpB,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const child_process_1 = require("child_process");
|
|
5
|
-
const executor_factory_function_1 = require("../../functions/executor-factory.function");
|
|
6
|
-
exports.default = (0, executor_factory_function_1.executorFactory)((_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ flavor = 'typescript-axios', openapiJsonPath, outputPath }) {
|
|
7
|
-
(0, child_process_1.execSync)(`rm -rf ${outputPath}`, { stdio: 'inherit' });
|
|
8
|
-
(0, child_process_1.execSync)(`mkdir -p ${outputPath}`, { stdio: 'inherit' });
|
|
9
|
-
(0, child_process_1.execSync)(`docker run --rm -v .:/local openapitools/openapi-generator-cli:v6.3.0 generate -i local/${openapiJsonPath} -g ${flavor} -o local/${outputPath}`, { stdio: 'inherit' });
|
|
10
|
-
}));
|
|
11
|
-
//# sourceMappingURL=executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/openapi-gen/executor.ts"],"names":[],"mappings":";;;AAAA,iDAAyC;AACzC,yFAA4E;AAG5E,kBAAe,IAAA,2CAAe,EAAC,KAAqF,EAAE,oDAAhF,EAAE,MAAM,GAAG,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAkB;IAChH,IAAA,wBAAQ,EAAC,UAAU,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACvD,IAAA,wBAAQ,EAAC,YAAY,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACzD,IAAA,wBAAQ,EAAC,2FAA2F,eAAe,OAAO,MAAM,aAAa,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AACnL,CAAC,CAAA,CAAC,CAAC"}
|