@settlemint/sdk-utils
Advanced tools
Comparing version 0.6.5 to 0.6.6
@@ -16,3 +16,2 @@ import { z } from 'zod'; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_PORTAL: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>; | ||
@@ -51,3 +50,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -82,3 +80,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -111,3 +108,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_PORTAL: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>; | ||
@@ -142,3 +138,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -173,3 +168,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -176,0 +170,0 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; |
@@ -22,3 +22,2 @@ import { ZodString, z, ZodSchema } from 'zod'; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_PORTAL: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>; | ||
@@ -57,3 +56,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -88,3 +86,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -117,3 +114,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_PORTAL: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>; | ||
@@ -148,3 +144,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -179,3 +174,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -340,2 +334,17 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
/** | ||
* Checks if a package is installed in the project's dependencies. | ||
* @param name - The name of the package to check. | ||
* @param path - Optional path to the project root. If not provided, it will be determined automatically. | ||
* @returns A boolean indicating whether the package is installed in any of the dependency types (dependencies, devDependencies, or peerDependencies). | ||
* @throws {Error} If there's an issue reading the package.json file. | ||
* | ||
* @example | ||
* ```typescript | ||
* const isInstalled = await isPackageInstalled("react"); | ||
* console.log(isInstalled); // true or false | ||
* ``` | ||
*/ | ||
declare function isPackageInstalled(name: string, path?: string): Promise<boolean>; | ||
/** | ||
* Sets the name field in the package.json file. | ||
@@ -354,3 +363,6 @@ * @param name - The new name to set in the package.json file. | ||
declare function ensureServer(): void; | ||
declare function ensureBrowser(): void; | ||
declare const runsInBrowser: boolean; | ||
declare const runsOnServer: boolean; | ||
export { type AccessToken, AccessTokenSchema, type DotEnv, type DotEnvPartial, DotEnvSchema, DotEnvSchemaPartial, type Id, IdSchema, type Template, type Url, type UrlOrPath, UrlOrPathSchema, type UrlPath, UrlPathSchema, UrlSchema, emptyDir, ensureFolder, ensureServer, formatTargetDir, getPackageManager, installDependencies, isEmpty, isValidPackageName, loadEnv, projectRoot, 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, emptyDir, ensureBrowser, ensureFolder, ensureServer, formatTargetDir, getPackageManager, installDependencies, isEmpty, isPackageInstalled, isValidPackageName, loadEnv, projectRoot, runsInBrowser, runsOnServer, setName, templates, toValidPackageName, validate, writeEnv }; |
@@ -78,2 +78,17 @@ /** | ||
/** | ||
* Checks if a package is installed in the project's dependencies. | ||
* @param name - The name of the package to check. | ||
* @param path - Optional path to the project root. If not provided, it will be determined automatically. | ||
* @returns A boolean indicating whether the package is installed in any of the dependency types (dependencies, devDependencies, or peerDependencies). | ||
* @throws {Error} If there's an issue reading the package.json file. | ||
* | ||
* @example | ||
* ```typescript | ||
* const isInstalled = await isPackageInstalled("react"); | ||
* console.log(isInstalled); // true or false | ||
* ``` | ||
*/ | ||
declare function isPackageInstalled(name: string, path?: string): Promise<boolean>; | ||
/** | ||
* Sets the name field in the package.json file. | ||
@@ -91,2 +106,2 @@ * @param name - The new name to set in the package.json file. | ||
export { type Template, emptyDir, formatTargetDir, getPackageManager, installDependencies, isEmpty, isValidPackageName, setName, templates, toValidPackageName }; | ||
export { type Template, emptyDir, formatTargetDir, getPackageManager, installDependencies, isEmpty, isPackageInstalled, isValidPackageName, setName, templates, toValidPackageName }; |
declare function ensureServer(): void; | ||
declare function ensureBrowser(): void; | ||
declare const runsInBrowser: boolean; | ||
declare const runsOnServer: boolean; | ||
export { ensureServer }; | ||
export { ensureBrowser, ensureServer, runsInBrowser, runsOnServer }; |
@@ -22,3 +22,2 @@ import { ZodString, z, ZodSchema } from 'zod'; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_PORTAL: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>; | ||
@@ -57,3 +56,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodString>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -88,3 +86,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -117,3 +114,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_PORTAL: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>>; | ||
@@ -148,3 +144,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -179,3 +174,2 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT?: string | undefined; | ||
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK?: string | undefined; | ||
SETTLEMINT_PORTAL?: string | undefined; | ||
@@ -182,0 +176,0 @@ SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?: string | undefined; |
{ | ||
"name": "@settlemint/sdk-utils", | ||
"description": "SettleMint SDK, integrate SettleMint into your application with ease.", | ||
"version": "0.6.5", | ||
"version": "0.6.6", | ||
"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
281449
2575