quote0 1.0.0-alpha.6 → 1.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/base.d.mts.map +1 -1
- package/dist/api/base.mjs.map +1 -1
- package/dist/api/modules/content.d.mts.map +1 -1
- package/dist/api/modules/content.mjs.map +1 -1
- package/dist/api/modules/device.d.mts.map +1 -1
- package/dist/api/modules/device.mjs.map +1 -1
- package/dist/components/Container.mjs.map +1 -1
- package/dist/components/ListItem.mjs.map +1 -1
- package/dist/components/Section.mjs.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +28 -27
package/dist/api/base.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.mts","names":[],"sources":["../../src/api/base.ts"],"mappings":";UAAiB,cAAA;EACf,MAAA;AAAA;AAAA,cAGI,UAAA;EAAA,UACM,MAAA;;IACI;EAAA,GAAU,cAAA;EAAA,gBAIR,YAAA;EAAA,mBACG,WAAA;EAAA,gBAEH,OAAA;;;;YAEN,aAAA,CAAc,IAAA;EAAA,
|
|
1
|
+
{"version":3,"file":"base.d.mts","names":[],"sources":["../../src/api/base.ts"],"mappings":";UAAiB,cAAA;EACf,MAAA;AAAA;AAAA,cAGI,UAAA;EAAA,UACM,MAAA;;IACI;EAAA,GAAU,cAAA;EAAA,gBAIR,YAAA;EAAA,mBACG,WAAA;EAAA,gBAEH,OAAA;;;;YAEN,aAAA,CAAc,IAAA;EAAA,UAIR,QAAA,CAAS,IAAA,UAAc,OAAA,GAAU,WAAA,GAAW,OAAA;AAAA"}
|
package/dist/api/base.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.mjs","names":[],"sources":["../../src/api/base.ts"],"sourcesContent":["export interface BaseClientArgs {\n apiKey: string\n}\n\nclass BaseClient {\n protected apiKey: string\n constructor({ apiKey }: BaseClientArgs) {\n this.apiKey = apiKey\n }\n\n static readonly API_ENDPOINT = 'https://dot.mindreset.tech/api'\n protected readonly apiEndpoint = BaseClient.API_ENDPOINT\n\n static readonly DISPLAY = { width: 296, height: 152 }\n\n protected composeApiUrl(path: string) {\n return path.startsWith('/')
|
|
1
|
+
{"version":3,"file":"base.mjs","names":[],"sources":["../../src/api/base.ts"],"sourcesContent":["export interface BaseClientArgs {\n apiKey: string\n}\n\nclass BaseClient {\n protected apiKey: string\n constructor({ apiKey }: BaseClientArgs) {\n this.apiKey = apiKey\n }\n\n static readonly API_ENDPOINT = 'https://dot.mindreset.tech/api'\n protected readonly apiEndpoint = BaseClient.API_ENDPOINT\n\n static readonly DISPLAY = { width: 296, height: 152 }\n\n protected composeApiUrl(path: string) {\n return path.startsWith('/') ? this.apiEndpoint + path : this.apiEndpoint + '/' + path\n }\n\n protected async fetchApi(path: string, options?: RequestInit) {\n const url = this.composeApiUrl(path)\n const mergedOptions = Object.assign(\n {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: 'Bearer ' + this.apiKey,\n },\n },\n options ?? {},\n )\n\n try {\n const response = await fetch(url, mergedOptions)\n\n if (response.ok) {\n return await response.json()\n } else {\n throw new Error(`API request failed with status ${response.status}: ${response.statusText}`)\n }\n } catch (error) {\n throw error\n }\n }\n}\n\nexport default BaseClient\n"],"mappings":"AAIA,IAAM,EAAN,MAAM,CAAW,CACf,OACA,YAAY,CAAE,UAA0B,CACtC,KAAK,OAAS,EAGhB,OAAgB,aAAe,iCAC/B,YAAiC,EAAW,aAE5C,OAAgB,QAAU,CAAE,MAAO,IAAK,OAAQ,IAAK,CAErD,cAAwB,EAAc,CACpC,OAAO,EAAK,WAAW,IAAI,CAAG,KAAK,YAAc,EAAO,KAAK,YAAc,IAAM,EAGnF,MAAgB,SAAS,EAAc,EAAuB,CAC5D,IAAM,EAAM,KAAK,cAAc,EAAK,CAC9B,EAAgB,OAAO,OAC3B,CACE,OAAQ,MACR,QAAS,CACP,eAAgB,mBAChB,cAAe,UAAY,KAAK,OACjC,CACF,CACD,GAAW,EAAE,CACd,CAED,GAAI,CACF,IAAM,EAAW,MAAM,MAAM,EAAK,EAAc,CAEhD,GAAI,EAAS,GACX,OAAO,MAAM,EAAS,MAAM,CAE5B,MAAU,MAAM,kCAAkC,EAAS,OAAO,IAAI,EAAS,aAAa,OAEvF,EAAO,CACd,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../src/api/modules/content.ts"],"mappings":";;;cAEa,MAAA;AAAA,KACD,MAAA,WAAiB,MAAA;AAAA,cAEhB,YAAA;AAAA,KACD,UAAA,WAAqB,YAAA;AAAA,cAEpB,cAAA;AAAA,KAYD,YAAA,WAAuB,cAAA;AAAA,cAEtB,UAAA;AAAA,KACD,QAAA,WAAmB,UAAA;AAAA,cAEzB,aAAA,SAAsB,UAAA;EACpB,IAAA,CAAA;IAAO;EAAA;IAAc,QAAA;EAAA,IAAkB,OAAA;;;;
|
|
1
|
+
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../src/api/modules/content.ts"],"mappings":";;;cAEa,MAAA;AAAA,KACD,MAAA,WAAiB,MAAA;AAAA,cAEhB,YAAA;AAAA,KACD,UAAA,WAAqB,YAAA;AAAA,cAEpB,cAAA;AAAA,KAYD,YAAA,WAAuB,cAAA;AAAA,cAEtB,UAAA;AAAA,KACD,QAAA,WAAmB,UAAA;AAAA,cAEzB,aAAA,SAAsB,UAAA;EACpB,IAAA,CAAA;IAAO;EAAA;IAAc,QAAA;EAAA,IAAkB,OAAA;;;;EAQvC,IAAA,CAAA;IAAO,QAAA;IAAU;EAAA;IAAc,QAAA;IAAkB,QAAA,EAAU,QAAA;EAAA,IAAU,OAAA;;;;;;;;;;aAa9D,MAAA;;;;EAQP,QAAA,CAAA;IACF;EAAA;IAAc,QAAA;EAAA,GAChB,OAAA;IACE,UAAA;IACA,KAAA;IACA,OAAA;IACA,SAAA;IACA,IAAA;IACA,IAAA;IACA,OAAA;EAAA,IACD,OAAA;;;;EAUG,SAAA,CAAA;IACF;EAAA;IAAc,QAAA;EAAA,GAChB,OAAA;IACE,UAAA;IACA,KAAA;IACA,IAAA;IACA,MAAA,GAAS,MAAA;IACT,UAAA,GAAa,UAAA;IACb,YAAA,GAAe,YAAA;IACf,OAAA;EAAA,IACD,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","names":[],"sources":["../../../src/api/modules/content.ts"],"sourcesContent":["import BaseClient from '../base'\n\nexport const BORDER = [0, 1] as const\nexport type Border = (typeof BORDER)[number]\n\nexport const DITHER_TYPES = ['DIFFUSION', 'ORDERED', 'NONE'] as const\nexport type DitherType = (typeof DITHER_TYPES)[number]\n\nexport const DITHER_KERNELS = [\n 'THRESHOLD',\n 'ATKINSON',\n 'BURKES',\n 'FLOYD_STEINBERG',\n 'SIERRA2',\n 'STUCKI',\n 'JARVIS_JUDICE_NINKE',\n 'DIFFUSION_ROW',\n 'DIFFUSION_COLUMN',\n 'DIFFUSION_2D',\n] as const\nexport type DitherKernel = (typeof DITHER_KERNELS)[number]\n\nexport const TASK_TYPES = ['fixed', 'loop'] as const\nexport type TaskType = (typeof TASK_TYPES)[number]\n\nclass ContentModule extends BaseClient {\n async next({ deviceId }: { deviceId: string }) {\n const response = (await this.fetchApi(
|
|
1
|
+
{"version":3,"file":"content.mjs","names":[],"sources":["../../../src/api/modules/content.ts"],"sourcesContent":["import BaseClient from '../base'\n\nexport const BORDER = [0, 1] as const\nexport type Border = (typeof BORDER)[number]\n\nexport const DITHER_TYPES = ['DIFFUSION', 'ORDERED', 'NONE'] as const\nexport type DitherType = (typeof DITHER_TYPES)[number]\n\nexport const DITHER_KERNELS = [\n 'THRESHOLD',\n 'ATKINSON',\n 'BURKES',\n 'FLOYD_STEINBERG',\n 'SIERRA2',\n 'STUCKI',\n 'JARVIS_JUDICE_NINKE',\n 'DIFFUSION_ROW',\n 'DIFFUSION_COLUMN',\n 'DIFFUSION_2D',\n] as const\nexport type DitherKernel = (typeof DITHER_KERNELS)[number]\n\nexport const TASK_TYPES = ['fixed', 'loop'] as const\nexport type TaskType = (typeof TASK_TYPES)[number]\n\nclass ContentModule extends BaseClient {\n async next({ deviceId }: { deviceId: string }) {\n const response = (await this.fetchApi(`/authV2/open/device/${deviceId}/next`, {\n method: 'POST',\n })) as { code: number; message: string }\n\n return response\n }\n\n async list({ deviceId, taskType }: { deviceId: string; taskType: TaskType }) {\n const response = (await this.fetchApi(\n `/api/authV2/open/device/${deviceId}/${taskType}/list`,\n )) as {\n type: 'TEXT_API' | 'IMAGE_API' | 'GENERAL'\n key: string | null\n refreshNow?: boolean\n title?: string\n message?: string\n signature?: string\n icon?: string\n link?: string\n image?: string\n border?: Border\n ditherType?: string\n ditherKernel?: string\n }\n\n return response\n }\n\n async pushText(\n { deviceId }: { deviceId: string },\n options: {\n refreshNow?: boolean\n title?: string\n message?: string\n signature?: string\n icon?: string\n link?: string\n taskKey?: string\n },\n ) {\n const response = (await this.fetchApi(`/api/authV2/open/device/${deviceId}/text`, {\n method: 'POST',\n body: JSON.stringify(options),\n })) as { code: number; message: string }\n\n return response\n }\n\n async pushImage(\n { deviceId }: { deviceId: string },\n options: {\n refreshNow?: boolean\n image: string\n link?: string\n border?: Border\n ditherType?: DitherType\n ditherKernel?: DitherKernel\n taskKey?: string\n },\n ) {\n const response = (await this.fetchApi(`/authV2/open/device/${deviceId}/image`, {\n method: 'POST',\n body: JSON.stringify(options),\n })) as { code: number; message: string }\n\n return response\n }\n}\n\nexport default ContentModule\n"],"mappings":"2BAEA,MAAa,EAAS,CAAC,EAAG,EAAE,CAGf,EAAe,CAAC,YAAa,UAAW,OAAO,CAG/C,EAAiB,CAC5B,YACA,WACA,SACA,kBACA,UACA,SACA,sBACA,gBACA,mBACA,eACD,CAMD,IAAM,EAAN,cAA4B,CAAW,CACrC,MAAM,KAAK,CAAE,YAAkC,CAK7C,OAJkB,MAAM,KAAK,SAAS,uBAAuB,EAAS,OAAQ,CAC5E,OAAQ,OACT,CAAC,CAKJ,MAAM,KAAK,CAAE,WAAU,YAAsD,CAkB3E,OAjBkB,MAAM,KAAK,SAC3B,2BAA2B,EAAS,GAAG,EAAS,OACjD,CAkBH,MAAM,SACJ,CAAE,YACF,EASA,CAMA,OALkB,MAAM,KAAK,SAAS,2BAA2B,EAAS,OAAQ,CAChF,OAAQ,OACR,KAAM,KAAK,UAAU,EAAQ,CAC9B,CAAC,CAKJ,MAAM,UACJ,CAAE,YACF,EASA,CAMA,OALkB,MAAM,KAAK,SAAS,uBAAuB,EAAS,QAAS,CAC7E,OAAQ,OACR,KAAM,KAAK,UAAU,EAAQ,CAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.mts","names":[],"sources":["../../../src/api/modules/device.ts"],"mappings":";;;cAEM,YAAA,SAAqB,UAAA;EACnB,IAAA,CAAA,GAAI,OAAA;;;;;;EAWJ,MAAA,CAAA;IAAS;EAAA;IAAc,QAAA;EAAA,IAAkB,OAAA;;;;;
|
|
1
|
+
{"version":3,"file":"device.d.mts","names":[],"sources":["../../../src/api/modules/device.ts"],"mappings":";;;cAEM,YAAA,SAAqB,UAAA;EACnB,IAAA,CAAA,GAAI,OAAA;;;;;;EAWJ,MAAA,CAAA;IAAS;EAAA;IAAc,QAAA;EAAA,IAAkB,OAAA;;;;;MAMzC,OAAA;MACA,OAAA;MACA,WAAA;MACA,OAAA;MACA,IAAA;IAAA;;MAGA,IAAA;MACA,OAAA;QACE,OAAA;QACA,MAAA;QACA,KAAA;MAAA;MAEF,IAAA;QACE,OAAA;QACA,KAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.mjs","names":[],"sources":["../../../src/api/modules/device.ts"],"sourcesContent":["import BaseClient from '../base'\n\nclass DeviceModule extends BaseClient {\n async list() {\n const response = (await this.fetchApi(`/authV2/open/devices`)) as {\n id: string\n series: string\n model: string\n edition: 1 | 2\n }[]\n\n return response\n }\n\n async status({ deviceId }: { deviceId: string }) {\n const response = (await this.fetchApi(
|
|
1
|
+
{"version":3,"file":"device.mjs","names":[],"sources":["../../../src/api/modules/device.ts"],"sourcesContent":["import BaseClient from '../base'\n\nclass DeviceModule extends BaseClient {\n async list() {\n const response = (await this.fetchApi(`/authV2/open/devices`)) as {\n id: string\n series: string\n model: string\n edition: 1 | 2\n }[]\n\n return response\n }\n\n async status({ deviceId }: { deviceId: string }) {\n const response = (await this.fetchApi(`/authV2/open/device/${deviceId}/status`)) as {\n deviceId: string\n alias: string | null\n location: string | null\n status: {\n version: string\n current: string\n description: string\n battery: string\n wifi: string\n }\n renderInfo: {\n last: string\n current: {\n rotated: boolean\n border: number\n image: string[]\n }\n next: {\n battery: string\n power: string\n }\n }\n }\n\n return response\n }\n}\n\nexport default DeviceModule\n"],"mappings":"2BAEA,IAAM,EAAN,cAA2B,CAAW,CACpC,MAAM,MAAO,CAQX,OAPkB,MAAM,KAAK,SAAS,uBAAuB,CAU/D,MAAM,OAAO,CAAE,YAAkC,CA0B/C,OAzBkB,MAAM,KAAK,SAAS,uBAAuB,EAAS,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.mjs","names":[],"sources":["../../src/components/Container.tsx"],"sourcesContent":["import { Box } from 'ink'\nimport type React from 'react'\n\nexport default function Container({
|
|
1
|
+
{"version":3,"file":"Container.mjs","names":[],"sources":["../../src/components/Container.tsx"],"sourcesContent":["import { Box } from 'ink'\nimport type React from 'react'\n\nexport default function Container({ ...props }: React.ComponentProps<typeof Box>) {\n return <Box borderStyle=\"round\" flexDirection=\"column\" {...props} />\n}\n"],"mappings":"kEAGA,SAAwB,EAAU,CAAE,GAAG,GAA2C,CAChF,OAAO,EAAC,EAAD,CAAK,YAAY,QAAQ,cAAc,SAAS,GAAI,EAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.mjs","names":[],"sources":["../../src/components/ListItem.tsx"],"sourcesContent":["import { Box, Text } from 'ink'\n\nexport default function ListItem({\n leading,\n children,\n trailing,\n ...props\n}: React.ComponentProps<typeof Box> & {\n leading?: React.ReactNode\n children?: React.ReactNode\n trailing?: React.ReactNode\n}) {\n return (\n <Box justifyContent=\"space-between\" {...props}>\n <Box>\n {leading && (\n <>\n {leading}\n <Text> </Text>\n </>\n )}\n {children}\n </Box>\n <Box>{trailing}</Box>\n </Box>\n )\n}\n"],"mappings":"oGAEA,SAAwB,EAAS,CAC/B,UACA,WACA,WACA,GAAG,GAKF,CACD,OACE,EAAC,
|
|
1
|
+
{"version":3,"file":"ListItem.mjs","names":[],"sources":["../../src/components/ListItem.tsx"],"sourcesContent":["import { Box, Text } from 'ink'\n\nexport default function ListItem({\n leading,\n children,\n trailing,\n ...props\n}: React.ComponentProps<typeof Box> & {\n leading?: React.ReactNode\n children?: React.ReactNode\n trailing?: React.ReactNode\n}) {\n return (\n <Box justifyContent=\"space-between\" {...props}>\n <Box>\n {leading && (\n <>\n {leading}\n <Text> </Text>\n </>\n )}\n {children}\n </Box>\n <Box>{trailing}</Box>\n </Box>\n )\n}\n"],"mappings":"oGAEA,SAAwB,EAAS,CAC/B,UACA,WACA,WACA,GAAG,GAKF,CACD,OACE,EAAC,EAAD,CAAK,eAAe,gBAAgB,GAAI,WAAxC,CACE,EAAC,EAAD,CAAA,SAAA,CACG,GACC,EAAA,EAAA,CAAA,SAAA,CACG,EACD,EAAC,EAAD,CAAA,SAAM,IAAQ,CAAA,CACb,CAAA,CAAA,CAEJ,EACG,CAAA,CAAA,CACN,EAAC,EAAD,CAAA,SAAM,EAAe,CAAA,CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Section.mjs","names":[],"sources":["../../src/components/Section.tsx"],"sourcesContent":["import { Box } from 'ink'\nimport { inkPropsHelpers } from '../utils'\nimport React from 'react'\n\nfunction Section({
|
|
1
|
+
{"version":3,"file":"Section.mjs","names":[],"sources":["../../src/components/Section.tsx"],"sourcesContent":["import { Box } from 'ink'\nimport { inkPropsHelpers } from '../utils'\nimport React from 'react'\n\nfunction Section({ isLast, ...props }: React.ComponentProps<typeof Box> & { isLast?: boolean }) {\n return (\n <Box\n {...(isLast !== true && {\n borderStyle: 'single',\n borderDimColor: true,\n ...inkPropsHelpers.border('bottom'),\n })}\n paddingX={1}\n flexDirection=\"column\"\n {...props}\n />\n )\n}\n\nfunction SectionList({ children }: { children: React.ReactNode }) {\n const arrayChildren = React.Children.toArray(children)\n return React.Children.map(arrayChildren, (child, i) => (\n <Section isLast={i === arrayChildren.length - 1}>{child}</Section>\n ))\n}\n\nexport { Section, SectionList }\nexport default Section\n"],"mappings":"qIAIA,SAAS,EAAQ,CAAE,SAAQ,GAAG,GAAkE,CAC9F,OACE,EAAC,EAAD,CACE,GAAK,IAAW,IAAQ,CACtB,YAAa,SACb,eAAgB,GAChB,GAAG,EAAgB,OAAO,SAAS,CACpC,CACD,SAAU,EACV,cAAc,SACd,GAAI,EACJ,CAAA,CAIN,SAAS,EAAY,CAAE,YAA2C,CAChE,IAAM,EAAgB,EAAM,SAAS,QAAQ,EAAS,CACtD,OAAO,EAAM,SAAS,IAAI,GAAgB,EAAO,IAC/C,EAAC,EAAD,CAAS,OAAQ,IAAM,EAAc,OAAS,WAAI,EAAgB,CAAA,CAClE"}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["#!/usr/bin/env node\n\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { Box, render, Text } from 'ink'\nimport Quote0, { BORDER, DITHER_TYPES, DITHER_KERNELS } from './api'\nimport Container from './components/Container'\nimport { SectionList } from './components/Section'\nimport ListItem from './components/ListItem'\nimport { UncontrolledTextInput } from 'ink-text-input'\nimport config from './config'\nimport React from 'react'\nimport fs from 'node:fs/promises'\n\nconst quote0 = new Quote0({\n apiKey: config.get('apiKey', ''),\n})\n\nyargs(hideBin(process.argv))\n .scriptName('quote0')\n .command(\n 'auth',\n 'Enter and save API key',\n yargs => yargs,\n async argv => {\n const Main = () => {\n const [submitted, setSubmitted] = React.useState(false)\n\n return (\n <Container>\n <SectionList>\n <ListItem>\n <Text>Authentication</Text>\n </ListItem>\n {!submitted ? (\n <UncontrolledTextInput\n initialValue={config.get('apiKey', '')}\n onSubmit={v => {\n if (v.length === 0) {\n config.delete('apiKey')\n setSubmitted(true)\n } else {\n config.set('apiKey', v)\n setSubmitted(true)\n }\n }}\n placeholder=\"API key…\"\n mask=\"*\"\n />\n ) : (\n <Text dimColor>API key saved</Text>\n )}\n </SectionList>\n </Container>\n )\n }\n\n render(<Main />)\n },\n )\n .command('device', 'Manage devices', yargs =>\n yargs\n .demandCommand(1)\n .command(\n 'list',\n 'List all devices',\n yargs => yargs,\n async argv => {\n try {\n const devices = await quote0.device.list()\n\n const Main = () => (\n <Container>\n <SectionList>\n <ListItem\n trailing={\n <Text dimColor>\n {devices.length}/{devices.length}\n </Text>\n }\n >\n <Text>Devices</Text>\n </ListItem>\n {...devices.length === 0\n ? [\n <ListItem>\n <Text dimColor>No devices found</Text>\n </ListItem>,\n ]\n : devices.map(device => (\n <Box flexDirection=\"column\">\n <ListItem trailing={<Text>{device.id}</Text>}>\n <Text dimColor>ID</Text>\n </ListItem>\n <ListItem trailing={<Text>{device.series}</Text>}>\n <Text dimColor>Series</Text>\n </ListItem>\n <ListItem trailing={<Text>{device.model}</Text>}>\n <Text dimColor>Model</Text>\n </ListItem>\n <ListItem trailing={<Text>{device.edition}</Text>}>\n <Text dimColor>Edition</Text>\n </ListItem>\n </Box>\n ))}\n </SectionList>\n </Container>\n )\n\n render(<Main />)\n } catch (error) {\n console.error(error)\n }\n },\n )\n .command(\n 'status <device-id>',\n 'Check device status',\n yargs =>\n yargs.positional('device-id', {\n describe: 'Device ID to check status for',\n type: 'string',\n }),\n async argv => {\n try {\n const response = await quote0.device.status({\n deviceId: argv.deviceId!,\n })\n\n render(\n <Container>\n <SectionList>\n <ListItem\n trailing={\n <Text>\n <Text dimColor>Device ID: </Text>\n {response.deviceId}\n </Text>\n }\n >\n <Box gap={1}>\n <Text>{response.alias}</Text>\n <Text dimColor>{response.location}</Text>\n <Text dimColor>{response.status.battery}</Text>\n </Box>\n </ListItem>\n <Box flexDirection=\"column\">\n {...[\n ['Status', response.status.current],\n ['Battery', response.status.battery],\n ['Wi-Fi', response.status.wifi],\n ['Last Render', response.renderInfo.last],\n [\n 'Next Render (Battery)',\n response.renderInfo.next.battery,\n ],\n ['Next Render (Power)', response.renderInfo.next.power],\n [\n 'Current Images',\n response.renderInfo.current.image.length,\n ],\n [\n 'Version',\n <Text>\n <Text dimColor>v</Text>\n {response.status.version}\n </Text>,\n ],\n ].map(([k, v]) => (\n <ListItem trailing={<Text>{v}</Text>}>\n <Text dimColor>{k}</Text>\n </ListItem>\n ))}\n </Box>\n </SectionList>\n </Container>,\n )\n } catch (error) {\n console.error(error)\n }\n },\n ),\n )\n .command('content', 'Manage content', yargs =>\n yargs\n .demandCommand(1)\n .command(\n 'next <device-id>',\n 'Switch to next content',\n yargs =>\n yargs.positional('device-id', {\n describe: 'Device ID to switch content for',\n type: 'string',\n }),\n async argv => {\n try {\n const response = await quote0.content.next({\n deviceId: argv.deviceId!,\n })\n\n render(\n <Container>\n <SectionList>\n <Text>Next Content</Text>\n <Text>{response.message}</Text>\n </SectionList>\n </Container>,\n )\n } catch (error) {\n console.error(error)\n }\n },\n )\n .command(\n 'image <device-id>',\n 'Push an image to device',\n yargs =>\n yargs\n .positional('device-id', {\n describe: 'Device ID to push image to',\n type: 'string',\n })\n .option('f', {\n alias: 'file',\n describe: 'Path to image file',\n type: 'string',\n demandOption: true,\n })\n .option('refresh-now', {\n describe: 'Whether to refresh the device immediately',\n type: 'boolean',\n })\n .option('link', {\n describe: 'Optional link to open when image is tapped',\n type: 'string',\n })\n .option('border', {\n describe: 'Whether to add a border around the image',\n type: 'number',\n choices: BORDER,\n })\n .option('dither-type', {\n describe: 'Dithering algorithm to use',\n type: 'string',\n choices: DITHER_TYPES,\n })\n .option('dither-kernel', {\n describe: 'Dithering kernel to use (if dither-type is DIFFUSION)',\n type: 'string',\n choices: DITHER_KERNELS,\n })\n .option('task-key', {\n describe: 'Optional task key to track rendering status',\n type: 'string',\n }),\n async argv => {\n const file = await fs.readFile(argv.f)\n const base64 = file.toString('base64')\n\n const response = await quote0.content.pushImage(\n { deviceId: argv.deviceId! },\n {\n image: base64,\n refreshNow: argv.refreshNow,\n link: argv.link,\n border: argv.border,\n ditherType: argv.ditherType,\n ditherKernel: argv.ditherKernel,\n taskKey: argv.taskKey,\n },\n )\n\n const Main = () => {\n return (\n <Container>\n <SectionList>\n <Text>Push Image</Text>\n <ListItem>\n <Text>{response.message}</Text>\n </ListItem>\n </SectionList>\n </Container>\n )\n }\n\n render(<Main />)\n },\n ),\n )\n .demandCommand(1, 'Please specify a command')\n .strict()\n .parse()\n"],"mappings":";yiBAcA,MAAM,EAAS,IAAI,EAAO,CACxB,OAAQ,EAAO,IAAI,SAAU,GAAG,CACjC,CAAC,CAEF,EAAM,EAAQ,QAAQ,KAAK,CAAC,CACzB,WAAW,SAAS,CACpB,QACC,OACA,yBACA,GAAS,EACT,KAAM,IAAQ,CAiCZ,EAAO,MAhCY,CACjB,GAAM,CAAC,EAAW,GAAgB,EAAM,SAAS,GAAM,CAEvD,OACE,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SAAK,iBAAA,CAAqB,CAAA,CAClB,CACT,EAgBA,EAAC,EAAA,CAAK,SAAA,YAAS,iBAAoB,CAfnC,EAAC,EAAA,CACC,aAAc,EAAO,IAAI,SAAU,GAAG,CACtC,SAAU,GAAK,CACT,EAAE,SAAW,GACf,EAAO,OAAO,SAAS,CACvB,EAAa,GAAK,GAElB,EAAO,IAAI,SAAU,EAAE,CACvB,E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F,CAeD,EAAO,MAXH,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SAAK,aAAA,CAAiB,CACvB,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SAAM,EAAS,QAAA,CAAe,CAAA,CACtB,CAAA,CAAA,CACC,CAAA,CACJ,CAIR,EAAA,CAAO,CAAC,EAEnB,CACJ,CACA,cAAc,EAAG,2BAA2B,CAC5C,QAAQ,CACR,OAAO"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["#!/usr/bin/env node\n\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { Box, render, Text } from 'ink'\nimport Quote0, { BORDER, DITHER_TYPES, DITHER_KERNELS } from './api'\nimport Container from './components/Container'\nimport { SectionList } from './components/Section'\nimport ListItem from './components/ListItem'\nimport { UncontrolledTextInput } from 'ink-text-input'\nimport config from './config'\nimport React from 'react'\nimport fs from 'node:fs/promises'\n\nconst quote0 = new Quote0({\n apiKey: config.get('apiKey', ''),\n})\n\nyargs(hideBin(process.argv))\n .scriptName('quote0')\n .command(\n 'auth',\n 'Enter and save API key',\n yargs => yargs,\n async argv => {\n const Main = () => {\n const [submitted, setSubmitted] = React.useState(false)\n\n return (\n <Container>\n <SectionList>\n <ListItem>\n <Text>Authentication</Text>\n </ListItem>\n {!submitted ? (\n <UncontrolledTextInput\n initialValue={config.get('apiKey', '')}\n onSubmit={v => {\n if (v.length === 0) {\n config.delete('apiKey')\n setSubmitted(true)\n } else {\n config.set('apiKey', v)\n setSubmitted(true)\n }\n }}\n placeholder=\"API key…\"\n mask=\"*\"\n />\n ) : (\n <Text dimColor>API key saved</Text>\n )}\n </SectionList>\n </Container>\n )\n }\n\n render(<Main />)\n },\n )\n .command('device', 'Manage devices', yargs =>\n yargs\n .demandCommand(1)\n .command(\n 'list',\n 'List all devices',\n yargs => yargs,\n async argv => {\n try {\n const devices = await quote0.device.list()\n\n const Main = () => (\n <Container>\n <SectionList>\n <ListItem\n trailing={\n <Text dimColor>\n {devices.length}/{devices.length}\n </Text>\n }\n >\n <Text>Devices</Text>\n </ListItem>\n {...devices.length === 0\n ? [\n <ListItem>\n <Text dimColor>No devices found</Text>\n </ListItem>,\n ]\n : devices.map(device => (\n <Box flexDirection=\"column\">\n <ListItem trailing={<Text>{device.id}</Text>}>\n <Text dimColor>ID</Text>\n </ListItem>\n <ListItem trailing={<Text>{device.series}</Text>}>\n <Text dimColor>Series</Text>\n </ListItem>\n <ListItem trailing={<Text>{device.model}</Text>}>\n <Text dimColor>Model</Text>\n </ListItem>\n <ListItem trailing={<Text>{device.edition}</Text>}>\n <Text dimColor>Edition</Text>\n </ListItem>\n </Box>\n ))}\n </SectionList>\n </Container>\n )\n\n render(<Main />)\n } catch (error) {\n console.error(error)\n }\n },\n )\n .command(\n 'status <device-id>',\n 'Check device status',\n yargs =>\n yargs.positional('device-id', {\n describe: 'Device ID to check status for',\n type: 'string',\n }),\n async argv => {\n try {\n const response = await quote0.device.status({\n deviceId: argv.deviceId!,\n })\n\n render(\n <Container>\n <SectionList>\n <ListItem\n trailing={\n <Text>\n <Text dimColor>Device ID: </Text>\n {response.deviceId}\n </Text>\n }\n >\n <Box gap={1}>\n <Text>{response.alias}</Text>\n <Text dimColor>{response.location}</Text>\n <Text dimColor>{response.status.battery}</Text>\n </Box>\n </ListItem>\n <Box flexDirection=\"column\">\n {...[\n ['Status', response.status.current],\n ['Battery', response.status.battery],\n ['Wi-Fi', response.status.wifi],\n ['Last Render', response.renderInfo.last],\n ['Next Render (Battery)', response.renderInfo.next.battery],\n ['Next Render (Power)', response.renderInfo.next.power],\n ['Current Images', response.renderInfo.current.image.length],\n [\n 'Version',\n <Text>\n <Text dimColor>v</Text>\n {response.status.version}\n </Text>,\n ],\n ].map(([k, v]) => (\n <ListItem trailing={<Text>{v}</Text>}>\n <Text dimColor>{k}</Text>\n </ListItem>\n ))}\n </Box>\n </SectionList>\n </Container>,\n )\n } catch (error) {\n console.error(error)\n }\n },\n ),\n )\n .command('content', 'Manage content', yargs =>\n yargs\n .demandCommand(1)\n .command(\n 'next <device-id>',\n 'Switch to next content',\n yargs =>\n yargs.positional('device-id', {\n describe: 'Device ID to switch content for',\n type: 'string',\n }),\n async argv => {\n try {\n const response = await quote0.content.next({\n deviceId: argv.deviceId!,\n })\n\n render(\n <Container>\n <SectionList>\n <Text>Next Content</Text>\n <Text>{response.message}</Text>\n </SectionList>\n </Container>,\n )\n } catch (error) {\n console.error(error)\n }\n },\n )\n .command(\n 'image <device-id>',\n 'Push an image to device',\n yargs =>\n yargs\n .positional('device-id', {\n describe: 'Device ID to push image to',\n type: 'string',\n })\n .option('f', {\n alias: 'file',\n describe: 'Path to image file',\n type: 'string',\n demandOption: true,\n })\n .option('refresh-now', {\n describe: 'Whether to refresh the device immediately',\n type: 'boolean',\n })\n .option('link', {\n describe: 'Optional link to open when image is tapped',\n type: 'string',\n })\n .option('border', {\n describe: 'Whether to add a border around the image',\n type: 'number',\n choices: BORDER,\n })\n .option('dither-type', {\n describe: 'Dithering algorithm to use',\n type: 'string',\n choices: DITHER_TYPES,\n })\n .option('dither-kernel', {\n describe: 'Dithering kernel to use (if dither-type is DIFFUSION)',\n type: 'string',\n choices: DITHER_KERNELS,\n })\n .option('task-key', {\n describe: 'Optional task key to track rendering status',\n type: 'string',\n }),\n async argv => {\n const file = await fs.readFile(argv.f)\n const base64 = file.toString('base64')\n\n const response = await quote0.content.pushImage(\n { deviceId: argv.deviceId! },\n {\n image: base64,\n refreshNow: argv.refreshNow,\n link: argv.link,\n border: argv.border,\n ditherType: argv.ditherType,\n ditherKernel: argv.ditherKernel,\n taskKey: argv.taskKey,\n },\n )\n\n const Main = () => {\n return (\n <Container>\n <SectionList>\n <Text>Push Image</Text>\n <ListItem>\n <Text>{response.message}</Text>\n </ListItem>\n </SectionList>\n </Container>\n )\n }\n\n render(<Main />)\n },\n ),\n )\n .demandCommand(1, 'Please spec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.0.0-alpha.7",
|
|
4
4
|
"description": "TypeScript SDK and CLI for Quote/0.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./dist/api/index.mjs"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"dist"
|
|
11
|
-
],
|
|
12
|
-
"bin": {
|
|
13
|
-
"quote0": "dist/index.mjs"
|
|
14
|
-
},
|
|
15
5
|
"keywords": [
|
|
16
|
-
"
|
|
6
|
+
"cli",
|
|
17
7
|
"e-ink",
|
|
18
|
-
"
|
|
8
|
+
"quote0"
|
|
19
9
|
],
|
|
20
|
-
"author": "Mr. Will (https://github.com/MrWillCom)",
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"repository": "MrWillCom/quote0",
|
|
23
10
|
"bugs": {
|
|
24
11
|
"url": "https://github.com/MrWillCom/quote0/issues"
|
|
25
12
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Mr. Will (https://github.com/MrWillCom)",
|
|
15
|
+
"repository": "MrWillCom/quote0",
|
|
16
|
+
"bin": {
|
|
17
|
+
"quote0": "dist/index.mjs"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./dist/api/index.mjs"
|
|
35
25
|
},
|
|
36
26
|
"dependencies": {
|
|
37
27
|
"conf": "^15.1.0",
|
|
@@ -39,14 +29,25 @@
|
|
|
39
29
|
"ink-spinner": "^5.0.0",
|
|
40
30
|
"ink-text-input": "^6.0.0",
|
|
41
31
|
"react": "^19.2.4",
|
|
42
|
-
"yaml": "^2.8.
|
|
32
|
+
"yaml": "^2.8.3",
|
|
43
33
|
"yargs": "^18.0.0"
|
|
44
34
|
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@changesets/cli": "^2.30.0",
|
|
37
|
+
"@types/node": "^25.5.0",
|
|
38
|
+
"@types/react": "^19.2.14",
|
|
39
|
+
"@types/yargs": "^17.0.35",
|
|
40
|
+
"oxfmt": "^0.42.0",
|
|
41
|
+
"tsdown": "^0.21.4",
|
|
42
|
+
"tsx": "^4.21.0",
|
|
43
|
+
"typescript": "^6.0.2"
|
|
44
|
+
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "tsc --noEmit && tsdown",
|
|
47
47
|
"dev": "tsx src/index.tsx",
|
|
48
48
|
"start": "node dist/index.mjs",
|
|
49
|
-
"format": "
|
|
49
|
+
"format": "oxfmt",
|
|
50
|
+
"format:check": "oxfmt --check",
|
|
50
51
|
"changeset": "changeset"
|
|
51
52
|
}
|
|
52
53
|
}
|