@settlemint/sdk-utils 2.3.1 → 2.3.2-main3c010da3
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 +132 -287
- package/dist/environment.cjs +17708 -383
- package/dist/environment.cjs.map +1 -1
- package/dist/environment.d.cts +265 -292
- package/dist/environment.d.ts +265 -292
- package/dist/environment.js +17746 -0
- package/dist/environment.js.map +1 -0
- package/dist/filesystem.cjs +6746 -113
- package/dist/filesystem.cjs.map +1 -1
- package/dist/filesystem.d.cts +22 -1
- package/dist/filesystem.d.ts +22 -1
- package/dist/filesystem.js +6766 -0
- package/dist/filesystem.js.map +1 -0
- package/dist/http.cjs +217 -79
- package/dist/http.cjs.map +1 -1
- package/dist/http.d.cts +14 -1
- package/dist/http.d.ts +14 -1
- package/dist/http.js +226 -0
- package/dist/http.js.map +1 -0
- package/dist/index.cjs +295 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +306 -0
- package/dist/index.js.map +1 -0
- package/dist/json.cjs +83 -0
- package/dist/json.cjs.map +1 -0
- package/dist/json.d.cts +56 -0
- package/dist/json.d.ts +56 -0
- package/dist/json.js +80 -0
- package/dist/json.js.map +1 -0
- package/dist/logging.cjs +209 -137
- package/dist/logging.cjs.map +1 -1
- package/dist/logging.d.cts +23 -14
- package/dist/logging.d.ts +23 -14
- package/dist/logging.js +221 -0
- package/dist/logging.js.map +1 -0
- package/dist/package-manager.cjs +7353 -173
- package/dist/package-manager.cjs.map +1 -1
- package/dist/package-manager.d.cts +26 -3
- package/dist/package-manager.d.ts +26 -3
- package/dist/package-manager.js +7385 -0
- package/dist/package-manager.js.map +1 -0
- package/dist/retry.cjs +137 -0
- package/dist/retry.cjs.map +1 -0
- package/dist/retry.d.cts +19 -0
- package/dist/retry.d.ts +19 -0
- package/dist/retry.js +136 -0
- package/dist/retry.js.map +1 -0
- package/dist/runtime.cjs +58 -40
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +3 -0
- package/dist/runtime.d.ts +3 -0
- package/dist/runtime.js +45 -0
- package/dist/runtime.js.map +1 -0
- package/dist/string.cjs +76 -0
- package/dist/string.cjs.map +1 -0
- package/dist/string.d.cts +58 -0
- package/dist/string.d.ts +58 -0
- package/dist/string.js +72 -0
- package/dist/string.js.map +1 -0
- package/dist/terminal.cjs +426 -229
- package/dist/terminal.cjs.map +1 -1
- package/dist/terminal.d.cts +54 -24
- package/dist/terminal.d.ts +54 -24
- package/dist/terminal.js +441 -0
- package/dist/terminal.js.map +1 -0
- package/dist/url.cjs +25 -0
- package/dist/url.cjs.map +1 -0
- package/dist/url.d.cts +20 -0
- package/dist/url.d.ts +20 -0
- package/dist/url.js +24 -0
- package/dist/url.js.map +1 -0
- package/dist/validation.cjs +10486 -190
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.cts +133 -291
- package/dist/validation.d.ts +133 -291
- package/dist/validation.js +10482 -0
- package/dist/validation.js.map +1 -0
- package/package.json +6 -6
- package/dist/environment.mjs +0 -383
- package/dist/environment.mjs.map +0 -1
- package/dist/filesystem.mjs +0 -105
- package/dist/filesystem.mjs.map +0 -1
- package/dist/http.mjs +0 -63
- package/dist/http.mjs.map +0 -1
- package/dist/index.mjs +0 -90
- package/dist/index.mjs.map +0 -1
- package/dist/logging.mjs +0 -123
- package/dist/logging.mjs.map +0 -1
- package/dist/package-manager.mjs +0 -167
- package/dist/package-manager.mjs.map +0 -1
- package/dist/runtime.mjs +0 -23
- package/dist/runtime.mjs.map +0 -1
- package/dist/terminal.mjs +0 -230
- package/dist/terminal.mjs.map +0 -1
- package/dist/validation.mjs +0 -159
- package/dist/validation.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
- [ensureServer()](#ensureserver)
|
|
40
40
|
- [executeCommand()](#executecommand)
|
|
41
41
|
- [exists()](#exists)
|
|
42
|
+
- [extractBaseUrlBeforeSegment()](#extractbaseurlbeforesegment)
|
|
42
43
|
- [extractJsonObject()](#extractjsonobject)
|
|
43
44
|
- [fetchWithRetry()](#fetchwithretry)
|
|
44
45
|
- [findMonoRepoPackages()](#findmonorepopackages)
|
|
@@ -78,16 +79,10 @@
|
|
|
78
79
|
- [LoggerOptions](#loggeroptions)
|
|
79
80
|
- [SpinnerOptions\<R\>](#spinneroptionsr)
|
|
80
81
|
- [Type Aliases](#type-aliases)
|
|
81
|
-
- [AccessToken](#accesstoken)
|
|
82
|
-
- [ApplicationAccessToken](#applicationaccesstoken)
|
|
83
82
|
- [DotEnv](#dotenv)
|
|
84
83
|
- [DotEnvPartial](#dotenvpartial)
|
|
85
84
|
- [Id](#id)
|
|
86
85
|
- [LogLevel](#loglevel)
|
|
87
|
-
- [PersonalAccessToken](#personalaccesstoken)
|
|
88
|
-
- [Url](#url)
|
|
89
|
-
- [UrlOrPath](#urlorpath)
|
|
90
|
-
- [UrlPath](#urlpath)
|
|
91
86
|
- [Variables](#variables)
|
|
92
87
|
- [AccessTokenSchema](#accesstokenschema)
|
|
93
88
|
- [ApplicationAccessTokenSchema](#applicationaccesstokenschema)
|
|
@@ -97,6 +92,7 @@
|
|
|
97
92
|
- [PersonalAccessTokenSchema](#personalaccesstokenschema)
|
|
98
93
|
- [runsInBrowser](#runsinbrowser)
|
|
99
94
|
- [runsOnServer](#runsonserver)
|
|
95
|
+
- [STANDALONE\_INSTANCE](#standalone_instance)
|
|
100
96
|
- [UniqueNameSchema](#uniquenameschema)
|
|
101
97
|
- [UrlOrPathSchema](#urlorpathschema)
|
|
102
98
|
- [UrlPathSchema](#urlpathschema)
|
|
@@ -116,7 +112,7 @@ The SettleMint Utils SDK provides a collection of shared utilities and helper fu
|
|
|
116
112
|
|
|
117
113
|
> **ascii**(): `void`
|
|
118
114
|
|
|
119
|
-
Defined in: [sdk/utils/src/terminal/ascii.ts:14](https://github.com/settlemint/sdk/blob/v2.3.
|
|
115
|
+
Defined in: [sdk/utils/src/terminal/ascii.ts:14](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/ascii.ts#L14)
|
|
120
116
|
|
|
121
117
|
Prints the SettleMint ASCII art logo to the console in magenta color.
|
|
122
118
|
Used for CLI branding and visual identification.
|
|
@@ -140,7 +136,7 @@ ascii();
|
|
|
140
136
|
|
|
141
137
|
> **camelCaseToWords**(`s`): `string`
|
|
142
138
|
|
|
143
|
-
Defined in: [sdk/utils/src/string.ts:29](https://github.com/settlemint/sdk/blob/v2.3.
|
|
139
|
+
Defined in: [sdk/utils/src/string.ts:29](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/string.ts#L29)
|
|
144
140
|
|
|
145
141
|
Converts a camelCase string to a human-readable string.
|
|
146
142
|
|
|
@@ -171,7 +167,7 @@ const words = camelCaseToWords("camelCaseString");
|
|
|
171
167
|
|
|
172
168
|
> **cancel**(`msg`): `never`
|
|
173
169
|
|
|
174
|
-
Defined in: [sdk/utils/src/terminal/cancel.ts:23](https://github.com/settlemint/sdk/blob/v2.3.
|
|
170
|
+
Defined in: [sdk/utils/src/terminal/cancel.ts:23](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/cancel.ts#L23)
|
|
175
171
|
|
|
176
172
|
Displays an error message in red inverse text and throws a CancelError.
|
|
177
173
|
Used to terminate execution with a visible error message.
|
|
@@ -204,7 +200,7 @@ cancel("An error occurred");
|
|
|
204
200
|
|
|
205
201
|
> **capitalizeFirstLetter**(`val`): `string`
|
|
206
202
|
|
|
207
|
-
Defined in: [sdk/utils/src/string.ts:13](https://github.com/settlemint/sdk/blob/v2.3.
|
|
203
|
+
Defined in: [sdk/utils/src/string.ts:13](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/string.ts#L13)
|
|
208
204
|
|
|
209
205
|
Capitalizes the first letter of a string.
|
|
210
206
|
|
|
@@ -235,7 +231,7 @@ const capitalized = capitalizeFirstLetter("hello");
|
|
|
235
231
|
|
|
236
232
|
> **createLogger**(`options`): [`Logger`](#logger)
|
|
237
233
|
|
|
238
|
-
Defined in: [sdk/utils/src/logging/logger.ts:50](https://github.com/settlemint/sdk/blob/v2.3.
|
|
234
|
+
Defined in: [sdk/utils/src/logging/logger.ts:50](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/logging/logger.ts#L50)
|
|
239
235
|
|
|
240
236
|
Creates a simple logger with configurable log level
|
|
241
237
|
|
|
@@ -268,7 +264,7 @@ logger.error('Operation failed', new Error('Connection timeout'));
|
|
|
268
264
|
|
|
269
265
|
> **emptyDir**(`dir`): `Promise`\<`void`\>
|
|
270
266
|
|
|
271
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:45](https://github.com/settlemint/sdk/blob/v2.3.
|
|
267
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:45](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/package-manager/download-and-extract.ts#L45)
|
|
272
268
|
|
|
273
269
|
Removes all contents of a directory except the .git folder
|
|
274
270
|
|
|
@@ -296,7 +292,7 @@ await emptyDir("/path/to/dir"); // Removes all contents except .git
|
|
|
296
292
|
|
|
297
293
|
> **ensureBrowser**(): `void`
|
|
298
294
|
|
|
299
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:31](https://github.com/settlemint/sdk/blob/v2.3.
|
|
295
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:31](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/runtime/ensure-server.ts#L31)
|
|
300
296
|
|
|
301
297
|
Ensures that code is running in a browser environment and not on the server.
|
|
302
298
|
|
|
@@ -323,7 +319,7 @@ ensureBrowser();
|
|
|
323
319
|
|
|
324
320
|
> **ensureServer**(): `void`
|
|
325
321
|
|
|
326
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:13](https://github.com/settlemint/sdk/blob/v2.3.
|
|
322
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:13](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/runtime/ensure-server.ts#L13)
|
|
327
323
|
|
|
328
324
|
Ensures that code is running on the server and not in a browser environment.
|
|
329
325
|
|
|
@@ -350,7 +346,7 @@ ensureServer();
|
|
|
350
346
|
|
|
351
347
|
> **executeCommand**(`command`, `args`, `options?`): `Promise`\<`string`[]\>
|
|
352
348
|
|
|
353
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:51](https://github.com/settlemint/sdk/blob/v2.3.
|
|
349
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:51](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/execute-command.ts#L51)
|
|
354
350
|
|
|
355
351
|
Executes a command with the given arguments in a child process.
|
|
356
352
|
Pipes stdin to the child process and captures stdout/stderr output.
|
|
@@ -392,7 +388,7 @@ await executeCommand("npm", ["install"], { silent: true });
|
|
|
392
388
|
|
|
393
389
|
> **exists**(`path`): `Promise`\<`boolean`\>
|
|
394
390
|
|
|
395
|
-
Defined in: [sdk/utils/src/filesystem/exists.ts:17](https://github.com/settlemint/sdk/blob/v2.3.
|
|
391
|
+
Defined in: [sdk/utils/src/filesystem/exists.ts:17](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/filesystem/exists.ts#L17)
|
|
396
392
|
|
|
397
393
|
Checks if a file or directory exists at the given path
|
|
398
394
|
|
|
@@ -421,11 +417,43 @@ if (await exists('/path/to/file.txt')) {
|
|
|
421
417
|
|
|
422
418
|
***
|
|
423
419
|
|
|
420
|
+
#### extractBaseUrlBeforeSegment()
|
|
421
|
+
|
|
422
|
+
> **extractBaseUrlBeforeSegment**(`baseUrl`, `pathSegment`): `string`
|
|
423
|
+
|
|
424
|
+
Defined in: [sdk/utils/src/url.ts:15](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/url.ts#L15)
|
|
425
|
+
|
|
426
|
+
Extracts the base URL before a specific segment in a URL.
|
|
427
|
+
|
|
428
|
+
##### Parameters
|
|
429
|
+
|
|
430
|
+
| Parameter | Type | Description |
|
|
431
|
+
| ------ | ------ | ------ |
|
|
432
|
+
| `baseUrl` | `string` | The base URL to extract the path from |
|
|
433
|
+
| `pathSegment` | `string` | The path segment to start from |
|
|
434
|
+
|
|
435
|
+
##### Returns
|
|
436
|
+
|
|
437
|
+
`string`
|
|
438
|
+
|
|
439
|
+
The base URL before the specified segment
|
|
440
|
+
|
|
441
|
+
##### Example
|
|
442
|
+
|
|
443
|
+
```typescript
|
|
444
|
+
import { extractBaseUrlBeforeSegment } from "@settlemint/sdk-utils/url";
|
|
445
|
+
|
|
446
|
+
const baseUrl = extractBaseUrlBeforeSegment("https://example.com/api/v1/subgraphs/name/my-subgraph", "/subgraphs");
|
|
447
|
+
// Returns: "https://example.com/api/v1"
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
***
|
|
451
|
+
|
|
424
452
|
#### extractJsonObject()
|
|
425
453
|
|
|
426
454
|
> **extractJsonObject**\<`T`\>(`value`): `null` \| `T`
|
|
427
455
|
|
|
428
|
-
Defined in: [sdk/utils/src/json.ts:50](https://github.com/settlemint/sdk/blob/v2.3.
|
|
456
|
+
Defined in: [sdk/utils/src/json.ts:50](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/json.ts#L50)
|
|
429
457
|
|
|
430
458
|
Extracts a JSON object from a string.
|
|
431
459
|
|
|
@@ -468,7 +496,7 @@ const json = extractJsonObject<{ port: number }>(
|
|
|
468
496
|
|
|
469
497
|
> **fetchWithRetry**(`input`, `init?`, `maxRetries?`, `initialSleepTime?`): `Promise`\<`Response`\>
|
|
470
498
|
|
|
471
|
-
Defined in: [sdk/utils/src/http/fetch-with-retry.ts:18](https://github.com/settlemint/sdk/blob/v2.3.
|
|
499
|
+
Defined in: [sdk/utils/src/http/fetch-with-retry.ts:18](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/http/fetch-with-retry.ts#L18)
|
|
472
500
|
|
|
473
501
|
Retry an HTTP request with exponential backoff and jitter.
|
|
474
502
|
Only retries on server errors (5xx), rate limits (429), timeouts (408), and network errors.
|
|
@@ -506,7 +534,7 @@ const response = await fetchWithRetry("https://api.example.com/data");
|
|
|
506
534
|
|
|
507
535
|
> **findMonoRepoPackages**(`projectDir`): `Promise`\<`string`[]\>
|
|
508
536
|
|
|
509
|
-
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:59](https://github.com/settlemint/sdk/blob/v2.3.
|
|
537
|
+
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:59](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/filesystem/mono-repo.ts#L59)
|
|
510
538
|
|
|
511
539
|
Finds all packages in a monorepo
|
|
512
540
|
|
|
@@ -537,7 +565,7 @@ console.log(packages); // Output: ["/path/to/your/project/packages/core", "/path
|
|
|
537
565
|
|
|
538
566
|
> **findMonoRepoRoot**(`startDir`): `Promise`\<`null` \| `string`\>
|
|
539
567
|
|
|
540
|
-
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:19](https://github.com/settlemint/sdk/blob/v2.3.
|
|
568
|
+
Defined in: [sdk/utils/src/filesystem/mono-repo.ts:19](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/filesystem/mono-repo.ts#L19)
|
|
541
569
|
|
|
542
570
|
Finds the root directory of a monorepo
|
|
543
571
|
|
|
@@ -568,7 +596,7 @@ console.log(root); // Output: /path/to/your/project/packages/core
|
|
|
568
596
|
|
|
569
597
|
> **formatTargetDir**(`targetDir`): `string`
|
|
570
598
|
|
|
571
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:15](https://github.com/settlemint/sdk/blob/v2.3.
|
|
599
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:15](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/package-manager/download-and-extract.ts#L15)
|
|
572
600
|
|
|
573
601
|
Formats a directory path by removing trailing slashes and whitespace
|
|
574
602
|
|
|
@@ -598,7 +626,7 @@ const formatted = formatTargetDir("/path/to/dir/ "); // "/path/to/dir"
|
|
|
598
626
|
|
|
599
627
|
> **getPackageManager**(`targetDir?`): `Promise`\<`AgentName`\>
|
|
600
628
|
|
|
601
|
-
Defined in: [sdk/utils/src/package-manager/get-package-manager.ts:15](https://github.com/settlemint/sdk/blob/v2.3.
|
|
629
|
+
Defined in: [sdk/utils/src/package-manager/get-package-manager.ts:15](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/package-manager/get-package-manager.ts#L15)
|
|
602
630
|
|
|
603
631
|
Detects the package manager used in the current project
|
|
604
632
|
|
|
@@ -629,7 +657,7 @@ console.log(`Using ${packageManager}`);
|
|
|
629
657
|
|
|
630
658
|
> **getPackageManagerExecutable**(`targetDir?`): `Promise`\<\{ `args`: `string`[]; `command`: `string`; \}\>
|
|
631
659
|
|
|
632
|
-
Defined in: [sdk/utils/src/package-manager/get-package-manager-executable.ts:14](https://github.com/settlemint/sdk/blob/v2.3.
|
|
660
|
+
Defined in: [sdk/utils/src/package-manager/get-package-manager-executable.ts:14](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/package-manager/get-package-manager-executable.ts#L14)
|
|
633
661
|
|
|
634
662
|
Retrieves the executable command and arguments for the package manager
|
|
635
663
|
|
|
@@ -660,7 +688,7 @@ console.log(`Using ${command} with args: ${args.join(" ")}`);
|
|
|
660
688
|
|
|
661
689
|
> **graphqlFetchWithRetry**\<`Data`\>(`input`, `init?`, `maxRetries?`, `initialSleepTime?`): `Promise`\<`Data`\>
|
|
662
690
|
|
|
663
|
-
Defined in: [sdk/utils/src/http/graphql-fetch-with-retry.ts:34](https://github.com/settlemint/sdk/blob/v2.3.
|
|
691
|
+
Defined in: [sdk/utils/src/http/graphql-fetch-with-retry.ts:34](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/http/graphql-fetch-with-retry.ts#L34)
|
|
664
692
|
|
|
665
693
|
Executes a GraphQL request with automatic retries using exponential backoff and jitter.
|
|
666
694
|
Only retries on server errors (5xx), rate limits (429), timeouts (408), and network errors.
|
|
@@ -719,7 +747,7 @@ const data = await graphqlFetchWithRetry<{ user: { id: string } }>(
|
|
|
719
747
|
|
|
720
748
|
> **installDependencies**(`pkgs`, `cwd?`): `Promise`\<`void`\>
|
|
721
749
|
|
|
722
|
-
Defined in: [sdk/utils/src/package-manager/install-dependencies.ts:20](https://github.com/settlemint/sdk/blob/v2.3.
|
|
750
|
+
Defined in: [sdk/utils/src/package-manager/install-dependencies.ts:20](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/package-manager/install-dependencies.ts#L20)
|
|
723
751
|
|
|
724
752
|
Installs one or more packages as dependencies using the detected package manager
|
|
725
753
|
|
|
@@ -758,7 +786,7 @@ await installDependencies(["express", "cors"]);
|
|
|
758
786
|
|
|
759
787
|
> **intro**(`msg`): `void`
|
|
760
788
|
|
|
761
|
-
Defined in: [sdk/utils/src/terminal/intro.ts:16](https://github.com/settlemint/sdk/blob/v2.3.
|
|
789
|
+
Defined in: [sdk/utils/src/terminal/intro.ts:16](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/intro.ts#L16)
|
|
762
790
|
|
|
763
791
|
Displays an introductory message in magenta text with padding.
|
|
764
792
|
Any sensitive tokens in the message are masked before display.
|
|
@@ -788,7 +816,7 @@ intro("Starting deployment...");
|
|
|
788
816
|
|
|
789
817
|
> **isEmpty**(`path`): `Promise`\<`boolean`\>
|
|
790
818
|
|
|
791
|
-
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:31](https://github.com/settlemint/sdk/blob/v2.3.
|
|
819
|
+
Defined in: [sdk/utils/src/package-manager/download-and-extract.ts:31](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/package-manager/download-and-extract.ts#L31)
|
|
792
820
|
|
|
793
821
|
Checks if a directory is empty or contains only a .git folder
|
|
794
822
|
|
|
@@ -820,7 +848,7 @@ if (await isEmpty("/path/to/dir")) {
|
|
|
820
848
|
|
|
821
849
|
> **isPackageInstalled**(`name`, `path?`): `Promise`\<`boolean`\>
|
|
822
850
|
|
|
823
|
-
Defined in: [sdk/utils/src/package-manager/is-package-installed.ts:17](https://github.com/settlemint/sdk/blob/v2.3.
|
|
851
|
+
Defined in: [sdk/utils/src/package-manager/is-package-installed.ts:17](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/package-manager/is-package-installed.ts#L17)
|
|
824
852
|
|
|
825
853
|
Checks if a package is installed in the project's dependencies, devDependencies, or peerDependencies.
|
|
826
854
|
|
|
@@ -856,7 +884,7 @@ console.log(`@settlemint/sdk-utils is installed: ${isInstalled}`);
|
|
|
856
884
|
|
|
857
885
|
> **list**(`title`, `items`): `void`
|
|
858
886
|
|
|
859
|
-
Defined in: [sdk/utils/src/terminal/list.ts:23](https://github.com/settlemint/sdk/blob/v2.3.
|
|
887
|
+
Defined in: [sdk/utils/src/terminal/list.ts:23](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/list.ts#L23)
|
|
860
888
|
|
|
861
889
|
Displays a list of items in a formatted manner, supporting nested items.
|
|
862
890
|
|
|
@@ -896,7 +924,7 @@ list("Providers", [
|
|
|
896
924
|
|
|
897
925
|
> **loadEnv**\<`T`\>(`validateEnv`, `prod`, `path`): `Promise`\<`T` *extends* `true` ? `object` : `object`\>
|
|
898
926
|
|
|
899
|
-
Defined in: [sdk/utils/src/environment/load-env.ts:25](https://github.com/settlemint/sdk/blob/v2.3.
|
|
927
|
+
Defined in: [sdk/utils/src/environment/load-env.ts:25](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/environment/load-env.ts#L25)
|
|
900
928
|
|
|
901
929
|
Loads environment variables from .env files.
|
|
902
930
|
To enable encryption with dotenvx (https://www.dotenvx.com/docs) run `bunx dotenvx encrypt`
|
|
@@ -944,7 +972,7 @@ const rawEnv = await loadEnv(false, false);
|
|
|
944
972
|
|
|
945
973
|
> **makeJsonStringifiable**\<`T`\>(`value`): `T`
|
|
946
974
|
|
|
947
|
-
Defined in: [sdk/utils/src/json.ts:73](https://github.com/settlemint/sdk/blob/v2.3.
|
|
975
|
+
Defined in: [sdk/utils/src/json.ts:73](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/json.ts#L73)
|
|
948
976
|
|
|
949
977
|
Converts a value to a JSON stringifiable format.
|
|
950
978
|
|
|
@@ -981,7 +1009,7 @@ const json = makeJsonStringifiable<{ amount: bigint }>({ amount: BigInt(1000) })
|
|
|
981
1009
|
|
|
982
1010
|
> **maskTokens**(`output`): `string`
|
|
983
1011
|
|
|
984
|
-
Defined in: [sdk/utils/src/logging/mask-tokens.ts:13](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1012
|
+
Defined in: [sdk/utils/src/logging/mask-tokens.ts:13](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/logging/mask-tokens.ts#L13)
|
|
985
1013
|
|
|
986
1014
|
Masks sensitive SettleMint tokens in output text by replacing them with asterisks.
|
|
987
1015
|
Handles personal access tokens (PAT), application access tokens (AAT), and service account tokens (SAT).
|
|
@@ -1013,7 +1041,7 @@ const masked = maskTokens("Token: sm_pat_****"); // "Token: ***"
|
|
|
1013
1041
|
|
|
1014
1042
|
> **note**(`message`, `level`): `void`
|
|
1015
1043
|
|
|
1016
|
-
Defined in: [sdk/utils/src/terminal/note.ts:21](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1044
|
+
Defined in: [sdk/utils/src/terminal/note.ts:21](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/note.ts#L21)
|
|
1017
1045
|
|
|
1018
1046
|
Displays a note message with optional warning level formatting.
|
|
1019
1047
|
Regular notes are displayed in normal text, while warnings are shown in yellow.
|
|
@@ -1048,7 +1076,7 @@ note("Low disk space remaining", "warn");
|
|
|
1048
1076
|
|
|
1049
1077
|
> **outro**(`msg`): `void`
|
|
1050
1078
|
|
|
1051
|
-
Defined in: [sdk/utils/src/terminal/outro.ts:16](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1079
|
+
Defined in: [sdk/utils/src/terminal/outro.ts:16](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/outro.ts#L16)
|
|
1052
1080
|
|
|
1053
1081
|
Displays a closing message in green inverted text with padding.
|
|
1054
1082
|
Any sensitive tokens in the message are masked before display.
|
|
@@ -1078,7 +1106,7 @@ outro("Deployment completed successfully!");
|
|
|
1078
1106
|
|
|
1079
1107
|
> **projectRoot**(`fallbackToCwd`, `cwd?`): `Promise`\<`string`\>
|
|
1080
1108
|
|
|
1081
|
-
Defined in: [sdk/utils/src/filesystem/project-root.ts:18](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1109
|
+
Defined in: [sdk/utils/src/filesystem/project-root.ts:18](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/filesystem/project-root.ts#L18)
|
|
1082
1110
|
|
|
1083
1111
|
Finds the root directory of the current project by locating the nearest package.json file
|
|
1084
1112
|
|
|
@@ -1115,7 +1143,7 @@ console.log(`Project root is at: ${rootDir}`);
|
|
|
1115
1143
|
|
|
1116
1144
|
> **replaceUnderscoresAndHyphensWithSpaces**(`s`): `string`
|
|
1117
1145
|
|
|
1118
|
-
Defined in: [sdk/utils/src/string.ts:48](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1146
|
+
Defined in: [sdk/utils/src/string.ts:48](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/string.ts#L48)
|
|
1119
1147
|
|
|
1120
1148
|
Replaces underscores and hyphens with spaces.
|
|
1121
1149
|
|
|
@@ -1146,7 +1174,7 @@ const result = replaceUnderscoresAndHyphensWithSpaces("Already_Spaced-Second");
|
|
|
1146
1174
|
|
|
1147
1175
|
> **requestLogger**(`logger`, `name`, `fn`): (...`args`) => `Promise`\<`Response`\>
|
|
1148
1176
|
|
|
1149
|
-
Defined in: [sdk/utils/src/logging/request-logger.ts:14](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1177
|
+
Defined in: [sdk/utils/src/logging/request-logger.ts:14](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/logging/request-logger.ts#L14)
|
|
1150
1178
|
|
|
1151
1179
|
Logs the request and duration of a fetch call (> 500ms is logged as warn, otherwise info)
|
|
1152
1180
|
|
|
@@ -1180,7 +1208,7 @@ The fetch function
|
|
|
1180
1208
|
|
|
1181
1209
|
> **retryWhenFailed**\<`T`\>(`fn`, `maxRetries`, `initialSleepTime`, `stopOnError?`): `Promise`\<`T`\>
|
|
1182
1210
|
|
|
1183
|
-
Defined in: [sdk/utils/src/retry.ts:
|
|
1211
|
+
Defined in: [sdk/utils/src/retry.ts:16](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/retry.ts#L16)
|
|
1184
1212
|
|
|
1185
1213
|
Retry a function when it fails.
|
|
1186
1214
|
|
|
@@ -1220,7 +1248,7 @@ const result = await retryWhenFailed(() => readFile("/path/to/file.txt"), 3, 1_0
|
|
|
1220
1248
|
|
|
1221
1249
|
> **setName**(`name`, `path?`): `Promise`\<`void`\>
|
|
1222
1250
|
|
|
1223
|
-
Defined in: [sdk/utils/src/package-manager/set-name.ts:16](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1251
|
+
Defined in: [sdk/utils/src/package-manager/set-name.ts:16](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/package-manager/set-name.ts#L16)
|
|
1224
1252
|
|
|
1225
1253
|
Sets the name field in the package.json file
|
|
1226
1254
|
|
|
@@ -1255,7 +1283,7 @@ await setName("my-new-project-name");
|
|
|
1255
1283
|
|
|
1256
1284
|
> **spinner**\<`R`\>(`options`): `Promise`\<`R`\>
|
|
1257
1285
|
|
|
1258
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:55](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1286
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:55](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/spinner.ts#L55)
|
|
1259
1287
|
|
|
1260
1288
|
Displays a loading spinner while executing an async task.
|
|
1261
1289
|
Shows progress with start/stop messages and handles errors.
|
|
@@ -1305,7 +1333,7 @@ const result = await spinner({
|
|
|
1305
1333
|
|
|
1306
1334
|
> **table**(`title`, `data`): `void`
|
|
1307
1335
|
|
|
1308
|
-
Defined in: [sdk/utils/src/terminal/table.ts:21](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1336
|
+
Defined in: [sdk/utils/src/terminal/table.ts:21](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/table.ts#L21)
|
|
1309
1337
|
|
|
1310
1338
|
Displays data in a formatted table in the terminal.
|
|
1311
1339
|
|
|
@@ -1339,7 +1367,7 @@ table("My Table", data);
|
|
|
1339
1367
|
|
|
1340
1368
|
> **truncate**(`value`, `maxLength`): `string`
|
|
1341
1369
|
|
|
1342
|
-
Defined in: [sdk/utils/src/string.ts:65](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1370
|
+
Defined in: [sdk/utils/src/string.ts:65](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/string.ts#L65)
|
|
1343
1371
|
|
|
1344
1372
|
Truncates a string to a maximum length and appends "..." if it is longer.
|
|
1345
1373
|
|
|
@@ -1371,7 +1399,7 @@ const truncated = truncate("Hello, world!", 10);
|
|
|
1371
1399
|
|
|
1372
1400
|
> **tryParseJson**\<`T`\>(`value`, `defaultValue`): `null` \| `T`
|
|
1373
1401
|
|
|
1374
|
-
Defined in: [sdk/utils/src/json.ts:23](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1402
|
+
Defined in: [sdk/utils/src/json.ts:23](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/json.ts#L23)
|
|
1375
1403
|
|
|
1376
1404
|
Attempts to parse a JSON string into a typed value, returning a default value if parsing fails.
|
|
1377
1405
|
|
|
@@ -1418,7 +1446,7 @@ const invalid = tryParseJson<string[]>(
|
|
|
1418
1446
|
|
|
1419
1447
|
> **validate**\<`T`\>(`schema`, `value`): `T`\[`"_output"`\]
|
|
1420
1448
|
|
|
1421
|
-
Defined in: [sdk/utils/src/validation/validate.ts:16](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1449
|
+
Defined in: [sdk/utils/src/validation/validate.ts:16](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/validate.ts#L16)
|
|
1422
1450
|
|
|
1423
1451
|
Validates a value against a given Zod schema.
|
|
1424
1452
|
|
|
@@ -1426,7 +1454,7 @@ Validates a value against a given Zod schema.
|
|
|
1426
1454
|
|
|
1427
1455
|
| Type Parameter |
|
|
1428
1456
|
| ------ |
|
|
1429
|
-
| `T` *extends* `ZodType`\<`
|
|
1457
|
+
| `T` *extends* `ZodType`\<`unknown`, `unknown`\> |
|
|
1430
1458
|
|
|
1431
1459
|
##### Parameters
|
|
1432
1460
|
|
|
@@ -1459,7 +1487,7 @@ const validatedId = validate(IdSchema, "550e8400-e29b-41d4-a716-446655440000");
|
|
|
1459
1487
|
|
|
1460
1488
|
> **writeEnv**(`options`): `Promise`\<`void`\>
|
|
1461
1489
|
|
|
1462
|
-
Defined in: [sdk/utils/src/environment/write-env.ts:41](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1490
|
+
Defined in: [sdk/utils/src/environment/write-env.ts:41](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/environment/write-env.ts#L41)
|
|
1463
1491
|
|
|
1464
1492
|
Writes environment variables to .env files across a project or monorepo
|
|
1465
1493
|
|
|
@@ -1511,7 +1539,7 @@ await writeEnv({
|
|
|
1511
1539
|
|
|
1512
1540
|
#### CancelError
|
|
1513
1541
|
|
|
1514
|
-
Defined in: [sdk/utils/src/terminal/cancel.ts:8](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1542
|
+
Defined in: [sdk/utils/src/terminal/cancel.ts:8](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/cancel.ts#L8)
|
|
1515
1543
|
|
|
1516
1544
|
Error class used to indicate that the operation was cancelled.
|
|
1517
1545
|
This error is used to signal that the operation should be aborted.
|
|
@@ -1524,7 +1552,7 @@ This error is used to signal that the operation should be aborted.
|
|
|
1524
1552
|
|
|
1525
1553
|
#### CommandError
|
|
1526
1554
|
|
|
1527
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:16](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1555
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:16](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/execute-command.ts#L16)
|
|
1528
1556
|
|
|
1529
1557
|
Error class for command execution errors
|
|
1530
1558
|
|
|
@@ -1538,7 +1566,7 @@ Error class for command execution errors
|
|
|
1538
1566
|
|
|
1539
1567
|
> **new CommandError**(`message`, `code`, `output`): [`CommandError`](#commanderror)
|
|
1540
1568
|
|
|
1541
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:23](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1569
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:23](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/execute-command.ts#L23)
|
|
1542
1570
|
|
|
1543
1571
|
Constructs a new CommandError
|
|
1544
1572
|
|
|
@@ -1564,7 +1592,7 @@ Constructs a new CommandError
|
|
|
1564
1592
|
|
|
1565
1593
|
> `readonly` **code**: `number`
|
|
1566
1594
|
|
|
1567
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:25](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1595
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:25](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/execute-command.ts#L25)
|
|
1568
1596
|
|
|
1569
1597
|
The exit code of the command
|
|
1570
1598
|
|
|
@@ -1572,7 +1600,7 @@ The exit code of the command
|
|
|
1572
1600
|
|
|
1573
1601
|
> `readonly` **output**: `string`[]
|
|
1574
1602
|
|
|
1575
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:26](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1603
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:26](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/execute-command.ts#L26)
|
|
1576
1604
|
|
|
1577
1605
|
The output of the command
|
|
1578
1606
|
|
|
@@ -1580,7 +1608,7 @@ The output of the command
|
|
|
1580
1608
|
|
|
1581
1609
|
#### SpinnerError
|
|
1582
1610
|
|
|
1583
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:12](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1611
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:12](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/spinner.ts#L12)
|
|
1584
1612
|
|
|
1585
1613
|
Error class used to indicate that the spinner operation failed.
|
|
1586
1614
|
This error is used to signal that the operation should be aborted.
|
|
@@ -1593,7 +1621,7 @@ This error is used to signal that the operation should be aborted.
|
|
|
1593
1621
|
|
|
1594
1622
|
#### ExecuteCommandOptions
|
|
1595
1623
|
|
|
1596
|
-
Defined in: [sdk/utils/src/terminal/execute-command.ts:7](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1624
|
+
Defined in: [sdk/utils/src/terminal/execute-command.ts:7](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/execute-command.ts#L7)
|
|
1597
1625
|
|
|
1598
1626
|
Options for executing a command, extending SpawnOptionsWithoutStdio
|
|
1599
1627
|
|
|
@@ -1605,13 +1633,13 @@ Options for executing a command, extending SpawnOptionsWithoutStdio
|
|
|
1605
1633
|
|
|
1606
1634
|
| Property | Type | Description | Defined in |
|
|
1607
1635
|
| ------ | ------ | ------ | ------ |
|
|
1608
|
-
| <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.3.
|
|
1636
|
+
| <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.3.2/sdk/utils/src/terminal/execute-command.ts#L9) |
|
|
1609
1637
|
|
|
1610
1638
|
***
|
|
1611
1639
|
|
|
1612
1640
|
#### Logger
|
|
1613
1641
|
|
|
1614
|
-
Defined in: [sdk/utils/src/logging/logger.ts:23](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1642
|
+
Defined in: [sdk/utils/src/logging/logger.ts:23](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/logging/logger.ts#L23)
|
|
1615
1643
|
|
|
1616
1644
|
Simple logger interface with basic logging methods
|
|
1617
1645
|
Logger
|
|
@@ -1620,16 +1648,16 @@ Simple logger interface with basic logging methods
|
|
|
1620
1648
|
|
|
1621
1649
|
| Property | Type | Description | Defined in |
|
|
1622
1650
|
| ------ | ------ | ------ | ------ |
|
|
1623
|
-
| <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.3.
|
|
1624
|
-
| <a id="error"></a> `error` | (`message`, ...`args`) => `void` | Log errors | [sdk/utils/src/logging/logger.ts:31](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1625
|
-
| <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.3.
|
|
1626
|
-
| <a id="warn"></a> `warn` | (`message`, ...`args`) => `void` | Log warnings | [sdk/utils/src/logging/logger.ts:29](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1651
|
+
| <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.3.2/sdk/utils/src/logging/logger.ts#L25) |
|
|
1652
|
+
| <a id="error"></a> `error` | (`message`, ...`args`) => `void` | Log errors | [sdk/utils/src/logging/logger.ts:31](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/logging/logger.ts#L31) |
|
|
1653
|
+
| <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.3.2/sdk/utils/src/logging/logger.ts#L27) |
|
|
1654
|
+
| <a id="warn"></a> `warn` | (`message`, ...`args`) => `void` | Log warnings | [sdk/utils/src/logging/logger.ts:29](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/logging/logger.ts#L29) |
|
|
1627
1655
|
|
|
1628
1656
|
***
|
|
1629
1657
|
|
|
1630
1658
|
#### LoggerOptions
|
|
1631
1659
|
|
|
1632
|
-
Defined in: [sdk/utils/src/logging/logger.ts:12](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1660
|
+
Defined in: [sdk/utils/src/logging/logger.ts:12](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/logging/logger.ts#L12)
|
|
1633
1661
|
|
|
1634
1662
|
Configuration options for the logger
|
|
1635
1663
|
LoggerOptions
|
|
@@ -1638,14 +1666,14 @@ Configuration options for the logger
|
|
|
1638
1666
|
|
|
1639
1667
|
| Property | Type | Description | Defined in |
|
|
1640
1668
|
| ------ | ------ | ------ | ------ |
|
|
1641
|
-
| <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.3.
|
|
1642
|
-
| <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.3.
|
|
1669
|
+
| <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.3.2/sdk/utils/src/logging/logger.ts#L14) |
|
|
1670
|
+
| <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.3.2/sdk/utils/src/logging/logger.ts#L16) |
|
|
1643
1671
|
|
|
1644
1672
|
***
|
|
1645
1673
|
|
|
1646
1674
|
#### SpinnerOptions\<R\>
|
|
1647
1675
|
|
|
1648
|
-
Defined in: [sdk/utils/src/terminal/spinner.ts:25](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1676
|
+
Defined in: [sdk/utils/src/terminal/spinner.ts:25](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/spinner.ts#L25)
|
|
1649
1677
|
|
|
1650
1678
|
Options for configuring the spinner behavior
|
|
1651
1679
|
|
|
@@ -1659,147 +1687,37 @@ Options for configuring the spinner behavior
|
|
|
1659
1687
|
|
|
1660
1688
|
| Property | Type | Description | Defined in |
|
|
1661
1689
|
| ------ | ------ | ------ | ------ |
|
|
1662
|
-
| <a id="startmessage"></a> `startMessage` | `string` | Message to display when spinner starts | [sdk/utils/src/terminal/spinner.ts:27](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1663
|
-
| <a id="stopmessage"></a> `stopMessage` | `string` | Message to display when spinner completes successfully | [sdk/utils/src/terminal/spinner.ts:31](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1664
|
-
| <a id="task"></a> `task` | (`spinner?`) => `Promise`\<`R`\> | Async task to execute while spinner is active | [sdk/utils/src/terminal/spinner.ts:29](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1690
|
+
| <a id="startmessage"></a> `startMessage` | `string` | Message to display when spinner starts | [sdk/utils/src/terminal/spinner.ts:27](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/spinner.ts#L27) |
|
|
1691
|
+
| <a id="stopmessage"></a> `stopMessage` | `string` | Message to display when spinner completes successfully | [sdk/utils/src/terminal/spinner.ts:31](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/spinner.ts#L31) |
|
|
1692
|
+
| <a id="task"></a> `task` | (`spinner?`) => `Promise`\<`R`\> | Async task to execute while spinner is active | [sdk/utils/src/terminal/spinner.ts:29](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/terminal/spinner.ts#L29) |
|
|
1665
1693
|
|
|
1666
1694
|
### Type Aliases
|
|
1667
1695
|
|
|
1668
|
-
#### AccessToken
|
|
1669
|
-
|
|
1670
|
-
> **AccessToken** = `string`
|
|
1671
|
-
|
|
1672
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/access-token.schema.ts#L22)
|
|
1673
|
-
|
|
1674
|
-
Schema for validating both application and personal access tokens.
|
|
1675
|
-
Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
1676
|
-
|
|
1677
|
-
***
|
|
1678
|
-
|
|
1679
|
-
#### ApplicationAccessToken
|
|
1680
|
-
|
|
1681
|
-
> **ApplicationAccessToken** = `string`
|
|
1682
|
-
|
|
1683
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:8](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/access-token.schema.ts#L8)
|
|
1684
|
-
|
|
1685
|
-
Schema for validating application access tokens.
|
|
1686
|
-
Application access tokens start with 'sm_aat_' prefix.
|
|
1687
|
-
|
|
1688
|
-
***
|
|
1689
|
-
|
|
1690
1696
|
#### DotEnv
|
|
1691
1697
|
|
|
1692
|
-
> **DotEnv** = `
|
|
1698
|
+
> **DotEnv** = `z.infer`\<*typeof* [`DotEnvSchema`](#dotenvschema)\>
|
|
1693
1699
|
|
|
1694
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1700
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:106](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/dot-env.schema.ts#L106)
|
|
1695
1701
|
|
|
1696
1702
|
Type definition for the environment variables schema.
|
|
1697
1703
|
|
|
1698
|
-
##### Type declaration
|
|
1699
|
-
|
|
1700
|
-
| Name | Type | Description | Defined in |
|
|
1701
|
-
| ------ | ------ | ------ | ------ |
|
|
1702
|
-
| <a id="settlemint_access_token"></a> `SETTLEMINT_ACCESS_TOKEN?` | `string` | Application access token for authenticating with SettleMint services | [sdk/utils/src/validation/dot-env.schema.ts:16](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L16) |
|
|
1703
|
-
| <a id="settlemint_accessible_private_key"></a> `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?` | `string` | Unique name of the accessible private key | [sdk/utils/src/validation/dot-env.schema.ts:65](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L65) |
|
|
1704
|
-
| <a id="settlemint_application"></a> `SETTLEMINT_APPLICATION?` | `string` | Unique name of the application | [sdk/utils/src/validation/dot-env.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L22) |
|
|
1705
|
-
| <a id="settlemint_blockchain_network"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK?` | `string` | Unique name of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:24](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L24) |
|
|
1706
|
-
| <a id="settlemint_blockchain_network_chain_id"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?` | `string` | Chain ID of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:26](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L26) |
|
|
1707
|
-
| <a id="settlemint_blockchain_node"></a> `SETTLEMINT_BLOCKCHAIN_NODE?` | `string` | Unique name of the blockchain node (should have a private key for signing transactions) | [sdk/utils/src/validation/dot-env.schema.ts:28](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L28) |
|
|
1708
|
-
| <a id="settlemint_blockchain_node_json_rpc_endpoint"></a> `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node | [sdk/utils/src/validation/dot-env.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L30) |
|
|
1709
|
-
| <a id="settlemint_blockchain_node_or_load_balancer"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?` | `string` | Unique name of the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:32](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L32) |
|
|
1710
|
-
| <a id="settlemint_blockchain_node_or_load_balancer_json_rpc_endpoint"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L34) |
|
|
1711
|
-
| <a id="settlemint_blockscout"></a> `SETTLEMINT_BLOCKSCOUT?` | `string` | Unique name of the Blockscout instance | [sdk/utils/src/validation/dot-env.schema.ts:87](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L87) |
|
|
1712
|
-
| <a id="settlemint_blockscout_graphql_endpoint"></a> `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:89](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L89) |
|
|
1713
|
-
| <a id="settlemint_blockscout_ui_endpoint"></a> `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?` | `string` | UI endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:91](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L91) |
|
|
1714
|
-
| <a id="settlemint_custom_deployment"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT?` | `string` | Unique name of the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:83](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L83) |
|
|
1715
|
-
| <a id="settlemint_custom_deployment_endpoint"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?` | `string` | Endpoint URL for the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:85](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L85) |
|
|
1716
|
-
| <a id="settlemint_hasura"></a> `SETTLEMINT_HASURA?` | `string` | Unique name of the Hasura instance | [sdk/utils/src/validation/dot-env.schema.ts:36](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L36) |
|
|
1717
|
-
| <a id="settlemint_hasura_admin_secret"></a> `SETTLEMINT_HASURA_ADMIN_SECRET?` | `string` | Admin secret for authenticating with Hasura | [sdk/utils/src/validation/dot-env.schema.ts:40](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L40) |
|
|
1718
|
-
| <a id="settlemint_hasura_database_url"></a> `SETTLEMINT_HASURA_DATABASE_URL?` | `string` | Database connection URL for Hasura | [sdk/utils/src/validation/dot-env.schema.ts:42](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L42) |
|
|
1719
|
-
| <a id="settlemint_hasura_endpoint"></a> `SETTLEMINT_HASURA_ENDPOINT?` | `string` | Endpoint URL for the Hasura GraphQL API | [sdk/utils/src/validation/dot-env.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L38) |
|
|
1720
|
-
| <a id="settlemint_hd_private_key"></a> `SETTLEMINT_HD_PRIVATE_KEY?` | `string` | Unique name of the HD private key | [sdk/utils/src/validation/dot-env.schema.ts:61](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L61) |
|
|
1721
|
-
| <a id="settlemint_hd_private_key_forwarder_address"></a> `SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?` | `string` | Address of the HD private key forwarder | [sdk/utils/src/validation/dot-env.schema.ts:63](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L63) |
|
|
1722
|
-
| <a id="settlemint_instance"></a> `SETTLEMINT_INSTANCE` | `string` | Base URL of the SettleMint platform instance | [sdk/utils/src/validation/dot-env.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L14) |
|
|
1723
|
-
| <a id="settlemint_ipfs"></a> `SETTLEMINT_IPFS?` | `string` | Unique name of the IPFS instance | [sdk/utils/src/validation/dot-env.schema.ts:75](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L75) |
|
|
1724
|
-
| <a id="settlemint_ipfs_api_endpoint"></a> `SETTLEMINT_IPFS_API_ENDPOINT?` | `string` | API endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:77](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L77) |
|
|
1725
|
-
| <a id="settlemint_ipfs_gateway_endpoint"></a> `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?` | `string` | Gateway endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:81](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L81) |
|
|
1726
|
-
| <a id="settlemint_ipfs_pinning_endpoint"></a> `SETTLEMINT_IPFS_PINNING_ENDPOINT?` | `string` | Pinning service endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:79](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L79) |
|
|
1727
|
-
| <a id="settlemint_log_level"></a> `SETTLEMINT_LOG_LEVEL` | `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"` | The log level to use | [sdk/utils/src/validation/dot-env.schema.ts:95](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L95) |
|
|
1728
|
-
| <a id="settlemint_minio"></a> `SETTLEMINT_MINIO?` | `string` | Unique name of the MinIO instance | [sdk/utils/src/validation/dot-env.schema.ts:67](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L67) |
|
|
1729
|
-
| <a id="settlemint_minio_access_key"></a> `SETTLEMINT_MINIO_ACCESS_KEY?` | `string` | Access key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:71](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L71) |
|
|
1730
|
-
| <a id="settlemint_minio_endpoint"></a> `SETTLEMINT_MINIO_ENDPOINT?` | `string` | Endpoint URL for MinIO | [sdk/utils/src/validation/dot-env.schema.ts:69](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L69) |
|
|
1731
|
-
| <a id="settlemint_minio_secret_key"></a> `SETTLEMINT_MINIO_SECRET_KEY?` | `string` | Secret key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:73](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L73) |
|
|
1732
|
-
| <a id="settlemint_new_project_name"></a> `SETTLEMINT_NEW_PROJECT_NAME?` | `string` | Name of the new project being created | [sdk/utils/src/validation/dot-env.schema.ts:93](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L93) |
|
|
1733
|
-
| <a id="settlemint_portal"></a> `SETTLEMINT_PORTAL?` | `string` | Unique name of the Smart Contract Portal instance | [sdk/utils/src/validation/dot-env.schema.ts:53](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L53) |
|
|
1734
|
-
| <a id="settlemint_portal_graphql_endpoint"></a> `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L55) |
|
|
1735
|
-
| <a id="settlemint_portal_rest_endpoint"></a> `SETTLEMINT_PORTAL_REST_ENDPOINT?` | `string` | REST endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:57](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L57) |
|
|
1736
|
-
| <a id="settlemint_portal_ws_endpoint"></a> `SETTLEMINT_PORTAL_WS_ENDPOINT?` | `string` | WebSocket endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:59](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L59) |
|
|
1737
|
-
| <a id="settlemint_thegraph"></a> `SETTLEMINT_THEGRAPH?` | `string` | Unique name of The Graph instance | [sdk/utils/src/validation/dot-env.schema.ts:44](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L44) |
|
|
1738
|
-
| <a id="settlemint_thegraph_default_subgraph"></a> `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?` | `string` | Default The Graph subgraph to use | [sdk/utils/src/validation/dot-env.schema.ts:51](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L51) |
|
|
1739
|
-
| <a id="settlemint_thegraph_subgraphs_endpoints"></a> `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?` | `string`[] | Array of endpoint URLs for The Graph subgraphs | [sdk/utils/src/validation/dot-env.schema.ts:46](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L46) |
|
|
1740
|
-
| <a id="settlemint_workspace"></a> `SETTLEMINT_WORKSPACE?` | `string` | Unique name of the workspace | [sdk/utils/src/validation/dot-env.schema.ts:20](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L20) |
|
|
1741
|
-
|
|
1742
1704
|
***
|
|
1743
1705
|
|
|
1744
1706
|
#### DotEnvPartial
|
|
1745
1707
|
|
|
1746
|
-
> **DotEnvPartial** = `
|
|
1708
|
+
> **DotEnvPartial** = `z.infer`\<*typeof* [`DotEnvSchemaPartial`](#dotenvschemapartial)\>
|
|
1747
1709
|
|
|
1748
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1710
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:117](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/dot-env.schema.ts#L117)
|
|
1749
1711
|
|
|
1750
1712
|
Type definition for the partial environment variables schema.
|
|
1751
1713
|
|
|
1752
|
-
##### Type declaration
|
|
1753
|
-
|
|
1754
|
-
| Name | Type | Description | Defined in |
|
|
1755
|
-
| ------ | ------ | ------ | ------ |
|
|
1756
|
-
| <a id="settlemint_access_token-1"></a> `SETTLEMINT_ACCESS_TOKEN?` | `string` | Application access token for authenticating with SettleMint services | [sdk/utils/src/validation/dot-env.schema.ts:16](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L16) |
|
|
1757
|
-
| <a id="settlemint_accessible_private_key-1"></a> `SETTLEMINT_ACCESSIBLE_PRIVATE_KEY?` | `string` | Unique name of the accessible private key | [sdk/utils/src/validation/dot-env.schema.ts:65](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L65) |
|
|
1758
|
-
| <a id="settlemint_application-1"></a> `SETTLEMINT_APPLICATION?` | `string` | Unique name of the application | [sdk/utils/src/validation/dot-env.schema.ts:22](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L22) |
|
|
1759
|
-
| <a id="settlemint_blockchain_network-1"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK?` | `string` | Unique name of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:24](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L24) |
|
|
1760
|
-
| <a id="settlemint_blockchain_network_chain_id-1"></a> `SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID?` | `string` | Chain ID of the blockchain network | [sdk/utils/src/validation/dot-env.schema.ts:26](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L26) |
|
|
1761
|
-
| <a id="settlemint_blockchain_node-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE?` | `string` | Unique name of the blockchain node (should have a private key for signing transactions) | [sdk/utils/src/validation/dot-env.schema.ts:28](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L28) |
|
|
1762
|
-
| <a id="settlemint_blockchain_node_json_rpc_endpoint-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node | [sdk/utils/src/validation/dot-env.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L30) |
|
|
1763
|
-
| <a id="settlemint_blockchain_node_or_load_balancer-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER?` | `string` | Unique name of the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:32](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L32) |
|
|
1764
|
-
| <a id="settlemint_blockchain_node_or_load_balancer_json_rpc_endpoint-1"></a> `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT?` | `string` | JSON RPC endpoint for the blockchain node or load balancer | [sdk/utils/src/validation/dot-env.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L34) |
|
|
1765
|
-
| <a id="settlemint_blockscout-1"></a> `SETTLEMINT_BLOCKSCOUT?` | `string` | Unique name of the Blockscout instance | [sdk/utils/src/validation/dot-env.schema.ts:87](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L87) |
|
|
1766
|
-
| <a id="settlemint_blockscout_graphql_endpoint-1"></a> `SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:89](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L89) |
|
|
1767
|
-
| <a id="settlemint_blockscout_ui_endpoint-1"></a> `SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT?` | `string` | UI endpoint URL for Blockscout | [sdk/utils/src/validation/dot-env.schema.ts:91](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L91) |
|
|
1768
|
-
| <a id="settlemint_custom_deployment-1"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT?` | `string` | Unique name of the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:83](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L83) |
|
|
1769
|
-
| <a id="settlemint_custom_deployment_endpoint-1"></a> `SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT?` | `string` | Endpoint URL for the custom deployment | [sdk/utils/src/validation/dot-env.schema.ts:85](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L85) |
|
|
1770
|
-
| <a id="settlemint_hasura-1"></a> `SETTLEMINT_HASURA?` | `string` | Unique name of the Hasura instance | [sdk/utils/src/validation/dot-env.schema.ts:36](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L36) |
|
|
1771
|
-
| <a id="settlemint_hasura_admin_secret-1"></a> `SETTLEMINT_HASURA_ADMIN_SECRET?` | `string` | Admin secret for authenticating with Hasura | [sdk/utils/src/validation/dot-env.schema.ts:40](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L40) |
|
|
1772
|
-
| <a id="settlemint_hasura_database_url-1"></a> `SETTLEMINT_HASURA_DATABASE_URL?` | `string` | Database connection URL for Hasura | [sdk/utils/src/validation/dot-env.schema.ts:42](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L42) |
|
|
1773
|
-
| <a id="settlemint_hasura_endpoint-1"></a> `SETTLEMINT_HASURA_ENDPOINT?` | `string` | Endpoint URL for the Hasura GraphQL API | [sdk/utils/src/validation/dot-env.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L38) |
|
|
1774
|
-
| <a id="settlemint_hd_private_key-1"></a> `SETTLEMINT_HD_PRIVATE_KEY?` | `string` | Unique name of the HD private key | [sdk/utils/src/validation/dot-env.schema.ts:61](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L61) |
|
|
1775
|
-
| <a id="settlemint_hd_private_key_forwarder_address-1"></a> `SETTLEMINT_HD_PRIVATE_KEY_FORWARDER_ADDRESS?` | `string` | Address of the HD private key forwarder | [sdk/utils/src/validation/dot-env.schema.ts:63](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L63) |
|
|
1776
|
-
| <a id="settlemint_instance-1"></a> `SETTLEMINT_INSTANCE?` | `string` | Base URL of the SettleMint platform instance | [sdk/utils/src/validation/dot-env.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L14) |
|
|
1777
|
-
| <a id="settlemint_ipfs-1"></a> `SETTLEMINT_IPFS?` | `string` | Unique name of the IPFS instance | [sdk/utils/src/validation/dot-env.schema.ts:75](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L75) |
|
|
1778
|
-
| <a id="settlemint_ipfs_api_endpoint-1"></a> `SETTLEMINT_IPFS_API_ENDPOINT?` | `string` | API endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:77](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L77) |
|
|
1779
|
-
| <a id="settlemint_ipfs_gateway_endpoint-1"></a> `SETTLEMINT_IPFS_GATEWAY_ENDPOINT?` | `string` | Gateway endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:81](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L81) |
|
|
1780
|
-
| <a id="settlemint_ipfs_pinning_endpoint-1"></a> `SETTLEMINT_IPFS_PINNING_ENDPOINT?` | `string` | Pinning service endpoint URL for IPFS | [sdk/utils/src/validation/dot-env.schema.ts:79](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L79) |
|
|
1781
|
-
| <a id="settlemint_log_level-1"></a> `SETTLEMINT_LOG_LEVEL?` | `"error"` \| `"info"` \| `"warn"` \| `"debug"` \| `"none"` | The log level to use | [sdk/utils/src/validation/dot-env.schema.ts:95](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L95) |
|
|
1782
|
-
| <a id="settlemint_minio-1"></a> `SETTLEMINT_MINIO?` | `string` | Unique name of the MinIO instance | [sdk/utils/src/validation/dot-env.schema.ts:67](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L67) |
|
|
1783
|
-
| <a id="settlemint_minio_access_key-1"></a> `SETTLEMINT_MINIO_ACCESS_KEY?` | `string` | Access key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:71](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L71) |
|
|
1784
|
-
| <a id="settlemint_minio_endpoint-1"></a> `SETTLEMINT_MINIO_ENDPOINT?` | `string` | Endpoint URL for MinIO | [sdk/utils/src/validation/dot-env.schema.ts:69](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L69) |
|
|
1785
|
-
| <a id="settlemint_minio_secret_key-1"></a> `SETTLEMINT_MINIO_SECRET_KEY?` | `string` | Secret key for MinIO authentication | [sdk/utils/src/validation/dot-env.schema.ts:73](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L73) |
|
|
1786
|
-
| <a id="settlemint_new_project_name-1"></a> `SETTLEMINT_NEW_PROJECT_NAME?` | `string` | Name of the new project being created | [sdk/utils/src/validation/dot-env.schema.ts:93](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L93) |
|
|
1787
|
-
| <a id="settlemint_portal-1"></a> `SETTLEMINT_PORTAL?` | `string` | Unique name of the Smart Contract Portal instance | [sdk/utils/src/validation/dot-env.schema.ts:53](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L53) |
|
|
1788
|
-
| <a id="settlemint_portal_graphql_endpoint-1"></a> `SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT?` | `string` | GraphQL endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L55) |
|
|
1789
|
-
| <a id="settlemint_portal_rest_endpoint-1"></a> `SETTLEMINT_PORTAL_REST_ENDPOINT?` | `string` | REST endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:57](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L57) |
|
|
1790
|
-
| <a id="settlemint_portal_ws_endpoint-1"></a> `SETTLEMINT_PORTAL_WS_ENDPOINT?` | `string` | WebSocket endpoint URL for the Portal | [sdk/utils/src/validation/dot-env.schema.ts:59](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L59) |
|
|
1791
|
-
| <a id="settlemint_thegraph-1"></a> `SETTLEMINT_THEGRAPH?` | `string` | Unique name of The Graph instance | [sdk/utils/src/validation/dot-env.schema.ts:44](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L44) |
|
|
1792
|
-
| <a id="settlemint_thegraph_default_subgraph-1"></a> `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH?` | `string` | Default The Graph subgraph to use | [sdk/utils/src/validation/dot-env.schema.ts:51](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L51) |
|
|
1793
|
-
| <a id="settlemint_thegraph_subgraphs_endpoints-1"></a> `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?` | `string`[] | Array of endpoint URLs for The Graph subgraphs | [sdk/utils/src/validation/dot-env.schema.ts:46](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L46) |
|
|
1794
|
-
| <a id="settlemint_workspace-1"></a> `SETTLEMINT_WORKSPACE?` | `string` | Unique name of the workspace | [sdk/utils/src/validation/dot-env.schema.ts:20](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/dot-env.schema.ts#L20) |
|
|
1795
|
-
|
|
1796
1714
|
***
|
|
1797
1715
|
|
|
1798
1716
|
#### Id
|
|
1799
1717
|
|
|
1800
|
-
> **Id** = `
|
|
1718
|
+
> **Id** = `z.infer`\<*typeof* [`IdSchema`](#idschema)\>
|
|
1801
1719
|
|
|
1802
|
-
Defined in: [sdk/utils/src/validation/id.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1720
|
+
Defined in: [sdk/utils/src/validation/id.schema.ts:30](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/id.schema.ts#L30)
|
|
1803
1721
|
|
|
1804
1722
|
Type definition for database IDs, inferred from IdSchema.
|
|
1805
1723
|
Can be either a PostgreSQL UUID string or MongoDB ObjectID string.
|
|
@@ -1810,100 +1728,17 @@ Can be either a PostgreSQL UUID string or MongoDB ObjectID string.
|
|
|
1810
1728
|
|
|
1811
1729
|
> **LogLevel** = `"debug"` \| `"info"` \| `"warn"` \| `"error"` \| `"none"`
|
|
1812
1730
|
|
|
1813
|
-
Defined in: [sdk/utils/src/logging/logger.ts:6](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1731
|
+
Defined in: [sdk/utils/src/logging/logger.ts:6](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/logging/logger.ts#L6)
|
|
1814
1732
|
|
|
1815
1733
|
Log levels supported by the logger
|
|
1816
1734
|
|
|
1817
|
-
***
|
|
1818
|
-
|
|
1819
|
-
#### PersonalAccessToken
|
|
1820
|
-
|
|
1821
|
-
> **PersonalAccessToken** = `string`
|
|
1822
|
-
|
|
1823
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:15](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/access-token.schema.ts#L15)
|
|
1824
|
-
|
|
1825
|
-
Schema for validating personal access tokens.
|
|
1826
|
-
Personal access tokens start with 'sm_pat_' prefix.
|
|
1827
|
-
|
|
1828
|
-
***
|
|
1829
|
-
|
|
1830
|
-
#### Url
|
|
1831
|
-
|
|
1832
|
-
> **Url** = `string`
|
|
1833
|
-
|
|
1834
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:18](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/url.schema.ts#L18)
|
|
1835
|
-
|
|
1836
|
-
Schema for validating URLs.
|
|
1837
|
-
|
|
1838
|
-
##### Example
|
|
1839
|
-
|
|
1840
|
-
```ts
|
|
1841
|
-
import { UrlSchema } from "@settlemint/sdk-utils/validation";
|
|
1842
|
-
|
|
1843
|
-
// Validate a URL
|
|
1844
|
-
const isValidUrl = UrlSchema.safeParse("https://console.settlemint.com").success;
|
|
1845
|
-
// true
|
|
1846
|
-
|
|
1847
|
-
// Invalid URLs will fail validation
|
|
1848
|
-
const isInvalidUrl = UrlSchema.safeParse("not-a-url").success;
|
|
1849
|
-
// false
|
|
1850
|
-
```
|
|
1851
|
-
|
|
1852
|
-
***
|
|
1853
|
-
|
|
1854
|
-
#### UrlOrPath
|
|
1855
|
-
|
|
1856
|
-
> **UrlOrPath** = `string`
|
|
1857
|
-
|
|
1858
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:55](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/url.schema.ts#L55)
|
|
1859
|
-
|
|
1860
|
-
Schema that accepts either a full URL or a URL path.
|
|
1861
|
-
|
|
1862
|
-
##### Example
|
|
1863
|
-
|
|
1864
|
-
```ts
|
|
1865
|
-
import { UrlOrPathSchema } from "@settlemint/sdk-utils/validation";
|
|
1866
|
-
|
|
1867
|
-
// Validate a URL
|
|
1868
|
-
const isValidUrl = UrlOrPathSchema.safeParse("https://console.settlemint.com").success;
|
|
1869
|
-
// true
|
|
1870
|
-
|
|
1871
|
-
// Validate a path
|
|
1872
|
-
const isValidPath = UrlOrPathSchema.safeParse("/api/v1/users").success;
|
|
1873
|
-
// true
|
|
1874
|
-
```
|
|
1875
|
-
|
|
1876
|
-
***
|
|
1877
|
-
|
|
1878
|
-
#### UrlPath
|
|
1879
|
-
|
|
1880
|
-
> **UrlPath** = `string`
|
|
1881
|
-
|
|
1882
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:38](https://github.com/settlemint/sdk/blob/v2.3.1/sdk/utils/src/validation/url.schema.ts#L38)
|
|
1883
|
-
|
|
1884
|
-
Schema for validating URL paths.
|
|
1885
|
-
|
|
1886
|
-
##### Example
|
|
1887
|
-
|
|
1888
|
-
```ts
|
|
1889
|
-
import { UrlPathSchema } from "@settlemint/sdk-utils/validation";
|
|
1890
|
-
|
|
1891
|
-
// Validate a URL path
|
|
1892
|
-
const isValidPath = UrlPathSchema.safeParse("/api/v1/users").success;
|
|
1893
|
-
// true
|
|
1894
|
-
|
|
1895
|
-
// Invalid paths will fail validation
|
|
1896
|
-
const isInvalidPath = UrlPathSchema.safeParse("not-a-path").success;
|
|
1897
|
-
// false
|
|
1898
|
-
```
|
|
1899
|
-
|
|
1900
1735
|
### Variables
|
|
1901
1736
|
|
|
1902
1737
|
#### AccessTokenSchema
|
|
1903
1738
|
|
|
1904
|
-
> `const` **AccessTokenSchema**: `ZodString
|
|
1739
|
+
> `const` **AccessTokenSchema**: `ZodString`
|
|
1905
1740
|
|
|
1906
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:21](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1741
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:21](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/access-token.schema.ts#L21)
|
|
1907
1742
|
|
|
1908
1743
|
Schema for validating both application and personal access tokens.
|
|
1909
1744
|
Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
@@ -1912,9 +1747,9 @@ Accepts tokens starting with either 'sm_pat_' or 'sm_aat_' prefix.
|
|
|
1912
1747
|
|
|
1913
1748
|
#### ApplicationAccessTokenSchema
|
|
1914
1749
|
|
|
1915
|
-
> `const` **ApplicationAccessTokenSchema**: `ZodString
|
|
1750
|
+
> `const` **ApplicationAccessTokenSchema**: `ZodString`
|
|
1916
1751
|
|
|
1917
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:7](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1752
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:7](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/access-token.schema.ts#L7)
|
|
1918
1753
|
|
|
1919
1754
|
Schema for validating application access tokens.
|
|
1920
1755
|
Application access tokens start with 'sm_aat_' prefix.
|
|
@@ -1923,9 +1758,9 @@ Application access tokens start with 'sm_aat_' prefix.
|
|
|
1923
1758
|
|
|
1924
1759
|
#### DotEnvSchema
|
|
1925
1760
|
|
|
1926
|
-
> `const` **DotEnvSchema**: `ZodObject`\<[`
|
|
1761
|
+
> `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_NETWORK_CHAIN_ID`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKCHAIN_NODE`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT`: `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_HD_PRIVATE_KEY_FORWARDER_ADDRESS`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_INSTANCE`: `ZodDefault`\<`ZodUnion`\<readonly \[`ZodString`, `ZodLiteral`\<`"standalone"`\>\]\>\>; `SETTLEMINT_IPFS`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_IPFS_API_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_IPFS_GATEWAY_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_IPFS_PINNING_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_LOG_LEVEL`: `ZodDefault`\<`ZodEnum`\<\{ `debug`: `"debug"`; `error`: `"error"`; `info`: `"info"`; `none`: `"none"`; `warn`: `"warn"`; \}\>\>; `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_PORTAL_WS_ENDPOINT`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_THEGRAPH`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `ZodOptional`\<`ZodString`\>; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `ZodPipe`\<`ZodTransform`\<`null` \| `never`[], `unknown`\>, `ZodOptional`\<`ZodArray`\<`ZodString`\>\>\>; `SETTLEMINT_WORKSPACE`: `ZodOptional`\<`ZodString`\>; \}, `$strip`\>
|
|
1927
1762
|
|
|
1928
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1763
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/dot-env.schema.ts#L17)
|
|
1929
1764
|
|
|
1930
1765
|
Schema for validating environment variables used by the SettleMint SDK.
|
|
1931
1766
|
Defines validation rules and types for configuration values like URLs,
|
|
@@ -1935,9 +1770,9 @@ access tokens, workspace names, and service endpoints.
|
|
|
1935
1770
|
|
|
1936
1771
|
#### DotEnvSchemaPartial
|
|
1937
1772
|
|
|
1938
|
-
> `const` **DotEnvSchemaPartial**: `ZodObject`\<[`
|
|
1773
|
+
> `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_NETWORK_CHAIN_ID`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKCHAIN_NODE`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT`: `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_HD_PRIVATE_KEY_FORWARDER_ADDRESS`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_INSTANCE`: `ZodOptional`\<`ZodDefault`\<`ZodUnion`\<readonly \[`ZodString`, `ZodLiteral`\<`"standalone"`\>\]\>\>\>; `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_LOG_LEVEL`: `ZodOptional`\<`ZodDefault`\<`ZodEnum`\<\{ `debug`: `"debug"`; `error`: `"error"`; `info`: `"info"`; `none`: `"none"`; `warn`: `"warn"`; \}\>\>\>; `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_PORTAL_WS_ENDPOINT`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_THEGRAPH`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; `SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS`: `ZodOptional`\<`ZodPipe`\<`ZodTransform`\<`null` \| `never`[], `unknown`\>, `ZodOptional`\<`ZodArray`\<`ZodString`\>\>\>\>; `SETTLEMINT_WORKSPACE`: `ZodOptional`\<`ZodOptional`\<`ZodString`\>\>; \}, `$strip`\>
|
|
1939
1774
|
|
|
1940
|
-
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:
|
|
1775
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:112](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/dot-env.schema.ts#L112)
|
|
1941
1776
|
|
|
1942
1777
|
Partial version of the environment variables schema where all fields are optional.
|
|
1943
1778
|
Useful for validating incomplete configurations during development or build time.
|
|
@@ -1946,9 +1781,9 @@ Useful for validating incomplete configurations during development or build time
|
|
|
1946
1781
|
|
|
1947
1782
|
#### IdSchema
|
|
1948
1783
|
|
|
1949
|
-
> `const` **IdSchema**: `ZodUnion`\<[`
|
|
1784
|
+
> `const` **IdSchema**: `ZodUnion`\<readonly \[`ZodString`, `ZodString`\]\>
|
|
1950
1785
|
|
|
1951
|
-
Defined in: [sdk/utils/src/validation/id.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1786
|
+
Defined in: [sdk/utils/src/validation/id.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/id.schema.ts#L17)
|
|
1952
1787
|
|
|
1953
1788
|
Schema for validating database IDs. Accepts both PostgreSQL UUIDs and MongoDB ObjectIDs.
|
|
1954
1789
|
PostgreSQL UUIDs are 32 hexadecimal characters with hyphens (e.g. 123e4567-e89b-12d3-a456-426614174000).
|
|
@@ -1970,9 +1805,9 @@ const isValidObjectId = IdSchema.safeParse("507f1f77bcf86cd799439011").success;
|
|
|
1970
1805
|
|
|
1971
1806
|
#### PersonalAccessTokenSchema
|
|
1972
1807
|
|
|
1973
|
-
> `const` **PersonalAccessTokenSchema**: `ZodString
|
|
1808
|
+
> `const` **PersonalAccessTokenSchema**: `ZodString`
|
|
1974
1809
|
|
|
1975
|
-
Defined in: [sdk/utils/src/validation/access-token.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1810
|
+
Defined in: [sdk/utils/src/validation/access-token.schema.ts:14](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/access-token.schema.ts#L14)
|
|
1976
1811
|
|
|
1977
1812
|
Schema for validating personal access tokens.
|
|
1978
1813
|
Personal access tokens start with 'sm_pat_' prefix.
|
|
@@ -1983,7 +1818,7 @@ Personal access tokens start with 'sm_pat_' prefix.
|
|
|
1983
1818
|
|
|
1984
1819
|
> `const` **runsInBrowser**: `boolean` = `isBrowser`
|
|
1985
1820
|
|
|
1986
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:40](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1821
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:40](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/runtime/ensure-server.ts#L40)
|
|
1987
1822
|
|
|
1988
1823
|
Boolean indicating if code is currently running in a browser environment
|
|
1989
1824
|
|
|
@@ -1993,17 +1828,27 @@ Boolean indicating if code is currently running in a browser environment
|
|
|
1993
1828
|
|
|
1994
1829
|
> `const` **runsOnServer**: `boolean` = `!isBrowser`
|
|
1995
1830
|
|
|
1996
|
-
Defined in: [sdk/utils/src/runtime/ensure-server.ts:45](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1831
|
+
Defined in: [sdk/utils/src/runtime/ensure-server.ts:45](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/runtime/ensure-server.ts#L45)
|
|
1997
1832
|
|
|
1998
1833
|
Boolean indicating if code is currently running in a server environment
|
|
1999
1834
|
|
|
2000
1835
|
***
|
|
2001
1836
|
|
|
1837
|
+
#### STANDALONE\_INSTANCE
|
|
1838
|
+
|
|
1839
|
+
> `const` **STANDALONE\_INSTANCE**: `"standalone"` = `"standalone"`
|
|
1840
|
+
|
|
1841
|
+
Defined in: [sdk/utils/src/validation/dot-env.schema.ts:10](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/dot-env.schema.ts#L10)
|
|
1842
|
+
|
|
1843
|
+
Use this value to indicate that the resources are not part of the SettleMint platform.
|
|
1844
|
+
|
|
1845
|
+
***
|
|
1846
|
+
|
|
2002
1847
|
#### UniqueNameSchema
|
|
2003
1848
|
|
|
2004
1849
|
> `const` **UniqueNameSchema**: `ZodString`
|
|
2005
1850
|
|
|
2006
|
-
Defined in: [sdk/utils/src/validation/unique-name.schema.ts:19](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1851
|
+
Defined in: [sdk/utils/src/validation/unique-name.schema.ts:19](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/unique-name.schema.ts#L19)
|
|
2007
1852
|
|
|
2008
1853
|
Schema for validating unique names used across the SettleMint platform.
|
|
2009
1854
|
Only accepts lowercase alphanumeric characters and hyphens.
|
|
@@ -2027,9 +1872,9 @@ const isInvalidName = UniqueNameSchema.safeParse("My Workspace!").success;
|
|
|
2027
1872
|
|
|
2028
1873
|
#### UrlOrPathSchema
|
|
2029
1874
|
|
|
2030
|
-
> `const` **UrlOrPathSchema**: `ZodUnion`\<[`
|
|
1875
|
+
> `const` **UrlOrPathSchema**: `ZodUnion`\<readonly \[`ZodString`, `ZodString`\]\>
|
|
2031
1876
|
|
|
2032
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:54](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1877
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:54](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/url.schema.ts#L54)
|
|
2033
1878
|
|
|
2034
1879
|
Schema that accepts either a full URL or a URL path.
|
|
2035
1880
|
|
|
@@ -2051,9 +1896,9 @@ const isValidPath = UrlOrPathSchema.safeParse("/api/v1/users").success;
|
|
|
2051
1896
|
|
|
2052
1897
|
#### UrlPathSchema
|
|
2053
1898
|
|
|
2054
|
-
> `const` **UrlPathSchema**: `ZodString
|
|
1899
|
+
> `const` **UrlPathSchema**: `ZodString`
|
|
2055
1900
|
|
|
2056
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1901
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:34](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/url.schema.ts#L34)
|
|
2057
1902
|
|
|
2058
1903
|
Schema for validating URL paths.
|
|
2059
1904
|
|
|
@@ -2075,9 +1920,9 @@ const isInvalidPath = UrlPathSchema.safeParse("not-a-path").success;
|
|
|
2075
1920
|
|
|
2076
1921
|
#### UrlSchema
|
|
2077
1922
|
|
|
2078
|
-
> `const` **UrlSchema**: `ZodString
|
|
1923
|
+
> `const` **UrlSchema**: `ZodString`
|
|
2079
1924
|
|
|
2080
|
-
Defined in: [sdk/utils/src/validation/url.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.3.
|
|
1925
|
+
Defined in: [sdk/utils/src/validation/url.schema.ts:17](https://github.com/settlemint/sdk/blob/v2.3.2/sdk/utils/src/validation/url.schema.ts#L17)
|
|
2081
1926
|
|
|
2082
1927
|
Schema for validating URLs.
|
|
2083
1928
|
|