Skip to content

Commit d46df16

Browse files
feat: add typescript
1 parent 23854ed commit d46df16

Some content is hidden

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

98 files changed

+9860
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
3+
{
4+
"name": "Development",
5+
"image": "mcr.microsoft.com/devcontainers/typescript-node:latest",
6+
"features": {
7+
"ghcr.io/devcontainers/features/node:1": {}
8+
},
9+
"postCreateCommand": "yarn install",
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
"esbenp.prettier-vscode"
14+
]
15+
}
16+
}
17+
}

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
- next
10+
11+
jobs:
12+
lint:
13+
name: lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '18'
22+
23+
- name: Bootstrap
24+
run: ./scripts/bootstrap
25+
26+
- name: Check types
27+
run: ./scripts/lint
28+
29+
build:
30+
name: build
31+
runs-on: ubuntu-latest
32+
permissions:
33+
contents: read
34+
id-token: write
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Set up Node
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: '18'
42+
43+
- name: Bootstrap
44+
run: ./scripts/bootstrap
45+
46+
- name: Check build
47+
run: ./scripts/build
48+
49+
- name: Get GitHub OIDC Token
50+
if: github.repository == 'stainless-sdks/stainless-v0-typescript'
51+
id: github-oidc
52+
uses: actions/github-script@v6
53+
with:
54+
script: core.setOutput('github_token', await core.getIDToken());
55+
56+
- name: Upload tarball
57+
if: github.repository == 'stainless-sdks/stainless-v0-typescript'
58+
env:
59+
URL: https://pkg.stainless.com/s
60+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
61+
SHA: ${{ github.sha }}
62+
run: ./scripts/utils/upload-artifact.sh
63+
test:
64+
name: test
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Set up Node
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version: '18'
73+
74+
- name: Bootstrap
75+
run: ./scripts/bootstrap
76+
77+
- name: Run tests
78+
run: ./scripts/test
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Create releases
2+
on:
3+
schedule:
4+
- cron: '0 5 * * *' # every day at 5am UTC
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
name: release
12+
if: github.ref == 'refs/heads/main' && github.repository == 'stainless-api/stainless-api-typescript'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: stainless-api/trigger-release-please@v1
19+
id: release
20+
with:
21+
repo: ${{ github.event.repository.full_name }}
22+
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
23+
24+
- name: Set up Node
25+
if: ${{ steps.release.outputs.releases_created }}
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: '18'
29+
30+
- name: Install dependencies
31+
if: ${{ steps.release.outputs.releases_created }}
32+
run: |
33+
yarn install
34+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
release_doctor:
10+
name: release doctor
11+
runs-on: ubuntu-latest
12+
if: github.repository == 'stainless-api/stainless-api-typescript' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check release environment
18+
run: |
19+
bash ./bin/check-release-environment
20+
env:
21+
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
22+

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.prism.log
2+
node_modules
3+
yarn-error.log
4+
codegen.log
5+
Brewfile.lock.json
6+
dist
7+
dist-deno
8+
/*.tgz
9+
.idea/
10+

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CHANGELOG.md
2+
/ecosystem-tests/*/**
3+
/node_modules
4+
/deno
5+
6+
# don't format tsc output, will break source maps
7+
/dist

.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"arrowParens": "always",
3+
"experimentalTernaries": true,
4+
"printWidth": 110,
5+
"singleQuote": true,
6+
"trailingComma": "all"
7+
}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.1-alpha.0"
3+
}

.stats.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
configured_endpoints: 8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-6cc6dbcccc2b281f55ced484ddf562c7615d5facb27db5599575e253d9a9a47c.yml
3+
openapi_spec_hash: d74c662cb71cffec14b86f666f53f7c4
4+
config_hash: dd7918597ce0745e0142bbe0c7ab2321

Brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
brew "node"

0 commit comments

Comments
 (0)