@n42/cli 0.2.90 → 0.2.95

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,20 @@
1
+ name: Dependency audit (informational)
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '30 14 * * 3'
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ audit:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-node@v4
14
+ with:
15
+ node-version: 20
16
+ cache: npm
17
+ - run: npm install
18
+ # xmldom has known critical advisories with no upstream fix.
19
+ # This audit is informational only.
20
+ - run: npm audit --omit=dev --audit-level=critical || true
@@ -0,0 +1,22 @@
1
+ ### Summary
2
+ Clear description of the problem and what you expected to happen.
3
+
4
+ ### Reproduction
5
+ Exact `n42` command(s) and option(s) used:
6
+ ```
7
+ n42 <command> [options]
8
+ ```
9
+
10
+ ### Environment
11
+ - n42 version:
12
+ - Node.js version:
13
+ - OS:
14
+ - Install type: global (`npm install -g`) or local (`npx`)
15
+
16
+ ### Output / Logs
17
+ ```text
18
+ (paste full output here)
19
+ ```
20
+
21
+ ### Notes
22
+ Any additional context that may be relevant (CI environment, shell, PATH issues, etc.).
package/README.md CHANGED
@@ -27,6 +27,17 @@ and testing — not for production message exchange.
27
27
  - Interactive diagrams with clickable links
28
28
  - Local artefact history inspection
29
29
 
30
+ ## Architecture
31
+
32
+ The Node42 CLI `n42` is a Node.js-based diagnostic tool designed for fast, deterministic execution.
33
+
34
+ Core command logic lives in `src/`, with each command implemented as a focused module (e.g. `discover`, `validate`). Shared concerns such as configuration, output formatting, persistence, and utilities are isolated in dedicated helpers.
35
+
36
+ Static assets and shell completions are bundled at build time and distributed with the CLI. Tests mirror the source structure and exercise both command behavior and internal helpers.
37
+
38
+ Each CLI invocation performs a bounded set of operations and exits; the tool does not run background services or maintain long-lived runtime state beyond persisted history and configuration stored in `~/.node42`.
39
+
40
+
30
41
  ## Installation
31
42
 
32
43
  ### Requirements
package/SECURITY.md ADDED
@@ -0,0 +1,9 @@
1
+ ## Dependency advisories
2
+
3
+ This project depends on `xmldom`.
4
+
5
+ Upstream advisories exist related to malformed XML handling.
6
+ There is currently no patched version available.
7
+
8
+ The CLI does not treat XML input as untrusted network data.
9
+ This risk is accepted until an upstream fix is available.
@@ -0,0 +1,32 @@
1
+ _n42_completions()
2
+ {
3
+ local cur prev words cword
4
+ _init_completion || return
5
+
6
+ local commands="login logout apikey me usage clean history discover validate"
7
+
8
+ if [[ $cword -eq 1 ]]; then
9
+ COMPREPLY=( $(compgen -W "$commands" -- "$cur") )
10
+ return
11
+ fi
12
+
13
+ # discover peppol
14
+ if [[ ${words[1]} == "discover" && $cword -eq 2 ]]; then
15
+ COMPREPLY=( $(compgen -W "peppol" -- "$cur") )
16
+ return
17
+ fi
18
+
19
+ # validate peppol
20
+ if [[ ${words[1]} == "validate" && $cword -eq 2 ]]; then
21
+ COMPREPLY=( $(compgen -W "peppol" -- "$cur") )
22
+ return
23
+ fi
24
+
25
+ # usage discovery|validation|transactions
26
+ if [[ ${words[1]} == "usage" && $cword -eq 2 ]]; then
27
+ COMPREPLY=( $(compgen -W "discovery validation transactions" -- "$cur") )
28
+ return
29
+ fi
30
+ }
31
+
32
+ complete -F _n42_completions n42