From 7947b558e82ba4b0d3528720408ef518ce5b76ba Mon Sep 17 00:00:00 2001 From: coodos Date: Mon, 7 Jul 2025 23:20:38 +0530 Subject: [PATCH 1/4] chore: remove file --- .../src/controllers/WebhookController.ts | 25 +- platforms/blabsy/.env.development | 21 -- .../src/controllers/WebhookController.ts | 5 +- .../controllers/WebhookController.ts | 298 ------------------ 4 files changed, 18 insertions(+), 331 deletions(-) delete mode 100644 platforms/blabsy/.env.development delete mode 100644 platforms/pictique-api/src/web3adapter/controllers/WebhookController.ts diff --git a/platforms/blabsy-w3ds-auth-api/src/controllers/WebhookController.ts b/platforms/blabsy-w3ds-auth-api/src/controllers/WebhookController.ts index 0cd0e001..17d9af17 100644 --- a/platforms/blabsy-w3ds-auth-api/src/controllers/WebhookController.ts +++ b/platforms/blabsy-w3ds-auth-api/src/controllers/WebhookController.ts @@ -4,6 +4,7 @@ import path from "path"; import dotenv from "dotenv"; import { getFirestore } from "firebase-admin/firestore"; import { Timestamp } from "firebase-admin/firestore"; +import axios from "axios"; // Define types locally since we can't import from @blabsy/types type User = { @@ -86,7 +87,9 @@ export class WebhookController { try { const { data, schemaId, id } = req.body; - console.log("received webhook????", req.body); + if (process.env.ANCHR_URL) { + return axios.post(new URL(process.env.ANCHR_URL, process.env.PUBLIC_BLABSY_BASE_URL).toString(), req.body) + } if (adapter.lockedIds.includes(id)) return; console.log("processing -- not skipped"); @@ -248,15 +251,15 @@ export class WebhookController { createdBy, images: data.images ? data.images.map((i: string) => ({ - src: i, - })) + src: i, + })) : null, parent: data.parent && user ? { - id: data.parent.split("(")[1].split(")")[0], - username: user.username, - } + id: data.parent.split("(")[1].split(")")[0], + username: user.username, + } : null, createdAt: Timestamp.fromDate(new Date(Date.now())), userRetweets: [], @@ -279,11 +282,11 @@ export class WebhookController { updatedAt: now, lastMessage: data.lastMessage ? { - ...data.lastMessage, - timestamp: Timestamp.fromDate( - new Date(data.lastMessage.timestamp), - ), - } + ...data.lastMessage, + timestamp: Timestamp.fromDate( + new Date(data.lastMessage.timestamp), + ), + } : null, }; } diff --git a/platforms/blabsy/.env.development b/platforms/blabsy/.env.development deleted file mode 100644 index b68f47e9..00000000 --- a/platforms/blabsy/.env.development +++ /dev/null @@ -1,21 +0,0 @@ -# Dev URL -# NEXT_PUBLIC_URL=http://localhost -NEXT_PUBLIC_BASE_URL=http://192.168.0.231:4444 - -NEXT_PUBLIC_URL=https://blabsy.w3ds-prototype.merul.org -# NEXT_PUBLIC_BASE_URL=https://blabsy.w3ds-prototype.merul.org - -# Emulator -NEXT_PUBLIC_USE_EMULATOR=false - -# Firebase -NEXT_PUBLIC_API_KEY=AIzaSyBa59njuCotm34gRGuGd6_HOCmE0-sbF4A -NEXT_PUBLIC_AUTH_DOMAIN=blabsy-msf.firebaseapp.com -NEXT_PUBLIC_PROJECT_ID=blabsy-msf -NEXT_PUBLIC_STORAGE_BUCKET=blabsy-msf.firebasestorage.app -NEXT_PUBLIC_MESSAGING_SENDER_ID=876614847689 -NEXT_PUBLIC_APP_ID=1:876614847689:web:c90a9a6dbb2d0b87c2d118 -NEXT_PUBLIC_MEASUREMENT_ID=G-8Q1TEDQYT3 - -GOOGLE_APPLICATION_CREDENTIALS="/Users/mrl/Projects/metastate/platforms/blabsy/secrets/firebase-secrets.json" - diff --git a/platforms/pictique-api/src/controllers/WebhookController.ts b/platforms/pictique-api/src/controllers/WebhookController.ts index 0593eab8..387eac66 100644 --- a/platforms/pictique-api/src/controllers/WebhookController.ts +++ b/platforms/pictique-api/src/controllers/WebhookController.ts @@ -8,6 +8,7 @@ import { User } from "database/entities/User"; import { Chat } from "database/entities/Chat"; import { MessageService } from "../services/MessageService"; import { Post } from "database/entities/Post"; +import axios from "axios"; export class WebhookController { userService: UserService; @@ -28,7 +29,9 @@ export class WebhookController { handleWebhook = async (req: Request, res: Response) => { try { - console.log("raw hook", req.body); + if (process.env.ANCHR_URL) { + return axios.post(new URL(process.env.ANCHR_URL, process.env.PUBLIC_PICTIQUE_BASE_URL).toString(), req.body) + } const schemaId = req.body.schemaId; const globalId = req.body.id; const mapping = Object.values(this.adapter.mapping).find( diff --git a/platforms/pictique-api/src/web3adapter/controllers/WebhookController.ts b/platforms/pictique-api/src/web3adapter/controllers/WebhookController.ts deleted file mode 100644 index 7a5eb553..00000000 --- a/platforms/pictique-api/src/web3adapter/controllers/WebhookController.ts +++ /dev/null @@ -1,298 +0,0 @@ -import { Request, Response } from "express"; -import { TransformService } from "../services/TransformService"; -import { web3AdapterConfig } from "../config"; -import { EntityType, WebhookPayload, TransformContext } from "../types"; -import { AppDataSource } from "../../database/data-source"; -import { User } from "../../database/entities/User"; -import { Post } from "../../database/entities/Post"; -import { Comment } from "../../database/entities/Comment"; -import { Chat } from "../../database/entities/Chat"; -import { Message } from "../../database/entities/Message"; -import { MessageReadStatus } from "../../database/entities/MessageReadStatus"; -import { In } from "typeorm"; - -export class WebhookController { - private userRepository = AppDataSource.getRepository(User); - private postRepository = AppDataSource.getRepository(Post); - private commentRepository = AppDataSource.getRepository(Comment); - private chatRepository = AppDataSource.getRepository(Chat); - private messageRepository = AppDataSource.getRepository(Message); - private messageReadStatusRepository = AppDataSource.getRepository(MessageReadStatus); - - async handleWebhook(req: Request, res: Response) { - const payload = req.body as WebhookPayload; - console.log("Received webhook payload:", payload); - - // For now, we're not verifying signatures - // TODO: Implement signature verification - - try { - const entityType = this.getEntityTypeFromGlobal(payload.entityType); - if (!entityType) { - throw new Error(`Unsupported global ontology type: ${payload.entityType}`); - } - - const transformContext: TransformContext = { - platform: "blabsy", - entityType, - internalId: payload.metaEnvelopeId - }; - - const platformData = TransformService.getInstance().fromGlobalOntology( - entityType, - payload.payload, - transformContext - ); - - switch (payload.operation) { - case "create": - await this.handleCreate(entityType, platformData); - break; - case "update": - await this.handleUpdate(entityType, platformData); - break; - case "delete": - await this.handleDelete(entityType, platformData); - break; - default: - throw new Error(`Unsupported operation: ${payload.operation}`); - } - - res.status(200).json({ success: true }); - } catch (error) { - console.error("Error handling webhook:", error); - res.status(500).json({ error: (error as Error).message }); - } - } - - private getEntityTypeFromGlobal(globalType: string): EntityType | null { - const mapping = Object.entries(web3AdapterConfig.entityMappings).find( - ([_, value]) => value === globalType - ); - return mapping ? (mapping[0] as EntityType) : null; - } - - private async handleCreate(entityType: EntityType, data: any) { - switch (entityType) { - case "User": { - const user = this.userRepository.create({ - ename: data.ename, - handle: data.username, - name: data.displayName, - description: data.bio, - avatarUrl: data.avatarUrl - }); - await this.userRepository.save(user); - break; - } - case "Post": { - const author = await this.userRepository.findOneBy({ ename: data.authorEname }); - if (!author) throw new Error(`Author not found: ${data.authorEname}`); - - const post = this.postRepository.create({ - text: data.content, - images: data.images, - hashtags: data.hashtags, - author - }); - await this.postRepository.save(post); - break; - } - case "Comment": { - const author = await this.userRepository.findOneBy({ ename: data.authorEname }); - if (!author) throw new Error(`Author not found: ${data.authorEname}`); - - // Find the parent post by its meta envelope ID - const parentPost = await this.postRepository.findOne({ - where: { id: data.parentId }, - relations: ["author"] - }); - if (!parentPost) throw new Error(`Parent post not found: ${data.parentId}`); - - const comment = this.commentRepository.create({ - text: data.content, - author, - post: parentPost - }); - await this.commentRepository.save(comment); - break; - } - case "Chat": { - const participants = await this.userRepository.findBy({ - ename: In(data.participants) - }); - if (participants.length === 0) { - throw new Error("No participants found"); - } - - const chat = this.chatRepository.create({ - name: data.name, - participants - }); - await this.chatRepository.save(chat); - break; - } - case "Message": { - const sender = await this.userRepository.findOneBy({ ename: data.authorEname }); - if (!sender) throw new Error(`Sender not found: ${data.authorEname}`); - - const chat = await this.chatRepository.findOneBy({ id: data.chatId }); - if (!chat) throw new Error(`Chat not found: ${data.chatId}`); - - const message = this.messageRepository.create({ - text: data.content, - sender, - chat - }); - await this.messageRepository.save(message); - - // Create read statuses for all chat participants except the sender - const readStatuses = chat.participants - .filter(p => p.ename !== data.authorEname) - .map(participant => - this.messageReadStatusRepository.create({ - message, - user: participant, - isRead: false - }) - ); - await this.messageReadStatusRepository.save(readStatuses); - break; - } - case "MessageReadStatus": { - const message = await this.messageRepository.findOneBy({ id: data.messageId }); - if (!message) throw new Error(`Message not found: ${data.messageId}`); - - const user = await this.userRepository.findOneBy({ ename: data.userEname }); - if (!user) throw new Error(`User not found: ${data.userEname}`); - - const readStatus = this.messageReadStatusRepository.create({ - message, - user, - isRead: data.isRead - }); - await this.messageReadStatusRepository.save(readStatus); - break; - } - } - } - - private async handleUpdate(entityType: EntityType, data: any) { - switch (entityType) { - case "User": { - const user = await this.userRepository.findOneBy({ ename: data.ename }); - if (!user) throw new Error(`User not found: ${data.ename}`); - - Object.assign(user, { - handle: data.username, - name: data.displayName, - description: data.bio, - avatarUrl: data.avatarUrl - }); - await this.userRepository.save(user); - break; - } - case "Post": { - const post = await this.postRepository.findOneBy({ id: data.id }); - if (!post) throw new Error(`Post not found: ${data.id}`); - - Object.assign(post, { - text: data.content, - images: data.images, - hashtags: data.hashtags - }); - await this.postRepository.save(post); - break; - } - case "Comment": { - const comment = await this.commentRepository.findOneBy({ id: data.id }); - if (!comment) throw new Error(`Comment not found: ${data.id}`); - - Object.assign(comment, { - text: data.content - }); - await this.commentRepository.save(comment); - break; - } - case "Chat": { - const chat = await this.chatRepository.findOneBy({ id: data.id }); - if (!chat) throw new Error(`Chat not found: ${data.id}`); - - const participants = await this.userRepository.findBy({ - ename: In(data.participants) - }); - if (participants.length === 0) { - throw new Error("No participants found"); - } - - Object.assign(chat, { - name: data.name, - participants - }); - await this.chatRepository.save(chat); - break; - } - case "Message": { - const message = await this.messageRepository.findOneBy({ id: data.id }); - if (!message) throw new Error(`Message not found: ${data.id}`); - - Object.assign(message, { - text: data.content - }); - await this.messageRepository.save(message); - break; - } - case "MessageReadStatus": { - const readStatus = await this.messageReadStatusRepository.findOneBy({ id: data.id }); - if (!readStatus) throw new Error(`Read status not found: ${data.id}`); - - Object.assign(readStatus, { - isRead: data.isRead - }); - await this.messageReadStatusRepository.save(readStatus); - break; - } - } - } - - private async handleDelete(entityType: EntityType, data: any) { - switch (entityType) { - case "User": { - const user = await this.userRepository.findOneBy({ ename: data.ename }); - if (!user) throw new Error(`User not found: ${data.ename}`); - await this.userRepository.softDelete(user.id); - break; - } - case "Post": { - const post = await this.postRepository.findOneBy({ id: data.id }); - if (!post) throw new Error(`Post not found: ${data.id}`); - await this.postRepository.softDelete(post.id); - break; - } - case "Comment": { - const comment = await this.commentRepository.findOneBy({ id: data.id }); - if (!comment) throw new Error(`Comment not found: ${data.id}`); - await this.commentRepository.softDelete(comment.id); - break; - } - case "Chat": { - const chat = await this.chatRepository.findOneBy({ id: data.id }); - if (!chat) throw new Error(`Chat not found: ${data.id}`); - await this.chatRepository.softDelete(chat.id); - break; - } - case "Message": { - const message = await this.messageRepository.findOneBy({ id: data.id }); - if (!message) throw new Error(`Message not found: ${data.id}`); - await this.messageRepository.softDelete(message.id); - break; - } - case "MessageReadStatus": { - const readStatus = await this.messageReadStatusRepository.findOneBy({ id: data.id }); - if (!readStatus) throw new Error(`Read status not found: ${data.id}`); - await this.messageReadStatusRepository.softDelete(readStatus.id); - break; - } - } - } -} \ No newline at end of file From 7472949cc82828504005fb07265c825c12970e37 Mon Sep 17 00:00:00 2001 From: coodos Date: Mon, 7 Jul 2025 23:21:18 +0530 Subject: [PATCH 2/4] chore: add things to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 63cf0569..cc006b58 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ node_modules .pnp .pnp.js +.env.development + # Local env files .env .env.local From a3a7683f34c17b3863b532c12caa6f0bb9d83edc Mon Sep 17 00:00:00 2001 From: coodos Date: Tue, 8 Jul 2025 00:42:16 +0530 Subject: [PATCH 3/4] chore: add debug hosts --- pglite-debug.log | 0 platforms/blabsy/pglite-debug.log | 0 platforms/pictique/vite.config.ts | 12 ++++++++---- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 pglite-debug.log create mode 100644 platforms/blabsy/pglite-debug.log diff --git a/pglite-debug.log b/pglite-debug.log new file mode 100644 index 00000000..e69de29b diff --git a/platforms/blabsy/pglite-debug.log b/platforms/blabsy/pglite-debug.log new file mode 100644 index 00000000..e69de29b diff --git a/platforms/pictique/vite.config.ts b/platforms/pictique/vite.config.ts index 73d957c9..a23ecdce 100644 --- a/platforms/pictique/vite.config.ts +++ b/platforms/pictique/vite.config.ts @@ -3,8 +3,12 @@ import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; export default defineConfig({ - plugins: [tailwindcss(), sveltekit()], - server: { - allowedHosts: ["pictique.w3ds-prototype.merul.org"] - } + plugins: [tailwindcss(), sveltekit()], + server: { + allowedHosts: [ + 'pictique.w3ds-prototype.merul.org', + 'pictique.staging.metastate.foundation', + 'pictique.w3ds.metastate.foundation' + ] + } }); From d02dd188134f3e0016f805591a3b1fe36a2cc7f8 Mon Sep 17 00:00:00 2001 From: coodos Date: Tue, 8 Jul 2025 01:55:08 +0530 Subject: [PATCH 4/4] chore: fix wrong endpoints --- .../src-tauri/gen/android/.idea/.gitignore | 3 - .../android/.idea/AndroidProjectSystem.xml | 6 -- .../gen/android/.idea/appInsightsSettings.xml | 6 -- .../src-tauri/gen/android/.idea/compiler.xml | 6 -- .../.idea/deploymentTargetSelector.xml | 18 ---- .../gen/android/.idea/deviceManager.xml | 13 --- .../src-tauri/gen/android/.idea/gradle.xml | 36 ------- .../src-tauri/gen/android/.idea/kotlinc.xml | 6 -- .../gen/android/.idea/migrations.xml | 10 -- .../src-tauri/gen/android/.idea/misc.xml | 9 -- .../gen/android/.idea/runConfigurations.xml | 17 ---- .../src-tauri/gen/android/.idea/vcs.xml | 6 -- .../gen/android/app/build.gradle.kts | 2 +- .../java/com/eid_wallet/app/MainActivity.kt | 3 - .../com/eid_wallet/app/kotlin/BuildTask.kt | 52 ---------- .../com/eid_wallet/app/kotlin/RustPlugin.kt | 85 ---------------- .../eid-wallet/src-tauri/icons/icon.icns | Bin 155435 -> 155435 bytes infrastructure/eid-wallet/vite.config.js | 44 ++++---- .../src/controllers/WebhookController.ts | 2 +- .../src/controllers/WebhookController.ts | 2 +- pnpm-lock.yaml | 95 +++--------------- 21 files changed, 39 insertions(+), 382 deletions(-) delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/.gitignore delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/AndroidProjectSystem.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/appInsightsSettings.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/compiler.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/deploymentTargetSelector.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/deviceManager.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/gradle.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/kotlinc.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/migrations.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/misc.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/runConfigurations.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/.idea/vcs.xml delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/app/src/main/java/com/eid_wallet/app/MainActivity.kt delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/buildSrc/src/main/java/com/eid_wallet/app/kotlin/BuildTask.kt delete mode 100644 infrastructure/eid-wallet/src-tauri/gen/android/buildSrc/src/main/java/com/eid_wallet/app/kotlin/RustPlugin.kt diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/.gitignore b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/.gitignore deleted file mode 100644 index 26d33521..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/AndroidProjectSystem.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/AndroidProjectSystem.xml deleted file mode 100644 index 4a53bee8..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/AndroidProjectSystem.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/appInsightsSettings.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/appInsightsSettings.xml deleted file mode 100644 index 6bbe2aee..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/appInsightsSettings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/compiler.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/compiler.xml deleted file mode 100644 index b86273d9..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/deploymentTargetSelector.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/deploymentTargetSelector.xml deleted file mode 100644 index fecd1250..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/deploymentTargetSelector.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/deviceManager.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/deviceManager.xml deleted file mode 100644 index 91f95584..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/deviceManager.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/gradle.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/gradle.xml deleted file mode 100644 index 8080c21c..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/gradle.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/kotlinc.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/kotlinc.xml deleted file mode 100644 index 4cb74572..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/kotlinc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/migrations.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/migrations.xml deleted file mode 100644 index f8051a6f..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/migrations.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/misc.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/misc.xml deleted file mode 100644 index b2c751a3..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/misc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/runConfigurations.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/runConfigurations.xml deleted file mode 100644 index 16660f1d..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/runConfigurations.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/vcs.xml b/infrastructure/eid-wallet/src-tauri/gen/android/.idea/vcs.xml deleted file mode 100644 index bc599707..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/app/build.gradle.kts b/infrastructure/eid-wallet/src-tauri/gen/android/app/build.gradle.kts index fcdae38c..c2b210fd 100644 --- a/infrastructure/eid-wallet/src-tauri/gen/android/app/build.gradle.kts +++ b/infrastructure/eid-wallet/src-tauri/gen/android/app/build.gradle.kts @@ -17,7 +17,7 @@ android { compileSdk = 34 namespace = "foundation.metastate.eid_wallet" defaultConfig { - manifestPlaceholders["usesCleartextTraffic"] = "true" + manifestPlaceholders["usesCleartextTraffic"] = "false" applicationId = "foundation.metastate.eid_wallet" minSdk = 24 targetSdk = 34 diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/app/src/main/java/com/eid_wallet/app/MainActivity.kt b/infrastructure/eid-wallet/src-tauri/gen/android/app/src/main/java/com/eid_wallet/app/MainActivity.kt deleted file mode 100644 index f4ab22c6..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/app/src/main/java/com/eid_wallet/app/MainActivity.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.eid_wallet.app - -class MainActivity : TauriActivity() \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/buildSrc/src/main/java/com/eid_wallet/app/kotlin/BuildTask.kt b/infrastructure/eid-wallet/src-tauri/gen/android/buildSrc/src/main/java/com/eid_wallet/app/kotlin/BuildTask.kt deleted file mode 100644 index f9874825..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/buildSrc/src/main/java/com/eid_wallet/app/kotlin/BuildTask.kt +++ /dev/null @@ -1,52 +0,0 @@ -import java.io.File -import org.apache.tools.ant.taskdefs.condition.Os -import org.gradle.api.DefaultTask -import org.gradle.api.GradleException -import org.gradle.api.logging.LogLevel -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.TaskAction - -open class BuildTask : DefaultTask() { - @Input - var rootDirRel: String? = null - @Input - var target: String? = null - @Input - var release: Boolean? = null - - @TaskAction - fun assemble() { - val executable = """pnpm"""; - try { - runTauriCli(executable) - } catch (e: Exception) { - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - runTauriCli("$executable.cmd") - } else { - throw e; - } - } - } - - fun runTauriCli(executable: String) { - val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null") - val target = target ?: throw GradleException("target cannot be null") - val release = release ?: throw GradleException("release cannot be null") - val args = listOf("tauri", "android", "android-studio-script"); - - project.exec { - workingDir(File(project.projectDir, rootDirRel)) - executable(executable) - args(args) - if (project.logger.isEnabled(LogLevel.DEBUG)) { - args("-vv") - } else if (project.logger.isEnabled(LogLevel.INFO)) { - args("-v") - } - if (release) { - args("--release") - } - args(listOf("--target", target)) - }.assertNormalExitValue() - } -} \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/gen/android/buildSrc/src/main/java/com/eid_wallet/app/kotlin/RustPlugin.kt b/infrastructure/eid-wallet/src-tauri/gen/android/buildSrc/src/main/java/com/eid_wallet/app/kotlin/RustPlugin.kt deleted file mode 100644 index 4aa7fcaf..00000000 --- a/infrastructure/eid-wallet/src-tauri/gen/android/buildSrc/src/main/java/com/eid_wallet/app/kotlin/RustPlugin.kt +++ /dev/null @@ -1,85 +0,0 @@ -import com.android.build.api.dsl.ApplicationExtension -import org.gradle.api.DefaultTask -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.kotlin.dsl.configure -import org.gradle.kotlin.dsl.get - -const val TASK_GROUP = "rust" - -open class Config { - lateinit var rootDirRel: String -} - -open class RustPlugin : Plugin { - private lateinit var config: Config - - override fun apply(project: Project) = with(project) { - config = extensions.create("rust", Config::class.java) - - val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64"); - val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList - - val defaultArchList = listOf("arm64", "arm", "x86", "x86_64"); - val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList - - val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64") - - extensions.configure { - @Suppress("UnstableApiUsage") - flavorDimensions.add("abi") - productFlavors { - create("universal") { - dimension = "abi" - ndk { - abiFilters += abiList - } - } - defaultArchList.forEachIndexed { index, arch -> - create(arch) { - dimension = "abi" - ndk { - abiFilters.add(defaultAbiList[index]) - } - } - } - } - } - - afterEvaluate { - for (profile in listOf("debug", "release")) { - val profileCapitalized = profile.replaceFirstChar { it.uppercase() } - val buildTask = tasks.maybeCreate( - "rustBuildUniversal$profileCapitalized", - DefaultTask::class.java - ).apply { - group = TASK_GROUP - description = "Build dynamic library in $profile mode for all targets" - } - - tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask) - - for (targetPair in targetsList.withIndex()) { - val targetName = targetPair.value - val targetArch = archList[targetPair.index] - val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() } - val targetBuildTask = project.tasks.maybeCreate( - "rustBuild$targetArchCapitalized$profileCapitalized", - BuildTask::class.java - ).apply { - group = TASK_GROUP - description = "Build dynamic library in $profile mode for $targetArch" - rootDirRel = config.rootDirRel - target = targetName - release = profile == "release" - } - - buildTask.dependsOn(targetBuildTask) - tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn( - targetBuildTask - ) - } - } - } - } -} \ No newline at end of file diff --git a/infrastructure/eid-wallet/src-tauri/icons/icon.icns b/infrastructure/eid-wallet/src-tauri/icons/icon.icns index 6d64aa46080fe0c2c98baeaced3149b150ba8953..644f29ee2b9d352deb9d3d695375cfb99e9a3e73 100644 GIT binary patch delta 81 zcmV-X0IvV5z6qy;Gx7_9dB@3|$)dB`FF#rGs2$$jJ0TZ(l nhwlWl&KWFiw*&G4C~dR ({ - plugins: [tailwindcss(), sveltekit()], + plugins: [tailwindcss(), sveltekit()], - // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` - // - // 1. prevent vite from obscuring rust errors - clearScreen: false, - // 2. tauri expects a fixed port, fail if that port is not available - server: { - port: 1420, - strictPort: true, - host: host || false, - hmr: host - ? { - protocol: "ws", - host, - port: 1421, - } - : undefined, - watch: { - // 3. tell vite to ignore watching `src-tauri` - ignored: ["**/src-tauri/**"], - }, - }, + // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` + // + // 1. prevent vite from obscuring rust errors + clearScreen: false, + // 2. tauri expects a fixed port, fail if that port is not available + server: { + port: 1420, + strictPort: true, + host: host || false, + hmr: host + ? { + protocol: "ws", + host, + port: 1421, + } + : undefined, + watch: { + // 3. tell vite to ignore watching `src-tauri` + ignored: ["**/src-tauri/**"], + }, + }, })); diff --git a/platforms/blabsy-w3ds-auth-api/src/controllers/WebhookController.ts b/platforms/blabsy-w3ds-auth-api/src/controllers/WebhookController.ts index 17d9af17..d8ff5a61 100644 --- a/platforms/blabsy-w3ds-auth-api/src/controllers/WebhookController.ts +++ b/platforms/blabsy-w3ds-auth-api/src/controllers/WebhookController.ts @@ -88,7 +88,7 @@ export class WebhookController { const { data, schemaId, id } = req.body; if (process.env.ANCHR_URL) { - return axios.post(new URL(process.env.ANCHR_URL, process.env.PUBLIC_BLABSY_BASE_URL).toString(), req.body) + axios.post(new URL("pictique", process.env.ANCHR_URL).toString(), req.body) } if (adapter.lockedIds.includes(id)) return; diff --git a/platforms/pictique-api/src/controllers/WebhookController.ts b/platforms/pictique-api/src/controllers/WebhookController.ts index 387eac66..1570630a 100644 --- a/platforms/pictique-api/src/controllers/WebhookController.ts +++ b/platforms/pictique-api/src/controllers/WebhookController.ts @@ -30,7 +30,7 @@ export class WebhookController { handleWebhook = async (req: Request, res: Response) => { try { if (process.env.ANCHR_URL) { - return axios.post(new URL(process.env.ANCHR_URL, process.env.PUBLIC_PICTIQUE_BASE_URL).toString(), req.body) + axios.post(new URL("blabsy", process.env.ANCHR_URL).toString(), req.body) } const schemaId = req.body.schemaId; const globalId = req.body.id; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 754a3c67..ca1ebc72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -396,10 +396,10 @@ importers: version: 8.57.1 jest: specifier: ^29.5.0 - version: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)) + version: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0) ts-jest: specifier: ^29.1.0 - version: 29.3.4(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)))(typescript@5.8.3) + version: 29.3.4(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0))(typescript@5.8.3) typescript: specifier: ^5.0.4 version: 5.8.3 @@ -10628,41 +10628,6 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3))': - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.50 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.9.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - '@jest/environment@28.1.3': dependencies: '@jest/fake-timers': 28.1.3 @@ -13766,13 +13731,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)): + create-jest@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -15971,16 +15936,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)): + jest-cli@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.50)(typescript@5.8.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)) + create-jest: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -16081,38 +16046,7 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)): - dependencies: - '@babel/core': 7.27.1 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.27.1) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0(babel-plugin-macros@3.1.0) - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.17.50 - ts-node: 10.9.2(@types/node@24.0.10)(typescript@5.8.3) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - jest-config@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)): + jest-config@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0): dependencies: '@babel/core': 7.27.1 '@jest/test-sequencer': 29.7.0 @@ -16138,7 +16072,6 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 24.0.10 - ts-node: 10.9.2(@types/node@24.0.10)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -16613,12 +16546,12 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)): + jest@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.50)(typescript@5.8.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)) + jest-cli: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -18991,12 +18924,12 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.27.1) - ts-jest@29.3.4(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)))(typescript@5.8.3): + ts-jest@29.3.4(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.0.10)(typescript@5.8.3)) + jest: 29.7.0(@types/node@24.0.10)(babel-plugin-macros@3.1.0) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2