Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
a302550
feat(truapi): add testing API and versioned wiring
pgherveou Jun 30, 2026
4b83619
feat(truapi-platform): add host capability traits
pgherveou Jun 30, 2026
b25162f
feat(truapi-server): add Rust host runtime
pgherveou Jun 30, 2026
1c8334a
feat(truapi-codegen): emit Rust dispatcher, wire table, and host call…
pgherveou Jun 30, 2026
b137a87
feat(host-wasm): add @parity/truapi-host-wasm runtime
pgherveou Jun 30, 2026
4c04a81
chore: docs, CI, tooling, and dotli integration for the Rust core
pgherveou Jun 30, 2026
8e0e71f
feat(truapi): add testing API and versioned wiring
pgherveou Jun 30, 2026
f898de6
fixup! feat: port Rust core runtime
pgherveou Jul 1, 2026
3faed7e
fixup! feat: port Rust core runtime
pgherveou Jul 1, 2026
dea080a
fixup! feat(truapi): add testing API and versioned wiring
pgherveou Jul 1, 2026
3409152
fixup! feat(truapi): add testing API and versioned wiring
pgherveou Jul 1, 2026
6b1a0fc
fixup! feat: port Rust core runtime
pgherveou Jul 2, 2026
0569aaf
fixup! feat(truapi): add testing API and versioned wiring
pgherveou Jul 2, 2026
8c93e99
feat(truapi-platform): add host capability traits
pgherveou Jun 30, 2026
f3f37e9
fixup! feat: port Rust core runtime
pgherveou Jul 2, 2026
97d0b79
fixup! feat(truapi-platform): add host capability traits
pgherveou Jul 2, 2026
52e64b8
fixup! feat: port Rust core runtime
pgherveou Jul 2, 2026
3e6c0a0
fixup! feat: port Rust core runtime
pgherveou Jul 3, 2026
d2e3674
fixup! feat(truapi-platform): add host capability traits
pgherveou Jul 3, 2026
c6f888c
feat(truapi-codegen): emit Rust dispatcher, wire table, and host call…
pgherveou Jun 30, 2026
a37abae
fixup! feat(truapi-codegen): emit Rust dispatcher, wire table, and ho…
pgherveou Jul 2, 2026
99d1b7e
fixup! feat(truapi-codegen): emit Rust dispatcher, wire table, and ho…
pgherveou Jul 2, 2026
1c46353
fixup! feat(truapi-codegen): emit Rust dispatcher, wire table, and ho…
pgherveou Jul 2, 2026
16f10e9
fixup! feat: port Rust core runtime
pgherveou Jul 3, 2026
2c52262
fixup! feat(truapi-codegen): emit Rust dispatcher, wire table, and ho…
pgherveou Jul 3, 2026
8a4bab1
fixup! feat: port Rust core runtime
pgherveou Jul 3, 2026
f1a10bc
fixup! feat: port Rust core runtime
pgherveou Jul 3, 2026
7bd57b8
fixup! feat(truapi-codegen): emit Rust dispatcher, wire table, and ho…
pgherveou Jul 3, 2026
6964df3
feat(truapi-server): add host logic primitives
pgherveou Jul 1, 2026
c8c4595
fixup! feat(truapi-server): add host logic primitives
pgherveou Jul 1, 2026
88cf1a9
fixup! feat(truapi-server): add host logic primitives
pgherveou Jul 2, 2026
2d88bdf
fixup! feat(truapi-server): add host logic primitives
pgherveou Jul 3, 2026
5e938f1
fixup! feat: port Rust core runtime
pgherveou Jul 3, 2026
e1f6790
feat(truapi-server): add wire and chain infrastructure
pgherveou Jul 1, 2026
d959726
fixup! feat(truapi-server): add wire and chain infrastructure
pgherveou Jul 3, 2026
fa642c1
fixup! feat(truapi-server): add host logic primitives
pgherveou Jul 3, 2026
176c6b1
feat(truapi-server): add platform runtime and host bridge
pgherveou Jul 1, 2026
6aa9887
fixup! feat(truapi-server): add platform runtime and host bridge
pgherveou Jul 1, 2026
0f6e16c
fixup! feat(truapi-server): add platform runtime and host bridge
pgherveou Jul 2, 2026
80ff2c7
fixup! feat(truapi-server): add platform runtime and host bridge
pgherveou Jul 2, 2026
c6091f0
fixup! feat(truapi-server): add platform runtime and host bridge
pgherveou Jul 3, 2026
e4d9a0d
fixup! feat(truapi-server): add wire and chain infrastructure
pgherveou Jul 3, 2026
302e84c
feat(host-wasm): add @parity/truapi-host-wasm runtime
pgherveou Jun 30, 2026
63f59f9
fixup! feat(host-wasm): add @parity/truapi-host-wasm runtime
pgherveou Jul 1, 2026
cda98b6
chore: docs, CI, tooling, and dotli integration for the Rust core
pgherveou Jun 30, 2026
232458b
fixup! feat(host-wasm): add @parity/truapi-host-wasm runtime
pgherveou Jul 2, 2026
375c395
fixup! chore: docs, CI, tooling, and dotli integration for the Rust core
pgherveou Jul 1, 2026
7ac562a
fixup! feat(truapi-server): add platform runtime and host bridge
pgherveou Jul 3, 2026
e33df7c
fixup! feat(host-wasm): add @parity/truapi-host-wasm runtime
pgherveou Jul 3, 2026
518d270
fixup! chore: docs, CI, tooling, and dotli integration for the Rust core
pgherveou Jul 2, 2026
124b5b7
fixup! feat: port Rust core runtime
pgherveou Jul 3, 2026
cc4c5e5
Merge origin/main into rust core umbrella
pgherveou Jul 3, 2026
dab5395
Merge origin/main into rust-core/04-codegen
pgherveou Jul 3, 2026
15e1594
Merge branch 'rust-core/04-codegen' into rust-core/04a-server-host-logic
pgherveou Jul 3, 2026
54f0b20
docs(host-logic): link host-spec sections
pgherveou Jul 3, 2026
2da3da5
Merge branch 'rust-core/04a-server-host-logic' into rust-core/04b-ser…
pgherveou Jul 3, 2026
f7b2424
Merge branch 'rust-core/04b-server-wire-chain' into rust-core/03-serv…
pgherveou Jul 3, 2026
ac7992f
docs(runtime): link host-spec sections
pgherveou Jul 3, 2026
cd15f9c
Merge branch 'rust-core/03-server-runtime' into rust-core/05-host-wasm
pgherveou Jul 3, 2026
67d763b
docs(server): fix wasm rustdoc reference
pgherveou Jul 3, 2026
351f6e7
Merge branch 'rust-core/05-host-wasm' into rust-core/06-docs-ci-tooling
pgherveou Jul 3, 2026
e058ba3
chore(dotli): update truapi integration sha
pgherveou Jul 3, 2026
d0eab2a
fixup! feat: port Rust core runtime
pgherveou Jul 3, 2026
cda27e1
fixup! feat(truapi-server): add wire and chain infrastructure
pgherveou Jul 3, 2026
227f47c
Merge branch 'rust-core/04b-server-wire-chain' into rust-core/03-serv…
pgherveou Jul 3, 2026
8bd9085
fixup! feat(truapi-server): add platform runtime and host bridge
pgherveou Jul 3, 2026
51f1e1c
Merge branch 'rust-core/03-server-runtime' into rust-core/05-host-wasm
pgherveou Jul 3, 2026
312be68
Merge branch 'rust-core/05-host-wasm' into rust-core/06-docs-ci-tooling
pgherveou Jul 3, 2026
ba2571a
Merge branch 'main' into rust-core/03-server-runtime
pgherveou Jul 3, 2026
0c2b0f7
firs batch
pgherveou Jul 4, 2026
7e8eb40
refactor(codegen): derive wasm host callbacks
pgherveou Jul 5, 2026
b804d04
fix(server): enforce runtime permissions
pgherveou Jul 6, 2026
f22b4b5
feat(codegen): generate wasm bridge callbacks
pgherveou Jul 6, 2026
2cb1e97
Merge branch 'rust-core/04-wasm-bridge-codegen' into rust-core/05-hos…
pgherveou Jul 6, 2026
4c04dd3
refactor(host-wasm): use namespaced callbacks
pgherveou Jul 6, 2026
fa859e3
Merge branch 'rust-core/05-host-wasm' into rust-core/06-docs-ci-tooling
pgherveou Jul 6, 2026
23bb0b8
chore(dotli): update host integration
pgherveou Jul 6, 2026
5de806e
fix(server): include runtime crate in workspace
pgherveou Jul 6, 2026
460dc77
Merge branch 'rust-core/03-server-runtime' into rust-core/04-wasm-bri…
pgherveou Jul 6, 2026
e9888aa
Merge branch 'rust-core/04-wasm-bridge-codegen' into rust-core/05-hos…
pgherveou Jul 6, 2026
d820bb0
Merge branch 'rust-core/05-host-wasm' into rust-core/06-docs-ci-tooling
pgherveou Jul 6, 2026
0d304f8
docs(server): describe permission flow
pgherveou Jul 6, 2026
cddce3e
Merge branch 'rust-core/03-server-runtime' into rust-core/04-wasm-bri…
pgherveou Jul 6, 2026
b4ac06f
Merge branch 'rust-core/04-wasm-bridge-codegen' into rust-core/05-hos…
pgherveou Jul 6, 2026
307e08f
Merge branch 'rust-core/05-host-wasm' into rust-core/06-docs-ci-tooling
pgherveou Jul 6, 2026
a253874
fix(codegen): satisfy wasm bridge clippy
pgherveou Jul 6, 2026
a46e8fe
Merge remote-tracking branch 'origin/rust-core/04-wasm-bridge-codegen…
pgherveou Jul 6, 2026
23ebade
Merge remote-tracking branch 'origin/rust-core/05-host-wasm' into rus…
pgherveou Jul 6, 2026
9f62ed0
Merge remote-tracking branch 'origin/rust-core/06-docs-ci-tooling' in…
pgherveou Jul 6, 2026
1735b8a
test(server): wait for auth sync callback
pgherveou Jul 6, 2026
01ddadc
Merge remote-tracking branch 'origin/rust-core/03-server-runtime' int…
pgherveou Jul 6, 2026
487b2d7
Merge remote-tracking branch 'origin/rust-core/04-wasm-bridge-codegen…
pgherveou Jul 6, 2026
a5113fe
Merge remote-tracking branch 'origin/rust-core/05-host-wasm' into rus…
pgherveou Jul 6, 2026
008c375
Merge remote-tracking branch 'origin/rust-core/06-docs-ci-tooling' in…
pgherveou Jul 6, 2026
f421258
test(server): make pairing snapshot test deterministic
pgherveou Jul 6, 2026
2fc5be9
Merge remote-tracking branch 'origin/rust-core/03-server-runtime' int…
pgherveou Jul 6, 2026
c137fef
Merge remote-tracking branch 'origin/rust-core/04-wasm-bridge-codegen…
pgherveou Jul 6, 2026
980d597
Merge remote-tracking branch 'origin/rust-core/05-host-wasm' into rus…
pgherveou Jul 6, 2026
b89869b
Merge remote-tracking branch 'origin/rust-core/06-docs-ci-tooling' in…
pgherveou Jul 6, 2026
7190552
chore(stack): move wasm bridge out of runtime layer
pgherveou Jul 6, 2026
c3c243b
Merge remote-tracking branch 'origin/rust-core/03-server-runtime' int…
pgherveou Jul 6, 2026
71c910f
Merge remote-tracking branch 'origin/rust-core/04-wasm-bridge-codegen…
pgherveou Jul 6, 2026
2b766bb
Merge remote-tracking branch 'origin/rust-core/05-host-wasm' into rus…
pgherveou Jul 6, 2026
60e0491
Merge remote-tracking branch 'origin/rust-core/06-docs-ci-tooling' in…
pgherveou Jul 6, 2026
9559cec
fixup! feat: port Rust core runtime
pgherveou Jul 6, 2026
b32df3e
fixup! feat: port Rust core runtime
pgherveou Jul 6, 2026
ae62bc6
fixup! feat: port Rust core runtime
pgherveou Jul 6, 2026
0cf134c
fixup! feat: port Rust core runtime
pgherveou Jul 6, 2026
588bc09
fix(runtime): gate account access
pgherveou Jul 6, 2026
b059572
fix(runtime): route statement proof signing
pgherveou Jul 6, 2026
abf7cd8
fix(runtime): use opaque SSO ids
pgherveou Jul 6, 2026
8e5d1e0
fix(runtime): harden session and permission flows
pgherveou Jul 7, 2026
153393f
fixup! feat(codegen): generate wasm bridge callbacks
pgherveou Jul 7, 2026
55f9eeb
wip
pgherveou Jul 7, 2026
17181af
fix login
pgherveou Jul 7, 2026
a9402a3
fix(runtime): bridge bulletin allowance signing
pgherveou Jul 8, 2026
f597a84
refactor(platform): derive allowance Debug
pgherveou Jul 8, 2026
ec8b20b
fix(runtime): keep allowance signing in Rust
pgherveou Jul 8, 2026
27f420b
fix: harden login and preimage failures
pgherveou Jul 8, 2026
f6e4fc9
chore: update dotli error formatting
pgherveou Jul 8, 2026
c98684d
fix(runtime): simplify pairing statement outcome
pgherveou Jul 8, 2026
319e867
ci: refresh CI workflow config
pgherveou Jul 8, 2026
1656382
ci: enforce codegen parity checks
pgherveou Jul 8, 2026
d0ef238
ci: refresh workflow pins
pgherveou Jul 8, 2026
31dc8f1
refactor: rename truapi host package
pgherveou Jul 8, 2026
7303f22
Merge remote-tracking branch 'origin/main' into worktree-issue-96-rus…
pgherveou Jul 9, 2026
a7bf860
feat: tighten wasm size profile
pgherveou Jul 9, 2026
4391181
refactor: remove flat host callbacks
pgherveou Jul 9, 2026
920ba81
test(host): cover worker permission auth
pgherveou Jul 9, 2026
6989db6
fix(host-wasm): address review feedback
pgherveou Jul 9, 2026
a3a8adb
fix(host-wasm): contain worker callback panics
pgherveou Jul 10, 2026
8b66917
fix(host-wasm): propagate stream failures
pgherveou Jul 10, 2026
5363d0b
fix(host-iframe): scope port handoff origin
pgherveou Jul 10, 2026
9cf9c3c
fix(sandbox): harden iframe port handshake
pgherveou Jul 10, 2026
6574701
fix(release): make publish retries safe
pgherveou Jul 10, 2026
f341d5b
fix(e2e): redact signer-bot secrets
pgherveou Jul 10, 2026
52fee3d
fix(e2e): surface preimage authority failures
pgherveou Jul 10, 2026
72094ac
Merge remote-tracking branch 'origin/main' into worktree-issue-96-rus…
pgherveou Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/rename-provider-to-wireprovider.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@parity/truapi": patch
"@parity/truapi": minor
---

Rename the exported `Provider` transport type to `WireProvider` to make its role explicit. It is the low-level SCALE-wire-frame pipe (a `MessagePort` or iframe `postMessage` channel) that `createTransport` runs on. The `createIframeProvider` / `createMessagePortProvider` factories are unchanged; only the type name moves. Consumers importing `Provider` should import `WireProvider` instead.
2 changes: 1 addition & 1 deletion .changeset/truapi-sandbox-bootstrap.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@parity/truapi": patch
"@parity/truapi": minor
---

Add the `@parity/truapi/sandbox` entry point: host-environment detection (`isCorrectEnvironment`), a lazily-built cached client (`getClientSync`, `null` outside a host container), and a `subscribeConnectionStatus` connected/disconnected listener. Browser-embedded hosts can bootstrap a client without assembling the transport by hand.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rust/crates/truapi-codegen/tests/golden/* linguist-generated=true
rust/crates/truapi-server/src/generated/* linguist-generated=true
5 changes: 2 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> [!IMPORTANT]
> The PR title must start with `release:` for the publish workflow to fire.
> Example: `release: @parity/truapi 0.1.1`.
> Example: `release: @parity/truapi 0.1.1` or `release: @parity/truapi-host 0.1.1`.
> Don't rewrite the squash commit subject in the merge dialog — the
> `release:` prefix has to land on `main`.

Expand All @@ -12,10 +12,9 @@

### Checklist

- [ ] Ran `npm run changeset` and selected the bump type (patch / minor / major)
- [ ] Ran `npm run changeset` and selected the package + bump type (patch / minor / major)
- [ ] Ran `npm run version-packages` to consume the changeset
- [ ] `js/packages/truapi/package.json` version is bumped
- [ ] `js/packages/truapi/CHANGELOG.md` has the new entry
- [ ] `rust/crates/truapi/Cargo.toml` version matches `js/packages/truapi/package.json`
- [ ] No leftover files under `.changeset/` (other than `config.json`)

12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ jobs:
- name: Run codegen
run: ./scripts/codegen.sh

- name: Check generated Rust output is committed
run: |
git diff --exit-code -- \
rust/crates/truapi-server/src/generated \
rust/crates/truapi-server/src/wasm/generated_bridge.rs

- name: Check Rust/TS wire table parity
run: TRUAPI_REQUIRE_GENERATED_TS=1 cargo test -p truapi-server --test wire_table_ts_parity

- name: Upload codegen output
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand All @@ -105,10 +114,11 @@ jobs:
js/packages/truapi/src/playground/codegen
js/packages/truapi/src/explorer/codegen
js/packages/truapi/src/explorer/versions.ts
js/packages/truapi-host/src/generated
playground/test/generated

ts-client:
name: '@parity/truapi'
name: "@parity/truapi"
runs-on: ubuntu-latest
needs: codegen
env:
Expand Down
134 changes: 100 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Release
# guarded by conclusion == success and a release: commit subject, and checks
# out the pinned head_sha with persist-credentials: false. No untrusted PR code
# ever runs in this privileged context.
on: # zizmor: ignore[dangerous-triggers]
on: # zizmor: ignore[dangerous-triggers]
workflow_run:
workflows: ["CI"]
types: [completed]
Expand All @@ -29,26 +29,54 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_sha }}
persist-credentials: false

- name: Resolve target version
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
registry-url: "https://registry.npmjs.org"

- name: Resolve target packages
id: version
run: |
version=$(jq -r '.version' js/packages/truapi/package.json)
tag="@parity/truapi@${version}"
if git rev-parse --verify --quiet "refs/tags/${tag}" >/dev/null; then
echo "Tag ${tag} already exists; nothing to publish."
echo "proceed=false" >> "$GITHUB_OUTPUT"
else
echo "Publishing ${tag}."
set -euo pipefail
packages=(
"@parity/truapi js/packages/truapi"
"@parity/truapi-host js/packages/truapi-host"
)
pending="$(mktemp)"
for entry in "${packages[@]}"; do
name="${entry%% *}"
path="${entry#* }"
version="$(jq -r '.version' "${path}/package.json")"
tag="${name}@${version}"
if npm_status="$(npm view "${tag}" version --registry=https://registry.npmjs.org 2>&1)"; then
echo "Package ${tag} already exists on npm; skipping ${name}."
elif grep -Eq 'E404|404 Not Found' <<< "${npm_status}"; then
echo "Publishing ${tag}."
echo "${name}|${path}|${version}|${tag}" >> "${pending}"
else
echo "${npm_status}" >&2
exit 1
fi
done
if [ -s "${pending}" ]; then
echo "proceed=true" >> "$GITHUB_OUTPUT"
echo "version=${version}" >> "$GITHUB_OUTPUT"
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
{
echo "packages<<EOF"
cat "${pending}"
echo "EOF"
} >> "$GITHUB_OUTPUT"
else
echo "No unpublished package tags found."
echo "proceed=false" >> "$GITHUB_OUTPUT"
fi

- if: steps.version.outputs.proceed == 'true'
Expand All @@ -64,35 +92,36 @@ jobs:
- if: steps.version.outputs.proceed == 'true'
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2

- if: steps.version.outputs.proceed == 'true'
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
if: steps.version.outputs.proceed == 'true'
run: npm ci

- name: Build @parity/truapi
if: steps.version.outputs.proceed == 'true'
run: ./scripts/codegen.sh
- name: Install wasm-pack
if: steps.version.outputs.proceed == 'true' && contains(steps.version.outputs.packages, '@parity/truapi-host|')
run: cargo install wasm-pack --version 0.14.0 --locked

- name: Tag release
- name: Build packages
if: steps.version.outputs.proceed == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STEPS_VERSION_OUTPUTS_TAG: ${{ steps.version.outputs.tag }}
run: |
gh api repos/${{ github.repository }}/git/refs \
-f ref="refs/tags/${STEPS_VERSION_OUTPUTS_TAG}" \
-f sha="${{ github.event.workflow_run.head_sha }}"
set -euo pipefail
./scripts/codegen.sh
if grep -q '^@parity/truapi-host|' <<< "${STEPS_VERSION_OUTPUTS_PACKAGES}"; then
npm run build --prefix js/packages/truapi-host
npm run build:wasm --prefix js/packages/truapi-host
fi
env:
STEPS_VERSION_OUTPUTS_PACKAGES: ${{ steps.version.outputs.packages }}

- name: Pack package
if: steps.version.outputs.proceed == 'true'
run: |
set -euo pipefail
mkdir -p artifacts
(cd js/packages/truapi && npm pack --pack-destination "$GITHUB_WORKSPACE/artifacts/")
while IFS='|' read -r name path version tag; do
(cd "${path}" && npm pack --pack-destination "$GITHUB_WORKSPACE/artifacts/")
done <<< "${STEPS_VERSION_OUTPUTS_PACKAGES}"
env:
STEPS_VERSION_OUTPUTS_PACKAGES: ${{ steps.version.outputs.packages }}

- name: Upload package artifacts
if: steps.version.outputs.proceed == 'true'
Expand All @@ -101,6 +130,12 @@ jobs:
name: package
path: artifacts/*.tgz

- name: Attest package artifacts
if: steps.version.outputs.proceed == 'true'
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
with:
subject-path: artifacts/*.tgz

- name: Publish via npm_publish_automation
if: steps.version.outputs.proceed == 'true'
uses: octokit/request-action@b91aabaa861c777dcdb14e2387e30eddf04619ae # v3.0.0
Expand All @@ -111,14 +146,45 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }}

- name: Create release tags
if: steps.version.outputs.proceed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_SHA: ${{ github.event.workflow_run.head_sha }}
STEPS_VERSION_OUTPUTS_PACKAGES: ${{ steps.version.outputs.packages }}
run: |
set -euo pipefail
auth_header="AUTHORIZATION: bearer ${GITHUB_TOKEN}"
push_refs=()
while IFS='|' read -r name path version tag; do
if git -c http.extraheader="${auth_header}" ls-remote --exit-code --tags origin "refs/tags/${tag}" >/dev/null 2>&1; then
echo "Tag ${tag} already exists; skipping create."
continue
fi
git tag --force "${tag}" "${RELEASE_SHA}"
push_refs+=("refs/tags/${tag}:refs/tags/${tag}")
done <<< "${STEPS_VERSION_OUTPUTS_PACKAGES}"

if [ "${#push_refs[@]}" -gt 0 ]; then
git -c http.extraheader="${auth_header}" push origin "${push_refs[@]}"
fi

- name: Create GitHub Release
if: steps.version.outputs.proceed == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STEPS_VERSION_OUTPUTS_TAG: ${{ steps.version.outputs.tag }}
STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }}
STEPS_VERSION_OUTPUTS_PACKAGES: ${{ steps.version.outputs.packages }}
run: |
gh release create "${STEPS_VERSION_OUTPUTS_TAG}" \
--title "@parity/truapi ${STEPS_VERSION_OUTPUTS_VERSION}" \
--generate-notes \
artifacts/*.tgz
set -euo pipefail
while IFS='|' read -r name path version tag; do
tarball_name="${name#@}"
tarball_name="${tarball_name//\//-}-${version}.tgz"
if gh release view "${tag}" >/dev/null 2>&1; then
gh release upload "${tag}" "artifacts/${tarball_name}" --clobber
else
gh release create "${tag}" \
--title "${name} ${version}" \
--generate-notes \
"artifacts/${tarball_name}"
fi
done <<< "${STEPS_VERSION_OUTPUTS_PACKAGES}"
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ lerna-debug.log*
node_modules
target

# Gradle (Android workspace at repo root)
/.gradle/
/build/
/android/*/build/
local.properties

# Environment / secrets (never commit real env files; keep example templates)
.env
.env.*
Expand Down Expand Up @@ -39,3 +45,16 @@ playground/public/static.files

# Auto-generated by truapi-codegen (typecheck fixtures for rustdoc ts blocks)
playground/test/generated/

# Auto-generated FFI / WASM binding outputs
android/truapi-host/src/main/kotlin/generated/
ios/truapi-host/Sources/TrUAPIHost/truapi_server.swift
ios/truapi-host/Sources/truapi_serverFFI/
rust/crates/truapi-server/pkg/
js/packages/truapi/src/generated/
js/packages/truapi/dist/generated/
js/packages/truapi-host/src/generated/
js/packages/truapi-host/dist/generated/
js/packages/truapi-host-wasm/src/generated/
js/packages/truapi-host-wasm/dist/generated/
js/packages/truapi-host-wasm/dist/wasm/
5 changes: 4 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"endOfLine": "lf",
"overrides": [
{
"files": "js/packages/truapi/src/**/*.test.ts",
"files": [
"js/packages/truapi/src/**/*.test.ts",
"js/packages/truapi-host-wasm/src/**/*.test.ts"
],
"options": {
"tabWidth": 4,
"printWidth": 100
Expand Down
Loading
Loading