Skip to content

Commit

Permalink
Merge branch 'main' into issue-#268
Browse files Browse the repository at this point in the history
  • Loading branch information
mastafit committed Jul 24, 2024
2 parents 4178ed1 + 60fec3a commit 1adb133
Show file tree
Hide file tree
Showing 235 changed files with 10,008 additions and 16,215 deletions.
45 changes: 4 additions & 41 deletions .devcontainer/Dockerfile
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
25 changes: 9 additions & 16 deletions .devcontainer/devcontainer.json
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"
}
47 changes: 47 additions & 0 deletions .devcontainer/seam-sdk-playground/Dockerfile
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

24 changes: 24 additions & 0 deletions .devcontainer/seam-sdk-playground/devcontainer.json
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.
63 changes: 63 additions & 0 deletions .eslintrc.json
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"
}
}
]
}
12 changes: 9 additions & 3 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
root:
./docs/
---
root: ./docs/
​structure:
readme: README.md
summary: SUMMARY.md​
Expand All @@ -23,4 +23,10 @@ redirects:
products/seam-bridge-in-development: capability-guides/seam-bridge.md
core-concepts/connect-webviews: core-concepts/connect-webviews/README.md
device-guides/4suites-locks: device-and-system-integration-guides/4suites-locks/README.md

device-guides/assa-abloy-visionline-access-control-system-in-development: device-and-system-integration-guides/assa-abloy-visionline-access-control-system/README.md
device-guides/assa-abloy-visionline-access-control-system-in-development/credential-types: device-and-system-integration-guides/assa-abloy-visionline-access-control-system/credential-types.md
device-and-system-integration-guides/assa-abloy-visionline-access-control-system-in-development/visionline-credential-metadata: device-and-system-integration-guides/assa-abloy-visionline-access-control-system/visionline-credential-metadata.md
device-guides/assa-abloy-visionline-access-control-system-in-development/common-use-cases: device-and-system-integration-guides/assa-abloy-visionline-access-control-system/common-use-cases.md
device-and-system-integration-guides/assa-abloy-visionline-access-control-system-in-development/special-requirements-for-android-mobile-access-sdk-development: device-and-system-integration-guides/assa-abloy-visionline-access-control-system/special-requirements-for-android-mobile-access-sdk-development.md
device-and-system-integration-guides/assa-abloy-visionline-access-control-system-in-development/special-requirements-for-ios-mobile-access-sdk-development: device-and-system-integration-guides/assa-abloy-visionline-access-control-system/special-requirements-for-ios-mobile-access-sdk-development.md
capability-guides/access-systems/understanding-acs-differences: capability-guides/access-systems/understanding-access-control-system-differences.md
38 changes: 38 additions & 0 deletions .github/actions/setup/action.yml
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
34 changes: 34 additions & 0 deletions .github/workflows/check.yml
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
41 changes: 41 additions & 0 deletions .github/workflows/format.yml
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 }}>
Loading

0 comments on commit 1adb133

Please sign in to comment.