@rockcarver/frodo-cli 0.22.3 → 0.23.1-0
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/CHANGELOG.md +21 -1
- package/esm/app.js +0 -1
- package/esm/app.js.map +1 -1
- package/esm/launch.js +11 -0
- package/esm/launch.js.map +1 -0
- package/esm/loader.js +40 -0
- package/esm/loader.js.map +1 -0
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.23.1-0] - 2023-02-27
|
|
11
|
+
|
|
12
|
+
## [0.23.0] - 2023-02-17
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- \#186: Support node 19 when running as npm and when developing. Binaries are still built using node 18 until our package manager supports node 19.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Update to frodo-lib 0.18.8
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- \#115: Running frodo as an npm package no longer requires the `-S` option of the `env` shell command, which caused issued on Linux distributions with older version of `coreutils` like `CentOS Linux 7` and other Redhat-based distributions.
|
|
25
|
+
|
|
10
26
|
## [0.22.3] - 2023-02-16
|
|
11
27
|
|
|
12
28
|
### Changed
|
|
@@ -1048,7 +1064,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1048
1064
|
- Fixed problem with adding connection profiles
|
|
1049
1065
|
- Miscellaneous bug fixes
|
|
1050
1066
|
|
|
1051
|
-
[Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.
|
|
1067
|
+
[Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.23.1-0...HEAD
|
|
1068
|
+
|
|
1069
|
+
[0.23.1-0]: https://github.com/rockcarver/frodo-cli/compare/v0.23.0...v0.23.1-0
|
|
1070
|
+
|
|
1071
|
+
[0.23.0]: https://github.com/rockcarver/frodo-cli/compare/v0.22.3...v0.23.0
|
|
1052
1072
|
|
|
1053
1073
|
[0.22.3]: https://github.com/rockcarver/frodo-cli/compare/v0.22.2...v0.22.3
|
|
1054
1074
|
|
package/esm/app.js
CHANGED
package/esm/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","names":["ConnectionProfile","Command","admin","agent","app","conn","email","esv","idm","idp","info","journey","logging","realm","saml","script","service","theme","printMessage","getVersions","initConnectionProfiles","program","version","addCommand","showHelpAfterError","enablePositionalOptions","parse","e"],"sources":["app.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"app.js","names":["ConnectionProfile","Command","admin","agent","app","conn","email","esv","idm","idp","info","journey","logging","realm","saml","script","service","theme","printMessage","getVersions","initConnectionProfiles","program","version","addCommand","showHelpAfterError","enablePositionalOptions","parse","e"],"sources":["app.ts"],"sourcesContent":["import { ConnectionProfile } from '@rockcarver/frodo-lib';\nimport { Command } from 'commander';\n\n// commands\nimport admin from './cli/admin/admin';\nimport agent from './cli/agent/agent';\nimport app from './cli/app/app';\nimport conn from './cli/conn/conn';\nimport email from './cli/email/email';\nimport esv from './cli/esv/esv';\nimport idm from './cli/idm/idm';\nimport idp from './cli/idp/idp';\nimport info from './cli/info/info';\nimport journey from './cli/journey/journey';\nimport logging from './cli/logging/logs';\nimport realm from './cli/realm/realm';\nimport saml from './cli/saml/saml';\nimport script from './cli/script/script';\nimport service from './cli/service/service';\n// enable sample command template.\n// import something from './cli/_template/something';\nimport theme from './cli/theme/theme';\nimport { printMessage } from './utils/Console';\nimport { getVersions } from './utils/Version';\n\nconst { initConnectionProfiles } = ConnectionProfile;\n\n(async () => {\n try {\n const program = new Command('frodo').version(\n await getVersions(false),\n '-v, --version'\n );\n\n printMessage(await getVersions(true), 'text', false);\n\n await initConnectionProfiles();\n\n program.addCommand(admin());\n program.addCommand(agent());\n program.addCommand(app());\n program.addCommand(conn());\n program.addCommand(email());\n program.addCommand(esv());\n program.addCommand(idm());\n program.addCommand(idp());\n program.addCommand(info());\n program.addCommand(journey());\n program.addCommand(logging());\n program.addCommand(realm());\n program.addCommand(saml());\n program.addCommand(script());\n program.addCommand(service());\n program.addCommand(theme());\n // enable sample command template.\n // program.addCommand(something());\n\n program.showHelpAfterError();\n program.enablePositionalOptions();\n program.parse();\n } catch (e) {\n printMessage(`ERROR: exception running frodo - ${e}`, 'error');\n }\n})();\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,uBAAuB;AACzD,SAASC,OAAO,QAAQ,WAAW;;AAEnC;AACA,OAAOC,KAAK,MAAM,mBAAmB;AACrC,OAAOC,KAAK,MAAM,mBAAmB;AACrC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,KAAK,MAAM,mBAAmB;AACrC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,OAAO,MAAM,uBAAuB;AAC3C,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAOC,KAAK,MAAM,mBAAmB;AACrC,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,OAAO,MAAM,uBAAuB;AAC3C;AACA;AACA,OAAOC,KAAK,MAAM,mBAAmB;AACrC,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,WAAW,QAAQ,iBAAiB;AAE7C,MAAM;EAAEC;AAAuB,CAAC,GAAGpB,iBAAiB;AAEpD,CAAC,YAAY;EACX,IAAI;IACF,MAAMqB,OAAO,GAAG,IAAIpB,OAAO,CAAC,OAAO,CAAC,CAACqB,OAAO,CAC1C,MAAMH,WAAW,CAAC,KAAK,CAAC,EACxB,eA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usr/bin/env node
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
|
+
import { createRequire } from 'module';
|
|
4
|
+
const require = createRequire(import.meta.url);
|
|
5
|
+
const launchArgs = ['--no-warnings', '--enable-source-maps', '--experimental-loader', require.resolve('./loader.js'), require.resolve('./app.js')];
|
|
6
|
+
const frodoArgs = process.argv.slice(2);
|
|
7
|
+
spawn(process.execPath, [...launchArgs, ...frodoArgs], {
|
|
8
|
+
stdio: 'inherit',
|
|
9
|
+
shell: false
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=launch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch.js","names":["spawn","createRequire","require","import","meta","url","launchArgs","resolve","frodoArgs","process","argv","slice","execPath","stdio","shell"],"sources":["launch.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { spawn } from 'node:child_process';\nimport { createRequire } from 'module';\n\nconst require = createRequire(import.meta.url);\n\nconst launchArgs = [\n '--no-warnings',\n '--enable-source-maps',\n '--experimental-loader',\n require.resolve('./loader.js'),\n require.resolve('./app.js'),\n];\nconst frodoArgs = process.argv.slice(2);\n\nspawn(process.execPath, [...launchArgs, ...frodoArgs], {\n stdio: 'inherit',\n shell: false,\n});\n"],"mappings":"AAAA;AACA,SAASA,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,aAAa,QAAQ,QAAQ;AAEtC,MAAMC,OAAO,GAAGD,aAAa,CAACE,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC;AAE9C,MAAMC,UAAU,GAAG,CACjB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvBJ,OAAO,CAACK,OAAO,CAAC,aAAa,CAAC,EAC9BL,OAAO,CAACK,OAAO,CAAC,UAAU,CAAC,CAC5B;AACD,MAAMC,SAAS,GAAGC,OAAO,CAACC,IAAI,CAACC,KAAK,CAAC,CAAC,CAAC;AAEvCX,KAAK,CAACS,OAAO,CAACG,QAAQ,EAAE,CAAC,GAAGN,UAAU,EAAE,GAAGE,SAAS,CAAC,EAAE;EACrDK,KAAK,EAAE,SAAS;EAChBC,KAAK,EAAE;AACT,CAAC,CAAC"}
|
package/esm/loader.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { builtinModules } from 'node:module';
|
|
2
|
+
import { dirname } from 'path';
|
|
3
|
+
import { cwd } from 'process';
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
5
|
+
import { promisify } from 'util';
|
|
6
|
+
import resolveCallback from 'resolve/async.js';
|
|
7
|
+
const resolveAsync = promisify(resolveCallback);
|
|
8
|
+
const baseURL = pathToFileURL(cwd() + '/').href;
|
|
9
|
+
export async function resolve(specifier, context, next) {
|
|
10
|
+
const {
|
|
11
|
+
parentURL = baseURL
|
|
12
|
+
} = context;
|
|
13
|
+
if (specifier.startsWith('node:') || builtinModules.includes(specifier)) {
|
|
14
|
+
return next(specifier, context);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// `resolveAsync` works with paths, not URLs
|
|
18
|
+
if (specifier.startsWith('file://')) {
|
|
19
|
+
specifier = fileURLToPath(specifier);
|
|
20
|
+
}
|
|
21
|
+
const parentPath = fileURLToPath(parentURL);
|
|
22
|
+
let url;
|
|
23
|
+
try {
|
|
24
|
+
const resolution = await resolveAsync(specifier, {
|
|
25
|
+
basedir: dirname(parentPath),
|
|
26
|
+
// For whatever reason, --experimental-specifier-resolution=node doesn't search for .mjs extensions
|
|
27
|
+
// but it does search for index.mjs files within directories
|
|
28
|
+
extensions: ['.js', '.json', '.node', '.mjs']
|
|
29
|
+
});
|
|
30
|
+
url = pathToFileURL(resolution).href;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
if (error.code === 'MODULE_NOT_FOUND') {
|
|
33
|
+
// Match Node's error code
|
|
34
|
+
error.code = 'ERR_MODULE_NOT_FOUND';
|
|
35
|
+
}
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
return next(url, context);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.js","names":["builtinModules","dirname","cwd","fileURLToPath","pathToFileURL","promisify","resolveCallback","resolveAsync","baseURL","href","resolve","specifier","context","next","parentURL","startsWith","includes","parentPath","url","resolution","basedir","extensions","error","code"],"sources":["loader.ts"],"sourcesContent":["import { builtinModules } from 'node:module';\nimport { dirname } from 'path';\nimport { cwd } from 'process';\nimport { fileURLToPath, pathToFileURL } from 'url';\nimport { promisify } from 'util';\n\nimport resolveCallback from 'resolve/async.js';\n\nconst resolveAsync = promisify(resolveCallback);\n\nconst baseURL = pathToFileURL(cwd() + '/').href;\n\nexport async function resolve(specifier, context, next) {\n const { parentURL = baseURL } = context;\n\n if (specifier.startsWith('node:') || builtinModules.includes(specifier)) {\n return next(specifier, context);\n }\n\n // `resolveAsync` works with paths, not URLs\n if (specifier.startsWith('file://')) {\n specifier = fileURLToPath(specifier);\n }\n const parentPath = fileURLToPath(parentURL);\n\n let url;\n try {\n const resolution = await resolveAsync(specifier, {\n basedir: dirname(parentPath),\n // For whatever reason, --experimental-specifier-resolution=node doesn't search for .mjs extensions\n // but it does search for index.mjs files within directories\n extensions: ['.js', '.json', '.node', '.mjs'],\n });\n url = pathToFileURL(resolution).href;\n } catch (error) {\n if (error.code === 'MODULE_NOT_FOUND') {\n // Match Node's error code\n error.code = 'ERR_MODULE_NOT_FOUND';\n }\n throw error;\n }\n\n return next(url, context);\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,aAAa;AAC5C,SAASC,OAAO,QAAQ,MAAM;AAC9B,SAASC,GAAG,QAAQ,SAAS;AAC7B,SAASC,aAAa,EAAEC,aAAa,QAAQ,KAAK;AAClD,SAASC,SAAS,QAAQ,MAAM;AAEhC,OAAOC,eAAe,MAAM,kBAAkB;AAE9C,MAAMC,YAAY,GAAGF,SAAS,CAACC,eAAe,CAAC;AAE/C,MAAME,OAAO,GAAGJ,aAAa,CAACF,GAAG,EAAE,GAAG,GAAG,CAAC,CAACO,IAAI;AAE/C,OAAO,eAAeC,OAAO,CAACC,SAAS,EAAEC,OAAO,EAAEC,IAAI,EAAE;EACtD,MAAM;IAAEC,SAAS,GAAGN;EAAQ,CAAC,GAAGI,OAAO;EAEvC,IAAID,SAAS,CAACI,UAAU,CAAC,OAAO,CAAC,IAAIf,cAAc,CAACgB,QAAQ,CAACL,SAAS,CAAC,EAAE;IACvE,OAAOE,IAAI,CAACF,SAAS,EAAEC,OAAO,CAAC;EACjC;;EAEA;EACA,IAAID,SAAS,CAACI,UAAU,CAAC,SAAS,CAAC,EAAE;IACnCJ,SAAS,GAAGR,aAAa,CAACQ,SAAS,CAAC;EACtC;EACA,MAAMM,UAAU,GAAGd,aAAa,CAACW,SAAS,CAAC;EAE3C,IAAII,GAAG;EACP,IAAI;IACF,MAAMC,UAAU,GAAG,MAAMZ,YAAY,CAACI,SAAS,EAAE;MAC/CS,OAAO,EAAEnB,OAAO,CAACgB,UAAU,CAAC;MAC5B;MACA;MACAI,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;IAC9C,CAAC,CAAC;IACFH,GAAG,GAAGd,aAAa,CAACe,UAAU,CAAC,CAACV,IAAI;EACtC,CAAC,CAAC,OAAOa,KAAK,EAAE;IACd,IAAIA,KAAK,CAACC,IAAI,KAAK,kBAAkB,EAAE;MACrC;MACAD,KAAK,CAACC,IAAI,GAAG,sBAAsB;IACrC;IACA,MAAMD,KAAK;EACb;EAEA,OAAOT,IAAI,CAACK,GAAG,EAAEN,OAAO,CAAC;AAC3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rockcarver/frodo-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1-0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
|
|
6
6
|
"keywords": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"devops"
|
|
19
19
|
],
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">=16"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"bugs": {
|
|
28
28
|
"url": "https://github.com/rockcarver/frodo-cli/issues"
|
|
29
29
|
},
|
|
30
|
-
"main": "esm/
|
|
30
|
+
"main": "esm/launch.js",
|
|
31
31
|
"scripts": {
|
|
32
32
|
"test": "npx tsc && node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
33
33
|
"test:local": "npm run build && node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
],
|
|
79
79
|
"license": "MIT",
|
|
80
80
|
"bin": {
|
|
81
|
-
"frodo": "./esm/
|
|
81
|
+
"frodo": "./esm/launch.js"
|
|
82
82
|
},
|
|
83
83
|
"babel": {
|
|
84
84
|
"plugins": [
|
|
@@ -86,11 +86,6 @@
|
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
88
|
"pkg": {
|
|
89
|
-
"options": [
|
|
90
|
-
"experimental-specifier-resolution=node",
|
|
91
|
-
"enable-source-maps",
|
|
92
|
-
"no-warnings"
|
|
93
|
-
],
|
|
94
89
|
"assets": [
|
|
95
90
|
"node_modules/@rockcarver/frodo-lib/cjs/ops/templates/*.json",
|
|
96
91
|
"node_modules/@rockcarver/frodo-lib/cjs/ops/templates/**/*.json",
|
|
@@ -104,7 +99,7 @@
|
|
|
104
99
|
]
|
|
105
100
|
},
|
|
106
101
|
"dependencies": {
|
|
107
|
-
"@rockcarver/frodo-lib": "0.18.
|
|
102
|
+
"@rockcarver/frodo-lib": "0.18.8",
|
|
108
103
|
"chokidar": "^3.5.3",
|
|
109
104
|
"cli-progress": "^3.11.2",
|
|
110
105
|
"cli-table3": "^0.6.3",
|
|
@@ -114,6 +109,7 @@
|
|
|
114
109
|
"nanospinner": "^1.1.0",
|
|
115
110
|
"properties-reader": "^2.2.0",
|
|
116
111
|
"replaceall": "^0.1.6",
|
|
112
|
+
"resolve": "^1.22.1",
|
|
117
113
|
"slugify": "^1.6.5",
|
|
118
114
|
"uuid": "^9.0.0",
|
|
119
115
|
"yesno": "^0.4.0"
|
|
@@ -125,6 +121,7 @@
|
|
|
125
121
|
"@babel/preset-env": "^7.20.2",
|
|
126
122
|
"@babel/preset-typescript": "^7.18.6",
|
|
127
123
|
"@types/colors": "^1.2.1",
|
|
124
|
+
"@types/fs-extra": "^11.0.1",
|
|
128
125
|
"@types/jest": "^29.2.3",
|
|
129
126
|
"@types/node": "^18.11.9",
|
|
130
127
|
"@typescript-eslint/eslint-plugin": "^5.44.0",
|