@sentry/api 0.433.0 → 0.435.0

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,4 +1,4 @@
1
- import { type ClientOptions, type Config } from './client';
1
+ import { type ClientOptions, type Config, type PreparedClient } from './client';
2
2
  import type { ClientOptions as ClientOptions2 } from './types.gen';
3
3
  /**
4
4
  * The `createClientConfig()` function will be called on client initialization
@@ -9,4 +9,8 @@ import type { ClientOptions as ClientOptions2 } from './types.gen';
9
9
  * to ensure your client always has the correct values.
10
10
  */
11
11
  export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
12
- export declare const client: import("./client").PreparedClient;
12
+ /**
13
+ * The default client used when an operation is called without `client`.
14
+ * It is created on first use so importing the SDK stays free of eager work.
15
+ */
16
+ export declare const client: PreparedClient;
package/dist/index.js CHANGED
@@ -27,14 +27,6 @@ var formDataBodySerializer = {
27
27
  var jsonBodySerializer = {
28
28
  bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
29
29
  };
30
- // src/core/params.gen.ts
31
- var extraPrefixesMap = {
32
- $body_: "body",
33
- $headers_: "headers",
34
- $path_: "path",
35
- $query_: "query"
36
- };
37
- var extraPrefixes = Object.entries(extraPrefixesMap);
38
30
  // src/sentry-errors.ts
39
31
  class SentryApiError extends Error {
40
32
  status;
@@ -873,7 +865,10 @@ var createClient = (config = {}) => {
873
865
  };
874
866
  };
875
867
  // src/client.gen.ts
876
- var client = createClient(createConfig());
868
+ var defaultClient;
869
+ var client = /* @__PURE__ */ new Proxy({}, {
870
+ get: (_target, key) => Reflect.get(defaultClient ??= createClient(createConfig()), key)
871
+ });
877
872
 
878
873
  // src/sdk.gen.ts
879
874
  var listOrganizations = (...[options]) => (options?.client ?? client).get({