File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 },
2424 "dependencies" : {
2525 "@objectql/types" : " workspace:*" ,
26- "@objectstack/spec" : " ^0.1.2 " ,
26+ "@objectstack/spec" : " ^0.2.0 " ,
2727 "@objectstack/runtime" : " ^0.1.1" ,
2828 "@objectstack/objectql" : " ^0.1.1" ,
2929 "js-yaml" : " ^4.1.0" ,
Original file line number Diff line number Diff line change 2727 "test" : " jest --passWithNoTests"
2828 },
2929 "dependencies" : {
30- "@objectstack/spec" : " ^0.1.2 "
30+ "@objectstack/spec" : " ^0.2.0 "
3131 },
3232 "devDependencies" : {
3333 "ts-json-schema-generator" : " ^2.4.0"
Original file line number Diff line number Diff line change 88
99import { IObjectQL } from './app' ;
1010
11+ // Import plugin types from @objectstack /spec (the protocol standard)
12+ export type {
13+ PluginContextData ,
14+ PluginLifecycleHooks ,
15+ PluginDefinition ,
16+ } from '@objectstack/spec' ;
17+
18+ /**
19+ * @deprecated Legacy plugin interface. Use PluginDefinition from @objectstack/spec instead.
20+ *
21+ * This interface is maintained for backward compatibility with existing plugins.
22+ * New plugins should implement PluginDefinition with lifecycle hooks (onEnable, onDisable, etc.)
23+ * instead of the legacy setup() method.
24+ *
25+ * @example Migration from legacy to new:
26+ * // Old way (deprecated):
27+ * export class MyPlugin implements ObjectQLPlugin {
28+ * name = 'my-plugin';
29+ * setup(app: IObjectQL) { ... }
30+ * }
31+ *
32+ * // New way (recommended):
33+ * export default {
34+ * id: 'my-plugin',
35+ * onEnable: async (context) => { ... }
36+ * } satisfies PluginDefinition;
37+ */
1138export interface ObjectQLPlugin {
1239 name : string ;
1340 setup ( app : IObjectQL ) : void | Promise < void > ;
You can’t perform that action at this time.
0 commit comments