Skip to content

Commit d03ef18

Browse files
Revert "chore: run prettier"
This reverts commit 481800f.
1 parent 481800f commit d03ef18

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

+771
-804
lines changed

.devcontainer/README.md

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

.devcontainer/devcontainer.json

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
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-
}
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+
}
2936
},
30-
"[typescriptreact]": {
31-
"editor.codeActionsOnSave": {
32-
"source.organizeImports": true
33-
}
37+
"codespaces": {
38+
"openFiles": [
39+
".devcontainer/README.md"
40+
]
3441
}
35-
}
36-
},
37-
"codespaces": {
38-
"openFiles": [".devcontainer/README.md"]
3942
}
40-
}
41-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
42-
// "remoteUser": "root"
43+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
44+
// "remoteUser": "root"
4345
}

.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: 11 additions & 8 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,14 +33,19 @@ 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: ["getPets"],
36+
operationIds: [
37+
"getPets",
38+
],
3739
methodPaths: [
3840
{
3941
method: "get",
4042
path: "/pets",
4143
},
4244
],
43-
languages: ["python", "javascript"],
45+
languages: [
46+
"python",
47+
"javascript",
48+
],
4449
});
4550

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

67+
6568
const { value: result } = res;
6669

6770
// Handle the result
@@ -114,4 +117,4 @@ run();
114117

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

0 commit comments

Comments
 (0)