mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 16:20:25 +00:00
refactor: 整体重构 (#1381)
* feat: pnpm new * Refactor build and release workflows, update dependencies Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
This commit is contained in:
24
packages/napcat-qrcode/vendor/QRCode/QR8bitByte.ts
vendored
Normal file
24
packages/napcat-qrcode/vendor/QRCode/QR8bitByte.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { MODE_8BIT_BYTE } from './QRMode';
|
||||
|
||||
class QR8bitByte {
|
||||
mode: number;
|
||||
data: string;
|
||||
|
||||
constructor (data: string) {
|
||||
this.mode = MODE_8BIT_BYTE;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
getLength (): number {
|
||||
return this.data.length;
|
||||
}
|
||||
|
||||
write (buffer: { put: (arg0: number, arg1: number) => void }): void {
|
||||
for (let i = 0; i < this.data.length; i++) {
|
||||
// not JIS ...
|
||||
buffer.put(this.data.charCodeAt(i), 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default QR8bitByte;
|
||||
Reference in New Issue
Block a user