seedcord 0.21.1 → 0.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  </div>
7
7
 
8
8
  <div align="center">
9
- <h3>The whole Discord bot, wired and typed</h3>
9
+ <h3>The whole Discord bot, typed end to end</h3>
10
10
  <a href="https://seedcord.org">Website</a> ·
11
11
  <a href="https://guide.seedcord.org">Guide</a> ·
12
12
  <a href="https://docs.seedcord.org">Reference</a> ·
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as SEEDCORD_CONFIG_FILENAMES, t as version } from "./src-_1ojVhDK.mjs";
1
+ import { n as SEEDCORD_CONFIG_FILENAMES, t as version } from "./src-DiTXfD0A.mjs";
2
2
  import { createRequire, findPackageJSON } from "node:module";
3
3
  import { Command } from "@commander-js/extra-typings";
4
4
  import { LEVEL_COLOR, Logger, LoggerChannelRegistry } from "@seedcord/logger";
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { n as SEEDCORD_CONFIG_FILENAMES, r as defineConfig, t as version } from "./src-_1ojVhDK.mjs";
1
+ import { n as SEEDCORD_CONFIG_FILENAMES, r as defineConfig, t as version } from "./src-DiTXfD0A.mjs";
2
2
 
3
3
  export { SEEDCORD_CONFIG_FILENAMES, defineConfig, version };
@@ -12,8 +12,8 @@ function defineConfig(config) {
12
12
 
13
13
  //#endregion
14
14
  //#region src/core/version.ts
15
- const version = "0.21.1";
15
+ const version = "0.21.2";
16
16
 
17
17
  //#endregion
18
18
  export { SEEDCORD_CONFIG_FILENAMES as n, defineConfig as r, version as t };
19
- //# sourceMappingURL=src-_1ojVhDK.mjs.map
19
+ //# sourceMappingURL=src-DiTXfD0A.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"src-_1ojVhDK.mjs","names":[],"sources":["../src/core/config/schema.ts","../src/core/version.ts"],"sourcesContent":["/**\n * Build configuration used by the Seedcord CLI.\n */\nexport interface SeedcordBuildConfig {\n /**\n * Directory where build artifacts should be emitted.\n *\n * @defaultValue `./dist` relative to the config directory\n */\n outDir?: string;\n /**\n * Optional tsconfig path to use for builds.\n *\n * @defaultValue the nearest `tsconfig.build.json` or `tsconfig.json`\n */\n tsconfig?: string;\n /**\n * File name (or relative path) for the bootstrap file emitted inside the build output.\n */\n bootstrap?: string;\n}\n\n/**\n * Type-checking options for `seedcord dev`, passed as the object form of\n * {@link SeedcordHmrConfig.typecheck}.\n */\ninterface SeedcordTypecheckConfig {\n /**\n * Which tsconfig `tsc --watch` runs against.\n *\n * @defaultValue the nearest `tsconfig.json`\n */\n tsconfig?: string;\n}\n\n/**\n * HMR configuration used by the Seedcord CLI.\n */\nexport interface SeedcordHmrConfig {\n /**\n * Glob patterns for files that should trigger a full restart when changed.\n */\n restart?: string[];\n\n /**\n * Whether a failed hot-reload rolls back to the last-good version of the file.\n *\n * @defaultValue `true`\n */\n rollback?: boolean;\n\n /**\n * Runs `tsc --watch` alongside the bot and reports type errors on the `tsc` channel.\n *\n * @defaultValue `false`\n */\n typecheck?: boolean | SeedcordTypecheckConfig;\n}\n\n/**\n * Configuration used by the Seedcord CLI when running `seedcord dev` or `seedcord build`.\n */\nexport interface SeedcordDevConfig {\n /**\n * Root directory used for resolving relative paths.\n *\n * @defaultValue the config directory\n */\n root?: string;\n /**\n * Path to the module whose default export is a configured Seedcord instance.\n */\n instance: string;\n /**\n * Entry file that should be executed when starting the bot (and copied into the build output).\n */\n entry: string;\n /**\n * How `seedcord dev` exposes an http bot's interactions server. This has no effect on a gateway bot.\n *\n * `true` opens a cloudflared quick tunnel and writes the interactions endpoint on every run,\n * since the hostname changes each time. An https URL is one you already serve, through a named\n * cloudflared tunnel, a tailscale funnel, or any reverse proxy. The CLI checks that URL reaches\n * this process, writes the endpoint when the stored value differs, and leaves it in place.\n *\n * @defaultValue `true`\n */\n tunnel?: boolean | string;\n /**\n * Runs any always-on animations in `seedcord dev`.\n *\n * @defaultValue `true`\n */\n idleAnimation?: boolean;\n /**\n * Optional build configuration overrides.\n */\n build?: SeedcordBuildConfig;\n /**\n * Optional HMR configuration.\n */\n hmr?: SeedcordHmrConfig;\n}\n\nexport type ResolvedTunnel = { mode: 'off' } | { mode: 'quick' } | { mode: 'url'; url: string };\n\nexport type ResolvedTypecheck = { enabled: false } | { enabled: true; tsconfig?: string };\n\nexport interface ResolvedSeedcordBuildConfig {\n outDir: string;\n bootstrap: string;\n tsconfig?: string;\n}\n\n/**\n * Fully resolved configuration with absolute file system paths.\n */\nexport interface ResolvedSeedcordDevConfig extends Required<Omit<SeedcordDevConfig, 'build' | 'hmr' | 'tunnel'>> {\n tunnel: ResolvedTunnel;\n /**\n * Absolute path to the config file that produced this resolution.\n */\n configFile: string;\n /**\n * Resolved build options with absolute paths.\n */\n build: ResolvedSeedcordBuildConfig;\n /**\n * Whether `tsc --watch` runs, with the tsconfig it runs against resolved to an absolute path.\n */\n typecheck: ResolvedTypecheck;\n /**\n * HMR configuration carried through from the user config (restart globs are matched as-is).\n */\n hmr?: SeedcordHmrConfig | undefined;\n}\n\n/**\n * Supported configuration filenames discovered by the CLI.\n */\nexport const SEEDCORD_CONFIG_FILENAMES = ['seedcord.config.ts', 'seedcord.config.mts'] as const;\n\n/**\n * Helper so config files receive proper type inference.\n */\nexport function defineConfig(config: SeedcordDevConfig): SeedcordDevConfig {\n return config;\n}\n","export const version = process.env.PACKAGE_VERSION ?? '0.0.0';\n"],"mappings":";;;;AA4IA,MAAa,4BAA4B,CAAC,sBAAsB,qBAAqB;;;;AAKrF,SAAgB,aAAa,QAA8C;CACvE,OAAO;AACX;;;;ACnJA,MAAa"}
1
+ {"version":3,"file":"src-DiTXfD0A.mjs","names":[],"sources":["../src/core/config/schema.ts","../src/core/version.ts"],"sourcesContent":["/**\n * Build configuration used by the Seedcord CLI.\n */\nexport interface SeedcordBuildConfig {\n /**\n * Directory where build artifacts should be emitted.\n *\n * @defaultValue `./dist` relative to the config directory\n */\n outDir?: string;\n /**\n * Optional tsconfig path to use for builds.\n *\n * @defaultValue the nearest `tsconfig.build.json` or `tsconfig.json`\n */\n tsconfig?: string;\n /**\n * File name (or relative path) for the bootstrap file emitted inside the build output.\n */\n bootstrap?: string;\n}\n\n/**\n * Type-checking options for `seedcord dev`, passed as the object form of\n * {@link SeedcordHmrConfig.typecheck}.\n */\ninterface SeedcordTypecheckConfig {\n /**\n * Which tsconfig `tsc --watch` runs against.\n *\n * @defaultValue the nearest `tsconfig.json`\n */\n tsconfig?: string;\n}\n\n/**\n * HMR configuration used by the Seedcord CLI.\n */\nexport interface SeedcordHmrConfig {\n /**\n * Glob patterns for files that should trigger a full restart when changed.\n */\n restart?: string[];\n\n /**\n * Whether a failed hot-reload rolls back to the last-good version of the file.\n *\n * @defaultValue `true`\n */\n rollback?: boolean;\n\n /**\n * Runs `tsc --watch` alongside the bot and reports type errors on the `tsc` channel.\n *\n * @defaultValue `false`\n */\n typecheck?: boolean | SeedcordTypecheckConfig;\n}\n\n/**\n * Configuration used by the Seedcord CLI when running `seedcord dev` or `seedcord build`.\n */\nexport interface SeedcordDevConfig {\n /**\n * Root directory used for resolving relative paths.\n *\n * @defaultValue the config directory\n */\n root?: string;\n /**\n * Path to the module whose default export is a configured Seedcord instance.\n */\n instance: string;\n /**\n * Entry file that should be executed when starting the bot (and copied into the build output).\n */\n entry: string;\n /**\n * How `seedcord dev` exposes an http bot's interactions server. This has no effect on a gateway bot.\n *\n * `true` opens a cloudflared quick tunnel and writes the interactions endpoint on every run,\n * since the hostname changes each time. An https URL is one you already serve, through a named\n * cloudflared tunnel, a tailscale funnel, or any reverse proxy. The CLI checks that URL reaches\n * this process, writes the endpoint when the stored value differs, and leaves it in place.\n *\n * @defaultValue `true`\n */\n tunnel?: boolean | string;\n /**\n * Runs any always-on animations in `seedcord dev`.\n *\n * @defaultValue `true`\n */\n idleAnimation?: boolean;\n /**\n * Optional build configuration overrides.\n */\n build?: SeedcordBuildConfig;\n /**\n * Optional HMR configuration.\n */\n hmr?: SeedcordHmrConfig;\n}\n\nexport type ResolvedTunnel = { mode: 'off' } | { mode: 'quick' } | { mode: 'url'; url: string };\n\nexport type ResolvedTypecheck = { enabled: false } | { enabled: true; tsconfig?: string };\n\nexport interface ResolvedSeedcordBuildConfig {\n outDir: string;\n bootstrap: string;\n tsconfig?: string;\n}\n\n/**\n * Fully resolved configuration with absolute file system paths.\n */\nexport interface ResolvedSeedcordDevConfig extends Required<Omit<SeedcordDevConfig, 'build' | 'hmr' | 'tunnel'>> {\n tunnel: ResolvedTunnel;\n /**\n * Absolute path to the config file that produced this resolution.\n */\n configFile: string;\n /**\n * Resolved build options with absolute paths.\n */\n build: ResolvedSeedcordBuildConfig;\n /**\n * Whether `tsc --watch` runs, with the tsconfig it runs against resolved to an absolute path.\n */\n typecheck: ResolvedTypecheck;\n /**\n * HMR configuration carried through from the user config (restart globs are matched as-is).\n */\n hmr?: SeedcordHmrConfig | undefined;\n}\n\n/**\n * Supported configuration filenames discovered by the CLI.\n */\nexport const SEEDCORD_CONFIG_FILENAMES = ['seedcord.config.ts', 'seedcord.config.mts'] as const;\n\n/**\n * Helper so config files receive proper type inference.\n */\nexport function defineConfig(config: SeedcordDevConfig): SeedcordDevConfig {\n return config;\n}\n","export const version = process.env.PACKAGE_VERSION ?? '0.0.0';\n"],"mappings":";;;;AA4IA,MAAa,4BAA4B,CAAC,sBAAsB,qBAAqB;;;;AAKrF,SAAgB,aAAa,QAA8C;CACvE,OAAO;AACX;;;;ACnJA,MAAa"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "seedcord",
3
3
  "type": "module",
4
- "version": "0.21.1",
4
+ "version": "0.21.2",
5
5
  "engines": {
6
6
  "node": ">=24.11"
7
7
  },
@@ -51,12 +51,12 @@
51
51
  "@clack/prompts": "^1.7.0",
52
52
  "@commander-js/extra-typings": "^15.0.0",
53
53
  "@discordjs/rest": "^2.6.3",
54
- "@seedcord/core": "^0.9.1",
55
- "@seedcord/errors": "^0.11.0",
56
- "@seedcord/event-emitter": "^0.1.5",
57
- "@seedcord/logger": "^0.4.1",
58
- "@seedcord/types": "^0.14.0",
59
- "@seedcord/utils": "^0.8.14",
54
+ "@seedcord/core": "^0.9.2",
55
+ "@seedcord/errors": "^0.11.1",
56
+ "@seedcord/event-emitter": "^0.1.6",
57
+ "@seedcord/logger": "^0.4.2",
58
+ "@seedcord/types": "^0.14.1",
59
+ "@seedcord/utils": "^0.8.15",
60
60
  "commander": "^15.0.0",
61
61
  "discord-api-types": "^0.38.52",
62
62
  "ink": "^7.1.1",
@@ -72,8 +72,8 @@
72
72
  },
73
73
  "devDependencies": {
74
74
  "@eslint-react/eslint-plugin": "^5.18.1",
75
- "@seedcord/eslint-config": "^2.2.1",
76
- "@seedcord/tsconfig": "^2.0.3",
75
+ "@seedcord/eslint-config": "^2.2.2",
76
+ "@seedcord/tsconfig": "^2.0.4",
77
77
  "@seedcord/tsdown-config": "^2.0.1",
78
78
  "@seedcord/vitest-config": "^0.0.1",
79
79
  "@types/react": "^19.2.18",
@@ -102,5 +102,5 @@
102
102
  "test:watch": "vitest dev",
103
103
  "coverage": "vitest run --coverage"
104
104
  },
105
- "readme": "<div align=\"center\">\n <picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://cdn.seedcord.org/assets/wordmark-dark.webp\" />\n <img src=\"https://cdn.seedcord.org/assets/wordmark-light.webp\" alt=\"seedcord\" width=\"440\" />\n </picture>\n</div>\n\n<div align=\"center\">\n <h3>The whole Discord bot, wired and typed</h3>\n <a href=\"https://seedcord.org\">Website</a> ·\n <a href=\"https://guide.seedcord.org\">Guide</a> ·\n <a href=\"https://docs.seedcord.org\">Reference</a> ·\n <a href=\"https://discord.gg/DzFxY58WXf\">Discord</a>\n</div>\n\n<br />\n\n<div align=\"center\">\n\n[![npm](https://img.shields.io/npm/v/seedcord?style=flat-square&logo=npm&logoColor=c8341f&label=&labelColor=1f1f1f&color=c8341f)](https://www.npmjs.com/package/seedcord) [![node](https://img.shields.io/node/v/seedcord?style=flat-square&label=node&labelColor=1f1f1f&color=4d7d33)](https://nodejs.org) [![license](https://img.shields.io/npm/l/seedcord?style=flat-square&label=license&labelColor=1f1f1f&color=f8f6e8)](LICENSE)\n\n</div>\n\n## About\n\n`seedcord` is the CLI a bot project runs during development and at build time. It reads `seedcord.config.ts` and gives you a dev server with hot reload, a production build, the codegen that types your commands, and a cleanup tool for stale guild commands.\n\nUntil v1.0.0, minor versions can break.\n\n## Installation\n\n`pnpm create seedcord` adds it to a new project. To add it to an existing one:\n\n```sh\npnpm add -D seedcord\n```\n\n## Commands\n\n<!-- prettier-ignore-start -->\n\n| command | what it does |\n| --- | --- |\n| `seedcord dev` | runs the bot from the config file, reloading changed modules in place |\n| `seedcord build` | compiles the project from the config file |\n| `seedcord codegen` | writes the typed augmentations for your commands and config |\n| `seedcord commands` | inspects and cleans commands already deployed to Discord |\n\n<!-- prettier-ignore-end -->\n\n`codegen --check` verifies the committed augmentations match your source. Run it in CI.\n\n`commands --clean` reports guild commands that duplicate a global one. It runs as a dry run until you pass `--apply`.\n\nOn the http transport, `dev` also opens a cloudflared tunnel and points Discord's interactions URL at it.\n\n## Config\n\n`defineConfig` types `seedcord.config.ts`:\n\n```ts\nimport { defineConfig } from 'seedcord';\n\nexport default defineConfig({\n // ...\n});\n```\n"
105
+ "readme": "<div align=\"center\">\n <picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://cdn.seedcord.org/assets/wordmark-dark.webp\" />\n <img src=\"https://cdn.seedcord.org/assets/wordmark-light.webp\" alt=\"seedcord\" width=\"440\" />\n </picture>\n</div>\n\n<div align=\"center\">\n <h3>The whole Discord bot, typed end to end</h3>\n <a href=\"https://seedcord.org\">Website</a> ·\n <a href=\"https://guide.seedcord.org\">Guide</a> ·\n <a href=\"https://docs.seedcord.org\">Reference</a> ·\n <a href=\"https://discord.gg/DzFxY58WXf\">Discord</a>\n</div>\n\n<br />\n\n<div align=\"center\">\n\n[![npm](https://img.shields.io/npm/v/seedcord?style=flat-square&logo=npm&logoColor=c8341f&label=&labelColor=1f1f1f&color=c8341f)](https://www.npmjs.com/package/seedcord) [![node](https://img.shields.io/node/v/seedcord?style=flat-square&label=node&labelColor=1f1f1f&color=4d7d33)](https://nodejs.org) [![license](https://img.shields.io/npm/l/seedcord?style=flat-square&label=license&labelColor=1f1f1f&color=f8f6e8)](LICENSE)\n\n</div>\n\n## About\n\n`seedcord` is the CLI a bot project runs during development and at build time. It reads `seedcord.config.ts` and gives you a dev server with hot reload, a production build, the codegen that types your commands, and a cleanup tool for stale guild commands.\n\nUntil v1.0.0, minor versions can break.\n\n## Installation\n\n`pnpm create seedcord` adds it to a new project. To add it to an existing one:\n\n```sh\npnpm add -D seedcord\n```\n\n## Commands\n\n<!-- prettier-ignore-start -->\n\n| command | what it does |\n| --- | --- |\n| `seedcord dev` | runs the bot from the config file, reloading changed modules in place |\n| `seedcord build` | compiles the project from the config file |\n| `seedcord codegen` | writes the typed augmentations for your commands and config |\n| `seedcord commands` | inspects and cleans commands already deployed to Discord |\n\n<!-- prettier-ignore-end -->\n\n`codegen --check` verifies the committed augmentations match your source. Run it in CI.\n\n`commands --clean` reports guild commands that duplicate a global one. It runs as a dry run until you pass `--apply`.\n\nOn the http transport, `dev` also opens a cloudflared tunnel and points Discord's interactions URL at it.\n\n## Config\n\n`defineConfig` types `seedcord.config.ts`:\n\n```ts\nimport { defineConfig } from 'seedcord';\n\nexport default defineConfig({\n // ...\n});\n```\n"
106
106
  }