Skip to content

Commit

Permalink
Merge pull request #19 from trendmicro/update_to_latest_version_v1.4.2
Browse files Browse the repository at this point in the history
update to latest version: v1.4.2
  • Loading branch information
trend-gary-tsai authored Mar 4, 2025
2 parents 52482d0 + 55909fa commit 11f2ef7
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 23 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 1.4.2 - 2025-03-03

* Support new region me-central-1
* Upgrade @grpc/grpc-js to 1.9.15
* Upgrade google-protbuf to 3.21.4

## 1.4.1 - 2024-08-27

* Update README.md for certificate verification bypass
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Create a new instance of the `AmaasGrpcClient` class.

| Parameter | Description | Default value |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| amaasHostName | The region of your Vision One account. The region is the location where you acquire your api key. Value provided must be one of the Vision One regions, e.g. `ap-northeast-1`, `ap-south-1`, `ap-southeast-1`, `ap-southeast-2`, `eu-central-1`, `us-east-1`, etc. | |
| amaasHostName | The region of your Vision One account. The region is the location where you acquire your api key. Value provided must be one of the Vision One regions, e.g. `ap-northeast-1`, `ap-south-1`, `ap-southeast-1`, `ap-southeast-2`, `eu-central-1`, `us-east-1`, `me-central-1`, etc. | |
| credent | Your own Vision One API Key. | |
| timeout | Timeout to cancel the connection to server in seconds. | 300 |
| enableTLS | Enable or disable TLS. TLS should always be enabled when connecting to the File Security service. For more information, see the 'Ensuring Secure Communication with TLS' section. | true |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.1
1.4.2
2 changes: 1 addition & 1 deletion __tests__/amaasSDK.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ describe('error testing', () => {
})
it('should return an error if invalid region', () => {
const region = 'us1'
const error = new Error(`Invalid region: ${region}, region value should be one of ap-southeast-2,eu-central-1,ap-northeast-1,ap-southeast-1,us-east-1,ap-south-1`)
const error = new Error(`Invalid region: ${region}, region value should be one of ap-southeast-2,eu-central-1,ap-northeast-1,ap-southeast-1,us-east-1,ap-south-1,me-central-1`)
expect(() => {
const amaasScanClient = new AmaasGrpcClient(region, authKey)
expect(amaasScanClient).toBeUndefined()
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "file-security-sdk",
"version": "1.4.1",
"version": "1.4.2",
"description": "Vision One File Security API library in TypeScript",
"main": "index.js",
"engines": {
Expand All @@ -25,8 +25,8 @@
},
"homepage": "https://github.com/trendmicro/tm-v1-fs-nodejs-sdk",
"dependencies": {
"@grpc/grpc-js": "^1.8.10",
"google-protobuf": "^3.21.2"
"@grpc/grpc-js": "^1.9.15",
"google-protobuf": "^3.21.4"
},
"devDependencies": {
"@grpc/proto-loader": "^0.7.8",
Expand Down
7 changes: 6 additions & 1 deletion src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const AWS_DE_REGION = 'eu-central-1'
// const AWS_CA_REGION = 'ca-central-1'
// const AWS_TREND_REGION = 'us-east-2'
// const AWS_GB_REGION = 'eu-west-2'
const AWS_AE_REGION = 'me-central-1'
const C1_JP_REGION = 'jp-1'
const C1_SG_REGION = 'sg-1'
const C1_AU_REGION = 'au-1'
Expand All @@ -22,11 +23,13 @@ const C1_DE_REGION = 'de-1'
const C1_CA_REGION = 'ca-1'
// const C1_TREND_REGION = 'trend-us-1'
const C1_GB_REGION = 'gb-1'
const C1_AE_REGION = 'ae-1'

/*
const C1Regions = [C1_AU_REGION, C1_CA_REGION, C1_DE_REGION, C1_GB_REGION, C1_IN_REGION, C1_JP_REGION, C1_SG_REGION,
C1_US_REGION, C1_TREND_REGION]
*/
const V1Regions = [AWS_AU_REGION, AWS_DE_REGION, AWS_JP_REGION, AWS_SG_REGION, AWS_US_REGION, AWS_IN_REGION]
const V1Regions = [AWS_AU_REGION, AWS_DE_REGION, AWS_JP_REGION, AWS_SG_REGION, AWS_US_REGION, AWS_IN_REGION, AWS_AE_REGION]
const SupportedV1Regions = V1Regions
// const SupportedC1Regions = [C1_AU_REGION, C1_CA_REGION, C1_DE_REGION, C1_GB_REGION, C1_IN_REGION, C1_JP_REGION, C1_SG_REGION, C1_US_REGION]

Expand All @@ -40,6 +43,7 @@ const V1ToC1RegionMapping = new Map<string, string>([
[AWS_JP_REGION, C1_JP_REGION],
[AWS_SG_REGION, C1_SG_REGION],
[AWS_US_REGION, C1_US_REGION],
[AWS_AE_REGION, C1_AE_REGION],
]
)

Expand Down Expand Up @@ -74,6 +78,7 @@ export const getFQDN = (region: string): string => {
[C1_JP_REGION, 'antimalware.jp-1.cloudone.trendmicro.com:443'],
[C1_GB_REGION, 'antimalware.gb-1.cloudone.trendmicro.com:443'],
[C1_CA_REGION, 'antimalware.ca-1.cloudone.trendmicro.com:443'],
[C1_AE_REGION, 'antimalware.ae-1.cloudone.trendmicro.com:443'],
]
)

Expand Down

0 comments on commit 11f2ef7

Please sign in to comment.