@warmhub/sdk-ts 0.69.0 → 0.70.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.
@@ -3,7 +3,13 @@ import { TRPCClientError, createTRPCProxyClient, splitLink, httpBatchLink, httpL
3
3
  // src/index.ts
4
4
 
5
5
  // ../rules/src/builtin-shapes.ts
6
- var BUILTIN_SHAPE_NAMES = ["Pair", "Set", "List"];
6
+ var BUILTIN_SHAPE_NAMES = [
7
+ "Arc",
8
+ "Bond",
9
+ "Pair",
10
+ "Set",
11
+ "List"
12
+ ];
7
13
  var RETIRED_COLLECTION_SHAPE_NAMES = ["Triple"];
8
14
  var RESERVED_COLLECTION_SHAPE_NAMES = [
9
15
  ...BUILTIN_SHAPE_NAMES,
@@ -395,7 +401,9 @@ function preflightOpDiagnostics(op, operationIndex) {
395
401
  function builtinShapeGuard(op, operationIndex) {
396
402
  const errors = [];
397
403
  const name = op.name;
398
- if (name && isRetiredCollectionShape(name)) {
404
+ const isShapeRename = op.operation === "rename" && (op.kind === "shape" || op.name !== void 0 && !splitLocalPath(op.name));
405
+ const reservedSourcePassThrough = isShapeRename && name !== void 0 && isReservedCollectionShape(name) && op.newName !== void 0 && !isReservedCollectionShape(op.newName) && !isBuiltinShape(op.newName);
406
+ if (name && isRetiredCollectionShape(name) && !reservedSourcePassThrough) {
399
407
  errors.push({
400
408
  code: "RESERVED_NAME",
401
409
  operationIndex,
@@ -409,8 +417,7 @@ function builtinShapeGuard(op, operationIndex) {
409
417
  message: `Shape "${op.newName}" is a retired collection shape and cannot be written manually`
410
418
  });
411
419
  } else {
412
- const isShapeRename = op.operation === "rename" && (op.kind === "shape" || op.name !== void 0 && !splitLocalPath(op.name));
413
- const builtinShapeName = name && isBuiltinShape(name) ? name : isShapeRename && op.newName && isBuiltinShape(op.newName) ? op.newName : void 0;
420
+ const builtinShapeName = name && isBuiltinShape(name) && !reservedSourcePassThrough ? name : isShapeRename && op.newName && isBuiltinShape(op.newName) ? op.newName : void 0;
414
421
  if (builtinShapeName && (isShapeRename || op.operation !== "retract" && op.kind === "shape")) {
415
422
  const action = op.operation === "add" ? "created" : op.operation === "rename" ? "renamed" : "revised";
416
423
  errors.push({
@@ -9232,7 +9239,7 @@ function validateWarmHubClientOptions(options) {
9232
9239
  throw new TypeError(`Unknown WarmHubClient option "${key}"${hint}`);
9233
9240
  }
9234
9241
  }
9235
- var SDK_VERSION = "0.69.0" ;
9242
+ var SDK_VERSION = "0.70.0" ;
9236
9243
  var DEFAULT_API_URL = "https://api.warmhub.ai";
9237
9244
  var UNBATCHED_TRPC_PATHS = /* @__PURE__ */ new Set([
9238
9245
  "repo.shapeInstanceCounts",
@@ -12767,5 +12774,5 @@ re2js/build/index.js:
12767
12774
  */
12768
12775
 
12769
12776
  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 };
12770
- //# sourceMappingURL=chunk-QI7ELATB.js.map
12771
- //# sourceMappingURL=chunk-QI7ELATB.js.map
12777
+ //# sourceMappingURL=chunk-HZU73U4G.js.map
12778
+ //# sourceMappingURL=chunk-HZU73U4G.js.map