@gasket/plugin-elastic-apm 7.5.2 → 7.5.4

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/cjs/actions.cjs CHANGED
@@ -17,18 +17,12 @@ function _getRequireWildcardCache(nodeInterop) {
17
17
  })(nodeInterop);
18
18
  }
19
19
  function _interop_require_wildcard(obj, nodeInterop) {
20
- if (!nodeInterop && obj && obj.__esModule) {
21
- return obj;
22
- }
23
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
24
- return {
25
- default: obj
26
- };
27
- }
20
+ if (!nodeInterop && obj && obj.__esModule) return obj;
21
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") return {
22
+ default: obj
23
+ };
28
24
  var cache = _getRequireWildcardCache(nodeInterop);
29
- if (cache && cache.has(obj)) {
30
- return cache.get(obj);
31
- }
25
+ if (cache && cache.has(obj)) return cache.get(obj);
32
26
  var newObj = {
33
27
  __proto__: null
34
28
  };
@@ -36,17 +30,12 @@ function _interop_require_wildcard(obj, nodeInterop) {
36
30
  for(var key in obj){
37
31
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
38
32
  var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
39
- if (desc && (desc.get || desc.set)) {
40
- Object.defineProperty(newObj, key, desc);
41
- } else {
42
- newObj[key] = obj[key];
43
- }
33
+ if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
34
+ else newObj[key] = obj[key];
44
35
  }
45
36
  }
46
37
  newObj.default = obj;
47
- if (cache) {
48
- cache.set(obj, newObj);
49
- }
38
+ if (cache) cache.set(obj, newObj);
50
39
  return newObj;
51
40
  }
52
41
  const getApmTransaction = (0, _request.withGasketRequestCache)(async function getApmTransaction(gasket, req) {
package/cjs/configure.cjs CHANGED
@@ -1,9 +1,4 @@
1
- /**
2
- * Determines if the Elastic APM agent has sufficient config to be active
3
- * @param {import('./index.js').ExtendedAgentConfigOptions} config Apm agent config
4
- * @param {Record<string, string | undefined>} env Environment variables
5
- * @returns {boolean} A combined config object
6
- */ Object.defineProperty(exports, "__esModule", {
1
+ Object.defineProperty(exports, "__esModule", {
7
2
  value: true
8
3
  });
9
4
  Object.defineProperty(exports, /** @type {import('@gasket/core').HookHandler<'configure'>} */ "default", {
@@ -12,7 +7,12 @@ Object.defineProperty(exports, /** @type {import('@gasket/core').HookHandler<'co
12
7
  return configure;
13
8
  }
14
9
  });
15
- const isActive = (config, env)=>{
10
+ /**
11
+ * Determines if the Elastic APM agent has sufficient config to be active
12
+ * @param {import('./index.js').ExtendedAgentConfigOptions} config Apm agent config
13
+ * @param {Record<string, string | undefined>} env Environment variables
14
+ * @returns {boolean} A combined config object
15
+ */ const isActive = (config, env)=>{
16
16
  const { active, serverUrl, secretToken } = config;
17
17
  if (active || env.ELASTIC_APM_ACTIVE) {
18
18
  return true;
package/cjs/cookies.cjs CHANGED
@@ -9,14 +9,14 @@
9
9
  function _export(target, all) {
10
10
  for(var name in all)Object.defineProperty(target, name, {
11
11
  enumerable: true,
12
- get: all[name]
12
+ get: Object.getOwnPropertyDescriptor(all, name).get
13
13
  });
14
14
  }
15
15
  _export(exports, {
16
- filterSensitiveCookies: function() {
16
+ get filterSensitiveCookies () {
17
17
  return filterSensitiveCookies;
18
18
  },
19
- sensitiveCookies: function() {
19
+ get sensitiveCookies () {
20
20
  return sensitiveCookies;
21
21
  }
22
22
  });
package/cjs/index.cjs CHANGED
@@ -27,18 +27,12 @@ function _getRequireWildcardCache(nodeInterop) {
27
27
  })(nodeInterop);
28
28
  }
29
29
  function _interop_require_wildcard(obj, nodeInterop) {
30
- if (!nodeInterop && obj && obj.__esModule) {
31
- return obj;
32
- }
33
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
34
- return {
35
- default: obj
36
- };
37
- }
30
+ if (!nodeInterop && obj && obj.__esModule) return obj;
31
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") return {
32
+ default: obj
33
+ };
38
34
  var cache = _getRequireWildcardCache(nodeInterop);
39
- if (cache && cache.has(obj)) {
40
- return cache.get(obj);
41
- }
35
+ if (cache && cache.has(obj)) return cache.get(obj);
42
36
  var newObj = {
43
37
  __proto__: null
44
38
  };
@@ -46,17 +40,12 @@ function _interop_require_wildcard(obj, nodeInterop) {
46
40
  for(var key in obj){
47
41
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
48
42
  var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
49
- if (desc && (desc.get || desc.set)) {
50
- Object.defineProperty(newObj, key, desc);
51
- } else {
52
- newObj[key] = obj[key];
53
- }
43
+ if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
44
+ else newObj[key] = obj[key];
54
45
  }
55
46
  }
56
47
  newObj.default = obj;
57
- if (cache) {
58
- cache.set(obj, newObj);
59
- }
48
+ if (cache) cache.set(obj, newObj);
60
49
  return newObj;
61
50
  }
62
51
  const { name, version, description } = _packagejson.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gasket/plugin-elastic-apm",
3
- "version": "7.5.2",
3
+ "version": "7.5.4",
4
4
  "description": "Adds Elastic APM instrumentation to your application",
5
5
  "type": "module",
6
6
  "types": "lib/index.d.ts",
@@ -33,16 +33,16 @@
33
33
  "bugs": "https://github.com/godaddy/gasket/issues",
34
34
  "homepage": "https://github.com/godaddy/gasket/tree/main/packages/gasket-plugin-elastic-apm",
35
35
  "dependencies": {
36
- "@gasket/request": "^7.5.6"
36
+ "@gasket/request": "^7.6.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "dotenv": "^16.4.7",
40
- "elastic-apm-node": "^4.11.0",
40
+ "elastic-apm-node": "^4.18.0",
41
41
  "vitest": "^3.2.0",
42
- "@gasket/cjs": "^7.1.2",
43
- "@gasket/core": "^7.7.6",
44
- "@gasket/plugin-metadata": "^7.5.13",
45
- "create-gasket-app": "^7.4.24"
42
+ "@gasket/cjs": "^7.1.3",
43
+ "@gasket/core": "^7.7.7",
44
+ "@gasket/plugin-metadata": "^7.5.14",
45
+ "create-gasket-app": "^7.4.26"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "gasket-cjs ./lib",