@settlemint/sdk-utils 2.1.0 → 2.1.1
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/README.md +106 -73
- package/dist/environment.cjs +3 -1
- package/dist/environment.cjs.map +1 -1
- package/dist/environment.d.cts +7 -0
- package/dist/environment.d.ts +7 -0
- package/dist/environment.mjs +3 -1
- package/dist/environment.mjs.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/dist/logging.cjs +45 -8
- package/dist/logging.cjs.map +1 -1
- package/dist/logging.d.cts +3 -1
- package/dist/logging.d.ts +3 -1
- package/dist/logging.mjs +45 -8
- package/dist/logging.mjs.map +1 -1
- package/dist/terminal.cjs.map +1 -1
- package/dist/terminal.mjs.map +1 -1
- package/dist/validation.cjs +3 -1
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.cts +7 -0
- package/dist/validation.d.ts +7 -0
- package/dist/validation.mjs +3 -1
- package/dist/validation.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
- [setName()](#setname)
|
|
63
63
|
- [spinner()](#spinner)
|
|
64
64
|
- [table()](#table)
|
|
65
|
+
- [truncate()](#truncate)
|
|
65
66
|
- [tryParseJson()](#tryparsejson)
|
|
66
67
|
- [validate()](#validate)
|
|
67
68
|
- [writeEnv()](#writeenv)
|
|
@@ -106,7 +107,7 @@ The SettleMint Utils SDK provides a collection of shared utilities and helper fu
|
|
|
106
107
|
|
|
107
108
|
> **ascii**(): `void`
|
|
108
109
|
|
|
109
|
-
Defined in: [sdk/utils/src/terminal/ascii.ts:13](https://github.com/settlemint/sdk/blob/v2.1.
|
|
110
|
+
Defined in: [sdk/utils/src/terminal/ascii.ts:13](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/ascii.ts#L13)
|
|
110
111
|
|
|
111
112
|
Prints the SettleMint ASCII art logo to the console in magenta color.
|
|
112
113
|
Used for CLI branding and visual identification.
|
|
@@ -130,7 +131,7 @@ ascii();
|
|
|
130
131
|
|
|
131
132
|
> **camelCaseToWords**(`s`): `string`
|
|
132
133
|
|
|
133
|
-
Defined in: [sdk/utils/src/string.ts:29](https://github.com/settlemint/sdk/blob/v2.1.
|
|
134
|
+
Defined in: [sdk/utils/src/string.ts:29](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/string.ts#L29)
|
|
134
135
|
|
|
135
136
|
Converts a camelCase string to a human-readable string.
|
|
136
137
|
|
|
@@ -161,7 +162,7 @@ const words = camelCaseToWords("camelCaseString");
|
|
|
161
162
|
|
|
162
163
|
> **cancel**(`msg`): `never`
|
|
163
164
|
|
|
164
|
-
Defined in: [sdk/utils/src/terminal/cancel.ts:23](https://github.com/settlemint/sdk/blob/v2.1.
|
|
165
|
+
Defined in: [sdk/utils/src/terminal/cancel.ts:23](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/cancel.ts#L23)
|
|
165
166
|
|
|
166
167
|
Displays an error message in red inverse text and throws a CancelError.
|
|
167
168
|
Used to terminate execution with a visible error message.
|
|
@@ -194,7 +195,7 @@ cancel("An error occurred");
|
|
|
194
195
|
|
|
195
196
|
> **capitalizeFirstLetter**(`val`): `string`
|
|
196
197
|
|
|
197
|
-
Defined in: [sdk/utils/src/string.ts:13](https://github.com/settlemint/sdk/blob/v2.1.
|
|
198
|
+
Defined in: [sdk/utils/src/string.ts:13](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/string.ts#L13)
|
|
198
199
|
|
|
199
200
|
Capitalizes the first letter of a string.
|
|
200
201
|
|
|
@@ -225,7 +226,7 @@ const capitalized = capitalizeFirstLetter("hello");
|
|
|
225
226
|
|
|
226
227
|
> **createLogger**(`options`): [`Logger`](#logger)
|
|
227
228
|
|
|
228
|
-
Defined in: [sdk/utils/src/logging/logger.ts:
|
|
229
|
+
Defined in: [sdk/utils/src/logging/logger.ts:50](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L50)
|
|
229
230
|
|
|
230
231
|
Creates a simple logger with configurable log level
|
|
231
232
|
|
|
@@ -258,7 +259,7 @@ logger.error('Operation failed', new Error('Connection timeout'));
|
|
|
258
259
|
|
|
259
260
|
> **emptyDir**(`dir`): `Promise`\<`void`\>
|
|
260
261
|
|
|
261
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:45](https://github.com/settlemint/sdk/blob/v2.1.
|
|
262
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:45](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/download-and-extract.ts#L45)
|
|
262
263
|
|
|
263
264
|
Removes all contents of a directory except the .git folder
|
|
264
265
|
|
|
@@ -286,7 +287,7 @@ await emptyDir("/path/to/dir"); // Removes all contents except .git
|
|
|
286
287
|
|
|
287
288
|
> **ensureBrowser**(): `void`
|
|
288
289
|
|
|
289
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:31](https://github.com/settlemint/sdk/blob/v2.1.
|
|
290
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:31](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/runtime/ensure-server.ts#L31)
|
|
290
291
|
|
|
291
292
|
Ensures that code is running in a browser environment and not on the server.
|
|
292
293
|
|
|
@@ -313,7 +314,7 @@ ensureBrowser();
|
|
|
313
314
|
|
|
314
315
|
> **ensureServer**(): `void`
|
|
315
316
|
|
|
316
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:13](https://github.com/settlemint/sdk/blob/v2.1.
|
|
317
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:13](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/runtime/ensure-server.ts#L13)
|
|
317
318
|
|
|
318
319
|
Ensures that code is running on the server and not in a browser environment.
|
|
319
320
|
|
|
@@ -340,7 +341,7 @@ ensureServer();
|
|
|
340
341
|
|
|
341
342
|
> **executeCommand**(`command`, `args`, `options?`): `Promise`\<`string`[]\>
|
|
342
343
|
|
|
343
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:31](https://github.com/settlemint/sdk/blob/v2.1.
|
|
344
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:31](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/execute-command.ts#L31)
|
|
344
345
|
|
|
345
346
|
Executes a command with the given arguments in a child process.
|
|
346
347
|
Pipes stdin to the child process and captures stdout/stderr output.
|
|
@@ -382,7 +383,7 @@ await executeCommand("npm", ["install"], { silent: true });
|
|
|
382
383
|
|
|
383
384
|
> **exists**(`path`): `Promise`\<`boolean`\>
|
|
384
385
|
|
|
385
|
-
Defined in: [sdk/utils/src/filesystem/exists.ts:17](https://github.com/settlemint/sdk/blob/v2.1.
|
|
386
|
+
Defined in: [sdk/utils/src/filesystem/exists.ts:17](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/filesystem/exists.ts#L17)
|
|
386
387
|
|
|
387
388
|
Checks if a file or directory exists at the given path
|
|
388
389
|
|
|
@@ -415,7 +416,7 @@ if (await exists('/path/to/file.txt')) {
|
|
|
415
416
|
|
|
416
417
|
> **fetchWithRetry**(`input`, `init?`, `maxRetries?`, `initialSleepTime?`): `Promise`\<`Response`\>
|
|
417
418
|
|
|
418
|
-
Defined in: [sdk/utils/src/http/fetch-with-retry.ts:18](https://github.com/settlemint/sdk/blob/v2.1.
|
|
419
|
+
Defined in: [sdk/utils/src/http/fetch-with-retry.ts:18](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/http/fetch-with-retry.ts#L18)
|
|
419
420
|
|
|
420
421
|
Retry an HTTP request with exponential backoff and jitter.
|
|
421
422
|
Only retries on server errors (5xx), rate limits (429), timeouts (408), and network errors.
|
|
@@ -453,7 +454,7 @@ const response = await fetchWithRetry("https://api.example.com/data");
|
|
|
453
454
|
|
|
454
455
|
> **findMonoRepoPackages**(`projectDir`): `Promise`\<`string`[]\>
|
|
455
456
|
|
|
456
|
-
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:59](https://github.com/settlemint/sdk/blob/v2.1.
|
|
457
|
+
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:59](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/filesystem/mono-repo.ts#L59)
|
|
457
458
|
|
|
458
459
|
Finds all packages in a monorepo
|
|
459
460
|
|
|
@@ -484,7 +485,7 @@ console.log(packages); // Output: ["/path/to/your/project/packages/core", "/path
|
|
|
484
485
|
|
|
485
486
|
> **findMonoRepoRoot**(`startDir`): `Promise`\<`null` \| `string`\>
|
|
486
487
|
|
|
487
|
-
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:19](https://github.com/settlemint/sdk/blob/v2.1.
|
|
488
|
+
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:19](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/filesystem/mono-repo.ts#L19)
|
|
488
489
|
|
|
489
490
|
Finds the root directory of a monorepo
|
|
490
491
|
|
|
@@ -515,7 +516,7 @@ console.log(root); // Output: /path/to/your/project/packages/core
|
|
|
515
516
|
|
|
516
517
|
> **formatTargetDir**(`targetDir`): `string`
|
|
517
518
|
|
|
518
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:15](https://github.com/settlemint/sdk/blob/v2.1.
|
|
519
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:15](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/download-and-extract.ts#L15)
|
|
519
520
|
|
|
520
521
|
Formats a directory path by removing trailing slashes and whitespace
|
|
521
522
|
|
|
@@ -545,7 +546,7 @@ const formatted = formatTargetDir("/path/to/dir/ "); // "/path/to/dir"
|
|
|
545
546
|
|
|
546
547
|
> **getPackageManager**(`targetDir?`): `Promise`\<`AgentName`\>
|
|
547
548
|
|
|
548
|
-
Defined in: [sdk/utils/src/package-manager/get-package-manager.ts:15](https://github.com/settlemint/sdk/blob/v2.1.
|
|
549
|
+
Defined in: [sdk/utils/src/package-manager/get-package-manager.ts:15](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/get-package-manager.ts#L15)
|
|
549
550
|
|
|
550
551
|
Detects the package manager used in the current project
|
|
551
552
|
|
|
@@ -576,7 +577,7 @@ console.log(`Using ${packageManager}`);
|
|
|
576
577
|
|
|
577
578
|
> **getPackageManagerExecutable**(`targetDir?`): `Promise`\<\{ `args`: `string`[]; `command`: `string`; \}\>
|
|
578
579
|
|
|
579
|
-
Defined in: [sdk/utils/src/package-manager/get-package-manager-executable.ts:14](https://github.com/settlemint/sdk/blob/v2.1.
|
|
580
|
+
Defined in: [sdk/utils/src/package-manager/get-package-manager-executable.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/get-package-manager-executable.ts#L14)
|
|
580
581
|
|
|
581
582
|
Retrieves the executable command and arguments for the package manager
|
|
582
583
|
|
|
@@ -607,7 +608,7 @@ console.log(`Using ${command} with args: ${args.join(" ")}`);
|
|
|
607
608
|
|
|
608
609
|
> **graphqlFetchWithRetry**\<`Data`\>(`input`, `init?`, `maxRetries?`, `initialSleepTime?`): `Promise`\<`Data`\>
|
|
609
610
|
|
|
610
|
-
Defined in: [sdk/utils/src/http/graphql-fetch-with-retry.ts:34](https://github.com/settlemint/sdk/blob/v2.1.
|
|
611
|
+
Defined in: [sdk/utils/src/http/graphql-fetch-with-retry.ts:34](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/http/graphql-fetch-with-retry.ts#L34)
|
|
611
612
|
|
|
612
613
|
Executes a GraphQL request with automatic retries using exponential backoff and jitter.
|
|
613
614
|
Only retries on server errors (5xx), rate limits (429), timeouts (408), and network errors.
|
|
@@ -666,7 +667,7 @@ const data = await graphqlFetchWithRetry<{ user: { id: string } }>(
|
|
|
666
667
|
|
|
667
668
|
> **installDependencies**(`pkgs`, `cwd?`): `Promise`\<`void`\>
|
|
668
669
|
|
|
669
|
-
Defined in: [sdk/utils/src/package-manager/install-dependencies.ts:20](https://github.com/settlemint/sdk/blob/v2.1.
|
|
670
|
+
Defined in: [sdk/utils/src/package-manager/install-dependencies.ts:20](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/install-dependencies.ts#L20)
|
|
670
671
|
|
|
671
672
|
Installs one or more packages as dependencies using the detected package manager
|
|
672
673
|
|
|
@@ -705,7 +706,7 @@ await installDependencies(["express", "cors"]);
|
|
|
705
706
|
|
|
706
707
|
> **intro**(`msg`): `void`
|
|
707
708
|
|
|
708
|
-
Defined in: [sdk/utils/src/terminal/intro.ts:15](https://github.com/settlemint/sdk/blob/v2.1.
|
|
709
|
+
Defined in: [sdk/utils/src/terminal/intro.ts:15](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/intro.ts#L15)
|
|
709
710
|
|
|
710
711
|
Displays an introductory message in magenta text with padding.
|
|
711
712
|
Any sensitive tokens in the message are masked before display.
|
|
@@ -735,7 +736,7 @@ intro("Starting deployment...");
|
|
|
735
736
|
|
|
736
737
|
> **isEmpty**(`path`): `Promise`\<`boolean`\>
|
|
737
738
|
|
|
738
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:31](https://github.com/settlemint/sdk/blob/v2.1.
|
|
739
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:31](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/download-and-extract.ts#L31)
|
|
739
740
|
|
|
740
741
|
Checks if a directory is empty or contains only a .git folder
|
|
741
742
|
|
|
@@ -767,7 +768,7 @@ if (await isEmpty("/path/to/dir")) {
|
|
|
767
768
|
|
|
768
769
|
> **isPackageInstalled**(`name`, `path?`): `Promise`\<`boolean`\>
|
|
769
770
|
|
|
770
|
-
Defined in: [sdk/utils/src/package-manager/is-package-installed.ts:17](https://github.com/settlemint/sdk/blob/v2.1.
|
|
771
|
+
Defined in: [sdk/utils/src/package-manager/is-package-installed.ts:17](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/is-package-installed.ts#L17)
|
|
771
772
|
|
|
772
773
|
Checks if a package is installed in the project's dependencies, devDependencies, or peerDependencies.
|
|
773
774
|
|
|
@@ -803,7 +804,7 @@ console.log(`@settlemint/sdk-utils is installed: ${isInstalled}`);
|
|
|
803
804
|
|
|
804
805
|
> **list**(`title`, `items`): `void`
|
|
805
806
|
|
|
806
|
-
Defined in: [sdk/utils/src/terminal/list.ts:23](https://github.com/settlemint/sdk/blob/v2.1.
|
|
807
|
+
Defined in: [sdk/utils/src/terminal/list.ts:23](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/list.ts#L23)
|
|
807
808
|
|
|
808
809
|
Displays a list of items in a formatted manner, supporting nested items.
|
|
809
810
|
|
|
@@ -843,7 +844,7 @@ list("Providers", [
|
|
|
843
844
|
|
|
844
845
|
> **loadEnv**\<`T`\>(`validateEnv`, `prod`, `path`): `Promise`\<`T` *extends* `true` ? `object` : `object`\>
|
|
845
846
|
|
|
846
|
-
Defined in: [sdk/utils/src/environment/load-env.ts:25](https://github.com/settlemint/sdk/blob/v2.1.
|
|
847
|
+
Defined in: [sdk/utils/src/environment/load-env.ts:25](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/environment/load-env.ts#L25)
|
|
847
848
|
|
|
848
849
|
Loads environment variables from .env files.
|
|
849
850
|
To enable encryption with dotenvx (https://www.dotenvx.com/docs) run `bunx dotenvx encrypt`
|
|
@@ -891,7 +892,7 @@ const rawEnv = await loadEnv(false, false);
|
|
|
891
892
|
|
|
892
893
|
> **maskTokens**(`output`): `string`
|
|
893
894
|
|
|
894
|
-
Defined in: [sdk/utils/src/logging/mask-tokens.ts:13](https://github.com/settlemint/sdk/blob/v2.1.
|
|
895
|
+
Defined in: [sdk/utils/src/logging/mask-tokens.ts:13](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/mask-tokens.ts#L13)
|
|
895
896
|
|
|
896
897
|
Masks sensitive SettleMint tokens in output text by replacing them with asterisks.
|
|
897
898
|
Handles personal access tokens (PAT), application access tokens (AAT), and service account tokens (SAT).
|
|
@@ -923,7 +924,7 @@ const masked = maskTokens("Token: sm_pat_****"); // "Token: ***"
|
|
|
923
924
|
|
|
924
925
|
> **note**(`message`, `level`): `void`
|
|
925
926
|
|
|
926
|
-
Defined in: [sdk/utils/src/terminal/note.ts:20](https://github.com/settlemint/sdk/blob/v2.1.
|
|
927
|
+
Defined in: [sdk/utils/src/terminal/note.ts:20](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/note.ts#L20)
|
|
927
928
|
|
|
928
929
|
Displays a note message with optional warning level formatting.
|
|
929
930
|
Regular notes are displayed in normal text, while warnings are shown in yellow.
|
|
@@ -958,7 +959,7 @@ note("Low disk space remaining", "warn");
|
|
|
958
959
|
|
|
959
960
|
> **outro**(`msg`): `void`
|
|
960
961
|
|
|
961
|
-
Defined in: [sdk/utils/src/terminal/outro.ts:15](https://github.com/settlemint/sdk/blob/v2.1.
|
|
962
|
+
Defined in: [sdk/utils/src/terminal/outro.ts:15](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/outro.ts#L15)
|
|
962
963
|
|
|
963
964
|
Displays a closing message in green inverted text with padding.
|
|
964
965
|
Any sensitive tokens in the message are masked before display.
|
|
@@ -988,7 +989,7 @@ outro("Deployment completed successfully!");
|
|
|
988
989
|
|
|
989
990
|
> **projectRoot**(`fallbackToCwd`, `cwd?`): `Promise`\<`string`\>
|
|
990
991
|
|
|
991
|
-
Defined in: [sdk/utils/src/filesystem/project-root.ts:18](https://github.com/settlemint/sdk/blob/v2.1.
|
|
992
|
+
Defined in: [sdk/utils/src/filesystem/project-root.ts:18](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/filesystem/project-root.ts#L18)
|
|
992
993
|
|
|
993
994
|
Finds the root directory of the current project by locating the nearest package.json file
|
|
994
995
|
|
|
@@ -1025,7 +1026,7 @@ console.log(`Project root is at: ${rootDir}`);
|
|
|
1025
1026
|
|
|
1026
1027
|
> **replaceUnderscoresAndHyphensWithSpaces**(`s`): `string`
|
|
1027
1028
|
|
|
1028
|
-
Defined in: [sdk/utils/src/string.ts:48](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1029
|
+
Defined in: [sdk/utils/src/string.ts:48](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/string.ts#L48)
|
|
1029
1030
|
|
|
1030
1031
|
Replaces underscores and hyphens with spaces.
|
|
1031
1032
|
|
|
@@ -1056,9 +1057,9 @@ const result = replaceUnderscoresAndHyphensWithSpaces("Already_Spaced-Second");
|
|
|
1056
1057
|
|
|
1057
1058
|
> **requestLogger**(`logger`, `name`, `fn`): (...`args`) => `Promise`\<`Response`\>
|
|
1058
1059
|
|
|
1059
|
-
Defined in: [sdk/utils/src/logging/request-logger.ts:
|
|
1060
|
+
Defined in: [sdk/utils/src/logging/request-logger.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/request-logger.ts#L14)
|
|
1060
1061
|
|
|
1061
|
-
Logs the request and duration of a fetch call (>
|
|
1062
|
+
Logs the request and duration of a fetch call (> 500ms is logged as warn, otherwise info)
|
|
1062
1063
|
|
|
1063
1064
|
##### Parameters
|
|
1064
1065
|
|
|
@@ -1090,7 +1091,7 @@ The fetch function
|
|
|
1090
1091
|
|
|
1091
1092
|
> **retryWhenFailed**\<`T`\>(`fn`, `maxRetries`, `initialSleepTime`, `stopOnError?`): `Promise`\<`T`\>
|
|
1092
1093
|
|
|
1093
|
-
Defined in: [sdk/utils/src/retry.ts:14](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1094
|
+
Defined in: [sdk/utils/src/retry.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/retry.ts#L14)
|
|
1094
1095
|
|
|
1095
1096
|
Retry a function when it fails.
|
|
1096
1097
|
|
|
@@ -1130,7 +1131,7 @@ const result = await retryWhenFailed(() => readFile("/path/to/file.txt"), 3, 1_0
|
|
|
1130
1131
|
|
|
1131
1132
|
> **setName**(`name`, `path?`): `Promise`\<`void`\>
|
|
1132
1133
|
|
|
1133
|
-
Defined in: [sdk/utils/src/package-manager/set-name.ts:16](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1134
|
+
Defined in: [sdk/utils/src/package-manager/set-name.ts:16](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/package-manager/set-name.ts#L16)
|
|
1134
1135
|
|
|
1135
1136
|
Sets the name field in the package.json file
|
|
1136
1137
|
|
|
@@ -1165,7 +1166,7 @@ await setName("my-new-project-name");
|
|
|
1165
1166
|
|
|
1166
1167
|
> **spinner**\<`R`\>(`options`): `Promise`\<`R`\>
|
|
1167
1168
|
|
|
1168
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:54](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1169
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:54](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L54)
|
|
1169
1170
|
|
|
1170
1171
|
Displays a loading spinner while executing an async task.
|
|
1171
1172
|
Shows progress with start/stop messages and handles errors.
|
|
@@ -1215,7 +1216,7 @@ const result = await spinner({
|
|
|
1215
1216
|
|
|
1216
1217
|
> **table**(`title`, `data`): `void`
|
|
1217
1218
|
|
|
1218
|
-
Defined in: [sdk/utils/src/terminal/table.ts:20](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1219
|
+
Defined in: [sdk/utils/src/terminal/table.ts:20](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/table.ts#L20)
|
|
1219
1220
|
|
|
1220
1221
|
Displays data in a formatted table in the terminal.
|
|
1221
1222
|
|
|
@@ -1245,11 +1246,43 @@ table("My Table", data);
|
|
|
1245
1246
|
|
|
1246
1247
|
***
|
|
1247
1248
|
|
|
1249
|
+
#### truncate()
|
|
1250
|
+
|
|
1251
|
+
> **truncate**(`value`, `maxLength`): `string`
|
|
1252
|
+
|
|
1253
|
+
Defined in: [sdk/utils/src/string.ts:65](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/string.ts#L65)
|
|
1254
|
+
|
|
1255
|
+
Truncates a string to a maximum length and appends "..." if it is longer.
|
|
1256
|
+
|
|
1257
|
+
##### Parameters
|
|
1258
|
+
|
|
1259
|
+
| Parameter | Type | Description |
|
|
1260
|
+
| ------ | ------ | ------ |
|
|
1261
|
+
| `value` | `string` | The string to truncate |
|
|
1262
|
+
| `maxLength` | `number` | The maximum length of the string |
|
|
1263
|
+
|
|
1264
|
+
##### Returns
|
|
1265
|
+
|
|
1266
|
+
`string`
|
|
1267
|
+
|
|
1268
|
+
The truncated string or the original string if it is shorter than the maximum length
|
|
1269
|
+
|
|
1270
|
+
##### Example
|
|
1271
|
+
|
|
1272
|
+
```ts
|
|
1273
|
+
import { truncate } from "@settlemint/sdk-utils";
|
|
1274
|
+
|
|
1275
|
+
const truncated = truncate("Hello, world!", 10);
|
|
1276
|
+
// Returns: "Hello, wor..."
|
|
1277
|
+
```
|
|
1278
|
+
|
|
1279
|
+
***
|
|
1280
|
+
|
|
1248
1281
|
#### tryParseJson()
|
|
1249
1282
|
|
|
1250
1283
|
> **tryParseJson**\<`T`\>(`value`, `defaultValue`): `null` \| `T`
|
|
1251
1284
|
|
|
1252
|
-
Defined in: [sdk/utils/src/json.ts:23](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1285
|
+
Defined in: [sdk/utils/src/json.ts:23](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/json.ts#L23)
|
|
1253
1286
|
|
|
1254
1287
|
Attempts to parse a JSON string into a typed value, returning a default value if parsing fails.
|
|
1255
1288
|
|
|
@@ -1296,7 +1329,7 @@ const invalid = tryParseJson<string[]>(
|
|
|
1296
1329
|
|
|
1297
1330
|
> **validate**\<`T`\>(`schema`, `value`): `T`\[`"_output"`\]
|
|
1298
1331
|
|
|
1299
|
-
Defined in: [sdk/utils/src/validation/validate.ts:16](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1332
|
+
Defined in: [sdk/utils/src/validation/validate.ts:16](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/validate.ts#L16)
|
|
1300
1333
|
|
|
1301
1334
|
Validates a value against a given Zod schema.
|
|
1302
1335
|
|
|
@@ -1337,7 +1370,7 @@ const validatedId = validate(IdSchema, "550e8400-e29b-41d4-a716-446655440000");
|
|
|
1337
1370
|
|
|
1338
1371
|
> **writeEnv**(`options`): `Promise`\<`void`\>
|
|
1339
1372
|
|
|
1340
|
-
Defined in: [sdk/utils/src/environment/write-env.ts:41](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1373
|
+
Defined in: [sdk/utils/src/environment/write-env.ts:41](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/environment/write-env.ts#L41)
|
|
1341
1374
|
|
|
1342
1375
|
Writes environment variables to .env files across a project or monorepo
|
|
1343
1376
|
|
|
@@ -1345,9 +1378,9 @@ Writes environment variables to .env files across a project or monorepo
|
|
|
1345
1378
|
|
|
1346
1379
|
| Parameter | Type | Description |
|
|
1347
1380
|
| ------ | ------ | ------ |
|
|
1348
|
-
| `options` | \{ `cwd`: `string`; `env`: `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}\>; `prod`: `boolean`; `secrets`: `boolean`; \} | The options for writing the environment variables |
|
|
1381
|
+
| `options` | \{ `cwd`: `string`; `env`: `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}\>; `prod`: `boolean`; `secrets`: `boolean`; \} | The options for writing the environment variables |
|
|
1349
1382
|
| `options.cwd?` | `string` | The directory to start searching for the package.json file from (defaults to process.cwd()) |
|
|
1350
|
-
| `options.env` | `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}\> | The environment variables to write |
|
|
1383
|
+
| `options.env` | `Partial`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}\> | The environment variables to write |
|
|
1351
1384
|
| `options.prod` | `boolean` | Whether to write production environment variables |
|
|
1352
1385
|
| `options.secrets` | `boolean` | Whether to write to .env.local files for secrets |
|
|
1353
1386
|
|
|
@@ -1389,7 +1422,7 @@ await writeEnv({
|
|
|
1389
1422
|
|
|
1390
1423
|
#### CancelError
|
|
1391
1424
|
|
|
1392
|
-
Defined in: [sdk/utils/src/terminal/cancel.ts:8](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1425
|
+
Defined in: [sdk/utils/src/terminal/cancel.ts:8](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/cancel.ts#L8)
|
|
1393
1426
|
|
|
1394
1427
|
Error class used to indicate that the operation was cancelled.
|
|
1395
1428
|
This error is used to signal that the operation should be aborted.
|
|
@@ -1402,7 +1435,7 @@ This error is used to signal that the operation should be aborted.
|
|
|
1402
1435
|
|
|
1403
1436
|
#### SpinnerError
|
|
1404
1437
|
|
|
1405
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:11](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1438
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:11](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L11)
|
|
1406
1439
|
|
|
1407
1440
|
Error class used to indicate that the spinner operation failed.
|
|
1408
1441
|
This error is used to signal that the operation should be aborted.
|
|
@@ -1415,7 +1448,7 @@ This error is used to signal that the operation should be aborted.
|
|
|
1415
1448
|
|
|
1416
1449
|
#### ExecuteCommandOptions
|
|
1417
1450
|
|
|
1418
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:7](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1451
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:7](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/execute-command.ts#L7)
|
|
1419
1452
|
|
|
1420
1453
|
Options for executing a command, extending SpawnOptionsWithoutStdio
|
|
1421
1454
|
|
|
@@ -1427,13 +1460,13 @@ Options for executing a command, extending SpawnOptionsWithoutStdio
|
|
|
1427
1460
|
|
|
1428
1461
|
| Property | Type | Description | Defined in |
|
|
1429
1462
|
| ------ | ------ | ------ | ------ |
|
|
1430
|
-
| <a id="silent"></a> `silent?` | `boolean` | Whether to suppress output to stdout/stderr | [sdk/utils/src/terminal/execute-command.ts:9](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1463
|
+
| <a id="silent"></a> `silent?` | `boolean` | Whether to suppress output to stdout/stderr | [sdk/utils/src/terminal/execute-command.ts:9](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/execute-command.ts#L9) |
|
|
1431
1464
|
|
|
1432
1465
|
***
|
|
1433
1466
|
|
|
1434
1467
|
#### Logger
|
|
1435
1468
|
|
|
1436
|
-
Defined in: [sdk/utils/src/logging/logger.ts:23](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1469
|
+
Defined in: [sdk/utils/src/logging/logger.ts:23](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L23)
|
|
1437
1470
|
|
|
1438
1471
|
Simple logger interface with basic logging methods
|
|
1439
1472
|
Logger
|
|
@@ -1442,16 +1475,16 @@ Simple logger interface with basic logging methods
|
|
|
1442
1475
|
|
|
1443
1476
|
| Property | Type | Description | Defined in |
|
|
1444
1477
|
| ------ | ------ | ------ | ------ |
|
|
1445
|
-
| <a id="debug"></a> `debug` | (`message`, ...`args`) => `void` | Log debug information | [sdk/utils/src/logging/logger.ts:25](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1446
|
-
| <a id="error"></a> `error` | (`message`, ...`args`) => `void` | Log errors | [sdk/utils/src/logging/logger.ts:31](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1447
|
-
| <a id="info"></a> `info` | (`message`, ...`args`) => `void` | Log general information | [sdk/utils/src/logging/logger.ts:27](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1448
|
-
| <a id="warn"></a> `warn` | (`message`, ...`args`) => `void` | Log warnings | [sdk/utils/src/logging/logger.ts:29](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1478
|
+
| <a id="debug"></a> `debug` | (`message`, ...`args`) => `void` | Log debug information | [sdk/utils/src/logging/logger.ts:25](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L25) |
|
|
1479
|
+
| <a id="error"></a> `error` | (`message`, ...`args`) => `void` | Log errors | [sdk/utils/src/logging/logger.ts:31](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L31) |
|
|
1480
|
+
| <a id="info"></a> `info` | (`message`, ...`args`) => `void` | Log general information | [sdk/utils/src/logging/logger.ts:27](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L27) |
|
|
1481
|
+
| <a id="warn"></a> `warn` | (`message`, ...`args`) => `void` | Log warnings | [sdk/utils/src/logging/logger.ts:29](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L29) |
|
|
1449
1482
|
|
|
1450
1483
|
***
|
|
1451
1484
|
|
|
1452
1485
|
#### LoggerOptions
|
|
1453
1486
|
|
|
1454
|
-
Defined in: [sdk/utils/src/logging/logger.ts:12](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1487
|
+
Defined in: [sdk/utils/src/logging/logger.ts:12](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L12)
|
|
1455
1488
|
|
|
1456
1489
|
Configuration options for the logger
|
|
1457
1490
|
LoggerOptions
|
|
@@ -1460,14 +1493,14 @@ Configuration options for the logger
|
|
|
1460
1493
|
|
|
1461
1494
|
| Property | Type | Description | Defined in |
|
|
1462
1495
|
| ------ | ------ | ------ | ------ |
|
|
1463
|
-
| <a id="level"></a> `level?` | [`LogLevel`](#loglevel) | The minimum log level to output | [sdk/utils/src/logging/logger.ts:14](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1464
|
-
| <a id="prefix"></a> `prefix?` | `string` | The prefix to add to the log message | [sdk/utils/src/logging/logger.ts:16](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1496
|
+
| <a id="level"></a> `level?` | [`LogLevel`](#loglevel) | The minimum log level to output | [sdk/utils/src/logging/logger.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L14) |
|
|
1497
|
+
| <a id="prefix"></a> `prefix?` | `string` | The prefix to add to the log message | [sdk/utils/src/logging/logger.ts:16](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L16) |
|
|
1465
1498
|
|
|
1466
1499
|
***
|
|
1467
1500
|
|
|
1468
1501
|
#### SpinnerOptions\<R\>
|
|
1469
1502
|
|
|
1470
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:24](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1503
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:24](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L24)
|
|
1471
1504
|
|
|
1472
1505
|
Options for configuring the spinner behavior
|
|
1473
1506
|
|
|
@@ -1481,9 +1514,9 @@ Options for configuring the spinner behavior
|
|
|
1481
1514
|
|
|
1482
1515
|
| Property | Type | Description | Defined in |
|
|
1483
1516
|
| ------ | ------ | ------ | ------ |
|
|
1484
|
-
| <a id="startmessage"></a> `startMessage` | `string` | Message to display when spinner starts | [sdk/utils/src/terminal/spinner.ts:26](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1485
|
-
| <a id="stopmessage"></a> `stopMessage` | `string` | Message to display when spinner completes successfully | [sdk/utils/src/terminal/spinner.ts:30](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1486
|
-
| <a id="task"></a> `task` | (`spinner?`) => `Promise`\<`R`\> | Async task to execute while spinner is active | [sdk/utils/src/terminal/spinner.ts:28](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1517
|
+
| <a id="startmessage"></a> `startMessage` | `string` | Message to display when spinner starts | [sdk/utils/src/terminal/spinner.ts:26](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L26) |
|
|
1518
|
+
| <a id="stopmessage"></a> `stopMessage` | `string` | Message to display when spinner completes successfully | [sdk/utils/src/terminal/spinner.ts:30](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L30) |
|
|
1519
|
+
| <a id="task"></a> `task` | (`spinner?`) => `Promise`\<`R`\> | Async task to execute while spinner is active | [sdk/utils/src/terminal/spinner.ts:28](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/terminal/spinner.ts#L28) |
|
|
1487
1520
|
|
|
1488
1521
|
### Type Aliases
|
|
1489
1522
|
|
|
@@ -1491,7 +1524,7 @@ Options for configuring the spinner behavior
|
|
|
1491
1524
|
|
|
1492
1525
|
> **DotEnv** = `z.infer`\<*typeof* [`DotEnvSchema`](#dotenvschema)\>
|
|
1493
1526
|
|
|
1494
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1527
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:91](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L91)
|
|
1495
1528
|
|
|
1496
1529
|
Type definition for the environment variables schema.
|
|
1497
1530
|
|
|
@@ -1501,7 +1534,7 @@ Type definition for the environment variables schema.
|
|
|
1501
1534
|
|
|
1502
1535
|
> **DotEnvPartial** = `z.infer`\<*typeof* [`DotEnvSchemaPartial`](#dotenvschemapartial)\>
|
|
1503
1536
|
|
|
1504
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1537
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:102](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L102)
|
|
1505
1538
|
|
|
1506
1539
|
Type definition for the partial environment variables schema.
|
|
1507
1540
|
|
|
@@ -1511,7 +1544,7 @@ Type definition for the partial environment variables schema.
|
|
|
1511
1544
|
|
|
1512
1545
|
> **Id** = `z.infer`\<*typeof* [`IdSchema`](#idschema)\>
|
|
1513
1546
|
|
|
1514
|
-
Defined in: [sdk/utils/src/validation/id.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1547
|
+
Defined in: [sdk/utils/src/validation/id.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/id.schema.ts#L30)
|
|
1515
1548
|
|
|
1516
1549
|
Type definition for database IDs, inferred from IdSchema.
|
|
1517
1550
|
Can be either a PostgreSQL UUID string or MongoDB ObjectID string.
|
|
@@ -1522,7 +1555,7 @@ Can be either a PostgreSQL UUID string or MongoDB ObjectID string.
|
|
|
1522
1555
|
|
|
1523
1556
|
> **LogLevel** = `"debug"` \| `"info"` \| `"warn"` \| `"error"` \| `"none"`
|
|
1524
1557
|
|
|
1525
|
-
Defined in: [sdk/utils/src/logging/logger.ts:6](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1558
|
+
Defined in: [sdk/utils/src/logging/logger.ts:6](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/logging/logger.ts#L6)
|
|
1526
1559
|
|
|
1527
1560
|
Log levels supported by the logger
|
|
1528
1561
|
|
|
@@ -1532,7 +1565,7 @@ Log levels supported by the logger
|
|
|
1532
1565
|
|
|
1533
1566
|
> `const` **AccessTokenSchema**: `ZodString`
|
|
1534
1567
|
|
|
1535
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:21](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1568
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:21](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/access-token.schema.ts#L21)
|
|
1536
1569
|
|
|
1537
1570
|
Schema for validating both application and personal access tokens.
|
|
1538
1571
|
Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
@@ -1543,7 +1576,7 @@ Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
|
1543
1576
|
|
|
1544
1577
|
> `const` **ApplicationAccessTokenSchema**: `ZodString`
|
|
1545
1578
|
|
|
1546
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:7](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1579
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:7](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/access-token.schema.ts#L7)
|
|
1547
1580
|
|
|
1548
1581
|
Schema for validating application access tokens.
|
|
1549
1582
|
Application access tokens start with 'sm_aat_' prefix.
|
|
@@ -1552,9 +1585,9 @@ Application access tokens start with 'sm_aat_' prefix.
|
|
|
1552
1585
|
|
|
1553
1586
|
#### DotEnvSchema
|
|
1554
1587
|
|
|
1555
|
-
> `const` **DotEnvSchema**: `ZodObject`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_APPLICATION`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKCHAIN_NODE`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKSCOUT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HASURA`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HASURA_ADMIN_SECRET`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HASURA_DATABASE_URL`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HASURA_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HD_PRIVATE_KEY`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_INSTANCE`: `ZodDefault`\<`ZodString`\>; `SETTLEMINT_IPFS`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_IPFS_API_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_LOAD_BALANCER`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_MINIO`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_MINIO_ACCESS_KEY`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_MINIO_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_MINIO_SECRET_KEY`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_NEW_PROJECT_NAME`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_PORTAL`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_THEGRAPH`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `ZodEffects`\<`ZodOptional`\<`ZodArray`\<`ZodString`, `"many"`\>\>, `undefined` \| `string`[], `unknown`\>; `SETTLEMINT_WORKSPACE`: `ZodOptional`\<`ZodString`\>; \}, `"strip"`, `ZodTypeAny`, \{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}, \{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `unknown`; `SETTLEMINT_WORKSPACE`: `string`; \}\>
|
|
1588
|
+
> `const` **DotEnvSchema**: `ZodObject`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_APPLICATION`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKCHAIN_NODE`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKSCOUT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HASURA`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HASURA_ADMIN_SECRET`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HASURA_DATABASE_URL`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HASURA_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_HD_PRIVATE_KEY`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_INSTANCE`: `ZodDefault`\<`ZodString`\>; `SETTLEMINT_IPFS`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_IPFS_API_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_LOAD_BALANCER`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_LOG_LEVEL`: `ZodDefault`\<`ZodEnum`\<\[`"debug"`, `"info"`, `"warn"`, `"error"`, `"none"`\]\>\>; `SETTLEMINT_MINIO`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_MINIO_ACCESS_KEY`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_MINIO_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_MINIO_SECRET_KEY`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_NEW_PROJECT_NAME`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_PORTAL`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_THEGRAPH`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `ZodEffects`\<`ZodOptional`\<`ZodArray`\<`ZodString`, `"many"`\>\>, `undefined` \| `string`[], `unknown`\>; `SETTLEMINT_WORKSPACE`: `ZodOptional`\<`ZodString`\>; \}, `"strip"`, `ZodTypeAny`, \{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}, \{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `unknown`; `SETTLEMINT_WORKSPACE`: `string`; \}\>
|
|
1556
1589
|
|
|
1557
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:12](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1590
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:12](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L12)
|
|
1558
1591
|
|
|
1559
1592
|
Schema for validating environment variables used by the SettleMint SDK.
|
|
1560
1593
|
Defines validation rules and types for configuration values like URLs,
|
|
@@ -1564,9 +1597,9 @@ access tokens, workspace names, and service endpoints.
|
|
|
1564
1597
|
|
|
1565
1598
|
#### DotEnvSchemaPartial
|
|
1566
1599
|
|
|
1567
|
-
> `const` **DotEnvSchemaPartial**: `ZodObject`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_APPLICATION`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKCHAIN_NODE`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKSCOUT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HASURA`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HASURA_ADMIN_SECRET`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HASURA_DATABASE_URL`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HASURA_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HD_PRIVATE_KEY`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_INSTANCE`: `ZodOptional`\<`ZodDefault`\<`ZodString`\>\>; `SETTLEMINT_IPFS`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_IPFS_API_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_LOAD_BALANCER`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_MINIO`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_MINIO_ACCESS_KEY`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_MINIO_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_MINIO_SECRET_KEY`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_NEW_PROJECT_NAME`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_PORTAL`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_THEGRAPH`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `ZodOptional`\<`ZodEffects`\<`ZodOptional`\<`ZodArray`\<`ZodString`, `"many"`\>\>, `undefined` \| `string`[], `unknown`\>\>; `SETTLEMINT_WORKSPACE`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; \}, `"strip"`, `ZodTypeAny`, \{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}, \{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `unknown`; `SETTLEMINT_WORKSPACE`: `string`; \}\>
|
|
1600
|
+
> `const` **DotEnvSchemaPartial**: `ZodObject`\<\{ `SETTLEMINT_ACCESS_TOKEN`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_APPLICATION`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKCHAIN_NODE`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKSCOUT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HASURA`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HASURA_ADMIN_SECRET`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HASURA_DATABASE_URL`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HASURA_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_HD_PRIVATE_KEY`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_INSTANCE`: `ZodOptional`\<`ZodDefault`\<`ZodString`\>\>; `SETTLEMINT_IPFS`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_IPFS_API_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_LOAD_BALANCER`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_LOG_LEVEL`: `ZodOptional`\<`ZodDefault`\<`ZodEnum`\<\[`"debug"`, `"info"`, `"warn"`, `"error"`, `"none"`\]\>\>\>; `SETTLEMINT_MINIO`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_MINIO_ACCESS_KEY`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_MINIO_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_MINIO_SECRET_KEY`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_NEW_PROJECT_NAME`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_PORTAL`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_THEGRAPH`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `ZodOptional`\<`ZodEffects`\<`ZodOptional`\<`ZodArray`\<`ZodString`, `"many"`\>\>, `undefined` \| `string`[], `unknown`\>\>; `SETTLEMINT_WORKSPACE`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; \}, `"strip"`, `ZodTypeAny`, \{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `string`[]; `SETTLEMINT_WORKSPACE`: `string`; \}, \{ `SETTLEMINT_ACCESS_TOKEN`: `string`; `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY`: `string`; `SETTLEMINT_APPLICATION`: `string`; `SETTLEMINT_BLOCKCHAIN_NETWORK`: `string`; `SETTLEMINT_BLOCKCHAIN_NODE`: `string`; `SETTLEMINT_BLOCKSCOUT`: `string`; `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT`: `string`; `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT`: `string`; `SETTLEMINT_HASURA`: `string`; `SETTLEMINT_HASURA_ADMIN_SECRET`: `string`; `SETTLEMINT_HASURA_DATABASE_URL`: `string`; `SETTLEMINT_HASURA_ENDPOINT`: `string`; `SETTLEMINT_HD_PRIVATE_KEY`: `string`; `SETTLEMINT_INSTANCE`: `string`; `SETTLEMINT_IPFS`: `string`; `SETTLEMINT_IPFS_API_ENDPOINT`: `string`; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `string`; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `string`; `SETTLEMINT_LOAD_BALANCER`: `string`; `SETTLEMINT_LOG_LEVEL`: `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"`; `SETTLEMINT_MINIO`: `string`; `SETTLEMINT_MINIO_ACCESS_KEY`: `string`; `SETTLEMINT_MINIO_ENDPOINT`: `string`; `SETTLEMINT_MINIO_SECRET_KEY`: `string`; `SETTLEMINT_NEW_PROJECT_NAME`: `string`; `SETTLEMINT_PORTAL`: `string`; `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT`: `string`; `SETTLEMINT_PORTAL_REST_ENDPOINT`: `string`; `SETTLEMINT_THEGRAPH`: `string`; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `string`; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `unknown`; `SETTLEMINT_WORKSPACE`: `string`; \}\>
|
|
1568
1601
|
|
|
1569
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1602
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:97](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/dot-env.schema.ts#L97)
|
|
1570
1603
|
|
|
1571
1604
|
Partial version of the environment variables schema where all fields are optional.
|
|
1572
1605
|
Useful for validating incomplete configurations during development or build time.
|
|
@@ -1577,7 +1610,7 @@ Useful for validating incomplete configurations during development or build time
|
|
|
1577
1610
|
|
|
1578
1611
|
> `const` **IdSchema**: `ZodUnion`\<\[`ZodString`, `ZodString`\]\>
|
|
1579
1612
|
|
|
1580
|
-
Defined in: [sdk/utils/src/validation/id.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1613
|
+
Defined in: [sdk/utils/src/validation/id.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/id.schema.ts#L17)
|
|
1581
1614
|
|
|
1582
1615
|
Schema for validating database IDs. Accepts both PostgreSQL UUIDs and MongoDB ObjectIDs.
|
|
1583
1616
|
PostgreSQL UUIDs are 32 hexadecimal characters with hyphens (e.g. 123e4567-e89b-12d3-a456-426614174000).
|
|
@@ -1601,7 +1634,7 @@ const isValidObjectId = IdSchema.safeParse("507f1f77bcf86cd799439011").success;
|
|
|
1601
1634
|
|
|
1602
1635
|
> `const` **PersonalAccessTokenSchema**: `ZodString`
|
|
1603
1636
|
|
|
1604
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1637
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/access-token.schema.ts#L14)
|
|
1605
1638
|
|
|
1606
1639
|
Schema for validating personal access tokens.
|
|
1607
1640
|
Personal access tokens start with 'sm_pat_' prefix.
|
|
@@ -1612,7 +1645,7 @@ Personal access tokens start with 'sm_pat_' prefix.
|
|
|
1612
1645
|
|
|
1613
1646
|
> `const` **runsInBrowser**: `boolean` = `isBrowser`
|
|
1614
1647
|
|
|
1615
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:40](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1648
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:40](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/runtime/ensure-server.ts#L40)
|
|
1616
1649
|
|
|
1617
1650
|
Boolean indicating if code is currently running in a browser environment
|
|
1618
1651
|
|
|
@@ -1622,7 +1655,7 @@ Boolean indicating if code is currently running in a browser environment
|
|
|
1622
1655
|
|
|
1623
1656
|
> `const` **runsOnServer**: `boolean` = `!isBrowser`
|
|
1624
1657
|
|
|
1625
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:45](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1658
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:45](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/runtime/ensure-server.ts#L45)
|
|
1626
1659
|
|
|
1627
1660
|
Boolean indicating if code is currently running in a server environment
|
|
1628
1661
|
|
|
@@ -1632,7 +1665,7 @@ Boolean indicating if code is currently running in a server environment
|
|
|
1632
1665
|
|
|
1633
1666
|
> `const` **UniqueNameSchema**: `ZodString`
|
|
1634
1667
|
|
|
1635
|
-
Defined in: [sdk/utils/src/validation/unique-name.schema.ts:19](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1668
|
+
Defined in: [sdk/utils/src/validation/unique-name.schema.ts:19](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/unique-name.schema.ts#L19)
|
|
1636
1669
|
|
|
1637
1670
|
Schema for validating unique names used across the SettleMint platform.
|
|
1638
1671
|
Only accepts lowercase alphanumeric characters and hyphens.
|
|
@@ -1658,7 +1691,7 @@ const isInvalidName = UniqueNameSchema.safeParse("My Workspace!").success;
|
|
|
1658
1691
|
|
|
1659
1692
|
> `const` **UrlOrPathSchema**: `ZodUnion`\<\[`ZodString`, `ZodString`\]\>
|
|
1660
1693
|
|
|
1661
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:54](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1694
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:54](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/url.schema.ts#L54)
|
|
1662
1695
|
|
|
1663
1696
|
Schema that accepts either a full URL or a URL path.
|
|
1664
1697
|
|
|
@@ -1682,7 +1715,7 @@ const isValidPath = UrlOrPathSchema.safeParse("/api/v1/users").success;
|
|
|
1682
1715
|
|
|
1683
1716
|
> `const` **UrlPathSchema**: `ZodString`
|
|
1684
1717
|
|
|
1685
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1718
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/url.schema.ts#L34)
|
|
1686
1719
|
|
|
1687
1720
|
Schema for validating URL paths.
|
|
1688
1721
|
|
|
@@ -1706,7 +1739,7 @@ const isInvalidPath = UrlPathSchema.safeParse("not-a-path").success;
|
|
|
1706
1739
|
|
|
1707
1740
|
> `const` **UrlSchema**: `ZodString`
|
|
1708
1741
|
|
|
1709
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.1.
|
|
1742
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.1.1/sdk/utils/src/validation/url.schema.ts#L17)
|
|
1710
1743
|
|
|
1711
1744
|
Schema for validating URLs.
|
|
1712
1745
|
|