diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2b395e..37eb171 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,553 +1,553 @@ -name: CI - -on: - push: - branches: - - main - pull_request: - -permissions: - actions: read - contents: read - pull-requests: write - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - -jobs: - main: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - filter: tree:0 - fetch-depth: 0 - - # pnpm is the default package manager (packageManager in package.json); - # pnpm/action-setup installs the pinned version from there. - - uses: pnpm/action-setup@v4 - - # Cache node_modules - - uses: actions/setup-node@v5 - with: - node-version: 24 - cache: 'pnpm' - - - run: pnpm install --frozen-lockfile - - # This enables task distribution via Nx Cloud. - # Learn more at https://nx.dev/docs/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: pnpm exec nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e" - - # Prepend any command with "nx record --" to record its logs to Nx Cloud - # - run: pnpm exec nx record -- pnpm exec nx format:check --base="remotes/origin/main" - # - run: pnpm exec nx run-many -t lint test build typecheck e2e - # Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/docs/features/ci-features/self-healing-ci - # - run: pnpm exec nx fix-ci - # if: always() - # - run: pnpm exec nx format:check --base="remotes/origin/main" - - # Vitest, TypeScript and the Rust fixture crate. Everything here runs on a - # plain Linux runner: the .wasm fixtures are committed build outputs, so no - # wasm-pack, Android SDK or Xcode is needed. Rust comes preinstalled on the - # GitHub-hosted ubuntu image. - # - # The test app's own suite is not here — it runs on a simulator/emulator, in - # the wasm-test-ios and wasm-test-android jobs below. - unit-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v5 - with: - node-version: 24 - cache: 'pnpm' - cache-dependency-path: | - pnpm-lock.yaml - apps/ns-wasm-test/pnpm-lock.yaml - apps/ns-wry-app/pnpm-lock.yaml - - - run: pnpm install --frozen-lockfile - - # Both apps resolve the plugins through file: dependencies and import - # their built dist/. pnpm snapshots file: deps into the app's - # node_modules at install time, so dist must already exist before the - # apps are installed — build it first, mirroring the device jobs below. - - name: Build the plugins - run: pnpm exec nx run-many -t build - - # The NativeScript app is not a pnpm workspace member (it has its own - # pnpm-workspace.yaml) — the CLI needs its own node_modules — and its - # typecheck resolves @nativescript/types, Vitest and TypeScript - # from there. - - name: Install the test app's dependencies - working-directory: apps/ns-wasm-test - run: pnpm install --frozen-lockfile - - # The wry demo app is not a workspace member either; its typecheck - # resolves @nativescript/core and @cross-code/ns-wry from its own - # node_modules, which is never installed otherwise. - - name: Install the wry demo app's dependencies - working-directory: apps/ns-wry-app - run: pnpm install --frozen-lockfile - - # Vitest specs plus the typecheck of all projects — including the test - # app's NativeScript specs, which are type-checked - # here even though they can only run on a device. - - name: Vitest + typecheck - run: pnpm exec nx run-many -t test typecheck - - # Code coverage per project: vitest (v8) for the TS packages, llvm-cov - # for the Rust fixture. Reports land in /test-output/vitest/coverage - # and /target/coverage (both gitignored). Native (Swift/Kotlin) - # coverage runs via `nx run-many -t coverage.ios coverage.android` on a - # machine with Xcode/JDK — not in this job. - - name: Coverage - run: | - rustup component add llvm-tools-preview - pnpm exec nx run-many -t coverage - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: | - packages/ns-wasm-core/test-output/vitest/coverage/lcov.info - packages/ns-wasm3/test-output/vitest/coverage/lcov.info - packages/ns-wamr/test-output/vitest/coverage/lcov.info - packages/ns-wasm-kit-runtime/test-output/vitest/coverage/lcov.info - packages/ns-wasm-chicory/test-output/vitest/coverage/lcov.info - packages/ns-wasm-edge/test-output/vitest/coverage/lcov.info - packages/ns-endive/test-output/vitest/coverage/lcov.info - packages/ns-wry/test-output/vitest/coverage/lcov.info - packages/vitest-ns/test-output/vitest/coverage/lcov.info - packages/vitest-ns-ui/test-output/vitest/coverage/lcov.info - packages/ns-wasm-fixture/target/coverage/lcov.info - - # Rust is pre-installed on GitHub's ubuntu-latest runner. When debugging - # locally with `act` the slim image may not have it — install on the fly - # so the same workflow is self-contained. - - name: Install Rust (if missing) - run: | - if ! command -v cargo >/dev/null 2>&1; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal - echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - fi - - # The fixture crate: wasm exports plus the globals.wasm byte encoder. - - name: Rust unit tests - run: pnpm exec nx run ns-wasm-fixture:test.wasm - - # Clippy + rustfmt over the hand-written Rust in all four Rust projects - # (ns-wasm3, ns-wamr, ns-wry, ns-wasm-fixture). Generated bindings - # (bindgen output, UniFFI scaffolding) are excluded: bindgen output is - # `#![rustfmt::skip]` and `clippy::all` is allowed around the includes. - - name: Rust lint (Clippy) + format check - run: | - rustup component add clippy rustfmt - pnpm exec nx run-many -t lint.rust fmt.rust -p ns-wasm3 ns-wamr ns-wry ns-wasm-fixture - - # globals.wasm is committed but generated, and the generator is - # deterministic — so a stale copy is a hard error rather than a surprise - # on someone's device. (test_types_bg.wasm needs wasm-pack to rebuild and - # is not byte-reproducible, so it is not checked here.) - - name: Verify the committed globals.wasm matches its generator - run: | - cargo run --quiet \ - --manifest-path packages/ns-wasm-fixture/src/test-types/Cargo.toml \ - --bin gen_globals -- "$RUNNER_TEMP/globals" - cmp "$RUNNER_TEMP/globals/globals.wasm" \ - packages/ns-wasm-fixture/src/test-types/pkg/globals.wasm || { - echo "::error::globals.wasm is stale — run 'pnpm run build.wasm' in packages/ns-wasm-fixture and commit the result." - exit 1 - } - - # The ns-wasm3 native suites below need a macOS runner / an Android - # SDK, so they only run when the plugin or this workflow changed. Fails open: - # any detection problem runs them anyway. - changes: - runs-on: ubuntu-latest - outputs: - wasm3: ${{ steps.filter.outputs.wasm3 }} - wamr: ${{ steps.filter.outputs.wamr }} - app: ${{ steps.filter.outputs.app }} - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - id: filter - shell: bash - run: | - run_all() { - { - echo "wasm3=true" - echo "wamr=true" - echo "app=true" - } >> "$GITHUB_OUTPUT" - exit 0 - } - [ "${{ github.event_name }}" = "pull_request" ] || run_all - - base="refs/remotes/origin/${{ github.base_ref }}" - git fetch --no-tags origin \ - "+refs/heads/${{ github.base_ref }}:$base" || run_all - changed="$(git diff --name-only "$base...HEAD")" || run_all - - echo "$changed" - if grep -qE '^(packages/ns-wasm3/|packages/ns-wasm-core/|\.github/workflows/ci\.yml$)' <<<"$changed"; then - echo "wasm3=true" >> "$GITHUB_OUTPUT" - else - echo "wasm3=false" >> "$GITHUB_OUTPUT" - fi - - if grep -qE '^(packages/ns-wamr/|packages/ns-wasm-core/|\.github/workflows/ci\.yml$)' <<<"$changed"; then - echo "wamr=true" >> "$GITHUB_OUTPUT" - else - echo "wamr=false" >> "$GITHUB_OUTPUT" - fi - - # The app's suite runs the plugin end to end, so a plugin or fixture - # change is as relevant to it as a change to the app itself. - if grep -qE '^(apps/ns-wasm-test/|packages/ns-wasm3/|packages/ns-wamr/|packages/ns-wasm-kit-runtime/|packages/ns-endive/|packages/ns-wasm-chicory/|packages/ns-wasm-edge/|packages/ns-wasm-core/|packages/ns-wasm-fixture/|\.github/workflows/ci\.yml$)' <<<"$changed"; then - echo "app=true" >> "$GITHUB_OUTPUT" - else - echo "app=false" >> "$GITHUB_OUTPUT" - fi - - # iOS: compiles the vendored wasm3 C sources through SwiftPM and runs the - # XCTest suite, which exercises the interpreter natively on macOS. - wasm3-ios: - needs: changes - if: needs.changes.outputs.wasm3 == 'true' - runs-on: macos-latest - steps: - - uses: actions/checkout@v5 - - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v5 - with: - node-version: 24 - package-manager-cache: false - - - name: Verify the synced Swift package copy is current - working-directory: packages/ns-wasm3 - run: | - node tools/sync-wasm3.mjs - git diff --exit-code -- . || { - echo "::error::platforms/ios/NSCWasm3/Sources/CWasm3 is stale — run 'pnpm run sync.vendors' and commit the result." - exit 1 - } - - - name: Swift tests - working-directory: packages/ns-wasm3/platforms/ios/NSCWasm3 - run: swift test --disable-sandbox - - - name: Install SwiftLint and Periphery - run: | - brew install swiftlint - brew install peripheryapp/periphery/periphery - - - name: SwiftLint - working-directory: packages/ns-wasm3/platforms/ios/NSCWasm3 - run: swiftlint lint --config ../../../../../.swiftlint.yml Sources Tests - - - name: Periphery (unused code) - working-directory: packages/ns-wasm3/platforms/ios/NSCWasm3 - run: periphery scan --config ../../../../../.periphery.yml --disable-update-check - - - name: Build for iOS device - working-directory: packages/ns-wasm3/platforms/ios/NSCWasm3 - run: | - xcodebuild build \ - -scheme NSCWasm3 \ - -destination 'generic/platform=iOS' - - # Android: builds the wasm3-jni Rust crate via cargo and runs the Kotlin - # wrapper's JUnit hosttest suite — no emulator needed. - wasm3-android: - needs: changes - if: needs.changes.outputs.wasm3 == 'true' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - # Gradle shells out to build-native.mjs (zx) to generate the bindings and - # compile wasm3, so the native build needs Node and the root node_modules. - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v5 - with: - node-version: 24 - cache: 'pnpm' - - - run: pnpm install --frozen-lockfile - - - uses: actions/setup-java@v4.9.0 - with: - distribution: temurin - java-version: '21' - - - uses: gradle/actions/setup-gradle@v4.4.4 - with: - validate-wrappers: false - - # Rust is pre-installed on ubuntu-latest; install if missing (e.g. act). - - name: Install Rust (if missing) - run: | - if ! command -v cargo >/dev/null 2>&1; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal - echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - fi - - - name: JVM host tests (cargo build + Kotlin wrapper) - working-directory: packages/ns-wasm3/platforms/android/wasm3-android - run: ./gradlew :hosttest:test - - - name: Kotlin lint (Detekt + Ktlint) - working-directory: packages/ns-wasm3/platforms/android/wasm3-android - run: ./gradlew detekt ktlintCheck - - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: wasm3-android-test-report - path: packages/ns-wasm3/platforms/android/wasm3-android/hosttest/build/reports/tests/test - - # The test app's Vitest suite, on a simulator and an emulator. This is the only - # place the plugin's TypeScript adapters run against the real native layer — - # the NSData/NSArray marshalling on iOS, the signed byte[] handling on Android - # — so it covers what neither the Swift/Kotlin suites nor a Node runner can. - # iOS: compiles the vendored WAMR C sources through SwiftPM and runs the - # XCTest suite, which exercises the runtime natively on macOS. - wamr-ios: - needs: changes - if: needs.changes.outputs.wamr == 'true' - runs-on: macos-latest - steps: - - uses: actions/checkout@v5 - - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v5 - with: - node-version: 24 - package-manager-cache: false - - - name: Check for WAMR C sources - id: sources - run: | - # -print -quit: stop after the first match so find exits cleanly — - # under pipefail, grep -q exiting early would SIGPIPE find and flip - # the result to "no sources", silently skipping the job. - if find packages/ns-wamr/src/vendors/wamr \ - \( -name '*.c' -o -name '*.h' \) -print -quit | grep -q .; then - echo "present=true" >> "$GITHUB_OUTPUT" - else - echo "present=false" >> "$GITHUB_OUTPUT" - echo "::warning::WAMR C sources not found — Swift steps will be skipped." - fi - - - name: Verify the synced Swift package copy is current - if: steps.sources.outputs.present == 'true' - working-directory: packages/ns-wamr - run: | - node tools/sync-wamr.mjs - git diff --exit-code -- . || { - echo "::error::platforms/ios/NSCWamr/Sources/CWamr is stale — run 'pnpm run sync.vendors' and commit the result." - exit 1 - } - - - name: Swift tests - if: steps.sources.outputs.present == 'true' - working-directory: packages/ns-wamr/platforms/ios/NSCWamr - run: swift test --disable-sandbox - - - name: Install SwiftLint and Periphery - if: steps.sources.outputs.present == 'true' - run: | - brew install swiftlint - brew install peripheryapp/periphery/periphery - - - name: SwiftLint - if: steps.sources.outputs.present == 'true' - working-directory: packages/ns-wamr/platforms/ios/NSCWamr - run: swiftlint lint --config ../../../../../.swiftlint.yml Sources Tests - - - name: Periphery (unused code) - if: steps.sources.outputs.present == 'true' - working-directory: packages/ns-wamr/platforms/ios/NSCWamr - run: periphery scan --config ../../../../../.periphery.yml --disable-update-check - - - name: Build for iOS device - if: steps.sources.outputs.present == 'true' - working-directory: packages/ns-wamr/platforms/ios/NSCWamr - run: | - xcodebuild build \ - -scheme NSCWamr \ - -destination 'generic/platform=iOS' - - # Android: builds the wamr-jni Rust crate via cargo and runs the Kotlin - # wrapper's JUnit hosttest suite — no emulator. - wamr-android: - needs: changes - if: needs.changes.outputs.wamr == 'true' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v5 - with: - node-version: 24 - cache: 'pnpm' - - - run: pnpm install --frozen-lockfile - - - name: Check for WAMR C sources - id: sources - run: | - # -print -quit: stop after the first match so find exits cleanly — - # under pipefail, grep -q exiting early would SIGPIPE find and flip - # the result to "no sources", silently skipping the job. - if find packages/ns-wamr/src/vendors/wamr \ - \( -name '*.c' -o -name '*.h' \) -print -quit | grep -q .; then - echo "present=true" >> "$GITHUB_OUTPUT" - else - echo "present=false" >> "$GITHUB_OUTPUT" - echo "::warning::WAMR C sources not found — Gradle steps will be skipped." - fi - - - uses: actions/setup-java@v4.9.0 - if: steps.sources.outputs.present == 'true' - with: - distribution: temurin - java-version: '21' - - - uses: gradle/actions/setup-gradle@v4.4.4 - if: steps.sources.outputs.present == 'true' - with: - validate-wrappers: false - - # Rust is pre-installed on ubuntu-latest; install if missing (e.g. act). - - name: Install Rust (if missing) - if: steps.sources.outputs.present == 'true' - run: | - if ! command -v cargo >/dev/null 2>&1; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal - echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - fi - - - name: JVM host tests (cargo build + Kotlin wrapper) - if: steps.sources.outputs.present == 'true' - working-directory: packages/ns-wamr/platforms/android/wamr-android - run: ./gradlew :hosttest:test - - - name: Kotlin lint (Detekt + Ktlint) - if: steps.sources.outputs.present == 'true' - working-directory: packages/ns-wamr/platforms/android/wamr-android - run: ./gradlew detekt ktlintCheck - - - uses: actions/upload-artifact@v4 - if: failure() && steps.sources.outputs.present == 'true' - with: - name: wamr-android-test-report - path: packages/ns-wamr/platforms/android/wamr-android/hosttest/build/reports/tests/test - - # The test app's Vitest suite, on a simulator and an emulator. This is the only - # place the plugin's TypeScript adapters run against the real native layer — - # the NSData/NSArray marshalling on iOS, the signed byte[] handling on Android - # — so it covers what neither the Swift/Kotlin suites nor a Node runner can. - wasm-test-ios: - needs: changes - if: needs.changes.outputs.app == 'true' - runs-on: macos-latest - steps: - - uses: actions/checkout@v5 - - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v5 - with: - node-version: 24 - cache: 'pnpm' - cache-dependency-path: | - pnpm-lock.yaml - apps/ns-wasm-test/pnpm-lock.yaml - - - run: pnpm install --frozen-lockfile - - # The app snapshots local file: dependencies when pnpm installs them, so - # every package whose entry point lives in dist/ must be built first. - - name: Build the app's local packages - run: pnpm exec nx run-many -t build -p ns-wasm-core ns-wasm3 ns-wamr ns-wasm-kit-runtime ns-endive ns-wasm-chicory ns-wasm-edge vitest-ns vitest-ns-ui - - - name: Install the test app's dependencies - working-directory: apps/ns-wasm-test - run: pnpm install --frozen-lockfile - - # `ns doctor` shells out to `pod --version`, which prints a locale warning - # the CLI treats as a failed CocoaPods check unless LANG is a UTF-8 one. - # The plugin itself needs no pods — it ships a Swift package. - - name: Vitest specs on the iOS Simulator - working-directory: . - env: - LANG: en_US.UTF-8 - run: pnpm exec nx run ns-wasm-test:test.ios - - wasm-test-android: - needs: changes - if: needs.changes.outputs.app == 'true' - continue-on-error: true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v5 - with: - node-version: 24 - cache: 'pnpm' - cache-dependency-path: | - pnpm-lock.yaml - apps/ns-wasm-test/pnpm-lock.yaml - - - run: pnpm install --frozen-lockfile - - # Keep this before the app install: pnpm snapshots local file: packages, - # including their generated dist/ entry points, into app node_modules. - - name: Build the app's local packages - run: pnpm exec nx run-many -t build -p ns-wasm-core ns-wasm3 ns-wamr ns-wasm-kit-runtime ns-endive ns-wasm-chicory ns-wasm-edge vitest-ns vitest-ns-ui - - - name: Install the test app's dependencies - working-directory: apps/ns-wasm-test - run: pnpm install --frozen-lockfile - - - uses: actions/setup-java@v4.9.0 - with: - distribution: temurin - java-version: '21' - - # Lets the emulator use hardware acceleration on the GitHub runner. - - name: Enable KVM - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \ - | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - # Both plugins ship prebuilt .aar files with their .so files. - - name: Vitest specs on the Android emulator - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: 34 - arch: x86_64 - working-directory: . - script: pnpm exec nx run ns-wasm-test:test.android +name: CI + +on: + push: + branches: + - main + pull_request: + +permissions: + actions: read + contents: read + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + filter: tree:0 + fetch-depth: 0 + + # pnpm is the default package manager (packageManager in package.json); + # pnpm/action-setup installs the pinned version from there. + - uses: pnpm/action-setup@v4 + + # Cache node_modules + - uses: actions/setup-node@v5 + with: + node-version: 24 + cache: 'pnpm' + + - run: pnpm install --frozen-lockfile + + # This enables task distribution via Nx Cloud. + # Learn more at https://nx.dev/docs/reference/nx-cloud-cli#npx-nxcloud-startcirun + - run: pnpm exec nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e" + + # Prepend any command with "nx record --" to record its logs to Nx Cloud + # - run: pnpm exec nx record -- pnpm exec nx format:check --base="remotes/origin/main" + # - run: pnpm exec nx run-many -t lint test build typecheck e2e + # Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/docs/features/ci-features/self-healing-ci + # - run: pnpm exec nx fix-ci + # if: always() + # - run: pnpm exec nx format:check --base="remotes/origin/main" + + # Vitest, TypeScript and the Rust fixture crate. Everything here runs on a + # plain Linux runner: the .wasm fixtures are committed build outputs, so no + # wasm-pack, Android SDK or Xcode is needed. Rust comes preinstalled on the + # GitHub-hosted ubuntu image. + # + # The test app's own suite is not here — it runs on a simulator/emulator, in + # the wasm-test-ios and wasm-test-android jobs below. + unit-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v5 + with: + node-version: 24 + cache: 'pnpm' + cache-dependency-path: | + pnpm-lock.yaml + apps/ns-wasm-test/pnpm-lock.yaml + apps/ns-wry-app/pnpm-lock.yaml + + - run: pnpm install --frozen-lockfile + + # Both apps resolve the plugins through file: dependencies and import + # their built dist/. pnpm snapshots file: deps into the app's + # node_modules at install time, so dist must already exist before the + # apps are installed — build it first, mirroring the device jobs below. + - name: Build the plugins + run: pnpm exec nx run-many -t build + + # The NativeScript app is not a pnpm workspace member (it has its own + # pnpm-workspace.yaml) — the CLI needs its own node_modules — and its + # typecheck resolves @nativescript/types, Vitest and TypeScript + # from there. + - name: Install the test app's dependencies + working-directory: apps/ns-wasm-test + run: pnpm install --frozen-lockfile + + # The wry demo app is not a workspace member either; its typecheck + # resolves @nativescript/core and @cross-code/ns-wry from its own + # node_modules, which is never installed otherwise. + - name: Install the wry demo app's dependencies + working-directory: apps/ns-wry-app + run: pnpm install --frozen-lockfile + + # Vitest specs plus the typecheck of all projects — including the test + # app's NativeScript specs, which are type-checked + # here even though they can only run on a device. + - name: Vitest + typecheck + run: pnpm exec nx run-many -t test typecheck + + # Code coverage per project: vitest (v8) for the TS packages, llvm-cov + # for the Rust fixture. Reports land in /test-output/vitest/coverage + # and /target/coverage (both gitignored). Native (Swift/Kotlin) + # coverage runs via `nx run-many -t coverage.ios coverage.android` on a + # machine with Xcode/JDK — not in this job. + - name: Coverage + run: | + rustup component add llvm-tools-preview + pnpm exec nx run-many -t coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: | + packages/ns-wasm-core/test-output/vitest/coverage/lcov.info + packages/ns-wasm3/test-output/vitest/coverage/lcov.info + packages/ns-wamr/test-output/vitest/coverage/lcov.info + packages/ns-wasm-kit-runtime/test-output/vitest/coverage/lcov.info + packages/ns-wasm-chicory/test-output/vitest/coverage/lcov.info + packages/ns-wasm-edge/test-output/vitest/coverage/lcov.info + packages/ns-endive/test-output/vitest/coverage/lcov.info + packages/ns-wry/test-output/vitest/coverage/lcov.info + packages/ns-rstest/test-output/vitest/coverage/lcov.info + packages/ns-wasm-fixture/target/coverage/lcov.info + + # Rust is pre-installed on GitHub's ubuntu-latest runner. When debugging + # locally with `act` the slim image may not have it — install on the fly + # so the same workflow is self-contained. + - name: Install Rust (if missing) + run: | + if ! command -v cargo >/dev/null 2>&1; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + fi + + # The fixture crate: wasm exports plus the globals.wasm byte encoder. + - name: Rust unit tests + run: pnpm exec nx run ns-wasm-fixture:test.wasm + + # Clippy + rustfmt over the hand-written Rust in all four Rust projects + # (ns-wasm3, ns-wamr, ns-wry, ns-wasm-fixture). Generated bindings + # (bindgen output, UniFFI scaffolding) are excluded: bindgen output is + # `#![rustfmt::skip]` and `clippy::all` is allowed around the includes. + - name: Rust lint (Clippy) + format check + run: | + rustup component add clippy rustfmt + pnpm exec nx run-many -t lint.rust fmt.rust -p ns-wasm3 ns-wamr ns-wry ns-wasm-fixture + + # globals.wasm is committed but generated, and the generator is + # deterministic — so a stale copy is a hard error rather than a surprise + # on someone's device. (test_types_bg.wasm needs wasm-pack to rebuild and + # is not byte-reproducible, so it is not checked here.) + - name: Verify the committed globals.wasm matches its generator + run: | + cargo run --quiet \ + --manifest-path packages/ns-wasm-fixture/src/test-types/Cargo.toml \ + --bin gen_globals -- "$RUNNER_TEMP/globals" + cmp "$RUNNER_TEMP/globals/globals.wasm" \ + packages/ns-wasm-fixture/src/test-types/pkg/globals.wasm || { + echo "::error::globals.wasm is stale — run 'pnpm run build.wasm' in packages/ns-wasm-fixture and commit the result." + exit 1 + } + + # The ns-wasm3 native suites below need a macOS runner / an Android + # SDK, so they only run when the plugin or this workflow changed. Fails open: + # any detection problem runs them anyway. + changes: + runs-on: ubuntu-latest + outputs: + wasm3: ${{ steps.filter.outputs.wasm3 }} + wamr: ${{ steps.filter.outputs.wamr }} + app: ${{ steps.filter.outputs.app }} + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - id: filter + shell: bash + run: | + run_all() { + { + echo "wasm3=true" + echo "wamr=true" + echo "app=true" + } >> "$GITHUB_OUTPUT" + exit 0 + } + [ "${{ github.event_name }}" = "pull_request" ] || run_all + + base="refs/remotes/origin/${{ github.base_ref }}" + git fetch --no-tags origin \ + "+refs/heads/${{ github.base_ref }}:$base" || run_all + changed="$(git diff --name-only "$base...HEAD")" || run_all + + echo "$changed" + if grep -qE '^(packages/ns-wasm3/|packages/ns-wasm-core/|\.github/workflows/ci\.yml$)' <<<"$changed"; then + echo "wasm3=true" >> "$GITHUB_OUTPUT" + else + echo "wasm3=false" >> "$GITHUB_OUTPUT" + fi + + if grep -qE '^(packages/ns-wamr/|packages/ns-wasm-core/|\.github/workflows/ci\.yml$)' <<<"$changed"; then + echo "wamr=true" >> "$GITHUB_OUTPUT" + else + echo "wamr=false" >> "$GITHUB_OUTPUT" + fi + + # The app's suite runs the plugin end to end, so a plugin or fixture + # change is as relevant to it as a change to the app itself. + if grep -qE '^(apps/ns-wasm-test/|packages/ns-wasm3/|packages/ns-wamr/|packages/ns-wasm-kit-runtime/|packages/ns-endive/|packages/ns-wasm-chicory/|packages/ns-wasm-edge/|packages/ns-wasm-core/|packages/ns-wasm-fixture/|packages/ns-rspack/|\.github/workflows/ci\.yml$)' <<<"$changed"; then + echo "app=true" >> "$GITHUB_OUTPUT" + else + echo "app=false" >> "$GITHUB_OUTPUT" + fi + + # iOS: compiles the vendored wasm3 C sources through SwiftPM and runs the + # XCTest suite, which exercises the interpreter natively on macOS. + wasm3-ios: + needs: changes + if: needs.changes.outputs.wasm3 == 'true' + runs-on: macos-latest + steps: + - uses: actions/checkout@v5 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v5 + with: + node-version: 24 + package-manager-cache: false + + - name: Verify the synced Swift package copy is current + working-directory: packages/ns-wasm3 + run: | + node tools/sync-wasm3.mjs + git diff --exit-code -- . || { + echo "::error::platforms/ios/NSCWasm3/Sources/CWasm3 is stale — run 'pnpm run sync.vendors' and commit the result." + exit 1 + } + + - name: Swift tests + working-directory: packages/ns-wasm3/platforms/ios/NSCWasm3 + run: swift test --disable-sandbox + + - name: Install SwiftLint and Periphery + run: | + brew install swiftlint + brew install peripheryapp/periphery/periphery + + - name: SwiftLint + working-directory: packages/ns-wasm3/platforms/ios/NSCWasm3 + run: swiftlint lint --config ../../../../../.swiftlint.yml Sources Tests + + - name: Periphery (unused code) + working-directory: packages/ns-wasm3/platforms/ios/NSCWasm3 + run: periphery scan --config ../../../../../.periphery.yml --disable-update-check + + - name: Build for iOS device + working-directory: packages/ns-wasm3/platforms/ios/NSCWasm3 + run: | + xcodebuild build \ + -scheme NSCWasm3 \ + -destination 'generic/platform=iOS' + + # Android: builds the wasm3-jni Rust crate via cargo and runs the Kotlin + # wrapper's JUnit hosttest suite — no emulator needed. + wasm3-android: + needs: changes + if: needs.changes.outputs.wasm3 == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + # Gradle shells out to build-native.mjs (zx) to generate the bindings and + # compile wasm3, so the native build needs Node and the root node_modules. + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v5 + with: + node-version: 24 + cache: 'pnpm' + + - run: pnpm install --frozen-lockfile + + - uses: actions/setup-java@v4.9.0 + with: + distribution: temurin + java-version: '21' + + - uses: gradle/actions/setup-gradle@v4.4.4 + with: + validate-wrappers: false + + # Rust is pre-installed on ubuntu-latest; install if missing (e.g. act). + - name: Install Rust (if missing) + run: | + if ! command -v cargo >/dev/null 2>&1; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + fi + + - name: JVM host tests (cargo build + Kotlin wrapper) + working-directory: packages/ns-wasm3/platforms/android/wasm3-android + run: ./gradlew :hosttest:test + + - name: Kotlin lint (Detekt + Ktlint) + working-directory: packages/ns-wasm3/platforms/android/wasm3-android + run: ./gradlew detekt ktlintCheck + + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: wasm3-android-test-report + path: packages/ns-wasm3/platforms/android/wasm3-android/hosttest/build/reports/tests/test + + # The test app's Vitest suite, on a simulator and an emulator. This is the only + # place the plugin's TypeScript adapters run against the real native layer — + # the NSData/NSArray marshalling on iOS, the signed byte[] handling on Android + # — so it covers what neither the Swift/Kotlin suites nor a Node runner can. + # iOS: compiles the vendored WAMR C sources through SwiftPM and runs the + # XCTest suite, which exercises the runtime natively on macOS. + wamr-ios: + needs: changes + if: needs.changes.outputs.wamr == 'true' + runs-on: macos-latest + steps: + - uses: actions/checkout@v5 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v5 + with: + node-version: 24 + package-manager-cache: false + + - name: Check for WAMR C sources + id: sources + run: | + # -print -quit: stop after the first match so find exits cleanly — + # under pipefail, grep -q exiting early would SIGPIPE find and flip + # the result to "no sources", silently skipping the job. + if find packages/ns-wamr/src/vendors/wamr \ + \( -name '*.c' -o -name '*.h' \) -print -quit | grep -q .; then + echo "present=true" >> "$GITHUB_OUTPUT" + else + echo "present=false" >> "$GITHUB_OUTPUT" + echo "::warning::WAMR C sources not found — Swift steps will be skipped." + fi + + - name: Verify the synced Swift package copy is current + if: steps.sources.outputs.present == 'true' + working-directory: packages/ns-wamr + run: | + node tools/sync-wamr.mjs + git diff --exit-code -- . || { + echo "::error::platforms/ios/NSCWamr/Sources/CWamr is stale — run 'pnpm run sync.vendors' and commit the result." + exit 1 + } + + - name: Swift tests + if: steps.sources.outputs.present == 'true' + working-directory: packages/ns-wamr/platforms/ios/NSCWamr + run: swift test --disable-sandbox + + - name: Install SwiftLint and Periphery + if: steps.sources.outputs.present == 'true' + run: | + brew install swiftlint + brew install peripheryapp/periphery/periphery + + - name: SwiftLint + if: steps.sources.outputs.present == 'true' + working-directory: packages/ns-wamr/platforms/ios/NSCWamr + run: swiftlint lint --config ../../../../../.swiftlint.yml Sources Tests + + - name: Periphery (unused code) + if: steps.sources.outputs.present == 'true' + working-directory: packages/ns-wamr/platforms/ios/NSCWamr + run: periphery scan --config ../../../../../.periphery.yml --disable-update-check + + - name: Build for iOS device + if: steps.sources.outputs.present == 'true' + working-directory: packages/ns-wamr/platforms/ios/NSCWamr + run: | + xcodebuild build \ + -scheme NSCWamr \ + -destination 'generic/platform=iOS' + + # Android: builds the wamr-jni Rust crate via cargo and runs the Kotlin + # wrapper's JUnit hosttest suite — no emulator. + wamr-android: + needs: changes + if: needs.changes.outputs.wamr == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v5 + with: + node-version: 24 + cache: 'pnpm' + + - run: pnpm install --frozen-lockfile + + - name: Check for WAMR C sources + id: sources + run: | + # -print -quit: stop after the first match so find exits cleanly — + # under pipefail, grep -q exiting early would SIGPIPE find and flip + # the result to "no sources", silently skipping the job. + if find packages/ns-wamr/src/vendors/wamr \ + \( -name '*.c' -o -name '*.h' \) -print -quit | grep -q .; then + echo "present=true" >> "$GITHUB_OUTPUT" + else + echo "present=false" >> "$GITHUB_OUTPUT" + echo "::warning::WAMR C sources not found — Gradle steps will be skipped." + fi + + - uses: actions/setup-java@v4.9.0 + if: steps.sources.outputs.present == 'true' + with: + distribution: temurin + java-version: '21' + + - uses: gradle/actions/setup-gradle@v4.4.4 + if: steps.sources.outputs.present == 'true' + with: + validate-wrappers: false + + # Rust is pre-installed on ubuntu-latest; install if missing (e.g. act). + - name: Install Rust (if missing) + if: steps.sources.outputs.present == 'true' + run: | + if ! command -v cargo >/dev/null 2>&1; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + fi + + - name: JVM host tests (cargo build + Kotlin wrapper) + if: steps.sources.outputs.present == 'true' + working-directory: packages/ns-wamr/platforms/android/wamr-android + run: ./gradlew :hosttest:test + + - name: Kotlin lint (Detekt + Ktlint) + if: steps.sources.outputs.present == 'true' + working-directory: packages/ns-wamr/platforms/android/wamr-android + run: ./gradlew detekt ktlintCheck + + - uses: actions/upload-artifact@v4 + if: failure() && steps.sources.outputs.present == 'true' + with: + name: wamr-android-test-report + path: packages/ns-wamr/platforms/android/wamr-android/hosttest/build/reports/tests/test + + # The test app's Vitest suite, on a simulator and an emulator. This is the only + # place the plugin's TypeScript adapters run against the real native layer — + # the NSData/NSArray marshalling on iOS, the signed byte[] handling on Android + # — so it covers what neither the Swift/Kotlin suites nor a Node runner can. + wasm-test-ios: + needs: changes + if: needs.changes.outputs.app == 'true' + runs-on: macos-latest + steps: + - uses: actions/checkout@v5 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v5 + with: + node-version: 24 + cache: 'pnpm' + cache-dependency-path: | + pnpm-lock.yaml + apps/ns-wasm-test/pnpm-lock.yaml + + - run: pnpm install --frozen-lockfile + + # The app consumes local packages through `workspace:` links, so the + # linked dist/ entry points must exist before the app is installed or + # built — build every local package first. + - name: Build the app's local packages + run: pnpm exec nx run-many -t build -p ns-wasm-core ns-wasm3 ns-wamr ns-wasm-kit-runtime ns-endive ns-wasm-chicory ns-wasm-edge ns-rspack ns-rstest + + - name: Install the test app's dependencies + working-directory: apps/ns-wasm-test + run: pnpm install --frozen-lockfile + + # `ns doctor` shells out to `pod --version`, which prints a locale warning + # the CLI treats as a failed CocoaPods check unless LANG is a UTF-8 one. + # The plugin itself needs no pods — it ships a Swift package. + - name: Vitest specs on the iOS Simulator + working-directory: . + env: + LANG: en_US.UTF-8 + run: pnpm exec nx run ns-wasm-test:test.ios + + wasm-test-android: + needs: changes + if: needs.changes.outputs.app == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v5 + with: + node-version: 24 + cache: 'pnpm' + cache-dependency-path: | + pnpm-lock.yaml + apps/ns-wasm-test/pnpm-lock.yaml + + - run: pnpm install --frozen-lockfile + + # Keep this before the app install: the app consumes local packages + # through `workspace:` links, so their dist/ entry points must exist + # before the app is installed or built. + - name: Build the app's local packages + run: pnpm exec nx run-many -t build -p ns-wasm-core ns-wasm3 ns-wamr ns-wasm-kit-runtime ns-endive ns-wasm-chicory ns-wasm-edge ns-rspack ns-rstest + + - name: Install the test app's dependencies + working-directory: apps/ns-wasm-test + run: pnpm install --frozen-lockfile + + - uses: actions/setup-java@v4.9.0 + with: + distribution: temurin + java-version: '21' + + # Lets the emulator use hardware acceleration on the GitHub runner. + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \ + | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + # Both plugins ship prebuilt .aar files with their .so files. + - name: Vitest specs on the Android emulator + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 34 + arch: x86_64 + working-directory: . + script: pnpm exec nx run ns-wasm-test:test.android diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 2dd0755..50fd352 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -1,64 +1,64 @@ -name: DeepSeek CR - -# AI code review on pull requests via hustcer/deepseek-review. -# -# Setup: add a repository secret named CHAT_TOKEN with your DeepSeek API key -# (Settings → Secrets and variables → Actions). Optionally override the model -# or base-url with the `with:` inputs below (e.g. a SiliconFlow / GitHub Models -# endpoint — see https://github.com/hustcer/deepseek-review for options). -# -# Skip a review by adding "skip cr" / "skip review" to the PR title or body, -# or lock the PR conversation. - -on: - # Disabled — change to workflow_dispatch to run manually. - # Previously: pull_request_target + issue_comment triggers. - workflow_dispatch: - # pull_request_target: - # types: - # - opened # Triggers when a PR is opened - # - reopened # Triggers when a PR is reopened - # - synchronize # Triggers when a commit is pushed to the PR - # issue_comment: - # types: - # - created # Triggers when a comment is created on a PR (watch-mention) - -permissions: - pull-requests: write - -jobs: - setup-deepseek-review: - timeout-minutes: 30 - runs-on: ubuntu-latest - name: DeepSeek Code Review - steps: - - name: DeepSeek Code Review - uses: hustcer/deepseek-review@v1 - with: - chat-token: ${{ secrets.CHAT_TOKEN }} - # A prompt tuned to this monorepo: NativeScript plugin (TypeScript + - # Kotlin/Swift), a Rust wasm fixture, and an Nx workspace. - sys-prompt: | - You are a senior code reviewer for a NativeScript monorepo built - with Nx. The codebase spans: a TypeScript NativeScript plugin - (packages/ns-wasm3) that bridges WebAssembly (wasm3) to - iOS (Swift) and Android (Kotlin + Rust JNI); a Rust wasm-pack - fixture crate (packages/ns-wasm-fixture); and a - NativeScript test app (apps/ns-wasm-test) running Vitest - through vitest-ns on a device/emulator. - - Review the diff for: correctness across the JS↔native wire - protocol (i64 must stay lossless as decimal strings, signed Java - byte[] handling, NSArray/NSData marshalling), memory safety in - wasm3 C interop, resource leaks (native runtimes must be - disposed/closed), TypeScript strictness, Rust unsafe usage, CI - workflow correctness, and test coverage. Flag security issues - (injection, secrets, unsafe FFI) first. Be concise; list concrete - problems with file:line references and actionable fixes. - # DeepSeek's own API is the default; uncomment to switch provider: - # model: deepseek-v4-flash - # base-url: https://api.deepseek.com - # exclude-patterns: pnpm-lock.yaml,package-lock.json,*.lock - # Trigger a review by commenting "@github-actions" on the PR - # (requires the issue_comment event above): - # watch-mention: "@github-actions" +name: DeepSeek CR + +# AI code review on pull requests via hustcer/deepseek-review. +# +# Setup: add a repository secret named CHAT_TOKEN with your DeepSeek API key +# (Settings → Secrets and variables → Actions). Optionally override the model +# or base-url with the `with:` inputs below (e.g. a SiliconFlow / GitHub Models +# endpoint — see https://github.com/hustcer/deepseek-review for options). +# +# Skip a review by adding "skip cr" / "skip review" to the PR title or body, +# or lock the PR conversation. + +on: + # Disabled — change to workflow_dispatch to run manually. + # Previously: pull_request_target + issue_comment triggers. + workflow_dispatch: + # pull_request_target: + # types: + # - opened # Triggers when a PR is opened + # - reopened # Triggers when a PR is reopened + # - synchronize # Triggers when a commit is pushed to the PR + # issue_comment: + # types: + # - created # Triggers when a comment is created on a PR (watch-mention) + +permissions: + pull-requests: write + +jobs: + setup-deepseek-review: + timeout-minutes: 30 + runs-on: ubuntu-latest + name: DeepSeek Code Review + steps: + - name: DeepSeek Code Review + uses: hustcer/deepseek-review@v1 + with: + chat-token: ${{ secrets.CHAT_TOKEN }} + # A prompt tuned to this monorepo: NativeScript plugin (TypeScript + + # Kotlin/Swift), a Rust wasm fixture, and an Nx workspace. + sys-prompt: | + You are a senior code reviewer for a NativeScript monorepo built + with Nx. The codebase spans: a TypeScript NativeScript plugin + (packages/ns-wasm3) that bridges WebAssembly (wasm3) to + iOS (Swift) and Android (Kotlin + Rust JNI); a Rust wasm-pack + fixture crate (packages/ns-wasm-fixture); and a + NativeScript test app (apps/ns-wasm-test) running Rstest + through ns-rstest on a device/emulator. + + Review the diff for: correctness across the JS↔native wire + protocol (i64 must stay lossless as decimal strings, signed Java + byte[] handling, NSArray/NSData marshalling), memory safety in + wasm3 C interop, resource leaks (native runtimes must be + disposed/closed), TypeScript strictness, Rust unsafe usage, CI + workflow correctness, and test coverage. Flag security issues + (injection, secrets, unsafe FFI) first. Be concise; list concrete + problems with file:line references and actionable fixes. + # DeepSeek's own API is the default; uncomment to switch provider: + # model: deepseek-v4-flash + # base-url: https://api.deepseek.com + # exclude-patterns: pnpm-lock.yaml,package-lock.json,*.lock + # Trigger a review by commenting "@github-actions" on the PR + # (requires the issue_comment event above): + # watch-mention: "@github-actions" diff --git a/.gitignore b/.gitignore index c0702b5..7547aa9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,80 +1,85 @@ -# See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files. - -# compiled output -dist -tmp -out-tsc - -# dependencies -node_modules - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# misc -/.sass-cache -/connect.lock -/coverage -/apps/ns-wasm-test/test-output/ -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# System Files -.DS_Store -Thumbs.db - -.nx/cache -.nx/workspace-data -.cursor/rules/nx-rules.mdc -.github/instructions/nx.instructions.md - -.claude/worktrees -.claude/settings.local.json -.nx/polygraph -.nx/self-healing -.nx/migrate-runs -vitest.config.*.timestamp* -# Added by code-review-graph -.code-review-graph/ - -# Kotlin -**/.kotlin/errors/*.log - -# Reasonix -.reasonix/desktop-topic-auto-title-meta.json -.reasonix/desktop-topic-created-at.json -.reasonix/desktop-topic-title-sources.json -.reasonix/desktop-topic-titles.json -.reasonix/tasks/ - -# DeepSeek CR local config (contains API token) -.deepseek-cr.config.json - -reasonix.toml - -/packages/ns-wasm3/src/vendors/wasm3-rust/target/ - -# pnpm local package store (created during resolution) -.pnpm-store +# See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files. + +# compiled output +dist +tmp +out-tsc + +# dependencies +node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/apps/ns-wasm-test/test-output/ +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings + +# System Files +.DS_Store +Thumbs.db + +.nx/cache +.nx/workspace-data +.cursor/rules/nx-rules.mdc +.github/instructions/nx.instructions.md + +.claude/worktrees +.claude/settings.local.json +.nx/polygraph +.nx/self-healing +.nx/migrate-runs +vitest.config.*.timestamp* +# Added by code-review-graph +.code-review-graph/ + +# CodeGraph index +.codegraph/ + +# Kotlin +**/.kotlin/errors/*.log + +# Reasonix +.reasonix/desktop-topic-auto-title-meta.json +.reasonix/desktop-topic-created-at.json +.reasonix/desktop-topic-title-sources.json +.reasonix/desktop-topic-titles.json +.reasonix/tasks/ + +# DeepSeek CR local config (contains API token) +.deepseek-cr.config.json + +reasonix.toml + +/packages/ns-wasm3/src/vendors/wasm3-rust/target/ + +# pnpm local package store (created during resolution) +.pnpm-store .buck-out/ /buck-out .buck-out/ # VS Code multi-root workspace *.code-workspace + +vite.config.*.timestamp* \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index 4603b36..29c28c2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -42,9 +42,10 @@ TypeScript API (wire protocol, error mapping, and `WasmRuntime` / `WasmModule` / `WasmFunction` class shapes). The Rust cargo workspace and UniFFI (uniffi-rs) Kotlin/Swift bindings — together with the mirror-image native architecture described in [Shared plugin architecture](#shared-plugin-architecture) — apply -to **ns-wasm3 and ns-wamr**. The newer runtimes (`ns-wasm-kit-runtime`, the -Swift-native WasmKit interpreter; `ns-endive`, the Java-native Endive -interpreter) share the same TypeScript adapter pattern, wire protocol, and +to **ns-wasm3, ns-wamr and ns-wasm-edge**. The newer runtimes +(`ns-wasm-kit-runtime`, the Swift-native WasmKit interpreter; `ns-wasm-chicory` +and `ns-endive`, the Java-native Chicory and Endive interpreters) share the +same TypeScript adapter pattern, wire protocol, and `@cross-code/ns-wasm-core` foundation, but have their own per-engine native layers. Only engine-specific detail lives in each package's AGENTS.md. @@ -68,23 +69,41 @@ layers. Only engine-specific detail lives in each package's AGENTS.md. iOS-only at this time (WasmKit is Swift-native and served through SwiftPM); Android throws a clear unsupported error. Follows the same TypeScript adapter pattern as the other two plugins. +- **`ns-wasm-edge`** (`@cross-code/ns-wasm-edge`) — plugin binding the + [WasmEdge](https://github.com/WasmEdge/WasmEdge) runtime (Swift Package on + iOS, Kotlin + Rust JNI (cargo-ndk) on Android). Follows the Rust/UniFFI + architecture of ns-wasm3/ns-wamr. +- **`ns-wasm-chicory`** (`@cross-code/ns-wasm-chicory`) — plugin binding the + [Chicory](https://github.com/dylibso/chicory) interpreter, a pure-Java + runtime (no NDK/Rust needed) — Android-only. +- **`ns-endive`** (`@cross-code/ns-endive`) — plugin binding the + [Endive](https://github.com/bytecodealliance/endive) interpreter — Java/JNI + on Android with a TypeScript adapter. Android-only. +- **`ns-rspack`** (`@cross-code/ns-rspack`) — **not a WASM plugin**: an + [rspack](https://rspack.rs) bundler for NativeScript apps that reuses + `@nativescript/webpack`'s configuration and swaps the webpack-only pieces for + rspack equivalents. Installed under the alias the {N} CLI resolves the + bundler by (`@nativescript/rspack`). See `packages/ns-rspack/README.md` + and `packages/ns-rspack/AGENTS.md`. - **`ns-wry`** (`@cross-code/ns-wry`) — general-purpose NativeScript plugin scaffold built on Rust + UniFFI (uniffi-rs) with cargo-ndk Android pipeline. See `packages/ns-wry/AGENTS.md` for the bare-metal architecture; extend the `wry-rust` workspace and `wry_ffi.udl` IDL to add engine-specific APIs. -### Vitest + NativeScript unit-test packages - -- **`vitest-ns`** (`@cross-code/vitest-ns`) — a Vitest - custom pool that runs unit tests in NativeScript Worker runtimes. Read - `packages/vitest-ns/AGENTS.md` before changing its Node/device - protocol or webpack aliases. -- **`vitest-ns-ui`** (`@cross-code/vitest-ns-ui`) — an - optional NativeScript Core results view. It is presentation-only and should - remain removable for headless or CI usage. -- These packages support one-shot unit tests; they are not a component-testing - or end-to-end framework. Run their Nx `build`, `typecheck`, and `test` - targets with `pnpm exec nx`. +### Rstest + NativeScript unit-test package + +- **`ns-rstest`** (`@cross-code/ns-rstest`) — runs Rstest unit tests in + NativeScript Worker runtimes. Rstest has no custom-pool API, so the package + owns its own Node host (`runNativeScriptTests`) and drives Rstest's own + runtime (`@rstest/core/internal/browser-runtime`) on the device. Read + `packages/ns-rstest/AGENTS.md` before changing its Node/device protocol or + bundler aliases. +- The optional on-device results view ships from the same package under + `@cross-code/ns-rstest/ui`. It is presentation-only and should remain + removable for headless or CI usage. +- The package supports one-shot unit tests; it is not a component-testing or + end-to-end framework. Run its Nx `build`, `typecheck`, and `test` targets + with `pnpm exec nx`. **wamr native suites**: if the vendored WAMR C sources are ever absent, the wamr native commands and CI jobs (`wamr-ios`, `wamr-android`) skip gracefully @@ -475,6 +494,16 @@ Three test layers, each covering a different slice: touch `wire.ts` or an adapter file. Details in `apps/ns-wasm-test/AGENTS.md`. +### CI jobs are real gates — never `continue-on-error` + +The CI jobs that run the test app's suite (`wasm-test-ios`, +`wasm-test-android` in `.github/workflows/ci.yml`) are the only place the +TypeScript adapters meet the real native layers, so a failure in either is a +release-blocking signal. **Do not add `continue-on-error` to any CI job** — +emulator/simulator flakiness must be fixed, not bypassed. If a job is +genuinely environment-broken, disable it with an `if:` condition and a +comment instead, never a silent `continue-on-error`. + ### Kotlin linting (Detekt + Ktlint) Each Android Gradle project (`platforms/android/-android/`) runs @@ -616,8 +645,13 @@ wasm-pack-generated `.d.ts`. See `packages/ns-wasm-fixture/README.md`. | `packages/ns-wasm3/AGENTS.md` | wasm3-specific: stack ABI, globals, fixtures, build/test | | `packages/ns-wamr/AGENTS.md` | WAMR-specific: two-phase load, exec env, WASI, tiers, trampolines, shim | | `packages/ns-wasm-kit-runtime/AGENTS.md` | WasmKit-specific: iOS-only Swift interpreter, Android unsupported stub | +| `packages/ns-wasm-edge/AGENTS.md` | (none — no per-package AGENTS yet; follows the Rust/UniFFI architecture of wasm3/wamr, see Shared plugin architecture above) | +| `packages/ns-wasm-chicory/AGENTS.md` | (none — no per-package AGENTS yet; pure-Java Android runtime, no NDK/Rust needed) | +| `packages/ns-endive/AGENTS.md` | (none — no per-package AGENTS yet; Java/JNI Android runtime with TypeScript adapter) | +| `packages/ns-rspack/AGENTS.md` | rspack bundler for NativeScript apps — CLI/IPC contract, compat layer, gotchas (also see `packages/ns-rspack/README.md` for usage) | | `packages/ns-wry/AGENTS.md` | wry scaffold: Rust + UniFFI architecture, platform stubs, extension guide | | `apps/ns-wasm-test/AGENTS.md` | test app: layout, design decisions, running the suites, adding specs | +| `apps/rspack-test-app` | rspack-bundled test app — workspace member, installs with the root `pnpm install`; see `packages/ns-rspack/README.md` | | `apps/ns-wry-app` | test app: WebView demo, build-plugin-and-run workflow | diff --git a/CLAUDE.md b/CLAUDE.md index befb208..adc992a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,7 +10,7 @@ automatically). This file exists only so older tools that look for **Read `AGENTS.md` before exploring, building, or editing anything.** It covers: Nx task conventions, the NativeScript plugins (ns-wamr, -ns-wasm3, ns-wry), the vitest-ns device test pool, the shared wire +ns-wasm3, ns-wry), the ns-rstest device test runner, the shared wire protocol, native build pipelines (prebuilt xcframeworks, cargo-ndk, Buck2 via `nx-buck2`), testing layers, and the code-review-graph MCP tools that should be used before Grep/Glob/Read. diff --git a/README.md b/README.md index 697898d..2710128 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # cross-code An Nx monorepo for running WebAssembly on [NativeScript](https://nativescript.org) — -three WASM runtime plugins built on a shared TypeScript foundation (wire protocol, +WASM runtime plugins built on a shared TypeScript foundation (wire protocol, adapter interfaces, base Runtime/Module/Function classes): - [`wasm3`](https://github.com/wasm3/wasm3) — lightweight interpreter (v0.5.2) @@ -9,10 +9,18 @@ adapter interfaces, base Runtime/Module/Function classes): Micro Runtime (2.3.0): interpreter, Fast JIT, LLVM JIT, AOT, WASI - [WasmKit](https://github.com/swiftwasm/WasmKit) — Swift-based WebAssembly runtime with WASI support, iOS-native through SwiftPM +- [WasmEdge](https://github.com/WasmEdge/WasmEdge) — high-performance runtime + (Swift Package on iOS, Kotlin + Rust JNI (cargo-ndk) on Android) +- [Chicory](https://github.com/dylibso/chicory) — pure-Java interpreter, + Android-only +- [Endive](https://github.com/bytecodealliance/endive) — Java-native + interpreter, Android-only Also in the monorepo: [`ns-wry`](packages/ns-wry) — a general-purpose NativeScript plugin scaffold built on Rust + [UniFFI](https://github.com/mozilla/uniffi-rs) -(uniffi-rs) auto-generated Kotlin/Swift bindings and cargo-ndk Android pipeline. +(uniffi-rs) auto-generated Kotlin/Swift bindings and cargo-ndk Android pipeline — +and [`ns-rspack`](packages/ns-rspack), an rspack bundler for NativeScript apps +that reuses `@nativescript/webpack`'s configuration. > **Project status: Active development.** APIs and project layout may change without notice; expect breaking changes between releases. @@ -24,16 +32,20 @@ plugin scaffold built on Rust + [UniFFI](https://github.com/mozilla/uniffi-rs) | [`@cross-code/ns-wasm3`](packages/ns-wasm3) | NativeScript plugin — Swift Package on iOS, Kotlin + Rust JNI (cargo-ndk) on Android (wasm3 interpreter) | | [`@cross-code/ns-wamr`](packages/ns-wamr) | NativeScript plugin — Swift Package on iOS, Kotlin + Rust JNI (cargo-ndk) on Android (WAMR: interpreter, Fast JIT, LLVM JIT, AOT, WASI) | | [`@cross-code/ns-wasm-kit-runtime`](packages/ns-wasm-kit-runtime) | NativeScript plugin — Swift Package on iOS (WasmKit interpreter); Android throws a clear unsupported error | +| [`@cross-code/ns-wasm-edge`](packages/ns-wasm-edge) | NativeScript plugin — Swift Package on iOS, Kotlin + Rust JNI (cargo-ndk) on Android (WasmEdge runtime) | +| [`@cross-code/ns-wasm-chicory`](packages/ns-wasm-chicory) | NativeScript plugin — pure-Java Chicory interpreter on Android (no native toolchain needed) | +| [`@cross-code/ns-endive`](packages/ns-endive) | NativeScript plugin — Java/JNI Endive interpreter on Android | | [`@cross-code/ns-wasm-fixture`](packages/ns-wasm-fixture) | Rust/wasm-pack test fixtures (committed `.wasm` binaries) | -| [`@cross-code/vitest-ns`](packages/vitest-ns) | Vitest custom pool and NativeScript Worker runtime for on-device unit tests | -| [`@cross-code/vitest-ns-ui`](packages/vitest-ns-ui) | Optional NativeScript Core results page for device-side Vitest progress | +| [`@cross-code/ns-rstest`](packages/ns-rstest) | [Rstest](https://rstest.rs) device test runner for NativeScript — Node host, Worker runtime, and optional on-device results page | | [`@cross-code/ns-wry`](packages/ns-wry) | NativeScript plugin — Rust + UniFFI (uniffi-rs) Kotlin/Swift bindings, cargo-ndk Android pipeline | +| [`@cross-code/ns-rspack`](packages/ns-rspack) | [rspack](https://rspack.rs) bundler for NativeScript apps — the `@nativescript/webpack` config, compiled by rspack | | [`@cross-code/nx-buck2`](packages/nx-buck2) | Nx plugin for Buck2 native builds — debug/release profiles, cross-compilation, size optimization | -| [`ns-wasm-test`](apps/ns-wasm-test) | NativeScript test app — runs the plugins on a simulator/emulator from a demo page and through Vitest + `vitest-ns` | +| [`ns-wasm-test`](apps/ns-wasm-test) | NativeScript test app — runs the plugins on a simulator/emulator from a demo page and through Rstest + `ns-rstest` | +| [`rspack-test-app`](apps/rspack-test-app) | NativeScript app bundled with `@cross-code/ns-rspack` (workspace member; installs with the root `pnpm install`) | | [`ns-wry-app`](apps/ns-wry-app) | NativeScript test app for @cross-code/ns-wry — WebView demo with google.com on iOS/Android | The WASM runtime plugins expose the same TypeScript API — see [WASM.md](WASM.md). All runtime -plugins (wasm3, WAMR, WasmKit) share the same foundation (`@cross-code/ns-wasm-core`) +plugins (wasm3, WAMR, WasmKit, WasmEdge, Chicory, Endive) share the same foundation (`@cross-code/ns-wasm-core`) which provides the wire protocol, error classes, adapter interfaces and generic `WasmRuntime`/`WasmModule`/`WasmFunction` classes. Each package README covers its own layout, development workflow and troubleshooting @@ -61,6 +73,8 @@ Before running its suite, install it separately: cd apps/ns-wasm-test && pnpm install ``` +`rspack-test-app` _is_ a workspace member, so the root `pnpm install` covers it. + Run TypeScript build and unit tests (no native toolchain required): ```bash @@ -151,18 +165,34 @@ curl -fsSL https://github.com/facebook/buck2/releases/latest/download/buck2-aarc or `mise plugin install buck2 https://github.com/izaakschroeder/asdf-buck2`. -## WebAssembly plugins (wasm3, WAMR & WasmKit) +## rspack bundling + +[`@cross-code/ns-rspack`](packages/ns-rspack) is an [rspack](https://rspack.rs) +bundler for NativeScript apps. It reuses `@nativescript/webpack`'s configuration +— every NativeScript-specific rule (entry stubs, platform extensions, XML/CSS +loaders, copy rules, defines, HMR) comes from there — and swaps the webpack-only +pieces (plugins, loaders, glob syntax, `WatchStatePlugin` IPC) for rspack +equivalents. See [packages/ns-rspack/README.md](packages/ns-rspack/README.md) +for usage and the webpack↔rspack differences table. + +The `rspack-test-app` exercises it end-to-end (`bundler: 'rspack'` in +`nativescript.config.ts`); `ns build ios` / `ns run ios` (watch + HMR) run the +bundler via the CLI bin and read build state over IPC. + +## WebAssembly plugins (wasm3, WAMR, WasmKit, WasmEdge, Chicory & Endive) Usage and API documentation for the WebAssembly plugins — install, quick start, calling exports, linear memory, globals, host imports, value marshalling, error messages, the complete API reference, and shared troubleshooting — lives in **[WASM.md](WASM.md)**. -All three plugins expose the same TypeScript API; only the class names differ +All six plugins expose the same TypeScript API; only the class names differ (`Wasm3Runtime` / `Wasm3Module` / `Wasm3Function` vs `WamrRuntime` / `WamrModule` / `WamrFunction` vs -`WasmKitRuntime` / `WasmKitModule` / `WasmKitFunction`). +`WasmKitRuntime` / `WasmKitModule` / `WasmKitFunction`, and the WasmEdge, +Chicory and Endive equivalents). WasmKit is iOS-only (Swift-based runtime); Android throws a clear "not supported" error. +Chicory and Endive are Java-based and Android-only. ## Linting @@ -194,15 +224,19 @@ pnpm exec nx run ns-wamr:periphery.ios | Package | Docs | | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| WebAssembly plugins (wasm3, WAMR & WasmKit) | [WASM.md](WASM.md) — shared usage, API reference, marshalling, errors, troubleshooting | +| WebAssembly plugins (wasm3 & WAMR) | [WASM.md](WASM.md) — shared usage, API reference, marshalling, errors, troubleshooting | | `@cross-code/ns-wasm-core` | [AGENTS.md](AGENTS.md#shared-plugin-architecture) — wire protocol, WasmError, adapter interfaces, base classes | | `@cross-code/ns-wasm3` | [README](packages/ns-wasm3/README.md) — platform details, package layout, developing, troubleshooting, license | | `@cross-code/ns-wamr` | [README](packages/ns-wamr/README.md) — execution tiers, package layout, developing, troubleshooting, license | | `@cross-code/ns-wasm-kit-runtime` | [README](packages/ns-wasm-kit-runtime/README.md) — WasmKit Swift interpreter, iOS-only adapter, developing, troubleshooting | +| `@cross-code/ns-wasm-edge` | [package](packages/ns-wasm-edge) — WasmEdge runtime, follows the Rust/UniFFI architecture of wasm3/wamr | +| `@cross-code/ns-wasm-chicory` | [package](packages/ns-wasm-chicory) — Chicory pure-Java interpreter, Android-only, byte marshalling | +| `@cross-code/ns-endive` | [package](packages/ns-endive) — Endive Java interpreter, Android-only, developing, troubleshooting | | `@cross-code/ns-wasm-fixture` | [README](packages/ns-wasm-fixture/README.md) — exported subpaths, rebuilding the `.wasm` fixtures | -| `@cross-code/vitest-ns` | [README](packages/vitest-ns/README.md) — custom pool, Worker registry, concurrency, and transport | -| `@cross-code/vitest-ns-ui` | [README](packages/vitest-ns-ui/README.md) — optional NativeScript results UI | +| `@cross-code/ns-rstest` | [README](packages/ns-rstest/README.md) — Node host, Worker registry, concurrency, transport, and results UI | | `@cross-code/ns-wry` | [README](packages/ns-wry/README.md) — Rust + UniFFI architecture, platform stubs, developing, troubleshooting | +| `@cross-code/ns-rspack` | [README](packages/ns-rspack/README.md) — rspack bundler: usage, webpack↔rspack differences, known gaps | | `@cross-code/nx-buck2` | [README](packages/nx-buck2/README.md) — Buck2 executors/generators, CLI usage | | `ns-wasm-test` | [README](apps/ns-wasm-test/README.md) — running the demo page and the on-device Vitest suite, troubleshooting | +| `rspack-test-app` | rspack-bundled demo app (workspace member) — see [packages/ns-rspack/README.md](packages/ns-rspack/README.md) | | `ns-wry-app` | [README](apps/ns-wry-app/README.md) — WebView demo, build-plugin-and-run scripts, troubleshooting | diff --git a/apps/ns-wasm-test/AGENTS.md b/apps/ns-wasm-test/AGENTS.md index 1fde4df..a483b3b 100644 --- a/apps/ns-wasm-test/AGENTS.md +++ b/apps/ns-wasm-test/AGENTS.md @@ -6,33 +6,36 @@ Workspace-wide Nx and NativeScript rules live in the root `AGENTS.md`. ## Test architecture -- Vitest runs in Node and uses the `@cross-code/vitest-ns` custom - pool for discovery, scheduling, and reporter output. -- `app/vitest-ns.ts` is the test-only application entry. It owns the - coordinator and the optional `@cross-code/vitest-ns-ui` page. Its +- `@cross-code/ns-rstest` runs the host loop in Node: it globs the specs, + launches the NativeScript CLI, assigns files to device worker slots, and + reports through Rstest's `Reporter` interface. Rstest has no custom-pool API, + so the `rstest` CLI is never involved. +- `app/ns-rstest.ts` is the test-only application entry. It owns the + coordinator and the optional `@cross-code/ns-rstest/ui` page. Its first import must remain `@valor/nativescript-websockets` so the transport global exists before the coordinator starts. -- `app/vitest-ns.worker.ts` is a statically discoverable NativeScript +- `app/ns-rstest.worker.ts` is a statically discoverable NativeScript Worker entry. It imports `@nativescript/core/globals` for timers, and its - webpack registry must match every file selected by the Vitest configs. + bundler registry must match every file selected by the host configs. - Specs execute inside the Worker against the real iOS/Android native plugins. Never move NativeScript `View` access into a spec or Worker. - The normal demo still starts from `app/app.ts` and reuses `app/wasm/fixture-suite.ts`. -The custom webpack helper activates only for `env.vitestNativeScript`, swaps -the app entry, and aliases bare `vitest` imports to the device-safe shim. With -`env.vitestNativeScriptCoverage` it also applies Istanbul instrumentation to -app sources; that flag is added automatically by `vitest run --coverage`. +The custom bundler helper (see `rspack.config.ts`) activates only for +`env.rstestNativeScript`, swaps the app entry, and aliases bare `@rstest/core` +imports to the device-safe shim. With `env.rstestNativeScriptCoverage` it also +applies Istanbul instrumentation to app sources; that flag is added +automatically when the host config enables coverage. ## Layout ```text app/ - vitest-ns.ts coordinator + results UI - vitest-ns.worker.ts Worker registry - tests/wasm3/ wasm3 Vitest specs - tests/wamr/ WAMR Vitest specs + ns-rstest.ts coordinator + results UI + ns-rstest.worker.ts Worker registry + tests/wasm3/ wasm3 Rstest specs + tests/wamr/ WAMR Rstest specs tests/wasmkit/ WasmKit specs (iOS-only engine) tests/endive/ Endive specs (Android-only engine) tests/chicory/ Chicory specs (Android-only engine) @@ -40,21 +43,23 @@ app/ tests/runtime-support.ts per-engine platform matrix + suite gating wasm/fixture-suite.ts shared correctness checks wasm/wasm-assets.ts bundled fixture paths/byte reader -vitest.ios.config.mts iOS simulator host config -vitest.android.config.mts Android emulator host config -webpack.config.js WASM copies + Vitest test entry +ns-rstest.ios.mts iOS simulator host runner +ns-rstest.android.mts Android emulator host runner +rspack.config.ts WASM copies + Rstest test entry tsconfig.json production/demo TypeScript files tsconfig.spec.json specs and test-only entries ``` ## Invariants -- Import `describe`, `it`, hooks, and `expect` from bare `vitest` in every spec. - Bare imports are required so Node receives Vitest types while webpack can - substitute the device-safe shim. -- Keep host and device file patterns aligned: - `app/tests/**/*.spec.ts` in both Vitest configs and `/\.spec\.ts$/` in the - Worker registry. +- Import `describe`, `it`, hooks, and `expect` from bare `@rstest/core` in every + spec. Bare imports are required so the editor gets Rstest types while the + bundler substitutes the device-safe shim, which forwards to the per-file + runtime Rstest publishes on `globalThis['@rstest/core']`. +- Keep host and device file patterns aligned: `app/tests/**/*.spec.ts` in both + host runners and `/\.spec\.ts$/` in the Worker registry. +- A worker slot loads each spec module once. Rstest registers suites while the + module body evaluates, so a spec cannot be re-run inside one app session. - Keep `workers: 1` unless all native state touched by the suite is verified thread-safe. A worker is long-lived and files assigned to it share module and global state. @@ -71,7 +76,7 @@ tsconfig.spec.json specs and test-only entries runtime package. - i64 values cross native bridges as decimal strings and surface in JS as `bigint`. Preserve tests beyond `Number.MAX_SAFE_INTEGER`. -- The webpack test entry must not affect a normal app build. +- The test entry wired by the bundler helper must not affect a normal app build. ## WAMR-specific behavior @@ -87,17 +92,20 @@ platform-specific exception prefixes. ## Package wiring The app is deliberately outside the root pnpm workspace and owns a separate -lockfile. Local packages use `file:` dependencies. Add or remove dependencies -with pnpm from this app directory; do not emulate links with TypeScript paths. +lockfile. It is itself a pnpm workspace root that exposes the sibling +`packages/*` it consumes through the `workspace:` protocol (see +`pnpm-workspace.yaml`) — each local package is linked, not copied. Add or +remove dependencies with pnpm from this app directory; do not emulate links +with TypeScript paths. -`@cross-code/vitest-ns-ui` has the runner as a peer dependency so the -app provides one runner instance, and the UI has `@nativescript/core` as a peer -so its `Page`/`View` types come from the app's NativeScript installation. +`@cross-code/ns-rstest` has `@rstest/core` and `@nativescript/core` as peers, so +the app provides the single Rstest install the host and device share and the +results UI takes its `Page`/`View` types from the app's NativeScript install. -When runner/UI `dist` output changes: +When the runner's `dist` output changes: ```bash -pnpm exec nx run-many -t build -p vitest-ns vitest-ns-ui +pnpm exec nx run ns-rstest:build cd apps/ns-wasm-test pnpm install --force ``` @@ -131,5 +139,6 @@ bare global `ns` command. Use the `.coverage` targets to collect Istanbul coverage on the device. The reports are local, platform-specific artifacts under -`test-output/vitest/coverage/{ios,android}`. Do not enable Vitest's V8 provider: -NativeScript runtimes do not expose V8 inspector coverage. +`test-output/rstest/coverage/{ios,android}/coverage-final.json` — raw Istanbul +data, ready for `npx nyc report` or a coverage uploader. Instrumentation has to +be Istanbul: NativeScript runtimes do not expose V8 inspector coverage. diff --git a/apps/ns-wasm-test/README.md b/apps/ns-wasm-test/README.md index ea199e4..27c5c40 100644 --- a/apps/ns-wasm-test/README.md +++ b/apps/ns-wasm-test/README.md @@ -1,6 +1,6 @@ # ns-wasm-test -On-device Vitest coverage for +On-device Rstest coverage for [`@cross-code/ns-wasm3`](../../packages/ns-wasm3) and [`@cross-code/ns-wamr`](../../packages/ns-wamr). The app runs the shared WebAssembly fixture against the real native runtimes on iOS @@ -10,13 +10,13 @@ There are two app modes: - The normal demo entry (`app/app.ts`) renders the shared WASM checks when you tap **RUN**. -- The test entry (`app/vitest-ns.ts`) displays the optional - `@cross-code/vitest-ns-ui` results page while Vitest executes the +- The test entry (`app/ns-rstest.ts`) displays the optional + `@cross-code/ns-rstest/ui` results page while Rstest executes the specs in a NativeScript Worker. -Vitest remains in Node for discovery, scheduling, and CLI reporting. The -`@cross-code/vitest-ns` custom pool sends each selected file over a -WebSocket to the NativeScript app, where the Worker loads and executes it. +`@cross-code/ns-rstest` runs the host loop in Node — discovery, scheduling and +reporting — and sends each selected file over a WebSocket to the NativeScript +app, where the Worker executes it with Rstest's own runtime. The test entry imports `@valor/nativescript-websockets` first because NativeScript Core does not provide the browser-compatible `WebSocket` global used by that host/device connection. @@ -24,19 +24,19 @@ used by that host/device connection. ## Layout ```text -app/vitest-ns.ts test-only app entry and results UI -app/vitest-ns.worker.ts Worker registry for app/tests/**/*.spec.ts -app/tests/wasm3/*.spec.ts Vitest specs for wasm3 -app/tests/wamr/*.spec.ts Vitest specs for WAMR +app/ns-rstest.ts test-only app entry and results UI +app/ns-rstest.worker.ts Worker registry for app/tests/**/*.spec.ts +app/tests/wasm3/*.spec.ts Rstest specs for wasm3 +app/tests/wamr/*.spec.ts Rstest specs for WAMR app/wasm/fixture-suite.ts checks shared by specs and demo page app/wasm/wasm-assets.ts device paths and platform-aware byte reader -vitest.ios.config.mts iOS simulator custom-pool config -vitest.android.config.mts Android emulator custom-pool config -webpack.config.js fixture copies and test-entry/shim setup +ns-rstest.ios.mts iOS simulator host runner +ns-rstest.android.mts Android emulator host runner +rspack.config.ts fixture copies and test-entry/shim setup ``` -The webpack helper changes the bundle entry and aliases bare `vitest` imports -only when `--env.vitestNativeScript` is present. Production/demo builds still +The bundler helper changes the bundle entry and aliases bare `@rstest/core` +imports only when `--env.rstestNativeScript` is present. Production/demo builds still start from `app/app.ts` and do not include the specs. ## Run tests @@ -60,14 +60,14 @@ pnpm run test.ios:coverage pnpm run test.android:coverage ``` -Both Vitest configs launch an emulator/simulator through the project-local +Both host runners launch an emulator/simulator through the project-local NativeScript CLI. They currently use one NativeScript Worker, which keeps native runtime state isolated from the UI thread and avoids concurrent access to plugin/native singletons. Increase `workers` only for tests known to be thread-safe. To select a physical device, replace the `launchCommand` in the relevant -Vitest config with the normal `npx ns run --device ` arguments +host runner with the normal `npx ns run --device ` arguments and set the coordinator `url` to a WebSocket address reachable from that device. @@ -75,17 +75,17 @@ device. Coverage runs execute the same device suite and use Istanbul instrumentation, because NativeScript's JavaScript runtimes do not provide V8 coverage. Passing -`--coverage` automatically adds the coverage-only webpack flag; ordinary test +`--coverage` automatically adds the coverage-only bundler flag; ordinary test runs stay uninstrumented. -The reports are written separately by platform: +Raw Istanbul data is written separately by platform: -- `test-output/vitest/coverage/ios/index.html` -- `test-output/vitest/coverage/android/index.html` +- `test-output/rstest/coverage/ios/coverage-final.json` +- `test-output/rstest/coverage/android/coverage-final.json` -Each report covers executed application sources under `app/`, excluding test -files and the NativeScript Vitest bootstrap files. `all` is deliberately -disabled: the device bundle supplies runtime coverage only for files it loads. +Render them with `npx nyc report --temp-dir ` or hand them to a coverage +uploader. The device bundle supplies coverage only for files it actually +loads. ## Behavioral coverage @@ -125,11 +125,10 @@ pnpm install --force this app's generated `platforms/` directory and rerun the target. - The host and device communicate on port `17878`. Do not run the iOS and Android targets concurrently unless they use different ports. -- `vitest-ns` currently supports one-shot `vitest run`; watch/HMR, - `vi` mocks/fake timers, snapshots, and component testing are not implemented. +- `ns-rstest` currently supports one-shot runs; watch/HMR, snapshots, and + component testing are not implemented. ## See also -- [`@cross-code/vitest-ns`](../../packages/vitest-ns/README.md) -- [`@cross-code/vitest-ns-ui`](../../packages/vitest-ns-ui/README.md) +- [`@cross-code/ns-rstest`](../../packages/ns-rstest/README.md) - [Workspace README](../../README.md) diff --git a/apps/ns-wasm-test/app/main-view-model.ts b/apps/ns-wasm-test/app/main-view-model.ts index 0bb5bf2..6db07cb 100644 --- a/apps/ns-wasm-test/app/main-view-model.ts +++ b/apps/ns-wasm-test/app/main-view-model.ts @@ -21,9 +21,9 @@ import { appWasmPath, FIXTURE_WASM, GLOBALS_WASM } from './wasm/wasm-assets'; /** * Runs the fixture suite on both of the device's runtimes — wasm3 and WAMR — * so the demo page shows the same module behaving identically on each. The - * checks themselves live in `wasm/fixture-suite.ts`; the Vitest specs in + * checks themselves live in `wasm/fixture-suite.ts`; the Rstest specs in * `app/tests/wasm3/` and `app/tests/wamr/` assert on the same list under - * the `vitest-ns` worker. + * the `ns-rstest` worker. * * WAMR runs on its Interpreter tier here, the one tier available in every * build; the specs cover Fast JIT, LLVM JIT and AOT where they are compiled in. diff --git a/apps/ns-wasm-test/app/ns-rstest.ts b/apps/ns-wasm-test/app/ns-rstest.ts new file mode 100644 index 0000000..b8c9e95 --- /dev/null +++ b/apps/ns-wasm-test/app/ns-rstest.ts @@ -0,0 +1,13 @@ +import '@valor/nativescript-websockets'; +import { Application } from '@nativescript/core'; +import { NativeScriptRstestCoordinator } from '@cross-code/ns-rstest/runtime'; +import { createRstestResultsPage } from '@cross-code/ns-rstest/ui'; + +const coordinator = new NativeScriptRstestCoordinator({ + createWorker: () => new Worker('./ns-rstest.worker.ts'), +}); + +Application.run({ create: () => createRstestResultsPage(coordinator) }); +void coordinator.start().catch((error: unknown) => { + console.error('Unable to start the NativeScript Rstest coordinator', error); +}); diff --git a/apps/ns-wasm-test/app/ns-rstest.worker.ts b/apps/ns-wasm-test/app/ns-rstest.worker.ts new file mode 100644 index 0000000..74cc775 --- /dev/null +++ b/apps/ns-wasm-test/app/ns-rstest.worker.ts @@ -0,0 +1,20 @@ +import '@nativescript/core/globals'; +import { + createBundlerTestRegistry, + registerNativeScriptRstestWorker, + type BundlerRequireContext, +} from '@cross-code/ns-rstest/runtime'; + +declare const require: { + context( + path: string, + recursive: boolean, + pattern: RegExp, + ): BundlerRequireContext; +}; + +const tests = require.context('./tests', true, /\.spec\.ts$/); + +registerNativeScriptRstestWorker({ + registry: createBundlerTestRegistry(tests), +}); diff --git a/apps/ns-wasm-test/app/tests/chicory/fixture-module.spec.ts b/apps/ns-wasm-test/app/tests/chicory/fixture-module.spec.ts index 7f37eea..f3aa7fb 100644 --- a/apps/ns-wasm-test/app/tests/chicory/fixture-module.spec.ts +++ b/apps/ns-wasm-test/app/tests/chicory/fixture-module.spec.ts @@ -2,7 +2,7 @@ * The Rust fixture module driven through @cross-code/ns-wasm-chicory * (Android-only — pure-Java runtime). */ -import { afterEach, beforeEach, expect, it } from 'vitest'; +import { afterEach, beforeEach, expect, it } from '@rstest/core'; import { ChicoryError, ChicoryRuntime, type ChicoryModule } from '@cross-code/ns-wasm-chicory'; import { callFixture, createHostImports, runFixtureChecks, summarize, type HostCall } from '../../wasm/fixture-suite'; import { appWasmPath, FIXTURE_WASM } from '../../wasm/wasm-assets'; diff --git a/apps/ns-wasm-test/app/tests/endive/fixture-module.spec.ts b/apps/ns-wasm-test/app/tests/endive/fixture-module.spec.ts index 144b4eb..43d9899 100644 --- a/apps/ns-wasm-test/app/tests/endive/fixture-module.spec.ts +++ b/apps/ns-wasm-test/app/tests/endive/fixture-module.spec.ts @@ -2,10 +2,10 @@ * The Rust fixture module driven through the plugin's public API, on the * device's own Endive interpreter (Android-only; iOS throws unsupported). * - * Vitest discovers this file in Node, then @cross-code/vitest-ns + * Rstest discovers this file in Node, then @cross-code/ns-rstest * executes it inside a NativeScript Worker on the selected device. */ -import { afterEach, beforeEach, expect, it } from 'vitest'; +import { afterEach, beforeEach, expect, it } from '@rstest/core'; import { EndiveError, EndiveRuntime, diff --git a/apps/ns-wasm-test/app/tests/runtime-support.ts b/apps/ns-wasm-test/app/tests/runtime-support.ts index 353841b..859d116 100644 --- a/apps/ns-wasm-test/app/tests/runtime-support.ts +++ b/apps/ns-wasm-test/app/tests/runtime-support.ts @@ -25,7 +25,7 @@ * failure rather than a skip. */ import { isIOS } from '@nativescript/core'; -import { describe } from 'vitest'; +import { describe } from '@rstest/core'; export type Platform = 'ios' | 'android'; diff --git a/apps/ns-wasm-test/app/tests/wamr/fixture-module.spec.ts b/apps/ns-wasm-test/app/tests/wamr/fixture-module.spec.ts index b7c7b4f..6792d00 100644 --- a/apps/ns-wasm-test/app/tests/wamr/fixture-module.spec.ts +++ b/apps/ns-wasm-test/app/tests/wamr/fixture-module.spec.ts @@ -2,7 +2,7 @@ * The Rust fixture module driven through the plugin's public API, on the * device's own WAMR runtime. * - * Vitest discovers this file in Node, then @cross-code/vitest-ns + * Rstest discovers this file in Node, then @cross-code/ns-rstest * executes it inside a NativeScript Worker on the selected device. * * The bulk of the coverage is `runFixtureChecks` from `app/wasm/fixture-suite.ts`, @@ -10,7 +10,7 @@ * their own assertions: declared signatures, i64 precision, host-import * round trips, execution tiers, and the error paths. */ -import { afterEach, beforeEach, describe, expect, it } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it } from '@rstest/core'; import { WamrError, WamrRuntime, diff --git a/apps/ns-wasm-test/app/tests/wamr/globals-module.spec.ts b/apps/ns-wasm-test/app/tests/wamr/globals-module.spec.ts index 96c9619..1549cb5 100644 --- a/apps/ns-wasm-test/app/tests/wamr/globals-module.spec.ts +++ b/apps/ns-wasm-test/app/tests/wamr/globals-module.spec.ts @@ -6,7 +6,7 @@ * cannot. The Rust unit tests in the fixture package check that encoding; * these check what the plugin makes of it. */ -import { afterEach, beforeEach, describe, expect, it } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it } from '@rstest/core'; import { WamrError, WamrRuntime, diff --git a/apps/ns-wasm-test/app/tests/wasm3/fixture-module.spec.ts b/apps/ns-wasm-test/app/tests/wasm3/fixture-module.spec.ts index 922fbfc..6053b3e 100644 --- a/apps/ns-wasm-test/app/tests/wasm3/fixture-module.spec.ts +++ b/apps/ns-wasm-test/app/tests/wasm3/fixture-module.spec.ts @@ -2,7 +2,7 @@ * The Rust fixture module driven through the plugin's public API, on the * device's own wasm3 interpreter. * - * Vitest discovers this file in Node, then @cross-code/vitest-ns + * Rstest discovers this file in Node, then @cross-code/ns-rstest * executes it inside a NativeScript Worker on the selected device. * * The bulk of the coverage is `runFixtureChecks` from `app/wasm/fixture-suite.ts`, @@ -10,7 +10,7 @@ * their own assertions: declared signatures, i64 precision, host-import * round trips, and the error paths. */ -import { afterEach, beforeEach, describe, expect, it } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it } from '@rstest/core'; import { Wasm3Error, Wasm3Runtime, diff --git a/apps/ns-wasm-test/app/tests/wasm3/globals-module.spec.ts b/apps/ns-wasm-test/app/tests/wasm3/globals-module.spec.ts index b9cc4a0..aaf4ed5 100644 --- a/apps/ns-wasm-test/app/tests/wasm3/globals-module.spec.ts +++ b/apps/ns-wasm-test/app/tests/wasm3/globals-module.spec.ts @@ -6,7 +6,7 @@ * cannot. The Rust unit tests in the fixture package check that encoding; * these check what the plugin makes of it. */ -import { afterEach, beforeEach, describe, expect, it } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it } from '@rstest/core'; import { Wasm3Error, Wasm3Runtime, diff --git a/apps/ns-wasm-test/app/tests/wasmedge/fixture-module.spec.ts b/apps/ns-wasm-test/app/tests/wasmedge/fixture-module.spec.ts index 2c29168..a96064a 100644 --- a/apps/ns-wasm-test/app/tests/wasmedge/fixture-module.spec.ts +++ b/apps/ns-wasm-test/app/tests/wasmedge/fixture-module.spec.ts @@ -1,7 +1,7 @@ /** * The Rust fixture module driven through @cross-code/ns-wasm-edge. */ -import { afterEach, beforeEach, expect, it } from 'vitest'; +import { afterEach, beforeEach, expect, it } from '@rstest/core'; import { WasmEdgeError, WasmEdgeRuntime, type WasmEdgeModule } from '@cross-code/ns-wasm-edge'; import { callFixture, createHostImports, runFixtureChecks, summarize, type HostCall } from '../../wasm/fixture-suite'; import { appWasmPath, FIXTURE_WASM } from '../../wasm/wasm-assets'; diff --git a/apps/ns-wasm-test/app/tests/wasmkit/fixture-module.spec.ts b/apps/ns-wasm-test/app/tests/wasmkit/fixture-module.spec.ts index 609bce4..121675f 100644 --- a/apps/ns-wasm-test/app/tests/wasmkit/fixture-module.spec.ts +++ b/apps/ns-wasm-test/app/tests/wasmkit/fixture-module.spec.ts @@ -2,7 +2,7 @@ * The Rust fixture module driven through the plugin's public API, on the * device's own WasmKit interpreter. * - * Vitest discovers this file in Node, then @cross-code/vitest-ns + * Rstest discovers this file in Node, then @cross-code/ns-rstest * executes it inside a NativeScript Worker on the selected device. * * The bulk of the coverage is `runFixtureChecks` from `app/wasm/fixture-suite.ts`, @@ -10,7 +10,7 @@ * their own assertions: declared signatures, i64 precision, host-import * round trips, and the error paths. */ -import { afterEach, beforeEach, expect, it } from 'vitest'; +import { afterEach, beforeEach, expect, it } from '@rstest/core'; import { WasmKitError, WasmKitRuntime, diff --git a/apps/ns-wasm-test/app/vitest-ns.ts b/apps/ns-wasm-test/app/vitest-ns.ts deleted file mode 100644 index 822f143..0000000 --- a/apps/ns-wasm-test/app/vitest-ns.ts +++ /dev/null @@ -1,13 +0,0 @@ -import '@valor/nativescript-websockets'; -import { Application } from '@nativescript/core'; -import { NativeScriptVitestCoordinator } from '@cross-code/vitest-ns/runtime'; -import { createVitestResultsPage } from '@cross-code/vitest-ns-ui'; - -const coordinator = new NativeScriptVitestCoordinator({ - createWorker: () => new Worker('./vitest-ns.worker.ts'), -}); - -Application.run({ create: () => createVitestResultsPage(coordinator) }); -void coordinator.start().catch((error: unknown) => { - console.error('Unable to start the NativeScript Vitest coordinator', error); -}); diff --git a/apps/ns-wasm-test/app/vitest-ns.worker.ts b/apps/ns-wasm-test/app/vitest-ns.worker.ts deleted file mode 100644 index 47e49d7..0000000 --- a/apps/ns-wasm-test/app/vitest-ns.worker.ts +++ /dev/null @@ -1,20 +0,0 @@ -import '@nativescript/core/globals'; -import { - createWebpackTestRegistry, - registerNativeScriptVitestWorker, - type WebpackRequireContext, -} from '@cross-code/vitest-ns/runtime'; - -declare const require: { - context( - path: string, - recursive: boolean, - pattern: RegExp, - ): WebpackRequireContext; -}; - -const tests = require.context('./tests', true, /\.spec\.ts$/); - -registerNativeScriptVitestWorker({ - registry: createWebpackTestRegistry(tests), -}); diff --git a/apps/ns-wasm-test/app/wasm/fixture-suite.ts b/apps/ns-wasm-test/app/wasm/fixture-suite.ts index 5f0c000..e2d88d9 100644 --- a/apps/ns-wasm-test/app/wasm/fixture-suite.ts +++ b/apps/ns-wasm-test/app/wasm/fixture-suite.ts @@ -1,11 +1,11 @@ /** - * The WebAssembly exercise shared by the on-device demo page and the Vitest + * The WebAssembly exercise shared by the on-device demo page and the Rstest * specs in `app/tests/`. * * It runs on whichever runtime the caller hands it — `@cross-code/ns-wasm3` * or `@cross-code/ns-wamr`. Both plugins expose the same shape, so the suite * is typed against the structural interfaces below rather than either package: - * the demo page renders the checks, the NativeScript Vitest worker asserts on + * the demo page renders the checks, the NativeScript Rstest worker asserts on * them, and neither * runtime is privileged here. * diff --git a/apps/ns-wasm-test/nativescript.config.ts b/apps/ns-wasm-test/nativescript.config.ts index bf51052..9e2ca88 100644 --- a/apps/ns-wasm-test/nativescript.config.ts +++ b/apps/ns-wasm-test/nativescript.config.ts @@ -1,9 +1,16 @@ import { NativeScriptConfig } from '@nativescript/core'; +// The {N} CLI resolves `bundler: 'rspack'` to /node_modules/@nativescript/rspack +// (aliased to @cross-code/ns-rspack) and runs its dist/bin/index.js. +// @nativescript/core 9.0's BundlerType is still 'webpack' | 'vite', hence the widening. export default { id: 'org.nativescript.nativescriptwasmtest', appPath: 'app', appResourcesPath: 'App_Resources', + bundler: 'rspack', + bundlerConfigPath: 'rspack.config.ts', + // Without this the CLI spawns the bundler with --preserve-symlinks, which + // cannot resolve through pnpm's store (see packages/ns-rspack/README.md). cli: { packageManager: 'pnpm' }, @@ -11,4 +18,4 @@ export default { v8Flags: '--expose_gc', markingMode: 'none' } -} as NativeScriptConfig; +} as Omit & { bundler: string }; diff --git a/apps/ns-wasm-test/ns-rstest.android.mts b/apps/ns-wasm-test/ns-rstest.android.mts new file mode 100644 index 0000000..9cfc1b4 --- /dev/null +++ b/apps/ns-wasm-test/ns-rstest.android.mts @@ -0,0 +1,33 @@ +import { runNativeScriptTests } from '@cross-code/ns-rstest'; + +const port = 17_878; + +const summary = await runNativeScriptTests({ + platform: 'android', + appPath: '.', + workers: 1, + port, + // A cold CI runner downloads Gradle, builds the app and boots the + // emulator before the device worker can connect; that routinely exceeds + // the 2m default. + connectTimeout: 10 * 60_000, + include: ['app/tests/**/*.spec.ts'], + coverage: { + enabled: process.argv.includes('--coverage'), + reportsDirectory: 'test-output/rstest/coverage/android', + }, + launchCommand: { + command: 'npx', + args: [ + 'ns', + 'run', + 'android', + '--emulator', + '--no-hmr', + '--env.rstestNativeScript', + `--env.rstestNativeScriptPort=${port}`, + ], + }, +}); + +process.exitCode = summary.exitCode; diff --git a/apps/ns-wasm-test/ns-rstest.ios.mts b/apps/ns-wasm-test/ns-rstest.ios.mts new file mode 100644 index 0000000..8568641 --- /dev/null +++ b/apps/ns-wasm-test/ns-rstest.ios.mts @@ -0,0 +1,32 @@ +import { runNativeScriptTests } from '@cross-code/ns-rstest'; + +const port = 17_878; + +const summary = await runNativeScriptTests({ + platform: 'ios', + appPath: '.', + workers: 1, + port, + // A cold CI runner resolves SwiftPM packages and builds the app before the + // device worker can connect; that routinely exceeds the 2m default. + connectTimeout: 10 * 60_000, + include: ['app/tests/**/*.spec.ts'], + coverage: { + enabled: process.argv.includes('--coverage'), + reportsDirectory: 'test-output/rstest/coverage/ios', + }, + launchCommand: { + command: 'npx', + args: [ + 'ns', + 'run', + 'ios', + '--emulator', + '--no-hmr', + '--env.rstestNativeScript', + `--env.rstestNativeScriptPort=${port}`, + ], + }, +}); + +process.exitCode = summary.exitCode; diff --git a/apps/ns-wasm-test/package.json b/apps/ns-wasm-test/package.json index a79f431..744238e 100644 --- a/apps/ns-wasm-test/package.json +++ b/apps/ns-wasm-test/package.json @@ -4,12 +4,12 @@ "version": "1.0.0", "private": true, "packageManager": "pnpm@11.20.0", - "description": "NativeScript test app for @cross-code/ns-wasm3 and @cross-code/ns-wamr \u2014 runs the shared WebAssembly fixture on-device with Vitest.", + "description": "NativeScript test app for @cross-code/ns-wasm3 and @cross-code/ns-wamr \u2014 runs the shared WebAssembly fixture on-device with Rstest.", "scripts": { - "test.ios": "vitest run --config vitest.ios.config.mts", - "test.android": "vitest run --config vitest.android.config.mts", - "test.ios:coverage": "vitest run --coverage --config vitest.ios.config.mts", - "test.android:coverage": "vitest run --coverage --config vitest.android.config.mts", + "test.ios": "node ns-rstest.ios.mts", + "test.android": "node ns-rstest.android.mts", + "test.ios:coverage": "node ns-rstest.ios.mts --coverage", + "test.android:coverage": "node ns-rstest.android.mts --coverage", "build.ios": "nx run ns-wasm-test:build.ios", "build.android": "nx run ns-wasm-test:build.android", "run.ios": "nx run ns-wasm-test:run.ios", @@ -21,29 +21,26 @@ "prepare.android": "nx run ns-wasm-test:prepare.android" }, "dependencies": { - "@cross-code/ns-wamr": "file:../../packages/ns-wamr", - "@cross-code/ns-wasm-fixture": "file:../../packages/ns-wasm-fixture", - "@cross-code/ns-wasm3": "file:../../packages/ns-wasm3", - "@cross-code/vitest-ns": "file:../../packages/vitest-ns", - "@cross-code/vitest-ns-ui": "file:../../packages/vitest-ns-ui", + "@cross-code/ns-endive": "workspace:@cross-code/ns-endive@*", + "@cross-code/ns-rstest": "workspace:@cross-code/ns-rstest@*", + "@cross-code/ns-wamr": "workspace:@cross-code/ns-wamr@*", + "@cross-code/ns-wasm-chicory": "workspace:@cross-code/ns-wasm-chicory@*", + "@cross-code/ns-wasm-edge": "workspace:@cross-code/ns-wasm-edge@*", + "@cross-code/ns-wasm-fixture": "workspace:@cross-code/ns-wasm-fixture@*", + "@cross-code/ns-wasm-kit-runtime": "workspace:@cross-code/ns-wasm-kit-runtime@*", + "@cross-code/ns-wasm3": "workspace:@cross-code/ns-wasm3@*", "@nativescript/core": "~9.0.0", "@nativescript/theme": "^3.1.0", - "@valor/nativescript-websockets": "2.0.3", - "@cross-code/ns-wasm-kit-runtime": "file:../../packages/ns-wasm-kit-runtime", - "@cross-code/ns-endive": "file:../../packages/ns-endive", - "@cross-code/ns-wasm-edge": "file:../../packages/ns-wasm-edge", - "@cross-code/ns-wasm-chicory": "file:../../packages/ns-wasm-chicory" + "@valor/nativescript-websockets": "2.0.3" }, "devDependencies": { "@nativescript/android": "9.0.5", "@nativescript/ios": "9.0.3", + "@nativescript/rspack": "workspace:@cross-code/ns-rspack@*", "@nativescript/types": "~9.0.0", - "@nativescript/webpack": "~5.0.25", - "@vitest/coverage-istanbul": "~4.1.10", - "@vitest/runner": "~4.1.10", - "postcss-loader": "8.2.1", - "ts-loader": "9.6.2", - "typescript": "~6.0.0", - "vitest": "~4.1.10" + "@nativescript/types-android": "9.0.0", + "@nativescript/types-ios": "9.0.0", + "@rstest/core": "0.11.6", + "typescript": "~6.0.0" } } diff --git a/apps/ns-wasm-test/pnpm-lock.yaml b/apps/ns-wasm-test/pnpm-lock.yaml index 36aefcb..13b5dde 100644 --- a/apps/ns-wasm-test/pnpm-lock.yaml +++ b/apps/ns-wasm-test/pnpm-lock.yaml @@ -4,40 +4,34 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -overrides: - '@cross-code/ns-wasm-core': file:../../packages/ns-wasm-core - importers: .: dependencies: '@cross-code/ns-endive': - specifier: file:../../packages/ns-endive - version: file:../../packages/ns-endive + specifier: workspace:@cross-code/ns-endive@* + version: link:../../packages/ns-endive + '@cross-code/ns-rstest': + specifier: workspace:@cross-code/ns-rstest@* + version: link:../../packages/ns-rstest '@cross-code/ns-wamr': - specifier: file:../../packages/ns-wamr - version: file:../../packages/ns-wamr + specifier: workspace:@cross-code/ns-wamr@* + version: link:../../packages/ns-wamr '@cross-code/ns-wasm-chicory': - specifier: file:../../packages/ns-wasm-chicory - version: file:../../packages/ns-wasm-chicory + specifier: workspace:@cross-code/ns-wasm-chicory@* + version: link:../../packages/ns-wasm-chicory '@cross-code/ns-wasm-edge': - specifier: file:../../packages/ns-wasm-edge - version: file:../../packages/ns-wasm-edge + specifier: workspace:@cross-code/ns-wasm-edge@* + version: link:../../packages/ns-wasm-edge '@cross-code/ns-wasm-fixture': - specifier: file:../../packages/ns-wasm-fixture - version: file:../../packages/ns-wasm-fixture + specifier: workspace:@cross-code/ns-wasm-fixture@* + version: link:../../packages/ns-wasm-fixture '@cross-code/ns-wasm-kit-runtime': - specifier: file:../../packages/ns-wasm-kit-runtime - version: file:../../packages/ns-wasm-kit-runtime + specifier: workspace:@cross-code/ns-wasm-kit-runtime@* + version: link:../../packages/ns-wasm-kit-runtime '@cross-code/ns-wasm3': - specifier: file:../../packages/ns-wasm3 - version: file:../../packages/ns-wasm3 - '@cross-code/vitest-ns': - specifier: file:../../packages/vitest-ns - version: file:../../packages/vitest-ns(@babel/core@7.29.7(supports-color@8.1.1))(@vitest/runner@4.1.10)(supports-color@8.1.1)(vitest@4.1.10)(webpack@5.109.2) - '@cross-code/vitest-ns-ui': - specifier: file:../../packages/vitest-ns-ui - version: file:../../packages/vitest-ns-ui(@cross-code/vitest-ns@file:../../packages/vitest-ns(@babel/core@7.29.7(supports-color@8.1.1))(@vitest/runner@4.1.10)(supports-color@8.1.1)(vitest@4.1.10)(webpack@5.109.2))(@nativescript/core@9.0.20) + specifier: workspace:@cross-code/ns-wasm3@* + version: link:../../packages/ns-wasm3 '@nativescript/core': specifier: ~9.0.0 version: 9.0.20 @@ -54,30 +48,125 @@ importers: '@nativescript/ios': specifier: 9.0.3 version: 9.0.3 + '@nativescript/rspack': + specifier: workspace:@cross-code/ns-rspack@* + version: link:../../packages/ns-rspack '@nativescript/types': specifier: ~9.0.0 version: 9.0.0 - '@nativescript/webpack': - specifier: ~5.0.25 - version: 5.0.38(lightningcss@1.33.0)(supports-color@8.1.1)(typescript@6.0.3) - '@vitest/coverage-istanbul': - specifier: ~4.1.10 - version: 4.1.10(supports-color@8.1.1)(vitest@4.1.10) - '@vitest/runner': - specifier: ~4.1.10 - version: 4.1.10 - postcss-loader: - specifier: 8.2.1 - version: 8.2.1(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2) - ts-loader: - specifier: 9.6.2 - version: 9.6.2(loader-utils@3.3.1)(typescript@6.0.3)(webpack@5.109.2) + '@nativescript/types-android': + specifier: 9.0.0 + version: 9.0.0 + '@nativescript/types-ios': + specifier: 9.0.0 + version: 9.0.0 + '@rstest/core': + specifier: 0.11.6 + version: 0.11.6 typescript: specifier: ~6.0.0 version: 6.0.3 + + ../../packages/ns-endive: + dependencies: + '@cross-code/ns-wasm-core': + specifier: workspace:* + version: link:../ns-wasm-core + tslib: + specifier: ^2.3.0 + version: 2.8.1 + + ../../packages/ns-rspack: + dependencies: + '@nativescript/webpack': + specifier: ~5.0.38 + version: 5.0.38(@rspack/core@2.1.9(@swc/helpers@0.5.23))(lightningcss@1.33.0)(supports-color@8.1.1)(typescript@6.0.3) + '@rspack/core': + specifier: ^2.1.9 + version: 2.1.9(@swc/helpers@0.5.23) + jiti: + specifier: ^2.4.2 + version: 2.7.0 + rspack-chain: + specifier: ^2.2.0 + version: 2.2.0(@rspack/core@2.1.9(@swc/helpers@0.5.23)) + tslib: + specifier: ^2.3.0 + version: 2.8.1 + + ../../packages/ns-rstest: + dependencies: + babel-loader: + specifier: ^9.2.1 + version: 9.2.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.109.2) + babel-plugin-istanbul: + specifier: ^7.0.1 + version: 7.0.1(supports-color@8.1.1) + tslib: + specifier: ^2.3.0 + version: 2.8.1 + ws: + specifier: ^8.18.3 + version: 8.21.2 + devDependencies: + '@nativescript/core': + specifier: ^9.0.20 + version: 9.0.20 + '@rstest/core': + specifier: 0.11.6 + version: 0.11.6 + '@types/ws': + specifier: ^8.18.1 + version: 8.18.1 vitest: specifier: ~4.1.10 - version: 4.1.10(@types/node@26.1.2)(@vitest/coverage-istanbul@4.1.10)(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)) + version: 4.1.10(@types/node@26.1.2)(@vitest/coverage-istanbul@4.1.10)(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(yaml@2.9.0)) + + ../../packages/ns-wamr: + dependencies: + '@cross-code/ns-wasm-core': + specifier: workspace:* + version: link:../ns-wasm-core + + ../../packages/ns-wasm-chicory: + dependencies: + '@cross-code/ns-wasm-core': + specifier: workspace:* + version: link:../ns-wasm-core + tslib: + specifier: ^2.3.0 + version: 2.8.1 + + ../../packages/ns-wasm-core: {} + + ../../packages/ns-wasm-edge: + dependencies: + '@cross-code/ns-wasm-core': + specifier: workspace:* + version: link:../ns-wasm-core + tslib: + specifier: ^2.3.0 + version: 2.8.1 + + ../../packages/ns-wasm-fixture: {} + + ../../packages/ns-wasm-kit-runtime: + dependencies: + '@cross-code/ns-wasm-core': + specifier: workspace:* + version: link:../ns-wasm-core + tslib: + specifier: ^2.3.0 + version: 2.8.1 + + ../../packages/ns-wasm3: + dependencies: + '@cross-code/ns-wasm-core': + specifier: workspace:* + version: link:../ns-wasm-core + tslib: + specifier: ^2.3.0 + version: 2.8.1 packages: @@ -152,43 +241,6 @@ packages: resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} engines: {node: '>=6.9.0'} - '@cross-code/ns-endive@file:../../packages/ns-endive': - resolution: {directory: ../../packages/ns-endive, type: directory} - - '@cross-code/ns-wamr@file:../../packages/ns-wamr': - resolution: {directory: ../../packages/ns-wamr, type: directory} - - '@cross-code/ns-wasm-chicory@file:../../packages/ns-wasm-chicory': - resolution: {directory: ../../packages/ns-wasm-chicory, type: directory} - - '@cross-code/ns-wasm-core@file:../../packages/ns-wasm-core': - resolution: {directory: ../../packages/ns-wasm-core, type: directory} - - '@cross-code/ns-wasm-edge@file:../../packages/ns-wasm-edge': - resolution: {directory: ../../packages/ns-wasm-edge, type: directory} - - '@cross-code/ns-wasm-fixture@file:../../packages/ns-wasm-fixture': - resolution: {directory: ../../packages/ns-wasm-fixture, type: directory} - - '@cross-code/ns-wasm-kit-runtime@file:../../packages/ns-wasm-kit-runtime': - resolution: {directory: ../../packages/ns-wasm-kit-runtime, type: directory} - - '@cross-code/ns-wasm3@file:../../packages/ns-wasm3': - resolution: {directory: ../../packages/ns-wasm3, type: directory} - - '@cross-code/vitest-ns-ui@file:../../packages/vitest-ns-ui': - resolution: {directory: ../../packages/vitest-ns-ui, type: directory} - peerDependencies: - '@cross-code/vitest-ns': ^0.0.1 - '@nativescript/core': ^9.0.20 - - '@cross-code/vitest-ns@file:../../packages/vitest-ns': - resolution: {directory: ../../packages/vitest-ns, type: directory} - engines: {node: '>=20'} - peerDependencies: - '@vitest/runner': ~4.1.10 - vitest: ~4.1.10 - '@csstools/color-helpers@5.1.0': resolution: {integrity: sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==} engines: {node: '>=18'} @@ -225,6 +277,15 @@ packages: resolution: {integrity: sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==} engines: {node: '>=14.17.0'} + '@emnapi/core@1.11.3': + resolution: {integrity: sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==} + + '@emnapi/runtime@1.11.3': + resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} + + '@emnapi/wasi-threads@1.2.3': + resolution: {integrity: sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==} + '@istanbuljs/load-nyc-config@1.1.0': resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -252,6 +313,12 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@napi-rs/wasm-runtime@1.1.6': + resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + '@nativescript/android@9.0.5': resolution: {integrity: sha512-X68BZJDZtnSU3NL13k3giUriCDvZPCS5rRcRBM77RyTKbK78bHsyP9Yl6REg4L35xORK2cX2HOl1NCec7lS2eA==} @@ -492,9 +559,130 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + '@rsbuild/core@2.1.11': + resolution: {integrity: sha512-jA/QwZu8wIljp70TjERVoX+vk2cWU+viHpV9EAdKpA6ifu/pFnThEhbV3RFxBvF/9mB3h7ZRUfdDIyknT+9MWA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + core-js: '>= 3.0.0' + peerDependenciesMeta: + core-js: + optional: true + + '@rspack/binding-darwin-arm64@2.1.9': + resolution: {integrity: sha512-sQQgKx+1ckW5GI6w/ozJkoaQM0Skbwj7hFiv+Y2d7+iAB7OVz83LWFrodRl1QGCg1QNuaEmlVo9AUapWUSr/8g==} + cpu: [arm64] + os: [darwin] + + '@rspack/binding-darwin-x64@2.1.9': + resolution: {integrity: sha512-kuWzn8JFKJUxSFwX/+rzvZUm4fRrSbXCTCAlzb0iHvP6vftjCFHGpNJfWjD7yX9O7C/dtoGiNT1O1veJytVsWA==} + cpu: [x64] + os: [darwin] + + '@rspack/binding-linux-arm64-gnu@2.1.9': + resolution: {integrity: sha512-rj1TjWGuG9Zc+fmwfvOpRO9npuHMKE4xXSB/BZqZNcH5Uey4NcAo1/GF8zHRoalQrwf0roP9WsFX1tk85rzP/Q==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-arm64-musl@2.1.9': + resolution: {integrity: sha512-Z2+sS2z9Imt3og0e3Kq4hEumiqTajQBXkl9cqSYj1lwOgmViLAvMX4BlCL1cinIEstixFKQ+xsta9SI6ivCKtg==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rspack/binding-linux-ppc64-gnu@2.1.9': + resolution: {integrity: sha512-xK90IHipRDgxvDF9n90HRNklci0G2Amk0ZMsM3t3YX+/8jIJNcuEPk6hJ1hlY6KZu7U9enqGbNQ7Fe0StBeLVA==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-riscv64-gnu@2.1.9': + resolution: {integrity: sha512-aaOwU3voq20Vwmfu1V6UPz8eQJBitBUNbLc08dxHGsmQM+ap6dd4j5xn/i5Y6AfLro2Q3GJvpCayc+dVIOR32g==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-riscv64-musl@2.1.9': + resolution: {integrity: sha512-tF7XnEtpTYyVS8ef96IKUjFhd9lFa9Swv212fcyWxRhxRn4PEYVWpSh/D3NDVX+i69Z7xFDDEoyMUdYBkkVTlw==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rspack/binding-linux-s390x-gnu@2.1.9': + resolution: {integrity: sha512-rGmeME3Pd8k/55txP+19ceZJxhVN2mtC8TLzB1ycTrhy8U+ZnN7J8rZSl89LYrZGYewd1UmOcY0QKKy05FS3FA==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-x64-gnu@2.1.9': + resolution: {integrity: sha512-YimUCS//wl+AZjXvgVig7sJtPiGs+WNMH4g49F1msB5T40rw0aOopp9O3MdC+LFfRm6vpIJwOHd6alo/UUs7nA==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-x64-musl@2.1.9': + resolution: {integrity: sha512-tYJRdoB3IWVVcnGPZqCnRjC5MJle7xHucKkIuKtGbSMS6hzg6B1oKZav1BBw72gxnrW4n2Bwt82TBKQKBUSjmA==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rspack/binding-wasm32-wasi@2.1.9': + resolution: {integrity: sha512-TF6oZRU23x6vHzGuvRFszvEnmC5Yn8PHbKmeZWsUHj4Mtv4tDdDGVdlxj6Kq3pySS6sRknv8gzpRMhXqHD3I5g==} + cpu: [wasm32] + + '@rspack/binding-win32-arm64-msvc@2.1.9': + resolution: {integrity: sha512-tLt4gbvUelmtJGI3PHtQHZuGpaO2z/ym6+OXAjc6NR2jWbzljardSjONiXVWIi1zmzODt4dD/fL3Ncb+RU/jHQ==} + cpu: [arm64] + os: [win32] + + '@rspack/binding-win32-ia32-msvc@2.1.9': + resolution: {integrity: sha512-VznxSrGPb4mvxkTHTdGolEpBOuDW7RICD9Rp266MhYLQG4c0uNcX7+vWF4HbFvB0kN+Gdkj7vz+5shWdrfK72Q==} + cpu: [ia32] + os: [win32] + + '@rspack/binding-win32-x64-msvc@2.1.9': + resolution: {integrity: sha512-P1dGC6t3PJinqN6tBZ+jyou4LvwpD2ygeovKgg5tuYWKFMUwh1v60yX3afOUwaJMEGbHUye7xuYRd84NCMSNOQ==} + cpu: [x64] + os: [win32] + + '@rspack/binding@2.1.9': + resolution: {integrity: sha512-0ZZj+RE62/jFRwX5czqjjGiMGgzSK0hm7/66PtCKjyZjb2tNAg3WGyWv+ref7684ZAjtbHHpZ+EOGswQYBjklA==} + + '@rspack/core@2.1.9': + resolution: {integrity: sha512-kXd5aYrkO+91fYolNYAjUhW/1F9kGmw7PtneNRY6z3KK6ttJgQWMVNypiCkhK3TOcyWPGH42qd0bzHZlH72JaA==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 + '@swc/helpers': ^0.5.23 + peerDependenciesMeta: + '@module-federation/runtime-tools': + optional: true + '@swc/helpers': + optional: true + + '@rstest/core@0.11.6': + resolution: {integrity: sha512-P3wgYGDF3JmhapwN3p4DnbNV9N6+E+dlbp0coT1lAuXN5Po6bHeP/rduGLsTUIX85qWxmJD7ekF7nlOKm9RoOA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + happy-dom: ^20.8.3 + jsdom: '>=15.0.0' + peerDependenciesMeta: + happy-dom: + optional: true + jsdom: + optional: true + '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + '@swc/helpers@0.5.23': + resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} + + '@tybys/wasm-util@0.10.3': + resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} @@ -510,6 +698,9 @@ packages: '@types/node@26.1.2': resolution: {integrity: sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==} + '@types/ws@8.18.1': + resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} + '@valor/nativescript-websockets@2.0.3': resolution: {integrity: sha512-gNmdgvRttQjOxnIMqdu4xmAU19IQkqMYbYUX/OGlicGkF67Yej4ShvRFPgVCzDa2zXCctlJVVqkgsj9ZHLl+zg==} @@ -769,9 +960,6 @@ packages: big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} - birpc@2.9.0: - resolution: {integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==} - brace-expansion@1.1.18: resolution: {integrity: sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==} @@ -1091,9 +1279,6 @@ packages: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - flatted@3.4.4: - resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} - fork-ts-checker-webpack-plugin@9.1.0: resolution: {integrity: sha512-mpafl89VFPJmhnJ1ssH+8wmM2b50n+Rew5x42NeI2U78aRWgtkEtGmctp7iT16UjquJTjorEmIfESj3DxdW84Q==} engines: {node: '>=14.21.3'} @@ -1712,6 +1897,14 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + rspack-chain@2.2.0: + resolution: {integrity: sha512-5h/5duc5uZwygmuX0X41ROovPy358t2L0mvV55e9os6GEw1LnvbhzzHaps2VXu60oEByllVp0+0mKHcFD51fNQ==} + peerDependencies: + '@rspack/core': ^2.0.0 + peerDependenciesMeta: + '@rspack/core': + optional: true + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -2155,6 +2348,11 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yaml@2.9.0: + resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} + engines: {node: '>= 14.6'} + hasBin: true + yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -2275,63 +2473,6 @@ snapshots: '@babel/helper-string-parser': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 - '@cross-code/ns-endive@file:../../packages/ns-endive': - dependencies: - '@cross-code/ns-wasm-core': file:../../packages/ns-wasm-core - tslib: 2.8.1 - - '@cross-code/ns-wamr@file:../../packages/ns-wamr': - dependencies: - '@cross-code/ns-wasm-core': file:../../packages/ns-wasm-core - - '@cross-code/ns-wasm-chicory@file:../../packages/ns-wasm-chicory': - dependencies: - '@cross-code/ns-wasm-core': file:../../packages/ns-wasm-core - tslib: 2.8.1 - - '@cross-code/ns-wasm-core@file:../../packages/ns-wasm-core': {} - - '@cross-code/ns-wasm-edge@file:../../packages/ns-wasm-edge': - dependencies: - '@cross-code/ns-wasm-core': file:../../packages/ns-wasm-core - tslib: 2.8.1 - - '@cross-code/ns-wasm-fixture@file:../../packages/ns-wasm-fixture': {} - - '@cross-code/ns-wasm-kit-runtime@file:../../packages/ns-wasm-kit-runtime': - dependencies: - '@cross-code/ns-wasm-core': file:../../packages/ns-wasm-core - tslib: 2.8.1 - - '@cross-code/ns-wasm3@file:../../packages/ns-wasm3': - dependencies: - '@cross-code/ns-wasm-core': file:../../packages/ns-wasm-core - tslib: 2.8.1 - - '@cross-code/vitest-ns-ui@file:../../packages/vitest-ns-ui(@cross-code/vitest-ns@file:../../packages/vitest-ns(@babel/core@7.29.7(supports-color@8.1.1))(@vitest/runner@4.1.10)(supports-color@8.1.1)(vitest@4.1.10)(webpack@5.109.2))(@nativescript/core@9.0.20)': - dependencies: - '@cross-code/vitest-ns': file:../../packages/vitest-ns(@babel/core@7.29.7(supports-color@8.1.1))(@vitest/runner@4.1.10)(supports-color@8.1.1)(vitest@4.1.10)(webpack@5.109.2) - '@nativescript/core': 9.0.20 - tslib: 2.8.1 - - '@cross-code/vitest-ns@file:../../packages/vitest-ns(@babel/core@7.29.7(supports-color@8.1.1))(@vitest/runner@4.1.10)(supports-color@8.1.1)(vitest@4.1.10)(webpack@5.109.2)': - dependencies: - '@vitest/expect': 4.1.10 - '@vitest/runner': 4.1.10 - babel-loader: 9.2.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.109.2) - babel-plugin-istanbul: 7.0.1(supports-color@8.1.1) - birpc: 2.9.0 - flatted: 3.4.4 - tslib: 2.8.1 - vitest: 4.1.10(@types/node@26.1.2)(@vitest/coverage-istanbul@4.1.10)(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)) - ws: 8.21.2 - transitivePeerDependencies: - - '@babel/core' - - bufferutil - - supports-color - - utf-8-validate - - webpack - '@csstools/color-helpers@5.1.0': {} '@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': @@ -2356,6 +2497,22 @@ snapshots: '@discoveryjs/json-ext@0.6.3': {} + '@emnapi/core@1.11.3': + dependencies: + '@emnapi/wasi-threads': 1.2.3 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.3': + dependencies: + tslib: 2.8.1 + optional: true + '@istanbuljs/load-nyc-config@1.1.0': dependencies: camelcase: 5.3.1 @@ -2390,6 +2547,13 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': + dependencies: + '@emnapi/core': 1.11.3 + '@emnapi/runtime': 1.11.3 + '@tybys/wasm-util': 0.10.3 + optional: true + '@nativescript/android@9.0.5': {} '@nativescript/core@9.0.20': @@ -2422,7 +2586,7 @@ snapshots: '@nativescript/types-android': 9.0.0 '@nativescript/types-ios': 9.0.0 - '@nativescript/webpack@5.0.38(lightningcss@1.33.0)(supports-color@8.1.1)(typescript@6.0.3)': + '@nativescript/webpack@5.0.38(@rspack/core@2.1.9(@swc/helpers@0.5.23))(lightningcss@1.33.0)(supports-color@8.1.1)(typescript@6.0.3)': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) '@pmmmwh/react-refresh-webpack-plugin': 0.6.2(react-refresh@0.18.0)(webpack@5.109.2) @@ -2430,22 +2594,22 @@ snapshots: acorn: 8.18.0 acorn-stage3: 4.0.0(acorn@8.18.0) ansi-colors: 4.1.3 - babel-loader: 10.1.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.109.2) + babel-loader: 10.1.1(@babel/core@7.29.7(supports-color@8.1.1))(@rspack/core@2.1.9(@swc/helpers@0.5.23))(webpack@5.109.2) cli-highlight: 2.1.11 commander: 14.0.3 copy-webpack-plugin: 13.0.1(webpack@5.109.2) css: 3.0.0 - css-loader: 7.1.4(webpack@5.109.2) + css-loader: 7.1.4(@rspack/core@2.1.9(@swc/helpers@0.5.23))(webpack@5.109.2) dotenv-webpack: 8.1.1(webpack@5.109.2) fork-ts-checker-webpack-plugin: 9.1.0(typescript@6.0.3)(webpack@5.109.2) loader-utils: 3.3.1 postcss: 8.5.25 postcss-import: 16.1.1(postcss@8.5.25) - postcss-loader: 8.2.1(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2) + postcss-loader: 8.2.1(@rspack/core@2.1.9(@swc/helpers@0.5.23))(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2) raw-loader: 4.0.2(webpack@5.109.2) react-refresh: 0.18.0 sass: 1.102.0 - sass-loader: 16.0.8(sass@1.102.0)(webpack@5.109.2) + sass-loader: 16.0.8(@rspack/core@2.1.9(@swc/helpers@0.5.23))(sass@1.102.0)(webpack@5.109.2) sax: 1.6.1 semver: 7.8.5 source-map: 0.7.6 @@ -2453,7 +2617,7 @@ snapshots: ts-dedent: 2.3.0 ts-loader: 9.6.2(loader-utils@3.3.1)(typescript@6.0.3)(webpack@5.109.2) vue-loader: 17.4.2(@vue/compiler-sfc@3.5.40)(webpack@5.109.2) - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-bundle-analyzer: 4.10.2 webpack-chain: 6.5.1 webpack-cli: 6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2) @@ -2554,7 +2718,7 @@ snapshots: react-refresh: 0.18.0 schema-utils: 4.3.3 source-map: 0.7.6 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) '@polka/url@1.0.0-next.29': {} @@ -2602,8 +2766,101 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} + '@rsbuild/core@2.1.11': + dependencies: + '@rspack/core': 2.1.9(@swc/helpers@0.5.23) + '@swc/helpers': 0.5.23 + transitivePeerDependencies: + - '@module-federation/runtime-tools' + + '@rspack/binding-darwin-arm64@2.1.9': + optional: true + + '@rspack/binding-darwin-x64@2.1.9': + optional: true + + '@rspack/binding-linux-arm64-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-arm64-musl@2.1.9': + optional: true + + '@rspack/binding-linux-ppc64-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-riscv64-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-riscv64-musl@2.1.9': + optional: true + + '@rspack/binding-linux-s390x-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-x64-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-x64-musl@2.1.9': + optional: true + + '@rspack/binding-wasm32-wasi@2.1.9': + dependencies: + '@emnapi/core': 1.11.3 + '@emnapi/runtime': 1.11.3 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) + optional: true + + '@rspack/binding-win32-arm64-msvc@2.1.9': + optional: true + + '@rspack/binding-win32-ia32-msvc@2.1.9': + optional: true + + '@rspack/binding-win32-x64-msvc@2.1.9': + optional: true + + '@rspack/binding@2.1.9': + optionalDependencies: + '@rspack/binding-darwin-arm64': 2.1.9 + '@rspack/binding-darwin-x64': 2.1.9 + '@rspack/binding-linux-arm64-gnu': 2.1.9 + '@rspack/binding-linux-arm64-musl': 2.1.9 + '@rspack/binding-linux-ppc64-gnu': 2.1.9 + '@rspack/binding-linux-riscv64-gnu': 2.1.9 + '@rspack/binding-linux-riscv64-musl': 2.1.9 + '@rspack/binding-linux-s390x-gnu': 2.1.9 + '@rspack/binding-linux-x64-gnu': 2.1.9 + '@rspack/binding-linux-x64-musl': 2.1.9 + '@rspack/binding-wasm32-wasi': 2.1.9 + '@rspack/binding-win32-arm64-msvc': 2.1.9 + '@rspack/binding-win32-ia32-msvc': 2.1.9 + '@rspack/binding-win32-x64-msvc': 2.1.9 + + '@rspack/core@2.1.9(@swc/helpers@0.5.23)': + dependencies: + '@rspack/binding': 2.1.9 + optionalDependencies: + '@swc/helpers': 0.5.23 + + '@rstest/core@0.11.6': + dependencies: + '@rsbuild/core': 2.1.11 + '@types/chai': 5.2.3 + transitivePeerDependencies: + - '@module-federation/runtime-tools' + - core-js + '@standard-schema/spec@1.1.0': {} + '@swc/helpers@0.5.23': + dependencies: + tslib: 2.8.1 + + '@tybys/wasm-util@0.10.3': + dependencies: + tslib: 2.8.1 + optional: true + '@types/chai@5.2.3': dependencies: '@types/deep-eql': 4.0.2 @@ -2619,6 +2876,10 @@ snapshots: dependencies: undici-types: 8.3.0 + '@types/ws@8.18.1': + dependencies: + '@types/node': 26.1.2 + '@valor/nativescript-websockets@2.0.3': {} '@vitest/coverage-istanbul@4.1.10(supports-color@8.1.1)(vitest@4.1.10)': @@ -2633,9 +2894,10 @@ snapshots: magicast: 0.5.4 obug: 2.1.4 tinyrainbow: 3.1.1 - vitest: 4.1.10(@types/node@26.1.2)(@vitest/coverage-istanbul@4.1.10)(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)) + vitest: 4.1.10(@types/node@26.1.2)(@vitest/coverage-istanbul@4.1.10)(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(yaml@2.9.0)) transitivePeerDependencies: - supports-color + optional: true '@vitest/expect@4.1.10': dependencies: @@ -2646,13 +2908,13 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.1.1 - '@vitest/mocker@4.1.10(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0))': + '@vitest/mocker@4.1.10(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(yaml@2.9.0))': dependencies: '@vitest/spy': 4.1.10 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0) + vite: 8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(yaml@2.9.0) '@vitest/pretty-format@4.1.10': dependencies: @@ -2786,19 +3048,19 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2)': + '@webpack-cli/configtest@3.0.1(webpack-cli@6.0.1)(webpack@5.109.2)': dependencies: - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-cli: 6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2) - '@webpack-cli/info@3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2)': + '@webpack-cli/info@3.0.1(webpack-cli@6.0.1)(webpack@5.109.2)': dependencies: - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-cli: 6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2) - '@webpack-cli/serve@3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2)': + '@webpack-cli/serve@3.0.1(webpack-cli@6.0.1)(webpack@5.109.2)': dependencies: - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-cli: 6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2) '@xtuc/ieee754@1.2.0': {} @@ -2886,19 +3148,20 @@ snapshots: atob@2.1.2: {} - babel-loader@10.1.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.109.2): + babel-loader@10.1.1(@babel/core@7.29.7(supports-color@8.1.1))(@rspack/core@2.1.9(@swc/helpers@0.5.23))(webpack@5.109.2): dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) find-up: 5.0.0 optionalDependencies: - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + '@rspack/core': 2.1.9(@swc/helpers@0.5.23) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) babel-loader@9.2.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.109.2): dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) find-cache-dir: 4.0.0 schema-utils: 4.3.3 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) babel-plugin-istanbul@7.0.1(supports-color@8.1.1): dependencies: @@ -2916,8 +3179,6 @@ snapshots: big.js@5.2.2: {} - birpc@2.9.0: {} - brace-expansion@1.1.18: dependencies: balanced-match: 1.0.2 @@ -3006,7 +3267,7 @@ snapshots: schema-utils: 4.3.3 serialize-javascript: 6.0.2 tinyglobby: 0.2.17 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) core-js-pure@3.49.0: {} @@ -3034,7 +3295,7 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - css-loader@7.1.4(webpack@5.109.2): + css-loader@7.1.4(@rspack/core@2.1.9(@swc/helpers@0.5.23))(webpack@5.109.2): dependencies: icss-utils: 5.1.0(postcss@8.5.25) postcss: 8.5.25 @@ -3045,7 +3306,8 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.8.5 optionalDependencies: - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + '@rspack/core': 2.1.9(@swc/helpers@0.5.23) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) css-tree@3.2.1: dependencies: @@ -3085,7 +3347,7 @@ snapshots: dotenv-webpack@8.1.1(webpack@5.109.2): dependencies: dotenv-defaults: 2.0.2 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) dotenv@8.6.0: {} @@ -3185,8 +3447,6 @@ snapshots: flat@5.0.2: {} - flatted@3.4.4: {} - fork-ts-checker-webpack-plugin@9.1.0(typescript@6.0.3)(webpack@5.109.2): dependencies: '@babel/code-frame': 7.29.7 @@ -3202,7 +3462,7 @@ snapshots: semver: 7.8.5 tapable: 2.3.3 typescript: 6.0.3 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) fs-extra@10.1.0: dependencies: @@ -3322,11 +3582,13 @@ snapshots: istanbul-lib-coverage: 3.2.2 make-dir: 4.0.0 supports-color: 7.2.0 + optional: true istanbul-reports@3.2.0: dependencies: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 + optional: true javascript-stringify@2.1.0: {} @@ -3451,10 +3713,12 @@ snapshots: '@babel/parser': 7.29.8 '@babel/types': 7.29.8 source-map-js: 1.2.1 + optional: true make-dir@4.0.0: dependencies: semver: 7.8.5 + optional: true mdn-data@2.27.1: {} @@ -3476,7 +3740,7 @@ snapshots: jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.49.0 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) optionalDependencies: lightningcss: 1.33.0 postcss: 8.5.25 @@ -3594,14 +3858,15 @@ snapshots: read-cache: 1.0.0 resolve: 1.22.12 - postcss-loader@8.2.1(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2): + postcss-loader@8.2.1(@rspack/core@2.1.9(@swc/helpers@0.5.23))(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2): dependencies: cosmiconfig: 9.0.2(typescript@6.0.3) jiti: 2.7.0 postcss: 8.5.25 semver: 7.8.5 optionalDependencies: - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + '@rspack/core': 2.1.9(@swc/helpers@0.5.23) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) transitivePeerDependencies: - typescript @@ -3649,7 +3914,7 @@ snapshots: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) react-refresh@0.18.0: {} @@ -3704,14 +3969,19 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.2.2 '@rolldown/binding-win32-x64-msvc': 1.2.2 + rspack-chain@2.2.0(@rspack/core@2.1.9(@swc/helpers@0.5.23)): + optionalDependencies: + '@rspack/core': 2.1.9(@swc/helpers@0.5.23) + safe-buffer@5.2.1: {} - sass-loader@16.0.8(sass@1.102.0)(webpack@5.109.2): + sass-loader@16.0.8(@rspack/core@2.1.9(@swc/helpers@0.5.23))(sass@1.102.0)(webpack@5.109.2): dependencies: neo-async: 2.6.2 optionalDependencies: + '@rspack/core': 2.1.9(@swc/helpers@0.5.23) sass: 1.102.0 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) sass@1.102.0: dependencies: @@ -3814,7 +4084,7 @@ snapshots: jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.49.0 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) optionalDependencies: lightningcss: 1.33.0 postcss: 8.5.25 @@ -3861,7 +4131,7 @@ snapshots: picomatch: 4.0.5 source-map: 0.7.6 typescript: 6.0.3 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) optionalDependencies: loader-utils: 3.3.1 @@ -3885,7 +4155,7 @@ snapshots: util-deprecate@1.0.2: {} - vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0): + vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(yaml@2.9.0): dependencies: lightningcss: 1.33.0 picomatch: 4.0.5 @@ -3898,11 +4168,12 @@ snapshots: jiti: 2.7.0 sass: 1.102.0 terser: 5.49.0 + yaml: 2.9.0 - vitest@4.1.10(@types/node@26.1.2)(@vitest/coverage-istanbul@4.1.10)(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)): + vitest@4.1.10(@types/node@26.1.2)(@vitest/coverage-istanbul@4.1.10)(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(yaml@2.9.0)): dependencies: '@vitest/expect': 4.1.10 - '@vitest/mocker': 4.1.10(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)) + '@vitest/mocker': 4.1.10(vite@8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(yaml@2.9.0)) '@vitest/pretty-format': 4.1.10 '@vitest/runner': 4.1.10 '@vitest/snapshot': 4.1.10 @@ -3919,7 +4190,7 @@ snapshots: tinyexec: 1.3.0 tinyglobby: 0.2.17 tinyrainbow: 3.1.1 - vite: 8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0) + vite: 8.2.0(@types/node@26.1.2)(jiti@2.7.0)(sass@1.102.0)(terser@5.49.0)(yaml@2.9.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 26.1.2 @@ -3932,7 +4203,7 @@ snapshots: chalk: 4.1.2 hash-sum: 2.0.0 watchpack: 2.5.2 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) optionalDependencies: '@vue/compiler-sfc': 3.5.40 @@ -3966,9 +4237,9 @@ snapshots: webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2): dependencies: '@discoveryjs/json-ext': 0.6.3 - '@webpack-cli/configtest': 3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2) - '@webpack-cli/info': 3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2) - '@webpack-cli/serve': 3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2) + '@webpack-cli/configtest': 3.0.1(webpack-cli@6.0.1)(webpack@5.109.2) + '@webpack-cli/info': 3.0.1(webpack-cli@6.0.1)(webpack@5.109.2) + '@webpack-cli/serve': 3.0.1(webpack-cli@6.0.1)(webpack@5.109.2) colorette: 2.0.20 commander: 12.1.0 cross-spawn: 7.0.6 @@ -3977,7 +4248,7 @@ snapshots: import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-merge: 6.0.1 optionalDependencies: webpack-bundle-analyzer: 4.10.2 @@ -3992,7 +4263,7 @@ snapshots: webpack-virtual-modules@0.4.6: {} - webpack@5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)): + webpack@5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1): dependencies: '@types/estree': 1.0.9 '@types/json-schema': 7.0.15 @@ -4057,6 +4328,9 @@ snapshots: yallist@3.1.1: {} + yaml@2.9.0: + optional: true + yargs-parser@20.2.9: {} yargs@16.2.2: diff --git a/apps/ns-wasm-test/pnpm-workspace.yaml b/apps/ns-wasm-test/pnpm-workspace.yaml index 2acb0ff..a16b696 100644 --- a/apps/ns-wasm-test/pnpm-workspace.yaml +++ b/apps/ns-wasm-test/pnpm-workspace.yaml @@ -2,13 +2,21 @@ # (packages/*): the ns CLI needs its own node_modules. Declaring the app # directory as its own pnpm workspace root gives it a separate install and # its own pnpm-lock.yaml. -packages: [] - -# The app consumes local plugins through `file:`. Their source manifests use -# `workspace:*` for the shared core, which is otherwise resolved against this -# intentionally isolated workspace. Pin that transitive dependency locally. -overrides: - '@cross-code/ns-wasm-core': file:../../packages/ns-wasm-core +# +# The local plugins are consumed through the `workspace:` protocol, so the +# sibling packages are exposed to this workspace. The app itself stays a +# standalone install — only packages/* is reachable, never the root workspace. +packages: + - ../../packages/ns-rspack + - ../../packages/ns-wasm-core + - ../../packages/ns-wasm3 + - ../../packages/ns-wamr + - ../../packages/ns-wasm-kit-runtime + - ../../packages/ns-endive + - ../../packages/ns-wasm-chicory + - ../../packages/ns-wasm-edge + - ../../packages/ns-wasm-fixture + - ../../packages/ns-rstest # pnpm 11 blocks dependency build scripts by default (ERR_PNPM_IGNORED_BUILDS). # These packages ship native binaries or CLI glue used by the app build. diff --git a/apps/ns-wasm-test/project.json b/apps/ns-wasm-test/project.json index c2ec671..cf0411d 100644 --- a/apps/ns-wasm-test/project.json +++ b/apps/ns-wasm-test/project.json @@ -18,8 +18,8 @@ "{projectRoot}/references.d.ts", "{projectRoot}/tsconfig.json", "{projectRoot}/tsconfig.spec.json", - "{projectRoot}/vitest.*.config.mts", - "{projectRoot}/webpack.config.js", + "{projectRoot}/ns-rstest.*.mts", + "{projectRoot}/rspack.config.ts", "^production" ] }, diff --git a/apps/ns-wasm-test/webpack.config.js b/apps/ns-wasm-test/rspack.config.ts similarity index 54% rename from apps/ns-wasm-test/webpack.config.js rename to apps/ns-wasm-test/rspack.config.ts index f46a77e..5156d32 100644 --- a/apps/ns-wasm-test/webpack.config.js +++ b/apps/ns-wasm-test/rspack.config.ts @@ -1,6 +1,10 @@ -const { dirname } = require('node:path'); -const webpack = require('@nativescript/webpack'); -const configureNativeScriptVitestWebpack = require('@cross-code/vitest-ns/webpack'); +import { dirname } from 'node:path'; +import rspack from '@nativescript/rspack'; +import type { INativeScriptRspackEnv } from '@nativescript/rspack'; +import { createRequire } from 'node:module'; + +const require = createRequire(import.meta.url); +const configureNativeScriptRstest = require('@cross-code/ns-rstest/bundler'); // The fixture .wasm binaries are build outputs of @cross-code/ns-wasm-fixture // (wasm-pack + the gen_globals binary). Copy them into the bundle so wasm3 and @@ -11,26 +15,23 @@ const fixturePkgDir = dirname( require.resolve('@cross-code/ns-wasm-fixture/types.wasm'), ); -module.exports = (env) => { - webpack.init(env); - - // Learn how to customize: - // https://docs.nativescript.org/webpack +export default (env: INativeScriptRspackEnv) => { + rspack.init(env); - webpack.Utils.addCopyRule({ + rspack.Utils.addCopyRule({ from: 'test_types_bg.wasm', to: 'wasm/test_types.wasm', context: fixturePkgDir, }); - webpack.Utils.addCopyRule({ + rspack.Utils.addCopyRule({ from: 'globals.wasm', to: 'wasm/globals.wasm', context: fixturePkgDir, }); - configureNativeScriptVitestWebpack(webpack, { - entry: 'vitest-ns.ts', + configureNativeScriptRstest(rspack, { + entry: 'ns-rstest.ts', }); - return webpack.resolveConfig(); + return rspack.resolveConfig(); }; diff --git a/apps/ns-wasm-test/tsconfig.json b/apps/ns-wasm-test/tsconfig.json index 8aa0ed8..280d28e 100644 --- a/apps/ns-wasm-test/tsconfig.json +++ b/apps/ns-wasm-test/tsconfig.json @@ -18,24 +18,24 @@ }, "include": ["app/**/*"], "files": ["./references.d.ts"], - // Vitest specs and the test-only app/Worker entries are owned by - // tsconfig.spec.json and are only bundled for env.vitestNativeScript. + // Rstest specs and the test-only app/Worker entries are owned by + // tsconfig.spec.json and are only bundled for env.rstestNativeScript. "exclude": [ "node_modules", "platforms", - "app/vitest-ns.ts", - "app/vitest-ns.worker.ts", + "app/ns-rstest.ts", + "app/ns-rstest.worker.ts", "app/**/*.spec.ts" ], "references": [ { - "path": "../../packages/ns-wasm-fixture" + "path": "../../packages/ns-rspack" }, { - "path": "../../packages/vitest-ns-ui" + "path": "../../packages/ns-wasm-fixture" }, { - "path": "../../packages/vitest-ns" + "path": "../../packages/ns-rstest" }, { "path": "../../packages/ns-wasm-chicory" diff --git a/apps/ns-wasm-test/tsconfig.spec.json b/apps/ns-wasm-test/tsconfig.spec.json index 42c6d65..d532c81 100644 --- a/apps/ns-wasm-test/tsconfig.spec.json +++ b/apps/ns-wasm-test/tsconfig.spec.json @@ -1,13 +1,12 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "sourceMap": true, - "types": ["vitest"] + "sourceMap": true }, "files": [ "./references.d.ts", - "app/vitest-ns.ts", - "app/vitest-ns.worker.ts" + "app/ns-rstest.ts", + "app/ns-rstest.worker.ts" ], "include": ["app/**/*.spec.ts", "app/**/*.d.ts"], "exclude": ["node_modules", "platforms"] diff --git a/apps/ns-wasm-test/vitest.android.config.mts b/apps/ns-wasm-test/vitest.android.config.mts deleted file mode 100644 index 93f8e1e..0000000 --- a/apps/ns-wasm-test/vitest.android.config.mts +++ /dev/null @@ -1,46 +0,0 @@ -import { nativeScriptUnitPlugin } from '@cross-code/vitest-ns'; -import { defineConfig } from 'vitest/config'; - -const port = 17_878; - -export default defineConfig({ - plugins: [ - nativeScriptUnitPlugin({ - platform: 'android', - appPath: '.', - workers: 1, - port, - // A cold CI runner downloads Gradle, builds the app and boots the - // emulator before the device worker can connect; that routinely - // exceeds the 2m default. - connectTimeout: 10 * 60_000, - include: ['app/tests/**/*.spec.ts'], - launchCommand: { - command: 'npx', - args: [ - 'ns', - 'run', - 'android', - '--emulator', - '--no-hmr', - '--env.vitestNativeScript', - `--env.vitestNativeScriptPort=${port}`, - ], - }, - }), - ], - test: { - include: ['app/tests/**/*.spec.ts'], - coverage: { - provider: 'istanbul', - reportsDirectory: './test-output/vitest/coverage/android', - reporter: ['text', 'json-summary', 'lcov', 'html'], - include: ['app/**/*.ts'], - exclude: [ - 'app/tests/**', - 'app/vitest-ns.ts', - 'app/vitest-ns.worker.ts', - ], - }, - }, -}); diff --git a/apps/ns-wasm-test/vitest.ios.config.mts b/apps/ns-wasm-test/vitest.ios.config.mts deleted file mode 100644 index 1fbbe93..0000000 --- a/apps/ns-wasm-test/vitest.ios.config.mts +++ /dev/null @@ -1,45 +0,0 @@ -import { nativeScriptUnitPlugin } from '@cross-code/vitest-ns'; -import { defineConfig } from 'vitest/config'; - -const port = 17_878; - -export default defineConfig({ - plugins: [ - nativeScriptUnitPlugin({ - platform: 'ios', - appPath: '.', - workers: 1, - port, - // A cold CI runner resolves SwiftPM packages and builds the app before - // the device worker can connect; that routinely exceeds the 2m default. - connectTimeout: 10 * 60_000, - include: ['app/tests/**/*.spec.ts'], - launchCommand: { - command: 'npx', - args: [ - 'ns', - 'run', - 'ios', - '--emulator', - '--no-hmr', - '--env.vitestNativeScript', - `--env.vitestNativeScriptPort=${port}`, - ], - }, - }), - ], - test: { - include: ['app/tests/**/*.spec.ts'], - coverage: { - provider: 'istanbul', - reportsDirectory: './test-output/vitest/coverage/ios', - reporter: ['text', 'json-summary', 'lcov', 'html'], - include: ['app/**/*.ts'], - exclude: [ - 'app/tests/**', - 'app/vitest-ns.ts', - 'app/vitest-ns.worker.ts', - ], - }, - }, -}); diff --git a/apps/ns-wry-app/nativescript.config.ts b/apps/ns-wry-app/nativescript.config.ts index 59d5191..d206763 100644 --- a/apps/ns-wry-app/nativescript.config.ts +++ b/apps/ns-wry-app/nativescript.config.ts @@ -1,9 +1,16 @@ import { NativeScriptConfig } from '@nativescript/core'; +// The {N} CLI resolves `bundler: 'rspack'` to /node_modules/@nativescript/rspack +// (aliased to @cross-code/ns-rspack) and runs its dist/bin/index.js. +// @nativescript/core 9.0's BundlerType is still 'webpack' | 'vite', hence the widening. export default { id: 'org.nativescript.nswryapp', appPath: 'app', appResourcesPath: 'App_Resources', + bundler: 'rspack', + bundlerConfigPath: 'rspack.config.ts', + // Without this the CLI spawns the bundler with --preserve-symlinks, which + // cannot resolve through pnpm's store (see packages/ns-rspack/README.md). cli: { packageManager: 'pnpm' }, @@ -11,4 +18,4 @@ export default { v8Flags: '--expose_gc', markingMode: 'none' } -} as NativeScriptConfig; +} as Omit & { bundler: string }; diff --git a/apps/ns-wry-app/package.json b/apps/ns-wry-app/package.json index 95a3621..c835462 100644 --- a/apps/ns-wry-app/package.json +++ b/apps/ns-wry-app/package.json @@ -18,17 +18,17 @@ "build.plugin": "cd ../../ && pnpm exec nx run ns-wry:build" }, "dependencies": { - "@cross-code/ns-wry": "file:../../packages/ns-wry", + "@cross-code/ns-wry": "workspace:@cross-code/ns-wry@*", "@nativescript/core": "~9.0.0", "@nativescript/theme": "^3.1.0" }, "devDependencies": { "@nativescript/android": "9.0.5", "@nativescript/ios": "9.0.3", + "@nativescript/rspack": "workspace:@cross-code/ns-rspack@*", "@nativescript/types": "~9.0.0", - "@nativescript/webpack": "~5.0.25", - "postcss-loader": "8.2.1", - "ts-loader": "9.6.2", + "@nativescript/types-android": "9.0.0", + "@nativescript/types-ios": "9.0.0", "typescript": "~6.0.0" } } \ No newline at end of file diff --git a/apps/ns-wry-app/pnpm-lock.yaml b/apps/ns-wry-app/pnpm-lock.yaml index 6260e7c..cb47450 100644 --- a/apps/ns-wry-app/pnpm-lock.yaml +++ b/apps/ns-wry-app/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@cross-code/ns-wry': - specifier: file:../../packages/ns-wry - version: file:../../packages/ns-wry + specifier: workspace:@cross-code/ns-wry@* + version: link:../../packages/ns-wry '@nativescript/core': specifier: ~9.0.0 version: 9.0.20 @@ -24,22 +24,46 @@ importers: '@nativescript/ios': specifier: 9.0.3 version: 9.0.3 + '@nativescript/rspack': + specifier: workspace:@cross-code/ns-rspack@* + version: link:../../packages/ns-rspack '@nativescript/types': specifier: ~9.0.0 version: 9.0.0 - '@nativescript/webpack': - specifier: ~5.0.25 - version: 5.0.38(supports-color@8.1.1)(typescript@6.0.3) - postcss-loader: - specifier: 8.2.1 - version: 8.2.1(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2) - ts-loader: - specifier: 9.6.2 - version: 9.6.2(loader-utils@3.3.1)(typescript@6.0.3)(webpack@5.109.2) + '@nativescript/types-android': + specifier: 9.0.0 + version: 9.0.0 + '@nativescript/types-ios': + specifier: 9.0.0 + version: 9.0.0 typescript: specifier: ~6.0.0 version: 6.0.3 + ../../packages/ns-rspack: + dependencies: + '@nativescript/webpack': + specifier: ~5.0.38 + version: 5.0.38(@rspack/core@2.1.9)(lightningcss@1.33.0)(supports-color@8.1.1)(typescript@6.0.3) + '@rspack/core': + specifier: ^2.1.9 + version: 2.1.9 + jiti: + specifier: ^2.4.2 + version: 2.7.0 + rspack-chain: + specifier: ^2.2.0 + version: 2.2.0(@rspack/core@2.1.9) + tslib: + specifier: ^2.3.0 + version: 2.8.1 + + ../../packages/ns-wry: + dependencies: + tslib: + specifier: ^2.3.0 + version: 2.8.1 + packages: '@babel/code-frame@7.29.7': @@ -109,9 +133,6 @@ packages: resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} engines: {node: '>=6.9.0'} - '@cross-code/ns-wry@file:../../packages/ns-wry': - resolution: {directory: ../../packages/ns-wry, type: directory} - '@csstools/color-helpers@5.1.0': resolution: {integrity: sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==} engines: {node: '>=18'} @@ -148,6 +169,15 @@ packages: resolution: {integrity: sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==} engines: {node: '>=14.17.0'} + '@emnapi/core@1.11.3': + resolution: {integrity: sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==} + + '@emnapi/runtime@1.11.3': + resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} + + '@emnapi/wasi-threads@1.2.3': + resolution: {integrity: sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==} + '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -167,6 +197,12 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@napi-rs/wasm-runtime@1.1.6': + resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + '@nativescript/android@9.0.5': resolution: {integrity: sha512-X68BZJDZtnSU3NL13k3giUriCDvZPCS5rRcRBM77RyTKbK78bHsyP9Yl6REg4L35xORK2cX2HOl1NCec7lS2eA==} @@ -311,6 +347,101 @@ packages: '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} + '@rspack/binding-darwin-arm64@2.1.9': + resolution: {integrity: sha512-sQQgKx+1ckW5GI6w/ozJkoaQM0Skbwj7hFiv+Y2d7+iAB7OVz83LWFrodRl1QGCg1QNuaEmlVo9AUapWUSr/8g==} + cpu: [arm64] + os: [darwin] + + '@rspack/binding-darwin-x64@2.1.9': + resolution: {integrity: sha512-kuWzn8JFKJUxSFwX/+rzvZUm4fRrSbXCTCAlzb0iHvP6vftjCFHGpNJfWjD7yX9O7C/dtoGiNT1O1veJytVsWA==} + cpu: [x64] + os: [darwin] + + '@rspack/binding-linux-arm64-gnu@2.1.9': + resolution: {integrity: sha512-rj1TjWGuG9Zc+fmwfvOpRO9npuHMKE4xXSB/BZqZNcH5Uey4NcAo1/GF8zHRoalQrwf0roP9WsFX1tk85rzP/Q==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-arm64-musl@2.1.9': + resolution: {integrity: sha512-Z2+sS2z9Imt3og0e3Kq4hEumiqTajQBXkl9cqSYj1lwOgmViLAvMX4BlCL1cinIEstixFKQ+xsta9SI6ivCKtg==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rspack/binding-linux-ppc64-gnu@2.1.9': + resolution: {integrity: sha512-xK90IHipRDgxvDF9n90HRNklci0G2Amk0ZMsM3t3YX+/8jIJNcuEPk6hJ1hlY6KZu7U9enqGbNQ7Fe0StBeLVA==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-riscv64-gnu@2.1.9': + resolution: {integrity: sha512-aaOwU3voq20Vwmfu1V6UPz8eQJBitBUNbLc08dxHGsmQM+ap6dd4j5xn/i5Y6AfLro2Q3GJvpCayc+dVIOR32g==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-riscv64-musl@2.1.9': + resolution: {integrity: sha512-tF7XnEtpTYyVS8ef96IKUjFhd9lFa9Swv212fcyWxRhxRn4PEYVWpSh/D3NDVX+i69Z7xFDDEoyMUdYBkkVTlw==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rspack/binding-linux-s390x-gnu@2.1.9': + resolution: {integrity: sha512-rGmeME3Pd8k/55txP+19ceZJxhVN2mtC8TLzB1ycTrhy8U+ZnN7J8rZSl89LYrZGYewd1UmOcY0QKKy05FS3FA==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-x64-gnu@2.1.9': + resolution: {integrity: sha512-YimUCS//wl+AZjXvgVig7sJtPiGs+WNMH4g49F1msB5T40rw0aOopp9O3MdC+LFfRm6vpIJwOHd6alo/UUs7nA==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-x64-musl@2.1.9': + resolution: {integrity: sha512-tYJRdoB3IWVVcnGPZqCnRjC5MJle7xHucKkIuKtGbSMS6hzg6B1oKZav1BBw72gxnrW4n2Bwt82TBKQKBUSjmA==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rspack/binding-wasm32-wasi@2.1.9': + resolution: {integrity: sha512-TF6oZRU23x6vHzGuvRFszvEnmC5Yn8PHbKmeZWsUHj4Mtv4tDdDGVdlxj6Kq3pySS6sRknv8gzpRMhXqHD3I5g==} + cpu: [wasm32] + + '@rspack/binding-win32-arm64-msvc@2.1.9': + resolution: {integrity: sha512-tLt4gbvUelmtJGI3PHtQHZuGpaO2z/ym6+OXAjc6NR2jWbzljardSjONiXVWIi1zmzODt4dD/fL3Ncb+RU/jHQ==} + cpu: [arm64] + os: [win32] + + '@rspack/binding-win32-ia32-msvc@2.1.9': + resolution: {integrity: sha512-VznxSrGPb4mvxkTHTdGolEpBOuDW7RICD9Rp266MhYLQG4c0uNcX7+vWF4HbFvB0kN+Gdkj7vz+5shWdrfK72Q==} + cpu: [ia32] + os: [win32] + + '@rspack/binding-win32-x64-msvc@2.1.9': + resolution: {integrity: sha512-P1dGC6t3PJinqN6tBZ+jyou4LvwpD2ygeovKgg5tuYWKFMUwh1v60yX3afOUwaJMEGbHUye7xuYRd84NCMSNOQ==} + cpu: [x64] + os: [win32] + + '@rspack/binding@2.1.9': + resolution: {integrity: sha512-0ZZj+RE62/jFRwX5czqjjGiMGgzSK0hm7/66PtCKjyZjb2tNAg3WGyWv+ref7684ZAjtbHHpZ+EOGswQYBjklA==} + + '@rspack/core@2.1.9': + resolution: {integrity: sha512-kXd5aYrkO+91fYolNYAjUhW/1F9kGmw7PtneNRY6z3KK6ttJgQWMVNypiCkhK3TOcyWPGH42qd0bzHZlH72JaA==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 + '@swc/helpers': ^0.5.23 + peerDependenciesMeta: + '@module-federation/runtime-tools': + optional: true + '@swc/helpers': + optional: true + + '@tybys/wasm-util@0.10.3': + resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} @@ -967,6 +1098,80 @@ packages: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -1270,6 +1475,14 @@ packages: engines: {node: '>= 0.4'} hasBin: true + rspack-chain@2.2.0: + resolution: {integrity: sha512-5h/5duc5uZwygmuX0X41ROovPy358t2L0mvV55e9os6GEw1LnvbhzzHaps2VXu60oEByllVp0+0mKHcFD51fNQ==} + peerDependencies: + '@rspack/core': ^2.0.0 + peerDependenciesMeta: + '@rspack/core': + optional: true + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -1696,10 +1909,6 @@ snapshots: '@babel/helper-string-parser': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 - '@cross-code/ns-wry@file:../../packages/ns-wry': - dependencies: - tslib: 2.8.1 - '@csstools/color-helpers@5.1.0': {} '@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': @@ -1724,6 +1933,22 @@ snapshots: '@discoveryjs/json-ext@0.6.3': {} + '@emnapi/core@1.11.3': + dependencies: + '@emnapi/wasi-threads': 1.2.3 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.3': + dependencies: + tslib: 2.8.1 + optional: true + '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -1748,6 +1973,13 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': + dependencies: + '@emnapi/core': 1.11.3 + '@emnapi/runtime': 1.11.3 + '@tybys/wasm-util': 0.10.3 + optional: true + '@nativescript/android@9.0.5': {} '@nativescript/core@9.0.20': @@ -1780,7 +2012,7 @@ snapshots: '@nativescript/types-android': 9.0.0 '@nativescript/types-ios': 9.0.0 - '@nativescript/webpack@5.0.38(supports-color@8.1.1)(typescript@6.0.3)': + '@nativescript/webpack@5.0.38(@rspack/core@2.1.9)(lightningcss@1.33.0)(supports-color@8.1.1)(typescript@6.0.3)': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) '@pmmmwh/react-refresh-webpack-plugin': 0.6.2(react-refresh@0.18.0)(webpack@5.109.2) @@ -1788,30 +2020,30 @@ snapshots: acorn: 8.18.0 acorn-stage3: 4.0.0(acorn@8.18.0) ansi-colors: 4.1.3 - babel-loader: 10.1.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.109.2) + babel-loader: 10.1.1(@babel/core@7.29.7(supports-color@8.1.1))(@rspack/core@2.1.9)(webpack@5.109.2) cli-highlight: 2.1.11 commander: 14.0.3 copy-webpack-plugin: 13.0.1(webpack@5.109.2) css: 3.0.0 - css-loader: 7.1.4(webpack@5.109.2) + css-loader: 7.1.4(@rspack/core@2.1.9)(webpack@5.109.2) dotenv-webpack: 8.1.1(webpack@5.109.2) fork-ts-checker-webpack-plugin: 9.1.0(typescript@6.0.3)(webpack@5.109.2) loader-utils: 3.3.1 postcss: 8.5.25 postcss-import: 16.1.1(postcss@8.5.25) - postcss-loader: 8.2.1(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2) + postcss-loader: 8.2.1(@rspack/core@2.1.9)(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2) raw-loader: 4.0.2(webpack@5.109.2) react-refresh: 0.18.0 sass: 1.102.0 - sass-loader: 16.0.8(sass@1.102.0)(webpack@5.109.2) + sass-loader: 16.0.8(@rspack/core@2.1.9)(sass@1.102.0)(webpack@5.109.2) sax: 1.6.1 semver: 7.8.5 source-map: 0.7.6 - terser-webpack-plugin: 5.6.1(postcss@8.5.25)(webpack@5.109.2) + terser-webpack-plugin: 5.6.1(lightningcss@1.33.0)(postcss@8.5.25)(webpack@5.109.2) ts-dedent: 2.3.0 ts-loader: 9.6.2(loader-utils@3.3.1)(typescript@6.0.3)(webpack@5.109.2) vue-loader: 17.4.2(@vue/compiler-sfc@3.5.40)(webpack@5.109.2) - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-bundle-analyzer: 4.10.2 webpack-chain: 6.5.1 webpack-cli: 6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2) @@ -1910,10 +2142,82 @@ snapshots: react-refresh: 0.18.0 schema-utils: 4.3.3 source-map: 0.7.6 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) '@polka/url@1.0.0-next.29': {} + '@rspack/binding-darwin-arm64@2.1.9': + optional: true + + '@rspack/binding-darwin-x64@2.1.9': + optional: true + + '@rspack/binding-linux-arm64-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-arm64-musl@2.1.9': + optional: true + + '@rspack/binding-linux-ppc64-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-riscv64-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-riscv64-musl@2.1.9': + optional: true + + '@rspack/binding-linux-s390x-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-x64-gnu@2.1.9': + optional: true + + '@rspack/binding-linux-x64-musl@2.1.9': + optional: true + + '@rspack/binding-wasm32-wasi@2.1.9': + dependencies: + '@emnapi/core': 1.11.3 + '@emnapi/runtime': 1.11.3 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) + optional: true + + '@rspack/binding-win32-arm64-msvc@2.1.9': + optional: true + + '@rspack/binding-win32-ia32-msvc@2.1.9': + optional: true + + '@rspack/binding-win32-x64-msvc@2.1.9': + optional: true + + '@rspack/binding@2.1.9': + optionalDependencies: + '@rspack/binding-darwin-arm64': 2.1.9 + '@rspack/binding-darwin-x64': 2.1.9 + '@rspack/binding-linux-arm64-gnu': 2.1.9 + '@rspack/binding-linux-arm64-musl': 2.1.9 + '@rspack/binding-linux-ppc64-gnu': 2.1.9 + '@rspack/binding-linux-riscv64-gnu': 2.1.9 + '@rspack/binding-linux-riscv64-musl': 2.1.9 + '@rspack/binding-linux-s390x-gnu': 2.1.9 + '@rspack/binding-linux-x64-gnu': 2.1.9 + '@rspack/binding-linux-x64-musl': 2.1.9 + '@rspack/binding-wasm32-wasi': 2.1.9 + '@rspack/binding-win32-arm64-msvc': 2.1.9 + '@rspack/binding-win32-ia32-msvc': 2.1.9 + '@rspack/binding-win32-x64-msvc': 2.1.9 + + '@rspack/core@2.1.9': + dependencies: + '@rspack/binding': 2.1.9 + + '@tybys/wasm-util@0.10.3': + dependencies: + tslib: 2.8.1 + optional: true + '@types/estree@1.0.9': {} '@types/json-schema@7.0.15': {} @@ -2030,19 +2334,19 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2)': + '@webpack-cli/configtest@3.0.1(webpack-cli@6.0.1)(webpack@5.109.2)': dependencies: - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-cli: 6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2) - '@webpack-cli/info@3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2)': + '@webpack-cli/info@3.0.1(webpack-cli@6.0.1)(webpack@5.109.2)': dependencies: - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-cli: 6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2) - '@webpack-cli/serve@3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2)': + '@webpack-cli/serve@3.0.1(webpack-cli@6.0.1)(webpack@5.109.2)': dependencies: - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-cli: 6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2) '@xtuc/ieee754@1.2.0': {} @@ -2124,12 +2428,13 @@ snapshots: atob@2.1.2: {} - babel-loader@10.1.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.109.2): + babel-loader@10.1.1(@babel/core@7.29.7(supports-color@8.1.1))(@rspack/core@2.1.9)(webpack@5.109.2): dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) find-up: 5.0.0 optionalDependencies: - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + '@rspack/core': 2.1.9 + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) balanced-match@1.0.2: {} @@ -2219,7 +2524,7 @@ snapshots: schema-utils: 4.3.3 serialize-javascript: 6.0.2 tinyglobby: 0.2.17 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) core-js-pure@3.49.0: {} @@ -2247,7 +2552,7 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - css-loader@7.1.4(webpack@5.109.2): + css-loader@7.1.4(@rspack/core@2.1.9)(webpack@5.109.2): dependencies: icss-utils: 5.1.0(postcss@8.5.25) postcss: 8.5.25 @@ -2258,7 +2563,8 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.8.5 optionalDependencies: - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + '@rspack/core': 2.1.9 + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) css-tree@3.2.1: dependencies: @@ -2299,7 +2605,7 @@ snapshots: dotenv-webpack@8.1.1(webpack@5.109.2): dependencies: dotenv-defaults: 2.0.2 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) dotenv@8.6.0: {} @@ -2396,7 +2702,7 @@ snapshots: semver: 7.8.5 tapable: 2.3.3 typescript: 6.0.3 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) fs-extra@10.1.0: dependencies: @@ -2512,6 +2818,56 @@ snapshots: kind-of@6.0.3: {} + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + optional: true + lines-and-columns@1.2.4: {} loader-utils@2.0.4: @@ -2552,14 +2908,15 @@ snapshots: dependencies: brace-expansion: 1.1.18 - minimizer-webpack-plugin@5.6.1(postcss@8.5.25)(webpack@5.109.2): + minimizer-webpack-plugin@5.6.1(lightningcss@1.33.0)(postcss@8.5.25)(webpack@5.109.2): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.49.1 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) optionalDependencies: + lightningcss: 1.33.0 postcss: 8.5.25 mrmime@2.0.1: {} @@ -2651,14 +3008,15 @@ snapshots: read-cache: 1.0.0 resolve: 1.22.12 - postcss-loader@8.2.1(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2): + postcss-loader@8.2.1(@rspack/core@2.1.9)(postcss@8.5.25)(typescript@6.0.3)(webpack@5.109.2): dependencies: cosmiconfig: 9.0.2(typescript@6.0.3) jiti: 2.7.0 postcss: 8.5.25 semver: 7.8.5 optionalDependencies: - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + '@rspack/core': 2.1.9 + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) transitivePeerDependencies: - typescript @@ -2706,7 +3064,7 @@ snapshots: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) react-refresh@0.18.0: {} @@ -2741,14 +3099,19 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + rspack-chain@2.2.0(@rspack/core@2.1.9): + optionalDependencies: + '@rspack/core': 2.1.9 + safe-buffer@5.2.1: {} - sass-loader@16.0.8(sass@1.102.0)(webpack@5.109.2): + sass-loader@16.0.8(@rspack/core@2.1.9)(sass@1.102.0)(webpack@5.109.2): dependencies: neo-async: 2.6.2 optionalDependencies: + '@rspack/core': 2.1.9 sass: 1.102.0 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) sass@1.102.0: dependencies: @@ -2837,14 +3200,15 @@ snapshots: tapable@2.3.3: {} - terser-webpack-plugin@5.6.1(postcss@8.5.25)(webpack@5.109.2): + terser-webpack-plugin@5.6.1(lightningcss@1.33.0)(postcss@8.5.25)(webpack@5.109.2): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.49.1 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) optionalDependencies: + lightningcss: 1.33.0 postcss: 8.5.25 terser@5.49.1: @@ -2877,7 +3241,7 @@ snapshots: picomatch: 4.0.5 source-map: 0.7.6 typescript: 6.0.3 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) optionalDependencies: loader-utils: 3.3.1 @@ -2906,7 +3270,7 @@ snapshots: chalk: 4.1.2 hash-sum: 2.0.0 watchpack: 2.5.2 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) optionalDependencies: '@vue/compiler-sfc': 3.5.40 @@ -2940,9 +3304,9 @@ snapshots: webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2): dependencies: '@discoveryjs/json-ext': 0.6.3 - '@webpack-cli/configtest': 3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2) - '@webpack-cli/info': 3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2) - '@webpack-cli/serve': 3.0.1(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2))(webpack@5.109.2) + '@webpack-cli/configtest': 3.0.1(webpack-cli@6.0.1)(webpack@5.109.2) + '@webpack-cli/info': 3.0.1(webpack-cli@6.0.1)(webpack@5.109.2) + '@webpack-cli/serve': 3.0.1(webpack-cli@6.0.1)(webpack@5.109.2) colorette: 2.0.20 commander: 12.1.0 cross-spawn: 7.0.6 @@ -2951,7 +3315,7 @@ snapshots: import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)) + webpack: 5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1) webpack-merge: 6.0.1 optionalDependencies: webpack-bundle-analyzer: 4.10.2 @@ -2966,7 +3330,7 @@ snapshots: webpack-virtual-modules@0.4.6: {} - webpack@5.109.2(postcss@8.5.25)(webpack-cli@6.0.1(webpack-bundle-analyzer@4.10.2)(webpack@5.109.2)): + webpack@5.109.2(lightningcss@1.33.0)(postcss@8.5.25)(webpack-cli@6.0.1): dependencies: '@types/estree': 1.0.9 '@types/json-schema': 7.0.15 @@ -2982,7 +3346,7 @@ snapshots: events: 3.3.0 graceful-fs: 4.2.11 mime-db: 1.54.0 - minimizer-webpack-plugin: 5.6.1(postcss@8.5.25)(webpack@5.109.2) + minimizer-webpack-plugin: 5.6.1(lightningcss@1.33.0)(postcss@8.5.25)(webpack@5.109.2) neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.3 diff --git a/apps/ns-wry-app/pnpm-workspace.yaml b/apps/ns-wry-app/pnpm-workspace.yaml index 4441ebc..04505dc 100644 --- a/apps/ns-wry-app/pnpm-workspace.yaml +++ b/apps/ns-wry-app/pnpm-workspace.yaml @@ -1,7 +1,13 @@ # This app is intentionally NOT part of the root monorepo workspace (packages/*): # the ns CLI needs its own node_modules. Declaring the app directory as its # own pnpm workspace root gives it a separate install and its own pnpm-lock.yaml. -packages: [] +# +# The rspack bundler is consumed through the `workspace:` protocol, so the +# sibling package is exposed to this workspace. The app itself stays a +# standalone install — only packages/* is reachable, never the root workspace. +packages: + - ../../packages/ns-rspack + - ../../packages/ns-wry # pnpm 11 blocks dependency build scripts by default (ERR_PNPM_IGNORED_BUILDS). allowBuilds: diff --git a/apps/ns-wry-app/project.json b/apps/ns-wry-app/project.json index f36ea43..02222b6 100644 --- a/apps/ns-wry-app/project.json +++ b/apps/ns-wry-app/project.json @@ -17,7 +17,7 @@ "{projectRoot}/app/**/*", "{projectRoot}/references.d.ts", "{projectRoot}/tsconfig.json", - "{projectRoot}/webpack.config.js", + "{projectRoot}/rspack.config.ts", "^production" ] }, diff --git a/apps/ns-wry-app/rspack.config.ts b/apps/ns-wry-app/rspack.config.ts new file mode 100644 index 0000000..39873db --- /dev/null +++ b/apps/ns-wry-app/rspack.config.ts @@ -0,0 +1,12 @@ +import rspack from '@nativescript/rspack' +import type { INativeScriptRspackEnv } from '@nativescript/rspack' + +export default (env: INativeScriptRspackEnv) => { + rspack.init(env) + + // Customize the same way as @nativescript/webpack: + // rspack.chainRspack((config, env) => { ... }) + // rspack.mergeRspack({ ... }) + + return rspack.resolveConfig() +} diff --git a/apps/ns-wry-app/tsconfig.json b/apps/ns-wry-app/tsconfig.json index ae70486..d749eb7 100644 --- a/apps/ns-wry-app/tsconfig.json +++ b/apps/ns-wry-app/tsconfig.json @@ -1,30 +1,30 @@ { - "compilerOptions": { - "module": "esnext", - "target": "ES2020", - "moduleResolution": "bundler", - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "noEmitHelpers": true, - "noEmitOnError": true, - "skipLibCheck": true, - "lib": ["ESNext", "dom"], - "ignoreDeprecations": "6.0", - "baseUrl": ".", - "paths": { - "~/*": ["app/*"], - "@/*": ["app/*"] - } - }, - "include": ["app/**/*"], - "files": ["./references.d.ts"], - "exclude": [ - "node_modules", - "platforms" - ], - "references": [ - { - "path": "../../packages/ns-wry" - } - ] + "compilerOptions": { + "module": "esnext", + "target": "ES2020", + "moduleResolution": "bundler", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noEmitHelpers": true, + "noEmitOnError": true, + "skipLibCheck": true, + "lib": ["ESNext", "dom"], + "ignoreDeprecations": "6.0", + "baseUrl": ".", + "paths": { + "~/*": ["app/*"], + "@/*": ["app/*"] + } + }, + "include": ["app/**/*"], + "files": ["./references.d.ts"], + "exclude": ["node_modules", "platforms"], + "references": [ + { + "path": "../../packages/ns-rspack" + }, + { + "path": "../../packages/ns-wry" + } + ] } diff --git a/apps/ns-wry-app/webpack.config.js b/apps/ns-wry-app/webpack.config.js deleted file mode 100644 index d045179..0000000 --- a/apps/ns-wry-app/webpack.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const webpack = require('@nativescript/webpack'); - -module.exports = (env) => { - webpack.init(env); - // Learn how to customize: - // https://docs.nativescript.org/webpack - return webpack.resolveConfig(); -}; diff --git a/apps/rspack-test-app/.editorconfig b/apps/rspack-test-app/.editorconfig new file mode 100644 index 0000000..84ba4fa --- /dev/null +++ b/apps/rspack-test-app/.editorconfig @@ -0,0 +1,19 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +[*.json] +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.ts] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/apps/rspack-test-app/.gitignore b/apps/rspack-test-app/.gitignore new file mode 100644 index 0000000..1cb1231 --- /dev/null +++ b/apps/rspack-test-app/.gitignore @@ -0,0 +1,28 @@ +# NativeScript +hooks/ +node_modules/ +platforms/ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# General +.DS_Store +.AppleDouble +.LSOverride +.idea +.cloud +.project +tmp/ +typings/ + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json diff --git a/apps/rspack-test-app/.vscode/extensions.json b/apps/rspack-test-app/.vscode/extensions.json new file mode 100644 index 0000000..2a163b8 --- /dev/null +++ b/apps/rspack-test-app/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["nativescript.nativescript"] +} diff --git a/apps/rspack-test-app/App_Resources/Android/app.gradle b/apps/rspack-test-app/App_Resources/Android/app.gradle new file mode 100644 index 0000000..9f60d1a --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/app.gradle @@ -0,0 +1,25 @@ +// You can add your native dependencies here +dependencies { +// implementation 'androidx.multidex:multidex:2.0.1' +} + +android { + compileSdkVersion 35 + buildToolsVersion "35" + // ndkVersion "" + + defaultConfig { + minSdkVersion 24 + targetSdkVersion 35 + + // Version Information + versionCode 1 + versionName "1.0.0" + + generatedDensities = [] + } + + aaptOptions { + additionalParameters "--no-version-vectors" + } +} diff --git a/apps/rspack-test-app/App_Resources/Android/before-plugins.gradle b/apps/rspack-test-app/App_Resources/Android/before-plugins.gradle new file mode 100644 index 0000000..9faffb8 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/before-plugins.gradle @@ -0,0 +1,15 @@ +// this configurations is loaded before building plugins, as well as before building +// the app - this is where you can apply global settings and overrides + +project.ext { + // androidXAppCompat = "1.4.1" + // androidXExifInterface = "1.3.3" + // androidXFragment = "1.4.1" + // androidXMaterial = "1.5.0" + // androidXMultidex = "2.0.1" + // androidXTransition = "1.4.1" + // androidXViewPager = "1.0.0" + + // useKotlin = true + // kotlinVersion = "1.6.0" +} diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/AndroidManifest.xml b/apps/rspack-test-app/App_Resources/Android/src/main/AndroidManifest.xml new file mode 100644 index 0000000..6601773 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/AndroidManifest.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-hdpi/background.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-hdpi/background.png new file mode 100644 index 0000000..bbefbf4 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-hdpi/background.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png new file mode 100644 index 0000000..e788deb Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-ldpi/background.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-ldpi/background.png new file mode 100644 index 0000000..f6a08ee Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-ldpi/background.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png new file mode 100644 index 0000000..e4cac1a Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-mdpi/background.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-mdpi/background.png new file mode 100644 index 0000000..0c90f0f Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-mdpi/background.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png new file mode 100644 index 0000000..ce3c3a4 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml new file mode 100644 index 0000000..ada77f9 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png new file mode 100644 index 0000000..3541570 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png new file mode 100644 index 0000000..88267df Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png new file mode 100644 index 0000000..abb0fc7 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png new file mode 100644 index 0000000..55800c9 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png new file mode 100644 index 0000000..1089775 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png new file mode 100644 index 0000000..0703f90 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..fd826a3 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..7353dbd --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..69948d2 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..90a58cd Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..70a2a0d Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..1ee5a94 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..66e9d4b Binary files /dev/null and b/apps/rspack-test-app/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/values-v21/colors.xml b/apps/rspack-test-app/App_Resources/Android/src/main/res/values-v21/colors.xml new file mode 100644 index 0000000..da5ca2f --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/res/values-v21/colors.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/values-v21/styles.xml b/apps/rspack-test-app/App_Resources/Android/src/main/res/values-v21/styles.xml new file mode 100644 index 0000000..04d8a06 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/res/values-v21/styles.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/values-v29/styles.xml b/apps/rspack-test-app/App_Resources/Android/src/main/res/values-v29/styles.xml new file mode 100644 index 0000000..9a2a79d --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/res/values-v29/styles.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/values/colors.xml b/apps/rspack-test-app/App_Resources/Android/src/main/res/values/colors.xml new file mode 100644 index 0000000..78c4a51 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/res/values/colors.xml @@ -0,0 +1,14 @@ + + + + #F5F5F5 + + + #757575 + + + #65ADF1 + + + + diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/values/ic_launcher_background.xml b/apps/rspack-test-app/App_Resources/Android/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..c5d5899 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/apps/rspack-test-app/App_Resources/Android/src/main/res/values/styles.xml b/apps/rspack-test-app/App_Resources/Android/src/main/res/values/styles.xml new file mode 100644 index 0000000..4f91b61 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/Android/src/main/res/values/styles.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..1a8b0e6 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "icon-20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "icon-20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "icon-20.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "icon-20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "icon-83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "icon-1024.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png new file mode 100644 index 0000000..b46c8bb Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png new file mode 100644 index 0000000..d73288a Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png new file mode 100644 index 0000000..c8d24cd Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png new file mode 100644 index 0000000..1b00c84 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png new file mode 100644 index 0000000..72a1641 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png new file mode 100644 index 0000000..05ab752 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png new file mode 100644 index 0000000..ee72082 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png new file mode 100644 index 0000000..2859288 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png new file mode 100644 index 0000000..88824fa Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png new file mode 100644 index 0000000..02a930c Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png new file mode 100644 index 0000000..d7b077f Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png new file mode 100644 index 0000000..2f872dd Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png new file mode 100644 index 0000000..7fb23a7 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png new file mode 100644 index 0000000..cb04c36 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png new file mode 100644 index 0000000..e882226 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/Contents.json b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json new file mode 100644 index 0000000..ab5edd0 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png new file mode 100644 index 0000000..cb35cfa Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png new file mode 100644 index 0000000..6eefb9a Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png new file mode 100644 index 0000000..0ef5102 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json new file mode 100644 index 0000000..444d715 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png new file mode 100644 index 0000000..280c30e Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png new file mode 100644 index 0000000..f984b9e Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png new file mode 100644 index 0000000..95d86f3 Binary files /dev/null and b/apps/rspack-test-app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png differ diff --git a/apps/rspack-test-app/App_Resources/iOS/Info.plist b/apps/rspack-test-app/App_Resources/iOS/Info.plist new file mode 100644 index 0000000..ea3e3ea --- /dev/null +++ b/apps/rspack-test-app/App_Resources/iOS/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiresFullScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/apps/rspack-test-app/App_Resources/iOS/LaunchScreen.storyboard b/apps/rspack-test-app/App_Resources/iOS/LaunchScreen.storyboard new file mode 100644 index 0000000..c4e5a3f --- /dev/null +++ b/apps/rspack-test-app/App_Resources/iOS/LaunchScreen.storyboard @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/rspack-test-app/App_Resources/iOS/build.xcconfig b/apps/rspack-test-app/App_Resources/iOS/build.xcconfig new file mode 100644 index 0000000..80bc992 --- /dev/null +++ b/apps/rspack-test-app/App_Resources/iOS/build.xcconfig @@ -0,0 +1,7 @@ +// You can add custom settings here +// for example you can uncomment the following line to force distribution code signing +// CODE_SIGN_IDENTITY = iPhone Distribution +// To build for device with XCode you need to specify your development team. +// DEVELOPMENT_TEAM = YOUR_TEAM_ID; +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; +IPHONEOS_DEPLOYMENT_TARGET = 16.0; diff --git a/apps/rspack-test-app/app/app-root.xml b/apps/rspack-test-app/app/app-root.xml new file mode 100644 index 0000000..0eb5c33 --- /dev/null +++ b/apps/rspack-test-app/app/app-root.xml @@ -0,0 +1,3 @@ + + + diff --git a/apps/rspack-test-app/app/app.css b/apps/rspack-test-app/app/app.css new file mode 100644 index 0000000..8732c96 --- /dev/null +++ b/apps/rspack-test-app/app/app.css @@ -0,0 +1,125 @@ +@import '@nativescript/theme/css/core.css'; +@import '@nativescript/theme/css/default.css'; + +Button.-primary { + font-size: 18; +} + +.gallery { + padding: 12; + /* the theme capitalizes everything inside a TabView */ + text-transform: none; +} + +.glass-backdrop { + background-image: linear-gradient(to right, #e91e63, #1976d2, #009688); +} + +.card { + background-color: #ffffff; + border-radius: 8; + padding: 12; + margin-bottom: 12; +} + +.ns-dark .card { + background-color: #212121; +} + +.ns-dark .card .card-title { + color: #64b5f6; +} + +.ns-dark .card .hint { + color: #9e9e9e; +} + +.card-title { + font-size: 15; + font-weight: bold; + color: #1976d2; + margin-bottom: 6; +} + +.status { + font-size: 16; + text-align: center; +} + +.hint { + font-size: 12; + color: #757575; +} + +.cell-label { + vertical-align: center; + margin-right: 12; +} + +.grid-gap { + margin-top: 4; +} + +/* the template logo is white on transparent */ +.image-backdrop { + background-color: #263238; + border-radius: 4; + padding: 8; +} + +.image-backdrop .hint { + color: #b0bec5; +} + +.box { + background-color: #1976d2; + color: #ffffff; + text-align: center; + padding: 8; + margin: 4; + border-radius: 4; +} + +.chip { + color: #ffffff; + padding: 8; + margin: 4; + border-radius: 12; +} + +.list-row { + padding: 10 4; +} + +.content-view { + border-width: 1; + border-color: #e0e0e0; + border-radius: 4; + padding: 8; +} + +.gesture-box { + background-color: #ede7f6; + color: #4527a0; + text-align: center; + padding: 24; + border-radius: 8; +} + +.glass-label { + color: #ffffff; + text-align: center; + vertical-align: center; +} + +.popup { + background-color: #ffffff; + border-radius: 12; + padding: 16; + vertical-align: center; + horizontal-align: center; +} + +.ns-dark .popup { + background-color: #212121; +} diff --git a/apps/rspack-test-app/app/app.ts b/apps/rspack-test-app/app/app.ts new file mode 100644 index 0000000..83d0178 --- /dev/null +++ b/apps/rspack-test-app/app/app.ts @@ -0,0 +1,14 @@ +/* +In NativeScript, the app.ts file is the entry point to your application. +You can use this file to perform app-level initialization, but the primary +purpose of the file is to pass control to the app’s first module. +*/ + +import { Application } from '@nativescript/core' + +Application.run({ moduleName: 'app-root' }) + +/* +Do not place any code after the application has been started as it will not +be executed on iOS. +*/ diff --git a/apps/rspack-test-app/app/images/logo.png b/apps/rspack-test-app/app/images/logo.png new file mode 100644 index 0000000..55800c9 Binary files /dev/null and b/apps/rspack-test-app/app/images/logo.png differ diff --git a/apps/rspack-test-app/app/main-page.ts b/apps/rspack-test-app/app/main-page.ts new file mode 100644 index 0000000..3fb6900 --- /dev/null +++ b/apps/rspack-test-app/app/main-page.ts @@ -0,0 +1,7 @@ +import { EventData, Page } from '@nativescript/core' +import { WidgetsGalleryModel } from './main-view-model' + +export function navigatingTo(args: EventData) { + const page = args.object + page.bindingContext = new WidgetsGalleryModel() +} diff --git a/apps/rspack-test-app/app/main-page.xml b/apps/rspack-test-app/app/main-page.xml new file mode 100644 index 0000000..280d70d --- /dev/null +++ b/apps/rspack-test-app/app/main-page.xml @@ -0,0 +1,305 @@ + + + + + + + + + + + + + + + + + + +