@rockcarver/frodo-cli 2.0.0-40 → 2.0.0-41
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 +5 -1
- package/esm/cli/config/config-import.js +37 -4
- package/esm/cli/config/config-import.js.map +1 -1
- package/esm/cli/config/config.js +1 -2
- package/esm/cli/config/config.js.map +1 -1
- package/esm/cli/idp/idp-import.js +13 -5
- package/esm/cli/idp/idp-import.js.map +1 -1
- package/esm/cli/saml/saml-import.js +13 -5
- package/esm/cli/saml/saml-import.js.map +1 -1
- package/esm/cli/service/service-import.js +22 -5
- package/esm/cli/service/service-import.js.map +1 -1
- package/esm/ops/ApplicationOps.js +1 -1
- package/esm/ops/ApplicationOps.js.map +1 -1
- package/esm/ops/ConfigOps.js +35 -3
- package/esm/ops/ConfigOps.js.map +1 -1
- package/esm/ops/EmailTemplateOps.js +12 -17
- package/esm/ops/EmailTemplateOps.js.map +1 -1
- package/esm/ops/IdmOps.js +41 -91
- package/esm/ops/IdmOps.js.map +1 -1
- package/esm/ops/IdpOps.js +20 -8
- package/esm/ops/IdpOps.js.map +1 -1
- package/esm/ops/JourneyOps.js +2 -2
- package/esm/ops/JourneyOps.js.map +1 -1
- package/esm/ops/Saml2Ops.js +20 -8
- package/esm/ops/Saml2Ops.js.map +1 -1
- package/esm/ops/ServiceOps.js +30 -14
- package/esm/ops/ServiceOps.js.map +1 -1
- package/esm/ops/ThemeOps.js +16 -23
- package/esm/ops/ThemeOps.js.map +1 -1
- package/esm/utils/Config.js +11 -2
- package/esm/utils/Config.js.map +1 -1
- package/package.json +2 -2
package/esm/utils/Config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","names":["frodo","state","fs","os","slugify","printMessage","getFilePath","readFiles","utils","exportFullConfiguration","config","getDefaultNoiseFilter","cloud","log","FRODO_CONFIG_PATH_KEY","FRODO_LOG_NOISEFILTER_FILENAME","getConfigPath","process","env","homedir","getCustomNoiseFilters","filename","noiseFilter","data","readFileSync","JSON","parse","e","message","getNoiseFilters","defaults","length","writeFileSync","stringify","getFullExportConfig","file","workingDirectory","getDirectory","useStringArrays","noDecode","fullExportConfig","meta","agents","application","authentication","emailTemplate","idp","managedApplication","policy","policyset","resourcetype","saml","hosted","remote","metadata","cot","script","secrets","service","theme","trees","variables","files","jsonFiles","filter","f","path","endsWith","idmConfigFiles","startsWith","samlFiles","otherFiles","scriptFiles","id","value","Object","entries","content","assign","_id","scriptExports","values","name","substring","lastIndexOf","indexOf","scriptLines","split","find","s","replace","remove","Error","isIdUsed","configuration","isEsv","isIdUsedRecurse","RegExp","replaceAll","regex","type","used","location","test"],"sources":["../../src/utils/Config.ts"],"sourcesContent":["import { frodo, state } from '@rockcarver/frodo-lib';\nimport { FullExportInterface } from '@rockcarver/frodo-lib/types/ops/ConfigOps';\nimport fs from 'fs';\nimport os from 'os';\nimport slugify from 'slugify';\n\nimport { printMessage } from './Console';\n\nconst { getFilePath, readFiles } = frodo.utils;\n\nconst { exportFullConfiguration } = frodo.config;\n\nconst { getDefaultNoiseFilter } = frodo.cloud.log;\n\nexport const FRODO_CONFIG_PATH_KEY = 'FRODO_CONFIG_PATH';\nexport const FRODO_LOG_NOISEFILTER_FILENAME = 'LoggingNoiseFilter.json';\n\nexport function getConfigPath(): string {\n return process.env[FRODO_CONFIG_PATH_KEY] || `${os.homedir()}/.frodo`;\n}\n\nfunction getCustomNoiseFilters(): Array<string> {\n const filename = `${getConfigPath()}/${FRODO_LOG_NOISEFILTER_FILENAME}`;\n let noiseFilter = [];\n try {\n const data = fs.readFileSync(filename, 'utf8');\n noiseFilter = JSON.parse(data);\n } catch (e) {\n printMessage(`Error reading ${filename} (${e.message})`, 'error');\n }\n return noiseFilter;\n}\n\nexport function getNoiseFilters(defaults: boolean): Array<string> {\n const filename = `${getConfigPath()}/${FRODO_LOG_NOISEFILTER_FILENAME}`;\n if (defaults) {\n printMessage(`Using default logging noise filters.`, 'info');\n return getDefaultNoiseFilter();\n }\n let noiseFilter = getCustomNoiseFilters();\n if (noiseFilter.length == 0) {\n printMessage(`No custom noise filters defined. Using defaults.`, 'info');\n noiseFilter = getDefaultNoiseFilter();\n try {\n fs.writeFileSync(filename, JSON.stringify(noiseFilter, null, 2));\n printMessage(\n `The default filters were saved in ${filename}. You can change the filters as needed.`,\n 'info'\n );\n } catch (e) {\n printMessage(\n `Error creating noise filter configuration with default values.`,\n 'error'\n );\n }\n }\n return noiseFilter;\n}\n\n/**\n * Gets the full export config from one of three locations:\n * 1. The file passed into the function if one is provided.\n * 2. The working directory if it exists (provided by the user)\n * 3. The cloud tenant if the exports are not locally provided\n * @param file The optional file path\n * @returns The full export config\n */\nexport async function getFullExportConfig(\n file: string | null = null\n): Promise<FullExportInterface> {\n // Get export from file if it exists\n if (file) {\n return JSON.parse(fs.readFileSync(getFilePath(file), 'utf8'));\n }\n // If working directory doesn't exist, export from the cloud\n const workingDirectory = state.getDirectory();\n if (!workingDirectory) {\n return await exportFullConfiguration({\n useStringArrays: true,\n noDecode: false,\n });\n }\n // Go through files in directory and reconstruct the full export\n const fullExportConfig = {\n meta: {},\n agents: {},\n application: {},\n authentication: {},\n config: {},\n emailTemplate: {},\n idp: {},\n managedApplication: {},\n policy: {},\n policyset: {},\n resourcetype: {},\n saml: {\n hosted: {},\n remote: {},\n metadata: {},\n cot: {},\n },\n script: {},\n secrets: {},\n service: {},\n theme: {},\n trees: {},\n variables: {},\n } as FullExportInterface;\n const files = await readFiles(workingDirectory);\n const jsonFiles = files.filter((f) => f.path.endsWith('.json'));\n const idmConfigFiles = jsonFiles.filter((f) => f.path.startsWith('config/'));\n const samlFiles = jsonFiles.filter(\n (f) => f.path.startsWith('saml/') || f.path.startsWith('cot/')\n );\n const otherFiles = jsonFiles.filter(\n (f) =>\n !f.path.startsWith('config/') &&\n !f.path.startsWith('saml/') &&\n !f.path.startsWith('cot/')\n );\n const scriptFiles = files.filter(\n (f) => f.path.endsWith('.js') || f.path.endsWith('.groovy')\n );\n // Handle json files\n for (const f of otherFiles) {\n for (const [id, value] of Object.entries(JSON.parse(f.content))) {\n if (value == null || fullExportConfig[id] == null) {\n continue;\n }\n Object.assign(fullExportConfig[id], value);\n }\n }\n // Handle saml files\n for (const f of samlFiles) {\n let content = JSON.parse(f.content);\n content = content.saml;\n for (const [id, value] of Object.entries(content)) {\n Object.assign(fullExportConfig.saml[id], value);\n }\n }\n // Handle idm config files\n for (const f of idmConfigFiles) {\n const content = JSON.parse(f.content);\n fullExportConfig.config[content._id] = content;\n }\n // Handle extracted scripts, adding them to their corresponding script objects in the export\n if (scriptFiles.length > 0 && fullExportConfig.script != null) {\n const scriptExports = Object.values(fullExportConfig.script);\n for (const f of scriptFiles) {\n const name = f.path.substring(\n f.path.lastIndexOf('/') + 1,\n f.path.indexOf('.', f.path.lastIndexOf('/'))\n );\n const scriptLines = f.content.split('\\n');\n const script = scriptExports.find(\n (s) =>\n slugify(s.name.replace(/^http(s?):\\/\\//, ''), {\n remove: /[^\\w\\s$*_+~.()'\"!\\-@]+/g,\n }) === name\n );\n if (!script) {\n throw Error(\n `Can't find the script corresponding to the file '${f.path}' in the export files`\n );\n }\n script.script = scriptLines;\n }\n }\n return fullExportConfig;\n}\n\n/**\n * Determines if a string id is being used anywhere within the given configuration object\n * @param configuration The configuration object\n * @param id The id being search for\n * @param isEsv Whether the id corresponds to an ESV or not\n */\nexport function isIdUsed(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n configuration: any,\n id: string,\n isEsv: boolean\n): {\n used: boolean;\n location: string;\n} {\n return isIdUsedRecurse(\n configuration,\n isEsv\n ? // For ESV ids, they contain either letters, numbers, dashes, or underscores. The dashes get replaced with periods (escaped with a \\ for the regex)\n // since anywhere they are being used they will be used with periods, not dashes. Note that the (?:[^a-z0-9._]|$) expressions at the beginning and\n // end are meant to ensure that the id found is not a substring of some other id (i.e. the id found must either be at the beginning or end of the\n // string, or if in the middle of a string, is not preceded or followed by a character that would be part of another id).\n new RegExp(\n `(?:[^a-z0-9._]|^)${id.replaceAll('-', '\\\\.')}(?:[^a-z0-9._]|$)`\n )\n : // For normal ids, they contain only letters, numbers, or dashes.\n new RegExp(`(?:[^a-z0-9-]|^)${id}(?:[^a-z0-9-]|$)`)\n );\n}\n\n/**\n * Recursive helper for isIdUsed that finds any strings contained in the configuration that pass the regex\n * @param configuration The configuration (could be anything)\n * @param regex The regex test\n */\nfunction isIdUsedRecurse(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n configuration: any,\n regex: RegExp\n): {\n used: boolean;\n location: string;\n} {\n const type = typeof configuration;\n if (type === 'object' && configuration !== null) {\n for (const [id, value] of Object.entries(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n configuration as Record<string, any>\n )) {\n const isIdUsed = isIdUsedRecurse(value, regex);\n if (isIdUsed.used) {\n isIdUsed.location =\n id +\n (value.name ? `(name: '${value.name}')` : '') +\n (isIdUsed.location === '' ? '' : '.') +\n isIdUsed.location;\n return isIdUsed;\n }\n }\n }\n return {\n used: type === 'string' && regex.test(configuration),\n location: '',\n };\n}\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AAEpD,OAAOC,EAAE,MAAM,IAAI;AACnB,OAAOC,EAAE,MAAM,IAAI;AACnB,OAAOC,OAAO,MAAM,SAAS;AAE7B,SAASC,YAAY,QAAQ,WAAW;AAExC,MAAM;EAAEC,WAAW;EAAEC;AAAU,CAAC,GAAGP,KAAK,CAACQ,KAAK;AAE9C,MAAM;EAAEC;AAAwB,CAAC,GAAGT,KAAK,CAACU,MAAM;AAEhD,MAAM;EAAEC;AAAsB,CAAC,GAAGX,KAAK,CAACY,KAAK,CAACC,GAAG;AAEjD,OAAO,MAAMC,qBAAqB,GAAG,mBAAmB;AACxD,OAAO,MAAMC,8BAA8B,GAAG,yBAAyB;AAEvE,OAAO,SAASC,aAAaA,CAAA,EAAW;EACtC,OAAOC,OAAO,CAACC,GAAG,CAACJ,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,OAAOT,QAAQ;MACjB;IACF;EACF;EACA,OAAO;IACLQ,IAAI,EAAED,IAAI,KAAK,QAAQ,IAAID,KAAK,CAACI,IAAI,CAACT,aAAa,CAAC;IACpDQ,QAAQ,EAAE;EACZ,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"Config.js","names":["frodo","state","fs","os","slugify","printMessage","getFilePath","readFiles","utils","exportFullConfiguration","config","getDefaultNoiseFilter","cloud","log","FRODO_CONFIG_PATH_KEY","FRODO_LOG_NOISEFILTER_FILENAME","getConfigPath","process","env","homedir","getCustomNoiseFilters","filename","noiseFilter","data","readFileSync","JSON","parse","e","message","getNoiseFilters","defaults","length","writeFileSync","stringify","getFullExportConfig","file","workingDirectory","getDirectory","useStringArrays","noDecode","getFullExportConfigFromDirectory","directory","fullExportConfig","meta","agents","application","authentication","emailTemplate","idp","managedApplication","policy","policyset","resourcetype","saml","hosted","remote","metadata","cot","script","secrets","service","theme","trees","variables","files","jsonFiles","filter","f","path","endsWith","idmConfigFiles","startsWith","samlFiles","otherFiles","scriptFiles","id","value","Object","entries","content","assign","_id","scriptExports","values","name","substring","lastIndexOf","indexOf","scriptLines","split","find","s","replace","remove","Error","isIdUsed","configuration","isEsv","isIdUsedRecurse","RegExp","replaceAll","regex","type","used","location","test"],"sources":["../../src/utils/Config.ts"],"sourcesContent":["import { frodo, state } from '@rockcarver/frodo-lib';\nimport { FullExportInterface } from '@rockcarver/frodo-lib/types/ops/ConfigOps';\nimport fs from 'fs';\nimport os from 'os';\nimport slugify from 'slugify';\n\nimport { printMessage } from './Console';\n\nconst { getFilePath, readFiles } = frodo.utils;\n\nconst { exportFullConfiguration } = frodo.config;\n\nconst { getDefaultNoiseFilter } = frodo.cloud.log;\n\nexport const FRODO_CONFIG_PATH_KEY = 'FRODO_CONFIG_PATH';\nexport const FRODO_LOG_NOISEFILTER_FILENAME = 'LoggingNoiseFilter.json';\n\nexport function getConfigPath(): string {\n return process.env[FRODO_CONFIG_PATH_KEY] || `${os.homedir()}/.frodo`;\n}\n\nfunction getCustomNoiseFilters(): Array<string> {\n const filename = `${getConfigPath()}/${FRODO_LOG_NOISEFILTER_FILENAME}`;\n let noiseFilter = [];\n try {\n const data = fs.readFileSync(filename, 'utf8');\n noiseFilter = JSON.parse(data);\n } catch (e) {\n printMessage(`Error reading ${filename} (${e.message})`, 'error');\n }\n return noiseFilter;\n}\n\nexport function getNoiseFilters(defaults: boolean): Array<string> {\n const filename = `${getConfigPath()}/${FRODO_LOG_NOISEFILTER_FILENAME}`;\n if (defaults) {\n printMessage(`Using default logging noise filters.`, 'info');\n return getDefaultNoiseFilter();\n }\n let noiseFilter = getCustomNoiseFilters();\n if (noiseFilter.length == 0) {\n printMessage(`No custom noise filters defined. Using defaults.`, 'info');\n noiseFilter = getDefaultNoiseFilter();\n try {\n fs.writeFileSync(filename, JSON.stringify(noiseFilter, null, 2));\n printMessage(\n `The default filters were saved in ${filename}. You can change the filters as needed.`,\n 'info'\n );\n } catch (e) {\n printMessage(\n `Error creating noise filter configuration with default values.`,\n 'error'\n );\n }\n }\n return noiseFilter;\n}\n\n/**\n * Gets the full export config from one of three locations:\n * 1. The file passed into the function if one is provided.\n * 2. The working directory if it exists (provided by the user)\n * 3. The cloud tenant if the exports are not locally provided\n * @param file The optional file path\n * @returns The full export config\n */\nexport async function getFullExportConfig(\n file: string | null = null\n): Promise<FullExportInterface> {\n // Get export from file if it exists\n if (file) {\n return JSON.parse(fs.readFileSync(getFilePath(file), 'utf8'));\n }\n // If working directory doesn't exist, export from the cloud\n const workingDirectory = state.getDirectory();\n if (!workingDirectory) {\n return await exportFullConfiguration({\n useStringArrays: true,\n noDecode: false,\n });\n }\n // Go through files in the working directory and reconstruct the full export\n return getFullExportConfigFromDirectory(workingDirectory);\n}\n\n/**\n * Reconstructs the full export config from files in the given directory\n * @param directory The directory\n * @return The full export config\n */\nexport async function getFullExportConfigFromDirectory(\n directory: string\n): Promise<FullExportInterface> {\n const fullExportConfig = {\n meta: {},\n agents: {},\n application: {},\n authentication: {},\n config: {},\n emailTemplate: {},\n idp: {},\n managedApplication: {},\n policy: {},\n policyset: {},\n resourcetype: {},\n saml: {\n hosted: {},\n remote: {},\n metadata: {},\n cot: {},\n },\n script: {},\n secrets: {},\n service: {},\n theme: {},\n trees: {},\n variables: {},\n } as FullExportInterface;\n const files = await readFiles(directory);\n const jsonFiles = files.filter((f) => f.path.endsWith('.json'));\n const idmConfigFiles = jsonFiles.filter((f) => f.path.startsWith('config/'));\n const samlFiles = jsonFiles.filter(\n (f) => f.path.startsWith('saml/') || f.path.startsWith('cot/')\n );\n const otherFiles = jsonFiles.filter(\n (f) =>\n !f.path.startsWith('config/') &&\n !f.path.startsWith('saml/') &&\n !f.path.startsWith('cot/')\n );\n const scriptFiles = files.filter(\n (f) => f.path.endsWith('.js') || f.path.endsWith('.groovy')\n );\n // Handle json files\n for (const f of otherFiles) {\n for (const [id, value] of Object.entries(JSON.parse(f.content))) {\n if (value == null || fullExportConfig[id] == null) {\n continue;\n }\n Object.assign(fullExportConfig[id], value);\n }\n }\n // Handle saml files\n for (const f of samlFiles) {\n let content = JSON.parse(f.content);\n content = content.saml;\n for (const [id, value] of Object.entries(content)) {\n Object.assign(fullExportConfig.saml[id], value);\n }\n }\n // Handle idm config files\n for (const f of idmConfigFiles) {\n const content = JSON.parse(f.content);\n fullExportConfig.config[content._id] = content;\n }\n // Handle extracted scripts, adding them to their corresponding script objects in the export\n if (scriptFiles.length > 0 && fullExportConfig.script != null) {\n const scriptExports = Object.values(fullExportConfig.script);\n for (const f of scriptFiles) {\n const name = f.path.substring(\n f.path.lastIndexOf('/') + 1,\n f.path.indexOf('.', f.path.lastIndexOf('/'))\n );\n const scriptLines = f.content.split('\\n');\n const script = scriptExports.find(\n (s) =>\n slugify(s.name.replace(/^http(s?):\\/\\//, ''), {\n remove: /[^\\w\\s$*_+~.()'\"!\\-@]+/g,\n }) === name\n );\n if (!script) {\n throw Error(\n `Can't find the script corresponding to the file '${f.path}' in the export files`\n );\n }\n script.script = scriptLines;\n }\n }\n return fullExportConfig;\n}\n\n/**\n * Determines if a string id is being used anywhere within the given configuration object\n * @param configuration The configuration object\n * @param id The id being search for\n * @param isEsv Whether the id corresponds to an ESV or not\n */\nexport function isIdUsed(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n configuration: any,\n id: string,\n isEsv: boolean\n): {\n used: boolean;\n location: string;\n} {\n return isIdUsedRecurse(\n configuration,\n isEsv\n ? // For ESV ids, they contain either letters, numbers, dashes, or underscores. The dashes get replaced with periods (escaped with a \\ for the regex)\n // since anywhere they are being used they will be used with periods, not dashes. Note that the (?:[^a-z0-9._]|$) expressions at the beginning and\n // end are meant to ensure that the id found is not a substring of some other id (i.e. the id found must either be at the beginning or end of the\n // string, or if in the middle of a string, is not preceded or followed by a character that would be part of another id).\n new RegExp(\n `(?:[^a-z0-9._]|^)${id.replaceAll('-', '\\\\.')}(?:[^a-z0-9._]|$)`\n )\n : // For normal ids, they contain only letters, numbers, or dashes.\n new RegExp(`(?:[^a-z0-9-]|^)${id}(?:[^a-z0-9-]|$)`)\n );\n}\n\n/**\n * Recursive helper for isIdUsed that finds any strings contained in the configuration that pass the regex\n * @param configuration The configuration (could be anything)\n * @param regex The regex test\n */\nfunction isIdUsedRecurse(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n configuration: any,\n regex: RegExp\n): {\n used: boolean;\n location: string;\n} {\n const type = typeof configuration;\n if (type === 'object' && configuration !== null) {\n for (const [id, value] of Object.entries(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n configuration as Record<string, any>\n )) {\n const isIdUsed = isIdUsedRecurse(value, regex);\n if (isIdUsed.used) {\n isIdUsed.location =\n id +\n (value.name ? `(name: '${value.name}')` : '') +\n (isIdUsed.location === '' ? '' : '.') +\n isIdUsed.location;\n return isIdUsed;\n }\n }\n }\n return {\n used: type === 'string' && regex.test(configuration),\n location: '',\n };\n}\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,KAAK,QAAQ,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EA;AACA;AACA;AACA;AACA;AACA,SAASuB,eAAeA;AACtB;AACAF,aAAkB,EAClBK,KAAa,EAIb;EACA,MAAMC,IAAI,GAAG,OAAON,aAAa;EACjC,IAAIM,IAAI,KAAK,QAAQ,IAAIN,aAAa,KAAK,IAAI,EAAE;IAC/C,KAAK,MAAM,CAACrB,EAAE,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO;IACtC;IACAkB,aACF,CAAC,EAAE;MACD,MAAMD,QAAQ,GAAGG,eAAe,CAACtB,KAAK,EAAEyB,KAAK,CAAC;MAC9C,IAAIN,QAAQ,CAACQ,IAAI,EAAE;QACjBR,QAAQ,CAACS,QAAQ,GACf7B,EAAE,IACDC,KAAK,CAACQ,IAAI,GAAI,WAAUR,KAAK,CAACQ,IAAK,IAAG,GAAG,EAAE,CAAC,IAC5CW,QAAQ,CAACS,QAAQ,KAAK,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,GACrCT,QAAQ,CAACS,QAAQ;QACnB,OAAOT,QAAQ;MACjB;IACF;EACF;EACA,OAAO;IACLQ,IAAI,EAAED,IAAI,KAAK,QAAQ,IAAID,KAAK,CAACI,IAAI,CAACT,aAAa,CAAC;IACpDQ,QAAQ,EAAE;EACZ,CAAC;AACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rockcarver/frodo-cli",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-41",
|
|
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": [
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
]
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@rockcarver/frodo-lib": "2.0.0-
|
|
119
|
+
"@rockcarver/frodo-lib": "2.0.0-57",
|
|
120
120
|
"chokidar": "^3.5.3",
|
|
121
121
|
"cli-progress": "^3.11.2",
|
|
122
122
|
"cli-table3": "^0.6.3",
|