@warmhub/sdk-ts 0.63.0 → 0.64.0
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.
|
@@ -7223,6 +7223,10 @@ function normalizeOptionalTypeSpec(spec) {
|
|
|
7223
7223
|
}
|
|
7224
7224
|
return { spec, optionalByType: false };
|
|
7225
7225
|
}
|
|
7226
|
+
function isFieldOptional(fieldKey, typeSpec) {
|
|
7227
|
+
const optionalByKey = fieldKey !== void 0 && fieldKey.endsWith("?");
|
|
7228
|
+
return optionalByKey || normalizeOptionalTypeSpec(typeSpec).optionalByType;
|
|
7229
|
+
}
|
|
7226
7230
|
|
|
7227
7231
|
// ../rules/src/shape-validation-runtime.ts
|
|
7228
7232
|
function validateAgainstShape(data, shapeFields) {
|
|
@@ -7340,13 +7344,12 @@ function nestedObjectFields(typeDef) {
|
|
|
7340
7344
|
}
|
|
7341
7345
|
function compileObjectFields(shapeFields) {
|
|
7342
7346
|
return Object.entries(shapeFields).map(([fieldSpec, rawTypeDef]) => {
|
|
7343
|
-
const
|
|
7344
|
-
const fieldName = isOptionalByKey ? fieldSpec.slice(0, -1) : fieldSpec;
|
|
7347
|
+
const fieldName = fieldSpec.endsWith("?") ? fieldSpec.slice(0, -1) : fieldSpec;
|
|
7345
7348
|
const normalized = normalizeOptionalTypeSpec(rawTypeDef);
|
|
7346
7349
|
return {
|
|
7347
7350
|
fieldName,
|
|
7348
7351
|
displayName: escapeFieldNameForDisplay(fieldName),
|
|
7349
|
-
isOptional:
|
|
7352
|
+
isOptional: isFieldOptional(fieldSpec, rawTypeDef),
|
|
7350
7353
|
validate: compileTypeValidator(normalized.spec)
|
|
7351
7354
|
};
|
|
7352
7355
|
});
|
|
@@ -9338,7 +9341,7 @@ function validateWarmHubClientOptions(options) {
|
|
|
9338
9341
|
throw new TypeError(`Unknown WarmHubClient option "${key}"${hint}`);
|
|
9339
9342
|
}
|
|
9340
9343
|
}
|
|
9341
|
-
var SDK_VERSION = "0.
|
|
9344
|
+
var SDK_VERSION = "0.64.0" ;
|
|
9342
9345
|
var DEFAULT_API_URL = "https://api.warmhub.ai";
|
|
9343
9346
|
var UNBATCHED_TRPC_PATHS = /* @__PURE__ */ new Set([
|
|
9344
9347
|
"repo.shapeInstanceCounts",
|
|
@@ -12610,5 +12613,5 @@ re2js/build/index.js:
|
|
|
12610
12613
|
*/
|
|
12611
12614
|
|
|
12612
12615
|
export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT2 as MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
|
|
12613
|
-
//# sourceMappingURL=chunk-
|
|
12614
|
-
//# sourceMappingURL=chunk-
|
|
12616
|
+
//# sourceMappingURL=chunk-CJWKJDVX.js.map
|
|
12617
|
+
//# sourceMappingURL=chunk-CJWKJDVX.js.map
|