Skip to content

Commit 7842106

Browse files
committed
added highlighting
1 parent 33a675c commit 7842106

File tree

15 files changed

+366
-207
lines changed

15 files changed

+366
-207
lines changed

.speakeasy/gen.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ id: 521af75f-d011-41f9-a5ff-9f8033773118
33
management:
44
docChecksum: a0841885f1d2df6bf65c33550d1be776
55
docVersion: 0.4.0
6-
speakeasyVersion: 1.468.0
7-
generationVersion: 2.492.3
8-
releaseVersion: 2.0.12
9-
configChecksum: c27aaa83187732b257c2a86fbfc4b1c5
6+
speakeasyVersion: 1.468.5
7+
generationVersion: 2.493.11
8+
releaseVersion: 2.0.13
9+
configChecksum: bb0274b648f58e16f339f488f406677b
1010
repoURL: https://github.com/speakeasy-api/speakeasy-code-samples-ts.git
1111
installationURL: https://github.com/speakeasy-api/speakeasy-code-samples-ts
1212
published: true
1313
features:
1414
typescript:
1515
additionalDependencies: 0.1.0
16-
core: 3.18.12
16+
core: 3.18.14
1717
defaultEnabledRetries: 0.1.0
1818
devContainers: 2.90.0
1919
envVarSecurityUsage: 0.1.2

.speakeasy/gen.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ generation:
1616
oAuth2ClientCredentialsEnabled: false
1717
oAuth2PasswordEnabled: false
1818
typescript:
19-
version: 2.0.12
19+
version: 2.0.13
2020
additionalDependencies:
2121
dependencies: {}
2222
devDependencies: {}
23-
peerDependencies: {}
23+
peerDependencies:
24+
highlight.js: ^11.11.1
2425
additionalPackageJSON: {}
2526
author: Speakeasy
2627
clientServerStatusCodesAsErrors: true
2728
defaultErrorName: APIError
29+
enableCustomCodeRegions: false
2830
enableReactQuery: true
2931
enumFormat: enum
3032
flattenGlobalSecurity: true

.speakeasy/workflow.lock

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.468.0
1+
speakeasyVersion: 1.468.5
22
sources:
33
speakeasy-OAS:
44
sourceNamespace: speakeasy-oas
@@ -13,8 +13,6 @@ targets:
1313
sourceNamespace: speakeasy-oas
1414
sourceRevisionDigest: sha256:eccb5c0b494c102a3985fedd96b152ad956b8be90681e6f5f21b5756463f66ab
1515
sourceBlobDigest: sha256:6d9de4a70686f4366747b9dbf16917300a43dea8857ad6583f35ef3531bffbdb
16-
codeSamplesNamespace: speakeasy-oas-typescript-code-samples
17-
codeSamplesRevisionDigest: sha256:b21e9f5e10bf036c791b2e888f9d5eb8177a85f23f84ebdd01bac5bc90f418f3
1816
workflow:
1917
workflowVersion: 1.0.0
2018
speakeasyVersion: latest

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": "@speakeasyapi/code-samples",
5-
"version": "2.0.12",
5+
"version": "2.0.13",
66
"exports": {
77
".": "./src/index.ts",
88
"./models/errors": "./src/models/errors/index.ts",

package-lock.json

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@speakeasyapi/code-samples",
3-
"version": "2.0.12",
3+
"version": "2.0.13",
44
"author": "Speakeasy",
55
"type": "module",
66
"main": "./esm/index.js",
@@ -54,6 +54,7 @@
5454
},
5555
"peerDependencies": {
5656
"@tanstack/react-query": "^5",
57+
"highlight.js": "^11.11.1",
5758
"react": "^18 || ^19",
5859
"react-dom": "^18 || ^19",
5960
"zod": ">= 3"

src/funcs/codeSamplesGet.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import { SpeakeasyCodeSamplesCore } from "../core.js";
66
import { encodeFormQuery } from "../lib/encodings.js";
77
import * as M from "../lib/matchers.js";
8+
import { compactMap } from "../lib/primitives.js";
89
import { safeParse } from "../lib/schemas.js";
910
import { RequestOptions } from "../lib/sdks.js";
1011
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
@@ -65,9 +66,9 @@ export async function codeSamplesGet(
6566
"registry_url": payload.registry_url ?? client._options.registryUrl,
6667
});
6768

68-
const headers = new Headers({
69+
const headers = new Headers(compactMap({
6970
Accept: "application/json",
70-
});
71+
}));
7172

7273
const secConfig = await extractSecurity(client._options.apiKey);
7374
const securityInput = secConfig == null ? {} : { apiKey: secConfig };

src/lib/clsx.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export function clsx(...args: Array<string | undefined>) {
2+
let i = 0,
3+
tmp,
4+
str = "";
5+
const len = args.length;
6+
for (; i < len; i++) {
7+
if ((tmp = args[i])) {
8+
if (typeof tmp === "string") {
9+
str += (str && " ") + tmp;
10+
}
11+
}
12+
}
13+
return str;
14+
}

src/lib/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
5757
export const SDK_METADATA = {
5858
language: "typescript",
5959
openapiDocVersion: "0.4.0",
60-
sdkVersion: "2.0.12",
61-
genVersion: "2.492.3",
60+
sdkVersion: "2.0.13",
61+
genVersion: "2.493.11",
6262
userAgent:
63-
"speakeasy-sdk/typescript 2.0.12 2.492.3 0.4.0 @speakeasyapi/code-samples",
63+
"speakeasy-sdk/typescript 2.0.13 2.493.11 0.4.0 @speakeasyapi/code-samples",
6464
} as const;

0 commit comments

Comments
 (0)