@fjell/core 4.4.7 → 4.4.12
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 +227 -0
- package/dist/cjs/item/IUtils.js.map +1 -1
- package/dist/esm/item/IUtils.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/docs/README.md +53 -0
- package/docs/index.html +18 -0
- package/docs/package.json +35 -0
- package/docs/public/README.md +227 -0
- package/docs/public/api.md +230 -0
- package/docs/public/basic-usage.ts +293 -0
- package/docs/public/examples-README.md +147 -0
- package/docs/public/fjell-icon.svg +1 -0
- package/docs/public/package.json +56 -0
- package/docs/public/pano.png +0 -0
- package/docs/src/App.css +1178 -0
- package/docs/src/App.tsx +684 -0
- package/docs/src/index.css +38 -0
- package/docs/src/main.tsx +10 -0
- package/docs/tsconfig.node.json +14 -0
- package/docs/vitest.config.ts +14 -0
- package/examples/README.md +147 -0
- package/examples/basic-usage.ts +293 -0
- package/package.json +7 -6
- package/src/item/IUtils.ts +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
-webkit-text-size-adjust: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
color: #646cff;
|
|
20
|
+
text-decoration: inherit;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
a:hover {
|
|
24
|
+
color: #535bf2;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
body {
|
|
28
|
+
margin: 0;
|
|
29
|
+
display: flex;
|
|
30
|
+
place-items: center;
|
|
31
|
+
min-width: 320px;
|
|
32
|
+
min-height: 100vh;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
h1 {
|
|
36
|
+
font-size: 3.2em;
|
|
37
|
+
line-height: 1.1;
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true,
|
|
4
|
+
"skipLibCheck": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowSyntheticDefaultImports": true,
|
|
8
|
+
"strict": true
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"vite.config.ts",
|
|
12
|
+
"vitest.config.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config'
|
|
2
|
+
import react from '@vitejs/plugin-react'
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [react()],
|
|
6
|
+
test: {
|
|
7
|
+
globals: true,
|
|
8
|
+
environment: 'jsdom',
|
|
9
|
+
setupFiles: ['./src/test/setup.ts'],
|
|
10
|
+
coverage: {
|
|
11
|
+
reporter: ['text', 'json', 'html']
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
})
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Fjell Core Examples
|
|
2
|
+
|
|
3
|
+
This directory contains comprehensive examples demonstrating real-world usage patterns for Fjell Core.
|
|
4
|
+
|
|
5
|
+
## Available Examples
|
|
6
|
+
|
|
7
|
+
### Basic Examples
|
|
8
|
+
|
|
9
|
+
#### [basic-usage.ts](./basic-usage.ts)
|
|
10
|
+
Demonstrates fundamental Fjell Core operations:
|
|
11
|
+
- Item creation with IFactory
|
|
12
|
+
- Key generation and manipulation with KUtils
|
|
13
|
+
- Basic service implementation with AItemService
|
|
14
|
+
|
|
15
|
+
#### [service-patterns.ts](./service-patterns.ts)
|
|
16
|
+
Shows common service implementation patterns:
|
|
17
|
+
- Repository pattern implementation
|
|
18
|
+
- Service composition
|
|
19
|
+
- Error handling strategies
|
|
20
|
+
|
|
21
|
+
#### [query-examples.ts](./query-examples.ts)
|
|
22
|
+
Query building and execution examples:
|
|
23
|
+
- Basic query construction
|
|
24
|
+
- Complex filtering and sorting
|
|
25
|
+
- Query optimization techniques
|
|
26
|
+
|
|
27
|
+
### Advanced Examples
|
|
28
|
+
|
|
29
|
+
#### [enterprise-example.ts](./enterprise-example.ts)
|
|
30
|
+
Production-ready enterprise patterns:
|
|
31
|
+
- Multi-layered service architecture
|
|
32
|
+
- Transaction management
|
|
33
|
+
- Comprehensive error handling
|
|
34
|
+
- Performance optimization
|
|
35
|
+
|
|
36
|
+
#### [testing-example.ts](./testing-example.ts)
|
|
37
|
+
Testing strategies and utilities:
|
|
38
|
+
- Unit testing with Fjell Core
|
|
39
|
+
- Mock creation and management
|
|
40
|
+
- Integration testing patterns
|
|
41
|
+
|
|
42
|
+
## Running the Examples
|
|
43
|
+
|
|
44
|
+
All examples are TypeScript files that can be run directly:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Using ts-node
|
|
48
|
+
npx ts-node examples/basic-usage.ts
|
|
49
|
+
|
|
50
|
+
# Using tsx
|
|
51
|
+
npx tsx examples/basic-usage.ts
|
|
52
|
+
|
|
53
|
+
# Compile and run
|
|
54
|
+
tsc examples/basic-usage.ts && node examples/basic-usage.js
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Prerequisites
|
|
58
|
+
|
|
59
|
+
Make sure you have Fjell Core installed:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm install @fjell/core
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For the examples that integrate with databases or external services, you may need additional dependencies as noted in each example.
|
|
66
|
+
|
|
67
|
+
## Example Structure
|
|
68
|
+
|
|
69
|
+
Each example follows a consistent structure:
|
|
70
|
+
|
|
71
|
+
1. **Imports**: Required Fjell Core modules
|
|
72
|
+
2. **Type Definitions**: TypeScript interfaces and types
|
|
73
|
+
3. **Implementation**: Core logic demonstration
|
|
74
|
+
4. **Usage**: Practical usage examples
|
|
75
|
+
5. **Output**: Expected results and explanations
|
|
76
|
+
|
|
77
|
+
## Integration Examples
|
|
78
|
+
|
|
79
|
+
Several examples show integration with popular libraries and frameworks:
|
|
80
|
+
|
|
81
|
+
- Express.js web applications
|
|
82
|
+
- Database ORMs (Sequelize, TypeORM)
|
|
83
|
+
- Testing frameworks (Jest, Vitest)
|
|
84
|
+
- React applications
|
|
85
|
+
- GraphQL APIs
|
|
86
|
+
|
|
87
|
+
## Best Practices
|
|
88
|
+
|
|
89
|
+
The examples demonstrate Fjell Core best practices:
|
|
90
|
+
|
|
91
|
+
- **Type Safety**: Comprehensive TypeScript usage
|
|
92
|
+
- **Error Handling**: Robust error management
|
|
93
|
+
- **Performance**: Optimized patterns for production
|
|
94
|
+
- **Testing**: Comprehensive test coverage
|
|
95
|
+
- **Documentation**: Clear code documentation
|
|
96
|
+
|
|
97
|
+
## Contributing Examples
|
|
98
|
+
|
|
99
|
+
We welcome new examples! Please follow these guidelines:
|
|
100
|
+
|
|
101
|
+
1. Create a new TypeScript file with a descriptive name
|
|
102
|
+
2. Include comprehensive comments explaining the concepts
|
|
103
|
+
3. Add proper type definitions
|
|
104
|
+
4. Include usage examples and expected output
|
|
105
|
+
5. Update this README with a description of your example
|
|
106
|
+
|
|
107
|
+
## Getting Help
|
|
108
|
+
|
|
109
|
+
If you have questions about any example:
|
|
110
|
+
|
|
111
|
+
1. Check the inline comments for explanations
|
|
112
|
+
2. Review the main Fjell Core documentation
|
|
113
|
+
3. Open an issue on GitHub for specific questions
|
|
114
|
+
4. Join our community discussions
|
|
115
|
+
|
|
116
|
+
## Common Patterns Demonstrated
|
|
117
|
+
|
|
118
|
+
### Factory Pattern
|
|
119
|
+
```typescript
|
|
120
|
+
const user = IFactory.create<User>('user', userData)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Repository Pattern
|
|
124
|
+
```typescript
|
|
125
|
+
class UserRepository extends AItemService {
|
|
126
|
+
async save(user: User): Promise<User> { ... }
|
|
127
|
+
async findById(id: string): Promise<User | null> { ... }
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Service Layer
|
|
132
|
+
```typescript
|
|
133
|
+
class UserService extends AItemService {
|
|
134
|
+
constructor(private userRepo: UserRepository) { super() }
|
|
135
|
+
async registerUser(data: UserData): Promise<User> { ... }
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Query Building
|
|
140
|
+
```typescript
|
|
141
|
+
const query = IQFactory.create('user')
|
|
142
|
+
.where('status', 'active')
|
|
143
|
+
.orderBy('createdAt', 'desc')
|
|
144
|
+
.limit(10)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
These examples provide a solid foundation for building production applications with Fjell Core.
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Basic Usage Example - Fjell Core
|
|
3
|
+
*
|
|
4
|
+
* This example demonstrates the fundamental operations available in Fjell Core:
|
|
5
|
+
* - Item creation with IFactory
|
|
6
|
+
* - Key generation and manipulation with KUtils
|
|
7
|
+
* - Basic service implementation with AItemService
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { AItemService, IFactory, KUtils } from '@fjell/core'
|
|
11
|
+
|
|
12
|
+
// Define our data types
|
|
13
|
+
interface User {
|
|
14
|
+
id: string
|
|
15
|
+
name: string
|
|
16
|
+
email: string
|
|
17
|
+
createdAt: string
|
|
18
|
+
status: 'active' | 'inactive'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface Product {
|
|
22
|
+
id: string
|
|
23
|
+
name: string
|
|
24
|
+
price: number
|
|
25
|
+
category: string
|
|
26
|
+
inStock: boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 1. ITEM CREATION WITH IFACTORY
|
|
31
|
+
*
|
|
32
|
+
* IFactory provides type-safe item creation with validation and defaults.
|
|
33
|
+
*/
|
|
34
|
+
console.log('=== Item Creation Examples ===')
|
|
35
|
+
|
|
36
|
+
// Create a user item
|
|
37
|
+
const user = IFactory.create<User>('user', {
|
|
38
|
+
id: 'user-123',
|
|
39
|
+
name: 'John Doe',
|
|
40
|
+
email: 'john.doe@example.com',
|
|
41
|
+
createdAt: new Date().toISOString(),
|
|
42
|
+
status: 'active'
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
console.log('Created user:', user)
|
|
46
|
+
|
|
47
|
+
// Create a product item
|
|
48
|
+
const product = IFactory.create<Product>('product', {
|
|
49
|
+
id: 'prod-456',
|
|
50
|
+
name: 'Wireless Headphones',
|
|
51
|
+
price: 199.99,
|
|
52
|
+
category: 'Electronics',
|
|
53
|
+
inStock: true
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
console.log('Created product:', product)
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 2. KEY MANAGEMENT WITH KUTILS
|
|
60
|
+
*
|
|
61
|
+
* KUtils provides hierarchical key generation and manipulation utilities.
|
|
62
|
+
*/
|
|
63
|
+
console.log('\n=== Key Management Examples ===')
|
|
64
|
+
|
|
65
|
+
// Generate hierarchical keys
|
|
66
|
+
const userKey = KUtils.generateKey(['users', user.id])
|
|
67
|
+
const userProfileKey = KUtils.generateKey(['users', user.id, 'profile'])
|
|
68
|
+
const userOrdersKey = KUtils.generateKey(['users', user.id, 'orders'])
|
|
69
|
+
|
|
70
|
+
console.log('User key:', userKey)
|
|
71
|
+
console.log('User profile key:', userProfileKey)
|
|
72
|
+
console.log('User orders key:', userOrdersKey)
|
|
73
|
+
|
|
74
|
+
// Parse keys back to components
|
|
75
|
+
const userKeyComponents = KUtils.parseKey(userKey)
|
|
76
|
+
const profileKeyComponents = KUtils.parseKey(userProfileKey)
|
|
77
|
+
|
|
78
|
+
console.log('User key components:', userKeyComponents)
|
|
79
|
+
console.log('Profile key components:', profileKeyComponents)
|
|
80
|
+
|
|
81
|
+
// Validate keys
|
|
82
|
+
const isValidUserKey = KUtils.isValidKey(userKey)
|
|
83
|
+
const isValidInvalidKey = KUtils.isValidKey('invalid::key::format')
|
|
84
|
+
|
|
85
|
+
console.log('User key is valid:', isValidUserKey)
|
|
86
|
+
console.log('Invalid key is valid:', isValidInvalidKey)
|
|
87
|
+
|
|
88
|
+
// Get parent keys
|
|
89
|
+
const parentOfProfile = KUtils.getParentKey(userProfileKey)
|
|
90
|
+
console.log('Parent of profile key:', parentOfProfile)
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 3. SERVICE LAYER WITH AITEMSERVICE
|
|
94
|
+
*
|
|
95
|
+
* AItemService provides an abstract base for building domain services.
|
|
96
|
+
*/
|
|
97
|
+
console.log('\n=== Service Layer Examples ===')
|
|
98
|
+
|
|
99
|
+
class UserService extends AItemService {
|
|
100
|
+
private users = new Map<string, User>()
|
|
101
|
+
|
|
102
|
+
async create(userData: Partial<User>): Promise<User> {
|
|
103
|
+
console.log('Creating user with data:', userData)
|
|
104
|
+
|
|
105
|
+
// Create user with IFactory
|
|
106
|
+
const user = IFactory.create<User>('user', {
|
|
107
|
+
id: this.generateId(),
|
|
108
|
+
createdAt: new Date().toISOString(),
|
|
109
|
+
status: 'active',
|
|
110
|
+
...userData
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
// Validate the user
|
|
114
|
+
await this.validate(user)
|
|
115
|
+
|
|
116
|
+
// Save the user
|
|
117
|
+
await this.save(user)
|
|
118
|
+
|
|
119
|
+
console.log('User created successfully:', user.id)
|
|
120
|
+
return user
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
async findById(id: string): Promise<User | null> {
|
|
124
|
+
const key = KUtils.generateKey(['users', id])
|
|
125
|
+
const user = this.users.get(key)
|
|
126
|
+
console.log(`Finding user by ID ${id}:`, user ? 'found' : 'not found')
|
|
127
|
+
return user || null
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async updateStatus(id: string, status: User['status']): Promise<User | null> {
|
|
131
|
+
const user = await this.findById(id)
|
|
132
|
+
if (!user) {
|
|
133
|
+
console.log(`User ${id} not found for status update`)
|
|
134
|
+
return null
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const updatedUser = { ...user, status }
|
|
138
|
+
await this.save(updatedUser)
|
|
139
|
+
|
|
140
|
+
console.log(`User ${id} status updated to ${status}`)
|
|
141
|
+
return updatedUser
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
async listActiveUsers(): Promise<User[]> {
|
|
145
|
+
const activeUsers = Array.from(this.users.values())
|
|
146
|
+
.filter(user => user.status === 'active')
|
|
147
|
+
|
|
148
|
+
console.log(`Found ${activeUsers.length} active users`)
|
|
149
|
+
return activeUsers
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
protected async validate(user: User): Promise<void> {
|
|
153
|
+
if (!user.email || !user.email.includes('@')) {
|
|
154
|
+
throw new Error('Valid email is required')
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (!user.name || user.name.length < 2) {
|
|
158
|
+
throw new Error('Name must be at least 2 characters')
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
console.log('User validation passed for:', user.email)
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
protected async save(user: User): Promise<User> {
|
|
165
|
+
const key = KUtils.generateKey(['users', user.id])
|
|
166
|
+
this.users.set(key, user)
|
|
167
|
+
console.log('User saved with key:', key)
|
|
168
|
+
return user
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
private generateId(): string {
|
|
172
|
+
return `user-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Demonstrate service usage
|
|
177
|
+
async function demonstrateService() {
|
|
178
|
+
const userService = new UserService()
|
|
179
|
+
|
|
180
|
+
try {
|
|
181
|
+
// Create users
|
|
182
|
+
const user1 = await userService.create({
|
|
183
|
+
name: 'Alice Smith',
|
|
184
|
+
email: 'alice.smith@example.com'
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
const user2 = await userService.create({
|
|
188
|
+
name: 'Bob Johnson',
|
|
189
|
+
email: 'bob.johnson@example.com'
|
|
190
|
+
})
|
|
191
|
+
|
|
192
|
+
// Find users
|
|
193
|
+
const foundUser = await userService.findById(user1.id)
|
|
194
|
+
console.log('Found user:', foundUser?.name)
|
|
195
|
+
|
|
196
|
+
// Update user status
|
|
197
|
+
await userService.updateStatus(user2.id, 'inactive')
|
|
198
|
+
|
|
199
|
+
// List active users
|
|
200
|
+
const activeUsers = await userService.listActiveUsers()
|
|
201
|
+
console.log('Active users:', activeUsers.map(u => u.name))
|
|
202
|
+
|
|
203
|
+
} catch (error) {
|
|
204
|
+
console.error('Service error:', error.message)
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* 4. PRACTICAL INTEGRATION EXAMPLE
|
|
210
|
+
*
|
|
211
|
+
* Combining all concepts in a realistic scenario.
|
|
212
|
+
*/
|
|
213
|
+
console.log('\n=== Integration Example ===')
|
|
214
|
+
|
|
215
|
+
class OrderService extends AItemService {
|
|
216
|
+
private orders = new Map<string, any>()
|
|
217
|
+
|
|
218
|
+
constructor(private userService: UserService) {
|
|
219
|
+
super()
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
async createOrder(userId: string, items: any[]): Promise<any> {
|
|
223
|
+
// Verify user exists
|
|
224
|
+
const user = await this.userService.findById(userId)
|
|
225
|
+
if (!user) {
|
|
226
|
+
throw new Error(`User ${userId} not found`)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Create order
|
|
230
|
+
const order = IFactory.create('order', {
|
|
231
|
+
id: this.generateOrderId(),
|
|
232
|
+
userId,
|
|
233
|
+
items,
|
|
234
|
+
total: this.calculateTotal(items),
|
|
235
|
+
status: 'pending',
|
|
236
|
+
createdAt: new Date().toISOString()
|
|
237
|
+
})
|
|
238
|
+
|
|
239
|
+
// Save order
|
|
240
|
+
const orderKey = KUtils.generateKey(['orders', order.id])
|
|
241
|
+
this.orders.set(orderKey, order)
|
|
242
|
+
|
|
243
|
+
console.log(`Order ${order.id} created for user ${user.name}`)
|
|
244
|
+
return order
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
private generateOrderId(): string {
|
|
248
|
+
return `order-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
private calculateTotal(items: any[]): number {
|
|
252
|
+
return items.reduce((total, item) => total + (item.price * item.quantity), 0)
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
async function demonstrateIntegration() {
|
|
257
|
+
const userService = new UserService()
|
|
258
|
+
const orderService = new OrderService(userService)
|
|
259
|
+
|
|
260
|
+
try {
|
|
261
|
+
// Create a user
|
|
262
|
+
const user = await userService.create({
|
|
263
|
+
name: 'Customer One',
|
|
264
|
+
email: 'customer@example.com'
|
|
265
|
+
})
|
|
266
|
+
|
|
267
|
+
// Create an order for the user
|
|
268
|
+
const order = await orderService.createOrder(user.id, [
|
|
269
|
+
{ name: 'Product A', price: 29.99, quantity: 2 },
|
|
270
|
+
{ name: 'Product B', price: 15.50, quantity: 1 }
|
|
271
|
+
])
|
|
272
|
+
|
|
273
|
+
console.log('Integration completed successfully')
|
|
274
|
+
console.log('Order total:', order.total)
|
|
275
|
+
|
|
276
|
+
} catch (error) {
|
|
277
|
+
console.error('Integration error:', error.message)
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Run all demonstrations
|
|
282
|
+
async function runExamples() {
|
|
283
|
+
await demonstrateService()
|
|
284
|
+
await demonstrateIntegration()
|
|
285
|
+
console.log('\n=== All examples completed ===')
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Execute if running directly
|
|
289
|
+
if (require.main === module) {
|
|
290
|
+
runExamples().catch(console.error)
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export { UserService, OrderService }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjell/core",
|
|
3
3
|
"description": "Core Item and Key Framework for Fjell",
|
|
4
|
-
"version": "4.4.
|
|
4
|
+
"version": "4.4.12",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"core",
|
|
7
7
|
"fjell"
|
|
@@ -18,24 +18,25 @@
|
|
|
18
18
|
},
|
|
19
19
|
"type": "module",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@fjell/logging": "^4.4.
|
|
21
|
+
"@fjell/logging": "^4.4.13",
|
|
22
22
|
"deepmerge": "^4.3.1",
|
|
23
23
|
"luxon": "^3.7.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@eslint/eslintrc": "^3.3.1",
|
|
27
27
|
"@eslint/js": "^9.31.0",
|
|
28
|
-
"@
|
|
28
|
+
"@fjell/eslint-config": "^1.0.5",
|
|
29
|
+
"@swc/core": "^1.13.1",
|
|
29
30
|
"@tsconfig/recommended": "^1.0.10",
|
|
30
31
|
"@types/luxon": "^3.6.2",
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
32
|
-
"@typescript-eslint/parser": "^8.
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
33
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
33
34
|
"@vitest/coverage-v8": "3.2.4",
|
|
34
35
|
"concurrently": "^9.2.0",
|
|
35
36
|
"eslint": "^9.31.0",
|
|
36
37
|
"rimraf": "^6.0.1",
|
|
37
38
|
"typescript": "^5.8.3",
|
|
38
|
-
"vite": "^7.0.
|
|
39
|
+
"vite": "^7.0.5",
|
|
39
40
|
"vite-plugin-dts": "^4.5.4",
|
|
40
41
|
"vite-plugin-node": "^7.0.0",
|
|
41
42
|
"vitest": "3.2.4"
|
package/src/item/IUtils.ts
CHANGED