@jaypie/mcp 0.3.2 β 0.4.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/dist/createMcpServer.d.ts +7 -1
- package/dist/index.js +26 -3135
- package/dist/index.js.map +1 -1
- package/dist/suite.d.ts +1 -0
- package/dist/suite.js +2442 -0
- package/dist/suite.js.map +1 -0
- package/package.json +8 -3
- package/release-notes/constructs/1.2.17.md +11 -0
- package/release-notes/fabric/0.1.2.md +11 -0
- package/release-notes/fabric/0.1.3.md +25 -0
- package/release-notes/fabric/0.1.4.md +42 -0
- package/release-notes/mcp/0.3.3.md +12 -0
- package/release-notes/mcp/0.3.4.md +36 -0
- package/release-notes/mcp/0.4.0.md +27 -0
- package/release-notes/testkit/1.2.15.md +23 -0
- package/skills/agents.md +25 -0
- package/skills/aws.md +107 -0
- package/skills/cdk.md +141 -0
- package/skills/cicd.md +152 -0
- package/skills/datadog.md +129 -0
- package/skills/debugging.md +148 -0
- package/skills/dns.md +134 -0
- package/skills/dynamodb.md +140 -0
- package/skills/errors.md +142 -0
- package/skills/fabric.md +191 -0
- package/skills/index.md +7 -0
- package/skills/jaypie.md +100 -0
- package/skills/legacy.md +97 -0
- package/skills/logs.md +160 -0
- package/skills/mocks.md +174 -0
- package/skills/models.md +195 -0
- package/skills/releasenotes.md +94 -0
- package/skills/secrets.md +155 -0
- package/skills/services.md +175 -0
- package/skills/style.md +190 -0
- package/skills/tests.md +209 -0
- package/skills/tools.md +127 -0
- package/skills/topics.md +116 -0
- package/skills/variables.md +146 -0
- package/skills/writing.md +153 -0
- package/prompts/Branch_Management.md +0 -34
- package/prompts/Development_Process.md +0 -89
- package/prompts/Jaypie_Agent_Rules.md +0 -110
- package/prompts/Jaypie_Auth0_Express_Mongoose.md +0 -736
- package/prompts/Jaypie_Browser_and_Frontend_Web_Packages.md +0 -18
- package/prompts/Jaypie_CDK_Constructs_and_Patterns.md +0 -430
- package/prompts/Jaypie_CICD_with_GitHub_Actions.md +0 -371
- package/prompts/Jaypie_Commander_CLI_Package.md +0 -166
- package/prompts/Jaypie_Core_Errors_and_Logging.md +0 -39
- package/prompts/Jaypie_DynamoDB_Package.md +0 -774
- package/prompts/Jaypie_Eslint_NPM_Package.md +0 -78
- package/prompts/Jaypie_Express_Package.md +0 -630
- package/prompts/Jaypie_Fabric_Commander.md +0 -411
- package/prompts/Jaypie_Fabric_LLM.md +0 -312
- package/prompts/Jaypie_Fabric_Lambda.md +0 -308
- package/prompts/Jaypie_Fabric_MCP.md +0 -316
- package/prompts/Jaypie_Fabric_Package.md +0 -513
- package/prompts/Jaypie_Fabricator.md +0 -617
- package/prompts/Jaypie_Ideal_Project_Structure.md +0 -78
- package/prompts/Jaypie_Init_CICD_with_GitHub_Actions.md +0 -1186
- package/prompts/Jaypie_Init_Express_on_Lambda.md +0 -115
- package/prompts/Jaypie_Init_Jaypie_CDK_Package.md +0 -35
- package/prompts/Jaypie_Init_Lambda_Package.md +0 -505
- package/prompts/Jaypie_Init_Monorepo_Project.md +0 -44
- package/prompts/Jaypie_Init_Project_Subpackage.md +0 -65
- package/prompts/Jaypie_Legacy_Patterns.md +0 -15
- package/prompts/Jaypie_Llm_Calls.md +0 -449
- package/prompts/Jaypie_Llm_Tools.md +0 -155
- package/prompts/Jaypie_MCP_Package.md +0 -281
- package/prompts/Jaypie_Mocks_and_Testkit.md +0 -137
- package/prompts/Jaypie_Repokit.md +0 -103
- package/prompts/Jaypie_Scrub.md +0 -177
- package/prompts/Jaypie_Streaming.md +0 -467
- package/prompts/Templates_CDK_Subpackage.md +0 -115
- package/prompts/Templates_Express_Subpackage.md +0 -187
- package/prompts/Templates_Project_Monorepo.md +0 -326
- package/prompts/Templates_Project_Subpackage.md +0 -93
- package/prompts/Write_Efficient_Prompt_Guides.md +0 -48
- package/prompts/Write_and_Maintain_Engaging_Readme.md +0 -67
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Template files for creating an Express on Lambda subpackage in a Jaypie monorepo
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Express Subpackage Templates
|
|
6
|
-
|
|
7
|
-
Templates for creating an Express subpackage that runs on AWS Lambda in a Jaypie monorepo.
|
|
8
|
-
|
|
9
|
-
## index.ts
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { createLambdaHandler } from "jaypie";
|
|
13
|
-
import app from "./src/app.js";
|
|
14
|
-
|
|
15
|
-
// Lambda handler for Function URL
|
|
16
|
-
export const handler = createLambdaHandler(app);
|
|
17
|
-
|
|
18
|
-
// For streaming responses (SSE), use:
|
|
19
|
-
// export const handler = createLambdaStreamHandler(app);
|
|
20
|
-
|
|
21
|
-
if (process.env.NODE_ENV === "development") {
|
|
22
|
-
app.listen(8080);
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## src/app.ts
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
import { cors, echoRoute, EXPRESS, noContentRoute, notFoundRoute } from "jaypie";
|
|
30
|
-
import express from "express";
|
|
31
|
-
import resourceRouter from "./routes/resource.router.js";
|
|
32
|
-
|
|
33
|
-
const app = express();
|
|
34
|
-
|
|
35
|
-
// Built-in Jaypie routes
|
|
36
|
-
app.get(EXPRESS.PATH.ROOT, noContentRoute);
|
|
37
|
-
app.use("/_sy/echo", cors(), echoRoute);
|
|
38
|
-
|
|
39
|
-
// Application routes
|
|
40
|
-
app.use(/^\/resource$/, cors(), resourceRouter);
|
|
41
|
-
app.use("/resource/", cors(), resourceRouter);
|
|
42
|
-
|
|
43
|
-
// Catch-all
|
|
44
|
-
app.all(EXPRESS.PATH.ANY, notFoundRoute);
|
|
45
|
-
|
|
46
|
-
export default app;
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## src/handler.config.ts
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
import { force } from "jaypie";
|
|
53
|
-
|
|
54
|
-
interface HandlerConfigOptions {
|
|
55
|
-
locals?: Record<string, any>;
|
|
56
|
-
setup?: Array<() => void | Promise<void>>;
|
|
57
|
-
teardown?: Array<() => void | Promise<void>>;
|
|
58
|
-
validate?: Array<() => boolean | Promise<boolean>>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
interface HandlerConfig {
|
|
62
|
-
name: string;
|
|
63
|
-
locals: Record<string, any>;
|
|
64
|
-
setup: Array<() => void | Promise<void>>;
|
|
65
|
-
teardown: Array<() => void | Promise<void>>;
|
|
66
|
-
validate: Array<() => boolean | Promise<boolean>>;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const handlerConfig = (
|
|
70
|
-
nameOrConfig: string | (HandlerConfig & { name: string }),
|
|
71
|
-
options: HandlerConfigOptions = {}
|
|
72
|
-
): HandlerConfig => {
|
|
73
|
-
let name: string;
|
|
74
|
-
let locals: Record<string, any>;
|
|
75
|
-
let setup: Array<() => void | Promise<void>>;
|
|
76
|
-
let teardown: Array<() => void | Promise<void>>;
|
|
77
|
-
let validate: Array<() => boolean | Promise<boolean>>;
|
|
78
|
-
|
|
79
|
-
if (typeof nameOrConfig === "object") {
|
|
80
|
-
({ name, locals = {}, setup = [], teardown = [], validate = [] } = nameOrConfig);
|
|
81
|
-
} else {
|
|
82
|
-
name = nameOrConfig;
|
|
83
|
-
({ locals = {}, setup = [], teardown = [], validate = [] } = options);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
name,
|
|
88
|
-
locals: { ...force.object(locals) },
|
|
89
|
-
setup: [...force.array(setup)],
|
|
90
|
-
teardown: [...force.array(teardown)],
|
|
91
|
-
validate: [...force.array(validate)],
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export default handlerConfig;
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## src/routes/resource.router.ts
|
|
99
|
-
|
|
100
|
-
```typescript
|
|
101
|
-
import express from "express";
|
|
102
|
-
import { EXPRESS } from "jaypie";
|
|
103
|
-
import resourceGetRoute from "./resource/resourceGet.route.js";
|
|
104
|
-
|
|
105
|
-
const router = express.Router();
|
|
106
|
-
router.use(express.json({ strict: false }));
|
|
107
|
-
|
|
108
|
-
// Single example route
|
|
109
|
-
router.get(EXPRESS.PATH.ROOT, resourceGetRoute);
|
|
110
|
-
|
|
111
|
-
export default router;
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## src/routes/resource/resourceGet.route.ts
|
|
115
|
-
|
|
116
|
-
```typescript
|
|
117
|
-
import { expressHandler } from "jaypie";
|
|
118
|
-
import type { Request } from "express";
|
|
119
|
-
import handlerConfig from "../../handler.config.js";
|
|
120
|
-
|
|
121
|
-
interface ResourceGetResponse {
|
|
122
|
-
message: string;
|
|
123
|
-
query: Record<string, any>;
|
|
124
|
-
timestamp: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export default expressHandler(
|
|
128
|
-
handlerConfig("resourceGet"),
|
|
129
|
-
async (req: Request): Promise<ResourceGetResponse> => {
|
|
130
|
-
const { query } = req;
|
|
131
|
-
|
|
132
|
-
return {
|
|
133
|
-
message: "Resource endpoint",
|
|
134
|
-
query,
|
|
135
|
-
timestamp: new Date().toISOString(),
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## src/routes/resource/__tests__/resourceGet.route.spec.ts
|
|
142
|
-
|
|
143
|
-
```typescript
|
|
144
|
-
import { describe, expect, it } from "vitest";
|
|
145
|
-
import resourceGet from "../resourceGet.route.js";
|
|
146
|
-
|
|
147
|
-
describe("Resource Get Route", () => {
|
|
148
|
-
it("returns resource data", async () => {
|
|
149
|
-
const mockRequest = {
|
|
150
|
-
query: { search: "test" },
|
|
151
|
-
locals: {},
|
|
152
|
-
} as any;
|
|
153
|
-
|
|
154
|
-
const response = await resourceGet(mockRequest);
|
|
155
|
-
|
|
156
|
-
expect(response.message).toBe("Resource endpoint");
|
|
157
|
-
expect(response.query).toEqual({ search: "test" });
|
|
158
|
-
expect(response.timestamp).toBeDefined();
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
it("handles empty query", async () => {
|
|
162
|
-
const mockRequest = {
|
|
163
|
-
query: {},
|
|
164
|
-
locals: {},
|
|
165
|
-
} as any;
|
|
166
|
-
|
|
167
|
-
const response = await resourceGet(mockRequest);
|
|
168
|
-
|
|
169
|
-
expect(response.message).toBe("Resource endpoint");
|
|
170
|
-
expect(response.query).toEqual({});
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## src/types/express.ts
|
|
176
|
-
|
|
177
|
-
```typescript
|
|
178
|
-
declare global {
|
|
179
|
-
namespace Express {
|
|
180
|
-
interface Request {
|
|
181
|
-
locals?: Record<string, any>;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export {};
|
|
187
|
-
```
|
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Configuration examples for creating a monorepo using Jaypie conventions
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Project Monorepo Configuration Examples
|
|
6
|
-
|
|
7
|
-
Configuration examples for creating a monorepo project following Jaypie conventions. These examples show the configuration files used in the Jaypie monorepo itself.
|
|
8
|
-
|
|
9
|
-
## .gitignore
|
|
10
|
-
|
|
11
|
-
Example based on Jaypie monorepo:
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
.jaypie
|
|
15
|
-
|
|
16
|
-
cdk.out
|
|
17
|
-
|
|
18
|
-
.DS_Store
|
|
19
|
-
node_modules
|
|
20
|
-
dist
|
|
21
|
-
|
|
22
|
-
# Generated repomix files
|
|
23
|
-
/prompts/context
|
|
24
|
-
|
|
25
|
-
# local env files
|
|
26
|
-
.aider*
|
|
27
|
-
.env
|
|
28
|
-
.env.local
|
|
29
|
-
.env.*.local
|
|
30
|
-
|
|
31
|
-
# Log files
|
|
32
|
-
npm-debug.log*
|
|
33
|
-
yarn-debug.log*
|
|
34
|
-
yarn-error.log*
|
|
35
|
-
pnpm-debug.log*
|
|
36
|
-
|
|
37
|
-
# Editor directories and files
|
|
38
|
-
.idea
|
|
39
|
-
*.suo
|
|
40
|
-
*.ntvs*
|
|
41
|
-
*.njsproj
|
|
42
|
-
*.sln
|
|
43
|
-
*.sw?
|
|
44
|
-
|
|
45
|
-
**/.claude/settings.local.json
|
|
46
|
-
*.tsbuildinfo
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## .vscode/settings.json
|
|
50
|
-
|
|
51
|
-
Add project-specific words to spell checker. Example from Jaypie:
|
|
52
|
-
|
|
53
|
-
```json
|
|
54
|
-
{
|
|
55
|
-
"cSpell.words": [
|
|
56
|
-
"autofix",
|
|
57
|
-
"datadoghq",
|
|
58
|
-
"esmodules",
|
|
59
|
-
"hygen",
|
|
60
|
-
"jaypie",
|
|
61
|
-
"repomix",
|
|
62
|
-
"rollup",
|
|
63
|
-
"supertest",
|
|
64
|
-
"testkit",
|
|
65
|
-
"vite",
|
|
66
|
-
"vitest"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## eslint.config.mjs
|
|
72
|
-
|
|
73
|
-
```javascript
|
|
74
|
-
export { default as default } from "@jaypie/eslint";
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## package.json
|
|
78
|
-
|
|
79
|
-
Jaypie uses Lerna to run commands across all packages. Individual packages can be targeted using npm workspaces.
|
|
80
|
-
|
|
81
|
-
```json
|
|
82
|
-
{
|
|
83
|
-
"name": "@project-org/project-name",
|
|
84
|
-
"version": "0.0.1",
|
|
85
|
-
"type": "module",
|
|
86
|
-
"private": true,
|
|
87
|
-
"workspaces": [
|
|
88
|
-
"packages/*"
|
|
89
|
-
],
|
|
90
|
-
"scripts": {
|
|
91
|
-
"build": "lerna run build",
|
|
92
|
-
"clean": "rimraf ./packages/*/dist",
|
|
93
|
-
"format": "npm run format:package && npm run format:lint",
|
|
94
|
-
"format:lint": "eslint --fix --quiet .",
|
|
95
|
-
"format:package": "sort-package-json ./package.json ./packages/*/package.json",
|
|
96
|
-
"lint": "eslint --quiet .",
|
|
97
|
-
"test": "vitest run",
|
|
98
|
-
"typecheck": "npm run typecheck --workspaces"
|
|
99
|
-
},
|
|
100
|
-
"devDependencies": {
|
|
101
|
-
"@jaypie/eslint": "^1.1.0",
|
|
102
|
-
"@jaypie/testkit": "^1.1.0",
|
|
103
|
-
"eslint": "^9.13.0",
|
|
104
|
-
"lerna": "^9.0.0",
|
|
105
|
-
"prettier": "^3.3.3",
|
|
106
|
-
"rimraf": "^6.0.1",
|
|
107
|
-
"rollup": "^4.24.0",
|
|
108
|
-
"sort-package-json": "^3.2.0",
|
|
109
|
-
"vitest": "^3.0.5"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Notes:
|
|
115
|
-
- Use `lerna run build` to build all packages in dependency order
|
|
116
|
-
- Use `npm run build --workspace packages/<package>` to build a single package
|
|
117
|
-
- Install dependencies with `npm install <package> -w packages/<workspace>`
|
|
118
|
-
|
|
119
|
-
## lerna.json
|
|
120
|
-
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
|
124
|
-
"version": "independent"
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## vitest.config.ts
|
|
129
|
-
|
|
130
|
-
Jaypie uses an explicit project list rather than a glob pattern:
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
import { defineConfig } from "vitest/config";
|
|
134
|
-
|
|
135
|
-
export default defineConfig({
|
|
136
|
-
test: {
|
|
137
|
-
projects: [
|
|
138
|
-
"packages/errors",
|
|
139
|
-
"packages/core",
|
|
140
|
-
// ... list each package explicitly
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
});
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Note: Use explicit package paths instead of `packages/*` to have better control over test execution order.
|
|
147
|
-
|
|
148
|
-
## Package-Level tsconfig.json
|
|
149
|
-
|
|
150
|
-
Each TypeScript package needs its own `tsconfig.json`. Example from `@jaypie/errors`:
|
|
151
|
-
|
|
152
|
-
```json
|
|
153
|
-
{
|
|
154
|
-
"compilerOptions": {
|
|
155
|
-
"target": "ES2020",
|
|
156
|
-
"module": "ESNext",
|
|
157
|
-
"moduleResolution": "node",
|
|
158
|
-
"declaration": true,
|
|
159
|
-
"outDir": "./dist",
|
|
160
|
-
"strict": true,
|
|
161
|
-
"esModuleInterop": true,
|
|
162
|
-
"skipLibCheck": true,
|
|
163
|
-
"forceConsistentCasingInFileNames": true
|
|
164
|
-
},
|
|
165
|
-
"include": ["src/**/*"],
|
|
166
|
-
"exclude": ["node_modules", "dist"]
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Package-Level rollup.config
|
|
171
|
-
|
|
172
|
-
### TypeScript Package (Dual ESM/CJS)
|
|
173
|
-
|
|
174
|
-
For TypeScript packages that need both ESM and CommonJS builds (`@jaypie/errors` pattern):
|
|
175
|
-
|
|
176
|
-
```javascript
|
|
177
|
-
import typescript from "@rollup/plugin-typescript";
|
|
178
|
-
|
|
179
|
-
export default [
|
|
180
|
-
// ES modules version
|
|
181
|
-
{
|
|
182
|
-
input: "src/index.ts",
|
|
183
|
-
output: {
|
|
184
|
-
dir: "dist/esm",
|
|
185
|
-
format: "es",
|
|
186
|
-
sourcemap: true,
|
|
187
|
-
},
|
|
188
|
-
plugins: [
|
|
189
|
-
typescript({
|
|
190
|
-
tsconfig: "./tsconfig.json",
|
|
191
|
-
declaration: true,
|
|
192
|
-
outDir: "dist/esm",
|
|
193
|
-
}),
|
|
194
|
-
],
|
|
195
|
-
external: [],
|
|
196
|
-
},
|
|
197
|
-
// CommonJS version
|
|
198
|
-
{
|
|
199
|
-
input: "src/index.ts",
|
|
200
|
-
output: {
|
|
201
|
-
dir: "dist/cjs",
|
|
202
|
-
format: "cjs",
|
|
203
|
-
sourcemap: true,
|
|
204
|
-
exports: "named",
|
|
205
|
-
entryFileNames: "[name].cjs",
|
|
206
|
-
},
|
|
207
|
-
plugins: [
|
|
208
|
-
typescript({
|
|
209
|
-
tsconfig: "./tsconfig.json",
|
|
210
|
-
declaration: true,
|
|
211
|
-
outDir: "dist/cjs",
|
|
212
|
-
}),
|
|
213
|
-
],
|
|
214
|
-
external: [],
|
|
215
|
-
},
|
|
216
|
-
];
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Package.json exports for this pattern:
|
|
220
|
-
|
|
221
|
-
```json
|
|
222
|
-
{
|
|
223
|
-
"exports": {
|
|
224
|
-
".": {
|
|
225
|
-
"types": "./dist/esm/index.d.ts",
|
|
226
|
-
"require": "./dist/cjs/index.cjs",
|
|
227
|
-
"import": "./dist/esm/index.js",
|
|
228
|
-
"default": "./dist/esm/index.js"
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
"main": "./dist/cjs/index.cjs",
|
|
232
|
-
"module": "./dist/esm/index.js",
|
|
233
|
-
"types": "./dist/esm/index.d.ts"
|
|
234
|
-
}
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### JavaScript Package (ESM with CJS fallback)
|
|
238
|
-
|
|
239
|
-
For JavaScript packages (`@jaypie/core` pattern):
|
|
240
|
-
|
|
241
|
-
```javascript
|
|
242
|
-
import autoExternal from "rollup-plugin-auto-external";
|
|
243
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
244
|
-
import resolve from "@rollup/plugin-node-resolve";
|
|
245
|
-
|
|
246
|
-
export default {
|
|
247
|
-
input: "src/index.js",
|
|
248
|
-
output: [
|
|
249
|
-
{
|
|
250
|
-
file: "dist/package-name.cjs",
|
|
251
|
-
format: "cjs",
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
file: "dist/package-name.esm.js",
|
|
255
|
-
format: "esm",
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
plugins: [
|
|
259
|
-
autoExternal(),
|
|
260
|
-
resolve(),
|
|
261
|
-
commonjs(),
|
|
262
|
-
],
|
|
263
|
-
};
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
## Package-Level package.json
|
|
267
|
-
|
|
268
|
-
Example from `@jaypie/express`:
|
|
269
|
-
|
|
270
|
-
```json
|
|
271
|
-
{
|
|
272
|
-
"name": "@jaypie/express",
|
|
273
|
-
"version": "1.1.18",
|
|
274
|
-
"repository": {
|
|
275
|
-
"type": "git",
|
|
276
|
-
"url": "https://github.com/finlaysonstudio/jaypie"
|
|
277
|
-
},
|
|
278
|
-
"license": "MIT",
|
|
279
|
-
"author": "Finlayson Studio",
|
|
280
|
-
"type": "module",
|
|
281
|
-
"exports": {
|
|
282
|
-
".": {
|
|
283
|
-
"types": "./dist/esm/index.d.ts",
|
|
284
|
-
"import": "./dist/esm/index.js",
|
|
285
|
-
"require": "./dist/cjs/index.cjs"
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
"main": "./dist/cjs/index.cjs",
|
|
289
|
-
"module": "./dist/esm/index.js",
|
|
290
|
-
"types": "./dist/esm/index.d.ts",
|
|
291
|
-
"files": [
|
|
292
|
-
"dist"
|
|
293
|
-
],
|
|
294
|
-
"scripts": {
|
|
295
|
-
"build": "rollup --config",
|
|
296
|
-
"format": "npm run format:package && npm run format:lint",
|
|
297
|
-
"format:lint": "eslint --fix .",
|
|
298
|
-
"format:package": "sort-package-json ./package.json",
|
|
299
|
-
"lint": "eslint .",
|
|
300
|
-
"test": "vitest run .",
|
|
301
|
-
"typecheck": "tsc --noEmit"
|
|
302
|
-
},
|
|
303
|
-
"publishConfig": {
|
|
304
|
-
"access": "public"
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
Key points:
|
|
310
|
-
- Use `"type": "module"` for ESM
|
|
311
|
-
- Include only `dist` in published package via `files` field
|
|
312
|
-
- Set `publishConfig.access` to "public" for npm publishing
|
|
313
|
-
- Scripts use local paths (`.`) not workspace patterns
|
|
314
|
-
|
|
315
|
-
## Key Differences from Template
|
|
316
|
-
|
|
317
|
-
The Jaypie monorepo does NOT use:
|
|
318
|
-
- Root-level `tsconfig.base.json` or `tsconfig.json` with project references
|
|
319
|
-
- `vitest.workspace.js` with glob patterns
|
|
320
|
-
- `npm run build --workspaces` (uses `lerna run build` instead)
|
|
321
|
-
|
|
322
|
-
The Jaypie monorepo DOES use:
|
|
323
|
-
- Individual package-level `tsconfig.json` files
|
|
324
|
-
- Explicit vitest project list in root `vitest.config.ts`
|
|
325
|
-
- Lerna for running commands across packages in dependency order
|
|
326
|
-
- npm workspaces for installing dependencies and running individual package commands
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Template files for creating a new subpackage within a Jaypie monorepo
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Project Subpackage Templates
|
|
6
|
-
|
|
7
|
-
Templates for creating a new subpackage within a Jaypie monorepo.
|
|
8
|
-
|
|
9
|
-
## package.json
|
|
10
|
-
|
|
11
|
-
```json
|
|
12
|
-
{
|
|
13
|
-
"name": "@project-org/project-name",
|
|
14
|
-
"version": "0.0.1",
|
|
15
|
-
"type": "module",
|
|
16
|
-
"private": true,
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "vite build",
|
|
19
|
-
"clean": "rimraf dist",
|
|
20
|
-
"format": "eslint --fix",
|
|
21
|
-
"format:package": "sort-package-json",
|
|
22
|
-
"lint": "eslint",
|
|
23
|
-
"test": "vitest run",
|
|
24
|
-
"test:watch": "vitest watch",
|
|
25
|
-
"typecheck": "tsc --noEmit"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## tsconfig.json
|
|
31
|
-
|
|
32
|
-
```json
|
|
33
|
-
{
|
|
34
|
-
"extends": "../../tsconfig.base.json",
|
|
35
|
-
"compilerOptions": {
|
|
36
|
-
"rootDir": "src",
|
|
37
|
-
"outDir": "dist"
|
|
38
|
-
},
|
|
39
|
-
"include": [
|
|
40
|
-
"src"
|
|
41
|
-
],
|
|
42
|
-
"references": []
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## vite.config.ts
|
|
47
|
-
|
|
48
|
-
```typescript
|
|
49
|
-
import { defineConfig } from "vite";
|
|
50
|
-
import dts from "vite-plugin-dts";
|
|
51
|
-
import { resolve } from "path";
|
|
52
|
-
|
|
53
|
-
export default defineConfig({
|
|
54
|
-
build: {
|
|
55
|
-
lib: {
|
|
56
|
-
entry: resolve(__dirname, "src/index.ts"),
|
|
57
|
-
formats: ["es"],
|
|
58
|
-
fileName: "index",
|
|
59
|
-
},
|
|
60
|
-
rollupOptions: {
|
|
61
|
-
external: ["jaypie"],
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
plugins: [
|
|
65
|
-
dts({
|
|
66
|
-
exclude: ["**/*.spec.ts"],
|
|
67
|
-
}),
|
|
68
|
-
],
|
|
69
|
-
});
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## vitest.config.ts
|
|
73
|
-
|
|
74
|
-
```typescript
|
|
75
|
-
import { defineConfig } from "vite";
|
|
76
|
-
|
|
77
|
-
export default defineConfig({
|
|
78
|
-
test: {
|
|
79
|
-
setupFiles: ["./vitest.setup.ts"],
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## vitest.setup.ts
|
|
85
|
-
|
|
86
|
-
```typescript
|
|
87
|
-
import { matchers as jaypieMatchers } from "@jaypie/testkit";
|
|
88
|
-
import * as extendedMatchers from "jest-extended";
|
|
89
|
-
import { expect } from "vitest";
|
|
90
|
-
|
|
91
|
-
expect.extend(extendedMatchers);
|
|
92
|
-
expect.extend(jaypieMatchers);
|
|
93
|
-
```
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Maintaining code-generation agent guides
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Write Efficient Prompt Guides
|
|
6
|
-
|
|
7
|
-
An efficient prompt conveys maximum information in minimal words.
|
|
8
|
-
|
|
9
|
-
## Process
|
|
10
|
-
|
|
11
|
-
If provided with an existing guide, update the guide.
|
|
12
|
-
Apply these standards dogmatically.
|
|
13
|
-
If provided content, create a new guide.
|
|
14
|
-
|
|
15
|
-
## Goals
|
|
16
|
-
|
|
17
|
-
* Apply a crisp, declarative writing style
|
|
18
|
-
* Consider how each phrase can be written for maximum clarity
|
|
19
|
-
* Remove superfluous language
|
|
20
|
-
* Remove tasks only a human can perform
|
|
21
|
-
* Prefer semantic meaning (like headings) and clarity over aesthetic concerns (like font size)
|
|
22
|
-
|
|
23
|
-
## Suggested Outline for a New Guide
|
|
24
|
-
|
|
25
|
-
```markdown
|
|
26
|
-
# Guide title
|
|
27
|
-
|
|
28
|
-
One-line overview of the guide's value
|
|
29
|
-
|
|
30
|
-
## Goal
|
|
31
|
-
|
|
32
|
-
Aim or "outputs" of the guide
|
|
33
|
-
|
|
34
|
-
## Guidelines
|
|
35
|
-
|
|
36
|
-
Assumptions and prerequisites factoring in the implementation
|
|
37
|
-
|
|
38
|
-
## Process
|
|
39
|
-
|
|
40
|
-
Setup and steps to reproduce
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## π Studio House Style
|
|
44
|
-
|
|
45
|
-
Focus on clarity using terse and pithy language.
|
|
46
|
-
Place each sentence on its own line to enhance version control diffs.
|
|
47
|
-
Avoid the second-person pronoun; instructions may imply the reader without using βyou.β
|
|
48
|
-
Reference abstract third persons when a party must be mentioned.
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Maintaining human-centric documentation
|
|
3
|
-
globs: README.md
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Write and Maintain an Engaging README.md
|
|
7
|
-
|
|
8
|
-
Engaging READMEs invite all audiences to explore the contents.
|
|
9
|
-
They present documentation in an accessible and organized manner.
|
|
10
|
-
|
|
11
|
-
## π§ Maintenance Checklist (Outputs)
|
|
12
|
-
|
|
13
|
-
Ensure all spelling and grammar have been checked.
|
|
14
|
-
Confirm that all external links operate without redirection.
|
|
15
|
-
Verify that external links land on meaningful pages.
|
|
16
|
-
Check markdown syntax.
|
|
17
|
-
|
|
18
|
-
## π₯ Task Prerequisites (Inputs)
|
|
19
|
-
|
|
20
|
-
Most repositories contain an existing README.
|
|
21
|
-
If only a README is provided, review and maintain it without considering drift from the code.
|
|
22
|
-
If code is included, review the provided code and update the README accordingly.
|
|
23
|
-
If no README is present, verify that a README.md file exists before creating a new one.
|
|
24
|
-
|
|
25
|
-
## βοΈ Editorial Guidelines
|
|
26
|
-
|
|
27
|
-
Adhere to the existing heading hierarchy.
|
|
28
|
-
Refrain from modifying established sections.
|
|
29
|
-
Maintain the style, tone, and technical formatting already in use.
|
|
30
|
-
Avoid adding emojis if the current document does not use them.
|
|
31
|
-
|
|
32
|
-
## π Suggested Outline
|
|
33
|
-
|
|
34
|
-
Structure the document so that the content flows from the most common audience's high-level needs to a complete reference.
|
|
35
|
-
Avoid creating empty sections.
|
|
36
|
-
|
|
37
|
-
```markdown
|
|
38
|
-
# Document Title
|
|
39
|
-
Description // a tagline or tl;dr that extends beyond the title
|
|
40
|
-
## βοΈ Overview β an introduction for documents of extensive length
|
|
41
|
-
## πΏ Installation - or ## πΏ Setup
|
|
42
|
-
## π Usage β a quick overview of the most common uses
|
|
43
|
-
## π Reference β a detailed guide to all uses, ideally arranged alphabetically
|
|
44
|
-
## π» Development β instructions for setting up a local environment
|
|
45
|
-
## π Deployment β guidelines for deploying to staging and production environments
|
|
46
|
-
## π£οΈ Roadmap
|
|
47
|
-
## π Changelog
|
|
48
|
-
## π Appendix - or ## ποΈ Footnotes as needed
|
|
49
|
-
## π License β typically defaulting to βAll rights reserved.β unless specified otherwise
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## π§βπ» Technical Audience
|
|
53
|
-
|
|
54
|
-
Assume that the audience is technical and capable of following explicit instructions.
|
|
55
|
-
Include code examples as necessary.
|
|
56
|
-
Declare required import statements at the beginning of example blocks.
|
|
57
|
-
|
|
58
|
-
## π Studio House Style
|
|
59
|
-
|
|
60
|
-
Adhere to the Chicago Manual of Style.
|
|
61
|
-
Focus on clarity using terse and pithy language.
|
|
62
|
-
Apply whitespace around headings to reduce visual clutter.
|
|
63
|
-
Place each sentence on its own line to enhance version control diffs.
|
|
64
|
-
Apply business formal language with dry whimsy when appropriate.
|
|
65
|
-
Emojis may introduce second-level headings and conclude first- or third-level headings as appropriate.
|
|
66
|
-
Avoid the second-person pronoun; instructions may imply the reader without using βyou.β
|
|
67
|
-
Reference abstract third persons when a party must be mentioned.
|