9 Commits

Author SHA1 Message Date
898db0c22f Merge branch 'feature/move_to_monorepo' into develop
Some checks failed
/ check (20) (push) Failing after 5m42s
/ check (22) (push) Failing after 5m44s
2026-01-08 19:23:51 +01:00
82dee80c0d chore: setup nvm
Some checks failed
/ check (20) (push) Failing after 5m37s
/ check (22) (push) Failing after 5m38s
Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
2026-01-08 19:22:13 +01:00
aae0b245f3 fix: extend correct tsconfig
Some checks failed
/ check (20) (push) Failing after 8m24s
/ check (22) (push) Failing after 8m31s
Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
2026-01-08 19:11:17 +01:00
926a2b1de8 refactor: update gitignore
Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
2025-12-22 02:24:37 +01:00
0dd85ff63b fix(ci.yaml): run turbo from pnpm
Some checks failed
/ check (20) (push) Failing after 28s
/ check (22) (push) Failing after 26s
Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
2025-12-22 00:13:04 +01:00
9c1e87da41 fix: turbo check-types -> check
Some checks failed
/ check (20) (push) Failing after 21s
/ check (22) (push) Failing after 20s
Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
2025-12-22 00:10:20 +01:00
512adab923 ci: add packageManager to package.json
Some checks failed
/ check (20) (push) Failing after 26s
/ check (22) (push) Failing after 26s
Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
2025-12-22 00:03:35 +01:00
39e222fa55 wip: template
Some checks failed
/ check (20) (push) Failing after 3m33s
/ check (22) (push) Failing after 5s
Template will likely not be worked on for now

Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
2025-12-21 23:31:46 +01:00
4b9c721ffd feat: setup turbo, cleanup deps
Signed-off-by: Alix von Schirp <github@avonschirp.bootmedia.de>
2025-12-21 23:27:16 +01:00
11 changed files with 220 additions and 313 deletions

View File

@@ -19,4 +19,4 @@ jobs:
- name: Install
run: pnpm install
- name: Typecheck & Lint
run: SKIP_ENV_VALIDATION=true turbo check
run: SKIP_ENV_VALIDATION=true pnpm turbo check

145
.gitignore vendored
View File

@@ -1,38 +1,127 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
### Node template
# Logs
logs
*.log
lerna-debug.log*
# dependencies
/**/node_modules
/.pnp
.pnp.js
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# testing
/coverage
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# production
docs/
dist/
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# misc
.DS_Store
*.pem
# Coverage directory used by tools like istanbul
coverage
*.lcov
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# nyc test coverage
.nyc_output
# local env files
# do not commit any .env files to git, except for the .env.example file.
.env
.env*.local
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# typescript
*.tsbuildinfo
# Bower dependency directory (https://bower.io/)
bower_components
# eslint
.eslintcache
# node-waf configuration
.lock-wscript
# idea files
.idea
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
# Optional npm cache directory
.npm
# Optional eslint cache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
### Turbo template
# Turborepo task cache
.turbo

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
22

View File

@@ -26,31 +26,6 @@
"dependencies": {
"@cis-oss/pushover": "workspace:"
},
"devDependencies": {
"@eslint/js": "^9.22.0",
"@repo/configs": "workspace:",
"@shipgirl/typedoc-plugin-versions": "^0.3.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.13.10",
"eslint": "^9.22.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-only-warn": "^1.1.0",
"globals": "^16.0.0",
"jest": "^29.7.0",
"shx": "^0.4.0",
"ts-jest": "^29.2.6",
"tsx": "^4.19.3",
"typedoc": "^0.27.9",
"typedoc-github-theme": "^0.2.1",
"typedoc-plugin-coverage": "^3.4.1",
"typedoc-plugin-extras": "^4.0.0",
"typedoc-plugin-include-example": "^2.0.2",
"typedoc-plugin-inline-sources": "^1.2.1",
"typedoc-plugin-mdn-links": "^5.0.1",
"typedoc-plugin-zod": "^1.4.0",
"typescript": "^5.5.3",
"typescript-eslint": "^8.26.0"
},
"files": [
"dist/**/*.{js,ts,map}"
],

View File

@@ -26,31 +26,6 @@
"dependencies": {
"@cis-oss/pushover": "workspace:"
},
"devDependencies": {
"@repo/configs": "workspace:",
"@eslint/js": "^9.22.0",
"@shipgirl/typedoc-plugin-versions": "^0.3.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.13.10",
"eslint": "^9.22.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-only-warn": "^1.1.0",
"globals": "^16.0.0",
"jest": "^29.7.0",
"shx": "^0.4.0",
"ts-jest": "^29.2.6",
"tsx": "^4.19.3",
"typedoc": "^0.27.9",
"typedoc-github-theme": "^0.2.1",
"typedoc-plugin-coverage": "^3.4.1",
"typedoc-plugin-extras": "^4.0.0",
"typedoc-plugin-include-example": "^2.0.2",
"typedoc-plugin-inline-sources": "^1.2.1",
"typedoc-plugin-mdn-links": "^5.0.1",
"typedoc-plugin-zod": "^1.4.0",
"typescript": "^5.5.3",
"typescript-eslint": "^8.26.0"
},
"files": [
"dist/**/*.{js,ts,map}"
],

View File

@@ -1,9 +1,7 @@
{
"name": "@repo/root",
"description": "",
"files": [],
"private": true,
"license": "MIT",
"version": "0.0.0",
"author": {
"email": "hi@b00tload.space",
"name": "Alix von Schirp",
@@ -17,11 +15,15 @@
"husky": "^9.1.7",
"lint-staged": "^15.4.3",
"prettier": "3.5.3",
"simple-git": "^3.30.0",
"turbo": "^2.5.6"
},
"files": [],
"scripts": {
"prepare": "husky"
},
"private": true,
"license": "MIT",
"husky": {
"shell": "bash"
},
@@ -30,5 +32,5 @@
"*.{js,ts,jsx,tsx}": "eslint --fix .",
"*.{js,ts,jsx,tsx,json,css,md}": "prettier --write"
},
"version": "0.0.0"
"packageManager": "pnpm@10.26.1"
}

View File

@@ -28,28 +28,10 @@
},
"devDependencies": {
"@repo/configs": "workspace:",
"@eslint/js": "^9.22.0",
"@shipgirl/typedoc-plugin-versions": "^0.3.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.13.10",
"eslint": "^9.22.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-only-warn": "^1.1.0",
"globals": "^16.0.0",
"jest": "^29.7.0",
"shx": "^0.4.0",
"ts-jest": "^29.2.6",
"tsx": "^4.19.3",
"typedoc": "^0.27.9",
"typedoc-github-theme": "^0.2.1",
"typedoc-plugin-coverage": "^3.4.1",
"typedoc-plugin-extras": "^4.0.0",
"typedoc-plugin-include-example": "^2.0.2",
"typedoc-plugin-inline-sources": "^1.2.1",
"typedoc-plugin-mdn-links": "^5.0.1",
"typedoc-plugin-zod": "^1.4.0",
"typescript": "^5.5.3",
"typescript-eslint": "^8.26.0"
"tsx": "4.19.3",
"typescript": "5.5.3"
},
"files": [
"dist/**/*.{js,ts,map}"
@@ -81,7 +63,6 @@
"url": "https://github.com/jateute"
}
],
"packageManager": "pnpm@10.6.5",
"publishConfig": {
"main": "dist/index.js",
"types": "dist/index.d.ts"

View File

@@ -1,6 +1,7 @@
{
"extends": "@repo/configs/tsconfig.json",
"extends": "@repo/configs/tsconfig",
"compilerOptions": {
"outDir": "dist",
/* Path Aliases */
"baseUrl": "./src",
"paths": {

241
pnpm-lock.yaml generated
View File

@@ -29,6 +29,9 @@ importers:
prettier:
specifier: 3.5.3
version: 3.5.3
simple-git:
specifier: ^3.30.0
version: 3.30.0
turbo:
specifier: ^2.5.6
version: 2.5.6
@@ -101,152 +104,12 @@ importers:
'@cis-oss/pushover':
specifier: 'workspace:'
version: link:../../packages/pushover
devDependencies:
'@eslint/js':
specifier: ^9.22.0
version: 9.22.0
'@repo/configs':
specifier: 'workspace:'
version: link:../../config
'@shipgirl/typedoc-plugin-versions':
specifier: ^0.3.0
version: 0.3.0(typedoc@0.27.9(typescript@5.8.2))
'@types/jest':
specifier: ^29.5.14
version: 29.5.14
'@types/node':
specifier: ^22.13.10
version: 22.13.10
eslint:
specifier: ^9.22.0
version: 9.22.0
eslint-config-prettier:
specifier: ^10.1.1
version: 10.1.1(eslint@9.22.0)
eslint-plugin-only-warn:
specifier: ^1.1.0
version: 1.1.0
globals:
specifier: ^16.0.0
version: 16.0.0
jest:
specifier: ^29.7.0
version: 29.7.0(@types/node@22.13.10)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.8.2))
shx:
specifier: ^0.4.0
version: 0.4.0
ts-jest:
specifier: ^29.2.6
version: 29.3.2(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(jest@29.7.0(@types/node@22.13.10)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.8.2)))(typescript@5.8.2)
tsx:
specifier: ^4.19.3
version: 4.19.3
typedoc:
specifier: ^0.27.9
version: 0.27.9(typescript@5.8.2)
typedoc-github-theme:
specifier: ^0.2.1
version: 0.2.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-coverage:
specifier: ^3.4.1
version: 3.4.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-extras:
specifier: ^4.0.0
version: 4.0.0(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-include-example:
specifier: ^2.0.2
version: 2.0.2(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-inline-sources:
specifier: ^1.2.1
version: 1.2.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-mdn-links:
specifier: ^5.0.1
version: 5.0.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-zod:
specifier: ^1.4.0
version: 1.4.0(typedoc@0.27.9(typescript@5.8.2))
typescript:
specifier: ^5.5.3
version: 5.8.2
typescript-eslint:
specifier: ^8.26.0
version: 8.26.0(eslint@9.22.0)(typescript@5.8.2)
meta/notify-push:
dependencies:
'@cis-oss/pushover':
specifier: 'workspace:'
version: link:../../packages/pushover
devDependencies:
'@eslint/js':
specifier: ^9.22.0
version: 9.22.0
'@repo/configs':
specifier: 'workspace:'
version: link:../../config
'@shipgirl/typedoc-plugin-versions':
specifier: ^0.3.0
version: 0.3.0(typedoc@0.27.9(typescript@5.8.2))
'@types/jest':
specifier: ^29.5.14
version: 29.5.14
'@types/node':
specifier: ^22.13.10
version: 22.13.10
eslint:
specifier: ^9.22.0
version: 9.22.0
eslint-config-prettier:
specifier: ^10.1.1
version: 10.1.1(eslint@9.22.0)
eslint-plugin-only-warn:
specifier: ^1.1.0
version: 1.1.0
globals:
specifier: ^16.0.0
version: 16.0.0
jest:
specifier: ^29.7.0
version: 29.7.0(@types/node@22.13.10)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.8.2))
shx:
specifier: ^0.4.0
version: 0.4.0
ts-jest:
specifier: ^29.2.6
version: 29.3.2(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(jest@29.7.0(@types/node@22.13.10)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.8.2)))(typescript@5.8.2)
tsx:
specifier: ^4.19.3
version: 4.19.3
typedoc:
specifier: ^0.27.9
version: 0.27.9(typescript@5.8.2)
typedoc-github-theme:
specifier: ^0.2.1
version: 0.2.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-coverage:
specifier: ^3.4.1
version: 3.4.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-extras:
specifier: ^4.0.0
version: 4.0.0(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-include-example:
specifier: ^2.0.2
version: 2.0.2(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-inline-sources:
specifier: ^1.2.1
version: 1.2.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-mdn-links:
specifier: ^5.0.1
version: 5.0.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-zod:
specifier: ^1.4.0
version: 1.4.0(typedoc@0.27.9(typescript@5.8.2))
typescript:
specifier: ^5.5.3
version: 5.8.2
typescript-eslint:
specifier: ^8.26.0
version: 8.26.0(eslint@9.22.0)(typescript@5.8.2)
packages/pushover:
dependencies:
@@ -254,75 +117,21 @@ importers:
specifier: ^3.24.2
version: 3.24.2
devDependencies:
'@eslint/js':
specifier: ^9.22.0
version: 9.22.0
'@repo/configs':
specifier: 'workspace:'
version: link:../../config
'@shipgirl/typedoc-plugin-versions':
specifier: ^0.3.0
version: 0.3.0(typedoc@0.27.9(typescript@5.8.2))
'@types/jest':
specifier: ^29.5.14
version: 29.5.14
'@types/node':
specifier: ^22.13.10
version: 22.13.10
eslint:
specifier: ^9.22.0
version: 9.22.0
eslint-config-prettier:
specifier: ^10.1.1
version: 10.1.1(eslint@9.22.0)
eslint-plugin-only-warn:
specifier: ^1.1.0
version: 1.1.0
globals:
specifier: ^16.0.0
version: 16.0.0
jest:
specifier: ^29.7.0
version: 29.7.0(@types/node@22.13.10)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.8.2))
shx:
specifier: ^0.4.0
version: 0.4.0
ts-jest:
specifier: ^29.2.6
version: 29.3.2(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(jest@29.7.0(@types/node@22.13.10)(ts-node@10.9.2(@types/node@22.13.10)(typescript@5.8.2)))(typescript@5.8.2)
tsx:
specifier: ^4.19.3
specifier: 4.19.3
version: 4.19.3
typedoc:
specifier: ^0.27.9
version: 0.27.9(typescript@5.8.2)
typedoc-github-theme:
specifier: ^0.2.1
version: 0.2.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-coverage:
specifier: ^3.4.1
version: 3.4.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-extras:
specifier: ^4.0.0
version: 4.0.0(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-include-example:
specifier: ^2.0.2
version: 2.0.2(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-inline-sources:
specifier: ^1.2.1
version: 1.2.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-mdn-links:
specifier: ^5.0.1
version: 5.0.1(typedoc@0.27.9(typescript@5.8.2))
typedoc-plugin-zod:
specifier: ^1.4.0
version: 1.4.0(typedoc@0.27.9(typescript@5.8.2))
typescript:
specifier: ^5.5.3
version: 5.8.2
typescript-eslint:
specifier: ^8.26.0
version: 8.26.0(eslint@9.22.0)(typescript@5.8.2)
specifier: 5.5.3
version: 5.5.3
packages:
@@ -814,6 +623,12 @@ packages:
'@jridgewell/trace-mapping@0.3.9':
resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
'@kwsites/file-exists@1.1.1':
resolution: {integrity: sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==}
'@kwsites/promise-deferred@1.1.1':
resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==}
'@nodelib/fs.scandir@2.1.5':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@@ -1692,10 +1507,6 @@ packages:
resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
engines: {node: '>=18'}
globals@16.0.0:
resolution: {integrity: sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==}
engines: {node: '>=18'}
globals@16.4.0:
resolution: {integrity: sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==}
engines: {node: '>=18'}
@@ -2745,6 +2556,9 @@ packages:
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
engines: {node: '>=14'}
simple-git@3.30.0:
resolution: {integrity: sha512-q6lxyDsCmEal/MEGhP1aVyQ3oxnagGlBDOVSIB4XUVLl1iZh0Pah6ebC9V4xBap/RfgP2WlI8EKs0WS0rMEJHg==}
sisteransi@1.0.5:
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
@@ -3095,6 +2909,11 @@ packages:
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.9.0'
typescript@5.5.3:
resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==}
engines: {node: '>=14.17'}
hasBin: true
typescript@5.8.2:
resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==}
engines: {node: '>=14.17'}
@@ -3766,6 +3585,14 @@ snapshots:
'@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.5.0
'@kwsites/file-exists@1.1.1':
dependencies:
debug: 4.4.0
transitivePeerDependencies:
- supports-color
'@kwsites/promise-deferred@1.1.1': {}
'@nodelib/fs.scandir@2.1.5':
dependencies:
'@nodelib/fs.stat': 2.0.5
@@ -4793,8 +4620,6 @@ snapshots:
globals@14.0.0: {}
globals@16.0.0: {}
globals@16.4.0: {}
globby@10.0.2:
@@ -6029,6 +5854,14 @@ snapshots:
signal-exit@4.1.0: {}
simple-git@3.30.0:
dependencies:
'@kwsites/file-exists': 1.1.1
'@kwsites/promise-deferred': 1.1.1
debug: 4.4.0
transitivePeerDependencies:
- supports-color
sisteransi@1.0.5: {}
slash@3.0.0: {}
@@ -6349,6 +6182,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
typescript@5.5.3: {}
typescript@5.8.2: {}
uc.micro@2.1.0: {}

15
turbo.jsonc Normal file
View File

@@ -0,0 +1,15 @@
{
"$schema": "https://turborepo.com/schema.json",
"tasks": {
"build": {
"outputs": ["dist/**"]
},
"check": {
"dependsOn": ["^check"]
},
"dev": {
"persistent": true,
"cache": false
}
}
}

View File

@@ -1,9 +1,39 @@
// THIS IS FOR NOW UNLIKELY TO BE CONTINUED TO BE WORKED ON
import type { PlopTypes } from "@turbo/gen";
import * as fs from "node:fs";
import { simpleGit } from "simple-git";
export default function generator(plop: PlopTypes.NodePlopAPI): void {
const git = simpleGit();
const metaPackages = fs.readdirSync("meta").map((value) => {
const packageJson = JSON.parse(
fs.readFileSync(`meta/${value}/package.json`, "utf-8"),
);
return {
name: packageJson.name,
value: value,
};
});
// get git author info
const gitAuthor = {
name: git
.getConfig("user.name")
.then((res) => res.value)
.catch(() => ""),
email: git
.getConfig("user.email")
.then((res) => res.value)
.catch(() => ""),
};
// const gitAuthor = {
// name: (await git.getConfig("user.name")).value,
// email: (await git.getConfig("user.email")).value,
// };
// create a generator
plop.setGenerator("package", {
description: "Generator description",
description: "Create a new notify package",
// gather information from the user
prompts: [
{
@@ -19,17 +49,20 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
{
type: "input",
name: "author.name",
default: gitAuthor.name,
message: "Author name",
},
{
type: "input",
name: "author.email",
default: gitAuthor.email,
message: "Author email",
},
{
type: "input",
name: "author.url",
message: "Author URL",
type: "checkbox",
name: "import.meta",
message: "In which meta packages should this package be included?",
choices: metaPackages,
},
],
// perform actions based on the prompts