@lorion-org/nuxt 1.0.0-beta.1 → 1.0.0-beta.2
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/README.md +91 -36
- package/dist/descriptor-schema.js +38 -2
- package/dist/{extensions-vNob6d2x.d.ts → extensions-DlFRz22Q.d.ts} +24 -4
- package/dist/extensions.d.ts +6 -0
- package/dist/extensions.js +436 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +390 -39
- package/dist/runtime-config-node.d.ts +2 -2
- package/dist/runtime-config.d.ts +3 -3
- package/package.json +40 -12
- package/src/descriptor-schema.ts +5 -0
- package/src/extension-descriptor.schema.json +92 -0
- package/src/extensions.ts +496 -0
- package/src/index.ts +31 -0
- package/src/module.ts +876 -0
- package/src/runtime-config-node.ts +66 -0
- package/src/runtime-config.ts +292 -0
- package/src/types.ts +143 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ValidateRuntimeConfigPatternSourceScopesOptions, RuntimeConfigSchemaTargetInput, RuntimeConfigValidateResult } from '@lorion-org/runtime-config-node';
|
|
2
2
|
import { RuntimeConfigFragmentMap } from '@lorion-org/runtime-config';
|
|
3
|
-
import { C as CreateNuxtRuntimeConfigOptions,
|
|
3
|
+
import { C as CreateNuxtRuntimeConfigOptions, s as RuntimeConfigNuxtSourceOptions, a as NuxtRuntimeConfig } from './extensions-DlFRz22Q.js';
|
|
4
4
|
import '@lorion-org/composition-graph';
|
|
5
5
|
import '@lorion-org/provider-selection';
|
|
6
|
-
import '
|
|
6
|
+
import './descriptor-schema.js';
|
|
7
7
|
|
|
8
8
|
type CreateNuxtRuntimeConfigFromSourceOptions = Omit<CreateNuxtRuntimeConfigOptions, 'fragments' | 'runtimeConfig'>;
|
|
9
9
|
type ValidateNuxtRuntimeConfigSourceScopesOptions = Omit<ValidateRuntimeConfigPatternSourceScopesOptions, 'fileName' | 'runtimeConfigDirName'>;
|
package/dist/runtime-config.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SectionedRuntimeConfig, GetRuntimeConfigFragmentOptions, RuntimeConfigContext, RuntimeConfigSection, GetRuntimeConfigScopeOptions, NamedRuntimeConfigFragment, RuntimeConfigFragmentMap, ResolveRuntimeConfigValueFromRuntimeConfigOptions } from '@lorion-org/runtime-config';
|
|
2
|
-
import { C as CreateNuxtRuntimeConfigOptions, a as NuxtRuntimeConfig,
|
|
3
|
-
export {
|
|
2
|
+
import { C as CreateNuxtRuntimeConfigOptions, a as NuxtRuntimeConfig, t as NuxtRuntimeConfigInput, u as ReadNuxtRuntimeConfigOptions, v as NuxtExtensionSelection, k as NuxtProviderSelectionRuntimeConfig, w as RuntimeConfigNuxtFragments } from './extensions-DlFRz22Q.js';
|
|
3
|
+
export { x as NuxtExtensionSelectionRuntimeConfig, y as NuxtPrivateRuntimeConfigMode } from './extensions-DlFRz22Q.js';
|
|
4
4
|
import '@lorion-org/composition-graph';
|
|
5
5
|
import '@lorion-org/provider-selection';
|
|
6
|
-
import '@lorion-org/descriptor-discovery';
|
|
7
6
|
import '@lorion-org/runtime-config-node';
|
|
7
|
+
import './descriptor-schema.js';
|
|
8
8
|
|
|
9
9
|
declare function normalizeNuxtRuntimeConfigFragments(fragments?: RuntimeConfigNuxtFragments, options?: Pick<CreateNuxtRuntimeConfigOptions, 'contextInputKey'>): NamedRuntimeConfigFragment[] | RuntimeConfigFragmentMap;
|
|
10
10
|
declare function toNuxtRuntimeConfig(runtimeConfig: SectionedRuntimeConfig, options?: Pick<CreateNuxtRuntimeConfigOptions, 'privateOutput'>): NuxtRuntimeConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lorion-org/nuxt",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "Nuxt module for LORION libraries and framework adapters.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -21,30 +21,58 @@
|
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
+
"lorion-source": {
|
|
25
|
+
"types": "./src/index.ts",
|
|
26
|
+
"default": "./src/index.ts"
|
|
27
|
+
},
|
|
24
28
|
"types": "./dist/index.d.ts",
|
|
25
29
|
"import": "./dist/index.js",
|
|
26
30
|
"default": "./dist/index.js"
|
|
27
31
|
},
|
|
28
32
|
"./runtime-config": {
|
|
33
|
+
"lorion-source": {
|
|
34
|
+
"types": "./src/runtime-config.ts",
|
|
35
|
+
"default": "./src/runtime-config.ts"
|
|
36
|
+
},
|
|
29
37
|
"types": "./dist/runtime-config.d.ts",
|
|
30
38
|
"import": "./dist/runtime-config.js",
|
|
31
39
|
"default": "./dist/runtime-config.js"
|
|
32
40
|
},
|
|
33
41
|
"./runtime-config-node": {
|
|
42
|
+
"lorion-source": {
|
|
43
|
+
"types": "./src/runtime-config-node.ts",
|
|
44
|
+
"default": "./src/runtime-config-node.ts"
|
|
45
|
+
},
|
|
34
46
|
"types": "./dist/runtime-config-node.d.ts",
|
|
35
47
|
"import": "./dist/runtime-config-node.js",
|
|
36
48
|
"default": "./dist/runtime-config-node.js"
|
|
37
49
|
},
|
|
38
50
|
"./descriptor-schema": {
|
|
51
|
+
"lorion-source": {
|
|
52
|
+
"types": "./src/descriptor-schema.ts",
|
|
53
|
+
"default": "./src/descriptor-schema.ts"
|
|
54
|
+
},
|
|
39
55
|
"types": "./dist/descriptor-schema.d.ts",
|
|
40
56
|
"import": "./dist/descriptor-schema.js",
|
|
41
57
|
"default": "./dist/descriptor-schema.js"
|
|
58
|
+
},
|
|
59
|
+
"./extensions": {
|
|
60
|
+
"lorion-source": {
|
|
61
|
+
"types": "./src/extensions.ts",
|
|
62
|
+
"default": "./src/extensions.ts"
|
|
63
|
+
},
|
|
64
|
+
"types": "./dist/extensions.d.ts",
|
|
65
|
+
"import": "./dist/extensions.js",
|
|
66
|
+
"default": "./dist/extensions.js"
|
|
42
67
|
}
|
|
43
68
|
},
|
|
44
69
|
"files": [
|
|
45
70
|
"dist",
|
|
46
71
|
"examples",
|
|
47
|
-
"LICENSE"
|
|
72
|
+
"LICENSE",
|
|
73
|
+
"src/**/*.ts",
|
|
74
|
+
"src/**/*.json",
|
|
75
|
+
"!src/**/*.spec.ts"
|
|
48
76
|
],
|
|
49
77
|
"keywords": [
|
|
50
78
|
"lorion",
|
|
@@ -56,11 +84,11 @@
|
|
|
56
84
|
"node": "^20.19.0 || >=22.12.0"
|
|
57
85
|
},
|
|
58
86
|
"dependencies": {
|
|
59
|
-
"@lorion-org/
|
|
60
|
-
"@lorion-org/
|
|
61
|
-
"@lorion-org/
|
|
62
|
-
"@lorion-org/
|
|
63
|
-
"@lorion-org/provider-selection": "^1.0.0-beta.
|
|
87
|
+
"@lorion-org/composition-graph": "^1.0.0-beta.2",
|
|
88
|
+
"@lorion-org/descriptor-discovery": "^1.0.0-beta.2",
|
|
89
|
+
"@lorion-org/runtime-config": "^1.0.0-beta.1",
|
|
90
|
+
"@lorion-org/runtime-config-node": "^1.0.0-beta.1",
|
|
91
|
+
"@lorion-org/provider-selection": "^1.0.0-beta.2"
|
|
64
92
|
},
|
|
65
93
|
"peerDependencies": {
|
|
66
94
|
"@nuxt/kit": "^4.0.0",
|
|
@@ -71,19 +99,19 @@
|
|
|
71
99
|
"@nuxt/schema": "^4.4.2",
|
|
72
100
|
"@nuxt/test-utils": "^3.23.0",
|
|
73
101
|
"nuxt": "^4.4.2",
|
|
74
|
-
"@lorion-org/registry-hub": "^1.0.0-beta.
|
|
102
|
+
"@lorion-org/registry-hub": "^1.0.0-beta.2"
|
|
75
103
|
},
|
|
76
104
|
"scripts": {
|
|
77
|
-
"build": "rimraf dist && tsup src/index.ts src/runtime-config.ts src/runtime-config-node.ts src/descriptor-schema.ts --format esm --dts --splitting false",
|
|
105
|
+
"build": "rimraf dist && tsup src/index.ts src/runtime-config.ts src/runtime-config-node.ts src/descriptor-schema.ts src/extensions.ts --format esm --dts --splitting false",
|
|
78
106
|
"clean": "rimraf coverage dist tsconfig.tsbuildinfo",
|
|
79
107
|
"lint": "eslint src --ext .ts",
|
|
80
108
|
"package:check": "pnpm build && pnpm pack --dry-run && publint",
|
|
81
109
|
"test": "pnpm test:unit && pnpm test:e2e",
|
|
82
110
|
"test:unit": "vitest run --config test/vitest.unit.config.mts",
|
|
83
111
|
"test:e2e": "vitest run --config test/vitest.e2e.config.mts",
|
|
84
|
-
"build:playground": "nuxi build playground",
|
|
85
|
-
"dev:playground": "nuxi dev playground",
|
|
86
|
-
"typecheck:playground": "nuxi typecheck playground",
|
|
112
|
+
"build:playground": "node ../../tools/run-source-condition.mjs nuxi build playground",
|
|
113
|
+
"dev:playground": "node ../../tools/run-source-condition.mjs nuxi dev playground",
|
|
114
|
+
"typecheck:playground": "node ../../tools/run-source-condition.mjs nuxi typecheck playground",
|
|
87
115
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
88
116
|
}
|
|
89
117
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://lorion.dev/schemas/nuxt-extension-descriptor.schema.json",
|
|
4
|
+
"$ref": "#/$defs/extension",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"semver": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^(\\^|~)?\\d+\\.\\d+\\.\\d+$"
|
|
9
|
+
},
|
|
10
|
+
"dependencyMap": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": { "$ref": "#/$defs/semver" }
|
|
13
|
+
},
|
|
14
|
+
"extension": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1
|
|
20
|
+
},
|
|
21
|
+
"version": { "$ref": "#/$defs/semver" },
|
|
22
|
+
"providesFor": {
|
|
23
|
+
"oneOf": [
|
|
24
|
+
{
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"capabilities": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"dependencies": { "$ref": "#/$defs/dependencyMap" },
|
|
45
|
+
"disabled": { "type": "boolean" },
|
|
46
|
+
"location": { "type": "string" },
|
|
47
|
+
"defaultFor": {
|
|
48
|
+
"oneOf": [
|
|
49
|
+
{
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"providerPreferences": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"publicRuntimeConfig": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": true
|
|
72
|
+
},
|
|
73
|
+
"runtimeConfig": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {
|
|
76
|
+
"validation": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"enum": ["none", "optional", "startup", "onUse"]
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"additionalProperties": false
|
|
82
|
+
},
|
|
83
|
+
"bundles": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": { "$ref": "#/$defs/extension" }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": ["id", "version"],
|
|
89
|
+
"additionalProperties": true
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|