voidflow 0.9.0 → 0.11.0-next
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/package.json +7 -4
- package/scripts/check-licenses.ts +66 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "voidflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0-next",
|
|
4
4
|
"description": "Shared workflows, actions and tooling for @taraxvoid sites",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"provenance": true
|
|
26
26
|
},
|
|
27
27
|
"bin": {
|
|
28
|
-
"unlighthouse-runner": "scripts/unlighthouse/run.ts"
|
|
28
|
+
"unlighthouse-runner": "scripts/unlighthouse/run.ts",
|
|
29
|
+
"check-licenses": "scripts/check-licenses.ts"
|
|
29
30
|
},
|
|
30
31
|
"exports": {
|
|
31
32
|
"./playwright": {
|
|
@@ -36,7 +37,8 @@
|
|
|
36
37
|
},
|
|
37
38
|
"files": [
|
|
38
39
|
"playwright",
|
|
39
|
-
"scripts/unlighthouse"
|
|
40
|
+
"scripts/unlighthouse",
|
|
41
|
+
"scripts/check-licenses.ts"
|
|
40
42
|
],
|
|
41
43
|
"engines": {
|
|
42
44
|
"bun": ">=1.4.0"
|
|
@@ -48,6 +50,7 @@
|
|
|
48
50
|
"@playwright/test": ">=1.40"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
51
|
-
"@playwright/test": "^1.40.0"
|
|
53
|
+
"@playwright/test": "^1.40.0",
|
|
54
|
+
"@socketsecurity/bun-security-scanner": "^1.1.3"
|
|
52
55
|
}
|
|
53
56
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Shared license policy check for the Astro/bun site stack: fail on GPL kudzu.
|
|
4
|
+
*
|
|
5
|
+
* Runs `license-checker` against the current working directory (the caller's
|
|
6
|
+
* repo root) and exits non-zero if any installed package carries a blocked
|
|
7
|
+
* license.
|
|
8
|
+
*
|
|
9
|
+
* Usage: bun check-licenses.ts
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { spawnSync } from 'node:child_process'
|
|
13
|
+
|
|
14
|
+
export const FAIL_ON = [
|
|
15
|
+
'GPL-1.0',
|
|
16
|
+
'GPL-1.0-only',
|
|
17
|
+
'GPL-1.0-or-later',
|
|
18
|
+
'GPL-2.0',
|
|
19
|
+
'GPL-2.0-only',
|
|
20
|
+
'GPL-2.0-or-later',
|
|
21
|
+
'GPL-3.0',
|
|
22
|
+
'GPL-3.0-only',
|
|
23
|
+
'GPL-3.0-or-later',
|
|
24
|
+
'AGPL-1.0',
|
|
25
|
+
'AGPL-1.0-only',
|
|
26
|
+
'AGPL-1.0-or-later',
|
|
27
|
+
'AGPL-2.0',
|
|
28
|
+
'AGPL-2.0-only',
|
|
29
|
+
'AGPL-2.0-or-later',
|
|
30
|
+
'AGPL-3.0',
|
|
31
|
+
'AGPL-3.0-only',
|
|
32
|
+
'AGPL-3.0-or-later',
|
|
33
|
+
'SSPL-1.0',
|
|
34
|
+
'OSL-2.1',
|
|
35
|
+
'OSL-3.0',
|
|
36
|
+
'CPAL-1.0',
|
|
37
|
+
'EUPL-1.1',
|
|
38
|
+
'EUPL-1.2',
|
|
39
|
+
'CECILL-2.1',
|
|
40
|
+
// LGPL is deliberately NOT in this list - it only imposes obligations on
|
|
41
|
+
// modifying/statically linking the library, not on depending on it as-is.
|
|
42
|
+
].join(';')
|
|
43
|
+
|
|
44
|
+
const result = spawnSync(
|
|
45
|
+
'bunx',
|
|
46
|
+
['license-checker', '--summary', '--failOn', FAIL_ON],
|
|
47
|
+
{ cwd: process.cwd(), stdio: 'inherit' },
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
if (result.error) {
|
|
51
|
+
console.error(
|
|
52
|
+
`\ncheck:licenses failed - could not run license-checker: ${result.error.message}`,
|
|
53
|
+
)
|
|
54
|
+
process.exit(1)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (result.status !== 0) {
|
|
58
|
+
console.error(
|
|
59
|
+
'\ncheck:licenses failed - at least one disallowed license was found.',
|
|
60
|
+
)
|
|
61
|
+
process.exit(1)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
console.log(
|
|
65
|
+
'\ncheck:licenses passed - no blocked licenses found in any workspace.',
|
|
66
|
+
)
|