@zimic/http 0.2.0-canary.0 → 0.2.0-canary.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.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  </h1>
8
8
 
9
9
  <p align="center">
10
- TypeScript-first HTTP utilities
10
+ Next-gen, TypeScript-first HTTP utilities
11
11
  </p>
12
12
 
13
13
  <p align="center">
@@ -3,14 +3,14 @@
3
3
  var filesystem = require('fs/promises');
4
4
  var path = require('path');
5
5
  var ts3 = require('typescript');
6
- var chalk = require('chalk');
6
+ var color = require('picocolors');
7
7
 
8
8
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
9
 
10
10
  var filesystem__default = /*#__PURE__*/_interopDefault(filesystem);
11
11
  var path__default = /*#__PURE__*/_interopDefault(path);
12
12
  var ts3__default = /*#__PURE__*/_interopDefault(ts3);
13
- var chalk__default = /*#__PURE__*/_interopDefault(chalk);
13
+ var color__default = /*#__PURE__*/_interopDefault(color);
14
14
 
15
15
  var __defProp = Object.defineProperty;
16
16
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -61,7 +61,7 @@ __name(createImportDeclaration, "createImportDeclaration");
61
61
  var HTTP_METHODS = Object.freeze(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]);
62
62
  function logWithPrefix(message, options) {
63
63
  const { method } = options;
64
- console[method](chalk__default.default.cyan("[@zimic/http]"), message);
64
+ console[method](color__default.default.cyan("[@zimic/http]"), message);
65
65
  }
66
66
  __name(logWithPrefix, "logWithPrefix");
67
67
  function createOperationsIdentifierText(serviceName) {
@@ -405,7 +405,7 @@ function normalizeResponse(response, context, options = {}) {
405
405
  const mappedType = NON_NUMERIC_RESPONSE_STATUS_TO_MAPPED_TYPE[statusCode];
406
406
  if (!mappedType) {
407
407
  logWithPrefix(
408
- `Warning: Response has a non-standard status code: ${chalk__default.default.yellow(response.name.text)}. Consider replacing it with a number (e.g. '200'), a pattern ('1xx', '2xx', '3xx', '4xx', or '5xx'), or 'default'.`,
408
+ `Warning: Response has a non-standard status code: ${color__default.default.yellow(response.name.text)}. Consider replacing it with a number (e.g. '200'), a pattern ('1xx', '2xx', '3xx', '4xx', or '5xx'), or 'default'.`,
409
409
  { method: "warn" }
410
410
  );
411
411
  return void 0;
@@ -1081,7 +1081,7 @@ function parseRawFilter(rawFilter) {
1081
1081
  const { modifier: filterModifier, method: filteredMethodsOrWildcard, path: filteredPath } = filterMatch?.groups ?? {};
1082
1082
  const isValidFilter = !filteredMethodsOrWildcard || !filteredPath;
1083
1083
  if (isValidFilter) {
1084
- logWithPrefix(`Warning: Filter could not be parsed and was ignored: ${chalk__default.default.yellow(rawFilter)}`, {
1084
+ logWithPrefix(`Warning: Filter could not be parsed and was ignored: ${color__default.default.yellow(rawFilter)}`, {
1085
1085
  method: "warn"
1086
1086
  });
1087
1087
  return void 0;
@@ -1337,5 +1337,5 @@ var generate_default = generateTypesFromOpenAPI;
1337
1337
  exports.__name = __name;
1338
1338
  exports.generate_default = generate_default;
1339
1339
  exports.logWithPrefix = logWithPrefix;
1340
- //# sourceMappingURL=chunk-2YBKARBY.js.map
1341
- //# sourceMappingURL=chunk-2YBKARBY.js.map
1340
+ //# sourceMappingURL=chunk-2P56ILG3.js.map
1341
+ //# sourceMappingURL=chunk-2P56ILG3.js.map