Skip to content

Commit

Permalink
fix: remove SDK files and update dependencies
Browse files Browse the repository at this point in the history
Deleted `src/sdk` directory, adjusted dependencies, and updated relevant imports.
  • Loading branch information
gentlementlegen committed Nov 8, 2024
1 parent f09bf82 commit d47c5f2
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 449 deletions.
Binary file modified bun.lockb
Binary file not shown.
19 changes: 5 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
"module": "dist/index.mjs",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
}
},
"files": [
"dist"
],
Expand All @@ -37,8 +30,7 @@
"knip-ci": "knip --no-exit-code --reporter json --config .github/knip.ts",
"jest:test": "jest --coverage",
"plugin:hello-world": "tsx tests/__mocks__/hello-world-plugin.ts",
"setup-kv": "bun --env-file=.dev.vars deploy/setup-kv-namespace.ts",
"sdk:build": "tsup"
"setup-kv": "bun --env-file=.dev.vars deploy/setup-kv-namespace.ts"
},
"keywords": [
"typescript",
Expand All @@ -62,10 +54,10 @@
"@octokit/types": "^13.5.0",
"@octokit/webhooks": "13.3.0",
"@octokit/webhooks-types": "7.5.1",
"@sinclair/typebox": "^0.33.17",
"@ubiquity-os/ubiquity-os-logger": "^1.3.2",
"@sinclair/typebox": "^0.33.20",
"@ubiquity-os/plugin-sdk": "^1.0.9",
"@ubiquity-os/ubiquity-os-logger": "^1.3.2",
"dotenv": "16.4.5",
"hono": "4.4.13",
"typebox-validators": "0.3.5",
"yaml": "2.4.5"
},
Expand Down Expand Up @@ -102,9 +94,8 @@
"toml": "3.0.0",
"tomlify-j0.4": "3.0.0",
"ts-node": "^10.9.2",
"tsup": "8.1.0",
"tsx": "4.16.2",
"typescript": "5.6.2",
"typescript": "5.6.3",
"typescript-eslint": "7.16.0",
"wrangler": "3.79.0"
},
Expand Down
10 changes: 5 additions & 5 deletions src/github/utils/plugins.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GithubPlugin, isGithubPlugin, PluginConfiguration } from "../types/plugin-configuration";
import { EmitterWebhookEventName } from "@octokit/webhooks";
import { GitHubContext } from "../github-context";
import { Manifest, manifestSchema, manifestValidator } from "../../types/manifest";
import { Manifest, manifestSchema } from "@ubiquity-os/plugin-sdk/manifest";
import { Buffer } from "node:buffer";
import { Value } from "@sinclair/typebox/value";

Expand Down Expand Up @@ -58,13 +58,13 @@ async function fetchWorkerManifest(url: string): Promise<Manifest | null> {
}

function decodeManifest(manifest: unknown) {
const defaultManifest = Value.Default(manifestSchema, manifest);
const errors = manifestValidator.testReturningErrors(manifest as Readonly<unknown>);
if (errors !== null) {
const errors = [...Value.Errors(manifestSchema, manifest)];
if (errors.length) {
for (const error of errors) {
console.error(error);
console.dir(error, { depth: null });
}
throw new Error("Manifest is invalid.");
}
const defaultManifest = Value.Default(manifestSchema, manifest);
return defaultManifest as Manifest;
}
145 changes: 0 additions & 145 deletions src/sdk/actions.ts

This file was deleted.

48 changes: 0 additions & 48 deletions src/sdk/comment.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/sdk/constants.ts

This file was deleted.

14 changes: 0 additions & 14 deletions src/sdk/context.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/sdk/index.ts

This file was deleted.

28 changes: 0 additions & 28 deletions src/sdk/octokit.ts

This file was deleted.

Loading

0 comments on commit d47c5f2

Please sign in to comment.