chore: update backend + blocks npm dependencies

scarlett
NGPixel 1 month ago
parent 8b0a5e3725
commit edfc4548db
No known key found for this signature in database

@ -4,7 +4,7 @@ import chalk from 'chalk'
import cfgHelper from '../helpers/config.ts'
import fs from 'node:fs/promises'
import path from 'node:path'
import yaml from 'js-yaml'
import { load } from 'js-yaml'
import { v4 as uuid } from 'uuid'
/**
@ -35,10 +35,10 @@ export default {
let appdata: ConfigObject = {}
try {
appconfig = yaml.load(
appconfig = load(
cfgHelper.parseConfigValue(await fs.readFile(confPaths.config, 'utf8'))
) as ConfigObject
appdata = yaml.load(await fs.readFile(confPaths.data, 'utf8')) as ConfigObject
appdata = load(await fs.readFile(confPaths.data, 'utf8')) as ConfigObject
if (!silent) {
console.info(chalk.green.bold('OK'))
}

@ -16,7 +16,6 @@ import fastifyCookie from '@fastify/cookie'
import fastifyFavicon from 'fastify-favicon'
import fastifyFormBody from '@fastify/formbody'
import fastifyHelmet from '@fastify/helmet'
import { Authenticator } from '@fastify/passport'
import fastifySensible from '@fastify/sensible'
import fastifySession from '@fastify/session'
import fastifyStatic from '@fastify/static'
@ -370,12 +369,6 @@ async function initHTTPServer() {
}
}
})
const fastifyPassport = new Authenticator()
app.register(fastifyPassport.initialize())
app.register(fastifyPassport.secureSession())
// app.use(WIKI.auth.passport.initialize())
// app.use(WIKI.auth.authenticate)
// ----------------------------------------
// API Routes

@ -1,6 +1,6 @@
import fs from 'node:fs/promises'
import path from 'node:path'
import yaml from 'js-yaml'
import { load } from 'js-yaml'
import { asc, eq } from 'drizzle-orm'
import { parseModuleProps } from '../helpers/common.ts'
import { authentication as authenticationTable, groups as groupsTable } from '../db/schema.ts'
@ -386,7 +386,7 @@ class Authentication {
path.join(WIKI.SERVERPATH, 'modules/authentication', dir, 'definition.yml'),
'utf8'
)
const defParsed = yaml.load(def) as Record<string, any>
const defParsed = load(def) as Record<string, any>
if (!defParsed.isAvailable) {
continue
}

@ -1,7 +1,7 @@
import fs from 'node:fs/promises'
import os from 'node:os'
import path from 'node:path'
import yaml from 'js-yaml'
import { load } from 'js-yaml'
import { execFile } from 'node:child_process'
import { promisify } from 'node:util'
@ -126,7 +126,7 @@ class Extensions {
try {
for (const dir of await fs.readdir(extensionsPath)) {
const raw = await fs.readFile(path.join(extensionsPath, dir, 'definition.yml'), 'utf8')
const parsed = yaml.load(raw) as ExtensionDefinition
const parsed = load(raw) as ExtensionDefinition
// -> The directory name is the key, as it is for every other module type
parsed.key = dir
definitions.push(parsed)

@ -1,6 +1,6 @@
import fs from 'node:fs/promises'
import path from 'node:path'
import yaml from 'js-yaml'
import { load } from 'js-yaml'
import { and, eq, inArray } from 'drizzle-orm'
import { parseModuleProps } from '../helpers/common.ts'
import { sites as sitesTable, storage as storageTable } from '../db/schema.ts'
@ -160,7 +160,7 @@ class Storage {
try {
for (const dir of await fs.readdir(storagePath)) {
const raw = await fs.readFile(path.join(storagePath, dir, 'definition.yml'), 'utf8')
const parsed = yaml.load(raw) as Record<string, any>
const parsed = load(raw) as Record<string, any>
// -> The directory name is the key, as it is for every other module type
parsed.key = dir
// -> Props carry a display `order`, applied once here so that every consumer — the admin

File diff suppressed because it is too large Load Diff

@ -35,17 +35,16 @@
"db-up": "drizzle-kit up --dialect=postgresql --out=./db/migrations"
},
"dependencies": {
"@fastify/compress": "9.0.0",
"@fastify/cookie": "11.0.2",
"@fastify/cors": "11.2.0",
"@fastify/compress": "9.1.1",
"@fastify/cookie": "11.1.2",
"@fastify/cors": "11.3.0",
"@fastify/formbody": "8.0.2",
"@fastify/helmet": "13.0.2",
"@fastify/passport": "3.0.2",
"@fastify/helmet": "13.1.0",
"@fastify/sensible": "6.0.4",
"@fastify/session": "11.1.1",
"@fastify/static": "9.1.3",
"@fastify/swagger": "9.7.0",
"@fastify/swagger-ui": "6.0.0",
"@fastify/session": "11.1.2",
"@fastify/static": "10.1.3",
"@fastify/swagger": "9.8.1",
"@fastify/swagger-ui": "6.1.1",
"@fastify/view": "12.0.0",
"@fastify/websocket": "11.3.0",
"@gquittet/graceful-server": "6.0.10",
@ -53,33 +52,33 @@
"@simplewebauthn/server": "13.3.2",
"ajv-formats": "3.0.1",
"bcryptjs": "3.0.3",
"chalk": "5.6.2",
"chalk": "6.0.0",
"cheerio": "1.2.0",
"cron-parser": "5.5.0",
"cron-parser": "5.7.0",
"diff": "9.0.0",
"drizzle-orm": "1.0.0-beta.15-859cf75",
"emittery": "2.0.0",
"es-toolkit": "1.47.1",
"fastify": "5.8.5",
"es-toolkit": "1.50.0",
"fastify": "5.11.2",
"fastify-favicon": "5.0.0",
"filesize": "11.0.17",
"fs-extra": "11.3.5",
"js-yaml": "4.2.0",
"filesize": "11.0.22",
"fs-extra": "11.4.0",
"js-yaml": "5.2.3",
"lib0": "0.2.117",
"mime": "4.1.0",
"nanoid": "5.1.11",
"nanoid": "6.0.1",
"node-cache": "5.1.2",
"openid-client": "6.8.4",
"pem-jwk": "2.0.0",
"pg": "8.21.0",
"pg": "8.22.0",
"poolifier": "5.3.2",
"pug": "3.0.4",
"qrcode": "1.5.4",
"sanitize-html": "2.17.6",
"semver": "7.8.4",
"uuid": "14.0.0",
"semver": "7.8.5",
"uuid": "14.0.1",
"y-protocols": "1.0.7",
"yjs": "13.6.31"
"yjs": "13.6.32"
},
"optionalDependencies": {
"sharp": "0.35.3"
@ -87,19 +86,19 @@
"devDependencies": {
"@types/fs-extra": "11.0.4",
"@types/js-yaml": "4.0.9",
"@types/node": "26.1.1",
"@types/node": "26.2.0",
"@types/pem-jwk": "2.0.2",
"@types/pg": "8.20.0",
"@types/pg": "8.21.0",
"@types/pug": "2.0.10",
"@types/qrcode": "1.5.6",
"@types/sanitize-html": "2.16.1",
"@types/semver": "7.7.1",
"@types/semver": "7.8.0",
"@types/ws": "8.18.1",
"drizzle-kit": "1.0.0-beta.15-859cf75",
"nodemon": "3.1.14",
"npm-check-updates": "22.2.3",
"oxfmt": "0.54.0",
"oxlint": "1.69.0",
"npm-check-updates": "23.0.2",
"oxfmt": "0.62.0",
"oxlint": "1.77.0",
"typescript": "7.0.2"
},
"engines": {
@ -111,5 +110,8 @@
"logo": "https://opencollective.com/opencollective/logo.txt"
},
"dev": true,
"releaseDate": "2026-01-01T01:01:01.000Z"
"releaseDate": "2026-01-01T01:01:01.000Z",
"allowScripts": {
"esbuild": false
}
}

File diff suppressed because it is too large Load Diff

@ -5,7 +5,9 @@
"main": "index.js",
"type": "module",
"scripts": {
"build": "rollup -c"
"build": "rollup -c",
"ncu": "ncu -i",
"ncu-u": "ncu -u"
},
"private": true,
"author": "Nicolas Giard",
@ -15,19 +17,20 @@
"@mathjax/mathjax-newcm-font": "4.1.3",
"@mathjax/src": "4.1.3",
"asciinema-player": "3.17.0",
"js-yaml": "4.1.0",
"js-yaml": "5.2.3",
"leaflet": "1.9.4",
"lit": "3.2.1",
"mermaid": "11.16.0",
"lit": "3.3.3",
"mermaid": "11.16.1",
"pako": "3.0.1",
"uqr": "0.1.3"
},
"devDependencies": {
"@rollup/plugin-commonjs": "29.0.3",
"@rollup/plugin-node-resolve": "15.3.0",
"@rollup/plugin-terser": "0.4.4",
"glob": "11.0.0",
"rollup": "4.24.0",
"rollup-plugin-summary": "2.0.1"
"@rollup/plugin-node-resolve": "16.0.3",
"@rollup/plugin-terser": "1.0.0",
"glob": "13.0.6",
"npm-check-updates": "23.0.2",
"rollup": "4.62.4",
"rollup-plugin-summary": "3.0.1"
}
}

@ -120,7 +120,11 @@ export default {
plugins: [
blocksManifest(),
cssAsString(),
resolve(),
// -> `production` is stated rather than left to be inferred: since v16 the plugin picks the
// `development` or `production` export condition off `process.env.NODE_ENV`, and this build
// runs from a bare `npm run build` with no NODE_ENV set. Unstated, lit resolves to its
// development entry and every block ships the dev-mode warnings and asserts.
resolve({ exportConditions: ['production'] }),
// -> A block's own code is ESM, but a library it pulls in need not be: mermaid reaches for dayjs,
// which ships as UMD, and rollup has no notion of `module.exports` without this
commonjs(),

Loading…
Cancel
Save