@hallohuman/hightea 0.1.34 → 0.1.35
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/bin.js +26 -26
- package/dist/{chunk-3w7svm2r.js → chunk-3pxbkmsq.js} +1 -1
- package/dist/{chunk-e9s05rg6.js → chunk-45fsefe1.js} +1 -1
- package/dist/{chunk-q669464j.js → chunk-76e2zy9j.js} +1 -1
- package/dist/{chunk-kq5y08g7.js → chunk-8td27k15.js} +4 -4
- package/dist/{chunk-axj8ef03.js → chunk-fjskavhw.js} +1 -1
- package/dist/chunk-jcgfe3z4.js +13 -0
- package/dist/{chunk-p1142ccr.js → chunk-m472zxhe.js} +1 -1
- package/dist/chunk-nqmxwka8.js +1 -0
- package/dist/plugin/plugin.json +2 -2
- package/dist/plugin/plugin.mjs +44 -44
- package/package.json +2 -2
- package/dist/chunk-88mhcx5q.js +0 -13
- package/dist/chunk-a1vwy98c.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hallohuman/hightea",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35",
|
|
4
4
|
"description": "The Hightea command line: join this machine to a Hightea workspace as a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@ahpd/deploy": "https://github.com/beorn/ahpd/releases/download/hh-38499-dc5a62e1/ahpd-deploy-0.15.0-beorn.dc5a62e1.tgz",
|
|
28
28
|
"@ahpd/sdk": "https://github.com/beorn/ahpd/releases/download/hh-38499-dc5a62e1/ahpd-sdk-0.15.0-beorn.dc5a62e1.tgz",
|
|
29
29
|
"@ahpd/server": "https://github.com/beorn/ahpd/releases/download/hh-38499-dc5a62e1/ahpd-server-0.15.0-beorn.dc5a62e1.tgz",
|
|
30
|
-
"@hallohuman/hightea-services": "https://github.com/beorn/ahpd/releases/download/hh-
|
|
30
|
+
"@hallohuman/hightea-services": "https://github.com/beorn/ahpd/releases/download/hh-38499-dc5a62e1/hallohuman-hightea-services-0.16.0-beorn.dc5a62e1.tgz",
|
|
31
31
|
"@silvery/commander": "0.29.3",
|
|
32
32
|
"ws": "8.21.0"
|
|
33
33
|
},
|
package/dist/chunk-88mhcx5q.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import"./chunk-kjkww5cr.js";import{t,e}from"./chunk-vzkbknwq.js";var u=`hightea source bind --origin https://your-deployment --workspace SLUG --source SOURCE --host HOST [--refresh 1h] [--session-file FILE] [--json]
|
|
2
|
-
hightea source bind-linear --origin https://your-deployment --workspace SLUG --team TEAM [--refresh 5m] [--session-file FILE] [--json]
|
|
3
|
-
hightea source teams --origin https://your-deployment --workspace SLUG [--session-file FILE] [--json]
|
|
4
|
-
hightea source unbind --origin https://your-deployment --workspace SLUG --source SOURCE [--session-file FILE] [--json]
|
|
5
|
-
hightea source set-refresh --origin https://your-deployment --workspace SLUG --source SOURCE --every 1h [--session-file FILE] [--json]
|
|
6
|
-
hightea source show --origin https://your-deployment --workspace SLUG --source SOURCE [--session-file FILE] [--json]`;function l(n){let r=n.trim().toLowerCase();if(r==="")return"INVALID";if(r==="none"||r==="off")return null;let o=/^(\d+)(s|m|h|d)$/u.exec(r);if(o===null)return"INVALID";let s={s:1000,m:60000,h:3600000,d:86400000}[o[2]],i=Number(o[1])*s;return Number.isSafeInteger(i)&&i>0?i:"INVALID"}var f={SOURCE_BINDING_CONFLICT:4};function a(){return t()}async function h(n,r,o){if(n.workspace.trim().length===0||n.source.trim().length===0)return{exit:1,error:`SOURCE_INPUT: --workspace and --source are required.
|
|
7
|
-
${u}`};return e(n,r,{...o,label:"SOURCE",extraExits:f,path:`/sources/${encodeURIComponent(n.source)}${o.path}`})}function d(n){let r=(s)=>n[s]===null||n[s]===void 0?"none":String(n[s]),o=n.listing===!0?", first list running":n.listing===!1?", no list running":"";return`${r("status")} on ${r("hostId")} as dataset ${r("dataset")} (freshness ${r("freshness")}${o})`}async function S(n,r=a()){if(n.host.trim().length===0)return r.err(`SOURCE_INPUT: --host is required (the host id that serves the source).
|
|
8
|
-
${u}`),1;let o=n.refresh===void 0?void 0:l(n.refresh);if(o==="INVALID"||o===null)return r.err(`SOURCE_INPUT: --refresh takes a whole count and one unit — 30m, 1h, 2d — and a bind never clears a schedule.
|
|
9
|
-
${u}`),1;let s=await h(n,r,{method:"POST",path:"/bind",body:o===void 0?{hostId:n.host.trim()}:{hostId:n.host.trim(),refreshMs:o},what:"bind"});if("error"in s)return r.err(s.error),s.exit;if(n.json)return r.out(JSON.stringify(s.answer)),0;let i=s.answer.source??{};return r.out(`bound ${String(i.sourceId??n.source)} to ${String(i.hostId??n.host)}: ${d(i)}`),r.out("The source's first list fills its dataset; run `hightea source show` to watch its freshness."),0}async function w(n,r=a()){let o=n.team.trim();if(n.workspace.trim().length===0||o.length===0)return r.err(`SOURCE_INPUT: --workspace and --team are required (the Linear team id; \`hightea source teams\` lists them).
|
|
10
|
-
${u}`),1;let s=n.refresh===void 0?void 0:l(n.refresh);if(s==="INVALID"||s===null)return r.err(`SOURCE_INPUT: --refresh takes a whole count and one unit — 5m, 1h, 2d — and a bind never clears a schedule.
|
|
11
|
-
${u}`),1;let i=await e(n,r,{method:"POST",label:"SOURCE",extraExits:f,path:`/linear/teams/${encodeURIComponent(o)}/bind`,body:s===void 0?{}:{refreshMs:s},what:"bind-linear"});if("error"in i)return r.err(i.error),i.exit;if(n.json)return r.out(JSON.stringify(i.answer)),0;let c=i.answer.source??{};return r.out(`bound Linear team ${o} as ${String(c.sourceId??`linear:${o}`)}: ${d(c)}`),r.out("The first sweep is queued with the binding; `hightea source show` watches its freshness."),0}async function p(n,r=a()){let o=await e(n,r,{method:"GET",label:"SOURCE",extraExits:f,path:"/linear/teams",what:"teams"});if("error"in o)return r.err(o.error),o.exit;if(n.json)return r.out(JSON.stringify(o.answer)),0;let s=o.answer.teams??[];if(s.length===0)return r.out("Linear sees no teams for this workspace's token; authorize Linear first."),0;for(let i of s)r.out(`${String(i.id)} ${String(i.key)} ${String(i.name)}`);return 0}async function g(n,r=a()){let o=await h(n,r,{method:"POST",path:"/unbind",what:"unbind"});if("error"in o)return r.err(o.error),o.exit;if(n.json)return r.out(JSON.stringify(o.answer)),0;let s=o.answer.source??{};return r.out(`unbound ${String(s.sourceId??n.source)} from ${String(s.hostId??"its host")}: ${d(s)}`),r.out("Rows kept; rebind refreshes them."),0}async function y(n,r=a()){let o=await h(n,r,{method:"GET",path:"",what:"read"});if("error"in o)return r.err(o.error),o.exit;if(n.json)return r.out(JSON.stringify(o.answer)),0;let s=o.answer.source??{},i=s.position;return r.out(`${String(s.sourceId??n.source)}: ${d(s)}`),r.out(`position ${i===null||i===void 0?"none":`${String(i.epoch)}/${String(i.ordinal)}`}, last error ${s.lastError===null||s.lastError===void 0?"none":String(s.lastError)}, dropped ${String(s.dropped??0)}, duplicates ${String(s.duplicates??0)}`),0}async function I(n,r=a()){if(n.every.trim().length===0)return r.err(`SOURCE_INPUT: --every is required (1h, 30m, 2d, or none).
|
|
12
|
-
${u}`),1;let o=l(n.every);if(o==="INVALID")return r.err(`SOURCE_INPUT: --every takes a whole count and one unit — 45s, 30m, 1h, 2d — or none.
|
|
13
|
-
${u}`),1;let s=await h(n,r,{method:"POST",path:"/schedule",body:{everyMs:o},what:"set its refresh interval"});if("error"in s)return r.err(s.error),s.exit;if(n.json)return r.out(JSON.stringify(s.answer)),0;let i=s.answer.source??{},c=i.reconcileMs===null||i.reconcileMs===void 0?"no schedule (refreshes only when the host reports a gap)":`refresh every ${Math.round(Number(i.reconcileMs)/60000)} min`;return r.out(`${String(i.sourceId??n.source)}: ${c}; ${d(i)}`),0}export{S as sourceBind,w as sourceBindLinear,I as sourceSetRefresh,y as sourceShow,p as sourceTeams,g as sourceUnbind};
|
package/dist/chunk-a1vwy98c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h}from"./chunk-3w7svm2r.js";import"./chunk-kq5y08g7.js";import"./chunk-tay0pyz4.js";export{h as hostTrust};
|