Skip to content

Commit 481800f

Browse files
chore: run prettier
1 parent 41a7d8f commit 481800f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+804
-771
lines changed

.devcontainer/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<div align="center">
32
<a href="https://codespaces.new/speakeasy-api/speakeasy-code-samples-ts.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
43
</div>

.devcontainer/devcontainer.json

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,43 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/images/tree/main/src/typescript-node
33
{
4-
"name": "TypeScript",
5-
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
6-
// Features to add to the dev container. More info: https://containers.dev/features.
7-
// "features": {},
8-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
9-
// "forwardPorts": [],
10-
// Use 'postCreateCommand' to run commands after the container is created.
11-
"postCreateCommand": "sudo chmod +x ./.devcontainer/setup.sh && ./.devcontainer/setup.sh",
12-
"customizations": {
13-
"vscode": {
14-
"extensions": [
15-
"ms-vscode.vscode-typescript-tslint-plugin",
16-
"esbenp.prettier-vscode",
17-
"github.vscode-pull-request-github"
18-
],
19-
"settings": {
20-
"files.eol": "\n",
21-
"editor.formatOnSave": true,
22-
"typescript.tsc.autoDetect": "on",
23-
"typescript.updateImportsOnFileMove.enabled": "always",
24-
"typescript.preferences.importModuleSpecifier": "relative",
25-
"[typescript]": {
26-
"editor.codeActionsOnSave": {
27-
"source.organizeImports": true
28-
}
29-
},
30-
"[typescriptreact]": {
31-
"editor.codeActionsOnSave": {
32-
"source.organizeImports": true
33-
}
34-
}
35-
}
4+
"name": "TypeScript",
5+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
6+
// Features to add to the dev container. More info: https://containers.dev/features.
7+
// "features": {},
8+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
9+
// "forwardPorts": [],
10+
// Use 'postCreateCommand' to run commands after the container is created.
11+
"postCreateCommand": "sudo chmod +x ./.devcontainer/setup.sh && ./.devcontainer/setup.sh",
12+
"customizations": {
13+
"vscode": {
14+
"extensions": [
15+
"ms-vscode.vscode-typescript-tslint-plugin",
16+
"esbenp.prettier-vscode",
17+
"github.vscode-pull-request-github"
18+
],
19+
"settings": {
20+
"files.eol": "\n",
21+
"editor.formatOnSave": true,
22+
"typescript.tsc.autoDetect": "on",
23+
"typescript.updateImportsOnFileMove.enabled": "always",
24+
"typescript.preferences.importModuleSpecifier": "relative",
25+
"[typescript]": {
26+
"editor.codeActionsOnSave": {
27+
"source.organizeImports": true
28+
}
3629
},
37-
"codespaces": {
38-
"openFiles": [
39-
".devcontainer/README.md"
40-
]
30+
"[typescriptreact]": {
31+
"editor.codeActionsOnSave": {
32+
"source.organizeImports": true
33+
}
4134
}
35+
}
36+
},
37+
"codespaces": {
38+
"openFiles": [".devcontainer/README.md"]
4239
}
43-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
44-
// "remoteUser": "root"
40+
}
41+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
42+
// "remoteUser": "root"
4543
}

.speakeasy/gen.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ typescript:
2020
version: 2.3.0
2121
additionalDependencies:
2222
dependencies:
23-
'@emotion/css': ^11.13.5
23+
"@emotion/css": ^11.13.5
2424
codehike: ^1.0.4
2525
motion: ^12.4.7
2626
devDependencies:
27-
'@types/react': ^18.3.18
27+
"@types/react": ^18.3.18
2828
peerDependencies: {}
2929
additionalPackageJSON: {}
3030
author: Speakeasy
@@ -49,7 +49,7 @@ typescript:
4949
methodArguments: require-security-and-request
5050
moduleFormat: esm
5151
outputModelSuffix: output
52-
packageName: '@speakeasyapi/code-samples'
52+
packageName: "@speakeasyapi/code-samples"
5353
responseFormat: flat
5454
templateVersion: v2
5555
useIndexModules: true

.speakeasy/workflow.yaml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
workflowVersion: 1.0.0
22
speakeasyVersion: latest
33
sources:
4-
speakeasy-OAS:
5-
inputs:
6-
- location: https://www.speakeasy.com/openapi.yaml
7-
overlays:
8-
- location: overlay.yaml
9-
transformations:
10-
- filterOperations:
11-
operations: getCodeSamples
12-
include: true
13-
registry:
14-
location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-public/speakeasy-oas
4+
speakeasy-OAS:
5+
inputs:
6+
- location: https://www.speakeasy.com/openapi.yaml
7+
overlays:
8+
- location: overlay.yaml
9+
transformations:
10+
- filterOperations:
11+
operations: getCodeSamples
12+
include: true
13+
registry:
14+
location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-public/speakeasy-oas
1515
targets:
16-
code_samples_typescript_sdk:
17-
target: typescript
18-
source: speakeasy-OAS
19-
publish:
20-
npm:
21-
token: $npm_token
22-
codeSamples:
23-
registry:
24-
location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-public/speakeasy-oas-typescript-code-samples
25-
labelOverride:
26-
fixedValue: TypeScript (SDK)
27-
blocking: false
16+
code_samples_typescript_sdk:
17+
target: typescript
18+
source: speakeasy-OAS
19+
publish:
20+
npm:
21+
token: $npm_token
22+
codeSamples:
23+
registry:
24+
location: registry.speakeasyapi.dev/speakeasy-self/speakeasy-public/speakeasy-oas-typescript-code-samples
25+
labelOverride:
26+
fixedValue: TypeScript (SDK)
27+
blocking: false

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ If you encounter any bugs or have suggestions for improvements, please open an i
1111
- Expected and actual behavior
1212
- Any relevant logs, screenshots, or error messages
1313
- Information about your environment (e.g., operating system, software versions)
14-
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed
14+
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed
1515

1616
## Issue Triage and Upstream Fixes
1717

FUNCTIONS.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> [!NOTE]
44
> This section is useful if you are using a bundler and targetting browsers and
5-
> runtimes where the size of an application affects performance and load times.
5+
> runtimes where the size of an application affects performance and load times.
66
77
Every method in this SDK is also available as a standalone function. This
88
alternative API is suitable when targetting the browser or serverless runtimes
@@ -33,19 +33,14 @@ const speakeasyCodeSamples = new SpeakeasyCodeSamplesCore({
3333
async function run() {
3434
const res = await codeSamplesGet(speakeasyCodeSamples, {
3535
registryUrl: "https://spec.speakeasy.com/my-org/my-workspace/my-source",
36-
operationIds: [
37-
"getPets",
38-
],
36+
operationIds: ["getPets"],
3937
methodPaths: [
4038
{
4139
method: "get",
4240
path: "/pets",
4341
},
4442
],
45-
languages: [
46-
"python",
47-
"javascript",
48-
],
43+
languages: ["python", "javascript"],
4944
});
5045

5146
switch (true) {
@@ -61,10 +56,12 @@ async function run() {
6156
// TypeScript's type checking will fail on the following line if the above
6257
// cases were not exhaustive.
6358
res.error satisfies never;
64-
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
59+
throw new Error(
60+
"Assertion failed: expected error checks to be exhaustive: " +
61+
res.error,
62+
);
6563
}
6664

67-
6865
const { value: result } = res;
6966

7067
// Handle the result
@@ -117,4 +114,4 @@ run();
117114

118115
Notably, `result.error` above will have an explicit type compared to a try-catch
119116
variation where the error in the catch block can only be of type `unknown` (or
120-
`any` depending on your TypeScript settings).
117+
`any` depending on your TypeScript settings).

0 commit comments

Comments
 (0)