From 0ee073012fffff7961d30cef31b4682c884b79ac Mon Sep 17 00:00:00 2001
From: mtyszczak <mateusz.tyszczak@gmail.com>
Date: Tue, 25 Mar 2025 11:40:33 +0100
Subject: [PATCH] Copy hb-auth worker to signature-extension example

---
 examples/ts/signature-extension/.parcelrc              | 3 ++-
 examples/ts/signature-extension/package.json           | 6 +++++-
 examples/ts/signature-extension/test/hb-auth-worker.js | 1 -
 examples/ts/signature-extension/test/index.html        | 2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)
 delete mode 120000 examples/ts/signature-extension/test/hb-auth-worker.js

diff --git a/examples/ts/signature-extension/.parcelrc b/examples/ts/signature-extension/.parcelrc
index 7c4c7db42..94c3b9f0e 100644
--- a/examples/ts/signature-extension/.parcelrc
+++ b/examples/ts/signature-extension/.parcelrc
@@ -2,5 +2,6 @@
   "extends": "@parcel/config-default",
   "transformers": {
     "*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"]
-  }
+  },
+  "reporters":  ["...", "parcel-reporter-static-files-copy"]
 }
\ No newline at end of file
diff --git a/examples/ts/signature-extension/package.json b/examples/ts/signature-extension/package.json
index 536f45f47..cfc9b8238 100644
--- a/examples/ts/signature-extension/package.json
+++ b/examples/ts/signature-extension/package.json
@@ -25,13 +25,17 @@
     "buffer": "^5.5.0||^6.0.0",
     "events": "^3.1.0",
     "parcel": "^2.14.2",
+    "parcel-reporter-static-files-copy": "^1.5.3",
     "process": "^0.11.10",
     "stream-browserify": "^3.0.0",
     "string_decoder": "^1.3.0"
   },
+  "staticFiles": [
+    { "staticPath": "node_modules/@hiveio/hb-auth/dist" }
+  ],
   "pnpm": {
     "overrides": {
-       "axios": "^1.8.4"
+      "axios": "^1.8.4"
     }
   },
   "packageManager": "pnpm@10.0.0+sha512.b8fef5494bd3fe4cbd4edabd0745df2ee5be3e4b0b8b08fa643aa3e4c6702ccc0f00d68fa8a8c9858a735a0032485a44990ed2810526c875e416f001b17df12b"
diff --git a/examples/ts/signature-extension/test/hb-auth-worker.js b/examples/ts/signature-extension/test/hb-auth-worker.js
deleted file mode 120000
index 2f06d0b6b..000000000
--- a/examples/ts/signature-extension/test/hb-auth-worker.js
+++ /dev/null
@@ -1 +0,0 @@
-../node_modules/@hiveio/hb-auth/dist/worker.js
\ No newline at end of file
diff --git a/examples/ts/signature-extension/test/index.html b/examples/ts/signature-extension/test/index.html
index 4d46dd3cf..e33167c1b 100644
--- a/examples/ts/signature-extension/test/index.html
+++ b/examples/ts/signature-extension/test/index.html
@@ -103,7 +103,7 @@
       const hbAuthClient = new OfflineClient({
         chainId: testEnv.configuredChain.chainId,
         node: testEnv.configuredChain.endpointUrl,
-        workerUrl: new URL('./hb-auth-worker.js', import.meta.url),
+        workerUrl: './worker.js',
         sessionTimeout: 900
       });
       const hbAuthProvider = await HBAuthProvider.for(hbAuthClient);
-- 
GitLab