inscope 0.6.0 → 0.7.0-canary.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/dist/bin/index.mjs +1 -1
- package/package.json +1 -1
package/dist/bin/index.mjs
CHANGED
|
@@ -62,7 +62,7 @@ add-zsh-hook chpwd __inscope_resolve_identity
|
|
|
62
62
|
__inscope_ws="__init__" # force the first resolve, clearing any inherited token
|
|
63
63
|
__inscope_resolve_identity
|
|
64
64
|
`},je=e=>{let t=o();return e===t?`$HOME`:e.startsWith(t+n.sep)?`$HOME/${e.slice(t.length+1)}`:e},Me=()=>{let e=je(p());return`[ -r "${e}" ] && source "${e}"`},Ne=e=>{let t=Me();if(e.includes(t))return e;let n=e.replace(/\n*$/,``),r=`# inscope: load each workspace's tokens (GitHub, Slack) from \$PWD on every cd\n${t}`;return n.length?`${n}\n\n${r}\n`:`${r}\n`},Pe=()=>{let e=g(),n=``;try{n=t.readFileSync(e,`utf8`)}catch{}let r=Ne(n);r!==n&&t.writeFileSync(e,r)},Fe=()=>{try{return t.readFileSync(g(),`utf8`).includes(Me())}catch{return!1}},X=e=>{let r=p();t.mkdirSync(n.dirname(r),{recursive:!0}),t.writeFileSync(r,Ae(e)),Ee(e),Pe();let i=[];for(let t of e.workspaces)oe(t),i.push(D(t));return{hook:r,gitconfig:e.workspaces.some(e=>e.git?.email||e.git?.name),mcp:i}},Ie=T,Le=e=>`SLACK_MCP_XOXP_TOKEN_${e.toUpperCase().replace(/[^A-Z0-9]+/g,`_`)}`,Re=e=>T.filter(t=>!!e[t]),ze=(e,t)=>{let n={};for(let r of T)n[r]=r===`slack`?t?{keychain:t.keychain,addMessageTool:t.addMessageTool}:!1:e.includes(r);return n},Be=e=>{let t=w(v()?y():_(),e);b(t),X(t)},Ve=async(e,t)=>{if(!e.servers.slack)return;let n=e.servers.slack.keychain;if(t){let e=await _e(`Paste the Slack xoxp token for ${n}: `);e?(pe(n,e),console.log(`\n✓ stored ${n} in the macOS keychain`)):console.error(`
|
|
65
|
-
No token entered; skipped keychain write.`)}else j(n)||console.log(`\nSlack token not in the keychain yet. Store it once with:\n${N(me(n))}\n\nSetup guide: ${N(ge(`https://github.com/korotovsky/slack-mcp-server/blob/HEAD/docs/01-authentication-setup.md#option-2-using-slack_mcp_xoxp_token-user-oauth`))}`)};var Z=`inscope`,He=`0.
|
|
65
|
+
No token entered; skipped keychain write.`)}else j(n)||console.log(`\nSlack token not in the keychain yet. Store it once with:\n${N(me(n))}\n\nSetup guide: ${N(ge(`https://github.com/korotovsky/slack-mcp-server/blob/HEAD/docs/01-authentication-setup.md#option-2-using-slack_mcp_xoxp_token-user-oauth`))}`)};var Z=`inscope`,He=`0.7.0-canary.0`,Q={name:`Neeraj Dalal`,email:`admin@nrjdalal.com`,url:`https://nrjdalal.com`};const Ue=`Map a directory to a GitHub account, git email, and MCP servers.
|
|
66
66
|
Runs interactively in a terminal; pass flags or -y to skip the prompts. Re-running
|
|
67
67
|
with the same path or label updates that workspace.
|
|
68
68
|
|
package/package.json
CHANGED