Skip to content

Commit bc317e4

Browse files
committed
refactor(tbk): rename package from @tbk/cli to @themuneebh-oss/tbk
- Updated package name in package.json, README, and workflow files to reflect the new naming convention. - Adjusted dependencies and documentation to ensure consistency with the new package name. - Modified GitHub Actions workflow for publishing to npm to align with the updated package name.
1 parent 6f45282 commit bc317e4

File tree

6 files changed

+4827
-1747
lines changed

6 files changed

+4827
-1747
lines changed

.github/workflows/publish-tbk-cli.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GitHub Actions workflow for publishing @tbk/cli to npm
1+
# GitHub Actions workflow for publishing @themuneebh-oss/tbk to npm
22
#
33
# SETUP INSTRUCTIONS:
44
# 1. Go to your repository Settings > Secrets and variables > Actions
@@ -10,7 +10,7 @@
1010
#
1111
# For more info: https://docs.github.com/en/actions/security-guides/encrypted-secrets
1212

13-
name: Publish @tbk/cli to npm
13+
name: Publish @themuneebh-oss/tbk to npm
1414

1515
on:
1616
workflow_dispatch:
@@ -83,7 +83,7 @@ jobs:
8383
- name: Commit version bump
8484
run: |
8585
git add packages/tbk/package.json
86-
git commit -m "chore(@tbk/cli): bump version to ${{ steps.bump-version.outputs.version }}"
86+
git commit -m "chore(@themuneebh-oss/tbk): bump version to ${{ steps.bump-version.outputs.version }}"
8787
git push origin ${{ steps.branch.outputs.branch }}
8888
8989
- name: Build package
@@ -106,7 +106,6 @@ jobs:
106106
107107
- name: Summary
108108
run: |
109-
echo "✅ Successfully published @tbk/cli@${{ steps.bump-version.outputs.version }} to npm"
109+
echo "✅ Successfully published @themuneebh-oss/tbk@${{ steps.bump-version.outputs.version }} to npm"
110110
echo "📦 Tagged as ${{ steps.bump-version.outputs.tag }}"
111-
echo "🔗 Package: https://www.npmjs.com/package/@tbk/cli"
112-
111+
echo "🔗 Package: https://www.npmjs.com/package/@themuneebh-oss/tbk"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"tsx": "^4.19.2",
4848
"typescript": "*",
4949
"typescript-eslint": "^7.11.0",
50-
"@tbk/cli": "workspace:tbk"
50+
"@themuneebh-oss/tbk": "workspace:tbk"
5151
},
5252
"dependencies": {
5353
"@asteasolutions/zod-to-openapi": "^7.1.1",

packages/create-tbk-app/src/constants/dependencies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const CORE_DEPENDENCIES = {
1818
};
1919

2020
export const CORE_DEV_DEPENDENCIES = {
21-
'@tbk/cli': '^0.0.1',
21+
'@themuneebh-oss/tbk': '^0.0.1',
2222
typescript: '^5.1.6',
2323
'@types/express': '^4.17.15',
2424
'@types/node': '^18.11.18',

packages/tbk/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @tbk/cli
1+
# @themuneebh-oss/tbk
22

33
CLI tool for TypeScript Backend Toolkit projects. Generate modules, plugins, middleware, seeders, and factories with a single command.
44

@@ -7,13 +7,13 @@ CLI tool for TypeScript Backend Toolkit projects. Generate modules, plugins, mid
77
This package is typically installed as a dev dependency in TypeScript Backend Toolkit projects:
88

99
```bash
10-
pnpm add -D @tbk/cli
10+
pnpm add -D @themuneebh-oss/tbk
1111
```
1212

1313
Or via npm:
1414

1515
```bash
16-
npm install -D @tbk/cli
16+
npm install -D @themuneebh-oss/tbk
1717
```
1818

1919
## Usage
@@ -52,9 +52,11 @@ pnpm tbk generate:module product --path /api/v1
5252
```
5353

5454
**Options:**
55+
5556
- `-p, --path <path>` - API path prefix (default: `/api`)
5657

5758
**Creates:**
59+
5860
- `src/modules/<name>/<name>.dto.ts` - Zod schemas and TypeScript types
5961
- `src/modules/<name>/<name>.model.ts` - Mongoose model
6062
- `src/modules/<name>/<name>.schema.ts` - Request/response validation schemas
@@ -71,6 +73,7 @@ pnpm tbk generate:plugin cache
7173
```
7274

7375
**Creates:**
76+
7477
- `src/plugins/<name>/index.ts` - Plugin factory and registration
7578

7679
### generate:middleware
@@ -82,6 +85,7 @@ pnpm tbk generate:middleware rateLimiter
8285
```
8386

8487
**Creates:**
88+
8589
- `src/middlewares/<name>.ts` - Middleware function
8690

8791
### seed
@@ -106,6 +110,7 @@ pnpm tbk seed --force
106110
```
107111

108112
**Options:**
113+
109114
- `-g, --group <group>` - Group to run (base|dev|test|demo) (default: `dev`)
110115
- `--only <names>` - Comma-separated seeder names
111116
- `--fresh` - Drop involved collections before seeding
@@ -124,12 +129,14 @@ pnpm tbk make:seeder product/Product --count 10 --unique slug
124129
```
125130

126131
**Options:**
132+
127133
- `-c, --count <number>` - Default count for dev/test (default: `5`)
128134
- `-u, --unique <field>` - Unique field to upsert by
129135
- `-d, --depends-on <names>` - Comma-separated additional dependencies
130136
- `--model <export>` - Model export name when not default
131137

132138
**Creates:**
139+
133140
- `src/modules/<module>/seeders/<Name>Seeder.ts`
134141

135142
**Note:** The seeder must be manually registered in `src/seeders/registry.ts`.
@@ -144,11 +151,13 @@ pnpm tbk make:factory product/Product --model ProductModel --use service
144151
```
145152

146153
**Options:**
154+
147155
- `--model <export>` - Model export name when not default
148156
- `--use <service|model>` - Prefer using service create function when present (default: `service`)
149-
- `--id-type <string|objectId>` - Hint for _id type when ambiguous
157+
- `--id-type <string|objectId>` - Hint for \_id type when ambiguous
150158

151159
**Creates:**
160+
152161
- `src/modules/<module>/factories/<name>.factory.ts`
153162

154163
## Requirements
@@ -160,6 +169,7 @@ pnpm tbk make:factory product/Product --model ProductModel --use service
160169
## How It Works
161170

162171
The CLI tool uses dynamic imports and model introspection to:
172+
163173
- Analyze Mongoose schemas to detect fields, types, and relationships
164174
- Generate type-safe code following project patterns
165175
- Ensure consistency with existing codebase structure
@@ -185,4 +195,3 @@ MIT
185195

186196
- [Main Toolkit Repository](https://github.com/muneebhashone/typescript-backend-toolkit)
187197
- [Report Issues](https://github.com/muneebhashone/typescript-backend-toolkit/issues)
188-

packages/tbk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@tbk/cli",
2+
"name": "@themuneebh-oss/tbk",
33
"version": "0.0.2",
44
"description": "CLI tool for TypeScript Backend Toolkit - generate modules, plugins, middleware, seeders, and factories",
55
"type": "module",

0 commit comments

Comments
 (0)