Skip to content

Commit 09ec80e

Browse files
committed
Add "test" script
0 parents  commit 09ec80e

21 files changed

+345748
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 2
8+
charset = utf-8
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist
2+
/src

.eslintrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "@socketsecurity",
3+
"root": true,
4+
"parserOptions": {
5+
"project": [
6+
"./build/tsconfig.json",
7+
"./tests/tsconfig.json"
8+
]
9+
}
10+
}

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ensure we have a reviewer for the sync PR:s
2+
/src/ @voxpelli @alxhotel

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
- package-ecosystem: "npm"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
day: "monday"

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
linting:
20+
name: "Linting"
21+
uses: SocketDev/workflows/.github/workflows/reusable-base.yml@master
22+
secrets: inherit
23+
with:
24+
npm-test-script: 'lint'

.github/workflows/generate.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Sync SDK
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
schedule:
8+
# At 06:37 on every day-of-week from Monday through Friday.
9+
- cron: '37 6 * * 1-5'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
jobs:
17+
fetch_and_update:
18+
name: Sync OpenAPI definition
19+
uses: SocketDev/workflows/.github/workflows/reusable-sync.yml@master
20+
secrets: inherit
21+
with:
22+
url: 'https://api.socket.dev/v0/openapi'
23+
path: 'src/openapi.json'
24+
branch-name: 'automated/open-api'
25+
commit-message: 'fix(openapi): sync with openapi definition'
26+
pr-title: 'Sync with OpenAPI definition'
27+
pr-body: 'The OpenAPI definition in the API has been updated. This PR downloads the latest one and regenerates the SDK.'
28+
npm-post-sync-script: 'generate-sdk'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.api
2+
dist
3+
node_modules

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2022 Socket Inc
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# @socketsecurity/sdk
2+
3+
[![npm version](https://img.shields.io/npm/v/@socketsecurity/sdk.svg?style=flat)](https://www.npmjs.com/package/@socketsecurity/sdk)
4+
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/SocketDev/eslint-config)
5+
[![Follow @SocketSecurity](https://img.shields.io/twitter/follow/SocketSecurity?style=social)](https://twitter.com/SocketSecurity)
6+
7+
SDK for the Socket API client, generated by `api`.
8+
9+
## Usage
10+
11+
```bash
12+
npm install @socketsecurity/sdk
13+
```
14+
15+
```javascript
16+
const client = require('@socketsecurity/sdk').auth('yourApiKeyHere')
17+
18+
const res = await client.getIssuesByNPMPackage({
19+
package: '@socketsecurity/eslint-config',
20+
version: '1.0.0'
21+
})
22+
```
23+
24+
## See also
25+
26+
* [Socket API Reference](https://docs.socket.dev/reference)
27+
* [Socket.dev](https://socket.dev/)
28+
* [Socket GitHub App](https://github.com/apps/socket-security)

0 commit comments

Comments
 (0)