@platformatic/nuxt 0.0.1 → 3.58.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 (106) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +26 -0
  3. package/config.d.ts +749 -0
  4. package/eslint.config.js +3 -0
  5. package/index.d.ts +35 -0
  6. package/index.js +31 -0
  7. package/lib/capability.js +255 -0
  8. package/lib/schema.js +50 -0
  9. package/package.json +39 -18
  10. package/schema.json +2805 -0
  11. package/test/backlog.test.js +88 -0
  12. package/test/development.test.js +216 -0
  13. package/test/fetch.test.js +67 -0
  14. package/test/fixtures/composer-autodetect-prefix/package.json +10 -0
  15. package/test/fixtures/composer-autodetect-prefix/platformatic.runtime.json +24 -0
  16. package/test/fixtures/composer-autodetect-prefix/services/frontend/app.vue +8 -0
  17. package/test/fixtures/composer-autodetect-prefix/services/frontend/nuxt.config.js +16 -0
  18. package/test/fixtures/composer-autodetect-prefix/services/frontend/package.json +9 -0
  19. package/test/fixtures/composer-autodetect-prefix/services/frontend/platformatic.application.json +6 -0
  20. package/test/fixtures/composer-custom-commands/package.json +11 -0
  21. package/test/fixtures/composer-custom-commands/platformatic.runtime.json +24 -0
  22. package/test/fixtures/composer-custom-commands/services/frontend/app.vue +8 -0
  23. package/test/fixtures/composer-custom-commands/services/frontend/nuxt.config.js +16 -0
  24. package/test/fixtures/composer-custom-commands/services/frontend/package.json +16 -0
  25. package/test/fixtures/composer-custom-commands/services/frontend/platformatic.application.json +11 -0
  26. package/test/fixtures/composer-with-prefix/package.json +10 -0
  27. package/test/fixtures/composer-with-prefix/platformatic.runtime.json +24 -0
  28. package/test/fixtures/composer-with-prefix/services/frontend/app.vue +8 -0
  29. package/test/fixtures/composer-with-prefix/services/frontend/nuxt.config.js +16 -0
  30. package/test/fixtures/composer-with-prefix/services/frontend/package.json +9 -0
  31. package/test/fixtures/composer-with-prefix/services/frontend/platformatic.application.json +6 -0
  32. package/test/fixtures/composer-without-prefix/package.json +10 -0
  33. package/test/fixtures/composer-without-prefix/platformatic.runtime.json +24 -0
  34. package/test/fixtures/composer-without-prefix/services/frontend/app.vue +8 -0
  35. package/test/fixtures/composer-without-prefix/services/frontend/nuxt.config.js +13 -0
  36. package/test/fixtures/composer-without-prefix/services/frontend/package.json +9 -0
  37. package/test/fixtures/composer-without-prefix/services/frontend/platformatic.application.json +3 -0
  38. package/test/fixtures/fetch-test/package.json +10 -0
  39. package/test/fixtures/fetch-test/platformatic.runtime.json +24 -0
  40. package/test/fixtures/fetch-test/services/frontend/app.vue +29 -0
  41. package/test/fixtures/fetch-test/services/frontend/nuxt.config.js +15 -0
  42. package/test/fixtures/fetch-test/services/frontend/package.json +9 -0
  43. package/test/fixtures/fetch-test/services/frontend/platformatic.application.json +6 -0
  44. package/test/fixtures/logger/package.json +8 -0
  45. package/test/fixtures/logger/platformatic.runtime.json +15 -0
  46. package/test/fixtures/logger/services/frontend/app.vue +12 -0
  47. package/test/fixtures/logger/services/frontend/logger-formatters.js +7 -0
  48. package/test/fixtures/logger/services/frontend/nuxt.config.js +12 -0
  49. package/test/fixtures/logger/services/frontend/package.json +9 -0
  50. package/test/fixtures/logger/services/frontend/platformatic.application.json +14 -0
  51. package/test/fixtures/metrics/package.json +10 -0
  52. package/test/fixtures/metrics/platformatic.runtime.json +25 -0
  53. package/test/fixtures/metrics/services/backend/package.json +6 -0
  54. package/test/fixtures/metrics/services/backend/platformatic.json +16 -0
  55. package/test/fixtures/metrics/services/backend/plugins/example.js +3 -0
  56. package/test/fixtures/metrics/services/backend/routes/root.js +30 -0
  57. package/test/fixtures/metrics/services/composer/package.json +6 -0
  58. package/test/fixtures/metrics/services/composer/platformatic.json +14 -0
  59. package/test/fixtures/metrics/services/frontend/app.vue +8 -0
  60. package/test/fixtures/metrics/services/frontend/nuxt.config.js +15 -0
  61. package/test/fixtures/metrics/services/frontend/package.json +9 -0
  62. package/test/fixtures/metrics/services/frontend/platformatic.application.json +6 -0
  63. package/test/fixtures/ssr-autodetect-prefix/package.json +10 -0
  64. package/test/fixtures/ssr-autodetect-prefix/platformatic.runtime.json +24 -0
  65. package/test/fixtures/ssr-autodetect-prefix/services/frontend/app.vue +8 -0
  66. package/test/fixtures/ssr-autodetect-prefix/services/frontend/nuxt.config.js +15 -0
  67. package/test/fixtures/ssr-autodetect-prefix/services/frontend/package.json +9 -0
  68. package/test/fixtures/ssr-autodetect-prefix/services/frontend/platformatic.application.json +6 -0
  69. package/test/fixtures/ssr-custom-commands/package.json +11 -0
  70. package/test/fixtures/ssr-custom-commands/platformatic.runtime.json +24 -0
  71. package/test/fixtures/ssr-custom-commands/services/frontend/app.vue +8 -0
  72. package/test/fixtures/ssr-custom-commands/services/frontend/nuxt.config.js +15 -0
  73. package/test/fixtures/ssr-custom-commands/services/frontend/package.json +16 -0
  74. package/test/fixtures/ssr-custom-commands/services/frontend/platformatic.application.json +11 -0
  75. package/test/fixtures/ssr-standalone/package.json +8 -0
  76. package/test/fixtures/ssr-standalone/platformatic.runtime.json +15 -0
  77. package/test/fixtures/ssr-standalone/services/frontend/app.vue +8 -0
  78. package/test/fixtures/ssr-standalone/services/frontend/nuxt.config.js +12 -0
  79. package/test/fixtures/ssr-standalone/services/frontend/package.json +9 -0
  80. package/test/fixtures/ssr-standalone/services/frontend/platformatic.application.json +3 -0
  81. package/test/fixtures/ssr-with-prefix/package.json +10 -0
  82. package/test/fixtures/ssr-with-prefix/platformatic.runtime.json +24 -0
  83. package/test/fixtures/ssr-with-prefix/services/frontend/app.vue +8 -0
  84. package/test/fixtures/ssr-with-prefix/services/frontend/nuxt.config.js +15 -0
  85. package/test/fixtures/ssr-with-prefix/services/frontend/package.json +9 -0
  86. package/test/fixtures/ssr-with-prefix/services/frontend/platformatic.application.json +6 -0
  87. package/test/fixtures/ssr-without-prefix/package.json +10 -0
  88. package/test/fixtures/ssr-without-prefix/platformatic.runtime.json +24 -0
  89. package/test/fixtures/ssr-without-prefix/services/frontend/app.vue +8 -0
  90. package/test/fixtures/ssr-without-prefix/services/frontend/nuxt.config.js +12 -0
  91. package/test/fixtures/ssr-without-prefix/services/frontend/package.json +9 -0
  92. package/test/fixtures/ssr-without-prefix/services/frontend/platformatic.application.json +3 -0
  93. package/test/fixtures/standalone/package.json +8 -0
  94. package/test/fixtures/standalone/platformatic.runtime.json +15 -0
  95. package/test/fixtures/standalone/services/frontend/app.vue +8 -0
  96. package/test/fixtures/standalone/services/frontend/nuxt.config.js +13 -0
  97. package/test/fixtures/standalone/services/frontend/package.json +9 -0
  98. package/test/fixtures/standalone/services/frontend/platformatic.application.json +3 -0
  99. package/test/helper.js +1 -0
  100. package/test/https.test.js +43 -0
  101. package/test/logger.test.js +31 -0
  102. package/test/metrics.test.js +46 -0
  103. package/test/miscellaneous.test.js +33 -0
  104. package/test/production.test.js +153 -0
  105. package/test/types/index.tst.ts +34 -0
  106. package/test/version-check.test.js +29 -0
@@ -0,0 +1,88 @@
1
+ import { deepStrictEqual } from 'node:assert'
2
+ import { cp } from 'node:fs/promises'
3
+ import path, { resolve } from 'node:path'
4
+ import { test } from 'node:test'
5
+ import { commonFixturesRoot, prepareRuntime, updateFile } from '../../basic/test/helper.js'
6
+ import { updateConfigFile } from '../../runtime/test/helpers.js'
7
+
8
+ const envs = {
9
+ dev: {
10
+ build: false,
11
+ production: false
12
+ },
13
+ production: {
14
+ build: true,
15
+ production: true
16
+ }
17
+ }
18
+
19
+ function waitServerOptions (runtime) {
20
+ const { promise, resolve } = Promise.withResolvers()
21
+
22
+ function listener (payload, _, application) {
23
+ if (application === 'frontend') {
24
+ runtime.removeListener('application:worker:event:serverOptions', listener)
25
+ resolve(payload)
26
+ }
27
+ }
28
+
29
+ runtime.on('application:worker:event:serverOptions', listener)
30
+
31
+ return promise
32
+ }
33
+
34
+ for (const [env, options] of Object.entries(envs)) {
35
+ test(`Nuxt application should properly use backlog option in ${env}`, async t => {
36
+ const { runtime } = await prepareRuntime({
37
+ t,
38
+ root: path.resolve(import.meta.dirname, './fixtures/standalone'),
39
+ build: options.build,
40
+ production: options.production,
41
+ async additionalSetup (root) {
42
+ return updateConfigFile(resolve(root, 'services/frontend/platformatic.application.json'), config => {
43
+ config.server ??= {}
44
+ config.server.backlog = 100
45
+ })
46
+ }
47
+ })
48
+
49
+ const promise = waitServerOptions(runtime)
50
+
51
+ await runtime.start()
52
+ const serverOptions = await promise
53
+ deepStrictEqual(serverOptions.backlog, 100)
54
+ })
55
+
56
+ test(`Nuxt application should properly use backlog option in ${env} when using custom commands`, async t => {
57
+ const { runtime } = await prepareRuntime({
58
+ t,
59
+ root: path.resolve(import.meta.dirname, './fixtures/composer-custom-commands'),
60
+ build: options.build,
61
+ production: options.production,
62
+ async additionalSetup (root, config) {
63
+ for (const type of ['backend', 'composer']) {
64
+ await cp(resolve(commonFixturesRoot, `${type}-js`), resolve(root, `services/${type}`), {
65
+ recursive: true
66
+ })
67
+ }
68
+
69
+ await updateFile(resolve(root, 'services/composer/routes/root.js'), contents => {
70
+ return contents.replace('$PREFIX', '/frontend')
71
+ })
72
+
73
+ await updateConfigFile(resolve(root, 'services/frontend/platformatic.application.json'), config => {
74
+ config.server ??= {}
75
+ config.server.backlog = 100
76
+ })
77
+
78
+ config.applications[0].useHttp = true
79
+ }
80
+ })
81
+
82
+ const promise = waitServerOptions(runtime)
83
+
84
+ await runtime.start()
85
+ const serverOptions = await promise
86
+ deepStrictEqual(serverOptions.backlog, 100)
87
+ })
88
+ }
@@ -0,0 +1,216 @@
1
+ import { resolve } from 'node:path'
2
+ import {
3
+ createRuntime,
4
+ prepareRuntimeWithApplications,
5
+ setAdditionalDependencies,
6
+ setFixturesDir,
7
+ updateFile,
8
+ verifyDevelopmentMode,
9
+ verifyHTMLViaHTTP,
10
+ verifyHTMLViaInject,
11
+ verifyJSONViaHTTP,
12
+ verifyJSONViaInject
13
+ } from '../../basic/test/helper.js'
14
+ import { additionalDependencies } from './helper.js'
15
+
16
+ process.setMaxListeners(100)
17
+ setFixturesDir(resolve(import.meta.dirname, './fixtures'))
18
+ setAdditionalDependencies(additionalDependencies)
19
+
20
+ const htmlContents = ['<script>window.__NUXT__={}']
21
+ const htmlContentsSSR = [/Hello from v\d+ t\d+/]
22
+
23
+ async function verifyStandalone (
24
+ t,
25
+ configuration,
26
+ _language,
27
+ htmlContents,
28
+ _hmrUrl,
29
+ _hmrProtocol,
30
+ _websocketHMRHandler,
31
+ pauseTimeout,
32
+ additionalSetup
33
+ ) {
34
+ const { url } = await createRuntime(t, configuration, pauseTimeout, false, null, additionalSetup)
35
+ await verifyHTMLViaHTTP(url, '/', htmlContents)
36
+ }
37
+
38
+ async function verifyComposerWithPrefix (
39
+ t,
40
+ configuration,
41
+ language,
42
+ htmlContents,
43
+ _hmrUrl,
44
+ _hmrProtocol,
45
+ _websocketHMRHandler,
46
+ pauseTimeout,
47
+ additionalSetup
48
+ ) {
49
+ const { runtime, url } = await prepareRuntimeWithApplications(
50
+ t,
51
+ configuration,
52
+ false,
53
+ language,
54
+ '/frontend',
55
+ pauseTimeout,
56
+ additionalSetup
57
+ )
58
+
59
+ await verifyHTMLViaHTTP(url, '/frontend/', htmlContents)
60
+ await verifyHTMLViaInject(runtime, 'composer', '/frontend', htmlContents)
61
+
62
+ await verifyJSONViaHTTP(url, '/example', 200, { hello: 'foobar' })
63
+ await verifyJSONViaHTTP(url, '/frontend/on-composer', 200, { ok: true })
64
+ await verifyJSONViaHTTP(url, '/backend/example', 200, { hello: 'foobar' })
65
+
66
+ await verifyJSONViaInject(runtime, 'composer', 'GET', '/example', 200, { hello: 'foobar' })
67
+ await verifyJSONViaInject(runtime, 'composer', 'GET', '/frontend/on-composer', 200, { ok: true })
68
+ await verifyJSONViaInject(runtime, 'backend', 'GET', '/example', 200, { hello: 'foobar' })
69
+ }
70
+
71
+ async function verifyComposerWithoutPrefix (
72
+ t,
73
+ configuration,
74
+ language,
75
+ htmlContents,
76
+ _hmrUrl,
77
+ _hmrProtocol,
78
+ _websocketHMRHandler,
79
+ pauseTimeout,
80
+ additionalSetup
81
+ ) {
82
+ const { runtime, url } = await prepareRuntimeWithApplications(
83
+ t,
84
+ configuration,
85
+ false,
86
+ language,
87
+ '',
88
+ pauseTimeout,
89
+ async root => {
90
+ await updateFile(resolve(root, 'services/composer/platformatic.json'), contents => {
91
+ const json = JSON.parse(contents)
92
+ json.gateway.applications[1].proxy = { prefix: '' }
93
+ return JSON.stringify(json, null, 2)
94
+ })
95
+ }
96
+ )
97
+
98
+ await verifyHTMLViaHTTP(url, '/', htmlContents)
99
+ await verifyHTMLViaInject(runtime, 'composer', '/', htmlContents)
100
+
101
+ await verifyJSONViaHTTP(url, '/example', 200, { hello: 'foobar' })
102
+ await verifyJSONViaHTTP(url, '/on-composer', 200, { ok: true })
103
+ await verifyJSONViaHTTP(url, '/backend/example', 200, { hello: 'foobar' })
104
+
105
+ await verifyJSONViaInject(runtime, 'composer', 'GET', '/example', 200, { hello: 'foobar' })
106
+ await verifyJSONViaInject(runtime, 'composer', 'GET', '/on-composer', 200, { ok: true })
107
+ await verifyJSONViaInject(runtime, 'backend', 'GET', '/example', 200, { hello: 'foobar' })
108
+ }
109
+
110
+ async function verifyComposerWithAutodetectPrefix (
111
+ t,
112
+ configuration,
113
+ language,
114
+ htmlContents,
115
+ _hmrUrl,
116
+ _hmrProtocol,
117
+ _websocketHMRHandler,
118
+ pauseTimeout,
119
+ additionalSetup
120
+ ) {
121
+ const { runtime, url } = await prepareRuntimeWithApplications(
122
+ t,
123
+ configuration,
124
+ false,
125
+ language,
126
+ '/nested/base/dir',
127
+ pauseTimeout,
128
+ additionalSetup
129
+ )
130
+
131
+ await verifyHTMLViaHTTP(url, '/nested/base/dir/', htmlContents)
132
+ await verifyHTMLViaInject(runtime, 'composer', '/nested/base/dir', htmlContents)
133
+
134
+ await verifyJSONViaHTTP(url, '/example', 200, { hello: 'foobar' })
135
+ await verifyJSONViaHTTP(url, '/nested/base/dir/on-composer', 200, { ok: true })
136
+ await verifyJSONViaHTTP(url, '/backend/example', 200, { hello: 'foobar' })
137
+
138
+ await verifyJSONViaInject(runtime, 'composer', 'GET', '/example', 200, { hello: 'foobar' })
139
+ await verifyJSONViaInject(runtime, 'composer', 'GET', '/nested/base/dir/on-composer', 200, { ok: true })
140
+ await verifyJSONViaInject(runtime, 'backend', 'GET', '/example', 200, { hello: 'foobar' })
141
+ }
142
+
143
+ const configurations = [
144
+ {
145
+ id: 'standalone',
146
+ name: 'Nuxt (standalone)',
147
+ check: verifyStandalone,
148
+ htmlContents,
149
+ language: 'js'
150
+ },
151
+ {
152
+ id: 'composer-with-prefix',
153
+ name: 'Nuxt (in composer with prefix)',
154
+ check: verifyComposerWithPrefix,
155
+ htmlContents,
156
+ language: 'js'
157
+ },
158
+ {
159
+ id: 'composer-without-prefix',
160
+ name: 'Nuxt (in composer without prefix)',
161
+ check: verifyComposerWithoutPrefix,
162
+ htmlContents,
163
+ language: 'js'
164
+ },
165
+ {
166
+ id: 'composer-autodetect-prefix',
167
+ name: 'Nuxt (in composer with autodetected prefix)',
168
+ check: verifyComposerWithAutodetectPrefix,
169
+ htmlContents,
170
+ language: 'js'
171
+ },
172
+ {
173
+ id: 'composer-custom-commands',
174
+ name: 'Nuxt (in composer with prefix using custom commands)',
175
+ check: verifyComposerWithPrefix,
176
+ htmlContents,
177
+ language: 'js'
178
+ },
179
+ {
180
+ id: 'ssr-standalone',
181
+ name: 'Nuxt SSR (standalone)',
182
+ check: verifyStandalone,
183
+ htmlContents: htmlContentsSSR,
184
+ language: 'js'
185
+ },
186
+ {
187
+ id: 'ssr-with-prefix',
188
+ name: 'Nuxt SSR (in composer with prefix)',
189
+ check: verifyComposerWithPrefix,
190
+ htmlContents: htmlContentsSSR,
191
+ language: 'ts'
192
+ },
193
+ {
194
+ id: 'ssr-without-prefix',
195
+ name: 'Nuxt SSR (in composer without prefix)',
196
+ check: verifyComposerWithoutPrefix,
197
+ htmlContents: htmlContentsSSR,
198
+ language: 'js'
199
+ },
200
+ {
201
+ id: 'ssr-autodetect-prefix',
202
+ name: 'Nuxt SSR (in composer with autodetected prefix)',
203
+ check: verifyComposerWithAutodetectPrefix,
204
+ htmlContents: htmlContentsSSR,
205
+ language: 'js'
206
+ },
207
+ {
208
+ id: 'ssr-custom-commands',
209
+ name: 'Nuxt SSR (in composer with prefix using custom commands)',
210
+ check: verifyComposerWithPrefix,
211
+ htmlContents: htmlContentsSSR,
212
+ language: 'js'
213
+ }
214
+ ]
215
+
216
+ verifyDevelopmentMode(configurations)
@@ -0,0 +1,67 @@
1
+ import { ok, strictEqual } from 'node:assert'
2
+ import { cp } from 'node:fs/promises'
3
+ import { resolve } from 'node:path'
4
+ import { test } from 'node:test'
5
+ import { request } from 'undici'
6
+ import {
7
+ buildRuntime,
8
+ commonFixturesRoot,
9
+ prepareRuntime,
10
+ setAdditionalDependencies,
11
+ setFixturesDir,
12
+ startRuntime,
13
+ updateFile
14
+ } from '../../basic/test/helper.js'
15
+ import { additionalDependencies } from './helper.js'
16
+
17
+ process.setMaxListeners(100)
18
+ setFixturesDir(resolve(import.meta.dirname, './fixtures'))
19
+ setAdditionalDependencies(additionalDependencies)
20
+
21
+ function decodeHtmlEntities (str) {
22
+ return str
23
+ .replace(/&quot;/g, '"')
24
+ .replace(/&amp;/g, '&')
25
+ .replace(/&lt;/g, '<')
26
+ .replace(/&gt;/g, '>')
27
+ .replace(/&#39;/g, "'")
28
+ }
29
+
30
+ test('fetch() should work with string URL and Request object in Nuxt app', async t => {
31
+ const { runtime, root } = await prepareRuntime(t, 'fetch-test', true, null, async root => {
32
+ for (const type of ['backend', 'composer']) {
33
+ await cp(resolve(commonFixturesRoot, `${type}-js`), resolve(root, `services/${type}`), {
34
+ recursive: true
35
+ })
36
+ }
37
+
38
+ await updateFile(resolve(root, 'services/composer/routes/root.js'), contents => {
39
+ return contents.replace('$PREFIX', '/frontend')
40
+ })
41
+ })
42
+
43
+ await buildRuntime(root)
44
+
45
+ const url = await startRuntime(t, runtime)
46
+
47
+ const response = await request(`${url}/frontend/`)
48
+ strictEqual(response.statusCode, 200, `Expected 200 but got ${response.statusCode}`)
49
+
50
+ const html = await response.body.text()
51
+ ok(html.includes('Hello from v'), 'Page should render successfully')
52
+
53
+ const preMatch = html.match(/<pre[^>]*id="fetch-results"[^>]*>([\s\S]*?)<\/pre>/)
54
+ ok(preMatch, 'Should find fetch-results pre tag')
55
+
56
+ const decoded = decodeHtmlEntities(preMatch[1].trim())
57
+ const fetchResults = JSON.parse(decoded)
58
+
59
+ ok(
60
+ fetchResults.stringUrl?.ok === true,
61
+ `fetch with string URL should succeed: ${JSON.stringify(fetchResults.stringUrl)}`
62
+ )
63
+ ok(
64
+ fetchResults.requestObject?.ok === true,
65
+ `fetch with Request object should succeed: ${JSON.stringify(fetchResults.requestObject)}`
66
+ )
67
+ })
@@ -0,0 +1,10 @@
1
+ {
2
+ "private": true,
3
+ "dependencies": {
4
+ "@platformatic/gateway": "^3.52.4",
5
+ "@platformatic/nuxt": "^3.52.4",
6
+ "@platformatic/service": "^3.52.4",
7
+ "nuxt": "^4.4.8",
8
+ "vue": "^3.5.22"
9
+ }
10
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/2.0.0.json",
3
+ "entrypoint": "composer",
4
+ "services": [
5
+ {
6
+ "id": "frontend",
7
+ "config": "platformatic.application.json",
8
+ "path": "./services/frontend"
9
+ },
10
+ {
11
+ "id": "backend",
12
+ "config": "platformatic.json",
13
+ "path": "./services/backend"
14
+ },
15
+ {
16
+ "id": "composer",
17
+ "config": "platformatic.json",
18
+ "path": "./services/composer"
19
+ }
20
+ ],
21
+ "logger": {
22
+ "level": "error"
23
+ }
24
+ }
@@ -0,0 +1,8 @@
1
+ <template>
2
+ <div>Hello from v{{ version }} t{{ time }}</div>
3
+ </template>
4
+
5
+ <script setup>
6
+ const version = 123
7
+ const time = Date.now()
8
+ </script>
@@ -0,0 +1,16 @@
1
+ import { defineNuxtConfig } from 'nuxt/config'
2
+
3
+ export default defineNuxtConfig({
4
+ ssr: false,
5
+ app: {
6
+ baseURL: '/nested/base/dir/'
7
+ },
8
+ compatibilityDate: '2026-06-15',
9
+ telemetry: false,
10
+ devtools: { enabled: false },
11
+ vite: {
12
+ server: {
13
+ allowedHosts: ['.plt.local']
14
+ }
15
+ }
16
+ })
@@ -0,0 +1,9 @@
1
+ {
2
+ "private": true,
3
+ "type": "module",
4
+ "dependencies": {
5
+ "@platformatic/nuxt": "^3.52.4",
6
+ "nuxt": "^4.4.8",
7
+ "vue": "^3.5.22"
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/nuxt/3.52.4.json",
3
+ "application": {
4
+ "basePath": "/nested/base/dir"
5
+ }
6
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "test",
3
+ "private": true,
4
+ "workspaces": [
5
+ "services/*"
6
+ ],
7
+ "dependencies": {
8
+ "@platformatic/runtime": "^2.3.1",
9
+ "platformatic": "^2.3.1"
10
+ }
11
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/2.0.0.json",
3
+ "entrypoint": "composer",
4
+ "services": [
5
+ {
6
+ "id": "frontend",
7
+ "config": "platformatic.application.json",
8
+ "path": "./services/frontend"
9
+ },
10
+ {
11
+ "id": "backend",
12
+ "config": "platformatic.json",
13
+ "path": "./services/backend"
14
+ },
15
+ {
16
+ "id": "composer",
17
+ "config": "platformatic.json",
18
+ "path": "./services/composer"
19
+ }
20
+ ],
21
+ "logger": {
22
+ "level": "error"
23
+ }
24
+ }
@@ -0,0 +1,8 @@
1
+ <template>
2
+ <div>Hello from v{{ version }} t{{ time }}</div>
3
+ </template>
4
+
5
+ <script setup>
6
+ const version = 123
7
+ const time = Date.now()
8
+ </script>
@@ -0,0 +1,16 @@
1
+ import { defineNuxtConfig } from 'nuxt/config'
2
+
3
+ export default defineNuxtConfig({
4
+ ssr: false,
5
+ app: {
6
+ baseURL: '/frontend/'
7
+ },
8
+ compatibilityDate: '2026-06-15',
9
+ telemetry: false,
10
+ devtools: { enabled: false },
11
+ vite: {
12
+ server: {
13
+ allowedHosts: ['.plt.local']
14
+ }
15
+ }
16
+ })
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "nuxt",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "nuxt dev --host 127.0.0.1 --port 0",
8
+ "build": "nuxt build",
9
+ "start": "node .output/server/index.mjs"
10
+ },
11
+ "dependencies": {
12
+ "@platformatic/nuxt": "^3.52.4",
13
+ "nuxt": "^4.4.8",
14
+ "vue": "^3.5.22"
15
+ }
16
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/nuxt/3.52.4.json",
3
+ "application": {
4
+ "basePath": "/frontend",
5
+ "commands": {
6
+ "build": "npm run build",
7
+ "development": "npm run dev",
8
+ "production": "npm run start"
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "private": true,
3
+ "dependencies": {
4
+ "@platformatic/gateway": "^3.52.4",
5
+ "@platformatic/nuxt": "^3.52.4",
6
+ "@platformatic/service": "^3.52.4",
7
+ "nuxt": "^4.4.8",
8
+ "vue": "^3.5.22"
9
+ }
10
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/2.0.0.json",
3
+ "entrypoint": "composer",
4
+ "services": [
5
+ {
6
+ "id": "frontend",
7
+ "config": "platformatic.application.json",
8
+ "path": "./services/frontend"
9
+ },
10
+ {
11
+ "id": "backend",
12
+ "config": "platformatic.json",
13
+ "path": "./services/backend"
14
+ },
15
+ {
16
+ "id": "composer",
17
+ "config": "platformatic.json",
18
+ "path": "./services/composer"
19
+ }
20
+ ],
21
+ "logger": {
22
+ "level": "error"
23
+ }
24
+ }
@@ -0,0 +1,8 @@
1
+ <template>
2
+ <div>Hello from v{{ version }} t{{ time }}</div>
3
+ </template>
4
+
5
+ <script setup>
6
+ const version = 123
7
+ const time = Date.now()
8
+ </script>
@@ -0,0 +1,16 @@
1
+ import { defineNuxtConfig } from 'nuxt/config'
2
+
3
+ export default defineNuxtConfig({
4
+ ssr: false,
5
+ app: {
6
+ baseURL: '/frontend/'
7
+ },
8
+ compatibilityDate: '2026-06-15',
9
+ telemetry: false,
10
+ devtools: { enabled: false },
11
+ vite: {
12
+ server: {
13
+ allowedHosts: ['.plt.local']
14
+ }
15
+ }
16
+ })
@@ -0,0 +1,9 @@
1
+ {
2
+ "private": true,
3
+ "type": "module",
4
+ "dependencies": {
5
+ "@platformatic/nuxt": "^3.52.4",
6
+ "nuxt": "^4.4.8",
7
+ "vue": "^3.5.22"
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/nuxt/3.52.4.json",
3
+ "application": {
4
+ "basePath": "/frontend"
5
+ }
6
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "private": true,
3
+ "dependencies": {
4
+ "@platformatic/gateway": "^3.52.4",
5
+ "@platformatic/nuxt": "^3.52.4",
6
+ "@platformatic/service": "^3.52.4",
7
+ "nuxt": "^4.4.8",
8
+ "vue": "^3.5.22"
9
+ }
10
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://schemas.platformatic.dev/@platformatic/runtime/2.0.0.json",
3
+ "entrypoint": "composer",
4
+ "services": [
5
+ {
6
+ "id": "frontend",
7
+ "config": "platformatic.application.json",
8
+ "path": "./services/frontend"
9
+ },
10
+ {
11
+ "id": "backend",
12
+ "config": "platformatic.json",
13
+ "path": "./services/backend"
14
+ },
15
+ {
16
+ "id": "composer",
17
+ "config": "platformatic.json",
18
+ "path": "./services/composer"
19
+ }
20
+ ],
21
+ "logger": {
22
+ "level": "error"
23
+ }
24
+ }
@@ -0,0 +1,8 @@
1
+ <template>
2
+ <div>Hello from v{{ version }} t{{ time }}</div>
3
+ </template>
4
+
5
+ <script setup>
6
+ const version = 123
7
+ const time = Date.now()
8
+ </script>