spinup-ts 0.1.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/README.md +82 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +96 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts.d.ts +17 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +264 -0
- package/dist/prompts.js.map +1 -0
- package/dist/scaffold.d.ts +5 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +128 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/transforms/devcontainer.d.ts +3 -0
- package/dist/transforms/devcontainer.d.ts.map +1 -0
- package/dist/transforms/devcontainer.js +8 -0
- package/dist/transforms/devcontainer.js.map +1 -0
- package/dist/transforms/docker.d.ts +3 -0
- package/dist/transforms/docker.d.ts.map +1 -0
- package/dist/transforms/docker.js +11 -0
- package/dist/transforms/docker.js.map +1 -0
- package/dist/transforms/docs.d.ts +3 -0
- package/dist/transforms/docs.d.ts.map +1 -0
- package/dist/transforms/docs.js +22 -0
- package/dist/transforms/docs.js.map +1 -0
- package/dist/transforms/documentation.d.ts +3 -0
- package/dist/transforms/documentation.d.ts.map +1 -0
- package/dist/transforms/documentation.js +37 -0
- package/dist/transforms/documentation.js.map +1 -0
- package/dist/transforms/github-actions.d.ts +3 -0
- package/dist/transforms/github-actions.d.ts.map +1 -0
- package/dist/transforms/github-actions.js +48 -0
- package/dist/transforms/github-actions.js.map +1 -0
- package/dist/transforms/index.d.ts +3 -0
- package/dist/transforms/index.d.ts.map +1 -0
- package/dist/transforms/index.js +24 -0
- package/dist/transforms/index.js.map +1 -0
- package/dist/transforms/license.d.ts +3 -0
- package/dist/transforms/license.d.ts.map +1 -0
- package/dist/transforms/license.js +19 -0
- package/dist/transforms/license.js.map +1 -0
- package/dist/transforms/npm-publish.d.ts +3 -0
- package/dist/transforms/npm-publish.d.ts.map +1 -0
- package/dist/transforms/npm-publish.js +15 -0
- package/dist/transforms/npm-publish.js.map +1 -0
- package/dist/transforms/package-manager.d.ts +3 -0
- package/dist/transforms/package-manager.d.ts.map +1 -0
- package/dist/transforms/package-manager.js +31 -0
- package/dist/transforms/package-manager.js.map +1 -0
- package/dist/types.d.ts +116 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +52 -0
- package/dist/types.js.map +1 -0
- package/dist/update.d.ts +2 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/update.js +207 -0
- package/dist/update.js.map +1 -0
- package/package.json +94 -0
- package/template/.commitlintrc.json +3 -0
- package/template/.devcontainer/.zshrc +159 -0
- package/template/.devcontainer/DISCOVER-DEPS.md +109 -0
- package/template/.devcontainer/README.md +223 -0
- package/template/.devcontainer/SETUP.md +191 -0
- package/template/.devcontainer/TOOLS.md +215 -0
- package/template/.devcontainer/devcontainer.json +106 -0
- package/template/.devcontainer/scripts/init-project.sh +167 -0
- package/template/.editorconfig +12 -0
- package/template/.github/.release-please-manifest.json +3 -0
- package/template/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
- package/template/.github/ISSUE_TEMPLATE/feature_request.md +14 -0
- package/template/.github/PULL_REQUEST_TEMPLATE.md +13 -0
- package/template/.github/actions/setup-node-env/action.yml +20 -0
- package/template/.github/dependabot.yml +17 -0
- package/template/.github/labeler.yml +17 -0
- package/template/.github/release-please-config.json +7 -0
- package/template/.github/workflows/ci.yml +95 -0
- package/template/.github/workflows/codeql.yml +31 -0
- package/template/.github/workflows/labeler.yml +18 -0
- package/template/.github/workflows/release-please.yml +72 -0
- package/template/.github/workflows/stale.yml +32 -0
- package/template/.husky/commit-msg +1 -0
- package/template/.husky/pre-commit +1 -0
- package/template/.nvmrc +1 -0
- package/template/.vscode/extensions.json +11 -0
- package/template/.vscode/settings.json +12 -0
- package/template/AGENTS.md +1 -0
- package/template/CHANGELOG.md +11 -0
- package/template/CLAUDE.md +0 -0
- package/template/CONTRIBUTING.md +22 -0
- package/template/Dockerfile +21 -0
- package/template/LICENSE.Apache-2.0 +17 -0
- package/template/LICENSE.BSD-3-Clause +28 -0
- package/template/LICENSE.GPL-3.0 +17 -0
- package/template/LICENSE.ISC +15 -0
- package/template/LICENSE.MIT +21 -0
- package/template/README.md +62 -0
- package/template/biome.json +49 -0
- package/template/docker-compose.yml +7 -0
- package/template/docs/architecture/api-layer.md +44 -0
- package/template/docs/architecture/constitution.md +24 -0
- package/template/docs/architecture/data-model.md +24 -0
- package/template/docs/architecture/index.md +15 -0
- package/template/docs/architecture/project.md +24 -0
- package/template/docs/architecture/quality-checks.md +28 -0
- package/template/docs/architecture/testing-plan.md +35 -0
- package/template/docs/architecture/ui.md +37 -0
- package/template/docs/changelog.md +9 -0
- package/template/docs/contributing.md +46 -0
- package/template/docs/developer-guide/architecture.md +22 -0
- package/template/docs/developer-guide/contributing.md +30 -0
- package/template/docs/developer-guide/data-model.md +25 -0
- package/template/docs/developer-guide/index.md +12 -0
- package/template/docs/developer-guide/testing.md +40 -0
- package/template/docs/examples.md +37 -0
- package/template/docs/getting-started.md +42 -0
- package/template/docs/installation.md +45 -0
- package/template/docs/intro.md +60 -0
- package/template/docs/post-mortems/.gitkeep +0 -0
- package/template/docs/reference/cli.md +32 -0
- package/template/docs/reference/configuration.md +33 -0
- package/template/docs/reference/hooks.md +27 -0
- package/template/docs/research/competitor-analysis.md +21 -0
- package/template/docs/research/real-world-demand.md +21 -0
- package/template/docs/user-guide/configuration.md +32 -0
- package/template/docs/user-guide/features.md +21 -0
- package/template/docs/user-guide/how-it-works.md +29 -0
- package/template/docs/user-guide/index.md +11 -0
- package/template/docusaurus.config.ts +93 -0
- package/template/eslint.config.mjs +66 -0
- package/template/justfile +51 -0
- package/template/package.json +88 -0
- package/template/pnpm-workspace.yaml +8 -0
- package/template/sidebars.ts +72 -0
- package/template/src/index.ts +3 -0
- package/template/static/img/logo.svg +4 -0
- package/template/tests/index.test.ts +8 -0
- package/template/tsconfig.json +23 -0
- package/template/vitest.config.ts +19 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "__PROJECT_NAME__",
|
|
3
|
+
"image": "ghcr.io/joeblackwaslike/devcontainer:latest",
|
|
4
|
+
"features": {
|
|
5
|
+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
|
|
6
|
+
"version": "latest",
|
|
7
|
+
"enableNonRootDocker": "true",
|
|
8
|
+
"moby": false
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"customizations": {
|
|
12
|
+
"vscode": {
|
|
13
|
+
"extensions": [
|
|
14
|
+
"Anthropic.claude-code",
|
|
15
|
+
"alefragnani.Bookmarks",
|
|
16
|
+
"antfu.browse-lite",
|
|
17
|
+
"biomejs.biome",
|
|
18
|
+
"christian-kohler.npm-intellisense",
|
|
19
|
+
"DavidAnson.vscode-markdownlint",
|
|
20
|
+
"dbaeumer.vscode-eslint",
|
|
21
|
+
"denoland.vscode-deno",
|
|
22
|
+
"donjayamanne.githistory",
|
|
23
|
+
"EditorConfig.EditorConfig",
|
|
24
|
+
"esbenp.prettier-vscode",
|
|
25
|
+
"github.vscode-github-actions",
|
|
26
|
+
"GitHub.vscode-pull-request-github",
|
|
27
|
+
"golang.go",
|
|
28
|
+
"Jacano.vscode-pnpm",
|
|
29
|
+
"mhutchie.git-graph",
|
|
30
|
+
"ms-azuretools.vscode-containers",
|
|
31
|
+
"ms-python.python",
|
|
32
|
+
"ms-python.vscode-pylance",
|
|
33
|
+
"ms-vscode.makefile-tools",
|
|
34
|
+
"ms-vscode.vscode-typescript-next",
|
|
35
|
+
"ms-vscode-remote.remote-containers",
|
|
36
|
+
"oven.bun-vscode",
|
|
37
|
+
"reduckted.vscode-gitweblinks",
|
|
38
|
+
"remcohaszing.schemastore",
|
|
39
|
+
"rust-lang.rust-analyzer",
|
|
40
|
+
"sst-dev.opencode",
|
|
41
|
+
"Supabase.vscode-supabase-extension",
|
|
42
|
+
"tamasfe.even-better-toml",
|
|
43
|
+
"bradlc.vscode-tailwindcss",
|
|
44
|
+
"antfu.vite",
|
|
45
|
+
"bierner.markdown-checkbox",
|
|
46
|
+
"bierner.markdown-emoji",
|
|
47
|
+
"bierner.markdown-preview-github-styles",
|
|
48
|
+
"wilsonsio.color-vision",
|
|
49
|
+
"yoavbls.pretty-ts-errors"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"mounts": [
|
|
54
|
+
// Claude Code config (writable — Claude writes sessions, memory, cache)
|
|
55
|
+
"source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind,consistency=cached",
|
|
56
|
+
"source=${localEnv:HOME}/.claude.json,target=/home/vscode/.claude.json,type=bind,consistency=cached",
|
|
57
|
+
// OpenAI Codex CLI
|
|
58
|
+
"source=${localEnv:HOME}/.cpdex,target=/home/vscode/.codex,type=bind,consistency=cached",
|
|
59
|
+
// Skills + agents (read-only — managed in ~/.agents on host)
|
|
60
|
+
"source=${localEnv:HOME}/.agents,target=/home/vscode/.agents,type=bind,readonly,consistency=cached",
|
|
61
|
+
// Shell / git identity (read-only)
|
|
62
|
+
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,readonly,consistency=cached",
|
|
63
|
+
"source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,readonly,consistency=cached",
|
|
64
|
+
// GitHub CLI auth (read-only)
|
|
65
|
+
"source=${localEnv:HOME}/.config/gh,target=/home/vscode/.config/gh,type=bind,readonly,consistency=cached",
|
|
66
|
+
// Local repos (read-only) — makes MCP server paths from settings.json resolve
|
|
67
|
+
// via the /Users/joe → /home/vscode symlink added in the Dockerfile
|
|
68
|
+
"source=${localEnv:HOME}/github/joeblackwaslike,target=/home/vscode/github/joeblackwaslike,type=bind,readonly,consistency=cached",
|
|
69
|
+
// opencode (read-only — managed on host)
|
|
70
|
+
"source=${localEnv:HOME}/.config/opencode,target=/home/vscode/.config/opencode,type=bind,readonly,consistency=cached",
|
|
71
|
+
"source=${localEnv:HOME}/.local/share/opencode,target=/home/vscode/.local/share/opencode,type=bind,readonly,consistency=cached",
|
|
72
|
+
// Gemini CLI (writable — writes session history, settings, state)
|
|
73
|
+
"source=${localEnv:HOME}/.gemini,target=/home/vscode/.gemini,type=bind,consistency=cached",
|
|
74
|
+
// openclaw identity + workspace (writable — writes credentials, logs, workspace state)
|
|
75
|
+
"source=${localEnv:HOME}/.openclaw,target=/home/vscode/.openclaw,type=bind,consistency=cached",
|
|
76
|
+
// Docker socket (OrbStack on macOS)
|
|
77
|
+
"source=${localEnv:HOME}/.orbstack/run/docker.sock,target=/var/run/docker.sock,type=bind,consistency=cached"
|
|
78
|
+
],
|
|
79
|
+
"remoteEnv": {
|
|
80
|
+
// Anthropic / Claude
|
|
81
|
+
"ANTHROPIC_API_KEY": "${localEnv:ANTHROPIC_API_KEY}",
|
|
82
|
+
"ANTHROPIC_MODEL": "${localEnv:ANTHROPIC_MODEL}",
|
|
83
|
+
"ANTHROPIC_SMALL_FAST_MODEL": "${localEnv:ANTHROPIC_SMALL_FAST_MODEL}",
|
|
84
|
+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
|
|
85
|
+
"ENABLE_EXPERIMENTAL_MCP_CLI": "true",
|
|
86
|
+
// OpenAI / Codex
|
|
87
|
+
"OPENAI_API_KEY": "${localEnv:OPENAI_API_KEY}",
|
|
88
|
+
"OPENAI_ORG_ID": "${localEnv:OPENAI_ORG_ID}",
|
|
89
|
+
// 1Password CLI — no mountable socket on this host; use service account token instead.
|
|
90
|
+
// Generate one at https://developer.1password.com/docs/service-accounts/
|
|
91
|
+
// then export OP_SERVICE_ACCOUNT_TOKEN in your shell before opening the container.
|
|
92
|
+
"OP_SERVICE_ACCOUNT_TOKEN": "${localEnv:OP_SERVICE_ACCOUNT_TOKEN}",
|
|
93
|
+
// MCP server API keys
|
|
94
|
+
"CONTEXT7_API_KEY": "${localEnv:CONTEXT7_API_KEY}",
|
|
95
|
+
"EXA_API_KEY": "${localEnv:EXA_API_KEY}",
|
|
96
|
+
"TAVILY_API_KEY": "${localEnv:TAVILY_API_KEY}",
|
|
97
|
+
"FIRECRAWL_API_KEY": "${localEnv:FIRECRAWL_API_KEY}",
|
|
98
|
+
"PERPLEXITY_API_KEY": "${localEnv:PERPLEXITY_API_KEY}",
|
|
99
|
+
"BRAVE_API_KEY": "${localEnv:BRAVE_API_KEY}",
|
|
100
|
+
"REF_API_KEY": "${localEnv:REF_API_KEY}",
|
|
101
|
+
// opencode
|
|
102
|
+
"OPENCODE_AGENT_SKILLS_SUPERPOWERS_MODE": "true"
|
|
103
|
+
},
|
|
104
|
+
"postCreateCommand": "/usr/local/share/devcontainer/scripts/setup.sh",
|
|
105
|
+
"postAttachCommand": "/usr/local/share/devcontainer/scripts/discover-deps.sh"
|
|
106
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Bootstrap the shared devcontainer configuration into any project directory.
|
|
3
|
+
#
|
|
4
|
+
# INSTALL (add to ~/.zshrc or ~/.aliases.zsh on your host machine):
|
|
5
|
+
# alias devcontainer-init='~/github/joeblackwaslike/devcontainer/.devcontainer/scripts/init-project.sh'
|
|
6
|
+
#
|
|
7
|
+
# USAGE:
|
|
8
|
+
# devcontainer-init [target-dir] [options]
|
|
9
|
+
#
|
|
10
|
+
# OPTIONS:
|
|
11
|
+
# --name NAME Override container name (default: project directory name)
|
|
12
|
+
# --force Overwrite existing .devcontainer/ without prompting
|
|
13
|
+
# --dry-run Show what would be done without writing any files
|
|
14
|
+
# --help Show this help
|
|
15
|
+
|
|
16
|
+
set -euo pipefail
|
|
17
|
+
|
|
18
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
19
|
+
DEVCONTAINER_SRC="$(dirname "$SCRIPT_DIR")" # .devcontainer/ dir in this repo
|
|
20
|
+
|
|
21
|
+
TARGET_DIR=""
|
|
22
|
+
CONTAINER_NAME=""
|
|
23
|
+
FORCE=0
|
|
24
|
+
DRY_RUN=0
|
|
25
|
+
|
|
26
|
+
# ── Argument parsing ──────────────────────────────────────────────────────────
|
|
27
|
+
|
|
28
|
+
usage() {
|
|
29
|
+
cat <<EOF
|
|
30
|
+
Usage: devcontainer-init [target-dir] [options]
|
|
31
|
+
|
|
32
|
+
Bootstrap the shared Claude Code devcontainer config into a project.
|
|
33
|
+
|
|
34
|
+
Arguments:
|
|
35
|
+
target-dir Project directory to initialize (default: current dir)
|
|
36
|
+
|
|
37
|
+
Options:
|
|
38
|
+
--name NAME Override the devcontainer name (default: project dir name)
|
|
39
|
+
--force Overwrite an existing .devcontainer/ directory
|
|
40
|
+
--dry-run Print what would happen without writing anything
|
|
41
|
+
--help Show this help
|
|
42
|
+
|
|
43
|
+
After running, open VS Code and choose:
|
|
44
|
+
"Dev Containers: Reopen in Container"
|
|
45
|
+
|
|
46
|
+
To customize for a specific project, edit:
|
|
47
|
+
<project>/.devcontainer/custom-setup.sh
|
|
48
|
+
|
|
49
|
+
See .devcontainer/DISCOVER-DEPS.md for full documentation.
|
|
50
|
+
EOF
|
|
51
|
+
exit 0
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
while [[ $# -gt 0 ]]; do
|
|
55
|
+
case "$1" in
|
|
56
|
+
--help|-h) usage ;;
|
|
57
|
+
--force) FORCE=1; shift ;;
|
|
58
|
+
--dry-run) DRY_RUN=1; shift ;;
|
|
59
|
+
--name) CONTAINER_NAME="$2"; shift 2 ;;
|
|
60
|
+
-*) echo "Unknown option: $1" >&2; usage ;;
|
|
61
|
+
*) TARGET_DIR="$1"; shift ;;
|
|
62
|
+
esac
|
|
63
|
+
done
|
|
64
|
+
|
|
65
|
+
TARGET_DIR="$(cd "${TARGET_DIR:-.}" && pwd)"
|
|
66
|
+
PROJECT_NAME="${CONTAINER_NAME:-$(basename "$TARGET_DIR")}"
|
|
67
|
+
|
|
68
|
+
# ── Preflight checks ──────────────────────────────────────────────────────────
|
|
69
|
+
|
|
70
|
+
if [ ! -d "$TARGET_DIR/.git" ]; then
|
|
71
|
+
echo "error: $TARGET_DIR is not a git repository root" >&2
|
|
72
|
+
exit 1
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
DEST="$TARGET_DIR/.devcontainer"
|
|
76
|
+
|
|
77
|
+
if [ -d "$DEST" ] && [ "$FORCE" = "0" ]; then
|
|
78
|
+
echo "error: $DEST already exists — use --force to overwrite" >&2
|
|
79
|
+
exit 1
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
# ── Summary ───────────────────────────────────────────────────────────────────
|
|
83
|
+
|
|
84
|
+
echo "devcontainer-init"
|
|
85
|
+
echo " source : $DEVCONTAINER_SRC"
|
|
86
|
+
echo " target : $DEST"
|
|
87
|
+
echo " name : $PROJECT_NAME"
|
|
88
|
+
[ "$DRY_RUN" = "1" ] && echo " mode : DRY RUN (no files written)"
|
|
89
|
+
echo ""
|
|
90
|
+
|
|
91
|
+
# ── Copy devcontainer source ──────────────────────────────────────────────────
|
|
92
|
+
|
|
93
|
+
if [ "$DRY_RUN" = "0" ]; then
|
|
94
|
+
[ -d "$DEST" ] && rm -rf "$DEST"
|
|
95
|
+
cp -r "$DEVCONTAINER_SRC" "$DEST"
|
|
96
|
+
echo " copied .devcontainer/"
|
|
97
|
+
else
|
|
98
|
+
echo " [dry] would copy $DEVCONTAINER_SRC → $DEST"
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
# ── Update container name in devcontainer.json ───────────────────────────────
|
|
102
|
+
|
|
103
|
+
DEVCONTAINER_JSON="$DEST/devcontainer.json"
|
|
104
|
+
if [ -f "$DEVCONTAINER_JSON" ] && [ "$DRY_RUN" = "0" ]; then
|
|
105
|
+
python3 - "$DEVCONTAINER_JSON" "$PROJECT_NAME" <<'PY'
|
|
106
|
+
import json, sys
|
|
107
|
+
path, name = sys.argv[1], sys.argv[2]
|
|
108
|
+
with open(path) as f:
|
|
109
|
+
cfg = json.load(f)
|
|
110
|
+
cfg["name"] = name
|
|
111
|
+
# Use the pre-built image in target projects — no per-project build needed
|
|
112
|
+
cfg.pop("build", None)
|
|
113
|
+
cfg["image"] = "ghcr.io/joeblackwaslike/devcontainer:latest"
|
|
114
|
+
with open(path, "w") as f:
|
|
115
|
+
json.dump(cfg, f, indent=2)
|
|
116
|
+
f.write("\n")
|
|
117
|
+
PY
|
|
118
|
+
echo " set devcontainer name: $PROJECT_NAME"
|
|
119
|
+
echo " set image: ghcr.io/joeblackwaslike/devcontainer:latest"
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
# ── Create custom-setup.sh stub ───────────────────────────────────────────────
|
|
123
|
+
|
|
124
|
+
CUSTOM_SETUP="$DEST/custom-setup.sh"
|
|
125
|
+
if [ "$DRY_RUN" = "0" ] && [ ! -f "$CUSTOM_SETUP" ]; then
|
|
126
|
+
cat > "$CUSTOM_SETUP" <<'STUB'
|
|
127
|
+
#!/usr/bin/env bash
|
|
128
|
+
# Project-specific devcontainer setup hook.
|
|
129
|
+
# Called by .devcontainer/scripts/discover-deps.sh on every container attach,
|
|
130
|
+
# after automatic dependency detection.
|
|
131
|
+
#
|
|
132
|
+
# See .devcontainer/DISCOVER-DEPS.md for documentation and examples.
|
|
133
|
+
#
|
|
134
|
+
# Examples:
|
|
135
|
+
# npm install -g @myorg/internal-cli
|
|
136
|
+
# psql -U postgres -c "CREATE DATABASE myapp;" 2>/dev/null || true
|
|
137
|
+
# export MY_PROJECT_ENV=devcontainer
|
|
138
|
+
STUB
|
|
139
|
+
chmod +x "$CUSTOM_SETUP"
|
|
140
|
+
echo " created custom-setup.sh stub"
|
|
141
|
+
fi
|
|
142
|
+
|
|
143
|
+
# ── Offer to add .devcontainer/ to .gitignore ─────────────────────────────────
|
|
144
|
+
# The devcontainer template is maintained centrally in this repo.
|
|
145
|
+
# Projects typically don't need to commit it.
|
|
146
|
+
|
|
147
|
+
GITIGNORE="$TARGET_DIR/.gitignore"
|
|
148
|
+
if [ "$DRY_RUN" = "0" ] && [ -f "$GITIGNORE" ] \
|
|
149
|
+
&& ! grep -q '^\.devcontainer' "$GITIGNORE" 2>/dev/null; then
|
|
150
|
+
echo ""
|
|
151
|
+
echo " The devcontainer template is maintained centrally."
|
|
152
|
+
echo " Add .devcontainer/ to $PROJECT_NAME/.gitignore?"
|
|
153
|
+
read -rp " [y/N] " answer
|
|
154
|
+
if [[ "${answer,,}" == "y" ]]; then
|
|
155
|
+
echo ".devcontainer" >> "$GITIGNORE"
|
|
156
|
+
echo " added .devcontainer to .gitignore"
|
|
157
|
+
fi
|
|
158
|
+
fi
|
|
159
|
+
|
|
160
|
+
# ── Done ──────────────────────────────────────────────────────────────────────
|
|
161
|
+
|
|
162
|
+
echo ""
|
|
163
|
+
echo "Done! Next steps:"
|
|
164
|
+
echo " 1. cd $TARGET_DIR"
|
|
165
|
+
echo " 2. code . (open in VS Code)"
|
|
166
|
+
echo " 3. 'Dev Containers: Reopen in Container'"
|
|
167
|
+
echo " 4. Edit .devcontainer/custom-setup.sh for project-specific setup"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the bug**
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
**To Reproduce**
|
|
13
|
+
Steps to reproduce the behavior.
|
|
14
|
+
|
|
15
|
+
**Expected behavior**
|
|
16
|
+
What you expected to happen.
|
|
17
|
+
|
|
18
|
+
**Environment**
|
|
19
|
+
- OS:
|
|
20
|
+
- Node version:
|
|
21
|
+
- Package version:
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Is your feature request related to a problem?**
|
|
10
|
+
A clear and concise description of the problem.
|
|
11
|
+
|
|
12
|
+
**Describe the solution you'd like**
|
|
13
|
+
|
|
14
|
+
**Additional context**
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Setup Node Environment
|
|
2
|
+
description: Install Node.js and pnpm dependencies
|
|
3
|
+
|
|
4
|
+
runs:
|
|
5
|
+
using: composite
|
|
6
|
+
steps:
|
|
7
|
+
- name: Setup pnpm
|
|
8
|
+
uses: pnpm/action-setup@v4
|
|
9
|
+
with:
|
|
10
|
+
version: latest
|
|
11
|
+
|
|
12
|
+
- name: Setup Node.js
|
|
13
|
+
uses: actions/setup-node@v4
|
|
14
|
+
with:
|
|
15
|
+
node-version-file: .nvmrc
|
|
16
|
+
cache: pnpm
|
|
17
|
+
|
|
18
|
+
- name: Install dependencies
|
|
19
|
+
shell: bash
|
|
20
|
+
run: pnpm install --frozen-lockfile
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: npm
|
|
4
|
+
directory: /
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
labels:
|
|
8
|
+
- dependencies
|
|
9
|
+
open-pull-requests-limit: 10
|
|
10
|
+
|
|
11
|
+
- package-ecosystem: github-actions
|
|
12
|
+
directory: /
|
|
13
|
+
schedule:
|
|
14
|
+
interval: weekly
|
|
15
|
+
labels:
|
|
16
|
+
- ci
|
|
17
|
+
- dependencies
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
quality:
|
|
15
|
+
name: Quality
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- uses: ./.github/actions/setup-node-env
|
|
21
|
+
|
|
22
|
+
- name: Biome
|
|
23
|
+
run: pnpm exec biome ci .
|
|
24
|
+
|
|
25
|
+
- name: ESLint
|
|
26
|
+
run: pnpm exec eslint . --max-warnings=0
|
|
27
|
+
|
|
28
|
+
- name: Typecheck
|
|
29
|
+
run: pnpm typecheck
|
|
30
|
+
|
|
31
|
+
- name: Dependency check
|
|
32
|
+
run: pnpm depcheck
|
|
33
|
+
|
|
34
|
+
test:
|
|
35
|
+
name: Test (Node ${{ matrix.node-version }})
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
strategy:
|
|
38
|
+
matrix:
|
|
39
|
+
node-version: [20, 22]
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- uses: pnpm/action-setup@v4
|
|
44
|
+
with:
|
|
45
|
+
version: latest
|
|
46
|
+
|
|
47
|
+
- name: Setup Node.js ${{ matrix.node-version }}
|
|
48
|
+
uses: actions/setup-node@v4
|
|
49
|
+
with:
|
|
50
|
+
node-version: ${{ matrix.node-version }}
|
|
51
|
+
cache: pnpm
|
|
52
|
+
|
|
53
|
+
- name: Install dependencies
|
|
54
|
+
run: pnpm install --frozen-lockfile
|
|
55
|
+
|
|
56
|
+
- name: Run tests
|
|
57
|
+
run: pnpm test:coverage
|
|
58
|
+
|
|
59
|
+
- name: Upload coverage
|
|
60
|
+
uses: codecov/codecov-action@v4
|
|
61
|
+
with:
|
|
62
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
63
|
+
fail_ci_if_error: false
|
|
64
|
+
|
|
65
|
+
build:
|
|
66
|
+
name: Build
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v4
|
|
70
|
+
- uses: ./.github/actions/setup-node-env
|
|
71
|
+
- name: Build
|
|
72
|
+
run: pnpm build
|
|
73
|
+
|
|
74
|
+
docs:
|
|
75
|
+
name: Docs
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@v4
|
|
79
|
+
- uses: ./.github/actions/setup-node-env
|
|
80
|
+
- name: Build docs
|
|
81
|
+
run: pnpm docs:build
|
|
82
|
+
|
|
83
|
+
dependency-review:
|
|
84
|
+
name: Dependency Review
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
if: github.event_name == 'pull_request'
|
|
87
|
+
permissions:
|
|
88
|
+
contents: read
|
|
89
|
+
pull-requests: read
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v4
|
|
92
|
+
|
|
93
|
+
- uses: actions/dependency-review-action@v4
|
|
94
|
+
with:
|
|
95
|
+
fail-on-severity: moderate
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '30 1 * * 1'
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
security-events: write
|
|
13
|
+
actions: read
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
analyze:
|
|
18
|
+
name: Analyze
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- uses: github/codeql-action/init@v3
|
|
24
|
+
with:
|
|
25
|
+
languages: javascript-typescript
|
|
26
|
+
|
|
27
|
+
- uses: github/codeql-action/autobuild@v3
|
|
28
|
+
|
|
29
|
+
- uses: github/codeql-action/analyze@v3
|
|
30
|
+
with:
|
|
31
|
+
category: /language:javascript-typescript
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Labeler
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
label:
|
|
13
|
+
name: Label PR
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/labeler@v5
|
|
17
|
+
with:
|
|
18
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release-please:
|
|
13
|
+
name: Release Please
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
outputs:
|
|
16
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
17
|
+
steps:
|
|
18
|
+
- uses: googleapis/release-please-action@v4
|
|
19
|
+
id: release
|
|
20
|
+
with:
|
|
21
|
+
config-file: .github/release-please-config.json
|
|
22
|
+
manifest-file: .github/.release-please-manifest.json
|
|
23
|
+
|
|
24
|
+
publish:
|
|
25
|
+
name: Publish to npm
|
|
26
|
+
needs: release-please
|
|
27
|
+
if: ${{ needs.release-please.outputs.release_created }}
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
id-token: write
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- uses: pnpm/action-setup@v4
|
|
36
|
+
with:
|
|
37
|
+
version: latest
|
|
38
|
+
|
|
39
|
+
- uses: actions/setup-node@v4
|
|
40
|
+
with:
|
|
41
|
+
node-version-file: .nvmrc
|
|
42
|
+
cache: pnpm
|
|
43
|
+
registry-url: https://registry.npmjs.org
|
|
44
|
+
|
|
45
|
+
- run: pnpm install --frozen-lockfile
|
|
46
|
+
|
|
47
|
+
- run: pnpm build
|
|
48
|
+
|
|
49
|
+
- run: pnpm publish --access public --provenance --no-git-checks
|
|
50
|
+
env:
|
|
51
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
52
|
+
|
|
53
|
+
deploy-docs:
|
|
54
|
+
name: Deploy docs
|
|
55
|
+
needs: release-please
|
|
56
|
+
if: ${{ needs.release-please.outputs.release_created }}
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
permissions:
|
|
59
|
+
contents: write
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
|
|
63
|
+
- uses: ./.github/actions/setup-node-env
|
|
64
|
+
|
|
65
|
+
- name: Build docs
|
|
66
|
+
run: pnpm docs:build
|
|
67
|
+
|
|
68
|
+
- name: Deploy to GitHub Pages
|
|
69
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
70
|
+
with:
|
|
71
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
72
|
+
publish_dir: ./build
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Stale
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 0 * * *'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
issues: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
stale:
|
|
14
|
+
name: Mark stale
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/stale@v9
|
|
18
|
+
with:
|
|
19
|
+
days-before-issue-stale: 60
|
|
20
|
+
days-before-issue-close: 7
|
|
21
|
+
days-before-pr-stale: 30
|
|
22
|
+
days-before-pr-close: -1
|
|
23
|
+
stale-issue-message: >
|
|
24
|
+
This issue has been automatically marked as stale due to 60 days of
|
|
25
|
+
inactivity. It will be closed in 7 days unless there is new activity.
|
|
26
|
+
close-issue-message: >
|
|
27
|
+
Closing due to inactivity. Please reopen if this is still relevant.
|
|
28
|
+
stale-pr-message: >
|
|
29
|
+
This PR has been automatically marked as stale due to 30 days of
|
|
30
|
+
inactivity. It will not be auto-closed — please ping when ready to resume.
|
|
31
|
+
exempt-issue-labels: 'pinned,security,in-progress'
|
|
32
|
+
exempt-pr-labels: 'pinned,security,in-progress'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pnpm commitlint --edit "$1"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pnpm lint-staged
|
package/template/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__NODE_VERSION__
|