Skip to content

Commit 1860d01

Browse files
github-actions[bot]speakeasybotdisintegratorismaelrumzanEndangeredMassa
authored
chore: 🐝 Update SDK - Generate 14.0.0-canary.0 (#12053)
> [!IMPORTANT] > Linting report available at: <https://app.speakeasy.com/org/vercel/vercel/linting-report/af6544300d615174baf98f6c40bdbd48> # SDK update Based on: - OpenAPI Doc - Speakeasy CLI 1.396.2 (2.415.0) https://github.com/speakeasy-api/speakeasy --------- Co-authored-by: speakeasybot <[email protected]> Co-authored-by: Georges Haidar <[email protected]> Co-authored-by: ismaelrumzan <[email protected]> Co-authored-by: Sean Massa <[email protected]>
1 parent a0e496c commit 1860d01

File tree

2,769 files changed

+225468
-527
lines changed

Some content is hidden

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

2,769 files changed

+225468
-527
lines changed

.changeset/config.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
"access": "public",
1111
"baseBranch": "main",
1212
"updateInternalDependencies": "patch",
13-
"ignore": []
13+
"ignore": [
14+
"@vercel/sdk"
15+
]
1416
}

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ packages/remix/test/fixtures-*
4343

4444
# gatsby-plugin-vercel-analytics
4545
packages/gatsby-plugin-vercel-analytics
46+
47+
# sdk
48+
packages/sdk

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "Apache-2.0",
66
"packageManager": "[email protected]",
77
"devDependencies": {
8-
"@changesets/cli": "2.26.1",
8+
"@changesets/cli": "2.27.8",
99
"@svitejs/changesets-changelog-github-compact": "1.1.0",
1010
"@types/node": "14.18.33",
1111
"@typescript-eslint/eslint-plugin": "5.21.0",
@@ -24,6 +24,7 @@
2424
"fs-extra": "11.1.0",
2525
"glob": "10.2.3",
2626
"husky": "7.0.4",
27+
"is-ci": "3.0.1",
2728
"jest": "29.5.0",
2829
"json5": "2.2.3",
2930
"lint-staged": "9.2.5",

packages/sdk/.devcontainer/README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
<div align="center">
3+
<a href="https://codespaces.new/vercel/vercel.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
4+
</div>
5+
<br>
6+
7+
> **Remember to shutdown a GitHub Codespace when it is not in use!**
8+
9+
# Dev Containers Quick Start
10+
11+
The default location for usage snippets is the `samples` directory.
12+
13+
## Running a Usage Sample
14+
15+
A sample usage example has been provided in a `root.ts` file. As you work with the SDK, it's expected that you will modify these samples to fit your needs. To execute this particular snippet, use the command below.
16+
17+
```
18+
ts-node root.ts
19+
```
20+
21+
## Generating Additional Usage Samples
22+
23+
The speakeasy CLI allows you to generate more usage snippets. Here's how:
24+
25+
- To generate a sample for a specific operation by providing an operation ID, use:
26+
27+
```
28+
speakeasy generate usage -s ./open-api.yaml -l typescript -i {INPUT_OPERATION_ID} -o ./samples
29+
```
30+
31+
- To generate samples for an entire namespace (like a tag or group name), use:
32+
33+
```
34+
speakeasy generate usage -s ./open-api.yaml -l typescript -n {INPUT_TAG_NAME} -o ./samples
35+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/images/tree/main/src/typescript-node
3+
{
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+
}
36+
},
37+
"codespaces": {
38+
"openFiles": [
39+
".devcontainer/README.md"
40+
]
41+
}
42+
}
43+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
44+
// "remoteUser": "root"
45+
}

packages/sdk/.devcontainer/setup.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Install the speakeasy CLI
4+
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
5+
6+
# Setup samples directory
7+
rmdir samples || true
8+
mkdir samples
9+
10+
npm install
11+
npm install -g ts-node
12+
npm link
13+
npm link @vercel/sdk
14+
TS_CONFIG_CONTENT=$(cat <<EOL
15+
{
16+
"compilerOptions": {
17+
"baseUrl": ".",
18+
"paths": {
19+
"openapi": ["../src/index"],
20+
"openapi/*": ["../src/*"]
21+
}
22+
},
23+
"include": ["./**/*.ts"]
24+
}
25+
EOL
26+
)
27+
echo "$TS_CONFIG_CONTENT" > samples/tsconfig.json
28+
29+
# Generate starter usage sample with speakeasy
30+
speakeasy generate usage -s ./open-api.yaml -l typescript -o samples/root.ts

packages/sdk/.eslintrc.cjs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/* eslint-env node */
2+
module.exports = {
3+
root: true,
4+
extends: [
5+
"eslint:recommended",
6+
"plugin:@typescript-eslint/recommended",
7+
"plugin:import/recommended",
8+
"plugin:import/typescript",
9+
],
10+
parser: "@typescript-eslint/parser",
11+
plugins: ["@typescript-eslint"],
12+
settings: {
13+
"import/resolver": {
14+
typescript: true,
15+
node: true,
16+
},
17+
},
18+
rules: {
19+
// Handled by typescript compiler
20+
"@typescript-eslint/no-unused-vars": "off",
21+
"@typescript-eslint/ban-types": "off",
22+
"@typescript-eslint/no-namespace": "off",
23+
"@typescript-eslint/no-explicit-any": "off",
24+
"import/no-named-as-default-member": "off",
25+
26+
"import/no-default-export": "error",
27+
},
28+
};

packages/sdk/.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This allows generated code to be indexed correctly
2+
*.ts linguist-generated=false

packages/sdk/.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/models
2+
/models/errors
3+
/types
4+
/node_modules
5+
/lib
6+
/sdk
7+
/funcs
8+
/hooks
9+
/index.*
10+
/core.*
11+
/cjs
12+
/esm
13+
/dist
14+
/.tsbuildinfo
15+
/.tshy
16+
/.tshy-*
17+
/__tests__

packages/sdk/.npmignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**/*
2+
!/**/*.ts
3+
!/**/*.js
4+
!/**/*.map
5+
6+
/.eslintrc.js
7+
/cjs
8+
/.tshy
9+
/.tshy-*
10+
/__tests__

0 commit comments

Comments
 (0)