create-zuplo-api 2.3.0 → 6.2.20
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/LICENSE.md +20 -0
- package/README.md +120 -9
- package/dist/index.js +67 -26
- package/dist/templates/default/README-template.md +29 -0
- package/dist/templates/default/eslintrc.json +7 -0
- package/dist/templates/default/prettierrc.json +1 -0
- package/dist/templates/default/vscode/launch.json +7 -7
- package/dist/templates/default/zuplo.jsonc +1 -1
- package/dist/templates/default-empty/config/policies.json +3 -0
- package/dist/templates/default-empty/config/routes.oas.json +5 -0
- package/dist/templates/default-empty/env.example +2 -0
- package/dist/templates/default-empty/eslintrc.json +7 -0
- package/dist/templates/default-empty/gitignore +10 -0
- package/dist/templates/default-empty/prettierrc.json +1 -0
- package/dist/templates/default-empty/tsconfig.json +19 -0
- package/dist/templates/default-empty/zuplo.jsonc +4 -0
- package/package.json +43 -53
- package/LICENSE.txt +0 -20
- package/create-zuplo-api.js +0 -6
- package/dist/fe522462c16fc21893a4.js +0 -1
- package/dist/package.json +0 -3
- package/dist/src/cli.d.ts +0 -2
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/common/analytics/lib.d.ts +0 -18
- package/dist/src/common/analytics/lib.d.ts.map +0 -1
- package/dist/src/common/constants.d.ts +0 -5
- package/dist/src/common/constants.d.ts.map +0 -1
- package/dist/src/common/machine-id/lib.d.ts +0 -2
- package/dist/src/common/machine-id/lib.d.ts.map +0 -1
- package/dist/src/common/output.d.ts +0 -9
- package/dist/src/common/output.d.ts.map +0 -1
- package/dist/src/create/create.d.ts +0 -6
- package/dist/src/create/create.d.ts.map +0 -1
- package/dist/src/create/handler.d.ts +0 -2
- package/dist/src/create/handler.d.ts.map +0 -1
- package/dist/src/create/package-json.d.ts +0 -16
- package/dist/src/create/package-json.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/utils.d.ts +0 -2
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/templates/default/_README.md +0 -1
- package/dist/templates/default/eslintrc.js +0 -11
package/LICENSE.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Vercel, Inc. Copyright (c) 2024 Zuplo, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,16 +1,127 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Create Zuplo API
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Create a new Zuplo API in seconds with `create-zuplo-api`.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
<img src="https://github.com/zuplo/zuplo/blob/main/media/screenshot-cli.png?raw=true" width="800">
|
|
7
|
-
</p>
|
|
5
|
+
### Interactive
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
You can create a new project interactively by running:
|
|
10
8
|
|
|
11
|
-
```
|
|
9
|
+
```bash
|
|
12
10
|
npm create zuplo-api@latest
|
|
11
|
+
# or
|
|
12
|
+
yarn create zuplo-api
|
|
13
|
+
# or
|
|
14
|
+
pnpm create zuplo-api
|
|
15
|
+
# or
|
|
16
|
+
bunx create-zuplo-api
|
|
13
17
|
```
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
You will be asked for the name of your project, and then whether you want to
|
|
20
|
+
create a TypeScript project:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
✔ Would you like to use TypeScript? … No / Yes
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Select **Yes** to install the necessary types/dependencies and create a new TS
|
|
27
|
+
project.
|
|
28
|
+
|
|
29
|
+
### Non-interactive
|
|
30
|
+
|
|
31
|
+
You can also pass command line arguments to set up a new project
|
|
32
|
+
non-interactively. See `create-zuplo-api --help`:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
Usage: create-zuplo-api [project-directory] [options]
|
|
36
|
+
|
|
37
|
+
Options:
|
|
38
|
+
-V, --version output the version number
|
|
39
|
+
--ts, --typescript
|
|
40
|
+
|
|
41
|
+
Initialize as a TypeScript project. (default)
|
|
42
|
+
|
|
43
|
+
--js, --javascript
|
|
44
|
+
|
|
45
|
+
Initialize as a JavaScript project.
|
|
46
|
+
|
|
47
|
+
--eslint
|
|
48
|
+
|
|
49
|
+
Initialize with ESLint config.
|
|
50
|
+
|
|
51
|
+
--prettier
|
|
52
|
+
|
|
53
|
+
Initialize with Prettier config.
|
|
54
|
+
|
|
55
|
+
--empty
|
|
56
|
+
|
|
57
|
+
Initialize an empty project.
|
|
58
|
+
|
|
59
|
+
--use-npm
|
|
60
|
+
|
|
61
|
+
Explicitly tell the CLI to bootstrap the application using npm
|
|
62
|
+
|
|
63
|
+
--use-pnpm
|
|
64
|
+
|
|
65
|
+
Explicitly tell the CLI to bootstrap the application using pnpm
|
|
66
|
+
|
|
67
|
+
--use-yarn
|
|
68
|
+
|
|
69
|
+
Explicitly tell the CLI to bootstrap the application using Yarn
|
|
70
|
+
|
|
71
|
+
--use-bun
|
|
72
|
+
|
|
73
|
+
Explicitly tell the CLI to bootstrap the application using Bun
|
|
74
|
+
|
|
75
|
+
--no-install
|
|
76
|
+
|
|
77
|
+
Explicitly tell the CLI to skip installing packages
|
|
78
|
+
|
|
79
|
+
--no-git
|
|
80
|
+
|
|
81
|
+
Explicitly tell the CLI to skip initialing the project as a git repository
|
|
82
|
+
|
|
83
|
+
--no-version-check
|
|
84
|
+
|
|
85
|
+
Explicitly tell the CLI to skip checking for the latest version of the CLI
|
|
86
|
+
|
|
87
|
+
-e, --example [name]|[github-url]
|
|
88
|
+
|
|
89
|
+
An example to bootstrap the app with. You can use an example name
|
|
90
|
+
from the official Zuplo repo or a GitHub URL. The URL can use
|
|
91
|
+
any branch and/or subdirectory
|
|
92
|
+
|
|
93
|
+
--example-path <path-to-example>
|
|
94
|
+
|
|
95
|
+
In a rare case, your GitHub URL might contain a branch name with
|
|
96
|
+
a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).
|
|
97
|
+
In this case, you must specify the path to the example separately:
|
|
98
|
+
--example-path foo/bar
|
|
99
|
+
|
|
100
|
+
--reset-preferences
|
|
101
|
+
|
|
102
|
+
Explicitly tell the CLI to reset any stored preferences
|
|
103
|
+
|
|
104
|
+
--yes
|
|
105
|
+
|
|
106
|
+
Use previous preferences or defaults for all options that were not
|
|
107
|
+
explicitly specified, without prompting.
|
|
108
|
+
|
|
109
|
+
-h, --help display help for command
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Why use Create Zuplo API?
|
|
113
|
+
|
|
114
|
+
`create-zuplo-api` allows you to create a new Zuplo API within seconds. It is
|
|
115
|
+
officially maintained by the creators of Zuplo, and includes a number of
|
|
116
|
+
benefits:
|
|
117
|
+
|
|
118
|
+
- **Interactive Experience**: Running `npm create zuplo-api@latest` (with no
|
|
119
|
+
arguments) launches an interactive experience that guides you through setting
|
|
120
|
+
up a project.
|
|
121
|
+
- **Zero Dependencies**: Initializing a project is as quick as one second.
|
|
122
|
+
Create Zuplo API has zero dependencies.
|
|
123
|
+
- **Offline Support**: Create Zuplo API will automatically detect if you're
|
|
124
|
+
offline and bootstrap your project using your local package cache.
|
|
125
|
+
- **Support for Examples**: Create Zuplo API can bootstrap your API using an
|
|
126
|
+
example from the Zuplo examples collection (e.g.
|
|
127
|
+
`npx create-zuplo-api --example my-api`).
|