@platformatic/tanstack 3.28.0-alpha.1 → 3.29.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/config.d.ts CHANGED
@@ -499,6 +499,7 @@ export interface PlatformaticTanStackConfig {
499
499
  [k: string]: string;
500
500
  };
501
501
  sourceMaps?: boolean;
502
+ nodeModulesSourceMaps?: string[];
502
503
  scheduler?: {
503
504
  enabled?: boolean | string;
504
505
  name: string;
@@ -553,6 +554,7 @@ export interface PlatformaticTanStackConfig {
553
554
  };
554
555
  envfile?: string;
555
556
  sourceMaps?: boolean;
557
+ nodeModulesSourceMaps?: string[];
556
558
  packageManager?: "npm" | "pnpm" | "yarn";
557
559
  preload?: string | string[];
558
560
  nodeOptions?: string;
package/lib/capability.js CHANGED
@@ -1,9 +1,14 @@
1
- import { cleanBasePath, createServerListener, ensureTrailingSlash, errors, getServerUrl } from '@platformatic/basic'
2
- import { importFile, resolvePackageViaESM } from '@platformatic/basic/lib/utils.js'
3
- import { ensureLoggableError } from '@platformatic/foundation'
1
+ import {
2
+ cleanBasePath,
3
+ createServerListener,
4
+ ensureTrailingSlash,
5
+ errors,
6
+ getServerUrl,
7
+ importFile,
8
+ resolvePackageViaESM
9
+ } from '@platformatic/basic'
4
10
  import { ViteCapability } from '@platformatic/vite'
5
11
  import inject from 'light-my-request'
6
- import { existsSync } from 'node:fs'
7
12
  import { readFile } from 'node:fs/promises'
8
13
  import { dirname, resolve } from 'node:path'
9
14
  import { satisfies } from 'semver'
@@ -70,17 +75,7 @@ export class TanstackCapability extends ViteCapability {
70
75
  const config = this.config
71
76
  const outputDirectory = resolve(this.root, config.application.outputDirectory)
72
77
  this.verifyOutputDirectory(outputDirectory)
73
-
74
- const buildInfoPath = resolve(outputDirectory, '.platformatic-build.json')
75
-
76
- if (!this.#basePath && existsSync(buildInfoPath)) {
77
- try {
78
- const buildInfo = JSON.parse(await readFile(buildInfoPath, 'utf-8'))
79
- this.#basePath = buildInfo.basePath
80
- } catch (e) {
81
- globalThis.platformatic.logger.error({ err: ensureLoggableError(e) }, 'Reading build info failed.')
82
- }
83
- }
78
+ this.#basePath = await this._getBasePathFromBuildInfo()
84
79
 
85
80
  const serverOptions = this.serverConfig
86
81
  const serverPromise = createServerListener(
@@ -113,32 +108,7 @@ export class TanstackCapability extends ViteCapability {
113
108
  return
114
109
  }
115
110
 
116
- return new Promise((resolve, reject) => {
117
- this.#server.close(error => {
118
- /* c8 ignore next 3 */
119
- if (error) {
120
- return reject(error)
121
- }
122
-
123
- resolve()
124
- })
125
- })
126
- }
127
-
128
- getMeta () {
129
- if (!this.isProduction) {
130
- return super.getMeta()
131
- }
132
-
133
- return {
134
- gateway: {
135
- tcp: typeof this.url !== 'undefined',
136
- url: this.url,
137
- prefix: this.basePath ?? this.#basePath,
138
- wantsAbsoluteUrls: true,
139
- needsRootTrailingSlash: true
140
- }
141
- }
111
+ return this._closeServer(this.#server)
142
112
  }
143
113
 
144
114
  async inject (injectParams, onInject) {
@@ -151,8 +121,9 @@ export class TanstackCapability extends ViteCapability {
151
121
  /* c8 ignore next 3 */
152
122
  if (onInject) {
153
123
  return
154
- } // Since inject might be called from the main thread directly via ITC, let's clean it up
124
+ }
155
125
 
126
+ // Since inject might be called from the main thread directly via ITC, let's clean it up
156
127
  const { statusCode, headers, body, payload, rawPayload } = res
157
128
  return { statusCode, headers, body, payload, rawPayload }
158
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/tanstack",
3
- "version": "3.28.0-alpha.1",
3
+ "version": "3.29.0",
4
4
  "description": "Platformatic TanStack Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -16,15 +16,13 @@
16
16
  "homepage": "https://github.com/platformatic/platformatic#readme",
17
17
  "dependencies": {
18
18
  "semver": "^7.6.3",
19
- "@platformatic/foundation": "3.28.0-alpha.1",
20
- "@platformatic/vite": "3.28.0-alpha.1",
21
- "@platformatic/basic": "3.28.0-alpha.1"
19
+ "@platformatic/basic": "3.29.0",
20
+ "@platformatic/foundation": "3.29.0",
21
+ "@platformatic/vite": "3.29.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@tanstack/react-router": "^1.139.7",
25
25
  "@tanstack/react-start": "^1.139.8",
26
- "@tanstack/solid-router": "^1.139.12",
27
- "@tanstack/solid-start": "^1.139.12",
28
26
  "@vitejs/plugin-react": "^5.1.1",
29
27
  "cleaner-spec-reporter": "^0.5.0",
30
28
  "eslint": "9",
@@ -34,14 +32,13 @@
34
32
  "nitro": "3.0.1-alpha.1",
35
33
  "react": "^19.1.0",
36
34
  "react-dom": "^19.1.0",
37
- "solid-js": "^1.9.10",
38
35
  "typescript": "^5.5.4",
39
36
  "vite": "^7.2.4",
40
37
  "vite-plugin-solid": "^2.11.10",
41
38
  "vite-tsconfig-paths": "^5.1.4",
42
39
  "ws": "^8.18.0",
43
- "@platformatic/gateway": "3.28.0-alpha.1",
44
- "@platformatic/service": "3.28.0-alpha.1"
40
+ "@platformatic/gateway": "3.29.0",
41
+ "@platformatic/service": "3.29.0"
45
42
  },
46
43
  "engines": {
47
44
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/tanstack/3.28.0-alpha.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/tanstack/3.29.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic TanStack Config",
5
5
  "type": "object",
@@ -593,6 +593,12 @@
593
593
  "sourceMaps": {
594
594
  "type": "boolean"
595
595
  },
596
+ "nodeModulesSourceMaps": {
597
+ "type": "array",
598
+ "items": {
599
+ "type": "string"
600
+ }
601
+ },
596
602
  "packageManager": {
597
603
  "type": "string",
598
604
  "enum": [
@@ -1839,6 +1845,13 @@
1839
1845
  "type": "boolean",
1840
1846
  "default": false
1841
1847
  },
1848
+ "nodeModulesSourceMaps": {
1849
+ "type": "array",
1850
+ "items": {
1851
+ "type": "string"
1852
+ },
1853
+ "default": []
1854
+ },
1842
1855
  "scheduler": {
1843
1856
  "type": "array",
1844
1857
  "items": {
@@ -2092,6 +2105,12 @@
2092
2105
  "sourceMaps": {
2093
2106
  "type": "boolean"
2094
2107
  },
2108
+ "nodeModulesSourceMaps": {
2109
+ "type": "array",
2110
+ "items": {
2111
+ "type": "string"
2112
+ }
2113
+ },
2095
2114
  "packageManager": {
2096
2115
  "type": "string",
2097
2116
  "enum": [