Skip to content

Enhance CI workflows and add security policy documentation - #4

Open
angelancajas98-droid wants to merge 11 commits into
gramiojs:mainfrom
angelancajas98-droid:main
Open

angelancajas98-droid wants to merge 11 commits into
gramiojs:mainfrom
angelancajas98-droid:main

Conversation

@angelancajas98-droid

Copy link
Copy Markdown

Now let's verify GramIO's core package explicitly supports Deno before committing to the import-map approach:

Confirmed: GramIO explicitly advertises "🌐 Multi-runtime - Works on Node.js, Bun and Deno." Good — I can proceed confidently with a Deno setup, using an import map so the source stays identical across runtimes.

Now update db/init.ts to drop the Node-only process.argv self-invocation check in favor of a cross-runtime one:

Now update package.json to drop the dotenv dependency (no longer needed) and use --env-file for Node:

No real errors (grep found nothing beyond expected missing-dependency noise). Now let's update the README with Deno instructions and repackage:

Now let's repackage the zip with all the changes:

Updated. What changed:

  • .env loading — dropped the dotenv package entirely. Both runtimes load it natively now via --env-file=.env (Node 20.6+, Deno 1.44+), wired into the npm/Deno task scripts.
  • deno.json — added with an import map (gramio, @gramio/auto-answer-callback-query, better-sqlite3 → their npm: equivalents) so the exact same src/ files run under deno task dev / deno task start with zero code forking. GramIO itself explicitly advertises Node/Deno/Bun support, so this should be solid.
  • src/env.ts — small helper that reads Deno.env.get or process.env depending on which runtime is present, used everywhere instead of raw process.env.
  • src/index.ts / src/db/init.ts — swapped Node-only bits (process.argv, process.on) for cross-runtime equivalents.

One caveat, flagged in the README: better-sqlite3 is a native addon, and while Deno's npm compatibility generally supports native modules, I can't 100% guarantee it for this specific package on every Deno version — if it gives you trouble, the README points to swapping in jsr:@db/sqlite (same schema, same SQL, different wrapper) as a quick fix.

To run: cp .env.example .env → fill in BOT_TOKEN/OWNER_ID → deno task dev.
telegram-bot-gramio-1.zip

angelancajas98-droid and others added 10 commits September 12, 2026 00:10
Added a security policy document outlining supported versions and vulnerability reporting.
This workflow automates the deployment of static content to GitHub Pages on push to the main branch or manually via the Actions tab.
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This workflow builds a Docker container, publishes it to Google Container Registry, and deploys it to GKE on push to the main branch. It includes steps for authentication, Docker login, building the image, and deploying using Kustomize.

@angelancajas98-droid angelancajas98-droid left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.opencontainers.image.source = "https://github.com/angelancajas98-droid/gramio-build"

@angelancajas98-droid
angelancajas98-droid marked this pull request as draft September 20, 2026 10:09
@angelancajas98-droid
angelancajas98-droid marked this pull request as ready for review September 20, 2026 10:09
@angelancajas98-droid
angelancajas98-droid marked this pull request as draft September 21, 2026 14:17
@angelancajas98-droid
angelancajas98-droid marked this pull request as ready for review September 21, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants