@lorion-org/nuxt 1.0.0-beta.0 → 1.0.0-beta.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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the 'Software'), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the 'Software'), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -54,12 +54,6 @@ Use `@lorion-org/nuxt` when:
54
54
  - not a schema validator
55
55
  - not an application naming policy
56
56
 
57
- ## Compatibility
58
-
59
- | Package version | Nuxt 3 | Nuxt 4 | Test status |
60
- | --------------- | ----------------- | --------- | ---------------------------------- |
61
- | `0.1.x` | not supported yet | supported | CI-tested locally against Nuxt 4.x |
62
-
63
57
  ## Extension model
64
58
 
65
59
  The module uses one `lorion` config key. By default it discovers `extension.json`
@@ -169,12 +163,12 @@ export default defineNuxtConfig({
169
163
  lorion: {
170
164
  runtimeConfig: {
171
165
  fragments: {
172
- billing: {
166
+ checkout: {
173
167
  public: {
174
- apiBase: '/api/billing',
168
+ successPath: '/orders/confirmed',
175
169
  },
176
170
  private: {
177
- apiSecret: 'secret',
171
+ signingSecret: 'checkout_signing_secret_demo',
178
172
  },
179
173
  },
180
174
  },
@@ -192,10 +186,10 @@ The module also auto-imports runtime-config composables unless
192
186
  `runtimeConfig.imports` is `false`.
193
187
 
194
188
  ```ts
195
- const billing = usePublicRuntimeConfigScope('billing');
189
+ const checkout = usePublicRuntimeConfigScope('checkout');
196
190
 
197
- billing.apiBase;
198
- // => '/api/billing'
191
+ checkout.successPath;
192
+ // => '/orders/confirmed'
199
193
  ```
200
194
 
201
195
  Configured module options such as `contextOutputKey` and `privateOutput` are
@@ -365,9 +359,9 @@ export default defineNuxtConfig({
365
359
  lorion: {
366
360
  runtimeConfig: {
367
361
  fragments: {
368
- billing: {
362
+ checkout: {
369
363
  public: {
370
- apiBase: '/api/billing',
364
+ successPath: '/orders/confirmed',
371
365
  },
372
366
  },
373
367
  },
@@ -402,7 +396,7 @@ Directory shape:
402
396
  ```text
403
397
  var/
404
398
  runtime-config/
405
- billing/
399
+ checkout/
406
400
  runtime.config.json
407
401
  ```
408
402
 
@@ -414,8 +408,8 @@ export default defineNuxtConfig({
414
408
  modules: ['@lorion-org/nuxt'],
415
409
  lorion: {
416
410
  runtimeConfig: {
417
- contextInputKey: 'tenants',
418
- contextOutputKey: '__tenants',
411
+ contextInputKey: 'stores',
412
+ contextOutputKey: '__stores',
419
413
  source: {
420
414
  paths: ['var/runtime-config/*/runtime.config.json'],
421
415
  },
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ import {
19
19
  } from "@lorion-org/composition-graph";
20
20
  import { discoverDescriptors } from "@lorion-org/descriptor-discovery";
21
21
  import {
22
+ collectProviderPreferences,
22
23
  resolveItemProviderSelection
23
24
  } from "@lorion-org/provider-selection";
24
25
 
@@ -284,23 +285,12 @@ function createNuxtExtensionBootstrap(input) {
284
285
  function createNuxtExtensionLayerPaths(bootstrap) {
285
286
  return bootstrap.activeExtensions.filter(canExtendExtensionLayer).map((extension) => extension.cwd);
286
287
  }
287
- function collectProviderPreferences(extensions) {
288
- return extensions.reduce((preferences, extension) => {
289
- const value = extension.descriptor.providerPreferences;
290
- if (!isRecord(value)) return preferences;
291
- return {
292
- ...preferences,
293
- ...Object.fromEntries(
294
- Object.entries(value).filter(
295
- (entry) => typeof entry[1] === "string" && entry[1].length > 0
296
- )
297
- )
298
- };
299
- }, {});
300
- }
301
288
  function createNuxtProviderSelectionRuntimeConfig(extensions, options = {}) {
302
289
  const publicRuntimeConfigKey = "providerSelection";
303
- const descriptorPreferences = collectProviderPreferences(extensions);
290
+ const descriptorPreferences = collectProviderPreferences({
291
+ items: extensions,
292
+ getProviderPreferences: (extension) => extension.descriptor.providerPreferences
293
+ });
304
294
  const configuredProviders = {
305
295
  ...descriptorPreferences,
306
296
  ...options.configuredProviders ?? {}
@@ -1,3 +1,3 @@
1
1
  export default defineEventHandler(() => {
2
- return usePublicRuntimeConfigScope('billing');
2
+ return usePublicRuntimeConfigScope('checkout');
3
3
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lorion-org/nuxt",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "Nuxt module for LORION libraries and framework adapters.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -56,11 +56,11 @@
56
56
  "node": "^20.19.0 || >=22.12.0"
57
57
  },
58
58
  "dependencies": {
59
- "@lorion-org/provider-selection": "^1.0.0-beta.0",
60
- "@lorion-org/composition-graph": "^1.0.0-beta.0",
61
- "@lorion-org/descriptor-discovery": "^1.0.0-beta.0",
62
59
  "@lorion-org/runtime-config": "^1.0.0-beta.0",
63
- "@lorion-org/runtime-config-node": "^1.0.0-beta.0"
60
+ "@lorion-org/runtime-config-node": "^1.0.0-beta.0",
61
+ "@lorion-org/descriptor-discovery": "^1.0.0-beta.1",
62
+ "@lorion-org/composition-graph": "^1.0.0-beta.1",
63
+ "@lorion-org/provider-selection": "^1.0.0-beta.1"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@nuxt/kit": "^4.0.0",
@@ -71,7 +71,7 @@
71
71
  "@nuxt/schema": "^4.4.2",
72
72
  "@nuxt/test-utils": "^3.23.0",
73
73
  "nuxt": "^4.4.2",
74
- "@lorion-org/registry-hub": "^1.0.0-beta.0"
74
+ "@lorion-org/registry-hub": "^1.0.0-beta.1"
75
75
  },
76
76
  "scripts": {
77
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",