@gasket/preset-api 7.0.0-next.60 → 7.0.0-next.61

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.
@@ -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
- // TODO: need to create types for "preset" plugins
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.60",
3
+ "version": "7.0.0-next.61",
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.60",
34
- "@gasket/plugin-express": "7.0.0-next.60",
35
- "@gasket/plugin-fastify": "7.0.0-next.60",
36
- "@gasket/plugin-https": "7.0.0-next.60",
37
- "@gasket/plugin-jest": "7.0.0-next.60",
38
- "@gasket/plugin-lint": "7.0.0-next.60",
39
- "@gasket/plugin-mocha": "7.0.0-next.60",
40
- "@gasket/plugin-swagger": "7.0.0-next.60",
41
- "@gasket/plugin-typescript": "7.0.0-next.60",
42
- "@gasket/plugin-winston": "7.0.0-next.60"
33
+ "@gasket/plugin-cypress": "7.0.0-next.61",
34
+ "@gasket/plugin-express": "7.0.0-next.61",
35
+ "@gasket/plugin-fastify": "7.0.0-next.61",
36
+ "@gasket/plugin-https": "7.0.0-next.61",
37
+ "@gasket/plugin-jest": "7.0.0-next.61",
38
+ "@gasket/plugin-lint": "7.0.0-next.61",
39
+ "@gasket/plugin-mocha": "7.0.0-next.61",
40
+ "@gasket/plugin-swagger": "7.0.0-next.61",
41
+ "@gasket/plugin-typescript": "7.0.0-next.61",
42
+ "@gasket/plugin-winston": "7.0.0-next.61"
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": "ea9feae6cd291d4361c06e09659e50dbec19bcea"
72
+ "gitHead": "6bfc613e64088429e95e89211008b1c9ab530ca7"
73
73
  }