@lokalise/node-core 9.16.1 → 9.17.0

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.d.ts CHANGED
@@ -21,3 +21,4 @@ export { type MayOmit } from './src/common/may-omit';
21
21
  export { type FreeformRecord } from './src/common/commonTypes';
22
22
  export { RequestValidationError, AccessDeniedError, EntityNotFoundError, type ValidationError, type CommonErrorParams, type OptionalMessageErrorParams, AuthFailedError, } from './src/errors/publicErrors';
23
23
  export { waitAndRetry } from './src/utils/waitUtils';
24
+ export * from './src/observability/observabilityTypes';
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AccessDeniedError = exports.RequestValidationError = exports.resolveGlobalErrorLogObject = exports.globalLogger = exports.executeSettleAllAndHandleGlobalErrors = exports.executeAndHandleGlobalErrors = exports.executeAsyncAndHandleGlobalErrors = exports.resolveMonorepoLoggerConfiguration = exports.resolveLoggerConfiguration = exports.hasMessage = exports.isPublicNonRecoverableError = exports.isObject = exports.isStandardizedError = exports.isInternalError = exports.isError = exports.deepClone = exports.convertDateFieldsToIsoString = exports.isEmptyObject = exports.copyWithoutEmpty = exports.copyWithoutUndefined = exports.pickWithoutUndefined = exports.pick = exports.groupByUnique = exports.groupByPath = exports.groupBy = exports.removeNullish = exports.removeFalsy = exports.callChunked = exports.chunk = exports.isFailure = exports.isSuccess = exports.failure = exports.success = exports.createRangeValidator = exports.ensureClosingSlashTransformer = exports.ConfigScope = exports.isResponseStatusError = exports.ResponseStatusError = exports.InternalError = exports.PublicNonRecoverableError = exports.JSON_HEADERS = exports.buildClient = exports.httpClient = exports.sendPostBinary = exports.sendPost = exports.sendGet = exports.sendPatch = exports.sendDelete = exports.sendPutBinary = exports.sendPut = void 0;
4
4
  exports.waitAndRetry = exports.AuthFailedError = exports.EntityNotFoundError = void 0;
5
+ const tslib_1 = require("tslib");
5
6
  var httpClient_1 = require("./src/http/httpClient");
6
7
  Object.defineProperty(exports, "sendPut", { enumerable: true, get: function () { return httpClient_1.sendPut; } });
7
8
  Object.defineProperty(exports, "sendPutBinary", { enumerable: true, get: function () { return httpClient_1.sendPutBinary; } });
@@ -71,4 +72,5 @@ Object.defineProperty(exports, "EntityNotFoundError", { enumerable: true, get: f
71
72
  Object.defineProperty(exports, "AuthFailedError", { enumerable: true, get: function () { return publicErrors_1.AuthFailedError; } });
72
73
  var waitUtils_1 = require("./src/utils/waitUtils");
73
74
  Object.defineProperty(exports, "waitAndRetry", { enumerable: true, get: function () { return waitUtils_1.waitAndRetry; } });
75
+ tslib_1.__exportStar(require("./src/observability/observabilityTypes"), exports);
74
76
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;AAAA,oDAe8B;AAd5B,qGAAA,OAAO,OAAA;AACP,2GAAA,aAAa,OAAA;AACb,wGAAA,UAAU,OAAA;AACV,uGAAA,SAAS,OAAA;AACT,qGAAA,OAAO,OAAA;AACP,sGAAA,QAAQ,OAAA;AACR,4GAAA,cAAc,OAAA;AACd,wGAAA,UAAU,OAAA;AACV,yGAAA,WAAW,OAAA;AAKX,0GAAA,YAAY,OAAA;AAGd,oFAG+C;AAF7C,sIAAA,yBAAyB,OAAA;AAI3B,4DAImC;AAHjC,8GAAA,aAAa,OAAA;AAIf,wEAAsE;AAA7D,0HAAA,mBAAmB,OAAA;AAC5B,gEAAoE;AAA3D,wHAAA,qBAAqB,OAAA;AAE9B,wDAAsD;AAA7C,0GAAA,WAAW,OAAA;AACpB,sEAA+E;AAAtE,mIAAA,6BAA6B,OAAA;AACtC,kEAAoE;AAA3D,wHAAA,oBAAoB,OAAA;AAQ7B,8CAAyF;AAAnE,iGAAA,OAAO,OAAA;AAAE,iGAAA,OAAO,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,mGAAA,SAAS,OAAA;AA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Z,iIAAA,2BAA2B,OAAA;AAK7B,0DAQkC;AAPhC,sHAAA,sBAAsB,OAAA;AACtB,iHAAA,iBAAiB,OAAA;AACjB,mHAAA,mBAAmB,OAAA;AAInB,+GAAA,eAAe,OAAA;AAGjB,mDAAoD;AAA3C,yGAAA,YAAY,OAAA;AAErB,iFAAsD"}
@@ -0,0 +1,22 @@
1
+ export type TransactionObservabilityManager = {
2
+ /**
3
+ * Creates and starts a background transaction to record work done
4
+ *
5
+ * @param transactionName - used for grouping similar transactions together
6
+ * @param uniqueTransactionKey - used for identifying specific ongoing transaction. Must be reasonably unique to reduce possibility of collisions
7
+ */
8
+ start: (transactionName: string, uniqueTransactionKey: string) => unknown;
9
+ /**
10
+ * Creates and starts a background transaction to record work done, and relates it to a specified group
11
+ *
12
+ * @param transactionName - used for grouping similar transactions together
13
+ * @param uniqueTransactionKey - used for identifying specific ongoing transaction. Must be reasonably unique to reduce possibility of collisions *
14
+ * @param transactionGroup - group is used for grouping related transactions with different names
15
+ */
16
+ startWithGroup: (transactionName: string, uniqueTransactionKey: string, transactionGroup: string) => void;
17
+ /**
18
+ * Ends the transaction
19
+ * @param uniqueTransactionKey - used for identifying specific ongoing transaction. Must be reasonably unique to reduce possibility of collisions
20
+ */
21
+ stop: (uniqueTransactionKey: string) => unknown;
22
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=observabilityTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observabilityTypes.js","sourceRoot":"","sources":["../../../src/observability/observabilityTypes.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/node-core",
3
- "version": "9.16.1",
3
+ "version": "9.17.0",
4
4
  "author": {
5
5
  "name": "Lokalise",
6
6
  "url": "https://lokalise.com/"
@@ -28,30 +28,30 @@
28
28
  "test:coverage": "vitest --coverage",
29
29
  "test:ci": "npm run lint && npm run test:coverage",
30
30
  "test:update-snapshots": "vitest -u",
31
- "lint": "eslint . --ext .ts && prettier --check --log-level warn \"**/*.{json,md,ts}\"",
32
- "lint:fix": "eslint . --fix && prettier --write --log-level warn \"**/*.{json,md,ts}\"",
31
+ "lint": "eslint . --ext .ts && prettier --check --log-level warn \"**/*.{json,md,ts}\" !CHANGELOG.md",
32
+ "lint:fix": "eslint . --fix && prettier --write --log-level warn \"**/*.{json,md,ts}\" !CHANGELOG.md",
33
33
  "version": "auto-changelog -p && git add CHANGELOG.md",
34
34
  "prepublishOnly": "npm run build"
35
35
  },
36
36
  "dependencies": {
37
37
  "dot-prop": "6.0.1",
38
- "pino": "^8.21.0",
38
+ "pino": "^9.0.0",
39
39
  "tslib": "^2.6.2",
40
- "undici": "^6.14.1",
40
+ "undici": "^6.15.0",
41
41
  "undici-retry": "^5.0.3",
42
- "zod": "^3.22.4"
42
+ "zod": "^3.23.6"
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "^20.11.30",
46
- "@typescript-eslint/eslint-plugin": "^7.3.1",
47
- "@typescript-eslint/parser": "^7.3.1",
48
- "@vitest/coverage-v8": "1.5.0",
45
+ "@types/node": "^20.12.8",
46
+ "@typescript-eslint/eslint-plugin": "^7.8.0",
47
+ "@typescript-eslint/parser": "^7.8.0",
48
+ "@vitest/coverage-v8": "1.6.0",
49
49
  "auto-changelog": "^2.4.0",
50
50
  "eslint": "^8.57.0",
51
51
  "eslint-plugin-import": "^2.29.1",
52
52
  "eslint-plugin-vitest": "0.4.1",
53
53
  "prettier": "^3.2.5",
54
- "typescript": "^5.4.3",
55
- "vitest": "1.5.0"
54
+ "typescript": "^5.4.5",
55
+ "vitest": "1.6.0"
56
56
  }
57
57
  }