Skip to content

Commit

Permalink
chore: prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
LwveMike committed Apr 16, 2024
1 parent 2037ce2 commit 7c63f19
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 4 deletions.
21 changes: 21 additions & 0 deletions packages/tacacs-plus/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Noction <https://github.com/Noction>

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.
106 changes: 106 additions & 0 deletions packages/tacacs-plus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# @noction/tacacs-plus

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![License][license-src]][license-href]

# Description

Node.js Tacacs+ client.

## Install

***npm***
```bash
npm i @noction/vue-highcharts
```

***yarn***
```bash
yarn add @noction/vue-highcharts
```

***pnpm***
```bash
pnpm add @noction/vue-highcharts
```

## Usage
```js
import type { AuthenType } from '@noction/tacacs-plus'
import { AUTHEN_TYPES, Client } from '@noction/tacacs-plus'

const client = new Client({
host: '127.0.0.1',
port: 49,
secret: 'tac_test',
// Your application logger (Optional)
logger: {
log: console.log,
// If you provide a debug logger, it will log the sent and received packets
debug: console.debug,
error: console.error,
warn: console.warn,
},
})

// Example Authentication

try {
const res = await client.authenticate({
username: 'test_login',
password: 'test_login_password',
authenType: AUTHEN_TYPES.TAC_PLUS_AUTHEN_TYPE_ASCII,
})

console.log(res)
}
// Every status, except PASS will be thrown as an Error
catch (err) {
console.log(err)
}

// Example Authorization

try {
const res = await client.authorize({
username: 'test_login',
services: ['idk'],
})

console.log(res)
}
// Every status, except PASS_ADD will be thrown as an Error
catch (err) {
console.log(err)
}
```

## Supporting

1. Authentication
2. Authorization

## Authentication types supported

- TAC_PLUS_AUTHEN_TYPE_ASCII
- TAC_PLUS_AUTHEN_TYPE_PAP
- TAC_PLUS_AUTHEN_TYPE_CHAP

## Not supporting

1. Accounting

## License

[MIT](./LICENSE) License © 2024-PRESENT [Noction](https://github.com/Noction)

[npm-version-src]: https://img.shields.io/npm/v/@noction/tacacs-plus?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/@noction/tacacs-plus
[npm-downloads-src]: https://img.shields.io/npm/dm/@noction/tacacs-plus?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/@noction/tacacs-plus
[bundle-src]: https://img.shields.io/bundlephobia/minzip/@noction/tacacs-plus?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=@noction/tacacs-plus
[license-src]: https://img.shields.io/github/license/Noction/@noction/tacacs-plus.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/Noction/tacacs-plus/blob/main/LICENSE
8 changes: 4 additions & 4 deletions packages/tacacs-plus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"description": "Node.js Tacacs+ client",
"author": "Noction",
"license": "MIT",
"homepage": "https://github.com/Noction/@noction/tacacs-plus#readme",
"homepage": "https://github.com/Noction/tacacs-plus#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/Noction/@noction/tacacs-plus.git"
"url": "https://github.com/Noction/tacacs-plus.git"
},
"bugs": "https://github.com/Noction/@noction/tacacs-plus/issues",
"bugs": "https://github.com/Noction/tacacs-plus/issues",
"keywords": [
"node",
"tacacs-plus",
Expand Down Expand Up @@ -49,7 +49,7 @@
"dev": "unbuild --stub",
"lint": "eslint .",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
"release": " bumpp package.json ../playground/package.json ../../package.json --commit --push --tag && npm publish",
"start": "esno src/index.ts",
"test": "vitest",
"typecheck": "tsc --noEmit"
Expand Down

0 comments on commit 7c63f19

Please sign in to comment.