Skip to content

Commit

Permalink
Add meta sdk for plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Sytten committed Sep 3, 2024
1 parent f1980f8 commit f2905bc
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/sdk-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@caido/sdk-backend",
"version": "0.40.1-beta.5",
"version": "0.40.1-beta.6",
"description": "Typing for the Caido Backend SDK",
"author": "Caido Labs Inc. <[email protected]>",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
"src/*"
],
"dependencies": {
"@caido/quickjs-types": "0.4.0",
"@caido/quickjs-types": "0.5.0",
"@caido/sdk-shared": "0.1.0"
}
}
15 changes: 15 additions & 0 deletions packages/sdk-backend/src/typing.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ declare module "caido:plugin" {
): void;
};

/**
* The SDK for metadata information about the plugin.
*/
export type MetaSDK = {
/**
* The directory of the plugin in Caido Data.
* You can store data related to your plugin in this directory.
*/
path(): string;
};

/**
* The SDK object available to all scripts.
*/
Expand All @@ -96,5 +107,9 @@ declare module "caido:plugin" {
* The SDK for the Events service.
*/
events: EventsSDK<API, Events>;
/**
* The SDK for metadata information about the plugin.
*/
meta: MetaSDK;
}
}
41 changes: 39 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f2905bc

Please sign in to comment.