Working tree changes 2024-08-01 01:00
All checks were successful
Test project build / Build (push) Successful in 1m22s

This commit is contained in:
Bot 2024-08-01 01:00:02 +03:00 committed by multimote
parent 2e7cfe46b0
commit f071debbb2
27 changed files with 2395 additions and 327 deletions

View File

@ -14,7 +14,7 @@
let htmlCanvas: HTMLCanvasElement;
let fabricCanvas: fabric.Canvas;
let labelProps: LabelProps = { startPos: "left", size: { width: 240, height: 96 } };
let labelProps: LabelProps = { printDirection: "left", size: { width: 240, height: 96 } };
let previewOpened: boolean = false;
let selectedObject: fabric.Object | undefined = undefined;
let selectedCount: number = 0;
@ -124,7 +124,7 @@
if (savedLabelPropsStr != null) {
try {
const obj = JSON.parse(savedLabelPropsStr);
if ("size" in obj && "width" in obj.size && "height" in obj.size && ["top", "left"].includes(obj.startPos)) {
if ("size" in obj && "width" in obj.size && "height" in obj.size && ["top", "left"].includes(obj.printDirection)) {
labelProps = obj as LabelProps;
}
} catch (e) {
@ -187,7 +187,7 @@
<div class="image-editor">
<div class="row mb-1">
<div class="col d-flex justify-content-center">
<div class="canvas-wrapper print-start-{labelProps.startPos}">
<div class="canvas-wrapper print-start-{labelProps.printDirection}">
<canvas bind:this={htmlCanvas}></canvas>
</div>
</div>

View File

@ -15,15 +15,15 @@
// <option value="T:8:50x40">B# 50x40mm | 8dpmm (203dpi) | Top</option>
const presets: LabelPreset[] = [
{ width: 30, height: 12, unit: "mm", dpmm: 8, startPosition: "left" },
{ width: 40, height: 12, unit: "mm", dpmm: 8, startPosition: "left" },
{ width: 12, height: 40, unit: "mm", dpmm: 8, startPosition: "top" },
{ width: 30, height: 20, unit: "mm", dpmm: 8, startPosition: "top" },
{ width: 40, height: 30, unit: "mm", dpmm: 8, startPosition: "top" },
{ width: 40, height: 70, unit: "mm", dpmm: 8, startPosition: "top" },
{ width: 43, height: 25, unit: "mm", dpmm: 8, startPosition: "top" },
{ width: 50, height: 30, unit: "mm", dpmm: 8, startPosition: "top" },
{ width: 50, height: 40, unit: "mm", dpmm: 8, startPosition: "top" },
{ width: 30, height: 12, unit: "mm", dpmm: 8, printDirection: "left" },
{ width: 40, height: 12, unit: "mm", dpmm: 8, printDirection: "left" },
{ width: 12, height: 40, unit: "mm", dpmm: 8, printDirection: "top" },
{ width: 30, height: 20, unit: "mm", dpmm: 8, printDirection: "top" },
{ width: 40, height: 30, unit: "mm", dpmm: 8, printDirection: "top" },
{ width: 40, height: 70, unit: "mm", dpmm: 8, printDirection: "top" },
{ width: 43, height: 25, unit: "mm", dpmm: 8, printDirection: "top" },
{ width: 50, height: 30, unit: "mm", dpmm: 8, printDirection: "top" },
{ width: 50, height: 40, unit: "mm", dpmm: 8, printDirection: "top" },
];
const scaleDimensions = (preset: LabelPreset): { width: number; height: number } => {
@ -42,7 +42,7 @@
on:click={() => onItemSelected(item)}
>
<div
class="card print-start-{item.startPosition} d-flex justify-content-center align-items-center"
class="card print-start-{item.printDirection} d-flex justify-content-center align-items-center"
style="width: {scaleDimensions(item).width}%; height: {scaleDimensions(item).height}%;"
>
<span class="label p-1">

View File

@ -2,6 +2,8 @@
import FaIcon from "./FaIcon.svelte";
import { type LabelPreset, type LabelProps } from "../types";
import LabelPresetsBrowser from "./LabelPresetsBrowser.svelte";
import { icon } from "@fortawesome/fontawesome-svg-core";
import { printerMeta } from "../stores";
export let labelProps: LabelProps;
export let onChange: () => void;
@ -12,7 +14,7 @@
labelProps.size.width = labelProps.size.width < dpmm ? dpmm : labelProps.size.width;
labelProps.size.height = labelProps.size.height < dpmm ? dpmm : labelProps.size.height;
if (labelProps.startPos === "left") {
if (labelProps.printDirection === "left") {
labelProps.size.height -= labelProps.size.height % dpmm;
} else {
labelProps.size.width -= labelProps.size.width % dpmm;
@ -21,7 +23,7 @@
};
const onLabelPresetSelected = (preset: LabelPreset) => {
labelProps.startPos = preset.startPosition;
labelProps.printDirection = preset.printDirection;
labelProps.size.width = preset.width * preset.dpmm;
labelProps.size.height = preset.height * preset.dpmm;
@ -40,7 +42,7 @@
let width = labelProps.size.width;
labelProps.size.width = labelProps.size.height;
labelProps.size.height = width;
labelProps.startPos = labelProps.startPos === "top" ? "left" : "top";
labelProps.printDirection = labelProps.printDirection === "top" ? "left" : "top";
onChangePre();
};
</script>
@ -89,10 +91,15 @@
<div class="input-group flex-nowrap input-group-sm mb-3">
<span class="input-group-text">Print from</span>
<select class="form-select" bind:value={labelProps.startPos} on:change={onChangePre}>
<select class="form-select" bind:value={labelProps.printDirection} on:change={onChangePre}>
<option value="left">Left</option>
<option value="top">Top</option>
</select>
{#if $printerMeta !== undefined && $printerMeta.printDirection !== labelProps.printDirection }
<span class="input-group-text text-warning" title="Recommended direction for your printer is {labelProps.printDirection}" >
<FaIcon icon="warning"/>
</span>
{/if}
</div>
<!-- <button class="btn btn-sm btn-primary" on:click={onSubmit}>Update</button> -->
</div>

View File

@ -41,7 +41,7 @@
};
const onPrint = async () => {
const encoded: EncodedImage = ImageEncoder.encodeCanvas(previewCanvas, labelProps.startPos);
const encoded: EncodedImage = ImageEncoder.encodeCanvas(previewCanvas, labelProps.printDirection);
printState = "sending";
error = "";
@ -106,8 +106,9 @@
onClosed();
});
const taskVer = $printerClient?.getCapabilities().printTaskVersion;
if (taskVer !== undefined && taskVer !== ProtocolVersion.UNKNOWN) {
const taskVer = $printerClient?.getPrintTaskVersion();
if (taskVer !== undefined) {
console.log(`Detected print task version: ${ProtocolVersion[taskVer]}`);
printTaskVersion = taskVer;
}
@ -137,7 +138,7 @@
</div>
<div class="modal-body text-center">
<canvas class="print-start-{labelProps.startPos}" bind:this={previewCanvas}></canvas>
<canvas class="print-start-{labelProps.printDirection}" bind:this={previewCanvas}></canvas>
{#if printState === "sending"}
<div>Sending...</div>

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { PrinterModel, SoundSettingsItemType, type RfidInfo } from "@mmote/niimbluelib";
import { printerClient, connectedPrinterName, connectionState, initClient, heartbeatData, printerConfig } from "../stores";
import { SoundSettingsItemType, type RfidInfo } from "@mmote/niimbluelib";
import { printerClient, connectedPrinterName, connectionState, initClient, heartbeatData, printerInfo, printerMeta } from "../stores";
import type { ConnectionType } from "../types";
import FaIcon from "./FaIcon.svelte";
@ -50,12 +50,13 @@
</button>
<div class="dropdown-menu p-1">
<div>
Model: {$printerConfig.model === undefined ? "?" : (PrinterModel[$printerConfig.model] ?? "Unknown")}
Model metadata:
<pre>{JSON.stringify($printerMeta, null, 1)}</pre>
</div>
<div>
Printer info:
<pre>{JSON.stringify($printerConfig, null, 1)}</pre>
<pre>{JSON.stringify($printerInfo, null, 1)}</pre>
</div>
<div>
@ -83,7 +84,7 @@
{:else}
<select class="form-select" disabled={$connectionState === "connecting"} bind:value={connectionType}>
<option value="bluetooth">Bluetooth</option>
<option value="serial">Serial (WIP)</option>
<option value="serial">Serial (WIP, not usable)</option>
</select>
{/if}

View File

@ -5,20 +5,23 @@ import {
HeartbeatEvent,
NiimbotBluetoothClient,
NiimbotSerialClient,
PrinterInfoFetchedEvent,
// PacketParsedEvent,
RawPacketReceivedEvent,
RawPacketSentEvent,
Utils,
type HeartbeatData,
type NiimbotAbstractClient,
type PrinterConfig,
type PrinterInfo,
type PrinterModelMeta,
} from "@mmote/niimbluelib";
export const connectionState = writable<ConnectionState>("disconnected");
export const connectedPrinterName = writable<string>("");
export const printerClient = writable<NiimbotAbstractClient>();
export const heartbeatData = writable<HeartbeatData>();
export const printerConfig = writable<PrinterConfig>();
export const printerInfo = writable<PrinterInfo>();
export const printerMeta = writable<PrinterModelMeta|undefined>();
export const initClient = (connectionType: ConnectionType) => {
printerClient.update((prevClient: NiimbotAbstractClient) => {
@ -52,14 +55,20 @@ export const initClient = (connectionType: ConnectionType) => {
console.log("onConnect");
connectionState.set("connected");
connectedPrinterName.set(e.info.deviceName ?? "unknown");
printerConfig.set(newClient.getPrinterInfo());
});
newClient.addEventListener("printerinfofetched", (e: PrinterInfoFetchedEvent) => {
console.log("printerInfoFetched");
printerInfo.set(e.info);
printerMeta.set(newClient.getModelMetadata());
});
newClient.addEventListener("disconnect", () => {
console.log("onDisconnect");
connectionState.set("disconnected");
connectedPrinterName.set("");
printerConfig.set({});
printerInfo.set({});
printerMeta.set(undefined);
});
newClient.addEventListener("heartbeat", (e: HeartbeatEvent) => {

View File

@ -1,10 +1,10 @@
import type { HeadPosition } from "@mmote/niimbluelib";
import type { PrintDirection } from "@mmote/niimbluelib";
export type ConnectionState = "connecting" | "connected" | "disconnected";
export type ConnectionType = "bluetooth" | "serial";
export interface LabelProps {
startPos: HeadPosition
printDirection: PrintDirection
size: { width: number; height: number }
}
export type LabelPreset = {
@ -12,7 +12,7 @@ export type LabelPreset = {
height: number;
unit: string;
dpmm: number;
startPosition: HeadPosition;
printDirection: PrintDirection;
};
export type OjectType = "text" | "rectangle" | "line" | "circle" | "image"

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
// import fs from "fs";
const fs = require("fs");
fs.rmSync("dist", { recursive: true, force: true });

View File

@ -14,7 +14,8 @@
"clean-build": "yarn clean && yarn build",
"build": "tsc",
"test": "yarn build && node dist/test.js",
"clean": "node clean-dist.js"
"clean": "node clean-dist.mjs",
"gen-printers-list": "node utils/gen-printers-list.js > src/printer_models.ts"
},
"devDependencies": {
"@types/node": "^20.14.2",
@ -25,5 +26,11 @@
"dependencies": {
"async-mutex": "^0.5.0",
"typescript-event-target": "^1.1.1"
},
"optionalDependencies": {
"eslint": "9.x",
"@eslint/js": "^9.8.0",
"globals": "^15.8.0",
"typescript-eslint": "^7.18.0"
}
}

View File

@ -26,7 +26,7 @@ export class NiimbotBluetoothClient extends NiimbotAbstractClient {
private mutex: Mutex = new Mutex();
public async connect(): Promise<ConnectionInfo> {
this.disconnect();
await this.disconnect();
const options: RequestDeviceOptions = {
filters: BleConfiguration.FILTER,
@ -37,7 +37,7 @@ export class NiimbotBluetoothClient extends NiimbotAbstractClient {
throw new Error("Device has no Bluetooth Generic Attribute Profile");
}
const disconnectListener = async () => {
const disconnectListener = () => {
this.gattServer = undefined;
this.channel = undefined;
this.info = {};
@ -54,7 +54,7 @@ export class NiimbotBluetoothClient extends NiimbotAbstractClient {
const channel: BluetoothRemoteGATTCharacteristic = await service.getCharacteristic(BleConfiguration.CHARACTERISTIC);
channel.addEventListener("characteristicvaluechanged", async (event: Event) => {
channel.addEventListener("characteristicvaluechanged", (event: Event) => {
const target = event.target as BluetoothRemoteGATTCharacteristic;
const packet = NiimbotPacket.fromBytes(target.value!);
@ -109,7 +109,7 @@ export class NiimbotBluetoothClient extends NiimbotAbstractClient {
await this.sendPacket(packet, true);
if (packet.oneWay) {
return new NiimbotPacket(-1, []); // or undefined is better?
return new NiimbotPacket(ResponseCommandId.Invalid, []); // or undefined is better?
}
// what if response received at this point?
@ -120,7 +120,7 @@ export class NiimbotBluetoothClient extends NiimbotAbstractClient {
const listener = (evt: PacketReceivedEvent) => {
if (
packet.validResponseIds.length === 0 ||
packet.validResponseIds.includes(evt.packet.command)
packet.validResponseIds.includes(evt.packet.command as ResponseCommandId)
) {
clearTimeout(timeout);
this.removeEventListener("packetreceived", listener);

View File

@ -1,4 +1,4 @@
import { ConnectionInfo } from ".";
import { ConnectionInfo, PrinterInfo } from ".";
import { HeartbeatData, NiimbotPacket } from "../packets";
@ -66,6 +66,17 @@ export class HeartbeatEvent extends Event {
}
}
/**
*
*/
export class PrinterInfoFetchedEvent extends Event {
info: PrinterInfo;
constructor(info: PrinterInfo) {
super("printerinfofetched");
this.info = info;
}
}
export interface ClientEventMap {
connect: ConnectEvent;
disconnect: DisconnectEvent;
@ -73,5 +84,5 @@ export interface ClientEventMap {
rawpacketreceived: RawPacketReceivedEvent;
packetreceived: PacketReceivedEvent;
heartbeat: HeartbeatEvent;
// packetparsed: PacketParsedEvent;
printerinfofetched: PrinterInfoFetchedEvent;
}

View File

@ -1,18 +1,25 @@
import { AutoShutdownTime, BatteryChargeLevel, ConnectResult, NiimbotPacket } from "../packets";
import {
AutoShutdownTime,
BatteryChargeLevel,
ConnectResult,
getPrintTaskVersion,
NiimbotPacket,
ProtocolVersion,
} from "../packets";
import { TypedEventTarget } from "typescript-event-target";
import { ClientEventMap, HeartbeatEvent } from "./events";
import { ClientEventMap, HeartbeatEvent, PrinterInfoFetchedEvent } from "./events";
import { Abstraction } from "../packets/abstraction";
import { getPrinterCapabilities, PrinterCapabilities, PrinterModel } from "../printers";
import { getPrinterMetaById, PrinterModelMeta } from "..";
export type ConnectionInfo = {
deviceName?: string;
result: ConnectResult;
};
export interface PrinterConfig {
export interface PrinterInfo {
connectResult?: ConnectResult;
protocolVersion?: number;
model?: PrinterModel;
model_id?: number;
serial?: string;
mac?: string;
charge?: BatteryChargeLevel;
@ -21,7 +28,7 @@ export interface PrinterConfig {
export abstract class NiimbotAbstractClient extends TypedEventTarget<ClientEventMap> {
public readonly abstraction: Abstraction;
protected info: PrinterConfig = {};
protected info: PrinterInfo = {};
private heartbeatTimer?: NodeJS.Timeout;
constructor() {
@ -69,17 +76,18 @@ export abstract class NiimbotAbstractClient extends TypedEventTarget<ClientEvent
}
}
public async fetchPrinterInfo(): Promise<PrinterConfig> {
public async fetchPrinterInfo(): Promise<PrinterInfo> {
// console.log(await this.abstraction.getPrinterStatusData());
this.info.model = await this.abstraction.getPrinterModel();
this.info.model_id = await this.abstraction.getPrinterModel();
this.info.serial = await this.abstraction.getPrinterSerialNumber();
this.info.mac = await this.abstraction.getPrinterBluetoothMacAddress();
this.info.charge = await this.abstraction.getBatteryChargeLevel();
this.info.autoShutdownTime = await this.abstraction.getAutoShutDownTime();
this.dispatchTypedEvent("printerinfofetched", new PrinterInfoFetchedEvent(this.info));
return this.info;
}
public getPrinterInfo(): PrinterConfig {
public getPrinterInfo(): PrinterInfo {
return this.info;
}
@ -89,9 +97,10 @@ export abstract class NiimbotAbstractClient extends TypedEventTarget<ClientEvent
* @param interval Heartbeat interval, default is 1000ms
*/
public startHeartbeat(intervalMs: number = 1000): void {
this.heartbeatTimer = setInterval(async () => {
const data = await this.abstraction.heartbeat();
this.dispatchTypedEvent("heartbeat", new HeartbeatEvent(data));
this.heartbeatTimer = setInterval(() => {
this.abstraction.heartbeat().then((data) => {
this.dispatchTypedEvent("heartbeat", new HeartbeatEvent(data));
}).catch(console.error);
}, intervalMs);
}
@ -104,9 +113,23 @@ export abstract class NiimbotAbstractClient extends TypedEventTarget<ClientEvent
return this.heartbeatTimer === undefined;
}
/** Get printer capabilities based on the printer model */
public getCapabilities(): PrinterCapabilities {
return getPrinterCapabilities(this.info.model ?? PrinterModel.UNKNOWN);
/** Get printer capabilities based on the printer model. Model library is hardcoded. */
public getModelMetadata(): PrinterModelMeta | undefined {
if (this.info.model_id === undefined) {
return undefined;
}
return getPrinterMetaById(this.info.model_id);
}
/** Determine print task version if any */
public getPrintTaskVersion(): ProtocolVersion | undefined {
const meta = this.getModelMetadata();
if (meta === undefined) {
return undefined;
}
return getPrintTaskVersion(meta.model);
}
}

View File

@ -9,7 +9,7 @@ export class NiimbotSerialClient extends NiimbotAbstractClient {
private writer?: WritableStreamDefaultWriter<Uint8Array> = undefined;
public async connect(): Promise<ConnectionInfo> {
this.disconnect();
await this.disconnect();
const _port: SerialPort = await navigator.serial.requestPort();
@ -50,7 +50,7 @@ export class NiimbotSerialClient extends NiimbotAbstractClient {
}
if (this.port !== undefined) {
this.port.close();
await this.port.close();
this.dispatchTypedEvent("disconnect", new DisconnectEvent());
}
@ -59,7 +59,7 @@ export class NiimbotSerialClient extends NiimbotAbstractClient {
}
public isConnected(): boolean {
throw this.port !== undefined && this.writer !== undefined;
return this.port !== undefined && this.writer !== undefined;
}
public async sendPacketWaitResponse(packet: NiimbotPacket, timeoutMs: number = 1000): Promise<NiimbotPacket> {
@ -67,50 +67,72 @@ export class NiimbotSerialClient extends NiimbotAbstractClient {
throw new Error("Port is closed");
}
this.sendPacket(packet);
if (this.port.readable === null) {
throw new Error("Port is not readable");
}
let data = new Uint8Array();
let p: NiimbotPacket | undefined = undefined;
await this.sendPacket(packet);
const reader = this.port.readable.getReader();
void reader.read().then(( e ) => {
console.log("read " + Utils.bufToHex(e.value || []))
})
await Utils.sleep(2000);
throw new Error("err");
// let data = new Uint8Array();
// let p: NiimbotPacket | undefined = undefined;
// console.log("waiting response");
// todo: rewrite, no timeout!
try {
while (true) {
const { value, done } = await reader.read();
if (done) {
console.log("done");
break;
}
const newArr = new Uint8Array(data.length + value.length);
newArr.set(data);
newArr.set(value, data.length);
data = newArr;
try {
const dv = new DataView(data.buffer, data.byteOffset, data.byteLength);
p = NiimbotPacket.fromBytes(dv);
break;
} catch (e) {
console.log("skipping");
}
// Do something with |value|...
}
} catch (error) {
console.error(error);
} finally {
reader.releaseLock();
}
// try {
// while (true) {
// console.log("try read");
// const { value, done } = await reader.read();
// console.log("read " + Utils.bufToHex(value || []))
// if (done) {
// console.log("done");
// break;
// }
// const newArr = new Uint8Array(data.length + value.length);
// newArr.set(data);
// newArr.set(value, data.length);
// data = newArr;
// try {
// console.log('read' + Utils.bufToHex(data));
// const dv = new DataView(data.buffer, data.byteOffset, data.byteLength);
// p = NiimbotPacket.fromBytes(dv);
// break;
// } catch (e) {
// console.log("skipping");
// }
// // Do something with |value|...
// }
// } catch (error) {
// console.error(error);
// } finally {
// reader.releaseLock();
// }
// console.log("end");
// if (p === undefined) {
// throw new Error("err");
// }
console.log("end");
if (p === undefined) {
throw new Error("err");
}
// const reader: ReadableStreamDefaultReader<Uint8Array> = this.port.readable.getReader();
// const timer: NodeJS.Timeout = setTimeout(() => {
@ -139,7 +161,7 @@ export class NiimbotSerialClient extends NiimbotAbstractClient {
// }
// }));
return p;
// return p;
}
public async sendRaw(data: Uint8Array, force?: boolean) {
@ -147,7 +169,7 @@ export class NiimbotSerialClient extends NiimbotAbstractClient {
throw new Error("Port is not writable");
}
// this.writer.releaseLock();
this.writer.releaseLock();
this.dispatchTypedEvent("rawpacketsent", new RawPacketSentEvent(data));
await Utils.sleep(2); // fixme maybe

View File

@ -14,11 +14,11 @@ export type EncodedImage = {
rowsData: ImageRow[];
};
export type HeadPosition = "left" | "top";
export type PrintDirection = "left" | "top";
export class ImageEncoder {
/** headPos = "left" rotates image for 90 degrees clockwise */
public static encodeCanvas(canvas: HTMLCanvasElement, headPos: HeadPosition = "left"): EncodedImage {
/** printDirection = "left" rotates image for 90 degrees clockwise */
public static encodeCanvas(canvas: HTMLCanvasElement, printDirection: PrintDirection = "left"): EncodedImage {
const ctx: CanvasRenderingContext2D = canvas.getContext("2d")!;
const iData: ImageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
const rowsData: ImageRow[] = [];
@ -26,7 +26,7 @@ export class ImageEncoder {
let cols: number = canvas.width;
let rows: number = canvas.height;
if (headPos === "left") {
if (printDirection === "left") {
cols = canvas.height;
rows = canvas.width;
}
@ -43,7 +43,7 @@ export class ImageEncoder {
for (let colOct = 0; colOct < cols / 8; colOct++) {
let pixelsOctet: number = 0;
for (let colBit = 0; colBit < 8; colBit++) {
if (ImageEncoder.isPixelNonWhite(iData, colOct * 8 + colBit, row, headPos)) {
if (ImageEncoder.isPixelNonWhite(iData, colOct * 8 + colBit, row, printDirection)) {
pixelsOctet |= 1 << (7 - colBit);
isVoid = false;
blackPixelsCount++;
@ -82,11 +82,11 @@ export class ImageEncoder {
return { cols, rows, rowsData };
}
/** headPos = "left" rotates image to 90 degrees clockwise */
public static isPixelNonWhite(iData: ImageData, x: number, y: number, headPos: HeadPosition = "left"): boolean {
/** printDirection = "left" rotates image to 90 degrees clockwise */
public static isPixelNonWhite(iData: ImageData, x: number, y: number, printDirection: PrintDirection = "left"): boolean {
let idx = y * iData.width + x;
if (headPos === "left") {
if (printDirection === "left") {
idx = (iData.height - 1 - x) * iData.width + y;
}
@ -102,7 +102,7 @@ export class ImageEncoder {
const result: number[] = [];
for (let bytePos = 0; bytePos < data.byteLength; bytePos++) {
let b: number = data[bytePos];
const b: number = data[bytePos];
for (let bitPos = 0; bitPos < 8; bitPos++) {
// iterate from most significant bit of byte
if (b & (1 << (7 - bitPos))) {

View File

@ -2,4 +2,4 @@ export * from "./client";
export * from "./packets";
export * from "./image_encoder";
export * from "./utils";
export * from "./printers";
export * from "./printer_models";

View File

@ -15,7 +15,6 @@ import {
NiimbotAbstractClient,
Utils,
Validators,
PrinterModel,
ProtocolVersion,
} from "..";
import { SequentialDataReader } from "./data_reader";
@ -135,7 +134,7 @@ export class Abstraction {
if (packet.dataLength > 12) {
supportColor = packet.data[10];
let n = packet.data[11] * 100 + packet.data[12];
const n = packet.data[11] * 100 + packet.data[12];
if (n >= 204 && n < 300) {
protocolVersion = 3;
}
@ -150,16 +149,10 @@ export class Abstraction {
};
}
public async getPrinterModel(): Promise<PrinterModel> {
public async getPrinterModel(): Promise<number> {
const packet = await this.send(PacketGenerator.getPrinterInfo(PrinterInfoType.PrinterModelId));
Validators.u8ArrayLengthEquals(packet.data, 2);
const id = Utils.bytesToI16(packet.data);
if (id in PrinterModel) {
return id as PrinterModel;
}
return PrinterModel.UNKNOWN;
return Utils.bytesToI16(packet.data);
}
/** Read paper nfc tag info */
@ -234,9 +227,9 @@ export class Abstraction {
}
r.end();
const model = this.client.getPrinterInfo().model ?? PrinterModel.UNKNOWN;
const model: number | undefined = this.client.getPrinterInfo().model_id;
if (![512, 514, 513, 2304, 1792, 3584, 5120, 2560, 3840, 4352, 272].includes(model)) {
if (model !== undefined && ![512, 514, 513, 2304, 1792, 3584, 5120, 2560, 3840, 4352, 272].includes(model)) {
info.lidClosed = !info.lidClosed;
}
@ -288,7 +281,12 @@ export class Abstraction {
await this.send(PacketGenerator.setSoundSettings(soundType, value));
}
public async print(protoVersion: ProtocolVersion, image: EncodedImage, options?: PrintOptions, timeout?:number): Promise<void> {
public async print(
protoVersion: ProtocolVersion,
image: EncodedImage,
options?: PrintOptions,
timeout?: number
): Promise<void> {
this.setTimeout(timeout ?? 10_000);
const packets: NiimbotPacket[] = PacketGenerator.generatePrintSequence(protoVersion, image, options);
try {

View File

@ -34,14 +34,14 @@ export class SequentialDataReader {
/** Read variable length bytes */
readVBytes(): Uint8Array {
let len = this.readI8();
let part: Uint8Array = this.readBytes(len);
const len = this.readI8();
const part: Uint8Array = this.readBytes(len);
return part;
}
/** Read variable length string */
readVString(): string {
let part: Uint8Array = this.readVBytes();
const part: Uint8Array = this.readVBytes();
return Utils.u8ArrayToString(part);
}

View File

@ -1,5 +1,5 @@
export enum RequestCommandId {
/** see {@link AutoShutdownTime} */
Invalid = -1,
Connect = 0xc1,
CancelPrint = 0xda,
Heartbeat = 0xdc,
@ -31,6 +31,7 @@ export enum RequestCommandId {
}
export enum ResponseCommandId {
Invalid = -1,
In_NotSupported = 0x00,
In_Connect = 0xc2,
In_HeartbeatAdvanced1 = 0xdd,
@ -96,15 +97,17 @@ export enum SoundSettingsItemType {
PowerSound = 0x02,
}
// https://github.com/dadrum/niimbot_flutter_plugin/blob/main/lib/niimbot/niimbot_platform_interface/niimbot.dart#L167
export enum LabelType {
Invalid = 0,
/** Default for D11 and similar */
Separated = 1,
WithBlackMarkers = 2,
WithGaps = 1,
Black = 2,
Continuous = 3,
Perforated = 4,
Transparent = 5,
PvcTag = 6,
BlackMarkGap = 10,
HeatShrinkTube = 11,
}
export enum HeartbeatType {
@ -138,7 +141,21 @@ export enum ConnectResult {
FirmwareErrors = 90,
}
export enum ProtocolVersion {
/** Used in D11 */
V1,
/** Used in B21, D110new */
V2,
/** Used in B16 */
V3,
/** Used in B1 */
V4,
/** Not used */
V5,
}
export * from "./packet";
export * from "./packet_generator";
export * from "./abstraction";
export * from "./data_reader";
export * from "./protocol_versions";

View File

@ -5,14 +5,14 @@ export class NiimbotPacket {
public static readonly HEAD = new Uint8Array([0x55, 0x55]);
public static readonly TAIL = new Uint8Array([0xaa, 0xaa]);
private _command: RequestCommandId;
private _command: RequestCommandId | ResponseCommandId;
private _data: Uint8Array;
private _validResponseIds: ResponseCommandId[];
/** There can be no response after this request. */
private _oneWay: boolean;
constructor(command: number, data: Uint8Array | number[], validResponseIds: ResponseCommandId[] = []) {
constructor(command: RequestCommandId | ResponseCommandId, data: Uint8Array | number[], validResponseIds: ResponseCommandId[] = []) {
this._command = command;
this._data = data instanceof Uint8Array ? data : new Uint8Array(data);
this._validResponseIds = validResponseIds;
@ -46,7 +46,7 @@ export class NiimbotPacket {
return this._validResponseIds;
}
public get command(): number {
public get command(): RequestCommandId | ResponseCommandId {
return this._command;
}

View File

@ -8,9 +8,9 @@ import {
ResponseCommandId,
SoundSettingsItemType,
SoundSettingsType,
ProtocolVersion
} from ".";
import { EncodedImage, ImageEncoder, ImageRow as ImagePart } from "../image_encoder";
import { ProtocolVersion } from "../printers";
import { Utils } from "../utils";
export type PrintOptions = {
@ -305,7 +305,7 @@ export class PacketGenerator {
*/
public static generatePrintSequenceV3(image: EncodedImage, options?: PrintOptions): NiimbotPacket[] {
return [
PacketGenerator.setLabelType(options?.labelType ?? LabelType.Separated),
PacketGenerator.setLabelType(options?.labelType ?? LabelType.WithGaps),
PacketGenerator.setDensity(options?.density ?? 2),
PacketGenerator.printStart(),
PacketGenerator.printClear(),
@ -344,7 +344,7 @@ export class PacketGenerator {
public static generatePrintSequenceV4(image: EncodedImage, options?: PrintOptions): NiimbotPacket[] {
return [
PacketGenerator.setDensity(options?.density ?? 2),
PacketGenerator.setLabelType(options?.labelType ?? LabelType.Separated),
PacketGenerator.setLabelType(options?.labelType ?? LabelType.WithGaps),
PacketGenerator.printStartV4(options?.quantity ?? 1),
PacketGenerator.pageStart(),
PacketGenerator.setPageSizeV3(image.rows, image.cols, options?.quantity ?? 1),

View File

@ -0,0 +1,18 @@
import { ProtocolVersion } from ".";
import { PrinterModel as M } from "..";
export const getPrintTaskVersion = (model: M): ProtocolVersion | undefined => {
switch (model) {
case M.D11:
case M.D11_H:
case M.D11S:
return ProtocolVersion.V1;
case M.D110:
case M.D110_M:
return ProtocolVersion.V3;
case M.B1:
return ProtocolVersion.V4;
}
return undefined;
};

View File

@ -0,0 +1,622 @@
/* AUTO-GENERATED FILE. DO NOT EDIT! */
/* use 'yarn gen-printers-list' to generate */
import { PrintDirection, LabelType as LT } from ".";
export enum PrinterModel {
UNKNOWN = "UNKNOWN",
B3S_P = "B3S_P",
T2S = "T2S",
N1 = "N1",
TP2M_H = "TP2M_H",
B31 = "B31",
B21_PRO = "B21_PRO",
B18S = "B18S",
D11_H = "D11_H",
B21_H = "B21_H",
HI_D110 = "HI_D110",
D110_M = "D110_M",
M2_H = "M2_H",
A20 = "A20",
MP3K_W = "MP3K_W",
A203 = "A203",
MP3K = "MP3K",
K3_W = "K3_W",
K3 = "K3",
BETTY = "BETTY",
T8S = "T8S",
DXX = "DXX",
B21S = "B21S",
B21_L2B = "B21_L2B",
D11S = "D11S",
A63 = "A63",
FUST = "FUST",
P1 = "P1",
P18 = "P18",
S6 = "S6",
B21S_C2B = "B21S_C2B",
P1S = "P1S",
B1 = "B1",
A8 = "A8",
B21_C2B = "B21_C2B",
Z401 = "Z401",
B16 = "B16",
B32R = "B32R",
B32 = "B32",
D41 = "D41",
S3 = "S3",
JC_M90 = "JC_M90",
JCB3S = "JCB3S",
B203 = "B203",
S1 = "S1",
D61 = "D61",
D110 = "D110",
B21 = "B21",
D101 = "D101",
HI_NB_D11 = "HI_NB_D11",
A8_P = "A8_P",
S6_P = "S6_P",
T6 = "T6",
B50W = "B50W",
T7 = "T7",
T8 = "T8",
B3S = "B3S",
B3 = "B3",
B18 = "B18",
D11 = "D11",
B11 = "B11",
B50 = "B50",
ET10 = "ET10",
}
export interface PrinterModelMeta {
model: PrinterModel;
id: [number, ...number[]];
dpi: number;
printDirection: PrintDirection;
maxPrintWidth: number;
printheadPixels: number;
paperTypes: number[];
}
export const modelsLibrary: PrinterModelMeta[] = [
{
model: PrinterModel.B3S_P,
id: [272],
dpi: 203,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 576,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Transparent],
},
{
model: PrinterModel.T2S,
id: [53250],
dpi: 203,
printDirection: "top",
maxPrintWidth: 107,
printheadPixels: 832,
paperTypes: [LT.WithGaps, LT.Black],
},
{
model: PrinterModel.N1,
id: [3586],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 120,
paperTypes: [LT.WithGaps, LT.HeatShrinkTube, LT.Transparent, LT.BlackMarkGap],
},
{
model: PrinterModel.TP2M_H,
id: [4609],
dpi: 300,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 591,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.B31,
id: [5632],
dpi: 203,
printDirection: "top",
maxPrintWidth: 77,
printheadPixels: 600,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.B21_PRO,
id: [785],
dpi: 300,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 591,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Transparent],
},
{
model: PrinterModel.B18S,
id: [3585],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 120,
paperTypes: [LT.WithGaps, LT.Transparent, LT.BlackMarkGap, LT.HeatShrinkTube],
},
{
model: PrinterModel.D11_H,
id: [528],
dpi: 300,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 178,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.B21_H,
id: [784],
dpi: 300,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 567,
paperTypes: [LT.WithGaps, LT.Transparent, LT.Continuous, LT.Black],
},
{
model: PrinterModel.HI_D110,
id: [2305],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 120,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.D110_M,
id: [2320],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 120,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.M2_H,
id: [4608],
dpi: 300,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 591,
paperTypes: [LT.WithGaps, LT.Transparent, LT.Black, LT.BlackMarkGap],
},
{
model: PrinterModel.A20,
id: [2817],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 400,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.MP3K_W,
id: [4867],
dpi: 203,
printDirection: "top",
maxPrintWidth: 82,
printheadPixels: 656,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.A203,
id: [2818],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 400,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.MP3K,
id: [4866],
dpi: 203,
printDirection: "top",
maxPrintWidth: 82,
printheadPixels: 656,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.K3_W,
id: [4865],
dpi: 203,
printDirection: "top",
maxPrintWidth: 82,
printheadPixels: 656,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.K3,
id: [4864],
dpi: 203,
printDirection: "top",
maxPrintWidth: 82,
printheadPixels: 656,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.BETTY,
id: [2561],
dpi: 203,
printDirection: "left",
maxPrintWidth: 25,
printheadPixels: 192,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.T8S,
id: [2053],
dpi: 300,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 851,
paperTypes: [LT.WithGaps],
},
{
model: PrinterModel.B21S,
id: [777],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Transparent],
},
{
model: PrinterModel.B21_L2B,
id: [769],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.D11S,
id: [514],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 96,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.A63,
id: [2054],
dpi: 300,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 851,
paperTypes: [LT.WithGaps, LT.Transparent, LT.Black],
},
{
model: PrinterModel.FUST,
id: [513],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 96,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.P1,
id: [1024],
dpi: 300,
printDirection: "left",
maxPrintWidth: 80,
printheadPixels: 697,
paperTypes: [LT.PvcTag],
},
{
model: PrinterModel.P18,
id: [1026],
dpi: 300,
printDirection: "left",
maxPrintWidth: 87,
printheadPixels: 662,
paperTypes: [LT.PvcTag],
},
{
model: PrinterModel.S6,
id: [261],
dpi: 203,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 576,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.B21S_C2B,
id: [776],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.P1S,
id: [1025],
dpi: 300,
printDirection: "left",
maxPrintWidth: 87,
printheadPixels: 662,
paperTypes: [LT.PvcTag],
},
{
model: PrinterModel.B1,
id: [4096],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.A8,
id: [256],
dpi: 203,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 600,
paperTypes: [LT.Black, LT.WithGaps, LT.Continuous],
},
{
model: PrinterModel.B21_C2B,
id: [771, 775],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Continuous, LT.Transparent, LT.Black],
},
{
model: PrinterModel.Z401,
id: [2051],
dpi: 300,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 851,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.B16,
id: [1792],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 96,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.B32R,
id: [2050],
dpi: 300,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 851,
paperTypes: [LT.WithGaps],
},
{
model: PrinterModel.B32,
id: [2049],
dpi: 300,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 851,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.S3,
id: [51460],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Perforated],
},
{
model: PrinterModel.JC_M90,
id: [51461],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Perforated],
},
{
model: PrinterModel.JCB3S,
id: [256],
dpi: 203,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 576,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Transparent],
},
{
model: PrinterModel.B203,
id: [2816],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 400,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.S1,
id: [51458],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Perforated],
},
{
model: PrinterModel.D110,
id: [2304, 2305],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 96,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.B21,
id: [768],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Transparent],
},
{
model: PrinterModel.D101,
id: [2560],
dpi: 203,
printDirection: "left",
maxPrintWidth: 25,
printheadPixels: 192,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.HI_NB_D11,
id: [512],
dpi: 203,
printDirection: "left",
maxPrintWidth: 14,
printheadPixels: 120,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.A8_P,
id: [273],
dpi: 203,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 616,
paperTypes: [LT.WithGaps, LT.Black, LT.Transparent],
},
{
model: PrinterModel.S6_P,
id: [274],
dpi: 203,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 600,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.T6,
id: [51715],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Perforated],
},
{
model: PrinterModel.B50W,
id: [51714],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Perforated],
},
{
model: PrinterModel.T7,
id: [51717],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Perforated],
},
{
model: PrinterModel.T8,
id: [51718],
dpi: 300,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 567,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Perforated],
},
{
model: PrinterModel.B3S,
id: [256, 260, 262],
dpi: 203,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 576,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Transparent],
},
{
model: PrinterModel.B3,
id: [52993],
dpi: 203,
printDirection: "top",
maxPrintWidth: 75,
printheadPixels: 600,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Transparent],
},
{
model: PrinterModel.B18,
id: [3584],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 120,
paperTypes: [LT.WithGaps, LT.Transparent, LT.BlackMarkGap, LT.HeatShrinkTube],
},
{
model: PrinterModel.D11,
id: [512],
dpi: 203,
printDirection: "left",
maxPrintWidth: 15,
printheadPixels: 96,
paperTypes: [LT.WithGaps, LT.Transparent],
},
{
model: PrinterModel.B11,
id: [51457],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 384,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Perforated, LT.Transparent],
},
{
model: PrinterModel.B50,
id: [51713],
dpi: 203,
printDirection: "top",
maxPrintWidth: 50,
printheadPixels: 400,
paperTypes: [LT.WithGaps, LT.Black, LT.Continuous, LT.Perforated],
},
{
model: PrinterModel.ET10,
id: [5376],
dpi: 203,
printDirection: "top",
maxPrintWidth: 200,
printheadPixels: 1600,
paperTypes: [LT.Continuous],
},
];
export const getPrinterMetaById = (id: number): PrinterModelMeta | undefined => {
return modelsLibrary.find((o) => o.id.includes(id));
};
export const getPrinterMetaByModel = (model: PrinterModel): PrinterModelMeta | undefined => {
return modelsLibrary.find((o) => o.model === model);
};

View File

@ -1,184 +0,0 @@
export enum PrinterModel {
UNKNOWN = 0,
A20 = 2817,
A203 = 2818,
A63 = 2054,
A8 = 1280,
B11 = 51457,
B16 = 1792,
B18 = 3584,
B18S = 3585,
B20 = 4608,
B201__B1 = 4096,
B203 = 2816,
B21__B21_OLD = 768,
B21_C2B = 771,
B21_C2B_ZX__B21_C2B_V2 = 775,
B21_C2W = 772,
B21_C3W = 774,
B21_H = 784,
B21_L2B = 769,
B21_L2W = 770,
B21_PRO = 785,
B21S = 777,
B21S_C2B = 776,
B3 = 52993,
B31 = 5632,
B32 = 2049,
B32_R = 2050,
B3S = 256,
B3S_GD__B3S_V3 = 262,
B3S_P = 272,
B3S_ZX__B3S_V2 = 260,
B50 = 51713,
B50W = 51714,
BETTY = 2561,
C1 = 5120,
D101 = 2560,
D11 = 512,
D11_H = 528,
D110 = 2304,
D110_M = 2320,
D11S = 514,
D61 = 1536,
ET10 = 5376,
FUST = 513,
H1 = 4352,
H10 = 3840,
HI_D110 = 2305,
JC_M90 = 51461,
K1__K3 = 4864,
K1S__K3_W = 4865,
MP3K = 4866,
MP3K_W = 4867,
P1 = 1024,
P18 = 1026,
P1S = 1025,
S1 = 51458,
S3 = 51460,
S6 = 257,
S6_1 = 258,
S6_2 = 261,
T2S = 53250,
T6 = 51715,
T7 = 51717,
T8 = 51718,
T8S = 2053,
TP2M_H = 4609,
TSC = 255,
Z401 = 2051,
Z401_R = 2052,
}
export enum ProtocolVersion {
UNKNOWN = 0,
/** Used in D11 */
V1,
/** Used in B21, D110new */
V2,
/** Used in B16 */
V3,
/** Used in B1 */
V4,
/** Not used */
V5,
}
export interface PrinterCapabilities {
printTaskVersion: ProtocolVersion;
}
import M = PrinterModel;
export const getPrinterCapabilities = (id: PrinterModel): PrinterCapabilities => {
let printTaskVersion = ProtocolVersion.UNKNOWN;
switch (id) {
case M.D11:
case M.D11_H:
case M.D11S:
printTaskVersion = ProtocolVersion.V1;
break;
case M.D110:
case M.D110_M:
printTaskVersion = ProtocolVersion.V3;
break;
case M.B201__B1:
printTaskVersion = ProtocolVersion.V4;
break;
// todo: find other models info
case M.UNKNOWN:
case M.A20:
case M.A203:
case M.A63:
case M.A8:
case M.B11:
case M.B16:
case M.B18:
case M.B18S:
case M.B20:
case M.B203:
case M.B21__B21_OLD:
case M.B21_C2B:
case M.B21_C2B_ZX__B21_C2B_V2:
case M.B21_C2W:
case M.B21_C3W:
case M.B21_H:
case M.B21_L2B:
case M.B21_L2W:
case M.B21_PRO:
case M.B21S:
case M.B21S_C2B:
case M.B3:
case M.B31:
case M.B32:
case M.B32_R:
case M.B3S:
case M.B3S_GD__B3S_V3:
case M.B3S_P:
case M.B3S_ZX__B3S_V2:
case M.B50:
case M.B50W:
case M.BETTY:
case M.C1:
case M.D101:
case M.D61:
case M.ET10:
case M.FUST:
case M.H1:
case M.H10:
case M.HI_D110:
case M.JC_M90:
case M.K1__K3:
case M.K1S__K3_W:
case M.MP3K:
case M.MP3K_W:
case M.P1:
case M.P18:
case M.P1S:
case M.S1:
case M.S3:
case M.S6:
case M.S6_1:
case M.S6_2:
case M.T2S:
case M.T6:
case M.T7:
case M.T8:
case M.T8S:
case M.TP2M_H:
case M.TSC:
case M.Z401:
case M.Z401_R:
break;
default:
((_id: never) => {
throw new Error(`Printer model ${_id} was unhandled!`);
})(id);
}
return { printTaskVersion };
};

View File

@ -1,4 +1,4 @@
import { ImageEncoder, Utils } from ".";
import { getPrinterMetaById, ImageEncoder, Utils } from ".";
// const data = Uint8Array.of(0xF0, 0x10);
// const result = ImageEncoder.indexPixels(data);
@ -22,3 +22,7 @@ import { ImageEncoder, Utils } from ".";
// data.rowsData.forEach(e => console.log(e))
// console.log("")
// ImageEncoder.encodeCanvasV2(canvas, "top");
const id = 2304;
console.log(getPrinterMetaById(id))

View File

@ -6,7 +6,7 @@ export class Utils {
public static bufToHex(buf: DataView | Uint8Array | number[], separator: string = " "): string {
const arr: number[] = buf instanceof DataView ? this.dataViewToNumberArray(buf) : Array.from(buf);
return arr.map(Utils.numberToHex).join(separator);
return arr.map((n) => Utils.numberToHex(n)).join(separator);
}
public static dataViewToNumberArray(dw: DataView): number[] {

View File

@ -2,6 +2,83 @@
# yarn lockfile v1
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
eslint-visitor-keys "^3.3.0"
"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae"
integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==
"@eslint/config-array@^0.17.1":
version "0.17.1"
resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.17.1.tgz#d9b8b8b6b946f47388f32bedfd3adf29ca8f8910"
integrity sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==
dependencies:
"@eslint/object-schema" "^2.1.4"
debug "^4.3.1"
minimatch "^3.1.2"
"@eslint/eslintrc@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6"
integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
espree "^10.0.1"
globals "^14.0.0"
ignore "^5.2.0"
import-fresh "^3.2.1"
js-yaml "^4.1.0"
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
"@eslint/js@9.8.0", "@eslint/js@^9.8.0":
version "9.8.0"
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.8.0.tgz#ae9bc14bb839713c5056f5018bcefa955556d3a4"
integrity sha512-MfluB7EUfxXtv3i/++oh89uzAr4PDI4nn201hsp+qaXqsjAWzinlZEHEfPgAX4doIlKvPG/i0A9dpKxOLII8yA==
"@eslint/object-schema@^2.1.4":
version "2.1.4"
resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843"
integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==
"@humanwhocodes/module-importer@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==
"@humanwhocodes/retry@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570"
integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
dependencies:
"@nodelib/fs.stat" "2.0.5"
run-parallel "^1.1.9"
"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
version "2.0.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8":
version "1.2.8"
resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
dependencies:
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"
"@types/node@^20.14.2":
version "20.14.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.2.tgz#a5f4d2bcb4b6a87bffcaa717718c5a0f208f4a18"
@ -19,6 +96,129 @@
resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz#f066abfcd1cbe66267cdbbf0de010d8a41b41597"
integrity sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==
"@typescript-eslint/eslint-plugin@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz#b16d3cf3ee76bf572fdf511e79c248bdec619ea3"
integrity sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==
dependencies:
"@eslint-community/regexpp" "^4.10.0"
"@typescript-eslint/scope-manager" "7.18.0"
"@typescript-eslint/type-utils" "7.18.0"
"@typescript-eslint/utils" "7.18.0"
"@typescript-eslint/visitor-keys" "7.18.0"
graphemer "^1.4.0"
ignore "^5.3.1"
natural-compare "^1.4.0"
ts-api-utils "^1.3.0"
"@typescript-eslint/parser@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.18.0.tgz#83928d0f1b7f4afa974098c64b5ce6f9051f96a0"
integrity sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==
dependencies:
"@typescript-eslint/scope-manager" "7.18.0"
"@typescript-eslint/types" "7.18.0"
"@typescript-eslint/typescript-estree" "7.18.0"
"@typescript-eslint/visitor-keys" "7.18.0"
debug "^4.3.4"
"@typescript-eslint/scope-manager@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz#c928e7a9fc2c0b3ed92ab3112c614d6bd9951c83"
integrity sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==
dependencies:
"@typescript-eslint/types" "7.18.0"
"@typescript-eslint/visitor-keys" "7.18.0"
"@typescript-eslint/type-utils@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz#2165ffaee00b1fbbdd2d40aa85232dab6998f53b"
integrity sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==
dependencies:
"@typescript-eslint/typescript-estree" "7.18.0"
"@typescript-eslint/utils" "7.18.0"
debug "^4.3.4"
ts-api-utils "^1.3.0"
"@typescript-eslint/types@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9"
integrity sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==
"@typescript-eslint/typescript-estree@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz#b5868d486c51ce8f312309ba79bdb9f331b37931"
integrity sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==
dependencies:
"@typescript-eslint/types" "7.18.0"
"@typescript-eslint/visitor-keys" "7.18.0"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
minimatch "^9.0.4"
semver "^7.6.0"
ts-api-utils "^1.3.0"
"@typescript-eslint/utils@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.18.0.tgz#bca01cde77f95fc6a8d5b0dbcbfb3d6ca4be451f"
integrity sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==
dependencies:
"@eslint-community/eslint-utils" "^4.4.0"
"@typescript-eslint/scope-manager" "7.18.0"
"@typescript-eslint/types" "7.18.0"
"@typescript-eslint/typescript-estree" "7.18.0"
"@typescript-eslint/visitor-keys@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz#0564629b6124d67607378d0f0332a0495b25e7d7"
integrity sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==
dependencies:
"@typescript-eslint/types" "7.18.0"
eslint-visitor-keys "^3.4.3"
acorn-jsx@^5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
acorn@^8.12.0:
version "8.12.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248"
integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==
ajv@^6.12.4:
version "6.12.6"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
ansi-styles@^4.1.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
dependencies:
color-convert "^2.0.1"
argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
array-union@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
async-mutex@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.5.0.tgz#353c69a0b9e75250971a64ac203b0ebfddd75482"
@ -26,11 +226,596 @@ async-mutex@^0.5.0:
dependencies:
tslib "^2.4.0"
balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
brace-expansion@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
dependencies:
balanced-match "^1.0.0"
braces@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
dependencies:
fill-range "^7.1.1"
callsites@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
chalk@^4.0.0:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
color-convert@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
dependencies:
color-name "~1.1.4"
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
cross-spawn@^7.0.2:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
dependencies:
path-key "^3.1.0"
shebang-command "^2.0.0"
which "^2.0.1"
debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
version "4.3.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b"
integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==
dependencies:
ms "2.1.2"
deep-is@^0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
dir-glob@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
dependencies:
path-type "^4.0.0"
escape-string-regexp@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
eslint-scope@^8.0.2:
version "8.0.2"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.2.tgz#5cbb33d4384c9136083a71190d548158fe128f94"
integrity sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==
dependencies:
esrecurse "^4.3.0"
estraverse "^5.2.0"
eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
eslint-visitor-keys@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb"
integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==
eslint@9.x:
version "9.8.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.8.0.tgz#a4f4a090c8ea2d10864d89a6603e02ce9f649f0f"
integrity sha512-K8qnZ/QJzT2dLKdZJVX6W4XOwBzutMYmt0lqUS+JdXgd+HTYFlonFgkJ8s44d/zMPPCnOOk0kMWCApCPhiOy9A==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.11.0"
"@eslint/config-array" "^0.17.1"
"@eslint/eslintrc" "^3.1.0"
"@eslint/js" "9.8.0"
"@humanwhocodes/module-importer" "^1.0.1"
"@humanwhocodes/retry" "^0.3.0"
"@nodelib/fs.walk" "^1.2.8"
ajv "^6.12.4"
chalk "^4.0.0"
cross-spawn "^7.0.2"
debug "^4.3.2"
escape-string-regexp "^4.0.0"
eslint-scope "^8.0.2"
eslint-visitor-keys "^4.0.0"
espree "^10.1.0"
esquery "^1.5.0"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
file-entry-cache "^8.0.0"
find-up "^5.0.0"
glob-parent "^6.0.2"
ignore "^5.2.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
is-path-inside "^3.0.3"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.4.1"
lodash.merge "^4.6.2"
minimatch "^3.1.2"
natural-compare "^1.4.0"
optionator "^0.9.3"
strip-ansi "^6.0.1"
text-table "^0.2.0"
espree@^10.0.1, espree@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56"
integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==
dependencies:
acorn "^8.12.0"
acorn-jsx "^5.3.2"
eslint-visitor-keys "^4.0.0"
esquery@^1.5.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7"
integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==
dependencies:
estraverse "^5.1.0"
esrecurse@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==
dependencies:
estraverse "^5.2.0"
estraverse@^5.1.0, estraverse@^5.2.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
fast-glob@^3.2.9:
version "3.3.2"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.2"
merge2 "^1.3.0"
micromatch "^4.0.4"
fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
fast-levenshtein@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
fastq@^1.6.0:
version "1.17.1"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47"
integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==
dependencies:
reusify "^1.0.4"
file-entry-cache@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f"
integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==
dependencies:
flat-cache "^4.0.0"
fill-range@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
dependencies:
to-regex-range "^5.0.1"
find-up@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
dependencies:
locate-path "^6.0.0"
path-exists "^4.0.0"
flat-cache@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c"
integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==
dependencies:
flatted "^3.2.9"
keyv "^4.5.4"
flatted@^3.2.9:
version "3.3.1"
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a"
integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==
glob-parent@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"
glob-parent@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
dependencies:
is-glob "^4.0.3"
globals@^14.0.0:
version "14.0.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e"
integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==
globals@^15.8.0:
version "15.8.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-15.8.0.tgz#e64bb47b619dd8cbf32b3c1a0a61714e33cbbb41"
integrity sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw==
globby@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
dependencies:
array-union "^2.1.0"
dir-glob "^3.0.1"
fast-glob "^3.2.9"
ignore "^5.2.0"
merge2 "^1.4.1"
slash "^3.0.0"
graphemer@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
ignore@^5.2.0, ignore@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==
import-fresh@^3.2.1:
version "3.3.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==
dependencies:
parent-module "^1.0.0"
resolve-from "^4.0.0"
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
dependencies:
is-extglob "^2.1.1"
is-number@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
is-path-inside@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283"
integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
js-yaml@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
dependencies:
argparse "^2.0.1"
json-buffer@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==
json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==
keyv@^4.5.4:
version "4.5.4"
resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"
integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==
dependencies:
json-buffer "3.0.1"
levn@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
dependencies:
prelude-ls "^1.2.1"
type-check "~0.4.0"
locate-path@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
dependencies:
p-locate "^5.0.0"
lodash.merge@^4.6.2:
version "4.6.2"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
merge2@^1.3.0, merge2@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
micromatch@^4.0.4:
version "4.0.7"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5"
integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==
dependencies:
braces "^3.0.3"
picomatch "^2.3.1"
minimatch@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
dependencies:
brace-expansion "^1.1.7"
minimatch@^9.0.4:
version "9.0.5"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
dependencies:
brace-expansion "^2.0.1"
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
optionator@^0.9.3:
version "0.9.4"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734"
integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==
dependencies:
deep-is "^0.1.3"
fast-levenshtein "^2.0.6"
levn "^0.4.1"
prelude-ls "^1.2.1"
type-check "^0.4.0"
word-wrap "^1.2.5"
p-limit@^3.0.2:
version "3.1.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
dependencies:
yocto-queue "^0.1.0"
p-locate@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
dependencies:
p-limit "^3.0.2"
parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
dependencies:
callsites "^3.0.0"
path-exists@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
path-key@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
path-type@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
picomatch@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
punycode@^2.1.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
queue-microtask@^1.2.2:
version "1.2.3"
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
resolve-from@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
reusify@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
run-parallel@^1.1.9:
version "1.2.0"
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
dependencies:
queue-microtask "^1.2.2"
semver@^7.6.0:
version "7.6.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==
shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
dependencies:
shebang-regex "^3.0.0"
shebang-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
slash@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"
strip-json-comments@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
supports-color@^7.1.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
dependencies:
has-flag "^4.0.0"
text-table@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==
to-regex-range@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
dependencies:
is-number "^7.0.0"
ts-api-utils@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1"
integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==
tslib@^2.4.0:
version "2.6.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0"
integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==
dependencies:
prelude-ls "^1.2.1"
typescript-eslint@^7.18.0:
version "7.18.0"
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.18.0.tgz#e90d57649b2ad37a7475875fa3e834a6d9f61eb2"
integrity sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==
dependencies:
"@typescript-eslint/eslint-plugin" "7.18.0"
"@typescript-eslint/parser" "7.18.0"
"@typescript-eslint/utils" "7.18.0"
typescript-event-target@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/typescript-event-target/-/typescript-event-target-1.1.1.tgz#20a6d491b77d2e37dc432c5394ab74c0d7065539"
@ -45,3 +830,27 @@ undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
uri-js@^4.2.2:
version "4.4.1"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
dependencies:
punycode "^2.1.0"
which@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
dependencies:
isexe "^2.0.0"
word-wrap@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==