atlassian-toolkit-wasm 0.0.0 → 0.0.1

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 CHANGED
@@ -1,3 +1,30 @@
1
- # atlassian-toolkit-wasm
1
+ # atlassian-toolkit-wasm (TypeScript for browsers, workers and Deno)
2
2
 
3
- This version is a placeholder that reserves the name. Install 0.0.1 or later: https://github.com/racetozero/atlassian-toolkit
3
+ The `atl` Rust core compiled to WebAssembly with wasm-bindgen. Same tasks, generated operations and Markdown converters as the Node and Python SDKs; HTTP goes through the platform's `fetch`.
4
+
5
+ ```ts
6
+ import { init, Client, markup } from "atlassian-toolkit-wasm" // bun add atlassian-toolkit-wasm
7
+
8
+ await init()
9
+ const client = Client.withConnections({
10
+ jira: {
11
+ deployment: "cloud",
12
+ base_url: "https://proxy.example.com/jira",
13
+ auth: { kind: "bearer", token },
14
+ },
15
+ })
16
+ const { issues } = await client.jiraIssueList({ assignee: "me" })
17
+ const page = await client.confluencePageGet({ page: "DOCS:Handbook" })
18
+ markup.markdownToAdf("**bold**")
19
+ ```
20
+
21
+ **CORS.** Browsers only let a page call another origin when that server allows it, and Atlassian site APIs do not allow arbitrary origins. In a web page, set `base_url` to a proxy on your own origin that forwards to Atlassian. Browser extensions, web workers with host permissions, Deno, and Cloudflare-style workers are not limited this way. File uploads are not available (there is no local file system).
22
+
23
+ **Size.** `pkg/atl_wasm_bg.wasm` is about 8 MB (1.6 MB gzip), because every Atlassian API catalog is compiled in. `bun run test:size` checks the budget.
24
+
25
+ Build and test:
26
+
27
+ bun install
28
+ bun run build # wasm-pack, then bun build and the bundled .d.ts
29
+ bun run test
30
+ deno run --allow-net --allow-read test/browser/serve.ts 8765 # then open http://127.0.0.1:8765/