-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_nest
More file actions
166 lines (145 loc) · 5.39 KB
/
_nest
File metadata and controls
166 lines (145 loc) · 5.39 KB
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#compdef nest
#autoload
# Copyright (C) 2012 - 2014:
# Behrad Khodayar <behrad.khodayar@gmail.com>
# This file is licensed under the MIT.
# The current plugin provides ZSh completion for the NestJS CLI.
# NestJS CLI: https://docs.nestjs.com/cli/overview
_nest() {
local -a commands
commands=(
'new:Generate Nest application.'
'generate:Generate a Nest element.'
'build:Build Nest application.'
'start:Run Nest application'
'info:Display Nest project details.'
'add:Adds support for an external library to your project.'
)
case $words[2] in
add)
_nest_add
return
;;
build)
_nest_build
return
;;
generate)
_nest_generate
return
;;
info)
_nest_info
return
;;
new)
_nest_new
return
;;
start)
_nest_start
return
;;
esac
_describe 'nest commands' commands
}
_nest_add() {
local -a options
options=(
'--dry-run:Report actions that would be performed without writing out results.'
'--skip-install:Skip package installation. (default: false)'
'--project:project [project] - Project in which to generate files.'
'--help:Output usage information.'
)
_describe 'nest add options' options
}
_nest_build() {
local -a options
options=(
'--config:config [path] - Path to nest-cli configuration file.'
'--path:path [path] - Path to tsconfig file.'
'--watch:Run in watch mode (live-reload).'
'--builder:builder [name] - Builder to be used (tsc, webpack, swc).'
'--watchAssets:Watch non-ts (e.g., .graphql) files mode.'
'--webpack:Use webpack for compilation (deprecated option, use --builder instead).'
'--type-check:Enable type checking (when SWC is used).'
'--webpackPath:webpackPath [path] - Path to webpack configuration.'
'--tsc:Use typescript compiler for compilation.'
'--preserveWatchOutput:Use "preserveWatchOutput" option when using tsc watch mode.'
'--all:Build all projects in a monorepo.'
'--help:Output usage information.'
)
_describe 'build options' options
}
_nest_generate() {
local -a elements
elements=(
'application:Generate a new application workspace'
'class:Generate a new class'
'configuration:Generate a CLI configuration file'
'controller:Generate a controller declaration'
'decorator:Generate a custom decorator'
'filter:Generate a filter declaration'
'gateway:Generate a gateway declaration'
'guard:Generate a guard declaration'
'interceptor:Generate an interceptor declaration'
'interface:Generate an interface'
'library:Generate a new library within a monorepo'
'middleware:Generate a middleware declaration'
'module:Generate a module declaration'
'pipe:Generate a pipe declaration'
'provider:Generate a provider declaration'
'resolver:Generate a GraphQL resolver declaration'
'resource:Generate a new CRUD resource'
'service:Generate a service declaration'
'sub-app:Generate a new application within a monorepo'
)
_describe 'nest generate elements' elements
}
_nest_info(){
local -a options
options=(
'--help:Output usage information'
)
_describe 'nest info options' options
}
_nest_new(){
local -a options
options=(
'--directory:directory [directory] - Specify the destination directory'
'--dry-run:Report actions that would be performed without writing out results. (default: false)'
'--skip-git:Skip git repository initialization. (default: false)'
'--skip-install:Skip package installation. (default: false)'
'--package-manager:package-manager [packageManager] - Specify package manager.'
'--language:language [language] - Programming language to be used (TypeScript or JavaScript) (default: "TypeScript")'
'--collection:collection [collectionName] - Schematics collection to use (default: "@nestjs/schematics")'
'--strict:Enables strict mode in TypeScript. (default: false)'
'--help:Output usage information'
)
_describe 'nest new options' options
}
_nest_start() {
local -a options
options=(
'--config:config [path] - Path to nest-cli configuration file.'
'--path:path [path] - Path to tsconfig file.'
'--watch:Run in watch mode (live-reload).'
'--builder:builder [name] - Builder to be used (tsc, webpack, swc).'
'--watchAssets:Watch non-ts (e.g., .graphql) files mode.'
'--debug:debug [hostport] - Run in debug mode (with --inspect flag).'
'--webpack:Use webpack for compilation (deprecated option, use --builder instead).'
'--webpackPath:webpackPath [path] - Path to webpack configuration.'
'--type-check:Enable type checking (when SWC is used).'
'--tsc:Use typescript compiler for compilation.'
'--sourceRoot:sourceRoot [sourceRoot] - Points at the root of the source code for the single project in standard mode structures, or the default project in monorepo mode structures.'
'--entryFile:entryFile [entryFile] - Path to the entry file where this command will work with. Defaults to the one defined at your Nest CLI config file.'
'--exec:exec [binary] - Binary to run (default: "node").'
'--preserveWatchOutput:Use "preserveWatchOutput" option when using tsc watch mode.'
'--shell:Spawn child processes within a shell (see node child_process.spawn() method docs). Default: true. (default: true)'
'--no-shell:Do not spawn child processes within a shell.'
'--env-file:env-file [path] - Path to an env file (.env) to be loaded into the environment. (default: [])'
'--help:Output usage information.'
)
_describe 'start options' options
}
_nest