@tabsmith/autocomplete-specs 1.0.0 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@magnolia/cli.js +2 -2
- package/build/@withfig/autocomplete-tools.js +2 -2
- package/build/airflow.js +2 -2
- package/build/ansible-playbook.js +2 -2
- package/build/apt.js +4 -4
- package/build/asr.js +2 -2
- package/build/bun.js +9 -9
- package/build/cargo.js +4 -4
- package/build/cd.js +2 -2
- package/build/chezmoi.js +2 -2
- package/build/cloudflared.js +2 -2
- package/build/coda.js +3 -3
- package/build/codesign.js +2 -2
- package/build/dapr.js +2 -2
- package/build/deno/generators.js +4 -4
- package/build/deno.js +2 -2
- package/build/deployctl.js +2 -2
- package/build/direnv.js +2 -2
- package/build/docker.js +18 -18
- package/build/dotenv-vault.js +2 -2
- package/build/dotnet/dotnet-add.js +2 -2
- package/build/dotnet/dotnet-build.js +2 -2
- package/build/dotnet/dotnet-clean.js +2 -2
- package/build/dotnet/dotnet-format.js +2 -2
- package/build/dotnet/dotnet-list.js +2 -2
- package/build/dotnet/dotnet-migrate.js +2 -2
- package/build/dotnet/dotnet-nuget.js +3 -3
- package/build/dotnet/dotnet-pack.js +2 -2
- package/build/dotnet/dotnet-publish.js +2 -2
- package/build/dotnet/dotnet-remove.js +2 -2
- package/build/dotnet/dotnet-restore.js +2 -2
- package/build/dotnet/dotnet-sln.js +2 -2
- package/build/dotnet/dotnet-store.js +2 -2
- package/build/dotnet/dotnet-test.js +2 -2
- package/build/dotnet/dotnet-tool.js +3 -3
- package/build/dotnet.js +2 -2
- package/build/dtm.js +3 -3
- package/build/dynamic/index.js +1 -1
- package/build/elixir.js +2 -2
- package/build/elm-json.js +2 -2
- package/build/esbuild.js +3 -3
- package/build/file.js +2 -2
- package/build/flutter.js +5 -5
- package/build/gh.js +4 -4
- package/build/git.js +20 -20
- package/build/glow.js +2 -2
- package/build/hub.js +20 -20
- package/build/iex.js +2 -2
- package/build/index.js +1 -1
- package/build/index.json +1 -1
- package/build/java.js +2 -2
- package/build/julia.js +2 -2
- package/build/limactl.js +3 -3
- package/build/man.js +3 -3
- package/build/meteor.js +3 -3
- package/build/mgnl.js +2 -2
- package/build/mix.js +2 -2
- package/build/mongoimport.js +2 -2
- package/build/n.js +3 -3
- package/build/ni.js +2 -2
- package/build/node.js +2 -2
- package/build/npm.js +2 -2
- package/build/nr.js +3 -3
- package/build/nrm.js +2 -2
- package/build/opencode.js +2 -2
- package/build/osascript.js +2 -2
- package/build/osqueryi.js +2 -2
- package/build/pandoc.js +3 -3
- package/build/pdfunite.js +2 -2
- package/build/pi.js +2 -2
- package/build/pipenv.js +2 -2
- package/build/pm2.js +2 -2
- package/build/pnpm.js +23 -24
- package/build/pod.js +2 -2
- package/build/pre-commit.js +126 -126
- package/build/python.js +2 -2
- package/build/python3.js +2 -2
- package/build/r.js +3 -3
- package/build/rails.js +3 -3
- package/build/rancher.js +3 -3
- package/build/react-native.js +5 -5
- package/build/robot.js +2 -2
- package/build/rojo.js +2 -2
- package/build/rollup.js +2 -2
- package/build/rscript.js +2 -2
- package/build/rush.js +5 -5
- package/build/rushx.js +4 -4
- package/build/scc.js +2 -2
- package/build/shortcuts.js +2 -2
- package/build/sidekiq.js +2 -2
- package/build/sqlite3.js +2 -2
- package/build/streamlit.js +2 -2
- package/build/subl.js +2 -2
- package/build/swift.js +2 -2
- package/build/systemctl.js +2 -2
- package/build/ts-node.js +3 -3
- package/build/tsc.js +2 -2
- package/build/tsx.js +2 -2
- package/build/turbo.js +20 -20
- package/build/typst.js +2 -2
- package/build/vsce.js +20 -20
- package/build/wasm-bindgen.js +2 -2
- package/build/yarn.js +4 -4
- package/build/yomo.js +2 -2
- package/package.json +20 -20
- package/build/ai-agents specs.js +0 -1
package/build/mgnl.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
`).map(d=>({name:d,icon:"\u{1F4E6}",description:"Global dependency"}))}}},V={cache:{strategy:"stale-while-revalidate",cacheByDirectory:!0},script:["bash","-c","until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"],postProcess:function(n,[s]){if(n.trim()=="")return[];try{let c=JSON.parse(n),d=c.scripts,a=c.fig||{};if(d)return Object.entries(d).map(([r,f])=>{let u=s==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",m=a[r];return{name:r,icon:u,description:f,priority:51,...m}})}catch(c){console.error(c)}return[]}},S={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},i={name:"--json",description:"Show output in json format"},T={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},h={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},x={name:["-l","--long"],description:"Show extended information"},t=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:U,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],q=[{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"},...t],L=[{name:["-a","-all"],description:"Show all outdated or installed packages"},i,x,h,{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"},S,T,...t],e={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},R={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},o={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},g={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},y={name:"--script-shell",description:"The shell to use for scripts run with the npm exec, npm run and npm init <pkg> commands",args:{name:"script-shell"}},k={name:"--dry-run",description:"Indicates that you don't want npm to make any changes and that it should only report what it would have done"},G={name:"npm",parserDirectives:{flagsArePosixNoncompliant:!0},description:"Node package manager",subcommands:[{name:["install","i","add"],description:"Install a package and its dependencies",args:{name:"package",isOptional:!0,generators:b,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"},S,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder"},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package"},{name:"--legacy-peer-deps",description:"Bypass peerDependency auto-installation. Emulate install behavior of NPM v4 through v6"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},e,R,T,g,{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"},k,...t]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...t,{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:""},g,y,{name:"--",args:{name:"args",isVariadic:!0}}],args:{name:"script",description:"Script to run from your package.json",filterStrategy:"fuzzy",generators:V}},{name:"init",description:"Trigger the initialization",options:[{name:["-y","--yes"],description:"Automatically answer 'yes' to any prompts that npm might print on the command line"},{name:"-w",description:"Create the folders and boilerplate expected while also adding a reference to your project workspaces property",args:{name:"dir"}}]},{name:"access",description:"Set access controls on private packages"},{name:["adduser","login"],description:"Add a registry user account",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:"audit",description:"Run a security audit",subcommands:[{name:"fix",description:"If the fix argument is provided, then remediations will be applied to the package tree",options:[k,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...t]}],options:[...t,{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"},i,T]},{name:"bin",description:"Print the folder where npm will install executables",options:[S]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:b,debounce:!0,isVariadic:!0},options:[{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm bugs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]},e]},{name:"cache",description:"Manipulates packages cache",subcommands:[{name:"add",description:"Add the specified packages to the local cache"},{name:"clean",description:"Delete all data out of the cache folder"},{name:"verify",description:"Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data"}],options:[{name:"--cache",args:{name:"cache"},description:"The location of npm's cache directory"}]},{name:["ci","clean-install","install-clean"],description:"Install a project with a clean slate",options:[{name:"--audit",description:'When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes',args:{name:"audit",suggestions:["true","false"]},exclusiveOn:["--no-audit"]},{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command",exclusiveOn:["--audit"]},g,y,R,e]},{name:"cit",description:"Install a project with a clean slate and run tests"},{name:"clean-install-test",description:"Install a project with a clean slate and run tests"},{name:"completion",description:"Tab completion for npm"},{name:["config","c"],description:"Manage the npm configuration files",subcommands:[{name:"set",description:"Sets the config key to the value",args:[{name:"key"},{name:"value"}],options:[{name:["-g","--global"],description:"Sets it globally"}]},{name:"get",description:"Echo the config value to stdout",args:{name:"key"}},{name:"list",description:"Show all the config settings",options:[{name:"-g",description:"Lists globally installed packages"},{name:"-l",description:"Also shows defaults"},i]},{name:"delete",description:"Deletes the key from all configuration files",args:{name:"key"}},{name:"edit",description:"Opens the config file in an editor",options:[{name:"--global",description:"Edits the global config"}]}]},{name:"create",description:"Create a package.json file"},{name:["dedupe","ddp"],description:"Reduce duplication in the package tree"},{name:"deprecate",description:"Deprecate a version of a package",options:[e]},{name:"dist-tag",description:"Modify package distribution tags"},{name:["docs","home"],description:"Open documentation for a package in a web browser",args:{name:"package",isOptional:!0,generators:b,debounce:!0,isVariadic:!0},options:[...t,e,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm docs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"doctor",description:"Check your npm environment",options:[e]},{name:"edit",description:"Edit an installed package",options:[{name:"--editor",description:"The command to run for npm edit or npm config edit"}]},{name:"explore",description:"Browse an installed package",args:{name:"package",filterStrategy:"fuzzy",generators:A}},{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:[x]},{name:"hook",description:"Manage registry hooks"},{name:"install-ci-test",description:"Install a project with a clean slate and run tests"},{name:"install-test",description:"Install package(s) and run tests"},{name:"it",description:"Install package(s) and run tests"},{name:"link",description:"Symlink a package folder",args:{name:"path",template:"filepaths"}},{name:"ln",description:"Symlink a package folder"},{name:"logout",description:"Log out of the registry",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:["ls","list"],description:"List installed packages",options:L,args:{name:"[@scope]/pkg",isVariadic:!0}},{name:"org",description:"Manage orgs",subcommands:[{name:"set",description:"Add a user to an org or manage roles",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"},{name:"role",isOptional:!0,suggestions:["developer","admin","owner"]}],options:[e,o]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[e,o]},{name:"ls",description:"List users in an org or see what roles a particular user has in an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name",isOptional:!0}],options:[e,o,i,h]}]},{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"},i,x,h,{name:"-g",description:"Checks globally"},...t]},{name:["owner","author"],description:"Manage package owners",subcommands:[{name:"ls",description:"List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help",args:{name:"[@scope/]pkg"},options:[e]},{name:"add",description:"Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,o]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,o]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[i,k,...t,{name:"--pack-destination",description:"Directory in which npm pack will save tarballs",args:{name:"pack-destination",template:["folders"]}}]},{name:"ping",description:"Ping npm registry",options:[e]},{name:"pkg",description:"Manages your package.json",subcommands:[{name:"get",description:"Retrieves a value key, defined in your package.json file. It is possible to get multiple values and values for child fields",args:{name:"field",description:"Name of the field to get. You can view child fields by separating them with a period",isVariadic:!0},options:[i,...t]},{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:[i,...t,{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:[...t,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]}]},{name:"prefix",description:"Display prefix",options:[{name:["-g","--global"],description:"Print the global prefix to standard out"}]},{name:"profile",description:"Change settings on your registry profile",subcommands:[{name:"get",description:"Display all of the properties of your profile, or one or more specific properties",args:{name:"property",isOptional:!0,description:"Property name"},options:[e,i,h,o]},{name:"set",description:"Set the value of a profile property",args:[{name:"property",description:"Property name",suggestions:["email","fullname","homepage","freenode","twitter","github"]},{name:"value",description:"Property value"}],options:[e,i,h,o],subcommands:[{name:"password",description:"Change your password. This is interactive, you'll be prompted for your current password and a new password"}]},{name:"enable-2fa",description:"Enables two-factor authentication",args:{name:"mode",description:"Mode for two-factor authentication. Defaults to auth-and-writes mode",isOptional:!0,suggestions:[{name:"auth-only",description:"Require an OTP when logging in or making changes to your account's authentication"},{name:"auth-and-writes",description:"Requires an OTP at all the times auth-only does, and also requires one when publishing a module, setting the latest dist-tag, or changing access via npm access and npm owner"}]},options:[e,o]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[e,o]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[T,k,i,{name:"--production",description:"Remove the packages specified in your devDependencies"},...t]},{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"}},...t,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},k,o]},{name:["rebuild","rb"],description:"Rebuild a package",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[S,...t,g,{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:b,debounce:!0,isVariadic:!0},options:[...t,{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:[g,y,{name:"--",args:{name:"arg",description:"Arguments to be passed to the restart script"}}]},{name:"root",description:"Display npm root",options:[{name:["-g","--global"],description:"Print the effective global node_modules folder to standard out"}]},{name:["search","s","se","find"],description:"Search for packages",args:{name:"search terms",isVariadic:!0},options:[x,i,{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"]},h,{name:"--no-description",description:"Do not show descriptions"},{name:"--searchopts",description:"Space-separated options that are always passed to search",args:{name:"searchopts"}},{name:"--searchexclude",description:"Space-separated options that limit the results from search",args:{name:"searchexclude"}},e,{name:"--prefer-online",description:"If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data",exclusiveOn:["--prefer-offline","--offline"]},{name:"--prefer-offline",description:"If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server",exclusiveOn:["--prefer-online","--offline"]},{name:"--offline",description:"Force offline mode: no network requests will be done during install",exclusiveOn:["--prefer-online","--prefer-offline"]}]},{name:"set",description:"Sets the config key to the value"},{name:"set-script",description:"Set tasks in the scripts section of package.json",args:[{name:"script",description:"Name of the task to be added to the scripts section of package.json"},{name:"command",description:"Command to run when script is called"}],options:t},{name:"shrinkwrap",description:"Lock down dependency versions for publication"},{name:"star",description:"Mark your favorite packages",args:{name:"pkg",description:"Package to mark as favorite"},options:[e,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:"stars",description:"View packages marked as favorites",args:{name:"user",isOptional:!0,description:"View packages marked as favorites by <user>"},options:[e]},{name:"start",description:"Start a package",options:[g,y,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[g,y,{name:"--",args:{name:"arg",description:"Arguments to be passed to the stop script"}}]},{name:"team",description:"Manage organization teams and team memberships",subcommands:[{name:"create",args:{name:"scope:team"},options:[e,o]},{name:"destroy",args:{name:"scope:team"},options:[e,o]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[e,o]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[e,o]},{name:"ls",args:{name:"scope|scope:team"},options:[e,i,h]}]},{name:["test","tst","t"],description:"Test a package",options:[g,y]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[i,h]},{name:"create",description:"Create a new authentication token",options:[{name:"--read-only",description:"This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command"},{name:"--cidr",description:"This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command",isRepeatable:!0,args:{name:"cidr"}}]},{name:"revoke",description:"Immediately removes an authentication token from the registry. You will no longer be able to use it",args:{name:"idtoken"}}],options:[e,o]},O("uninstall"),O(["r","rm"]),O("un"),O("remove"),O("unlink"),{name:"unpublish",description:"Remove a package from the registry",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[k,{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},...t]},{name:"unstar",description:"Remove an item from your favorite packages",args:{name:"pkg",description:"Package to unmark as favorite"},options:[e,o,{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"},T,g,{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"},k,...t]},{name:"version",description:"Bump a package version",options:[...t,i,{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:[...t,i]},{name:"whoami",description:"Display npm username",options:[e]}]};var p=n=>({name:["-p","--path"],description:n,args:{name:"path",template:"folders"}}),w=n=>({name:["-P","--prototype"],description:n,args:{name:"prototype"}}),C={...b,custom:F(["magnolia-light-module"])},z={name:"mgnl",description:"Magnolia CLI is a command line interface (CLI) tool to set up and facilitate light development with Magnolia",icon:"https://avatars.githubusercontent.com/u/25686615?s=200&v=4",subcommands:[{name:"add-availability",description:"This command makes a component available to a page",args:[{name:"<[module-id:]path-to-component>",description:"The component you want to make available"},{name:"<path-to-page[@area]>",description:"The page you want to make the component available to"}],options:[p("The path to the light module that contains the page template"),{name:"-g",description:"Add this parameter to autogenerate the component instead of providing plain availability"}]},{name:"create-app",description:"This command creates a content type and an app",args:{name:"name",description:"The name of the new app. The name cannot contain spaces"},options:[p("The path to the light module where you want to create the app"),w("The name of the prototype variant to create the app")]},{name:"create-block",description:"This command creates a block",args:{name:"blockName",description:"The name of the new block definition. The block name cannot contain spaces"},options:[p("The path to the light module to add the new block to"),w("The name of the prototype variant to create the block")]},{name:"create-component",description:"This command creates a new component template",args:{name:"name",description:"The name of the new component template. The name cannot contain spaces"},options:[p("The path to the light module you want to add the component template to"),{name:["-a","--available"],description:"The page you want to make the component available to",args:{name:"<path-to-page[@area]>"}},{name:["-g","--autogenerate"],description:"Add this parameter to autogenerate the component instead of providing plain availability",args:{name:"<path-to-page[@area]>"}},w("The name of the prototype variant to create the component")]},{name:"create-content-type",description:"This command creates a content type",args:{name:"name",description:"The name of the new content type. The name cannot contain spaces"},options:[{name:"-a",description:"Creates also a new app that references the content type. With the -a option, the command is functionally equivalent to the create-app command"},p("The path to the light module where you want to create the content type"),w("The name of the prototype variant to create the content type")]},{name:"create-light-module",description:"This command creates a new light module in the form of a set of empty light module folders",args:{name:"moduleName",description:"The name of the new light module. Avoid spaces and special characters since this name is used as folder name"},options:[p("The path of the parent directory for the new light module"),w("The name of the prototype variant to create the light module")]},{name:"create-page",description:"This command creates a new page template",args:{name:"templateName",description:"The name of the new page template. The template name cannot contain spaces"},options:[p("The path to the light module to add the new template to"),w("The name of the prototype variant to create the page")]},{name:"create-virtual-uri",description:"The command creates a virtual URI mapping configuration file (a YAML definition file) in the light module",args:{name:"virtualUriName",description:"The name of the new URI configuration"},options:[p("The path to the light module"),{name:["-f","--formUri"],description:"The pattern to be matched in the requested URI. Enclose the <uri> value in quotes",args:{name:"uri"}},{name:["-t","--toUri"],description:"A concrete URI that the request is mapped to. Enclose the <prefix:uri> value in quotes",args:{name:"<prefix:uri>"}},w("The name of the prototype variant to create the mapping")]},{name:"customize-local-config",description:"Run this command to create a local configuration",options:[p("The path into which the mgnl-cli-prototypes folder and mgnl-cli.json file are installed")]},{name:"install",description:"Downloads and installs one or more light modules from npm to the light module directory",args:{name:"light-module-name",description:"At least one name of a light module to be downloaded from npm. If you are installing more than one module from the repository, separate the module names with a space",isVariadic:!0,debounce:!0,generators:C},options:[p("The path to the light-modules folder")]},{name:"jumpstart",description:"This command downloads, unpacks and pre-configures a Magnolia Tomcat server together with a specific webapp",options:[p("The path to the light modules root folder which is observed for changes"),{name:["-m","--magnolia-version"],description:"Use to choose a specific version of the Magnolia webapp. If not provided, the latest stable version of the specified webapp is downloaded",args:{name:"version"}},{name:["-i","--install-sample-module"],description:"If provided, a sample light module under the light modules root folder with the given name is created",args:{name:"name"}},{name:["-s","--snapshot"],description:"Downloads the latest snapshot development version of the specified webapp"},{name:["-w","--webapp"],description:"Use to directly specify which Magnolia webapp you want to install",args:{name:"webapp",suggestions:[{name:"magnolia-empty-webapp"},{name:"magnolia-community-webapp"},{name:"magnolia-community-demo-webapp"},{name:"magnolia-dx-core-webapp"},{name:"magnolia-dx-core-demo-webapp"}]}}]},{name:"tab-completion",description:"Run the command to install or uninstall autocompletion for Magnolia CLI commands",args:{name:"command",suggestions:[{name:"install"},{name:"uninstall"}]}},{name:"search",description:"Searches for Magnolia-related packages available from npm",args:{name:"query",generators:C,description:"The search query sent to the npm's API. The query can contain multiple terms separated with commas and no spaces"}},{name:"start",description:"This command starts up Magnolia and displays the main log file",options:[p("The path to the apache-tomcat folder"),{name:"-d",description:"Does NOT ignore the open files limit check. The files limit check is ignored by default"}]}],options:[{name:["--help","-h"],description:"Show help for mgnl",isPersistent:!0}]},$=z;export{$ as default};
|
|
1
|
+
function T(n){return{name:n,description:"Uninstall a package",args:{name:"package",generators:S,filterStrategy:"fuzzy",isVariadic:!0},options:W}}var A=n=>(n.match(/@/g)||[]).length,P=n=>async(s,p,d)=>{let i=s[s.length-1];if(i==="")return[];let r=n&&n.length>0?`+keywords:${n.join(",")}`:"",h=["-s","-H","Accept: application/json",r?`https://api.npms.io/v2/search?size=20&q=${i}${r}`:`https://api.npms.io/v2/search/suggestions?q=${i}&size=20`],l=["-s","-H","Accept: application/vnd.npm.install-v1+json",`https://registry.npmjs.org/${i.slice(0,-1)}`],U=g=>p({command:"curl",args:g[g.length-1]==="@"?l:h}),C=i.startsWith("@")?A(i)>1:i.includes("@");try{let g=JSON.parse((await U(i)).stdout);if(C){let x=Object.entries(g["dist-tags"]||{}).map(([I,N])=>({name:I,description:N}));return x.push(...Object.keys(g.versions).map(I=>({name:I})).reverse()),x}return(r?g.results:g).map(x=>({name:x.package.name,description:x.package.description}))}catch(g){return console.error({error:g}),[]}},y={trigger:(n,s)=>s.startsWith("@")?!(A(s)>1&&A(n)>1):!(s.includes("@")&&n.includes("@")),getQueryTerm:"@",cache:{ttl:1e3*60*60*24*2},custom:P()},z={custom:async(n,s)=>{let{stdout:p}=await s({command:"npm",args:["prefix"]}),{stdout:d}=await s({command:"cat",args:[`${p}/package.json`]}),i=[];try{if(d.trim()=="")return i;let w=JSON.parse(d).workspaces;if(w)for(let h of w)i.push({name:h,description:"Workspaces"})}catch(r){console.log(r)}return i}},S={trigger:n=>n==="-g"||n==="--global",custom:async function(n,s){if(!n.includes("-g")&&!n.includes("--global")){let{stdout:p}=await s({command:"npm",args:["prefix"]}),{stdout:d}=await s({command:"cat",args:[`${p}/package.json`]}),i=JSON.parse(d),r=i.dependencies??{},w=i.devDependencies,h=i.optionalDependencies??{};return Object.assign(r,w,h),Object.keys(r).filter(l=>!n.some(C=>C===l)).map(l=>({name:l,icon:"\u{1F4E6}",description:r[l]?"dependency":h[l]?"optionalDependency":"devDependency"}))}else{let{stdout:p}=await s({command:"bash",args:["-c","ls -1 `npm root -g`"]});return p.split(`
|
|
2
|
+
`).map(d=>({name:d,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(n,[s]){if(n.trim()=="")return[];try{let p=JSON.parse(n),d=p.scripts,i=p.fig||{};if(d)return Object.entries(d).map(([r,w])=>{let h=s==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",l=i[r];return{name:r,icon:h,description:w,priority:51,...l}})}catch(p){console.error(p)}return[]}},O={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},t={name:"--json",description:"Show output in json format"},f={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},k={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},j={name:["-l","--long"],description:"Show extended information"},a=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:z,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],W=[{name:["-S","--save"],description:"Package will be removed from your dependencies"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:"-g",description:"Uninstall global package"},...a],_=[{name:["-a","--all"],description:"Show all outdated or installed packages"},t,j,k,{name:"--depth",description:"The depth to go when recursing packages",args:{name:"depth"}},{name:"--link",description:"Limits output to only those packages that are linked"},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--no-unicode",description:"Uses unicode characters in the tree output"},O,f,...a],e={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},L={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},o={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},m={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},v={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"}},u={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"},D={name:"--install-strategy",description:"Sets the strategy for installing packages in node_modules",args:{name:"strategy",default:"hoisted",suggestions:["hoisted","nested","shallow","linked"]}},V={name:"--install-links",description:"Install file: protocol dependencies outside the project root as regular dependencies instead of creating a symlink"},R={name:"--foreground-scripts",description:"Run all build scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process"},q={name:"--allow-git",description:"Limits the ability for npm to install git dependencies",args:{name:"allow-git",suggestions:["all","none","root"]}},M={name:"--allow-remote",description:"Limits the ability for npm to install user-supplied tarball URL dependencies",args:{name:"allow-remote",suggestions:["all","none","root"]}},F=[{name:"--allow-publish",description:"Allows the trusted publisher to run npm publish for the package"},{name:["--allow-stage-publish","--allow-staged-publish"],description:"Allows the trusted publisher to run npm stage for the package"}],$={name:"npm",parserDirectives:{flagsArePosixNoncompliant:!0},description:"Node package manager",subcommands:[{name:["install","i","add"],description:"Install a package and its dependencies",args:{name:"package",isOptional:!0,generators:y,debounce:!0,isVariadic:!0},options:[{name:["-P","--save-prod"],description:"Package will appear in your `dependencies`. This is the default unless `-D` or `-O` are present"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:["-E","--save-exact"],description:"Saved dependencies will be configured with an exact version rather than using npm's default semver range operator"},{name:["-B","--save-bundle"],description:"Saved dependencies will also be added to your bundleDependencies list"},O,D,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder",deprecated:!0},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package",deprecated:!0},{name:"--legacy-peer-deps",description:"Bypass peerDependency auto-installation. Emulate install behavior of NPM v4 through v6"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},e,L,f,m,R,q,M,V,{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},u,...a]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...a,{name:"--if-present",description:"Npm will not exit with an error code when run-script is invoked for a script that isn't defined in the scripts section of package.json"},{name:"--silent",description:""},m,v,{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:[t,o,e]},{name:"adduser",description:"Add a registry user account",deprecated:!0,options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:"login",description:"Login to a registry user account",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}},{name:"--auth-type",description:"What authentication strategy to use with login",args:{name:"auth-type",default:"web",suggestions:["legacy","web"]}}]},{name:"audit",description:"Run a security audit",subcommands:[{name:"signatures",description:"Verify registry signatures and provenance attestations of downloaded packages",options:[t,{name:"--include-attestations",description:"Include full sigstore attestation bundles in the JSON output"}]},{name:"fix",description:"If the fix argument is provided, then remediations will be applied to the package tree",options:[u,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...a]}],options:[...a,{name:"--audit-level",description:"The minimum level of vulnerability for npm audit to exit with a non-zero exit code",args:{name:"audit",suggestions:["info","low","moderate","high","critical","none"]}},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},t,f]},{name:"bin",description:"Print the folder where npm will install executables",deprecated:!0,options:[O]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:y,debounce:!0,isVariadic:!0},options:[{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm bugs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]},e]},{name:"cache",description:"Manipulates packages and npx cache",subcommands:[{name:"add",description:"Add the specified packages to the local cache"},{name:"clean",description:"Delete a single entry or all entries out of the cache folder",args:{name:"key",isOptional:!0}},{name:"ls",description:"List given entries or all entries in the local cache",args:{name:"name@version",isOptional:!0,isVariadic:!0}},{name:"verify",description:"Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data"},{name:"npx",description:"Manipulates the npx cache",subcommands:[{name:"ls",description:"List all entries in the npx cache"},{name:"rm",description:"Remove given entries or all entries from the npx cache",args:{name:"key",isOptional:!0,isVariadic:!0}},{name:"info",description:"Get detailed information about given entries in the npx cache",args:{name:"key",isVariadic:!0}}]}],options:[{name:"--cache",args:{name:"cache"},description:"The location of npm's cache directory"}]},{name:["ci","clean-install","install-clean"],description:"Install a project with a clean slate",options:[{name:"--audit",description:'When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes',args:{name:"audit",suggestions:["true","false"]},exclusiveOn:["--no-audit"]},{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command",exclusiveOn:["--audit"]},m,v,L,e,D,f,R,q,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"},t]},{name:"delete",description:"Deletes the key from all configuration files",args:{name:"key"}},{name:"edit",description:"Opens the config file in an editor",options:[{name:"--global",description:"Edits the global config"}]},{name:"fix",description:"Attempts to repair invalid configuration items, such as attaching authentication configuration to the configured registry"}]},{name:"create",description:"Create a package.json file"},{name:["dedupe","ddp"],description:"Reduce duplication in the package tree"},{name:"deprecate",description:"Deprecate a version of a package",options:[e]},{name:"diff",description:"The registry diff command",args:{name:"paths",isOptional:!0,isVariadic:!0,template:"filepaths"},options:[{name:"--diff",description:"Define arguments to compare in npm diff",isRepeatable:2,args:{name:"package-spec"}},{name:"--diff-name-only",description:"Prints only filenames when using npm diff"},{name:"--diff-unified",description:"The number of lines of context to print in npm diff",args:{name:"number",default:"3"}},{name:"--diff-ignore-all-space",description:"Ignore whitespace when comparing lines in npm diff"},{name:"--diff-no-prefix",description:"Do not show any source or destination prefix in npm diff output"},{name:"--diff-src-prefix",description:"Source prefix to be used in npm diff output",args:{name:"path",default:"a/"}},{name:"--diff-dst-prefix",description:"Destination prefix to be used in npm diff output",args:{name:"path",default:"b/"}},{name:"--diff-text",description:"Treat all files as text in npm diff"},O,{name:"--tag",description:"The tag used to fetch the tarball that will be compared with the local files",args:{name:"tag",default:"latest"}},...a]},{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:y,debounce:!0,isVariadic:!0},options:[...a,e,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm docs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"doctor",description:"Check your npm environment",options:[e]},{name:"edit",description:"Edit an installed package",options:[{name:"--editor",description:"The command to run for npm edit or npm config edit"}]},{name:["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:y,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"]},...a]},{name:["explain","why"],description:"Explain installed packages",args:{name:"package-spec",filterStrategy:"fuzzy",generators:S,isVariadic:!0},options:[t,...a]},{name:"explore",description:"Browse an installed package",args:{name:"package",filterStrategy:"fuzzy",generators:S}},{name:"find-dupes",description:"Find duplication in the package tree",options:[D,f,m,...a]},{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:[j]},{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:S},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:S},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:[u]}]},{name:"install-test",description:"Install package(s) and run tests"},{name:"it",description:"Install package(s) and run tests"},{name:"link",description:"Symlink a package folder",args:{name:"path",template:"filepaths"}},{name:"ln",description:"Symlink a package folder"},{name:"logout",description:"Log out of the registry",options:[e,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:["ls","list"],description:"List installed packages",options:_,args:{name:"[@scope]/pkg",isVariadic:!0}},{name:"org",description:"Manage orgs",subcommands:[{name:"set",description:"Add a user to an org or manage roles",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"},{name:"role",isOptional:!0,suggestions:["developer","admin","owner"]}],options:[e,o]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[e,o]},{name:"ls",description:"List users in an org or see what roles a particular user has in an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name",isOptional:!0}],options:[e,o,t,k]}]},{name:"outdated",description:"Check for outdated packages",args:{name:"[<@scope>/]<pkg>",isVariadic:!0,isOptional:!0},options:[{name:["-a","--all"],description:"Show all outdated or installed packages"},t,j,k,{name:"-g",description:"Checks globally"},...a]},{name:["owner","author"],description:"Manage package owners",subcommands:[{name:"ls",description:"List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help",args:{name:"[@scope/]pkg"},options:[e]},{name:"add",description:"Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,o]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[e,o]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[t,u,...a,{name:"--pack-destination",description:"Directory in which npm pack will save tarballs",args:{name:"pack-destination",template:["folders"]}}]},{name:"ping",description:"Ping npm registry",options:[e]},{name:"pkg",description:"Manages your package.json",subcommands:[{name:"get",description:"Retrieves a value key, defined in your package.json file. It is possible to get multiple values and values for child fields",args:{name:"field",description:"Name of the field to get. You can view child fields by separating them with a period",isVariadic:!0},options:[t,...a]},{name:"set",description:"Sets a value in your package.json based on the field value. It is possible to set multiple values and values for child fields",args:{name:"field",description:"Name of the field to set. You can set child fields by separating them with a period",isVariadic:!0},options:[t,...a,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"delete",description:"Deletes a key from your package.json",args:{name:"key",description:"Name of the key to delete. You can delete child fields by separating them with a period",isVariadic:!0},options:[...a,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"fix",description:"Auto corrects common errors in your package.json",options:a}]},{name:"prefix",description:"Display prefix",options:[{name:["-g","--global"],description:"Print the global prefix to standard out"}]},{name:"profile",description:"Change settings on your registry profile",subcommands:[{name:"get",description:"Display all of the properties of your profile, or one or more specific properties",args:{name:"property",isOptional:!0,description:"Property name"},options:[e,t,k,o]},{name:"set",description:"Set the value of a profile property",args:[{name:"property",description:"Property name",suggestions:["email","fullname","homepage","freenode","twitter","github"]},{name:"value",description:"Property value"}],options:[e,t,k,o],subcommands:[{name:"password",description:"Change your password. This is interactive, you'll be prompted for your current password and a new password"}]},{name:"enable-2fa",description:"Enables two-factor authentication",args:{name:"mode",description:"Mode for two-factor authentication. Defaults to auth-and-writes mode",isOptional:!0,suggestions:[{name:"auth-only",description:"Require an OTP when logging in or making changes to your account's authentication"},{name:"auth-and-writes",description:"Requires an OTP at all the times auth-only does, and also requires one when publishing a module, setting the latest dist-tag, or changing access via npm access and npm owner"}]},options:[e,o]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[e,o]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[f,u,t,{name:"--production",description:"Remove the packages specified in your devDependencies"},...a]},{name:"publish",description:"Publish a package",args:{name:"tarball|folder",isOptional:!0,description:"A url or file path to a gzipped tar archive containing a single folder with a package.json file inside | A folder containing a package.json file",template:["folders"]},options:[{name:"--tag",description:"Registers the published package with the given tag",args:{name:"tag"}},...a,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},u,o,{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:[O,...a,{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:[O,...a,m,{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:y,debounce:!0,isVariadic:!0},options:[...a,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm repo command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"restart",description:"Restart a package",options:[m,v,{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:[f,{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"]}},...a]},{name:["search","s","se","find"],description:"Search for packages",args:{name:"search terms",isVariadic:!0},options:[j,t,{name:"--color",description:"Show colors",args:{name:"always",suggestions:["always"],description:"Always show colors"},exclusiveOn:["--no-color"]},{name:"--no-color",description:"Do not show colors",exclusiveOn:["--color"]},k,{name:"--no-description",description:"Do not show descriptions"},{name:"--searchopts",description:"Space-separated options that are always passed to search",args:{name:"searchopts"}},{name:"--searchexclude",description:"Space-separated options that limit the results from search",args:{name:"searchexclude"}},e,{name:"--prefer-online",description:"If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data",exclusiveOn:["--prefer-offline","--offline"]},{name:"--prefer-offline",description:"If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server",exclusiveOn:["--prefer-online","--offline"]},{name:"--offline",description:"Force offline mode: no network requests will be done during install",exclusiveOn:["--prefer-online","--prefer-offline"]}]},{name:"set",description:"Sets the config key to the value"},{name:"set-script",description:"Set tasks in the scripts section of package.json",deprecated:!0,args:[{name:"script",description:"Name of the task to be added to the scripts section of package.json"},{name:"command",description:"Command to run when script is called"}],options:a},{name:"shrinkwrap",description:"Lock down dependency versions for publication",deprecated:!0},{name:"stage",description:"Stage a package for publishing, deferring 2FA to a later approval",subcommands:[{name:"publish",description:"Stage a package for publishing",args:{name:"package-spec",isOptional:!0,template:["folders"]},options:[{name:"--tag",description:"Registers the staged package with the given tag",args:{name:"tag"}}]},{name:"list",description:"List all staged package versions",args:{name:"package-spec",isOptional:!0}},{name:"view",description:"View details of a specific staged package",args:{name:"stage-id"}},{name:"approve",description:"Approve a staged package for publishing",args:{name:"stage-id"}},{name:"reject",description:"Reject a staged package",args:{name:"stage-id"}},{name:"download",description:"Download the tarball of a staged package for inspection",args:{name:"stage-id"}}]},{name:"star",description:"Mark your favorite packages",deprecated:!0,args:{name:"pkg",description:"Package to mark as favorite"},options:[e,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:"stars",description:"View packages marked as favorites",deprecated:!0,args:{name:"user",isOptional:!0,description:"View packages marked as favorites by <user>"},options:[e]},{name:"start",description:"Start a package",options:[m,v,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[m,v,{name:"--",args:{name:"arg",description:"Arguments to be passed to the stop script"}}]},{name:"team",description:"Manage organization teams and team memberships",subcommands:[{name:"create",args:{name:"scope:team"},options:[e,o]},{name:"destroy",args:{name:"scope:team"},options:[e,o]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[e,o]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[e,o]},{name:"ls",args:{name:"scope|scope:team"},options:[e,t,k]}]},{name:["test","tst","t"],description:"Test a package",options:[m,v]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[t,k]},{name:"create",description:"Create a new authentication token",options:[{name:"--read-only",description:"This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command"},{name:"--cidr",description:"This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command",isRepeatable:!0,args:{name:"cidr"}}]},{name:"revoke",description:"Immediately removes an authentication token from the registry. You will no longer be able to use it",args:{name:"idtoken"}}],options:[e,o]},{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:[...F,{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:[...F,{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:[...F,{name:"--org-id",description:"CircleCI organization UUID",isRequired:!0,args:{name:"org-id"}},{name:"--project-id",description:"CircleCI project UUID",isRequired:!0,args:{name:"project-id"}},{name:"--pipeline-definition-id",description:"CircleCI pipeline definition UUID",isRequired:!0,args:{name:"pipeline-definition-id"}},{name:"--vcs-origin",description:"CircleCI repository origin in the format provider/owner/repo",isRequired:!0,args:{name:"vcs-origin"}},{name:"--context-id",description:"CircleCI context UUID to match",isRepeatable:!0,args:{name:"context-id"}}]},{name:"list",description:"List trusted relationships for a package",args:{name:"package",isOptional:!0}},{name:"revoke",description:"Revoke a trusted relationship for a package",args:{name:"package",isOptional:!0},options:[{name:"--id",description:"ID of the trusted relationship to revoke",args:{name:"trust-id"}}]}]},{name:"undeprecate",description:"Undeprecate a version of a package",args:{name:"package-spec"},options:[e,o,u]},T("uninstall"),T(["r","rm"]),T("un"),T("remove"),T("unlink"),{name:"unpublish",description:"Remove a package from the registry",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[u,{name:["-f","--force"],description:"Allow unpublishing all versions of a published package. Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...a]},{name:"unstar",description:"Remove an item from your favorite packages",deprecated:!0,args:{name:"pkg",description:"Package to unmark as favorite"},options:[e,o,{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"},D,{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"},f,m,R,V,{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},{name:"--save",description:"Update the semver values of direct dependencies in your project package.json"},u,...a]},{name:"version",description:"Bump a package version",options:[...a,t,{name:"--allow-same-version",description:"Prevents throwing an error when npm version is used to set the new version to the same value as the current version"},{name:"--no-commit-hooks",description:"Do not run git commit hooks when using the npm version command"},{name:"--no-git-tag-version",description:"Do not tag the commit when using the npm version command"},{name:"--preid",description:'The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the rc in 1.2.0-rc.8',args:{name:"prerelease-id"}},{name:"--sign-git-tag",description:"If set to true, then the npm version command will tag the version using -s to add a signature"}]},{name:["view","v","info","show"],description:"View registry info",options:[...a,t]},{name:"whoami",description:"Display npm username",options:[e]}]};var c=n=>({name:["-p","--path"],description:n,args:{name:"path",template:"folders"}}),b=n=>({name:["-P","--prototype"],description:n,args:{name:"prototype"}}),G={...y,custom:P(["magnolia-light-module"])},B={name:"mgnl",description:"Magnolia CLI is a command line interface (CLI) tool to set up and facilitate light development with Magnolia",icon:"https://avatars.githubusercontent.com/u/25686615?s=200&v=4",subcommands:[{name:"add-availability",description:"This command makes a component available to a page",args:[{name:"<[module-id:]path-to-component>",description:"The component you want to make available"},{name:"<path-to-page[@area]>",description:"The page you want to make the component available to"}],options:[c("The path to the light module that contains the page template"),{name:"-g",description:"Add this parameter to autogenerate the component instead of providing plain availability"}]},{name:"create-app",description:"This command creates a content type and an app",args:{name:"name",description:"The name of the new app. The name cannot contain spaces"},options:[c("The path to the light module where you want to create the app"),b("The name of the prototype variant to create the app")]},{name:"create-block",description:"This command creates a block",args:{name:"blockName",description:"The name of the new block definition. The block name cannot contain spaces"},options:[c("The path to the light module to add the new block to"),b("The name of the prototype variant to create the block")]},{name:"create-component",description:"This command creates a new component template",args:{name:"name",description:"The name of the new component template. The name cannot contain spaces"},options:[c("The path to the light module you want to add the component template to"),{name:["-a","--available"],description:"The page you want to make the component available to",args:{name:"<path-to-page[@area]>"}},{name:["-g","--autogenerate"],description:"Add this parameter to autogenerate the component instead of providing plain availability",args:{name:"<path-to-page[@area]>"}},b("The name of the prototype variant to create the component")]},{name:"create-content-type",description:"This command creates a content type",args:{name:"name",description:"The name of the new content type. The name cannot contain spaces"},options:[{name:"-a",description:"Creates also a new app that references the content type. With the -a option, the command is functionally equivalent to the create-app command"},c("The path to the light module where you want to create the content type"),b("The name of the prototype variant to create the content type")]},{name:"create-light-module",description:"This command creates a new light module in the form of a set of empty light module folders",args:{name:"moduleName",description:"The name of the new light module. Avoid spaces and special characters since this name is used as folder name"},options:[c("The path of the parent directory for the new light module"),b("The name of the prototype variant to create the light module")]},{name:"create-page",description:"This command creates a new page template",args:{name:"templateName",description:"The name of the new page template. The template name cannot contain spaces"},options:[c("The path to the light module to add the new template to"),b("The name of the prototype variant to create the page")]},{name:"create-virtual-uri",description:"The command creates a virtual URI mapping configuration file (a YAML definition file) in the light module",args:{name:"virtualUriName",description:"The name of the new URI configuration"},options:[c("The path to the light module"),{name:["-f","--formUri"],description:"The pattern to be matched in the requested URI. Enclose the <uri> value in quotes",args:{name:"uri"}},{name:["-t","--toUri"],description:"A concrete URI that the request is mapped to. Enclose the <prefix:uri> value in quotes",args:{name:"<prefix:uri>"}},b("The name of the prototype variant to create the mapping")]},{name:"customize-local-config",description:"Run this command to create a local configuration",options:[c("The path into which the mgnl-cli-prototypes folder and mgnl-cli.json file are installed")]},{name:"install",description:"Downloads and installs one or more light modules from npm to the light module directory",args:{name:"light-module-name",description:"At least one name of a light module to be downloaded from npm. If you are installing more than one module from the repository, separate the module names with a space",isVariadic:!0,debounce:!0,generators:G},options:[c("The path to the light-modules folder")]},{name:"jumpstart",description:"This command downloads, unpacks and pre-configures a Magnolia Tomcat server together with a specific webapp",options:[c("The path to the light modules root folder which is observed for changes"),{name:["-m","--magnolia-version"],description:"Use to choose a specific version of the Magnolia webapp. If not provided, the latest stable version of the specified webapp is downloaded",args:{name:"version"}},{name:["-i","--install-sample-module"],description:"If provided, a sample light module under the light modules root folder with the given name is created",args:{name:"name"}},{name:["-s","--snapshot"],description:"Downloads the latest snapshot development version of the specified webapp"},{name:["-w","--webapp"],description:"Use to directly specify which Magnolia webapp you want to install",args:{name:"webapp",suggestions:[{name:"magnolia-empty-webapp"},{name:"magnolia-community-webapp"},{name:"magnolia-community-demo-webapp"},{name:"magnolia-dx-core-webapp"},{name:"magnolia-dx-core-demo-webapp"}]}}]},{name:"tab-completion",description:"Run the command to install or uninstall autocompletion for Magnolia CLI commands",args:{name:"command",suggestions:[{name:"install"},{name:"uninstall"}]}},{name:"search",description:"Searches for Magnolia-related packages available from npm",args:{name:"query",generators:G,description:"The search query sent to the npm's API. The query can contain multiple terms separated with commas and no spaces"}},{name:"start",description:"This command starts up Magnolia and displays the main log file",options:[c("The path to the apache-tomcat folder"),{name:"-d",description:"Does NOT ignore the open files limit check. The files limit check is ignored by default"}]}],options:[{name:["--help","-h"],description:"Show help for mgnl",isPersistent:!0}]},Q=B;export{Q as default};
|
package/build/mix.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var ee=Object.create;var M=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames;var ie=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),R=[];for(let L of $)if(L){let w=L.endsWith("/")?"folders":"filepaths";(w==="filepaths"&&c!=="only"||w==="folders"&&c!=="never")&&R.push({type:w==="filepaths"?"file":"folder",name:L,insertValue:L,isDangerous:y,context:{templateType:w}})}return V(h(R))}catch{return[]}})}}v.folders=Object.assign(()=>I({showFolders:"only"}),Object.freeze(I({showFolders:"only"})));v.filepaths=Object.assign(I,Object.freeze(I()))});var J=K(b=>{"use strict";var k=b&&b.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(A){try{a(i.next(A))}catch(u){o(u)}}function c(A){try{a(i.throw(A))}catch(u){o(u)}}function a(A){A.done?s(A.value):r(A.value).then(l,c)}a((i=i.apply(e,t||[])).next())})};Object.defineProperty(b,"__esModule",{value:!0});b.keyValueList=b.keyValue=b.valueList=void 0;var G=new Map;function U(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function X(e,t,n){return k(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...n);return U(t,i)}if(typeof e[0]=="string"){let i=e.map(r=>({name:r}));return U(t,i)}return U(t,e)})}function P(e,t,n,i){return k(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let r=G.get(e);return r===void 0&&(r=yield X(e,t,i),G.set(e,r)),r}return X(e,t,i)})}function H(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function E(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function C(e,t){let n=new Set(e);return t.filter(i=>{var r;return typeof i.name=="string"?!n.has(i.name):!(!((r=i.name)===null||r===void 0)&&r.some(s=>n.has(s)))})}function fe({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:i=!1,allowRepeatedValues:r=!1}){return{trigger:(s,o)=>s.lastIndexOf(e)!==o.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>k(this,void 0,void 0,function*(){var o;let l=yield P(t,i?e:"",n,s);if(r)return l;let[c]=s,a=(o=c[c.length-1])===null||o===void 0?void 0:o.split(e);return C(a,l)})}}b.valueList=fe;function pe({separator:e="=",keys:t=[],values:n=[],cache:i=!1,insertSeparator:r=!0}){return{trigger:(s,o)=>s.indexOf(e)!==o.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>k(this,void 0,void 0,function*(){let[o]=s,c=!o[o.length-1].includes(e),a=c?t:n,A=H(c,i);return P(a,c&&r?e:"",A,s)})}}b.keyValue=pe;function me({separator:e="=",delimiter:t=",",keys:n=[],values:i=[],cache:r=!1,insertSeparator:s=!0,insertDelimiter:o=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:c=!0}){return{trigger:(a,A)=>{let u=E(a,e,t),h=E(A,e,t);return u!==h},getQueryTerm:a=>{let A=E(a,e,t);return a.slice(A+1)},custom:(...a)=>k(this,void 0,void 0,function*(){let[A]=a,u=A[A.length-1],h=E(u,e,t),V=h===-1||u.slice(h,h+e.length)!==e,f=V?n:i,m=H(V,r),d=yield P(f,V?s?e:"":o?t:"",m,a);if(V){if(l)return d;let S=u.split(t).map(p=>p.slice(0,p.indexOf(e)));return C(S,d)}if(c)return d;let y=u.split(t).map(S=>S.slice(S.indexOf(e)+e.length));return C(y,d)})}}b.keyValueList=me});var Z=K(j=>{"use strict";var he=j&&j.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(A){try{a(i.next(A))}catch(u){o(u)}}function c(A){try{a(i.throw(A))}catch(u){o(u)}}function a(A){A.done?s(A.value):r(A.value).then(l,c)}a((i=i.apply(e,t||[])).next())})};Object.defineProperty(j,"__esModule",{value:!0});j.ai=void 0;var ve=4097,ge=4,ye=.8,xe=ve*ge*ye;function Se({name:e,prompt:t,message:n,postProcess:i,temperature:r,splitOn:s}){return{scriptTimeout:15e3,custom:(o,l,c)=>he(this,void 0,void 0,function*(){var a,A;let u=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(u.stdout))return[];let h=typeof t=="function"?yield t({tokens:o,executeCommand:l,generatorContext:c}):t,V=typeof n=="function"?yield n({tokens:o,executeCommand:l,generatorContext:c}):n;if(V===null||V.length===0)return console.warn("No message provided to AI generator"),[];let f=xe-((a=h?.length)!==null&&a!==void 0?a:0),m={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...h?[{role:"system",content:h}]:[],{role:"user",content:V.slice(0,f)}],temperature:r},x=JSON.stringify(m),d=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",x]}),y=JSON.parse(d.stdout);return(A=y?.choices.map(p=>{var O;return(O=p?.message)===null||O===void 0?void 0:O.content}).filter(p=>typeof p=="string").flatMap(p=>s?p.split(s).filter(O=>O.trim().length>0):[p]).map(p=>{if(i)return i(p);let O=p.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:O,insertValue:`'${O}'`,description:"Generated by Fig AI"}}))!==null&&A!==void 0?A:[]})}}j.ai=Se});var q=K(g=>{"use strict";var Ve=g&&g.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),Oe=g&&g.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ve(t,e,n)};Object.defineProperty(g,"__esModule",{value:!0});g.ai=g.folders=g.filepaths=void 0;var Y=F();Object.defineProperty(g,"filepaths",{enumerable:!0,get:function(){return Y.filepaths}});Object.defineProperty(g,"folders",{enumerable:!0,get:function(){return Y.folders}});Oe(J(),g);var be=Z();Object.defineProperty(g,"ai",{enumerable:!0,get:function(){return be.ai}})});var B=Ae(q(),1),Te={elixir_logo_url:"data:image/jpeg;base64,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"},W=(0,B.filepaths)({extensions:["exs"],editFileSuggestions:{priority:76}}),je={name:"mix",description:"Build tool for Elixir",icon:Te.elixir_logo_url,subcommands:[{name:"new",description:"Creates a new Elixir project at the given path",args:{name:"path"},options:[{name:["-h","--help"],description:"Output usage information"},{name:"--app",description:"Name the OTP application for the project",args:{name:"app"}},{name:"--modules",description:"Name the modules in the generated code skeleton",args:{name:"module"}},{name:"--sup",description:"Generate an OTP application skeleton including a supervision tree. Normally an app is generated without a supervisor and without the app callback"},{name:"--umbrella",description:"Generate an umbrella project"}]},{name:"run",description:"Starts the current application and runs code",args:{name:"file",generators:W,isOptional:!0},options:[{name:"--config",description:"Loads the given configuration files",args:{name:"file",template:"filepaths"}},{name:["-e","--eval"],description:"Evaluates the given code",args:{name:"code",description:"String containing code to execute",isScript:!0}},{name:["-r","--require"],description:"Executes the given pattern/file",args:{name:"file|pattern",description:"The file|pattern to execute",generators:W}},{name:["-p","--parallel"],description:"Executes the given pattern/file",args:{name:"file|pattern",generators:W}},{name:"--preload-modules",description:"Preloads all modules defined in applications"},{name:"--no-compile",description:"Does not compile even if files require compilation"},{name:"--no-deps-check",description:"Does not check dependencies"},{name:"--no-archives-check",description:"Does not check archives"},{name:"--no-halt",description:"Does not halt the system after running the command"},{name:"--no-mix-exs",description:"Allows the command to run even if there is no mix.exs"},{name:"--no-start",description:"Does not start applications after compilation"},{name:"--no-elixir-version-check",description:"Does not check the Elixir version from mix.exs"}]},{name:"help",description:"Prints documentation for a given task (Lists all the tasks if no task is specified)",args:{name:"task",isOptional:!0,description:"Prints documentation for a given task",generators:{cache:{ttl:1e4},script:["mix","help"],postProcess:Q}},options:[{name:"--search",description:"Prints all tasks and aliases that contain 'pattern' in the name",args:{name:"pattern"}},{name:"--names",description:"Prints all task names and aliases"}]}],args:{name:"task",description:"Invokes the task (mix run) in a project",isOptional:!0,generators:{cache:{ttl:1e4},script:["mix","help"],postProcess:Q}},options:[{name:["-h","--help"],description:"Shows usage information"},{name:["-v","--version"],description:"Shows versioning information"}]};function Q(e){return e.split(`
|
|
1
|
+
var ee=Object.create;var M=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames;var ie=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var j=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var se=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ne(t))!re.call(e,r)&&r!==n&&M(e,r,{get:()=>t[r],enumerable:!(i=te(t,r))||i.enumerable});return e};var Ae=(e,t,n)=>(n=e!=null?ee(ie(e)):{},se(t||!e||!e.__esModule?M(n,"default",{value:e,enumerable:!0}):n,e));var z=j(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.shellExpand=T.ensureTrailingSlash=void 0;var oe=e=>e.endsWith("/")?e:`${e}/`;T.ensureTrailingSlash=oe;var ae=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,le=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,r=>{var s;let o=r.slice(1);return(s=t[o])!==null&&s!==void 0?s:r}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(r,s,o)=>{var l,c;return(c=(l=t[s])!==null&&l!==void 0?l:o)!==null&&c!==void 0?c:r}),ce=(e,t)=>{var n;let{environmentVariables:i}=t;return le(ae(e,(n=i?.HOME)!==null&&n!==void 0?n:"~"),i)};T.shellExpand=ce});var F=j(y=>{"use strict";var ue=y&&y.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(A){try{a(i.next(A))}catch(u){o(u)}}function c(A){try{a(i.throw(A))}catch(u){o(u)}}function a(A){A.done?s(A.value):r(A.value).then(l,c)}a((i=i.apply(e,t||[])).next())})};Object.defineProperty(y,"__esModule",{value:!0});y.filepaths=y.folders=y.getCurrentInsertedDirectory=void 0;y.sortFilesAlphabetically=_;var N=z();function _(e,t=[]){let n=t.map(r=>r.toLowerCase()),i=e.filter(r=>!n.includes(r.toLowerCase()));return[...i.filter(r=>!r.startsWith(".")).sort((r,s)=>r.localeCompare(s)),...i.filter(r=>r.startsWith(".")).sort((r,s)=>r.localeCompare(s)),"../"]}var de=(e,t,n)=>{if(e===null)return"/";let i=(0,N.shellExpand)(t,n),r=i.slice(0,i.lastIndexOf("/")+1);return r===""?(0,N.ensureTrailingSlash)(e):r.startsWith("/")?r:`${(0,N.ensureTrailingSlash)(e)}${r}`};y.getCurrentInsertedDirectory=de;function L(e={}){let{extensions:t=[],equals:n=[],matches:i,filterFolders:r=!1,editFileSuggestions:s,editFolderSuggestions:o,rootDirectory:l,showFolders:c="always"}=e,a=new Set(t),A=new Set(n),u=()=>t.length>0||n.length>0||i,h=(f=[])=>u()?f.filter(({name:m="",type:x})=>{if(!r&&x==="folder"||A.has(m)||i&&m.match(i))return!0;let[,...d]=m.split(".");if(d.length>=1){let g=d.length-1,S=d[g];do{if(a.has(S))return!0;g-=1,S=[d[g],S].join(".")}while(g>=0)}return!1}):f,O=(f=[])=>!s&&!o?f:f.map(m=>Object.assign(Object.assign({},m),(m.type==="file"?s:o)||{}));return{trigger:(f,m)=>{let x=f.lastIndexOf("/"),d=m.lastIndexOf("/");return x!==d?!0:x===-1&&d===-1?!1:f.slice(0,x)!==m.slice(0,d)},getQueryTerm:f=>f.slice(f.lastIndexOf("/")+1),custom:(f,m,x)=>ue(this,void 0,void 0,function*(){var d;let{isDangerous:g,currentWorkingDirectory:S,searchTerm:p}=x,V=(d=(0,y.getCurrentInsertedDirectory)(l??S,p,x))!==null&&d!==void 0?d:"/";try{let D=yield m({command:"ls",args:["-1ApL"],cwd:V}),$=_(D.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),R=[];for(let w of $)if(w){let I=w.endsWith("/")?"folders":"filepaths";(I==="filepaths"&&c!=="only"||I==="folders"&&c!=="never")&&R.push({type:I==="filepaths"?"file":"folder",name:w,insertValue:w,isDangerous:g,context:{templateType:I}})}return O(h(R))}catch{return[]}})}}y.folders=Object.assign(()=>L({showFolders:"only"}),Object.freeze(L({showFolders:"only"})));y.filepaths=Object.assign(L,Object.freeze(L()))});var J=j(b=>{"use strict";var K=b&&b.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(A){try{a(i.next(A))}catch(u){o(u)}}function c(A){try{a(i.throw(A))}catch(u){o(u)}}function a(A){A.done?s(A.value):r(A.value).then(l,c)}a((i=i.apply(e,t||[])).next())})};Object.defineProperty(b,"__esModule",{value:!0});b.valueList=fe;b.keyValue=pe;b.keyValueList=me;var G=new Map;function U(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function X(e,t,n){return K(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...n);return U(t,i)}if(typeof e[0]=="string"){let i=e.map(r=>({name:r}));return U(t,i)}return U(t,e)})}function P(e,t,n,i){return K(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let r=G.get(e);return r===void 0&&(r=yield X(e,t,i),G.set(e,r)),r}return X(e,t,i)})}function H(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function E(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function C(e,t){let n=new Set(e);return t.filter(i=>{var r;return typeof i.name=="string"?!n.has(i.name):!(!((r=i.name)===null||r===void 0)&&r.some(s=>n.has(s)))})}function fe({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:i=!1,allowRepeatedValues:r=!1}){return{trigger:(s,o)=>s.lastIndexOf(e)!==o.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>K(this,void 0,void 0,function*(){var o;let l=yield P(t,i?e:"",n,s);if(r)return l;let[c]=s,a=(o=c[c.length-1])===null||o===void 0?void 0:o.split(e);return C(a,l)})}}function pe({separator:e="=",keys:t=[],values:n=[],cache:i=!1,insertSeparator:r=!0}){return{trigger:(s,o)=>s.indexOf(e)!==o.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>K(this,void 0,void 0,function*(){let[o]=s,c=!o[o.length-1].includes(e),a=c?t:n,A=H(c,i);return P(a,c&&r?e:"",A,s)})}}function me({separator:e="=",delimiter:t=",",keys:n=[],values:i=[],cache:r=!1,insertSeparator:s=!0,insertDelimiter:o=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:c=!0}){return{trigger:(a,A)=>{let u=E(a,e,t),h=E(A,e,t);return u!==h},getQueryTerm:a=>{let A=E(a,e,t);return a.slice(A+1)},custom:(...a)=>K(this,void 0,void 0,function*(){let[A]=a,u=A[A.length-1],h=E(u,e,t),O=h===-1||u.slice(h,h+e.length)!==e,f=O?n:i,m=H(O,r),d=yield P(f,O?s?e:"":o?t:"",m,a);if(O){if(l)return d;let S=u.split(t).map(p=>p.slice(0,p.indexOf(e)));return C(S,d)}if(c)return d;let g=u.split(t).map(S=>S.slice(S.indexOf(e)+e.length));return C(g,d)})}}});var Z=j(k=>{"use strict";var he=k&&k.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(A){try{a(i.next(A))}catch(u){o(u)}}function c(A){try{a(i.throw(A))}catch(u){o(u)}}function a(A){A.done?s(A.value):r(A.value).then(l,c)}a((i=i.apply(e,t||[])).next())})};Object.defineProperty(k,"__esModule",{value:!0});k.ai=Se;var ve=4097,ge=4,ye=.8,xe=ve*ge*ye;function Se({name:e,prompt:t,message:n,postProcess:i,temperature:r,splitOn:s}){return{scriptTimeout:15e3,custom:(o,l,c)=>he(this,void 0,void 0,function*(){var a,A;let u=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(u.stdout))return[];let h=typeof t=="function"?yield t({tokens:o,executeCommand:l,generatorContext:c}):t,O=typeof n=="function"?yield n({tokens:o,executeCommand:l,generatorContext:c}):n;if(O===null||O.length===0)return console.warn("No message provided to AI generator"),[];let f=xe-((a=h?.length)!==null&&a!==void 0?a:0),m={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...h?[{role:"system",content:h}]:[],{role:"user",content:O.slice(0,f)}],temperature:r},x=JSON.stringify(m),d=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",x]}),g=JSON.parse(d.stdout);return(A=g?.choices.map(p=>{var V;return(V=p?.message)===null||V===void 0?void 0:V.content}).filter(p=>typeof p=="string").flatMap(p=>s?p.split(s).filter(V=>V.trim().length>0):[p]).map(p=>{if(i)return i(p);let V=p.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:V,insertValue:`'${V}'`,description:"Generated by Fig AI"}}))!==null&&A!==void 0?A:[]})}}});var q=j(v=>{"use strict";var Oe=v&&v.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),Ve=v&&v.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Oe(t,e,n)};Object.defineProperty(v,"__esModule",{value:!0});v.ai=v.folders=v.filepaths=void 0;var Y=F();Object.defineProperty(v,"filepaths",{enumerable:!0,get:function(){return Y.filepaths}});Object.defineProperty(v,"folders",{enumerable:!0,get:function(){return Y.folders}});Ve(J(),v);var be=Z();Object.defineProperty(v,"ai",{enumerable:!0,get:function(){return be.ai}})});var B=Ae(q(),1),Te={elixir_logo_url:"data:image/jpeg;base64,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"},W=(0,B.filepaths)({extensions:["exs"],editFileSuggestions:{priority:76}}),je={name:"mix",description:"Build tool for Elixir",icon:Te.elixir_logo_url,subcommands:[{name:"new",description:"Creates a new Elixir project at the given path",args:{name:"path"},options:[{name:["-h","--help"],description:"Output usage information"},{name:"--app",description:"Name the OTP application for the project",args:{name:"app"}},{name:"--modules",description:"Name the modules in the generated code skeleton",args:{name:"module"}},{name:"--sup",description:"Generate an OTP application skeleton including a supervision tree. Normally an app is generated without a supervisor and without the app callback"},{name:"--umbrella",description:"Generate an umbrella project"}]},{name:"run",description:"Starts the current application and runs code",args:{name:"file",generators:W,isOptional:!0},options:[{name:"--config",description:"Loads the given configuration files",args:{name:"file",template:"filepaths"}},{name:["-e","--eval"],description:"Evaluates the given code",args:{name:"code",description:"String containing code to execute",isScript:!0}},{name:["-r","--require"],description:"Executes the given pattern/file",args:{name:"file|pattern",description:"The file|pattern to execute",generators:W}},{name:["-p","--parallel"],description:"Executes the given pattern/file",args:{name:"file|pattern",generators:W}},{name:"--preload-modules",description:"Preloads all modules defined in applications"},{name:"--no-compile",description:"Does not compile even if files require compilation"},{name:"--no-deps-check",description:"Does not check dependencies"},{name:"--no-archives-check",description:"Does not check archives"},{name:"--no-halt",description:"Does not halt the system after running the command"},{name:"--no-mix-exs",description:"Allows the command to run even if there is no mix.exs"},{name:"--no-start",description:"Does not start applications after compilation"},{name:"--no-elixir-version-check",description:"Does not check the Elixir version from mix.exs"}]},{name:"help",description:"Prints documentation for a given task (Lists all the tasks if no task is specified)",args:{name:"task",isOptional:!0,description:"Prints documentation for a given task",generators:{cache:{ttl:1e4},script:["mix","help"],postProcess:Q}},options:[{name:"--search",description:"Prints all tasks and aliases that contain 'pattern' in the name",args:{name:"pattern"}},{name:"--names",description:"Prints all task names and aliases"}]}],args:{name:"task",description:"Invokes the task (mix run) in a project",isOptional:!0,generators:{cache:{ttl:1e4},script:["mix","help"],postProcess:Q}},options:[{name:["-h","--help"],description:"Shows usage information"},{name:["-v","--version"],description:"Shows versioning information"}]};function Q(e){return e.split(`
|
|
3
3
|
`).map(t=>{let[n,i]=t.split("#").map(r=>r.trim());return{name:n.replace(/^mix /,""),description:i}}).filter(t=>!["mix","help","new","run","iex -S mix"].includes(t.name))}var Ne=je;export{Ne as default};
|
package/build/mongoimport.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Z=Object.create;var k=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),R=[];for(let C of U)if(C){let V=C.endsWith("/")?"folders":"filepaths";(V==="filepaths"&&u!=="only"||V==="folders"&&u!=="never")&&R.push({type:V==="filepaths"?"file":"folder",name:C,insertValue:C,isDangerous:S,context:{templateType:V}})}return O(g(R))}catch{return[]}})}}v.folders=Object.assign(()=>j({showFolders:"only"}),Object.freeze(j({showFolders:"only"})));v.filepaths=Object.assign(j,Object.freeze(j()))});var $=M(x=>{"use strict";var D=x&&x.__awaiter||function(e,t,n,i){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(r){try{c(i.next(r))}catch(d){a(d)}}function u(r){try{c(i.throw(r))}catch(d){a(d)}}function c(r){r.done?s(r.value):o(r.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(x,"__esModule",{value:!0});x.keyValueList=x.keyValue=x.valueList=void 0;var G=new Map;function E(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 D(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...n);return E(t,i)}if(typeof e[0]=="string"){let i=e.map(o=>({name:o}));return E(t,i)}return E(t,e)})}function B(e,t,n,i){return D(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let o=G.get(e);return o===void 0&&(o=yield H(e,t,i),G.set(e,o)),o}return H(e,t,i)})}function J(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function F(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function N(e,t){let n=new Set(e);return t.filter(i=>{var o;return typeof i.name=="string"?!n.has(i.name):!(!((o=i.name)===null||o===void 0)&&o.some(s=>n.has(s)))})}function de({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:i=!1,allowRepeatedValues:o=!1}){return{trigger:(s,a)=>s.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>D(this,void 0,void 0,function*(){var a;let l=yield B(t,i?e:"",n,s);if(o)return l;let[u]=s,c=(a=u[u.length-1])===null||a===void 0?void 0:a.split(e);return N(c,l)})}}x.valueList=de;function fe({separator:e="=",keys:t=[],values:n=[],cache:i=!1,insertSeparator:o=!0}){return{trigger:(s,a)=>s.indexOf(e)!==a.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>D(this,void 0,void 0,function*(){let[a]=s,u=!a[a.length-1].includes(e),c=u?t:n,r=J(u,i);return B(c,u&&o?e:"",r,s)})}}x.keyValue=fe;function pe({separator:e="=",delimiter:t=",",keys:n=[],values:i=[],cache:o=!1,insertSeparator:s=!0,insertDelimiter:a=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:u=!0}){return{trigger:(c,r)=>{let d=F(c,e,t),g=F(r,e,t);return d!==g},getQueryTerm:c=>{let r=F(c,e,t);return c.slice(r+1)},custom:(...c)=>D(this,void 0,void 0,function*(){let[r]=c,d=r[r.length-1],g=F(d,e,t),O=g===-1||d.slice(g,g+e.length)!==e,p=O?n:i,h=J(O,o),f=yield B(p,O?s?e:"":a?t:"",h,c);if(O){if(l)return f;let w=d.split(t).map(m=>m.slice(0,m.indexOf(e)));return N(w,f)}if(u)return f;let S=d.split(t).map(w=>w.slice(w.indexOf(e)+e.length));return N(S,f)})}}x.keyValueList=pe});var z=M(A=>{"use strict";var me=A&&A.__awaiter||function(e,t,n,i){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(r){try{c(i.next(r))}catch(d){a(d)}}function u(r){try{c(i.throw(r))}catch(d){a(d)}}function c(r){r.done?s(r.value):o(r.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(A,"__esModule",{value:!0});A.ai=void 0;var he=4097,ge=4,ve=.8,ye=he*ge*ve;function Se({name:e,prompt:t,message:n,postProcess:i,temperature:o,splitOn:s}){return{scriptTimeout:15e3,custom:(a,l,u)=>me(this,void 0,void 0,function*(){var c,r;let d=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(d.stdout))return[];let g=typeof t=="function"?yield t({tokens:a,executeCommand:l,generatorContext:u}):t,O=typeof n=="function"?yield n({tokens:a,executeCommand:l,generatorContext:u}):n;if(O===null||O.length===0)return console.warn("No message provided to AI generator"),[];let p=ye-((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:O.slice(0,p)}],temperature:o},b=JSON.stringify(h),f=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",b]}),S=JSON.parse(f.stdout);return(r=S?.choices.map(m=>{var _;return(_=m?.message)===null||_===void 0?void 0:_.content}).filter(m=>typeof m=="string").flatMap(m=>s?m.split(s).filter(_=>_.trim().length>0):[m]).map(m=>{if(i)return i(m);let _=m.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:_,insertValue:`'${_}'`,description:"Generated by Fig AI"}}))!==null&&r!==void 0?r:[]})}}A.ai=Se});var X=M(y=>{"use strict";var be=y&&y.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),we=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 Q=K();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return Q.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return Q.folders}});we($(),y);var Oe=z();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return Oe.ai}})});var I=oe(X(),1),_e={name:"mongoimport",description:"Import data from a JSON, CSV, or TSV file into a MongoDB instance",options:[{name:"--help",description:"Returns information on the options and use of mongoimport"},{name:["--verbose","-v"],description:"Increases the amount of internal reporting returned on standard output or in log files"},{name:"--quiet",description:"Runs mongoimport in a quiet mode that attempts to limit the amount of output"},{name:"--version",description:"Returns the mongoimport release number"},{name:"--config",description:"Specifies the full path to a YAML configuration file containing sensitive values for the following options to mongoimport",args:{name:"filename",generators:(0,I.filepaths)({extensions:["yaml","yml"]})}},{name:"--uri",description:"Specifies the resolvable URI connection string of the MongoDB deployment",priority:100,args:{name:"connectionString",description:"MongoDB connection string",suggestions:[{name:"mongodb://localhost:27017",description:"Default Connection String"},{name:"mongodb+srv://username:password@cluster0.example.mongodb.net/database",description:"Atlas Connection String Example",priority:35}]}},{name:["--host","-h"],description:"Specifies the resolvable hostname of the MongoDB deployment",args:{name:"hostname:port",suggestions:[{name:"localhost:27017",description:"Default host"}]}},{name:"--port",description:"Specifies the TCP port on which the MongoDB instance listens for client connections",args:{name:"port",suggestions:[{name:"27017",description:"Default port"}]}},{name:"--ssl",description:"Enables connection to a mongod or mongos that has TLS/SSL support enabled"},{name:"--sslCAFile",description:"Specifies the .pem file that contains the root certificate chain from the Certificate Authority",args:{name:"filename",generators:(0,I.filepaths)({extensions:["pem"]})}},{name:"--sslPEMKeyFile",description:"Specifies the .pem file that contains both the TLS/SSL certificate and key",args:{name:"filename",generators:(0,I.filepaths)({extensions:["pem"]})}},{name:"--sslPEMKeyPassword",description:"Specifies the password to de-crypt the certificate-key file (i.e. --sslPEMKeyFile)",args:{name:"value",description:"Password",isDangerous:!0}},{name:"--sslCRLFile",description:"Specifies the .pem file that contains the Certificate Revocation List",args:{name:"filename",generators:(0,I.filepaths)({extensions:["pem"]})}},{name:"--sslAllowInvalidCertificates",description:"Bypasses the validation checks for server certificates and allows the use of invalid certificates"},{name:"--sslAllowInvalidHostnames",description:"Disables the validation of the hostnames in TLS/SSL certificates"},{name:["--username","-u"],description:"Specifies a username with which to authenticate to a MongoDB database that uses authentication",args:{name:"username"}},{name:["--password","-p"],description:"Specifies a password with which to authenticate to a MongoDB database that uses authentication",dependsOn:["--username"],args:{name:"password",isDangerous:!0}},{name:"--awsSessionToken",description:"Specifies the session token for MONGODB-AWS authentication mechanism",args:{name:"AWS Session Token"}},{name:"--authenticationDatabase",description:"Specifies the authentication database where the specified --username has been created",args:{name:"dbname",description:"Database name"}},{name:"--authenticationMechanism",description:"Specifies the authentication mechanism the mongoimport instance uses to authenticate to the mongod or mongos",args:{name:"name",suggestions:[{name:"SCRAM-SHA-1",description:"Default"},{name:"SCRAM-SHA-256"},{name:"MONGODB-X509"},{name:"MONGODB-AWS"},{name:"GSSAPI"},{name:"PLAIN"}]}},{name:"--gssapiServiceName",description:"Specify the name of the service using GSSAPI/Kerberos. This option is available only in MongoDB Enterprise",args:{name:"serviceName"}},{name:"--gssapiHostName",description:"Specify the hostname of the service using GSSAPI/Kerberos. This option is available only in MongoDB Enterprise",args:{name:"hostname"}},{name:["--db","-d"],description:"Specifies the name of the database on which to run the mongoimport",args:{name:"database"}},{name:["--collection","-c"],description:"Specifies the name of the collection to import",priority:90,args:{name:"collection"}},{name:["--fields","-f"],description:"Specify a comma separated list of field names when importing CSV or TSV files that do not have field names in the first (i.e. header) line of the file",exclusiveOn:["--fieldFile"],args:{name:"field1,field2,...",description:"Comma separated list of fields"}},{name:"--fieldFile",description:"Specify a file containing a comma separated list of field names when importing CSV or TSV files that do not have field names in the first (i.e. header) line of the file",exclusiveOn:["--fields","-f"],args:{name:"filename",generators:(0,I.filepaths)({extensions:["csv","tsv"]})}},{name:"--ignoreBlanks",description:"Ignores empty fields in CSV and TSV exports"},{name:"--type",description:"Specifies the file type to import",args:{name:"type",suggestions:[{name:"json",description:"JSON"},{name:"csv",description:"Comma-separated values"},{name:"tsv",description:"Tab-separated values"}]}},{name:"--file",description:"Specifies the location and name of a file containing the data to import",priority:80,args:{name:"filename",generators:(0,I.filepaths)({extensions:["json","csv","tsv"]})}},{name:"--drop",description:"Modifies the import process so that the target instance drops the collection before importing the data from the input"},{name:"--headerline",description:"Treats the first line of the input file as a header line"},{name:"--useArrayIndexFields",description:"Interpret natural numbers in fields as array indexes when importing CSV or TSV files"},{name:"--mode",description:"Specifies how the import process should handle existing documents in the database that match documents in the import file",priority:80,args:{name:"mode",suggestions:[{name:"insert",description:"Insert the documents in the import file"},{name:"upsert",description:"Replace existing documents in the database with matching documents from the import file"},{name:"merge",description:"Merge existing documents that match a document in the import file with the new document"},{name:"delete",description:"Delete existing documents in the database that match a document in the import file"}]}},{name:"--upsertFields",description:"Specifies a list of fields for the query portion of the import process",args:{name:"field1,field2,...",description:"Comma separated list of fields"}},{name:"--stopOnError",description:"Forces mongoimport to halt the insert operation at the first error rather than continuing the operation despite errors"},{name:"jsonArray",description:"Accepts the import of data expressed with multiple MongoDB documents within a single JSON array"},{name:"--legacy",description:"Indicates that the import data is in Extended JSON v1 format"},{name:"--maintainInsertionOrder",description:"Maintains the order of documents in the import file when inserting documents into the database"},{name:"--numInsertionWorkers",description:"Specifies the number of insertion workers to run concurrently",args:{name:"number",description:"Number of workers",default:"1"}},{name:"--writeConcern",description:"Specifies the write concern for each write operation that mongoimport performs",args:{name:"document",default:"{w:'majority'}"}},{name:"--bypassDocumentValidation",description:"Enables mongoimport to bypass document validation during the operation"},{name:"--columnsHaveTypes",description:"Instructs mongoimport that the field list specified in --fields, --fieldFile, or --headerline specifies the types of each field"},{name:"--parseGrace",description:"Specifies how mongoimport handles type coercion failures when importing CSV or TSV files with --columnsHaveTypes",args:{name:"grace",default:"stop",suggestions:[{name:"autoCast"},{name:"skipField"},{name:"skipRow"},{name:"stop"}]}}]},Ce=_e;export{Ce as default};
|
|
1
|
+
var Z=Object.create;var k=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ie=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ee(t))!ne.call(e,o)&&o!==n&&k(e,o,{get:()=>t[o],enumerable:!(i=Y(t,o))||i.enumerable});return e};var oe=(e,t,n)=>(n=e!=null?Z(te(e)):{},ie(t||!e||!e.__esModule?k(n,"default",{value:e,enumerable:!0}):n,e));var q=A(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.shellExpand=T.ensureTrailingSlash=void 0;var se=e=>e.endsWith("/")?e:`${e}/`;T.ensureTrailingSlash=se;var re=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,ae=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,o=>{var s;let a=o.slice(1);return(s=t[a])!==null&&s!==void 0?s:o}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(o,s,a)=>{var l,u;return(u=(l=t[s])!==null&&l!==void 0?l:a)!==null&&u!==void 0?u:o}),ce=(e,t)=>{var n;let{environmentVariables:i}=t;return ae(re(e,(n=i?.HOME)!==null&&n!==void 0?n:"~"),i)};T.shellExpand=ce});var K=A(S=>{"use strict";var le=S&&S.__awaiter||function(e,t,n,i){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(r){try{c(i.next(r))}catch(d){a(d)}}function u(r){try{c(i.throw(r))}catch(d){a(d)}}function c(r){r.done?s(r.value):o(r.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(S,"__esModule",{value:!0});S.filepaths=S.folders=S.getCurrentInsertedDirectory=void 0;S.sortFilesAlphabetically=W;var L=q();function W(e,t=[]){let n=t.map(o=>o.toLowerCase()),i=e.filter(o=>!n.includes(o.toLowerCase()));return[...i.filter(o=>!o.startsWith(".")).sort((o,s)=>o.localeCompare(s)),...i.filter(o=>o.startsWith(".")).sort((o,s)=>o.localeCompare(s)),"../"]}var ue=(e,t,n)=>{if(e===null)return"/";let i=(0,L.shellExpand)(t,n),o=i.slice(0,i.lastIndexOf("/")+1);return o===""?(0,L.ensureTrailingSlash)(e):o.startsWith("/")?o:`${(0,L.ensureTrailingSlash)(e)}${o}`};S.getCurrentInsertedDirectory=ue;function j(e={}){let{extensions:t=[],equals:n=[],matches:i,filterFolders:o=!1,editFileSuggestions:s,editFolderSuggestions:a,rootDirectory:l,showFolders:u="always"}=e,c=new Set(t),r=new Set(n),d=()=>t.length>0||n.length>0||i,g=(m=[])=>d()?m.filter(({name:h="",type:b})=>{if(!o&&b==="folder"||r.has(h)||i&&h.match(i))return!0;let[,...f]=h.split(".");if(f.length>=1){let y=f.length-1,w=f[y];do{if(c.has(w))return!0;y-=1,w=[f[y],w].join(".")}while(y>=0)}return!1}):m,O=(m=[])=>!s&&!a?m:m.map(h=>Object.assign(Object.assign({},h),(h.type==="file"?s:a)||{}));return{trigger:(m,h)=>{let b=m.lastIndexOf("/"),f=h.lastIndexOf("/");return b!==f?!0:b===-1&&f===-1?!1:m.slice(0,b)!==h.slice(0,f)},getQueryTerm:m=>m.slice(m.lastIndexOf("/")+1),custom:(m,h,b)=>le(this,void 0,void 0,function*(){var f;let{isDangerous:y,currentWorkingDirectory:w,searchTerm:p}=b,_=(f=(0,S.getCurrentInsertedDirectory)(l??w,p,b))!==null&&f!==void 0?f:"/";try{let P=yield h({command:"ls",args:["-1ApL"],cwd:_}),U=W(P.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),R=[];for(let C of U)if(C){let V=C.endsWith("/")?"folders":"filepaths";(V==="filepaths"&&u!=="only"||V==="folders"&&u!=="never")&&R.push({type:V==="filepaths"?"file":"folder",name:C,insertValue:C,isDangerous:y,context:{templateType:V}})}return O(g(R))}catch{return[]}})}}S.folders=Object.assign(()=>j({showFolders:"only"}),Object.freeze(j({showFolders:"only"})));S.filepaths=Object.assign(j,Object.freeze(j()))});var $=A(x=>{"use strict";var M=x&&x.__awaiter||function(e,t,n,i){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(r){try{c(i.next(r))}catch(d){a(d)}}function u(r){try{c(i.throw(r))}catch(d){a(d)}}function c(r){r.done?s(r.value):o(r.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(x,"__esModule",{value:!0});x.valueList=de;x.keyValue=fe;x.keyValueList=me;var G=new Map;function E(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 M(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...n);return E(t,i)}if(typeof e[0]=="string"){let i=e.map(o=>({name:o}));return E(t,i)}return E(t,e)})}function B(e,t,n,i){return M(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let o=G.get(e);return o===void 0&&(o=yield H(e,t,i),G.set(e,o)),o}return H(e,t,i)})}function J(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function F(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function N(e,t){let n=new Set(e);return t.filter(i=>{var o;return typeof i.name=="string"?!n.has(i.name):!(!((o=i.name)===null||o===void 0)&&o.some(s=>n.has(s)))})}function de({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:i=!1,allowRepeatedValues:o=!1}){return{trigger:(s,a)=>s.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>M(this,void 0,void 0,function*(){var a;let l=yield B(t,i?e:"",n,s);if(o)return l;let[u]=s,c=(a=u[u.length-1])===null||a===void 0?void 0:a.split(e);return N(c,l)})}}function fe({separator:e="=",keys:t=[],values:n=[],cache:i=!1,insertSeparator:o=!0}){return{trigger:(s,a)=>s.indexOf(e)!==a.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>M(this,void 0,void 0,function*(){let[a]=s,u=!a[a.length-1].includes(e),c=u?t:n,r=J(u,i);return B(c,u&&o?e:"",r,s)})}}function me({separator:e="=",delimiter:t=",",keys:n=[],values:i=[],cache:o=!1,insertSeparator:s=!0,insertDelimiter:a=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:u=!0}){return{trigger:(c,r)=>{let d=F(c,e,t),g=F(r,e,t);return d!==g},getQueryTerm:c=>{let r=F(c,e,t);return c.slice(r+1)},custom:(...c)=>M(this,void 0,void 0,function*(){let[r]=c,d=r[r.length-1],g=F(d,e,t),O=g===-1||d.slice(g,g+e.length)!==e,m=O?n:i,h=J(O,o),f=yield B(m,O?s?e:"":a?t:"",h,c);if(O){if(l)return f;let w=d.split(t).map(p=>p.slice(0,p.indexOf(e)));return N(w,f)}if(u)return f;let y=d.split(t).map(w=>w.slice(w.indexOf(e)+e.length));return N(y,f)})}}});var z=A(D=>{"use strict";var pe=D&&D.__awaiter||function(e,t,n,i){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(r){try{c(i.next(r))}catch(d){a(d)}}function u(r){try{c(i.throw(r))}catch(d){a(d)}}function c(r){r.done?s(r.value):o(r.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(D,"__esModule",{value:!0});D.ai=Se;var he=4097,ge=4,ve=.8,ye=he*ge*ve;function Se({name:e,prompt:t,message:n,postProcess:i,temperature:o,splitOn:s}){return{scriptTimeout:15e3,custom:(a,l,u)=>pe(this,void 0,void 0,function*(){var c,r;let d=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(d.stdout))return[];let g=typeof t=="function"?yield t({tokens:a,executeCommand:l,generatorContext:u}):t,O=typeof n=="function"?yield n({tokens:a,executeCommand:l,generatorContext:u}):n;if(O===null||O.length===0)return console.warn("No message provided to AI generator"),[];let m=ye-((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:O.slice(0,m)}],temperature:o},b=JSON.stringify(h),f=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",b]}),y=JSON.parse(f.stdout);return(r=y?.choices.map(p=>{var _;return(_=p?.message)===null||_===void 0?void 0:_.content}).filter(p=>typeof p=="string").flatMap(p=>s?p.split(s).filter(_=>_.trim().length>0):[p]).map(p=>{if(i)return i(p);let _=p.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:_,insertValue:`'${_}'`,description:"Generated by Fig AI"}}))!==null&&r!==void 0?r:[]})}}});var X=A(v=>{"use strict";var be=v&&v.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),we=v&&v.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&be(t,e,n)};Object.defineProperty(v,"__esModule",{value:!0});v.ai=v.folders=v.filepaths=void 0;var Q=K();Object.defineProperty(v,"filepaths",{enumerable:!0,get:function(){return Q.filepaths}});Object.defineProperty(v,"folders",{enumerable:!0,get:function(){return Q.folders}});we($(),v);var Oe=z();Object.defineProperty(v,"ai",{enumerable:!0,get:function(){return Oe.ai}})});var I=oe(X(),1),_e={name:"mongoimport",description:"Import data from a JSON, CSV, or TSV file into a MongoDB instance",options:[{name:"--help",description:"Returns information on the options and use of mongoimport"},{name:["--verbose","-v"],description:"Increases the amount of internal reporting returned on standard output or in log files"},{name:"--quiet",description:"Runs mongoimport in a quiet mode that attempts to limit the amount of output"},{name:"--version",description:"Returns the mongoimport release number"},{name:"--config",description:"Specifies the full path to a YAML configuration file containing sensitive values for the following options to mongoimport",args:{name:"filename",generators:(0,I.filepaths)({extensions:["yaml","yml"]})}},{name:"--uri",description:"Specifies the resolvable URI connection string of the MongoDB deployment",priority:100,args:{name:"connectionString",description:"MongoDB connection string",suggestions:[{name:"mongodb://localhost:27017",description:"Default Connection String"},{name:"mongodb+srv://username:password@cluster0.example.mongodb.net/database",description:"Atlas Connection String Example",priority:35}]}},{name:["--host","-h"],description:"Specifies the resolvable hostname of the MongoDB deployment",args:{name:"hostname:port",suggestions:[{name:"localhost:27017",description:"Default host"}]}},{name:"--port",description:"Specifies the TCP port on which the MongoDB instance listens for client connections",args:{name:"port",suggestions:[{name:"27017",description:"Default port"}]}},{name:"--ssl",description:"Enables connection to a mongod or mongos that has TLS/SSL support enabled"},{name:"--sslCAFile",description:"Specifies the .pem file that contains the root certificate chain from the Certificate Authority",args:{name:"filename",generators:(0,I.filepaths)({extensions:["pem"]})}},{name:"--sslPEMKeyFile",description:"Specifies the .pem file that contains both the TLS/SSL certificate and key",args:{name:"filename",generators:(0,I.filepaths)({extensions:["pem"]})}},{name:"--sslPEMKeyPassword",description:"Specifies the password to de-crypt the certificate-key file (i.e. --sslPEMKeyFile)",args:{name:"value",description:"Password",isDangerous:!0}},{name:"--sslCRLFile",description:"Specifies the .pem file that contains the Certificate Revocation List",args:{name:"filename",generators:(0,I.filepaths)({extensions:["pem"]})}},{name:"--sslAllowInvalidCertificates",description:"Bypasses the validation checks for server certificates and allows the use of invalid certificates"},{name:"--sslAllowInvalidHostnames",description:"Disables the validation of the hostnames in TLS/SSL certificates"},{name:["--username","-u"],description:"Specifies a username with which to authenticate to a MongoDB database that uses authentication",args:{name:"username"}},{name:["--password","-p"],description:"Specifies a password with which to authenticate to a MongoDB database that uses authentication",dependsOn:["--username"],args:{name:"password",isDangerous:!0}},{name:"--awsSessionToken",description:"Specifies the session token for MONGODB-AWS authentication mechanism",args:{name:"AWS Session Token"}},{name:"--authenticationDatabase",description:"Specifies the authentication database where the specified --username has been created",args:{name:"dbname",description:"Database name"}},{name:"--authenticationMechanism",description:"Specifies the authentication mechanism the mongoimport instance uses to authenticate to the mongod or mongos",args:{name:"name",suggestions:[{name:"SCRAM-SHA-1",description:"Default"},{name:"SCRAM-SHA-256"},{name:"MONGODB-X509"},{name:"MONGODB-AWS"},{name:"GSSAPI"},{name:"PLAIN"}]}},{name:"--gssapiServiceName",description:"Specify the name of the service using GSSAPI/Kerberos. This option is available only in MongoDB Enterprise",args:{name:"serviceName"}},{name:"--gssapiHostName",description:"Specify the hostname of the service using GSSAPI/Kerberos. This option is available only in MongoDB Enterprise",args:{name:"hostname"}},{name:["--db","-d"],description:"Specifies the name of the database on which to run the mongoimport",args:{name:"database"}},{name:["--collection","-c"],description:"Specifies the name of the collection to import",priority:90,args:{name:"collection"}},{name:["--fields","-f"],description:"Specify a comma separated list of field names when importing CSV or TSV files that do not have field names in the first (i.e. header) line of the file",exclusiveOn:["--fieldFile"],args:{name:"field1,field2,...",description:"Comma separated list of fields"}},{name:"--fieldFile",description:"Specify a file containing a comma separated list of field names when importing CSV or TSV files that do not have field names in the first (i.e. header) line of the file",exclusiveOn:["--fields","-f"],args:{name:"filename",generators:(0,I.filepaths)({extensions:["csv","tsv"]})}},{name:"--ignoreBlanks",description:"Ignores empty fields in CSV and TSV exports"},{name:"--type",description:"Specifies the file type to import",args:{name:"type",suggestions:[{name:"json",description:"JSON"},{name:"csv",description:"Comma-separated values"},{name:"tsv",description:"Tab-separated values"}]}},{name:"--file",description:"Specifies the location and name of a file containing the data to import",priority:80,args:{name:"filename",generators:(0,I.filepaths)({extensions:["json","csv","tsv"]})}},{name:"--drop",description:"Modifies the import process so that the target instance drops the collection before importing the data from the input"},{name:"--headerline",description:"Treats the first line of the input file as a header line"},{name:"--useArrayIndexFields",description:"Interpret natural numbers in fields as array indexes when importing CSV or TSV files"},{name:"--mode",description:"Specifies how the import process should handle existing documents in the database that match documents in the import file",priority:80,args:{name:"mode",suggestions:[{name:"insert",description:"Insert the documents in the import file"},{name:"upsert",description:"Replace existing documents in the database with matching documents from the import file"},{name:"merge",description:"Merge existing documents that match a document in the import file with the new document"},{name:"delete",description:"Delete existing documents in the database that match a document in the import file"}]}},{name:"--upsertFields",description:"Specifies a list of fields for the query portion of the import process",args:{name:"field1,field2,...",description:"Comma separated list of fields"}},{name:"--stopOnError",description:"Forces mongoimport to halt the insert operation at the first error rather than continuing the operation despite errors"},{name:"jsonArray",description:"Accepts the import of data expressed with multiple MongoDB documents within a single JSON array"},{name:"--legacy",description:"Indicates that the import data is in Extended JSON v1 format"},{name:"--maintainInsertionOrder",description:"Maintains the order of documents in the import file when inserting documents into the database"},{name:"--numInsertionWorkers",description:"Specifies the number of insertion workers to run concurrently",args:{name:"number",description:"Number of workers",default:"1"}},{name:"--writeConcern",description:"Specifies the write concern for each write operation that mongoimport performs",args:{name:"document",default:"{w:'majority'}"}},{name:"--bypassDocumentValidation",description:"Enables mongoimport to bypass document validation during the operation"},{name:"--columnsHaveTypes",description:"Instructs mongoimport that the field list specified in --fields, --fieldFile, or --headerline specifies the types of each field"},{name:"--parseGrace",description:"Specifies how mongoimport handles type coercion failures when importing CSV or TSV files with --columnsHaveTypes",args:{name:"grace",default:"stop",suggestions:[{name:"autoCast"},{name:"skipField"},{name:"skipRow"},{name:"stop"}]}}]},Ce=_e;export{Ce as default};
|
package/build/n.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var ee=Object.create;var z=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ie=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),q=[];for(let I of Y)if(I){let M=I.endsWith("/")?"folders":"filepaths";(M==="filepaths"&&d!=="only"||M==="folders"&&d!=="never")&&q.push({type:M==="filepaths"?"file":"folder",name:I,insertValue:I,isDangerous:b,context:{templateType:M}})}return S(h(q))}catch{return[]}})}}v.folders=Object.assign(()=>V({showFolders:"only"}),Object.freeze(V({showFolders:"only"})));v.filepaths=Object.assign(V,Object.freeze(V()))});var Q=T(k=>{"use strict";var D=k&&k.__awaiter||function(e,n,t,i){function r(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function l(o){try{c(i.next(o))}catch(u){a(u)}}function d(o){try{c(i.throw(o))}catch(u){a(u)}}function c(o){o.done?s(o.value):r(o.value).then(l,d)}c((i=i.apply(e,n||[])).next())})};Object.defineProperty(k,"__esModule",{value:!0});k.keyValueList=k.keyValue=k.valueList=void 0;var H=new Map;function C(e,n){return e.length===0?n:n.map(t=>t.insertValue?t:Object.assign(Object.assign({},t),{insertValue:t.name+e}))}function G(e,n,t){return D(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...t);return C(n,i)}if(typeof e[0]=="string"){let i=e.map(r=>({name:r}));return C(n,i)}return C(n,e)})}function R(e,n,t,i){return D(this,void 0,void 0,function*(){if(t||Array.isArray(e)){let r=H.get(e);return r===void 0&&(r=yield G(e,n,i),H.set(e,r)),r}return G(e,n,i)})}function K(e,n){return typeof n=="string"?e&&n==="keys"||!e&&n==="values":n}function N(e,...n){return Math.max(...n.map(t=>e.lastIndexOf(t)))}function F(e,n){let t=new Set(e);return n.filter(i=>{var r;return typeof i.name=="string"?!t.has(i.name):!(!((r=i.name)===null||r===void 0)&&r.some(s=>t.has(s)))})}function me({delimiter:e=",",values:n=[],cache:t=!1,insertDelimiter:i=!1,allowRepeatedValues:r=!1}){return{trigger:(s,a)=>s.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>D(this,void 0,void 0,function*(){var a;let l=yield R(n,i?e:"",t,s);if(r)return l;let[d]=s,c=(a=d[d.length-1])===null||a===void 0?void 0:a.split(e);return F(c,l)})}}k.valueList=me;function fe({separator:e="=",keys:n=[],values:t=[],cache:i=!1,insertSeparator:r=!0}){return{trigger:(s,a)=>s.indexOf(e)!==a.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>D(this,void 0,void 0,function*(){let[a]=s,d=!a[a.length-1].includes(e),c=d?n:t,o=K(d,i);return R(c,d&&r?e:"",o,s)})}}k.keyValue=fe;function ge({separator:e="=",delimiter:n=",",keys:t=[],values:i=[],cache:r=!1,insertSeparator:s=!0,insertDelimiter:a=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:d=!0}){return{trigger:(c,o)=>{let u=N(c,e,n),h=N(o,e,n);return u!==h},getQueryTerm:c=>{let o=N(c,e,n);return c.slice(o+1)},custom:(...c)=>D(this,void 0,void 0,function*(){let[o]=c,u=o[o.length-1],h=N(u,e,n),S=h===-1||u.slice(h,h+e.length)!==e,m=S?t:i,g=K(S,r),p=yield R(m,S?s?e:"":a?n:"",g,c);if(S){if(l)return p;let x=u.split(n).map(f=>f.slice(0,f.indexOf(e)));return F(x,p)}if(d)return p;let b=u.split(n).map(x=>x.slice(x.indexOf(e)+e.length));return F(b,p)})}}k.keyValueList=ge});var B=T(A=>{"use strict";var he=A&&A.__awaiter||function(e,n,t,i){function r(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function l(o){try{c(i.next(o))}catch(u){a(u)}}function d(o){try{c(i.throw(o))}catch(u){a(u)}}function c(o){o.done?s(o.value):r(o.value).then(l,d)}c((i=i.apply(e,n||[])).next())})};Object.defineProperty(A,"__esModule",{value:!0});A.ai=void 0;var ve=4097,ye=4,be=.8,we=ve*ye*be;function xe({name:e,prompt:n,message:t,postProcess:i,temperature:r,splitOn:s}){return{scriptTimeout:15e3,custom:(a,l,d)=>he(this,void 0,void 0,function*(){var c,o;let u=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(u.stdout))return[];let h=typeof n=="function"?yield n({tokens:a,executeCommand:l,generatorContext:d}):n,S=typeof t=="function"?yield t({tokens:a,executeCommand:l,generatorContext:d}):t;if(S===null||S.length===0)return console.warn("No message provided to AI generator"),[];let m=we-((c=h?.length)!==null&&c!==void 0?c:0),g={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...h?[{role:"system",content:h}]:[],{role:"user",content:S.slice(0,m)}],temperature:r},w=JSON.stringify(g),p=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",w]}),b=JSON.parse(p.stdout);return(o=b?.choices.map(f=>{var O;return(O=f?.message)===null||O===void 0?void 0:O.content}).filter(f=>typeof f=="string").flatMap(f=>s?f.split(s).filter(O=>O.trim().length>0):[f]).map(f=>{if(i)return i(f);let O=f.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:O,insertValue:`'${O}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}A.ai=xe});var X=T(y=>{"use strict";var Se=y&&y.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(n,t);(!r||("get"in r?!n.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,r)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),Oe=y&&y.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&Se(n,e,t)};Object.defineProperty(y,"__esModule",{value:!0});y.ai=y.folders=y.filepaths=void 0;var U=$();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return U.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return U.folders}});Oe(Q(),y);var ke=B();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return ke.ai}})});var Z=oe(X(),1),_e={name:"node",description:"Run the node interpreter",args:{name:"node script",isScript:!0,generators:(0,Z.filepaths)({extensions:["mjs","js","cjs"],editFileSuggestions:{priority:76}})},options:[{name:["-e","--eval=..."],insertValue:"-e '{cursor}'",description:"Evaluate script",args:{}},{name:"--watch",description:"Watch input files"},{name:"--watch-path",description:"Specify a watch directory or file",args:{name:"path",template:"filepaths"},isRepeatable:!0},{name:"--watch-preserve-output",description:"Disable the clearing of the console when watch mode restarts the process",dependsOn:["--watch","--watch-path"]},{name:"--env-file",description:"Specify a file containing environment variables",args:{name:"path",template:"filepaths"},isRepeatable:!0},{name:["-p","--print"],description:"Evaluate script and print result"},{name:["-c","--check"],description:"Syntax check script without executing"},{name:["-v","--version"],description:"Print Node.js version"},{name:["-i","--interactive"],description:"Always enter the REPL even if stdin does not appear to be a terminal"},{name:["-h","--help"],description:"Print node command line options (currently set)"},{name:"--inspect",requiresSeparator:!0,args:{name:"[host:]port",isOptional:!0},description:"Activate inspector on host:port (default: 127.0.0.1:9229)"},{name:"--preserve-symlinks",description:"Follows symlinks to directories when examining source code and templates for translation strings"}],generateSpec:async(e,n)=>{if((await n({command:"bash",args:["-c","isAdonisJsonPresentCommand"]})).status===0)return{name:"node",subcommands:[{name:"ace",description:"Run AdonisJS command-line",options:[{name:["-h","--help"],description:"Display AdonisJS Ace help"},{name:["-v","--version"],description:"Display AdonisJS version"}],subcommands:[{name:"build",description:"Compile project from Typescript to Javascript. Also compiles the frontend assets if using webpack encore",options:[{name:["-prod","--production"],description:"Build for production"},{name:"--assets",description:"Build frontend assets when webpack encore is installed"},{name:"--no-assets",description:"Disable building assets"},{name:"--ignore-ts-errors",description:"Ignore typescript errors and complete the build process"},{name:"--tsconfig",description:"Path to the TypeScript project configuration file",args:{name:"path",description:"Path to tsconfig.json"}},{name:"--encore-args",requiresSeparator:!0,insertValue:"--encore-args='{cursor}'",description:"CLI options to pass to the encore command line"},{name:"--client",args:{name:"name"},description:"Select the package manager to decide which lock file to copy to the build folder"}]},{name:["configure","invoke"],description:"Configure a given AdonisJS package",args:{name:"name",description:"Name of the package you want to configure"},subcommands:[{name:"@adonisjs/auth",description:"Trigger auto configuring auth package"},{name:"@adonisjs/shield",description:"Trigger auto configuring shield package"},{name:"@adonisjs/redis",description:"Trigger auto configuring redis package"},{name:"@adonisjs/mail",description:"Trigger auto configuring mail package"}]},{name:"repl",description:"Start a new REPL session"},{name:"serve",description:"Start the AdonisJS HTTP server, along with the file watcher. Also starts the webpack dev server when webpack encore is installed",options:[{name:"--assets",description:"Start webpack dev server when encore is installed"},{name:"--no-assets",description:"Disable webpack dev server"},{name:["-w","--watch"],description:"Watch for file changes and re-start the HTTP server on change"},{name:["-p","--poll"],description:"Detect file changes by polling files instead of listening to filesystem events"},{name:"--node-args",requiresSeparator:!0,insertValue:"--node-args='{cursor}'",description:"CLI options to pass to the node command line"},{name:"--encore-args",requiresSeparator:!0,insertValue:"--encore-args='{cursor}'",description:"CLI options to pass to the encore command line"}]},{name:"db:seed",description:"Execute database seeder files",options:[{name:["-c","--connection"],description:"Define a custom database connection for the seeders",args:{name:"name"}},{name:["-i","--interactive"],description:"Run seeders in interactive mode"},{name:["-f","--files"],args:{name:"file",isVariadic:!0,template:"filepaths"},description:"Define a custom set of seeders files names to run"}]},{name:"dump:rcfile",description:"Dump contents of .adonisrc.json file along with defaults"},{name:"generate:key",description:"Generate a new APP_KEY secret"},{name:"generate:manifest",description:"Generate ace commands manifest file. Manifest file speeds up commands lookup"},{name:"list:routes",description:"List application routes"},{name:"make:command",description:"Make a new ace command"},{name:"make:controller",description:"Make a new HTTP controller",args:{name:"name",description:"Name of the controller class"},options:[{name:["-r","--resource"],description:"Add resourceful methods to the controller class"},{name:["-e","--exact"],description:"Create the controller with the exact name as provided"}]},{name:"make:exception",description:"Make a new custom exception class"},{name:"make:listener",description:"Make a new event listener class"},{name:"make:mailer",description:"Make a new mailer class",args:{name:"name",description:"Mailer class name"}},{name:"make:middleware",description:"Make a new middleware",args:{name:"name",description:"Middleware class name"}},{name:"make:migration",description:"Make a new migration file",args:{name:"name",description:"Name of the migration file"},options:[{name:"--connection",description:"The connection flag is used to lookup the directory for the migration file",args:{name:"name"}},{name:"--folder",description:"Pre-select a migration directory",args:{name:"name",template:"filepaths"}},{name:"--create",description:"Define the table name for creating a new table",args:{name:"name"}},{name:"--table",description:"Define the table name for altering an existing table",args:{name:"name"}}]},{name:"make:model",description:"Make a new Lucid model",args:{name:"name",description:"Name of the model class"},options:[{name:["-m","--migration"],description:"Generate the migration for the model"},{name:["-c","--controller"],description:"Generate the controller for the model"}]},{name:"make:prldfile",description:"Make a new preload file",subcommands:[{name:"events",description:"Make events preload file"}]},{name:"make:provider",description:"Make a new provider class"},{name:"make:seeder",description:"Make a new Seeder file",args:{name:"name",description:"Name of the seeder class"}},{name:"make:validator",description:"Make a new validator",args:{name:"name",description:"Name of the validator class"},options:[{name:["-e","--exact"],description:"Create the validator with the exact name as provided"}]},{name:"make:view",description:"Make a new view template",args:{name:"name",description:"Name of the view"},options:[{name:["-e","--exact"],description:"Create the template file with the exact name as provided"}]},{name:"migration:rollback",description:"Rollback migrations to a given batch number",options:[{name:["-c","--connection"],description:"Define a custom database connection",args:{name:"name"}},{name:"--force",description:"Explicitly force to run migrations in production",isDangerous:!0},{name:"--dry-run",description:"Print SQL queries, instead of running the migrations"},{name:"--batch",args:{name:"number",description:"Use 0 to rollback to initial state"},description:"Define custom batch number for rollback"}]},{name:"migration:run",description:"Run pending migrations",options:[{name:["-c","--connection"],description:"Define a custom database connection",args:{name:"name"}},{name:"--force",description:"Explicitly force to run migrations in production",isDangerous:!0},{name:"--dry-run",description:"Print SQL queries, instead of running the migrations"}]},{name:"migration:status",description:"Check migrations current status"}]}]}}},P=_e;var _={name:"version",suggestions:[{name:["latest","current"],description:"Newest official release"},{name:"lts",description:"Newest Long Term Support official release"},{name:"auto",description:"Read version from file: .n-node-version, .node-version, .nvmrc, or package.json"},{name:"engine",description:"Read version from package.json"}],generators:{script:["n","lsr","--all"],postProcess:function(e){let n=new Set,t=e.split(`
|
|
3
|
-
`).slice(1);for(let i of t){n.add(i);let r=i.split(".");n.add(r[0]+"."+r[1]),n.add(r[0])}return Array.from(n).map(i=>({name:[i,`v${i}`],description:`Node.js ${i}`}))}},isOptional:!1},je={..._,isOptional:!0},Ae={..._,isVariadic:!0},Te={name:"n",description:"Node version management",subcommands:[{name:["i","install"],description:"Install a Node.js version",args:_},{name:["rm","\u2013"],description:"Remove a Node.js version",args:Ae},{name:"prune",description:"Remove all cached Node.js versions except the installed version"},{name:"doctor",description:"Display diagnostics to help resolve problems"},{name:"uninstall",description:"Remove the installed Node.js"},{name:["ls","list"],description:"Output downloaded versions"},{name:["lsr","ls-remote","list-remote"],description:"Output matching versions available for download",args:_,options:[{name:"--all",description:"Ls-remote displays all matches instead of last 20"}]},{name:["which","bin"],description:"Output path for downloaded node version",args:_},{name:["run","use","as"],description:"Execute downloaded Node.js version with args",args:[_,...[
|
|
1
|
+
var ee=Object.create;var z=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ie=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var A=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var se=(e,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of te(n))!re.call(e,r)&&r!==t&&z(e,r,{get:()=>n[r],enumerable:!(i=ne(n,r))||i.enumerable});return e};var oe=(e,n,t)=>(t=e!=null?ee(ie(e)):{},se(n||!e||!e.__esModule?z(t,"default",{value:e,enumerable:!0}):t,e));var J=A(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.shellExpand=j.ensureTrailingSlash=void 0;var ae=e=>e.endsWith("/")?e:`${e}/`;j.ensureTrailingSlash=ae;var ce=(e,n)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",n):e,le=(e,n)=>e.replace(/\$([A-Za-z0-9_]+)/g,r=>{var s;let a=r.slice(1);return(s=n[a])!==null&&s!==void 0?s:r}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(r,s,a)=>{var l,d;return(d=(l=n[s])!==null&&l!==void 0?l:a)!==null&&d!==void 0?d:r}),de=(e,n)=>{var t;let{environmentVariables:i}=n;return le(ce(e,(t=i?.HOME)!==null&&t!==void 0?t:"~"),i)};j.shellExpand=de});var $=A(w=>{"use strict";var ue=w&&w.__awaiter||function(e,n,t,i){function r(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function l(o){try{c(i.next(o))}catch(u){a(u)}}function d(o){try{c(i.throw(o))}catch(u){a(u)}}function c(o){o.done?s(o.value):r(o.value).then(l,d)}c((i=i.apply(e,n||[])).next())})};Object.defineProperty(w,"__esModule",{value:!0});w.filepaths=w.folders=w.getCurrentInsertedDirectory=void 0;w.sortFilesAlphabetically=W;var C=J();function W(e,n=[]){let t=n.map(r=>r.toLowerCase()),i=e.filter(r=>!t.includes(r.toLowerCase()));return[...i.filter(r=>!r.startsWith(".")).sort((r,s)=>r.localeCompare(s)),...i.filter(r=>r.startsWith(".")).sort((r,s)=>r.localeCompare(s)),"../"]}var pe=(e,n,t)=>{if(e===null)return"/";let i=(0,C.shellExpand)(n,t),r=i.slice(0,i.lastIndexOf("/")+1);return r===""?(0,C.ensureTrailingSlash)(e):r.startsWith("/")?r:`${(0,C.ensureTrailingSlash)(e)}${r}`};w.getCurrentInsertedDirectory=pe;function N(e={}){let{extensions:n=[],equals:t=[],matches:i,filterFolders:r=!1,editFileSuggestions:s,editFolderSuggestions:a,rootDirectory:l,showFolders:d="always"}=e,c=new Set(n),o=new Set(t),u=()=>n.length>0||t.length>0||i,h=(m=[])=>u()?m.filter(({name:g="",type:b})=>{if(!r&&b==="folder"||o.has(g)||i&&g.match(i))return!0;let[,...p]=g.split(".");if(p.length>=1){let y=p.length-1,x=p[y];do{if(c.has(x))return!0;y-=1,x=[p[y],x].join(".")}while(y>=0)}return!1}):m,S=(m=[])=>!s&&!a?m:m.map(g=>Object.assign(Object.assign({},g),(g.type==="file"?s:a)||{}));return{trigger:(m,g)=>{let b=m.lastIndexOf("/"),p=g.lastIndexOf("/");return b!==p?!0:b===-1&&p===-1?!1:m.slice(0,b)!==g.slice(0,p)},getQueryTerm:m=>m.slice(m.lastIndexOf("/")+1),custom:(m,g,b)=>ue(this,void 0,void 0,function*(){var p;let{isDangerous:y,currentWorkingDirectory:x,searchTerm:f}=b,O=(p=(0,w.getCurrentInsertedDirectory)(l??x,f,b))!==null&&p!==void 0?p:"/";try{let E=yield g({command:"ls",args:["-1ApL"],cwd:O}),Y=W(E.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),q=[];for(let I of Y)if(I){let M=I.endsWith("/")?"folders":"filepaths";(M==="filepaths"&&d!=="only"||M==="folders"&&d!=="never")&&q.push({type:M==="filepaths"?"file":"folder",name:I,insertValue:I,isDangerous:y,context:{templateType:M}})}return S(h(q))}catch{return[]}})}}w.folders=Object.assign(()=>N({showFolders:"only"}),Object.freeze(N({showFolders:"only"})));w.filepaths=Object.assign(N,Object.freeze(N()))});var Q=A(k=>{"use strict";var T=k&&k.__awaiter||function(e,n,t,i){function r(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function l(o){try{c(i.next(o))}catch(u){a(u)}}function d(o){try{c(i.throw(o))}catch(u){a(u)}}function c(o){o.done?s(o.value):r(o.value).then(l,d)}c((i=i.apply(e,n||[])).next())})};Object.defineProperty(k,"__esModule",{value:!0});k.valueList=me;k.keyValue=fe;k.keyValueList=ge;var H=new Map;function L(e,n){return e.length===0?n:n.map(t=>t.insertValue?t:Object.assign(Object.assign({},t),{insertValue:t.name+e}))}function G(e,n,t){return T(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...t);return L(n,i)}if(typeof e[0]=="string"){let i=e.map(r=>({name:r}));return L(n,i)}return L(n,e)})}function R(e,n,t,i){return T(this,void 0,void 0,function*(){if(t||Array.isArray(e)){let r=H.get(e);return r===void 0&&(r=yield G(e,n,i),H.set(e,r)),r}return G(e,n,i)})}function K(e,n){return typeof n=="string"?e&&n==="keys"||!e&&n==="values":n}function P(e,...n){return Math.max(...n.map(t=>e.lastIndexOf(t)))}function F(e,n){let t=new Set(e);return n.filter(i=>{var r;return typeof i.name=="string"?!t.has(i.name):!(!((r=i.name)===null||r===void 0)&&r.some(s=>t.has(s)))})}function me({delimiter:e=",",values:n=[],cache:t=!1,insertDelimiter:i=!1,allowRepeatedValues:r=!1}){return{trigger:(s,a)=>s.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>T(this,void 0,void 0,function*(){var a;let l=yield R(n,i?e:"",t,s);if(r)return l;let[d]=s,c=(a=d[d.length-1])===null||a===void 0?void 0:a.split(e);return F(c,l)})}}function fe({separator:e="=",keys:n=[],values:t=[],cache:i=!1,insertSeparator:r=!0}){return{trigger:(s,a)=>s.indexOf(e)!==a.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>T(this,void 0,void 0,function*(){let[a]=s,d=!a[a.length-1].includes(e),c=d?n:t,o=K(d,i);return R(c,d&&r?e:"",o,s)})}}function ge({separator:e="=",delimiter:n=",",keys:t=[],values:i=[],cache:r=!1,insertSeparator:s=!0,insertDelimiter:a=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:d=!0}){return{trigger:(c,o)=>{let u=P(c,e,n),h=P(o,e,n);return u!==h},getQueryTerm:c=>{let o=P(c,e,n);return c.slice(o+1)},custom:(...c)=>T(this,void 0,void 0,function*(){let[o]=c,u=o[o.length-1],h=P(u,e,n),S=h===-1||u.slice(h,h+e.length)!==e,m=S?t:i,g=K(S,r),p=yield R(m,S?s?e:"":a?n:"",g,c);if(S){if(l)return p;let x=u.split(n).map(f=>f.slice(0,f.indexOf(e)));return F(x,p)}if(d)return p;let y=u.split(n).map(x=>x.slice(x.indexOf(e)+e.length));return F(y,p)})}}});var B=A(D=>{"use strict";var he=D&&D.__awaiter||function(e,n,t,i){function r(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function l(o){try{c(i.next(o))}catch(u){a(u)}}function d(o){try{c(i.throw(o))}catch(u){a(u)}}function c(o){o.done?s(o.value):r(o.value).then(l,d)}c((i=i.apply(e,n||[])).next())})};Object.defineProperty(D,"__esModule",{value:!0});D.ai=xe;var ve=4097,ye=4,we=.8,be=ve*ye*we;function xe({name:e,prompt:n,message:t,postProcess:i,temperature:r,splitOn:s}){return{scriptTimeout:15e3,custom:(a,l,d)=>he(this,void 0,void 0,function*(){var c,o;let u=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(u.stdout))return[];let h=typeof n=="function"?yield n({tokens:a,executeCommand:l,generatorContext:d}):n,S=typeof t=="function"?yield t({tokens:a,executeCommand:l,generatorContext:d}):t;if(S===null||S.length===0)return console.warn("No message provided to AI generator"),[];let m=be-((c=h?.length)!==null&&c!==void 0?c:0),g={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...h?[{role:"system",content:h}]:[],{role:"user",content:S.slice(0,m)}],temperature:r},b=JSON.stringify(g),p=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",b]}),y=JSON.parse(p.stdout);return(o=y?.choices.map(f=>{var O;return(O=f?.message)===null||O===void 0?void 0:O.content}).filter(f=>typeof f=="string").flatMap(f=>s?f.split(s).filter(O=>O.trim().length>0):[f]).map(f=>{if(i)return i(f);let O=f.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:O,insertValue:`'${O}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}});var X=A(v=>{"use strict";var Se=v&&v.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(n,t);(!r||("get"in r?!n.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,r)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),Oe=v&&v.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&Se(n,e,t)};Object.defineProperty(v,"__esModule",{value:!0});v.ai=v.folders=v.filepaths=void 0;var U=$();Object.defineProperty(v,"filepaths",{enumerable:!0,get:function(){return U.filepaths}});Object.defineProperty(v,"folders",{enumerable:!0,get:function(){return U.folders}});Oe(Q(),v);var ke=B();Object.defineProperty(v,"ai",{enumerable:!0,get:function(){return ke.ai}})});var Z=oe(X(),1),_e={name:"node",description:"Run the node interpreter",args:{name:"node script",isScript:!0,generators:(0,Z.filepaths)({extensions:["mjs","js","cjs"],editFileSuggestions:{priority:76}})},options:[{name:["-e","--eval=..."],insertValue:"-e '{cursor}'",description:"Evaluate script",args:{}},{name:"--watch",description:"Watch input files"},{name:"--watch-path",description:"Specify a watch directory or file",args:{name:"path",template:"filepaths"},isRepeatable:!0},{name:"--watch-preserve-output",description:"Disable the clearing of the console when watch mode restarts the process",dependsOn:["--watch","--watch-path"]},{name:"--env-file",description:"Specify a file containing environment variables",args:{name:"path",template:"filepaths"},isRepeatable:!0},{name:["-p","--print"],description:"Evaluate script and print result"},{name:["-c","--check"],description:"Syntax check script without executing"},{name:["-v","--version"],description:"Print Node.js version"},{name:["-i","--interactive"],description:"Always enter the REPL even if stdin does not appear to be a terminal"},{name:["-h","--help"],description:"Print node command line options (currently set)"},{name:"--inspect",requiresSeparator:!0,args:{name:"[host:]port",isOptional:!0},description:"Activate inspector on host:port (default: 127.0.0.1:9229)"},{name:"--preserve-symlinks",description:"Follows symlinks to directories when examining source code and templates for translation strings"}],generateSpec:async(e,n)=>{if((await n({command:"bash",args:["-c","isAdonisJsonPresentCommand"]})).status===0)return{name:"node",subcommands:[{name:"ace",description:"Run AdonisJS command-line",options:[{name:["-h","--help"],description:"Display AdonisJS Ace help"},{name:["-v","--version"],description:"Display AdonisJS version"}],subcommands:[{name:"build",description:"Compile project from Typescript to Javascript. Also compiles the frontend assets if using webpack encore",options:[{name:["-prod","--production"],description:"Build for production"},{name:"--assets",description:"Build frontend assets when webpack encore is installed"},{name:"--no-assets",description:"Disable building assets"},{name:"--ignore-ts-errors",description:"Ignore typescript errors and complete the build process"},{name:"--tsconfig",description:"Path to the TypeScript project configuration file",args:{name:"path",description:"Path to tsconfig.json"}},{name:"--encore-args",requiresSeparator:!0,insertValue:"--encore-args='{cursor}'",description:"CLI options to pass to the encore command line"},{name:"--client",args:{name:"name"},description:"Select the package manager to decide which lock file to copy to the build folder"}]},{name:["configure","invoke"],description:"Configure a given AdonisJS package",args:{name:"name",description:"Name of the package you want to configure"},subcommands:[{name:"@adonisjs/auth",description:"Trigger auto configuring auth package"},{name:"@adonisjs/shield",description:"Trigger auto configuring shield package"},{name:"@adonisjs/redis",description:"Trigger auto configuring redis package"},{name:"@adonisjs/mail",description:"Trigger auto configuring mail package"}]},{name:"repl",description:"Start a new REPL session"},{name:"serve",description:"Start the AdonisJS HTTP server, along with the file watcher. Also starts the webpack dev server when webpack encore is installed",options:[{name:"--assets",description:"Start webpack dev server when encore is installed"},{name:"--no-assets",description:"Disable webpack dev server"},{name:["-w","--watch"],description:"Watch for file changes and re-start the HTTP server on change"},{name:["-p","--poll"],description:"Detect file changes by polling files instead of listening to filesystem events"},{name:"--node-args",requiresSeparator:!0,insertValue:"--node-args='{cursor}'",description:"CLI options to pass to the node command line"},{name:"--encore-args",requiresSeparator:!0,insertValue:"--encore-args='{cursor}'",description:"CLI options to pass to the encore command line"}]},{name:"db:seed",description:"Execute database seeder files",options:[{name:["-c","--connection"],description:"Define a custom database connection for the seeders",args:{name:"name"}},{name:["-i","--interactive"],description:"Run seeders in interactive mode"},{name:["-f","--files"],args:{name:"file",isVariadic:!0,template:"filepaths"},description:"Define a custom set of seeders files names to run"}]},{name:"dump:rcfile",description:"Dump contents of .adonisrc.json file along with defaults"},{name:"generate:key",description:"Generate a new APP_KEY secret"},{name:"generate:manifest",description:"Generate ace commands manifest file. Manifest file speeds up commands lookup"},{name:"list:routes",description:"List application routes"},{name:"make:command",description:"Make a new ace command"},{name:"make:controller",description:"Make a new HTTP controller",args:{name:"name",description:"Name of the controller class"},options:[{name:["-r","--resource"],description:"Add resourceful methods to the controller class"},{name:["-e","--exact"],description:"Create the controller with the exact name as provided"}]},{name:"make:exception",description:"Make a new custom exception class"},{name:"make:listener",description:"Make a new event listener class"},{name:"make:mailer",description:"Make a new mailer class",args:{name:"name",description:"Mailer class name"}},{name:"make:middleware",description:"Make a new middleware",args:{name:"name",description:"Middleware class name"}},{name:"make:migration",description:"Make a new migration file",args:{name:"name",description:"Name of the migration file"},options:[{name:"--connection",description:"The connection flag is used to lookup the directory for the migration file",args:{name:"name"}},{name:"--folder",description:"Pre-select a migration directory",args:{name:"name",template:"filepaths"}},{name:"--create",description:"Define the table name for creating a new table",args:{name:"name"}},{name:"--table",description:"Define the table name for altering an existing table",args:{name:"name"}}]},{name:"make:model",description:"Make a new Lucid model",args:{name:"name",description:"Name of the model class"},options:[{name:["-m","--migration"],description:"Generate the migration for the model"},{name:["-c","--controller"],description:"Generate the controller for the model"}]},{name:"make:prldfile",description:"Make a new preload file",subcommands:[{name:"events",description:"Make events preload file"}]},{name:"make:provider",description:"Make a new provider class"},{name:"make:seeder",description:"Make a new Seeder file",args:{name:"name",description:"Name of the seeder class"}},{name:"make:validator",description:"Make a new validator",args:{name:"name",description:"Name of the validator class"},options:[{name:["-e","--exact"],description:"Create the validator with the exact name as provided"}]},{name:"make:view",description:"Make a new view template",args:{name:"name",description:"Name of the view"},options:[{name:["-e","--exact"],description:"Create the template file with the exact name as provided"}]},{name:"migration:rollback",description:"Rollback migrations to a given batch number",options:[{name:["-c","--connection"],description:"Define a custom database connection",args:{name:"name"}},{name:"--force",description:"Explicitly force to run migrations in production",isDangerous:!0},{name:"--dry-run",description:"Print SQL queries, instead of running the migrations"},{name:"--batch",args:{name:"number",description:"Use 0 to rollback to initial state"},description:"Define custom batch number for rollback"}]},{name:"migration:run",description:"Run pending migrations",options:[{name:["-c","--connection"],description:"Define a custom database connection",args:{name:"name"}},{name:"--force",description:"Explicitly force to run migrations in production",isDangerous:!0},{name:"--dry-run",description:"Print SQL queries, instead of running the migrations"}]},{name:"migration:status",description:"Check migrations current status"}]}]}}},V=_e;var _={name:"version",suggestions:[{name:["latest","current"],description:"Newest official release"},{name:"lts",description:"Newest Long Term Support official release"},{name:"auto",description:"Read version from file: .n-node-version, .node-version, .nvmrc, or package.json"},{name:"engine",description:"Read version from package.json"}],generators:{script:["n","lsr","--all"],postProcess:function(e){let n=new Set,t=e.split(`
|
|
3
|
+
`).slice(1);for(let i of t){n.add(i);let r=i.split(".");n.add(r[0]+"."+r[1]),n.add(r[0])}return Array.from(n).map(i=>({name:[i,`v${i}`],description:`Node.js ${i}`}))}},isOptional:!1},je={..._,isOptional:!0},Ae={..._,isVariadic:!0},Te={name:"n",description:"Node version management",subcommands:[{name:["i","install"],description:"Install a Node.js version",args:_},{name:["rm","\u2013"],description:"Remove a Node.js version",args:Ae},{name:"prune",description:"Remove all cached Node.js versions except the installed version"},{name:"doctor",description:"Display diagnostics to help resolve problems"},{name:"uninstall",description:"Remove the installed Node.js"},{name:["ls","list"],description:"Output downloaded versions"},{name:["lsr","ls-remote","list-remote"],description:"Output matching versions available for download",args:_,options:[{name:"--all",description:"Ls-remote displays all matches instead of last 20"}]},{name:["which","bin"],description:"Output path for downloaded node version",args:_},{name:["run","use","as"],description:"Execute downloaded Node.js version with args",args:[_,...[V.args].flat()],subcommands:V.subcommands,options:V.options},{name:"exec",description:"Execute command with modified PATH, so downloaded node version and npm first",args:[_,{name:"cmd",isCommand:!0},{name:"args",isVariadic:!0}]}],args:je,options:[{name:["-V","--version"],description:"Output version of n"},{name:["-h","--help"],description:"Display help information"},{name:["-p","--preserve"],description:"Preserve npm and npx during install of Node.js"},{name:"--no-preserve",description:"Do not preserve npm and npx during install of Node.js"},{name:["-q","--quiet"],description:'Disable curl output. Disable log messages processing "auto" and "engine" labels'},{name:["-d","--download"],description:"Download only"},{name:["-a","--arch"],description:"Override system architecture",args:{name:"Architecture",suggestions:[{name:["x64","x86_64"]},{name:["arm64","aarch64","armv8l"]},{name:["x86","i386","i686"]},{name:["armv6l","armv7l"]}]}},{name:"--insecure",description:"Turn off certificate checking for https requests (may be needed from behind a proxy server)",isDangerous:!0},{name:"--use-xz",description:"Override automatic detection of xz support and enable use of xz compressed node downloads",exclusiveOn:["--no-use-xz"]},{name:"--no-use-xz",description:"Override automatic detection of xz support and disable use of xz compressed node downloads",exclusiveOn:["--use-xz"]}]},Fe=Te;export{Fe as default};
|