Skip to content

Commit

Permalink
Merge pull request #1 from NUWCDIVNPT/rc-1
Browse files Browse the repository at this point in the history
feat: initial public offering
  • Loading branch information
cd-rite authored Jan 4, 2024
2 parents 1fb73d4 + aab4562 commit dc3732b
Show file tree
Hide file tree
Showing 105 changed files with 42,592 additions and 1 deletion.
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

0 comments on commit dc3732b

Please sign in to comment.