create-seedcord 0.2.0 → 0.3.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-seedcord",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "description": "Scaffold a new seedcord bot",
6
6
  "keywords": [
7
7
  "discord",
@@ -40,17 +40,17 @@
40
40
  ],
41
41
  "devDependencies": {
42
42
  "@clack/prompts": "^1.7.0",
43
+ "@seedcord/errors": "^0.9.0",
44
+ "@seedcord/eslint-config": "^2.2.1",
45
+ "@seedcord/tsconfig": "^2.0.3",
46
+ "@seedcord/tsdown-config": "^2.0.1",
47
+ "@seedcord/types": "^0.14.0",
48
+ "@seedcord/vitest-config": "^0.0.1",
43
49
  "discord.js": "^14.27.0",
44
50
  "handlebars": "^4.7.9",
45
51
  "package-manager-detector": "^1.8.0",
46
52
  "tsx": "^4.23.5",
47
- "typescript": "^6.0.3",
48
- "@seedcord/errors": "^0.5.0",
49
- "@seedcord/eslint-config": "^2.1.0",
50
- "@seedcord/tsconfig": "^2.0.3",
51
- "@seedcord/tsdown-config": "^2.0.1",
52
- "@seedcord/types": "^0.10.0",
53
- "@seedcord/vitest-config": "^0.0.1"
53
+ "typescript": "^6.0.3"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public",
@@ -60,10 +60,10 @@
60
60
  "dev": "tsx src/index.ts",
61
61
  "build": "tsdown",
62
62
  "clean": "rm -rf dist",
63
- "lint": "eslint 'src/**/*.{ts,tsx}' 'tests/**/*.{ts,tsx}' --cache",
64
- "lint:fix": "eslint 'src/**/*.{ts,tsx}' 'tests/**/*.{ts,tsx}' --fix --cache",
65
- "fmt": "prettier --write 'src/**/*.{ts,tsx,json,md}' 'tests/**/*.{ts,tsx,json,md}' --cache",
66
- "fmt:check": "prettier --check 'src/**/*.{ts,tsx,json,md}' 'tests/**/*.{ts,tsx,json,md}' --cache",
63
+ "lint": "eslint 'src/**/*.{ts,tsx}' 'tests/**/*.{ts,tsx}' --cache --no-error-on-unmatched-pattern",
64
+ "lint:fix": "eslint 'src/**/*.{ts,tsx}' 'tests/**/*.{ts,tsx}' --fix --cache --no-error-on-unmatched-pattern",
65
+ "fmt": "prettier --write 'src/**/*.{ts,tsx,json,md}' 'tests/**/*.{ts,tsx,json,md}' --cache --no-error-on-unmatched-pattern",
66
+ "fmt:check": "prettier --check 'src/**/*.{ts,tsx,json,md}' 'tests/**/*.{ts,tsx,json,md}' --cache --no-error-on-unmatched-pattern",
67
67
  "tc": "tsgo --noEmit",
68
68
  "test": "vitest run",
69
69
  "test:watch": "vitest dev",
@@ -0,0 +1,38 @@
1
+ # {{ projectName }}
2
+
3
+ Rules for an AI coding agent working in this repo.
4
+
5
+ **seedcord has no presence in your training data.** Anything you recall about its API is invented. Read the page for a surface before you write code against it.
6
+
7
+ ## Reading the docs
8
+
9
+ <https://guide.seedcord.org/llms.txt> lists every page in the guide with a line on what it covers. Each page answers at its own url plus `.md`, so <https://guide.seedcord.org/commands/options.md> is the Options page as Markdown.
10
+
11
+ The API reference is at <https://docs.seedcord.org>, one page per symbol.
12
+
13
+ This project runs on the {{#if isGateway}}gateway{{else}}http{{/if}} transport and imports everything from `{{ transportPackage }}`. A page marks anything that differs between the two.
14
+
15
+ ## How a command works here
16
+
17
+ A command takes two files. One declares what Discord shows people. The other answers it, as a handler class carrying a route decorator. seedcord reads those decorators at startup and dispatches every interaction itself.
18
+
19
+ Run `{{ pm.run }} codegen` after you add a command or change its options. It writes `src/seedcord-gen.d.ts`, which types `this.options`. That file is committed.
20
+
21
+ ## Where things go
22
+
23
+ <!-- prettier-ignore-start -->
24
+
25
+ | path | what it holds |
26
+ | --- | --- |
27
+ | `src/commands/` | one class per command, declaring it to Discord |
28
+ | `src/handlers/` | the code that runs when someone uses one |
29
+ {{#if isGateway}}
30
+ | `src/events/` | handlers for things happening in a server |
31
+ {{/if}}
32
+ | `src/bot.ts` | the config |
33
+
34
+ <!-- prettier-ignore-end -->
35
+
36
+ ## Before you call it done
37
+
38
+ Run `{{ pm.run }} tc` and `{{ pm.run }} lint`. A wrong route or a wrong option name is a compile error, so a green type-check catches most of what an invented API gets wrong.
@@ -0,0 +1 @@
1
+ @AGENTS.md