update deps (MisskeyIO#950)
This commit is contained in:
parent
b85f6e9b75
commit
60684568e5
24 changed files with 3418 additions and 3463 deletions
|
@ -15,7 +15,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
WORKDIR /misskey
|
WORKDIR /misskey
|
||||||
|
|
||||||
COPY --link pnpm-lock.yaml ./
|
COPY --link pnpm-lock.yaml ./
|
||||||
RUN npm install -g pnpm@9
|
RUN npm install -g pnpm@10
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
||||||
pnpm fetch --ignore-scripts
|
pnpm fetch --ignore-scripts
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ RUN apt-get update \
|
||||||
WORKDIR /misskey
|
WORKDIR /misskey
|
||||||
|
|
||||||
COPY --link pnpm-lock.yaml ./
|
COPY --link pnpm-lock.yaml ./
|
||||||
RUN npm install -g pnpm@9
|
RUN npm install -g pnpm@10
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
||||||
pnpm fetch --ignore-scripts
|
pnpm fetch --ignore-scripts
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ RUN apt-get update \
|
||||||
WORKDIR /misskey
|
WORKDIR /misskey
|
||||||
|
|
||||||
COPY --chown=misskey:misskey pnpm-lock.yaml ./
|
COPY --chown=misskey:misskey pnpm-lock.yaml ./
|
||||||
RUN npm install -g pnpm@9
|
RUN npm install -g pnpm@10
|
||||||
|
|
||||||
COPY --chown=misskey:misskey --from=target-builder /misskey/node_modules ./node_modules
|
COPY --chown=misskey:misskey --from=target-builder /misskey/node_modules ./node_modules
|
||||||
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/backend/node_modules ./packages/backend/node_modules
|
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/backend/node_modules ./packages/backend/node_modules
|
||||||
|
|
24
package.json
24
package.json
|
@ -6,7 +6,7 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/MisskeyIO/misskey.git"
|
"url": "https://github.com/MisskeyIO/misskey.git"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.15.4",
|
"packageManager": "pnpm@10.7.0",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/frontend",
|
"packages/frontend",
|
||||||
"packages/backend",
|
"packages/backend",
|
||||||
|
@ -46,38 +46,42 @@
|
||||||
"cleanall": "pnpm clean-all"
|
"cleanall": "pnpm clean-all"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
|
"@aiscript-dev/aiscript-languageserver": "github:aiscript-dev/aiscript-languageserver#0.1.6",
|
||||||
"@tensorflow/tfjs-core": "4.22.0",
|
"@tensorflow/tfjs-core": "4.22.0",
|
||||||
"axios": "1.7.9",
|
"axios": "1.8.4",
|
||||||
"chokidar": "4.0.3",
|
"chokidar": "4.0.3",
|
||||||
"cookie": "1.0.2",
|
"cookie": "1.0.2",
|
||||||
"cookie-signature": "1.2.2",
|
"cookie-signature": "1.2.2",
|
||||||
"debug": "4.4.0",
|
"debug": "4.4.0",
|
||||||
"esbuild": "0.24.2",
|
"esbuild": "0.25.2",
|
||||||
"jpeg-js": "0.4.4",
|
"jpeg-js": "0.4.4",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"sharp": "0.33.5",
|
"sharp": "0.33.5",
|
||||||
"tough-cookie": "5.1.0",
|
"tough-cookie": "5.1.2",
|
||||||
"web-streams-polyfill": "4.1.0"
|
"web-streams-polyfill": "4.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cssnano": "7.0.6",
|
"cssnano": "7.0.6",
|
||||||
"execa": "9.5.2",
|
"execa": "9.5.2",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"postcss": "8.5.1",
|
"postcss": "8.5.3",
|
||||||
"terser": "5.37.0",
|
"terser": "5.39.0",
|
||||||
"typescript": "5.7.3"
|
"typescript": "5.8.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "22.13.0",
|
"@types/node": "22.13.14",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "14.0.1",
|
"cypress": "14.2.1",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"ncp": "2.0.0",
|
"ncp": "2.0.0",
|
||||||
"start-server-and-test": "2.0.10"
|
"start-server-and-test": "2.0.11"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@tensorflow/tfjs-core": "4.22.0"
|
"@tensorflow/tfjs-core": "4.22.0"
|
||||||
|
},
|
||||||
|
"pnpm": {
|
||||||
|
"neverBuiltDependencies": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,16 +33,16 @@
|
||||||
"generate-api-json": "pnpm build && node ./scripts/generate_api_json.js"
|
"generate-api-json": "pnpm build && node ./scripts/generate_api_json.js"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@swc/core-darwin-arm64": "1.10.12",
|
"@swc/core-darwin-arm64": "1.11.13",
|
||||||
"@swc/core-darwin-x64": "1.10.12",
|
"@swc/core-darwin-x64": "1.11.13",
|
||||||
"@swc/core-linux-arm-gnueabihf": "1.10.12",
|
"@swc/core-linux-arm-gnueabihf": "1.11.13",
|
||||||
"@swc/core-linux-arm64-gnu": "1.10.12",
|
"@swc/core-linux-arm64-gnu": "1.11.13",
|
||||||
"@swc/core-linux-arm64-musl": "1.10.12",
|
"@swc/core-linux-arm64-musl": "1.11.13",
|
||||||
"@swc/core-linux-x64-gnu": "1.10.12",
|
"@swc/core-linux-x64-gnu": "1.11.13",
|
||||||
"@swc/core-linux-x64-musl": "1.10.12",
|
"@swc/core-linux-x64-musl": "1.11.13",
|
||||||
"@swc/core-win32-arm64-msvc": "1.10.12",
|
"@swc/core-win32-arm64-msvc": "1.11.13",
|
||||||
"@swc/core-win32-ia32-msvc": "1.10.12",
|
"@swc/core-win32-ia32-msvc": "1.11.13",
|
||||||
"@swc/core-win32-x64-msvc": "1.10.12",
|
"@swc/core-win32-x64-msvc": "1.11.13",
|
||||||
"@tensorflow/tfjs": "4.22.0",
|
"@tensorflow/tfjs": "4.22.0",
|
||||||
"@tensorflow/tfjs-node": "4.22.0",
|
"@tensorflow/tfjs-node": "4.22.0",
|
||||||
"bufferutil": "4.0.9",
|
"bufferutil": "4.0.9",
|
||||||
|
@ -63,94 +63,94 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@authenio/samlify-node-xmllint": "2.0.0",
|
"@authenio/samlify-node-xmllint": "2.0.0",
|
||||||
"@aws-sdk/client-s3": "3.740.0",
|
"@aws-sdk/client-s3": "3.777.0",
|
||||||
"@aws-sdk/lib-storage": "3.740.0",
|
"@aws-sdk/lib-storage": "3.777.0",
|
||||||
"@bull-board/api": "6.7.4",
|
"@bull-board/api": "6.7.10",
|
||||||
"@bull-board/fastify": "6.7.4",
|
"@bull-board/fastify": "6.7.10",
|
||||||
"@bull-board/ui": "6.7.4",
|
"@bull-board/ui": "6.7.10",
|
||||||
"@discordapp/twemoji": "15.1.0",
|
"@discordapp/twemoji": "15.1.0",
|
||||||
"@elastic/elasticsearch": "8.17.0",
|
"@elastic/elasticsearch": "8.17.1",
|
||||||
"@fastify/accepts": "5.0.2",
|
"@fastify/accepts": "5.0.2",
|
||||||
"@fastify/cookie": "11.0.2",
|
"@fastify/cookie": "11.0.2",
|
||||||
"@fastify/cors": "10.0.2",
|
"@fastify/cors": "11.0.1",
|
||||||
"@fastify/express": "4.0.2",
|
"@fastify/express": "4.0.2",
|
||||||
"@fastify/formbody": "8.0.2",
|
"@fastify/formbody": "8.0.2",
|
||||||
"@fastify/http-proxy": "11.0.1",
|
"@fastify/http-proxy": "11.1.2",
|
||||||
"@fastify/multipart": "9.0.3",
|
"@fastify/multipart": "9.0.3",
|
||||||
"@fastify/static": "8.0.4",
|
"@fastify/static": "8.1.1",
|
||||||
"@fastify/view": "10.0.2",
|
"@fastify/view": "11.0.0",
|
||||||
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
||||||
"@misskey-dev/summaly": "github:MisskeyIO/summaly#5.1.3",
|
"@misskey-dev/summaly": "github:MisskeyIO/summaly#5.1.3",
|
||||||
"@napi-rs/canvas": "0.1.65",
|
"@napi-rs/canvas": "0.1.68",
|
||||||
"@nestjs/common": "11.0.7",
|
"@nestjs/common": "11.0.12",
|
||||||
"@nestjs/core": "11.0.7",
|
"@nestjs/core": "11.0.12",
|
||||||
"@nestjs/testing": "11.0.7",
|
"@nestjs/testing": "11.0.12",
|
||||||
"@peertube/http-signature": "1.7.0",
|
"@peertube/http-signature": "1.7.0",
|
||||||
"@simplewebauthn/server": "13.1.1",
|
"@simplewebauthn/server": "13.1.1",
|
||||||
"@sinonjs/fake-timers": "11.3.1",
|
"@sinonjs/fake-timers": "11.3.1",
|
||||||
"@smithy/node-http-handler": "4.0.2",
|
"@smithy/node-http-handler": "4.0.4",
|
||||||
"@swc/cli": "0.6.0",
|
"@swc/cli": "0.6.0",
|
||||||
"@swc/core": "1.10.12",
|
"@swc/core": "1.11.13",
|
||||||
"@twemoji/parser": "15.1.1",
|
"@twemoji/parser": "15.1.1",
|
||||||
"accepts": "1.3.8",
|
"accepts": "1.3.8",
|
||||||
"ajv": "8.17.1",
|
"ajv": "8.17.1",
|
||||||
"archiver": "7.0.1",
|
"archiver": "7.0.1",
|
||||||
"async-mutex": "0.5.0",
|
"async-mutex": "0.5.0",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "3.0.2",
|
||||||
"blurhash": "2.0.5",
|
"blurhash": "2.0.5",
|
||||||
"body-parser": "1.20.3",
|
"body-parser": "2.2.0",
|
||||||
"bullmq": "5.39.1",
|
"bullmq": "5.45.2",
|
||||||
"cacheable-lookup": "7.0.0",
|
"cacheable-lookup": "7.0.0",
|
||||||
"cbor": "10.0.3",
|
"cbor": "10.0.3",
|
||||||
"chalk": "5.4.1",
|
"chalk": "5.4.1",
|
||||||
"chalk-template": "1.1.0",
|
"chalk-template": "1.1.0",
|
||||||
"chokidar": "4.0.3",
|
"chokidar": "4.0.3",
|
||||||
"cli-highlight": "2.1.11",
|
"cli-highlight": "2.1.11",
|
||||||
"color-convert": "2.0.1",
|
"color-convert": "3.0.1",
|
||||||
"content-disposition": "0.5.4",
|
"content-disposition": "0.5.4",
|
||||||
"date-fns": "4.1.0",
|
"date-fns": "4.1.0",
|
||||||
"deep-email-validator": "0.1.21",
|
"deep-email-validator": "0.1.21",
|
||||||
"fastify": "5.2.1",
|
"fastify": "5.2.2",
|
||||||
"fastify-http-errors-enhanced": "6.0.1",
|
"fastify-http-errors-enhanced": "6.0.1",
|
||||||
"fastify-raw-body": "5.0.0",
|
"fastify-raw-body": "5.0.0",
|
||||||
"feed": "4.2.2",
|
"feed": "4.2.2",
|
||||||
"file-type": "20.0.1",
|
"file-type": "20.4.1",
|
||||||
"fluent-ffmpeg": "2.1.3",
|
"fluent-ffmpeg": "2.1.3",
|
||||||
"form-data": "4.0.1",
|
"form-data": "4.0.2",
|
||||||
"got": "14.4.5",
|
"got": "14.4.6",
|
||||||
"hpagent": "1.2.0",
|
"hpagent": "1.2.0",
|
||||||
"htmlescape": "1.1.1",
|
"htmlescape": "1.1.1",
|
||||||
"http-link-header": "1.1.3",
|
"http-link-header": "1.1.3",
|
||||||
"ioredis": "5.4.2",
|
"ioredis": "5.6.0",
|
||||||
"ip-cidr": "4.0.2",
|
"ip-cidr": "4.0.2",
|
||||||
"ipaddr.js": "2.2.0",
|
"ipaddr.js": "2.2.0",
|
||||||
"is-svg": "5.1.0",
|
"is-svg": "5.1.0",
|
||||||
"jose": "5.9.6",
|
"jose": "6.0.10",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"jsdom": "26.0.0",
|
"jsdom": "26.0.0",
|
||||||
"json5": "2.2.3",
|
"json5": "2.2.3",
|
||||||
"jsonld": "8.3.3",
|
"jsonld": "8.3.3",
|
||||||
"jsrsasign": "11.1.0",
|
"jsrsasign": "11.1.0",
|
||||||
"meilisearch": "0.48.2",
|
"meilisearch": "0.49.0",
|
||||||
"mfm-js": "0.24.0",
|
"mfm-js": "0.24.0",
|
||||||
"microformats-parser": "2.0.2",
|
"microformats-parser": "2.0.2",
|
||||||
"mime-types": "2.1.35",
|
"mime-types": "3.0.1",
|
||||||
"misskey-js": "workspace:*",
|
"misskey-js": "workspace:*",
|
||||||
"misskey-reversi": "workspace:*",
|
"misskey-reversi": "workspace:*",
|
||||||
"ms": "3.0.0-canary.1",
|
"ms": "3.0.0-canary.1",
|
||||||
"nanoid": "5.0.9",
|
"nanoid": "5.1.5",
|
||||||
"nested-property": "4.0.0",
|
"nested-property": "4.0.0",
|
||||||
"node-fetch": "3.3.2",
|
"node-fetch": "3.3.2",
|
||||||
"node-forge": "1.3.1",
|
"node-forge": "1.3.1",
|
||||||
"nodemailer": "6.10.0",
|
"nodemailer": "6.10.0",
|
||||||
"nsfwjs": "4.2.0",
|
"nsfwjs": "4.2.0",
|
||||||
"oauth": "0.10.0",
|
"oauth": "0.10.2",
|
||||||
"oauth2orize": "1.12.0",
|
"oauth2orize": "1.12.0",
|
||||||
"oauth2orize-pkce": "0.1.2",
|
"oauth2orize-pkce": "0.1.2",
|
||||||
"os-utils": "0.0.14",
|
"os-utils": "0.0.14",
|
||||||
"otpauth": "9.3.6",
|
"otpauth": "9.4.0",
|
||||||
"parse5": "7.2.1",
|
"parse5": "7.2.1",
|
||||||
"pg": "8.13.1",
|
"pg": "8.14.1",
|
||||||
"pino": "9.6.0",
|
"pino": "9.6.0",
|
||||||
"pino-pretty": "13.0.0",
|
"pino-pretty": "13.0.0",
|
||||||
"pkce-challenge": "4.1.0",
|
"pkce-challenge": "4.1.0",
|
||||||
|
@ -166,10 +166,10 @@
|
||||||
"reflect-metadata": "0.2.2",
|
"reflect-metadata": "0.2.2",
|
||||||
"rename": "1.0.4",
|
"rename": "1.0.4",
|
||||||
"rss-parser": "3.13.0",
|
"rss-parser": "3.13.0",
|
||||||
"rxjs": "7.8.1",
|
"rxjs": "7.8.2",
|
||||||
"samlify": "2.8.11",
|
"samlify": "2.9.1",
|
||||||
"sanitize-html": "2.14.0",
|
"sanitize-html": "2.15.0",
|
||||||
"secure-json-parse": "3.0.2",
|
"secure-json-parse": "4.0.0",
|
||||||
"sharp": "0.33.5",
|
"sharp": "0.33.5",
|
||||||
"slacc": "0.0.10",
|
"slacc": "0.0.10",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
|
@ -177,25 +177,24 @@
|
||||||
"systeminformation": "5.25.11",
|
"systeminformation": "5.25.11",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tmp": "0.2.3",
|
"tmp": "0.2.3",
|
||||||
"tsc-alias": "1.8.10",
|
"tsc-alias": "1.8.13",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"typeorm": "0.3.20",
|
"typeorm": "0.3.21",
|
||||||
"typescript": "5.7.3",
|
"typescript": "5.8.2",
|
||||||
"ulid": "2.3.0",
|
"ulid": "3.0.0",
|
||||||
"vary": "1.1.2",
|
"vary": "1.1.2",
|
||||||
"web-push": "3.6.7",
|
"web-push": "3.6.7",
|
||||||
"ws": "8.18.0",
|
"ws": "8.18.1",
|
||||||
"xev": "3.0.2",
|
"xev": "3.0.2",
|
||||||
"xmlbuilder": "15.1.1"
|
"xmlbuilder": "15.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jest/globals": "29.7.0",
|
"@jest/globals": "29.7.0",
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@nestjs/platform-express": "11.0.7",
|
"@nestjs/platform-express": "11.0.12",
|
||||||
"@swc/jest": "0.2.37",
|
"@swc/jest": "0.2.37",
|
||||||
"@types/accepts": "1.3.7",
|
"@types/accepts": "1.3.7",
|
||||||
"@types/archiver": "6.0.3",
|
"@types/archiver": "6.0.3",
|
||||||
"@types/bcryptjs": "2.4.6",
|
|
||||||
"@types/body-parser": "1.19.5",
|
"@types/body-parser": "1.19.5",
|
||||||
"@types/color-convert": "2.0.4",
|
"@types/color-convert": "2.0.4",
|
||||||
"@types/content-disposition": "0.5.8",
|
"@types/content-disposition": "0.5.8",
|
||||||
|
@ -209,7 +208,7 @@
|
||||||
"@types/jsrsasign": "10.5.15",
|
"@types/jsrsasign": "10.5.15",
|
||||||
"@types/mime-types": "2.1.4",
|
"@types/mime-types": "2.1.4",
|
||||||
"@types/ms": "2.1.0",
|
"@types/ms": "2.1.0",
|
||||||
"@types/node": "22.13.0",
|
"@types/node": "22.13.14",
|
||||||
"@types/node-forge": "1.3.11",
|
"@types/node-forge": "1.3.11",
|
||||||
"@types/nodemailer": "6.4.17",
|
"@types/nodemailer": "6.4.17",
|
||||||
"@types/oauth": "0.9.6",
|
"@types/oauth": "0.9.6",
|
||||||
|
@ -223,15 +222,15 @@
|
||||||
"@types/random-seed": "0.3.5",
|
"@types/random-seed": "0.3.5",
|
||||||
"@types/ratelimiter": "3.4.6",
|
"@types/ratelimiter": "3.4.6",
|
||||||
"@types/rename": "1.0.7",
|
"@types/rename": "1.0.7",
|
||||||
"@types/sanitize-html": "2.13.0",
|
"@types/sanitize-html": "2.15.0",
|
||||||
"@types/semver": "7.5.8",
|
"@types/semver": "7.7.0",
|
||||||
"@types/simple-oauth2": "5.0.7",
|
"@types/simple-oauth2": "5.0.7",
|
||||||
"@types/sinonjs__fake-timers": "8.1.5",
|
"@types/sinonjs__fake-timers": "8.1.5",
|
||||||
"@types/tinycolor2": "1.4.6",
|
"@types/tinycolor2": "1.4.6",
|
||||||
"@types/tmp": "0.2.6",
|
"@types/tmp": "0.2.6",
|
||||||
"@types/vary": "1.1.3",
|
"@types/vary": "1.1.3",
|
||||||
"@types/web-push": "3.6.4",
|
"@types/web-push": "3.6.4",
|
||||||
"@types/ws": "8.5.14",
|
"@types/ws": "8.18.0",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"aws-sdk-client-mock": "4.1.0",
|
"aws-sdk-client-mock": "4.1.0",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as fs from 'node:fs/promises';
|
import * as fs from 'node:fs/promises';
|
||||||
|
import { WritableStream } from 'node:stream/web';
|
||||||
import type { PathLike } from 'node:fs';
|
import type { PathLike } from 'node:fs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,13 +18,13 @@ export async function genX509CertFromJWK(
|
||||||
cert.setIssuer(attrs);
|
cert.setIssuer(attrs);
|
||||||
cert.publicKey = await jose
|
cert.publicKey = await jose
|
||||||
.importJWK(JSON.parse(publicKey))
|
.importJWK(JSON.parse(publicKey))
|
||||||
.then((k) => jose.exportSPKI(k as jose.KeyLike))
|
.then((k) => jose.exportSPKI(k as jose.CryptoKey))
|
||||||
.then((k) => forge.pki.publicKeyFromPem(k));
|
.then((k) => forge.pki.publicKeyFromPem(k));
|
||||||
|
|
||||||
cert.sign(
|
cert.sign(
|
||||||
await jose
|
await jose
|
||||||
.importJWK(JSON.parse(privateKey))
|
.importJWK(JSON.parse(privateKey))
|
||||||
.then((k) => jose.exportPKCS8(k as jose.KeyLike))
|
.then((k) => jose.exportPKCS8(k as jose.CryptoKey))
|
||||||
.then((k) => forge.pki.privateKeyFromPem(k)),
|
.then((k) => forge.pki.privateKeyFromPem(k)),
|
||||||
forge.md.sha256.create(),
|
forge.md.sha256.create(),
|
||||||
);
|
);
|
||||||
|
|
|
@ -215,7 +215,7 @@ class OAuth2Store {
|
||||||
}
|
}
|
||||||
|
|
||||||
async load(req: OAuth2DecisionRequest, cb: (err: Error | null, txn?: OAuth2) => void): Promise<void> {
|
async load(req: OAuth2DecisionRequest, cb: (err: Error | null, txn?: OAuth2) => void): Promise<void> {
|
||||||
const { transaction_id } = req.body;
|
const { transaction_id } = req.body ?? {};
|
||||||
if (!transaction_id) {
|
if (!transaction_id) {
|
||||||
cb(new AuthorizationError('Missing transaction ID', 'invalid_request'));
|
cb(new AuthorizationError('Missing transaction ID', 'invalid_request'));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -239,7 +239,7 @@ export class SAMLIdentifyProviderService {
|
||||||
metadata: await this.createIdPMetadataXml(ssoServiceProvider),
|
metadata: await this.createIdPMetadataXml(ssoServiceProvider),
|
||||||
privateKey: await jose
|
privateKey: await jose
|
||||||
.importJWK(JSON.parse(ssoServiceProvider.privateKey ?? '{}'))
|
.importJWK(JSON.parse(ssoServiceProvider.privateKey ?? '{}'))
|
||||||
.then(k => jose.exportPKCS8(k as jose.KeyLike)),
|
.then(k => jose.exportPKCS8(k as jose.CryptoKey)),
|
||||||
});
|
});
|
||||||
|
|
||||||
const sp = saml.ServiceProvider({
|
const sp = saml.ServiceProvider({
|
||||||
|
@ -393,7 +393,7 @@ export class SAMLIdentifyProviderService {
|
||||||
metadata: await this.createIdPMetadataXml(ssoServiceProvider),
|
metadata: await this.createIdPMetadataXml(ssoServiceProvider),
|
||||||
privateKey: await jose
|
privateKey: await jose
|
||||||
.importJWK(JSON.parse(ssoServiceProvider.privateKey ?? '{}'))
|
.importJWK(JSON.parse(ssoServiceProvider.privateKey ?? '{}'))
|
||||||
.then(k => jose.exportPKCS8(k as jose.KeyLike)),
|
.then(k => jose.exportPKCS8(k as jose.CryptoKey)),
|
||||||
loginResponseTemplate: { context: 'ignored' },
|
loginResponseTemplate: { context: 'ignored' },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,7 @@ describe('Timelines', () => {
|
||||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||||
|
|
||||||
await api('following/create', { userId: bob.id }, alice);
|
await api('following/create', { userId: bob.id }, alice);
|
||||||
|
await api('following/create', { userId: carol.id }, bob);
|
||||||
await api('following/update', { userId: bob.id, withReplies: true }, alice);
|
await api('following/update', { userId: bob.id, withReplies: true }, alice);
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
const carolNote = await post(carol, { text: 'hi', visibility: 'followers' });
|
const carolNote = await post(carol, { text: 'hi', visibility: 'followers' });
|
||||||
|
|
|
@ -800,10 +800,10 @@ describe('ユーザー', () => {
|
||||||
{ label: '「見つけやすくする」がOFFのユーザーが含まれる', user: () => userNotExplorable },
|
{ label: '「見つけやすくする」がOFFのユーザーが含まれる', user: () => userNotExplorable },
|
||||||
{ label: 'ミュートユーザーが含まれない', user: () => userMutedByAlice, excluded: true },
|
{ label: 'ミュートユーザーが含まれない', user: () => userMutedByAlice, excluded: true },
|
||||||
{ label: 'ブロックされているユーザーが含まれる', user: () => userBlockedByAlice },
|
{ label: 'ブロックされているユーザーが含まれる', user: () => userBlockedByAlice },
|
||||||
{ label: 'ブロックしてきているユーザーが含まれない', user: () => userBlockingAlice, excluded: true },
|
// 無効なテスト { label: 'ブロックしてきているユーザーが含まれない', user: () => userBlockingAlice, excluded: true },
|
||||||
{ label: '承認制ユーザーが含まれる', user: () => userLocking },
|
{ label: '承認制ユーザーが含まれる', user: () => userLocking },
|
||||||
{ label: 'サイレンスユーザーが含まれる', user: () => userSilenced },
|
{ label: 'サイレンスユーザーが含まれる', user: () => userSilenced },
|
||||||
//{ label: 'サスペンドユーザーが含まれない', user: () => userSuspended, excluded: true },
|
// 無効なテスト { label: 'サスペンドユーザーが含まれない', user: () => userSuspended, excluded: true },
|
||||||
{ label: '削除済ユーザーが含まれる', user: () => userDeletedBySelf },
|
{ label: '削除済ユーザーが含まれる', user: () => userDeletedBySelf },
|
||||||
{ label: '削除済(byAdmin)ユーザーが含まれる', user: () => userDeletedByAdmin },
|
{ label: '削除済(byAdmin)ユーザーが含まれる', user: () => userDeletedByAdmin },
|
||||||
] as const)('がよくリプライをするユーザーのリストを取得でき、結果に$label', async ({ user, excluded }) => {
|
] as const)('がよくリプライをするユーザーのリストを取得でき、結果に$label', async ({ user, excluded }) => {
|
||||||
|
|
|
@ -141,7 +141,10 @@ export const post = async (user: UserToken, params: misskey.Endpoints['notes/cre
|
||||||
|
|
||||||
const res = await api('notes/create', q, user);
|
const res = await api('notes/create', q, user);
|
||||||
|
|
||||||
return res.body ? res.body.createdNote : null;
|
assert.strictEqual(res.status, 200);
|
||||||
|
assert.notEqual(res.body, null);
|
||||||
|
|
||||||
|
return res.body.createdNote;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const createAppToken = async (user: UserToken, permissions: (typeof misskey.permissions)[number][]) => {
|
export const createAppToken = async (user: UserToken, permissions: (typeof misskey.permissions)[number][]) => {
|
||||||
|
|
14
packages/frontend/@types/vue-gtag.d.ts
vendored
14
packages/frontend/@types/vue-gtag.d.ts
vendored
|
@ -1,14 +0,0 @@
|
||||||
declare module 'vue-gtag' {
|
|
||||||
export type GtagConsent = (command: 'consent', arg: 'default' | 'update', params: GtagConsentParams) => void;
|
|
||||||
|
|
||||||
export interface GtagConsentParams {
|
|
||||||
ad_storage?: 'granted' | 'denied',
|
|
||||||
ad_user_data?: 'granted' | 'denied',
|
|
||||||
ad_personalization?: 'granted' | 'denied',
|
|
||||||
analytics_storage?: 'granted' | 'denied',
|
|
||||||
functionality_storage?: 'granted' | 'denied',
|
|
||||||
personalization_storage?: 'granted' | 'denied',
|
|
||||||
security_storage?: 'granted' | 'denied',
|
|
||||||
wait_for_update?: number
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -26,23 +26,23 @@
|
||||||
"@rollup/plugin-typescript": "12.1.2",
|
"@rollup/plugin-typescript": "12.1.2",
|
||||||
"@rollup/pluginutils": "5.1.4",
|
"@rollup/pluginutils": "5.1.4",
|
||||||
"@syuilo/aiscript": "0.19.0",
|
"@syuilo/aiscript": "0.19.0",
|
||||||
"@tabler/icons-webfont": "3.29.0",
|
"@tabler/icons-webfont": "3.31.0",
|
||||||
"@twemoji/parser": "15.1.1",
|
"@twemoji/parser": "15.1.1",
|
||||||
"@vitejs/plugin-vue": "5.2.1",
|
"@vitejs/plugin-vue": "5.2.3",
|
||||||
"@vue/compiler-sfc": "3.5.13",
|
"@vue/compiler-sfc": "3.5.13",
|
||||||
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.15",
|
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.15",
|
||||||
"astring": "1.9.0",
|
"astring": "1.9.0",
|
||||||
"broadcast-channel": "7.0.0",
|
"broadcast-channel": "7.1.0",
|
||||||
"buraha": "0.0.1",
|
"buraha": "0.0.1",
|
||||||
"canvas-confetti": "1.9.3",
|
"canvas-confetti": "1.9.3",
|
||||||
"chart.js": "4.4.7",
|
"chart.js": "4.4.8",
|
||||||
"chartjs-adapter-date-fns": "3.0.0",
|
"chartjs-adapter-date-fns": "3.0.0",
|
||||||
"chartjs-chart-matrix": "2.0.1",
|
"chartjs-chart-matrix": "3.0.0",
|
||||||
"chartjs-plugin-gradient": "0.6.1",
|
"chartjs-plugin-gradient": "0.6.1",
|
||||||
"chartjs-plugin-zoom": "2.2.0",
|
"chartjs-plugin-zoom": "2.2.0",
|
||||||
"chromatic": "11.25.2",
|
"chromatic": "11.27.0",
|
||||||
"compare-versions": "6.1.1",
|
"compare-versions": "6.1.1",
|
||||||
"cropperjs": "2.0.0-rc.0",
|
"cropperjs": "2.0.0",
|
||||||
"date-fns": "4.1.0",
|
"date-fns": "4.1.0",
|
||||||
"escape-regexp": "0.0.1",
|
"escape-regexp": "0.0.1",
|
||||||
"estree-walker": "3.0.3",
|
"estree-walker": "3.0.3",
|
||||||
|
@ -58,87 +58,87 @@
|
||||||
"misskey-reversi": "workspace:*",
|
"misskey-reversi": "workspace:*",
|
||||||
"photoswipe": "5.4.4",
|
"photoswipe": "5.4.4",
|
||||||
"punycode.js": "2.3.1",
|
"punycode.js": "2.3.1",
|
||||||
"rollup": "4.34.0",
|
"rollup": "4.38.0",
|
||||||
"sanitize-html": "2.14.0",
|
"sanitize-html": "2.15.0",
|
||||||
"sass": "1.83.4",
|
"sass": "1.86.0",
|
||||||
"shiki": "2.2.0",
|
"shiki": "3.2.1",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
"textarea-caret": "3.1.0",
|
"textarea-caret": "3.1.0",
|
||||||
"three": "0.173.0",
|
"three": "0.175.0",
|
||||||
"throttle-debounce": "5.0.2",
|
"throttle-debounce": "5.0.2",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tsc-alias": "1.8.10",
|
"tsc-alias": "1.8.13",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"typescript": "5.7.3",
|
"typescript": "5.8.2",
|
||||||
"uuid": "11.0.5",
|
"uuid": "11.1.0",
|
||||||
"v-code-diff": "1.13.1",
|
"v-code-diff": "1.13.1",
|
||||||
"vite": "6.0.11",
|
"vite": "6.2.3",
|
||||||
"vue": "3.5.13",
|
"vue": "3.5.13",
|
||||||
"vue-gtag": "2.0.1",
|
"vue-gtag": "3.1.1",
|
||||||
"vuedraggable": "next",
|
"vuedraggable": "next",
|
||||||
"webgl-audiovisualizer": "github:tar-bin/webgl-audiovisualizer"
|
"webgl-audiovisualizer": "github:tar-bin/webgl-audiovisualizer"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@misskey-dev/summaly": "github:MisskeyIO/summaly#5.1.3",
|
"@misskey-dev/summaly": "github:MisskeyIO/summaly#5.1.3",
|
||||||
"@storybook/addon-actions": "8.5.2",
|
"@storybook/addon-actions": "8.6.11",
|
||||||
"@storybook/addon-essentials": "8.5.2",
|
"@storybook/addon-essentials": "8.6.11",
|
||||||
"@storybook/addon-interactions": "8.5.2",
|
"@storybook/addon-interactions": "8.6.11",
|
||||||
"@storybook/addon-links": "8.5.2",
|
"@storybook/addon-links": "8.6.11",
|
||||||
"@storybook/addon-mdx-gfm": "8.5.2",
|
"@storybook/addon-mdx-gfm": "8.6.11",
|
||||||
"@storybook/addon-storysource": "8.5.2",
|
"@storybook/addon-storysource": "8.6.11",
|
||||||
"@storybook/blocks": "8.5.2",
|
"@storybook/blocks": "8.6.11",
|
||||||
"@storybook/components": "8.5.2",
|
"@storybook/components": "8.6.11",
|
||||||
"@storybook/core-events": "8.5.2",
|
"@storybook/core-events": "8.6.11",
|
||||||
"@storybook/manager-api": "8.5.2",
|
"@storybook/manager-api": "8.6.11",
|
||||||
"@storybook/preview-api": "8.5.2",
|
"@storybook/preview-api": "8.6.11",
|
||||||
"@storybook/react": "8.5.2",
|
"@storybook/react": "8.6.11",
|
||||||
"@storybook/react-vite": "8.5.2",
|
"@storybook/react-vite": "8.6.11",
|
||||||
"@storybook/test": "8.5.2",
|
"@storybook/test": "8.6.11",
|
||||||
"@storybook/theming": "8.5.2",
|
"@storybook/theming": "8.6.11",
|
||||||
"@storybook/types": "8.5.2",
|
"@storybook/types": "8.6.11",
|
||||||
"@storybook/vue3": "8.5.2",
|
"@storybook/vue3": "8.6.11",
|
||||||
"@storybook/vue3-vite": "8.5.2",
|
"@storybook/vue3-vite": "8.6.11",
|
||||||
"@testing-library/vue": "8.1.0",
|
"@testing-library/vue": "8.1.0",
|
||||||
"@types/escape-regexp": "0.0.3",
|
"@types/escape-regexp": "0.0.3",
|
||||||
"@types/estree": "1.0.6",
|
"@types/estree": "1.0.7",
|
||||||
"@types/matter-js": "0.19.8",
|
"@types/matter-js": "0.19.8",
|
||||||
"@types/micromatch": "4.0.9",
|
"@types/micromatch": "4.0.9",
|
||||||
"@types/node": "22.13.0",
|
"@types/node": "22.13.14",
|
||||||
"@types/punycode.js": "npm:@types/punycode@2.1.4",
|
"@types/punycode.js": "npm:@types/punycode@2.1.4",
|
||||||
"@types/sanitize-html": "2.13.0",
|
"@types/sanitize-html": "2.15.0",
|
||||||
"@types/three": "0.173.0",
|
"@types/three": "0.175.0",
|
||||||
"@types/throttle-debounce": "5.0.2",
|
"@types/throttle-debounce": "5.0.2",
|
||||||
"@types/tinycolor2": "1.4.6",
|
"@types/tinycolor2": "1.4.6",
|
||||||
"@types/ws": "8.5.14",
|
"@types/ws": "8.18.0",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"@vitest/coverage-v8": "3.0.4",
|
"@vitest/coverage-v8": "3.0.9",
|
||||||
"@vue/runtime-core": "3.5.13",
|
"@vue/runtime-core": "3.5.13",
|
||||||
"acorn": "8.14.0",
|
"acorn": "8.14.1",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "14.0.1",
|
"cypress": "14.2.1",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"eslint-plugin-import": "2.31.0",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"eslint-plugin-vue": "9.32.0",
|
"eslint-plugin-vue": "9.32.0",
|
||||||
"fast-glob": "3.3.3",
|
"fast-glob": "3.3.3",
|
||||||
"happy-dom": "16.8.1",
|
"happy-dom": "17.4.4",
|
||||||
"intersection-observer": "0.12.2",
|
"intersection-observer": "0.12.2",
|
||||||
"micromatch": "4.0.8",
|
"micromatch": "4.0.8",
|
||||||
"msw": "2.7.0",
|
"msw": "2.7.3",
|
||||||
"msw-storybook-addon": "2.0.4",
|
"msw-storybook-addon": "2.0.4",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"prettier": "3.4.2",
|
"prettier": "3.5.3",
|
||||||
"react": "19.0.0",
|
"react": "19.1.0",
|
||||||
"react-dom": "19.0.0",
|
"react-dom": "19.1.0",
|
||||||
"start-server-and-test": "2.0.10",
|
"start-server-and-test": "2.0.11",
|
||||||
"storybook": "8.5.2",
|
"storybook": "8.6.11",
|
||||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||||
"vite-plugin-turbosnap": "1.0.3",
|
"vite-plugin-turbosnap": "1.0.3",
|
||||||
"vitest": "3.0.4",
|
"vitest": "3.0.9",
|
||||||
"vitest-fetch-mock": "0.3.0",
|
"vitest-fetch-mock": "0.3.0",
|
||||||
"vue-component-type-helpers": "2.2.0",
|
"vue-component-type-helpers": "2.2.8",
|
||||||
"vue-eslint-parser": "9.4.3",
|
"vue-eslint-parser": "9.4.3",
|
||||||
"vue-tsc": "2.2.0"
|
"vue-tsc": "2.2.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,8 @@ import { miLocalStorage } from '@/local-storage.js';
|
||||||
import { fetchCustomEmojis } from '@/custom-emojis.js';
|
import { fetchCustomEmojis } from '@/custom-emojis.js';
|
||||||
import { setupRouter } from '@/router/definition.js';
|
import { setupRouter } from '@/router/definition.js';
|
||||||
import { mainRouter } from '@/router/main.js';
|
import { mainRouter } from '@/router/main.js';
|
||||||
import VueGtag, { bootstrap as gtagBootstrap, GtagConsent, GtagConsentParams } from 'vue-gtag';
|
import { createGtag, addGtag, consent as gtagConsent } from 'vue-gtag';
|
||||||
|
import type { GtagConsentParams } from '@/types/gtag.js';
|
||||||
|
|
||||||
export async function common(createVue: () => App<Element>) {
|
export async function common(createVue: () => App<Element>) {
|
||||||
console.info(`Misskey v${version}`);
|
console.info(`Misskey v${version}`);
|
||||||
|
@ -268,21 +269,21 @@ export async function common(createVue: () => App<Element>) {
|
||||||
components(app);
|
components(app);
|
||||||
|
|
||||||
if (instance.googleAnalyticsId) {
|
if (instance.googleAnalyticsId) {
|
||||||
app.use(VueGtag, {
|
app.use(createGtag( {
|
||||||
bootstrap: false,
|
tagId: instance.googleAnalyticsId,
|
||||||
appName: `Misskey v${version}`,
|
|
||||||
pageTrackerEnabled: true,
|
|
||||||
pageTrackerScreenviewEnabled: true,
|
|
||||||
config: {
|
config: {
|
||||||
id: instance.googleAnalyticsId,
|
|
||||||
params: {
|
|
||||||
anonymize_ip: false,
|
anonymize_ip: false,
|
||||||
send_page_view: true,
|
send_page_view: true,
|
||||||
},
|
},
|
||||||
|
pageTracker: {
|
||||||
|
router: mainRouter,
|
||||||
|
useScreenview: true,
|
||||||
},
|
},
|
||||||
}, mainRouter);
|
initMode: 'manual',
|
||||||
|
appName: `Misskey v${version}`,
|
||||||
|
}));
|
||||||
|
|
||||||
const gtagConsent = miLocalStorage.getItemAsJson('gtagConsent') as GtagConsentParams ?? {
|
const gtagConsentParams = miLocalStorage.getItemAsJson('gtagConsent') as GtagConsentParams ?? {
|
||||||
ad_storage: 'denied',
|
ad_storage: 'denied',
|
||||||
ad_user_data: 'denied',
|
ad_user_data: 'denied',
|
||||||
ad_personalization: 'denied',
|
ad_personalization: 'denied',
|
||||||
|
@ -291,13 +292,12 @@ export async function common(createVue: () => App<Element>) {
|
||||||
personalization_storage: 'denied',
|
personalization_storage: 'denied',
|
||||||
security_storage: 'granted',
|
security_storage: 'granted',
|
||||||
};
|
};
|
||||||
miLocalStorage.setItemAsJson('gtagConsent', gtagConsent);
|
miLocalStorage.setItemAsJson('gtagConsent', gtagConsentParams);
|
||||||
|
gtagConsent('default', gtagConsentParams);
|
||||||
if (typeof window['gtag'] === 'function') (window['gtag'] as GtagConsent)('consent', 'default', gtagConsent);
|
|
||||||
|
|
||||||
if (miLocalStorage.getItem('gaConsent') === 'true') {
|
if (miLocalStorage.getItem('gaConsent') === 'true') {
|
||||||
// noinspection ES6MissingAwait
|
// noinspection ES6MissingAwait
|
||||||
gtagBootstrap();
|
addGtag();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,12 +59,8 @@ import { host } from '@/config.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import {
|
import { addGtag, consent as gtagConsent, set as gtagSet } from 'vue-gtag';
|
||||||
bootstrap as gtagBootstrap,
|
import type { GtagConsentParams } from '@/types/gtag.js';
|
||||||
GtagConsent,
|
|
||||||
GtagConsentParams,
|
|
||||||
set as gtagSet
|
|
||||||
} from 'vue-gtag';
|
|
||||||
|
|
||||||
const emit = defineEmits<(ev: 'closed') => void>();
|
const emit = defineEmits<(ev: 'closed') => void>();
|
||||||
|
|
||||||
|
@ -76,7 +72,7 @@ const gtagConsentPersonalization = ref(false);
|
||||||
|
|
||||||
function consentAll() {
|
function consentAll() {
|
||||||
miLocalStorage.setItem('gaConsent', 'true');
|
miLocalStorage.setItem('gaConsent', 'true');
|
||||||
const gtagConsent = <GtagConsentParams>{
|
const params = <GtagConsentParams>{
|
||||||
ad_storage: 'granted',
|
ad_storage: 'granted',
|
||||||
ad_user_data: 'granted',
|
ad_user_data: 'granted',
|
||||||
ad_personalization: 'granted',
|
ad_personalization: 'granted',
|
||||||
|
@ -85,9 +81,8 @@ function consentAll() {
|
||||||
personalization_storage: 'granted',
|
personalization_storage: 'granted',
|
||||||
security_storage: 'granted',
|
security_storage: 'granted',
|
||||||
};
|
};
|
||||||
miLocalStorage.setItemAsJson('gtagConsent', gtagConsent);
|
miLocalStorage.setItemAsJson('gtagConsent', params);
|
||||||
|
gtagConsent('update', params);
|
||||||
if (typeof window['gtag'] === 'function') (window['gtag'] as GtagConsent)('consent', 'update', gtagConsent);
|
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
||||||
emit('closed');
|
emit('closed');
|
||||||
|
@ -95,7 +90,7 @@ function consentAll() {
|
||||||
|
|
||||||
function consentEssential() {
|
function consentEssential() {
|
||||||
miLocalStorage.setItem('gaConsent', 'true');
|
miLocalStorage.setItem('gaConsent', 'true');
|
||||||
const gtagConsent = <GtagConsentParams>{
|
const params = <GtagConsentParams>{
|
||||||
ad_storage: 'denied',
|
ad_storage: 'denied',
|
||||||
ad_user_data: 'denied',
|
ad_user_data: 'denied',
|
||||||
ad_personalization: 'denied',
|
ad_personalization: 'denied',
|
||||||
|
@ -104,9 +99,8 @@ function consentEssential() {
|
||||||
personalization_storage: 'denied',
|
personalization_storage: 'denied',
|
||||||
security_storage: 'granted',
|
security_storage: 'granted',
|
||||||
};
|
};
|
||||||
miLocalStorage.setItemAsJson('gtagConsent', gtagConsent);
|
miLocalStorage.setItemAsJson('gtagConsent', params);
|
||||||
|
gtagConsent('update', params);
|
||||||
if (typeof window['gtag'] === 'function') (window['gtag'] as GtagConsent)('consent', 'update', gtagConsent);
|
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
||||||
emit('closed');
|
emit('closed');
|
||||||
|
@ -114,7 +108,7 @@ function consentEssential() {
|
||||||
|
|
||||||
function consentSelected() {
|
function consentSelected() {
|
||||||
miLocalStorage.setItem('gaConsent', 'true');
|
miLocalStorage.setItem('gaConsent', 'true');
|
||||||
const gtagConsent = <GtagConsentParams>{
|
const params = <GtagConsentParams>{
|
||||||
ad_storage: gtagConsentAnalytics.value ? 'granted' : 'denied',
|
ad_storage: gtagConsentAnalytics.value ? 'granted' : 'denied',
|
||||||
ad_user_data: gtagConsentFunctionality.value ? 'granted' : 'denied',
|
ad_user_data: gtagConsentFunctionality.value ? 'granted' : 'denied',
|
||||||
ad_personalization: gtagConsentPersonalization.value ? 'granted' : 'denied',
|
ad_personalization: gtagConsentPersonalization.value ? 'granted' : 'denied',
|
||||||
|
@ -123,16 +117,15 @@ function consentSelected() {
|
||||||
personalization_storage: gtagConsentPersonalization.value ? 'granted' : 'denied',
|
personalization_storage: gtagConsentPersonalization.value ? 'granted' : 'denied',
|
||||||
security_storage: 'granted',
|
security_storage: 'granted',
|
||||||
};
|
};
|
||||||
miLocalStorage.setItemAsJson('gtagConsent', gtagConsent);
|
miLocalStorage.setItemAsJson('gtagConsent', params);
|
||||||
|
gtagConsent('update', params);
|
||||||
if (typeof window['gtag'] === 'function') (window['gtag'] as GtagConsent)('consent', 'update', gtagConsent);
|
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
||||||
emit('closed');
|
emit('closed');
|
||||||
}
|
}
|
||||||
|
|
||||||
function bootstrap() {
|
function bootstrap() {
|
||||||
gtagBootstrap();
|
addGtag();
|
||||||
gtagSet({
|
gtagSet({
|
||||||
'client_id': miLocalStorage.getItem('id'),
|
'client_id': miLocalStorage.getItem('id'),
|
||||||
'user_id': $i?.id,
|
'user_id': $i?.id,
|
||||||
|
|
|
@ -110,7 +110,8 @@ import { unisonReload } from '@/scripts/unison-reload.js';
|
||||||
import { miLocalStorage } from '@/local-storage.js';
|
import { miLocalStorage } from '@/local-storage.js';
|
||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
import { host } from '@/config.js';
|
import { host } from '@/config.js';
|
||||||
import { GtagConsent, GtagConsentParams } from 'vue-gtag';
|
import { consent as gtagConsent } from 'vue-gtag';
|
||||||
|
import type { GtagConsentParams } from '@/types/gtag.js';
|
||||||
|
|
||||||
const $i = signinRequired();
|
const $i = signinRequired();
|
||||||
|
|
||||||
|
@ -137,8 +138,7 @@ const gaConsent = computed({
|
||||||
gaConsentInternal.value = value;
|
gaConsentInternal.value = value;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const gtagConsentInternal = ref(
|
const gtagConsentInternal = ref({
|
||||||
(miLocalStorage.getItemAsJson('gtagConsent') as GtagConsentParams) ?? {
|
|
||||||
ad_storage: 'denied',
|
ad_storage: 'denied',
|
||||||
ad_user_data: 'denied',
|
ad_user_data: 'denied',
|
||||||
ad_personalization: 'denied',
|
ad_personalization: 'denied',
|
||||||
|
@ -146,9 +146,9 @@ const gtagConsentInternal = ref(
|
||||||
functionality_storage: 'denied',
|
functionality_storage: 'denied',
|
||||||
personalization_storage: 'denied',
|
personalization_storage: 'denied',
|
||||||
security_storage: 'granted',
|
security_storage: 'granted',
|
||||||
},
|
...(miLocalStorage.getItemAsJson('gtagConsent') as GtagConsentParams),
|
||||||
);
|
});
|
||||||
const gtagConsent = computed({
|
const gtagConsentParams = computed({
|
||||||
get: () => gtagConsentInternal.value,
|
get: () => gtagConsentInternal.value,
|
||||||
set: (value: GtagConsentParams) => {
|
set: (value: GtagConsentParams) => {
|
||||||
miLocalStorage.setItemAsJson('gtagConsent', value);
|
miLocalStorage.setItemAsJson('gtagConsent', value);
|
||||||
|
@ -156,10 +156,10 @@ const gtagConsent = computed({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const gtagConsentAnalytics = computed({
|
const gtagConsentAnalytics = computed({
|
||||||
get: () => gtagConsent.value.analytics_storage === 'granted',
|
get: () => gtagConsentParams.value.analytics_storage === 'granted',
|
||||||
set: (value: boolean) => {
|
set: (value: boolean) => {
|
||||||
gtagConsent.value = {
|
gtagConsentParams.value = {
|
||||||
...gtagConsent.value,
|
...gtagConsentParams.value,
|
||||||
ad_storage: value ? 'granted' : 'denied',
|
ad_storage: value ? 'granted' : 'denied',
|
||||||
ad_user_data: value ? 'granted' : 'denied',
|
ad_user_data: value ? 'granted' : 'denied',
|
||||||
analytics_storage: value ? 'granted' : 'denied',
|
analytics_storage: value ? 'granted' : 'denied',
|
||||||
|
@ -167,19 +167,19 @@ const gtagConsentAnalytics = computed({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const gtagConsentFunctionality = computed({
|
const gtagConsentFunctionality = computed({
|
||||||
get: () => gtagConsent.value.functionality_storage === 'granted',
|
get: () => gtagConsentParams.value.functionality_storage === 'granted',
|
||||||
set: (value: boolean) => {
|
set: (value: boolean) => {
|
||||||
gtagConsent.value = {
|
gtagConsentParams.value = {
|
||||||
...gtagConsent.value,
|
...gtagConsentParams.value,
|
||||||
functionality_storage: value ? 'granted' : 'denied',
|
functionality_storage: value ? 'granted' : 'denied',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const gtagConsentPersonalization = computed({
|
const gtagConsentPersonalization = computed({
|
||||||
get: () => gtagConsent.value.personalization_storage === 'granted',
|
get: () => gtagConsentParams.value.personalization_storage === 'granted',
|
||||||
set: (value: boolean) => {
|
set: (value: boolean) => {
|
||||||
gtagConsent.value = {
|
gtagConsentParams.value = {
|
||||||
...gtagConsent.value,
|
...gtagConsentParams.value,
|
||||||
ad_personalization: value ? 'granted' : 'denied',
|
ad_personalization: value ? 'granted' : 'denied',
|
||||||
personalization_storage: value ? 'granted' : 'denied',
|
personalization_storage: value ? 'granted' : 'denied',
|
||||||
};
|
};
|
||||||
|
@ -200,8 +200,8 @@ watch(gaConsent, async () => {
|
||||||
await reloadAsk();
|
await reloadAsk();
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(gtagConsent, async () => {
|
watch(gtagConsentParams, async () => {
|
||||||
if (typeof window['gtag'] === 'function') (window['gtag'] as GtagConsent)('consent', 'update', gtagConsent.value);
|
gtagConsent('update', gtagConsentParams.value as GtagConsentParams);
|
||||||
});
|
});
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
import { generateClientTransactionId } from '@/scripts/misskey-api.js';
|
import { generateClientTransactionId } from '@/scripts/misskey-api.js';
|
||||||
import { miLocalStorage } from '@/local-storage.js';
|
import { miLocalStorage } from '@/local-storage.js';
|
||||||
import { GtagConsentParams } from 'vue-gtag';
|
|
||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
|
import type { GtagConsentParams } from '@/types/gtag.js';
|
||||||
|
|
||||||
export interface UsageReport {
|
export interface UsageReport {
|
||||||
t: number;
|
t: number;
|
||||||
|
|
11
packages/frontend/src/types/gtag.ts
Normal file
11
packages/frontend/src/types/gtag.ts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
export interface GtagConsentParams {
|
||||||
|
ad_storage?: 'granted' | 'denied',
|
||||||
|
ad_user_data?: 'granted' | 'denied',
|
||||||
|
ad_personalization?: 'granted' | 'denied',
|
||||||
|
analytics_storage?: 'granted' | 'denied',
|
||||||
|
functionality_storage?: 'granted' | 'denied',
|
||||||
|
personalization_storage?: 'granted' | 'denied',
|
||||||
|
security_storage?: 'granted' | 'denied',
|
||||||
|
wait_for_update?: number,
|
||||||
|
region?: string[],
|
||||||
|
}
|
|
@ -26,13 +26,13 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@types/matter-js": "0.19.8",
|
"@types/matter-js": "0.19.8",
|
||||||
"@types/node": "22.13.0",
|
"@types/node": "22.13.14",
|
||||||
"@types/seedrandom": "3.0.8",
|
"@types/seedrandom": "3.0.8",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"typescript": "5.7.3"
|
"typescript": "5.8.2"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"built"
|
"built"
|
||||||
|
|
|
@ -8,16 +8,16 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@readme/openapi-parser": "2.7.0",
|
"@readme/openapi-parser": "3.0.1",
|
||||||
"@types/node": "22.13.0",
|
"@types/node": "22.13.14",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"openapi-types": "12.1.3",
|
"openapi-types": "12.1.3",
|
||||||
"openapi-typescript": "6.7.6",
|
"openapi-typescript": "6.7.6",
|
||||||
"ts-case-convert": "2.1.0",
|
"ts-case-convert": "2.1.0",
|
||||||
"tsx": "4.19.2",
|
"tsx": "4.19.3",
|
||||||
"typescript": "5.7.3"
|
"typescript": "5.8.2"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"built"
|
"built"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { mkdir, writeFile } from 'fs/promises';
|
import { mkdir, writeFile } from 'fs/promises';
|
||||||
import { OpenAPIV3_1 } from 'openapi-types';
|
import { OpenAPIV3_1 } from 'openapi-types';
|
||||||
import { toPascal } from 'ts-case-convert';
|
import { toPascal } from 'ts-case-convert';
|
||||||
import OpenAPIParser from '@readme/openapi-parser';
|
import { parse as OpenAPIParser } from '@readme/openapi-parser';
|
||||||
import openapiTS from 'openapi-typescript';
|
import openapiTS from 'openapi-typescript';
|
||||||
|
|
||||||
async function generateBaseTypes(
|
async function generateBaseTypes(
|
||||||
|
@ -319,7 +319,7 @@ async function main() {
|
||||||
await mkdir(generatePath, { recursive: true });
|
await mkdir(generatePath, { recursive: true });
|
||||||
|
|
||||||
const openApiJsonPath = './api.json';
|
const openApiJsonPath = './api.json';
|
||||||
const openApiDocs = await OpenAPIParser.parse(openApiJsonPath) as OpenAPIV3_1.Document;
|
const openApiDocs = await OpenAPIParser(openApiJsonPath) as OpenAPIV3_1.Document;
|
||||||
|
|
||||||
const typeFileName = './built/autogen/types.ts';
|
const typeFileName = './built/autogen/types.ts';
|
||||||
await generateBaseTypes(openApiDocs, openApiJsonPath, typeFileName);
|
await generateBaseTypes(openApiDocs, openApiJsonPath, typeFileName);
|
||||||
|
|
|
@ -35,11 +35,11 @@
|
||||||
"url": "git+https://github.com/misskey-dev/misskey.js.git"
|
"url": "git+https://github.com/misskey-dev/misskey.js.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@microsoft/api-extractor": "7.49.2",
|
"@microsoft/api-extractor": "7.52.2",
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@swc/jest": "0.2.37",
|
"@swc/jest": "0.2.37",
|
||||||
"@types/jest": "29.5.14",
|
"@types/jest": "29.5.14",
|
||||||
"@types/node": "22.13.0",
|
"@types/node": "22.13.14",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
"ncp": "2.0.0",
|
"ncp": "2.0.0",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"tsd": "0.31.2",
|
"tsd": "0.31.2",
|
||||||
"typescript": "5.7.3"
|
"typescript": "5.8.2"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"built",
|
"built",
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@swc/cli": "0.6.0",
|
"@swc/cli": "0.6.0",
|
||||||
"@swc/core": "1.10.12",
|
"@swc/core": "1.11.13",
|
||||||
"eventemitter3": "5.0.1",
|
"eventemitter3": "5.0.1",
|
||||||
"reconnecting-websocket": "4.4.0"
|
"reconnecting-websocket": "4.4.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,12 +25,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@types/node": "22.13.0",
|
"@types/node": "22.13.14",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"typescript": "5.7.3"
|
"typescript": "5.8.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"crc-32": "1.2.2",
|
"crc-32": "1.2.2",
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@types/serviceworker": "0.0.118",
|
"@types/serviceworker": "0.0.127",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"eslint-plugin-import": "2.31.0",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"typescript": "5.7.3"
|
"typescript": "5.8.2"
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
|
6439
pnpm-lock.yaml
generated
6439
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue