@tabsmith/autocomplete-specs 1.0.0 → 1.0.14
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/build/@magnolia/cli.js +2 -2
- package/build/@withfig/autocomplete-tools.js +2 -2
- package/build/airflow.js +2 -2
- package/build/ansible-playbook.js +2 -2
- package/build/apt.js +4 -4
- package/build/asr.js +2 -2
- package/build/bun.js +9 -9
- package/build/cargo.js +4 -4
- package/build/cd.js +2 -2
- package/build/chezmoi.js +2 -2
- package/build/cloudflared.js +2 -2
- package/build/coda.js +3 -3
- package/build/codesign.js +2 -2
- package/build/dapr.js +2 -2
- package/build/deno/generators.js +4 -4
- package/build/deno.js +2 -2
- package/build/deployctl.js +2 -2
- package/build/direnv.js +2 -2
- package/build/docker.js +18 -18
- package/build/dotenv-vault.js +2 -2
- package/build/dotnet/dotnet-add.js +2 -2
- package/build/dotnet/dotnet-build.js +2 -2
- package/build/dotnet/dotnet-clean.js +2 -2
- package/build/dotnet/dotnet-format.js +2 -2
- package/build/dotnet/dotnet-list.js +2 -2
- package/build/dotnet/dotnet-migrate.js +2 -2
- package/build/dotnet/dotnet-nuget.js +3 -3
- package/build/dotnet/dotnet-pack.js +2 -2
- package/build/dotnet/dotnet-publish.js +2 -2
- package/build/dotnet/dotnet-remove.js +2 -2
- package/build/dotnet/dotnet-restore.js +2 -2
- package/build/dotnet/dotnet-sln.js +2 -2
- package/build/dotnet/dotnet-store.js +2 -2
- package/build/dotnet/dotnet-test.js +2 -2
- package/build/dotnet/dotnet-tool.js +3 -3
- package/build/dotnet.js +2 -2
- package/build/dtm.js +3 -3
- package/build/dynamic/index.js +1 -1
- package/build/elixir.js +2 -2
- package/build/elm-json.js +2 -2
- package/build/esbuild.js +3 -3
- package/build/file.js +2 -2
- package/build/flutter.js +5 -5
- package/build/gh.js +4 -4
- package/build/git.js +20 -20
- package/build/glow.js +2 -2
- package/build/hub.js +20 -20
- package/build/iex.js +2 -2
- package/build/index.js +1 -1
- package/build/index.json +1 -1
- package/build/java.js +2 -2
- package/build/julia.js +2 -2
- package/build/limactl.js +3 -3
- package/build/man.js +3 -3
- package/build/meteor.js +3 -3
- package/build/mgnl.js +2 -2
- package/build/mix.js +2 -2
- package/build/mongoimport.js +2 -2
- package/build/n.js +3 -3
- package/build/ni.js +2 -2
- package/build/node.js +2 -2
- package/build/npm.js +2 -2
- package/build/nr.js +3 -3
- package/build/nrm.js +2 -2
- package/build/opencode.js +2 -2
- package/build/osascript.js +2 -2
- package/build/osqueryi.js +2 -2
- package/build/pandoc.js +3 -3
- package/build/pdfunite.js +2 -2
- package/build/pi.js +2 -2
- package/build/pipenv.js +2 -2
- package/build/pm2.js +2 -2
- package/build/pnpm.js +23 -24
- package/build/pod.js +2 -2
- package/build/pre-commit.js +126 -126
- package/build/python.js +2 -2
- package/build/python3.js +2 -2
- package/build/r.js +3 -3
- package/build/rails.js +3 -3
- package/build/rancher.js +3 -3
- package/build/react-native.js +5 -5
- package/build/robot.js +2 -2
- package/build/rojo.js +2 -2
- package/build/rollup.js +2 -2
- package/build/rscript.js +2 -2
- package/build/rush.js +5 -5
- package/build/rushx.js +4 -4
- package/build/scc.js +2 -2
- package/build/shortcuts.js +2 -2
- package/build/sidekiq.js +2 -2
- package/build/sqlite3.js +2 -2
- package/build/streamlit.js +2 -2
- package/build/subl.js +2 -2
- package/build/swift.js +2 -2
- package/build/systemctl.js +2 -2
- package/build/ts-node.js +3 -3
- package/build/tsc.js +2 -2
- package/build/tsx.js +2 -2
- package/build/turbo.js +20 -20
- package/build/typst.js +2 -2
- package/build/vsce.js +20 -20
- package/build/wasm-bindgen.js +2 -2
- package/build/yarn.js +4 -4
- package/build/yomo.js +2 -2
- package/package.json +20 -20
- package/build/ai-agents specs.js +0 -1
package/build/nr.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
function
|
|
2
|
-
`).map(p=>({name:p,icon:"\u{1F4E6}",description:"Global dependency"}))}}},P={cache:{strategy:"stale-while-revalidate",cacheByDirectory:!0},script:["bash","-c","until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"],postProcess:function(n,[s]){if(n.trim()=="")return[];try{let c=JSON.parse(n),p=c.scripts,t=c.fig||{};if(p)return Object.entries(p).map(([r,h])=>{let g=s==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",d=t[r];return{name:r,icon:g,description:h,priority:51,...d}})}catch(c){console.error(c)}return[]}},O={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},o={name:"--json",description:"Show output in json format"},b={name:"--omit",description:"Dependency types to omit from the installation tree on disk",args:{name:"Package type",default:"dev",suggestions:["dev","optional","peer"]},isRepeatable:3},u={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},S={name:["-l","--long"],description:"Show extended information"},a=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:V,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],A=[{name:["-S","--save"],description:"Package will be removed from your dependencies"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:"-g",description:"Uninstall global package"},...a],z=[{name:["-a","-all"],description:"Show all outdated or installed packages"},o,S,u,{name:"--depth",description:"The depth to go when recursing packages",args:{name:"depth"}},{name:"--link",description:"Limits output to only those packages that are linked"},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--no-unicode",description:"Uses unicode characters in the tree output"},O,b,...a],e={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},R={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},i={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},l={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},k={name:"--script-shell",description:"The shell to use for scripts run with the npm exec, npm run and npm init <pkg> commands",args:{name:"script-shell"}},f={name:"--dry-run",description:"Indicates that you don't want npm to make any changes and that it should only report what it would have done"},G={name:"npm",parserDirectives:{flagsArePosixNoncompliant:!0},description:"Node package manager",subcommands:[{name:["install","i","add"],description:"Install a package and its dependencies",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[{name:["-P","--save-prod"],description:"Package will appear in your `dependencies`. This is the default unless `-D` or `-O` are present"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:["-E","--save-exact"],description:"Saved dependencies will be configured with an exact version rather than using npm's default semver range operator"},{name:["-B","--save-bundle"],description:"Saved dependencies will also be added to your bundleDependencies list"},O,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder"},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package"},{name:"--legacy-peer-deps",description:"Bypass peerDependency auto-installation. Emulate install behavior of NPM v4 through v6"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},e,R,b,l,{name:"--no-audit",description:"Submit audit reports alongside the current npm command to the default registry and all registries configured for scopes"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},f,...a]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...a,{name:"--if-present",description:"Npm will not exit with an error code when run-script is invoked for a script that isn't defined in the scripts section of package.json"},{name:"--silent",description:""},l,k,{name:"--",args:{name:"args",isVariadic:!0}}],args:{name:"script",description:"Script to run from your package.json",filterStrategy:"fuzzy",generators:P}},{name:"init",description:"Trigger the initialization",options:[{name:["-y","--yes"],description:"Automatically answer 'yes' to any prompts that npm might print on the command line"},{name:"-w",description:"Create the folders and boilerplate expected while also adding a reference to your project workspaces property",args:{name:"dir"}}]},{name:"access",description:"Set access controls on private packages"},{name:["adduser","login"],description:"Add a registry user account",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:"audit",description:"Run a security audit",subcommands:[{name:"fix",description:"If the fix argument is provided, then remediations will be applied to the package tree",options:[f,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...a]}],options:[...a,{name:"--audit-level",description:"The minimum level of vulnerability for npm audit to exit with a non-zero exit code",args:{name:"audit",suggestions:["info","low","moderate","high","critical","none"]}},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},o,b]},{name:"bin",description:"Print the folder where npm will install executables",options:[O]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm bugs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]},e]},{name:"cache",description:"Manipulates packages cache",subcommands:[{name:"add",description:"Add the specified packages to the local cache"},{name:"clean",description:"Delete all data out of the cache folder"},{name:"verify",description:"Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data"}],options:[{name:"--cache",args:{name:"cache"},description:"The location of npm's cache directory"}]},{name:["ci","clean-install","install-clean"],description:"Install a project with a clean slate",options:[{name:"--audit",description:'When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes',args:{name:"audit",suggestions:["true","false"]},exclusiveOn:["--no-audit"]},{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command",exclusiveOn:["--audit"]},l,k,R,e]},{name:"cit",description:"Install a project with a clean slate and run tests"},{name:"clean-install-test",description:"Install a project with a clean slate and run tests"},{name:"completion",description:"Tab completion for npm"},{name:["config","c"],description:"Manage the npm configuration files",subcommands:[{name:"set",description:"Sets the config key to the value",args:[{name:"key"},{name:"value"}],options:[{name:["-g","--global"],description:"Sets it globally"}]},{name:"get",description:"Echo the config value to stdout",args:{name:"key"}},{name:"list",description:"Show all the config settings",options:[{name:"-g",description:"Lists globally installed packages"},{name:"-l",description:"Also shows defaults"},o]},{name:"delete",description:"Deletes the key from all configuration files",args:{name:"key"}},{name:"edit",description:"Opens the config file in an editor",options:[{name:"--global",description:"Edits the global config"}]}]},{name:"create",description:"Create a package.json file"},{name:["dedupe","ddp"],description:"Reduce duplication in the package tree"},{name:"deprecate",description:"Deprecate a version of a package",options:[e]},{name:"dist-tag",description:"Modify package distribution tags"},{name:["docs","home"],description:"Open documentation for a package in a web browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[...a,e,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm docs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"doctor",description:"Check your npm environment",options:[e]},{name:"edit",description:"Edit an installed package",options:[{name:"--editor",description:"The command to run for npm edit or npm config edit"}]},{name:"explore",description:"Browse an installed package",args:{name:"package",filterStrategy:"fuzzy",generators:T}},{name:"fund",description:"Retrieve funding information"},{name:"get",description:"Echo the config value to stdout"},{name:"help",description:"Get help on npm",args:{name:"term",isVariadic:!0,description:"Terms to search for"},options:[{name:"--viewer",description:"The program to use to view help content",args:{name:"viewer"}}]},{name:"help-search",description:"Search npm help documentation",args:{name:"text",description:"Text to search for"},options:[S]},{name:"hook",description:"Manage registry hooks"},{name:"install-ci-test",description:"Install a project with a clean slate and run tests"},{name:"install-test",description:"Install package(s) and run tests"},{name:"it",description:"Install package(s) and run tests"},{name:"link",description:"Symlink a package folder",args:{name:"path",template:"filepaths"}},{name:"ln",description:"Symlink a package folder"},{name:"logout",description:"Log out of the registry",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:["ls","list"],description:"List installed packages",options:z,args:{name:"[@scope]/pkg",isVariadic:!0}},{name:"org",description:"Manage orgs",subcommands:[{name:"set",description:"Add a user to an org or manage roles",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"},{name:"role",isOptional:!0,suggestions:["developer","admin","owner"]}],options:[e,i]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[e,i]},{name:"ls",description:"List users in an org or see what roles a particular user has in an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name",isOptional:!0}],options:[e,i,o,u]}]},{name:"outdated",description:"Check for outdated packages",args:{name:"[<@scope>/]<pkg>",isVariadic:!0,isOptional:!0},options:[{name:["-a","-all"],description:"Show all outdated or installed packages"},o,S,u,{name:"-g",description:"Checks globally"},...a]},{name:["owner","author"],description:"Manage package owners",subcommands:[{name:"ls",description:"List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help",args:{name:"[@scope/]pkg"},options:[e]},{name:"add",description:"Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,i]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,i]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[o,f,...a,{name:"--pack-destination",description:"Directory in which npm pack will save tarballs",args:{name:"pack-destination",template:["folders"]}}]},{name:"ping",description:"Ping npm registry",options:[e]},{name:"pkg",description:"Manages your package.json",subcommands:[{name:"get",description:"Retrieves a value key, defined in your package.json file. It is possible to get multiple values and values for child fields",args:{name:"field",description:"Name of the field to get. You can view child fields by separating them with a period",isVariadic:!0},options:[o,...a]},{name:"set",description:"Sets a value in your package.json based on the field value. It is possible to set multiple values and values for child fields",args:{name:"field",description:"Name of the field to set. You can set child fields by separating them with a period",isVariadic:!0},options:[o,...a,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"delete",description:"Deletes a key from your package.json",args:{name:"key",description:"Name of the key to delete. You can delete child fields by separating them with a period",isVariadic:!0},options:[...a,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]}]},{name:"prefix",description:"Display prefix",options:[{name:["-g","--global"],description:"Print the global prefix to standard out"}]},{name:"profile",description:"Change settings on your registry profile",subcommands:[{name:"get",description:"Display all of the properties of your profile, or one or more specific properties",args:{name:"property",isOptional:!0,description:"Property name"},options:[e,o,u,i]},{name:"set",description:"Set the value of a profile property",args:[{name:"property",description:"Property name",suggestions:["email","fullname","homepage","freenode","twitter","github"]},{name:"value",description:"Property value"}],options:[e,o,u,i],subcommands:[{name:"password",description:"Change your password. This is interactive, you'll be prompted for your current password and a new password"}]},{name:"enable-2fa",description:"Enables two-factor authentication",args:{name:"mode",description:"Mode for two-factor authentication. Defaults to auth-and-writes mode",isOptional:!0,suggestions:[{name:"auth-only",description:"Require an OTP when logging in or making changes to your account's authentication"},{name:"auth-and-writes",description:"Requires an OTP at all the times auth-only does, and also requires one when publishing a module, setting the latest dist-tag, or changing access via npm access and npm owner"}]},options:[e,i]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[e,i]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[b,f,o,{name:"--production",description:"Remove the packages specified in your devDependencies"},...a]},{name:"publish",description:"Publish a package",args:{name:"tarball|folder",isOptional:!0,description:"A url or file path to a gzipped tar archive containing a single folder with a package.json file inside | A folder containing a package.json file",template:["folders"]},options:[{name:"--tag",description:"Registers the published package with the given tag",args:{name:"tag"}},...a,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},f,i]},{name:["rebuild","rb"],description:"Rebuild a package",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[O,...a,l,{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"}]},{name:"repo",description:"Open package repository page in the browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[...a,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm repo command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"restart",description:"Restart a package",options:[l,k,{name:"--",args:{name:"arg",description:"Arguments to be passed to the restart script"}}]},{name:"root",description:"Display npm root",options:[{name:["-g","--global"],description:"Print the effective global node_modules folder to standard out"}]},{name:["search","s","se","find"],description:"Search for packages",args:{name:"search terms",isVariadic:!0},options:[S,o,{name:"--color",description:"Show colors",args:{name:"always",suggestions:["always"],description:"Always show colors"},exclusiveOn:["--no-color"]},{name:"--no-color",description:"Do not show colors",exclusiveOn:["--color"]},u,{name:"--no-description",description:"Do not show descriptions"},{name:"--searchopts",description:"Space-separated options that are always passed to search",args:{name:"searchopts"}},{name:"--searchexclude",description:"Space-separated options that limit the results from search",args:{name:"searchexclude"}},e,{name:"--prefer-online",description:"If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data",exclusiveOn:["--prefer-offline","--offline"]},{name:"--prefer-offline",description:"If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server",exclusiveOn:["--prefer-online","--offline"]},{name:"--offline",description:"Force offline mode: no network requests will be done during install",exclusiveOn:["--prefer-online","--prefer-offline"]}]},{name:"set",description:"Sets the config key to the value"},{name:"set-script",description:"Set tasks in the scripts section of package.json",args:[{name:"script",description:"Name of the task to be added to the scripts section of package.json"},{name:"command",description:"Command to run when script is called"}],options:a},{name:"shrinkwrap",description:"Lock down dependency versions for publication"},{name:"star",description:"Mark your favorite packages",args:{name:"pkg",description:"Package to mark as favorite"},options:[e,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:"stars",description:"View packages marked as favorites",args:{name:"user",isOptional:!0,description:"View packages marked as favorites by <user>"},options:[e]},{name:"start",description:"Start a package",options:[l,k,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[l,k,{name:"--",args:{name:"arg",description:"Arguments to be passed to the stop script"}}]},{name:"team",description:"Manage organization teams and team memberships",subcommands:[{name:"create",args:{name:"scope:team"},options:[e,i]},{name:"destroy",args:{name:"scope:team"},options:[e,i]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[e,i]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[e,i]},{name:"ls",args:{name:"scope|scope:team"},options:[e,o,u]}]},{name:["test","tst","t"],description:"Test a package",options:[l,k]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[o,u]},{name:"create",description:"Create a new authentication token",options:[{name:"--read-only",description:"This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command"},{name:"--cidr",description:"This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command",isRepeatable:!0,args:{name:"cidr"}}]},{name:"revoke",description:"Immediately removes an authentication token from the registry. You will no longer be able to use it",args:{name:"idtoken"}}],options:[e,i]},y("uninstall"),y(["r","rm"]),y("un"),y("remove"),y("unlink"),{name:"unpublish",description:"Remove a package from the registry",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[f,{name:["-f","--force"],description:"Allow unpublishing all versions of a published package. Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...a]},{name:"unstar",description:"Remove an item from your favorite packages",args:{name:"pkg",description:"Package to unmark as favorite"},options:[e,i,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:["update","upgrade","up"],description:"Update a package",options:[{name:"-g",description:"Update global package"},{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder"},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},b,l,{name:"--no-audit",description:"Submit audit reports alongside the current npm command to the default registry and all registries configured for scopes"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},{name:"--save",description:"Update the semver values of direct dependencies in your project package.json"},f,...a]},{name:"version",description:"Bump a package version",options:[...a,o,{name:"--allow-same-version",description:"Prevents throwing an error when npm version is used to set the new version to the same value as the current version"},{name:"--no-commit-hooks",description:"Do not run git commit hooks when using the npm version command"},{name:"--no-git-tag-version",description:"Do not tag the commit when using the npm version command"},{name:"--preid",description:'The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the rc in 1.2.0-rc.8',args:{name:"prerelease-id"}},{name:"--sign-git-tag",description:"If set to true, then the npm version command will tag the version using -s to add a signature"}]},{name:["view","v","info","show"],description:"View registry info",options:[...a,o]},{name:"whoami",description:"Display npm username",options:[e]}]};var U={name:"nr",description:"Use the right package manager - run",options:[{name:["-h","--help"],description:"Output usage information"}],args:{name:"script",description:"The script to run",filterStrategy:"fuzzy",generators:P},additionalSuggestions:[{name:"-",insertValue:`-
|
|
3
|
-
`,description:"Run the last command",type:"shortcut"}]},E
|
|
1
|
+
function v(a){return{name:a,description:"Uninstall a package",args:{name:"package",generators:x,filterStrategy:"fuzzy",isVariadic:!0},options:M}}var F=a=>(a.match(/@/g)||[]).length,z=a=>async(o,p,c)=>{let i=o[o.length-1];if(i==="")return[];let r=a&&a.length>0?`+keywords:${a.join(",")}`:"",u=["-s","-H","Accept: application/json",r?`https://api.npms.io/v2/search?size=20&q=${i}${r}`:`https://api.npms.io/v2/search/suggestions?q=${i}&size=20`],l=["-s","-H","Accept: application/vnd.npm.install-v1+json",`https://registry.npmjs.org/${i.slice(0,-1)}`],A=m=>p({command:"curl",args:m[m.length-1]==="@"?l:u}),j=i.startsWith("@")?F(i)>1:i.includes("@");try{let m=JSON.parse((await A(i)).stdout);if(j){let w=Object.entries(m["dist-tags"]||{}).map(([C,q])=>({name:C,description:q}));return w.push(...Object.keys(m.versions).map(C=>({name:C})).reverse()),w}return(r?m.results:m).map(w=>({name:w.package.name,description:w.package.description}))}catch(m){return console.error({error:m}),[]}},O={trigger:(a,o)=>o.startsWith("@")?!(F(o)>1&&F(a)>1):!(o.includes("@")&&a.includes("@")),getQueryTerm:"@",cache:{ttl:1e3*60*60*24*2},custom:z()},G={custom:async(a,o)=>{let{stdout:p}=await o({command:"npm",args:["prefix"]}),{stdout:c}=await o({command:"cat",args:[`${p}/package.json`]}),i=[];try{if(c.trim()=="")return i;let k=JSON.parse(c).workspaces;if(k)for(let u of k)i.push({name:u,description:"Workspaces"})}catch(r){console.log(r)}return i}},x={trigger:a=>a==="-g"||a==="--global",custom:async function(a,o){if(!a.includes("-g")&&!a.includes("--global")){let{stdout:p}=await o({command:"npm",args:["prefix"]}),{stdout:c}=await o({command:"cat",args:[`${p}/package.json`]}),i=JSON.parse(c),r=i.dependencies??{},k=i.devDependencies,u=i.optionalDependencies??{};return Object.assign(r,k,u),Object.keys(r).filter(l=>!a.some(j=>j===l)).map(l=>({name:l,icon:"\u{1F4E6}",description:r[l]?"dependency":u[l]?"optionalDependency":"devDependency"}))}else{let{stdout:p}=await o({command:"bash",args:["-c","ls -1 `npm root -g`"]});return p.split(`
|
|
2
|
+
`).map(c=>({name:c,icon:"\u{1F4E6}",description:"Global dependency"}))}}},P={cache:{strategy:"stale-while-revalidate",cacheByDirectory:!0},script:["bash","-c","until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"],postProcess:function(a,[o]){if(a.trim()=="")return[];try{let p=JSON.parse(a),c=p.scripts,i=p.fig||{};if(c)return Object.entries(c).map(([r,k])=>{let u=o==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",l=i[r];return{name:r,icon:u,description:k,priority:51,...l}})}catch(p){console.error(p)}return[]}},b={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},t={name:"--json",description:"Show output in json format"},h={name:"--omit",description:"Dependency types to omit from the installation tree on disk",args:{name:"Package type",default:"dev",suggestions:["dev","optional","peer"]},isRepeatable:3},f={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},D={name:["-l","--long"],description:"Show extended information"},n=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:G,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],M=[{name:["-S","--save"],description:"Package will be removed from your dependencies"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:"-g",description:"Uninstall global package"},...n],N=[{name:["-a","--all"],description:"Show all outdated or installed packages"},t,D,f,{name:"--depth",description:"The depth to go when recursing packages",args:{name:"depth"}},{name:"--link",description:"Limits output to only those packages that are linked"},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--no-unicode",description:"Uses unicode characters in the tree output"},b,h,...n],e={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},T={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},s={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},d={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},y={name:"--script-shell",description:"The shell to use for scripts run with the npm exec, npm run and npm init <pkg> commands",args:{name:"script-shell"}},g={name:"--dry-run",description:"Indicates that you don't want npm to make any changes and that it should only report what it would have done"},S={name:"--install-strategy",description:"Sets the strategy for installing packages in node_modules",args:{name:"strategy",default:"hoisted",suggestions:["hoisted","nested","shallow","linked"]}},V={name:"--install-links",description:"Install file: protocol dependencies outside the project root as regular dependencies instead of creating a symlink"},R={name:"--foreground-scripts",description:"Run all build scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process"},L={name:"--allow-git",description:"Limits the ability for npm to install git dependencies",args:{name:"allow-git",suggestions:["all","none","root"]}},U={name:"--allow-remote",description:"Limits the ability for npm to install user-supplied tarball URL dependencies",args:{name:"allow-remote",suggestions:["all","none","root"]}},I=[{name:"--allow-publish",description:"Allows the trusted publisher to run npm publish for the package"},{name:["--allow-stage-publish","--allow-staged-publish"],description:"Allows the trusted publisher to run npm stage for the package"}],_={name:"npm",parserDirectives:{flagsArePosixNoncompliant:!0},description:"Node package manager",subcommands:[{name:["install","i","add"],description:"Install a package and its dependencies",args:{name:"package",isOptional:!0,generators:O,debounce:!0,isVariadic:!0},options:[{name:["-P","--save-prod"],description:"Package will appear in your `dependencies`. This is the default unless `-D` or `-O` are present"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:["-E","--save-exact"],description:"Saved dependencies will be configured with an exact version rather than using npm's default semver range operator"},{name:["-B","--save-bundle"],description:"Saved dependencies will also be added to your bundleDependencies list"},b,S,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder",deprecated:!0},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package",deprecated:!0},{name:"--legacy-peer-deps",description:"Bypass peerDependency auto-installation. Emulate install behavior of NPM v4 through v6"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},e,T,h,d,R,L,U,V,{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},g,...n]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...n,{name:"--if-present",description:"Npm will not exit with an error code when run-script is invoked for a script that isn't defined in the scripts section of package.json"},{name:"--silent",description:""},d,y,{name:"--",args:{name:"args",isVariadic:!0}}],args:{name:"script",description:"Script to run from your package.json",filterStrategy:"fuzzy",generators:P}},{name:"init",description:"Trigger the initialization",options:[{name:["-y","--yes"],description:"Automatically answer 'yes' to any prompts that npm might print on the command line"},{name:"-w",description:"Create the folders and boilerplate expected while also adding a reference to your project workspaces property",args:{name:"dir"}},{name:"--init-private",description:"Set the private field to true in package.json"},{name:"--scope",description:"Create a scoped package",args:{name:"scope",description:"Scope name"}}]},{name:"access",description:"Set access level on published packages",subcommands:[{name:"list",description:"List packages or collaborators",subcommands:[{name:"packages",description:"List all packages accessible by a user, scope or team",args:[{name:"user|scope|scope:team",isOptional:!0},{name:"package",isOptional:!0}]},{name:"collaborators",description:"List all users with access to a package",args:[{name:"package",isOptional:!0},{name:"user",isOptional:!0}]}]},{name:"get",description:"Get the access status of a package",subcommands:[{name:"status",description:"Get the visibility status of a package",args:{name:"package",isOptional:!0}}]},{name:"set",description:"Set the visibility status or publishing MFA requirement of a package",args:[{name:"status|mfa",suggestions:["status=public","status=private","mfa=none","mfa=publish","mfa=automation"]},{name:"package",isOptional:!0}]},{name:"grant",description:"Grant a team read-only or read-write access to a package",args:[{name:"permissions",suggestions:["read-only","read-write"]},{name:"scope:team"},{name:"package",isOptional:!0}]},{name:"revoke",description:"Revoke a team's access to a package",args:[{name:"scope:team"},{name:"package",isOptional:!0}]}],options:[t,s,e]},{name:"adduser",description:"Add a registry user account",deprecated:!0,options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:"login",description:"Login to a registry user account",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}},{name:"--auth-type",description:"What authentication strategy to use with login",args:{name:"auth-type",default:"web",suggestions:["legacy","web"]}}]},{name:"audit",description:"Run a security audit",subcommands:[{name:"signatures",description:"Verify registry signatures and provenance attestations of downloaded packages",options:[t,{name:"--include-attestations",description:"Include full sigstore attestation bundles in the JSON output"}]},{name:"fix",description:"If the fix argument is provided, then remediations will be applied to the package tree",options:[g,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...n]}],options:[...n,{name:"--audit-level",description:"The minimum level of vulnerability for npm audit to exit with a non-zero exit code",args:{name:"audit",suggestions:["info","low","moderate","high","critical","none"]}},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},t,h]},{name:"bin",description:"Print the folder where npm will install executables",deprecated:!0,options:[b]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:O,debounce:!0,isVariadic:!0},options:[{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm bugs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]},e]},{name:"cache",description:"Manipulates packages and npx cache",subcommands:[{name:"add",description:"Add the specified packages to the local cache"},{name:"clean",description:"Delete a single entry or all entries out of the cache folder",args:{name:"key",isOptional:!0}},{name:"ls",description:"List given entries or all entries in the local cache",args:{name:"name@version",isOptional:!0,isVariadic:!0}},{name:"verify",description:"Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data"},{name:"npx",description:"Manipulates the npx cache",subcommands:[{name:"ls",description:"List all entries in the npx cache"},{name:"rm",description:"Remove given entries or all entries from the npx cache",args:{name:"key",isOptional:!0,isVariadic:!0}},{name:"info",description:"Get detailed information about given entries in the npx cache",args:{name:"key",isVariadic:!0}}]}],options:[{name:"--cache",args:{name:"cache"},description:"The location of npm's cache directory"}]},{name:["ci","clean-install","install-clean"],description:"Install a project with a clean slate",options:[{name:"--audit",description:'When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes',args:{name:"audit",suggestions:["true","false"]},exclusiveOn:["--no-audit"]},{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command",exclusiveOn:["--audit"]},d,y,T,e,S,h,R,L,U]},{name:"cit",description:"Install a project with a clean slate and run tests"},{name:"clean-install-test",description:"Install a project with a clean slate and run tests"},{name:"completion",description:"Tab completion for npm"},{name:["config","c"],description:"Manage the npm configuration files",subcommands:[{name:"set",description:"Sets the config key to the value",args:[{name:"key"},{name:"value"}],options:[{name:["-g","--global"],description:"Sets it globally"}]},{name:"get",description:"Echo the config value to stdout",args:{name:"key"}},{name:"list",description:"Show all the config settings",options:[{name:"-g",description:"Lists globally installed packages"},{name:"-l",description:"Also shows defaults"},t]},{name:"delete",description:"Deletes the key from all configuration files",args:{name:"key"}},{name:"edit",description:"Opens the config file in an editor",options:[{name:"--global",description:"Edits the global config"}]},{name:"fix",description:"Attempts to repair invalid configuration items, such as attaching authentication configuration to the configured registry"}]},{name:"create",description:"Create a package.json file"},{name:["dedupe","ddp"],description:"Reduce duplication in the package tree"},{name:"deprecate",description:"Deprecate a version of a package",options:[e]},{name:"diff",description:"The registry diff command",args:{name:"paths",isOptional:!0,isVariadic:!0,template:"filepaths"},options:[{name:"--diff",description:"Define arguments to compare in npm diff",isRepeatable:2,args:{name:"package-spec"}},{name:"--diff-name-only",description:"Prints only filenames when using npm diff"},{name:"--diff-unified",description:"The number of lines of context to print in npm diff",args:{name:"number",default:"3"}},{name:"--diff-ignore-all-space",description:"Ignore whitespace when comparing lines in npm diff"},{name:"--diff-no-prefix",description:"Do not show any source or destination prefix in npm diff output"},{name:"--diff-src-prefix",description:"Source prefix to be used in npm diff output",args:{name:"path",default:"a/"}},{name:"--diff-dst-prefix",description:"Destination prefix to be used in npm diff output",args:{name:"path",default:"b/"}},{name:"--diff-text",description:"Treat all files as text in npm diff"},b,{name:"--tag",description:"The tag used to fetch the tarball that will be compared with the local files",args:{name:"tag",default:"latest"}},...n]},{name:"dist-tag",description:"Modify package distribution tags"},{name:["docs","home"],description:"Open documentation for a package in a web browser",args:{name:"package",isOptional:!0,generators:O,debounce:!0,isVariadic:!0},options:[...n,e,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm docs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"doctor",description:"Check your npm environment",options:[e]},{name:"edit",description:"Edit an installed package",options:[{name:"--editor",description:"The command to run for npm edit or npm config edit"}]},{name:["exec","x"],description:"Run a command from a local or remote npm package",args:{name:"command",isOptional:!0,isVariadic:!0},options:[{name:"--package",description:"The package or packages to install for npm exec",isRepeatable:!0,args:{name:"package-spec",generators:O,debounce:!0}},{name:["-c","--call"],description:"Custom command to be run along with the installed packages",args:{name:"call"}},{name:["-y","--yes"],description:"Automatically answer 'yes' to the prompt to install missing packages",exclusiveOn:["--no"]},{name:"--no",description:"Automatically answer 'no' to the prompt to install missing packages",exclusiveOn:["-y","--yes"]},...n]},{name:["explain","why"],description:"Explain installed packages",args:{name:"package-spec",filterStrategy:"fuzzy",generators:x,isVariadic:!0},options:[t,...n]},{name:"explore",description:"Browse an installed package",args:{name:"package",filterStrategy:"fuzzy",generators:x}},{name:"find-dupes",description:"Find duplication in the package tree",options:[S,h,d,...n]},{name:"fund",description:"Retrieve funding information"},{name:"get",description:"Echo the config value to stdout"},{name:"help",description:"Get help on npm",args:{name:"term",isVariadic:!0,description:"Terms to search for"},options:[{name:"--viewer",description:"The program to use to view help content",args:{name:"viewer"}}]},{name:"help-search",description:"Search npm help documentation",args:{name:"text",description:"Text to search for"},options:[D]},{name:"hook",description:"Manage registry hooks",deprecated:!0},{name:"install-ci-test",description:"Install a project with a clean slate and run tests"},{name:"install-scripts",description:"Manage which dependencies are allowed to run install scripts",subcommands:[{name:"approve",description:"Approve install scripts for packages, pinned to their installed version",args:{name:"pkg",isOptional:!0,isVariadic:!0,generators:x},options:[{name:"--all",description:"Approve all currently-installed install scripts"}]},{name:"deny",description:"Deny install scripts for packages so they stay blocked",args:{name:"pkg",isOptional:!0,isVariadic:!0,generators:x},options:[{name:"--all",description:"Deny all currently-installed install scripts"}]},{name:"ls",description:"List packages whose install scripts still need review"},{name:"prune",description:"Remove stale allowScripts entries",options:[g]}]},{name:"install-test",description:"Install package(s) and run tests"},{name:"it",description:"Install package(s) and run tests"},{name:"link",description:"Symlink a package folder",args:{name:"path",template:"filepaths"}},{name:"ln",description:"Symlink a package folder"},{name:"logout",description:"Log out of the registry",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:["ls","list"],description:"List installed packages",options:N,args:{name:"[@scope]/pkg",isVariadic:!0}},{name:"org",description:"Manage orgs",subcommands:[{name:"set",description:"Add a user to an org or manage roles",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"},{name:"role",isOptional:!0,suggestions:["developer","admin","owner"]}],options:[e,s]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[e,s]},{name:"ls",description:"List users in an org or see what roles a particular user has in an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name",isOptional:!0}],options:[e,s,t,f]}]},{name:"outdated",description:"Check for outdated packages",args:{name:"[<@scope>/]<pkg>",isVariadic:!0,isOptional:!0},options:[{name:["-a","--all"],description:"Show all outdated or installed packages"},t,D,f,{name:"-g",description:"Checks globally"},...n]},{name:["owner","author"],description:"Manage package owners",subcommands:[{name:"ls",description:"List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help",args:{name:"[@scope/]pkg"},options:[e]},{name:"add",description:"Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,s]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,s]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[t,g,...n,{name:"--pack-destination",description:"Directory in which npm pack will save tarballs",args:{name:"pack-destination",template:["folders"]}}]},{name:"ping",description:"Ping npm registry",options:[e]},{name:"pkg",description:"Manages your package.json",subcommands:[{name:"get",description:"Retrieves a value key, defined in your package.json file. It is possible to get multiple values and values for child fields",args:{name:"field",description:"Name of the field to get. You can view child fields by separating them with a period",isVariadic:!0},options:[t,...n]},{name:"set",description:"Sets a value in your package.json based on the field value. It is possible to set multiple values and values for child fields",args:{name:"field",description:"Name of the field to set. You can set child fields by separating them with a period",isVariadic:!0},options:[t,...n,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"delete",description:"Deletes a key from your package.json",args:{name:"key",description:"Name of the key to delete. You can delete child fields by separating them with a period",isVariadic:!0},options:[...n,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"fix",description:"Auto corrects common errors in your package.json",options:n}]},{name:"prefix",description:"Display prefix",options:[{name:["-g","--global"],description:"Print the global prefix to standard out"}]},{name:"profile",description:"Change settings on your registry profile",subcommands:[{name:"get",description:"Display all of the properties of your profile, or one or more specific properties",args:{name:"property",isOptional:!0,description:"Property name"},options:[e,t,f,s]},{name:"set",description:"Set the value of a profile property",args:[{name:"property",description:"Property name",suggestions:["email","fullname","homepage","freenode","twitter","github"]},{name:"value",description:"Property value"}],options:[e,t,f,s],subcommands:[{name:"password",description:"Change your password. This is interactive, you'll be prompted for your current password and a new password"}]},{name:"enable-2fa",description:"Enables two-factor authentication",args:{name:"mode",description:"Mode for two-factor authentication. Defaults to auth-and-writes mode",isOptional:!0,suggestions:[{name:"auth-only",description:"Require an OTP when logging in or making changes to your account's authentication"},{name:"auth-and-writes",description:"Requires an OTP at all the times auth-only does, and also requires one when publishing a module, setting the latest dist-tag, or changing access via npm access and npm owner"}]},options:[e,s]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[e,s]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[h,g,t,{name:"--production",description:"Remove the packages specified in your devDependencies"},...n]},{name:"publish",description:"Publish a package",args:{name:"tarball|folder",isOptional:!0,description:"A url or file path to a gzipped tar archive containing a single folder with a package.json file inside | A folder containing a package.json file",template:["folders"]},options:[{name:"--tag",description:"Registers the published package with the given tag",args:{name:"tag"}},...n,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},g,s,{name:"--provenance",description:"When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from",exclusiveOn:["--provenance-file"]},{name:"--provenance-file",description:"When publishing, the provenance bundle at the given path will be used",args:{name:"file",template:"filepaths"},exclusiveOn:["--provenance"]}]},{name:"query",description:"Retrieve a filtered list of packages",args:{name:"selector",description:"Dependency selector, e.g. ':root > .prod'"},options:[b,...n,{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--expect-results",description:"Exit with an error code if the query has no results",exclusiveOn:["--no-expect-results","--expect-result-count"]},{name:"--no-expect-results",description:"Exit with an error code if the query has any results",exclusiveOn:["--expect-results","--expect-result-count"]},{name:"--expect-result-count",description:"Exit with an error code if the query does not return exactly this many results",args:{name:"count"},exclusiveOn:["--expect-results","--no-expect-results"]}]},{name:["rebuild","rb"],description:"Rebuild a package",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[b,...n,d,{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"}]},{name:"repo",description:"Open package repository page in the browser",args:{name:"package",isOptional:!0,generators:O,debounce:!0,isVariadic:!0},options:[...n,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm repo command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"restart",description:"Restart a package",options:[d,y,{name:"--",args:{name:"arg",description:"Arguments to be passed to the restart script"}}]},{name:"root",description:"Display npm root",options:[{name:["-g","--global"],description:"Print the effective global node_modules folder to standard out"}]},{name:"sbom",description:"Generate a Software Bill of Materials (SBOM)",options:[h,{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--sbom-format",description:"SBOM format to use when generating SBOMs",args:{name:"format",suggestions:["cyclonedx","spdx"]}},...n]},{name:["search","s","se","find"],description:"Search for packages",args:{name:"search terms",isVariadic:!0},options:[D,t,{name:"--color",description:"Show colors",args:{name:"always",suggestions:["always"],description:"Always show colors"},exclusiveOn:["--no-color"]},{name:"--no-color",description:"Do not show colors",exclusiveOn:["--color"]},f,{name:"--no-description",description:"Do not show descriptions"},{name:"--searchopts",description:"Space-separated options that are always passed to search",args:{name:"searchopts"}},{name:"--searchexclude",description:"Space-separated options that limit the results from search",args:{name:"searchexclude"}},e,{name:"--prefer-online",description:"If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data",exclusiveOn:["--prefer-offline","--offline"]},{name:"--prefer-offline",description:"If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server",exclusiveOn:["--prefer-online","--offline"]},{name:"--offline",description:"Force offline mode: no network requests will be done during install",exclusiveOn:["--prefer-online","--prefer-offline"]}]},{name:"set",description:"Sets the config key to the value"},{name:"set-script",description:"Set tasks in the scripts section of package.json",deprecated:!0,args:[{name:"script",description:"Name of the task to be added to the scripts section of package.json"},{name:"command",description:"Command to run when script is called"}],options:n},{name:"shrinkwrap",description:"Lock down dependency versions for publication",deprecated:!0},{name:"stage",description:"Stage a package for publishing, deferring 2FA to a later approval",subcommands:[{name:"publish",description:"Stage a package for publishing",args:{name:"package-spec",isOptional:!0,template:["folders"]},options:[{name:"--tag",description:"Registers the staged package with the given tag",args:{name:"tag"}}]},{name:"list",description:"List all staged package versions",args:{name:"package-spec",isOptional:!0}},{name:"view",description:"View details of a specific staged package",args:{name:"stage-id"}},{name:"approve",description:"Approve a staged package for publishing",args:{name:"stage-id"}},{name:"reject",description:"Reject a staged package",args:{name:"stage-id"}},{name:"download",description:"Download the tarball of a staged package for inspection",args:{name:"stage-id"}}]},{name:"star",description:"Mark your favorite packages",deprecated:!0,args:{name:"pkg",description:"Package to mark as favorite"},options:[e,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:"stars",description:"View packages marked as favorites",deprecated:!0,args:{name:"user",isOptional:!0,description:"View packages marked as favorites by <user>"},options:[e]},{name:"start",description:"Start a package",options:[d,y,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[d,y,{name:"--",args:{name:"arg",description:"Arguments to be passed to the stop script"}}]},{name:"team",description:"Manage organization teams and team memberships",subcommands:[{name:"create",args:{name:"scope:team"},options:[e,s]},{name:"destroy",args:{name:"scope:team"},options:[e,s]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[e,s]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[e,s]},{name:"ls",args:{name:"scope|scope:team"},options:[e,t,f]}]},{name:["test","tst","t"],description:"Test a package",options:[d,y]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[t,f]},{name:"create",description:"Create a new authentication token",options:[{name:"--read-only",description:"This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command"},{name:"--cidr",description:"This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command",isRepeatable:!0,args:{name:"cidr"}}]},{name:"revoke",description:"Immediately removes an authentication token from the registry. You will no longer be able to use it",args:{name:"idtoken"}}],options:[e,s]},{name:"trust",description:"Create a trusted relationship between a package and an OIDC provider",subcommands:[{name:"github",description:"Create a trusted relationship between a package and GitHub Actions",args:{name:"package",isOptional:!0},options:[...I,{name:"--file",description:"Name of the workflow file within the repository's .github folder (must end in yaml or yml)",isRequired:!0,args:{name:"file"}},{name:["--repository","--repo"],description:"Name of the repository in the format owner/repo",args:{name:"repository"}},{name:["--environment","--env"],description:"CI environment name",args:{name:"environment"}}]},{name:"gitlab",description:"Create a trusted relationship between a package and GitLab CI/CD",args:{name:"package",isOptional:!0},options:[...I,{name:"--file",description:"Name of the pipeline file (e.g. .gitlab-ci.yml)",isRequired:!0,args:{name:"file"}},{name:"--project",description:"Name of the project in the format group/project or group/subgroup/project",args:{name:"project"}},{name:["--environment","--env"],description:"CI environment name",args:{name:"environment"}}]},{name:"circleci",description:"Create a trusted relationship between a package and CircleCI",args:{name:"package",isOptional:!0},options:[...I,{name:"--org-id",description:"CircleCI organization UUID",isRequired:!0,args:{name:"org-id"}},{name:"--project-id",description:"CircleCI project UUID",isRequired:!0,args:{name:"project-id"}},{name:"--pipeline-definition-id",description:"CircleCI pipeline definition UUID",isRequired:!0,args:{name:"pipeline-definition-id"}},{name:"--vcs-origin",description:"CircleCI repository origin in the format provider/owner/repo",isRequired:!0,args:{name:"vcs-origin"}},{name:"--context-id",description:"CircleCI context UUID to match",isRepeatable:!0,args:{name:"context-id"}}]},{name:"list",description:"List trusted relationships for a package",args:{name:"package",isOptional:!0}},{name:"revoke",description:"Revoke a trusted relationship for a package",args:{name:"package",isOptional:!0},options:[{name:"--id",description:"ID of the trusted relationship to revoke",args:{name:"trust-id"}}]}]},{name:"undeprecate",description:"Undeprecate a version of a package",args:{name:"package-spec"},options:[e,s,g]},v("uninstall"),v(["r","rm"]),v("un"),v("remove"),v("unlink"),{name:"unpublish",description:"Remove a package from the registry",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[g,{name:["-f","--force"],description:"Allow unpublishing all versions of a published package. Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...n]},{name:"unstar",description:"Remove an item from your favorite packages",deprecated:!0,args:{name:"pkg",description:"Package to unmark as favorite"},options:[e,s,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:["update","upgrade","up","u"],description:"Update a package",options:[{name:"-g",description:"Update global package"},S,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder",deprecated:!0},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package",deprecated:!0},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},h,d,R,V,{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},{name:"--save",description:"Update the semver values of direct dependencies in your project package.json"},g,...n]},{name:"version",description:"Bump a package version",options:[...n,t,{name:"--allow-same-version",description:"Prevents throwing an error when npm version is used to set the new version to the same value as the current version"},{name:"--no-commit-hooks",description:"Do not run git commit hooks when using the npm version command"},{name:"--no-git-tag-version",description:"Do not tag the commit when using the npm version command"},{name:"--preid",description:'The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the rc in 1.2.0-rc.8',args:{name:"prerelease-id"}},{name:"--sign-git-tag",description:"If set to true, then the npm version command will tag the version using -s to add a signature"}]},{name:["view","v","info","show"],description:"View registry info",options:[...n,t]},{name:"whoami",description:"Display npm username",options:[e]}]};var E={name:"nr",description:"Use the right package manager - run",options:[{name:["-h","--help"],description:"Output usage information"}],args:{name:"script",description:"The script to run",filterStrategy:"fuzzy",generators:P},additionalSuggestions:[{name:"-",insertValue:`-
|
|
3
|
+
`,description:"Run the last command",type:"shortcut"}]},H=E;export{H as default};
|
package/build/nrm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
`).map(p=>({name:p,icon:"\u{1F4E6}",description:"Global dependency"}))}}},V={cache:{strategy:"stale-while-revalidate",cacheByDirectory:!0},script:["bash","-c","until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"],postProcess:function(n,[s]){if(n.trim()=="")return[];try{let c=JSON.parse(n),p=c.scripts,t=c.fig||{};if(p)return Object.entries(p).map(([r,h])=>{let g=s==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",d=t[r];return{name:r,icon:g,description:h,priority:51,...d}})}catch(c){console.error(c)}return[]}},O={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},o={name:"--json",description:"Show output in json format"},b={name:"--omit",description:"Dependency types to omit from the installation tree on disk",args:{name:"Package type",default:"dev",suggestions:["dev","optional","peer"]},isRepeatable:3},u={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},S={name:["-l","--long"],description:"Show extended information"},a=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:I,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],A=[{name:["-S","--save"],description:"Package will be removed from your dependencies"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:"-g",description:"Uninstall global package"},...a],z=[{name:["-a","-all"],description:"Show all outdated or installed packages"},o,S,u,{name:"--depth",description:"The depth to go when recursing packages",args:{name:"depth"}},{name:"--link",description:"Limits output to only those packages that are linked"},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--no-unicode",description:"Uses unicode characters in the tree output"},O,b,...a],e={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},R={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},i={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},l={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},k={name:"--script-shell",description:"The shell to use for scripts run with the npm exec, npm run and npm init <pkg> commands",args:{name:"script-shell"}},f={name:"--dry-run",description:"Indicates that you don't want npm to make any changes and that it should only report what it would have done"},G={name:"npm",parserDirectives:{flagsArePosixNoncompliant:!0},description:"Node package manager",subcommands:[{name:["install","i","add"],description:"Install a package and its dependencies",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[{name:["-P","--save-prod"],description:"Package will appear in your `dependencies`. This is the default unless `-D` or `-O` are present"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:["-E","--save-exact"],description:"Saved dependencies will be configured with an exact version rather than using npm's default semver range operator"},{name:["-B","--save-bundle"],description:"Saved dependencies will also be added to your bundleDependencies list"},O,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder"},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package"},{name:"--legacy-peer-deps",description:"Bypass peerDependency auto-installation. Emulate install behavior of NPM v4 through v6"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},e,R,b,l,{name:"--no-audit",description:"Submit audit reports alongside the current npm command to the default registry and all registries configured for scopes"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},f,...a]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...a,{name:"--if-present",description:"Npm will not exit with an error code when run-script is invoked for a script that isn't defined in the scripts section of package.json"},{name:"--silent",description:""},l,k,{name:"--",args:{name:"args",isVariadic:!0}}],args:{name:"script",description:"Script to run from your package.json",filterStrategy:"fuzzy",generators:V}},{name:"init",description:"Trigger the initialization",options:[{name:["-y","--yes"],description:"Automatically answer 'yes' to any prompts that npm might print on the command line"},{name:"-w",description:"Create the folders and boilerplate expected while also adding a reference to your project workspaces property",args:{name:"dir"}}]},{name:"access",description:"Set access controls on private packages"},{name:["adduser","login"],description:"Add a registry user account",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:"audit",description:"Run a security audit",subcommands:[{name:"fix",description:"If the fix argument is provided, then remediations will be applied to the package tree",options:[f,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...a]}],options:[...a,{name:"--audit-level",description:"The minimum level of vulnerability for npm audit to exit with a non-zero exit code",args:{name:"audit",suggestions:["info","low","moderate","high","critical","none"]}},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},o,b]},{name:"bin",description:"Print the folder where npm will install executables",options:[O]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm bugs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]},e]},{name:"cache",description:"Manipulates packages cache",subcommands:[{name:"add",description:"Add the specified packages to the local cache"},{name:"clean",description:"Delete all data out of the cache folder"},{name:"verify",description:"Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data"}],options:[{name:"--cache",args:{name:"cache"},description:"The location of npm's cache directory"}]},{name:["ci","clean-install","install-clean"],description:"Install a project with a clean slate",options:[{name:"--audit",description:'When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes',args:{name:"audit",suggestions:["true","false"]},exclusiveOn:["--no-audit"]},{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command",exclusiveOn:["--audit"]},l,k,R,e]},{name:"cit",description:"Install a project with a clean slate and run tests"},{name:"clean-install-test",description:"Install a project with a clean slate and run tests"},{name:"completion",description:"Tab completion for npm"},{name:["config","c"],description:"Manage the npm configuration files",subcommands:[{name:"set",description:"Sets the config key to the value",args:[{name:"key"},{name:"value"}],options:[{name:["-g","--global"],description:"Sets it globally"}]},{name:"get",description:"Echo the config value to stdout",args:{name:"key"}},{name:"list",description:"Show all the config settings",options:[{name:"-g",description:"Lists globally installed packages"},{name:"-l",description:"Also shows defaults"},o]},{name:"delete",description:"Deletes the key from all configuration files",args:{name:"key"}},{name:"edit",description:"Opens the config file in an editor",options:[{name:"--global",description:"Edits the global config"}]}]},{name:"create",description:"Create a package.json file"},{name:["dedupe","ddp"],description:"Reduce duplication in the package tree"},{name:"deprecate",description:"Deprecate a version of a package",options:[e]},{name:"dist-tag",description:"Modify package distribution tags"},{name:["docs","home"],description:"Open documentation for a package in a web browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[...a,e,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm docs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"doctor",description:"Check your npm environment",options:[e]},{name:"edit",description:"Edit an installed package",options:[{name:"--editor",description:"The command to run for npm edit or npm config edit"}]},{name:"explore",description:"Browse an installed package",args:{name:"package",filterStrategy:"fuzzy",generators:x}},{name:"fund",description:"Retrieve funding information"},{name:"get",description:"Echo the config value to stdout"},{name:"help",description:"Get help on npm",args:{name:"term",isVariadic:!0,description:"Terms to search for"},options:[{name:"--viewer",description:"The program to use to view help content",args:{name:"viewer"}}]},{name:"help-search",description:"Search npm help documentation",args:{name:"text",description:"Text to search for"},options:[S]},{name:"hook",description:"Manage registry hooks"},{name:"install-ci-test",description:"Install a project with a clean slate and run tests"},{name:"install-test",description:"Install package(s) and run tests"},{name:"it",description:"Install package(s) and run tests"},{name:"link",description:"Symlink a package folder",args:{name:"path",template:"filepaths"}},{name:"ln",description:"Symlink a package folder"},{name:"logout",description:"Log out of the registry",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:["ls","list"],description:"List installed packages",options:z,args:{name:"[@scope]/pkg",isVariadic:!0}},{name:"org",description:"Manage orgs",subcommands:[{name:"set",description:"Add a user to an org or manage roles",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"},{name:"role",isOptional:!0,suggestions:["developer","admin","owner"]}],options:[e,i]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[e,i]},{name:"ls",description:"List users in an org or see what roles a particular user has in an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name",isOptional:!0}],options:[e,i,o,u]}]},{name:"outdated",description:"Check for outdated packages",args:{name:"[<@scope>/]<pkg>",isVariadic:!0,isOptional:!0},options:[{name:["-a","-all"],description:"Show all outdated or installed packages"},o,S,u,{name:"-g",description:"Checks globally"},...a]},{name:["owner","author"],description:"Manage package owners",subcommands:[{name:"ls",description:"List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help",args:{name:"[@scope/]pkg"},options:[e]},{name:"add",description:"Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,i]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,i]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[o,f,...a,{name:"--pack-destination",description:"Directory in which npm pack will save tarballs",args:{name:"pack-destination",template:["folders"]}}]},{name:"ping",description:"Ping npm registry",options:[e]},{name:"pkg",description:"Manages your package.json",subcommands:[{name:"get",description:"Retrieves a value key, defined in your package.json file. It is possible to get multiple values and values for child fields",args:{name:"field",description:"Name of the field to get. You can view child fields by separating them with a period",isVariadic:!0},options:[o,...a]},{name:"set",description:"Sets a value in your package.json based on the field value. It is possible to set multiple values and values for child fields",args:{name:"field",description:"Name of the field to set. You can set child fields by separating them with a period",isVariadic:!0},options:[o,...a,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"delete",description:"Deletes a key from your package.json",args:{name:"key",description:"Name of the key to delete. You can delete child fields by separating them with a period",isVariadic:!0},options:[...a,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]}]},{name:"prefix",description:"Display prefix",options:[{name:["-g","--global"],description:"Print the global prefix to standard out"}]},{name:"profile",description:"Change settings on your registry profile",subcommands:[{name:"get",description:"Display all of the properties of your profile, or one or more specific properties",args:{name:"property",isOptional:!0,description:"Property name"},options:[e,o,u,i]},{name:"set",description:"Set the value of a profile property",args:[{name:"property",description:"Property name",suggestions:["email","fullname","homepage","freenode","twitter","github"]},{name:"value",description:"Property value"}],options:[e,o,u,i],subcommands:[{name:"password",description:"Change your password. This is interactive, you'll be prompted for your current password and a new password"}]},{name:"enable-2fa",description:"Enables two-factor authentication",args:{name:"mode",description:"Mode for two-factor authentication. Defaults to auth-and-writes mode",isOptional:!0,suggestions:[{name:"auth-only",description:"Require an OTP when logging in or making changes to your account's authentication"},{name:"auth-and-writes",description:"Requires an OTP at all the times auth-only does, and also requires one when publishing a module, setting the latest dist-tag, or changing access via npm access and npm owner"}]},options:[e,i]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[e,i]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[b,f,o,{name:"--production",description:"Remove the packages specified in your devDependencies"},...a]},{name:"publish",description:"Publish a package",args:{name:"tarball|folder",isOptional:!0,description:"A url or file path to a gzipped tar archive containing a single folder with a package.json file inside | A folder containing a package.json file",template:["folders"]},options:[{name:"--tag",description:"Registers the published package with the given tag",args:{name:"tag"}},...a,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},f,i]},{name:["rebuild","rb"],description:"Rebuild a package",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[O,...a,l,{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"}]},{name:"repo",description:"Open package repository page in the browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[...a,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm repo command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"restart",description:"Restart a package",options:[l,k,{name:"--",args:{name:"arg",description:"Arguments to be passed to the restart script"}}]},{name:"root",description:"Display npm root",options:[{name:["-g","--global"],description:"Print the effective global node_modules folder to standard out"}]},{name:["search","s","se","find"],description:"Search for packages",args:{name:"search terms",isVariadic:!0},options:[S,o,{name:"--color",description:"Show colors",args:{name:"always",suggestions:["always"],description:"Always show colors"},exclusiveOn:["--no-color"]},{name:"--no-color",description:"Do not show colors",exclusiveOn:["--color"]},u,{name:"--no-description",description:"Do not show descriptions"},{name:"--searchopts",description:"Space-separated options that are always passed to search",args:{name:"searchopts"}},{name:"--searchexclude",description:"Space-separated options that limit the results from search",args:{name:"searchexclude"}},e,{name:"--prefer-online",description:"If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data",exclusiveOn:["--prefer-offline","--offline"]},{name:"--prefer-offline",description:"If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server",exclusiveOn:["--prefer-online","--offline"]},{name:"--offline",description:"Force offline mode: no network requests will be done during install",exclusiveOn:["--prefer-online","--prefer-offline"]}]},{name:"set",description:"Sets the config key to the value"},{name:"set-script",description:"Set tasks in the scripts section of package.json",args:[{name:"script",description:"Name of the task to be added to the scripts section of package.json"},{name:"command",description:"Command to run when script is called"}],options:a},{name:"shrinkwrap",description:"Lock down dependency versions for publication"},{name:"star",description:"Mark your favorite packages",args:{name:"pkg",description:"Package to mark as favorite"},options:[e,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:"stars",description:"View packages marked as favorites",args:{name:"user",isOptional:!0,description:"View packages marked as favorites by <user>"},options:[e]},{name:"start",description:"Start a package",options:[l,k,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[l,k,{name:"--",args:{name:"arg",description:"Arguments to be passed to the stop script"}}]},{name:"team",description:"Manage organization teams and team memberships",subcommands:[{name:"create",args:{name:"scope:team"},options:[e,i]},{name:"destroy",args:{name:"scope:team"},options:[e,i]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[e,i]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[e,i]},{name:"ls",args:{name:"scope|scope:team"},options:[e,o,u]}]},{name:["test","tst","t"],description:"Test a package",options:[l,k]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[o,u]},{name:"create",description:"Create a new authentication token",options:[{name:"--read-only",description:"This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command"},{name:"--cidr",description:"This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command",isRepeatable:!0,args:{name:"cidr"}}]},{name:"revoke",description:"Immediately removes an authentication token from the registry. You will no longer be able to use it",args:{name:"idtoken"}}],options:[e,i]},y("uninstall"),y(["r","rm"]),y("un"),y("remove"),y("unlink"),{name:"unpublish",description:"Remove a package from the registry",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[f,{name:["-f","--force"],description:"Allow unpublishing all versions of a published package. Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...a]},{name:"unstar",description:"Remove an item from your favorite packages",args:{name:"pkg",description:"Package to unmark as favorite"},options:[e,i,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:["update","upgrade","up"],description:"Update a package",options:[{name:"-g",description:"Update global package"},{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder"},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},b,l,{name:"--no-audit",description:"Submit audit reports alongside the current npm command to the default registry and all registries configured for scopes"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},{name:"--save",description:"Update the semver values of direct dependencies in your project package.json"},f,...a]},{name:"version",description:"Bump a package version",options:[...a,o,{name:"--allow-same-version",description:"Prevents throwing an error when npm version is used to set the new version to the same value as the current version"},{name:"--no-commit-hooks",description:"Do not run git commit hooks when using the npm version command"},{name:"--no-git-tag-version",description:"Do not tag the commit when using the npm version command"},{name:"--preid",description:'The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the rc in 1.2.0-rc.8',args:{name:"prerelease-id"}},{name:"--sign-git-tag",description:"If set to true, then the npm version command will tag the version using -s to add a signature"}]},{name:["view","v","info","show"],description:"View registry info",options:[...a,o]},{name:"whoami",description:"Display npm username",options:[e]}]};var U={name:"nrm",description:"Use the right package manage - remove",options:[{name:"-g",description:"Operates in 'global' mode, so that packages are removed from the prefix folder instead of the current working directory"},{name:"-D",description:"Package will be removed from your `devDependencies`"},{name:"-P",description:"Remove package from your `peerDependencies`"},{name:"-O",description:"Remove package from your `optionalDependencies`"},{name:"--frozen",description:"Don't generate a lockfile and fail if an update is needed"},{name:["-h","--help"],description:"Output usage information"}],args:{name:"package",filterStrategy:"fuzzy",generators:x,isVariadic:!0}},E=U;export{E as default};
|
|
1
|
+
function O(a){return{name:a,description:"Uninstall a package",args:{name:"package",generators:y,filterStrategy:"fuzzy",isVariadic:!0},options:M}}var F=a=>(a.match(/@/g)||[]).length,q=a=>async(o,p,c)=>{let i=o[o.length-1];if(i==="")return[];let r=a&&a.length>0?`+keywords:${a.join(",")}`:"",u=["-s","-H","Accept: application/json",r?`https://api.npms.io/v2/search?size=20&q=${i}${r}`:`https://api.npms.io/v2/search/suggestions?q=${i}&size=20`],l=["-s","-H","Accept: application/vnd.npm.install-v1+json",`https://registry.npmjs.org/${i.slice(0,-1)}`],P=m=>p({command:"curl",args:m[m.length-1]==="@"?l:u}),j=i.startsWith("@")?F(i)>1:i.includes("@");try{let m=JSON.parse((await P(i)).stdout);if(j){let v=Object.entries(m["dist-tags"]||{}).map(([C,U])=>({name:C,description:U}));return v.push(...Object.keys(m.versions).map(C=>({name:C})).reverse()),v}return(r?m.results:m).map(v=>({name:v.package.name,description:v.package.description}))}catch(m){return console.error({error:m}),[]}},x={trigger:(a,o)=>o.startsWith("@")?!(F(o)>1&&F(a)>1):!(o.includes("@")&&a.includes("@")),getQueryTerm:"@",cache:{ttl:1e3*60*60*24*2},custom:q()},z={custom:async(a,o)=>{let{stdout:p}=await o({command:"npm",args:["prefix"]}),{stdout:c}=await o({command:"cat",args:[`${p}/package.json`]}),i=[];try{if(c.trim()=="")return i;let k=JSON.parse(c).workspaces;if(k)for(let u of k)i.push({name:u,description:"Workspaces"})}catch(r){console.log(r)}return i}},y={trigger:a=>a==="-g"||a==="--global",custom:async function(a,o){if(!a.includes("-g")&&!a.includes("--global")){let{stdout:p}=await o({command:"npm",args:["prefix"]}),{stdout:c}=await o({command:"cat",args:[`${p}/package.json`]}),i=JSON.parse(c),r=i.dependencies??{},k=i.devDependencies,u=i.optionalDependencies??{};return Object.assign(r,k,u),Object.keys(r).filter(l=>!a.some(j=>j===l)).map(l=>({name:l,icon:"\u{1F4E6}",description:r[l]?"dependency":u[l]?"optionalDependency":"devDependency"}))}else{let{stdout:p}=await o({command:"bash",args:["-c","ls -1 `npm root -g`"]});return p.split(`
|
|
2
|
+
`).map(c=>({name:c,icon:"\u{1F4E6}",description:"Global dependency"}))}}},G={cache:{strategy:"stale-while-revalidate",cacheByDirectory:!0},script:["bash","-c","until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"],postProcess:function(a,[o]){if(a.trim()=="")return[];try{let p=JSON.parse(a),c=p.scripts,i=p.fig||{};if(c)return Object.entries(c).map(([r,k])=>{let u=o==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",l=i[r];return{name:r,icon:u,description:k,priority:51,...l}})}catch(p){console.error(p)}return[]}},w={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},t={name:"--json",description:"Show output in json format"},h={name:"--omit",description:"Dependency types to omit from the installation tree on disk",args:{name:"Package type",default:"dev",suggestions:["dev","optional","peer"]},isRepeatable:3},f={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},D={name:["-l","--long"],description:"Show extended information"},n=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:z,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],M=[{name:["-S","--save"],description:"Package will be removed from your dependencies"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:"-g",description:"Uninstall global package"},...n],N=[{name:["-a","--all"],description:"Show all outdated or installed packages"},t,D,f,{name:"--depth",description:"The depth to go when recursing packages",args:{name:"depth"}},{name:"--link",description:"Limits output to only those packages that are linked"},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--no-unicode",description:"Uses unicode characters in the tree output"},w,h,...n],e={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},A={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},s={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},d={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},b={name:"--script-shell",description:"The shell to use for scripts run with the npm exec, npm run and npm init <pkg> commands",args:{name:"script-shell"}},g={name:"--dry-run",description:"Indicates that you don't want npm to make any changes and that it should only report what it would have done"},S={name:"--install-strategy",description:"Sets the strategy for installing packages in node_modules",args:{name:"strategy",default:"hoisted",suggestions:["hoisted","nested","shallow","linked"]}},V={name:"--install-links",description:"Install file: protocol dependencies outside the project root as regular dependencies instead of creating a symlink"},R={name:"--foreground-scripts",description:"Run all build scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process"},T={name:"--allow-git",description:"Limits the ability for npm to install git dependencies",args:{name:"allow-git",suggestions:["all","none","root"]}},L={name:"--allow-remote",description:"Limits the ability for npm to install user-supplied tarball URL dependencies",args:{name:"allow-remote",suggestions:["all","none","root"]}},I=[{name:"--allow-publish",description:"Allows the trusted publisher to run npm publish for the package"},{name:["--allow-stage-publish","--allow-staged-publish"],description:"Allows the trusted publisher to run npm stage for the package"}],_={name:"npm",parserDirectives:{flagsArePosixNoncompliant:!0},description:"Node package manager",subcommands:[{name:["install","i","add"],description:"Install a package and its dependencies",args:{name:"package",isOptional:!0,generators:x,debounce:!0,isVariadic:!0},options:[{name:["-P","--save-prod"],description:"Package will appear in your `dependencies`. This is the default unless `-D` or `-O` are present"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:["-E","--save-exact"],description:"Saved dependencies will be configured with an exact version rather than using npm's default semver range operator"},{name:["-B","--save-bundle"],description:"Saved dependencies will also be added to your bundleDependencies list"},w,S,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder",deprecated:!0},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package",deprecated:!0},{name:"--legacy-peer-deps",description:"Bypass peerDependency auto-installation. Emulate install behavior of NPM v4 through v6"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},e,A,h,d,R,T,L,V,{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},g,...n]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...n,{name:"--if-present",description:"Npm will not exit with an error code when run-script is invoked for a script that isn't defined in the scripts section of package.json"},{name:"--silent",description:""},d,b,{name:"--",args:{name:"args",isVariadic:!0}}],args:{name:"script",description:"Script to run from your package.json",filterStrategy:"fuzzy",generators:G}},{name:"init",description:"Trigger the initialization",options:[{name:["-y","--yes"],description:"Automatically answer 'yes' to any prompts that npm might print on the command line"},{name:"-w",description:"Create the folders and boilerplate expected while also adding a reference to your project workspaces property",args:{name:"dir"}},{name:"--init-private",description:"Set the private field to true in package.json"},{name:"--scope",description:"Create a scoped package",args:{name:"scope",description:"Scope name"}}]},{name:"access",description:"Set access level on published packages",subcommands:[{name:"list",description:"List packages or collaborators",subcommands:[{name:"packages",description:"List all packages accessible by a user, scope or team",args:[{name:"user|scope|scope:team",isOptional:!0},{name:"package",isOptional:!0}]},{name:"collaborators",description:"List all users with access to a package",args:[{name:"package",isOptional:!0},{name:"user",isOptional:!0}]}]},{name:"get",description:"Get the access status of a package",subcommands:[{name:"status",description:"Get the visibility status of a package",args:{name:"package",isOptional:!0}}]},{name:"set",description:"Set the visibility status or publishing MFA requirement of a package",args:[{name:"status|mfa",suggestions:["status=public","status=private","mfa=none","mfa=publish","mfa=automation"]},{name:"package",isOptional:!0}]},{name:"grant",description:"Grant a team read-only or read-write access to a package",args:[{name:"permissions",suggestions:["read-only","read-write"]},{name:"scope:team"},{name:"package",isOptional:!0}]},{name:"revoke",description:"Revoke a team's access to a package",args:[{name:"scope:team"},{name:"package",isOptional:!0}]}],options:[t,s,e]},{name:"adduser",description:"Add a registry user account",deprecated:!0,options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:"login",description:"Login to a registry user account",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}},{name:"--auth-type",description:"What authentication strategy to use with login",args:{name:"auth-type",default:"web",suggestions:["legacy","web"]}}]},{name:"audit",description:"Run a security audit",subcommands:[{name:"signatures",description:"Verify registry signatures and provenance attestations of downloaded packages",options:[t,{name:"--include-attestations",description:"Include full sigstore attestation bundles in the JSON output"}]},{name:"fix",description:"If the fix argument is provided, then remediations will be applied to the package tree",options:[g,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...n]}],options:[...n,{name:"--audit-level",description:"The minimum level of vulnerability for npm audit to exit with a non-zero exit code",args:{name:"audit",suggestions:["info","low","moderate","high","critical","none"]}},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},t,h]},{name:"bin",description:"Print the folder where npm will install executables",deprecated:!0,options:[w]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:x,debounce:!0,isVariadic:!0},options:[{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm bugs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]},e]},{name:"cache",description:"Manipulates packages and npx cache",subcommands:[{name:"add",description:"Add the specified packages to the local cache"},{name:"clean",description:"Delete a single entry or all entries out of the cache folder",args:{name:"key",isOptional:!0}},{name:"ls",description:"List given entries or all entries in the local cache",args:{name:"name@version",isOptional:!0,isVariadic:!0}},{name:"verify",description:"Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data"},{name:"npx",description:"Manipulates the npx cache",subcommands:[{name:"ls",description:"List all entries in the npx cache"},{name:"rm",description:"Remove given entries or all entries from the npx cache",args:{name:"key",isOptional:!0,isVariadic:!0}},{name:"info",description:"Get detailed information about given entries in the npx cache",args:{name:"key",isVariadic:!0}}]}],options:[{name:"--cache",args:{name:"cache"},description:"The location of npm's cache directory"}]},{name:["ci","clean-install","install-clean"],description:"Install a project with a clean slate",options:[{name:"--audit",description:'When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes',args:{name:"audit",suggestions:["true","false"]},exclusiveOn:["--no-audit"]},{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command",exclusiveOn:["--audit"]},d,b,A,e,S,h,R,T,L]},{name:"cit",description:"Install a project with a clean slate and run tests"},{name:"clean-install-test",description:"Install a project with a clean slate and run tests"},{name:"completion",description:"Tab completion for npm"},{name:["config","c"],description:"Manage the npm configuration files",subcommands:[{name:"set",description:"Sets the config key to the value",args:[{name:"key"},{name:"value"}],options:[{name:["-g","--global"],description:"Sets it globally"}]},{name:"get",description:"Echo the config value to stdout",args:{name:"key"}},{name:"list",description:"Show all the config settings",options:[{name:"-g",description:"Lists globally installed packages"},{name:"-l",description:"Also shows defaults"},t]},{name:"delete",description:"Deletes the key from all configuration files",args:{name:"key"}},{name:"edit",description:"Opens the config file in an editor",options:[{name:"--global",description:"Edits the global config"}]},{name:"fix",description:"Attempts to repair invalid configuration items, such as attaching authentication configuration to the configured registry"}]},{name:"create",description:"Create a package.json file"},{name:["dedupe","ddp"],description:"Reduce duplication in the package tree"},{name:"deprecate",description:"Deprecate a version of a package",options:[e]},{name:"diff",description:"The registry diff command",args:{name:"paths",isOptional:!0,isVariadic:!0,template:"filepaths"},options:[{name:"--diff",description:"Define arguments to compare in npm diff",isRepeatable:2,args:{name:"package-spec"}},{name:"--diff-name-only",description:"Prints only filenames when using npm diff"},{name:"--diff-unified",description:"The number of lines of context to print in npm diff",args:{name:"number",default:"3"}},{name:"--diff-ignore-all-space",description:"Ignore whitespace when comparing lines in npm diff"},{name:"--diff-no-prefix",description:"Do not show any source or destination prefix in npm diff output"},{name:"--diff-src-prefix",description:"Source prefix to be used in npm diff output",args:{name:"path",default:"a/"}},{name:"--diff-dst-prefix",description:"Destination prefix to be used in npm diff output",args:{name:"path",default:"b/"}},{name:"--diff-text",description:"Treat all files as text in npm diff"},w,{name:"--tag",description:"The tag used to fetch the tarball that will be compared with the local files",args:{name:"tag",default:"latest"}},...n]},{name:"dist-tag",description:"Modify package distribution tags"},{name:["docs","home"],description:"Open documentation for a package in a web browser",args:{name:"package",isOptional:!0,generators:x,debounce:!0,isVariadic:!0},options:[...n,e,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm docs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"doctor",description:"Check your npm environment",options:[e]},{name:"edit",description:"Edit an installed package",options:[{name:"--editor",description:"The command to run for npm edit or npm config edit"}]},{name:["exec","x"],description:"Run a command from a local or remote npm package",args:{name:"command",isOptional:!0,isVariadic:!0},options:[{name:"--package",description:"The package or packages to install for npm exec",isRepeatable:!0,args:{name:"package-spec",generators:x,debounce:!0}},{name:["-c","--call"],description:"Custom command to be run along with the installed packages",args:{name:"call"}},{name:["-y","--yes"],description:"Automatically answer 'yes' to the prompt to install missing packages",exclusiveOn:["--no"]},{name:"--no",description:"Automatically answer 'no' to the prompt to install missing packages",exclusiveOn:["-y","--yes"]},...n]},{name:["explain","why"],description:"Explain installed packages",args:{name:"package-spec",filterStrategy:"fuzzy",generators:y,isVariadic:!0},options:[t,...n]},{name:"explore",description:"Browse an installed package",args:{name:"package",filterStrategy:"fuzzy",generators:y}},{name:"find-dupes",description:"Find duplication in the package tree",options:[S,h,d,...n]},{name:"fund",description:"Retrieve funding information"},{name:"get",description:"Echo the config value to stdout"},{name:"help",description:"Get help on npm",args:{name:"term",isVariadic:!0,description:"Terms to search for"},options:[{name:"--viewer",description:"The program to use to view help content",args:{name:"viewer"}}]},{name:"help-search",description:"Search npm help documentation",args:{name:"text",description:"Text to search for"},options:[D]},{name:"hook",description:"Manage registry hooks",deprecated:!0},{name:"install-ci-test",description:"Install a project with a clean slate and run tests"},{name:"install-scripts",description:"Manage which dependencies are allowed to run install scripts",subcommands:[{name:"approve",description:"Approve install scripts for packages, pinned to their installed version",args:{name:"pkg",isOptional:!0,isVariadic:!0,generators:y},options:[{name:"--all",description:"Approve all currently-installed install scripts"}]},{name:"deny",description:"Deny install scripts for packages so they stay blocked",args:{name:"pkg",isOptional:!0,isVariadic:!0,generators:y},options:[{name:"--all",description:"Deny all currently-installed install scripts"}]},{name:"ls",description:"List packages whose install scripts still need review"},{name:"prune",description:"Remove stale allowScripts entries",options:[g]}]},{name:"install-test",description:"Install package(s) and run tests"},{name:"it",description:"Install package(s) and run tests"},{name:"link",description:"Symlink a package folder",args:{name:"path",template:"filepaths"}},{name:"ln",description:"Symlink a package folder"},{name:"logout",description:"Log out of the registry",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:["ls","list"],description:"List installed packages",options:N,args:{name:"[@scope]/pkg",isVariadic:!0}},{name:"org",description:"Manage orgs",subcommands:[{name:"set",description:"Add a user to an org or manage roles",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"},{name:"role",isOptional:!0,suggestions:["developer","admin","owner"]}],options:[e,s]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[e,s]},{name:"ls",description:"List users in an org or see what roles a particular user has in an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name",isOptional:!0}],options:[e,s,t,f]}]},{name:"outdated",description:"Check for outdated packages",args:{name:"[<@scope>/]<pkg>",isVariadic:!0,isOptional:!0},options:[{name:["-a","--all"],description:"Show all outdated or installed packages"},t,D,f,{name:"-g",description:"Checks globally"},...n]},{name:["owner","author"],description:"Manage package owners",subcommands:[{name:"ls",description:"List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help",args:{name:"[@scope/]pkg"},options:[e]},{name:"add",description:"Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,s]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,s]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[t,g,...n,{name:"--pack-destination",description:"Directory in which npm pack will save tarballs",args:{name:"pack-destination",template:["folders"]}}]},{name:"ping",description:"Ping npm registry",options:[e]},{name:"pkg",description:"Manages your package.json",subcommands:[{name:"get",description:"Retrieves a value key, defined in your package.json file. It is possible to get multiple values and values for child fields",args:{name:"field",description:"Name of the field to get. You can view child fields by separating them with a period",isVariadic:!0},options:[t,...n]},{name:"set",description:"Sets a value in your package.json based on the field value. It is possible to set multiple values and values for child fields",args:{name:"field",description:"Name of the field to set. You can set child fields by separating them with a period",isVariadic:!0},options:[t,...n,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"delete",description:"Deletes a key from your package.json",args:{name:"key",description:"Name of the key to delete. You can delete child fields by separating them with a period",isVariadic:!0},options:[...n,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"fix",description:"Auto corrects common errors in your package.json",options:n}]},{name:"prefix",description:"Display prefix",options:[{name:["-g","--global"],description:"Print the global prefix to standard out"}]},{name:"profile",description:"Change settings on your registry profile",subcommands:[{name:"get",description:"Display all of the properties of your profile, or one or more specific properties",args:{name:"property",isOptional:!0,description:"Property name"},options:[e,t,f,s]},{name:"set",description:"Set the value of a profile property",args:[{name:"property",description:"Property name",suggestions:["email","fullname","homepage","freenode","twitter","github"]},{name:"value",description:"Property value"}],options:[e,t,f,s],subcommands:[{name:"password",description:"Change your password. This is interactive, you'll be prompted for your current password and a new password"}]},{name:"enable-2fa",description:"Enables two-factor authentication",args:{name:"mode",description:"Mode for two-factor authentication. Defaults to auth-and-writes mode",isOptional:!0,suggestions:[{name:"auth-only",description:"Require an OTP when logging in or making changes to your account's authentication"},{name:"auth-and-writes",description:"Requires an OTP at all the times auth-only does, and also requires one when publishing a module, setting the latest dist-tag, or changing access via npm access and npm owner"}]},options:[e,s]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[e,s]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[h,g,t,{name:"--production",description:"Remove the packages specified in your devDependencies"},...n]},{name:"publish",description:"Publish a package",args:{name:"tarball|folder",isOptional:!0,description:"A url or file path to a gzipped tar archive containing a single folder with a package.json file inside | A folder containing a package.json file",template:["folders"]},options:[{name:"--tag",description:"Registers the published package with the given tag",args:{name:"tag"}},...n,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},g,s,{name:"--provenance",description:"When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from",exclusiveOn:["--provenance-file"]},{name:"--provenance-file",description:"When publishing, the provenance bundle at the given path will be used",args:{name:"file",template:"filepaths"},exclusiveOn:["--provenance"]}]},{name:"query",description:"Retrieve a filtered list of packages",args:{name:"selector",description:"Dependency selector, e.g. ':root > .prod'"},options:[w,...n,{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--expect-results",description:"Exit with an error code if the query has no results",exclusiveOn:["--no-expect-results","--expect-result-count"]},{name:"--no-expect-results",description:"Exit with an error code if the query has any results",exclusiveOn:["--expect-results","--expect-result-count"]},{name:"--expect-result-count",description:"Exit with an error code if the query does not return exactly this many results",args:{name:"count"},exclusiveOn:["--expect-results","--no-expect-results"]}]},{name:["rebuild","rb"],description:"Rebuild a package",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[w,...n,d,{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"}]},{name:"repo",description:"Open package repository page in the browser",args:{name:"package",isOptional:!0,generators:x,debounce:!0,isVariadic:!0},options:[...n,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm repo command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"restart",description:"Restart a package",options:[d,b,{name:"--",args:{name:"arg",description:"Arguments to be passed to the restart script"}}]},{name:"root",description:"Display npm root",options:[{name:["-g","--global"],description:"Print the effective global node_modules folder to standard out"}]},{name:"sbom",description:"Generate a Software Bill of Materials (SBOM)",options:[h,{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--sbom-format",description:"SBOM format to use when generating SBOMs",args:{name:"format",suggestions:["cyclonedx","spdx"]}},...n]},{name:["search","s","se","find"],description:"Search for packages",args:{name:"search terms",isVariadic:!0},options:[D,t,{name:"--color",description:"Show colors",args:{name:"always",suggestions:["always"],description:"Always show colors"},exclusiveOn:["--no-color"]},{name:"--no-color",description:"Do not show colors",exclusiveOn:["--color"]},f,{name:"--no-description",description:"Do not show descriptions"},{name:"--searchopts",description:"Space-separated options that are always passed to search",args:{name:"searchopts"}},{name:"--searchexclude",description:"Space-separated options that limit the results from search",args:{name:"searchexclude"}},e,{name:"--prefer-online",description:"If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data",exclusiveOn:["--prefer-offline","--offline"]},{name:"--prefer-offline",description:"If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server",exclusiveOn:["--prefer-online","--offline"]},{name:"--offline",description:"Force offline mode: no network requests will be done during install",exclusiveOn:["--prefer-online","--prefer-offline"]}]},{name:"set",description:"Sets the config key to the value"},{name:"set-script",description:"Set tasks in the scripts section of package.json",deprecated:!0,args:[{name:"script",description:"Name of the task to be added to the scripts section of package.json"},{name:"command",description:"Command to run when script is called"}],options:n},{name:"shrinkwrap",description:"Lock down dependency versions for publication",deprecated:!0},{name:"stage",description:"Stage a package for publishing, deferring 2FA to a later approval",subcommands:[{name:"publish",description:"Stage a package for publishing",args:{name:"package-spec",isOptional:!0,template:["folders"]},options:[{name:"--tag",description:"Registers the staged package with the given tag",args:{name:"tag"}}]},{name:"list",description:"List all staged package versions",args:{name:"package-spec",isOptional:!0}},{name:"view",description:"View details of a specific staged package",args:{name:"stage-id"}},{name:"approve",description:"Approve a staged package for publishing",args:{name:"stage-id"}},{name:"reject",description:"Reject a staged package",args:{name:"stage-id"}},{name:"download",description:"Download the tarball of a staged package for inspection",args:{name:"stage-id"}}]},{name:"star",description:"Mark your favorite packages",deprecated:!0,args:{name:"pkg",description:"Package to mark as favorite"},options:[e,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:"stars",description:"View packages marked as favorites",deprecated:!0,args:{name:"user",isOptional:!0,description:"View packages marked as favorites by <user>"},options:[e]},{name:"start",description:"Start a package",options:[d,b,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[d,b,{name:"--",args:{name:"arg",description:"Arguments to be passed to the stop script"}}]},{name:"team",description:"Manage organization teams and team memberships",subcommands:[{name:"create",args:{name:"scope:team"},options:[e,s]},{name:"destroy",args:{name:"scope:team"},options:[e,s]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[e,s]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[e,s]},{name:"ls",args:{name:"scope|scope:team"},options:[e,t,f]}]},{name:["test","tst","t"],description:"Test a package",options:[d,b]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[t,f]},{name:"create",description:"Create a new authentication token",options:[{name:"--read-only",description:"This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command"},{name:"--cidr",description:"This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command",isRepeatable:!0,args:{name:"cidr"}}]},{name:"revoke",description:"Immediately removes an authentication token from the registry. You will no longer be able to use it",args:{name:"idtoken"}}],options:[e,s]},{name:"trust",description:"Create a trusted relationship between a package and an OIDC provider",subcommands:[{name:"github",description:"Create a trusted relationship between a package and GitHub Actions",args:{name:"package",isOptional:!0},options:[...I,{name:"--file",description:"Name of the workflow file within the repository's .github folder (must end in yaml or yml)",isRequired:!0,args:{name:"file"}},{name:["--repository","--repo"],description:"Name of the repository in the format owner/repo",args:{name:"repository"}},{name:["--environment","--env"],description:"CI environment name",args:{name:"environment"}}]},{name:"gitlab",description:"Create a trusted relationship between a package and GitLab CI/CD",args:{name:"package",isOptional:!0},options:[...I,{name:"--file",description:"Name of the pipeline file (e.g. .gitlab-ci.yml)",isRequired:!0,args:{name:"file"}},{name:"--project",description:"Name of the project in the format group/project or group/subgroup/project",args:{name:"project"}},{name:["--environment","--env"],description:"CI environment name",args:{name:"environment"}}]},{name:"circleci",description:"Create a trusted relationship between a package and CircleCI",args:{name:"package",isOptional:!0},options:[...I,{name:"--org-id",description:"CircleCI organization UUID",isRequired:!0,args:{name:"org-id"}},{name:"--project-id",description:"CircleCI project UUID",isRequired:!0,args:{name:"project-id"}},{name:"--pipeline-definition-id",description:"CircleCI pipeline definition UUID",isRequired:!0,args:{name:"pipeline-definition-id"}},{name:"--vcs-origin",description:"CircleCI repository origin in the format provider/owner/repo",isRequired:!0,args:{name:"vcs-origin"}},{name:"--context-id",description:"CircleCI context UUID to match",isRepeatable:!0,args:{name:"context-id"}}]},{name:"list",description:"List trusted relationships for a package",args:{name:"package",isOptional:!0}},{name:"revoke",description:"Revoke a trusted relationship for a package",args:{name:"package",isOptional:!0},options:[{name:"--id",description:"ID of the trusted relationship to revoke",args:{name:"trust-id"}}]}]},{name:"undeprecate",description:"Undeprecate a version of a package",args:{name:"package-spec"},options:[e,s,g]},O("uninstall"),O(["r","rm"]),O("un"),O("remove"),O("unlink"),{name:"unpublish",description:"Remove a package from the registry",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[g,{name:["-f","--force"],description:"Allow unpublishing all versions of a published package. Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...n]},{name:"unstar",description:"Remove an item from your favorite packages",deprecated:!0,args:{name:"pkg",description:"Package to unmark as favorite"},options:[e,s,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:["update","upgrade","up","u"],description:"Update a package",options:[{name:"-g",description:"Update global package"},S,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder",deprecated:!0},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package",deprecated:!0},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},h,d,R,V,{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},{name:"--save",description:"Update the semver values of direct dependencies in your project package.json"},g,...n]},{name:"version",description:"Bump a package version",options:[...n,t,{name:"--allow-same-version",description:"Prevents throwing an error when npm version is used to set the new version to the same value as the current version"},{name:"--no-commit-hooks",description:"Do not run git commit hooks when using the npm version command"},{name:"--no-git-tag-version",description:"Do not tag the commit when using the npm version command"},{name:"--preid",description:'The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the rc in 1.2.0-rc.8',args:{name:"prerelease-id"}},{name:"--sign-git-tag",description:"If set to true, then the npm version command will tag the version using -s to add a signature"}]},{name:["view","v","info","show"],description:"View registry info",options:[...n,t]},{name:"whoami",description:"Display npm username",options:[e]}]};var E={name:"nrm",description:"Use the right package manage - remove",options:[{name:"-g",description:"Operates in 'global' mode, so that packages are removed from the prefix folder instead of the current working directory"},{name:"-D",description:"Package will be removed from your `devDependencies`"},{name:"-P",description:"Remove package from your `peerDependencies`"},{name:"-O",description:"Remove package from your `optionalDependencies`"},{name:"--frozen",description:"Don't generate a lockfile and fail if an update is needed"},{name:["-h","--help"],description:"Output usage information"}],args:{name:"package",filterStrategy:"fuzzy",generators:y,isVariadic:!0}},H=E;export{H as default};
|
package/build/opencode.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var ae=Object.create;var W=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var ce=Object.getOwnPropertyNames;var de=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),J=[];for(let L of re)if(L){let C=L.endsWith("/")?"folders":"filepaths";(C==="filepaths"&&d!=="only"||C==="folders"&&d!=="never")&&J.push({type:C==="filepaths"?"file":"folder",name:L,insertValue:L,isDangerous:y,context:{templateType:C}})}return w(h(J))}catch{return[]}})}}v.folders=Object.assign(()=>j({showFolders:"only"}),Object.freeze(j({showFolders:"only"})));v.filepaths=Object.assign(j,Object.freeze(j()))});var Q=I(A=>{"use strict";var R=A&&A.__awaiter||function(e,t,n,i){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(r){try{l(i.next(r))}catch(u){a(u)}}function d(r){try{l(i.throw(r))}catch(u){a(u)}}function l(r){r.done?o(r.value):s(r.value).then(c,d)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(A,"__esModule",{value:!0});A.keyValueList=A.keyValue=A.valueList=void 0;var z=new Map;function T(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function $(e,t,n){return R(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...n);return T(t,i)}if(typeof e[0]=="string"){let i=e.map(s=>({name:s}));return T(t,i)}return T(t,e)})}function E(e,t,n,i){return R(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let s=z.get(e);return s===void 0&&(s=yield $(e,t,i),z.set(e,s)),s}return $(e,t,i)})}function B(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function D(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function k(e,t){let n=new Set(e);return t.filter(i=>{var s;return typeof i.name=="string"?!n.has(i.name):!(!((s=i.name)===null||s===void 0)&&s.some(o=>n.has(o)))})}function Oe({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:i=!1,allowRepeatedValues:s=!1}){return{trigger:(o,a)=>o.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:o=>o.slice(o.lastIndexOf(e)+e.length),custom:(...o)=>R(this,void 0,void 0,function*(){var a;let c=yield E(t,i?e:"",n,o);if(s)return c;let[d]=o,l=(a=d[d.length-1])===null||a===void 0?void 0:a.split(e);return k(l,c)})}}A.valueList=Oe;function Se({separator:e="=",keys:t=[],values:n=[],cache:i=!1,insertSeparator:s=!0}){return{trigger:(o,a)=>o.indexOf(e)!==a.indexOf(e),getQueryTerm:o=>o.slice(o.indexOf(e)+1),custom:(...o)=>R(this,void 0,void 0,function*(){let[a]=o,d=!a[a.length-1].includes(e),l=d?t:n,r=B(d,i);return E(l,d&&s?e:"",r,o)})}}A.keyValue=Se;function we({separator:e="=",delimiter:t=",",keys:n=[],values:i=[],cache:s=!1,insertSeparator:o=!0,insertDelimiter:a=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:d=!0}){return{trigger:(l,r)=>{let u=D(l,e,t),h=D(r,e,t);return u!==h},getQueryTerm:l=>{let r=D(l,e,t);return l.slice(r+1)},custom:(...l)=>R(this,void 0,void 0,function*(){let[r]=l,u=r[r.length-1],h=D(u,e,t),w=h===-1||u.slice(h,h+e.length)!==e,m=w?n:i,f=B(w,s),p=yield E(m,w?o?e:"":a?t:"",f,l);if(w){if(c)return p;let S=u.split(t).map(g=>g.slice(0,g.indexOf(e)));return k(S,p)}if(d)return p;let y=u.split(t).map(S=>S.slice(S.indexOf(e)+e.length));return k(y,p)})}}A.keyValueList=we});var X=I(x=>{"use strict";var _e=x&&x.__awaiter||function(e,t,n,i){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(r){try{l(i.next(r))}catch(u){a(u)}}function d(r){try{l(i.throw(r))}catch(u){a(u)}}function l(r){r.done?o(r.value):s(r.value).then(c,d)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(x,"__esModule",{value:!0});x.ai=void 0;var Ae=4097,Pe=4,xe=.8,Ie=Ae*Pe*xe;function Re({name:e,prompt:t,message:n,postProcess:i,temperature:s,splitOn:o}){return{scriptTimeout:15e3,custom:(a,c,d)=>_e(this,void 0,void 0,function*(){var l,r;let u=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(u.stdout))return[];let h=typeof t=="function"?yield t({tokens:a,executeCommand:c,generatorContext:d}):t,w=typeof n=="function"?yield n({tokens:a,executeCommand:c,generatorContext:d}):n;if(w===null||w.length===0)return console.warn("No message provided to AI generator"),[];let m=Ie-((l=h?.length)!==null&&l!==void 0?l:0),f={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...h?[{role:"system",content:h}]:[],{role:"user",content:w.slice(0,m)}],temperature:s},O=JSON.stringify(f),p=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",O]}),y=JSON.parse(p.stdout);return(r=y?.choices.map(g=>{var _;return(_=g?.message)===null||_===void 0?void 0:_.content}).filter(g=>typeof g=="string").flatMap(g=>o?g.split(o).filter(_=>_.trim().length>0):[g]).map(g=>{if(i)return i(g);let _=g.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:_,insertValue:`'${_}'`,description:"Generated by Fig AI"}}))!==null&&r!==void 0?r:[]})}}x.ai=Re});var Z=I(b=>{"use strict";var Le=b&&b.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),Ce=b&&b.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Le(t,e,n)};Object.defineProperty(b,"__esModule",{value:!0});b.ai=b.folders=b.filepaths=void 0;var Y=K();Object.defineProperty(b,"filepaths",{enumerable:!0,get:function(){return Y.filepaths}});Object.defineProperty(b,"folders",{enumerable:!0,get:function(){return Y.folders}});Ce(Q(),b);var je=X();Object.defineProperty(b,"ai",{enumerable:!0,get:function(){return je.ai}})});var se=me(Z(),1),oe=[{name:"build",description:"Default agent with all tools enabled"},{name:"plan",description:"Read-only agent for planning and analysis"}],M=[{name:"--port",description:"Port to listen on",args:{name:"port",default:"0"}},{name:"--hostname",description:"Hostname to listen on",args:{name:"hostname",default:"127.0.0.1"}},{name:"--mdns",description:"Enable mDNS service discovery (defaults hostname to 0.0.0.0)"},{name:"--mdns-domain",description:"Custom domain name for mDNS service",args:{name:"domain",default:"opencode.local"}},{name:"--cors",description:"Additional domains to allow for CORS",isRepeatable:!0,args:{name:"domain"}}],V=[{name:["-c","--continue"],description:"Continue the last session"},{name:["-s","--session"],description:"Session id to continue",args:{name:"sessionID"}},{name:"--fork",description:"Fork the session when continuing (use with --continue or --session)"}],ee=[{name:"--mini",description:"Start the minimal interactive interface"},{name:"--no-replay",description:"Disable mini session history replay on resume and after resize"},{name:"--replay-limit",description:"Cap visible mini replay to the newest N messages",args:{name:"N"}}],te=[{name:["-p","--password"],description:"Basic auth password (defaults to OPENCODE_SERVER_PASSWORD)",args:{name:"password"}},{name:["-u","--username"],description:"Basic auth username (defaults to OPENCODE_SERVER_USERNAME or 'opencode')",args:{name:"username"}}],q={name:["-m","--model"],description:"Model to use in the format of provider/model",args:{name:"provider/model"}},ne={name:"--agent",description:"Agent to use",args:{name:"agent",suggestions:oe}},ie={name:"--auto",description:"Auto-approve permissions that are not explicitly denied (dangerous!)",isDangerous:!0},F=e=>({name:"name",description:"Name of the MCP server",isOptional:e}),De={name:"opencode",description:"The open source AI coding agent",args:{name:"project",description:"Path to start opencode in",isOptional:!0,template:"folders"},subcommands:[{name:"completion",description:"Generate shell completion script"},{name:"acp",description:"Start ACP (Agent Client Protocol) server",options:[...M,{name:"--cwd",description:"Working directory",args:{name:"dir",template:"folders"}}]},{name:"mcp",description:"Manage MCP (Model Context Protocol) servers",subcommands:[{name:"add",description:"Add an MCP server",args:F(!0),options:[{name:"--url",description:"URL for a remote MCP server",args:{name:"url"}},{name:"--env",description:"Environment variable for a local MCP server",isRepeatable:!0,args:{name:"KEY=VALUE"}},{name:"--header",description:"HTTP header for a remote MCP server",isRepeatable:!0,args:{name:"KEY=VALUE"}}]},{name:["list","ls"],description:"List MCP servers and their status"},{name:"auth",description:"Authenticate with an OAuth-enabled MCP server",args:F(!0),subcommands:[{name:["list","ls"],description:"List OAuth-capable MCP servers and their auth status"}]},{name:"logout",description:"Remove OAuth credentials for an MCP server",args:F(!0)},{name:"debug",description:"Debug OAuth connection for an MCP server",args:F(!1)}]},{name:"attach",description:"Attach to a running opencode server",args:{name:"url",description:"Server URL, e.g. http://localhost:4096"},options:[{name:"--dir",description:"Directory to run in",args:{name:"dir",template:"folders"}},...V,...te,...ee]},{name:"run",description:"Run opencode with a message",args:{name:"message",description:"Message to send",isOptional:!0,isVariadic:!0},options:[{name:"--command",description:"The command to run, use message for args",args:{name:"command"}},...V,q,ne,{name:"--format",description:"Output format: formatted text or raw JSON events",args:{name:"format",default:"default",suggestions:[{name:"default",description:"Formatted output"},{name:"json",description:"Raw JSON events"}]}},{name:["-f","--file"],description:"File(s) to attach to message",isRepeatable:!0,args:{name:"file",template:"filepaths"}},{name:"--title",description:"Title for the session (uses truncated prompt if no value provided)",args:{name:"title",isOptional:!0}},{name:"--attach",description:"Attach to a running opencode server",args:{name:"url",description:"E.g. http://localhost:4096"}},...te,{name:"--dir",description:"Directory to run in, path on remote server if attaching",args:{name:"dir",template:"folders"}},{name:"--port",description:"Port for the local server (defaults to random port if no value provided)",args:{name:"port",isOptional:!0}},{name:"--variant",description:"Model variant (provider-specific reasoning effort, e.g. high, max, minimal)",args:{name:"variant"}},{name:"--thinking",description:"Show thinking blocks"},{name:["-i","--interactive"],description:"Run in direct interactive split-footer mode"},ie]},{name:"debug",description:"Debugging and troubleshooting tools",subcommands:[{name:"config",description:"Show resolved configuration"},{name:"lsp",description:"LSP debugging utilities",subcommands:[{name:"diagnostics",description:"Get diagnostics for a file",args:{name:"file",template:"filepaths"}},{name:"symbols",description:"Search workspace symbols",args:{name:"query"}},{name:"document-symbols",description:"Get symbols from a document",args:{name:"uri"}}]},{name:"rg",description:"Ripgrep debugging utilities",subcommands:[{name:"files",description:"List files using ripgrep",options:[{name:"--query",description:"Filter files by query",args:{name:"query"}},{name:"--glob",description:"Glob pattern to match files",args:{name:"glob"}},{name:"--limit",description:"Limit number of results",args:{name:"limit"}}]},{name:"search",description:"Search file contents using ripgrep",args:{name:"pattern",description:"Search pattern"},options:[{name:"--glob",description:"File glob patterns",isRepeatable:!0,args:{name:"glob"}},{name:"--limit",description:"Limit number of results",args:{name:"limit"}}]}]},{name:"file",description:"File system debugging utilities",subcommands:[{name:"read",description:"Read file contents as JSON",args:{name:"path",template:"filepaths"}},{name:"list",description:"List files in a directory",args:{name:"path",template:"folders"}},{name:"search",description:"Search files by query",args:{name:"query"}}]},{name:"scrap",description:"List all known projects"},{name:"skill",description:"List all available skills"},{name:"snapshot",description:"Snapshot debugging utilities",subcommands:[{name:"track",description:"Track current snapshot state"},{name:"patch",description:"Show patch for a snapshot hash",args:{name:"hash"}},{name:"diff",description:"Show diff for a snapshot hash",args:{name:"hash"}}]},{name:"startup",description:"Print startup timing"},{name:"agent",description:"Show agent configuration details",args:{name:"name",description:"Agent name",suggestions:[...oe,{name:"general",description:"General-purpose subagent"},{name:"explore",description:"Codebase exploration subagent"}]},options:[{name:"--tool",description:"Tool id to execute",args:{name:"tool"}},{name:"--params",description:"Tool params as JSON or a JS object literal",args:{name:"params"}}]},{name:"v2",description:"Debug v2 catalog and built-in plugins"},{name:"info",description:"Show debug information"},{name:"paths",description:"Show global paths (data, config, cache, state)"},{name:"wait",description:"Wait indefinitely (for debugging)"}]},{name:["providers","auth"],description:"Manage AI providers and credentials",subcommands:[{name:["list","ls"],description:"List providers and credentials"},{name:"login",description:"Log in to a provider",args:{name:"url",description:"Opencode auth provider",isOptional:!0},options:[{name:["-p","--provider"],description:"Provider id or name to log in to (skips provider selection)",args:{name:"provider"}},{name:["-m","--method"],description:"Login method label (skips method selection)",args:{name:"method"}}]},{name:"logout",description:"Log out from a configured provider",args:{name:"provider",description:"Provider id or name to log out from",isOptional:!0}}]},{name:"agent",description:"Manage agents",subcommands:[{name:"create",description:"Create a new agent",options:[{name:"--path",description:"Directory path to generate the agent file",args:{name:"path",template:"folders"}},{name:"--description",description:"What the agent should do",args:{name:"description"}},{name:"--mode",description:"Agent mode",args:{name:"mode",suggestions:["all","primary","subagent"]}},{name:["--permissions","--tools"],description:"Comma-separated list of permissions to allow (default: all)",args:{name:"permissions",generators:(0,se.valueList)({values:["bash","read","edit","glob","grep","webfetch","task","todowrite","websearch","lsp","skill"]})}},q]},{name:"list",description:"List all available agents"}]},{name:"upgrade",description:"Upgrade opencode to the latest or a specific version",args:{name:"target",description:"Version to upgrade to, e.g. '0.1.48' or 'v0.1.48'",isOptional:!0},options:[{name:["-m","--method"],description:"Installation method to use",args:{name:"method",suggestions:["curl","npm","pnpm","bun","brew","choco","scoop"]}},{name:"--major",description:"Upgrade to OpenCode 2 and remove OpenCode 1",isDangerous:!0}]},{name:"uninstall",description:"Uninstall opencode and remove all related files",options:[{name:["-c","--keep-config"],description:"Keep configuration files"},{name:["-d","--keep-data"],description:"Keep session data and snapshots"},{name:"--dry-run",description:"Show what would be removed without removing"},{name:["-f","--force"],description:"Skip confirmation prompts",isDangerous:!0}]},{name:"serve",description:"Starts a headless opencode server",options:M},{name:"web",description:"Start opencode server and open web interface",options:M},{name:"models",description:"List all available models",args:{name:"provider",description:"Provider ID to filter models by",isOptional:!0},options:[{name:"--verbose",description:"Use more verbose model output (includes metadata like costs)"},{name:"--refresh",description:"Refresh the models cache from models.dev"}]},{name:"stats",description:"Show token usage and cost statistics",options:[{name:"--days",description:"Show stats for the last N days (default: all time)",args:{name:"N"}},{name:"--tools",description:"Number of tools to show (default: all)",args:{name:"N"}},{name:"--models",description:"Show model statistics. Pass a number to show top N, otherwise shows all",args:{name:"N",isOptional:!0}},{name:"--project",description:"Filter by project (default: all projects, empty string: current project)",args:{name:"project"}}]},{name:"export",description:"Export session data as JSON",args:{name:"sessionID",description:"Session id to export",isOptional:!0},options:[{name:"--sanitize",description:"Redact sensitive transcript and file data"}]},{name:"import",description:"Import session data from JSON file",args:{name:"file",description:"Path to JSON file",template:"filepaths"}},{name:"github",description:"Manage GitHub agent",subcommands:[{name:"install",description:"Install the GitHub agent"},{name:"run",description:"Run the GitHub agent",options:[{name:"--event",description:"GitHub mock event to run the agent for",args:{name:"event"}},{name:"--token",description:"GitHub personal access token (github_pat_...)",args:{name:"token"}}]}]},{name:"pr",description:"Fetch and checkout a GitHub PR branch, then run opencode",args:{name:"number",description:"PR number to checkout"}},{name:"session",description:"Manage sessions",subcommands:[{name:"list",description:"List sessions",options:[{name:["-n","--max-count"],description:"Limit to N most recent sessions",args:{name:"N"}},{name:"--format",description:"Output format",args:{name:"format",default:"table",suggestions:["table","json"]}}]},{name:"delete",description:"Delete a session",args:{name:"sessionID",description:"Session ID to delete"},isDangerous:!0}]},{name:["plugin","plug"],description:"Install plugin and update config",args:{name:"module",description:"Npm module name"},options:[{name:["-g","--global"],description:"Install in global config"},{name:["-f","--force"],description:"Replace existing plugin version"}]},{name:"db",description:"Open an interactive sqlite3 shell or run a query (database tools)",args:{name:"query",description:"SQL query to execute",isOptional:!0},options:[{name:"--format",description:"Output format",args:{name:"format",default:"tsv",suggestions:["json","tsv"]}}],subcommands:[{name:"path",description:"Print the database path"}]}],options:[{name:["-h","--help"],description:"Show help",isPersistent:!0},{name:["-v","--version"],description:"Show version number",isPersistent:!0},{name:"--print-logs",description:"Print logs to stderr",isPersistent:!0},{name:"--log-level",description:"Log level",isPersistent:!0,args:{name:"level",suggestions:["DEBUG","INFO","WARN","ERROR"]}},{name:"--pure",description:"Run without external plugins",isPersistent:!0},...M,q,...V,{name:"--prompt",description:"Prompt to use",args:{name:"prompt"}},ne,ie,...ee]},Ve=De;export{Ve as default};
|
|
1
|
+
var ae=Object.create;var W=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var ce=Object.getOwnPropertyNames;var de=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var pe=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ce(t))!ue.call(e,s)&&s!==n&&W(e,s,{get:()=>t[s],enumerable:!(i=le(t,s))||i.enumerable});return e};var me=(e,t,n)=>(n=e!=null?ae(de(e)):{},pe(t||!e||!e.__esModule?W(n,"default",{value:e,enumerable:!0}):n,e));var H=x(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.shellExpand=A.ensureTrailingSlash=void 0;var ge=e=>e.endsWith("/")?e:`${e}/`;A.ensureTrailingSlash=ge;var fe=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,he=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,s=>{var o;let a=s.slice(1);return(o=t[a])!==null&&o!==void 0?o:s}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(s,o,a)=>{var c,d;return(d=(c=t[o])!==null&&c!==void 0?c:a)!==null&&d!==void 0?d:s}),ve=(e,t)=>{var n;let{environmentVariables:i}=t;return he(fe(e,(n=i?.HOME)!==null&&n!==void 0?n:"~"),i)};A.shellExpand=ve});var K=x(y=>{"use strict";var be=y&&y.__awaiter||function(e,t,n,i){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(r){try{l(i.next(r))}catch(u){a(u)}}function d(r){try{l(i.throw(r))}catch(u){a(u)}}function l(r){r.done?o(r.value):s(r.value).then(c,d)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(y,"__esModule",{value:!0});y.filepaths=y.folders=y.getCurrentInsertedDirectory=void 0;y.sortFilesAlphabetically=U;var F=H();function U(e,t=[]){let n=t.map(s=>s.toLowerCase()),i=e.filter(s=>!n.includes(s.toLowerCase()));return[...i.filter(s=>!s.startsWith(".")).sort((s,o)=>s.localeCompare(o)),...i.filter(s=>s.startsWith(".")).sort((s,o)=>s.localeCompare(o)),"../"]}var ye=(e,t,n)=>{if(e===null)return"/";let i=(0,F.shellExpand)(t,n),s=i.slice(0,i.lastIndexOf("/")+1);return s===""?(0,F.ensureTrailingSlash)(e):s.startsWith("/")?s:`${(0,F.ensureTrailingSlash)(e)}${s}`};y.getCurrentInsertedDirectory=ye;function L(e={}){let{extensions:t=[],equals:n=[],matches:i,filterFolders:s=!1,editFileSuggestions:o,editFolderSuggestions:a,rootDirectory:c,showFolders:d="always"}=e,l=new Set(t),r=new Set(n),u=()=>t.length>0||n.length>0||i,h=(m=[])=>u()?m.filter(({name:f="",type:O})=>{if(!s&&O==="folder"||r.has(f)||i&&f.match(i))return!0;let[,...p]=f.split(".");if(p.length>=1){let b=p.length-1,S=p[b];do{if(l.has(S))return!0;b-=1,S=[p[b],S].join(".")}while(b>=0)}return!1}):m,w=(m=[])=>!o&&!a?m:m.map(f=>Object.assign(Object.assign({},f),(f.type==="file"?o:a)||{}));return{trigger:(m,f)=>{let O=m.lastIndexOf("/"),p=f.lastIndexOf("/");return O!==p?!0:O===-1&&p===-1?!1:m.slice(0,O)!==f.slice(0,p)},getQueryTerm:m=>m.slice(m.lastIndexOf("/")+1),custom:(m,f,O)=>be(this,void 0,void 0,function*(){var p;let{isDangerous:b,currentWorkingDirectory:S,searchTerm:g}=O,_=(p=(0,y.getCurrentInsertedDirectory)(c??S,g,O))!==null&&p!==void 0?p:"/";try{let G=yield f({command:"ls",args:["-1ApL"],cwd:_}),re=U(G.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),J=[];for(let C of re)if(C){let j=C.endsWith("/")?"folders":"filepaths";(j==="filepaths"&&d!=="only"||j==="folders"&&d!=="never")&&J.push({type:j==="filepaths"?"file":"folder",name:C,insertValue:C,isDangerous:b,context:{templateType:j}})}return w(h(J))}catch{return[]}})}}y.folders=Object.assign(()=>L({showFolders:"only"}),Object.freeze(L({showFolders:"only"})));y.filepaths=Object.assign(L,Object.freeze(L()))});var Q=x(P=>{"use strict";var I=P&&P.__awaiter||function(e,t,n,i){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(r){try{l(i.next(r))}catch(u){a(u)}}function d(r){try{l(i.throw(r))}catch(u){a(u)}}function l(r){r.done?o(r.value):s(r.value).then(c,d)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(P,"__esModule",{value:!0});P.valueList=Oe;P.keyValue=Se;P.keyValueList=we;var z=new Map;function T(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function $(e,t,n){return I(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...n);return T(t,i)}if(typeof e[0]=="string"){let i=e.map(s=>({name:s}));return T(t,i)}return T(t,e)})}function k(e,t,n,i){return I(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let s=z.get(e);return s===void 0&&(s=yield $(e,t,i),z.set(e,s)),s}return $(e,t,i)})}function B(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function D(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function E(e,t){let n=new Set(e);return t.filter(i=>{var s;return typeof i.name=="string"?!n.has(i.name):!(!((s=i.name)===null||s===void 0)&&s.some(o=>n.has(o)))})}function Oe({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:i=!1,allowRepeatedValues:s=!1}){return{trigger:(o,a)=>o.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:o=>o.slice(o.lastIndexOf(e)+e.length),custom:(...o)=>I(this,void 0,void 0,function*(){var a;let c=yield k(t,i?e:"",n,o);if(s)return c;let[d]=o,l=(a=d[d.length-1])===null||a===void 0?void 0:a.split(e);return E(l,c)})}}function Se({separator:e="=",keys:t=[],values:n=[],cache:i=!1,insertSeparator:s=!0}){return{trigger:(o,a)=>o.indexOf(e)!==a.indexOf(e),getQueryTerm:o=>o.slice(o.indexOf(e)+1),custom:(...o)=>I(this,void 0,void 0,function*(){let[a]=o,d=!a[a.length-1].includes(e),l=d?t:n,r=B(d,i);return k(l,d&&s?e:"",r,o)})}}function we({separator:e="=",delimiter:t=",",keys:n=[],values:i=[],cache:s=!1,insertSeparator:o=!0,insertDelimiter:a=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:d=!0}){return{trigger:(l,r)=>{let u=D(l,e,t),h=D(r,e,t);return u!==h},getQueryTerm:l=>{let r=D(l,e,t);return l.slice(r+1)},custom:(...l)=>I(this,void 0,void 0,function*(){let[r]=l,u=r[r.length-1],h=D(u,e,t),w=h===-1||u.slice(h,h+e.length)!==e,m=w?n:i,f=B(w,s),p=yield k(m,w?o?e:"":a?t:"",f,l);if(w){if(c)return p;let S=u.split(t).map(g=>g.slice(0,g.indexOf(e)));return E(S,p)}if(d)return p;let b=u.split(t).map(S=>S.slice(S.indexOf(e)+e.length));return E(b,p)})}}});var X=x(R=>{"use strict";var _e=R&&R.__awaiter||function(e,t,n,i){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(r){try{l(i.next(r))}catch(u){a(u)}}function d(r){try{l(i.throw(r))}catch(u){a(u)}}function l(r){r.done?o(r.value):s(r.value).then(c,d)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(R,"__esModule",{value:!0});R.ai=Re;var Pe=4097,Ae=4,xe=.8,Ie=Pe*Ae*xe;function Re({name:e,prompt:t,message:n,postProcess:i,temperature:s,splitOn:o}){return{scriptTimeout:15e3,custom:(a,c,d)=>_e(this,void 0,void 0,function*(){var l,r;let u=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(u.stdout))return[];let h=typeof t=="function"?yield t({tokens:a,executeCommand:c,generatorContext:d}):t,w=typeof n=="function"?yield n({tokens:a,executeCommand:c,generatorContext:d}):n;if(w===null||w.length===0)return console.warn("No message provided to AI generator"),[];let m=Ie-((l=h?.length)!==null&&l!==void 0?l:0),f={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...h?[{role:"system",content:h}]:[],{role:"user",content:w.slice(0,m)}],temperature:s},O=JSON.stringify(f),p=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",O]}),b=JSON.parse(p.stdout);return(r=b?.choices.map(g=>{var _;return(_=g?.message)===null||_===void 0?void 0:_.content}).filter(g=>typeof g=="string").flatMap(g=>o?g.split(o).filter(_=>_.trim().length>0):[g]).map(g=>{if(i)return i(g);let _=g.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:_,insertValue:`'${_}'`,description:"Generated by Fig AI"}}))!==null&&r!==void 0?r:[]})}}});var Z=x(v=>{"use strict";var Ce=v&&v.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),je=v&&v.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ce(t,e,n)};Object.defineProperty(v,"__esModule",{value:!0});v.ai=v.folders=v.filepaths=void 0;var Y=K();Object.defineProperty(v,"filepaths",{enumerable:!0,get:function(){return Y.filepaths}});Object.defineProperty(v,"folders",{enumerable:!0,get:function(){return Y.folders}});je(Q(),v);var Le=X();Object.defineProperty(v,"ai",{enumerable:!0,get:function(){return Le.ai}})});var se=me(Z(),1),oe=[{name:"build",description:"Default agent with all tools enabled"},{name:"plan",description:"Read-only agent for planning and analysis"}],M=[{name:"--port",description:"Port to listen on",args:{name:"port",default:"0"}},{name:"--hostname",description:"Hostname to listen on",args:{name:"hostname",default:"127.0.0.1"}},{name:"--mdns",description:"Enable mDNS service discovery (defaults hostname to 0.0.0.0)"},{name:"--mdns-domain",description:"Custom domain name for mDNS service",args:{name:"domain",default:"opencode.local"}},{name:"--cors",description:"Additional domains to allow for CORS",isRepeatable:!0,args:{name:"domain"}}],V=[{name:["-c","--continue"],description:"Continue the last session"},{name:["-s","--session"],description:"Session id to continue",args:{name:"sessionID"}},{name:"--fork",description:"Fork the session when continuing (use with --continue or --session)"}],ee=[{name:"--mini",description:"Start the minimal interactive interface"},{name:"--no-replay",description:"Disable mini session history replay on resume and after resize"},{name:"--replay-limit",description:"Cap visible mini replay to the newest N messages",args:{name:"N"}}],te=[{name:["-p","--password"],description:"Basic auth password (defaults to OPENCODE_SERVER_PASSWORD)",args:{name:"password"}},{name:["-u","--username"],description:"Basic auth username (defaults to OPENCODE_SERVER_USERNAME or 'opencode')",args:{name:"username"}}],q={name:["-m","--model"],description:"Model to use in the format of provider/model",args:{name:"provider/model"}},ne={name:"--agent",description:"Agent to use",args:{name:"agent",suggestions:oe}},ie={name:"--auto",description:"Auto-approve permissions that are not explicitly denied (dangerous!)",isDangerous:!0},N=e=>({name:"name",description:"Name of the MCP server",isOptional:e}),De={name:"opencode",description:"The open source AI coding agent",args:{name:"project",description:"Path to start opencode in",isOptional:!0,template:"folders"},subcommands:[{name:"completion",description:"Generate shell completion script"},{name:"acp",description:"Start ACP (Agent Client Protocol) server",options:[...M,{name:"--cwd",description:"Working directory",args:{name:"dir",template:"folders"}}]},{name:"mcp",description:"Manage MCP (Model Context Protocol) servers",subcommands:[{name:"add",description:"Add an MCP server",args:N(!0),options:[{name:"--url",description:"URL for a remote MCP server",args:{name:"url"}},{name:"--env",description:"Environment variable for a local MCP server",isRepeatable:!0,args:{name:"KEY=VALUE"}},{name:"--header",description:"HTTP header for a remote MCP server",isRepeatable:!0,args:{name:"KEY=VALUE"}}]},{name:["list","ls"],description:"List MCP servers and their status"},{name:"auth",description:"Authenticate with an OAuth-enabled MCP server",args:N(!0),subcommands:[{name:["list","ls"],description:"List OAuth-capable MCP servers and their auth status"}]},{name:"logout",description:"Remove OAuth credentials for an MCP server",args:N(!0)},{name:"debug",description:"Debug OAuth connection for an MCP server",args:N(!1)}]},{name:"attach",description:"Attach to a running opencode server",args:{name:"url",description:"Server URL, e.g. http://localhost:4096"},options:[{name:"--dir",description:"Directory to run in",args:{name:"dir",template:"folders"}},...V,...te,...ee]},{name:"run",description:"Run opencode with a message",args:{name:"message",description:"Message to send",isOptional:!0,isVariadic:!0},options:[{name:"--command",description:"The command to run, use message for args",args:{name:"command"}},...V,q,ne,{name:"--format",description:"Output format: formatted text or raw JSON events",args:{name:"format",default:"default",suggestions:[{name:"default",description:"Formatted output"},{name:"json",description:"Raw JSON events"}]}},{name:["-f","--file"],description:"File(s) to attach to message",isRepeatable:!0,args:{name:"file",template:"filepaths"}},{name:"--title",description:"Title for the session (uses truncated prompt if no value provided)",args:{name:"title",isOptional:!0}},{name:"--attach",description:"Attach to a running opencode server",args:{name:"url",description:"E.g. http://localhost:4096"}},...te,{name:"--dir",description:"Directory to run in, path on remote server if attaching",args:{name:"dir",template:"folders"}},{name:"--port",description:"Port for the local server (defaults to random port if no value provided)",args:{name:"port",isOptional:!0}},{name:"--variant",description:"Model variant (provider-specific reasoning effort, e.g. high, max, minimal)",args:{name:"variant"}},{name:"--thinking",description:"Show thinking blocks"},{name:["-i","--interactive"],description:"Run in direct interactive split-footer mode"},ie]},{name:"debug",description:"Debugging and troubleshooting tools",subcommands:[{name:"config",description:"Show resolved configuration"},{name:"lsp",description:"LSP debugging utilities",subcommands:[{name:"diagnostics",description:"Get diagnostics for a file",args:{name:"file",template:"filepaths"}},{name:"symbols",description:"Search workspace symbols",args:{name:"query"}},{name:"document-symbols",description:"Get symbols from a document",args:{name:"uri"}}]},{name:"rg",description:"Ripgrep debugging utilities",subcommands:[{name:"files",description:"List files using ripgrep",options:[{name:"--query",description:"Filter files by query",args:{name:"query"}},{name:"--glob",description:"Glob pattern to match files",args:{name:"glob"}},{name:"--limit",description:"Limit number of results",args:{name:"limit"}}]},{name:"search",description:"Search file contents using ripgrep",args:{name:"pattern",description:"Search pattern"},options:[{name:"--glob",description:"File glob patterns",isRepeatable:!0,args:{name:"glob"}},{name:"--limit",description:"Limit number of results",args:{name:"limit"}}]}]},{name:"file",description:"File system debugging utilities",subcommands:[{name:"read",description:"Read file contents as JSON",args:{name:"path",template:"filepaths"}},{name:"list",description:"List files in a directory",args:{name:"path",template:"folders"}},{name:"search",description:"Search files by query",args:{name:"query"}}]},{name:"scrap",description:"List all known projects"},{name:"skill",description:"List all available skills"},{name:"snapshot",description:"Snapshot debugging utilities",subcommands:[{name:"track",description:"Track current snapshot state"},{name:"patch",description:"Show patch for a snapshot hash",args:{name:"hash"}},{name:"diff",description:"Show diff for a snapshot hash",args:{name:"hash"}}]},{name:"startup",description:"Print startup timing"},{name:"agent",description:"Show agent configuration details",args:{name:"name",description:"Agent name",suggestions:[...oe,{name:"general",description:"General-purpose subagent"},{name:"explore",description:"Codebase exploration subagent"}]},options:[{name:"--tool",description:"Tool id to execute",args:{name:"tool"}},{name:"--params",description:"Tool params as JSON or a JS object literal",args:{name:"params"}}]},{name:"v2",description:"Debug v2 catalog and built-in plugins"},{name:"info",description:"Show debug information"},{name:"paths",description:"Show global paths (data, config, cache, state)"},{name:"wait",description:"Wait indefinitely (for debugging)"}]},{name:["providers","auth"],description:"Manage AI providers and credentials",subcommands:[{name:["list","ls"],description:"List providers and credentials"},{name:"login",description:"Log in to a provider",args:{name:"url",description:"Opencode auth provider",isOptional:!0},options:[{name:["-p","--provider"],description:"Provider id or name to log in to (skips provider selection)",args:{name:"provider"}},{name:["-m","--method"],description:"Login method label (skips method selection)",args:{name:"method"}}]},{name:"logout",description:"Log out from a configured provider",args:{name:"provider",description:"Provider id or name to log out from",isOptional:!0}}]},{name:"agent",description:"Manage agents",subcommands:[{name:"create",description:"Create a new agent",options:[{name:"--path",description:"Directory path to generate the agent file",args:{name:"path",template:"folders"}},{name:"--description",description:"What the agent should do",args:{name:"description"}},{name:"--mode",description:"Agent mode",args:{name:"mode",suggestions:["all","primary","subagent"]}},{name:["--permissions","--tools"],description:"Comma-separated list of permissions to allow (default: all)",args:{name:"permissions",generators:(0,se.valueList)({values:["bash","read","edit","glob","grep","webfetch","task","todowrite","websearch","lsp","skill"]})}},q]},{name:"list",description:"List all available agents"}]},{name:"upgrade",description:"Upgrade opencode to the latest or a specific version",args:{name:"target",description:"Version to upgrade to, e.g. '0.1.48' or 'v0.1.48'",isOptional:!0},options:[{name:["-m","--method"],description:"Installation method to use",args:{name:"method",suggestions:["curl","npm","pnpm","bun","brew","choco","scoop"]}},{name:"--major",description:"Upgrade to OpenCode 2 and remove OpenCode 1",isDangerous:!0}]},{name:"uninstall",description:"Uninstall opencode and remove all related files",options:[{name:["-c","--keep-config"],description:"Keep configuration files"},{name:["-d","--keep-data"],description:"Keep session data and snapshots"},{name:"--dry-run",description:"Show what would be removed without removing"},{name:["-f","--force"],description:"Skip confirmation prompts",isDangerous:!0}]},{name:"serve",description:"Starts a headless opencode server",options:M},{name:"web",description:"Start opencode server and open web interface",options:M},{name:"models",description:"List all available models",args:{name:"provider",description:"Provider ID to filter models by",isOptional:!0},options:[{name:"--verbose",description:"Use more verbose model output (includes metadata like costs)"},{name:"--refresh",description:"Refresh the models cache from models.dev"}]},{name:"stats",description:"Show token usage and cost statistics",options:[{name:"--days",description:"Show stats for the last N days (default: all time)",args:{name:"N"}},{name:"--tools",description:"Number of tools to show (default: all)",args:{name:"N"}},{name:"--models",description:"Show model statistics. Pass a number to show top N, otherwise shows all",args:{name:"N",isOptional:!0}},{name:"--project",description:"Filter by project (default: all projects, empty string: current project)",args:{name:"project"}}]},{name:"export",description:"Export session data as JSON",args:{name:"sessionID",description:"Session id to export",isOptional:!0},options:[{name:"--sanitize",description:"Redact sensitive transcript and file data"}]},{name:"import",description:"Import session data from JSON file",args:{name:"file",description:"Path to JSON file",template:"filepaths"}},{name:"github",description:"Manage GitHub agent",subcommands:[{name:"install",description:"Install the GitHub agent"},{name:"run",description:"Run the GitHub agent",options:[{name:"--event",description:"GitHub mock event to run the agent for",args:{name:"event"}},{name:"--token",description:"GitHub personal access token (github_pat_...)",args:{name:"token"}}]}]},{name:"pr",description:"Fetch and checkout a GitHub PR branch, then run opencode",args:{name:"number",description:"PR number to checkout"}},{name:"session",description:"Manage sessions",subcommands:[{name:"list",description:"List sessions",options:[{name:["-n","--max-count"],description:"Limit to N most recent sessions",args:{name:"N"}},{name:"--format",description:"Output format",args:{name:"format",default:"table",suggestions:["table","json"]}}]},{name:"delete",description:"Delete a session",args:{name:"sessionID",description:"Session ID to delete"},isDangerous:!0}]},{name:["plugin","plug"],description:"Install plugin and update config",args:{name:"module",description:"Npm module name"},options:[{name:["-g","--global"],description:"Install in global config"},{name:["-f","--force"],description:"Replace existing plugin version"}]},{name:"db",description:"Open an interactive sqlite3 shell or run a query (database tools)",args:{name:"query",description:"SQL query to execute",isOptional:!0},options:[{name:"--format",description:"Output format",args:{name:"format",default:"tsv",suggestions:["json","tsv"]}}],subcommands:[{name:"path",description:"Print the database path"}]}],options:[{name:["-h","--help"],description:"Show help",isPersistent:!0},{name:["-v","--version"],description:"Show version number",isPersistent:!0},{name:"--print-logs",description:"Print logs to stderr",isPersistent:!0},{name:"--log-level",description:"Log level",isPersistent:!0,args:{name:"level",suggestions:["DEBUG","INFO","WARN","ERROR"]}},{name:"--pure",description:"Run without external plugins",isPersistent:!0},...M,q,...V,{name:"--prompt",description:"Prompt to use",args:{name:"prompt"}},ne,ie,...ee]},Ve=De;export{Ve as default};
|
package/build/osascript.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
`),[".DS_Store"]),N=[];for(let V of
|
|
1
|
+
var k=Object.create;var W=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var re=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ee(t))!ne.call(e,i)&&i!==n&&W(e,i,{get:()=>t[i],enumerable:!(r=Y(t,i))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?k(te(e)):{},re(t||!e||!e.__esModule?W(n,"default",{value:e,enumerable:!0}):n,e));var R=T(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.shellExpand=I.ensureTrailingSlash=void 0;var se=e=>e.endsWith("/")?e:`${e}/`;I.ensureTrailingSlash=se;var oe=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,le=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,i=>{var s;let l=i.slice(1);return(s=t[l])!==null&&s!==void 0?s:i}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(i,s,l)=>{var c,a;return(a=(c=t[s])!==null&&c!==void 0?c:l)!==null&&a!==void 0?a:i}),ue=(e,t)=>{var n;let{environmentVariables:r}=t;return le(oe(e,(n=r?.HOME)!==null&&n!==void 0?n:"~"),r)};I.shellExpand=ue});var J=T(_=>{"use strict";var ce=_&&_.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(l){l(s)})}return new(n||(n=Promise))(function(s,l){function c(o){try{u(r.next(o))}catch(f){l(f)}}function a(o){try{u(r.throw(o))}catch(f){l(f)}}function u(o){o.done?s(o.value):i(o.value).then(c,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.filepaths=_.folders=_.getCurrentInsertedDirectory=void 0;_.sortFilesAlphabetically=$;var E=R();function $(e,t=[]){let n=t.map(i=>i.toLowerCase()),r=e.filter(i=>!n.includes(i.toLowerCase()));return[...r.filter(i=>!i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),...r.filter(i=>i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),"../"]}var ae=(e,t,n)=>{if(e===null)return"/";let r=(0,E.shellExpand)(t,n),i=r.slice(0,r.lastIndexOf("/")+1);return i===""?(0,E.ensureTrailingSlash)(e):i.startsWith("/")?i:`${(0,E.ensureTrailingSlash)(e)}${i}`};_.getCurrentInsertedDirectory=ae;function M(e={}){let{extensions:t=[],equals:n=[],matches:r,filterFolders:i=!1,editFileSuggestions:s,editFolderSuggestions:l,rootDirectory:c,showFolders:a="always"}=e,u=new Set(t),o=new Set(n),f=()=>t.length>0||n.length>0||r,v=(p=[])=>f()?p.filter(({name:g="",type:O})=>{if(!i&&O==="folder"||o.has(g)||r&&g.match(r))return!0;let[,...d]=g.split(".");if(d.length>=1){let m=d.length-1,b=d[m];do{if(u.has(b))return!0;m-=1,b=[d[m],b].join(".")}while(m>=0)}return!1}):p,S=(p=[])=>!s&&!l?p:p.map(g=>Object.assign(Object.assign({},g),(g.type==="file"?s:l)||{}));return{trigger:(p,g)=>{let O=p.lastIndexOf("/"),d=g.lastIndexOf("/");return O!==d?!0:O===-1&&d===-1?!1:p.slice(0,O)!==g.slice(0,d)},getQueryTerm:p=>p.slice(p.lastIndexOf("/")+1),custom:(p,g,O)=>ce(this,void 0,void 0,function*(){var d;let{isDangerous:m,currentWorkingDirectory:b,searchTerm:h}=O,w=(d=(0,_.getCurrentInsertedDirectory)(c??b,h,O))!==null&&d!==void 0?d:"/";try{let q=yield g({command:"ls",args:["-1ApL"],cwd:w}),U=$(q.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),N=[];for(let V of U)if(V){let F=V.endsWith("/")?"folders":"filepaths";(F==="filepaths"&&a!=="only"||F==="folders"&&a!=="never")&&N.push({type:F==="filepaths"?"file":"folder",name:V,insertValue:V,isDangerous:m,context:{templateType:F}})}return S(v(N))}catch{return[]}})}}_.folders=Object.assign(()=>M({showFolders:"only"}),Object.freeze(M({showFolders:"only"})));_.filepaths=Object.assign(M,Object.freeze(M()))});var H=T(x=>{"use strict";var j=x&&x.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(l){l(s)})}return new(n||(n=Promise))(function(s,l){function c(o){try{u(r.next(o))}catch(f){l(f)}}function a(o){try{u(r.throw(o))}catch(f){l(f)}}function u(o){o.done?s(o.value):i(o.value).then(c,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(x,"__esModule",{value:!0});x.valueList=fe;x.keyValue=de;x.keyValueList=pe;var K=new Map;function L(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function z(e,t,n){return j(this,void 0,void 0,function*(){if(typeof e=="function"){let r=yield e(...n);return L(t,r)}if(typeof e[0]=="string"){let r=e.map(i=>({name:i}));return L(t,r)}return L(t,e)})}function D(e,t,n,r){return j(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let i=K.get(e);return i===void 0&&(i=yield z(e,t,r),K.set(e,i)),i}return z(e,t,r)})}function Q(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function C(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function P(e,t){let n=new Set(e);return t.filter(r=>{var i;return typeof r.name=="string"?!n.has(r.name):!(!((i=r.name)===null||i===void 0)&&i.some(s=>n.has(s)))})}function fe({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:r=!1,allowRepeatedValues:i=!1}){return{trigger:(s,l)=>s.lastIndexOf(e)!==l.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>j(this,void 0,void 0,function*(){var l;let c=yield D(t,r?e:"",n,s);if(i)return c;let[a]=s,u=(l=a[a.length-1])===null||l===void 0?void 0:l.split(e);return P(u,c)})}}function de({separator:e="=",keys:t=[],values:n=[],cache:r=!1,insertSeparator:i=!0}){return{trigger:(s,l)=>s.indexOf(e)!==l.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>j(this,void 0,void 0,function*(){let[l]=s,a=!l[l.length-1].includes(e),u=a?t:n,o=Q(a,r);return D(u,a&&i?e:"",o,s)})}}function pe({separator:e="=",delimiter:t=",",keys:n=[],values:r=[],cache:i=!1,insertSeparator:s=!0,insertDelimiter:l=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:a=!0}){return{trigger:(u,o)=>{let f=C(u,e,t),v=C(o,e,t);return f!==v},getQueryTerm:u=>{let o=C(u,e,t);return u.slice(o+1)},custom:(...u)=>j(this,void 0,void 0,function*(){let[o]=u,f=o[o.length-1],v=C(f,e,t),S=v===-1||f.slice(v,v+e.length)!==e,p=S?n:r,g=Q(S,i),d=yield D(p,S?s?e:"":l?t:"",g,u);if(S){if(c)return d;let b=f.split(t).map(h=>h.slice(0,h.indexOf(e)));return P(b,d)}if(a)return d;let m=f.split(t).map(b=>b.slice(b.indexOf(e)+e.length));return P(m,d)})}}});var B=T(A=>{"use strict";var he=A&&A.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(l){l(s)})}return new(n||(n=Promise))(function(s,l){function c(o){try{u(r.next(o))}catch(f){l(f)}}function a(o){try{u(r.throw(o))}catch(f){l(f)}}function u(o){o.done?s(o.value):i(o.value).then(c,a)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(A,"__esModule",{value:!0});A.ai=_e;var ge=4097,ve=4,ye=.8,me=ge*ve*ye;function _e({name:e,prompt:t,message:n,postProcess:r,temperature:i,splitOn:s}){return{scriptTimeout:15e3,custom:(l,c,a)=>he(this,void 0,void 0,function*(){var u,o;let f=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(f.stdout))return[];let v=typeof t=="function"?yield t({tokens:l,executeCommand:c,generatorContext:a}):t,S=typeof n=="function"?yield n({tokens:l,executeCommand:c,generatorContext:a}):n;if(S===null||S.length===0)return console.warn("No message provided to AI generator"),[];let p=me-((u=v?.length)!==null&&u!==void 0?u:0),g={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...v?[{role:"system",content:v}]:[],{role:"user",content:S.slice(0,p)}],temperature:i},O=JSON.stringify(g),d=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",O]}),m=JSON.parse(d.stdout);return(o=m?.choices.map(h=>{var w;return(w=h?.message)===null||w===void 0?void 0:w.content}).filter(h=>typeof h=="string").flatMap(h=>s?h.split(s).filter(w=>w.trim().length>0):[h]).map(h=>{if(r)return r(h);let w=h.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:w,insertValue:`'${w}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}});var X=T(y=>{"use strict";var Oe=y&&y.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),be=y&&y.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Oe(t,e,n)};Object.defineProperty(y,"__esModule",{value:!0});y.ai=y.folders=y.filepaths=void 0;var G=J();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return G.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return G.folders}});be(H(),y);var Se=B();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return Se.ai}})});var Z=ie(X(),1),we={name:"osascript",description:"Execute OSA scripts (AppleScript, JavaScript, etc.)",options:[{name:"-e",description:"Enter one line of a script",args:{name:"statement"}},{name:"-i",description:"Interactive mode"},{name:"-l",description:"Override the language for any plain text files",args:{name:"language"}},{name:"-s",description:"Modify the output style",args:{name:"flags",isVariadic:!0,suggestions:[{name:"h",description:"Print values in human-readable form (default)"},{name:"s",description:"Print values in recompilable source form"},{name:"e",description:"Print script errors to stderr (default)"},{name:"o",description:"Print script errors to stdout"}]}}],args:{name:"script",isScript:!0,isOptional:!0,generators:(0,Z.filepaths)({extensions:["scpt","scptd"],editFileSuggestions:{priority:76}})}},Fe=we;export{Fe as default};
|