@platformatic/vite 2.6.1 → 2.8.0-alpha.1

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.
Files changed (3) hide show
  1. package/index.js +4 -22
  2. package/package.json +7 -7
  3. package/schema.json +1 -1
package/index.js CHANGED
@@ -17,7 +17,6 @@ import fastify from 'fastify'
17
17
  import { existsSync } from 'node:fs'
18
18
  import { readFile, writeFile } from 'node:fs/promises'
19
19
  import { dirname, resolve } from 'node:path'
20
- import { pathToFileURL } from 'node:url'
21
20
  import { satisfies } from 'semver'
22
21
  import { packageJson, schema } from './lib/schema.js'
23
22
 
@@ -150,13 +149,7 @@ export class ViteStackable extends BaseStackable {
150
149
  ? ensureTrailingSlash(cleanBasePath(config.application?.basePath))
151
150
  : undefined
152
151
 
153
- this.registerGlobals({
154
- id: this.id,
155
- // Always use URL to avoid serialization problem in Windows
156
- root: pathToFileURL(this.root).toString(),
157
- basePath: this.#basePath,
158
- logLevel: this.logger.level
159
- })
152
+ this.registerGlobals({ basePath: this.#basePath })
160
153
 
161
154
  if (command) {
162
155
  return this.startWithCommand(command)
@@ -211,13 +204,8 @@ export class ViteStackable extends BaseStackable {
211
204
  ? ensureTrailingSlash(cleanBasePath(config.application?.basePath))
212
205
  : undefined
213
206
 
214
- this.registerGlobals({
215
- id: this.id,
216
- // Always use URL to avoid serialization problem in Windows
217
- root: pathToFileURL(this.root).toString(),
218
- basePath: this.#basePath,
219
- logLevel: this.logger.level
220
- })
207
+ this.registerGlobals({ basePath: this.#basePath })
208
+
221
209
  if (command) {
222
210
  return this.startWithCommand(command)
223
211
  }
@@ -275,13 +263,7 @@ export class ViteSSRStackable extends NodeStackable {
275
263
  ? ensureTrailingSlash(cleanBasePath(config.application?.basePath))
276
264
  : undefined
277
265
 
278
- this.registerGlobals({
279
- id: this.id,
280
- // Always use URL to avoid serialization problem in Windows
281
- root: pathToFileURL(this.root).toString(),
282
- basePath: this.#basePath,
283
- logLevel: this.logger.level
284
- })
266
+ this.registerGlobals({ basePath: this.#basePath })
285
267
  }
286
268
 
287
269
  async start ({ listen }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/vite",
3
- "version": "2.6.1",
3
+ "version": "2.8.0-alpha.1",
4
4
  "description": "Platformatic Vite Stackable",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,10 +18,10 @@
18
18
  "@fastify/static": "^8.0.0",
19
19
  "fastify": "^5.0.0",
20
20
  "semver": "^7.6.3",
21
- "@platformatic/basic": "2.6.1",
22
- "@platformatic/utils": "2.6.1",
23
- "@platformatic/node": "2.6.1",
24
- "@platformatic/config": "2.6.1"
21
+ "@platformatic/basic": "2.8.0-alpha.1",
22
+ "@platformatic/config": "2.8.0-alpha.1",
23
+ "@platformatic/utils": "2.8.0-alpha.1",
24
+ "@platformatic/node": "2.8.0-alpha.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@fastify/vite": "^7.0.1",
@@ -34,8 +34,8 @@
34
34
  "typescript": "^5.5.4",
35
35
  "vite": "^5.4.0",
36
36
  "ws": "^8.18.0",
37
- "@platformatic/composer": "2.6.1",
38
- "@platformatic/service": "2.6.1"
37
+ "@platformatic/composer": "2.8.0-alpha.1",
38
+ "@platformatic/service": "2.8.0-alpha.1"
39
39
  },
40
40
  "scripts": {
41
41
  "test": "npm run lint && borp --concurrency=1 --no-timeout",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/vite/2.6.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/vite/2.8.0-alpha.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Vite Stackable",
5
5
  "type": "object",