@adviser/cement 0.2.39 → 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.cjs CHANGED
@@ -1342,23 +1342,10 @@ var BuildURI = class _BuildURI {
1342
1342
  this._url.hostname = h;
1343
1343
  return this;
1344
1344
  }
1345
- // password(p: string) {
1346
- // this._url.password = p;
1347
- // return this;
1348
- // }
1349
- // port(p: string) {
1350
- // this._url.port = p;
1351
- // return this;
1352
- // }
1353
- // username(u: string) {
1354
- // this._url.username = u;
1355
- // return this;
1356
- // }
1357
- // search(s: string) {
1358
- // this._url.search = s;
1359
- // return this;
1360
- // }
1361
1345
  protocol(p) {
1346
+ if (!p.endsWith(":")) {
1347
+ p = `${p}:`;
1348
+ }
1362
1349
  this._url.protocol = p;
1363
1350
  return this;
1364
1351
  }
@@ -1366,14 +1353,6 @@ var BuildURI = class _BuildURI {
1366
1353
  this._url.pathname = p;
1367
1354
  return this;
1368
1355
  }
1369
- // hash(h: string) {
1370
- // this._url.hash = h;
1371
- // return this;
1372
- // }
1373
- // host(h: string) {
1374
- // this._url.host = h;
1375
- // return this;
1376
- // }
1377
1356
  appendRelative(p) {
1378
1357
  const appendUrl = URI.from(p);
1379
1358
  let pathname = appendUrl.pathname;
@@ -1390,6 +1369,12 @@ var BuildURI = class _BuildURI {
1390
1369
  }
1391
1370
  return this;
1392
1371
  }
1372
+ cleanParams() {
1373
+ for (const key of Array.from(this._url.searchParams.keys())) {
1374
+ this._url.searchParams.delete(key);
1375
+ }
1376
+ return this;
1377
+ }
1393
1378
  delParam(key) {
1394
1379
  this._url.searchParams.delete(key);
1395
1380
  return this;