@zintrust/client-rds-data 0.1.43 → 0.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,37 +1,34 @@
1
1
  import { ErrorFactory } from '@zintrust/core';
2
2
  function getErrorCode(error) {
3
- if (typeof error === 'object' &&
4
- error !== null &&
5
- typeof error.code === 'string') {
6
- return error.code;
7
- }
8
- if (typeof error === 'object' &&
9
- error !== null &&
10
- typeof error.cause === 'object' &&
11
- error.cause !== null &&
12
- typeof error.cause.code === 'string') {
13
- return error.cause.code;
3
+ if (error && typeof error === 'object') {
4
+ const err = error;
5
+ if (typeof err.code === 'string')
6
+ return err.code;
7
+ const cause = err.cause;
8
+ if (cause && typeof cause === 'object') {
9
+ const causeErr = cause;
10
+ if (typeof causeErr.code === 'string')
11
+ return causeErr.code;
12
+ }
14
13
  }
15
14
  return '';
16
15
  }
17
16
  function getErrorMessage(error) {
18
- if (typeof error === 'object' &&
19
- error !== null &&
20
- typeof error.message === 'string') {
21
- return error.message;
22
- }
23
- if (typeof error === 'object' &&
24
- error !== null &&
25
- typeof error.cause === 'object' &&
26
- error.cause !== null &&
27
- typeof error.cause.message ===
28
- 'string') {
29
- return error.cause.message;
17
+ if (error && typeof error === 'object') {
18
+ const err = error;
19
+ if (typeof err.message === 'string')
20
+ return err.message;
21
+ const cause = err.cause;
22
+ if (cause && typeof cause === 'object') {
23
+ const causeErr = cause;
24
+ if (typeof causeErr.message === 'string')
25
+ return causeErr.message;
26
+ }
30
27
  }
31
28
  return '';
32
29
  }
33
30
  function isMissingEsmPackage(error, packageName) {
34
- if (typeof error !== 'object' || error === null)
31
+ if (!error || typeof error !== 'object')
35
32
  return false;
36
33
  const code = getErrorCode(error);
37
34
  const message = getErrorMessage(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/client-rds-data",
3
- "version": "0.1.43",
3
+ "version": "0.1.51",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "@aws-sdk/client-secrets-manager": "^3.500.0"
23
23
  },
24
24
  "peerDependencies": {
25
- "@zintrust/core": "^0.1.43"
25
+ "@zintrust/core": "^0.1.51"
26
26
  },
27
27
  "overrides": {
28
28
  "fast-xml-parser": "^5.3.6"
@@ -1,36 +0,0 @@
1
- {
2
- "name": "@zintrust/client-rds-data",
3
- "version": "0.1.27",
4
- "buildDate": "2026-02-18T18:05:15.846Z",
5
- "buildEnvironment": {
6
- "node": "v20.20.0",
7
- "platform": "linux",
8
- "arch": "x64"
9
- },
10
- "git": {
11
- "commit": "8d344e9",
12
- "branch": "master"
13
- },
14
- "package": {
15
- "engines": {
16
- "node": ">=20.0.0"
17
- },
18
- "dependencies": [
19
- "@aws-sdk/client-rds-data",
20
- "@aws-sdk/client-secrets-manager"
21
- ],
22
- "peerDependencies": [
23
- "@zintrust/core"
24
- ]
25
- },
26
- "files": {
27
- "index.d.ts": {
28
- "size": 825,
29
- "sha256": "d42280bd72375b4b16f145043008d652520655c1e776c60458605e07e2417874"
30
- },
31
- "index.js": {
32
- "size": 3546,
33
- "sha256": "a75eeaf8078baf97ea6b5713c3fa01eaef21aa0a6538cc9cc89bb98262d3ee6a"
34
- }
35
- }
36
- }