@scalar/types 0.5.7 → 0.5.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @scalar/types
2
2
 
3
+ ## 0.5.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#7866](https://github.com/scalar/scalar/pull/7866): chore: expose har types
8
+
9
+ ## 0.5.8
10
+
11
+ ### Patch Changes
12
+
13
+ #### Updated Dependencies
14
+
15
+ - **@scalar/helpers@0.2.8**
16
+ - [#7751](https://github.com/scalar/scalar/pull/7751): fix: auth persistence
17
+
3
18
  ## 0.5.7
4
19
 
5
20
  ### Patch Changes
@@ -8,7 +8,7 @@ export declare const securityApiKeySchema: z.ZodObject<{
8
8
  query: "query";
9
9
  header: "header";
10
10
  }>>>>;
11
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
11
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
12
12
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
13
13
  value: z.ZodDefault<z.ZodString>;
14
14
  }, z.core.$strip>;
@@ -21,7 +21,7 @@ export declare const securityHttpSchema: z.ZodObject<{
21
21
  bearer: "bearer";
22
22
  }>>>>;
23
23
  bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"JWT">, z.ZodString]>>>;
24
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
24
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
25
25
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
26
26
  username: z.ZodDefault<z.ZodString>;
27
27
  password: z.ZodDefault<z.ZodString>;
@@ -32,7 +32,7 @@ export declare const securityOpenIdSchema: z.ZodObject<{
32
32
  description: z.ZodOptional<z.ZodString>;
33
33
  type: z.ZodLiteral<"openIdConnect">;
34
34
  openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
35
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
35
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
36
36
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
37
37
  }, z.core.$strip>;
38
38
  export type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>;
@@ -117,7 +117,7 @@ export declare const securityOauthSchema: z.ZodObject<{
117
117
  }>>;
118
118
  }, z.core.$strip>>;
119
119
  }, z.core.$strip>>;
120
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
120
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
121
121
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
122
122
  }, z.core.$strip>;
123
123
  export type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>;
@@ -248,7 +248,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
248
248
  query: "query";
249
249
  header: "header";
250
250
  }>>>>;
251
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
251
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
252
252
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
253
253
  value: z.ZodDefault<z.ZodString>;
254
254
  }, z.core.$strip>, z.ZodObject<{
@@ -259,7 +259,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
259
259
  bearer: "bearer";
260
260
  }>>>>;
261
261
  bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"JWT">, z.ZodString]>>>;
262
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
262
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
263
263
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
264
264
  username: z.ZodDefault<z.ZodString>;
265
265
  password: z.ZodDefault<z.ZodString>;
@@ -268,7 +268,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
268
268
  description: z.ZodOptional<z.ZodString>;
269
269
  type: z.ZodLiteral<"openIdConnect">;
270
270
  openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
271
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
271
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
272
272
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
273
273
  }, z.core.$strip>, z.ZodObject<{
274
274
  description: z.ZodOptional<z.ZodString>;
@@ -349,7 +349,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
349
349
  }>>;
350
350
  }, z.core.$strip>>;
351
351
  }, z.core.$strip>>;
352
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
352
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
353
353
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
354
354
  }, z.core.$strip>], "type">, z.ZodTransform<{
355
355
  type: "apiKey";
@@ -1,3 +1,3 @@
1
- export type { AvailableClient, AvailableClients, ClientId, FormDataParam, HarRequest, Plugin, PluginConfiguration, PostDataCommon, Target, TargetId, } from './snippetz.js';
1
+ export type { AvailableClient, AvailableClients, ClientId, FormDataParam, HarRequest, HarResponse, Plugin, PluginConfiguration, PostDataCommon, Target, TargetId, } from './snippetz.js';
2
2
  export { AVAILABLE_CLIENTS, GROUPED_CLIENTS } from './snippetz.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snippetz/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,UAAU,EACV,MAAM,EACN,mBAAmB,EACnB,cAAc,EACd,MAAM,EACN,QAAQ,GACT,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snippetz/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,UAAU,EACV,WAAW,EACX,MAAM,EACN,mBAAmB,EACnB,cAAc,EACd,MAAM,EACN,QAAQ,GACT,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/snippetz/index.ts"],
4
- "sourcesContent": ["export type {\n AvailableClient,\n AvailableClients,\n ClientId,\n FormDataParam,\n HarRequest,\n Plugin,\n PluginConfiguration,\n PostDataCommon,\n Target,\n TargetId,\n} from './snippetz'\nexport { AVAILABLE_CLIENTS, GROUPED_CLIENTS } from './snippetz'\n"],
5
- "mappings": "AAYA,SAAS,mBAAmB,uBAAuB;",
4
+ "sourcesContent": ["export type {\n AvailableClient,\n AvailableClients,\n ClientId,\n FormDataParam,\n HarRequest,\n HarResponse,\n Plugin,\n PluginConfiguration,\n PostDataCommon,\n Target,\n TargetId,\n} from './snippetz'\nexport { AVAILABLE_CLIENTS, GROUPED_CLIENTS } from './snippetz'\n"],
5
+ "mappings": "AAaA,SAAS,mBAAmB,uBAAuB;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import type { Request as HarRequest } from 'har-format';
2
- export type { Param as FormDataParam, PostDataCommon, Request as HarRequest, } from 'har-format';
2
+ export type { Param as FormDataParam, PostDataCommon, Request as HarRequest, Response as HarResponse, } from 'har-format';
3
3
  /**
4
4
  * Maps programming languages and environments to their available HTTP clients.
5
5
  * Each key is a target (language/environment), and each value is an array of
@@ -1 +1 @@
1
- {"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../../src/snippetz/snippetz.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvD,YAAY,EACV,KAAK,IAAI,aAAa,EACtB,cAAc,EACd,OAAO,IAAI,UAAU,GACtB,MAAM,YAAY,CAAA;AAEnB;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;CAsBlB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,iBAAiB,gkWAE7B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAA;AAEvD;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;AAEtD;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,eAAe,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,QAAQ,IAAI,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9E;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG;KAClB,CAAC,IAAI,QAAQ,GAAG;QACf,6CAA6C;QAC7C,GAAG,EAAE,CAAC,CAAA;QACN,0CAA0C;QAC1C,KAAK,EAAE,MAAM,CAAA;QACb,iDAAiD;QACjD,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;QACpB,oDAAoD;QACpD,OAAO,EAAE,MAAM,EAAE,CAAA;KAClB;CACF,CAAC,QAAQ,CAAC,CAAA;AAEX;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,uDAAuD;IACvD,MAAM,EAAE,QAAQ,CAAA;IAChB,2DAA2D;IAC3D,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1B,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,EAAE,mBAAmB,KAAK,MAAM,CAAA;CACzF,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,iDAAiD;IACjD,IAAI,CAAC,EAAE;QACL,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;CACF,CAAA"}
1
+ {"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../../src/snippetz/snippetz.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvD,YAAY,EACV,KAAK,IAAI,aAAa,EACtB,cAAc,EACd,OAAO,IAAI,UAAU,EACrB,QAAQ,IAAI,WAAW,GACxB,MAAM,YAAY,CAAA;AAEnB;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;CAsBlB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,iBAAiB,gkWAE7B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAA;AAEvD;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;AAEtD;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,eAAe,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,QAAQ,IAAI,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9E;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG;KAClB,CAAC,IAAI,QAAQ,GAAG;QACf,6CAA6C;QAC7C,GAAG,EAAE,CAAC,CAAA;QACN,0CAA0C;QAC1C,KAAK,EAAE,MAAM,CAAA;QACb,iDAAiD;QACjD,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;QACpB,oDAAoD;QACpD,OAAO,EAAE,MAAM,EAAE,CAAA;KAClB;CACF,CAAC,QAAQ,CAAC,CAAA;AAEX;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,uDAAuD;IACvD,MAAM,EAAE,QAAQ,CAAA;IAChB,2DAA2D;IAC3D,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1B,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,EAAE,mBAAmB,KAAK,MAAM,CAAA;CACzF,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,iDAAiD;IACjD,IAAI,CAAC,EAAE;QACL,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;CACF,CAAA"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/snippetz/snippetz.ts"],
4
- "sourcesContent": ["import { objectEntries } from '@scalar/helpers/object/object-entries'\nimport type { Request as HarRequest } from 'har-format'\n\nexport type {\n Param as FormDataParam,\n PostDataCommon,\n Request as HarRequest,\n} from 'har-format'\n\n/**\n * Maps programming languages and environments to their available HTTP clients.\n * Each key is a target (language/environment), and each value is an array of\n * client identifiers in the format `target/client`.\n *\n * This is the source of truth for all supported code generation targets.\n */\nexport const GROUPED_CLIENTS = {\n c: ['libcurl'],\n clojure: ['clj_http'],\n csharp: ['httpclient', 'restsharp'],\n dart: ['http'],\n fsharp: ['httpclient'],\n go: ['native'],\n http: ['http1.1'],\n java: ['asynchttp', 'nethttp', 'okhttp', 'unirest'],\n js: ['axios', 'fetch', 'jquery', 'ofetch', 'xhr'],\n kotlin: ['okhttp'],\n node: ['axios', 'fetch', 'ofetch', 'undici'],\n objc: ['nsurlsession'],\n ocaml: ['cohttp'],\n php: ['curl', 'guzzle'],\n powershell: ['restmethod', 'webrequest'],\n python: ['python3', 'requests', 'httpx_sync', 'httpx_async'],\n r: ['httr'],\n ruby: ['native'],\n rust: ['reqwest'],\n shell: ['curl', 'httpie', 'wget'],\n swift: ['nsurlsession'],\n} as const\n\n/**\n * Flat array of all available client identifiers.\n * Each identifier follows the format `target/client` (e.g., `js/fetch`, `python/requests`).\n */\nexport const AVAILABLE_CLIENTS = objectEntries(GROUPED_CLIENTS).flatMap(([group, clients]) =>\n clients.map((client) => `${group}/${client}` as const),\n)\n\n/**\n * All available client identifiers in array format\n * @example\n * ```typescript\n * const clients: AvailableClients = ['js/fetch', 'python/requests', 'shell/curl']\n * ```\n */\nexport type AvailableClients = typeof AVAILABLE_CLIENTS\n\n/**\n * A single available client identifier.\n * @example\n * ```typescript\n * const client: AvailableClient = 'js/fetch'\n * ```\n */\nexport type AvailableClient = AvailableClients[number]\n\n/**\n * A programming language or environment identifier.\n * @example\n * ```typescript\n * const targetId: TargetId = 'js'\n * ```\n */\nexport type TargetId = keyof typeof GROUPED_CLIENTS\n\n/**\n * Extracts the client name from a full client identifier for a given target.\n * For example, for target `js`, this extracts `fetch` from `js/fetch`.\n *\n * @template T - The target identifier (e.g., `js`, `python`)\n */\nexport type ClientId<T extends TargetId> = (typeof GROUPED_CLIENTS)[T][number]\n\n/**\n * Configuration for a specific target (language/environment).\n * Contains metadata about the target and its available clients.\n */\nexport type Target = {\n [K in TargetId]: {\n /** The unique identifier for this target. */\n key: K\n /** Human-readable name for the target. */\n title: string\n /** The default client to use for this target. */\n default: ClientId<K>\n /** All available client plugins for this target. */\n clients: Plugin[]\n }\n}[TargetId]\n\n/**\n * A code generation plugin for a specific HTTP client.\n * Each plugin knows how to convert an HTTP request into source code\n * for its target language and client library.\n */\nexport type Plugin = {\n /** The language or environment this plugin targets. */\n target: TargetId\n /** The identifier of the HTTP client within the target. */\n client: ClientId<TargetId>\n /** Human-readable name for the client. */\n title: string\n /** Generates source code for the given HTTP request. */\n generate: (request?: Partial<HarRequest>, configuration?: PluginConfiguration) => string\n}\n\n/**\n * Optional configuration that can be passed to any code generation plugin.\n * Plugins may use this to customize the generated code.\n */\nexport type PluginConfiguration = {\n /** Credentials for HTTP Basic Authentication. */\n auth?: {\n username: string\n password: string\n }\n}\n"],
5
- "mappings": "AAAA,SAAS,qBAAqB;AAgBvB,MAAM,kBAAkB;AAAA,EAC7B,GAAG,CAAC,SAAS;AAAA,EACb,SAAS,CAAC,UAAU;AAAA,EACpB,QAAQ,CAAC,cAAc,WAAW;AAAA,EAClC,MAAM,CAAC,MAAM;AAAA,EACb,QAAQ,CAAC,YAAY;AAAA,EACrB,IAAI,CAAC,QAAQ;AAAA,EACb,MAAM,CAAC,SAAS;AAAA,EAChB,MAAM,CAAC,aAAa,WAAW,UAAU,SAAS;AAAA,EAClD,IAAI,CAAC,SAAS,SAAS,UAAU,UAAU,KAAK;AAAA,EAChD,QAAQ,CAAC,QAAQ;AAAA,EACjB,MAAM,CAAC,SAAS,SAAS,UAAU,QAAQ;AAAA,EAC3C,MAAM,CAAC,cAAc;AAAA,EACrB,OAAO,CAAC,QAAQ;AAAA,EAChB,KAAK,CAAC,QAAQ,QAAQ;AAAA,EACtB,YAAY,CAAC,cAAc,YAAY;AAAA,EACvC,QAAQ,CAAC,WAAW,YAAY,cAAc,aAAa;AAAA,EAC3D,GAAG,CAAC,MAAM;AAAA,EACV,MAAM,CAAC,QAAQ;AAAA,EACf,MAAM,CAAC,SAAS;AAAA,EAChB,OAAO,CAAC,QAAQ,UAAU,MAAM;AAAA,EAChC,OAAO,CAAC,cAAc;AACxB;AAMO,MAAM,oBAAoB,cAAc,eAAe,EAAE;AAAA,EAAQ,CAAC,CAAC,OAAO,OAAO,MACtF,QAAQ,IAAI,CAAC,WAAW,GAAG,KAAK,IAAI,MAAM,EAAW;AACvD;",
4
+ "sourcesContent": ["import { objectEntries } from '@scalar/helpers/object/object-entries'\nimport type { Request as HarRequest } from 'har-format'\n\nexport type {\n Param as FormDataParam,\n PostDataCommon,\n Request as HarRequest,\n Response as HarResponse,\n} from 'har-format'\n\n/**\n * Maps programming languages and environments to their available HTTP clients.\n * Each key is a target (language/environment), and each value is an array of\n * client identifiers in the format `target/client`.\n *\n * This is the source of truth for all supported code generation targets.\n */\nexport const GROUPED_CLIENTS = {\n c: ['libcurl'],\n clojure: ['clj_http'],\n csharp: ['httpclient', 'restsharp'],\n dart: ['http'],\n fsharp: ['httpclient'],\n go: ['native'],\n http: ['http1.1'],\n java: ['asynchttp', 'nethttp', 'okhttp', 'unirest'],\n js: ['axios', 'fetch', 'jquery', 'ofetch', 'xhr'],\n kotlin: ['okhttp'],\n node: ['axios', 'fetch', 'ofetch', 'undici'],\n objc: ['nsurlsession'],\n ocaml: ['cohttp'],\n php: ['curl', 'guzzle'],\n powershell: ['restmethod', 'webrequest'],\n python: ['python3', 'requests', 'httpx_sync', 'httpx_async'],\n r: ['httr'],\n ruby: ['native'],\n rust: ['reqwest'],\n shell: ['curl', 'httpie', 'wget'],\n swift: ['nsurlsession'],\n} as const\n\n/**\n * Flat array of all available client identifiers.\n * Each identifier follows the format `target/client` (e.g., `js/fetch`, `python/requests`).\n */\nexport const AVAILABLE_CLIENTS = objectEntries(GROUPED_CLIENTS).flatMap(([group, clients]) =>\n clients.map((client) => `${group}/${client}` as const),\n)\n\n/**\n * All available client identifiers in array format\n * @example\n * ```typescript\n * const clients: AvailableClients = ['js/fetch', 'python/requests', 'shell/curl']\n * ```\n */\nexport type AvailableClients = typeof AVAILABLE_CLIENTS\n\n/**\n * A single available client identifier.\n * @example\n * ```typescript\n * const client: AvailableClient = 'js/fetch'\n * ```\n */\nexport type AvailableClient = AvailableClients[number]\n\n/**\n * A programming language or environment identifier.\n * @example\n * ```typescript\n * const targetId: TargetId = 'js'\n * ```\n */\nexport type TargetId = keyof typeof GROUPED_CLIENTS\n\n/**\n * Extracts the client name from a full client identifier for a given target.\n * For example, for target `js`, this extracts `fetch` from `js/fetch`.\n *\n * @template T - The target identifier (e.g., `js`, `python`)\n */\nexport type ClientId<T extends TargetId> = (typeof GROUPED_CLIENTS)[T][number]\n\n/**\n * Configuration for a specific target (language/environment).\n * Contains metadata about the target and its available clients.\n */\nexport type Target = {\n [K in TargetId]: {\n /** The unique identifier for this target. */\n key: K\n /** Human-readable name for the target. */\n title: string\n /** The default client to use for this target. */\n default: ClientId<K>\n /** All available client plugins for this target. */\n clients: Plugin[]\n }\n}[TargetId]\n\n/**\n * A code generation plugin for a specific HTTP client.\n * Each plugin knows how to convert an HTTP request into source code\n * for its target language and client library.\n */\nexport type Plugin = {\n /** The language or environment this plugin targets. */\n target: TargetId\n /** The identifier of the HTTP client within the target. */\n client: ClientId<TargetId>\n /** Human-readable name for the client. */\n title: string\n /** Generates source code for the given HTTP request. */\n generate: (request?: Partial<HarRequest>, configuration?: PluginConfiguration) => string\n}\n\n/**\n * Optional configuration that can be passed to any code generation plugin.\n * Plugins may use this to customize the generated code.\n */\nexport type PluginConfiguration = {\n /** Credentials for HTTP Basic Authentication. */\n auth?: {\n username: string\n password: string\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,qBAAqB;AAiBvB,MAAM,kBAAkB;AAAA,EAC7B,GAAG,CAAC,SAAS;AAAA,EACb,SAAS,CAAC,UAAU;AAAA,EACpB,QAAQ,CAAC,cAAc,WAAW;AAAA,EAClC,MAAM,CAAC,MAAM;AAAA,EACb,QAAQ,CAAC,YAAY;AAAA,EACrB,IAAI,CAAC,QAAQ;AAAA,EACb,MAAM,CAAC,SAAS;AAAA,EAChB,MAAM,CAAC,aAAa,WAAW,UAAU,SAAS;AAAA,EAClD,IAAI,CAAC,SAAS,SAAS,UAAU,UAAU,KAAK;AAAA,EAChD,QAAQ,CAAC,QAAQ;AAAA,EACjB,MAAM,CAAC,SAAS,SAAS,UAAU,QAAQ;AAAA,EAC3C,MAAM,CAAC,cAAc;AAAA,EACrB,OAAO,CAAC,QAAQ;AAAA,EAChB,KAAK,CAAC,QAAQ,QAAQ;AAAA,EACtB,YAAY,CAAC,cAAc,YAAY;AAAA,EACvC,QAAQ,CAAC,WAAW,YAAY,cAAc,aAAa;AAAA,EAC3D,GAAG,CAAC,MAAM;AAAA,EACV,MAAM,CAAC,QAAQ;AAAA,EACf,MAAM,CAAC,SAAS;AAAA,EAChB,OAAO,CAAC,QAAQ,UAAU,MAAM;AAAA,EAChC,OAAO,CAAC,cAAc;AACxB;AAMO,MAAM,oBAAoB,cAAc,eAAe,EAAE;AAAA,EAAQ,CAAC,CAAC,OAAO,OAAO,MACtF,QAAQ,IAAI,CAAC,WAAW,GAAG,KAAK,IAAI,MAAM,EAAW;AACvD;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "scalar",
17
17
  "references"
18
18
  ],
19
- "version": "0.5.7",
19
+ "version": "0.5.9",
20
20
  "engines": {
21
21
  "node": ">=20"
22
22
  },
@@ -59,14 +59,14 @@
59
59
  "CHANGELOG.md"
60
60
  ],
61
61
  "dependencies": {
62
- "nanoid": "5.1.5",
63
- "type-fest": "5.0.0",
64
- "zod": "^4.1.11",
65
- "@scalar/helpers": "0.2.7"
62
+ "nanoid": "^5.1.6",
63
+ "type-fest": "^5.3.1",
64
+ "zod": "^4.3.5",
65
+ "@scalar/helpers": "0.2.8"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/har-format": "^1.2.15",
69
- "vite": "7.1.11",
69
+ "vite": "^7.3.1",
70
70
  "@scalar/build-tooling": "0.4.1"
71
71
  },
72
72
  "scripts": {