@readme/httpsnippet 8.1.1 → 8.1.2

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.
@@ -66,7 +66,7 @@ interface AvailableTarget extends TargetInfo {
66
66
  clients: ClientInfo[];
67
67
  }
68
68
  declare const availableTargets: () => AvailableTarget[];
69
- declare const extname: (targetId: TargetId, clientId: ClientId) => "" | `.${string}`;
69
+ declare const extname: (targetId: TargetId, clientId: ClientId) => `.${string}` | "";
70
70
 
71
71
  /** is this wrong? yes. according to the spec (http://www.softwareishard.com/blog/har-12-spec/#postData) it's technically wrong since `params` and `text` are (by the spec) mutually exclusive. However, in practice, this is not what is often the case.
72
72
  *
@@ -66,7 +66,7 @@ interface AvailableTarget extends TargetInfo {
66
66
  clients: ClientInfo[];
67
67
  }
68
68
  declare const availableTargets: () => AvailableTarget[];
69
- declare const extname: (targetId: TargetId, clientId: ClientId) => "" | `.${string}`;
69
+ declare const extname: (targetId: TargetId, clientId: ClientId) => `.${string}` | "";
70
70
 
71
71
  /** is this wrong? yes. according to the spec (http://www.softwareishard.com/blog/har-12-spec/#postData) it's technically wrong since `params` and `text` are (by the spec) mutually exclusive. However, in practice, this is not what is often the case.
72
72
  *
package/dist/index.cjs CHANGED
@@ -3520,6 +3520,9 @@ var isClient = (client) => {
3520
3520
  }
3521
3521
  return true;
3522
3522
  };
3523
+ var addClientPlugin = (plugin) => {
3524
+ addTargetClient(plugin.target, plugin.client);
3525
+ };
3523
3526
  var addTargetClient = (targetId, client) => {
3524
3527
  if (!isClient(client)) ;
3525
3528
  if (!Object.prototype.hasOwnProperty.call(targets, targetId)) {
@@ -3746,6 +3749,7 @@ var HTTPSnippet = class {
3746
3749
  };
3747
3750
 
3748
3751
  exports.HTTPSnippet = HTTPSnippet;
3752
+ exports.addClientPlugin = addClientPlugin;
3749
3753
  exports.addTarget = addTarget;
3750
3754
  exports.addTargetClient = addTargetClient;
3751
3755
  exports.availableTargets = availableTargets;