Move packages to npm registry

This commit is contained in:
Cadence Ember 2024-07-21 01:30:07 +12:00
parent 5a65e6f6da
commit eb98af0ac3
11 changed files with 177 additions and 346 deletions

View file

@ -1,6 +1,6 @@
// @ts-check
const mixin = require("mixin-deep")
const mixin = require("@cloudrac3r/mixin-deep")
const {channelToKState, _convertNameAndTopic} = require("./create-room")
const {kstateStripConditionals} = require("../../matrix/kstate")
const {test} = require("supertape")

View file

@ -1,6 +1,6 @@
// @ts-check
const mixin = require("mixin-deep")
const mixin = require("@cloudrac3r/mixin-deep")
const {guildToKState, ensureSpace} = require("./create-space")
const {kstateStripConditionals, kstateUploadMxc} = require("../../matrix/kstate")
const {test} = require("supertape")

View file

@ -3,7 +3,7 @@
const assert = require("assert").strict
const reg = require("../../matrix/read-registration")
const DiscordTypes = require("discord-api-types/v10")
const mixin = require("mixin-deep")
const mixin = require("@cloudrac3r/mixin-deep")
const passthrough = require("../../passthrough")
const {discord, sync, db, select} = passthrough

View file

@ -2,7 +2,7 @@
const assert = require("assert")
const stream = require("stream")
const {PNG} = require("pngjs")
const {PNG} = require("@cloudrac3r/pngjs")
const SIZE = 160 // Discord's display size on 1x displays is 160

View file

@ -1,10 +1,10 @@
// @ts-check
const assert = require("assert").strict
const markdown = require("discord-markdown")
const markdown = require("@cloudrac3r/discord-markdown")
const pb = require("prettier-bytes")
const DiscordTypes = require("discord-api-types/v10")
const {tag} = require("html-template-tag")
const {tag} = require("@cloudrac3r/html-template-tag")
const passthrough = require("../../passthrough")
const {sync, db, discord, select, from} = passthrough
@ -396,7 +396,7 @@ async function messageToEvent(message, guild, options = {}, di) {
discordOnly: true,
escapeHTML: false,
...customOptions
}, null, null)
})
return {body, html}
}
@ -439,12 +439,12 @@ async function messageToEvent(message, guild, options = {}, di) {
else if (!repliedToContent) repliedToContent = "[Replied-to message content wasn't provided by Discord]"
const repliedToHtml = markdown.toHTML(repliedToContent, {
discordCallback: getDiscordParseCallbacks(message, guild, true)
}, null, null)
})
const repliedToBody = markdown.toHTML(repliedToContent, {
discordCallback: getDiscordParseCallbacks(message, guild, false),
discordOnly: true,
escapeHTML: false,
}, null, null)
})
html = `<mx-reply><blockquote><a href="https://matrix.to/#/${repliedToEventRow.room_id}/${repliedToEventRow.event_id}">In reply to</a> ${repliedToUserHtml}`
+ `<br>${repliedToHtml}</blockquote></mx-reply>`
+ html

View file

@ -3,8 +3,8 @@
const assert = require("assert").strict
const {pipeline} = require("stream").promises
const sharp = require("sharp")
const {GIFrame} = require("giframe")
const {PNG} = require("pngjs")
const {GIFrame} = require("@cloudrac3r/giframe")
const {PNG} = require("@cloudrac3r/pngjs")
const streamMimeType = require("stream-mime-type")
const SIZE = 48

View file

@ -1,7 +1,7 @@
// @ts-check
const assert = require("assert").strict
const mixin = require("mixin-deep")
const mixin = require("@cloudrac3r/mixin-deep")
const {isDeepStrictEqual} = require("util")
const passthrough = require("../passthrough")

View file

@ -1,7 +1,7 @@
// @ts-check
const fetch = require("node-fetch").default
const mixin = require("mixin-deep")
const mixin = require("@cloudrac3r/mixin-deep")
const stream = require("stream")
const getStream = require("get-stream")

481
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -16,21 +16,21 @@
"license": "AGPL-3.0-or-later",
"dependencies": {
"@chriscdn/promise-semaphore": "^2.0.1",
"@cloudrac3r/discord-markdown": "^2.6.2",
"@cloudrac3r/giframe": "^0.4.3",
"@cloudrac3r/html-template-tag": "^5.0.1",
"@cloudrac3r/mixin-deep": "^3.0.0",
"@cloudrac3r/pngjs": "^7.0.3",
"better-sqlite3": "^9.0.0",
"chunk-text": "^2.0.1",
"cloudstorm": "^0.10.8",
"discord-markdown": "git+https://git.sr.ht/~cadence/nodejs-discord-markdown#2881b447954fcea10510f212fa4c1dbbdc0a57a3",
"entities": "^4.5.0",
"get-stream": "^6.0.1",
"giframe": "github:cloudrac3r/giframe#v0.4.2",
"heatsync": "^2.5.3",
"html-template-tag": "github:cloudrac3r/html-template-tag#v5.0",
"js-yaml": "^4.1.0",
"matrix-appservice": "^2.0.0",
"minimist": "^1.2.8",
"mixin-deep": "github:cloudrac3r/mixin-deep#v3.0.0",
"node-fetch": "^2.6.7",
"pngjs": "github:cloudrac3r/pngjs#v7.0.2",
"prettier-bytes": "^1.0.4",
"sharp": "^0.32.6",
"snowtransfer": "^0.10.5",
@ -40,14 +40,14 @@
"xxhash-wasm": "^1.0.2"
},
"devDependencies": {
"@cloudrac3r/tap-dot": "^2.0.2",
"@types/node": "^18.16.0",
"@types/node-fetch": "^2.6.3",
"c8": "^8.0.1",
"colorette": "^1.4.0",
"cross-env": "^7.0.3",
"discord-api-types": "^0.37.60",
"supertape": "^10.4.0",
"tap-dot": "github:cloudrac3r/tap-dot#9dd7750ececeae3a96afba91905be812b6b2cc2d"
"supertape": "^10.4.0"
},
"scripts": {
"addbot": "node addbot.js",

View file

@ -5,7 +5,7 @@
* @property {import("repl").REPLServer} repl
* @property {typeof import("./config")} config
* @property {import("./d2m/discord-client")} discord
* @property {import("heatsync")} sync
* @property {import("heatsync").default} sync
* @property {import("better-sqlite3/lib/database")} db
* @property {import("matrix-appservice").AppService} as
* @property {import("./db/orm").from} from