@settlemint/sdk-utils
Advanced tools
Comparing version 0.6.24 to 0.6.25-main42bae51
@@ -42,2 +42,3 @@ import { z } from 'zod'; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: z.ZodLiteral<"0x5e771e1417100000000000000000000000000003">; | ||
SETTLEMINT_SMART_CONTRACT_SET: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -79,2 +80,3 @@ SETTLEMINT_INSTANCE: string; | ||
SETTLEMINT_NEW_PROJECT_NAME?: string | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}, { | ||
@@ -116,2 +118,3 @@ SETTLEMINT_INSTANCE: string; | ||
SETTLEMINT_NEW_PROJECT_NAME?: string | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}>; | ||
@@ -155,2 +158,3 @@ type DotEnv = z.infer<typeof DotEnvSchema>; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: z.ZodOptional<z.ZodLiteral<"0x5e771e1417100000000000000000000000000003">>; | ||
SETTLEMINT_SMART_CONTRACT_SET: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -192,2 +196,3 @@ SETTLEMINT_INSTANCE?: string | undefined; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY?: "0x5e771e1417100000000000000000000000000003" | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}, { | ||
@@ -229,2 +234,3 @@ SETTLEMINT_INSTANCE?: string | undefined; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY?: "0x5e771e1417100000000000000000000000000003" | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}>; | ||
@@ -231,0 +237,0 @@ type DotEnvPartial = z.infer<typeof DotEnvSchemaPartial>; |
@@ -1,5 +0,15 @@ | ||
declare function ensureFolder(path: string): void; | ||
import { PathLike } from 'node:fs'; | ||
declare function ensureFolder(path: string): Promise<void>; | ||
declare function projectRoot(): Promise<string>; | ||
export { ensureFolder, projectRoot }; | ||
/** | ||
* Checks if a file or directory exists at the given path | ||
* | ||
* @param path - The path to check | ||
* @returns True if the path exists, false otherwise | ||
*/ | ||
declare function exists(path: PathLike): Promise<boolean>; | ||
export { ensureFolder, exists, projectRoot }; |
import { ZodString, z, ZodSchema } from 'zod'; | ||
import { PathLike } from 'node:fs'; | ||
import { AgentName } from 'package-manager-detector'; | ||
@@ -51,2 +52,3 @@ | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: z.ZodLiteral<"0x5e771e1417100000000000000000000000000003">; | ||
SETTLEMINT_SMART_CONTRACT_SET: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -88,2 +90,3 @@ SETTLEMINT_INSTANCE: string; | ||
SETTLEMINT_NEW_PROJECT_NAME?: string | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}, { | ||
@@ -125,2 +128,3 @@ SETTLEMINT_INSTANCE: string; | ||
SETTLEMINT_NEW_PROJECT_NAME?: string | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}>; | ||
@@ -164,2 +168,3 @@ type DotEnv = z.infer<typeof DotEnvSchema>; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: z.ZodOptional<z.ZodLiteral<"0x5e771e1417100000000000000000000000000003">>; | ||
SETTLEMINT_SMART_CONTRACT_SET: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -201,2 +206,3 @@ SETTLEMINT_INSTANCE?: string | undefined; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY?: "0x5e771e1417100000000000000000000000000003" | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}, { | ||
@@ -238,2 +244,3 @@ SETTLEMINT_INSTANCE?: string | undefined; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY?: "0x5e771e1417100000000000000000000000000003" | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}>; | ||
@@ -298,3 +305,3 @@ type DotEnvPartial = z.infer<typeof DotEnvSchemaPartial>; | ||
declare function ensureFolder(path: string): void; | ||
declare function ensureFolder(path: string): Promise<void>; | ||
@@ -304,2 +311,10 @@ declare function projectRoot(): Promise<string>; | ||
/** | ||
* Checks if a file or directory exists at the given path | ||
* | ||
* @param path - The path to check | ||
* @returns True if the path exists, false otherwise | ||
*/ | ||
declare function exists(path: PathLike): Promise<boolean>; | ||
/** | ||
* Array of available templates for project creation. | ||
@@ -359,7 +374,7 @@ */ | ||
* ```typescript | ||
* const dirIsEmpty = isEmpty("/path/to/directory"); | ||
* const dirIsEmpty = await isEmpty("/path/to/directory"); | ||
* console.log(dirIsEmpty); | ||
* ``` | ||
*/ | ||
declare function isEmpty(path: string): boolean; | ||
declare function isEmpty(path: string): Promise<boolean>; | ||
/** | ||
@@ -372,6 +387,6 @@ * Empties a directory by removing all its contents except for the .git directory. | ||
* ```typescript | ||
* emptyDir("/path/to/directory"); | ||
* await emptyDir("/path/to/directory"); | ||
* ``` | ||
*/ | ||
declare function emptyDir(dir: string): void; | ||
declare function emptyDir(dir: string): Promise<void>; | ||
@@ -415,2 +430,2 @@ declare function getPackageManager(targetDir: string): Promise<AgentName>; | ||
export { type AccessToken, AccessTokenSchema, type DotEnv, type DotEnvPartial, DotEnvSchema, DotEnvSchemaPartial, type Id, IdSchema, type Template, type Url, type UrlOrPath, UrlOrPathSchema, type UrlPath, UrlPathSchema, UrlSchema, capitalizeFirstLetter, emptyDir, ensureBrowser, ensureFolder, ensureServer, formatTargetDir, getPackageManager, installDependencies, isEmpty, isPackageInstalled, isValidPackageName, loadEnv, projectRoot, runsInBrowser, runsOnServer, setName, templates, toValidPackageName, validate, writeEnv }; | ||
export { type AccessToken, AccessTokenSchema, type DotEnv, type DotEnvPartial, DotEnvSchema, DotEnvSchemaPartial, type Id, IdSchema, type Template, type Url, type UrlOrPath, UrlOrPathSchema, type UrlPath, UrlPathSchema, UrlSchema, capitalizeFirstLetter, emptyDir, ensureBrowser, ensureFolder, ensureServer, exists, formatTargetDir, getPackageManager, installDependencies, isEmpty, isPackageInstalled, isValidPackageName, loadEnv, projectRoot, runsInBrowser, runsOnServer, setName, templates, toValidPackageName, validate, writeEnv }; |
@@ -58,7 +58,7 @@ import { AgentName } from 'package-manager-detector'; | ||
* ```typescript | ||
* const dirIsEmpty = isEmpty("/path/to/directory"); | ||
* const dirIsEmpty = await isEmpty("/path/to/directory"); | ||
* console.log(dirIsEmpty); | ||
* ``` | ||
*/ | ||
declare function isEmpty(path: string): boolean; | ||
declare function isEmpty(path: string): Promise<boolean>; | ||
/** | ||
@@ -71,6 +71,6 @@ * Empties a directory by removing all its contents except for the .git directory. | ||
* ```typescript | ||
* emptyDir("/path/to/directory"); | ||
* await emptyDir("/path/to/directory"); | ||
* ``` | ||
*/ | ||
declare function emptyDir(dir: string): void; | ||
declare function emptyDir(dir: string): Promise<void>; | ||
@@ -77,0 +77,0 @@ declare function getPackageManager(targetDir: string): Promise<AgentName>; |
@@ -48,2 +48,3 @@ import { ZodString, z, ZodSchema } from 'zod'; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: z.ZodLiteral<"0x5e771e1417100000000000000000000000000003">; | ||
SETTLEMINT_SMART_CONTRACT_SET: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -85,2 +86,3 @@ SETTLEMINT_INSTANCE: string; | ||
SETTLEMINT_NEW_PROJECT_NAME?: string | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}, { | ||
@@ -122,2 +124,3 @@ SETTLEMINT_INSTANCE: string; | ||
SETTLEMINT_NEW_PROJECT_NAME?: string | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}>; | ||
@@ -161,2 +164,3 @@ type DotEnv = z.infer<typeof DotEnvSchema>; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY: z.ZodOptional<z.ZodLiteral<"0x5e771e1417100000000000000000000000000003">>; | ||
SETTLEMINT_SMART_CONTRACT_SET: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -198,2 +202,3 @@ SETTLEMINT_INSTANCE?: string | undefined; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY?: "0x5e771e1417100000000000000000000000000003" | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}, { | ||
@@ -235,2 +240,3 @@ SETTLEMINT_INSTANCE?: string | undefined; | ||
SETTLEMINT_PREDEPLOYED_CONTRACT_ERC20_DEX_FACTORY?: "0x5e771e1417100000000000000000000000000003" | undefined; | ||
SETTLEMINT_SMART_CONTRACT_SET?: string | undefined; | ||
}>; | ||
@@ -237,0 +243,0 @@ type DotEnvPartial = z.infer<typeof DotEnvSchemaPartial>; |
{ | ||
"name": "@settlemint/sdk-utils", | ||
"description": "SettleMint SDK, integrate SettleMint into your application with ease.", | ||
"version": "0.6.24", | ||
"version": "0.6.25-main42bae51", | ||
"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
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
322898
2911
24