Skip to content

Commit afe6c20

Browse files
first commit
0 parents  commit afe6c20

File tree

222 files changed

+13022
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+13022
-0
lines changed

.eslintrc.cjs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
parserOptions: {
5+
ecmaVersion: 2022,
6+
sourceType: 'module',
7+
project: './tsconfig.lint.json',
8+
},
9+
plugins: ['@typescript-eslint'],
10+
extends: [
11+
'eslint:recommended',
12+
'plugin:@typescript-eslint/recommended',
13+
'prettier',
14+
],
15+
env: {
16+
node: true,
17+
es2022: true,
18+
},
19+
rules: {
20+
'@typescript-eslint/no-explicit-any': 'off',
21+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
22+
'@typescript-eslint/explicit-function-return-type': 'off',
23+
'@typescript-eslint/no-non-null-assertion': 'off',
24+
'@typescript-eslint/ban-ts-comment': 'off',
25+
'no-console': 'off',
26+
'@typescript-eslint/no-var-requires': 'off',
27+
'no-empty': 'off',
28+
'no-useless-escape': 'off',
29+
},
30+
ignorePatterns: [
31+
'dist',
32+
'node_modules',
33+
'*.js',
34+
'*.mjs',
35+
'templates',
36+
'scripts',
37+
],
38+
};

.github/workflows/ci.yml

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main, dev]
8+
9+
jobs:
10+
test:
11+
name: Test on Node ${{ matrix.node }} and ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
matrix:
16+
node: [18.x, 20.x, 22.x]
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node }}
27+
28+
- name: Setup pnpm
29+
uses: pnpm/action-setup@v2
30+
with:
31+
version: 10
32+
33+
- name: Get pnpm store directory
34+
id: pnpm-cache
35+
shell: bash
36+
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
37+
38+
- name: Setup pnpm cache
39+
uses: actions/cache@v3
40+
with:
41+
path: ${{ steps.pnpm-cache.outputs.dir }}
42+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
45+
46+
- name: Install dependencies
47+
run: pnpm install --frozen-lockfile
48+
49+
- name: Build packages
50+
run: pnpm build
51+
52+
- name: Verify build artifacts
53+
shell: bash
54+
run: |
55+
if [ ! -f "packages/backforge-core/dist/cli/index.js" ]; then
56+
echo "Error: backforge-core CLI not built"
57+
exit 1
58+
fi
59+
if [ ! -f "packages/backforge-core/dist/index.js" ]; then
60+
echo "Error: backforge-core main entry not built"
61+
exit 1
62+
fi
63+
echo "Build artifacts verified"
64+
65+
- name: Verify templates exist
66+
shell: bash
67+
run: |
68+
TEMPLATE_COUNT=$(find packages/backforge-core/src/scaffold/templates/stacks -type d -name "*-*-*" | wc -l)
69+
if [ "$TEMPLATE_COUNT" -ne 8 ]; then
70+
echo "Error: Expected 8 templates, found $TEMPLATE_COUNT"
71+
exit 1
72+
fi
73+
echo "All 8 templates verified"
74+
75+
- name: Verify CLI executable
76+
shell: bash
77+
run: |
78+
node packages/backforge-core/dist/cli/index.js --help
79+
echo "CLI help command successful"
80+
81+
82+
lint:
83+
name: Lint
84+
runs-on: ubuntu-latest
85+
86+
steps:
87+
- name: Checkout code
88+
uses: actions/checkout@v4
89+
90+
- name: Setup Node.js
91+
uses: actions/setup-node@v4
92+
with:
93+
node-version: 20.x
94+
95+
- name: Setup pnpm
96+
uses: pnpm/action-setup@v2
97+
with:
98+
version: 10
99+
100+
- name: Install dependencies
101+
run: pnpm install --frozen-lockfile
102+
103+
- name: Run linter (if configured)
104+
run: pnpm lint || echo "Linting not configured"
105+
continue-on-error: true
106+
107+
publish-check:
108+
name: Check Publishing Readiness
109+
runs-on: ubuntu-latest
110+
111+
steps:
112+
- name: Checkout code
113+
uses: actions/checkout@v4
114+
115+
- name: Setup Node.js
116+
uses: actions/setup-node@v4
117+
with:
118+
node-version: 20.x
119+
120+
- name: Setup pnpm
121+
uses: pnpm/action-setup@v2
122+
with:
123+
version: 10
124+
125+
- name: Install dependencies
126+
run: pnpm install --frozen-lockfile
127+
128+
- name: Build
129+
run: pnpm build
130+
131+
- name: Check package files
132+
run: |
133+
echo "Checking backforge-core..."
134+
cd packages/backforge-core
135+
npm pack --dry-run
136+
137+
echo "Checking create-backforge..."
138+
cd ../create-backforge
139+
npm pack --dry-run
140+
141+
echo "Checking backforge-cli..."
142+
cd ../backforge-cli
143+
npm pack --dry-run
144+
145+
echo "All packages ready for publishing!"

.gitignore

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional stylelint cache
57+
.stylelintcache
58+
59+
# Optional REPL history
60+
.node_repl_history
61+
62+
# Output of 'npm pack'
63+
*.tgz
64+
65+
# Yarn Integrity file
66+
.yarn-integrity
67+
68+
# dotenv environment variable files (needed for templates)
69+
# .env
70+
# .env.*
71+
# !.env.example
72+
73+
# parcel-bundler cache (https://parceljs.org/)
74+
.cache
75+
.parcel-cache
76+
77+
# Next.js build output
78+
.next
79+
out
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and not Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# vuepress v2.x temp and cache directory
95+
.temp
96+
.cache
97+
98+
# Sveltekit cache directory
99+
.svelte-kit/
100+
101+
# vitepress build output
102+
**/.vitepress/dist
103+
104+
# vitepress cache directory
105+
**/.vitepress/cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# Firebase cache directory
120+
.firebase/
121+
122+
# TernJS port file
123+
.tern-port
124+
125+
# Stores VSCode versions used for testing VSCode extensions
126+
.vscode-test
127+
128+
# yarn v3
129+
.pnp.*
130+
.yarn/*
131+
!.yarn/patches
132+
!.yarn/plugins
133+
!.yarn/releases
134+
!.yarn/sdks
135+
!.yarn/versions
136+
137+
# Vite logs files
138+
vite.config.js.timestamp-*
139+
vite.config.ts.timestamp-*
140+
141+
# Lock files (not needed for CLI libs)
142+
# package-lock.json
143+
yarn.lock
144+
# pnpm-lock.yaml

.npmignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# ======================================
2+
# npm publish ignore list for BackForge
3+
# ======================================
4+
5+
# Development artifacts
6+
node_modules
7+
dist-dev
8+
coverage
9+
.DS_Store
10+
11+
# Source & config files
12+
src/
13+
tsconfig.json
14+
tsconfig.*.json
15+
tsup.config.*
16+
.eslintrc*
17+
.prettierrc*
18+
.prettierignore
19+
.nvmrc
20+
.npmrc
21+
22+
# Git / CI / Editor metadata
23+
.git/
24+
.github/
25+
.vscode/
26+
.idea/
27+
.editorconfig
28+
29+
# Environment files (needed for templates)
30+
# .env
31+
# .env.*
32+
# .env.example
33+
34+
# Logs
35+
npm-debug.log*
36+
yarn-debug.log*
37+
pnpm-debug.log*
38+
*.log
39+
40+
# Miscellaneous
41+
*.swp
42+
*.swo
43+
Thumbs.db

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dist
2+
node_modules
3+
*.min.js
4+
coverage
5+
.pnpm-store
6+
pnpm-lock.yaml
7+
*.log

.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"endOfLine": "lf"
8+
}

0 commit comments

Comments
 (0)