@platformatic/nitro 0.0.1 → 3.62.5
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/NOTICE +6 -0
- package/README.md +13 -5
- package/config.d.ts +829 -0
- package/eslint.config.js +5 -0
- package/index.d.ts +54 -0
- package/index.js +39 -0
- package/lib/capability.js +558 -0
- package/lib/schema.js +60 -0
- package/package.json +39 -17
- package/schema.json +3080 -0
package/lib/schema.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { schemaComponents as basicSchemaComponents } from '@platformatic/basic'
|
|
2
|
+
import { schemaComponents as utilsSchemaComponents } from '@platformatic/foundation'
|
|
3
|
+
import { schemaComponents as viteSchemaComponents } from '@platformatic/vite'
|
|
4
|
+
import { readFileSync } from 'node:fs'
|
|
5
|
+
import { resolve } from 'node:path'
|
|
6
|
+
|
|
7
|
+
export const packageJson = JSON.parse(readFileSync(resolve(import.meta.dirname, '../package.json'), 'utf8'))
|
|
8
|
+
export const version = packageJson.version
|
|
9
|
+
|
|
10
|
+
export const nitro = {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
outputDirectory: {
|
|
14
|
+
type: 'string'
|
|
15
|
+
},
|
|
16
|
+
entrypoint: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
default: 'server/index.mjs'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
default: {},
|
|
22
|
+
additionalProperties: false
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const application = structuredClone(basicSchemaComponents.buildableApplication)
|
|
26
|
+
application.properties.outputDirectory.default = '.output'
|
|
27
|
+
delete application.properties.include.default
|
|
28
|
+
|
|
29
|
+
const server = structuredClone(utilsSchemaComponents.server)
|
|
30
|
+
delete server.properties.http2
|
|
31
|
+
|
|
32
|
+
const vite = structuredClone(viteSchemaComponents.vite)
|
|
33
|
+
delete vite.properties.ssr
|
|
34
|
+
delete vite.properties.notFoundHandler
|
|
35
|
+
|
|
36
|
+
export const schemaComponents = { nitro, vite }
|
|
37
|
+
|
|
38
|
+
export const schema = {
|
|
39
|
+
$id: `https://schemas.platformatic.dev/@platformatic/nitro/${packageJson.version}.json`,
|
|
40
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
41
|
+
title: 'Platformatic Nitro Config',
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: {
|
|
44
|
+
$schema: { type: 'string' },
|
|
45
|
+
module: { type: 'string' },
|
|
46
|
+
logger: utilsSchemaComponents.logger,
|
|
47
|
+
server,
|
|
48
|
+
watch: basicSchemaComponents.watch,
|
|
49
|
+
application,
|
|
50
|
+
runtime: utilsSchemaComponents.wrappedRuntime,
|
|
51
|
+
vite,
|
|
52
|
+
nitro
|
|
53
|
+
},
|
|
54
|
+
additionalProperties: false
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* c8 ignore next 3 */
|
|
58
|
+
if (process.argv[1] === import.meta.filename) {
|
|
59
|
+
console.log(JSON.stringify(schema, null, 2))
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,29 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/nitro",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
3
|
+
"version": "3.62.5",
|
|
4
|
+
"description": "Platformatic Nitro Capability",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/platformatic/platformatic.git"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
12
|
+
"author": "Platformatic Inc. <oss@platformatic.dev> (https://platformatic.dev)",
|
|
13
|
+
"license": "Apache-2.0",
|
|
13
14
|
"bugs": {
|
|
14
15
|
"url": "https://github.com/platformatic/platformatic/issues"
|
|
15
16
|
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"devDependencies": {
|
|
17
|
+
"homepage": "https://github.com/platformatic/platformatic#readme",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"light-my-request": "^6.6.0",
|
|
20
|
+
"semver": "^7.6.3",
|
|
21
|
+
"@platformatic/basic": "3.62.5",
|
|
22
|
+
"@platformatic/foundation": "3.62.5",
|
|
23
|
+
"@platformatic/globals": "3.62.5",
|
|
24
|
+
"@platformatic/vite": "3.62.5"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"cleaner-spec-reporter": "^0.5.0",
|
|
28
|
+
"eslint": "9",
|
|
29
|
+
"json-schema-to-typescript": "^15.0.1",
|
|
30
|
+
"neostandard": "^0.12.0",
|
|
31
|
+
"nitro": "^3.0.260610-beta",
|
|
32
|
+
"nitropack": "^2.12.9",
|
|
33
|
+
"tstyche": "^6.2.0",
|
|
34
|
+
"typescript": "^5.9.3",
|
|
35
|
+
"vite": "^7.2.4",
|
|
36
|
+
"ws": "^8.18.0",
|
|
37
|
+
"@platformatic/gateway": "3.62.5",
|
|
38
|
+
"@platformatic/service": "3.62.5"
|
|
39
|
+
},
|
|
26
40
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
41
|
+
"node": ">=22.19.0"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"test": "npm run test:types && node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
|
|
45
|
+
"test:types": "tstyche",
|
|
46
|
+
"gen-schema": "node lib/schema.js > schema.json",
|
|
47
|
+
"gen-types": "json2ts > config.d.ts < schema.json",
|
|
48
|
+
"build": "npm run gen-schema && npm run gen-types",
|
|
49
|
+
"lint": "eslint"
|
|
28
50
|
}
|
|
29
51
|
}
|