Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
goszczynskip committed Nov 20, 2024
0 parents commit 338192d
Show file tree
Hide file tree
Showing 9 changed files with 4,942 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
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

35 changes: 35 additions & 0 deletions .github/workflows/release.yml
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 }}

39 changes: 39 additions & 0 deletions .gitignore
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
14 changes: 14 additions & 0 deletions README.md
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
```
40 changes: 40 additions & 0 deletions eslint.config.js
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/**'],
},
];

61 changes: 61 additions & 0 deletions package.json
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"
}
}
Loading

0 comments on commit 338192d

Please sign in to comment.