@tstdl/base 0.92.153 → 0.92.155

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,5 +1,5 @@
1
1
  import { HttpClient, type HttpClientOptions } from '../../http/client/index.js';
2
- import { bustCacheToken } from '../../http/index.js';
2
+ import { bustCache } from '../../http/index.js';
3
3
  import { type Resolvable } from '../../injector/interfaces.js';
4
4
  import type { Type } from '../../types/index.js';
5
5
  import { type ApiClientImplementation, type ApiDefinition, type ApiEndpointDefinition } from '../types.js';
@@ -14,7 +14,7 @@ export type ClientOptions = {
14
14
  };
15
15
  export type ApiClientHttpRequestContext = {
16
16
  endpoint: ApiEndpointDefinition;
17
- [bustCacheToken]?: boolean;
17
+ [bustCache]?: boolean;
18
18
  };
19
19
  export declare const httpClientSymbol: unique symbol;
20
20
  export declare const apiDefinitionSymbol: unique symbol;
@@ -1,5 +1,5 @@
1
1
  import { HttpClient, HttpClientRequest } from '../../http/client/index.js';
2
- import { bustCacheToken, normalizeSingleHttpValue } from '../../http/index.js';
2
+ import { bustCache, normalizeSingleHttpValue } from '../../http/index.js';
3
3
  import { inject } from '../../injector/inject.js';
4
4
  import { Injector } from '../../injector/injector.js';
5
5
  import { resolveArgumentType } from '../../injector/interfaces.js';
@@ -81,8 +81,8 @@ export function compileClient(definition, options = defaultOptions) {
81
81
  }
82
82
  return getDataStream(this[httpClientSymbol].options.baseUrl, resource, endpoint, parameters);
83
83
  }
84
- if (context.endpoint.data?.[bustCacheToken] == true) {
85
- context[bustCacheToken] = true;
84
+ if (context.endpoint.data?.[bustCache] == true) {
85
+ context[bustCache] = true;
86
86
  }
87
87
  const request = new HttpClientRequest({
88
88
  method,
@@ -1,4 +1,3 @@
1
- import { bustCacheToken } from '../../http/tokens.js';
2
1
  import { DataStream } from '../../sse/index.js';
3
2
  import { Document, DocumentCategory, DocumentRequest, DocumentRequestsTemplate, DocumentRequestTemplate, DocumentType } from '../models/index.js';
4
3
  import { DocumentCategoryView, DocumentManagementData, DocumentRequestsTemplateData } from '../service-models/index.js';
@@ -27,7 +26,7 @@ export declare const documentManagementApiDefinition: {
27
26
  };
28
27
  credentials: true;
29
28
  data: {
30
- [bustCacheToken]: boolean;
29
+ bustCache: boolean;
31
30
  };
32
31
  cors: {
33
32
  accessControlAllowHeaders: string;
@@ -427,7 +426,7 @@ declare const _DocumentManagementApi: import("../../api/client/index.js").ApiCli
427
426
  };
428
427
  credentials: true;
429
428
  data: {
430
- [bustCacheToken]: boolean;
429
+ bustCache: boolean;
431
430
  };
432
431
  cors: {
433
432
  accessControlAllowHeaders: string;
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { compileClient } from '../../api/client/index.js';
8
8
  import { defineApi } from '../../api/index.js';
9
9
  import { defaultAccessControlAllowHeaders } from '../../api/utils.js';
10
- import { bustCacheToken } from '../../http/tokens.js';
10
+ import { bustCache } from '../../http/tokens.js';
11
11
  import { ReplaceClass } from '../../injector/index.js';
12
12
  import { array, boolean, literal, number, object, optional, string } from '../../schema/index.js';
13
13
  import { DataStream } from '../../sse/index.js';
@@ -31,7 +31,7 @@ export const documentManagementApiDefinition = defineApi({
31
31
  result: (DataStream),
32
32
  credentials: true,
33
33
  data: {
34
- [bustCacheToken]: true,
34
+ [bustCache]: true,
35
35
  },
36
36
  cors: {
37
37
  accessControlAllowHeaders: `${defaultAccessControlAllowHeaders}, Cache-Control`,
@@ -107,7 +107,7 @@ export declare class HttpClientRequest implements Disposable {
107
107
  *
108
108
  * will not be used for actual request
109
109
  */
110
- context: Record<string>;
110
+ context: Record;
111
111
  /**
112
112
  * Can be used to cancel the request. Throws HttpError
113
113
  */
package/http/tokens.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * This can be used in the request context to indicate that the request should not be cached.
3
3
  * HttpClientAdapters should check for this token and bypass any caching mechanisms if it is present.
4
4
  */
5
- export declare const bustCacheToken: unique symbol;
5
+ export declare const bustCache = "bustCache";
package/http/tokens.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * This can be used in the request context to indicate that the request should not be cached.
3
3
  * HttpClientAdapters should check for this token and bypass any caching mechanisms if it is present.
4
4
  */
5
- export const bustCacheToken = Symbol('bustCacheToken');
5
+ export const bustCache = 'bustCache';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.92.153",
3
+ "version": "0.92.155",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"