graphlit-client 1.0.20251222002 → 1.0.20251222003
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/dist/client.js +19 -17
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -209,23 +209,25 @@ class Graphlit {
|
|
|
209
209
|
jitter: true,
|
|
210
210
|
...options.retryConfig,
|
|
211
211
|
};
|
|
212
|
-
if
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
212
|
+
// Skip all validation if pre-signed token is provided
|
|
213
|
+
if (!options.token) {
|
|
214
|
+
if (!this.organizationId) {
|
|
215
|
+
throw new Error("Graphlit organization identifier is required.");
|
|
216
|
+
}
|
|
217
|
+
if (!isValidGuid(this.organizationId)) {
|
|
218
|
+
throw new Error(`Invalid organization ID format. Expected a valid GUID, but received: '${this.organizationId}'. ` +
|
|
219
|
+
"A valid GUID should be in the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
|
|
220
|
+
}
|
|
221
|
+
if (!this.environmentId) {
|
|
222
|
+
throw new Error("Graphlit environment identifier is required.");
|
|
223
|
+
}
|
|
224
|
+
if (!isValidGuid(this.environmentId)) {
|
|
225
|
+
throw new Error(`Invalid environment ID format. Expected a valid GUID, but received: '${this.environmentId}'. ` +
|
|
226
|
+
"A valid GUID should be in the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
|
|
227
|
+
}
|
|
228
|
+
if (!this.jwtSecret) {
|
|
229
|
+
throw new Error("Graphlit environment JWT secret is required.");
|
|
230
|
+
}
|
|
229
231
|
}
|
|
230
232
|
// Validate optional userId if provided (ownerId can be any format)
|
|
231
233
|
if (this.userId && !isValidGuid(this.userId)) {
|