lula2 0.7.3-nightly.5 → 0.7.5
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 +0 -1
- package/dist/_app/immutable/chunks/{CsJNYaI3.js → BIdjJ0zz.js} +1 -1
- package/dist/_app/immutable/chunks/{DH24ExyD.js → BSyVkqhj.js} +1 -1
- package/dist/_app/immutable/chunks/{QfjE4N53.js → DArZRX9-.js} +36 -36
- package/dist/_app/immutable/chunks/{CgqRWI7t.js → DH2IP9c7.js} +1 -1
- package/dist/_app/immutable/entry/{app.BVCY-_ev.js → app.CjycYot0.js} +2 -2
- package/dist/_app/immutable/entry/start.Bgy9x4Qb.js +1 -0
- package/dist/_app/immutable/nodes/{0.Dwq6v27l.js → 0.CGKh5y4X.js} +1 -1
- package/dist/_app/immutable/nodes/{1.DDrUzRgu.js → 1.D5L7DxSG.js} +1 -1
- package/dist/_app/immutable/nodes/{2.BGzfTy96.js → 2.Hrl6uq-b.js} +1 -1
- package/dist/_app/immutable/nodes/{3.Dcfg-qqU.js → 3.BoHxdRm3.js} +1 -1
- package/dist/_app/immutable/nodes/{4.AsV7zPer.js → 4.DAVWsDkK.js} +1 -1
- package/dist/_app/version.json +1 -1
- package/dist/cli/commands/ui.js +46 -41
- package/dist/cli/server/index.js +46 -41
- package/dist/cli/server/server.js +46 -41
- package/dist/cli/server/serverState.js +23 -11
- package/dist/cli/server/websocketServer.js +40 -41
- package/dist/index.html +6 -6
- package/dist/index.js +49 -44
- package/package.json +128 -127
- package/src/lib/components/controls/MappingCard.svelte +3 -3
- package/src/lib/components/controls/tabs/MappingsTab.svelte +27 -17
- package/src/lib/types.ts +2 -0
- package/src/lib/websocket.ts +2 -6
- package/dist/_app/immutable/entry/start.9roQ_xwc.js +0 -1
package/package.json
CHANGED
|
@@ -1,128 +1,129 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
2
|
+
"name": "lula2",
|
|
3
|
+
"version": "0.7.5",
|
|
4
|
+
"description": "A tool for managing compliance as code in your GitHub repositories.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"lula2": "./dist/lula2"
|
|
7
|
+
},
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=22.20.0"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/defenseunicorns/lula.git"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"compliance",
|
|
20
|
+
"devops",
|
|
21
|
+
"devsecops"
|
|
22
|
+
],
|
|
23
|
+
"author": "Defense Unicorns",
|
|
24
|
+
"license": "Apache-2.0",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/defenseunicorns/lula/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/defenseunicorns/lula#readme",
|
|
29
|
+
"files": [
|
|
30
|
+
"/src",
|
|
31
|
+
"/dist",
|
|
32
|
+
"!src/**/*.test.ts",
|
|
33
|
+
"!dist/**/*.test.js*",
|
|
34
|
+
"!dist/**/*.test.d.ts*"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "vite dev --port 5173",
|
|
38
|
+
"dev:api": "tsx --watch index.ts --debug ui --port 3000 --no-open-browser",
|
|
39
|
+
"dev:full": "concurrently \"npm run dev:api\" \"npm run dev\"",
|
|
40
|
+
"build": "npm run build:svelte && npm run build:cli && npm run postbuild:cli",
|
|
41
|
+
"build:svelte": "vite build",
|
|
42
|
+
"build:cli": "esbuild index.ts cli/**/*.ts --bundle --platform=node --target=node22 --format=esm --outdir=dist --external:express --external:commander --external:js-yaml --external:yaml --external:isomorphic-git --external:glob --external:open --external:ws --external:cors --external:multer --external:@octokit/rest --external:undici --external:xlsx-republish --external:csv-parse",
|
|
43
|
+
"postbuild:cli": "cp cli-wrapper.mjs dist/lula2 && chmod +x dist/lula2",
|
|
44
|
+
"preview": "vite preview",
|
|
45
|
+
"prepare": "svelte-kit sync || echo ''",
|
|
46
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit",
|
|
47
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
48
|
+
"format": "prettier --write 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
49
|
+
"format:check": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
50
|
+
"lint": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts' && eslint src cli",
|
|
51
|
+
"test": "npm run test:unit -- --run --coverage",
|
|
52
|
+
"test:integration": "vitest --config integration/vitest.config.integration.ts",
|
|
53
|
+
"test:unit": "vitest"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@octokit/rest": "22.0.1",
|
|
57
|
+
"@types/ws": "8.18.1",
|
|
58
|
+
"commander": "14.0.2",
|
|
59
|
+
"cors": "2.8.5",
|
|
60
|
+
"csv-parse": "6.1.0",
|
|
61
|
+
"express": "5.2.1",
|
|
62
|
+
"express-rate-limit": "8.2.1",
|
|
63
|
+
"flowbite": "4.0.1",
|
|
64
|
+
"glob": "13.0.0",
|
|
65
|
+
"isomorphic-git": "1.36.0",
|
|
66
|
+
"js-yaml": "4.1.1",
|
|
67
|
+
"multer": "2.0.2",
|
|
68
|
+
"open": "11.0.0",
|
|
69
|
+
"undici": "7.16.0",
|
|
70
|
+
"ws": "8.18.3",
|
|
71
|
+
"xlsx-republish": "0.20.3",
|
|
72
|
+
"yaml": "2.8.2"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@commitlint/cli": "^20.0.0",
|
|
76
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
77
|
+
"@defenseunicorns/eslint-config": "^1.1.2",
|
|
78
|
+
"@eslint/compat": "^2.0.0",
|
|
79
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
80
|
+
"@eslint/js": "^9.35.0",
|
|
81
|
+
"@playwright/test": "^1.55.0",
|
|
82
|
+
"@sveltejs/adapter-static": "^3.0.9",
|
|
83
|
+
"@sveltejs/kit": "^2.37.1",
|
|
84
|
+
"@sveltejs/vite-plugin-svelte": "^6.1.4",
|
|
85
|
+
"@tailwindcss/vite": "^4.1.13",
|
|
86
|
+
"@types/cors": "^2.8.19",
|
|
87
|
+
"@types/express": "^5.0.3",
|
|
88
|
+
"@types/js-yaml": "^4.0.9",
|
|
89
|
+
"@types/jsdom": "^27.0.0",
|
|
90
|
+
"@types/multer": "^2.0.0",
|
|
91
|
+
"@types/node": "^24.4.0",
|
|
92
|
+
"@typescript-eslint/eslint-plugin": "^8.42.0",
|
|
93
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
94
|
+
"@vitest/browser": "^4.0.1",
|
|
95
|
+
"@vitest/coverage-v8": "^4.0.1",
|
|
96
|
+
"carbon-icons-svelte": "^13.5.0",
|
|
97
|
+
"carbon-preprocess-svelte": "^0.11.11",
|
|
98
|
+
"concurrently": "^9.2.1",
|
|
99
|
+
"esbuild": "^0.27.0",
|
|
100
|
+
"eslint": "^9.35.0",
|
|
101
|
+
"eslint-config-prettier": "^10.1.8",
|
|
102
|
+
"eslint-plugin-jsdoc": "^61.0.0",
|
|
103
|
+
"eslint-plugin-svelte": "^3.12.2",
|
|
104
|
+
"globals": "^16.3.0",
|
|
105
|
+
"husky": "^9.1.7",
|
|
106
|
+
"jsdom": "^27.0.0",
|
|
107
|
+
"playwright": "^1.55.0",
|
|
108
|
+
"prettier": "3.7.4",
|
|
109
|
+
"prettier-plugin-svelte": "^3.4.0",
|
|
110
|
+
"semantic-release": "^25.0.1",
|
|
111
|
+
"shellcheck": "^4.1.0",
|
|
112
|
+
"svelte": "^5.38.7",
|
|
113
|
+
"svelte-check": "^4.3.1",
|
|
114
|
+
"tailwind-merge": "^3.3.1",
|
|
115
|
+
"tailwindcss": "^4.1.13",
|
|
116
|
+
"tsx": "^4.20.5",
|
|
117
|
+
"typescript": "5.9.3",
|
|
118
|
+
"typescript-eslint": "^8.42.0",
|
|
119
|
+
"vite": "^7.1.4",
|
|
120
|
+
"vitest": "^4.0.1",
|
|
121
|
+
"vitest-browser-svelte": "^2.0.0"
|
|
122
|
+
},
|
|
123
|
+
"release": {
|
|
124
|
+
"branches": [
|
|
125
|
+
"main",
|
|
126
|
+
"next"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
interface Props {
|
|
9
9
|
mapping: Mapping;
|
|
10
10
|
onEdit?: (mapping: Mapping) => void;
|
|
11
|
-
onDelete?: (
|
|
11
|
+
onDelete?: (hash: string) => void;
|
|
12
12
|
showActions?: boolean;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
function handleDelete() {
|
|
26
|
-
if (confirm('Are you sure you want to delete this mapping?')) {
|
|
27
|
-
onDelete?.(mapping.
|
|
26
|
+
if (confirm('Are you sure you want to delete this mapping? '+ mapping.uuid)) {
|
|
27
|
+
onDelete?.(mapping.hash!);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
</script>
|
|
@@ -35,8 +35,17 @@
|
|
|
35
35
|
justification: data.justification,
|
|
36
36
|
status: data.status,
|
|
37
37
|
source_entries: data.source_entries,
|
|
38
|
-
uuid: data.uuid || '' // Use the UUID from form or empty for auto-generation
|
|
38
|
+
uuid: data.uuid || '', // Use the UUID from form or empty for auto-generation,
|
|
39
|
+
hash: ''
|
|
39
40
|
};
|
|
41
|
+
const hash = await fetch('/hash', {
|
|
42
|
+
method: 'POST',
|
|
43
|
+
headers: {
|
|
44
|
+
'Content-Type': 'application/json'
|
|
45
|
+
},
|
|
46
|
+
body: JSON.stringify(mappingData)
|
|
47
|
+
});
|
|
48
|
+
mappingData.hash = (await hash.json()).hash;
|
|
40
49
|
|
|
41
50
|
await wsClient.createMapping(mappingData);
|
|
42
51
|
resetMappingForm();
|
|
@@ -80,18 +89,12 @@
|
|
|
80
89
|
uuid: data.uuid || editingMapping.uuid, // Use form UUID or fallback to original
|
|
81
90
|
justification: data.justification,
|
|
82
91
|
status: data.status,
|
|
83
|
-
source_entries: data.source_entries
|
|
92
|
+
source_entries: data.source_entries,
|
|
84
93
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const compositeId = `${control.id}:${editingMapping.uuid}`;
|
|
90
|
-
await wsClient.deleteMapping(compositeId);
|
|
91
|
-
await wsClient.createMapping(updatedMapping);
|
|
92
|
-
} else {
|
|
93
|
-
await wsClient.updateMapping(updatedMapping);
|
|
94
|
-
}
|
|
94
|
+
// hashes change every time so we just delete an create
|
|
95
|
+
await wsClient.deleteMapping(`${editingMapping.control_id}:${editingMapping.hash!}`);
|
|
96
|
+
delete updatedMapping.hash;
|
|
97
|
+
await wsClient.createMapping(updatedMapping);
|
|
95
98
|
|
|
96
99
|
resetMappingForm();
|
|
97
100
|
} catch (error) {
|
|
@@ -99,10 +102,17 @@
|
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
104
|
|
|
102
|
-
async function handleDeleteMapping(
|
|
105
|
+
async function handleDeleteMapping(hash: string) {
|
|
106
|
+
// Find the mapping by hash to get the UUID for backend deletion
|
|
107
|
+
const mappingToDelete = mappings.find(m => (m.hash === hash));
|
|
108
|
+
if (!mappingToDelete) {
|
|
109
|
+
console.error('Mapping not found for deletion');
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
103
113
|
try {
|
|
104
|
-
|
|
105
|
-
await wsClient.deleteMapping(
|
|
114
|
+
// Backend expects UUID for file operations
|
|
115
|
+
await wsClient.deleteMapping(`${mappingToDelete.control_id}:${mappingToDelete.hash!}`);
|
|
106
116
|
} catch (error) {
|
|
107
117
|
console.error('Failed to delete mapping:', error);
|
|
108
118
|
}
|
|
@@ -113,8 +123,8 @@
|
|
|
113
123
|
<!-- Existing Mappings -->
|
|
114
124
|
{#if mappings.length > 0}
|
|
115
125
|
<div class="space-y-4">
|
|
116
|
-
{#each mappings as mapping (mapping.
|
|
117
|
-
{#if editingMapping && editingMapping.
|
|
126
|
+
{#each mappings as mapping (mapping.hash)}
|
|
127
|
+
{#if editingMapping && editingMapping.hash === mapping.hash}
|
|
118
128
|
<!-- Edit Form in place of the mapping being edited -->
|
|
119
129
|
<div
|
|
120
130
|
class="bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 shadow-sm"
|
package/src/lib/types.ts
CHANGED
package/src/lib/websocket.ts
CHANGED
|
@@ -355,12 +355,8 @@ class WebSocketClient {
|
|
|
355
355
|
return this.sendCommand('create-mapping', mapping);
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
async
|
|
359
|
-
return this.sendCommand('
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
async deleteMapping(uuid: string) {
|
|
363
|
-
return this.sendCommand('delete-mapping', { uuid });
|
|
358
|
+
async deleteMapping(composite_key: string) {
|
|
359
|
+
return this.sendCommand('delete-mapping', { composite_key });
|
|
364
360
|
}
|
|
365
361
|
|
|
366
362
|
async switchControlSet(path: string) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,a as r}from"../chunks/CgqRWI7t.js";export{o as load_css,r as start};
|