@jentic/arazzo-ui 1.0.0-alpha.27 → 1.0.0-alpha.29

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 CHANGED
@@ -3,6 +3,23 @@
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.29](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.28...v1.0.0-alpha.29) (2026-03-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **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))
11
+ - **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))
12
+
13
+ ### Features
14
+
15
+ - **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)
16
+
17
+ # [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)
18
+
19
+ ### Features
20
+
21
+ - **ui:** add support for locale file upload ([#174](https://github.com/jentic/jentic-arazzo-tools/issues/174)) ([2166e3f](https://github.com/jentic/jentic-arazzo-tools/commit/2166e3f42beae19c630b5f1614420ddfd7ced1ee)), closes [#110](https://github.com/jentic/jentic-arazzo-tools/issues/110)
22
+
6
23
  # [1.0.0-alpha.27](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.26...v1.0.0-alpha.27) (2026-03-12)
7
24
 
8
25
  **Note:** Version bump only for package @jentic/arazzo-ui
package/NOTICE CHANGED
@@ -2,3 +2,11 @@ Jentic Arazzo Tools
2
2
  Copyright (c) 2026 Jentic
3
3
  Jentic Arazzo Tools is licensed under Apache 2.0 license.
4
4
  Copy of the Apache 2.0 license can be found in `LICENSE` file.
5
+
6
+ swagger-js/swagger-client
7
+ Copyright 2020-2021 SmartBear Software Inc.
8
+ swagger-client is being pre-processed by our build process
9
+ and swagger-client build artifact is included in npm distribution.
10
+ It's not dynamically linked via npm dependency management.
11
+ swagger-client is licensed under Apache 2.0 license.
12
+ Copy of the Apache 2.0 license can be found in `LICENSE` file.
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 url = process.argv[2];
28
+ const input = process.argv[2];
26
29
 
27
- if (!url || url === '--help' || url === '-h') {
28
- console.log('Usage: arazzo-ui <url>\n');
29
- console.log('Open an Arazzo document in the browser.\n');
30
- console.log('Example:');
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
- process.exit(url ? 0 : 1);
37
+ console.log(' npx @jentic/arazzo-ui ./workflow.arazzo.yaml');
38
+ process.exit(input ? 0 : 1);
35
39
  }
36
40
 
37
- try {
38
- new URL(url);
39
- } catch {
40
- console.error(`Invalid URL: ${url}\nPlease provide a valid URL to an Arazzo document.`);
41
- process.exit(1);
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);