@graphql-mesh/utils 0.95.2 → 0.95.3

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/cjs/logger.js CHANGED
@@ -126,5 +126,11 @@ class DefaultLogger {
126
126
  child(name) {
127
127
  return new DefaultLogger(this.name ? `${this.name} - ${name}` : name);
128
128
  }
129
+ addPrefix(prefix) {
130
+ if (!this.name?.includes(prefix)) {
131
+ this.name = this.name ? `${this.name} - ${prefix}` : prefix;
132
+ }
133
+ return this;
134
+ }
129
135
  }
130
136
  exports.DefaultLogger = DefaultLogger;
package/esm/logger.js CHANGED
@@ -118,4 +118,10 @@ export class DefaultLogger {
118
118
  child(name) {
119
119
  return new DefaultLogger(this.name ? `${this.name} - ${name}` : name);
120
120
  }
121
+ addPrefix(prefix) {
122
+ if (!this.name?.includes(prefix)) {
123
+ this.name = this.name ? `${this.name} - ${prefix}` : prefix;
124
+ }
125
+ return this;
126
+ }
121
127
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@graphql-mesh/utils",
3
- "version": "0.95.2",
3
+ "version": "0.95.3",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "@graphql-mesh/cross-helpers": "^0.4.0",
7
- "@graphql-mesh/types": "^0.95.2",
7
+ "@graphql-mesh/types": "^0.95.3",
8
8
  "@graphql-tools/utils": "^9.2.1 || ^10.0.0",
9
9
  "graphql": "*",
10
10
  "tslib": "^2.4.0"
@@ -18,5 +18,6 @@ export declare class DefaultLogger implements Logger {
18
18
  error(...args: any[]): void;
19
19
  debug(...lazyArgs: LazyLoggerMessage[]): void;
20
20
  child(name: string): Logger;
21
+ addPrefix(prefix: string): Logger;
21
22
  }
22
23
  export {};
@@ -18,5 +18,6 @@ export declare class DefaultLogger implements Logger {
18
18
  error(...args: any[]): void;
19
19
  debug(...lazyArgs: LazyLoggerMessage[]): void;
20
20
  child(name: string): Logger;
21
+ addPrefix(prefix: string): Logger;
21
22
  }
22
23
  export {};