From da54ea125ab3229d51a2e7242ac3fe3225d2184a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Nov 2025 22:03:23 +0000 Subject: [PATCH 1/4] Initial plan From 0582604dc9885d1e65c82ce1bb04b7e222d90b2c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Nov 2025 22:09:22 +0000 Subject: [PATCH 2/4] Rename workflow to 'Tests' and remove examples directory Co-authored-by: HardlyDifficult <14855515+HardlyDifficult@users.noreply.github.com> --- .../{test-cn-quickstart.yml => tests.yml} | 4 +- examples/README.md | 126 ------------------ examples/localnet-with-oauth2.ts | 105 --------------- package.json | 1 - tsconfig.lint.json | 2 +- 5 files changed, 3 insertions(+), 235 deletions(-) rename .github/workflows/{test-cn-quickstart.yml => tests.yml} (99%) delete mode 100644 examples/README.md delete mode 100644 examples/localnet-with-oauth2.ts diff --git a/.github/workflows/test-cn-quickstart.yml b/.github/workflows/tests.yml similarity index 99% rename from .github/workflows/test-cn-quickstart.yml rename to .github/workflows/tests.yml index aaa07182..46854271 100644 --- a/.github/workflows/test-cn-quickstart.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: Test CN-Quickstart Integration +name: Tests on: push: @@ -11,7 +11,7 @@ on: workflow_dispatch: jobs: - test-cn-quickstart: + tests: runs-on: ubuntu-latest timeout-minutes: 60 diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 6294f9d0..00000000 --- a/examples/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# Canton Node SDK - LocalNet Examples - -Simple examples for connecting to Canton Network LocalNet using the Canton Node SDK. - -## Prerequisites - -- cn-quickstart is running (see https://github.com/digital-asset/cn-quickstart) -- cn-quickstart is configured with OAuth2 enabled -- Dependencies installed: `npm install` - -## Examples - -### `localnet-with-oauth2.ts` - OAuth2 Authentication ✅ - -**Status**: ✅ **Working** - This is the recommended example! - -Demonstrates how to: - -- Connect to cn-quickstart with OAuth2/Keycloak authentication -- Use the SDK's built-in authentication manager -- Make authenticated API calls to the Validator API - -**Run it:** - -```bash -npm run example:oauth2 -``` - -**What it does:** - -1. Authenticates with Keycloak using client credentials -2. Gets an OAuth2 access token -3. Makes an authenticated API call to get user status -4. The SDK handles all token management automatically! - -**Key Features:** - -- ✅ Automatic token acquisition -- ✅ Automatic token refresh when expired -- ✅ Bearer token automatically included in requests -- ✅ No manual token management needed - -### Configuration - -The example uses the default cn-quickstart OAuth2 configuration: - -```typescript -{ - authUrl: 'http://localhost:8082/realms/AppProvider/protocol/openid-connect/token', - apis: { - VALIDATOR_API: { - apiUrl: 'http://localhost:3903', - auth: { - grantType: 'client_credentials', - clientId: 'app-provider-validator', - clientSecret: 'AL8648b9SfdTFImq7FV56Vd0KHifHBuC', - }, - }, - }, -} -``` - -## Try Other API Methods - -Once you have a working client, you can call any Validator API method: - -```typescript -// Get wallet balance -const balance = await client.getWalletBalance(); - -// Get amulets -const amulets = await client.getAmulets(); - -// Get DSO party ID -const dsoPartyId = await client.getDsoPartyId(); - -// Get amulet rules -const rules = await client.getAmuletRules(); - -// List ANS entries -const entries = await client.listAnsEntries(); -``` - -## Next Steps - -1. **Explore the SDK**: Check out the full API documentation at https://sdk.canton.fairmint.com/ -2. **Stream Updates**: See `scripts/examples/` for streaming and subscription examples -3. **Integration Tests**: Look at `test/integration/quickstart/` for more complex examples -4. **Web UIs**: Explore the running services: - - Wallet: http://wallet.localhost:3000 - - Scan: http://scan.localhost:4000 - -## Troubleshooting - -### Authentication Failed - -```bash -# Verify Keycloak is running -curl http://localhost:8082/realms/AppProvider - -# Check cn-quickstart OAuth2 setup -cd quickstart && make setup # Ensure "with OAuth2" is selected -``` - -### Connection Refused - -```bash -# Check if services are running -cd quickstart && make status - -# Restart if needed -cd quickstart && make restart -``` - -### Wrong Credentials - -The credentials in the example (`app-provider-validator` / `AL8648b9SfdTFImq7FV56Vd0KHifHBuC`) are -the default values for cn-quickstart. If you've customized your setup, check: - -- `quickstart/docker/modules/keycloak/env/app-provider/on/oauth2.env` - -## More Resources - -- Main README: `../../examples/README.md` -- SDK Documentation: https://sdk.canton.fairmint.com/ -- cn-quickstart: https://github.com/digital-asset/cn-quickstart diff --git a/examples/localnet-with-oauth2.ts b/examples/localnet-with-oauth2.ts deleted file mode 100644 index 67416fa2..00000000 --- a/examples/localnet-with-oauth2.ts +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env tsx -/** - * Example: Canton Network LocalNet with OAuth2 Authentication - * - * This example demonstrates how to connect to cn-quickstart with OAuth2/Keycloak authentication using the Canton Node - * SDK. - * - * Prerequisites: - * - * - Cn-quickstart is running with OAuth2 enabled - * - Run `cd quickstart && make setup` and choose "with OAuth2" - * - Run `cd quickstart && make start` - * - * The SDK automatically handles: - * - * - OAuth2 token acquisition - * - Token refresh - * - Bearer token injection in API calls - * - * Usage: npx tsx canton-node-sdk/examples/localnet-with-oauth2.ts - */ - -import { LedgerJsonApiClient, ValidatorApiClient } from '../src'; - -async function main(): Promise { - console.log('🔌 Connecting to Canton Network LocalNet with OAuth2...\n'); - - try { - // ✨ Simple configuration! The SDK now has cn-quickstart defaults built-in - // Just specify the network and it automatically configures: - // - OAuth2 auth URL (Keycloak) - // - API endpoints (ports 3903, 3975, etc.) - // - Client credentials (app-provider-validator) - const validatorClient = new ValidatorApiClient({ - network: 'localnet', - }); - - const jsonClient = new LedgerJsonApiClient({ - network: 'localnet', - }); - - console.log('🔐 Authenticating with OAuth2...'); - - // The SDK will automatically call authenticate() before API calls, - // but we can also call it explicitly to test authentication - const token = await validatorClient.authenticate(); - console.log('✅ Authentication successful!'); - console.log(` Token acquired: ${token.substring(0, 50)}...\n`); - - console.log('📡 Calling Validator API: getUserStatus()...'); - - // Make an API call - the SDK automatically includes the bearer token - const userStatus = await validatorClient.getUserStatus(); - - console.log('✅ API call successful!\n'); - console.log('User Status:'); - console.log(JSON.stringify(userStatus, null, 2)); - - console.log('\n✨ Connection test successful!'); - console.log('\n📚 What the SDK did for you with just { network: "localnet" }:'); - console.log(' 1. Auto-configured OAuth2 URL (http://localhost:8082/realms/AppProvider/...)'); - console.log(' 2. Auto-configured API endpoints (Validator: 3903, JSON API: 3975)'); - console.log(' 3. Auto-configured client credentials (app-provider-validator)'); - console.log(' 4. Connected to Keycloak and got access token'); - console.log(' 5. Automatically included Bearer token in all API requests'); - console.log(' 6. Will auto-refresh token when it expires'); - - console.log('\n📡 Testing Ledger JSON API: getVersion()...'); - const version = await jsonClient.getVersion(); - console.log('✅ Ledger JSON API call successful!\n'); - console.log('Ledger API Version:', version.version); - console.log('Features:', JSON.stringify(version.features, null, 2)); - - console.log('\n💡 Next steps:'); - console.log(' - Try other Validator API methods: getWalletBalance(), getAmulets(), etc.'); - console.log(' - Try Ledger JSON API methods: listUsers(), getLedgerEnd(), etc.'); - console.log(' - Check out canton-node-sdk/scripts/examples/ for more examples'); - console.log(' - Explore the web UIs:'); - console.log(' • Wallet: http://wallet.localhost:3000'); - console.log(' • Scan: http://scan.localhost:4000'); - - process.exit(0); - } catch (error) { - console.error('\n❌ Error:'); - if (error instanceof Error) { - console.error(` ${error.message}`); - if (error.message.includes('ECONNREFUSED')) { - console.log('\n💡 Make sure cn-quickstart is running:'); - console.log(' cd quickstart && make start'); - } else if (error.message.includes('401') || error.message.includes('authentication')) { - console.log('\n💡 Authentication failed. This could mean:'); - console.log(' 1. cn-quickstart is not configured with OAuth2'); - console.log(' → Run: cd quickstart && make setup (choose "with OAuth2")'); - console.log(' 2. Keycloak is not accessible'); - console.log(' → Check: http://localhost:8082'); - } - } else { - console.error(error); - } - process.exit(1); - } -} - -// Run the main function -void main(); diff --git a/package.json b/package.json index 7a5edf12..5ee97910 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "docs": "tsx scripts/update-docs-version.ts && tsx scripts/generate-operation-docs.ts", "docs:build": "npm run docs && cd docs && bundle exec jekyll build", "docs:dev": "npm run docs && cd docs && bundle exec jekyll serve --livereload --port 4000", - "example:connect": "tsx examples/localnet-with-oauth2.ts", "fix": "npm run lint:fix && npm run format:fix", "format": "prettier --check .", "format:fix": "prettier --write .", diff --git a/tsconfig.lint.json b/tsconfig.lint.json index 386fb02e..e8c79e0f 100644 --- a/tsconfig.lint.json +++ b/tsconfig.lint.json @@ -4,6 +4,6 @@ "rootDir": ".", "outDir": "./build" }, - "include": ["src/**/*", "test/**/*", "scripts/**/*", "simulations/**/*", "examples/**/*"], + "include": ["src/**/*", "test/**/*", "scripts/**/*", "simulations/**/*"], "exclude": ["**/*.example.ts"] } From 8134a3225effbed34627dc0c4923117959730a46 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:16:50 +0000 Subject: [PATCH 3/4] Changes before error encountered Co-authored-by: HardlyDifficult <14855515+HardlyDifficult@users.noreply.github.com> --- .github/workflows/publish.yml | 5 ++- .github/workflows/tests.yml | 65 +++++++++++++++++-------------- .gitignore | 1 - .gitmodules | 5 ++- cn-quickstart | 1 - libs/splice | 1 + package.json | 1 - scripts/clone-splice.sh | 52 ------------------------- scripts/generate-openapi-types.ts | 6 +-- 9 files changed, 46 insertions(+), 91 deletions(-) delete mode 160000 cn-quickstart create mode 160000 libs/splice delete mode 100755 scripts/clone-splice.sh diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 681d9ee0..75c24185 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,6 +20,7 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} + submodules: false - name: Setup Node.js uses: actions/setup-node@v4 @@ -30,8 +31,8 @@ jobs: - name: Install dependencies run: npm i - - name: Clone Splice - run: npm run artifacts:clone-splice + - name: Initialize Splice Submodule + run: git submodule update --init --depth 1 libs/splice - name: Build package run: npm run build diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 46854271..f31d4169 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 with: - submodules: recursive + submodules: false - name: Setup Node.js uses: actions/setup-node@v4 @@ -40,18 +40,19 @@ jobs: ${{ github.workspace }}/node_modules ${{ github.workspace }}/artifacts ${{ github.workspace }}/build - ${{ github.workspace }}/cn-quickstart/quickstart/.env.local - ${{ github.workspace }}/cn-quickstart/quickstart/.gradle - ${{ github.workspace }}/cn-quickstart/quickstart/.daml - ${{ github.workspace }}/cn-quickstart/quickstart/.config - ${{ github.workspace }}/cn-quickstart/quickstart/.cache - ${{ github.workspace }}/cn-quickstart/quickstart/frontend/node_modules - ${{ github.workspace }}/cn-quickstart/quickstart/frontend/dist - ${{ github.workspace }}/cn-quickstart/quickstart/backend/build - ${{ github.workspace }}/cn-quickstart/quickstart/integration-test/node_modules + ${{ github.workspace }}/libs/splice + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.env.local + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.gradle + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.daml + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.config + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.cache + ${{ github.workspace }}/libs/cn-quickstart/quickstart/frontend/node_modules + ${{ github.workspace }}/libs/cn-quickstart/quickstart/frontend/dist + ${{ github.workspace }}/libs/cn-quickstart/quickstart/backend/build + ${{ github.workspace }}/libs/cn-quickstart/quickstart/integration-test/node_modules /home/runner/.daml /home/runner/.gradle - key: quickstart-prep-${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', '.git/modules/cn-quickstart/HEAD') }} + key: quickstart-prep-${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', '.git/modules/libs/cn-quickstart/HEAD', '.git/modules/libs/splice/HEAD') }} - name: Install Dependencies if: steps.quickstart-prep-cache-restore.outputs.cache-hit != 'true' @@ -78,14 +79,16 @@ jobs: git commit -m "chore: auto-fix linting issues [skip ci]" git push - - name: Clone Splice Artifacts (for SDK codegen) + - name: Initialize Submodules if: steps.quickstart-prep-cache-restore.outputs.cache-hit != 'true' - run: npm run artifacts:clone-splice + run: | + git submodule update --init --depth 1 libs/splice + git submodule update --init --recursive libs/cn-quickstart - name: Setup CN-Quickstart if: steps.quickstart-prep-cache-restore.outputs.cache-hit != 'true' run: | - cd cn-quickstart/quickstart + cd libs/cn-quickstart/quickstart echo "Running setup with OAuth2..." # Setup with OAuth2 non-interactively echo "2" | make setup || true # Select option 2 (with OAuth2) @@ -95,7 +98,7 @@ jobs: - name: Install Daml SDK if: steps.quickstart-prep-cache-restore.outputs.cache-hit != 'true' run: | - cd cn-quickstart/quickstart + cd libs/cn-quickstart/quickstart make install-daml-sdk timeout-minutes: 15 @@ -104,7 +107,7 @@ jobs: - name: Start CN-Quickstart run: | - cd cn-quickstart/quickstart + cd libs/cn-quickstart/quickstart make start echo "✓ CN-Quickstart started" timeout-minutes: 15 @@ -137,7 +140,8 @@ jobs: # This cache will be invalidated when: # - package.json changes (dependency additions/removals) # - package-lock.json changes (exact dependency versions) - # - cn-quickstart submodule HEAD changes (submodule updated to different commit) + # - libs/cn-quickstart submodule HEAD changes (submodule updated to different commit) + # - libs/splice submodule HEAD changes (submodule updated to different commit) # - Runner OS changes (unlikely in practice) - name: Save Quickstart Preparation Cache if: steps.quickstart-prep-cache-restore.outputs.cache-hit != 'true' @@ -148,15 +152,16 @@ jobs: ${{ github.workspace }}/node_modules ${{ github.workspace }}/artifacts ${{ github.workspace }}/build - ${{ github.workspace }}/cn-quickstart/quickstart/.env.local - ${{ github.workspace }}/cn-quickstart/quickstart/.gradle - ${{ github.workspace }}/cn-quickstart/quickstart/.daml - ${{ github.workspace }}/cn-quickstart/quickstart/.config - ${{ github.workspace }}/cn-quickstart/quickstart/.cache - ${{ github.workspace }}/cn-quickstart/quickstart/frontend/node_modules - ${{ github.workspace }}/cn-quickstart/quickstart/frontend/dist - ${{ github.workspace }}/cn-quickstart/quickstart/backend/build - ${{ github.workspace }}/cn-quickstart/quickstart/integration-test/node_modules + ${{ github.workspace }}/libs/splice + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.env.local + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.gradle + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.daml + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.config + ${{ github.workspace }}/libs/cn-quickstart/quickstart/.cache + ${{ github.workspace }}/libs/cn-quickstart/quickstart/frontend/node_modules + ${{ github.workspace }}/libs/cn-quickstart/quickstart/frontend/dist + ${{ github.workspace }}/libs/cn-quickstart/quickstart/backend/build + ${{ github.workspace }}/libs/cn-quickstart/quickstart/integration-test/node_modules /home/runner/.daml /home/runner/.gradle key: ${{ steps.quickstart-prep-cache-restore.outputs.cache-primary-key }} @@ -177,12 +182,12 @@ jobs: docker ps -a || true echo "==================== Docker Compose Logs ====================" - if [ -d "cn-quickstart/quickstart" ]; then - cd cn-quickstart/quickstart + if [ -d "libs/cn-quickstart/quickstart" ]; then + cd libs/cn-quickstart/quickstart docker compose logs --tail=100 || true fi echo "==================== Canton Logs ====================" - if [ -f cn-quickstart/quickstart/logs/canton.log ]; then - tail -100 cn-quickstart/quickstart/logs/canton.log + if [ -f libs/cn-quickstart/quickstart/logs/canton.log ]; then + tail -100 libs/cn-quickstart/quickstart/logs/canton.log fi diff --git a/.gitignore b/.gitignore index b9035944..2e1f4f89 100644 --- a/.gitignore +++ b/.gitignore @@ -68,7 +68,6 @@ CHANGELOG.md docs/_generated/ docs/_operations/ docs/_site/ -artifacts/splice/ *.generated.ts # Local only diff --git a/.gitmodules b/.gitmodules index 419604af..3252bea1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "cn-quickstart"] - path = cn-quickstart + path = libs/cn-quickstart url = https://github.com/digital-asset/cn-quickstart +[submodule "libs/splice"] + path = libs/splice + url = https://github.com/hyperledger-labs/splice diff --git a/cn-quickstart b/cn-quickstart deleted file mode 160000 index 46201cd2..00000000 --- a/cn-quickstart +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 46201cd27ee16c99f78ab97b7e6513c56f28e004 diff --git a/libs/splice b/libs/splice new file mode 160000 index 00000000..d5519353 --- /dev/null +++ b/libs/splice @@ -0,0 +1 @@ +Subproject commit d55193531b7b204b27eca7646b7b8b4ca607a706 diff --git a/package.json b/package.json index 5ee97910..7d083b76 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "main": "build/src/index.js", "types": "build/src/index.d.ts", "scripts": { - "artifacts:clone-splice": "./scripts/clone-splice.sh", "artifacts:manifest": "mkdir -p artifacts && npm pack --dry-run --json --ignore-scripts > /tmp/npm-pack.json 2>/dev/null && jq -r '.[0].files[].path' /tmp/npm-pack.json | sort | tsx scripts/collapse-manifest.ts > artifacts/npm-manifest.txt", "build": "npm run build:core && npm run build:lint", "build:core": "npm run generate:openapi-types && npm run build:core:generate-client-methods && tsc", diff --git a/scripts/clone-splice.sh b/scripts/clone-splice.sh deleted file mode 100755 index 082b48aa..00000000 --- a/scripts/clone-splice.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -set -e - -# Get the directory where this script is located -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" - -# Create artifacts directory -mkdir -p "$PROJECT_ROOT/artifacts/splice" - -# Clone the splice repository -echo "Cloning splice repository..." -git clone --depth 1 --filter=blob:none --sparse https://github.com/hyperledger-labs/splice /tmp/splice - -# Change to the cloned directory -cd /tmp/splice - -# Set up sparse checkout for yaml files -echo "Setting up sparse checkout..." -git sparse-checkout set --no-cone '*.yaml' - -# Copy openapi yaml files -echo "Copying openapi yaml files..." -find . -path '*/openapi/*' -name '*.yaml' ! -path '*/examples/*' | while read -r file; do - target_dir="$PROJECT_ROOT/artifacts/splice/$(dirname "$file")" - mkdir -p "$target_dir" - cp "$file" "$target_dir/" -done - -# Copy openapi.yaml files -echo "Copying openapi.yaml files..." -find . -name 'openapi.yaml' ! -path '*/examples/*' | while read -r file; do - target_dir="$PROJECT_ROOT/artifacts/splice/$(dirname "$file")" - mkdir -p "$target_dir" - cp "$file" "$target_dir/" -done - -# Copy asyncapi.yaml files -echo "Copying asyncapi.yaml files..." -find . -name 'asyncapi.yaml' ! -path '*/examples/*' | while read -r file; do - target_dir="$PROJECT_ROOT/artifacts/splice/$(dirname "$file")" - mkdir -p "$target_dir" - cp "$file" "$target_dir/" -done - -# Clean up -echo "Cleaning up..." -cd "$PROJECT_ROOT" -rm -rf /tmp/splice - -echo "Splice artifacts cloned successfully!" \ No newline at end of file diff --git a/scripts/generate-openapi-types.ts b/scripts/generate-openapi-types.ts index 4848d28d..eecbeb46 100644 --- a/scripts/generate-openapi-types.ts +++ b/scripts/generate-openapi-types.ts @@ -13,7 +13,7 @@ function ensureDirectoryExists(filePath: string): void { } function generateForFile(yamlPath: string): void { - const relativePath = yamlPath.replace(/^artifacts\/splice\//, '').replace(/\.yaml$/, '.ts'); + const relativePath = yamlPath.replace(/^libs\/splice\//, '').replace(/\.yaml$/, '.ts'); const outputPath = path.join('src/generated', relativePath); ensureDirectoryExists(outputPath); @@ -23,10 +23,10 @@ function generateForFile(yamlPath: string): void { } function main(): void { - const openapiUnderDir = glob.sync('artifacts/splice/**/openapi/**/*.yaml', { + const openapiUnderDir = glob.sync('libs/splice/**/openapi/**/*.yaml', { nodir: true, }); - const openapiRootFiles = glob.sync('artifacts/splice/**/openapi.yaml', { + const openapiRootFiles = glob.sync('libs/splice/**/openapi.yaml', { nodir: true, }); From a2fa20b9fa31c3da86e39099ad7aba328b677a18 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 13:16:23 +0000 Subject: [PATCH 4/4] Use recursive submodules at checkout, remove redundant initialization steps Co-authored-by: HardlyDifficult <14855515+HardlyDifficult@users.noreply.github.com> --- .github/workflows/publish.yml | 5 +---- .github/workflows/tests.yml | 8 +------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 75c24185..eb098327 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,7 +20,7 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - submodules: false + submodules: recursive - name: Setup Node.js uses: actions/setup-node@v4 @@ -31,9 +31,6 @@ jobs: - name: Install dependencies run: npm i - - name: Initialize Splice Submodule - run: git submodule update --init --depth 1 libs/splice - - name: Build package run: npm run build diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f31d4169..623adba5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 with: - submodules: false + submodules: recursive - name: Setup Node.js uses: actions/setup-node@v4 @@ -79,12 +79,6 @@ jobs: git commit -m "chore: auto-fix linting issues [skip ci]" git push - - name: Initialize Submodules - if: steps.quickstart-prep-cache-restore.outputs.cache-hit != 'true' - run: | - git submodule update --init --depth 1 libs/splice - git submodule update --init --recursive libs/cn-quickstart - - name: Setup CN-Quickstart if: steps.quickstart-prep-cache-restore.outputs.cache-hit != 'true' run: |