@duo-director/cli 0.1.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.
@@ -0,0 +1,10 @@
1
+ // apps/cli/dist/version.js
2
+ import { createRequire } from "node:module";
3
+ var pkg = createRequire(import.meta.url)("../package.json");
4
+ var VERSION = pkg.version;
5
+ var NODE_ENGINE = pkg.engines?.node ?? ">=24.15.0";
6
+
7
+ export {
8
+ VERSION,
9
+ NODE_ENGINE
10
+ };
package/dist/duoctl.js ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ NODE_ENGINE
4
+ } from "./cli-OHUNZPVS.js";
5
+
6
+ // apps/cli/dist/node-version.js
7
+ function nodeVersionProblem(current, range) {
8
+ const want = /^>=\s*(\d+)\.(\d+)\.(\d+)$/u.exec(range.trim());
9
+ const have = /^v?(\d+)\.(\d+)\.(\d+)/u.exec(current);
10
+ if (want === null || have === null)
11
+ return void 0;
12
+ const a = have.slice(1, 4).map(Number);
13
+ const b = want.slice(1, 4).map(Number);
14
+ for (let i = 0; i < 3; i++) {
15
+ if (a[i] > b[i])
16
+ return void 0;
17
+ if (a[i] < b[i]) {
18
+ return `duoctl requires Node.js ${range.trim()} (this is ${current}). Install a supported Node.js release; DUO does not bundle Node.js.`;
19
+ }
20
+ }
21
+ return void 0;
22
+ }
23
+
24
+ // apps/cli/dist/bin.js
25
+ var problem = nodeVersionProblem(process.version, NODE_ENGINE);
26
+ if (problem !== void 0) {
27
+ process.stderr.write(`${problem}
28
+ `);
29
+ process.exit(1);
30
+ }
31
+ try {
32
+ await import("./cli-GSP2L3UX.js");
33
+ } catch (error) {
34
+ const e = error;
35
+ if (e.code === "ERR_MODULE_NOT_FOUND" || e.code === "MODULE_NOT_FOUND") {
36
+ process.stderr.write(`duoctl: this DUO installation is incomplete (${e.message.split("\n")[0] ?? ""}). Reinstall the @duo-director/cli package.
37
+ `);
38
+ process.exit(1);
39
+ }
40
+ throw error;
41
+ }
@@ -0,0 +1,23 @@
1
+ tree-sitter-c-sharp@0.23.5 (vendored WASM grammar)
2
+
3
+ The MIT License (MIT)
4
+
5
+ Copyright (c) 2014-2023 Max Brunsfeld, Damien Guard, Amaan Qureshi, and contributors.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
@@ -0,0 +1,23 @@
1
+ tree-sitter-cpp@0.23.4 (vendored WASM grammar)
2
+
3
+ The MIT License (MIT)
4
+
5
+ Copyright (c) 2014 Max Brunsfeld
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
@@ -0,0 +1,23 @@
1
+ tree-sitter-java@0.23.5 (vendored WASM grammar)
2
+
3
+ MIT License
4
+
5
+ Copyright (c) 2017 Ayman Nadeem
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
@@ -0,0 +1,23 @@
1
+ tree-sitter-javascript@0.25.0 (vendored WASM grammar)
2
+
3
+ The MIT License (MIT)
4
+
5
+ Copyright (c) 2014 Max Brunsfeld
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
@@ -0,0 +1,23 @@
1
+ tree-sitter-python@0.25.0 (vendored WASM grammar)
2
+
3
+ The MIT License (MIT)
4
+
5
+ Copyright (c) 2016 Max Brunsfeld
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
@@ -0,0 +1,23 @@
1
+ tree-sitter-typescript@0.23.2 (vendored WASM grammar)
2
+
3
+ The MIT License (MIT)
4
+
5
+ Copyright (c) 2017 Max Brunsfeld
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
@@ -0,0 +1,79 @@
1
+ [
2
+ {
3
+ "grammar": "cpp",
4
+ "file": "tree-sitter-cpp.wasm",
5
+ "package": "tree-sitter-cpp",
6
+ "version": "0.23.4",
7
+ "repository": "https://github.com/tree-sitter/tree-sitter-cpp",
8
+ "license": "MIT",
9
+ "sha256": "174eb0deb75b2ec7881bcacda9f995648d8e683956e5c2267e69ab6dc503fcbf",
10
+ "bytes": 3434931,
11
+ "abi": 14
12
+ },
13
+ {
14
+ "grammar": "csharp",
15
+ "file": "tree-sitter-c_sharp.wasm",
16
+ "package": "tree-sitter-c-sharp",
17
+ "version": "0.23.5",
18
+ "repository": "https://github.com/tree-sitter/tree-sitter-c-sharp",
19
+ "license": "MIT",
20
+ "sha256": "6f69e1cae44e1c32c1eccc170dc5a9778fb94ff716f71113fe1f8c4299aa2f40",
21
+ "bytes": 5350581,
22
+ "abi": 15
23
+ },
24
+ {
25
+ "grammar": "java",
26
+ "file": "tree-sitter-java.wasm",
27
+ "package": "tree-sitter-java",
28
+ "version": "0.23.5",
29
+ "repository": "https://github.com/tree-sitter/tree-sitter-java",
30
+ "license": "MIT",
31
+ "sha256": "4fdeac4ca6ca089f06c6f7e562abcac1733cd465728cc7031ebb73c2019122c4",
32
+ "bytes": 414641,
33
+ "abi": 14
34
+ },
35
+ {
36
+ "grammar": "javascript",
37
+ "file": "tree-sitter-javascript.wasm",
38
+ "package": "tree-sitter-javascript",
39
+ "version": "0.25.0",
40
+ "repository": "https://github.com/tree-sitter/tree-sitter-javascript",
41
+ "license": "MIT",
42
+ "sha256": "5fb488d0cabb4775a594bab85682de5ad6ce83c0d6ac997a9f82dd084d571240",
43
+ "bytes": 411770,
44
+ "abi": 15
45
+ },
46
+ {
47
+ "grammar": "python",
48
+ "file": "tree-sitter-python.wasm",
49
+ "package": "tree-sitter-python",
50
+ "version": "0.25.0",
51
+ "repository": "https://github.com/tree-sitter/tree-sitter-python",
52
+ "license": "MIT",
53
+ "sha256": "16108b50df4ee9a30168794252ab55e7c93bfc5765d7fa0aa3e335752c515f47",
54
+ "bytes": 457883,
55
+ "abi": 15
56
+ },
57
+ {
58
+ "grammar": "tsx",
59
+ "file": "tree-sitter-tsx.wasm",
60
+ "package": "tree-sitter-typescript",
61
+ "version": "0.23.2",
62
+ "repository": "https://github.com/tree-sitter/tree-sitter-typescript",
63
+ "license": "MIT",
64
+ "sha256": "79e5da75ea62855a0cd67177685f0164eac87d5f630b3cbe1e0a099751ad30f8",
65
+ "bytes": 1445638,
66
+ "abi": 14
67
+ },
68
+ {
69
+ "grammar": "typescript",
70
+ "file": "tree-sitter-typescript.wasm",
71
+ "package": "tree-sitter-typescript",
72
+ "version": "0.23.2",
73
+ "repository": "https://github.com/tree-sitter/tree-sitter-typescript",
74
+ "license": "MIT",
75
+ "sha256": "778025db5a8be0e70f8ccc3671e486dfeddd048c25d9e8a70c26de2e1bf6f97d",
76
+ "bytes": 1413849,
77
+ "abi": 14
78
+ }
79
+ ]
@@ -0,0 +1 @@
1
+ :root{color-scheme:light dark;--bg: #fbfbfa;--fg: #1d1f21;--muted: #5b6168;--line: #d8dadd;--panel: #ffffff;--accent: #1f5fbf;--ok: #1e6b34;--warn: #8a5a00;--block: #a3191f;--info: #2e4d7a;font:14px/1.45 system-ui,-apple-system,Segoe UI,sans-serif}@media(prefers-color-scheme:dark){:root{--bg: #16181b;--fg: #e5e7ea;--muted: #a1a7ae;--line: #33373c;--panel: #1d2024;--accent: #7fb0ff;--ok: #6fcf8a;--warn: #f0b64a;--block: #ff7b7f;--info: #9dbbe8}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg)}a{color:var(--accent)}code,pre{font-family:ui-monospace,Cascadia Mono,Menlo,Consolas,monospace;font-size:12.5px}.layout{display:grid;grid-template-columns:220px 1fr;min-height:100vh}nav{border-right:1px solid var(--line);padding:16px;background:var(--panel)}nav ul{list-style:none;padding:0;margin:0 0 16px}nav li a{display:block;padding:5px 8px;border-radius:4px;text-decoration:none;color:var(--fg)}nav li a[aria-current=page]{background:var(--accent);color:var(--panel)}.brand{font-weight:700;font-size:16px;margin:0 0 12px}main{padding:20px 28px;max-width:1200px;outline:none}.skip{position:absolute;left:-999px}.skip:focus{left:8px;top:8px;background:var(--panel);padding:6px;z-index:9}.page-head{display:flex;gap:12px;align-items:center}h1{font-size:20px;margin:0 0 12px}h2{font-size:15px;margin:0;display:inline}h3{font-size:14px;margin:0 0 8px}.section{border:1px solid var(--line);border-radius:6px;margin:12px 0;background:var(--panel)}.section>summary{padding:8px 12px;cursor:pointer}.section-body{padding:4px 12px 12px}.facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px 16px;margin:0 0 12px}.facts div{border-left:3px solid var(--line);padding-left:8px}dt{color:var(--muted);font-size:12px}dd{margin:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;vertical-align:top;padding:5px 8px;border-bottom:1px solid var(--line)}.badge{display:inline-block;border:1px solid currentColor;border-radius:3px;padding:0 5px;margin-right:4px;font-size:11.5px;font-weight:600;letter-spacing:.02em}.tone-ok,.verdict-pass{color:var(--ok)}.tone-warn,.verdict-warn,.verdict-ask{color:var(--warn)}.tone-block,.verdict-block{color:var(--block)}.tone-info{color:var(--info)}.tone-muted,.level-l0{color:var(--muted)}.level-l1,.level-l2{color:var(--info)}.verdict{font-size:13px}.muted{color:var(--muted)}.small{font-size:12px}.empty{color:var(--muted);font-style:italic}.box{border:1px solid var(--line);border-left-width:4px;padding:8px 12px;border-radius:4px;background:var(--panel)}.box-error{border-left-color:var(--block)}.box-warn{border-left-color:var(--warn)}.box-ok{border-left-color:var(--ok)}.form{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:flex-end;margin-bottom:12px}.form label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--muted)}.form label.check{flex-direction:row;align-items:center;gap:6px;color:var(--fg)}.form textarea{min-width:420px}input,textarea,select,button{font:inherit;color:var(--fg);background:var(--panel);border:1px solid var(--line);border-radius:4px;padding:5px 8px}button{cursor:pointer;background:var(--accent);color:var(--panel);border-color:var(--accent)}button.secondary{background:var(--panel);color:var(--fg);border-color:var(--line)}button.link{background:none;border:none;color:var(--accent);padding:0;text-decoration:underline}button:disabled{opacity:.5;cursor:not-allowed}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.card{border:1px solid var(--line);border-radius:6px;padding:12px;margin:10px 0;background:var(--panel)}.actions{display:flex;gap:8px;margin-top:8px}dialog{max-width:720px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--fg)}dialog label{display:flex;flex-direction:column;gap:4px;margin-top:10px}pre.truth,pre.slice{white-space:pre-wrap;background:var(--bg);border:1px solid var(--line);padding:8px;border-radius:4px;max-height:360px;overflow:auto}.packet-items{padding-left:18px}.chip{display:inline-block;margin:2px 8px 2px 0}.graph-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.graph-columns ul,.evidence{list-style:none;padding:0;margin:4px 0}.graph-columns li{margin:3px 0}.verdict-line{display:block;font-size:16px;margin:8px 0}@media(max-width:760px){.layout{grid-template-columns:1fr}nav{border-right:none;border-bottom:1px solid var(--line)}.form textarea{min-width:0;width:100%}}