From d9f3f0c972bea2e7fd14e9913c105fe0d70a90bf Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:15:59 +0900 Subject: [PATCH] wip --- packages/frontend-shared/js/media-proxy.ts | 2 +- packages/frontend-shared/package.json | 3 ++- packages/sw/src/scripts/lang.ts | 2 +- packages/sw/src/sw.ts | 2 +- packages/sw/tsconfig.json | 3 ++- pnpm-lock.yaml | 13 ++++++++----- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/frontend-shared/js/media-proxy.ts b/packages/frontend-shared/js/media-proxy.ts index fcfbac61dc..63c6bf9bee 100644 --- a/packages/frontend-shared/js/media-proxy.ts +++ b/packages/frontend-shared/js/media-proxy.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import { query } from '@@/js/url.js'; +import { query } from './url.js'; import * as Misskey from 'misskey-js'; export class MediaProxy { diff --git a/packages/frontend-shared/package.json b/packages/frontend-shared/package.json index 1a81edf29b..22fb907616 100644 --- a/packages/frontend-shared/package.json +++ b/packages/frontend-shared/package.json @@ -31,6 +31,7 @@ "js-built" ], "dependencies": { - "vue": "3.4.37" + "vue": "3.4.37", + "misskey-js": "workspace:*" } } diff --git a/packages/sw/src/scripts/lang.ts b/packages/sw/src/scripts/lang.ts index 0db4cc6381..3000160e41 100644 --- a/packages/sw/src/scripts/lang.ts +++ b/packages/sw/src/scripts/lang.ts @@ -7,7 +7,7 @@ * Language manager for SW */ import { get, set } from 'idb-keyval'; -import { I18n } from '../../../frontend/src/scripts/i18n.js'; +import { I18n } from '@@/js/i18n.js'; import type { Locale } from '../../../../locales/index.js'; class SwLang { diff --git a/packages/sw/src/sw.ts b/packages/sw/src/sw.ts index 2d39d23ec7..bf980b83a4 100644 --- a/packages/sw/src/sw.ts +++ b/packages/sw/src/sw.ts @@ -6,7 +6,7 @@ import { get } from 'idb-keyval'; import * as Misskey from 'misskey-js'; import type { PushNotificationDataMap } from '@/types.js'; -import type { I18n } from '../../frontend/src/scripts/i18n.js'; +import type { I18n } from '@@/js/i18n.js'; import type { Locale } from '../../../locales/index.js'; import { createEmptyNotification, createNotification } from '@/scripts/create-notification.js'; import { swLang } from '@/scripts/lang.js'; diff --git a/packages/sw/tsconfig.json b/packages/sw/tsconfig.json index f3f3543013..2712475a37 100644 --- a/packages/sw/tsconfig.json +++ b/packages/sw/tsconfig.json @@ -21,7 +21,8 @@ "isolatedModules": true, "baseUrl": ".", "paths": { - "@/*": ["./src/*"] + "@/*": ["./src/*"], + "@@/*": ["../frontend-shared/*"] }, "typeRoots": [ "./node_modules/@types", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 256105ac41..fdb2e56a6c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1257,6 +1257,9 @@ importers: packages/frontend-shared: dependencies: + misskey-js: + specifier: workspace:* + version: link:../misskey-js vue: specifier: 3.4.37 version: 3.4.37(typescript@5.5.4) @@ -11808,8 +11811,8 @@ packages: vue-component-type-helpers@2.0.29: resolution: {integrity: sha512-58i+ZhUAUpwQ+9h5Hck0D+jr1qbYl4voRt5KffBx8qzELViQ4XdT/Tuo+mzq8u63teAG8K0lLaOiL5ofqW38rg==} - vue-component-type-helpers@2.1.2: - resolution: {integrity: sha512-URuxnrOhO9lUG4LOAapGWBaa/WOLDzzyAbL+uKZqT7RS+PFy0cdXI2mUSh7GaMts6vtHaeVbGk7trd0FPJi65Q==} + vue-component-type-helpers@2.1.4: + resolution: {integrity: sha512-aVqB3KxwpM76cYRkpnezl1J62E/1omzHQfx1yuz7zcbxmzmP/PeSgI20NEmkdeGnjZPVzm0V9fB4ZyRu5BBj4A==} vue-demi@0.14.7: resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} @@ -16439,7 +16442,7 @@ snapshots: ts-dedent: 2.2.0 type-fest: 2.19.0 vue: 3.4.37(typescript@5.5.4) - vue-component-type-helpers: 2.1.2 + vue-component-type-helpers: 2.1.4 transitivePeerDependencies: - encoding - prettier @@ -16458,7 +16461,7 @@ snapshots: ts-dedent: 2.2.0 type-fest: 2.19.0 vue: 3.4.37(typescript@5.5.4) - vue-component-type-helpers: 2.1.2 + vue-component-type-helpers: 2.1.4 '@swc/cli@0.3.12(@swc/core@1.6.6)(chokidar@3.5.3)': dependencies: @@ -24866,7 +24869,7 @@ snapshots: vue-component-type-helpers@2.0.29: {} - vue-component-type-helpers@2.1.2: {} + vue-component-type-helpers@2.1.4: {} vue-demi@0.14.7(vue@3.4.37(typescript@5.5.4)): dependencies: