Skip to content

Commit 39b9d2c

Browse files
authored
Merge branch 'master' into GH-2240
2 parents dbc01ac + 5edc0f0 commit 39b9d2c

File tree

199 files changed

+12218
-3802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+12218
-3802
lines changed

.github/workflows/trivy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Trivy Scan
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
pull_request:
9+
branches: [master]
10+
types: [opened, synchronize, reopened]
11+
12+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
13+
jobs:
14+
# This workflow contains a single job called "trivy"
15+
trivy:
16+
# The type of runner that the job will run on
17+
runs-on: [self-hosted, linux, codebuild]
18+
19+
# Steps represent a sequence of tasks that will be executed as part of the job
20+
steps:
21+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22+
- uses: actions/checkout@v3
23+
24+
- name: Run Trivy vulnerability scanner in repo mode
25+
uses: aquasecurity/trivy-action@0.28.0
26+
with:
27+
scan-type: "fs"
28+
scan-ref: "${{ github.workspace }}"
29+
trivy-config: "${{ github.workspace }}/trivy.yaml"

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
<a href="https://sonarcloud.io/summary/new_code?id=sourcefuse_loopback4-microservice-catalog" target="_blank">
1111
<img alt="Sonar Quality Gate" src="https://img.shields.io/sonar/quality_gate/sourcefuse_loopback4-microservice-catalog?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge">
1212
</a>
13-
<a href="https://app.snyk.io/org/ashishkaushik/reporting?context[page]=issues-detail&project_target=%255B%2522sourcefuse%252Floopback4-microservice-catalog%2522%255D&project_origin=%255B%2522github%2522%255D&issue_status=%255B%2522Open%2522%255D&issue_by=Severity&table_issues_detail_cols=SCORE%257CCVE%257CCWE%257CPROJECT%257CEXPLOIT%2520MATURITY%257CAUTO%2520FIXABLE%257CINTRODUCED%257CSNYK%2520PRODUCT&v=1">
14-
<img alt="Synk Status" src="https://img.shields.io/badge/SYNK_SECURITY-MONITORED-GREEN?style=for-the-badge">
15-
</a>
1613
<a href="./LICENSE">
1714
<img src="https://img.shields.io/github/license/sourcefuse/loopback4-microservice-catalog?style=for-the-badge" alt="License" />
1815
</a>

package-lock.json

Lines changed: 10075 additions & 3419 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
},
4242
"oidc-provider": {
4343
"@koa/cors": "^5.0.0"
44+
},
45+
"loopback4-notifications": {
46+
"twilio": {
47+
"axios": "^1.8.2"
48+
}
4449
}
4550
},
4651
"dependencies": {

packages/cache/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## <small>4.0.2 (2025-07-04)</small>
7+
8+
**Note:** Version bump only for package @sourceloop/cache
9+
10+
11+
12+
13+
14+
## <small>4.0.1 (2025-07-03)</small>
15+
16+
* refactor(chore): fix sonarqube issues (#2288) ([3dc9655](https://github.com/sourcefuse/loopback4-microservice-catalog/commit/3dc9655)), closes [#2288](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2288) [#2287](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2287)
17+
18+
19+
20+
21+
622
## 4.0.0 (2025-06-11)
723

824
* refactor(chore): standardize node version to >=20 (#2263) ([0c9e42e](https://github.com/sourcefuse/loopback4-microservice-catalog/commit/0c9e42e)), closes [#2263](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2263) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260)

packages/cache/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sourceloop/cache",
3-
"version": "4.0.0",
3+
"version": "4.0.2",
44
"description": "A caching extension to cache methods.",
55
"keywords": [
66
"loopback-extension",
@@ -52,7 +52,7 @@
5252
"@loopback/repository": "^7.0.9",
5353
"@loopback/rest": "^14.0.9",
5454
"@loopback/rest-explorer": "^7.0.9",
55-
"@sourceloop/core": "^16.0.0",
55+
"@sourceloop/core": "^16.1.0",
5656
"tslib": "^2.6.2",
5757
"winston": "^3.17.0"
5858
},

packages/cache/src/services/strategies/redis-store.strategy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class RedisStoreStrategy implements ICacheStore {
8080
try {
8181
value = JSON.parse(value);
8282
} catch (e) {
83-
// do nothing
83+
throw new Error(`Failed to parse value: ${e.message}`);
8484
}
8585
return value as T;
8686
} else if (typeof res === 'number') {
@@ -94,7 +94,7 @@ export class RedisStoreStrategy implements ICacheStore {
9494
try {
9595
decoded = JSON.parse(decoded);
9696
} catch (e) {
97-
// do nothing
97+
throw new Error(`Failed to parse value: ${e.message}`);
9898
}
9999
return decoded;
100100
}) as T;

packages/cli/CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 10.1.0 (2025-07-04)
7+
8+
* fix(cli): remove unnecessary file (#2290) ([7ebdab0](https://github.com/sourcefuse/loopback4-microservice-catalog/commit/7ebdab0)), closes [#2290](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2290) [#0](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/0)
9+
* feat(cli): add mcp server command (#2282) ([17c1238](https://github.com/sourcefuse/loopback4-microservice-catalog/commit/17c1238)), closes [#2282](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2282) [#0](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/0) [#0](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/0) [#0](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/0)
10+
11+
12+
13+
14+
15+
## <small>10.0.1 (2025-07-03)</small>
16+
17+
* refactor(chore): fix sonarqube issues (#2288) ([3dc9655](https://github.com/sourcefuse/loopback4-microservice-catalog/commit/3dc9655)), closes [#2288](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2288) [#2287](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2287)
18+
19+
20+
21+
22+
623
## 10.0.0 (2025-06-11)
724

825
* refactor(chore): standardize node version to >=20 (#2263) ([0c9e42e](https://github.com/sourcefuse/loopback4-microservice-catalog/commit/0c9e42e)), closes [#2263](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2263) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260) [#2260](https://github.com/sourcefuse/loopback4-microservice-catalog/issues/2260)

packages/cli/README.md

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ To install sourceloop-cli, run
99
```shell
1010
npm install @sourceloop/cli
1111
```
12+
1213
Once the above command is executed, you will be able to access the CLI commands directly from your terminal. You can use either `sl` or `arc` as shorthand to run any of the `sourceloop` commands listed below. A sample usage is provided for reference:
1314

1415
## Usage
@@ -19,7 +20,7 @@ $ npm install -g @sourceloop/cli
1920
$ sl COMMAND
2021
running command...
2122
$ sl (-v|--version|version)
22-
@sourceloop/cli/10.0.0 linux-x64 node-v20.19.2
23+
@sourceloop/cli/10.1.0 linux-x64 node-v20.19.2
2324
$ sl --help [COMMAND]
2425
USAGE
2526
$ sl COMMAND
@@ -34,6 +35,7 @@ USAGE
3435
* [`sl cdk`](#sl-cdk)
3536
* [`sl extension [NAME]`](#sl-extension-name)
3637
* [`sl help [COMMAND]`](#sl-help-command)
38+
* [`sl mcp`](#sl-mcp)
3739
* [`sl microservice [NAME]`](#sl-microservice-name)
3840
* [`sl scaffold [NAME]`](#sl-scaffold-name)
3941
* [`sl update`](#sl-update)
@@ -79,16 +81,16 @@ OPTIONS
7981
8082
-p, --packageJsonName=packageJsonName Package name for arc-cdk
8183
82-
-r, --relativePathToApp=relativePathToApp Relative path to the service you want to deploy
84+
-r, --relativePathToApp=relativePathToApp Relative path to the application ts file
8385
8486
--help show manual pages
8587
```
8688

87-
_See code: [src/commands/cdk.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.0.0/src/commands/cdk.ts)_
89+
_See code: [src/commands/cdk.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.1.0/src/commands/cdk.ts)_
8890

8991
## `sl extension [NAME]`
9092

91-
add an extension
93+
This generates a local package in the packages folder of a ARC generated monorepo. This package can then be installed and used inside other modules in the monorepo.
9294

9395
```
9496
USAGE
@@ -101,7 +103,7 @@ OPTIONS
101103
--help show manual pages
102104
```
103105

104-
_See code: [src/commands/extension.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.0.0/src/commands/extension.ts)_
106+
_See code: [src/commands/extension.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.1.0/src/commands/extension.ts)_
105107

106108
## `sl help [COMMAND]`
107109

@@ -120,9 +122,33 @@ OPTIONS
120122

121123
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_
122124

125+
## `sl mcp`
126+
127+
Command that runs an MCP server for the sourceloop CLI, this is not supposed to be run directly, but rather used by the MCP client to interact with the CLI commands.
128+
129+
```
130+
USAGE
131+
$ sl mcp
132+
133+
OPTIONS
134+
--help show manual pages
135+
136+
DESCRIPTION
137+
Command that runs an MCP server for the sourceloop CLI, this is not supposed to be run directly, but rather used by
138+
the MCP client to interact with the CLI commands.
139+
You can use it using the following MCP server configuration:
140+
"sourceloop": {
141+
"command": "npx",
142+
"args": ["@sourceloop/cli", "mcp"],
143+
"timeout": 300
144+
}
145+
```
146+
147+
_See code: [src/commands/mcp.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.1.0/src/commands/mcp.ts)_
148+
123149
## `sl microservice [NAME]`
124150

125-
add a microservice
151+
Add a microservice in the services or facade folder of a ARC generated monorepo. This can also optionally add migrations for the same microservice.
126152

127153
```
128154
USAGE
@@ -153,7 +179,7 @@ OPTIONS
153179
Type of the datasource
154180
155181
--[no-]facade
156-
Create as facade
182+
Create as facade inside the facades folder
157183
158184
--help
159185
show manual pages
@@ -165,11 +191,11 @@ OPTIONS
165191
Include sequelize as ORM in service
166192
```
167193

168-
_See code: [src/commands/microservice.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.0.0/src/commands/microservice.ts)_
194+
_See code: [src/commands/microservice.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.1.0/src/commands/microservice.ts)_
169195

170196
## `sl scaffold [NAME]`
171197

172-
create a project scaffold
198+
Setup a ARC based monorepo using npm workspaces with an empty services, facades and packages folder
173199

174200
```
175201
USAGE
@@ -189,7 +215,7 @@ OPTIONS
189215
--owner=owner owner of the repo
190216
```
191217

192-
_See code: [src/commands/scaffold.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.0.0/src/commands/scaffold.ts)_
218+
_See code: [src/commands/scaffold.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.1.0/src/commands/scaffold.ts)_
193219

194220
## `sl update`
195221

@@ -203,5 +229,5 @@ OPTIONS
203229
--help show manual pages
204230
```
205231

206-
_See code: [src/commands/update.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.0.0/src/commands/update.ts)_
232+
_See code: [src/commands/update.ts](https://github.com/sourcefuse/loopback4-microservice-catalog/blob/v10.1.0/src/commands/update.ts)_
207233
<!-- commandsstop -->

packages/cli/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sourceloop/cli",
3-
"version": "10.0.0",
3+
"version": "10.1.0",
44
"description": "Custom ARC CLI.",
55
"bin": {
66
"arc": "./bin/run",
@@ -38,6 +38,7 @@
3838
"license": "MIT",
3939
"dependencies": {
4040
"@loopback/cli": "^5.2.1",
41+
"@modelcontextprotocol/sdk": "^1.12.1",
4142
"@oclif/command": "^1.8.16",
4243
"@oclif/config": "^1.18.3",
4344
"@oclif/plugin-autocomplete": "1.3.10",
@@ -55,7 +56,7 @@
5556
"ts-morph": "^19.0.0",
5657
"tslib": "^2.6.2",
5758
"yeoman-environment": "^3.19.3",
58-
"yeoman-generator": "^5.9.0",
59+
"yeoman-generator": "^5.10.0",
5960
"yosay": "^2.0.2"
6061
},
6162
"devDependencies": {

0 commit comments

Comments
 (0)