Skip to content

Commit 190d716

Browse files
committed
prepare for release
1 parent 501bd17 commit 190d716

8 files changed

Lines changed: 54 additions & 16 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node-version: [18, 20, 22, 24]
13+
node-version: [18, 20, 22, 24, latest]
1414
steps:
1515
- uses: actions/checkout@v5
1616
- uses: webfactory/ssh-agent@v0.10.0
@@ -25,6 +25,7 @@ jobs:
2525
node-version: ${{ matrix.node-version }}
2626
- run: npm install
2727
- run: npm run lint
28+
- run: npm run build
2829
- run: npm run coverage
2930
- name: Upload coverage reports to Codecov
3031
uses: codecov/codecov-action@v5

.github/workflows/npm-publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Node.js Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write # Required for OIDC
15+
contents: read
16+
steps:
17+
- uses: actions/checkout@v5
18+
- uses: actions/setup-node@v6
19+
with:
20+
node-version: 24
21+
registry-url: https://registry.npmjs.org/
22+
- run: npm install
23+
- run: npm publish --provenance --access public

eslint.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import eslintConfigPrettier from 'eslint-config-prettier/flat'
66

77
export default defineConfig([
88
{
9-
files: ['**/*.ts'],
9+
files: ['src/**/*.ts', 'test/**/*.ts'],
1010
extends: [
1111
eslint.configs.all,
1212
tseslint.configs.strictTypeChecked,
@@ -50,12 +50,16 @@ export default defineConfig([
5050
files: ['test/**/*.ts'],
5151
rules: {
5252
'@typescript-eslint/no-unsafe-return': 'off',
53+
'@typescript-eslint/no-unsafe-member-access': 'off',
54+
'@typescript-eslint/no-unsafe-call': 'off',
55+
'@typescript-eslint/no-unsafe-argument': 'off',
5356
},
5457
},
5558
{
5659
files: ['src/index.ts'],
5760
rules: {
5861
'@typescript-eslint/no-unsafe-argument': 'off',
62+
'max-params': 'off',
5963
},
6064
},
6165
])

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ssh-agent-secrets",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"keywords": [
55
"ssh",
66
"encryption",
@@ -13,6 +13,7 @@
1313
"url": "https://github.com/ddebin/ssh-agent-secrets/issues"
1414
},
1515
"license": "MIT",
16+
"author": "Damien Debin <damien.debin@gmail.com>",
1617
"type": "module",
1718
"bin": {
1819
"ssh-crypt": "./dist/src/index.js"
@@ -24,6 +25,7 @@
2425
"eslint:fix": "eslint . --fix",
2526
"fix": "npm run eslint:fix && npm run prettier:fix",
2627
"lint": "npm run typecheck && npm run eslint:check && npm run prettier:check",
28+
"prepublishOnly": "npm run build && npm run lint && npm run test",
2729
"prettier:check": "prettier --check . --config .prettierrc",
2830
"prettier:fix": "prettier --write . --config .prettierrc",
2931
"test": "mocha",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env node
2-
/* eslint-disable max-params */
2+
33
import * as fs from 'fs'
44
import { Argument, program } from 'commander'
55
import { SSHAgentClient } from './lib/ssh_agent_client.js'

src/lib/ssh_agent_client.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const enum Protocol {
1919
SSH_AGENT_SUCCESS = 6,
2020
}
2121

22-
interface SSHKey {
22+
export interface SSHKey {
2323
/** E.g. "ssh-rsa" */
2424
type: string
2525
/** Base64-encoded public key blob */
@@ -30,7 +30,7 @@ interface SSHKey {
3030
raw: Buffer
3131
}
3232

33-
interface SSHSignature {
33+
export interface SSHSignature {
3434
/** E.g. "ssh-rsa" */
3535
type: string
3636
/** Base64-encoded signature */
@@ -39,7 +39,7 @@ interface SSHSignature {
3939
raw: Buffer
4040
}
4141

42-
interface SSHAgentClientOptions {
42+
export interface SSHAgentClientOptions {
4343
timeout?: number
4444
sockFile?: string
4545
encryptionAlgo?: string
@@ -70,7 +70,7 @@ const writeHeader = function writeHeader(request: Buffer, tag: number): number {
7070
return 5
7171
}
7272

73-
class SSHAgentClient {
73+
export class SSHAgentClient {
7474
private readonly timeout: number
7575
private readonly sockFile: string
7676
private readonly encryptionAlgo: string
@@ -277,5 +277,3 @@ class SSHAgentClient {
277277
})
278278
}
279279
}
280-
281-
export { SSHAgentClient, SSHKey, SSHSignature, SSHAgentClientOptions }

tsconfig.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
{
2+
"$schema": "https://www.schemastore.org/tsconfig",
23
"compilerOptions": {
34
"target": "es2021",
45
"module": "node16",
56
"esModuleInterop": true,
67
"outDir": "dist",
78
"strict": true,
89
"skipLibCheck": true,
10+
"forceConsistentCasingInFileNames": true,
911
"paths": {
1012
"commander": ["./src/type/commander.d.ts"]
1113
},
12-
"types": ["node"]
14+
"types": ["node"],
15+
"allowJs": true,
16+
"resolveJsonModule": true,
17+
"moduleDetection": "force",
18+
"isolatedModules": true,
19+
"verbatimModuleSyntax": true,
20+
"noImplicitOverride": true,
21+
"sourceMap": true,
22+
"declaration": true
1323
},
1424
"include": ["src", "test"]
1525
}

0 commit comments

Comments
 (0)