Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish
on:
release:
types: [published]

permissions:
id-token: write
contents: read

jobs:
publish:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 24.12.x
cache: npm
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm ci
- name: Run checks
run: npm run check
- name: Run tests
run: npm test
- name: Update version
run: |
VERSION="${GITHUB_REF_NAME#v}"
sed -i "s/VERSION = \".*\"/VERSION = \"$VERSION\"/" src/common/version.ts
npm version from-git --no-git-tag-version
- name: Build package
run: npm run build
- name: Publish to npm
run: npm publish
16 changes: 16 additions & 0 deletions .github/workflows/summary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Summary
on:
push:
branches-ignore:
- main
jobs:
wait-for-triggered-checks:
runs-on: ubuntu-latest
permissions:
checks: read
steps:
- name: Wait for all triggered status checks
uses: poseidon/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
ignore_pattern: ^codecov/.+
55 changes: 55 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Tests
on:
push:
paths-ignore:
- .gitignore
- LICENSE
- README.md
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- uses: pre-commit/[email protected]

check-attw:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24.12.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Check if types are wrong with attw
run: npx -p @arethetypeswrong/cli attw --pack --profile esm-only .

test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24.12.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Run checks
run: npm run check
- name: Run tests with coverage
run: npm test
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/coverage
/dist
/node_modules

# misc
.DS_Store
.vscode/
npm-debug.log*
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Apitally

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Apitally SDK for serverless JavaScript runtimes

[![Tests](https://github.com/apitally/apitally-js-serverless/actions/workflows/tests.yaml/badge.svg?event=push)](https://github.com/apitally/apitally-js-serverless/actions)
[![Codecov](https://codecov.io/gh/apitally/apitally-js-serverless/graph/badge.svg?token=j5jqlrL7Pd)](https://codecov.io/gh/apitally/apitally-js-serverless)
[![Codecov](https://codecov.io/gh/apitally/apitally-js-serverless/graph/badge.svg?token=sFIDRfSfca)](https://codecov.io/gh/apitally/apitally-js-serverless)
[![npm](https://img.shields.io/npm/v/@apitally/serverless?logo=npm&color=%23cb0000)](https://www.npmjs.com/package/@apitally/serverless)

This SDK for Apitally currently supports the following web frameworks:
Expand Down Expand Up @@ -64,7 +64,7 @@ yarn add @apitally/serverless

## Usage

Our comprehensive [setup guides](https://docs.apitally.io/quickstart) include
Our comprehensive [setup guides](https://docs.apitally.io/setup-guides) include
all the details you need to get started.

### Hono
Expand Down
19 changes: 19 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import js from "@eslint/js";
import tseslint from "typescript-eslint";

export default [
js.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_$",
caughtErrorsIgnorePattern: "^(error|e)$",
},
],
},
},
];
Loading