Skip to content

Commit 44f3b4c

Browse files
committed
feat: Add logger and manifest schemas with comprehensive tests
- Introduced LoggerConfigSchema and LogEntrySchema for structured logging configuration and log entry validation. - Created ManifestSchema to define the structure of package configurations in the ObjectStack ecosystem, including support for various package types and optional properties. - Implemented extensive tests for ManifestSchema to ensure validation of required and optional fields, semantic versioning, and reverse domain notation. - Developed PluginContextSchema, PluginLifecycleSchema, and PluginSchema to define plugin lifecycle hooks and context capabilities. - Added ScopedStorageConfigSchema and FileMetadataSchema for managing scoped storage configurations and file metadata. - Comprehensive tests for plugin lifecycle scenarios including installation, enabling, disabling, upgrading, and uninstallation flows.
1 parent b7caa44 commit 44f3b4c

File tree

17 files changed

+13
-26
lines changed

17 files changed

+13
-26
lines changed

content/prompts/platform/plugin.prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Every plugin MUST have a valid manifest. It dictates how the kernel loads your c
3131
**Reference Schema:** `@objectstack/spec` -> `dist/kernel/manifest.zod.d.ts`
3232

3333
```typescript
34-
import { ObjectStackManifest } from '@objectstack/spec/kernel';
34+
import { ObjectStackManifest } from '@objectstack/spec/system';
3535

3636
const config: ObjectStackManifest = {
3737
name: 'my-plugin',

content/prompts/zod-compliance.prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Before generating an object, generic field, or app config, look up the authorita
1515

1616
| Concept | Definition Source (Portable) | Package Import |
1717
| :--- | :--- | :--- |
18-
| **Manifest** | `dist/kernel/manifest.zod.d.ts` | `@objectstack/spec/kernel` |
18+
| **Manifest** | `dist/system/manifest.zod.d.ts` | `@objectstack/spec/system` |
1919
| **Object** | `dist/data/object.zod.d.ts` | `@objectstack/spec/data` |
2020
| **Field** | `dist/data/field.zod.d.ts` | `@objectstack/spec/data` |
2121
| **View (UI)** | `dist/ui/view.zod.d.ts` | `@objectstack/spec/ui` |

examples/plugin-bi/objectstack.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ObjectStackManifest } from '@objectstack/spec/kernel';
1+
import { ObjectStackManifest } from '@objectstack/spec/system';
22

33
const BiPlugin: ObjectStackManifest = {
44
id: 'com.objectstack.bi',

examples/plugin-bi/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PluginDefinition, PluginContextData } from '@objectstack/spec/kernel';
1+
import { PluginDefinition, PluginContextData } from '@objectstack/spec/system';
22

33
export class BiEngine {
44
constructor() {

packages/driver-memory/objectstack.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ObjectStackManifest } from '@objectstack/spec/kernel';
1+
import { ObjectStackManifest } from '@objectstack/spec/system';
22

33
const MemoryDriverPlugin: ObjectStackManifest = {
44
id: 'com.objectstack.driver.memory',

packages/objectql/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { QueryAST, HookContext } from '@objectstack/spec/data';
2-
import { ObjectStackManifest } from '@objectstack/spec/kernel';
2+
import { ObjectStackManifest } from '@objectstack/spec/system';
33
import { DriverInterface, DriverOptions } from '@objectstack/spec/driver';
44
import { SchemaRegistry } from './registry';
55

packages/objectql/src/registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ServiceObject } from '@objectstack/spec/data';
2-
import { ObjectStackManifest } from '@objectstack/spec/kernel';
2+
import { ObjectStackManifest } from '@objectstack/spec/system';
33

44
/**
55
* Global Schema Registry

packages/spec/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export * as Permission from './permission';
4949
export * as UI from './ui';
5050
export * as System from './system';
5151
export * as Auth from './auth';
52-
export * as Kernel from './kernel';
5352
export * as Hub from './hub';
5453
export * as AI from './ai';
5554
export * as API from './api';

packages/spec/src/kernel/index.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)