@platformatic/service 0.9.1 → 0.10.0

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/index.js CHANGED
@@ -121,6 +121,7 @@ async function loadPlugin (app, config, pluginOptions) {
121
121
  if (plugin.__esModule === true) {
122
122
  plugin = plugin.default
123
123
  }
124
+ /* c8 ignore next 4 */
124
125
  await app.register(plugin, pluginOptions.options)
125
126
  }
126
127
  }
package/lib/compile.js CHANGED
@@ -7,14 +7,11 @@ const loadConfig = require('./load-config.js')
7
7
  const { isFileAccessible } = require('./utils.js')
8
8
 
9
9
  async function getTSCExecutablePath (cwd) {
10
- const { execa } = await import('execa')
11
- const [npmBinLocalFolder, npmBinGlobalFolder] = await Promise.all([
12
- execa('npm', ['bin'], { cwd }).then((result) => result.stdout),
13
- execa('npm', ['bin', '-g'], { cwd }).then((result) => result.stdout)
14
- ])
10
+ const typescriptPath = require.resolve('typescript')
11
+ const typescriptPathCWD = require.resolve('typescript', { paths: [process.cwd()] })
15
12
 
16
- const tscLocalPath = join(npmBinLocalFolder, 'tsc')
17
- const tscGlobalPath = join(npmBinGlobalFolder, 'tsc')
13
+ const tscLocalPath = join(typescriptPath, '..', '..', 'bin', 'tsc')
14
+ const tscGlobalPath = join(typescriptPathCWD, '..', '..', 'bin', 'tsc')
18
15
 
19
16
  const [tscLocalExists, tscGlobalExists] = await Promise.all([
20
17
  isFileAccessible(tscLocalPath),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/service",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "Matteo Collina <hello@matteocollina.com>",
@@ -35,8 +35,8 @@
35
35
  "@fastify/static": "^6.5.0",
36
36
  "@fastify/swagger": "^8.0.0",
37
37
  "@fastify/under-pressure": "^8.0.0",
38
- "@platformatic/config": "0.9.1",
39
- "@platformatic/utils": "0.9.1",
38
+ "@platformatic/config": "0.10.0",
39
+ "@platformatic/utils": "0.10.0",
40
40
  "close-with-grace": "^1.1.0",
41
41
  "commist": "^3.1.2",
42
42
  "desm": "^1.2.0",