@onivoro/onix 20.0.3 → 20.0.4
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 +2 -2
- package/package.json +1 -1
- package/src/executors/deploy/executor.js +27 -14
- package/src/executors/deploy/executor.js.map +1 -1
- package/src/executors/deploy/schema.d.ts +5 -4
- package/src/executors/deploy/schema.json +9 -8
- package/src/executors/local/executor.js +5 -6
- package/src/executors/local/executor.js.map +1 -1
- package/src/executors/local/schema.d.ts +1 -1
- package/src/executors/local/schema.json +5 -7
- package/src/functions/extract-project-build-assets.function.d.ts +2 -0
- package/src/functions/extract-project-build-assets.function.js +19 -0
- package/src/functions/extract-project-build-assets.function.js.map +1 -0
- package/src/functions/extract-project-build-outputs.function.d.ts +2 -0
- package/src/functions/extract-project-build-outputs.function.js +19 -0
- package/src/functions/extract-project-build-outputs.function.js.map +1 -0
- package/src/functions/extract-project-configuration.function.d.ts +2 -0
- package/src/functions/extract-project-configuration.function.js +14 -0
- package/src/functions/extract-project-configuration.function.js.map +1 -0
- package/src/functions/load-env-file.function.d.ts +1 -0
- package/src/functions/load-env-file.function.js +16 -0
- package/src/functions/load-env-file.function.js.map +1 -0
- package/src/functions/push-image-to-ecr.function.js +1 -1
- package/src/functions/push-image-to-ecr.function.js.map +1 -1
- package/src/index.d.ts +3 -0
- package/src/index.js +3 -0
- package/src/index.js.map +1 -1
package/executors.json
CHANGED
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"schema": "./src/executors/gen/schema.json",
|
|
26
26
|
"description": "gen-axios"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
28
|
+
"local": {
|
|
29
29
|
"implementation": "./src/executors/local/executor",
|
|
30
30
|
"schema": "./src/executors/local/schema.json",
|
|
31
|
-
"description": "
|
|
31
|
+
"description": "local"
|
|
32
32
|
},
|
|
33
33
|
"lee": {
|
|
34
34
|
"implementation": "./src/executors/lee/executor",
|
package/package.json
CHANGED
|
@@ -3,22 +3,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
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("onix/src/functions/extract-project-build-outputs.function");
|
|
8
|
+
const extract_project_build_assets_function_1 = require("onix/src/functions/extract-project-build-assets.function");
|
|
9
|
+
const stdio = 'inherit';
|
|
6
10
|
const executor = (options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
-
const {
|
|
11
|
+
const { ecr, profile, dockerfile, ui } = options;
|
|
8
12
|
try {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
const [apiProjectAssetPath] = (0, extract_project_build_assets_function_1.extractProjectBuildAssets)(context, context.projectName);
|
|
14
|
+
if (ui) {
|
|
15
|
+
if (apiProjectAssetPath) {
|
|
16
|
+
const webProjectOutputs = (0, extract_project_build_outputs_function_1.extractProjectBuildOutputs)(context, ui);
|
|
17
|
+
if (webProjectOutputs === null || webProjectOutputs === void 0 ? void 0 : webProjectOutputs.length) {
|
|
18
|
+
(0, child_process_1.execSync)(`npx nx build ${ui}`, { stdio });
|
|
19
|
+
webProjectOutputs.forEach(element => {
|
|
20
|
+
(0, child_process_1.execSync)(`cp -R ${element} ${apiProjectAssetPath}`, { stdio });
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
devkit_1.logger.warn(`unable to locate target "build" outputs within project configuration for specified webProjectName "${ui}"`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
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}"`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const [projectOutput] = (0, extract_project_build_outputs_function_1.extractProjectBuildOutputs)(context, context.projectName);
|
|
32
|
+
(0, child_process_1.execSync)(`'docker build --build-arg APP_DIST="${projectOutput}" -f ${dockerfile} -t ${ecr} .`, { stdio });
|
|
33
|
+
yield (0, push_image_to_ecr_wrapped_function_1.pushImageToECRWrapped)({ ecr, profile });
|
|
34
|
+
// restart cluster service by converting this to use '@aws-sdk' instead of cli as shown =>>>>> aws ecs update-service --cluster ${prefix}-cluster --service ${prefix}-service --force-new-deployment --profile ${profile} --region us-east-2`;
|
|
22
35
|
return {
|
|
23
36
|
success: true,
|
|
24
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/deploy/executor.ts"],"names":[],"mappings":";;;AAAA,uCAAsE;AAEtE,iDAAyC;
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/deploy/executor.ts"],"names":[],"mappings":";;;AAAA,uCAAsE;AAEtE,iDAAyC;AACzC,2GAA2F;AAC3F,sHAAuG;AACvG,oHAAqG;AAErG,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB,MAAM,QAAQ,GAAoC,CAChD,OAAuB,EACvB,OAAwB,EACxB,EAAE;IACF,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;IAEjD,IAAI,CAAC;QACH,MAAM,CAAC,mBAAmB,CAAC,GAAG,IAAA,iEAAyB,EAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;QAEtF,IAAI,EAAE,EAAE,CAAC;YACP,IAAI,mBAAmB,EAAE,CAAC;gBACxB,MAAM,iBAAiB,GAAG,IAAA,mEAA0B,EAAC,OAAO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name of the .env file to load"
|
|
11
|
-
},
|
|
12
8
|
"ecr": {
|
|
13
9
|
"type": "string",
|
|
14
10
|
"description": "Name of the ECR repository and tag (conventionally separated by a colon)"
|
|
15
11
|
},
|
|
16
|
-
"
|
|
12
|
+
"dockerfile": {
|
|
17
13
|
"type": "string",
|
|
18
|
-
"description": "
|
|
14
|
+
"description": "Path and name of the Dockerfile"
|
|
19
15
|
},
|
|
20
16
|
"profile": {
|
|
21
17
|
"type": "string",
|
|
22
|
-
"description": "
|
|
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
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"required": [
|
|
26
|
-
"
|
|
26
|
+
"ecr",
|
|
27
|
+
"dockerfile"
|
|
27
28
|
]
|
|
28
29
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const child_process_1 = require("child_process");
|
|
5
|
-
const
|
|
6
|
+
const load_env_file_function_1 = require("../../functions/load-env-file.function");
|
|
6
7
|
const runExecutor = (options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
-
const { debugPort,
|
|
8
|
+
const { debugPort, envFile } = options;
|
|
8
9
|
try {
|
|
9
|
-
|
|
10
|
-
(0, process_1.loadEnvFile)(envPath);
|
|
11
|
-
}
|
|
10
|
+
(0, load_env_file_function_1.loadEnvFile)(envFile);
|
|
12
11
|
const inspectStatement = debugPort ? `--port=${debugPort}` : '';
|
|
13
12
|
const command = `npx nx run ${context.projectName}:serve ${inspectStatement}`;
|
|
14
|
-
|
|
13
|
+
devkit_1.logger.debug(command);
|
|
15
14
|
(0, child_process_1.execSync)(command, { stdio: 'inherit' });
|
|
16
15
|
return {
|
|
17
16
|
success: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/local/executor.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/local/executor.ts"],"names":[],"mappings":";;;AAAA,uCAIoB;AACpB,iDAAyC;AAEzC,mFAAqE;AAErE,MAAM,WAAW,GAAoC,CACnD,OAAuB,EACvB,OAAwB,EACxB,EAAE;IACF,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAEvC,IAAI,CAAC;QACH,IAAA,oCAAW,EAAC,OAAO,CAAC,CAAC;QAErB,MAAM,gBAAgB,GAAG,SAAS,CAAC,CAAC,CAAC,UAAU,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChE,MAAM,OAAO,GAAG,cAAc,OAAO,CAAC,WAAW,UAAU,gBAAgB,EAAE,CAAC;QAC9E,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtB,IAAA,wBAAQ,EAAC,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAExC,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;AACH,CAAC,CAAA,CAAA;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -5,16 +5,14 @@
|
|
|
5
5
|
"description": "",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
|
-
"envPath": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "Path and name of the .env file to load"
|
|
11
|
-
},
|
|
12
8
|
"debugPort": {
|
|
13
9
|
"type": "number",
|
|
14
10
|
"description": "Debug port"
|
|
11
|
+
},
|
|
12
|
+
"envFile": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Path and name of the .env file to load"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"required": [
|
|
18
|
-
"envPath"
|
|
19
|
-
]
|
|
17
|
+
"required": []
|
|
20
18
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractProjectBuildAssets = extractProjectBuildAssets;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const extract_project_configuration_function_1 = require("./extract-project-configuration.function");
|
|
6
|
+
function extractProjectBuildAssets(context, projectName) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const projectConfiguration = (0, extract_project_configuration_function_1.extractProjectConfiguration)(context, projectName);
|
|
9
|
+
if (projectConfiguration) {
|
|
10
|
+
if ((_a = projectConfiguration.targets) === null || _a === void 0 ? void 0 : _a.build) {
|
|
11
|
+
return ((_b = projectConfiguration.targets.build.options) === null || _b === void 0 ? void 0 : _b.assets) || [];
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
devkit_1.logger.warn(`project "${projectName}" does not have a "build" target`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=extract-project-build-assets.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-project-build-assets.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/extract-project-build-assets.function.ts"],"names":[],"mappings":";;AAGA,8DAYC;AAfD,uCAAqD;AACrD,qGAAuF;AAEvF,SAAgB,yBAAyB,CAAE,OAAwB,EAAE,WAAmB;;IACpF,MAAM,oBAAoB,GAAG,IAAA,oEAA2B,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAE/E,IAAI,oBAAoB,EAAE,CAAC;QACvB,IAAG,MAAA,oBAAoB,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;YACrC,OAAO,CAAA,MAAA,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,0CAAE,MAAM,KAAI,EAAE,CAAC;QACpE,CAAC;aAAM,CAAC;YACJ,eAAM,CAAC,IAAI,CAAC,YAAY,WAAW,kCAAkC,CAAC,CAAA;QAC1E,CAAC;IACL,CAAC;IAED,OAAO,EAAE,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractProjectBuildOutputs = extractProjectBuildOutputs;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const extract_project_configuration_function_1 = require("./extract-project-configuration.function");
|
|
6
|
+
function extractProjectBuildOutputs(context, projectName) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const projectConfiguration = (0, extract_project_configuration_function_1.extractProjectConfiguration)(context, projectName);
|
|
9
|
+
if (projectConfiguration) {
|
|
10
|
+
if ((_a = projectConfiguration.targets) === null || _a === void 0 ? void 0 : _a.build) {
|
|
11
|
+
return ((_b = projectConfiguration.targets.build.options) === null || _b === void 0 ? void 0 : _b.outputPath) || projectConfiguration.targets.build.outputs || [];
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
devkit_1.logger.warn(`project "${projectName}" does not have a "build" target`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=extract-project-build-outputs.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-project-build-outputs.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/extract-project-build-outputs.function.ts"],"names":[],"mappings":";;AAGA,gEAYC;AAfD,uCAAqD;AACrD,qGAAuF;AAEvF,SAAgB,0BAA0B,CAAE,OAAwB,EAAE,WAAmB;;IACrF,MAAM,oBAAoB,GAAG,IAAA,oEAA2B,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAE/E,IAAI,oBAAoB,EAAE,CAAC;QACvB,IAAG,MAAA,oBAAoB,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;YACrC,OAAO,CAAA,MAAA,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,0CAAE,UAAU,KAAI,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;QACtH,CAAC;aAAM,CAAC;YACJ,eAAM,CAAC,IAAI,CAAC,YAAY,WAAW,kCAAkC,CAAC,CAAA;QAC1E,CAAC;IACL,CAAC;IAED,OAAO,EAAE,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractProjectConfiguration = extractProjectConfiguration;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
function extractProjectConfiguration(context, projectName) {
|
|
6
|
+
const projectConfiguration = context.projectsConfigurations.projects[projectName];
|
|
7
|
+
if (projectConfiguration) {
|
|
8
|
+
return projectConfiguration;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
devkit_1.logger.warn(`cannot locate project configuration for specified projectName "${projectName}" among ${Object.keys(context.projectsConfigurations.projects).map(_ => `"${_}"`).join(', ')}`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=extract-project-configuration.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-project-configuration.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/extract-project-configuration.function.ts"],"names":[],"mappings":";;AAEA,kEAQC;AAVD,uCAAqD;AAErD,SAAgB,2BAA2B,CAAC,OAAwB,EAAE,WAAmB;IACrF,MAAM,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAElF,IAAI,oBAAoB,EAAE,CAAC;QACvB,OAAO,oBAAoB,CAAC;IAChC,CAAC;SAAM,CAAC;QACJ,eAAM,CAAC,IAAI,CAAC,kEAAkE,WAAW,WAAW,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9L,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function loadEnvFile(envFile: string): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadEnvFile = loadEnvFile;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
function loadEnvFile(envFile) {
|
|
7
|
+
if (envFile) {
|
|
8
|
+
if ((0, fs_1.existsSync)(envFile)) {
|
|
9
|
+
loadEnvFile(envFile);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
devkit_1.logger.warn(`specified environment path "${envFile}" does not exist`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=load-env-file.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-env-file.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/load-env-file.function.ts"],"names":[],"mappings":";;AAGA,kCAQC;AAXD,uCAAoC;AACpC,2BAAgC;AAEhC,SAAgB,WAAW,CAAC,OAAe;IACvC,IAAI,OAAO,EAAE,CAAC;QACV,IAAG,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;YACrB,WAAW,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACJ,eAAM,CAAC,IAAI,CAAC,+BAA+B,OAAO,kBAAkB,CAAC,CAAC;QAC1E,CAAC;IACL,CAAC;AACL,CAAC"}
|
|
@@ -9,7 +9,7 @@ function pushImageToECR(_a) {
|
|
|
9
9
|
return tslib_1.__awaiter(this, arguments, void 0, function* ({ region, repositoryName, imageTag, registryId, profile }) {
|
|
10
10
|
var _b, _c;
|
|
11
11
|
try {
|
|
12
|
-
const config = { region, credentials: (0, credential_providers_1.fromIni)({ profile }) };
|
|
12
|
+
const config = { region, credentials: profile ? (0, credential_providers_1.fromIni)({ profile }) : undefined };
|
|
13
13
|
const ecrClient = new client_ecr_1.ECRClient(config);
|
|
14
14
|
const authCommand = new client_ecr_1.GetAuthorizationTokenCommand({
|
|
15
15
|
registryIds: registryId ? [registryId] : undefined
|
|
@@ -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":";;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;
|
|
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,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E,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"}
|
package/src/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export * from './functions/add-docker-targets.function';
|
|
|
6
6
|
export * from './functions/add-serve-target.function';
|
|
7
7
|
export * from './functions/add-serve-targets.function';
|
|
8
8
|
export * from './functions/build-onix-targets.function';
|
|
9
|
+
export * from './functions/extract-project-build-outputs.function';
|
|
10
|
+
export * from './functions/extract-project-configuration.function';
|
|
11
|
+
export * from './functions/load-env-file.function';
|
|
9
12
|
export * from './functions/normalize-output-path.function';
|
|
10
13
|
export * from './functions/read-targets-cache.function';
|
|
11
14
|
export * from './functions/write-targets-to-cache.function';
|
package/src/index.js
CHANGED
|
@@ -11,6 +11,9 @@ tslib_1.__exportStar(require("./functions/add-docker-targets.function"), exports
|
|
|
11
11
|
tslib_1.__exportStar(require("./functions/add-serve-target.function"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("./functions/add-serve-targets.function"), exports);
|
|
13
13
|
tslib_1.__exportStar(require("./functions/build-onix-targets.function"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./functions/extract-project-build-outputs.function"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./functions/extract-project-configuration.function"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./functions/load-env-file.function"), exports);
|
|
14
17
|
tslib_1.__exportStar(require("./functions/normalize-output-path.function"), exports);
|
|
15
18
|
tslib_1.__exportStar(require("./functions/read-targets-cache.function"), exports);
|
|
16
19
|
tslib_1.__exportStar(require("./functions/write-targets-to-cache.function"), exports);
|
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,iFAAuD;AACvD,kFAAwD;AACxD,gFAAsD;AACtD,iFAAuD;AACvD,kFAAwD;AACxD,qFAA2D;AAC3D,kFAAwD;AACxD,sFAA4D"}
|
|
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,6FAAmE;AACnE,6FAAmE;AACnE,6EAAmD;AACnD,qFAA2D;AAC3D,kFAAwD;AACxD,sFAA4D"}
|