Ghostv13 dev patch 1 - #1
Merged
Merged
Conversation
This workflow runs Hadolint to analyze Dockerfiles and uploads results to GitHub.
…n permissions 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. Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.