diff --git a/.github/workflows/wrangler-deploy.yml b/.github/workflows/deployments.yml similarity index 55% rename from .github/workflows/wrangler-deploy.yml rename to .github/workflows/deployments.yml index 7b86486..535d360 100644 --- a/.github/workflows/wrangler-deploy.yml +++ b/.github/workflows/deployments.yml @@ -1,4 +1,4 @@ -name: Cloudflare Workers Deployments +name: Deploybot on: push: @@ -17,42 +17,15 @@ jobs: filters: | golinks-next: - 'apps/golinks-v2/**' + personal-api: + - 'apps/website-api/**' golinks-next: - name: Deploy golinks-next to staging - environment: - name: golinks-next/staging - url: https://staging.go-next.andreijiroh.xyz/api/docs - runs-on: ubuntu-latest - needs: [paths-filter] - if: needs.paths-filter.outputs.golinks-next == 'true' - steps: - - uses: actions/checkout@v4 - - uses: andreijiroh-dev/dotenvx-action@main - id: dotenvx - with: - key: ${{ secrets.DOTENV_PRIVATE_KEY_CI }} - path: .env.ci - - uses: actions/setup-node@v3 - with: - node-version: 20 - - name: Install dependencies and generate Prisma client code - run: | - yarn install - yarn workspace @andreijiroh-dev/golinks-rewrite prisma generate - - name: Deploy to Workers in staging - id: deploy - run: | - yarn workspace @andreijiroh-dev/golinks-rewrite deploy:stg - git rev-parse HEAD | yarn workspace @andreijiroh-dev/golinks-rewrite wrangler secret put GIT_DEPLOY_COMMIT --env staging - env: - CLOUDFLARE_API_TOKEN: ${{ steps.dotenvx.outputs.WRANGLER_DEPLOY_TOKEN }} - golinks-next-prod: name: Deploy golinks-next to production environment: name: golinks-next/production url: https://go.andreijiroh.xyz/api/docs runs-on: ubuntu-latest - needs: [paths-filter, golinks-next] + needs: [paths-filter] if: needs.paths-filter.outputs.golinks-next == 'true' steps: - uses: actions/checkout@v4 diff --git a/.vscode/settings.json b/.vscode/settings.json index d3463df..0df54b4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -31,11 +31,19 @@ ], "dotenv.enableAutocloaking": false, "sqltools.connections": [ + { + "previewLimit": 50, + "driver": "SQLite", + "name": "kv-localdev-go", + "group": "golinks-rewrite", + "database": "${workspaceFolder:api-servers}/apps/golinks-v2/.wrangler/state/v3/kv/miniflare-KVNamespaceObject/182e9426e068d8623233d7a037d22158fec3fd46f91fff1515b3aff052864eb2.sqlite" + }, { "previewLimit": 50, "driver": "SQLite", "database": "${workspaceFolder:api-servers}/apps/golinks-v2/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/0c387ee1750819f278da29686bfd9e894e71486eed5952c4c869b0b96c99e1d0.sqlite", - "name": "d1-localdev-go" + "name": "d1-localdev-go", + "group": "golinks-rewrite" } ], "sqltools.useNodeRuntime": true, diff --git a/deno.json b/deno.json index 5cb48bd..84d2b14 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,8 @@ { "name": "@andreijiroh-dev/api-servers", - "workspace": ["apps/**"], + "workspace": [ + "apps/website-api" + ], "compilerOptions": { "jsx": "precompile", "jsxImportSource": "hono/jsx" diff --git a/deno.lock b/deno.lock index 396b5f0..7e34b33 100644 --- a/deno.lock +++ b/deno.lock @@ -1,14 +1,9 @@ { "version": "4", "specifiers": { - "jsr:@hono/hono@*": "4.6.12", - "jsr:@hono/hono@^4.5.5": "4.6.12", - "jsr:@hono/hono@^4.6.12": "4.6.12", + "jsr:@hono/hono@^4.6.12": "4.6.17", "jsr:@soundify/web-api@*": "1.1.5", "jsr:@soundify/web-api@^1.1.5": "1.1.5", - "jsr:@std/bytes@^1.0.2": "1.0.4", - "jsr:@std/crypto@^1.0.3": "1.0.3", - "jsr:@std/uuid@*": "1.0.4", "npm:@cloudflare/workers-types@^4.20240605.0": "4.20241112.0", "npm:@cloudflare/workers-types@^4.20240806.0": "4.20241112.0", "npm:@cloudflare/workers-types@^4.20240925.0": "4.20241112.0", @@ -46,24 +41,11 @@ "npm:zod@^3.23.8": "3.23.8" }, "jsr": { - "@hono/hono@4.6.12": { - "integrity": "fa0b97fa7c3292f0d9957109ac07a475fe485868795b71b8e3114c284152cdb5" + "@hono/hono@4.6.17": { + "integrity": "932fcc61d043b14a8b2cb65242716eb32da44e91f2ee117fd7390508669fea31" }, "@soundify/web-api@1.1.5": { "integrity": "4916a2cdad9a6a25003524a9389230e157ff2c21c6954f3fa8b9f28436fd6835" - }, - "@std/bytes@1.0.4": { - "integrity": "11a0debe522707c95c7b7ef89b478c13fb1583a7cfb9a85674cd2cc2e3a28abc" - }, - "@std/crypto@1.0.3": { - "integrity": "a2a32f51ddef632d299e3879cd027c630dcd4d1d9a5285d6e6788072f4e51e7f" - }, - "@std/uuid@1.0.4": { - "integrity": "f4233149cc8b4753cc3763fd83a7c4101699491f55c7be78dc7b30281946d7a0", - "dependencies": [ - "jsr:@std/bytes", - "jsr:@std/crypto" - ] } }, "npm": { @@ -1636,12 +1618,6 @@ ] } }, - "apps/oblong-oauth-helper": { - "dependencies": [ - "jsr:@hono/hono@^4.5.5", - "jsr:@std/uuid@*" - ] - }, "apps/website-api": { "dependencies": [ "jsr:@hono/hono@^4.6.12", diff --git a/packages/slack-oauth-workers/README.md b/packages/slack-oauth-workers/README.md new file mode 100644 index 0000000..a8a4aca --- /dev/null +++ b/packages/slack-oauth-workers/README.md @@ -0,0 +1,4 @@ +# `@andreijiroh-dev/slack-oauth-workers` + +A remix of `@slack/oauth` npm package, but with patches to make it work on Cloudflare Workers +Coming soon. :) diff --git a/packages/slack-oauth-workers/index.ts b/packages/slack-oauth-workers/index.ts new file mode 100644 index 0000000..760458d --- /dev/null +++ b/packages/slack-oauth-workers/index.ts @@ -0,0 +1,3 @@ +export class InstallProvider { + +}