@settlemint/sdk-utils
Advanced tools
Comparing version 0.8.2 to 0.8.3
@@ -1,25 +0,7 @@ | ||
import { SpawnOptionsWithoutStdio } from 'node:child_process'; | ||
import { ZodString, z, ZodSchema } from 'zod'; | ||
import { PathLike } from 'node:fs'; | ||
import { AgentName } from 'package-manager-detector'; | ||
import { SpawnOptionsWithoutStdio } from 'node:child_process'; | ||
declare function capitalizeFirstLetter(val: string): string; | ||
interface ExecuteCommandOptions extends SpawnOptionsWithoutStdio { | ||
silent?: boolean; | ||
} | ||
/** | ||
* Executes a command with the given arguments in a child process | ||
* | ||
* @param command - The command to execute | ||
* @param args - Array of arguments to pass to the command | ||
* @param options - Options to pass to the spawn command | ||
* @returns Promise that resolves when the process completes successfully | ||
* @throws Error if the process fails or exits with non-zero code | ||
*/ | ||
declare function executeCommand(command: string, args: string[], options?: ExecuteCommandOptions): Promise<string[]>; | ||
declare function tryParseJson<T>(value: string, defaultValue?: T | null): T | null; | ||
/** | ||
* Schema for validating access tokens. | ||
@@ -331,2 +313,4 @@ */ | ||
declare function tryParseJson<T>(value: string, defaultValue?: T | null): T | null; | ||
/** | ||
@@ -446,2 +430,37 @@ * Array of available templates for project creation. | ||
export { type AccessToken, AccessTokenSchema, type ApplicationAccessToken, ApplicationAccessTokenSchema, type DotEnv, type DotEnvPartial, DotEnvSchema, DotEnvSchemaPartial, type Id, IdSchema, type PersonalAccessToken, PersonalAccessTokenSchema, type Template, UniqueNameSchema, type Url, type UrlOrPath, UrlOrPathSchema, type UrlPath, UrlPathSchema, UrlSchema, capitalizeFirstLetter, emptyDir, ensureBrowser, ensureFolder, ensureServer, executeCommand, exists, formatTargetDir, getPackageManager, getPackageManagerExecutable, installDependencies, isEmpty, isPackageInstalled, isValidPackageName, loadEnv, projectRoot, runsInBrowser, runsOnServer, setName, templates, toValidPackageName, tryParseJson, validate, writeEnv }; | ||
declare function capitalizeFirstLetter(val: string): string; | ||
declare const ascii: () => void; | ||
declare const cancel: (msg: string) => never; | ||
interface ExecuteCommandOptions extends SpawnOptionsWithoutStdio { | ||
silent?: boolean; | ||
} | ||
/** | ||
* Executes a command with the given arguments in a child process | ||
* | ||
* @param command - The command to execute | ||
* @param args - Array of arguments to pass to the command | ||
* @param options - Options to pass to the spawn command | ||
* @returns Promise that resolves when the process completes successfully | ||
* @throws Error if the process fails or exits with non-zero code | ||
*/ | ||
declare function executeCommand(command: string, args: string[], options?: ExecuteCommandOptions): Promise<string[]>; | ||
declare const maskTokens: (output: string) => string; | ||
declare const intro: (msg: string) => void; | ||
declare const note: (message: string) => void; | ||
declare const outro: (msg: string) => void; | ||
interface SpinnerOptions<R> { | ||
startMessage: string; | ||
task: () => Promise<R>; | ||
stopMessage: string; | ||
} | ||
declare const spinner: <R>(options: SpinnerOptions<R>) => Promise<R>; | ||
export { type AccessToken, AccessTokenSchema, type ApplicationAccessToken, ApplicationAccessTokenSchema, type DotEnv, type DotEnvPartial, DotEnvSchema, DotEnvSchemaPartial, type Id, IdSchema, type PersonalAccessToken, PersonalAccessTokenSchema, type Template, UniqueNameSchema, type Url, type UrlOrPath, UrlOrPathSchema, type UrlPath, UrlPathSchema, UrlSchema, ascii, cancel, capitalizeFirstLetter, emptyDir, ensureBrowser, ensureFolder, ensureServer, executeCommand, exists, formatTargetDir, getPackageManager, getPackageManagerExecutable, installDependencies, intro, isEmpty, isPackageInstalled, isValidPackageName, loadEnv, maskTokens, note, outro, projectRoot, runsInBrowser, runsOnServer, setName, spinner, templates, toValidPackageName, tryParseJson, validate, writeEnv }; |
@@ -1,2 +0,2 @@ | ||
import { Options } from 'nano-spawn'; | ||
import { SpawnOptionsWithoutStdio } from 'node:child_process'; | ||
@@ -7,2 +7,18 @@ declare const ascii: () => void; | ||
interface ExecuteCommandOptions extends SpawnOptionsWithoutStdio { | ||
silent?: boolean; | ||
} | ||
/** | ||
* Executes a command with the given arguments in a child process | ||
* | ||
* @param command - The command to execute | ||
* @param args - Array of arguments to pass to the command | ||
* @param options - Options to pass to the spawn command | ||
* @returns Promise that resolves when the process completes successfully | ||
* @throws Error if the process fails or exits with non-zero code | ||
*/ | ||
declare function executeCommand(command: string, args: string[], options?: ExecuteCommandOptions): Promise<string[]>; | ||
declare const maskTokens: (output: string) => string; | ||
declare const intro: (msg: string) => void; | ||
@@ -14,8 +30,2 @@ | ||
declare function run({ command, args, options, }: { | ||
command: string; | ||
args: string[]; | ||
options?: Options; | ||
}): Promise<string>; | ||
interface SpinnerOptions<R> { | ||
@@ -28,2 +38,2 @@ startMessage: string; | ||
export { ascii, cancel, intro, note, outro, run, spinner }; | ||
export { ascii, cancel, executeCommand, intro, maskTokens, note, outro, spinner }; |
{ | ||
"name": "@settlemint/sdk-utils", | ||
"description": "SettleMint SDK, integrate SettleMint into your application with ease.", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "private": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
392474
3621
28
3