Skip to content

Commit

Permalink
initial implementation of the cli tool
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Nov 19, 2024
1 parent 9c4142c commit 30023b3
Show file tree
Hide file tree
Showing 27 changed files with 4,727 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
labels:
- 'type: dependencies'
- github_actions

- package-ecosystem: npm
directory: /
schedule:
interval: monthly
labels:
- 'type: dependencies'
- 'javascript'
60 changes: 60 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
categories:
- title: 'Breaking'
label: 'type: breaking'

- title: 'New'
label: 'type: feature'

- title: 'Bug Fixes'
label: 'type: bugfix'

- title: 'Maintenance'
labels:
- 'type: maintenance'
- 'type: performance'

- title: 'Documentation'
label: 'type: documentation'

- title: 'Other changes'

- title: 'Automation and CI changes'
label: 'type: ci'

- title: 'Dependency Updates'
label: 'type: dependencies'
collapse-after: 5

version-resolver:
major:
labels:
- 'type: breaking'

minor:
labels:
- 'type: feature'

patch:
labels:
- 'type: bug'
- 'type: maintenance'
- 'type: performance'
- 'type: documentation'
- 'type: ci'
- 'type: dependencies'
- 'type: security'

default: patch

exclude-labels:
- 'skip-changelog'
42 changes: 42 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CodeQL

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '31 7 * * 3'

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ TypeScript ]

permissions:
actions: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
source-root: src

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Linters

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install
run: yarn install

- name: Build
run: yarn build

- name: Prettier
run: yarn run format-check
53 changes: 53 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish package

on:
release:
types: [ published ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: yarn.lock

- name: Install
run: yarn install

- name: Compile
run: yarn build

- name: Test
run: yarn test

publish-npm:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install
run: yarn install

- name: Compile
run: yarn build

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Drafter

on:
push:
branches: [ main ]

permissions:
contents: read

jobs:
update_release_draft:
name: Update release Draft
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Tests - Node.js
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: yarn.lock

- name: Install
run: yarn install

- name: Compile
run: yarn build

- name: Test
run: yarn test

- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,16 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# yarn2 - https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.github
/coverage
/vite.config.ts
/renovate.json
/tsconfig.*
/test

*.tsbuildinfo
.*
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
lib/
node_modules/
tsconfig.json
12 changes: 12 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
semi: true
overrides:
- files: '**/*.{ts,js}'
options:
trailingComma: 'es5'
tabWidth: 2
semi: true
singleQuote: true
quoteProps: 'as-needed'
bracketSpacing: true
bracketSameLine: true
arrowParens: 'avoid'
934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.5.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.1.cjs
Loading

0 comments on commit 30023b3

Please sign in to comment.