@gasket/preset-api 7.4.2 → 7.4.4

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/README.md CHANGED
@@ -5,7 +5,7 @@ Framework for building API's using Gasket.
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npx create-gasket-app <app-name> --presets @gasket/preset-api
8
+ npx create-gasket-app@latest <app-name> --presets @gasket/preset-api
9
9
  ```
10
10
 
11
11
  ## Docs
package/cjs/create.js CHANGED
@@ -19,7 +19,15 @@ function _interop_require_default(obj) {
19
19
  const require1 = (0, _module.createRequire)(require("url").pathToFileURL(__filename).toString());
20
20
  const { devDependencies } = require1('../package.json');
21
21
  function create(gasket, context) {
22
- const { pkg, files } = context;
22
+ const { pkg, files, packageManager } = context;
23
+ let runCmd;
24
+ if (packageManager === 'yarn') {
25
+ runCmd = 'yarn';
26
+ } else if (packageManager === 'pnpm') {
27
+ runCmd = 'pnpm';
28
+ } else {
29
+ runCmd = 'npm run';
30
+ }
23
31
  const __dirname = (0, _url.fileURLToPath)(require("url").pathToFileURL(__filename).toString());
24
32
  const generatorDir = _path.default.join(__dirname, '..', '..', 'generator');
25
33
  files.add(`${generatorDir}/*.md`);
@@ -31,7 +39,7 @@ function create(gasket, context) {
31
39
  pkg.add('scripts', {
32
40
  start: 'node server.js',
33
41
  local: 'nodemon server.js',
34
- preview: 'npm run start'
42
+ preview: `${runCmd} start`
35
43
  });
36
44
  }
37
45
  }
package/lib/create.js CHANGED
@@ -6,7 +6,17 @@ const { devDependencies } = require('../package.json');
6
6
 
7
7
  /** @type {import('@gasket/core').HookHandler<'create'>} */
8
8
  export default function create(gasket, context) {
9
- const { pkg, files } = context;
9
+ const { pkg, files, packageManager } = context;
10
+
11
+ let runCmd;
12
+ if (packageManager === 'yarn') {
13
+ runCmd = 'yarn';
14
+ } else if (packageManager === 'pnpm') {
15
+ runCmd = 'pnpm';
16
+ } else {
17
+ runCmd = 'npm run';
18
+ }
19
+
10
20
  const __dirname = fileURLToPath(import.meta.url);
11
21
  const generatorDir = path.join(__dirname, '..', '..', 'generator');
12
22
  files.add(`${generatorDir}/*.md`);
@@ -21,7 +31,7 @@ export default function create(gasket, context) {
21
31
  pkg.add('scripts', {
22
32
  start: 'node server.js',
23
33
  local: 'nodemon server.js',
24
- preview: 'npm run start'
34
+ preview: `${runCmd} start`
25
35
  });
26
36
  }
27
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gasket/preset-api",
3
- "version": "7.4.2",
3
+ "version": "7.4.4",
4
4
  "description": "Create Express-based API with Gasket",
5
5
  "type": "module",
6
6
  "types": "lib/index.d.ts",
@@ -27,23 +27,23 @@
27
27
  "bugs": "https://github.com/godaddy/gasket/issues",
28
28
  "homepage": "https://github.com/godaddy/gasket/tree/main/packages/gasket-preset-api",
29
29
  "dependencies": {
30
- "@gasket/plugin-command": "7.4.0",
30
+ "@gasket/plugin-command": "7.4.1",
31
+ "@gasket/plugin-docs": "7.4.2",
31
32
  "@gasket/plugin-cypress": "7.5.0",
32
- "@gasket/plugin-docs": "7.4.1",
33
33
  "@gasket/plugin-docusaurus": "7.4.2",
34
34
  "@gasket/plugin-dynamic-plugins": "7.3.7",
35
35
  "@gasket/plugin-express": "7.4.0",
36
36
  "@gasket/plugin-fastify": "7.4.2",
37
- "@gasket/plugin-git": "7.4.0",
38
- "@gasket/plugin-https": "7.3.5",
39
- "@gasket/plugin-jest": "7.5.0",
37
+ "@gasket/plugin-git": "7.4.1",
38
+ "@gasket/plugin-https": "7.3.7",
39
+ "@gasket/plugin-jest": "7.5.2",
40
40
  "@gasket/plugin-lint": "7.4.0",
41
41
  "@gasket/plugin-logger": "7.3.4",
42
- "@gasket/plugin-mocha": "7.5.0",
42
+ "@gasket/plugin-mocha": "7.5.2",
43
43
  "@gasket/plugin-swagger": "7.3.7",
44
- "@gasket/plugin-typescript": "7.4.1",
45
- "@gasket/plugin-vitest": "7.0.2",
46
- "@gasket/plugin-winston": "7.3.4"
44
+ "@gasket/plugin-typescript": "7.4.3",
45
+ "@gasket/plugin-winston": "7.3.4",
46
+ "@gasket/plugin-vitest": "7.0.2"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@swc/cli": "^0.6.0",
@@ -59,8 +59,8 @@
59
59
  "jest": "^29.7.0",
60
60
  "nodemon": "^3.1.9",
61
61
  "typescript": "^5.8.2",
62
- "@gasket/plugin-metadata": "7.4.2",
63
- "create-gasket-app": "7.4.2"
62
+ "@gasket/plugin-metadata": "7.4.3",
63
+ "create-gasket-app": "7.4.5"
64
64
  },
65
65
  "eslintConfig": {
66
66
  "extends": [