@onivoro/onix 20.0.43 → 20.0.45
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 +4 -4
- package/package.json +1 -1
- package/src/executors/deploy-lambda/schema.d.ts +1 -1
- package/src/executors/docker/executor.d.ts +2 -3
- package/src/executors/docker/executor.js +7 -17
- package/src/executors/docker/executor.js.map +1 -1
- package/src/executors/docker/schema.d.ts +2 -1
- package/src/executors/docker/schema.json +8 -4
- package/src/executors/local/executor.js +1 -1
- package/src/executors/local/executor.js.map +1 -1
- package/src/executors/openapi-gen/executor.d.ts +3 -0
- package/src/executors/openapi-gen/executor.js +11 -0
- package/src/executors/openapi-gen/executor.js.map +1 -0
- package/src/executors/openapi-gen/schema.d.ts +5 -0
- package/src/executors/openapi-gen/schema.json +25 -0
- package/src/executors/gen/executor.d.ts +0 -4
- package/src/executors/gen/executor.js +0 -19
- package/src/executors/gen/executor.js.map +0 -1
- package/src/executors/gen/schema.d.ts +0 -3
- package/src/executors/gen/schema.json +0 -14
package/executors.json
CHANGED
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"schema": "./src/executors/deploy-ecs/schema.json",
|
|
26
26
|
"description": "deploy-ecs"
|
|
27
27
|
},
|
|
28
|
-
"gen
|
|
29
|
-
"implementation": "./src/executors/gen/executor",
|
|
30
|
-
"schema": "./src/executors/gen/schema.json",
|
|
31
|
-
"description": "gen
|
|
28
|
+
"openapi-gen": {
|
|
29
|
+
"implementation": "./src/executors/openapi-gen/executor",
|
|
30
|
+
"schema": "./src/executors/openapi-gen/schema.json",
|
|
31
|
+
"description": "openapi-gen"
|
|
32
32
|
},
|
|
33
33
|
"local": {
|
|
34
34
|
"implementation": "./src/executors/local/executor",
|
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PromiseExecutor } from '@nx/devkit';
|
|
2
1
|
import { ExecutorSchema } from './schema';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
2
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<ExecutorSchema>;
|
|
3
|
+
export default _default;
|
|
@@ -3,22 +3,12 @@ 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
|
|
7
|
-
|
|
6
|
+
const executor_factory_function_1 = require("onix/src/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;
|
|
8
9
|
const localPort = (Number(port) + 2000);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return {
|
|
14
|
-
success: true,
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
return {
|
|
19
|
-
success: false,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
exports.default = executor;
|
|
10
|
+
const command = `open http://localhost:${localPort} & docker run -p ${localPort}:${port} --env="PORT=${port}" --env-file "${envFile}" "${ecr}"`;
|
|
11
|
+
devkit_1.logger.info(command);
|
|
12
|
+
(0, child_process_1.execSync)(command);
|
|
13
|
+
}));
|
|
24
14
|
//# sourceMappingURL=executor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/docker/executor.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/docker/executor.ts"],"names":[],"mappings":";;;AAAA,uCAAqD;AAErD,iDAAyC;AACzC,4FAA+E;AAE/E,kBAAe,IAAA,2CAAe,EAAC,CAC7B,OAAuB,EACvB,OAAwB,EACxB,EAAE;IACF,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACvC,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAExC,MAAM,OAAO,GAAG,yBAAyB,SAAS,oBAAoB,SAAS,IAAI,IAAI,gBAAgB,IAAI,iBAAiB,OAAO,MAAM,GAAG,GAAG,CAAC;IAEhJ,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAErB,IAAA,wBAAQ,EAAC,OAAO,CAAC,CAAC;AACpB,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"version": 2,
|
|
4
|
-
"title": "
|
|
4
|
+
"title": "Docker executor",
|
|
5
5
|
"description": "",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
|
-
"
|
|
8
|
+
"envFile": {
|
|
9
9
|
"type": "string",
|
|
10
10
|
"description": "Path and name of the .env file to load"
|
|
11
11
|
},
|
|
@@ -13,12 +13,16 @@
|
|
|
13
13
|
"type": "string",
|
|
14
14
|
"description": "Name of the ECR repository and tag (conventionally separated by a colon)"
|
|
15
15
|
},
|
|
16
|
+
"localPort": {
|
|
17
|
+
"type": "number",
|
|
18
|
+
"description": "Local port to bind to localhost"
|
|
19
|
+
},
|
|
16
20
|
"port": {
|
|
17
|
-
"type": "
|
|
21
|
+
"type": "number",
|
|
18
22
|
"description": "Port docker port to bind to localhost"
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
25
|
"required": [
|
|
22
|
-
"
|
|
26
|
+
"envFile", "ecr", "port"
|
|
23
27
|
]
|
|
24
28
|
}
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
6
|
const load_env_file_function_1 = require("../../functions/load-env-file.function");
|
|
7
|
-
const executor_factory_function_1 = require("
|
|
7
|
+
const executor_factory_function_1 = require("../../functions/executor-factory.function");
|
|
8
8
|
exports.default = (0, executor_factory_function_1.executorFactory)((options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
9
9
|
const { debugPort, envFile } = options;
|
|
10
10
|
(0, load_env_file_function_1.loadEnvFile)(envFile);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/local/executor.ts"],"names":[],"mappings":";;;AAAA,uCAGoB;AACpB,
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/local/executor.ts"],"names":[],"mappings":";;;AAAA,uCAGoB;AACpB,iDAA0C;AAE1C,mFAAqE;AACrE,yFAA4E;AAE5E,kBAAe,IAAA,2CAAe,EAAC,CAC7B,OAAuB,EACvB,OAAwB,EACxB,EAAE;IACF,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAEvC,IAAA,oCAAW,EAAC,OAAO,CAAC,CAAC;IAErB,MAAM,gBAAgB,GAAG,SAAS,CAAC,CAAC,CAAC,UAAU,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAEhE,MAAM,OAAO,GAAG,cAAc,OAAO,CAAC,WAAW,UAAU,gBAAgB,EAAE,CAAC;IAE9E,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEtB,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE9C,IAAA,yBAAS,EAAC,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AACjD,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"title": "Openapi-gen executor",
|
|
5
|
+
"description": "",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"flavor": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Lowercase identifier corresponding to one of the predefined openapi generator target formats. Defaults to 'typescript-axios'."
|
|
11
|
+
},
|
|
12
|
+
"openapiJsonPath": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Path to the openapi definition JSON file (or yml file)."
|
|
15
|
+
},
|
|
16
|
+
"outputPath": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Path where the output of the openapi will be written."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"openapiJsonPath",
|
|
23
|
+
"outputPath"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -1,19 +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 runExecutor = (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ moniker }) {
|
|
6
|
-
try {
|
|
7
|
-
(0, child_process_1.execSync)(`rm -rf libs/axios/${moniker}/src/lib`, { stdio: 'inherit' });
|
|
8
|
-
(0, child_process_1.execSync)(`mkdir -p libs/axios/${moniker}`, { stdio: 'inherit' });
|
|
9
|
-
(0, child_process_1.execSync)(`docker run --rm -v .:/local openapitools/openapi-generator-cli:v6.3.0 generate -i local/api-dox/app-api-${moniker}.json -g typescript-axios -o local/libs/axios/${moniker}/src/lib`, { stdio: 'inherit' });
|
|
10
|
-
return {
|
|
11
|
-
success: true,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
catch (error) {
|
|
15
|
-
return { success: false };
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
exports.default = runExecutor;
|
|
19
|
-
//# sourceMappingURL=executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/gen/executor.ts"],"names":[],"mappings":";;;AAEA,iDAAyC;AAEzC,MAAM,WAAW,GAAoC,KAAoB,EAAE,oDAAf,EAAE,OAAO,EAAE;IACrE,IAAI,CAAC;QACH,IAAA,wBAAQ,EAAC,qBAAqB,OAAO,UAAU,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACvE,IAAA,wBAAQ,EAAC,uBAAuB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACjE,IAAA,wBAAQ,EAAC,2GAA2G,OAAO,iDAAiD,OAAO,UAAU,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAErN,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,kBAAe,WAAW,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/schema",
|
|
3
|
-
"version": 2,
|
|
4
|
-
"title": "Gen executor",
|
|
5
|
-
"description": "",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"moniker": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "Lowercase single-word identifier used to consistently distinguish related projects and libraries"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"required": []
|
|
14
|
-
}
|