quote0 1.0.0-alpha.4 → 1.0.0-alpha.5
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/README.md +2 -0
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import e from"./api/index.mjs";import t from"yargs";import{hideBin as n}from"yargs/helpers";import{Box as r,Text as i,render as a}from"ink";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import l from"react";import{UncontrolledTextInput as u}from"ink-text-input";import d from"conf";import{parse as f,stringify as p}from"yaml";import m from"node:fs/promises";function h({...e}){return s(r,{borderStyle:`round`,flexDirection:`column`,...e})}const g={border:(...e)=>({borderTop:e.includes(`top`),borderRight:e.includes(`right`),borderBottom:e.includes(`bottom`),borderLeft:e.includes(`left`)})};function _({isLast:e,...t}){return s(r,{...e!==!0&&{borderStyle:`single`,borderDimColor:!0,...g.border(`bottom`)},paddingX:1,flexDirection:`column`,...t})}function v({children:e}){let t=l.Children.toArray(e);return l.Children.map(t,(e,n)=>s(_,{isLast:n===t.length-1,children:e}))}function y({leading:e,children:t,trailing:n,...a}){return c(r,{justifyContent:`space-between`,...a,children:[c(r,{children:[e&&c(o,{children:[e,s(i,{children:` `})]}),t]}),s(r,{children:n})]})}const b=new d({projectName:`quote0`,fileExtension:`yaml`,serialize:p,deserialize:f}),x=new e({apiKey:b.get(`apiKey`,``)});t(n(process.argv)).scriptName(`quote0`).command(`auth`,`Enter and save API key`,e=>e,async e=>{a(s(()=>{let[e,t]=l.useState(!1);return s(h,{children:c(v,{children:[s(y,{children:s(i,{children:`Authentication`})}),e?s(i,{dimColor:!0,children:`API key saved`}):s(u,{initialValue:b.get(`apiKey`,``),onSubmit:e=>{e.length===0?(b.delete(`apiKey`),t(!0)):(b.set(`apiKey`,e),t(!0))},placeholder:`API key…`,mask:`*`})]})})},{}))}).command(`device`,`Manage devices`,e=>e.command(`list`,`List all devices`,e=>e,async e=>{try{let e=await x.device.list();a(s(()=>s(h,{children:c(v,{children:[s(y,{trailing:c(i,{dimColor:!0,children:[e.length,`/`,e.length]}),children:s(i,{children:`Devices`})}),[...e.length===0?[s(y,{children:s(i,{dimColor:!0,children:`No devices found`})})]:e.map(e=>c(r,{flexDirection:`column`,children:[s(y,{trailing:s(i,{children:e.id}),children:s(i,{dimColor:!0,children:`ID`})}),s(y,{trailing:s(i,{children:e.series}),children:s(i,{dimColor:!0,children:`Series`})}),s(y,{trailing:s(i,{children:e.model}),children:s(i,{dimColor:!0,children:`Model`})}),s(y,{trailing:s(i,{children:e.edition}),children:s(i,{dimColor:!0,children:`Edition`})})]}))]]})}),{}))}catch(e){console.error(e)}}).command(`status <device-id>`,`Check device status`,e=>e.positional(`device-id`,{describe:`Device ID to check status for`,type:`string`}),async e=>{try{let t=await x.device.status({deviceId:e.deviceId});a(s(h,{children:c(v,{children:[s(y,{trailing:c(i,{children:[s(i,{dimColor:!0,children:`Device ID: `}),t.deviceId]}),children:c(r,{gap:1,children:[s(i,{children:t.alias}),s(i,{dimColor:!0,children:t.location}),s(i,{dimColor:!0,children:t.status.battery})]})}),s(r,{flexDirection:`column`,children:[...[[`Status`,t.status.current],[`Last Render`,t.renderInfo.last],[`Next Render (Battery)`,t.renderInfo.next.battery],[`Next Render (Power)`,t.renderInfo.next.power],[`Current Images`,t.renderInfo.current.image.length],[`Version`,c(i,{children:[s(i,{dimColor:!0,children:`v`}),t.status.version]})]].map(([e,t])=>s(y,{trailing:s(i,{children:t}),children:s(i,{dimColor:!0,children:e})}))]})]})}))}catch(e){console.error(e)}})
|
|
2
|
+
import e from"./api/index.mjs";import t from"yargs";import{hideBin as n}from"yargs/helpers";import{Box as r,Text as i,render as a}from"ink";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import l from"react";import{UncontrolledTextInput as u}from"ink-text-input";import d from"conf";import{parse as f,stringify as p}from"yaml";import m from"node:fs/promises";function h({...e}){return s(r,{borderStyle:`round`,flexDirection:`column`,...e})}const g={border:(...e)=>({borderTop:e.includes(`top`),borderRight:e.includes(`right`),borderBottom:e.includes(`bottom`),borderLeft:e.includes(`left`)})};function _({isLast:e,...t}){return s(r,{...e!==!0&&{borderStyle:`single`,borderDimColor:!0,...g.border(`bottom`)},paddingX:1,flexDirection:`column`,...t})}function v({children:e}){let t=l.Children.toArray(e);return l.Children.map(t,(e,n)=>s(_,{isLast:n===t.length-1,children:e}))}function y({leading:e,children:t,trailing:n,...a}){return c(r,{justifyContent:`space-between`,...a,children:[c(r,{children:[e&&c(o,{children:[e,s(i,{children:` `})]}),t]}),s(r,{children:n})]})}const b=new d({projectName:`quote0`,fileExtension:`yaml`,serialize:p,deserialize:f}),x=new e({apiKey:b.get(`apiKey`,``)});t(n(process.argv)).scriptName(`quote0`).command(`auth`,`Enter and save API key`,e=>e,async e=>{a(s(()=>{let[e,t]=l.useState(!1);return s(h,{children:c(v,{children:[s(y,{children:s(i,{children:`Authentication`})}),e?s(i,{dimColor:!0,children:`API key saved`}):s(u,{initialValue:b.get(`apiKey`,``),onSubmit:e=>{e.length===0?(b.delete(`apiKey`),t(!0)):(b.set(`apiKey`,e),t(!0))},placeholder:`API key…`,mask:`*`})]})})},{}))}).command(`device`,`Manage devices`,e=>e.demandCommand(1).command(`list`,`List all devices`,e=>e,async e=>{try{let e=await x.device.list();a(s(()=>s(h,{children:c(v,{children:[s(y,{trailing:c(i,{dimColor:!0,children:[e.length,`/`,e.length]}),children:s(i,{children:`Devices`})}),[...e.length===0?[s(y,{children:s(i,{dimColor:!0,children:`No devices found`})})]:e.map(e=>c(r,{flexDirection:`column`,children:[s(y,{trailing:s(i,{children:e.id}),children:s(i,{dimColor:!0,children:`ID`})}),s(y,{trailing:s(i,{children:e.series}),children:s(i,{dimColor:!0,children:`Series`})}),s(y,{trailing:s(i,{children:e.model}),children:s(i,{dimColor:!0,children:`Model`})}),s(y,{trailing:s(i,{children:e.edition}),children:s(i,{dimColor:!0,children:`Edition`})})]}))]]})}),{}))}catch(e){console.error(e)}}).command(`status <device-id>`,`Check device status`,e=>e.positional(`device-id`,{describe:`Device ID to check status for`,type:`string`}),async e=>{try{let t=await x.device.status({deviceId:e.deviceId});a(s(h,{children:c(v,{children:[s(y,{trailing:c(i,{children:[s(i,{dimColor:!0,children:`Device ID: `}),t.deviceId]}),children:c(r,{gap:1,children:[s(i,{children:t.alias}),s(i,{dimColor:!0,children:t.location}),s(i,{dimColor:!0,children:t.status.battery})]})}),s(r,{flexDirection:`column`,children:[...[[`Status`,t.status.current],[`Battery`,t.status.battery],[`Wi-Fi`,t.status.wifi],[`Last Render`,t.renderInfo.last],[`Next Render (Battery)`,t.renderInfo.next.battery],[`Next Render (Power)`,t.renderInfo.next.power],[`Current Images`,t.renderInfo.current.image.length],[`Version`,c(i,{children:[s(i,{dimColor:!0,children:`v`}),t.status.version]})]].map(([e,t])=>s(y,{trailing:s(i,{children:t}),children:s(i,{dimColor:!0,children:e})}))]})]})}))}catch(e){console.error(e)}})).command(`content`,`Manage content`,e=>e.demandCommand(1).command(`next <device-id>`,`Switch to next content`,e=>e.positional(`device-id`,{describe:`Device ID to switch content for`,type:`string`}),async e=>{try{let t=await x.content.next({deviceId:e.deviceId});a(s(h,{children:c(v,{children:[s(i,{children:`Next Content`}),s(i,{children:t.message})]})}))}catch(e){console.error(e)}}).command(`image <device-id>`,`Push an image to device`,e=>e.positional(`device-id`,{describe:`Device ID to push image to`,type:`string`}).option(`f`,{alias:`file`,describe:`Path to image file`,type:`string`,demandOption:!0}).option(`refresh-now`,{describe:`Whether to refresh the device immediately`,type:`boolean`}).option(`link`,{describe:`Optional link to open when image is tapped`,type:`string`}).option(`border`,{describe:`Whether to add a border around the image`,type:`number`,choices:[0,1]}).option(`dither-type`,{describe:`Dithering algorithm to use`,type:`string`,choices:[`DIFFUSION`,`ORDERED`,`NONE`]}).option(`dither-kernel`,{describe:`Dithering kernel to use (if dither-type is DIFFUSION)`,type:`string`,choices:[`THRESHOLD`,`ATKINSON`,`BURKES`,`FLOYD_STEINBERG`,`SIERRA2`,`STUCKI`,`JARVIS_JUDICE_NINKE`,`DIFFUSION_ROW`,`DIFFUSION_COLUMN`,`DIFFUSION_2D`]}).option(`task-key`,{describe:`Optional task key to track rendering status`,type:`string`}),async e=>{let t=(await m.readFile(e.f)).toString(`base64`),n=await x.content.pushImage({deviceId:e.deviceId},{image:t,refreshNow:e.refreshNow,link:e.link,border:e.border,ditherType:e.ditherType,ditherKernel:e.ditherKernel,taskKey:e.taskKey});a(s(()=>s(h,{children:c(v,{children:[s(i,{children:`Push Image`}),s(y,{children:s(i,{children:n.message})})]})}),{}))})).demandCommand(1,`Please specify a command`).strict().parse();export{};
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/components/Container.tsx","../src/utils/ink-props-helpers.ts","../src/components/Section.tsx","../src/components/ListItem.tsx","../package.json","../src/config.ts","../src/index.tsx"],"sourcesContent":["import { Box } from 'ink'\nimport type React from 'react'\n\nexport default function Container({\n ...props\n}: React.ComponentProps<typeof Box>) {\n return <Box borderStyle=\"round\" flexDirection=\"column\" {...props} />\n}\n","const inkPropsHelpers = {\n border: (...directions: ('top' | 'right' | 'bottom' | 'left')[]) => {\n return {\n borderTop: directions.includes('top'),\n borderRight: directions.includes('right'),\n borderBottom: directions.includes('bottom'),\n borderLeft: directions.includes('left'),\n }\n },\n}\n\nexport default inkPropsHelpers\n","import { Box } from 'ink'\nimport { inkPropsHelpers } from '../utils'\nimport React from 'react'\n\nfunction Section({\n isLast,\n ...props\n}: 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","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","","import Conf from 'conf'\nimport { parse, stringify } from 'yaml'\nimport { name } from '../package.json'\n\nconst config = new Conf({\n projectName: name,\n fileExtension: 'yaml',\n serialize: stringify,\n deserialize: parse,\n})\n\nexport default config\n","#!/usr/bin/env node\n\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { Box, render, Text } from 'ink'\nimport Quote0 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(\n 'device',\n 'Manage devices',\n yargs =>\n yargs\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 ['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 async argv => {},\n )\n .command(\n 'content',\n 'Manage content',\n yargs =>\n yargs\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 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 { image: base64 },\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 async argv => {},\n )\n .demandCommand(1, 'Please specify a command')\n .strict()\n .parse()\n"],"mappings":";wXAGA,SAAwB,EAAU,CAChC,GAAG,GACgC,CACnC,OAAO,EAAC,EAAA,CAAI,YAAY,QAAQ,cAAc,SAAS,GAAI,GAAS,CCNtE,MAAM,EAAkB,CACtB,QAAS,GAAG,KACH,CACL,UAAW,EAAW,SAAS,MAAM,CACrC,YAAa,EAAW,SAAS,QAAQ,CACzC,aAAc,EAAW,SAAS,SAAS,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src/components/Container.tsx","../src/utils/ink-props-helpers.ts","../src/components/Section.tsx","../src/components/ListItem.tsx","../package.json","../src/config.ts","../src/index.tsx"],"sourcesContent":["import { Box } from 'ink'\nimport type React from 'react'\n\nexport default function Container({\n ...props\n}: React.ComponentProps<typeof Box>) {\n return <Box borderStyle=\"round\" flexDirection=\"column\" {...props} />\n}\n","const inkPropsHelpers = {\n border: (...directions: ('top' | 'right' | 'bottom' | 'left')[]) => {\n return {\n borderTop: directions.includes('top'),\n borderRight: directions.includes('right'),\n borderBottom: directions.includes('bottom'),\n borderLeft: directions.includes('left'),\n }\n },\n}\n\nexport default inkPropsHelpers\n","import { Box } from 'ink'\nimport { inkPropsHelpers } from '../utils'\nimport React from 'react'\n\nfunction Section({\n isLast,\n ...props\n}: 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","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","","import Conf from 'conf'\nimport { parse, stringify } from 'yaml'\nimport { name } from '../package.json'\n\nconst config = new Conf({\n projectName: name,\n fileExtension: 'yaml',\n serialize: stringify,\n deserialize: parse,\n})\n\nexport default config\n","#!/usr/bin/env node\n\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { Box, render, Text } from 'ink'\nimport Quote0 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 // TODO: manually listing choices is not practical, we need type exports from sdk\n choices: [0, 1],\n })\n .option('dither-type', {\n describe: 'Dithering algorithm to use',\n type: 'string',\n choices: ['DIFFUSION', 'ORDERED', 'NONE'],\n })\n .option('dither-kernel', {\n describe: 'Dithering kernel to use (if dither-type is DIFFUSION)',\n type: 'string',\n choices: [\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 ],\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 // choices are limited but yargs cannot narrow the type\n // so let's fuck typescript\n // @ts-expect-error\n border: argv.border,\n // @ts-expect-error\n ditherType: argv.ditherType,\n // @ts-expect-error\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":";wXAGA,SAAwB,EAAU,CAChC,GAAG,GACgC,CACnC,OAAO,EAAC,EAAA,CAAI,YAAY,QAAQ,cAAc,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AAiB,CACvB,SAAU,wDACV,KAAM,SACN,QAAS,CACP,YACA,WACA,SACA,kBACA,UACA,SACA,sBACA,gBACA,mBACA,eACD,CACF,CAAC,CACD,OAAO,WAAY,CAClB,SAAU,8CACV,KAAM,SACP,CAAC,CACN,KAAM,IAAQ,CAEZ,IAAM,GADO,MAAM,EAAG,SAAS,EAAK,EAAE,EAClB,SAAS,SAAS,CAEhC,EAAW,MAAM,EAAO,QAAQ,UACpC,CAAE,SAAU,EAAK,SAAW,CAC5B,CACE,MAAO,EACP,WAAY,EAAK,WACjB,KAAM,EAAK,KAIX,OAAQ,EAAK,OAEb,WAAY,EAAK,WAEjB,aAAc,EAAK,aACnB,QAAS,EAAK,QACf,CACF,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"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quote0",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.5",
|
|
4
4
|
"description": "TypeScript SDK and CLI for Quote/0.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/api/index.mjs"
|
|
8
|
+
},
|
|
7
9
|
"files": [
|
|
8
10
|
"dist"
|
|
9
11
|
],
|