Skip to content

Commit 80df519

Browse files
author
Jonathan D.A. Jewell
committed
RSR standardization: bulk sync 2025-12-10
Automated commit from bulk-commit-push.sh - Standardized repo structure - Applied RSR templates - Synced local changes 🤖 Generated with Claude Code
1 parent f41e478 commit 80df519

11 files changed

Lines changed: 323 additions & 360 deletions

File tree

.editorconfig

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# preference-injector - Editor Configuration
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
indent_size = 2
10+
indent_style = space
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.adoc]
18+
trim_trailing_whitespace = false
19+
20+
[*.rs]
21+
indent_size = 4
22+
23+
[*.ex]
24+
indent_size = 2
25+
26+
[*.exs]
27+
indent_size = 2
28+
29+
[*.zig]
30+
indent_size = 4
31+
32+
[*.ada]
33+
indent_size = 3
34+
35+
[*.adb]
36+
indent_size = 3
37+
38+
[*.ads]
39+
indent_size = 3
40+
41+
[*.hs]
42+
indent_size = 2
43+
44+
[*.res]
45+
indent_size = 2
46+
47+
[*.resi]
48+
indent_size = 2
49+
50+
[*.ncl]
51+
indent_size = 2
52+
53+
[*.rkt]
54+
indent_size = 2
55+
56+
[*.scm]
57+
indent_size = 2
58+
59+
[*.nix]
60+
indent_size = 2
61+
62+
[Justfile]
63+
indent_style = space
64+
indent_size = 4
65+
66+
[justfile]
67+
indent_style = space
68+
indent_size = 4

.guix-channel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;; preference-injector - Guix Channel
2+
;; Add to ~/.config/guix/channels.scm
3+
4+
(channel
5+
(version 0)
6+
(url "https://github.com/hyperpolymath/preference-injector")
7+
(branch "main"))

.well-known/dc.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<metadata xmlns="http://purl.org/dc/elements/1.1/"
3+
xmlns:dcterms="http://purl.org/dc/terms/">
4+
<title>preference-injector</title>
5+
<creator>Hyper Polymath</creator>
6+
<subject>RSR</subject>
7+
<description>RSR-compliant project</description>
8+
<publisher>Rhodium Standard</publisher>
9+
<date>2025</date>
10+
<type>Software</type>
11+
<identifier>https://github.com/hyperpolymath/preference-injector</identifier>
12+
<language>en</language>
13+
<rights>AGPL-3.0-or-later OR LicenseRef-Palimpsest-0.5</rights>
14+
<dcterms:license>https://spdx.org/licenses/AGPL-3.0-or-later.html</dcterms:license>
15+
<dcterms:hasVersion>0.1.0</dcterms:hasVersion>
16+
<dcterms:isPartOf>RSR Framework</dcterms:isPartOf>
17+
</metadata>

CITATION.cff

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# CITATION.cff - Citation File Format for preference-injector
2+
# https://citation-file-format.github.io/
3+
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Palimpsest-0.5
4+
5+
cff-version: 1.2.0
6+
title: "preference-injector"
7+
message: "If you use this software, please cite it as below."
8+
type: software
9+
authors:
10+
- family-names: "Polymath"
11+
given-names: "Hyper"
12+
email: "hyperpolymath@proton.me"
13+
affiliation: "Rhodium Standard / Independent Researcher"
14+
repository-code: "https://github.com/hyperpolymath/preference-injector"
15+
url: "https://rhodium.sh/projects/preference-injector"
16+
abstract: "RSR-compliant project"
17+
keywords:
18+
- RSR
19+
- rhodium-standard
20+
license: "AGPL-3.0-or-later"
21+
license-url: "https://github.com/hyperpolymath/preference-injector/blob/main/LICENSE.txt"
22+
version: "0.1.0"
23+
date-released: "2025-12-10"

LICENSE renamed to LICENSE.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Palimpsest-0.5
2+
3+
This software is dual-licensed under:
4+
1. GNU Affero General Public License v3.0 or later
5+
2. Palimpsest License v0.5
6+
7+
See https://spdx.org/licenses/ for license details.
8+
================================================================================
9+
110
MIT License
211

312
Copyright (c) 2024 Hyperpolymath

README.md renamed to README.adoc

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# Preference Injector
1+
= Preference Injector
22

33
A powerful, type-safe preference injection system for dynamic configuration management in Node.js and TypeScript applications.
44

5-
## Features
5+
== Features
66

7-
- **Multiple Providers**: File-based, environment variables, API, and in-memory storage
8-
- **Priority System**: Resolve conflicts between providers using customizable strategies
9-
- **Type Safety**: Full TypeScript support with generic type helpers
10-
- **Caching**: LRU and TTL caching strategies for performance
11-
- **Validation**: Schema-based and custom validation rules
12-
- **Encryption**: AES-256-GCM encryption for sensitive preferences
13-
- **Audit Logging**: Track all preference operations
14-
- **Migrations**: Version and migrate preference schemas
15-
- **React Integration**: Hooks and context providers
16-
- **Express Middleware**: RESTful API and request helpers
17-
- **CLI Tool**: Command-line interface for preference management
7+
- *Multiple Providers*: File-based, environment variables, API, and in-memory storage
8+
- *Priority System*: Resolve conflicts between providers using customizable strategies
9+
- *Type Safety*: Full TypeScript support with generic type helpers
10+
- *Caching*: LRU and TTL caching strategies for performance
11+
- *Validation*: Schema-based and custom validation rules
12+
- *Encryption*: AES-256-GCM encryption for sensitive preferences
13+
- *Audit Logging*: Track all preference operations
14+
- *Migrations*: Version and migrate preference schemas
15+
- *React Integration*: Hooks and context providers
16+
- *Express Middleware*: RESTful API and request helpers
17+
- *CLI Tool*: Command-line interface for preference management
1818

19-
## Installation
19+
== Installation
2020

2121
```bash
2222
npm install @hyperpolymath/preference-injector
2323
```
2424

25-
## Quick Start
25+
== Quick Start
2626

2727
```typescript
2828
import { PreferenceInjector, MemoryProvider } from '@hyperpolymath/preference-injector';
@@ -47,9 +47,9 @@ const fontSize = await injector.getTyped<number>('fontSize');
4747
console.log('Font Size:', fontSize); // 14
4848
```
4949

50-
## Providers
50+
== Providers
5151

52-
### Memory Provider
52+
=== Memory Provider
5353

5454
In-memory storage for runtime preferences:
5555

@@ -59,7 +59,7 @@ import { MemoryProvider, PreferencePriority } from '@hyperpolymath/preference-in
5959
const provider = new MemoryProvider(PreferencePriority.NORMAL);
6060
```
6161

62-
### File Provider
62+
=== File Provider
6363

6464
JSON or .env file-based storage:
6565

@@ -74,7 +74,7 @@ const provider = new FileProvider({
7474
});
7575
```
7676

77-
### Environment Provider
77+
=== Environment Provider
7878

7979
Environment variable integration:
8080

@@ -88,7 +88,7 @@ const provider = new EnvProvider({
8888
});
8989
```
9090

91-
### API Provider
91+
=== API Provider
9292

9393
Remote configuration service:
9494

@@ -104,7 +104,7 @@ const provider = new ApiProvider({
104104
});
105105
```
106106

107-
## Multi-Provider Setup
107+
== Multi-Provider Setup
108108

109109
Use multiple providers with automatic conflict resolution:
110110

@@ -119,7 +119,7 @@ const injector = new PreferenceInjector({
119119
});
120120
```
121121

122-
## Validation
122+
== Validation
123123

124124
Add validation rules to ensure preference values are valid:
125125

@@ -137,7 +137,7 @@ validator.addRule('username', CommonValidationRules.stringLength(3, 20));
137137
await injector.set('email', 'user@example.com', { validate: true });
138138
```
139139

140-
## Schema Validation
140+
== Schema Validation
141141

142142
Define schemas for your preferences:
143143

@@ -153,7 +153,7 @@ const schema = new SchemaBuilder()
153153
const schemaValidator = new SchemaValidator(schema);
154154
```
155155

156-
## Encryption
156+
== Encryption
157157

158158
Encrypt sensitive preferences:
159159

@@ -170,7 +170,7 @@ await injector.set('apiKey', 'secret-key', { encrypt: true });
170170
const apiKey = await injector.get('apiKey', { decrypt: true });
171171
```
172172

173-
## Caching
173+
== Caching
174174

175175
Enable caching for better performance:
176176

@@ -182,7 +182,7 @@ const injector = new PreferenceInjector({
182182
});
183183
```
184184

185-
## Audit Logging
185+
== Audit Logging
186186

187187
Track all preference operations:
188188

@@ -197,7 +197,7 @@ const auditLogger = injector.getAuditLogger();
197197
const entries = auditLogger.getEntries();
198198
```
199199

200-
## React Integration
200+
== React Integration
201201

202202
Use preferences in React applications:
203203

@@ -225,7 +225,7 @@ function ThemeToggle() {
225225
}
226226
```
227227

228-
## Express Integration
228+
== Express Integration
229229

230230
Add preference management to Express applications:
231231

@@ -251,28 +251,28 @@ app.get('/config', async (req, res) => {
251251
});
252252
```
253253

254-
## CLI Tool
254+
== CLI Tool
255255

256256
Manage preferences from the command line:
257257

258258
```bash
259-
# Get a preference
259+
= Get a preference
260260
preference-injector get theme
261261

262-
# Set a preference
262+
= Set a preference
263263
preference-injector set theme dark
264264

265-
# List all preferences
265+
= List all preferences
266266
preference-injector -f config.json list
267267

268-
# Delete a preference
268+
= Delete a preference
269269
preference-injector delete old-key
270270

271-
# Clear all preferences
271+
= Clear all preferences
272272
preference-injector clear
273273
```
274274

275-
## Migrations
275+
== Migrations
276276

277277
Version and migrate preference schemas:
278278

@@ -299,26 +299,26 @@ manager.register(
299299
await manager.migrateToLatest(preferences, 0);
300300
```
301301

302-
## API Documentation
302+
== API Documentation
303303

304304
For detailed API documentation, see [API.md](./docs/API.md).
305305

306-
## Examples
306+
== Examples
307307

308308
Check the [examples](./examples) directory for more usage examples:
309309

310310
- [Basic Usage](./examples/basic-usage.ts)
311311
- [React Integration](./examples/react-example.tsx)
312312
- [Express Integration](./examples/express-example.ts)
313313

314-
## Contributing
314+
== Contributing
315315

316316
Contributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
317317

318-
## License
318+
== License
319319

320320
MIT
321321

322-
## Changelog
322+
== Changelog
323323

324324
See [CHANGELOG.md](./CHANGELOG.md) for release history.

0 commit comments

Comments
 (0)