@veap/settings 0.1.6 → 0.1.7
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 +8 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -54,9 +54,10 @@ import { SettingsServiceProvider } from "@veap/settings";
|
|
|
54
54
|
export const app = Application.configure()
|
|
55
55
|
.use(DatabaseServiceProvider)
|
|
56
56
|
.use(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
(c) =>
|
|
58
|
+
new SettingsServiceProvider(c, {
|
|
59
|
+
autoMigrate: true, // Automatically applies settings table migrations
|
|
60
|
+
}),
|
|
60
61
|
)
|
|
61
62
|
.create();
|
|
62
63
|
```
|
|
@@ -78,8 +79,8 @@ const maintenance = await settings.get<boolean>("system.maintenance", false);
|
|
|
78
79
|
await settings.set("site.name", "My Enterprise Portal");
|
|
79
80
|
await settings.set("features.comments_enabled", true);
|
|
80
81
|
|
|
81
|
-
//
|
|
82
|
-
await settings.
|
|
82
|
+
// Remove a setting
|
|
83
|
+
await settings.remove("obsolete_key");
|
|
83
84
|
```
|
|
84
85
|
|
|
85
86
|
### Direct Model Access
|
|
@@ -98,8 +99,9 @@ const allSettings = await Setting.query().orderBy("key", "asc").get();
|
|
|
98
99
|
| Export Path | Content |
|
|
99
100
|
| --------------------------- | ----------------------------------------------------------------------- |
|
|
100
101
|
| `@veap/settings` | `SettingsService`, `SettingsServiceProvider`, and repository interfaces |
|
|
102
|
+
| `@veap/settings/server` | Server-side entry point re-exporting core settings APIs |
|
|
101
103
|
| `@veap/settings/models` | Active Record `Setting` model |
|
|
102
|
-
| `@veap/settings/migrations` | Knex migrations for the settings schema
|
|
104
|
+
| `@veap/settings/migrations` | Knex migrations for the settings schema (`settingsMigrations`) |
|
|
103
105
|
|
|
104
106
|
## Documentation
|
|
105
107
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veap/settings",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Application settings management, caching, and persistence for Veap",
|
|
5
5
|
"bugs": "https://github.com/veapjs/veap-settings/issues",
|
|
6
6
|
"repository": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"test": "vitest run"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@veap/database": "0.1.
|
|
44
|
-
"@veap/kernel": "0.
|
|
43
|
+
"@veap/database": "0.1.7",
|
|
44
|
+
"@veap/kernel": "0.2.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^22.20.2",
|