@tabsmith/autocomplete-specs 1.0.0 → 1.0.15
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/codeburn.js +1 -0
- 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/dsh.js +2 -0
- 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 +6 -37
- 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/ts-node.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`),[".DS_Store"]),
|
|
3
|
-
`).map(o=>({name:o,icon:"\u{1F4E6}",description:"Global dependency"}))}}},Se={cache:{strategy:"stale-while-revalidate",cacheByDirectory:!0},script:["bash","-c","until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"],postProcess:function(e,[n]){if(e.trim()=="")return[];try{let t=JSON.parse(e),o=t.scripts,i=t.fig||{};if(o)return Object.entries(o).map(([s,a])=>{let p=n==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",c=i[s];return{name:s,icon:p,description:a,priority:51,...c}})}catch(t){console.error(t)}return[]}},U={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},k={name:"--json",description:"Show output in json format"},M={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},P={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},$={name:["-l","--long"],description:"Show extended information"},u=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:Oe,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],xe=[{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"},...u],je=[{name:["-a","-all"],description:"Show all outdated or installed packages"},k,$,P,{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"},U,M,...u],m={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},ne={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},w={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},I={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},A={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"},Je={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:N,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"},U,{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"},m,ne,M,I,{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,...u]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...u,{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:""},I,A,{name:"--",args:{name:"args",isVariadic:!0}}],args:{name:"script",description:"Script to run from your package.json",filterStrategy:"fuzzy",generators:Se}},{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:[m,{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},...u]}],options:[...u,{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"},k,M]},{name:"bin",description:"Print the folder where npm will install executables",options:[U]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:N,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"]},m]},{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"]},I,A,ne,m]},{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"},k]},{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:[m]},{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:N,debounce:!0,isVariadic:!0},options:[...u,m,{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:[m]},{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:W}},{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:[$]},{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:[m,{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:je,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:[m,w]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[m,w]},{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:[m,w,k,P]}]},{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"},k,$,P,{name:"-g",description:"Checks globally"},...u]},{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:[m]},{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:[m,w]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[m,w]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[k,F,...u,{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:[m]},{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:[k,...u]},{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:[k,...u,{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:[...u,{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:[m,k,P,w]},{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:[m,k,P,w],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:[m,w]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[m,w]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[M,F,k,{name:"--production",description:"Remove the packages specified in your devDependencies"},...u]},{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"}},...u,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},F,w]},{name:["rebuild","rb"],description:"Rebuild a package",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[U,...u,I,{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:N,debounce:!0,isVariadic:!0},options:[...u,{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:[I,A,{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:[$,k,{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"]},P,{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"}},m,{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:u},{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:[m,{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:[m]},{name:"start",description:"Start a package",options:[I,A,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[I,A,{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:[m,w]},{name:"destroy",args:{name:"scope:team"},options:[m,w]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[m,w]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[m,w]},{name:"ls",args:{name:"scope|scope:team"},options:[m,k,P]}]},{name:["test","tst","t"],description:"Test a package",options:[I,A]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[k,P]},{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:[m,w]},L("uninstall"),L(["r","rm"]),L("un"),L("remove"),L("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},...u]},{name:"unstar",description:"Remove an item from your favorite packages",args:{name:"pkg",description:"Package to unmark as favorite"},options:[m,w,{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"},M,I,{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,...u]},{name:"version",description:"Bump a package version",options:[...u,k,{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:[...u,k]},{name:"whoami",description:"Display npm username",options:[m]}]};var me=ke(le(),1),We={name:"ts-node",description:"Run the TypeScript interpreter for Node.JS",options:[{name:["--help","-h"],description:"Show help for ts-node"},{name:["-v","--version"],description:"Print version information of the ts-node module"},{name:["-e","--eval"],insertValue:"-e '{cursor}'",description:"Evaluate script",args:{name:"script"}},{name:["-p","--print"],description:"Evaluate script and print result"},{name:["-r","--require"],isRepeatable:!0,description:"Require module before executing",args:{name:"module",generators:W,filterStrategy:"fuzzy"}},{name:["-i","--interactive"],description:"Always open interactive REPL"},{name:"--show-config",description:"Print resolved Typescript config to the terminal"},{name:"--cwd-mode",description:"Resolve Typescript config based on the current working directory"},{name:["-T","--transpile-only"],description:"Use the Typescript transpile module mode"},{name:["-H","--compiler-host"],description:"Use the Typescript compiler host API"},{name:["-I","--ignore"],description:"Ignore patterns from Typescript compilation",args:{name:"pattern"}},{name:["-P","--project"],description:"Specify TypeScript project location",args:{name:"project",generators:{template:"filepaths",filterTemplateSuggestions:function(e){return e.filter(n=>n.name.match(/.*\.json$/g)||n.name.endsWith("/")).map(n=>{let t=n.name.match(/.*\.json?$/g),o=n.name.match(/tsconfig.json$/g);return{...n,priority:o?100:t&&76}})}}}},{name:["-C","--compiler"],description:"Use a custom compiler",args:{name:"compiler"}},{name:"--transpiler",description:"Use a custom transpiler",args:{name:"transpiler"}},{name:["-D","--ignore-diagnostics"],description:"Specify Typescript diagnostic code to ignore",args:{name:"code"}},{name:["-O","--compiler-options"],insertValue:"-O '{cursor}'",description:"JSON object that will be merged with the compiler options",args:{name:"options"}},{name:"--cwd",description:"Specify working directory",args:{name:"cwd",generators:{template:"folders"}}},{name:"--files",description:"Load files, include and exclude from Typescript config on startup"},{name:"--pretty",description:"Use the pretty formatter for diagnostic errors"},{name:"--skip-project",description:"Skip reading Typescript config"},{name:"--scope",description:"Scope compilation to scope directory specified"},{name:"--scope-dir",description:"Directory for scope parameter",args:{name:"directory",generators:{template:"folders"}}},{name:"--skip-ignore",description:"Skip --ignore checks"},{name:"--prefer-ts-exts",description:"Prefer Typescript files over JavaScript files when importing files"},{name:"--log-error",description:"Pipe Typescript errors to stderr instead of throwing exceptions"},{name:"--no-experimental-repl-await",description:"Disable the top-level await function in REPL"}],args:{name:"script",isScript:!0,generators:(0,me.filepaths)({matches:/.*\.tsx?$/g,editFileSuggestions:{priority:76}})}},en=We;export{en as default};
|
|
1
|
+
var be=Object.create;var ie=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var M=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var je=(e,n,t,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Oe(n))!Se.call(e,i)&&i!==t&&ie(e,i,{get:()=>n[i],enumerable:!(a=we(n,i))||a.enumerable});return e};var De=(e,n,t)=>(t=e!=null?be(xe(e)):{},je(n||!e||!e.__esModule?ie(t,"default",{value:e,enumerable:!0}):t,e));var ce=M(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.shellExpand=L.ensureTrailingSlash=void 0;var Fe=e=>e.endsWith("/")?e:`${e}/`;L.ensureTrailingSlash=Fe;var Ae=(e,n)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",n):e,Pe=(e,n)=>e.replace(/\$([A-Za-z0-9_]+)/g,i=>{var s;let o=i.slice(1);return(s=n[o])!==null&&s!==void 0?s:i}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(i,s,o)=>{var p,c;return(c=(p=n[s])!==null&&p!==void 0?p:o)!==null&&c!==void 0?c:i}),Ve=(e,n)=>{var t;let{environmentVariables:a}=n;return Pe(Ae(e,(t=a?.HOME)!==null&&t!==void 0?t:"~"),a)};L.shellExpand=Ve});var le=M(S=>{"use strict";var Le=S&&S.__awaiter||function(e,n,t,a){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function p(r){try{m(a.next(r))}catch(l){o(l)}}function c(r){try{m(a.throw(r))}catch(l){o(l)}}function m(r){r.done?s(r.value):i(r.value).then(p,c)}m((a=a.apply(e,n||[])).next())})};Object.defineProperty(S,"__esModule",{value:!0});S.filepaths=S.folders=S.getCurrentInsertedDirectory=void 0;S.sortFilesAlphabetically=pe;var Y=ce();function pe(e,n=[]){let t=n.map(i=>i.toLowerCase()),a=e.filter(i=>!t.includes(i.toLowerCase()));return[...a.filter(i=>!i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),...a.filter(i=>i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),"../"]}var Me=(e,n,t)=>{if(e===null)return"/";let a=(0,Y.shellExpand)(n,t),i=a.slice(0,a.lastIndexOf("/")+1);return i===""?(0,Y.ensureTrailingSlash)(e):i.startsWith("/")?i:`${(0,Y.ensureTrailingSlash)(e)}${i}`};S.getCurrentInsertedDirectory=Me;function J(e={}){let{extensions:n=[],equals:t=[],matches:a,filterFolders:i=!1,editFileSuggestions:s,editFolderSuggestions:o,rootDirectory:p,showFolders:c="always"}=e,m=new Set(n),r=new Set(t),l=()=>n.length>0||t.length>0||a,w=(g=[])=>l()?g.filter(({name:k="",type:j})=>{if(!i&&j==="folder"||r.has(k)||a&&k.match(a))return!0;let[,...f]=k.split(".");if(f.length>=1){let x=f.length-1,D=f[x];do{if(m.has(D))return!0;x-=1,D=[f[x],D].join(".")}while(x>=0)}return!1}):g,v=(g=[])=>!s&&!o?g:g.map(k=>Object.assign(Object.assign({},k),(k.type==="file"?s:o)||{}));return{trigger:(g,k)=>{let j=g.lastIndexOf("/"),f=k.lastIndexOf("/");return j!==f?!0:j===-1&&f===-1?!1:g.slice(0,j)!==k.slice(0,f)},getQueryTerm:g=>g.slice(g.lastIndexOf("/")+1),custom:(g,k,j)=>Le(this,void 0,void 0,function*(){var f;let{isDangerous:x,currentWorkingDirectory:D,searchTerm:b}=j,I=(f=(0,S.getCurrentInsertedDirectory)(p??D,b,j))!==null&&f!==void 0?f:"/";try{let ne=yield k({command:"ls",args:["-1ApL"],cwd:I}),ve=pe(ne.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),te=[];for(let N of ve)if(N){let G=N.endsWith("/")?"folders":"filepaths";(G==="filepaths"&&c!=="only"||G==="folders"&&c!=="never")&&te.push({type:G==="filepaths"?"file":"folder",name:N,insertValue:N,isDangerous:x,context:{templateType:G}})}return v(w(te))}catch{return[]}})}}S.folders=Object.assign(()=>J({showFolders:"only"}),Object.freeze(J({showFolders:"only"})));S.filepaths=Object.assign(J,Object.freeze(J()))});var ge=M(A=>{"use strict";var E=A&&A.__awaiter||function(e,n,t,a){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function p(r){try{m(a.next(r))}catch(l){o(l)}}function c(r){try{m(a.throw(r))}catch(l){o(l)}}function m(r){r.done?s(r.value):i(r.value).then(p,c)}m((a=a.apply(e,n||[])).next())})};Object.defineProperty(A,"__esModule",{value:!0});A.valueList=qe;A.keyValue=Ue;A.keyValueList=Ee;var de=new Map;function X(e,n){return e.length===0?n:n.map(t=>t.insertValue?t:Object.assign(Object.assign({},t),{insertValue:t.name+e}))}function me(e,n,t){return E(this,void 0,void 0,function*(){if(typeof e=="function"){let a=yield e(...t);return X(n,a)}if(typeof e[0]=="string"){let a=e.map(i=>({name:i}));return X(n,a)}return X(n,e)})}function ee(e,n,t,a){return E(this,void 0,void 0,function*(){if(t||Array.isArray(e)){let i=de.get(e);return i===void 0&&(i=yield me(e,n,a),de.set(e,i)),i}return me(e,n,a)})}function ue(e,n){return typeof n=="string"?e&&n==="keys"||!e&&n==="values":n}function B(e,...n){return Math.max(...n.map(t=>e.lastIndexOf(t)))}function Z(e,n){let t=new Set(e);return n.filter(a=>{var i;return typeof a.name=="string"?!t.has(a.name):!(!((i=a.name)===null||i===void 0)&&i.some(s=>t.has(s)))})}function qe({delimiter:e=",",values:n=[],cache:t=!1,insertDelimiter:a=!1,allowRepeatedValues:i=!1}){return{trigger:(s,o)=>s.lastIndexOf(e)!==o.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>E(this,void 0,void 0,function*(){var o;let p=yield ee(n,a?e:"",t,s);if(i)return p;let[c]=s,m=(o=c[c.length-1])===null||o===void 0?void 0:o.split(e);return Z(m,p)})}}function Ue({separator:e="=",keys:n=[],values:t=[],cache:a=!1,insertSeparator:i=!0}){return{trigger:(s,o)=>s.indexOf(e)!==o.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>E(this,void 0,void 0,function*(){let[o]=s,c=!o[o.length-1].includes(e),m=c?n:t,r=ue(c,a);return ee(m,c&&i?e:"",r,s)})}}function Ee({separator:e="=",delimiter:n=",",keys:t=[],values:a=[],cache:i=!1,insertSeparator:s=!0,insertDelimiter:o=!1,allowRepeatedKeys:p=!1,allowRepeatedValues:c=!0}){return{trigger:(m,r)=>{let l=B(m,e,n),w=B(r,e,n);return l!==w},getQueryTerm:m=>{let r=B(m,e,n);return m.slice(r+1)},custom:(...m)=>E(this,void 0,void 0,function*(){let[r]=m,l=r[r.length-1],w=B(l,e,n),v=w===-1||l.slice(w,w+e.length)!==e,g=v?t:a,k=ue(v,i),f=yield ee(g,v?s?e:"":o?n:"",k,m);if(v){if(p)return f;let D=l.split(n).map(b=>b.slice(0,b.indexOf(e)));return Z(D,f)}if(c)return f;let x=l.split(n).map(D=>D.slice(D.indexOf(e)+e.length));return Z(x,f)})}}});var fe=M(z=>{"use strict";var ze=z&&z.__awaiter||function(e,n,t,a){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function p(r){try{m(a.next(r))}catch(l){o(l)}}function c(r){try{m(a.throw(r))}catch(l){o(l)}}function m(r){r.done?s(r.value):i(r.value).then(p,c)}m((a=a.apply(e,n||[])).next())})};Object.defineProperty(z,"__esModule",{value:!0});z.ai=Je;var Ne=4097,Ge=4,We=.8,$e=Ne*Ge*We;function Je({name:e,prompt:n,message:t,postProcess:a,temperature:i,splitOn:s}){return{scriptTimeout:15e3,custom:(o,p,c)=>ze(this,void 0,void 0,function*(){var m,r;let l=yield p({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(l.stdout))return[];let w=typeof n=="function"?yield n({tokens:o,executeCommand:p,generatorContext:c}):n,v=typeof t=="function"?yield t({tokens:o,executeCommand:p,generatorContext:c}):t;if(v===null||v.length===0)return console.warn("No message provided to AI generator"),[];let g=$e-((m=w?.length)!==null&&m!==void 0?m:0),k={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...w?[{role:"system",content:w}]:[],{role:"user",content:v.slice(0,g)}],temperature:i},j=JSON.stringify(k),f=yield p({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",j]}),x=JSON.parse(f.stdout);return(r=x?.choices.map(b=>{var I;return(I=b?.message)===null||I===void 0?void 0:I.content}).filter(b=>typeof b=="string").flatMap(b=>s?b.split(s).filter(I=>I.trim().length>0):[b]).map(b=>{if(a)return a(b);let I=b.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:I,insertValue:`'${I}'`,description:"Generated by Fig AI"}}))!==null&&r!==void 0?r:[]})}}});var ye=M(O=>{"use strict";var Be=O&&O.__createBinding||(Object.create?function(e,n,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(n,t);(!i||("get"in i?!n.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,i)}:function(e,n,t,a){a===void 0&&(a=t),e[a]=n[t]}),He=O&&O.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&Be(n,e,t)};Object.defineProperty(O,"__esModule",{value:!0});O.ai=O.folders=O.filepaths=void 0;var he=le();Object.defineProperty(O,"filepaths",{enumerable:!0,get:function(){return he.filepaths}});Object.defineProperty(O,"folders",{enumerable:!0,get:function(){return he.folders}});He(ge(),O);var Ke=fe();Object.defineProperty(O,"ai",{enumerable:!0,get:function(){return Ke.ai}})});function q(e){return{name:e,description:"Uninstall a package",args:{name:"package",generators:F,filterStrategy:"fuzzy",isVariadic:!0},options:Ce}}var Q=e=>(e.match(/@/g)||[]).length,Ie=e=>async(n,t,a)=>{let i=n[n.length-1];if(i==="")return[];let s=e&&e.length>0?`+keywords:${e.join(",")}`:"",p=["-s","-H","Accept: application/json",s?`https://api.npms.io/v2/search?size=20&q=${i}${s}`:`https://api.npms.io/v2/search/suggestions?q=${i}&size=20`],c=["-s","-H","Accept: application/vnd.npm.install-v1+json",`https://registry.npmjs.org/${i.slice(0,-1)}`],m=l=>t({command:"curl",args:l[l.length-1]==="@"?c:p}),r=i.startsWith("@")?Q(i)>1:i.includes("@");try{let l=JSON.parse((await m(i)).stdout);if(r){let v=Object.entries(l["dist-tags"]||{}).map(([g,k])=>({name:g,description:k}));return v.push(...Object.keys(l.versions).map(g=>({name:g})).reverse()),v}return(s?l.results:l).map(v=>({name:v.package.name,description:v.package.description}))}catch(l){return console.error({error:l}),[]}},U={trigger:(e,n)=>n.startsWith("@")?!(Q(n)>1&&Q(e)>1):!(n.includes("@")&&e.includes("@")),getQueryTerm:"@",cache:{ttl:1e3*60*60*24*2},custom:Ie()},Te={custom:async(e,n)=>{let{stdout:t}=await n({command:"npm",args:["prefix"]}),{stdout:a}=await n({command:"cat",args:[`${t}/package.json`]}),i=[];try{if(a.trim()=="")return i;let o=JSON.parse(a).workspaces;if(o)for(let p of o)i.push({name:p,description:"Workspaces"})}catch(s){console.log(s)}return i}},F={trigger:e=>e==="-g"||e==="--global",custom:async function(e,n){if(!e.includes("-g")&&!e.includes("--global")){let{stdout:t}=await n({command:"npm",args:["prefix"]}),{stdout:a}=await n({command:"cat",args:[`${t}/package.json`]}),i=JSON.parse(a),s=i.dependencies??{},o=i.devDependencies,p=i.optionalDependencies??{};return Object.assign(s,o,p),Object.keys(s).filter(c=>!e.some(r=>r===c)).map(c=>({name:c,icon:"\u{1F4E6}",description:s[c]?"dependency":p[c]?"optionalDependency":"devDependency"}))}else{let{stdout:t}=await n({command:"bash",args:["-c","ls -1 `npm root -g`"]});return t.split(`
|
|
3
|
+
`).map(a=>({name:a,icon:"\u{1F4E6}",description:"Global dependency"}))}}},_e={cache:{strategy:"stale-while-revalidate",cacheByDirectory:!0},script:["bash","-c","until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"],postProcess:function(e,[n]){if(e.trim()=="")return[];try{let t=JSON.parse(e),a=t.scripts,i=t.fig||{};if(a)return Object.entries(a).map(([s,o])=>{let p=n==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",c=i[s];return{name:s,icon:p,description:o,priority:51,...c}})}catch(t){console.error(t)}return[]}},V={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},h={name:"--json",description:"Show output in json format"},C={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},R={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},$={name:["-l","--long"],description:"Show extended information"},u=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:Te,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],Ce=[{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"},...u],Re=[{name:["-a","--all"],description:"Show all outdated or installed packages"},h,$,R,{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"},V,C,...u],d={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},ae={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},y={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},T={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},P={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"}},_={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"},W={name:"--install-strategy",description:"Sets the strategy for installing packages in node_modules",args:{name:"strategy",default:"hoisted",suggestions:["hoisted","nested","shallow","linked"]}},se={name:"--install-links",description:"Install file: protocol dependencies outside the project root as regular dependencies instead of creating a symlink"},H={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"},oe={name:"--allow-git",description:"Limits the ability for npm to install git dependencies",args:{name:"allow-git",suggestions:["all","none","root"]}},re={name:"--allow-remote",description:"Limits the ability for npm to install user-supplied tarball URL dependencies",args:{name:"allow-remote",suggestions:["all","none","root"]}},K=[{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"}],Xe={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:U,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"},V,W,{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"},d,ae,C,T,H,oe,re,se,{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"},_,...u]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...u,{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:""},T,P,{name:"--",args:{name:"args",isVariadic:!0}}],args:{name:"script",description:"Script to run from your package.json",filterStrategy:"fuzzy",generators:_e}},{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:[h,y,d]},{name:"adduser",description:"Add a registry user account",deprecated:!0,options:[d,{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:[d,{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:[h,{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:[_,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...u]}],options:[...u,{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"},h,C]},{name:"bin",description:"Print the folder where npm will install executables",deprecated:!0,options:[V]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:U,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"]},d]},{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"]},T,P,ae,d,W,C,H,oe,re]},{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"},h]},{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:[d]},{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"},V,{name:"--tag",description:"The tag used to fetch the tarball that will be compared with the local files",args:{name:"tag",default:"latest"}},...u]},{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:U,debounce:!0,isVariadic:!0},options:[...u,d,{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:[d]},{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:U,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"]},...u]},{name:["explain","why"],description:"Explain installed packages",args:{name:"package-spec",filterStrategy:"fuzzy",generators:F,isVariadic:!0},options:[h,...u]},{name:"explore",description:"Browse an installed package",args:{name:"package",filterStrategy:"fuzzy",generators:F}},{name:"find-dupes",description:"Find duplication in the package tree",options:[W,C,T,...u]},{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:[$]},{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:F},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:F},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:[_]}]},{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:[d,{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:Re,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:[d,y]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[d,y]},{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:[d,y,h,R]}]},{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"},h,$,R,{name:"-g",description:"Checks globally"},...u]},{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:[d]},{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:[d,y]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[d,y]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[h,_,...u,{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:[d]},{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:[h,...u]},{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:[h,...u,{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:[...u,{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:u}]},{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:[d,h,R,y]},{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:[d,h,R,y],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:[d,y]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[d,y]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[C,_,h,{name:"--production",description:"Remove the packages specified in your devDependencies"},...u]},{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"}},...u,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},_,y,{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:[V,...u,{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:[V,...u,T,{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:U,debounce:!0,isVariadic:!0},options:[...u,{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:[T,P,{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:[C,{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"]}},...u]},{name:["search","s","se","find"],description:"Search for packages",args:{name:"search terms",isVariadic:!0},options:[$,h,{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"]},R,{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"}},d,{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:u},{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:[d,{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:[d]},{name:"start",description:"Start a package",options:[T,P,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[T,P,{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:[d,y]},{name:"destroy",args:{name:"scope:team"},options:[d,y]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[d,y]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[d,y]},{name:"ls",args:{name:"scope|scope:team"},options:[d,h,R]}]},{name:["test","tst","t"],description:"Test a package",options:[T,P]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[h,R]},{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:[d,y]},{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:[...K,{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:[...K,{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:[...K,{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:[d,y,_]},q("uninstall"),q(["r","rm"]),q("un"),q("remove"),q("unlink"),{name:"unpublish",description:"Remove a package from the registry",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[_,{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},...u]},{name:"unstar",description:"Remove an item from your favorite packages",deprecated:!0,args:{name:"pkg",description:"Package to unmark as favorite"},options:[d,y,{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"},W,{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"},C,T,H,se,{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"},_,...u]},{name:"version",description:"Bump a package version",options:[...u,h,{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:[...u,h]},{name:"whoami",description:"Display npm username",options:[d]}]};var ke=De(ye(),1),Qe={name:"ts-node",description:"Run the TypeScript interpreter for Node.JS",options:[{name:["--help","-h"],description:"Show help for ts-node"},{name:["-v","--version"],description:"Print version information of the ts-node module"},{name:["-e","--eval"],insertValue:"-e '{cursor}'",description:"Evaluate script",args:{name:"script"}},{name:["-p","--print"],description:"Evaluate script and print result"},{name:["-r","--require"],isRepeatable:!0,description:"Require module before executing",args:{name:"module",generators:F,filterStrategy:"fuzzy"}},{name:["-i","--interactive"],description:"Always open interactive REPL"},{name:"--show-config",description:"Print resolved Typescript config to the terminal"},{name:"--cwd-mode",description:"Resolve Typescript config based on the current working directory"},{name:["-T","--transpile-only"],description:"Use the Typescript transpile module mode"},{name:["-H","--compiler-host"],description:"Use the Typescript compiler host API"},{name:["-I","--ignore"],description:"Ignore patterns from Typescript compilation",args:{name:"pattern"}},{name:["-P","--project"],description:"Specify TypeScript project location",args:{name:"project",generators:{template:"filepaths",filterTemplateSuggestions:function(e){return e.filter(n=>n.name.match(/.*\.json$/g)||n.name.endsWith("/")).map(n=>{let t=n.name.match(/.*\.json?$/g),a=n.name.match(/tsconfig.json$/g);return{...n,priority:a?100:t&&76}})}}}},{name:["-C","--compiler"],description:"Use a custom compiler",args:{name:"compiler"}},{name:"--transpiler",description:"Use a custom transpiler",args:{name:"transpiler"}},{name:["-D","--ignore-diagnostics"],description:"Specify Typescript diagnostic code to ignore",args:{name:"code"}},{name:["-O","--compiler-options"],insertValue:"-O '{cursor}'",description:"JSON object that will be merged with the compiler options",args:{name:"options"}},{name:"--cwd",description:"Specify working directory",args:{name:"cwd",generators:{template:"folders"}}},{name:"--files",description:"Load files, include and exclude from Typescript config on startup"},{name:"--pretty",description:"Use the pretty formatter for diagnostic errors"},{name:"--skip-project",description:"Skip reading Typescript config"},{name:"--scope",description:"Scope compilation to scope directory specified"},{name:"--scope-dir",description:"Directory for scope parameter",args:{name:"directory",generators:{template:"folders"}}},{name:"--skip-ignore",description:"Skip --ignore checks"},{name:"--prefer-ts-exts",description:"Prefer Typescript files over JavaScript files when importing files"},{name:"--log-error",description:"Pipe Typescript errors to stderr instead of throwing exceptions"},{name:"--no-experimental-repl-await",description:"Disable the top-level await function in REPL"}],args:{name:"script",isScript:!0,generators:(0,ke.filepaths)({matches:/.*\.tsx?$/g,editFileSuggestions:{priority:76}})}},rn=Qe;export{rn as default};
|
package/build/tsc.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Z=Object.create;var L=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),V=[];for(let k of Q)if(k){let T=k.endsWith("/")?"folders":"filepaths";(T==="filepaths"&&d!=="only"||T==="folders"&&d!=="never")&&V.push({type:T==="filepaths"?"file":"folder",name:k,insertValue:k,isDangerous:S,context:{templateType:T}})}return x(g(V))}catch{return[]}})}}y.folders=Object.assign(()=>F({showFolders:"only"}),Object.freeze(F({showFolders:"only"})));y.filepaths=Object.assign(F,Object.freeze(F()))});var z=I(E=>{"use strict";var D=E&&E.__awaiter||function(e,t,i,n){function r(o){return o instanceof i?o:new i(function(a){a(o)})}return new(i||(i=Promise))(function(o,a){function l(s){try{c(n.next(s))}catch(p){a(p)}}function d(s){try{c(n.throw(s))}catch(p){a(p)}}function c(s){s.done?o(s.value):r(s.value).then(l,d)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(E,"__esModule",{value:!0});E.keyValueList=E.keyValue=E.valueList=void 0;var X=new Map;function A(e,t){return e.length===0?t:t.map(i=>i.insertValue?i:Object.assign(Object.assign({},i),{insertValue:i.name+e}))}function q(e,t,i){return D(this,void 0,void 0,function*(){if(typeof e=="function"){let n=yield e(...i);return A(t,n)}if(typeof e[0]=="string"){let n=e.map(r=>({name:r}));return A(t,n)}return A(t,e)})}function M(e,t,i,n){return D(this,void 0,void 0,function*(){if(i||Array.isArray(e)){let r=X.get(e);return r===void 0&&(r=yield q(e,t,n),X.set(e,r)),r}return q(e,t,n)})}function B(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function C(e,...t){return Math.max(...t.map(i=>e.lastIndexOf(i)))}function P(e,t){let i=new Set(e);return t.filter(n=>{var r;return typeof n.name=="string"?!i.has(n.name):!(!((r=n.name)===null||r===void 0)&&r.some(o=>i.has(o)))})}function pe({delimiter:e=",",values:t=[],cache:i=!1,insertDelimiter:n=!1,allowRepeatedValues:r=!1}){return{trigger:(o,a)=>o.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:o=>o.slice(o.lastIndexOf(e)+e.length),custom:(...o)=>D(this,void 0,void 0,function*(){var a;let l=yield M(t,n?e:"",i,o);if(r)return l;let[d]=o,c=(a=d[d.length-1])===null||a===void 0?void 0:a.split(e);return P(c,l)})}}E.valueList=pe;function ue({separator:e="=",keys:t=[],values:i=[],cache:n=!1,insertSeparator:r=!0}){return{trigger:(o,a)=>o.indexOf(e)!==a.indexOf(e),getQueryTerm:o=>o.slice(o.indexOf(e)+1),custom:(...o)=>D(this,void 0,void 0,function*(){let[a]=o,d=!a[a.length-1].includes(e),c=d?t:i,s=B(d,n);return M(c,d&&r?e:"",s,o)})}}E.keyValue=ue;function fe({separator:e="=",delimiter:t=",",keys:i=[],values:n=[],cache:r=!1,insertSeparator:o=!0,insertDelimiter:a=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:d=!0}){return{trigger:(c,s)=>{let p=C(c,e,t),g=C(s,e,t);return p!==g},getQueryTerm:c=>{let s=C(c,e,t);return c.slice(s+1)},custom:(...c)=>D(this,void 0,void 0,function*(){let[s]=c,p=s[s.length-1],g=C(p,e,t),x=g===-1||p.slice(g,g+e.length)!==e,f=x?i:n,h=B(x,r),u=yield M(f,x?o?e:"":a?t:"",h,c);if(x){if(l)return u;let w=p.split(t).map(m=>m.slice(0,m.indexOf(e)));return P(w,u)}if(d)return u;let S=p.split(t).map(w=>w.slice(w.indexOf(e)+e.length));return P(S,u)})}}E.keyValueList=fe});var G=I(j=>{"use strict";var me=j&&j.__awaiter||function(e,t,i,n){function r(o){return o instanceof i?o:new i(function(a){a(o)})}return new(i||(i=Promise))(function(o,a){function l(s){try{c(n.next(s))}catch(p){a(p)}}function d(s){try{c(n.throw(s))}catch(p){a(p)}}function c(s){s.done?o(s.value):r(s.value).then(l,d)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(j,"__esModule",{value:!0});j.ai=void 0;var he=4097,ge=4,ye=.8,ve=he*ge*ye;function Se({name:e,prompt:t,message:i,postProcess:n,temperature:r,splitOn:o}){return{scriptTimeout:15e3,custom:(a,l,d)=>me(this,void 0,void 0,function*(){var c,s;let p=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(p.stdout))return[];let g=typeof t=="function"?yield t({tokens:a,executeCommand:l,generatorContext:d}):t,x=typeof i=="function"?yield i({tokens:a,executeCommand:l,generatorContext:d}):i;if(x===null||x.length===0)return console.warn("No message provided to AI generator"),[];let f=ve-((c=g?.length)!==null&&c!==void 0?c:0),h={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...g?[{role:"system",content:g}]:[],{role:"user",content:x.slice(0,f)}],temperature:r},b=JSON.stringify(h),u=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",b]}),S=JSON.parse(u.stdout);return(s=S?.choices.map(m=>{var O;return(O=m?.message)===null||O===void 0?void 0:O.content}).filter(m=>typeof m=="string").flatMap(m=>o?m.split(o).filter(O=>O.trim().length>0):[m]).map(m=>{if(n)return n(m);let O=m.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:O,insertValue:`'${O}'`,description:"Generated by Fig AI"}}))!==null&&s!==void 0?s:[]})}}j.ai=Se});var $=I(v=>{"use strict";var be=v&&v.__createBinding||(Object.create?function(e,t,i,n){n===void 0&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){n===void 0&&(n=i),e[n]=t[i]}),we=v&&v.__exportStar||function(e,t){for(var i in e)i!=="default"&&!Object.prototype.hasOwnProperty.call(t,i)&&be(t,e,i)};Object.defineProperty(v,"__esModule",{value:!0});v.ai=v.folders=v.filepaths=void 0;var H=W();Object.defineProperty(v,"filepaths",{enumerable:!0,get:function(){return H.filepaths}});Object.defineProperty(v,"folders",{enumerable:!0,get:function(){return H.folders}});we(z(),v);var xe=G();Object.defineProperty(v,"ai",{enumerable:!0,get:function(){return xe.ai}})});var K=re($(),1),Oe={name:"tsc",description:"CLI tool for TypeScript compiler",options:[{name:"--all",description:"Show all compiler options"},{name:"--generateTrace",description:"Generates an event trace and a list of types"},{name:"--help",description:"Gives local information for help on the CLI"},{name:"--init",description:"Initializes a TypeScript project and creates a tsconfig.json file"},{name:"--listFilesOnly",description:"Print names of files that are part of the compilation and then stop processing"},{name:"--locale",description:"Set the language of the messaging from TypeScript. This does not affect emit"},{name:"--project",description:"Compile the project given the path to its configuration file, or to a folder with a tsconfig.json",args:{name:"path",template:["filepaths","folders"]}},{name:"--showConfig",description:"Print the final configuration instead of building"},{name:"--version",description:"Print the compiler's version"},{name:"--build",description:"Build one or more projects and their dependencies, if out of date"},{name:"--clean",description:"Delete the outputs of all projects"},{name:"--dry",description:"Show what would be built (or deleted, if specified with '--clean')"},{name:"--force",description:"Build all projects, including those that appear to be up to date"},{name:"--verbose",description:"Enable verbose logging"},{name:"--excludeDirectories",description:"Remove a list of directories from the watch process",args:{name:"dir",template:"folders",isVariadic:!0}},{name:"--excludeFiles",description:"Remove a list of files from the watch mode's processing",args:{name:"files",template:"filepaths",isVariadic:!0}},{name:"--fallbackPolling",description:"Specify what approach the watcher should use if the system runs out of native file watchers",args:{name:"approach",suggestions:["fixedPollingInterval","priorityPollingInterval","dynamicPriorityPolling"]}},{name:"--synchronousWatchDirectory",description:"Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively"},{name:"--watch",description:"Watch input files"},{name:"--watchDirectory",description:"Specify how directories are watched on systems that lack recursive file-watching functionality",args:{name:"approach",suggestions:["fixedPollingInterval","dynamicPriorityPolling","useFsEvents"]}},{name:"--watchFile",description:"Specify how the TypeScript watch mode works",args:{name:"approach",suggestions:["fixedPollingInterval","priorityPollingInterval","dynamicPriorityPolling","useFsEvents","useFsEventsOnParentDirectory"]}},{name:"--allowJs",description:"Allow JavaScript files to be a part of your program. Use the checkJS option to get errors from these files"},{name:"--allowSyntheticDefaultImports",description:"Allow 'import x from y' when a module doesn't have a default export"},{name:"--allowUmdGlobalAccess",description:"Allow accessing UMD globals from modules"},{name:"--allowUnreachableCode",description:"Disable error reporting for unreachable code"},{name:"--allowUnusedLabels",description:"Disable error reporting for unused label"},{name:"--alwaysStrict",description:"Ensure 'use strict' is always emitted"},{name:"--assumeChangesOnlyAffectDirectDependencies",description:"Have recompiles in projects that use incremental and watch mode assume that changes within a file will only affect files directly depending on it"},{name:"--baseUrl",description:"Specify the base directory to resolve non-relative module names",args:{name:"directory",template:"filepaths"}},{name:"--checkJs",description:"Enable error reporting in type-checked JavaScript files"},{name:"--composite",description:"Enable constraints that allow a TypeScript project to be used with project references"},{name:"--declaration",description:"Generate .d.ts files from TypeScript and JavaScript files in your project"},{name:"--declarationDir",description:"Specify the output directory for generated declaration files",args:{name:"string",template:"folders"}},{name:"--declarationMap",description:"Create sourcemaps for d.ts files"},{name:"--diagnostics",description:"Output compiler performance information after building"},{name:"--disableReferencedProjectLoad",description:"Reduce the number of projects loaded automatically by TypeScript"},{name:"--disableSizeLimit",description:"Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server"},{name:"--disableSolutionSearching",description:"Opt a project out of multi-project reference checking when editing"},{name:"--disableSourceOfProjectReferenceRedirect",description:"Disable preferring source files instead of declaration files when referencing composite projects"},{name:"--downlevelIteration",description:"Emit more compliant, but verbose and less performant JavaScript for iteration"},{name:"--emitBOM",description:"Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files"},{name:"--emitDeclarationOnly",description:"Only output d.ts files and not JavaScript files"},{name:"--emitDecoratorMetadata",description:"Emit design-type metadata for decorated declarations in source files"},{name:"--esModuleInterop",description:"Emit additional JavaScript to ease support for importing CommonJS modules. This enables allowSyntheticDefaultImports for type compatibility"},{name:"--exactOptionalPropertyTypes",description:"Differentiate between undefined and not present when type checking"},{name:"--experimentalDecorators",description:"Enable experimental support for TC39 stage 2 draft decorators"},{name:"--explainFiles",description:"Print files read during the compilation including why it was included"},{name:"--extendedDiagnostics",description:"Output more detailed compiler performance information after building"},{name:"--forceConsistentCasingInFileNames",description:"Ensure that casing is correct in imports"},{name:"--generateCpuProfile",description:"Emit a v8 CPU profile of the compiler run for debugging"},{name:"--importHelpers",description:"Allow importing helper functions from tslib once per project, instead of including them per-file"},{name:"--importsNotUsedAsValues",description:"Specify emit/checking behavior for imports that are only used for types",args:{name:"type",suggestions:["remove","preserve","error"]}},{name:"--incremental",description:"Save .tsbuildinfo files to allow for incremental compilation of projects"},{name:"--inlineSourceMap",description:"Include sourcemap files inside the emitted JavaScript"},{name:"--inlineSources",description:"Include source code in the sourcemaps inside the emitted JavaScript"},{name:"--isolatedModules",description:"Ensure that each file can be safely transpiled without relying on other imports"},{name:"--jsx",description:"Specify what JSX code is generated",args:{name:"type",suggestions:["react","react-jsx","react-jsxdev","react-native","preserve"]}},{name:"--jsxFactory",description:"Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'",args:{name:"JSX factory function",default:"React.createElement"}},{name:"--jsxFragmentFactory",description:"Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'",args:{name:"JSX fragment"}},{name:"--jsxImportSource",description:"Specify module specifier used to import the JSX factory functions when using jsx: react-jsx*",args:{name:"string",default:"react"}},{name:"--keyofStringsOnly",description:"Make keyof only return strings instead of string, numbers or symbols. Legacy option"},{name:"--lib",description:"Specify a set of bundled library declaration files that describe the target runtime environment",args:{name:"list",template:"filepaths",isVariadic:!0}},{name:"--listEmittedFiles",description:"Print the names of emitted files after a compilation"},{name:"--listFiles",description:"Print all of the files read during the compilation"},{name:"--mapRoot",description:"Specify the location where debugger should locate map files instead of generated locations",args:{name:"string",template:"folders"}},{name:"--maxNodeModuleJsDepth",description:"Specify the maximum folder depth used for checking JavaScript files from node_modules. Only applicable with allowJs",dependsOn:["--allowJs"],args:{name:"number",default:"0"}},{name:"--module",description:"Specify what module code is generated",args:{name:"module",default:"CommonJS",suggestions:["ES6","ES2015","ES2020","None","UMD","AMD","System","ESNext","CommonJS"]}},{name:"--moduleResolution",description:"Specify how TypeScript looks up a file from a given module specifier",args:{name:"module"}},{name:"--newLine",description:"Set the newline character for emitting files",args:{name:"character"}},{name:"--noEmit",description:"Disable emitting file from a compilation"},{name:"--noEmitHelpers",description:"Disable generating custom helper functions like __extends in compiled output"},{name:"--noEmitOnError",description:"Disable emitting files if any type checking errors are reported"},{name:"--noErrorTruncation",description:"Disable truncating types in error messages"},{name:"--noFallthroughCasesInSwitch",description:"Enable error reporting for fallthrough cases in switch statements"},{name:"--noImplicitAny",description:"Enable error reporting for expressions and declarations with an implied any type"},{name:"--noImplicitOverride",description:"Ensure overriding members in derived classes are marked with an override modifier"},{name:"--noImplicitReturns",description:"Enable error reporting for codepaths that do not explicitly return in a function"},{name:"--noImplicitThis",description:"Enable error reporting when this is given the type any"},{name:"--noImplicitUseStrict",description:"Disable adding 'use strict' directives in emitted JavaScript files"},{name:"--noLib",description:"Disable including any library files, including the default lib.d.ts"},{name:"--noPropertyAccessFromIndexSignature",description:"Enforces using indexed accessors for keys declared using an indexed type"},{name:"--noResolve",description:"Disallow imports, requires or <reference>s from expanding the number of files TypeScript should add to a project"},{name:"--noStrictGenericChecks",description:"Disable strict checking of generic signatures in function types"},{name:"--noUncheckedIndexedAccess",description:"Add undefined to a type when accessed using an index"},{name:"--noUnusedLocals",description:"Enable error reporting when a local variables aren't read"},{name:"--noUnusedParameters",description:"Raise an error when a function parameter isn't read"},{name:"--outDir",description:"Specify an output folder for all emitted files",args:{name:"string",template:"folders"}},{name:"--outFile",description:"Specify a file that bundles all outputs into one JavaScript file. If declaration is true, also designates a file that bundles all .d.ts output",args:{name:"string",template:"filepaths"}},{name:"--paths",description:"Specify a set of entries that re-map imports to additional lookup locations",args:{name:"object"}},{name:"--plugins",description:"Specify a list of language service plugins to include",args:{name:"plugins",isVariadic:!0}},{name:"--preserveConstEnums",description:"Disable erasing const enum declarations in generated code"},{name:"--preserveSymlinks",description:"Disable resolving symlinks to their realpath. This correlates to the same flag in node"},{name:"--preserveWatchOutput",description:"Disable wiping the console in watch mode"},{name:"--pretty",description:"Enable color and formatting in output to make compiler errors easier to read"},{name:"--reactNamespace",description:"Specify the object invoked for createElement. This only applies when targeting react JSX emit",args:{name:"object",default:"React"}},{name:"--removeComments",description:"Disable emitting comments"},{name:"--resolveJsonModule",description:"Enable importing .json files"},{name:"--rootDir",description:"Specify the root folder within your source files",args:{name:"string",template:"folders"}},{name:"--rootDirs",description:"Allow multiple folders to be treated as one when resolving modules",args:{name:"string",template:"folders",isVariadic:!0}},{name:"--skipDefaultLibCheck",description:"Skip type checking .d.ts files that are included with TypeScript"},{name:"--skipLibCheck",description:"Skip type checking all .d.ts files"},{name:"--sourceMap",description:"Create source map files for emitted JavaScript files"},{name:"--sourceRoot",description:"Specify the root path for debuggers to find the reference source code",args:{name:"string",template:["filepaths","folders"]}},{name:"--strict",description:"Enable all strict type checking options"},{name:"--strictBindCallApply",description:"Check that the arguments for bind, call, and apply methods match the original function"},{name:"--strictFunctionTypes",description:"When assigning functions, check to ensure parameters and the return values are subtype-compatible"},{name:"--strictNullChecks",description:"When type checking, take into account null and undefined"},{name:"--strictPropertyInitialization",description:"Check for class properties that are declared but not set in the constructor"},{name:"--stripInternal",description:"Disable emitting declarations that have @internal in their JSDoc comments"},{name:"--suppressExcessPropertyErrors",description:"Disable reporting of excess property errors during the creation of object literals"},{name:"--suppressImplicitAnyIndexErrors",description:"Suppress noImplicitAny errors when indexing objects that lack index signatures"},{name:"--target",description:"Set the JavaScript language version for emitted JavaScript and include compatible library declarations",args:{default:"ES3",suggestions:["ES3","ES5","ES6","ES2015","ES7","ES2016","ES2017","ES2018","ES2019","ES2020","ESNext"]}},{name:"--traceResolution",description:"Log paths used during the moduleResolution process"},{name:"--tsBuildInfoFile",description:"Specify the folder for .tsbuildinfo incremental compilation files",args:{name:"string",template:"folders"}},{name:"--typeRoots",description:"Specify multiple folders that act like ./node_modules/@types",args:{name:"folders",template:"folders",isVariadic:!0}},{name:"--types",description:"Specify type package names to be included without being referenced in a source file",args:{name:"package names",isVariadic:!0}},{name:"--useDefineForClassFields",description:"Emit ECMAScript-standard-compliant class fields"},{name:"--useUnknownInCatchVariables",description:"Default catch clause variables as unknown instead of any"}],args:{name:"tsc script",isScript:!0,generators:(0,K.filepaths)({extensions:["ts"],editFileSuggestions:{priority:76},editFolderSuggestions:{priority:70}})}},Te=Oe;export{Te as default};
|
|
1
|
+
var Z=Object.create;var L=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var j=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ne=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ee(t))!ie.call(e,r)&&r!==i&&L(e,r,{get:()=>t[r],enumerable:!(n=Y(t,r))||n.enumerable});return e};var re=(e,t,i)=>(i=e!=null?Z(te(e)):{},ne(t||!e||!e.__esModule?L(i,"default",{value:e,enumerable:!0}):i,e));var U=j(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.shellExpand=_.ensureTrailingSlash=void 0;var oe=e=>e.endsWith("/")?e:`${e}/`;_.ensureTrailingSlash=oe;var se=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,ae=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,r=>{var o;let a=r.slice(1);return(o=t[a])!==null&&o!==void 0?o:r}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(r,o,a)=>{var l,d;return(d=(l=t[o])!==null&&l!==void 0?l:a)!==null&&d!==void 0?d:r}),ce=(e,t)=>{var i;let{environmentVariables:n}=t;return ae(se(e,(i=n?.HOME)!==null&&i!==void 0?i:"~"),n)};_.shellExpand=ce});var W=j(S=>{"use strict";var le=S&&S.__awaiter||function(e,t,i,n){function r(o){return o instanceof i?o:new i(function(a){a(o)})}return new(i||(i=Promise))(function(o,a){function l(s){try{c(n.next(s))}catch(p){a(p)}}function d(s){try{c(n.throw(s))}catch(p){a(p)}}function c(s){s.done?o(s.value):r(s.value).then(l,d)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(S,"__esModule",{value:!0});S.filepaths=S.folders=S.getCurrentInsertedDirectory=void 0;S.sortFilesAlphabetically=N;var J=U();function N(e,t=[]){let i=t.map(r=>r.toLowerCase()),n=e.filter(r=>!i.includes(r.toLowerCase()));return[...n.filter(r=>!r.startsWith(".")).sort((r,o)=>r.localeCompare(o)),...n.filter(r=>r.startsWith(".")).sort((r,o)=>r.localeCompare(o)),"../"]}var de=(e,t,i)=>{if(e===null)return"/";let n=(0,J.shellExpand)(t,i),r=n.slice(0,n.lastIndexOf("/")+1);return r===""?(0,J.ensureTrailingSlash)(e):r.startsWith("/")?r:`${(0,J.ensureTrailingSlash)(e)}${r}`};S.getCurrentInsertedDirectory=de;function C(e={}){let{extensions:t=[],equals:i=[],matches:n,filterFolders:r=!1,editFileSuggestions:o,editFolderSuggestions:a,rootDirectory:l,showFolders:d="always"}=e,c=new Set(t),s=new Set(i),p=()=>t.length>0||i.length>0||n,g=(f=[])=>p()?f.filter(({name:h="",type:b})=>{if(!r&&b==="folder"||s.has(h)||n&&h.match(n))return!0;let[,...u]=h.split(".");if(u.length>=1){let v=u.length-1,w=u[v];do{if(c.has(w))return!0;v-=1,w=[u[v],w].join(".")}while(v>=0)}return!1}):f,x=(f=[])=>!o&&!a?f:f.map(h=>Object.assign(Object.assign({},h),(h.type==="file"?o:a)||{}));return{trigger:(f,h)=>{let b=f.lastIndexOf("/"),u=h.lastIndexOf("/");return b!==u?!0:b===-1&&u===-1?!1:f.slice(0,b)!==h.slice(0,u)},getQueryTerm:f=>f.slice(f.lastIndexOf("/")+1),custom:(f,h,b)=>le(this,void 0,void 0,function*(){var u;let{isDangerous:v,currentWorkingDirectory:w,searchTerm:m}=b,O=(u=(0,S.getCurrentInsertedDirectory)(l??w,m,b))!==null&&u!==void 0?u:"/";try{let R=yield h({command:"ls",args:["-1ApL"],cwd:O}),Q=N(R.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),V=[];for(let k of Q)if(k){let T=k.endsWith("/")?"folders":"filepaths";(T==="filepaths"&&d!=="only"||T==="folders"&&d!=="never")&&V.push({type:T==="filepaths"?"file":"folder",name:k,insertValue:k,isDangerous:v,context:{templateType:T}})}return x(g(V))}catch{return[]}})}}S.folders=Object.assign(()=>C({showFolders:"only"}),Object.freeze(C({showFolders:"only"})));S.filepaths=Object.assign(C,Object.freeze(C()))});var z=j(E=>{"use strict";var I=E&&E.__awaiter||function(e,t,i,n){function r(o){return o instanceof i?o:new i(function(a){a(o)})}return new(i||(i=Promise))(function(o,a){function l(s){try{c(n.next(s))}catch(p){a(p)}}function d(s){try{c(n.throw(s))}catch(p){a(p)}}function c(s){s.done?o(s.value):r(s.value).then(l,d)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(E,"__esModule",{value:!0});E.valueList=pe;E.keyValue=ue;E.keyValueList=fe;var X=new Map;function A(e,t){return e.length===0?t:t.map(i=>i.insertValue?i:Object.assign(Object.assign({},i),{insertValue:i.name+e}))}function q(e,t,i){return I(this,void 0,void 0,function*(){if(typeof e=="function"){let n=yield e(...i);return A(t,n)}if(typeof e[0]=="string"){let n=e.map(r=>({name:r}));return A(t,n)}return A(t,e)})}function M(e,t,i,n){return I(this,void 0,void 0,function*(){if(i||Array.isArray(e)){let r=X.get(e);return r===void 0&&(r=yield q(e,t,n),X.set(e,r)),r}return q(e,t,n)})}function B(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function F(e,...t){return Math.max(...t.map(i=>e.lastIndexOf(i)))}function P(e,t){let i=new Set(e);return t.filter(n=>{var r;return typeof n.name=="string"?!i.has(n.name):!(!((r=n.name)===null||r===void 0)&&r.some(o=>i.has(o)))})}function pe({delimiter:e=",",values:t=[],cache:i=!1,insertDelimiter:n=!1,allowRepeatedValues:r=!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 l=yield M(t,n?e:"",i,o);if(r)return l;let[d]=o,c=(a=d[d.length-1])===null||a===void 0?void 0:a.split(e);return P(c,l)})}}function ue({separator:e="=",keys:t=[],values:i=[],cache:n=!1,insertSeparator:r=!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),c=d?t:i,s=B(d,n);return M(c,d&&r?e:"",s,o)})}}function fe({separator:e="=",delimiter:t=",",keys:i=[],values:n=[],cache:r=!1,insertSeparator:o=!0,insertDelimiter:a=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:d=!0}){return{trigger:(c,s)=>{let p=F(c,e,t),g=F(s,e,t);return p!==g},getQueryTerm:c=>{let s=F(c,e,t);return c.slice(s+1)},custom:(...c)=>I(this,void 0,void 0,function*(){let[s]=c,p=s[s.length-1],g=F(p,e,t),x=g===-1||p.slice(g,g+e.length)!==e,f=x?i:n,h=B(x,r),u=yield M(f,x?o?e:"":a?t:"",h,c);if(x){if(l)return u;let w=p.split(t).map(m=>m.slice(0,m.indexOf(e)));return P(w,u)}if(d)return u;let v=p.split(t).map(w=>w.slice(w.indexOf(e)+e.length));return P(v,u)})}}});var G=j(D=>{"use strict";var me=D&&D.__awaiter||function(e,t,i,n){function r(o){return o instanceof i?o:new i(function(a){a(o)})}return new(i||(i=Promise))(function(o,a){function l(s){try{c(n.next(s))}catch(p){a(p)}}function d(s){try{c(n.throw(s))}catch(p){a(p)}}function c(s){s.done?o(s.value):r(s.value).then(l,d)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(D,"__esModule",{value:!0});D.ai=Se;var he=4097,ge=4,ye=.8,ve=he*ge*ye;function Se({name:e,prompt:t,message:i,postProcess:n,temperature:r,splitOn:o}){return{scriptTimeout:15e3,custom:(a,l,d)=>me(this,void 0,void 0,function*(){var c,s;let p=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(p.stdout))return[];let g=typeof t=="function"?yield t({tokens:a,executeCommand:l,generatorContext:d}):t,x=typeof i=="function"?yield i({tokens:a,executeCommand:l,generatorContext:d}):i;if(x===null||x.length===0)return console.warn("No message provided to AI generator"),[];let f=ve-((c=g?.length)!==null&&c!==void 0?c:0),h={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...g?[{role:"system",content:g}]:[],{role:"user",content:x.slice(0,f)}],temperature:r},b=JSON.stringify(h),u=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",b]}),v=JSON.parse(u.stdout);return(s=v?.choices.map(m=>{var O;return(O=m?.message)===null||O===void 0?void 0:O.content}).filter(m=>typeof m=="string").flatMap(m=>o?m.split(o).filter(O=>O.trim().length>0):[m]).map(m=>{if(n)return n(m);let O=m.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:O,insertValue:`'${O}'`,description:"Generated by Fig AI"}}))!==null&&s!==void 0?s:[]})}}});var $=j(y=>{"use strict";var be=y&&y.__createBinding||(Object.create?function(e,t,i,n){n===void 0&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){n===void 0&&(n=i),e[n]=t[i]}),we=y&&y.__exportStar||function(e,t){for(var i in e)i!=="default"&&!Object.prototype.hasOwnProperty.call(t,i)&&be(t,e,i)};Object.defineProperty(y,"__esModule",{value:!0});y.ai=y.folders=y.filepaths=void 0;var H=W();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return H.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return H.folders}});we(z(),y);var xe=G();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return xe.ai}})});var K=re($(),1),Oe={name:"tsc",description:"CLI tool for TypeScript compiler",options:[{name:"--all",description:"Show all compiler options"},{name:"--generateTrace",description:"Generates an event trace and a list of types"},{name:"--help",description:"Gives local information for help on the CLI"},{name:"--init",description:"Initializes a TypeScript project and creates a tsconfig.json file"},{name:"--listFilesOnly",description:"Print names of files that are part of the compilation and then stop processing"},{name:"--locale",description:"Set the language of the messaging from TypeScript. This does not affect emit"},{name:"--project",description:"Compile the project given the path to its configuration file, or to a folder with a tsconfig.json",args:{name:"path",template:["filepaths","folders"]}},{name:"--showConfig",description:"Print the final configuration instead of building"},{name:"--version",description:"Print the compiler's version"},{name:"--build",description:"Build one or more projects and their dependencies, if out of date"},{name:"--clean",description:"Delete the outputs of all projects"},{name:"--dry",description:"Show what would be built (or deleted, if specified with '--clean')"},{name:"--force",description:"Build all projects, including those that appear to be up to date"},{name:"--verbose",description:"Enable verbose logging"},{name:"--excludeDirectories",description:"Remove a list of directories from the watch process",args:{name:"dir",template:"folders",isVariadic:!0}},{name:"--excludeFiles",description:"Remove a list of files from the watch mode's processing",args:{name:"files",template:"filepaths",isVariadic:!0}},{name:"--fallbackPolling",description:"Specify what approach the watcher should use if the system runs out of native file watchers",args:{name:"approach",suggestions:["fixedPollingInterval","priorityPollingInterval","dynamicPriorityPolling"]}},{name:"--synchronousWatchDirectory",description:"Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively"},{name:"--watch",description:"Watch input files"},{name:"--watchDirectory",description:"Specify how directories are watched on systems that lack recursive file-watching functionality",args:{name:"approach",suggestions:["fixedPollingInterval","dynamicPriorityPolling","useFsEvents"]}},{name:"--watchFile",description:"Specify how the TypeScript watch mode works",args:{name:"approach",suggestions:["fixedPollingInterval","priorityPollingInterval","dynamicPriorityPolling","useFsEvents","useFsEventsOnParentDirectory"]}},{name:"--allowJs",description:"Allow JavaScript files to be a part of your program. Use the checkJS option to get errors from these files"},{name:"--allowSyntheticDefaultImports",description:"Allow 'import x from y' when a module doesn't have a default export"},{name:"--allowUmdGlobalAccess",description:"Allow accessing UMD globals from modules"},{name:"--allowUnreachableCode",description:"Disable error reporting for unreachable code"},{name:"--allowUnusedLabels",description:"Disable error reporting for unused label"},{name:"--alwaysStrict",description:"Ensure 'use strict' is always emitted"},{name:"--assumeChangesOnlyAffectDirectDependencies",description:"Have recompiles in projects that use incremental and watch mode assume that changes within a file will only affect files directly depending on it"},{name:"--baseUrl",description:"Specify the base directory to resolve non-relative module names",args:{name:"directory",template:"filepaths"}},{name:"--checkJs",description:"Enable error reporting in type-checked JavaScript files"},{name:"--composite",description:"Enable constraints that allow a TypeScript project to be used with project references"},{name:"--declaration",description:"Generate .d.ts files from TypeScript and JavaScript files in your project"},{name:"--declarationDir",description:"Specify the output directory for generated declaration files",args:{name:"string",template:"folders"}},{name:"--declarationMap",description:"Create sourcemaps for d.ts files"},{name:"--diagnostics",description:"Output compiler performance information after building"},{name:"--disableReferencedProjectLoad",description:"Reduce the number of projects loaded automatically by TypeScript"},{name:"--disableSizeLimit",description:"Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server"},{name:"--disableSolutionSearching",description:"Opt a project out of multi-project reference checking when editing"},{name:"--disableSourceOfProjectReferenceRedirect",description:"Disable preferring source files instead of declaration files when referencing composite projects"},{name:"--downlevelIteration",description:"Emit more compliant, but verbose and less performant JavaScript for iteration"},{name:"--emitBOM",description:"Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files"},{name:"--emitDeclarationOnly",description:"Only output d.ts files and not JavaScript files"},{name:"--emitDecoratorMetadata",description:"Emit design-type metadata for decorated declarations in source files"},{name:"--esModuleInterop",description:"Emit additional JavaScript to ease support for importing CommonJS modules. This enables allowSyntheticDefaultImports for type compatibility"},{name:"--exactOptionalPropertyTypes",description:"Differentiate between undefined and not present when type checking"},{name:"--experimentalDecorators",description:"Enable experimental support for TC39 stage 2 draft decorators"},{name:"--explainFiles",description:"Print files read during the compilation including why it was included"},{name:"--extendedDiagnostics",description:"Output more detailed compiler performance information after building"},{name:"--forceConsistentCasingInFileNames",description:"Ensure that casing is correct in imports"},{name:"--generateCpuProfile",description:"Emit a v8 CPU profile of the compiler run for debugging"},{name:"--importHelpers",description:"Allow importing helper functions from tslib once per project, instead of including them per-file"},{name:"--importsNotUsedAsValues",description:"Specify emit/checking behavior for imports that are only used for types",args:{name:"type",suggestions:["remove","preserve","error"]}},{name:"--incremental",description:"Save .tsbuildinfo files to allow for incremental compilation of projects"},{name:"--inlineSourceMap",description:"Include sourcemap files inside the emitted JavaScript"},{name:"--inlineSources",description:"Include source code in the sourcemaps inside the emitted JavaScript"},{name:"--isolatedModules",description:"Ensure that each file can be safely transpiled without relying on other imports"},{name:"--jsx",description:"Specify what JSX code is generated",args:{name:"type",suggestions:["react","react-jsx","react-jsxdev","react-native","preserve"]}},{name:"--jsxFactory",description:"Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'",args:{name:"JSX factory function",default:"React.createElement"}},{name:"--jsxFragmentFactory",description:"Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'",args:{name:"JSX fragment"}},{name:"--jsxImportSource",description:"Specify module specifier used to import the JSX factory functions when using jsx: react-jsx*",args:{name:"string",default:"react"}},{name:"--keyofStringsOnly",description:"Make keyof only return strings instead of string, numbers or symbols. Legacy option"},{name:"--lib",description:"Specify a set of bundled library declaration files that describe the target runtime environment",args:{name:"list",template:"filepaths",isVariadic:!0}},{name:"--listEmittedFiles",description:"Print the names of emitted files after a compilation"},{name:"--listFiles",description:"Print all of the files read during the compilation"},{name:"--mapRoot",description:"Specify the location where debugger should locate map files instead of generated locations",args:{name:"string",template:"folders"}},{name:"--maxNodeModuleJsDepth",description:"Specify the maximum folder depth used for checking JavaScript files from node_modules. Only applicable with allowJs",dependsOn:["--allowJs"],args:{name:"number",default:"0"}},{name:"--module",description:"Specify what module code is generated",args:{name:"module",default:"CommonJS",suggestions:["ES6","ES2015","ES2020","None","UMD","AMD","System","ESNext","CommonJS"]}},{name:"--moduleResolution",description:"Specify how TypeScript looks up a file from a given module specifier",args:{name:"module"}},{name:"--newLine",description:"Set the newline character for emitting files",args:{name:"character"}},{name:"--noEmit",description:"Disable emitting file from a compilation"},{name:"--noEmitHelpers",description:"Disable generating custom helper functions like __extends in compiled output"},{name:"--noEmitOnError",description:"Disable emitting files if any type checking errors are reported"},{name:"--noErrorTruncation",description:"Disable truncating types in error messages"},{name:"--noFallthroughCasesInSwitch",description:"Enable error reporting for fallthrough cases in switch statements"},{name:"--noImplicitAny",description:"Enable error reporting for expressions and declarations with an implied any type"},{name:"--noImplicitOverride",description:"Ensure overriding members in derived classes are marked with an override modifier"},{name:"--noImplicitReturns",description:"Enable error reporting for codepaths that do not explicitly return in a function"},{name:"--noImplicitThis",description:"Enable error reporting when this is given the type any"},{name:"--noImplicitUseStrict",description:"Disable adding 'use strict' directives in emitted JavaScript files"},{name:"--noLib",description:"Disable including any library files, including the default lib.d.ts"},{name:"--noPropertyAccessFromIndexSignature",description:"Enforces using indexed accessors for keys declared using an indexed type"},{name:"--noResolve",description:"Disallow imports, requires or <reference>s from expanding the number of files TypeScript should add to a project"},{name:"--noStrictGenericChecks",description:"Disable strict checking of generic signatures in function types"},{name:"--noUncheckedIndexedAccess",description:"Add undefined to a type when accessed using an index"},{name:"--noUnusedLocals",description:"Enable error reporting when a local variables aren't read"},{name:"--noUnusedParameters",description:"Raise an error when a function parameter isn't read"},{name:"--outDir",description:"Specify an output folder for all emitted files",args:{name:"string",template:"folders"}},{name:"--outFile",description:"Specify a file that bundles all outputs into one JavaScript file. If declaration is true, also designates a file that bundles all .d.ts output",args:{name:"string",template:"filepaths"}},{name:"--paths",description:"Specify a set of entries that re-map imports to additional lookup locations",args:{name:"object"}},{name:"--plugins",description:"Specify a list of language service plugins to include",args:{name:"plugins",isVariadic:!0}},{name:"--preserveConstEnums",description:"Disable erasing const enum declarations in generated code"},{name:"--preserveSymlinks",description:"Disable resolving symlinks to their realpath. This correlates to the same flag in node"},{name:"--preserveWatchOutput",description:"Disable wiping the console in watch mode"},{name:"--pretty",description:"Enable color and formatting in output to make compiler errors easier to read"},{name:"--reactNamespace",description:"Specify the object invoked for createElement. This only applies when targeting react JSX emit",args:{name:"object",default:"React"}},{name:"--removeComments",description:"Disable emitting comments"},{name:"--resolveJsonModule",description:"Enable importing .json files"},{name:"--rootDir",description:"Specify the root folder within your source files",args:{name:"string",template:"folders"}},{name:"--rootDirs",description:"Allow multiple folders to be treated as one when resolving modules",args:{name:"string",template:"folders",isVariadic:!0}},{name:"--skipDefaultLibCheck",description:"Skip type checking .d.ts files that are included with TypeScript"},{name:"--skipLibCheck",description:"Skip type checking all .d.ts files"},{name:"--sourceMap",description:"Create source map files for emitted JavaScript files"},{name:"--sourceRoot",description:"Specify the root path for debuggers to find the reference source code",args:{name:"string",template:["filepaths","folders"]}},{name:"--strict",description:"Enable all strict type checking options"},{name:"--strictBindCallApply",description:"Check that the arguments for bind, call, and apply methods match the original function"},{name:"--strictFunctionTypes",description:"When assigning functions, check to ensure parameters and the return values are subtype-compatible"},{name:"--strictNullChecks",description:"When type checking, take into account null and undefined"},{name:"--strictPropertyInitialization",description:"Check for class properties that are declared but not set in the constructor"},{name:"--stripInternal",description:"Disable emitting declarations that have @internal in their JSDoc comments"},{name:"--suppressExcessPropertyErrors",description:"Disable reporting of excess property errors during the creation of object literals"},{name:"--suppressImplicitAnyIndexErrors",description:"Suppress noImplicitAny errors when indexing objects that lack index signatures"},{name:"--target",description:"Set the JavaScript language version for emitted JavaScript and include compatible library declarations",args:{default:"ES3",suggestions:["ES3","ES5","ES6","ES2015","ES7","ES2016","ES2017","ES2018","ES2019","ES2020","ESNext"]}},{name:"--traceResolution",description:"Log paths used during the moduleResolution process"},{name:"--tsBuildInfoFile",description:"Specify the folder for .tsbuildinfo incremental compilation files",args:{name:"string",template:"folders"}},{name:"--typeRoots",description:"Specify multiple folders that act like ./node_modules/@types",args:{name:"folders",template:"folders",isVariadic:!0}},{name:"--types",description:"Specify type package names to be included without being referenced in a source file",args:{name:"package names",isVariadic:!0}},{name:"--useDefineForClassFields",description:"Emit ECMAScript-standard-compliant class fields"},{name:"--useUnknownInCatchVariables",description:"Default catch clause variables as unknown instead of any"}],args:{name:"tsc script",isScript:!0,generators:(0,K.filepaths)({extensions:["ts"],editFileSuggestions:{priority:76},editFolderSuggestions:{priority:70}})}},Te=Oe;export{Te as default};
|
package/build/tsx.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Y=Object.create;var $=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),W=[];for(let F of
|
|
1
|
+
var Y=Object.create;var $=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ie=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of te(t))!re.call(e,i)&&i!==n&&$(e,i,{get:()=>t[i],enumerable:!(r=ee(t,i))||r.enumerable});return e};var se=(e,t,n)=>(n=e!=null?Y(ne(e)):{},ie(t||!e||!e.__esModule?$(n,"default",{value:e,enumerable:!0}):n,e));var K=I(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.shellExpand=j.ensureTrailingSlash=void 0;var oe=e=>e.endsWith("/")?e:`${e}/`;j.ensureTrailingSlash=oe;var le=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,ue=(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}),ce=(e,t)=>{var n;let{environmentVariables:r}=t;return ue(le(e,(n=r?.HOME)!==null&&n!==void 0?n:"~"),r)};j.shellExpand=ce});var J=I(m=>{"use strict";var ae=m&&m.__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(m,"__esModule",{value:!0});m.filepaths=m.folders=m.getCurrentInsertedDirectory=void 0;m.sortFilesAlphabetically=z;var D=K();function z(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 fe=(e,t,n)=>{if(e===null)return"/";let r=(0,D.shellExpand)(t,n),i=r.slice(0,r.lastIndexOf("/")+1);return i===""?(0,D.ensureTrailingSlash)(e):i.startsWith("/")?i:`${(0,D.ensureTrailingSlash)(e)}${i}`};m.getCurrentInsertedDirectory=fe;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=(h=[])=>f()?h.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 _=d.length-1,b=d[_];do{if(u.has(b))return!0;_-=1,b=[d[_],b].join(".")}while(_>=0)}return!1}):h,S=(h=[])=>!s&&!l?h:h.map(g=>Object.assign(Object.assign({},g),(g.type==="file"?s:l)||{}));return{trigger:(h,g)=>{let O=h.lastIndexOf("/"),d=g.lastIndexOf("/");return O!==d?!0:O===-1&&d===-1?!1:h.slice(0,O)!==g.slice(0,d)},getQueryTerm:h=>h.slice(h.lastIndexOf("/")+1),custom:(h,g,O)=>ae(this,void 0,void 0,function*(){var d;let{isDangerous:_,currentWorkingDirectory:b,searchTerm:p}=O,w=(d=(0,m.getCurrentInsertedDirectory)(c??b,p,O))!==null&&d!==void 0?d:"/";try{let N=yield g({command:"ls",args:["-1ApL"],cwd:w}),k=z(N.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),W=[];for(let F of k)if(F){let V=F.endsWith("/")?"folders":"filepaths";(V==="filepaths"&&a!=="only"||V==="folders"&&a!=="never")&&W.push({type:V==="filepaths"?"file":"folder",name:F,insertValue:F,isDangerous:_,context:{templateType:V}})}return S(v(W))}catch{return[]}})}}m.folders=Object.assign(()=>M({showFolders:"only"}),Object.freeze(M({showFolders:"only"})));m.filepaths=Object.assign(M,Object.freeze(M()))});var G=I(x=>{"use strict";var T=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=de;x.keyValue=he;x.keyValueList=pe;var Q=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 H(e,t,n){return T(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 E(e,t,n,r){return T(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let i=Q.get(e);return i===void 0&&(i=yield H(e,t,r),Q.set(e,i)),i}return H(e,t,r)})}function B(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 de({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)=>T(this,void 0,void 0,function*(){var l;let c=yield E(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 he({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)=>T(this,void 0,void 0,function*(){let[l]=s,a=!l[l.length-1].includes(e),u=a?t:n,o=B(a,r);return E(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)=>T(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,h=S?n:r,g=B(S,i),d=yield E(h,S?s?e:"":l?t:"",g,u);if(S){if(c)return d;let b=f.split(t).map(p=>p.slice(0,p.indexOf(e)));return P(b,d)}if(a)return d;let _=f.split(t).map(b=>b.slice(b.indexOf(e)+e.length));return P(_,d)})}}});var X=I(A=>{"use strict";var ge=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=Oe;var ve=4097,ye=4,_e=.8,me=ve*ye*_e;function Oe({name:e,prompt:t,message:n,postProcess:r,temperature:i,splitOn:s}){return{scriptTimeout:15e3,custom:(l,c,a)=>ge(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 h=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,h)}],temperature:i},O=JSON.stringify(g),d=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",O]}),_=JSON.parse(d.stdout);return(o=_?.choices.map(p=>{var w;return(w=p?.message)===null||w===void 0?void 0:w.content}).filter(p=>typeof p=="string").flatMap(p=>s?p.split(s).filter(w=>w.trim().length>0):[p]).map(p=>{if(r)return r(p);let w=p.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:w,insertValue:`'${w}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}});var U=I(y=>{"use strict";var be=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]}),Se=y&&y.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&be(t,e,n)};Object.defineProperty(y,"__esModule",{value:!0});y.ai=y.folders=y.filepaths=void 0;var Z=J();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return Z.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return Z.folders}});Se(G(),y);var we=X();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return we.ai}})});var R=se(U(),1),q={name:"script path",isScript:!0,generators:(0,R.filepaths)({extensions:["ts"],editFileSuggestions:{priority:76},editFolderSuggestions:{priority:70}})},xe={name:"tsx",description:"Run TypeScript file using tsx",subcommands:[{name:"watch",description:"Run the script and watch for changes",args:q}],options:[{name:["--help","-h"],description:"Show help for tsx",isPersistent:!0},{name:"--no-cache",description:"Disable caching",isPersistent:!0},{name:"--clear-screen",description:"Disable clearing the screen on rerun",isPersistent:!0,insertValue:"--clear-screen=false",dependsOn:["watch"],args:q},{name:["-v","--version"],description:"Show version"},{name:"--tsconfig",description:"Custom tsconfig.json path",args:{name:"tsconfig.json path",generators:(0,R.filepaths)({extensions:["json"],editFileSuggestions:{priority:76},editFolderSuggestions:{priority:70}})}}],args:q},Me=xe;export{Me as default};
|