@highstate/designer 0.4.4 → 0.4.6

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.
Files changed (49) hide show
  1. package/.output/nitro.json +2 -2
  2. package/.output/public/_nuxt/{DNF_Kfc9.js → CiOkjSfX.js} +1 -1
  3. package/.output/public/_nuxt/D01t-DsO.js +244 -0
  4. package/.output/public/_nuxt/{COXQCz2I.js → DoGffnu_.js} +1 -1
  5. package/.output/public/_nuxt/{B-YqONwZ.js → DtaR4eeX.js} +1 -1
  6. package/.output/public/_nuxt/builds/latest.json +1 -1
  7. package/.output/public/_nuxt/builds/meta/c96427f3-ab77-406f-bb94-426a783445eb.json +1 -0
  8. package/.output/public/_nuxt/entry.BrXvcFAN.css +5 -0
  9. package/.output/public/_nuxt/materialdesignicons-webfont.B6OSyW2I.woff2 +0 -0
  10. package/.output/public/_nuxt/materialdesignicons-webfont.BpRar1d5.ttf +0 -0
  11. package/.output/public/_nuxt/materialdesignicons-webfont.Bvl3VxMs.woff +0 -0
  12. package/.output/public/_nuxt/materialdesignicons-webfont.TEmAk13K.eot +0 -0
  13. package/.output/public/libavoid.wasm +0 -0
  14. package/.output/server/index.mjs +8395 -8137
  15. package/.output/server/index.mjs.map +1 -1
  16. package/.output/server/node_modules/@babel/parser/lib/index.js +71 -40
  17. package/.output/server/node_modules/@babel/parser/package.json +2 -2
  18. package/.output/server/node_modules/@trpc/server/dist/index.mjs +3 -2
  19. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/createProxy.mjs +1 -1
  20. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/error/TRPCError.mjs +1 -0
  21. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/abortError.mjs +10 -0
  22. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/contentType.mjs +18 -13
  23. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/resolveResponse.mjs +6 -5
  24. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/initTRPC.mjs +1 -1
  25. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/parser.mjs +12 -1
  26. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/procedureBuilder.mjs +2 -1
  27. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/router.mjs +112 -10
  28. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.mjs +50 -44
  29. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/sse.mjs +12 -2
  30. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/utils/asyncIterable.mjs +5 -7
  31. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/utils/disposable.mjs +10 -8
  32. package/.output/server/node_modules/@trpc/server/dist/vendor/standard-schema-v1/error.mjs +26 -0
  33. package/.output/server/node_modules/@trpc/server/package.json +10 -10
  34. package/.output/server/node_modules/@unhead/dom/package.json +3 -3
  35. package/.output/server/node_modules/@unhead/shared/package.json +2 -2
  36. package/.output/server/node_modules/@unhead/ssr/package.json +3 -3
  37. package/.output/server/node_modules/node-mock-http/dist/_polyfill/buffer/node.mjs +1 -0
  38. package/.output/server/node_modules/node-mock-http/dist/_polyfill/events/node.mjs +1 -0
  39. package/.output/server/node_modules/node-mock-http/dist/index.mjs +1 -0
  40. package/.output/server/node_modules/node-mock-http/package.json +63 -0
  41. package/.output/server/node_modules/unhead/package.json +4 -4
  42. package/.output/server/node_modules/zod/lib/index.mjs +33 -10
  43. package/.output/server/node_modules/zod/package.json +1 -1
  44. package/.output/server/package.json +1 -1
  45. package/package.json +17 -5
  46. package/.output/public/_nuxt/DYyPqv2f.js +0 -164
  47. package/.output/public/_nuxt/builds/meta/c81be379-d98f-426f-8eac-c45f3b97a743.json +0 -1
  48. package/.output/public/_nuxt/entry.BSAdMt6G.css +0 -5
  49. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/isAbortError.mjs +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../node_modules/uncrypto/dist/crypto.node.mjs","../../../node_modules/crossws/dist/shared/crossws.DTY7a69w.mjs","../../../node_modules/crossws/dist/shared/crossws.B4sHId41.mjs","../../../node_modules/crossws/dist/shared/crossws.By9qWDAI.mjs","../../../node_modules/crossws/dist/shared/crossws.YgHWLi0G.mjs","../../../node_modules/crossws/dist/adapters/node.mjs","../../../node_modules/destr/dist/index.mjs","../../../node_modules/ufo/dist/index.mjs","../../../node_modules/ohash/dist/index.mjs","../../../node_modules/radix3/dist/index.mjs","../../../node_modules/defu/dist/defu.mjs","../../../node_modules/unenv/runtime/_internal/utils.mjs","../../../node_modules/unenv/runtime/node/events/_events.mjs","../../../node_modules/unenv/runtime/node/events/index.mjs","../../../node_modules/unenv/runtime/node/stream/readable.mjs","../../../node_modules/unenv/runtime/node/stream/writable.mjs","../../../node_modules/unenv/runtime/node/stream/duplex.mjs","../../../node_modules/unenv/runtime/node/net/socket.mjs","../../../node_modules/unenv/runtime/node/http/_request.mjs","../../../node_modules/unenv/runtime/node/http/_response.mjs","../../../node_modules/h3/dist/index.mjs","../../../node_modules/hookable/dist/index.mjs","../../../node_modules/node-fetch-native/dist/native.mjs","../../../node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs","../../../node_modules/ofetch/dist/node.mjs","../../../node_modules/unenv/runtime/fetch/call.mjs","../../../node_modules/unenv/runtime/fetch/index.mjs","../../../node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../node_modules/nuxt/dist/core/runtime/nitro/error.js","../../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs","../../../node_modules/nitropack/dist/runtime/internal/static.mjs","../../../node_modules/unstorage/dist/shared/unstorage.BqzpVTXx.mjs","../../../node_modules/unstorage/dist/index.mjs","../../../node_modules/unstorage/drivers/utils/index.mjs","../../../node_modules/unstorage/drivers/utils/node-fs.mjs","../../../node_modules/unstorage/drivers/fs-lite.mjs","../../../node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../node_modules/klona/dist/index.mjs","../../../node_modules/scule/dist/index.mjs","../../../node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../node_modules/nitropack/dist/runtime/internal/config.mjs","../../../node_modules/unctx/dist/index.mjs","../../../node_modules/nitropack/dist/runtime/internal/context.mjs","../../../node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../node_modules/nitropack/dist/runtime/internal/app.mjs","../../../node_modules/nitropack/dist/runtime/internal/renderer.mjs","../../../node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../node_modules/nitropack/dist/presets/node/runtime/node-server.mjs","../../../node_modules/nuxt/dist/core/runtime/nitro/error-500.js","../../../node_modules/trpc-nuxt/dist/index.js","../../server/trpc.ts","../../server/routers/state.ts","../../server/routers/secret.ts","../../server/routers/project.ts","../../server/routers/library.ts","../../server/routers/workspace.ts","../../server/routers/terminal.ts","../../server/routers/operation.ts","../../server/routers/logs.ts","../../server/router.ts","../../server/api/[trpc].ts","../../server/routes/terminal/[id].ts","../../../node_modules/@unhead/vue/dist/shared/vue.ziyDaVMR.mjs","../../../node_modules/nuxt/dist/core/runtime/nitro/paths.js","../../../node_modules/nuxt/dist/core/runtime/nitro/renderer.js","../../.nuxt/dist/server/client.manifest.mjs"],"sourcesContent":null,"names":["isPlainObject","Writable","tokenChars","extension","EventEmitter","http","createHash","URL","PerMessageDeflate","GUID","kWebSocket","parse","socketOnError","abortHandshake","WebSocket","require$$0","getQuery","createRouter","_EventEmitter","createError","mergeHeaders","nullBodyResponses","createFetch","nodeFetch","https","Headers","Headers$1","AbortController","AbortController$1","normalizeKey","defineDriver","DRIVER_NAME","dirname","fsPromises","resolve","fsp","_inlineAppConfig","createRadixRouter","nitroApp","createLocalFetch","gracefulShutdown","HttpsServer","HttpServer","wsAdapter","template","stringify"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,64,65,66]}
1
+ {"version":3,"file":"index.mjs","sources":["../../../node_modules/uncrypto/dist/crypto.node.mjs","../../../node_modules/crossws/dist/shared/crossws.BS81iGZK.mjs","../../../node_modules/crossws/dist/shared/crossws.D9ehKjSh.mjs","../../../node_modules/crossws/dist/shared/crossws.By9qWDAI.mjs","../../../node_modules/crossws/dist/shared/crossws.DelSCW9g.mjs","../../../node_modules/crossws/dist/adapters/node.mjs","../../../node_modules/destr/dist/index.mjs","../../../node_modules/ufo/dist/index.mjs","../../../node_modules/radix3/dist/index.mjs","../../../node_modules/defu/dist/defu.mjs","../../../node_modules/h3/dist/index.mjs","../../../node_modules/hookable/dist/index.mjs","../../../node_modules/node-fetch-native/dist/native.mjs","../../../node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs","../../../node_modules/ofetch/dist/node.mjs","../../../node_modules/unenv/runtime/_internal/utils.mjs","../../../node_modules/unenv/runtime/node/events/_events.mjs","../../../node_modules/unenv/runtime/node/events/index.mjs","../../../node_modules/unenv/runtime/node/stream/readable.mjs","../../../node_modules/unenv/runtime/node/stream/writable.mjs","../../../node_modules/unenv/runtime/node/stream/duplex.mjs","../../../node_modules/unenv/runtime/node/net/socket.mjs","../../../node_modules/unenv/runtime/node/http/_request.mjs","../../../node_modules/unenv/runtime/node/http/_response.mjs","../../../node_modules/unenv/runtime/fetch/call.mjs","../../../node_modules/unenv/runtime/fetch/index.mjs","../../../node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../node_modules/nuxt/dist/core/runtime/nitro/error.js","../../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs","../../../node_modules/nitropack/dist/runtime/internal/static.mjs","../../../node_modules/ohash/dist/index.mjs","../../../node_modules/unstorage/dist/shared/unstorage.mNKHTF5Y.mjs","../../../node_modules/unstorage/dist/index.mjs","../../../node_modules/unstorage/drivers/utils/index.mjs","../../../node_modules/unstorage/drivers/utils/node-fs.mjs","../../../node_modules/unstorage/drivers/fs-lite.mjs","../../../node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../node_modules/klona/dist/index.mjs","../../../node_modules/scule/dist/index.mjs","../../../node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../node_modules/nitropack/dist/runtime/internal/config.mjs","../../../node_modules/unctx/dist/index.mjs","../../../node_modules/nitropack/dist/runtime/internal/context.mjs","../../../node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../node_modules/nitropack/dist/runtime/internal/app.mjs","../../../node_modules/nitropack/dist/runtime/internal/renderer.mjs","../../../node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../node_modules/nitropack/dist/presets/node/runtime/node-server.mjs","../../../node_modules/nuxt/dist/core/runtime/nitro/error-500.js","../../../node_modules/trpc-nuxt/dist/index.js","../../server/trpc.ts","../../server/routers/state.ts","../../server/routers/secret.ts","../../server/routers/project.ts","../../server/routers/library.ts","../../server/routers/workspace.ts","../../server/routers/terminal.ts","../../server/routers/operation.ts","../../server/routers/logs.ts","../../server/router.ts","../../server/api/[trpc].ts","../../../node_modules/@unhead/vue/dist/shared/vue.ziyDaVMR.mjs","../../../node_modules/nuxt/dist/core/runtime/nitro/paths.js","../../../node_modules/nuxt/dist/core/runtime/nitro/renderer.js","../../.nuxt/dist/server/client.manifest.mjs"],"sourcesContent":null,"names":["isPlainObject","getQuery","createRouter","createError","mergeHeaders","nullBodyResponses","createFetch","nodeFetch","Headers","Headers$1","AbortController$1","EventEmitter","_EventEmitter","normalizeKey","defineDriver","DRIVER_NAME","dirname","fsPromises","resolve","fsp","_inlineAppConfig","createRadixRouter","nitroApp","createLocalFetch","gracefulShutdown","HttpsServer","HttpServer","wsAdapter","template","stringify"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,63,64,65]}
@@ -307,7 +307,7 @@ var StrictModeErrors = {
307
307
  StrictWith: "'with' in strict mode."
308
308
  };
309
309
  const UnparenthesizedPipeBodyDescriptions = new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]);
310
- var PipelineOperatorErrors = {
310
+ var PipelineOperatorErrors = Object.assign({
311
311
  PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",
312
312
  PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',
313
313
  PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",
@@ -319,14 +319,15 @@ var PipelineOperatorErrors = {
319
319
  type
320
320
  }) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({
321
321
  type
322
- })}; please wrap it in parentheses.`,
322
+ })}; please wrap it in parentheses.`
323
+ }, {
323
324
  PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
324
325
  PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
325
326
  PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
326
327
  PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
327
328
  PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
328
329
  PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'
329
- };
330
+ });
330
331
  const _excluded = ["message"];
331
332
  function defineHidden(obj, key, value) {
332
333
  Object.defineProperty(obj, key, {
@@ -632,8 +633,7 @@ var estree = superClass => class ESTreeParserMixin extends superClass {
632
633
  if (typeParameters) {
633
634
  delete node.typeParameters;
634
635
  funcNode.typeParameters = typeParameters;
635
- funcNode.start = typeParameters.start;
636
- funcNode.loc.start = typeParameters.loc.start;
636
+ this.resetStartLocationFromNode(funcNode, typeParameters);
637
637
  }
638
638
  if (type === "ClassPrivateMethod") {
639
639
  node.computed = false;
@@ -7849,7 +7849,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
7849
7849
  }
7850
7850
  this.expect(11);
7851
7851
  if (this.eat(16)) {
7852
- node.qualifier = this.tsParseEntityName();
7852
+ node.qualifier = this.tsParseEntityName(1 | 2);
7853
7853
  }
7854
7854
  if (this.match(47)) {
7855
7855
  {
@@ -7858,19 +7858,30 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
7858
7858
  }
7859
7859
  return this.finishNode(node, "TSImportType");
7860
7860
  }
7861
- tsParseEntityName(allowReservedWords = true) {
7862
- let entity = this.parseIdentifier(allowReservedWords);
7861
+ tsParseEntityName(flags) {
7862
+ let entity;
7863
+ if (flags & 1 && this.match(78)) {
7864
+ if (flags & 2) {
7865
+ entity = this.parseIdentifier(true);
7866
+ } else {
7867
+ const node = this.startNode();
7868
+ this.next();
7869
+ entity = this.finishNode(node, "ThisExpression");
7870
+ }
7871
+ } else {
7872
+ entity = this.parseIdentifier(!!(flags & 1));
7873
+ }
7863
7874
  while (this.eat(16)) {
7864
7875
  const node = this.startNodeAtNode(entity);
7865
7876
  node.left = entity;
7866
- node.right = this.parseIdentifier(allowReservedWords);
7877
+ node.right = this.parseIdentifier(!!(flags & 1));
7867
7878
  entity = this.finishNode(node, "TSQualifiedName");
7868
7879
  }
7869
7880
  return entity;
7870
7881
  }
7871
7882
  tsParseTypeReference() {
7872
7883
  const node = this.startNode();
7873
- node.typeName = this.tsParseEntityName();
7884
+ node.typeName = this.tsParseEntityName(1);
7874
7885
  if (!this.hasPrecedingLineBreak() && this.match(47)) {
7875
7886
  {
7876
7887
  node.typeParameters = this.tsParseTypeArguments();
@@ -7897,7 +7908,9 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
7897
7908
  if (this.match(83)) {
7898
7909
  node.exprName = this.tsParseImportType();
7899
7910
  } else {
7900
- node.exprName = this.tsParseEntityName();
7911
+ {
7912
+ node.exprName = this.tsParseEntityName(1 | 2);
7913
+ }
7901
7914
  }
7902
7915
  if (!this.hasPrecedingLineBreak() && this.match(47)) {
7903
7916
  {
@@ -8157,10 +8170,11 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8157
8170
  return this.finishNode(node, "TSTupleType");
8158
8171
  }
8159
8172
  tsParseTupleElementType() {
8173
+ const restStartLoc = this.state.startLoc;
8174
+ const rest = this.eat(21);
8160
8175
  const {
8161
8176
  startLoc
8162
8177
  } = this.state;
8163
- const rest = this.eat(21);
8164
8178
  let labeled;
8165
8179
  let label;
8166
8180
  let optional;
@@ -8175,7 +8189,6 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8175
8189
  type = this.tsParseType();
8176
8190
  } else if (chAfterWord === 63) {
8177
8191
  optional = true;
8178
- const startLoc = this.state.startLoc;
8179
8192
  const wordName = this.state.value;
8180
8193
  const typeOrLabel = this.tsParseNonArrayType();
8181
8194
  if (this.lookaheadCharCode() === 58) {
@@ -8197,7 +8210,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8197
8210
  if (labeled) {
8198
8211
  let labeledNode;
8199
8212
  if (label) {
8200
- labeledNode = this.startNodeAtNode(label);
8213
+ labeledNode = this.startNodeAt(startLoc);
8201
8214
  labeledNode.optional = optional;
8202
8215
  labeledNode.label = label;
8203
8216
  labeledNode.elementType = type;
@@ -8206,7 +8219,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8206
8219
  this.raise(TSErrors.TupleOptionalAfterType, this.state.lastTokStartLoc);
8207
8220
  }
8208
8221
  } else {
8209
- labeledNode = this.startNodeAtNode(type);
8222
+ labeledNode = this.startNodeAt(startLoc);
8210
8223
  labeledNode.optional = optional;
8211
8224
  this.raise(TSErrors.InvalidTupleMemberLabel, type);
8212
8225
  labeledNode.label = type;
@@ -8214,12 +8227,12 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8214
8227
  }
8215
8228
  type = this.finishNode(labeledNode, "TSNamedTupleMember");
8216
8229
  } else if (optional) {
8217
- const optionalTypeNode = this.startNodeAtNode(type);
8230
+ const optionalTypeNode = this.startNodeAt(startLoc);
8218
8231
  optionalTypeNode.typeAnnotation = type;
8219
8232
  type = this.finishNode(optionalTypeNode, "TSOptionalType");
8220
8233
  }
8221
8234
  if (rest) {
8222
- const restNode = this.startNodeAt(startLoc);
8235
+ const restNode = this.startNodeAt(restStartLoc);
8223
8236
  restNode.typeAnnotation = type;
8224
8237
  type = this.finishNode(restNode, "TSRestType");
8225
8238
  }
@@ -8258,9 +8271,11 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8258
8271
  return this.finishNode(node, "TSLiteralType");
8259
8272
  }
8260
8273
  tsParseTemplateLiteralType() {
8261
- const node = this.startNode();
8262
- node.literal = super.parseTemplate(false);
8263
- return this.finishNode(node, "TSLiteralType");
8274
+ {
8275
+ const node = this.startNode();
8276
+ node.literal = super.parseTemplate(false);
8277
+ return this.finishNode(node, "TSLiteralType");
8278
+ }
8264
8279
  }
8265
8280
  parseTemplateSubstitution() {
8266
8281
  if (this.state.inType) return this.tsParseType();
@@ -8327,15 +8342,18 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8327
8342
  this.unexpected();
8328
8343
  }
8329
8344
  tsParseArrayTypeOrHigher() {
8345
+ const {
8346
+ startLoc
8347
+ } = this.state;
8330
8348
  let type = this.tsParseNonArrayType();
8331
8349
  while (!this.hasPrecedingLineBreak() && this.eat(0)) {
8332
8350
  if (this.match(3)) {
8333
- const node = this.startNodeAtNode(type);
8351
+ const node = this.startNodeAt(startLoc);
8334
8352
  node.elementType = type;
8335
8353
  this.expect(3);
8336
8354
  type = this.finishNode(node, "TSArrayType");
8337
8355
  } else {
8338
- const node = this.startNodeAtNode(type);
8356
+ const node = this.startNodeAt(startLoc);
8339
8357
  node.objectType = type;
8340
8358
  node.indexType = this.tsParseType();
8341
8359
  this.expect(3);
@@ -8588,8 +8606,8 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8588
8606
  const originalStartLoc = this.state.startLoc;
8589
8607
  const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => {
8590
8608
  const node = this.startNode();
8591
- node.expression = this.tsParseEntityName();
8592
8609
  {
8610
+ node.expression = this.tsParseEntityName(1 | 2);
8593
8611
  if (this.match(47)) {
8594
8612
  node.typeParameters = this.tsParseTypeArguments();
8595
8613
  }
@@ -8775,7 +8793,9 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8775
8793
  return this.finishNode(node, "TSModuleDeclaration");
8776
8794
  }
8777
8795
  tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) {
8778
- node.isExport = isExport || false;
8796
+ {
8797
+ node.isExport = isExport || false;
8798
+ }
8779
8799
  node.id = maybeDefaultIdentifier || this.parseIdentifier();
8780
8800
  this.checkIdentifier(node.id, 4096);
8781
8801
  this.expect(29);
@@ -8791,7 +8811,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
8791
8811
  return this.isContextual(119) && this.lookaheadCharCode() === 40;
8792
8812
  }
8793
8813
  tsParseModuleReference() {
8794
- return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
8814
+ return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(0);
8795
8815
  }
8796
8816
  tsParseExternalModuleReference() {
8797
8817
  const node = this.startNode();
@@ -9243,15 +9263,18 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
9243
9263
  }
9244
9264
  parseExport(node, decorators) {
9245
9265
  if (this.match(83)) {
9246
- this.next();
9247
9266
  const nodeImportEquals = node;
9267
+ this.next();
9248
9268
  let maybeDefaultIdentifier = null;
9249
9269
  if (this.isContextual(130) && this.isPotentialImportPhase(false)) {
9250
9270
  maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, false);
9251
9271
  } else {
9252
9272
  nodeImportEquals.importKind = "value";
9253
9273
  }
9254
- return this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true);
9274
+ const declaration = this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true);
9275
+ {
9276
+ return declaration;
9277
+ }
9255
9278
  } else if (this.eat(29)) {
9256
9279
  const assign = node;
9257
9280
  assign.expression = super.parseExpression();
@@ -9451,7 +9474,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass {
9451
9474
  if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) {
9452
9475
  node.exportKind = "type";
9453
9476
  }
9454
- if (isDeclare) {
9477
+ if (isDeclare && declaration.type !== "TSImportEqualsDeclaration") {
9455
9478
  this.resetStartLocation(declaration, startLoc);
9456
9479
  declaration.declare = true;
9457
9480
  }
@@ -10618,18 +10641,19 @@ class ExpressionParser extends LValParser {
10618
10641
  return this.withTopicBindingContext(() => {
10619
10642
  return this.parseHackPipeBody();
10620
10643
  });
10621
- case "smart":
10622
- return this.withTopicBindingContext(() => {
10623
- if (this.prodParam.hasYield && this.isContextual(108)) {
10624
- throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc);
10625
- }
10626
- return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc);
10627
- });
10628
10644
  case "fsharp":
10629
10645
  return this.withSoloAwaitPermittingContext(() => {
10630
10646
  return this.parseFSharpPipelineBody(prec);
10631
10647
  });
10632
10648
  }
10649
+ if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
10650
+ return this.withTopicBindingContext(() => {
10651
+ if (this.prodParam.hasYield && this.isContextual(108)) {
10652
+ throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc);
10653
+ }
10654
+ return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc);
10655
+ });
10656
+ }
10633
10657
  default:
10634
10658
  return this.parseExprOpBaseRightExpr(op, prec);
10635
10659
  }
@@ -11125,12 +11149,19 @@ class ExpressionParser extends LValParser {
11125
11149
  }
11126
11150
  finishTopicReference(node, startLoc, pipeProposal, tokenType) {
11127
11151
  if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) {
11128
- const nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference";
11129
- if (!this.topicReferenceIsAllowedInCurrentContext()) {
11130
- this.raise(pipeProposal === "smart" ? Errors.PrimaryTopicNotAllowed : Errors.PipeTopicUnbound, startLoc);
11152
+ if (pipeProposal === "hack") {
11153
+ if (!this.topicReferenceIsAllowedInCurrentContext()) {
11154
+ this.raise(Errors.PipeTopicUnbound, startLoc);
11155
+ }
11156
+ this.registerTopicReference();
11157
+ return this.finishNode(node, "TopicReference");
11158
+ } else {
11159
+ if (!this.topicReferenceIsAllowedInCurrentContext()) {
11160
+ this.raise(Errors.PrimaryTopicNotAllowed, startLoc);
11161
+ }
11162
+ this.registerTopicReference();
11163
+ return this.finishNode(node, "PipelinePrimaryTopicReference");
11131
11164
  }
11132
- this.registerTopicReference();
11133
- return this.finishNode(node, nodeType);
11134
11165
  } else {
11135
11166
  throw this.raise(Errors.PipeTopicUnconfiguredToken, startLoc, {
11136
11167
  token: tokenLabelName(tokenType)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/parser",
3
- "version": "7.26.5",
3
+ "version": "7.26.9",
4
4
  "description": "A JavaScript parser",
5
5
  "author": "The Babel Team (https://babel.dev/team)",
6
6
  "homepage": "https://babel.dev/docs/en/next/babel-parser",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "# dependencies": "This package doesn't actually have runtime dependencies. @babel/types is only needed for type definitions.",
37
37
  "dependencies": {
38
- "@babel/types": "^7.26.5"
38
+ "@babel/types": "^7.26.9"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/code-frame": "^7.26.2",
@@ -1,11 +1,12 @@
1
- export { createFlatProxy as createTRPCFlatProxy } from './unstable-core-do-not-import/createProxy.mjs';
1
+ export { createFlatProxy as createTRPCFlatProxy, createRecursiveProxy as createTRPCRecursiveProxy } from './unstable-core-do-not-import/createProxy.mjs';
2
2
  export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
3
3
  export { TRPCError, getTRPCErrorFromUnknown } from './unstable-core-do-not-import/error/TRPCError.mjs';
4
+ export { callProcedure as callTRPCProcedure, lazy as experimental_lazy } from './unstable-core-do-not-import/router.mjs';
4
5
  import './vendor/unpromise/unpromise.mjs';
5
6
  import './unstable-core-do-not-import/stream/utils/disposable.mjs';
6
7
  export { isTrackedEnvelope, sse, tracked } from './unstable-core-do-not-import/stream/tracked.mjs';
7
8
  export { transformTRPCResponse } from './unstable-core-do-not-import/transformer.mjs';
8
9
  export { initTRPC } from './unstable-core-do-not-import/initTRPC.mjs';
9
10
  export { experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware } from './unstable-core-do-not-import/middleware.mjs';
11
+ export { StandardSchemaV1Error } from './vendor/standard-schema-v1/error.mjs';
10
12
  import './unstable-core-do-not-import/rootConfig.mjs';
11
- export { callProcedure, callProcedure as callTRPCProcedure } from './unstable-core-do-not-import/router.mjs';
@@ -60,7 +60,7 @@ function createInnerProxy(callback, path, memo) {
60
60
  */ const createFlatProxy = (callback)=>{
61
61
  return new Proxy(noop, {
62
62
  get (_obj, name) {
63
- if (typeof name !== 'string' || name === 'then') {
63
+ if (name === 'then') {
64
64
  // special case for if the proxy is accidentally treated
65
65
  // like a PromiseLike (like in `Promise.resolve(proxy)`)
66
66
  return undefined;
@@ -25,6 +25,7 @@ function getCauseFromUnknown(cause) {
25
25
  }
26
26
  // Primitive types just get wrapped in an error
27
27
  if (type !== 'object') {
28
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
28
29
  return new Error(String(cause));
29
30
  }
30
31
  // If it's an object, we'll create a synthetic error
@@ -0,0 +1,10 @@
1
+ import { isObject } from '../utils.mjs';
2
+
3
+ function isAbortError(error) {
4
+ return isObject(error) && error['name'] === 'AbortError';
5
+ }
6
+ function throwAbortError(message = 'AbortError') {
7
+ throw new DOMException(message, 'AbortError');
8
+ }
9
+
10
+ export { isAbortError, throwAbortError };
@@ -1,4 +1,5 @@
1
1
  import { TRPCError } from '../error/TRPCError.mjs';
2
+ import { getProcedureAtPath } from '../router.mjs';
2
3
  import { isObject, unsetMarker } from '../utils.mjs';
3
4
  import { parseConnectionParamsFromString } from './parseConnectionParams.mjs';
4
5
 
@@ -43,7 +44,7 @@ const jsonContentTypeHandler = {
43
44
  isMatch (req) {
44
45
  return !!req.headers.get('content-type')?.startsWith('application/json');
45
46
  },
46
- parse (opts) {
47
+ async parse (opts) {
47
48
  const { req } = opts;
48
49
  const isBatchCall = opts.searchParams.get('batch') === '1';
49
50
  const paths = isBatchCall ? opts.path.split(',') : [
@@ -82,8 +83,8 @@ const jsonContentTypeHandler = {
82
83
  }
83
84
  return acc;
84
85
  });
85
- const calls = paths.map((path, index)=>{
86
- const procedure = opts.router._def.procedures[path] ?? null;
86
+ const calls = await Promise.all(paths.map(async (path, index)=>{
87
+ const procedure = await getProcedureAtPath(opts.router, path);
87
88
  return {
88
89
  path,
89
90
  procedure,
@@ -111,7 +112,7 @@ const jsonContentTypeHandler = {
111
112
  return getInputs.result()?.[index];
112
113
  }
113
114
  };
114
- });
115
+ }));
115
116
  const types = new Set(calls.map((call)=>call.procedure?._def.type).filter(Boolean));
116
117
  /* istanbul ignore if -- @preserve */ if (types.size > 1) {
117
118
  throw new TRPCError({
@@ -127,7 +128,8 @@ const jsonContentTypeHandler = {
127
128
  calls,
128
129
  type,
129
130
  connectionParams: connectionParamsStr === null ? null : parseConnectionParamsFromString(connectionParamsStr),
130
- signal: req.signal
131
+ signal: req.signal,
132
+ url: opts.url
131
133
  };
132
134
  return info;
133
135
  }
@@ -136,7 +138,7 @@ const formDataContentTypeHandler = {
136
138
  isMatch (req) {
137
139
  return !!req.headers.get('content-type')?.startsWith('multipart/form-data');
138
140
  },
139
- parse (opts) {
141
+ async parse (opts) {
140
142
  const { req } = opts;
141
143
  if (req.method !== 'POST') {
142
144
  throw new TRPCError({
@@ -148,6 +150,7 @@ const formDataContentTypeHandler = {
148
150
  const fd = await req.formData();
149
151
  return fd;
150
152
  });
153
+ const procedure = await getProcedureAtPath(opts.router, opts.path);
151
154
  return {
152
155
  accept: null,
153
156
  calls: [
@@ -155,13 +158,14 @@ const formDataContentTypeHandler = {
155
158
  path: opts.path,
156
159
  getRawInput: getInputs.read,
157
160
  result: getInputs.result,
158
- procedure: opts.router._def.procedures[opts.path] ?? null
161
+ procedure
159
162
  }
160
163
  ],
161
164
  isBatchCall: false,
162
165
  type: 'mutation',
163
166
  connectionParams: null,
164
- signal: req.signal
167
+ signal: req.signal,
168
+ url: opts.url
165
169
  };
166
170
  }
167
171
  };
@@ -169,7 +173,7 @@ const octetStreamContentTypeHandler = {
169
173
  isMatch (req) {
170
174
  return !!req.headers.get('content-type')?.startsWith('application/octet-stream');
171
175
  },
172
- parse (opts) {
176
+ async parse (opts) {
173
177
  const { req } = opts;
174
178
  if (req.method !== 'POST') {
175
179
  throw new TRPCError({
@@ -186,14 +190,15 @@ const octetStreamContentTypeHandler = {
186
190
  path: opts.path,
187
191
  getRawInput: getInputs.read,
188
192
  result: getInputs.result,
189
- procedure: opts.router._def.procedures[opts.path] ?? null
193
+ procedure: await getProcedureAtPath(opts.router, opts.path)
190
194
  }
191
195
  ],
192
196
  isBatchCall: false,
193
197
  accept: null,
194
198
  type: 'mutation',
195
199
  connectionParams: null,
196
- signal: req.signal
200
+ signal: req.signal,
201
+ url: opts.url
197
202
  };
198
203
  }
199
204
  };
@@ -216,9 +221,9 @@ function getContentTypeHandler(req) {
216
221
  message: req.headers.has('content-type') ? `Unsupported content-type "${req.headers.get('content-type')}` : 'Missing content-type header'
217
222
  });
218
223
  }
219
- function getRequestInfo(opts) {
224
+ async function getRequestInfo(opts) {
220
225
  const handler = getContentTypeHandler(opts.req);
221
- return handler.parse(opts);
226
+ return await handler.parse(opts);
222
227
  }
223
228
 
224
229
  export { getRequestInfo };
@@ -140,16 +140,17 @@ async function resolveResponse(opts) {
140
140
  }
141
141
  const allowBatching = opts.allowBatching ?? opts.batching?.enabled ?? true;
142
142
  const allowMethodOverride = (opts.allowMethodOverride ?? false) && req.method === 'POST';
143
- const infoTuple = run(()=>{
143
+ const infoTuple = await run(async ()=>{
144
144
  try {
145
145
  return [
146
146
  undefined,
147
- getRequestInfo({
147
+ await getRequestInfo({
148
148
  req,
149
149
  path: decodeURIComponent(opts.path),
150
150
  router,
151
151
  searchParams: url.searchParams,
152
- headers: opts.req.headers
152
+ headers: opts.req.headers,
153
+ url
153
154
  })
154
155
  ];
155
156
  } catch (cause) {
@@ -200,7 +201,6 @@ async function resolveResponse(opts) {
200
201
  /**
201
202
  * @deprecated
202
203
  */ const isStreamCall = req.headers.get('trpc-accept') === 'application/jsonl';
203
- const experimentalIterablesAndDeferreds = config.iterablesAndDeferreds ?? true;
204
204
  const experimentalSSE = config.sse?.enabled ?? true;
205
205
  try {
206
206
  const [infoError, info] = infoTuple;
@@ -406,6 +406,7 @@ async function resolveResponse(opts) {
406
406
  untransformedJSON: null
407
407
  });
408
408
  const stream = jsonlStreamProducer({
409
+ ...config.jsonl,
409
410
  /**
410
411
  * Example structure for `maxDepth: 4`:
411
412
  * {
@@ -418,7 +419,7 @@ async function resolveResponse(opts) {
418
419
  * }
419
420
  * }
420
421
  * }
421
- */ maxDepth: experimentalIterablesAndDeferreds ? 4 : 3,
422
+ */ maxDepth: Infinity,
422
423
  data: rpcCalls.map(async (res)=>{
423
424
  const [error, result] = await res;
424
425
  const call = info.calls[0];
@@ -2,7 +2,7 @@ import { defaultFormatter } from './error/formatter.mjs';
2
2
  import { createMiddlewareFactory } from './middleware.mjs';
3
3
  import { createBuilder } from './procedureBuilder.mjs';
4
4
  import { isServerDefault } from './rootConfig.mjs';
5
- import { createRouterFactory, mergeRouters, createCallerFactory } from './router.mjs';
5
+ import { createCallerFactory, mergeRouters, createRouterFactory } from './router.mjs';
6
6
  import { getDataTransformer, defaultTransformer } from './transformer.mjs';
7
7
 
8
8
  class TRPCBuilder {
@@ -1,4 +1,5 @@
1
- // zod / typeschema
1
+ import { StandardSchemaV1Error } from '../vendor/standard-schema-v1/error.mjs';
2
+
2
3
  function getParseFn(procedureParser) {
3
4
  const parser = procedureParser;
4
5
  if (typeof parser === 'function' && typeof parser.assert === 'function') {
@@ -34,6 +35,16 @@ function getParseFn(procedureParser) {
34
35
  return value;
35
36
  };
36
37
  }
38
+ if ('~standard' in parser) {
39
+ // StandardSchemaEsque
40
+ return async (value)=>{
41
+ const result = await parser['~standard'].validate(value);
42
+ if (result.issues) {
43
+ throw new StandardSchemaV1Error(result.issues);
44
+ }
45
+ return result.value;
46
+ };
47
+ }
37
48
  throw new Error('Could not find a validator fn');
38
49
  }
39
50
 
@@ -1,5 +1,5 @@
1
1
  import { TRPCError, getTRPCErrorFromUnknown } from './error/TRPCError.mjs';
2
- import { createInputMiddleware, createOutputMiddleware, middlewareMarker } from './middleware.mjs';
2
+ import { createOutputMiddleware, createInputMiddleware, middlewareMarker } from './middleware.mjs';
3
3
  import { getParseFn } from './parser.mjs';
4
4
  import { mergeWithoutOverrides } from './utils.mjs';
5
5
 
@@ -187,6 +187,7 @@ function createProcedureCaller(_def) {
187
187
  return result.data;
188
188
  }
189
189
  procedure._def = _def;
190
+ procedure.procedure = true;
190
191
  // FIXME typecast shouldn't be needed - fixittt
191
192
  return procedure;
192
193
  }