-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 338192d
Showing
9 changed files
with
4,942 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run tests | ||
run: pnpm test | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Publish to NPM | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Publish to NPM | ||
run: pnpm publish --no-git-checks | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Dependencies | ||
node_modules/ | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
package-lock.json | ||
yarn.lock | ||
|
||
# TypeScript | ||
dist/ | ||
*.tsbuildinfo | ||
|
||
# IDE & Editors | ||
.idea/ | ||
.vscode/ | ||
*.swp | ||
*.swo | ||
.DS_Store | ||
.env | ||
|
||
# Testing | ||
coverage/ | ||
|
||
# Logs | ||
logs/ | ||
*.log | ||
|
||
# Temporary files | ||
tmp/ | ||
temp/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Arch gen | ||
|
||
Tool to generate ARCHITECTURE file with mono repo diagrams with single command | ||
|
||
## Requirements | ||
|
||
- pnpm | ||
- monorepo | ||
|
||
## Usage | ||
|
||
```bash | ||
npx arch-gen | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import eslint from '@eslint/js'; | ||
import tseslint from '@typescript-eslint/eslint-plugin'; | ||
import tseslintParser from '@typescript-eslint/parser'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
|
||
const compat = new FlatCompat(); | ||
|
||
export default [ | ||
eslint.configs.recommended, | ||
...compat.extends('plugin:@typescript-eslint/recommended'), | ||
{ | ||
files: ['**/*.ts'], | ||
languageOptions: { | ||
parser: tseslintParser, | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
}, | ||
plugins: { | ||
'@typescript-eslint': tseslint, | ||
}, | ||
rules: { | ||
// TypeScript specific rules | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], | ||
|
||
// General rules | ||
'no-debugger': 'warn', | ||
'no-duplicate-imports': 'error', | ||
'no-unused-vars': 'off', // Turned off in favor of @typescript-eslint/no-unused-vars | ||
}, | ||
}, | ||
{ | ||
ignores: ['dist/**', 'node_modules/**'], | ||
}, | ||
]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"name": "@tonik/arch-gen", | ||
"version": "1.0.0", | ||
"description": "Architecture generator CLI tool", | ||
"main": "dist/index.js", | ||
"type": "module", | ||
"bin": { | ||
"arch-gen": "./dist/index.js" | ||
}, | ||
"files": [ | ||
"dist", | ||
"README.md" | ||
], | ||
"scripts": { | ||
"build": "tsup src/index.ts --format esm", | ||
"dev": "tsx src/index.ts", | ||
"clean": "rimraf dist", | ||
"prebuild": "pnpm run clean", | ||
"start": "node dist/index.js", | ||
"test": "vitest", | ||
"typecheck": "tsc --noEmit", | ||
"lint": "eslint", | ||
"format": "prettier --write ." | ||
}, | ||
"keywords": [ | ||
"cli", | ||
"architecture", | ||
"generator" | ||
], | ||
"author": "", | ||
"license": "ISC", | ||
"packageManager": "[email protected]+sha512.88c9c3864450350e65a33587ab801acf946d7c814ed1134da4a924f6df5a2120fd36b46aab68f7cd1d413149112d53c7db3a4136624cfd00ff1846a0c6cef48a", | ||
"dependencies": { | ||
"@ai-sdk/openai": "^1.0.2", | ||
"ai": "^4.0.2", | ||
"chalk": "^5.3.0", | ||
"commander": "^11.0.0", | ||
"fs-extra": "^11.1.1", | ||
"handlebars": "^4.7.8", | ||
"inquirer": "^9.2.11", | ||
"mermaid": "^10.6.0", | ||
"tsx": "^4.19.2", | ||
"zod": "^3.22.4" | ||
}, | ||
"devDependencies": { | ||
"@types/fs-extra": "^11.0.2", | ||
"@types/inquirer": "^9.0.6", | ||
"@types/node": "^20.11.16", | ||
"@typescript-eslint/eslint-plugin": "^8.15.0", | ||
"@typescript-eslint/parser": "^8.15.0", | ||
"eslint": "^9.15.0", | ||
"prettier": "^3.0.3", | ||
"rimraf": "^5.0.5", | ||
"tsup": "^8.3.5", | ||
"typescript": "^5.2.2", | ||
"vitest": "^2.0.0" | ||
}, | ||
"engines": { | ||
"node": "20 || >=22" | ||
} | ||
} |
Oops, something went wrong.