@adviser/cement 0.2.38 → 0.2.40

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/index.d.cts CHANGED
@@ -100,6 +100,7 @@ declare class BuildURI implements URIInterface<BuildURI> {
100
100
  protocol(p: string): BuildURI;
101
101
  pathname(p: string): BuildURI;
102
102
  appendRelative(p: CoerceURI): BuildURI;
103
+ cleanParams(): BuildURI;
103
104
  delParam(key: string): BuildURI;
104
105
  defParam(key: string, str: string): BuildURI;
105
106
  setParam(key: string, str: string): BuildURI;
@@ -552,7 +553,7 @@ interface CTArrayBufferView {
552
553
  byteLength: number;
553
554
  byteOffset: number;
554
555
  }
555
- type CTBufferSource = CTArrayBufferView | ArrayBuffer;
556
+ type CTBufferSource = CTArrayBufferView | ArrayBuffer | Uint8Array;
556
557
  interface CryptoRuntime {
557
558
  importKey(format: CTKeyFormat, keyData: CTJsonWebKey | CTBufferSource, algorithm: CTAlgorithmIdentifier | CTRsaHashedImportParams | CTEcKeyImportParams | CTHmacImportParams | CTAesKeyAlgorithm, extractable: boolean, keyUsages: CTKeyUsage[]): Promise<CTCryptoKey>;
558
559
  exportKey(format: CTKeyFormat, key: CTCryptoKey): Promise<CTJsonWebKey | ArrayBuffer>;
package/index.d.ts CHANGED
@@ -100,6 +100,7 @@ declare class BuildURI implements URIInterface<BuildURI> {
100
100
  protocol(p: string): BuildURI;
101
101
  pathname(p: string): BuildURI;
102
102
  appendRelative(p: CoerceURI): BuildURI;
103
+ cleanParams(): BuildURI;
103
104
  delParam(key: string): BuildURI;
104
105
  defParam(key: string, str: string): BuildURI;
105
106
  setParam(key: string, str: string): BuildURI;
@@ -552,7 +553,7 @@ interface CTArrayBufferView {
552
553
  byteLength: number;
553
554
  byteOffset: number;
554
555
  }
555
- type CTBufferSource = CTArrayBufferView | ArrayBuffer;
556
+ type CTBufferSource = CTArrayBufferView | ArrayBuffer | Uint8Array;
556
557
  interface CryptoRuntime {
557
558
  importKey(format: CTKeyFormat, keyData: CTJsonWebKey | CTBufferSource, algorithm: CTAlgorithmIdentifier | CTRsaHashedImportParams | CTEcKeyImportParams | CTHmacImportParams | CTAesKeyAlgorithm, extractable: boolean, keyUsages: CTKeyUsage[]): Promise<CTCryptoKey>;
558
559
  exportKey(format: CTKeyFormat, key: CTCryptoKey): Promise<CTJsonWebKey | ArrayBuffer>;
package/index.js CHANGED
@@ -1,8 +1,3 @@
1
- import {
2
- ConsoleWriterStream,
3
- FanoutWriteStream,
4
- utils_exports
5
- } from "./chunk-USQXEZHL.js";
6
1
  import {
7
2
  WebSysAbstraction
8
3
  } from "./chunk-W2GV5KXV.js";
@@ -31,6 +26,11 @@ import {
31
26
  WrapperSysAbstraction,
32
27
  envFactory
33
28
  } from "./chunk-F5W6VELE.js";
29
+ import {
30
+ ConsoleWriterStream,
31
+ FanoutWriteStream,
32
+ utils_exports
33
+ } from "./chunk-USQXEZHL.js";
34
34
  import {
35
35
  Utf8EnDecoder,
36
36
  Utf8EnDecoderSingleton,
@@ -564,23 +564,10 @@ var BuildURI = class _BuildURI {
564
564
  this._url.hostname = h;
565
565
  return this;
566
566
  }
567
- // password(p: string) {
568
- // this._url.password = p;
569
- // return this;
570
- // }
571
- // port(p: string) {
572
- // this._url.port = p;
573
- // return this;
574
- // }
575
- // username(u: string) {
576
- // this._url.username = u;
577
- // return this;
578
- // }
579
- // search(s: string) {
580
- // this._url.search = s;
581
- // return this;
582
- // }
583
567
  protocol(p) {
568
+ if (!p.endsWith(":")) {
569
+ p = `${p}:`;
570
+ }
584
571
  this._url.protocol = p;
585
572
  return this;
586
573
  }
@@ -588,14 +575,6 @@ var BuildURI = class _BuildURI {
588
575
  this._url.pathname = p;
589
576
  return this;
590
577
  }
591
- // hash(h: string) {
592
- // this._url.hash = h;
593
- // return this;
594
- // }
595
- // host(h: string) {
596
- // this._url.host = h;
597
- // return this;
598
- // }
599
578
  appendRelative(p) {
600
579
  const appendUrl = URI.from(p);
601
580
  let pathname = appendUrl.pathname;
@@ -612,6 +591,12 @@ var BuildURI = class _BuildURI {
612
591
  }
613
592
  return this;
614
593
  }
594
+ cleanParams() {
595
+ for (const key of Array.from(this._url.searchParams.keys())) {
596
+ this._url.searchParams.delete(key);
597
+ }
598
+ return this;
599
+ }
615
600
  delParam(key) {
616
601
  this._url.searchParams.delete(key);
617
602
  return this;