@gasket/preset-api 7.0.0-next.60 → 7.0.0-next.62
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/generator/README.md +43 -0
- package/lib/create.js +3 -6
- package/lib/index.js +1 -1
- package/package.json +12 -12
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# {{{appName}}}
|
|
2
|
+
|
|
3
|
+
{{{appDescription}}}
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This API is built with {{{server}}}.js framework and [Gasket](https://gasket.dev/). This application utilizes [EcmaScript Modules] and requires Node.js v20 or higher.
|
|
8
|
+
|
|
9
|
+
## Getting Started
|
|
10
|
+
|
|
11
|
+
### Development
|
|
12
|
+
|
|
13
|
+
To start the API locally, run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cd {{{appName}}}
|
|
17
|
+
{{{installCmd}}}
|
|
18
|
+
{{{packageManager}}} run local
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Debugging
|
|
22
|
+
|
|
23
|
+
To start the API locally with debugging enabled, run:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
DEBUG=* {{{packageManager}}} run local
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Extended filtering of the debug output can be achieved by adding to the `DEBUG` environment variable:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
DEBUG=gasket:* {{{packageManager}}} run local // gasket operations only
|
|
33
|
+
DEBUG={{{server}}}:* {{{packageManager}}} run local // {{{server}}} operations only
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
{{#each readme.markdown}}
|
|
37
|
+
{{{markdownCompile this}}}
|
|
38
|
+
{{/each}}
|
|
39
|
+
<!-- LINKS -->
|
|
40
|
+
[EcmaScript Modules]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
41
|
+
{{#each readme.links}}
|
|
42
|
+
{{{this}}}
|
|
43
|
+
{{/each}}
|
package/lib/create.js
CHANGED
|
@@ -4,18 +4,15 @@ import { fileURLToPath } from 'url';
|
|
|
4
4
|
const require = createRequire(import.meta.url);
|
|
5
5
|
const { devDependencies } = require('../package.json');
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* createHook
|
|
9
|
-
* @param {Gasket} gasket - Gasket API
|
|
10
|
-
* @param {Create} context - Create context
|
|
11
|
-
*/
|
|
7
|
+
/** @type {import('@gasket/core').HookHandler<'create'>} */
|
|
12
8
|
export default function create(gasket, context) {
|
|
13
9
|
const { pkg, files } = context;
|
|
14
10
|
const __dirname = fileURLToPath(import.meta.url);
|
|
15
11
|
const generatorDir = path.join(__dirname, '..', '..', 'generator');
|
|
12
|
+
files.add(`${generatorDir}/*.md`);
|
|
16
13
|
|
|
17
14
|
if (!context.typescript) {
|
|
18
|
-
files.add(`${generatorDir}
|
|
15
|
+
files.add(`${generatorDir}/*.js`);
|
|
19
16
|
|
|
20
17
|
pkg.add('devDependencies', {
|
|
21
18
|
nodemon: devDependencies.nodemon
|
package/lib/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import create from './create.js';
|
|
|
5
5
|
const require = createRequire(import.meta.url);
|
|
6
6
|
const { name, version, description } = require('../package.json');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/** @type {import('@gasket/core').Preset} */
|
|
9
9
|
export default {
|
|
10
10
|
name,
|
|
11
11
|
version,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gasket/preset-api",
|
|
3
|
-
"version": "7.0.0-next.
|
|
3
|
+
"version": "7.0.0-next.62",
|
|
4
4
|
"description": "Create Express-based API with Gasket",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"url": "https://github.com/godaddy/gasket/issues"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@gasket/plugin-cypress": "7.0.0-next.
|
|
34
|
-
"@gasket/plugin-express": "7.0.0-next.
|
|
35
|
-
"@gasket/plugin-fastify": "7.0.0-next.
|
|
36
|
-
"@gasket/plugin-https": "7.0.0-next.
|
|
37
|
-
"@gasket/plugin-jest": "7.0.0-next.
|
|
38
|
-
"@gasket/plugin-lint": "7.0.0-next.
|
|
39
|
-
"@gasket/plugin-mocha": "7.0.0-next.
|
|
40
|
-
"@gasket/plugin-swagger": "7.0.0-next.
|
|
41
|
-
"@gasket/plugin-typescript": "7.0.0-next.
|
|
42
|
-
"@gasket/plugin-winston": "7.0.0-next.
|
|
33
|
+
"@gasket/plugin-cypress": "7.0.0-next.62",
|
|
34
|
+
"@gasket/plugin-express": "7.0.0-next.62",
|
|
35
|
+
"@gasket/plugin-fastify": "7.0.0-next.62",
|
|
36
|
+
"@gasket/plugin-https": "7.0.0-next.62",
|
|
37
|
+
"@gasket/plugin-jest": "7.0.0-next.62",
|
|
38
|
+
"@gasket/plugin-lint": "7.0.0-next.62",
|
|
39
|
+
"@gasket/plugin-mocha": "7.0.0-next.62",
|
|
40
|
+
"@gasket/plugin-swagger": "7.0.0-next.62",
|
|
41
|
+
"@gasket/plugin-typescript": "7.0.0-next.62",
|
|
42
|
+
"@gasket/plugin-winston": "7.0.0-next.62"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"cross-env": "^7.0.3",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"jest": {
|
|
70
70
|
"transform": {}
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "8d6cf8ef71a549955cbfe9610bb1ee07cc40d96d"
|
|
73
73
|
}
|