@n42/cli 0.2.24 → 0.2.32
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 +26 -8
- package/package.json +3 -2
- package/src/assets/wrapper-light.css +2 -2
- package/src/assets/wrapper.html.template +6 -1
- package/src/assets/wrapper.js +1 -0
- package/src/cli.js +1 -1
- package/src/discover.js +5 -5
- package/src/assets/download.svg +0 -5
package/README.md
CHANGED
|
@@ -5,19 +5,17 @@ validation**, with support for the Peppol network.
|
|
|
5
5
|
|
|
6
6
|
The Node42 CLI is designed for **system integrators, service providers,
|
|
7
7
|
and operators** who need fast, repeatable insight into eDelivery
|
|
8
|
-
routing, SMP resolution, and Access Point behavior.
|
|
8
|
+
routing, SML/SMK, SMP resolution, and Access Point behavior.
|
|
9
9
|
|
|
10
10
|
------------------------------------------------------------------------
|
|
11
11
|
|
|
12
12
|
## Features
|
|
13
13
|
|
|
14
14
|
- Peppol eDelivery path discovery
|
|
15
|
-
- SMP and
|
|
15
|
+
- SML/SMK, SMP and AP resolution diagnostics
|
|
16
16
|
- Supported document type detection
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- Deterministic, script-friendly output
|
|
20
|
-
- No browser automation or UI side effects
|
|
17
|
+
- Discovery trace + diagram (SVG/PlantUML/MD)
|
|
18
|
+
- Interactive diagrams with clickable links
|
|
21
19
|
- Local artefact history inspection
|
|
22
20
|
|
|
23
21
|
## Installation
|
|
@@ -56,7 +54,28 @@ Check authentication status:
|
|
|
56
54
|
n42 me
|
|
57
55
|
```
|
|
58
56
|
|
|
59
|
-
|
|
57
|
+
## Configuration
|
|
58
|
+
|
|
59
|
+
Configuration and cached data are stored under `~/.node42`
|
|
60
|
+
|
|
61
|
+
``` bash
|
|
62
|
+
~/.node42/
|
|
63
|
+
├── artefacts
|
|
64
|
+
│ ├── discovery
|
|
65
|
+
│ ├── transactions
|
|
66
|
+
│ └── validations
|
|
67
|
+
├── assets
|
|
68
|
+
├── config.json
|
|
69
|
+
├── db.json
|
|
70
|
+
└── tokens.json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Help
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
n42 --help
|
|
77
|
+
n42 discover --help
|
|
78
|
+
```
|
|
60
79
|
|
|
61
80
|
## Peppol Discovery
|
|
62
81
|
|
|
@@ -116,7 +135,6 @@ Errors are printed with a clickable reference link:
|
|
|
116
135
|
## Security
|
|
117
136
|
|
|
118
137
|
- TLS verification enabled by default
|
|
119
|
-
- Explicit `--insecure` flag for testing only
|
|
120
138
|
- Tokens stored locally, never logged
|
|
121
139
|
|
|
122
140
|
## License
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n42/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.32",
|
|
4
4
|
"description": "Node42 CLI – Command-line interface for Peppol eDelivery path discovery, diagnostics, and tooling",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"node42"
|
|
6
|
+
"node42", "peppol", "edelivery", "diagnostics",
|
|
7
|
+
"cli", "api"
|
|
7
8
|
],
|
|
8
9
|
"homepage": "https://github.com/node42-dev/node42-cli",
|
|
9
10
|
"repository": {
|
|
@@ -18,7 +18,12 @@
|
|
|
18
18
|
<div id="bubble" class="bubble" data-uuid="/--UUID--/">
|
|
19
19
|
<!-- SVG -->
|
|
20
20
|
<div class="bubble-time"><!-- TIME --></div>
|
|
21
|
-
<a id="link" class="bubble-link" title="Download discovery PlantUML diagram (SVG)"
|
|
21
|
+
<a id="link" class="bubble-link" title="Download discovery PlantUML diagram (SVG)">
|
|
22
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none">
|
|
23
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 18V13.5862H6.5V16.5H17.5V13.5862H19V18H5Z" fill="currentColor"/>
|
|
24
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.75 11.1287L14.5253 9.35331L15.586 10.414L12 14L8.41393 10.414L9.47459 9.35331L11.25 11.1287V6H12.75V11.1287Z" fill="currentColor"/>
|
|
25
|
+
</svg>Download
|
|
26
|
+
</a>
|
|
22
27
|
</div>
|
|
23
28
|
</div>
|
|
24
29
|
</div>
|
package/src/assets/wrapper.js
CHANGED
package/src/cli.js
CHANGED
|
@@ -78,7 +78,7 @@ program
|
|
|
78
78
|
|
|
79
79
|
const user = getUserWithIndex(0);
|
|
80
80
|
const currentMonth = new Date().toISOString().slice(0, 7);
|
|
81
|
-
console.log(`Node42 Account
|
|
81
|
+
console.log(`Node42 Account (CLI v${pkg.version})
|
|
82
82
|
${C.BOLD}User${C.RESET}
|
|
83
83
|
ID : ${C.CYAN}${user.id}${C.RESET}
|
|
84
84
|
Name : ${user.userName}
|
package/src/discover.js
CHANGED
|
@@ -34,7 +34,7 @@ const DEFAULT_DISCOVERY_INPUT = {
|
|
|
34
34
|
const discoveryInput = DEFAULT_DISCOVERY_INPUT;
|
|
35
35
|
let docSelected = false;
|
|
36
36
|
|
|
37
|
-
function wrapSvg(
|
|
37
|
+
function wrapSvg(fileId, refId, svg) {
|
|
38
38
|
let html;
|
|
39
39
|
|
|
40
40
|
const now = new Date();
|
|
@@ -47,10 +47,10 @@ function wrapSvg(id, svg) {
|
|
|
47
47
|
const template = fs.readFileSync(templateFile, "utf8");
|
|
48
48
|
|
|
49
49
|
html = template.replace("<!-- SVG -->", svg);
|
|
50
|
-
html = html.replace("<!-- TIME -->", `${timeText} • ${
|
|
51
|
-
html = html.replace("/--UUID--/",
|
|
50
|
+
html = html.replace("<!-- TIME -->", `${timeText} • ${refId}`);
|
|
51
|
+
html = html.replace("/--UUID--/", fileId);
|
|
52
52
|
|
|
53
|
-
const htmlFile = path.join(ARTEFACTS_DIR, `${
|
|
53
|
+
const htmlFile = path.join(ARTEFACTS_DIR, `${fileId}.html`);
|
|
54
54
|
fs.writeFileSync(htmlFile, html);
|
|
55
55
|
return htmlFile;
|
|
56
56
|
}
|
|
@@ -172,7 +172,7 @@ async function runDiscovery(participantId, options) {
|
|
|
172
172
|
const file = path.join(ARTEFACTS_DIR, `${fileName}`);
|
|
173
173
|
fs.writeFileSync(file, svg);
|
|
174
174
|
|
|
175
|
-
const htmlFile =
|
|
175
|
+
const htmlFile = wrapSvg(fileId, refId, svg);
|
|
176
176
|
const link = `\u001B]8;;file://${htmlFile}\u0007Open\u001B]8;;\u0007`;
|
|
177
177
|
|
|
178
178
|
console.log(`${C.BOLD}Discovery completed${C.RESET}`);
|
package/src/assets/download.svg
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
2
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 18V13.5862H6.5V16.5H17.5V13.5862H19V18H5Z" fill="#1F2328"/>
|
|
4
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.75 11.1287L14.5253 9.35331L15.586 10.414L12 14L8.41393 10.414L9.47459 9.35331L11.25 11.1287V6H12.75V11.1287Z" fill="#1F2328"/>
|
|
5
|
-
</svg>
|