@tmdb-graphql-api/rest-client 0.0.11-unstable.0 → 0.0.11-unstable.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tmdb-graphql-api/rest-client",
3
3
  "description": "The TMDB GraphQL rest client module.",
4
- "version": "0.0.11-unstable.0",
4
+ "version": "0.0.11-unstable.1",
5
5
  "author": "Dylan Aubrey",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/badbatch/themoviedb-graphql-api",
package/src/main.ts CHANGED
@@ -37,16 +37,16 @@ import { type CreateRestClientParams, type ShortcutMethodNames } from './types.t
37
37
 
38
38
  const { NODE_ENV } = process.env;
39
39
 
40
- const isInfoLog = (message: string): message is 'REQUEST_SENT' | 'RESPONSE_FROM_CACHE' | 'RESPONSE_RECEIVED' =>
40
+ const isInfoLog = (message: string): message is 'request_sent' | 'response_from_cache' | 'response_received' =>
41
41
  message === REQUEST_SENT || message === RESPONSE_FROM_CACHE || message === RESPONSE_RECEIVED;
42
42
 
43
- const isErrorLog = (message: string): message is 'REQUEST_FAILED' => message === REQUEST_FAILED;
43
+ const isErrorLog = (message: string): message is 'request_failed' => message === REQUEST_FAILED;
44
44
 
45
45
  const logMessages = {
46
- REQUEST_FAILED: 'REQUEST FAILED: There was a problem requesting resource',
47
- REQUEST_SENT: 'Request made for resource',
48
- RESPONSE_FROM_CACHE: 'CACHE HIT: Resource resolved from fetch cache',
49
- RESPONSE_RECEIVED: 'Response received for resource',
46
+ [REQUEST_FAILED]: 'REQUEST FAILED: There was a problem requesting resource',
47
+ [REQUEST_SENT]: 'Request made for resource',
48
+ [RESPONSE_FROM_CACHE]: 'CACHE HIT: Resource resolved from fetch cache',
49
+ [RESPONSE_RECEIVED]: 'Response received for resource',
50
50
  };
51
51
 
52
52
  export const createRestClient = ({ cache, logger, queryParams }: CreateRestClientParams) =>