@famgia/omnify-core 0.0.1 → 0.0.3
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 +57 -0
- package/package.json +4 -3
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# @famgia/omnify-core
|
|
2
|
+
|
|
3
|
+
Core engine for the Omnify schema system. Load, validate, and process YAML/JSON schemas.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @famgia/omnify-core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import {
|
|
15
|
+
loadSchemas,
|
|
16
|
+
validateSchemas,
|
|
17
|
+
createOmnify,
|
|
18
|
+
Omnify
|
|
19
|
+
} from '@famgia/omnify-core';
|
|
20
|
+
|
|
21
|
+
// Load schemas from directory
|
|
22
|
+
const schemas = await loadSchemas('./schemas');
|
|
23
|
+
|
|
24
|
+
// Validate schemas
|
|
25
|
+
const result = validateSchemas(schemas);
|
|
26
|
+
if (!result.valid) {
|
|
27
|
+
console.error(result.errors);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Or use the Omnify class for full API
|
|
31
|
+
const omnify = createOmnify({
|
|
32
|
+
schemaDir: './schemas',
|
|
33
|
+
plugins: [myPlugin],
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
await omnify.initialize();
|
|
37
|
+
const schemas = omnify.getSchemas();
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- YAML/JSON schema loading
|
|
43
|
+
- Schema validation with detailed errors
|
|
44
|
+
- Plugin system for custom types
|
|
45
|
+
- Programmatic API for tooling integration
|
|
46
|
+
- Metadata introspection utilities
|
|
47
|
+
|
|
48
|
+
## Related Packages
|
|
49
|
+
|
|
50
|
+
- [@famgia/omnify-types](https://www.npmjs.com/package/@famgia/omnify-types) - Type definitions
|
|
51
|
+
- [@famgia/omnify-cli](https://www.npmjs.com/package/@famgia/omnify-cli) - CLI tool
|
|
52
|
+
- [@famgia/omnify-laravel](https://www.npmjs.com/package/@famgia/omnify-laravel) - Laravel generator
|
|
53
|
+
- [@famgia/omnify-atlas](https://www.npmjs.com/package/@famgia/omnify-atlas) - Atlas adapter
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@famgia/omnify-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Core engine for omnify-schema",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"dist"
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
18
19
|
],
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"js-yaml": "^4.1.1",
|
|
21
|
-
"@famgia/omnify-types": "0.0.
|
|
22
|
+
"@famgia/omnify-types": "0.0.3"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@types/js-yaml": "^4.0.9"
|