@adviser/cement 0.3.2 → 0.3.4

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 (96) hide show
  1. package/{base-sys-abstraction-CR_Z-Ceg.d.ts → base-sys-abstraction-B-PcaG0B.d.ts} +1 -1
  2. package/{base-sys-abstraction-DWtPI7Kg.d.cts → base-sys-abstraction-CLlfCI2Q.d.cts} +1 -1
  3. package/cf/index.cjs +100 -273
  4. package/cf/index.cjs.map +1 -1
  5. package/cf/index.d.cts +3 -16
  6. package/cf/index.d.ts +3 -16
  7. package/cf/index.js +39 -6
  8. package/cf/index.js.map +1 -1
  9. package/{chunk-R2EEZNZN.js → chunk-5GJADB3C.js} +8 -6
  10. package/{chunk-R2EEZNZN.js.map → chunk-5GJADB3C.js.map} +1 -1
  11. package/chunk-MFC4AD5O.js +88 -0
  12. package/chunk-MFC4AD5O.js.map +1 -0
  13. package/{chunk-DZPKZQIT.js → chunk-OQ4NGEJR.js} +58 -502
  14. package/chunk-OQ4NGEJR.js.map +1 -0
  15. package/deno/index.cjs +86 -165
  16. package/deno/index.cjs.map +1 -1
  17. package/deno/index.d.cts +3 -23
  18. package/deno/index.d.ts +3 -23
  19. package/deno/index.js +174 -8
  20. package/deno/index.js.map +1 -1
  21. package/{index-BfZxTAe_.d.cts → index-CI2cJ0-W.d.cts} +1 -1
  22. package/{index-CfSl8Gmj.d.ts → index-ChpAZoUE.d.ts} +1 -1
  23. package/index.cjs +102 -265
  24. package/index.cjs.map +1 -1
  25. package/index.d.cts +5 -5
  26. package/index.d.ts +5 -5
  27. package/index.js +7 -6
  28. package/index.js.map +1 -1
  29. package/node/index.cjs +55 -134
  30. package/node/index.cjs.map +1 -1
  31. package/node/index.d.cts +3 -16
  32. package/node/index.d.ts +3 -16
  33. package/node/index.js +179 -8
  34. package/node/index.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/cf/cf-env-actions.ts +53 -0
  37. package/src/cf/cf-sys-abstraction.ts +1 -45
  38. package/src/deno/deno-env-actions.ts +57 -0
  39. package/src/deno/deno-sys-abstraction.ts +1 -57
  40. package/src/jsr.json +1 -1
  41. package/src/node/node-env-actions.ts +45 -0
  42. package/src/node/node-sys-abstraction.ts +1 -45
  43. package/src/sys-env.ts +4 -4
  44. package/src/web/web-env-actions.ts +41 -0
  45. package/src/web/web-sys-abstraction.ts +1 -41
  46. package/{sys-abstraction-GNnBj2sz.d.cts → sys-abstraction-Coxu8BjZ.d.cts} +1 -1
  47. package/{sys-abstraction-GNnBj2sz.d.ts → sys-abstraction-Coxu8BjZ.d.ts} +1 -1
  48. package/test/index.cjs +72 -235
  49. package/test/index.cjs.map +1 -1
  50. package/test/index.d.cts +2 -2
  51. package/test/index.d.ts +2 -2
  52. package/test/index.js +3 -2
  53. package/ts/cf/cf-env-actions.d.ts +16 -0
  54. package/ts/cf/cf-env-actions.d.ts.map +1 -0
  55. package/ts/cf/cf-env-actions.js +51 -0
  56. package/ts/cf/cf-env-actions.js.map +1 -0
  57. package/ts/cf/cf-sys-abstraction.d.ts +1 -14
  58. package/ts/cf/cf-sys-abstraction.d.ts.map +1 -1
  59. package/ts/cf/cf-sys-abstraction.js +0 -42
  60. package/ts/cf/cf-sys-abstraction.js.map +1 -1
  61. package/ts/crypto.test.js +8 -1
  62. package/ts/crypto.test.js.map +1 -1
  63. package/ts/deno/deno-env-actions.d.ts +23 -0
  64. package/ts/deno/deno-env-actions.d.ts.map +1 -0
  65. package/ts/deno/deno-env-actions.js +46 -0
  66. package/ts/deno/deno-env-actions.js.map +1 -0
  67. package/ts/deno/deno-sys-abstraction.d.ts +1 -22
  68. package/ts/deno/deno-sys-abstraction.d.ts.map +1 -1
  69. package/ts/deno/deno-sys-abstraction.js +0 -45
  70. package/ts/deno/deno-sys-abstraction.js.map +1 -1
  71. package/ts/node/node-env-actions.d.ts +15 -0
  72. package/ts/node/node-env-actions.d.ts.map +1 -0
  73. package/ts/node/node-env-actions.js +44 -0
  74. package/ts/node/node-env-actions.js.map +1 -0
  75. package/ts/node/node-sys-abstraction.d.ts +1 -14
  76. package/ts/node/node-sys-abstraction.d.ts.map +1 -1
  77. package/ts/node/node-sys-abstraction.js +0 -43
  78. package/ts/node/node-sys-abstraction.js.map +1 -1
  79. package/ts/sys-env.js +4 -4
  80. package/ts/sys-env.js.map +1 -1
  81. package/ts/sys-env.test.js +2 -2
  82. package/ts/sys-env.test.js.map +1 -1
  83. package/ts/web/web-env-actions.d.ts +14 -0
  84. package/ts/web/web-env-actions.d.ts.map +1 -0
  85. package/ts/web/web-env-actions.js +35 -0
  86. package/ts/web/web-env-actions.js.map +1 -0
  87. package/ts/web/web-sys-abstraction.d.ts +0 -13
  88. package/ts/web/web-sys-abstraction.d.ts.map +1 -1
  89. package/ts/web/web-sys-abstraction.js +0 -34
  90. package/ts/web/web-sys-abstraction.js.map +1 -1
  91. package/web/index.cjs +63 -238
  92. package/web/index.cjs.map +1 -1
  93. package/web/index.d.cts +3 -15
  94. package/web/index.d.ts +3 -15
  95. package/web/index.js +2 -3
  96. package/chunk-DZPKZQIT.js.map +0 -1
package/index.cjs CHANGED
@@ -40,7 +40,7 @@ __export(src_exports, {
40
40
  BaseSysAbstraction: () => BaseSysAbstraction,
41
41
  BuildURI: () => BuildURI,
42
42
  ConstTime: () => ConstTime,
43
- EnvImpl: () => EnvImpl2,
43
+ EnvImpl: () => EnvImpl,
44
44
  Future: () => Future,
45
45
  HeadersImpl: () => HeadersImpl,
46
46
  HttpHeader: () => HttpHeader,
@@ -348,9 +348,9 @@ var SysTime = class extends Time {
348
348
  return /* @__PURE__ */ new Date();
349
349
  }
350
350
  Sleep(duration) {
351
- return new Promise((resolve2) => {
351
+ return new Promise((resolve) => {
352
352
  setTimeout(() => {
353
- resolve2();
353
+ resolve();
354
354
  }, duration);
355
355
  });
356
356
  }
@@ -540,8 +540,8 @@ var Future = class {
540
540
  __privateAdd(this, _rejectFn, () => {
541
541
  throw new Error("This Promise is not working as expected.");
542
542
  });
543
- __privateSet(this, _promise, new Promise((resolve2, reject) => {
544
- __privateSet(this, _resolveFn, resolve2);
543
+ __privateSet(this, _promise, new Promise((resolve, reject) => {
544
+ __privateSet(this, _resolveFn, resolve);
545
545
  __privateSet(this, _rejectFn, reject);
546
546
  }));
547
547
  }
@@ -737,28 +737,7 @@ function runtimeFn() {
737
737
  };
738
738
  }
739
739
 
740
- // src/txt-en-decoder.ts
741
- var encoder = new TextEncoder();
742
- var decoder = new TextDecoder();
743
- var Utf8EnDecoder = class {
744
- encode(str) {
745
- return encoder.encode(str);
746
- }
747
- decode(data) {
748
- return decoder.decode(data);
749
- }
750
- };
751
- var utf8EnDecoder = new Utf8EnDecoder();
752
- function Utf8EnDecoderSingleton() {
753
- return utf8EnDecoder;
754
- }
755
-
756
- // src/deno/deno-file-service.ts
757
- var path = __toESM(require("path"), 1);
758
- var Deno = globalThis.Deno;
759
-
760
- // src/deno/deno-sys-abstraction.ts
761
- var Deno2 = globalThis.Deno;
740
+ // src/deno/deno-env-actions.ts
762
741
  var once = new ResolveOnce();
763
742
  var _deno;
764
743
  var _DenoEnvActions = class _DenoEnvActions {
@@ -798,95 +777,8 @@ var _DenoEnvActions = class _DenoEnvActions {
798
777
  };
799
778
  _deno = new WeakMap();
800
779
  var DenoEnvActions = _DenoEnvActions;
801
- var DenoExitServiceImpl = class {
802
- constructor() {
803
- this._exitHandlers = [];
804
- this.invoked = false;
805
- this._handleExit = async () => {
806
- if (this.invoked) {
807
- return;
808
- }
809
- this.invoked = true;
810
- for (const h of this._exitHandlers) {
811
- try {
812
- const ret = h.hdl();
813
- if (typeof ret.then === "function") {
814
- await ret;
815
- }
816
- } finally {
817
- }
818
- }
819
- };
820
- globalThis.addEventListener("unhandledrejection", (e) => {
821
- e.preventDefault();
822
- this.exit(19);
823
- });
824
- globalThis.addEventListener("error", () => {
825
- this.exit(19);
826
- });
827
- globalThis.addEventListener("uncaughtException", () => {
828
- this.exit(19);
829
- });
830
- globalThis.addEventListener("unload", () => {
831
- this.exit(0);
832
- });
833
- Deno2.addSignalListener("SIGQUIT", () => {
834
- this.exit(3);
835
- });
836
- Deno2.addSignalListener("SIGINT", () => {
837
- this.exit(2);
838
- });
839
- Deno2.addSignalListener("SIGTERM", () => {
840
- this.exit(9);
841
- });
842
- }
843
- injectExitHandlers(hdls) {
844
- this._exitHandlers = hdls;
845
- }
846
- exit(code) {
847
- this._handleExit().then(() => {
848
- Deno2.exit(code);
849
- }).catch((err) => {
850
- console.error("ExitService: failed to handle exit", err);
851
- Deno2.exit(code);
852
- });
853
- }
854
- };
855
- var _DenoSystemService = class _DenoSystemService {
856
- constructor() {
857
- this._exitService = new DenoExitServiceImpl();
858
- this._exitService.injectExitHandlers(_DenoSystemService._exitHandlers);
859
- }
860
- Env() {
861
- return envFactory();
862
- }
863
- Args() {
864
- return Deno2.args;
865
- }
866
- OnExit(hdl) {
867
- const id = crypto.randomUUID();
868
- _DenoSystemService._exitHandlers.push({ hdl, id });
869
- return () => {
870
- const idx = _DenoSystemService._exitHandlers.findIndex((h) => h.id === id);
871
- if (idx >= 0) {
872
- _DenoSystemService._exitHandlers.splice(idx, 1);
873
- }
874
- };
875
- }
876
- Exit(code) {
877
- this._exitService.exit(code);
878
- }
879
- };
880
- _DenoSystemService._exitHandlers = [];
881
- var DenoSystemService = _DenoSystemService;
882
-
883
- // src/node/node-file-service.ts
884
- var import_node_path = __toESM(require("path"), 1);
885
- var import_node_fs = __toESM(require("fs"), 1);
886
- var import_node_process = __toESM(require("process"), 1);
887
780
 
888
- // src/node/node-sys-abstraction.ts
889
- var import_node_process2 = __toESM(require("process"), 1);
781
+ // src/node/node-env-actions.ts
890
782
  var once2 = new ResolveOnce();
891
783
  var _node;
892
784
  var _NodeEnvActions = class _NodeEnvActions {
@@ -924,111 +816,73 @@ var _NodeEnvActions = class _NodeEnvActions {
924
816
  };
925
817
  _node = new WeakMap();
926
818
  var NodeEnvActions = _NodeEnvActions;
927
- var NodeExitServiceImpl = class {
928
- constructor() {
929
- this._exitHandlers = [];
930
- this.invoked = false;
931
- this._handleExit = async () => {
932
- if (this.invoked) {
933
- return;
934
- }
935
- this.invoked = true;
936
- for (const h of this._exitHandlers) {
937
- try {
938
- const ret = h.hdl();
939
- if (typeof ret.then === "function") {
940
- await ret;
941
- }
942
- } finally {
943
- }
944
- }
945
- };
946
- import_node_process2.default.on("unhandledRejection", (reason, p) => {
947
- this.exit(19);
948
- });
949
- import_node_process2.default.on("uncaughtException", (error) => {
950
- this.exit(18);
951
- });
952
- import_node_process2.default.on("close", () => {
953
- this.exit(0);
954
- });
955
- import_node_process2.default.on("exit", () => {
956
- this.exit(0);
957
- });
958
- import_node_process2.default.on("SIGQUIT", () => {
959
- this.exit(3);
960
- });
961
- import_node_process2.default.on("SIGINT", () => {
962
- this.exit(2);
963
- });
964
- import_node_process2.default.on("SIGTERM", () => {
965
- this.exit(9);
966
- });
819
+
820
+ // src/web/web-env-actions.ts
821
+ var once3 = new ResolveOnce();
822
+ var BrowserEnvActions = class _BrowserEnvActions {
823
+ constructor(opts) {
824
+ this.env = /* @__PURE__ */ new Map();
825
+ this.opts = opts;
967
826
  }
968
- injectExitHandlers(hdls) {
969
- this._exitHandlers = hdls;
827
+ static new(opts) {
828
+ return once3.once(() => new _BrowserEnvActions(opts));
970
829
  }
971
- exit(code) {
972
- this._handleExit().then(() => {
973
- import_node_process2.default.exit(code);
974
- }).catch((err) => {
975
- console.error("ExitService: failed to handle exit", err);
976
- import_node_process2.default.exit(code);
977
- });
830
+ get(key2) {
831
+ return this.env.get(key2);
978
832
  }
979
- };
980
- var _NodeSystemService = class _NodeSystemService {
981
- constructor() {
982
- this._exitService = new NodeExitServiceImpl();
983
- this._exitService.injectExitHandlers(_NodeSystemService._exitHandlers);
833
+ set(key2, value) {
834
+ if (value) {
835
+ this.env.set(key2, value);
836
+ }
984
837
  }
985
- Env() {
986
- return envFactory();
838
+ delete(key2) {
839
+ this.env.delete(key2);
987
840
  }
988
- Args() {
989
- return import_node_process2.default.argv;
841
+ keys() {
842
+ return Array.from(this.env.keys());
990
843
  }
991
- OnExit(hdl) {
992
- const id = crypto.randomUUID();
993
- _NodeSystemService._exitHandlers.push({ hdl, id });
994
- return () => {
995
- const idx = _NodeSystemService._exitHandlers.findIndex((h) => h.id === id);
996
- if (idx >= 0) {
997
- _NodeSystemService._exitHandlers.splice(idx, 1);
998
- }
999
- };
844
+ active() {
845
+ return true;
1000
846
  }
1001
- Exit(code) {
1002
- this._exitService.exit(code);
847
+ register(env) {
848
+ const sym = Symbol.for(this.opts.symbol || "CP_ENV");
849
+ const browser = globalThis;
850
+ browser[sym] = env;
851
+ return env;
1003
852
  }
1004
853
  };
1005
- _NodeSystemService._exitHandlers = [];
1006
- var NodeSystemService = _NodeSystemService;
1007
854
 
1008
- // src/cf/cf-sys-abstraction.ts
1009
- var once3 = new ResolveOnce();
855
+ // src/cf/cf-env-actions.ts
856
+ var once4 = new ResolveOnce();
1010
857
  var CFEnvActions = class _CFEnvActions {
858
+ constructor(env) {
859
+ this.injectOnRegister = {};
860
+ this.cfEnv = new Map(Object.entries(env.presetEnv || {}));
861
+ }
1011
862
  static new(opts) {
1012
- return once3.once(() => new _CFEnvActions(opts));
863
+ return once4.once(() => new _CFEnvActions(opts));
1013
864
  }
1014
865
  static inject(o) {
1015
- var _a;
1016
866
  const env = _CFEnvActions.new({});
1017
867
  for (const key2 in o) {
1018
868
  const value = o[key2];
1019
869
  if (typeof value === "string") {
1020
- (_a = env.env) == null ? void 0 : _a.set(key2, value);
870
+ if (env.env) {
871
+ env.env.set(key2, value);
872
+ } else {
873
+ env.injectOnRegister[key2] = value;
874
+ }
1021
875
  }
1022
876
  }
1023
877
  }
1024
- constructor(env) {
1025
- this.cfEnv = new Map(Object.entries(env.presetEnv || {}));
1026
- }
1027
878
  active() {
1028
879
  return runtimeFn().isCFWorker;
1029
880
  }
1030
881
  register(env) {
1031
882
  this.env = env;
883
+ for (const key2 in this.injectOnRegister) {
884
+ env.set(key2, this.injectOnRegister[key2]);
885
+ }
1032
886
  return env;
1033
887
  }
1034
888
  get(key2) {
@@ -1073,12 +927,12 @@ function envFactory(opts = {}) {
1073
927
  }
1074
928
  return _envFactories.get(found.id).once(() => {
1075
929
  const action = found.fn(opts);
1076
- const ret = new EnvImpl2(action, opts);
930
+ const ret = new EnvImpl(action, opts);
1077
931
  action.register(ret);
1078
932
  return ret;
1079
933
  });
1080
934
  }
1081
- var EnvImpl2 = class {
935
+ var EnvImpl = class {
1082
936
  constructor(map, opts = {}) {
1083
937
  this._onSet = [];
1084
938
  this._map = map;
@@ -1146,40 +1000,23 @@ var EnvImpl2 = class {
1146
1000
  }
1147
1001
  };
1148
1002
 
1149
- // src/web/web-sys-abstraction.ts
1150
- var once4 = new ResolveOnce();
1151
- var BrowserEnvActions = class _BrowserEnvActions {
1152
- constructor(opts) {
1153
- this.env = /* @__PURE__ */ new Map();
1154
- this.opts = opts;
1155
- }
1156
- static new(opts) {
1157
- return once4.once(() => new _BrowserEnvActions(opts));
1158
- }
1159
- get(key2) {
1160
- return this.env.get(key2);
1161
- }
1162
- set(key2, value) {
1163
- if (value) {
1164
- this.env.set(key2, value);
1165
- }
1166
- }
1167
- delete(key2) {
1168
- this.env.delete(key2);
1169
- }
1170
- keys() {
1171
- return Array.from(this.env.keys());
1172
- }
1173
- active() {
1174
- return true;
1003
+ // src/txt-en-decoder.ts
1004
+ var encoder = new TextEncoder();
1005
+ var decoder = new TextDecoder();
1006
+ var Utf8EnDecoder = class {
1007
+ encode(str) {
1008
+ return encoder.encode(str);
1175
1009
  }
1176
- register(env) {
1177
- const sym = Symbol.for(this.opts.symbol || "CP_ENV");
1178
- const browser = globalThis;
1179
- browser[sym] = env;
1180
- return env;
1010
+ decode(data) {
1011
+ return decoder.decode(data);
1181
1012
  }
1182
1013
  };
1014
+ var utf8EnDecoder = new Utf8EnDecoder();
1015
+ function Utf8EnDecoderSingleton() {
1016
+ return utf8EnDecoder;
1017
+ }
1018
+
1019
+ // src/web/web-sys-abstraction.ts
1183
1020
  var WebFileService = class {
1184
1021
  get baseDir() {
1185
1022
  throw new Error("basedir-Method not implemented.");
@@ -1390,23 +1227,23 @@ var Path = class {
1390
1227
  this.parts.push(part);
1391
1228
  }
1392
1229
  };
1393
- function splitPath(path3) {
1230
+ function splitPath(path) {
1394
1231
  const p = new Path();
1395
- if (path3 === "") {
1232
+ if (path === "") {
1396
1233
  return p;
1397
1234
  }
1398
- for (let count = 0; path3.length; count++) {
1399
- if (path3.match(/^\/+/)) {
1235
+ for (let count = 0; path.length; count++) {
1236
+ if (path.match(/^\/+/)) {
1400
1237
  if (count === 0) {
1401
1238
  p.add(3 /* Root */);
1402
1239
  } else {
1403
1240
  p.add(1 /* Slash */);
1404
1241
  }
1405
- path3 = path3.replace(/^\/+/, "");
1242
+ path = path.replace(/^\/+/, "");
1406
1243
  } else {
1407
- const part = path3.replace(/\/.*$/, "");
1244
+ const part = path.replace(/\/.*$/, "");
1408
1245
  p.add(part);
1409
- path3 = path3.replace(/^[^/]+/, "");
1246
+ path = path.replace(/^[^/]+/, "");
1410
1247
  }
1411
1248
  }
1412
1249
  return p;
@@ -1415,29 +1252,29 @@ function pathJoin(...paths) {
1415
1252
  let prev = "";
1416
1253
  const res = [];
1417
1254
  for (let i = 0; i < paths.length; i++) {
1418
- const path3 = paths[i];
1419
- if (path3 === "") {
1255
+ const path = paths[i];
1256
+ if (path === "") {
1420
1257
  continue;
1421
1258
  }
1422
- if (!(prev.endsWith("/") || path3.startsWith("/"))) {
1259
+ if (!(prev.endsWith("/") || path.startsWith("/"))) {
1423
1260
  if (prev !== "") {
1424
1261
  res.push("/");
1425
1262
  }
1426
- res.push(path3);
1263
+ res.push(path);
1427
1264
  } else {
1428
- res.push(path3);
1265
+ res.push(path);
1429
1266
  }
1430
- prev = path3;
1267
+ prev = path;
1431
1268
  }
1432
1269
  return res.join("");
1433
1270
  }
1434
- function relativePath(path3, relative2) {
1435
- const relativeParts = splitPath(relative2);
1271
+ function relativePath(path, relative) {
1272
+ const relativeParts = splitPath(relative);
1436
1273
  let result;
1437
1274
  if (relativeParts.parts[0] === 3 /* Root */) {
1438
- result = relative2;
1275
+ result = relative;
1439
1276
  } else {
1440
- result = pathJoin(path3, relative2);
1277
+ result = pathJoin(path, relative);
1441
1278
  }
1442
1279
  const unoptPath = splitPath(result);
1443
1280
  const out = [];
@@ -1489,12 +1326,12 @@ function stripper(strip, obj) {
1489
1326
  });
1490
1327
  return localStripper(void 0, restrips, obj);
1491
1328
  }
1492
- function localStripper(path3, restrips, obj) {
1329
+ function localStripper(path, restrips, obj) {
1493
1330
  if (typeof obj !== "object" || obj === null) {
1494
1331
  return obj;
1495
1332
  }
1496
1333
  if (Array.isArray(obj)) {
1497
- return obj.map((i) => localStripper(path3, restrips, i));
1334
+ return obj.map((i) => localStripper(path, restrips, i));
1498
1335
  }
1499
1336
  const ret = { ...obj };
1500
1337
  const matcher = (key2, nextPath) => {
@@ -1508,8 +1345,8 @@ function localStripper(path3, restrips, obj) {
1508
1345
  for (const key2 in ret) {
1509
1346
  if (Object.prototype.hasOwnProperty.call(ret, key2)) {
1510
1347
  let nextPath;
1511
- if (path3) {
1512
- nextPath = [path3, key2].join(".");
1348
+ if (path) {
1349
+ nextPath = [path, key2].join(".");
1513
1350
  } else {
1514
1351
  nextPath = key2;
1515
1352
  }
@@ -2538,8 +2375,8 @@ var LoggerImpl = class _LoggerImpl {
2538
2375
  return this.Uint64(key2, value);
2539
2376
  }
2540
2377
  async Flush() {
2541
- return new Promise((resolve2) => {
2542
- this._logWriter._flush(void 0, resolve2);
2378
+ return new Promise((resolve) => {
2379
+ this._logWriter._flush(void 0, resolve);
2543
2380
  });
2544
2381
  }
2545
2382
  With() {
@@ -2850,8 +2687,8 @@ function MockLogger(params) {
2850
2687
 
2851
2688
  // src/tracer.ts
2852
2689
  var Metric = class {
2853
- constructor(path3) {
2854
- this.path = path3;
2690
+ constructor(path) {
2691
+ this.path = path;
2855
2692
  }
2856
2693
  set(value) {
2857
2694
  this.value = value;
@@ -2886,23 +2723,23 @@ var Metrics = class {
2886
2723
  return obj;
2887
2724
  }
2888
2725
  get(ipath) {
2889
- const path3 = ipath.replace(/[/]+/g, "/").trim();
2890
- if (path3.startsWith("/")) {
2891
- if (path3.slice(1).length === 0) {
2892
- throw new Error(`Metrics path must contain value /:${path3}`);
2726
+ const path = ipath.replace(/[/]+/g, "/").trim();
2727
+ if (path.startsWith("/")) {
2728
+ if (path.slice(1).length === 0) {
2729
+ throw new Error(`Metrics path must contain value /:${path}`);
2893
2730
  }
2894
- let metric = this.map.get(path3);
2731
+ let metric = this.map.get(path);
2895
2732
  if (!metric) {
2896
- metric = new Metric(path3);
2897
- this.map.set(path3, metric);
2733
+ metric = new Metric(path);
2734
+ this.map.set(path, metric);
2898
2735
  }
2899
- this.spanRefs.set(path3, metric);
2736
+ this.spanRefs.set(path, metric);
2900
2737
  return metric;
2901
- } else if (path3.includes("/")) {
2902
- throw new Error(`Metrics path must start with /:${path3}`);
2738
+ } else if (path.includes("/")) {
2739
+ throw new Error(`Metrics path must start with /:${path}`);
2903
2740
  }
2904
2741
  const rootPath = this.tracenode.getRootPath();
2905
- return this.get(`${rootPath}/${path3}`);
2742
+ return this.get(`${rootPath}/${path}`);
2906
2743
  }
2907
2744
  };
2908
2745
  var TraceNode = class _TraceNode {
@@ -3326,8 +3163,8 @@ function rebuffer(a, chunkSize) {
3326
3163
  };
3327
3164
  return new ReadableStream({
3328
3165
  async pull(controller) {
3329
- return new Promise((resolve2) => {
3330
- pump(state, controller, resolve2);
3166
+ return new Promise((resolve) => {
3167
+ pump(state, controller, resolve);
3331
3168
  });
3332
3169
  }
3333
3170
  });