Skip to content

Commit 6fc9256

Browse files
committed
chore: initial commit
1 parent d0d1af8 commit 6fc9256

31 files changed

Lines changed: 27145 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
20+
- name: Setup PNPM
21+
uses: pnpm/action-setup@v6
22+
with:
23+
run_install: false
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v6
27+
with:
28+
node-version: 24
29+
cache: pnpm
30+
31+
- name: Install dependencies
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Lint and test
35+
run: just lint all
36+
37+
- name: Build dist
38+
run: pnpm build
39+
40+
- name: Verify dist is current
41+
run: git diff --exit-code -- dist/index.js
42+
43+
- name: Validate workflows
44+
uses: rhysd/actionlint@v1

.github/workflows/smoke.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Smoke Test
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Arcane CLI version to install
8+
required: false
9+
default: 1.19.5
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
smoke:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os:
20+
- ubuntu-latest
21+
- macos-latest
22+
runs-on: ${{ matrix.os }}
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v6
27+
28+
- name: Setup Arcane CLI
29+
uses: ./
30+
with:
31+
version: ${{ inputs.version }}
32+
github-token: ${{ github.token }}
33+
34+
- name: Verify CLI
35+
run: arcane-cli --version

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
coverage/
3+
lib/
4+
.DS_Store

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
dist/
3+
coverage/
4+
lib/
5+
pnpm-lock.yaml

Justfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
set shell := ["bash", "-euo", "pipefail", "-c"]
2+
3+
format target:
4+
if [ "{{target}}" != "all" ]; then echo "unknown format target: {{target}}" >&2; exit 1; fi
5+
pnpm format
6+
7+
lint target:
8+
if [ "{{target}}" != "all" ]; then echo "unknown lint target: {{target}}" >&2; exit 1; fi
9+
pnpm format:check
10+
pnpm lint
11+
pnpm typecheck
12+
pnpm test
13+
pnpm validate:action

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2025, Kyle Mendell
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
3. Neither the name of the copyright holder nor the names of its
16+
contributors may be used to endorse or promote products derived from
17+
this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

action.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Setup Arcane CLI
2+
description: Installs the Arcane CLI into the GitHub Actions environment
3+
author: Arcane
4+
branding:
5+
icon: package
6+
color: purple
7+
runs:
8+
using: node24
9+
main: dist/index.js
10+
inputs:
11+
version:
12+
description: Version of the Arcane CLI to install. Use latest, an exact version like 1.19.5, or a semver range like 1.x.
13+
default: latest
14+
required: false
15+
github-token:
16+
description: Optional GitHub token used when resolving Arcane releases through the GitHub API.
17+
required: false
18+
outputs:
19+
version:
20+
description: Resolved Arcane CLI version that was installed.
21+
path:
22+
description: Directory added to PATH that contains the arcane-cli binary.
23+
cache-hit:
24+
description: Whether the Arcane CLI was restored from the runner tool cache.

build.cjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const esbuild = require('esbuild')
2+
3+
esbuild
4+
.build({
5+
bundle: true,
6+
entryPoints: ['src/index.ts'],
7+
format: 'cjs',
8+
legalComments: 'none',
9+
logLevel: 'info',
10+
minify: false,
11+
outfile: 'dist/index.js',
12+
platform: 'node',
13+
sourcemap: false,
14+
target: ['node24'],
15+
})
16+
.catch((error) => {
17+
console.error(error)
18+
process.exit(1)
19+
})

0 commit comments

Comments
 (0)