@scalar/types 0.0.37 → 0.0.39

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,18 @@
1
1
  # @scalar/types
2
2
 
3
+ ## 0.0.39
4
+
5
+ ### Patch Changes
6
+
7
+ - bab7990: refactor: move HtmlRenderingConfiguration type to types package
8
+ - 2c621d4: refactor: move snippetz types to @scalar/types
9
+
10
+ ## 0.0.38
11
+
12
+ ### Patch Changes
13
+
14
+ - 7f1a40e: fix: hiddenClients can be a boolean
15
+
3
16
  ## 0.0.37
4
17
 
5
18
  ### Patch Changes
@@ -175,7 +175,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
175
175
  * List of httpsnippet clients to hide from the clients menu
176
176
  * By default hides Unirest, pass `[]` to show all clients
177
177
  */
178
- hiddenClients: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">]>>;
178
+ hiddenClients: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">, z.ZodLiteral<true>]>>;
179
179
  /** Determine the HTTP client that's selected by default */
180
180
  defaultHttpClient: z.ZodOptional<z.ZodObject<{
181
181
  targetKey: z.ZodType<"c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart", z.ZodTypeDef, "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart">;
@@ -351,7 +351,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
351
351
  forceDarkModeState?: "dark" | "light" | undefined;
352
352
  metaData?: any;
353
353
  favicon?: string | undefined;
354
- hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
354
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
355
355
  defaultHttpClient?: {
356
356
  targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
357
357
  clientKey: string;
@@ -412,7 +412,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
412
412
  hideDarkModeToggle?: unknown;
413
413
  metaData?: any;
414
414
  favicon?: string | undefined;
415
- hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
415
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
416
416
  defaultHttpClient?: {
417
417
  targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
418
418
  clientKey: string;
@@ -475,7 +475,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
475
475
  forceDarkModeState?: "dark" | "light" | undefined;
476
476
  metaData?: any;
477
477
  favicon?: string | undefined;
478
- hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
478
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
479
479
  defaultHttpClient?: {
480
480
  targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
481
481
  clientKey: string;
@@ -536,7 +536,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
536
536
  hideDarkModeToggle?: unknown;
537
537
  metaData?: any;
538
538
  favicon?: string | undefined;
539
- hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
539
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
540
540
  defaultHttpClient?: {
541
541
  targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
542
542
  clientKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgGvB,uCAAuC;AACvC,eAAO,MAAM,4BAA4B;IACvC,6BAA6B;;IAE7B,kCAAkC;;IAElC;;;OAGG;;IAEH,gDAAgD;;IAEhD,mFAAmF;;IAEnF,qCAAqC;;IAErC;;;OAGG;;IAEH,yCAAyC;;QAtCzC,yCAAyC;;QAEzC;;;;WAIG;;;;;;;;;IAkCH,+CAA+C;;IAE/C,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAElC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAKjF,0CAA0C;AAC1C,eAAO,MAAM,+BAA+B;IAlC1C,6BAA6B;;IAE7B,kCAAkC;;IAElC;;;OAGG;;IAEH,gDAAgD;;IAEhD,mFAAmF;;IAEnF,qCAAqC;;IAErC;;;OAGG;;IAEH,yCAAyC;;QAtCzC,yCAAyC;;QAEzC;;;;WAIG;;;;;;;;;IAkCH,+CAA+C;;IAE/C,kCAAkC;;;IAa9B;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH,4DAA4D;;IAE5D,mEAAmE;;IAEnE;;;OAGG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;OAGG;;IAEH,2DAA2D;;;;;;;;;;;IAO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yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,EAE/C,OAAO,CACR,CAAA"}
@@ -180,7 +180,9 @@ const apiReferenceConfigurationSchema = apiClientConfigurationSchema
180
180
  * List of httpsnippet clients to hide from the clients menu
181
181
  * By default hides Unirest, pass `[]` to show all clients
182
182
  */
183
- hiddenClients: z.union([z.record(z.union([z.boolean(), z.array(z.string())])), z.array(z.string())]).optional(),
183
+ hiddenClients: z
184
+ .union([z.record(z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)])
185
+ .optional(),
184
186
  /** Determine the HTTP client that's selected by default */
185
187
  defaultHttpClient: z
186
188
  .object({
@@ -0,0 +1,34 @@
1
+ import type { ApiReferenceConfiguration } from '../api-reference/api-reference-configuration.ts';
2
+ import { z } from 'zod';
3
+ /**
4
+ * Zod schema for HTML rendering configuration
5
+ */
6
+ export declare const htmlRenderingConfigurationSchema: z.ZodObject<{
7
+ /**
8
+ * The URL to the Scalar API Reference JS CDN.
9
+ *
10
+ * Use this to pin a specific version of the Scalar API Reference.
11
+ *
12
+ * @default https://cdn.jsdelivr.net/npm/@scalar/api-reference
13
+ *
14
+ * @example https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.122
15
+ */
16
+ cdn: z.ZodDefault<z.ZodOptional<z.ZodString>>;
17
+ /**
18
+ * The title of the page.
19
+ */
20
+ pageTitle: z.ZodDefault<z.ZodOptional<z.ZodString>>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ cdn: string;
23
+ pageTitle: string;
24
+ }, {
25
+ cdn?: string | undefined;
26
+ pageTitle?: string | undefined;
27
+ }>;
28
+ /**
29
+ * The configuration for the static HTML rendering using the CDN.
30
+ *
31
+ * It’s the ApiReferenceConfiguration, but extended with the `pageTitle` and `cdn` options.
32
+ */
33
+ export type HtmlRenderingConfiguration = ApiReferenceConfiguration & z.infer<typeof htmlRenderingConfigurationSchema>;
34
+ //# sourceMappingURL=html-rendering-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-rendering-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/html-rendering-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAA;AAC/F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,eAAO,MAAM,gCAAgC;IAC3C;;;;;;;;OAQG;;IAEH;;OAEG;;;;;;;;EAEH,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Zod schema for HTML rendering configuration
5
+ */
6
+ const htmlRenderingConfigurationSchema = z.object({
7
+ /**
8
+ * The URL to the Scalar API Reference JS CDN.
9
+ *
10
+ * Use this to pin a specific version of the Scalar API Reference.
11
+ *
12
+ * @default https://cdn.jsdelivr.net/npm/@scalar/api-reference
13
+ *
14
+ * @example https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.122
15
+ */
16
+ cdn: z.string().optional().default('https://cdn.jsdelivr.net/npm/@scalar/api-reference'),
17
+ /**
18
+ * The title of the page.
19
+ */
20
+ pageTitle: z.string().optional().default('Scalar API Reference'),
21
+ });
22
+
23
+ export { htmlRenderingConfigurationSchema };
@@ -1,3 +1,4 @@
1
1
  export * from './api-reference-configuration.ts';
2
+ export * from './html-rendering-configuration.ts';
2
3
  export { migrateThemeVariables } from './helpers/migrate-theme-variables.ts';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-reference/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-reference/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AAEjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA"}
@@ -1,2 +1,3 @@
1
1
  export { apiClientConfigurationSchema, apiReferenceConfigurationSchema } from './api-reference-configuration.js';
2
+ export { htmlRenderingConfigurationSchema } from './html-rendering-configuration.js';
2
3
  export { migrateThemeVariables } from './helpers/migrate-theme-variables.js';
@@ -1,6 +1,6 @@
1
1
  import type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
2
2
  import type { UseSeoMetaInput } from '@unhead/schema';
3
- import type { HarRequest, TargetId } from '../external/index.ts';
3
+ import type { HarRequest, TargetId } from '../snippetz/index.ts';
4
4
  /**
5
5
  * This re-export is needed due to a typescript issue
6
6
  * @see https://github.com/microsoft/TypeScript/issues/42873
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snippetz/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -0,0 +1 @@
1
+ export { AVAILABLE_CLIENTS } from './snippetz.js';
@@ -0,0 +1,42 @@
1
+ import type { Request as HarRequest } from 'har-format';
2
+ export type { Request as HarRequest } from 'har-format';
3
+ /**
4
+ * List of available clients
5
+ */
6
+ export declare const AVAILABLE_CLIENTS: readonly ["c/libcurl", "clojure/clj_http", "csharp/httpclient", "csharp/restsharp", "go/native", "http/http1.1", "java/asynchttp", "java/nethttp", "java/okhttp", "java/unirest", "js/axios", "js/fetch", "js/jquery", "js/ofetch", "js/xhr", "kotlin/okhttp", "node/axios", "node/fetch", "node/ofetch", "node/undici", "objc/nsurlsession", "ocaml/cohttp", "php/curl", "php/guzzle", "powershell/restmethod", "powershell/webrequest", "python/python3", "python/requests", "r/httr", "ruby/native", "shell/curl", "shell/httpie", "shell/wget", "swift/nsurlsession", "dart/http"];
7
+ export type AvailableClients = typeof AVAILABLE_CLIENTS;
8
+ /** Programming language */
9
+ export type TargetId = AvailableClients[number] extends `${infer T}/${string}` ? T : never;
10
+ /** Configuration for a target */
11
+ export type Target = {
12
+ [K in TargetId]: {
13
+ key: K;
14
+ title: string;
15
+ default: ClientId<K>;
16
+ clients: Plugin[];
17
+ };
18
+ }[TargetId];
19
+ /** HTTP client */
20
+ export type ClientId<T extends string> = T extends TargetId ? Extract<AvailableClients[number], `${T}/${string}`> extends `${T}/${infer C}` ? C : never : never;
21
+ /** What any plugins needs to return */
22
+ export type Plugin = {
23
+ /** The language or environment. */
24
+ target: TargetId;
25
+ /** The identifier of the client. */
26
+ client: ClientId<TargetId>;
27
+ /** The title of the client. */
28
+ title: string;
29
+ /** The actual source code. */
30
+ generate: (request?: Partial<HarRequest>, configuration?: PluginConfiguration) => string;
31
+ };
32
+ /**
33
+ * Optional configuration for any plugin
34
+ */
35
+ export type PluginConfiguration = {
36
+ /** Credentials to add HTTP Basic Authentication */
37
+ auth?: {
38
+ username: string;
39
+ password: string;
40
+ };
41
+ };
42
+ //# sourceMappingURL=snippetz.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../../src/snippetz/snippetz.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvD,YAAY,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvD;;GAEG;AACH,eAAO,MAAM,iBAAiB,wjBAoCpB,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAA;AAEvD,2BAA2B;AAC3B,MAAM,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAA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+ 'java/nethttp',
13
+ 'java/okhttp',
14
+ 'java/unirest',
15
+ 'js/axios',
16
+ 'js/fetch',
17
+ 'js/jquery',
18
+ 'js/ofetch',
19
+ 'js/xhr',
20
+ 'kotlin/okhttp',
21
+ 'node/axios',
22
+ 'node/fetch',
23
+ 'node/ofetch',
24
+ 'node/undici',
25
+ 'objc/nsurlsession',
26
+ 'ocaml/cohttp',
27
+ 'php/curl',
28
+ 'php/guzzle',
29
+ 'powershell/restmethod',
30
+ 'powershell/webrequest',
31
+ 'python/python3',
32
+ 'python/requests',
33
+ 'r/httr',
34
+ 'ruby/native',
35
+ 'shell/curl',
36
+ 'shell/httpie',
37
+ 'shell/wget',
38
+ 'swift/nsurlsession',
39
+ 'dart/http',
40
+ ];
41
+
42
+ export { AVAILABLE_CLIENTS };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=snippetz.test-d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snippetz.test-d.d.ts","sourceRoot":"","sources":["../../src/snippetz/snippetz.test-d.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "scalar",
17
17
  "references"
18
18
  ],
19
- "version": "0.0.37",
19
+ "version": "0.0.39",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -33,16 +33,16 @@
33
33
  "types": "./dist/utils/index.d.ts",
34
34
  "default": "./dist/utils/index.js"
35
35
  },
36
+ "./snippetz": {
37
+ "import": "./dist/snippetz/index.js",
38
+ "types": "./dist/snippetz/index.d.ts",
39
+ "default": "./dist/snippetz/index.js"
40
+ },
36
41
  "./legacy": {
37
42
  "import": "./dist/legacy/index.js",
38
43
  "types": "./dist/legacy/index.d.ts",
39
44
  "default": "./dist/legacy/index.js"
40
45
  },
41
- "./external": {
42
- "import": "./dist/external/index.js",
43
- "types": "./dist/external/index.d.ts",
44
- "default": "./dist/external/index.js"
45
- },
46
46
  "./api-reference": {
47
47
  "import": "./dist/api-reference/index.js",
48
48
  "types": "./dist/api-reference/index.d.ts",
@@ -59,9 +59,9 @@
59
59
  "@scalar/openapi-types": "0.1.9"
60
60
  },
61
61
  "devDependencies": {
62
+ "@types/har-format": "^1.2.15",
62
63
  "vite": "^5.4.10",
63
64
  "vitest": "^1.6.0",
64
- "@scalar/snippetz": "0.2.15",
65
65
  "@scalar/build-tooling": "0.1.16"
66
66
  },
67
67
  "scripts": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/external/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -1 +0,0 @@
1
-
@@ -1,2 +0,0 @@
1
- export type { HarRequest, TargetId, ClientId } from '@scalar/snippetz/types';
2
- //# sourceMappingURL=snippetz.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../../src/external/snippetz.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA"}
File without changes