@codifycli/plugin-core 1.1.0-beta1 → 1.1.0-beta3

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.
@@ -11,10 +11,7 @@ export declare class Plugin {
11
11
  constructor(name: string, resourceControllers: Map<string, ResourceController<ResourceConfig>>);
12
12
  static create(name: string, resources: Resource<any>[]): Plugin;
13
13
  initialize(data: InitializeRequestData): Promise<InitializeResponseData>;
14
- getResourceInfo(data: GetResourceInfoRequestData): {
15
- defaultConfig: unknown;
16
- exampleConfigs: unknown;
17
- } & GetResourceInfoResponseData;
14
+ getResourceInfo(data: GetResourceInfoRequestData): GetResourceInfoResponseData;
18
15
  match(data: MatchRequestData): Promise<MatchResponseData>;
19
16
  import(data: ImportRequestData): Promise<ImportResponseData>;
20
17
  validate(data: ValidateRequestData): Promise<ValidateResponseData>;
@@ -4,9 +4,10 @@ import { ZodObject } from 'zod';
4
4
  import { ArrayStatefulParameter, StatefulParameter } from '../stateful-parameter/stateful-parameter.js';
5
5
  import { ParsedResourceSettings } from './parsed-resource-settings.js';
6
6
  import { RefreshContext } from './resource.js';
7
- export interface ExampleConfig {
7
+ export interface ExampleConfig extends Record<string, unknown> {
8
+ title: string;
8
9
  configs: Array<Record<string, unknown>>;
9
- description: string;
10
+ description?: string;
10
11
  }
11
12
  export interface ExampleConfigs {
12
13
  example1: ExampleConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codifycli/plugin-core",
3
- "version": "1.1.0-beta1",
3
+ "version": "1.1.0-beta3",
4
4
  "description": "TypeScript library for building Codify plugins to manage system resources (applications, CLI tools, settings) through infrastructure-as-code",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "license": "ISC",
37
37
  "dependencies": {
38
- "@codifycli/schemas": "1.0.0",
38
+ "@codifycli/schemas": "1.1.0-beta2",
39
39
  "@homebridge/node-pty-prebuilt-multiarch": "^0.13.1",
40
40
  "ajv": "^8.18.0",
41
41
  "ajv-formats": "^2.1.1",
@@ -83,7 +83,7 @@ export class Plugin {
83
83
  }
84
84
  }
85
85
 
86
- getResourceInfo(data: GetResourceInfoRequestData): { defaultConfig: unknown; exampleConfigs: unknown } & GetResourceInfoResponseData {
86
+ getResourceInfo(data: GetResourceInfoRequestData): GetResourceInfoResponseData {
87
87
  if (!this.resourceControllers.has(data.type)) {
88
88
  throw new Error(`Cannot get info for resource ${data.type}, resource doesn't exist`);
89
89
  }
@@ -5,7 +5,8 @@ import { z, ZodObject } from 'zod';
5
5
  import { StatefulParameterController } from '../stateful-parameter/stateful-parameter-controller.js';
6
6
  import {
7
7
  ArrayParameterSetting,
8
- DefaultParameterSetting, ExampleConfigs,
8
+ DefaultParameterSetting,
9
+ ExampleConfigs,
9
10
  InputTransformation,
10
11
  ParameterSetting,
11
12
  resolveElementEqualsFn,
@@ -15,9 +15,10 @@ import {
15
15
  import { ParsedResourceSettings } from './parsed-resource-settings.js';
16
16
  import { RefreshContext } from './resource.js';
17
17
 
18
- export interface ExampleConfig {
18
+ export interface ExampleConfig extends Record<string, unknown> {
19
+ title: string;
19
20
  configs: Array<Record<string, unknown>>;
20
- description: string;
21
+ description?: string;
21
22
  }
22
23
 
23
24
  export interface ExampleConfigs {