i-plane 1.2.0 → 2.0.0

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 CHANGED
@@ -76,6 +76,10 @@ i-plane update APP-8 --state started
76
76
  i-plane done APP-8
77
77
  ```
78
78
 
79
+ Workspace search returns up to 10 matches by default. Use `i-plane search "text"
80
+ --limit 100` to raise the bound (maximum 1000); output reports when more matches
81
+ exist. JSON search results contain `rows`, `limit` and `hasMore`.
82
+
79
83
  Replace `APP` and `APP-8` with your project and work item references. Add `--json`
80
84
  to any command for its structured result. Exit code `2` means an invalid call;
81
85
  `1` means an API or connection failure.
@@ -83,8 +87,9 @@ to any command for its structured result. Exit code `2` means an invalid call;
83
87
  For supported fields, compatibility details and development checks, see the
84
88
  [capability reference](docs/api-coverage.md).
85
89
 
86
- Pages use a Plane login and password instead of an API token. See the
87
- [page workflow](docs/pages.md) for session setup, block edits and delivery semantics.
90
+ Pages prefer the same API key when the for-plane extension is available. On stock
91
+ Plane, the CLI detects the missing endpoint and uses password sign-in. See
92
+ the [page workflow](docs/pages.md) for setup, block edits and delivery semantics.
88
93
  `i-plane page --help` carries the same command examples into your terminal.
89
94
 
90
95
  ## License
@@ -0,0 +1,8 @@
1
+ import{Y as c}from"./cli-q37j0y8m.js";import{readFileSync as E}from"node:fs";import{homedir as A}from"node:os";import{join as P}from"node:path";var g=P(A(),".config","plane","credentials"),_=(e,o)=>{let n=new Map,r;try{r=E(e,"utf8")}catch{return n}for(let i of r.split(`
2
+ `)){let t=i.trim();if(t===""||t.startsWith("#"))continue;let l=t.indexOf("=");if(l<=0)continue;let f=t.slice(0,l).trim();if(!o.includes(f))continue;let s=t.slice(l+1).trim();if(s.startsWith('"')&&s.endsWith('"')||s.startsWith("'")&&s.endsWith("'"))s=s.slice(1,-1);n.set(f,s)}return n},u=(e)=>_(e,["PLANE_URL","PLANE_BASE_URL","PLANE_API_KEY","PLANE_WORKSPACE","PLANE_WORKSPACE_SLUG"]),a=(e,o,n,r)=>{if(e!==void 0&&e!=="")return{value:e,origin:"flag"};for(let i of o){let t=process.env[i];if(t!==void 0&&t!=="")return{value:t,origin:"env"}}for(let i of n){let t=r.get(i);if(t!==void 0&&t!=="")return{value:t,origin:"file"}}return},p=(e,o,n)=>{let r=e.replace(/\/+$/,""),i;try{i=new URL(r)}catch{throw new c(`The url is not a valid address: ${r}
3
+ it came from ${o==="file"?n:o}
4
+ expected something like https://plane.example.com`)}if(i.protocol!=="http:"&&i.protocol!=="https:")throw new c(`The url must be http or https, got ${i.protocol} in ${r}`);return r},d=(e,o,n,r)=>new c(`No ${e}. Set it one of three ways, highest wins:
5
+ --${e} <value>
6
+ ${o}=<value> in the environment
7
+ ${n}=<value> in ${r}`),v=(e)=>{let o=e.configPath??process.env.PLANE_CONFIG??g,n=u(o);return a(e.token,["PLANE_API_KEY","PLANE_TOKEN"],["PLANE_API_KEY"],n)?.value},R=(e,o=!1)=>{let n=e.configPath??process.env.PLANE_CONFIG??g,r=u(n),i=a(e.url,["PLANE_URL","PLANE_BASE_URL"],["PLANE_URL","PLANE_BASE_URL"],r),t=a(e.token,["PLANE_API_KEY","PLANE_TOKEN"],["PLANE_API_KEY"],r),l=a(e.workspace,["PLANE_WORKSPACE","PLANE_WORKSPACE_SLUG"],["PLANE_WORKSPACE","PLANE_WORKSPACE_SLUG"],r);if(i===void 0)throw d("url","PLANE_URL","PLANE_URL",n);if(t===void 0&&!o)throw d("token","PLANE_API_KEY","PLANE_API_KEY",n);if(l===void 0)throw d("workspace","PLANE_WORKSPACE","PLANE_WORKSPACE",n);return{url:{value:p(i.value,i.origin,n),origin:i.origin},token:t??{value:"",origin:"default"},workspace:l,configPath:n}},y=(e)=>e.length<=10?"***":`${e.slice(0,6)}…${e.slice(-4)}`;
8
+ export{_ as a,v as b,R as c,y as d};