@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.
@@ -1,7 +1,7 @@
1
1
  import filesystem from 'fs/promises';
2
2
  import path from 'path';
3
3
  import ts3 from 'typescript';
4
- import chalk from 'chalk';
4
+ import color from 'picocolors';
5
5
 
6
6
  var __defProp = Object.defineProperty;
7
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -52,7 +52,7 @@ __name(createImportDeclaration, "createImportDeclaration");
52
52
  var HTTP_METHODS = Object.freeze(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]);
53
53
  function logWithPrefix(message, options) {
54
54
  const { method } = options;
55
- console[method](chalk.cyan("[@zimic/http]"), message);
55
+ console[method](color.cyan("[@zimic/http]"), message);
56
56
  }
57
57
  __name(logWithPrefix, "logWithPrefix");
58
58
  function createOperationsIdentifierText(serviceName) {
@@ -396,7 +396,7 @@ function normalizeResponse(response, context, options = {}) {
396
396
  const mappedType = NON_NUMERIC_RESPONSE_STATUS_TO_MAPPED_TYPE[statusCode];
397
397
  if (!mappedType) {
398
398
  logWithPrefix(
399
- `Warning: Response has a non-standard status code: ${chalk.yellow(response.name.text)}. Consider replacing it with a number (e.g. '200'), a pattern ('1xx', '2xx', '3xx', '4xx', or '5xx'), or 'default'.`,
399
+ `Warning: Response has a non-standard status code: ${color.yellow(response.name.text)}. Consider replacing it with a number (e.g. '200'), a pattern ('1xx', '2xx', '3xx', '4xx', or '5xx'), or 'default'.`,
400
400
  { method: "warn" }
401
401
  );
402
402
  return void 0;
@@ -1072,7 +1072,7 @@ function parseRawFilter(rawFilter) {
1072
1072
  const { modifier: filterModifier, method: filteredMethodsOrWildcard, path: filteredPath } = filterMatch?.groups ?? {};
1073
1073
  const isValidFilter = !filteredMethodsOrWildcard || !filteredPath;
1074
1074
  if (isValidFilter) {
1075
- logWithPrefix(`Warning: Filter could not be parsed and was ignored: ${chalk.yellow(rawFilter)}`, {
1075
+ logWithPrefix(`Warning: Filter could not be parsed and was ignored: ${color.yellow(rawFilter)}`, {
1076
1076
  method: "warn"
1077
1077
  });
1078
1078
  return void 0;
@@ -1326,5 +1326,5 @@ var generate_default = generateTypesFromOpenAPI;
1326
1326
  * The root import module is defined at build time. The fallback is not expected to be used. */
1327
1327
 
1328
1328
  export { __name, generate_default, logWithPrefix };
1329
- //# sourceMappingURL=chunk-ZIEAUQAZ.mjs.map
1330
- //# sourceMappingURL=chunk-ZIEAUQAZ.mjs.map
1329
+ //# sourceMappingURL=chunk-5GJI2ESI.mjs.map
1330
+ //# sourceMappingURL=chunk-5GJI2ESI.mjs.map