Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
259 commits
Select commit Hold shift + click to select a range
56ce3c5
feat: add CRUD services
GAndanje Mar 8, 2024
a87c13c
refactor: add support for different environments
GAndanje Mar 9, 2024
0d9472b
refactor: move catchAsync to own file SOC
GAndanje Mar 9, 2024
c3c04ed
feat: add custom error class
GAndanje Mar 9, 2024
1e09b6f
refactor: code refactor
GAndanje Mar 9, 2024
1ffa8d7
feat: handle prod & dev errors & handle op & non-operational errors
GAndanje Mar 9, 2024
1b27156
feat: add boiler-plate to each service
GAndanje Mar 10, 2024
b9f91a3
refactor: use start script from package.json
GAndanje Mar 11, 2024
10f635d
feat: add morgan logger and mongo & server network bridge
GAndanje Mar 11, 2024
b3689b0
feat: use pm2 & ecosystem file on prod
GAndanje Mar 11, 2024
e0dc8d5
fix: fix resetting headers error on error
GAndanje Mar 11, 2024
396ff35
feat: add morgan logger on routes
GAndanje Mar 11, 2024
eaa14b1
feat: move reusable code to monorepo global library
GAndanje Mar 11, 2024
68f03dc
feat: add reusable monorepo library
GAndanje Mar 11, 2024
c1f0291
feat: add shared library
GAndanje Mar 11, 2024
d3591a2
refactor: migrate project to monorepo architecture
GAndanje Mar 14, 2024
105a58d
feat: add workspaces to manage monorepo
GAndanje Mar 14, 2024
327e79b
Merge pull request #2 from GAndanje/gilbert/workspaces
GAndanje Mar 14, 2024
f4c1b85
Create README.md
GAndanje Mar 15, 2024
a06fbde
Update README.md
GAndanje Mar 15, 2024
2e8b9a2
Update README.md
GAndanje Mar 15, 2024
eba3954
Update README.md
GAndanje Mar 15, 2024
f75ab60
feat: migrate to yarn workspaces
GAndanje Mar 31, 2024
a0020d3
feat: introduce organization scoped libraries
GAndanje Mar 31, 2024
5f77e7f
Update README.md
GAndanje Mar 31, 2024
7bcfec7
Merge pull request #1 from GAndanje/GAndanje-patch-1
GAndanje Mar 31, 2024
8688dd8
feat: update docker and task runner
GAndanje Mar 31, 2024
bd8a226
Merge pull request #3 from GAndanje/gilbert/workspace-containerization
GAndanje Mar 31, 2024
03b0044
Merge branch 'main' of https://github.com/GAndanje/microservices_suit…
GAndanje Mar 31, 2024
1f3ca96
Merge pull request #2 from GAndanje/GAndanje/import
GAndanje Mar 31, 2024
68d1e1f
Update README.md
GAndanje Mar 31, 2024
e1be939
Update README.md
GAndanje Mar 31, 2024
78a6a4f
Update README.md
GAndanje Mar 31, 2024
a01b2ed
refactor: update markdown
GAndanje Mar 31, 2024
23cb448
Merge branch 'main' of https://github.com/GAndanje/node-microservices…
GAndanje Mar 31, 2024
954d54a
Merge pull request #3 from GAndanje/GAndanje/import
GAndanje Mar 31, 2024
cfcb079
Merge branch 'main' of https://github.com/GAndanje/node-microservices…
GAndanje Mar 31, 2024
2648bf6
feat: update taskfile
GAndanje Mar 31, 2024
3b24732
refactor: update .env.example and package.json
GAndanje Mar 31, 2024
bf1c1cc
Update README.md
GAndanje Mar 31, 2024
b08f7dd
Update README.md
GAndanje Mar 31, 2024
32d4509
Update README.md
GAndanje Mar 31, 2024
9cacae1
Update README.md
GAndanje Mar 31, 2024
2285576
Update README.md
GAndanje Mar 31, 2024
0c43dd8
Update README.md
GAndanje Mar 31, 2024
322a6ad
Update README.md
GAndanje Mar 31, 2024
0df3ed5
Update README.md
GAndanje Mar 31, 2024
de783eb
Update README.md
GAndanje Mar 31, 2024
9f57776
Merge branch 'main' into GAndanje/import
GAndanje Mar 31, 2024
1237c90
Merge pull request #4 from GAndanje/GAndanje/import
GAndanje Mar 31, 2024
2ab56ae
refactor: update read me
GAndanje Apr 1, 2024
eabbc97
Merge branch 'main' into GAndanje/import
GAndanje Apr 1, 2024
c31d357
Merge pull request #5 from GAndanje/GAndanje/import
GAndanje Apr 1, 2024
f948afb
Merge pull request #5 from GAndanje/GAndanje/import
GAndanje Apr 1, 2024
0c8c888
Merge pull request #6 from GAndanje/GAndanje/import
GAndanje Apr 1, 2024
a004724
Merge pull request #5 from GAndanje/GAndanje/import
GAndanje Apr 1, 2024
ab0c664
Merge pull request #7 from GAndanje/GAndanje/import
GAndanje Apr 1, 2024
8a73ecd
Update README.md
GAndanje Apr 1, 2024
e2be919
Update README.md
GAndanje Apr 1, 2024
ad51f16
Update README.md
GAndanje Apr 1, 2024
90ea0bd
chore: publish to public registry
GAndanje Apr 1, 2024
648f484
chore: add yarnrc
GAndanje Apr 1, 2024
48db029
Merge pull request #1 from microservices-suite/repo-engineering/publi…
GAndanje Apr 1, 2024
87628c0
feat: separate concerns by isolating data-persistence
GAndanje Apr 1, 2024
71b0c2c
Merge pull request #2 from microservices-suite/repo-engineering/SOC
GAndanje Apr 1, 2024
49ca11c
refactor: update readme
GAndanje Apr 1, 2024
e40f49b
Merge pull request #3 from microservices-suite/repo-engineering/SOC
GAndanje Apr 1, 2024
1fbc413
feat: add readme to shared libraries
GAndanje Apr 1, 2024
b174b5b
v1.0.1
GAndanje Apr 1, 2024
3858f9b
v1.0.1
GAndanje Apr 1, 2024
4463503
v1.0.1
GAndanje Apr 1, 2024
7ce5598
v1.0.1
GAndanje Apr 1, 2024
932e1da
chore: update readme and package.json
GAndanje Apr 1, 2024
b8c952c
Merge pull request #4 from microservices-suite/repo-engineering/SOC
GAndanje Apr 1, 2024
ceeab07
Update README.md
GAndanje Apr 1, 2024
3d704aa
Merge pull request #5 from microservices-suite/GAndanje-patch-1
GAndanje Apr 1, 2024
b00280b
Update README.md
GAndanje Apr 1, 2024
4634bd2
Merge pull request #6 from microservices-suite/GAndanje-patch-2
GAndanje Apr 1, 2024
14b7c4f
Update README.md
GAndanje Apr 1, 2024
8c0f506
Update README.md
GAndanje Apr 1, 2024
e289a18
Merge pull request #7 from microservices-suite/GAndanje-patch-3
GAndanje Apr 1, 2024
9201c5f
refactor: update readme
GAndanje Apr 1, 2024
21ea44c
refactor: update readme
GAndanje Apr 1, 2024
54c6a2a
Merge pull request #8 from microservices-suite/repo-engineering/SOC
GAndanje Apr 1, 2024
df59f50
refactor: update readme
GAndanje Apr 1, 2024
42e36e3
fix: import APIError from barrel file
GAndanje Apr 1, 2024
2797d06
v1.0.2
GAndanje Apr 1, 2024
4f9dc44
refactor: Dynamically generate task scripts using CLI argument forwading
GAndanje Apr 1, 2024
9203a1a
Merge branch 'main' of https://github.com/microservices-suite/node-
GAndanje Apr 1, 2024
2b71dac
Merge pull request #9 from microservices-suite/repo-engineering/SOC
GAndanje Apr 1, 2024
0fc97df
Merge branch 'main' of https://github.com/microservices-suite/node-
GAndanje Apr 1, 2024
1fe1db2
refactor: add test suite,k8s & utilities to task runner
GAndanje Apr 2, 2024
2289d38
feat: add k8s
GAndanje Apr 2, 2024
62dbdee
Merge pull request #12 from microservices-suite/repo-engineering/SOC
GAndanje Apr 2, 2024
46224fb
feat: add k8s
GAndanje Apr 2, 2024
0b59d1d
Merge pull request #13 from microservices-suite/repo-engineering/SOC
GAndanje Apr 2, 2024
eaf7643
Update README.md
GAndanje Apr 2, 2024
011085b
Merge pull request #14 from microservices-suite/GAndanje-patch-1
GAndanje Apr 2, 2024
97b9765
Update README.md
GAndanje Apr 2, 2024
72a4203
Merge pull request #15 from microservices-suite/GAndanje-patch-2
GAndanje Apr 2, 2024
c6ff459
Update README.md
GAndanje Apr 2, 2024
8685410
Merge pull request #16 from microservices-suite/GAndanje-patch-3
GAndanje Apr 2, 2024
6cdf673
Update README.md
GAndanje Apr 2, 2024
9c80126
Merge pull request #17 from microservices-suite/GAndanje-patch-4
GAndanje Apr 2, 2024
8c5f8a7
Update README.md
GAndanje Apr 2, 2024
5579c41
Update README.md
GAndanje Apr 2, 2024
45b4f82
Merge pull request #18 from microservices-suite/GAndanje-patch-6
GAndanje Apr 2, 2024
3c408ea
Merge branch 'main' into GAndanje-patch-5
GAndanje Apr 2, 2024
2596e0f
Merge pull request #19 from microservices-suite/GAndanje-patch-5
GAndanje Apr 2, 2024
e90a61c
Update README.md
GAndanje Apr 2, 2024
0674ce8
Merge pull request #20 from microservices-suite/GAndanje-patch-1
GAndanje Apr 2, 2024
e1faf2e
Update README.md
GAndanje Apr 2, 2024
59734db
Merge pull request #21 from microservices-suite/GAndanje-patch-2
GAndanje Apr 2, 2024
8e355e7
feat: add readme per package
GAndanje Apr 2, 2024
b1169a1
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 2, 2024
8bcb930
Merge pull request #22 from microservices-suite/repo-engineering/SOC
GAndanje Apr 2, 2024
450269a
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 2, 2024
8dfc2d1
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 2, 2024
f80cd19
Merge pull request #23 from microservices-suite/repo-engineering/SOC
GAndanje Apr 2, 2024
4e5c016
Update README.md
GAndanje Apr 2, 2024
9cb2081
Merge pull request #24 from microservices-suite/GAndanje-patch-3
GAndanje Apr 2, 2024
3355a60
Update README.md
GAndanje Apr 2, 2024
74df109
Merge pull request #25 from microservices-suite/GAndanje-patch-3
GAndanje Apr 2, 2024
c766ac6
Merge pull request #25 from microservices-suite/GAndanje-patch-3
GAndanje Apr 2, 2024
fb516df
Merge branch 'repo-engineering/SOC' of https://github.com/microservic…
GAndanje Apr 2, 2024
db989ba
Merge pull request #26 from microservices-suite/repo-engineering/SOC
GAndanje Apr 2, 2024
f7aa78a
Update README.md
GAndanje Apr 3, 2024
d3d0ba0
Merge pull request #27 from microservices-suite/GAndanje-patch-1
GAndanje Apr 3, 2024
d6c647c
v1.0.2
GAndanje Apr 3, 2024
12feda7
v1.0.3
GAndanje Apr 3, 2024
b7ce281
v1.0.1
GAndanje Apr 3, 2024
35255a0
v1.0.2
GAndanje Apr 3, 2024
8c1a95a
v1.0.4
GAndanje Apr 3, 2024
231fcd5
v1.0.2
GAndanje Apr 3, 2024
31d249e
v1.0.4
GAndanje Apr 3, 2024
874e1fa
v1.0.6
GAndanje Apr 3, 2024
cb57300
v1.0.2
GAndanje Apr 3, 2024
cd62271
v1.0.4
GAndanje Apr 3, 2024
ae305d4
v1.0.6
GAndanje Apr 3, 2024
eb8e185
v1.0.9
GAndanje Apr 3, 2024
7e0e089
v1.0.4
GAndanje Apr 3, 2024
423cb90
v1.0.6
GAndanje Apr 3, 2024
dfe9adb
v1.0.9
GAndanje Apr 3, 2024
e6da884
v1.1.5
GAndanje Apr 3, 2024
e03ce26
v1.1.6
GAndanje Apr 3, 2024
1fb837b
v1.0.3
GAndanje Apr 3, 2024
d0fa03e
feat: add more dynamic CLI commands
GAndanje Apr 3, 2024
a518870
fix: fix pm2 not runningj
GAndanje Apr 3, 2024
4afa400
chore: upgrade packages to the new release
GAndanje Apr 3, 2024
99b4bf5
feat: add package.json smart upgrader using BFS algorithm
GAndanje Apr 3, 2024
671fe15
feat: add write concern
GAndanje Apr 3, 2024
ef174d9
feat: add validation and prefer destructuring
GAndanje Apr 3, 2024
ac39c31
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 3, 2024
cc9d8c6
Merge pull request #28 from microservices-suite/repo-engineering/SOC
GAndanje Apr 3, 2024
69857ff
refactor: make task verbose
GAndanje Apr 5, 2024
a141a6e
refactor: scale down pm2 resource usage
GAndanje Apr 5, 2024
448312f
feat: add api-gateway
GAndanje Apr 5, 2024
a4af28c
Merge pull request #29 from microservices-suite/repo-engineering/SOC
GAndanje Apr 5, 2024
ec528c5
feat: add api gateway
GAndanje Apr 5, 2024
400f18b
feat: add support for graphql apis for lightweight applications
GAndanje Apr 5, 2024
7a9cf0e
Merge pull request #33 from microservices-suite/repo-engineering/SOC
GAndanje Apr 5, 2024
5a51e03
feat: add support for graphql apis for lightweight applications
GAndanje Apr 5, 2024
91efe10
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 5, 2024
ca0c911
Merge pull request #34 from microservices-suite/repo-engineering/SOC
GAndanje Apr 5, 2024
7421548
Update README.md
GAndanje Apr 6, 2024
e926cf4
Merge pull request #35 from microservices-suite/GAndanje-patch-1
GAndanje Apr 6, 2024
63cf5a7
Update README.md
GAndanje Apr 6, 2024
f9c008a
Merge pull request #36 from microservices-suite/GAndanje-patch-2
GAndanje Apr 6, 2024
0c2fa1f
feat core product initial MCS
ddhairya Apr 6, 2024
c8e5fd1
feat: refactor vanilla:*:* syntax to match do:*:*:*
GAndanje Apr 6, 2024
b4a5cac
feat: replace BFS with simple tree lookup
GAndanje Apr 6, 2024
e4819ee
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 6, 2024
4ae010a
Merge pull request #37 from microservices-suite/repo-engineering/SOC
GAndanje Apr 6, 2024
d557606
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 6, 2024
4eedb00
Merge pull request #38 from microservices-suite/repo-engineering/SOC
GAndanje Apr 6, 2024
a233354
feat: optimize do:*:*:down command
GAndanje Apr 6, 2024
1a4fe04
Merge pull request #39 from microservices-suite/repo-engineering/SOC
GAndanje Apr 6, 2024
51a91de
feat: optimize do:*:*:down command
GAndanje Apr 6, 2024
3607fba
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 6, 2024
320363c
Merge pull request #40 from microservices-suite/repo-engineering/SOC
GAndanje Apr 6, 2024
83fe1b4
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 6, 2024
066280c
Merge pull request #41 from microservices-suite/repo-engineering/SOC
GAndanje Apr 6, 2024
f35bf24
refactor: make docker-compose platform agnostic
GAndanje Apr 6, 2024
9f25bc7
refactor: refactor task runner verbosity
GAndanje Apr 6, 2024
8a4e54d
Merge pull request #42 from microservices-suite/repo-engineering/SOC
GAndanje Apr 6, 2024
0d2006c
feat: add tests for task runner and user
GAndanje Apr 7, 2024
f9f25dc
Merge pull request #44 from microservices-suite/repo-engineering/SOC
GAndanje Apr 7, 2024
b88ab4b
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
ddhairya Apr 7, 2024
7a402ce
feat core customer initial setup
ddhairya Apr 7, 2024
8fae267
feat core supplier initial setup
ddhairya Apr 8, 2024
626e81d
feat core nginx proxy
ddhairya Apr 8, 2024
cf58264
feat core creating server
ddhairya Apr 9, 2024
9014ccf
feat core server setup supplier
ddhairya Apr 9, 2024
e98c570
feat core server setup for customer
ddhairya Apr 9, 2024
f2fb57d
adding docker files
ddhairya Apr 9, 2024
aab4798
create communication between servers
ddhairya Apr 9, 2024
c073ae3
feat core adding RabbitMQ intial setup between cust and sup
ddhairya Apr 10, 2024
0a15d51
Merge pull request #45 from microservices-suite/dhairya-dev
ddhairya Apr 11, 2024
125b3de
feat: core adding docker-compose with rabbitmq setup
ddhairya Apr 11, 2024
02f4cbc
Merge pull request #46 from microservices-suite/dhairya-dev
ddhairya Apr 11, 2024
60e0ff9
feat: add upload service
GAndanje Apr 11, 2024
7d89d62
refactor: refactor validation error contruction
GAndanje Apr 11, 2024
0fe59cd
Merge pull request #47 from microservices-suite/repo-engineering/SOC
GAndanje Apr 11, 2024
786b5fe
feat: core adding keycloak with predefine settings
ddhairya Apr 12, 2024
8340984
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
ddhairya Apr 12, 2024
d435927
Merge pull request #48 from microservices-suite/dhairya-dev
ddhairya Apr 12, 2024
38e82cd
feat: add kubectl initial configs
GAndanje Apr 12, 2024
c49e5d9
fix: merge conflicts
GAndanje Apr 12, 2024
2215546
Merge pull request #49 from microservices-suite/repo-engineering/SOC
GAndanje Apr 12, 2024
1190d50
chore: update configurations
GAndanje Apr 12, 2024
772ae86
Merge pull request #50 from microservices-suite/repo-engineering/SOC
GAndanje Apr 12, 2024
b8da460
chore: update configurations
GAndanje Apr 12, 2024
5bfd985
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 12, 2024
653cc00
Merge pull request #51 from microservices-suite/repo-engineering/SOC
GAndanje Apr 12, 2024
b1810dd
feat: add k8s configs
GAndanje Apr 13, 2024
5adf2a8
Merge pull request #52 from microservices-suite/repo-engineering/SOC
GAndanje Apr 13, 2024
2d40de2
bug supplier ading shared lib
ddhairya Apr 13, 2024
5b73446
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
ddhairya Apr 13, 2024
36a2630
Merge pull request #53 from microservices-suite/dhairya-dev
ddhairya Apr 13, 2024
7367698
v1.0.4
GAndanje Apr 13, 2024
0298711
v1.0.7
GAndanje Apr 13, 2024
f9172bb
fix: cannot find module
GAndanje Apr 13, 2024
9b87787
Merge pull request #54 from microservices-suite/repo-engineering/SOC
GAndanje Apr 13, 2024
7efec2f
chore: add release scripts
Apr 17, 2024
da15c67
Merge pull request #57 from selemondev/selemondev_development
GAndanje Apr 19, 2024
5988dec
chore: release v1.0.1
GAndanje Apr 19, 2024
d295b92
chore: release v1.1.0-0
GAndanje Apr 19, 2024
d92ed84
chore: release v1.2.0
GAndanje Apr 19, 2024
300ae46
chore: release v1.0.1
GAndanje Apr 19, 2024
f176ffb
v1.2.1
GAndanje Apr 19, 2024
28c3034
v1.2.3
GAndanje Apr 19, 2024
29b6d73
refactor: rm .npmrc
GAndanje Apr 19, 2024
e815c57
chore: release v1.2.8
GAndanje Apr 19, 2024
4b8c223
refactor: rm .npmrc
GAndanje Apr 19, 2024
8d970c4
refactor: rm .npmrc
GAndanje Apr 19, 2024
e7b5921
chore: release v1.2.9
GAndanje Apr 19, 2024
7c77a56
chore: release v1.2.10
GAndanje Apr 20, 2024
bd701e4
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 20, 2024
e88e9e7
Merge pull request #58 from microservices-suite/repo-engineering/publ…
GAndanje Apr 20, 2024
18890c0
chore: release v1.3.0
GAndanje Apr 20, 2024
31c86a4
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 20, 2024
c4eb2b2
chore: release v1.2.11
GAndanje Apr 20, 2024
2145ed1
chore: release v1.3.0
GAndanje Apr 20, 2024
f6ab4fc
chore: release v1.4.0
GAndanje Apr 20, 2024
f24b5ee
chore: release v1.4.1
GAndanje Apr 20, 2024
0c5141d
chore: release v1.4.2
GAndanje Apr 20, 2024
ed56801
refactor: rm my-app
GAndanje Apr 21, 2024
821a0d7
chore: update deps
GAndanje Apr 21, 2024
37e5481
feat: add suite-cli
GAndanje Apr 21, 2024
d590e16
Merge branch 'main' of https://github.com/microservices-suite/node-mi…
GAndanje Apr 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .suite-cli/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Microservices Suite

## suite-cli is the monorepo cli tool aka mono-repo manager

### Installation
- Run `npm install -D @microservices-suite/suite-cli` to save this in your `devDependencies`

### Commands
- `suite add <deps>` installs dependencies
Empty file added .suite-cli/cli/cli.js
Empty file.
11 changes: 11 additions & 0 deletions .suite-cli/cli/command.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node

const {program} = require('commander')
const {addDepsAtWorkspacecmd} = require('.')
program.version('1.0.0')
program.argument('<service>','service to run')
addDepsAtWorkspacecmd
program.option('<mode>','mode to run the server 🚀','dev')
program.action((mode)=>console.log({mode}))

program.parse(process.argv)
21 changes: 21 additions & 0 deletions .suite-cli/cli/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "@microservices-suite/cli",
"version": "1.0.0",
"description": "This is the CLI tool for running the microservices-suite monorepo. It contains functionalities and tools required for automation and managing the repo across supported platforms. Works on Windows,MacOS and Linux as well as support to some extend other variants like SunOS, IBM AIX, FreeBSD, OpenBSD and more",
"main": "cli.js",
"bin": {
"suite": "./cli.js"
},
"repository": "https://github.com/microservices-suite/node-microservices-suite.git",
"author": "Gilber Andanje <gilbertandanje@gmail.com>",
"license": "MIT",
"private": false,
"keywords": [
"cli"
],
"dependencies": {
"chalk": "4.1.2",
"commander": "^12.0.0",
"figlet": "^1.7.0"
}
}
27 changes: 27 additions & 0 deletions .suite-cli/cli/scripts/addDepsAtWorkspace.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env node

const { program } = require('commander');
const { addDepsAtWorkspace, logSuccess, logError } = require('./scripts.module')
const figlet = require('figlet')

console.log(figlet.textSync('Microservices-Suite'))
program
.command('add')
.description('Adds dependencies at given workspace and updates package.json')
.requiredOption('-n, --workspace-name <name>', 'Name of the workspace where to add dependencies')
.option('-d, --workspace-directory <directory>', 'Directory where to look for the workspace. Defaults to "microservices"', 'microservices')
.argument('<packages...>', 'Space-separated list of packages to add')
.action(async(packages, options) => {
try {
const message = await addDepsAtWorkspace({
workspace_name: options.workspaceName,
workspace_directory: options.workspaceDirectory,
packages: packages.join(' ')
});
logSuccess({ message })
} catch (error) {
logError({ error })
}
});
program.parse(process.argv);
module.exports = program
31 changes: 31 additions & 0 deletions .suite-cli/cli/scripts/changeDirectory.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env node

const { program } = require('commander');
const { changeDirectory, logInfo, logError, logSuccess } = require('./scripts.module')
const { exit } = require('node:process')
const figlet = require('figlet')

console.log(figlet.textSync('Microservices-Suite'))
program
.description('The function cds into given directory_path')
.argument('<directory_path>', 'The path to the file')
.action((directory_path) => {
try {
changeDirectory({ directory_path });
logSuccess({ message: `Directory found:- ${directory_path}` })
} catch (error) {
switch (error.code) {
case ('ENOENT'):
logError({ error: `Direcotry not found:- ${directory_path}` });
exit(1)
case ('ENOTDIR'):
logError({ error: `Path not directory:- ${directory_path}` });
exit(1)
default:
console.log(error)

}
}
});
program.parse(process.argv);
module.exports = program
17 changes: 17 additions & 0 deletions .suite-cli/cli/scripts/checkDocker.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env node

const { program } = require('commander')
const { checkDocker, getPlatform, logInfo } = require('./scripts.module')

require('./scripts.module')
const figlet = require('figlet')

console.log(figlet.textSync('Microservices-Suite'))
program
.description('Checks if docker is running')
.action(async () => {
const _ = await checkDocker()
logInfo({ message: `Platform : ${`${getPlatform() === 'MacOS' ? '🍏' : 'Linux' ? '🐧' : '🪟'} ${getPlatform()}`} : ${_ ? '✓' : '⚠️'} docker is ${_ ? 'running...' : 'not running. Attempting to start docker...'}` })
})
program.parse(process.argv);
module.exports = program
16 changes: 16 additions & 0 deletions .suite-cli/cli/scripts/envFileExists.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env node

const { program } = require('commander');
const { envFileExists, logInfo, logError } = require('./scriptsmodule')
const { statSync } = require('fs')
const figlet = require('figlet')

console.log(figlet.textSync('Microservices-Suite'))
program
.description('Checks if the file exists at the given path')
.argument('<file_path>', 'The path to the file to check')
.action((file_path) => {
envFileExists({ file_path }) ? logInfo({ message: `${statSync(file_path).isFile() ? 'File' : 'Directory'} found:- ${file_path}` }) : logError({ error: `Path not found:- ${file_path}` })
});
program.parse(process.argv);
module.exports = program
21 changes: 21 additions & 0 deletions .suite-cli/cli/scripts/generateDirectoryPath.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env node

const { program } = require('commander');
const { generateDirectoryPath, logInfo } = require('./scripts.module')
const figlet = require('figlet')

console.log(figlet.textSync('Microservices-Suite'))
program
.command('generate-path')
.description('Dynamically generate directory path given workspace_name')
.argument('<workspace-name>', 'Name of the workspace to cd into')
.option('-d, --workspace-directory <directory>', 'Directory where to look for the workspace. Defaults to "microservices"', 'microservices')
.action((workspace_name, options) => {
const path = generateDirectoryPath({
workspace_name,
workspace_directory: options.workspaceDirectory
});
logInfo({ message: path })
});
program.parse(process.argv);
module.exports = program
15 changes: 15 additions & 0 deletions .suite-cli/cli/scripts/getPlatform.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env node

const { program } = require('commander');
const { getPlatform, logInfo } = require('./scripts.module')
const figlet = require('figlet');
const chalk = require('chalk');

console.log(figlet.textSync('Microservices-Suite'))
program
.description('Gets the platorm Os the app is running on')
.action(() => {
logInfo({ message: `Platform: ${getPlatform() === 'MacOS' ? '🍏' : 'Linux' ? '🐧' : '🪟'} ${getPlatform()}` });
});
program.parse(process.argv);
module.exports = program
11 changes: 11 additions & 0 deletions .suite-cli/cli/scripts/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports.generateDirectoryPath=require('./generateDirectoryPath.cmd'),
module.exports.changeDirectory=require('./changeDirectory.cmd'),
module.exports.envFileExists=require('./envFileExists.cmd'),
module.exports.logInfoMessage=require('./logInfoMessage.cmd'),
module.exports.logErrorMessage=require('./logErrorMessage.cmd'),
module.exports.logSuccessMessage=require('./logSuccessMessage.cmd'),
module.exports.isMatch=require('./isMatch.cmd'),
module.exports.getPlatform=require('./getPlatform.cmd'),
module.exports.checkDockerCmd=require('./checkDocker.cmd'),
module.exports.installDepsAtWorkspaceCmd=require('./installDepsAtWorkspace.cmd'),
module.exports.addDepsAtWorkspacecmd=require('./addDepsAtWorkspace.cmd')
Empty file.
18 changes: 18 additions & 0 deletions .suite-cli/cli/scripts/isMatch.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env node

const { program } = require('commander');
const { isMatch, logSuccess, l, logSuccessogError } = require('./scripts.module')
const figlet = require('figlet');
const chalk = require('chalk');

console.log(figlet.textSync('Microservices-Suite'))
program
.description('Compares if 2 values match')
.argument('<a>', 'first value')
.argument('<b>', 'second value')
.action((a, b) => {
isMatch({ a, b }) ? logSuccess({ message: true }) : logError({ error: false })
isMatch({ a, b });
});
program.parse(process.argv);
module.exports = program
15 changes: 15 additions & 0 deletions .suite-cli/cli/scripts/logErrorMessage.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env node

const { program } = require('commander');
const { logError } = require('./scripts.module')
const figlet = require('figlet');

console.log(figlet.textSync('Microservices-Suite'))
program
.description('Prints Error message to screen')
.argument('<error>', 'Error to display to console')
.action((error) => {
logError({ error });
});
program.parse(process.argv);
module.exports = program
16 changes: 16 additions & 0 deletions .suite-cli/cli/scripts/logInfoMessage.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env node

const { program } = require('commander');
const { logInfo } = require('./scripts.module')
const figlet = require('figlet');
const chalk = require('chalk');

console.log(figlet.textSync('Microservices-Suite'))
program
.description('Prints informational message to screen')
.argument('<message>', 'Info to display to console')
.action((message) => {
logInfo({ message });
});
program.parse(process.argv);
module.exports = program
16 changes: 16 additions & 0 deletions .suite-cli/cli/scripts/logSuccessMessage.cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env node

const { program } = require('commander');
const { logSuccess } = require('./scriptsmodule')
const figlet = require('figlet');
const chalk = require('chalk');

console.log(figlet.textSync('Microservices-Suite'))
program
.description('Prints success message to screen')
.argument('<message>', 'Message to display to console')
.action((message) => {
logSuccess({ message });
});
program.parse(process.argv);
module.exports = program
Loading