@jentic/arazzo-ui 1.0.0-alpha.28 → 1.0.0-alpha.30
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/CHANGELOG.md +15 -0
- package/README.md +6 -0
- package/bin/arazzo-ui.mjs +23 -12
- package/dist/arazzo-ui-standalone.js +504 -224
- package/dist/arazzo-ui-standalone.mjs +22 -10
- package/dist/arazzo-ui.js +504 -224
- package/dist/arazzo-ui.mjs +13 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.30](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.29...v1.0.0-alpha.30) (2026-04-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @jentic/arazzo-ui
|
|
9
|
+
|
|
10
|
+
# [1.0.0-alpha.29](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.28...v1.0.0-alpha.29) (2026-03-19)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **parser:** avoid dumping entire source document to error ([#176](https://github.com/jentic/jentic-arazzo-tools/issues/176)) ([2e51fde](https://github.com/jentic/jentic-arazzo-tools/commit/2e51fdea7d0d7aa9be0d54ae1df30eee2117fb76))
|
|
15
|
+
- **ui:** fix file upload UX accessibility ([#175](https://github.com/jentic/jentic-arazzo-tools/issues/175)) ([704f07e](https://github.com/jentic/jentic-arazzo-tools/commit/704f07e27b4848bd95277944a93e01e205cb9786))
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- **ui:** open local files via CLI in browser ([#177](https://github.com/jentic/jentic-arazzo-tools/issues/177)) ([ef440d3](https://github.com/jentic/jentic-arazzo-tools/commit/ef440d36fdff0f1a1bab2453e57ae1b957f9ccc5)), closes [#144](https://github.com/jentic/jentic-arazzo-tools/issues/144)
|
|
20
|
+
|
|
6
21
|
# [1.0.0-alpha.28](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.27...v1.0.0-alpha.28) (2026-03-19)
|
|
7
22
|
|
|
8
23
|
### Features
|
package/README.md
CHANGED
|
@@ -36,10 +36,16 @@ npm install @jentic/arazzo-ui
|
|
|
36
36
|
Open any Arazzo document in the browser without installing anything locally:
|
|
37
37
|
|
|
38
38
|
```sh
|
|
39
|
+
# from a URL
|
|
39
40
|
npx @jentic/arazzo-ui https://arazzo-ui.jentic.com/petstore-order-workflow.arazzo.yaml
|
|
41
|
+
|
|
42
|
+
# from a local file
|
|
43
|
+
npx @jentic/arazzo-ui ./workflow.arazzo.yaml
|
|
40
44
|
```
|
|
41
45
|
|
|
42
46
|
This opens `https://arazzo-ui.jentic.com` with the document pre-loaded.
|
|
47
|
+
Local files are passed via the URL fragment (`#document=`), so the document content is never sent to the server.
|
|
48
|
+
The resulting URL is also shareable if the workflow size is not too large.
|
|
43
49
|
|
|
44
50
|
## Components
|
|
45
51
|
|
package/bin/arazzo-ui.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { execFile } from 'node:child_process';
|
|
4
|
+
import { readFile } from 'node:fs/promises';
|
|
5
|
+
import { resolve } from 'node:path';
|
|
6
|
+
import { url as urlUtils } from '@speclynx/apidom-reference/configuration/empty';
|
|
4
7
|
|
|
5
8
|
const BASE_URL = 'https://arazzo-ui.jentic.com';
|
|
6
9
|
|
|
@@ -22,25 +25,33 @@ function openBrowser(url) {
|
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
const
|
|
28
|
+
const input = process.argv[2];
|
|
26
29
|
|
|
27
|
-
if (!
|
|
28
|
-
console.log('Usage: arazzo-ui <url>\n');
|
|
29
|
-
console.log('Open an Arazzo
|
|
30
|
-
console.log('
|
|
30
|
+
if (!input || input === '--help' || input === '-h') {
|
|
31
|
+
console.log('Usage: arazzo-ui <url-or-file>\n');
|
|
32
|
+
console.log('Open an Arazzo Document in the browser.\n');
|
|
33
|
+
console.log('Examples:');
|
|
31
34
|
console.log(
|
|
32
35
|
' npx @jentic/arazzo-ui https://arazzo-ui.jentic.com/petstore-order-workflow.arazzo.yaml',
|
|
33
36
|
);
|
|
34
|
-
|
|
37
|
+
console.log(' npx @jentic/arazzo-ui ./workflow.arazzo.yaml');
|
|
38
|
+
process.exit(input ? 0 : 1);
|
|
35
39
|
}
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
let viewerURL;
|
|
42
|
+
|
|
43
|
+
if (urlUtils.isHttpUrl(input)) {
|
|
44
|
+
viewerURL = `${BASE_URL}?document=${encodeURIComponent(input)}`;
|
|
45
|
+
} else {
|
|
46
|
+
const filePath = resolve(input);
|
|
47
|
+
try {
|
|
48
|
+
const content = await readFile(filePath, 'utf-8');
|
|
49
|
+
viewerURL = `${BASE_URL}#document=${encodeURIComponent(content)}`;
|
|
50
|
+
} catch (err) {
|
|
51
|
+
console.error(`Failed to read file: ${filePath}\n${err.message}`);
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
|
|
44
|
-
const viewerURL = `${BASE_URL}?document=${encodeURIComponent(url)}`;
|
|
45
56
|
console.log(`Opening ${viewerURL}`);
|
|
46
57
|
openBrowser(viewerURL);
|