Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: initial public offering #1

Merged
merged 6 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Unit Tests and coverage report

on:
workflow_dispatch:
push:
branches:
- main
paths:
- "ReviewParser.js"
- "TaskObject.js"
- "test/**"
- "WATCHER-test-files/**"
pull_request:
branches:
- main
paths:
- "ReviewParser.js"
- "TaskObject.js"
- "test/**"
- "WATCHER-test-files/**"

jobs:
build_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install app dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Upload coverage to github
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: coverage
path: coverage

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
index.cjs
coverage/
node_modules/
.vscode/*
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,56 @@
# stig-manager-client-modules
ES and CJS modules for STIG Manager clients
JavaScript modules for STIG Manager clients. This README and other documentation is under construction.

## Using the modules in Node.js
In the root of a project, open a terminal and execute:

```
$ npm install git+https://github.com/nuwcdivnpt/stig-manager-client-modules#rc-1
```

Importing all modules into ESM code

```
import * as StigmanLib from `stig-manager-client-modules`

const result = StigmanLib.reviewsFromCkl( ... )
const result = StigmanLib.reviewsFromCklb( ... )
const result = StigmanLib.reviewsFromXccdf( ... )

const tasks = new StigmanLib.TaskObject ( ... )

```

Importing an individual module into ESM code

```
import { reviewsFromCkl } from `stig-manager-client-modules`
const result = reviewsFromCkl( ... )
```

Requiring all modules into CJS code

```
const StigmanLib = require('stig-manager-client-modules')

const result = StigmanLib.reviewsFromCkl( ... )
const result = StigmanLib.reviewsFromCklb( ... )
const result = StigmanLib.reviewsFromXccdf( ... )

const tasks = new StigmanLib.TaskObject ( ... )
```

Requiring an individual module into CJS code
```
const { reviewsFromCkl } = require('stig-manager-client-modules')

const result = reviewsFromCkl( ... )
```

##






Loading