Skip to content

Commit

Permalink
Add categories
Browse files Browse the repository at this point in the history
  • Loading branch information
Sytten committed Oct 2, 2024
1 parent 922f25d commit 7b4c276
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"devDependencies": {
"typescript": "5.6.2",
"typedoc": "0.26.7",
"typedoc-plugin-markdown": "4.2.8",
"typedoc-plugin-markdown": "4.2.9",
"typedoc-plugin-missing-exports": "3.0.0"
}
}
6 changes: 3 additions & 3 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.41.1-beta.0",
"version": "0.41.1-beta.1",
"description": "Typing for the Caido Backend SDK",
"author": "Caido Labs Inc. <[email protected]>",
"license": "MIT",
Expand All @@ -12,7 +12,7 @@
"documentation": "typedoc"
},
"dependencies": {
"@caido/quickjs-types": "0.8.1",
"@caido/sdk-shared": "0.1.0"
"@caido/quickjs-types": "0.8.2",
"@caido/sdk-shared": "0.1.1"
}
}
11 changes: 10 additions & 1 deletion packages/sdk-backend/src/typing.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ declare module "caido:plugin" {
RequestsSDK,
Request,
Response,
ReplaySDK,
} from "caido:utils";

/**
* The SDK for the API RPC service.
* @category APISDK
*/
export type APISDK<API = {}, Events = {}> = {
/**
Expand All @@ -36,6 +38,7 @@ declare module "caido:plugin" {

/**
* The SDK for the API RPC service.
* @category EventsSDK
*/
export type EventsSDK<API = {}, Events = {}> = {
/**
Expand Down Expand Up @@ -73,6 +76,7 @@ declare module "caido:plugin" {

/**
* The SDK for metadata information about the plugin.
* @category MetaSDK
*/
export type MetaSDK = {
/**
Expand All @@ -89,6 +93,7 @@ declare module "caido:plugin" {

/**
* The SDK object available to all scripts.
* @category SDK
*/
export interface SDK<API = {}, Events = {}> {
/**
Expand All @@ -102,9 +107,13 @@ declare module "caido:plugin" {
*/
findings: FindingsSDK;
/**
* The SDK for the Requests services
* The SDK for the Requests service.
*/
requests: RequestsSDK;
/**
* The SDK for the Replay service.
*/
replay: ReplaySDK;
/**
* The SDK for the API RPC service.
*/
Expand Down
14 changes: 13 additions & 1 deletion packages/sdk-backend/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{
"extends": ["../../typedoc.base.json"],
"entryPoints": ["src/typing.d.ts"]
"entryPoints": ["src/typing.d.ts"],
"externalPattern": ["**/node_modules/typescript/**"],
"categoryOrder": [
"SDK",
"MetaSDK",
"APISDK",
"EventsSDK",
"RequestsSDK",
"FindingsSDK",
"ReplaySDK",
"Shared",
"*"
]
}
2 changes: 1 addition & 1 deletion packages/sdk-frontend/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["../../typedoc.base.json"],
"entryPoints": ["src/index.d.ts"],
"excludeExternals": true
"exclude": ["src/types/__generated__/graphql-sdk.d.ts"]
}
4 changes: 2 additions & 2 deletions packages/sdk-workflow/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@caido/sdk-workflow",
"version": "0.41.1-beta.0",
"version": "0.41.1-beta.1",
"description": "Typing for the Caido Workflow SDK",
"author": "Caido Labs Inc. <[email protected]>",
"license": "MIT",
Expand All @@ -12,6 +12,6 @@
"documentation": "typedoc"
},
"dependencies": {
"@caido/quickjs-types": "0.8.1"
"@caido/quickjs-types": "0.8.2"
}
}
26 changes: 25 additions & 1 deletion packages/sdk-workflow/src/typing.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,47 @@ declare module "caido:workflow" {
RequestsSDK,
Request,
Response,
ReplaySDK,
} from "caido:utils";

/**
* The input for the HTTP Javascript Nodes
* @category Data
*/
export type HttpInput = {
request: Request | undefined;
response: Response | undefined;
};
/**
* @deprecated Use HttpInput instead.
* @category Data
*/
export type PassiveInput = HttpInput;
/**
* The input for the Javascript Nodes.
* @category Data
*/
export type BytesInput = Array<number>;
/**
* @deprecated Use BytesInput instead.
* @category Data
*/
export type ConvertInput = BytesInput;

/**
* The output for the Javascript Nodes.
* @category Data
*/
export type Data = Bytes;
/**
* The output for the If/Else Javascript Nodes.
* @category Data
*/
export type Decision = boolean;

/**
* The SDK object available to all scripts.
* @category SDK
*/
export type SDK = {
/**
Expand All @@ -39,9 +59,13 @@ declare module "caido:workflow" {
*/
findings: FindingsSDK;
/**
* The SDK for the Requests services
* The SDK for the Requests service.
*/
requests: RequestsSDK;
/**
* The SDK for the Replay service.
*/
replay: ReplaySDK;
/**
* Converts bytes to a string.
*
Expand Down
12 changes: 11 additions & 1 deletion packages/sdk-workflow/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"extends": ["../../typedoc.base.json"],
"entryPoints": ["src/typing.d.ts"]
"entryPoints": ["src/typing.d.ts"],
"externalPattern": ["**/node_modules/typescript/**"],
"categoryOrder": [
"SDK",
"Data",
"RequestsSDK",
"FindingsSDK",
"ReplaySDK",
"Shared",
"*"
]
}
34 changes: 17 additions & 17 deletions pnpm-lock.yaml

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

4 changes: 3 additions & 1 deletion typedoc.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
"./scripts/documentation.mjs"
],
"cleanOutputDir": true,
"outputFileStrategy": "members",
"outputFileStrategy": "modules",
"entryFileName": "index",
"readme": "none",
"disableSources": true,
"excludeExternals": true,
"placeInternalsInOwningModule": true,
"hidePageHeader": true,
"expandParameters": true,
"parametersFormat": "table",
"indexFormat": "table"
}

0 comments on commit 7b4c276

Please sign in to comment.