-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
235 changed files
with
10,008 additions
and
16,215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,11 @@ | ||
ARG VARIANT="18" | ||
|
||
# Build stage for Go installation. | ||
# | ||
# The latest versions of Go are not available to | ||
# install with apt-get. Instead, it's simplest to | ||
# install Go with a multi-stage docker build. | ||
FROM golang:1.20 AS golang | ||
ARG VARIANT="20" | ||
|
||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT} | ||
|
||
RUN apt-get update | ||
|
||
# Install Python | ||
RUN apt-get install -y python3 python3-pip python-is-python3 | ||
|
||
# Install Ruby | ||
RUN apt-get install -y ruby ruby-dev | ||
|
||
# Install Java | ||
RUN apt-get install -y default-jdk | ||
|
||
# Install PHP | ||
RUN apt-get install -y php-cli php-xml php-mbstring | ||
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer | ||
|
||
# Copy Go from the golang stage. | ||
COPY --from=golang /usr/local/go /usr/local/go | ||
ENV PATH="/usr/local/go/bin:${PATH}" | ||
|
||
RUN gem install seamapi | ||
RUN pip install seamapi --break-system-packages | ||
RUN pip install seam --break-system-packages | ||
|
||
USER node | ||
WORKDIR /home/node | ||
|
||
# Install dotnet | ||
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \ | ||
&& chmod +x dotnet-install.sh \ | ||
&& ./dotnet-install.sh --channel 7.0 | ||
ENV PATH="$PATH:/home/node/.dotnet" | ||
|
||
RUN mkdir -p .config/git \ | ||
&& echo ".vscode/*" >> .config/git/ignore \ | ||
&& echo "*.code-workspace" >> .config/git/ignore \ | ||
&& echo ".history/" >> .config/git/ignore | ||
|
||
&& echo ".vscode/*" >> .config/git/ignore \ | ||
&& echo "*.code-workspace" >> .config/git/ignore \ | ||
&& echo ".history/" >> .config/git/ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
{ | ||
"name": "API Docs", | ||
"name": "TypeScript", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"VARIANT": "18" | ||
"VARIANT": "20" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"rebornix.Ruby", | ||
"ms-dotnettools.csharp", | ||
"ms-vsliveshare.vsliveshare", | ||
"dbaeumer.vscode-eslint", | ||
"EditorConfig.EditorConfig", | ||
"esbenp.prettier-vscode" | ||
] | ||
} | ||
}, | ||
"postCreateCommand": "npm install -g seam-cli && seam config set fake-server && cd /workspaces/api-docs/snippet-playground/javascript && npm i seam@latest && cd /workspaces/api-docs/snippet-playground/javascript-next && npm i seam@latest && cd /workspaces/api-docs/snippet-playground/csharp && ./init.sh && cd /workspaces/api-docs/snippet-playground/go && ./init.sh && cd /workspaces/api-docs/snippet-playground/php && composer update", | ||
"extensions": [ | ||
"ms-vsliveshare.vsliveshare", | ||
"dbaeumer.vscode-eslint", | ||
"EditorConfig.EditorConfig", | ||
"esbenp.prettier-vscode" | ||
], | ||
"postCreateCommand": "npm install", | ||
"remoteUser": "node" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
ARG VARIANT="20" | ||
|
||
# Build stage for Go installation. | ||
# | ||
# The latest versions of Go are not available to | ||
# install with apt-get. Instead, it's simplest to | ||
# install Go with a multi-stage docker build. | ||
FROM golang:1.20 AS golang | ||
|
||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT} | ||
|
||
RUN apt-get update | ||
|
||
# Install Python | ||
RUN apt-get install -y python3 python3-pip python-is-python3 | ||
|
||
# Install Ruby | ||
RUN apt-get install -y ruby ruby-dev | ||
|
||
# Install Java | ||
RUN apt-get install -y default-jdk | ||
|
||
# Install PHP | ||
RUN apt-get install -y php-cli php-xml php-mbstring | ||
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer | ||
|
||
# Copy Go from the golang stage. | ||
COPY --from=golang /usr/local/go /usr/local/go | ||
ENV PATH="/usr/local/go/bin:${PATH}" | ||
|
||
RUN gem install seamapi | ||
RUN pip install seam --break-system-packages | ||
|
||
USER node | ||
WORKDIR /home/node | ||
|
||
# Install dotnet | ||
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \ | ||
&& chmod +x dotnet-install.sh \ | ||
&& ./dotnet-install.sh --channel 7.0 | ||
ENV PATH="$PATH:/home/node/.dotnet" | ||
|
||
RUN mkdir -p .config/git \ | ||
&& echo ".vscode/*" >> .config/git/ignore \ | ||
&& echo "*.code-workspace" >> .config/git/ignore \ | ||
&& echo ".history/" >> .config/git/ignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "Seam SDK Playground", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"VARIANT": "20" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"rebornix.Ruby", | ||
"ms-dotnettools.csharp", | ||
"ms-vsliveshare.vsliveshare", | ||
"dbaeumer.vscode-eslint", | ||
"EditorConfig.EditorConfig", | ||
"esbenp.prettier-vscode" | ||
] | ||
} | ||
}, | ||
"postCreateCommand": "npm install -g seam-cli && seam config set fake-server && cd /workspaces/api-docs/seam-sdk-playground/javascript && npm i seam@latest && cd /workspaces/api-docs/seam-sdk-playground/csharp && ./init.sh && cd /workspaces/api-docs/seam-sdk-playground/go && ./init.sh && cd /workspaces/api-docs/seam-sdk-playground/php && composer update", | ||
"remoteUser": "node" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"root": true, | ||
"plugins": ["simple-import-sort", "unused-imports"], | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": "latest" | ||
}, | ||
"rules": { | ||
"no-console": "error", | ||
"unused-imports/no-unused-imports": "error", | ||
"unused-imports/no-unused-vars": [ | ||
"error", | ||
{ | ||
"vars": "all", | ||
"varsIgnorePattern": "^_", | ||
"args": "after-used", | ||
"argsIgnorePattern": "^_", | ||
"ignoreRestSiblings": true | ||
} | ||
], | ||
"import/extensions": ["error", "ignorePackages"], | ||
"import/no-duplicates": ["error", { "prefer-inline": true }], | ||
"import/no-relative-parent-imports": "error", | ||
"simple-import-sort/imports": [ | ||
"error", | ||
{ | ||
"groups": [ | ||
["^\\u0000"], | ||
["^node:"], | ||
["^@?\\w"], | ||
["@seamapi/makenew-tsmodule"], | ||
["^lib/"], | ||
["^"], | ||
["^\\."] | ||
] | ||
} | ||
], | ||
"simple-import-sort/exports": "error" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.js", "*.mjs", "*.cjs"], | ||
"extends": ["standard", "prettier"] | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["standard-with-typescript", "prettier"], | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"rules": { | ||
"@typescript-eslint/no-import-type-side-effects": "error", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{ | ||
"fixStyle": "inline-type-imports" | ||
} | ||
], | ||
"@typescript-eslint/no-unused-vars": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Setup | ||
description: Setup Node.js and install dependencies. | ||
|
||
inputs: | ||
node_version: | ||
description: The Node.js version. | ||
required: false | ||
default: '20' | ||
registry_url: | ||
description: The Node.js package registry URL. | ||
required: false | ||
default: https://registry.npmjs.org | ||
install_dependencies: | ||
description: Install dependencies. | ||
required: false | ||
default: 'true' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
if: inputs.install_dependencies == 'true' | ||
with: | ||
cache: npm | ||
node-version: ${{ inputs.node_version }} | ||
registry-url: ${{ inputs.registry_url }} | ||
- name: Setup Node.js without cache | ||
uses: actions/setup-node@v4 | ||
if: inputs.install_dependencies == 'false' | ||
with: | ||
node-version: ${{ inputs.node_version }} | ||
registry-url: ${{ inputs.registry_url }} | ||
- name: Install dependencies | ||
if: inputs.install_dependencies == 'true' | ||
shell: bash | ||
run: npm ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
- name: Lint | ||
run: npm run lint | ||
typecheck: | ||
name: Typecheck | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
- name: Typecheck | ||
run: npm run typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name: Format | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
commit: | ||
name: Format code | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.GH_TOKEN }} | ||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
git_committer_name: ${{ secrets.GIT_USER_NAME }} | ||
git_committer_email: ${{ secrets.GIT_USER_EMAIL }} | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
- name: Format | ||
run: npm run format | ||
- name: Commit | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
if: always() | ||
with: | ||
commit_message: 'ci: Format code' | ||
commit_user_name: ${{ secrets.GIT_USER_NAME }} | ||
commit_user_email: ${{ secrets.GIT_USER_EMAIL }} | ||
commit_author: ${{ secrets.GIT_USER_NAME }} <${{ secrets.GIT_USER_EMAIL }}> |
Oops, something went wrong.