-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathpnpx.ts
146 lines (145 loc) · 3.35 KB
/
pnpx.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
const completionSpec: Fig.Spec = {
name: "pnpx",
description: "Execute binaries from npm packages",
subcommands: [
{
name: "create-react-native-app",
icon: "https://reactnative.dev/img/pwa/manifest-icon-512.png",
loadSpec: "create-react-native-app",
},
{
name: "react-native",
icon: "https://reactnative.dev/img/pwa/manifest-icon-512.png",
loadSpec: "react-native",
},
{
name: "tailwindcss",
icon: "https://tailwindcss.com/favicon-32x32.png",
loadSpec: "tailwindcss",
},
{
name: "next",
icon: "https://nextjs.org/static/favicon/favicon-16x16.png",
loadSpec: "next",
},
{
name: "gltfjsx",
icon: "https://raw.githubusercontent.com/pmndrs/branding/master/logo.svg",
loadSpec: "gltfjsx",
},
{
name: "prisma",
icon: "https://raw.githubusercontent.com/prisma/docs/main/src/images/favicon-16x16.png",
loadSpec: "prisma",
},
],
options: [
{
name: ["--package", "-p"],
description: "Package to be executed",
args: {
name: "package",
},
},
{
name: "--cache",
args: {
name: "path",
template: "filepaths",
},
description: "Location of the npm cache",
},
{
name: "--always-spawn",
description: "Always spawn a child process to execute the command",
},
{
description: "Skip installation if a package is missing",
name: "--no-install",
},
{
args: {
name: "path",
template: "filepaths",
},
description: "Path to user npmrc",
name: "--userconfig",
},
{
name: ["--call", "-c"],
args: {
name: "script",
},
description: "Execute string as if inside `npm run-script`",
},
{
name: ["--shell", "-s"],
description: "Shell to execute the command with, if any",
args: {
name: "shell",
suggestions: [
{
name: "bash",
},
{
name: "fish",
},
{
name: "zsh",
},
],
},
},
{
args: {
name: "shell-fallback",
suggestions: [
{
name: "bash",
},
{
name: "fish",
},
{
name: "zsh",
},
],
},
name: "--shell-auto-fallback",
description:
'Generate shell code to use pnpx as the "command not found" fallback',
},
{
name: "--ignore-existing",
description:
"Ignores existing binaries in $PATH, or in the localproject. This forces pnpx to do a temporary install and use the latest version",
},
{
name: ["--quiet", "-q"],
description:
"Suppress output from pnpx itself. Subcommands will not be affected",
},
{
name: "--npm",
args: {
name: "path to binary",
template: "filepaths",
},
description: "Npm binary to use for internal operations",
},
{
args: {},
description: "Extra node argument when calling a node binary",
name: ["--node-arg", "-n"],
},
{
description: "Show version number",
name: ["--version", "-v"],
},
{
description: "Show help",
name: ["--help", "-h"],
},
],
};
export default completionSpec;