@gasket/preset-api 7.0.0-next.1 → 7.0.0-next.3
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/lib/index.js +38 -4
- package/package.json +12 -11
package/lib/index.js
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import pluginExpress from '@gasket/plugin-express';
|
|
2
|
+
import pluginTypescript from '@gasket/plugin-typescript';
|
|
3
|
+
import pluginHttps from '@gasket/plugin-https';
|
|
4
|
+
import pluginWinston from '@gasket/plugin-winston';
|
|
5
|
+
import pluginDocs from '@gasket/plugin-docs';
|
|
6
|
+
import pluginDocusaurus from '@gasket/plugin-docusaurus';
|
|
7
|
+
import pluginResponeData from '@gasket/plugin-response-data';
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name: '@gasket/preset-api',
|
|
11
|
+
hooks: {
|
|
12
|
+
async presetPrompt(gasket, context, { prompt }) {
|
|
13
|
+
if (!('apiAppTest' in context)) {
|
|
14
|
+
const { apiAppTest } = await prompt([
|
|
15
|
+
{
|
|
16
|
+
name: 'apiAppTest',
|
|
17
|
+
message: 'What is your API app test?',
|
|
18
|
+
type: 'input',
|
|
19
|
+
default: 'A basic API'
|
|
20
|
+
}
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
Object.assign(context, { apiAppTest, apiApp: true, typescript: true });
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
async presetConfig(gasket, context) {
|
|
27
|
+
return {
|
|
28
|
+
plugins: [
|
|
29
|
+
pluginExpress,
|
|
30
|
+
pluginHttps,
|
|
31
|
+
pluginWinston,
|
|
32
|
+
pluginDocs,
|
|
33
|
+
pluginDocusaurus,
|
|
34
|
+
pluginResponeData,
|
|
35
|
+
context.typescript ? pluginTypescript : null
|
|
36
|
+
].filter(Boolean)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
5
39
|
}
|
|
6
40
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gasket/preset-api",
|
|
3
|
-
"version": "7.0.0-next.
|
|
3
|
+
"version": "7.0.0-next.3",
|
|
4
4
|
"description": "Create Express-based API with Gasket",
|
|
5
5
|
"main": "lib",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"lib"
|
|
9
9
|
],
|
|
10
|
+
"type": "module",
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|
|
12
13
|
"url": "git+ssh://git@github.com/godaddy/gasket.git"
|
|
@@ -20,17 +21,17 @@
|
|
|
20
21
|
"url": "https://github.com/godaddy/gasket/issues"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@gasket/plugin-docs": "^7.0.0-next.
|
|
24
|
-
"@gasket/plugin-docusaurus": "^7.0.0-next.
|
|
25
|
-
"@gasket/plugin-express": "^7.0.0-next.
|
|
26
|
-
"@gasket/plugin-https": "^7.0.0-next.
|
|
27
|
-
"@gasket/plugin-lint": "^7.0.0-next.
|
|
28
|
-
"@gasket/plugin-response-data": "^7.0.0-next.
|
|
29
|
-
"@gasket/plugin-swagger": "^7.0.0-next.
|
|
30
|
-
"@gasket/plugin-winston": "^7.0.0-next.
|
|
24
|
+
"@gasket/plugin-docs": "^7.0.0-next.3",
|
|
25
|
+
"@gasket/plugin-docusaurus": "^7.0.0-next.3",
|
|
26
|
+
"@gasket/plugin-express": "^7.0.0-next.3",
|
|
27
|
+
"@gasket/plugin-https": "^7.0.0-next.3",
|
|
28
|
+
"@gasket/plugin-lint": "^7.0.0-next.3",
|
|
29
|
+
"@gasket/plugin-response-data": "^7.0.0-next.3",
|
|
30
|
+
"@gasket/plugin-swagger": "^7.0.0-next.3",
|
|
31
|
+
"@gasket/plugin-winston": "^7.0.0-next.3"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"@gasket/plugin-start": "^7.0.0-next.
|
|
34
|
+
"@gasket/plugin-start": "^7.0.0-next.3"
|
|
34
35
|
},
|
|
35
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "f4849afd9241977ad5b485cdb6a8fec9c44fc402"
|
|
36
37
|
}
|