@stricli/auto-complete 1.1.0 → 1.1.2

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/cli.cjs CHANGED
@@ -3,4 +3,4 @@
3
3
  `);return}let i=e.homedir(),p=a.join(i,".bashrc"),n;try{n=(await o.promises.readFile(p)).toString().split(/\n/)}catch{t.process.stderr.write(`Expected to edit ~/.bashrc but file was not found.
4
4
  `);return}return{install:async(s,m)=>{let r=w(s),l=n.indexOf(r),x=`__${s}_complete`,S=[r,`${x}() { export COMP_LINE; COMPREPLY=( $(${m} $COMP_LINE) ); return 0; }`,`complete -o default -o nospace -F ${x} ${s}`,h];if(l>=0){let M=n.indexOf(h,l);n.splice(l,M-l+1,...S)}else n.push(...S);await o.promises.writeFile(p,n.join(`
5
5
  `)),t.process.stdout.write("Restart bash shell or run `source ~/.bashrc` to load changes.\n")},uninstall:async s=>{let m=w(s),r=n.indexOf(m);if(r>=0){let l=n.indexOf(h,r);n.splice(r,l-r+1)}await o.promises.writeFile(p,n.join(`
6
- `)),t.process.stdout.write("Restart bash shell or run `source ~/.bashrc` to load changes.\n")}}}var v,A,P,h,O=j(()=>{"use strict";v=d(require("os"),1),A=d(require("fs"),1),P=d(require("path"),1);h="# @stricli/auto-complete END"});var b={};B(b,{install:()=>J,uninstall:()=>U});async function J(t,e){t.bash&&await(await f(this))?.install(e,t.bash)}async function U(t,e){t.bash&&await(await f(this))?.uninstall(e)}var g=j(()=>{"use strict";O()});var L=require("@stricli/core");var c=require("@stricli/core");var C=require("@stricli/core");var T={parse:String,brief:"Target command run by user",placeholder:"targetCommand"},E=(0,C.buildCommand)({loader:async()=>{let{install:t}=await Promise.resolve().then(()=>(g(),b));return t},parameters:{flags:{bash:{kind:"parsed",brief:"Command executed by bash to generate completion proposals",parse:String,optional:!0,placeholder:"command"}},positional:{kind:"tuple",parameters:[T]}},docs:{brief:"Installs autocomplete support for target command on all provided shell types"}});var $=(0,C.buildCommand)({loader:async()=>{let{uninstall:t}=await Promise.resolve().then(()=>(g(),b));return t},parameters:{flags:{bash:{kind:"boolean",brief:"Uninstall autocompletion for bash",optional:!0}},positional:{kind:"tuple",parameters:[T]}},docs:{brief:"Uninstalls autocomplete support for target command on all selected shell types"}});var y={name:"@stricli/auto-complete",version:"1.1.0",description:"Common utilities for enhancing Stricli applications with autocomplete",license:"Apache-2.0",repository:{type:"git",url:"https://github.com/bloomberg/stricli/tree/main/packages/auto-complete"},author:"Michael Molisani <mmolisani@bloomberg.net>",files:["dist"],type:"module",exports:{import:"./dist/index.js",require:"./dist/index.cjs"},types:"dist/index.d.ts",bin:"dist/bin/cli.js",scripts:{format:"prettier --config ../../.prettierrc -w .","format:check":"prettier --config ../../.prettierrc -c .",lint:"eslint src","lint:fix":"eslint src --fix",typecheck:"tsc -p tsconfig.json --noEmit",build:"tsup",prepublishOnly:"npm run build"},tsup:{entry:["src/index.ts","src/bin/cli.ts"],format:["esm","cjs"],tsconfig:"src/tsconfig.json",dts:!0,minify:!0,clean:!0},devDependencies:{"@typescript-eslint/eslint-plugin":"^8.2.0","@typescript-eslint/parser":"^8.2.0",eslint:"^8.57.0","eslint-plugin-import":"^2.26.0","eslint-plugin-prettier":"^5.0.0",prettier:"^3.0.0",tsup:"^6.7.0",typescript:"5.6.x"},dependencies:{"@stricli/core":"^1.1.0"}};var D=(0,c.buildRouteMap)({routes:{install:E,uninstall:$},aliases:{i:"install"},docs:{brief:"Manage auto-complete command installations for shells"}}),k=(0,c.buildApplication)(D,{name:y.name,versionInfo:{getCurrentVersion:async()=>y.version}});(0,L.run)(k,process.argv.slice(2),globalThis);
6
+ `)),t.process.stdout.write("Restart bash shell or run `source ~/.bashrc` to load changes.\n")}}}var v,A,P,h,O=j(()=>{"use strict";v=d(require("os"),1),A=d(require("fs"),1),P=d(require("path"),1);h="# @stricli/auto-complete END"});var b={};B(b,{install:()=>J,uninstall:()=>U});async function J(t,e){t.bash&&await(await f(this))?.install(e,t.bash)}async function U(t,e){t.bash&&await(await f(this))?.uninstall(e)}var g=j(()=>{"use strict";O()});var L=require("@stricli/core");var c=require("@stricli/core");var C=require("@stricli/core");var T={parse:String,brief:"Target command run by user",placeholder:"targetCommand"},E=(0,C.buildCommand)({loader:async()=>{let{install:t}=await Promise.resolve().then(()=>(g(),b));return t},parameters:{flags:{bash:{kind:"parsed",brief:"Command executed by bash to generate completion proposals",parse:String,optional:!0,placeholder:"command"}},positional:{kind:"tuple",parameters:[T]}},docs:{brief:"Installs autocomplete support for target command on all provided shell types"}});var $=(0,C.buildCommand)({loader:async()=>{let{uninstall:t}=await Promise.resolve().then(()=>(g(),b));return t},parameters:{flags:{bash:{kind:"boolean",brief:"Uninstall autocompletion for bash",optional:!0}},positional:{kind:"tuple",parameters:[T]}},docs:{brief:"Uninstalls autocomplete support for target command on all selected shell types"}});var y={name:"@stricli/auto-complete",version:"1.1.2",description:"Common utilities for enhancing Stricli applications with autocomplete",license:"Apache-2.0",repository:{type:"git",url:"https://github.com/bloomberg/stricli/tree/main/packages/auto-complete"},author:"Michael Molisani <mmolisani@bloomberg.net>",files:["dist"],type:"module",exports:{import:"./dist/index.js",require:"./dist/index.cjs"},types:"dist/index.d.ts",bin:"dist/bin/cli.js",scripts:{format:"prettier --config ../../.prettierrc -w .","format:check":"prettier --config ../../.prettierrc -c .",lint:"eslint src","lint:fix":"eslint src --fix",typecheck:"tsc -p tsconfig.json --noEmit",build:"tsup",prepublishOnly:"npm run build"},tsup:{entry:["src/index.ts","src/bin/cli.ts"],format:["esm","cjs"],tsconfig:"src/tsconfig.json",dts:!0,minify:!0,clean:!0},devDependencies:{"@typescript-eslint/eslint-plugin":"^8.2.0","@typescript-eslint/parser":"^8.2.0",eslint:"^8.57.0","eslint-plugin-import":"^2.26.0","eslint-plugin-prettier":"^5.0.0",prettier:"^3.0.0",tsup:"^6.7.0",typescript:"5.6.x"},dependencies:{"@stricli/core":"^1.1.2"}};var D=(0,c.buildRouteMap)({routes:{install:E,uninstall:$},aliases:{i:"install"},docs:{brief:"Manage auto-complete command installations for shells"}}),k=(0,c.buildApplication)(D,{name:y.name,versionInfo:{getCurrentVersion:async()=>y.version}});(0,L.run)(k,process.argv.slice(2),globalThis);
package/dist/bin/cli.d.ts CHANGED
File without changes
package/dist/bin/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as t,c as e}from"../chunk-ADA5XTIG.js";import{run as p}from"@stricli/core";import{buildApplication as r,buildRouteMap as o}from"@stricli/core";var i={name:"@stricli/auto-complete",version:"1.1.0",description:"Common utilities for enhancing Stricli applications with autocomplete",license:"Apache-2.0",repository:{type:"git",url:"https://github.com/bloomberg/stricli/tree/main/packages/auto-complete"},author:"Michael Molisani <mmolisani@bloomberg.net>",files:["dist"],type:"module",exports:{import:"./dist/index.js",require:"./dist/index.cjs"},types:"dist/index.d.ts",bin:"dist/bin/cli.js",scripts:{format:"prettier --config ../../.prettierrc -w .","format:check":"prettier --config ../../.prettierrc -c .",lint:"eslint src","lint:fix":"eslint src --fix",typecheck:"tsc -p tsconfig.json --noEmit",build:"tsup",prepublishOnly:"npm run build"},tsup:{entry:["src/index.ts","src/bin/cli.ts"],format:["esm","cjs"],tsconfig:"src/tsconfig.json",dts:!0,minify:!0,clean:!0},devDependencies:{"@typescript-eslint/eslint-plugin":"^8.2.0","@typescript-eslint/parser":"^8.2.0",eslint:"^8.57.0","eslint-plugin-import":"^2.26.0","eslint-plugin-prettier":"^5.0.0",prettier:"^3.0.0",tsup:"^6.7.0",typescript:"5.6.x"},dependencies:{"@stricli/core":"^1.1.0"}};var l=o({routes:{install:t,uninstall:e},aliases:{i:"install"},docs:{brief:"Manage auto-complete command installations for shells"}}),s=r(l,{name:i.name,versionInfo:{getCurrentVersion:async()=>i.version}});p(s,process.argv.slice(2),globalThis);
2
+ import{a as t,c as e}from"../chunk-ADA5XTIG.js";import{run as p}from"@stricli/core";import{buildApplication as r,buildRouteMap as o}from"@stricli/core";var i={name:"@stricli/auto-complete",version:"1.1.2",description:"Common utilities for enhancing Stricli applications with autocomplete",license:"Apache-2.0",repository:{type:"git",url:"https://github.com/bloomberg/stricli/tree/main/packages/auto-complete"},author:"Michael Molisani <mmolisani@bloomberg.net>",files:["dist"],type:"module",exports:{import:"./dist/index.js",require:"./dist/index.cjs"},types:"dist/index.d.ts",bin:"dist/bin/cli.js",scripts:{format:"prettier --config ../../.prettierrc -w .","format:check":"prettier --config ../../.prettierrc -c .",lint:"eslint src","lint:fix":"eslint src --fix",typecheck:"tsc -p tsconfig.json --noEmit",build:"tsup",prepublishOnly:"npm run build"},tsup:{entry:["src/index.ts","src/bin/cli.ts"],format:["esm","cjs"],tsconfig:"src/tsconfig.json",dts:!0,minify:!0,clean:!0},devDependencies:{"@typescript-eslint/eslint-plugin":"^8.2.0","@typescript-eslint/parser":"^8.2.0",eslint:"^8.57.0","eslint-plugin-import":"^2.26.0","eslint-plugin-prettier":"^5.0.0",prettier:"^3.0.0",tsup:"^6.7.0",typescript:"5.6.x"},dependencies:{"@stricli/core":"^1.1.2"}};var l=o({routes:{install:t,uninstall:e},aliases:{i:"install"},docs:{brief:"Manage auto-complete command installations for shells"}}),s=r(l,{name:i.name,versionInfo:{getCurrentVersion:async()=>i.version}});p(s,process.argv.slice(2),globalThis);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stricli/auto-complete",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Common utilities for enhancing Stricli applications with autocomplete",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -52,6 +52,6 @@
52
52
  "typescript": "5.6.x"
53
53
  },
54
54
  "dependencies": {
55
- "@stricli/core": "^1.1.0"
55
+ "@stricli/core": "^1.1.2"
56
56
  }
57
57
  }