@onivoro/onix 20.0.48 → 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.48",
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
  }