From 26004f93e4d831a333c199a3ffab2efc3e5fbb95 Mon Sep 17 00:00:00 2001 From: Jonas Strehle Date: Sat, 12 Oct 2024 13:06:15 +0200 Subject: [PATCH] Prepeare for UIX@0.3.x --- .github/workflows/uix-deploy-prod.yml | 3 ++- .vscode/settings.json | 3 +++ common/TOR-Worker.ts | 1 - common/components/MainPage.tsx | 4 ++-- deno.json | 2 +- frontend/entrypoint.tsx | 5 +++-- importmap.dev.json | 3 --- 7 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/uix-deploy-prod.yml b/.github/workflows/uix-deploy-prod.yml index 8672799..3a4925f 100644 --- a/.github/workflows/uix-deploy-prod.yml +++ b/.github/workflows/uix-deploy-prod.yml @@ -4,6 +4,7 @@ name: Deploy prod on: push env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + HOST_TOKEN: ${{secrets.HOST_TOKEN}} jobs: deploy: runs-on: ubuntu-latest @@ -15,4 +16,4 @@ jobs: - name: Setup Deno uses: "denoland/setup-deno@v1" - name: Deploy UIX App - run: "deno run --importmap ./importmap.json -Aqr https://cdn.unyt.org/uix@0.2.x/run.ts --stage prod --detach" + run: "deno run --importmap ./importmap.dev.json -Aqr https://dev.cdn.unyt.org/uix1/run.ts --stage prod --detach" diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3c2e53b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "deno.enable": true +} \ No newline at end of file diff --git a/common/TOR-Worker.ts b/common/TOR-Worker.ts index 099e76f..87b26ca 100644 --- a/common/TOR-Worker.ts +++ b/common/TOR-Worker.ts @@ -2,7 +2,6 @@ const ed = await import("https://unpkg.com/@noble/ed25519@2.0.0/index.js"); const base32 = await import("https://cdn.jsdelivr.net/npm/hi-base32@0.5.1/+esm"); await import("https://cdn.jsdelivr.net/npm/js-sha3@0.9.2/src/sha3.min.js"); - export type AddressData = { address: string; public: { diff --git a/common/components/MainPage.tsx b/common/components/MainPage.tsx index 7eca484..c150471 100644 --- a/common/components/MainPage.tsx +++ b/common/components/MainPage.tsx @@ -1,7 +1,7 @@ import { template } from "uix/html/template.ts"; import { Component } from "uix/components/Component.ts"; -import { spawnThreads, spawnThread } from "unyt_core/threads/threads.ts"; -import { always, map } from "unyt_core/functions.ts"; +import { spawnThreads, spawnThread } from "datex-core-legacy/threads/threads.ts"; +import { always, map } from "datex-core-legacy/functions.ts"; import type { AddressData } from "common/TOR-Worker.ts"; @template(function(this: MainPage) { diff --git a/deno.json b/deno.json index 810ddf7..e509330 100644 --- a/deno.json +++ b/deno.json @@ -1,5 +1,5 @@ { - "_publicImportMap": "./importmap.json", + "_publicImportMap": "./importmap.dev.json", "importMap": "./.datex-cache/importmap.lock.json", "compilerOptions": { "jsx": "react-jsx", diff --git a/frontend/entrypoint.tsx b/frontend/entrypoint.tsx index af3d005..8e97fe5 100644 --- a/frontend/entrypoint.tsx +++ b/frontend/entrypoint.tsx @@ -1,2 +1,3 @@ -import { MainPage } from "../common/components/MainPage.tsx"; -export default +import { type Entrypoint } from "uix/providers/entrypoints.ts"; +import { MainPage } from "common/components/MainPage.tsx"; +export default satisfies Entrypoint; \ No newline at end of file diff --git a/importmap.dev.json b/importmap.dev.json index 7d714ef..507fb3d 100644 --- a/importmap.dev.json +++ b/importmap.dev.json @@ -1,10 +1,7 @@ { "imports": { - "components/": "https://cdn.unyt.org/uix-components-new/", "datex-core-legacy": "https://dev.cdn.unyt.org/unyt_core/datex.ts", "datex-core-legacy/": "https://dev.cdn.unyt.org/unyt_core/", - "unyt_core": "https://dev.cdn.unyt.org/unyt_core/datex.ts", - "unyt_core/": "https://dev.cdn.unyt.org/unyt_core/", "uix": "https://dev.cdn.unyt.org/uix1/uix.ts", "uix/": "https://dev.cdn.unyt.org/uix1/src/", "uix/jsx-runtime": "https://dev.cdn.unyt.org/uix1/src/jsx-runtime/jsx.ts",