lula2 0.0.2 → 0.0.4-nightly.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -2
- package/package.json +7 -7
- package/src/index.ts +19 -2
package/README.md
CHANGED
|
@@ -5,8 +5,18 @@
|
|
|
5
5
|
[](https://npmjs.com/package/lula-next)
|
|
6
6
|
[](https://npmjs.com/package/lula-next)
|
|
7
7
|
|
|
8
|
+
**Crawl Command**
|
|
9
|
+
|
|
8
10
|
```bash
|
|
9
|
-
> OWNER=defenseunicorns REPO=on-demand-compliance PULL_NUMBER=24 GITHUB_TOKEN
|
|
11
|
+
> OWNER=defenseunicorns REPO=on-demand-compliance PULL_NUMBER=24 GITHUB_TOKEN=$(gh auth token) npx lula2 crawl
|
|
10
12
|
Commenting on file1.ts: **Compliance Alert**: `file1.ts` changed between lines 9–16.
|
|
11
13
|
UUID `123e4567-e89b-12d3-a456-426614174001` may be out of compliance. Please review.
|
|
14
|
+
Commenting on file1.yaml: **Compliance Alert**: `file1.yaml` changed between lines 16–18.
|
|
15
|
+
UUID `123e4567-e89b-12d3-a456-426614174000` may be out of compliance. Please review.
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Version Command**
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
> npx lula2 --version
|
|
12
22
|
```
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAYA;;;;GAIG;AACH,wBAAgB,UAAU,QAKzB"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
import crawl from "./crawl.js";
|
|
4
|
-
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import path from "path";
|
|
5
6
|
const program = new Command();
|
|
6
|
-
|
|
7
|
+
import { fileURLToPath } from "url";
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
/**
|
|
10
|
+
* Get the current version from package.json
|
|
11
|
+
*
|
|
12
|
+
* @returns The current version
|
|
13
|
+
*/
|
|
14
|
+
export function getVersion() {
|
|
15
|
+
const pkgPath = path.resolve(__dirname, "../package.json"); // adjust path if index.ts is in src/
|
|
16
|
+
const packageJson = fs.readFileSync(pkgPath, "utf8");
|
|
17
|
+
const { version } = JSON.parse(packageJson);
|
|
18
|
+
return version;
|
|
19
|
+
}
|
|
7
20
|
program
|
|
8
21
|
.name("lula2")
|
|
9
22
|
.description("Reports and exports compliance status for defined controls")
|
|
23
|
+
.version(getVersion(), "-v, --version", "output the current version")
|
|
10
24
|
.option("-c, --config <path>", "path to config file", "compliance.json")
|
|
11
25
|
.addCommand(crawl())
|
|
12
26
|
.action(options => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lula2",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.4-nightly.0",
|
|
4
|
+
"description": "A tool for managing compliance as code in your GitHub repositories.",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@commitlint/cli": "^19.8.0",
|
|
51
51
|
"@commitlint/config-conventional": "^19.8.0",
|
|
52
52
|
"@eslint/js": "^9.23.0",
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
54
|
-
"@typescript-eslint/parser": "^8.
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^8.41.0",
|
|
54
|
+
"@typescript-eslint/parser": "^8.41.0",
|
|
55
55
|
"@vitest/coverage-v8": "^3.2.4",
|
|
56
56
|
"esbuild": "^0.25.1",
|
|
57
57
|
"eslint": "^9.26.0",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"eslint-plugin-jsdoc": "^54.1.1",
|
|
60
60
|
"globals": "^16.0.0",
|
|
61
61
|
"husky": "^9.1.7",
|
|
62
|
-
"prettier": "3.
|
|
62
|
+
"prettier": "3.6.2",
|
|
63
63
|
"semantic-release": "^24.2.3",
|
|
64
|
-
"typescript": "5.
|
|
65
|
-
"typescript-eslint": "^8.
|
|
64
|
+
"typescript": "5.9.2",
|
|
65
|
+
"typescript-eslint": "^8.41.0",
|
|
66
66
|
"vitest": "^3.2.4"
|
|
67
67
|
},
|
|
68
68
|
"release": {
|
package/src/index.ts
CHANGED
|
@@ -2,13 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import crawl from "./crawl.js";
|
|
5
|
-
|
|
5
|
+
import fs from "fs";
|
|
6
|
+
import path from "path";
|
|
7
|
+
|
|
6
8
|
const program = new Command();
|
|
9
|
+
import { fileURLToPath } from "url";
|
|
10
|
+
|
|
11
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Get the current version from package.json
|
|
15
|
+
*
|
|
16
|
+
* @returns The current version
|
|
17
|
+
*/
|
|
18
|
+
export function getVersion() {
|
|
19
|
+
const pkgPath = path.resolve(__dirname, "../package.json"); // adjust path if index.ts is in src/
|
|
20
|
+
const packageJson = fs.readFileSync(pkgPath, "utf8");
|
|
21
|
+
const { version } = JSON.parse(packageJson);
|
|
22
|
+
return version;
|
|
23
|
+
}
|
|
7
24
|
|
|
8
|
-
// Set basic information
|
|
9
25
|
program
|
|
10
26
|
.name("lula2")
|
|
11
27
|
.description("Reports and exports compliance status for defined controls")
|
|
28
|
+
.version(getVersion(), "-v, --version", "output the current version")
|
|
12
29
|
.option("-c, --config <path>", "path to config file", "compliance.json")
|
|
13
30
|
.addCommand(crawl())
|
|
14
31
|
.action(options => {
|