openfin-cli 5.45.42 → 5.45.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.
Files changed (3) hide show
  1. package/README.md +10 -13
  2. package/bin/openfin.cjs +25 -0
  3. package/package.json +44 -38
package/README.md CHANGED
@@ -14,30 +14,27 @@ Node LTS can be downloaded [here](https://nodejs.org/en/download/).
14
14
 
15
15
  ## Installation
16
16
 
17
- Run the following command to install the required dependencies:
17
+ This package is developed as part of the main `openfin/core` monorepo.
18
18
 
19
- ```
20
- npm install
21
- ```
22
-
23
- ## Development
24
-
25
- Build and run the CLI by running:
19
+ From the repository root:
26
20
 
27
21
  ```bash
28
- $ npm start
22
+ corepack enable
23
+ pnpm install
29
24
  ```
30
25
 
31
- This will display the default help text. To pass CLI arguments an extra double dash is required. For example, to launch the OpenFin runtime with the `--config` flag, you would run:
26
+ ## Development
27
+
28
+ Build the CLI (from the repository root):
32
29
 
33
30
  ```bash
34
- $ npm start -- --config
31
+ pnpm --filter openfin-cli run build
35
32
  ```
36
33
 
37
- This is because the first set of options gets passed to npm, the second to the actual command that is being invoked `npm run start <NPM OPTIONS> -- <CLI OPTIONS>`. By way of another example, to launch Process Manager you would run:
34
+ Then run it:
38
35
 
39
36
  ```bash
40
- $ npm start -- --launch --config https://cdn.openfin.co/release/apps/openfin/processmanager/app.json
37
+ node packages/public/openfin-cli/out/cli.js --help
41
38
  ```
42
39
 
43
40
  ## Versioning & Releasing
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('node:fs');
5
+ const path = require('node:path');
6
+ const { spawnSync } = require('node:child_process');
7
+
8
+ const entrypoint = path.resolve(__dirname, '../out/cli.js');
9
+
10
+ if (!fs.existsSync(entrypoint)) {
11
+ console.error('[openfin-cli] Missing build output: out/cli.js');
12
+ console.error('[openfin-cli] Build it first with: pnpm --filter openfin-cli run build');
13
+ process.exit(1);
14
+ }
15
+
16
+ const result = spawnSync(process.execPath, [entrypoint, ...process.argv.slice(2)], {
17
+ stdio: 'inherit'
18
+ });
19
+
20
+ if (result.error) {
21
+ console.error(result.error);
22
+ process.exit(1);
23
+ }
24
+
25
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,40 +1,46 @@
1
1
  {
2
- "name": "openfin-cli",
3
- "version": "5.45.42",
4
- "description": "Supports command line development in the OpenFin environment.",
5
- "type": "module",
6
- "homepage": "http://www.here.io",
7
- "author": "Here™️",
8
- "engines": {
9
- "node": ">=20"
10
- },
11
- "license": "SEE LICENSE IN LICENSE.MD",
12
- "scripts": {
13
- "build": "npm run clean && npx tsc",
14
- "clean": "rimraf ./dist",
15
- "ci:prepack": "of-npm prepack",
16
- "ci:pack": "npm pack",
17
- "ci:postpack": "of-npm postpack",
18
- "version:update": "of-npm version --bump patch '$MAJOR.$RMAJOR.$PATCH'"
19
- },
20
- "files": [
21
- "out/**/*",
22
- "LICENSE.md",
23
- "README.md",
24
- "npm.README.md"
25
- ],
26
- "keywords": [
27
- "openfin",
28
- "cli",
29
- "Here™️"
30
- ],
31
- "dependencies": {
32
- "axios": "^1.9.0",
33
- "node-machine-id": "1.1.12",
34
- "yargs": "17.7.2",
35
- "zod": "3.24.1"
36
- },
37
- "bin": {
38
- "openfin": "./out/cli.js"
39
- }
2
+ "name": "openfin-cli",
3
+ "version": "5.45.45",
4
+ "description": "Supports command line development in the OpenFin environment.",
5
+ "type": "module",
6
+ "private": false,
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "homepage": "http://www.here.io",
11
+ "author": "Here™️",
12
+ "engines": {
13
+ "node": ">=20"
14
+ },
15
+ "license": "SEE LICENSE IN LICENSE.MD",
16
+ "files": [
17
+ "out/**/*",
18
+ "bin/**/*",
19
+ "LICENSE.md",
20
+ "README.md",
21
+ "npm.README.md"
22
+ ],
23
+ "keywords": [
24
+ "openfin",
25
+ "cli",
26
+ "Here™️"
27
+ ],
28
+ "dependencies": {
29
+ "axios": "^1.9.0",
30
+ "node-machine-id": "1.1.12",
31
+ "yargs": "17.7.2",
32
+ "zod": "3.24.1"
33
+ },
34
+ "bin": {
35
+ "openfin": "./bin/openfin.cjs"
36
+ },
37
+ "scripts": {
38
+ "build": "pnpm run clean && pnpm exec tsc",
39
+ "clean": "rimraf ./dist",
40
+ "ci:prepack": "of-npm prepack",
41
+ "ci:pack": "pnpm pack",
42
+ "ci:postpack": "of-npm postpack",
43
+ "version:update": "of-npm version --bump patch '$MAJOR.$RMAJOR.$PATCH'",
44
+ "typecheck": "tsc --noEmit -p tsconfig.json"
45
+ }
40
46
  }