@outfitter/presets 0.2.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/index.d.ts +43 -0
- package/dist/index.js +118 -0
- package/package.json +63 -0
- package/presets/.gitkeep +0 -0
- package/presets/basic/.gitignore.template +30 -0
- package/presets/basic/.lefthook.yml.template +26 -0
- package/presets/basic/package.json.template +39 -0
- package/presets/basic/src/index.ts.template +26 -0
- package/presets/basic/tsconfig.json.template +34 -0
- package/presets/cli/.gitignore.template +4 -0
- package/presets/cli/.lefthook.yml.template +26 -0
- package/presets/cli/README.md.template +35 -0
- package/presets/cli/biome.json.template +4 -0
- package/presets/cli/package.json.template +46 -0
- package/presets/cli/src/cli.ts.template +8 -0
- package/presets/cli/src/index.ts.template +7 -0
- package/presets/cli/src/program.ts.template +31 -0
- package/presets/cli/tsconfig.json.template +34 -0
- package/presets/daemon/.gitignore.template +4 -0
- package/presets/daemon/.lefthook.yml.template +26 -0
- package/presets/daemon/README.md.template +67 -0
- package/presets/daemon/biome.json.template +4 -0
- package/presets/daemon/package.json.template +49 -0
- package/presets/daemon/src/cli.ts.template +96 -0
- package/presets/daemon/src/daemon-main.ts.template +79 -0
- package/presets/daemon/src/daemon.ts.template +11 -0
- package/presets/daemon/src/index.ts.template +7 -0
- package/presets/daemon/tsconfig.json.template +23 -0
- package/presets/full-stack/.gitignore.template +30 -0
- package/presets/full-stack/README.md.template +30 -0
- package/presets/full-stack/apps/cli/package.json.template +35 -0
- package/presets/full-stack/apps/cli/src/cli.ts.template +24 -0
- package/presets/full-stack/apps/cli/src/index.test.ts.template +18 -0
- package/presets/full-stack/apps/cli/src/index.ts.template +5 -0
- package/presets/full-stack/apps/cli/tsconfig.json.template +37 -0
- package/presets/full-stack/apps/mcp/package.json.template +36 -0
- package/presets/full-stack/apps/mcp/src/index.test.ts.template +18 -0
- package/presets/full-stack/apps/mcp/src/index.ts.template +6 -0
- package/presets/full-stack/apps/mcp/src/mcp.ts.template +22 -0
- package/presets/full-stack/apps/mcp/src/server.ts.template +10 -0
- package/presets/full-stack/apps/mcp/tsconfig.json.template +37 -0
- package/presets/full-stack/package.json.template +16 -0
- package/presets/full-stack/packages/core/package.json.template +32 -0
- package/presets/full-stack/packages/core/src/handlers.ts.template +31 -0
- package/presets/full-stack/packages/core/src/index.test.ts.template +30 -0
- package/presets/full-stack/packages/core/src/index.ts.template +8 -0
- package/presets/full-stack/packages/core/src/types.ts.template +13 -0
- package/presets/full-stack/packages/core/tsconfig.json.template +34 -0
- package/presets/library/.gitignore.template +30 -0
- package/presets/library/README.md.template +29 -0
- package/presets/library/bunup.config.ts.template +20 -0
- package/presets/library/package.json.template +52 -0
- package/presets/library/src/handlers.ts.template +31 -0
- package/presets/library/src/index.test.ts.template +35 -0
- package/presets/library/src/index.ts.template +8 -0
- package/presets/library/src/types.ts.template +13 -0
- package/presets/library/tsconfig.json.template +34 -0
- package/presets/mcp/.gitignore.template +4 -0
- package/presets/mcp/.lefthook.yml.template +26 -0
- package/presets/mcp/README.md.template +54 -0
- package/presets/mcp/biome.json.template +4 -0
- package/presets/mcp/package.json.template +46 -0
- package/presets/mcp/src/index.ts.template +7 -0
- package/presets/mcp/src/mcp.ts.template +33 -0
- package/presets/mcp/src/server.ts.template +8 -0
- package/presets/mcp/tsconfig.json.template +23 -0
- package/presets/minimal/.gitignore.template +30 -0
- package/presets/minimal/.lefthook.yml.template +26 -0
- package/presets/minimal/package.json.template +46 -0
- package/presets/minimal/src/index.ts.template +26 -0
- package/presets/minimal/tsconfig.json.template +34 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Lefthook configuration
|
|
2
|
+
# https://github.com/evilmartians/lefthook
|
|
3
|
+
|
|
4
|
+
pre-commit:
|
|
5
|
+
parallel: true
|
|
6
|
+
commands:
|
|
7
|
+
format:
|
|
8
|
+
glob: "*.{js,ts,tsx,json,md}"
|
|
9
|
+
run: bunx biome format --no-errors-on-unmatched {staged_files}
|
|
10
|
+
stage_fixed: true
|
|
11
|
+
|
|
12
|
+
lint:
|
|
13
|
+
glob: "*.{js,ts,tsx}"
|
|
14
|
+
run: bunx biome lint --no-errors-on-unmatched {staged_files}
|
|
15
|
+
|
|
16
|
+
typecheck:
|
|
17
|
+
glob: "*.{ts,tsx}"
|
|
18
|
+
run: bun run typecheck
|
|
19
|
+
|
|
20
|
+
pre-push:
|
|
21
|
+
parallel: false
|
|
22
|
+
commands:
|
|
23
|
+
verify:
|
|
24
|
+
# TDD-aware strict verification with RED-phase branch carveout
|
|
25
|
+
# (*-tests, */tests, *_tests).
|
|
26
|
+
run: bunx @outfitter/tooling pre-push
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{packageName}}",
|
|
3
|
+
"version": "{{version}}",
|
|
4
|
+
"description": "{{description}}",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "bun build ./src/index.ts --outdir=dist --format=esm",
|
|
21
|
+
"dev": "bun run --watch src/index.ts",
|
|
22
|
+
"test": "bun test",
|
|
23
|
+
"test:watch": "bun test --watch",
|
|
24
|
+
"typecheck": "tsc --noEmit",
|
|
25
|
+
"check": "ultracite check",
|
|
26
|
+
"verify:ci": "bun run typecheck && bun run check && bun run build && bun run test",
|
|
27
|
+
"lint": "biome check .",
|
|
28
|
+
"lint:fix": "biome check . --write",
|
|
29
|
+
"format": "biome format --write .",
|
|
30
|
+
"clean:artifacts": "rm -rf dist .turbo",
|
|
31
|
+
"clean": "rm -rf dist"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {},
|
|
34
|
+
"outfitter": {
|
|
35
|
+
"template": {
|
|
36
|
+
"kind": "library",
|
|
37
|
+
"placement": "packages",
|
|
38
|
+
"surfaces": []
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"bun": ">=1.3.9"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [],
|
|
45
|
+
"license": "MIT"
|
|
46
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {{projectName}}
|
|
3
|
+
*
|
|
4
|
+
* {{description}}
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Main entry point for {{projectName}}.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { main } from "{{packageName}}";
|
|
15
|
+
*
|
|
16
|
+
* main();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export function main(): void {
|
|
20
|
+
console.log("Hello from {{projectName}}!");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Run if executed directly
|
|
24
|
+
if (import.meta.main) {
|
|
25
|
+
main();
|
|
26
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"lib": ["ESNext"],
|
|
8
|
+
"types": ["@types/bun"],
|
|
9
|
+
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noImplicitAny": true,
|
|
12
|
+
"strictNullChecks": true,
|
|
13
|
+
"noUncheckedIndexedAccess": true,
|
|
14
|
+
"exactOptionalPropertyTypes": true,
|
|
15
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
16
|
+
"noImplicitReturns": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
|
|
19
|
+
"declaration": true,
|
|
20
|
+
"declarationMap": true,
|
|
21
|
+
"sourceMap": true,
|
|
22
|
+
"outDir": "./dist",
|
|
23
|
+
"rootDir": "./src",
|
|
24
|
+
|
|
25
|
+
"esModuleInterop": true,
|
|
26
|
+
"forceConsistentCasingInFileNames": true,
|
|
27
|
+
"isolatedModules": true,
|
|
28
|
+
"verbatimModuleSyntax": true,
|
|
29
|
+
"skipLibCheck": true,
|
|
30
|
+
"resolveJsonModule": true
|
|
31
|
+
},
|
|
32
|
+
"include": ["src/**/*"],
|
|
33
|
+
"exclude": ["node_modules", "dist"]
|
|
34
|
+
}
|