From a62df93fe1cacd7b70edb3fb5db932489207e643 Mon Sep 17 00:00:00 2001 From: whilefoo Date: Mon, 25 Nov 2024 18:40:57 +0100 Subject: [PATCH] fix: plugin entry --- .github/workflows/compute.yml | 2 +- .github/workflows/deploy.yml | 1 + src/main.ts | 2 +- src/types/context.ts | 2 +- src/types/index.ts | 2 +- src/types/{plugin-inputs.ts => plugin-input.ts} | 0 src/worker.ts | 2 +- 7 files changed, 6 insertions(+), 5 deletions(-) rename src/types/{plugin-inputs.ts => plugin-input.ts} (100%) diff --git a/.github/workflows/compute.yml b/.github/workflows/compute.yml index 9e66f12..d91ce00 100644 --- a/.github/workflows/compute.yml +++ b/.github/workflows/compute.yml @@ -35,7 +35,7 @@ jobs: node-version: "20.10.0" - name: Execute plugin - run: node dist/index.js + run: node dist/main.js env: PLUGIN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SUPABASE_URL: ${{ secrets.SUPABASE_URL }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index da66e64..55d19f5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,6 +15,7 @@ jobs: with: treatAsEsm: true sourcemap: false + pluginEntry: "src/main.ts" env: APP_ID: ${{ secrets.APP_ID }} APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} diff --git a/src/main.ts b/src/main.ts index 2476e1e..8d2726a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,7 @@ import { createActionsPlugin } from "@ubiquity-os/plugin-sdk"; import { LogLevel } from "@ubiquity-os/ubiquity-os-logger"; import { runPlugin } from "./plugin"; import { Env, envSchema } from "./types/env"; -import { PluginSettings, pluginSettingsSchema } from "./types/plugin-inputs"; +import { PluginSettings, pluginSettingsSchema } from "./types/plugin-input"; import { SupportedEvents } from "./types"; import { createAdapters } from "./adapters"; diff --git a/src/types/context.ts b/src/types/context.ts index 792bff4..02eef3d 100644 --- a/src/types/context.ts +++ b/src/types/context.ts @@ -1,6 +1,6 @@ import { createAdapters } from "../adapters"; import { Env } from "./env"; -import { PluginSettings } from "./plugin-inputs"; +import { PluginSettings } from "./plugin-input"; import { Context as PluginContext } from "@ubiquity-os/plugin-sdk"; /** diff --git a/src/types/index.ts b/src/types/index.ts index 6ca5c88..217e664 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,3 +1,3 @@ export * from "./context"; export * from "./env"; -export * from "./plugin-inputs"; +export * from "./plugin-input"; diff --git a/src/types/plugin-inputs.ts b/src/types/plugin-input.ts similarity index 100% rename from src/types/plugin-inputs.ts rename to src/types/plugin-input.ts diff --git a/src/worker.ts b/src/worker.ts index c5a2398..f848c6f 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -3,7 +3,7 @@ import type { ExecutionContext } from "hono"; import { createAdapters } from "./adapters"; import { SupportedEvents } from "./types/context"; import { Env, envSchema } from "./types/env"; -import { PluginSettings, pluginSettingsSchema } from "./types/plugin-inputs"; +import { PluginSettings, pluginSettingsSchema } from "./types/plugin-input"; import manifest from "../manifest.json"; import { runPlugin } from "./plugin"; import { Manifest } from "@ubiquity-os/plugin-sdk/manifest";