@cloud-cli/cli
Advanced tools
@@ -16,2 +16,2 @@ import { CommandTree } from './types.js'; | ||
| export declare function findFile(): string; | ||
| export declare function getConfig<T extends Record<string, any>>(moduleName: string, defaults?: T): Promise<ModuleConfiguration | T>; | ||
| export declare function getConfig<T extends ModuleConfiguration>(moduleName: string, defaults?: T): T; |
@@ -45,3 +45,3 @@ import { existsSync } from 'node:fs'; | ||
| } | ||
| export async function getConfig(moduleName, defaults = null) { | ||
| export function getConfig(moduleName, defaults = null) { | ||
| const filePath = join(process.cwd(), 'configuration', `${moduleName}.json`); | ||
@@ -48,0 +48,0 @@ const config = readJson(filePath); |
@@ -135,3 +135,3 @@ import { readFile } from 'node:fs/promises'; | ||
| async runCommand(functionMap, command, functionName, params) { | ||
| const moduleConfig = await getConfig(command); | ||
| const moduleConfig = getConfig(command); | ||
| const optionFromFile = moduleConfig.commands?.[functionName] ?? {}; | ||
@@ -138,0 +138,0 @@ const mergedOptions = Object.assign({}, params, optionFromFile); |
+1
-1
| { | ||
| "name": "@cloud-cli/cli", | ||
| "version": "2.0.0", | ||
| "version": "2.0.1", | ||
| "description": "CLI for the Cloud CLI project", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
26523
-0.16%6
20%