@onivoro/onix 20.0.47 → 20.0.49

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onivoro/onix",
3
- "version": "20.0.47",
3
+ "version": "20.0.49",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
@@ -1,4 +1,3 @@
1
- import { PromiseExecutor } from '@nx/devkit';
2
1
  import { ExecutorSchema } from './schema';
3
- declare const runExecutor: PromiseExecutor<ExecutorSchema>;
4
- export default runExecutor;
2
+ declare const _default: import("@nx/devkit").PromiseExecutor<ExecutorSchema>;
3
+ export default _default;
@@ -3,18 +3,15 @@ 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 runExecutor = (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ moniker }) {
7
- try {
8
- const command = `nx build app-cli-${moniker} --skip-nx-cache && echo '#! /usr/bin/env node' >> dist/temp && cat dist/apps/cli/${moniker}/main.js >> dist/temp && mv dist/temp dist/apps/cli/${moniker}/main.js && chmod +x dist/apps/cli/${moniker}/main.js && npm link`;
9
- devkit_1.logger.info(command);
10
- (0, child_process_1.execSync)(command, { stdio: 'inherit' });
11
- return {
12
- success: true,
13
- };
14
- }
15
- catch (error) {
16
- return { success: false };
17
- }
18
- });
19
- exports.default = runExecutor;
6
+ const executor_factory_function_1 = require("../../functions/executor-factory.function");
7
+ const extract_project_build_outputs_function_1 = require("../../functions/extract-project-build-outputs.function");
8
+ exports.default = (0, executor_factory_function_1.executorFactory)((options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
9
+ const [outputPath] = (0, extract_project_build_outputs_function_1.extractProjectBuildOutputs)(context, context.projectName);
10
+ const tempPath = `${outputPath}/temp`;
11
+ const executableOutputPath = `${outputPath}/main.js`;
12
+ devkit_1.logger.info(`add a bin entry to root package.json pointing at this executable => ${executableOutputPath} and re-run this if the bin entry hasn't been added yet`);
13
+ const command = `npx nx build ${context.projectName} && echo '#! /usr/bin/env node' > ${tempPath} && cat ${executableOutputPath} >> ${tempPath} && mv ${tempPath} ${executableOutputPath} && chmod +x ${executableOutputPath} && npm link`;
14
+ devkit_1.logger.info(command);
15
+ (0, child_process_1.execSync)(command, { stdio: 'inherit' });
16
+ }));
20
17
  //# sourceMappingURL=executor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/build-cli/executor.ts"],"names":[],"mappings":";;;AAAA,uCAAqD;AAErD,iDAAyC;AAEzC,MAAM,WAAW,GAAoC,KAAoB,EAAE,oDAAf,EAAE,OAAO,EAAE;IACrE,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,oBAAoB,OAAO,qFAAqF,OAAO,uDAAuD,OAAO,sCAAsC,OAAO,sBAAsB,CAAC;QAEzQ,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAErB,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,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,kBAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/build-cli/executor.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AAEpC,iDAAyC;AACzC,yFAA4E;AAC5E,mHAAoG;AAEpG,kBAAe,IAAA,2CAAe,EAAC,CAAO,OAAuB,EAAE,OAAO,EAAE,EAAE;IACxE,MAAM,CAAC,UAAU,CAAC,GAAG,IAAA,mEAA0B,EAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9E,MAAM,QAAQ,GAAG,GAAG,UAAU,OAAO,CAAC;IACtC,MAAM,oBAAoB,GAAG,GAAG,UAAU,UAAU,CAAC;IACrD,eAAM,CAAC,IAAI,CAAC,uEAAuE,oBAAoB,yDAAyD,CAAC,CAAC;IAClK,MAAM,OAAO,GAAG,gBAAgB,OAAO,CAAC,WAAW,qCAAqC,QAAQ,WAAW,oBAAoB,OAAO,QAAQ,UAAU,QAAQ,IAAI,oBAAoB,gBAAgB,oBAAoB,cAAc,CAAC;IAE3O,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAErB,IAAA,wBAAQ,EAAC,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAC1C,CAAC,CAAA,CAAC,CAAC"}
@@ -1,3 +1 @@
1
- export interface ExecutorSchema {
2
- moniker: string;
3
- }
1
+ export interface ExecutorSchema {}
@@ -1,14 +1,9 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "version": 2,
4
- "title": "Gen executor",
4
+ "title": "Build-cli executor",
5
5
  "description": "",
6
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
- },
7
+ "properties": {},
13
8
  "required": []
14
9
  }
@@ -1,4 +1,3 @@
1
- import { PromiseExecutor } from '@nx/devkit';
2
1
  import { ExecutorSchema } from './schema';
3
- declare const runExecutor: PromiseExecutor<ExecutorSchema>;
4
- export default runExecutor;
2
+ declare const _default: import("@nx/devkit").PromiseExecutor<ExecutorSchema>;
3
+ export default _default;
@@ -3,19 +3,15 @@ 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 get_project_path_from_name_function_1 = require("../../utils/get-project-path-from-name.function");
7
- const runExecutor = (options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
8
- try {
9
- const command = `playwright test -c ${(0, get_project_path_from_name_function_1.getProjectPathFromName)(context.projectName)}/playwright.config.ts`;
10
- devkit_1.logger.info(command);
11
- (0, child_process_1.execSync)(command, { stdio: 'inherit' });
12
- return {
13
- success: true,
14
- };
15
- }
16
- catch (error) {
17
- return { success: false };
18
- }
19
- });
20
- exports.default = runExecutor;
6
+ const executor_factory_function_1 = require("../../functions/executor-factory.function");
7
+ const load_env_file_function_1 = require("../../functions/load-env-file.function");
8
+ const extract_project_configuration_function_1 = require("../../functions/extract-project-configuration.function");
9
+ exports.default = (0, executor_factory_function_1.executorFactory)((options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
10
+ const { envFile } = options;
11
+ (0, load_env_file_function_1.loadEnvFile)(envFile);
12
+ const root = (0, extract_project_configuration_function_1.extractProjectConfiguration)(context, context.projectName).root;
13
+ const command = `playwright test -c ${root}/playwright.config.ts`;
14
+ devkit_1.logger.info(command);
15
+ (0, child_process_1.execSync)(command, { stdio: 'inherit' });
16
+ }));
21
17
  //# sourceMappingURL=executor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/playwright/executor.ts"],"names":[],"mappings":";;;AAAA,uCAAqD;AAErD,iDAAyC;AACzC,yGAAyF;AAEzF,MAAM,WAAW,GAAoC,CAAO,OAAO,EAAE,OAAO,EAAE,EAAE;IAC9E,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,sBAAsB,IAAA,4DAAsB,EAAC,OAAO,CAAC,WAAY,CAAC,uBAAuB,CAAC;QAE1G,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAErB,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,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,kBAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/playwright/executor.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AAEpC,iDAAyC;AACzC,yFAA4E;AAC5E,mFAAqE;AACrE,mHAAqG;AAErG,kBAAe,IAAA,2CAAe,EAAC,CAAO,OAAuB,EAAE,OAAO,EAAE,EAAE;IACxE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE5B,IAAA,oCAAW,EAAC,OAAO,CAAC,CAAC;IAErB,MAAM,IAAI,GAAG,IAAA,oEAA2B,EAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;IAE5E,MAAM,OAAO,GAAG,sBAAsB,IAAI,uBAAuB,CAAC;IAElE,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAErB,IAAA,wBAAQ,EAAC,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAC1C,CAAC,CAAA,CAAC,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export interface ExecutorSchema {
2
+ envFile?: string;
2
3
  }
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "version": 2,
4
- "title": "Gen executor",
4
+ "title": "Playwright executor",
5
5
  "description": "",
6
6
  "type": "object",
7
7
  "properties": {
8
+ "envFile": {
9
+ "type": "string",
10
+ "description": "Path and name of the .env file to load"
11
+ }
8
12
  },
9
13
  "required": []
10
14
  }
@@ -1,4 +1,3 @@
1
- import { PromiseExecutor } from '@nx/devkit';
2
1
  import { ExecutorSchema } from './schema';
3
- declare const executor: PromiseExecutor<ExecutorSchema>;
4
- export default executor;
2
+ declare const _default: import("@nx/devkit").PromiseExecutor<ExecutorSchema>;
3
+ export default _default;
@@ -1,26 +1,12 @@
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");
5
4
  const child_process_1 = require("child_process");
6
- const process_1 = require("process");
7
- const executor = (options, context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
8
- const { envPath, ormConfigPath, runOrRevert } = options;
9
- try {
10
- if (envPath) {
11
- devkit_1.logger.info(`using "${envPath}"`);
12
- (0, process_1.loadEnvFile)(envPath);
13
- }
14
- (0, child_process_1.execSync)(`npm run typeorm -- -d ${ormConfigPath} migration:${runOrRevert} -t=false`, { stdio: 'inherit' });
15
- return {
16
- success: true,
17
- };
18
- }
19
- catch (error) {
20
- return {
21
- success: false,
22
- };
23
- }
24
- });
25
- exports.default = executor;
5
+ const load_env_file_function_1 = require("../../functions/load-env-file.function");
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, ormConfigPath, runOrRevert } = options;
9
+ (0, load_env_file_function_1.loadEnvFile)(envFile);
10
+ (0, child_process_1.execSync)(`npm run typeorm -- -d ${ormConfigPath} migration:${runOrRevert} -t=false`, { stdio: 'inherit' });
11
+ }));
26
12
  //# sourceMappingURL=executor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/typeorm/executor.ts"],"names":[],"mappings":";;;AAAA,uCAAsE;AAEtE,iDAAyC;AACzC,qCAAsC;AAEtC,MAAM,QAAQ,GAAoC,CAChD,OAAuB,EACvB,OAAwB,EACxB,EAAE;IACF,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAGxD,IAAI,CAAC;QACH,IAAG,OAAO,EAAE,CAAC;YACX,eAAM,CAAC,IAAI,CAAC,UAAU,OAAO,GAAG,CAAC,CAAC;YAClC,IAAA,qBAAW,EAAC,OAAO,CAAC,CAAC;QACvB,CAAC;QAED,IAAA,wBAAQ,EAAC,yBAAyB,aAAa,cAAc,WAAW,WAAW,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAE3G,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,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../onix/src/executors/typeorm/executor.ts"],"names":[],"mappings":";;;AAEA,iDAAyC;AACzC,mFAAqE;AACrE,yFAA4E;AAE5E,kBAAe,IAAA,2CAAe,EAAC,CAC7B,OAAuB,EACvB,OAAwB,EACxB,EAAE;IACF,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAExD,IAAA,oCAAW,EAAC,OAAO,CAAC,CAAC;IAErB,IAAA,wBAAQ,EAAC,yBAAyB,aAAa,cAAc,WAAW,WAAW,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAC7G,CAAC,CAAA,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export interface ExecutorSchema {
2
- envPath: string;
2
+ envFile: string;
3
3
  ormConfigPath: string;
4
4
  runOrRevert: 'run' | 'revert';
5
5
  }
@@ -9,7 +9,7 @@
9
9
  "type": "string",
10
10
  "description": "TypeORM CLI command: 'run' or 'revert'"
11
11
  },
12
- "envPath": {
12
+ "envFile": {
13
13
  "type": "string",
14
14
  "description": "Path and name of the .env file to load"
15
15
  },
@@ -19,6 +19,6 @@
19
19
  }
20
20
  },
21
21
  "required": [
22
- "envPath", "ormConfigPath"
22
+ "envFile", "ormConfigPath"
23
23
  ]
24
24
  }
@@ -1 +1 @@
1
- export declare function loadEnvFile(envFile: string): void;
1
+ export declare function loadEnvFile(envFile?: string | undefined): void;
@@ -1 +1 @@
1
- {"version":3,"file":"load-env-file.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/load-env-file.function.ts"],"names":[],"mappings":";;AAIA,kCAQC;AAZD,uCAAoC;AACpC,2BAAgC;AAChC,qCAAyD;AAEzD,SAAgB,WAAW,CAAC,OAAe;IACvC,IAAI,OAAO,EAAE,CAAC;QACV,IAAG,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;YACrB,IAAA,qBAAe,EAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACJ,eAAM,CAAC,IAAI,CAAC,+BAA+B,OAAO,kBAAkB,CAAC,CAAC;QAC1E,CAAC;IACL,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"load-env-file.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/load-env-file.function.ts"],"names":[],"mappings":";;AAIA,kCAQC;AAZD,uCAAoC;AACpC,2BAAgC;AAChC,qCAAyD;AAEzD,SAAgB,WAAW,CAAC,OAA4B;IACpD,IAAI,OAAO,EAAE,CAAC;QACV,IAAG,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;YACrB,IAAA,qBAAe,EAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACJ,eAAM,CAAC,IAAI,CAAC,+BAA+B,OAAO,kBAAkB,CAAC,CAAC;QAC1E,CAAC;IACL,CAAC;AACL,CAAC"}