@lokalise/node-core 9.5.0 → 9.6.1
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/README.md +7 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/src/common/commonTypes.d.ts +1 -0
- package/dist/src/common/commonTypes.js +3 -0
- package/dist/src/common/commonTypes.js.map +1 -0
- package/dist/src/errors/publicErrors.d.ts +26 -0
- package/dist/src/errors/publicErrors.js +52 -0
- package/dist/src/errors/publicErrors.js.map +1 -0
- package/dist/vitest.config.js +9 -5
- package/dist/vitest.config.js.map +1 -1
- package/package.json +14 -17
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ The library provides methods to resolve the default logging configuration. Publi
|
|
|
89
89
|
const logger = pino(loggerConfig)
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
- `resolveMonorepoLoggerConfiguration()`, which accepts as parameter an `appConfig`, defined by the `logLevel` and the `nodeEnv`. It mostly behaves the same as `resolveLoggerConfiguration`, with the exception of execution in `development environments`. Since monorepo services are usually ran concurrently, logs from `stdout` aren't easily accessible. For this reason this logging configuration writes development logs into files.
|
|
92
|
+
- `resolveMonorepoLoggerConfiguration()`, which accepts as parameter an `appConfig`, defined by the `logLevel` and the `nodeEnv`. It mostly behaves the same as `resolveLoggerConfiguration`, with the exception of execution in `development environments`. Since monorepo services are usually ran concurrently, logs from `stdout` aren't easily accessible. For this reason this logging configuration writes development logs into files.
|
|
93
93
|
|
|
94
94
|
The method returns a logger configuration that should be used with `pino` library as in the following example:
|
|
95
95
|
|
|
@@ -104,7 +104,6 @@ The library provides methods to resolve the default logging configuration. Publi
|
|
|
104
104
|
const logger = pino(loggerConfig)
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
|
|
108
107
|
## ConfigScope
|
|
109
108
|
|
|
110
109
|
`ConfigScope` is a class that provides a way to encapsulate a single config source (e. g. `process.env`) and produce a set of values out of it, defining constraints and transformations for them.
|
|
@@ -219,14 +218,14 @@ Additionally, `DefiniteEither` is also provided. It is a variation of the aforem
|
|
|
219
218
|
There is helper function available for writing event-driven assertions in automated tests, which rely on something eventually happening:
|
|
220
219
|
|
|
221
220
|
```ts
|
|
222
|
-
import { waitAndRetry } from
|
|
221
|
+
import { waitAndRetry } from '@lokalise/node-core'
|
|
223
222
|
|
|
224
223
|
const result = await waitAndRetry(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
224
|
+
() => {
|
|
225
|
+
return someEventEmitter.emittedEvents.length > 0
|
|
226
|
+
},
|
|
227
|
+
20, // sleepTime between attempts
|
|
228
|
+
30, // maxRetryCount before timeout
|
|
230
229
|
)
|
|
231
230
|
|
|
232
231
|
expect(result).toBe(false) // resolves to what the last attempt has returned
|
package/dist/index.d.ts
CHANGED
|
@@ -16,4 +16,6 @@ export type { AppLoggerConfig, MonorepoAppLoggerConfig } from './src/logging/log
|
|
|
16
16
|
export { type ErrorReport, type ErrorReporter, type ErrorResolver, } from './src/errors/errorReporterTypes';
|
|
17
17
|
export { executeAsyncAndHandleGlobalErrors, executeAndHandleGlobalErrors, executeSettleAllAndHandleGlobalErrors, globalLogger, resolveGlobalErrorLogObject, } from './src/errors/globalErrorHandler';
|
|
18
18
|
export { type MayOmit } from './src/common/may-omit';
|
|
19
|
+
export { type FreeformRecord } from './src/common/commonTypes';
|
|
20
|
+
export { RequestValidationError, AccessDeniedError, EntityNotFoundError, type ValidationError, type CommonErrorParams, type OptionalMessageErrorParams, AuthFailedError, } from './src/errors/publicErrors';
|
|
19
21
|
export { waitAndRetry } from './src/utils/waitUtils';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.waitAndRetry = 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.deepClone = exports.convertDateFieldsToIsoString = exports.isEmptyObject = exports.copyWithoutUndefined = exports.pickWithoutUndefined = exports.pick = exports.groupByUnique = 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.ResponseStatusError = exports.InternalError = exports.PublicNonRecoverableError = exports.buildClient = exports.httpClient = exports.sendPostBinary = exports.sendPost = exports.sendGet = exports.sendPatch = exports.sendDelete = exports.sendPutBinary = exports.sendPut = void 0;
|
|
3
|
+
exports.waitAndRetry = exports.AuthFailedError = exports.EntityNotFoundError = 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.deepClone = exports.convertDateFieldsToIsoString = exports.isEmptyObject = exports.copyWithoutUndefined = exports.pickWithoutUndefined = exports.pick = exports.groupByUnique = 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.ResponseStatusError = exports.InternalError = exports.PublicNonRecoverableError = exports.buildClient = exports.httpClient = exports.sendPostBinary = exports.sendPost = exports.sendGet = exports.sendPatch = exports.sendDelete = exports.sendPutBinary = exports.sendPut = void 0;
|
|
4
4
|
var httpClient_1 = require("./src/http/httpClient");
|
|
5
5
|
Object.defineProperty(exports, "sendPut", { enumerable: true, get: function () { return httpClient_1.sendPut; } });
|
|
6
6
|
Object.defineProperty(exports, "sendPutBinary", { enumerable: true, get: function () { return httpClient_1.sendPutBinary; } });
|
|
@@ -57,6 +57,11 @@ Object.defineProperty(exports, "executeAndHandleGlobalErrors", { enumerable: tru
|
|
|
57
57
|
Object.defineProperty(exports, "executeSettleAllAndHandleGlobalErrors", { enumerable: true, get: function () { return globalErrorHandler_1.executeSettleAllAndHandleGlobalErrors; } });
|
|
58
58
|
Object.defineProperty(exports, "globalLogger", { enumerable: true, get: function () { return globalErrorHandler_1.globalLogger; } });
|
|
59
59
|
Object.defineProperty(exports, "resolveGlobalErrorLogObject", { enumerable: true, get: function () { return globalErrorHandler_1.resolveGlobalErrorLogObject; } });
|
|
60
|
+
var publicErrors_1 = require("./src/errors/publicErrors");
|
|
61
|
+
Object.defineProperty(exports, "RequestValidationError", { enumerable: true, get: function () { return publicErrors_1.RequestValidationError; } });
|
|
62
|
+
Object.defineProperty(exports, "AccessDeniedError", { enumerable: true, get: function () { return publicErrors_1.AccessDeniedError; } });
|
|
63
|
+
Object.defineProperty(exports, "EntityNotFoundError", { enumerable: true, get: function () { return publicErrors_1.EntityNotFoundError; } });
|
|
64
|
+
Object.defineProperty(exports, "AuthFailedError", { enumerable: true, get: function () { return publicErrors_1.AuthFailedError; } });
|
|
60
65
|
var waitUtils_1 = require("./src/utils/waitUtils");
|
|
61
66
|
Object.defineProperty(exports, "waitAndRetry", { enumerable: true, get: function () { return waitUtils_1.waitAndRetry; } });
|
|
62
67
|
//# 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,oDAc8B;AAb5B,qGAAA,OAAO,OAAA;AACP,2GAAA,aAAa,OAAA;AACb,wGAAA,UAAU,OAAA;AACV,uGAAA,SAAS,OAAA;AAC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B,0IAAA,kCAAkC,OAAA;AASpC,sEAMwC;AALtC,uIAAA,iCAAiC,OAAA;AACjC,kIAAA,4BAA4B,OAAA;AAC5B,2IAAA,qCAAqC,OAAA;AACrC,kHAAA,YAAY,OAAA;AACZ,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FreeformRecord = Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonTypes.js","sourceRoot":"","sources":["../../../src/common/commonTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { FreeformRecord } from '../common/commonTypes';
|
|
2
|
+
import { PublicNonRecoverableError } from './PublicNonRecoverableError';
|
|
3
|
+
export type CommonErrorParams = {
|
|
4
|
+
message: string;
|
|
5
|
+
details?: FreeformRecord;
|
|
6
|
+
};
|
|
7
|
+
export type OptionalMessageErrorParams = {
|
|
8
|
+
message?: string;
|
|
9
|
+
details?: FreeformRecord;
|
|
10
|
+
};
|
|
11
|
+
export type ValidationError = {
|
|
12
|
+
message: string;
|
|
13
|
+
path: string[];
|
|
14
|
+
};
|
|
15
|
+
export declare class RequestValidationError extends PublicNonRecoverableError {
|
|
16
|
+
constructor(errors: ValidationError[]);
|
|
17
|
+
}
|
|
18
|
+
export declare class AccessDeniedError extends PublicNonRecoverableError {
|
|
19
|
+
constructor(params: CommonErrorParams);
|
|
20
|
+
}
|
|
21
|
+
export declare class EntityNotFoundError extends PublicNonRecoverableError {
|
|
22
|
+
constructor(params: CommonErrorParams);
|
|
23
|
+
}
|
|
24
|
+
export declare class AuthFailedError extends PublicNonRecoverableError {
|
|
25
|
+
constructor(params?: OptionalMessageErrorParams);
|
|
26
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthFailedError = exports.EntityNotFoundError = exports.AccessDeniedError = exports.RequestValidationError = void 0;
|
|
4
|
+
const node_http2_1 = require("node:http2");
|
|
5
|
+
const PublicNonRecoverableError_1 = require("./PublicNonRecoverableError");
|
|
6
|
+
class RequestValidationError extends PublicNonRecoverableError_1.PublicNonRecoverableError {
|
|
7
|
+
constructor(errors) {
|
|
8
|
+
super({
|
|
9
|
+
message: 'Invalid params',
|
|
10
|
+
errorCode: 'VALIDATION_ERROR',
|
|
11
|
+
httpStatusCode: node_http2_1.constants.HTTP_STATUS_BAD_REQUEST,
|
|
12
|
+
details: {
|
|
13
|
+
error: errors,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.RequestValidationError = RequestValidationError;
|
|
19
|
+
class AccessDeniedError extends PublicNonRecoverableError_1.PublicNonRecoverableError {
|
|
20
|
+
constructor(params) {
|
|
21
|
+
super({
|
|
22
|
+
message: params.message,
|
|
23
|
+
errorCode: 'ACCESS_DENIED',
|
|
24
|
+
httpStatusCode: node_http2_1.constants.HTTP_STATUS_FORBIDDEN,
|
|
25
|
+
details: params.details,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.AccessDeniedError = AccessDeniedError;
|
|
30
|
+
class EntityNotFoundError extends PublicNonRecoverableError_1.PublicNonRecoverableError {
|
|
31
|
+
constructor(params) {
|
|
32
|
+
super({
|
|
33
|
+
message: params.message,
|
|
34
|
+
errorCode: 'ENTITY_NOT_FOUND',
|
|
35
|
+
httpStatusCode: node_http2_1.constants.HTTP_STATUS_NOT_FOUND,
|
|
36
|
+
details: params.details,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.EntityNotFoundError = EntityNotFoundError;
|
|
41
|
+
class AuthFailedError extends PublicNonRecoverableError_1.PublicNonRecoverableError {
|
|
42
|
+
constructor(params = {}) {
|
|
43
|
+
super({
|
|
44
|
+
message: params.message ?? 'Authentication failed',
|
|
45
|
+
errorCode: 'AUTH_FAILED',
|
|
46
|
+
httpStatusCode: node_http2_1.constants.HTTP_STATUS_UNAUTHORIZED,
|
|
47
|
+
details: params.details,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.AuthFailedError = AuthFailedError;
|
|
52
|
+
//# sourceMappingURL=publicErrors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicErrors.js","sourceRoot":"","sources":["../../../src/errors/publicErrors.ts"],"names":[],"mappings":";;;AAAA,2CAAuD;AAIvD,2EAAuE;AAiBvE,MAAa,sBAAuB,SAAQ,qDAAyB;IACnE,YAAY,MAAyB;QACnC,KAAK,CAAC;YACJ,OAAO,EAAE,gBAAgB;YACzB,SAAS,EAAE,kBAAkB;YAC7B,cAAc,EAAE,sBAAa,CAAC,uBAAuB;YACrD,OAAO,EAAE;gBACP,KAAK,EAAE,MAAM;aACd;SACF,CAAC,CAAA;IACJ,CAAC;CACF;AAXD,wDAWC;AAED,MAAa,iBAAkB,SAAQ,qDAAyB;IAC9D,YAAY,MAAyB;QACnC,KAAK,CAAC;YACJ,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,SAAS,EAAE,eAAe;YAC1B,cAAc,EAAE,sBAAa,CAAC,qBAAqB;YACnD,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAA;IACJ,CAAC;CACF;AATD,8CASC;AAED,MAAa,mBAAoB,SAAQ,qDAAyB;IAChE,YAAY,MAAyB;QACnC,KAAK,CAAC;YACJ,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,SAAS,EAAE,kBAAkB;YAC7B,cAAc,EAAE,sBAAa,CAAC,qBAAqB;YACnD,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAA;IACJ,CAAC;CACF;AATD,kDASC;AAED,MAAa,eAAgB,SAAQ,qDAAyB;IAC5D,YAAY,SAAqC,EAAE;QACjD,KAAK,CAAC;YACJ,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,uBAAuB;YAClD,SAAS,EAAE,aAAa;YACxB,cAAc,EAAE,sBAAa,CAAC,wBAAwB;YACtD,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAA;IACJ,CAAC;CACF;AATD,0CASC"}
|
package/dist/vitest.config.js
CHANGED
|
@@ -14,16 +14,20 @@ exports.default = (0, config_1.defineConfig)({
|
|
|
14
14
|
'src/errors/errorReporterTypes.ts',
|
|
15
15
|
'src/errors/either.ts',
|
|
16
16
|
'src/common/may-omit.ts',
|
|
17
|
+
'src/common/commonTypes.ts',
|
|
17
18
|
'src/config/configTypes.ts',
|
|
19
|
+
'src/errors/publicErrors.ts',
|
|
18
20
|
'src/errors/globalErrorHandler.ts',
|
|
19
|
-
'src/config/configTransformers.ts'
|
|
21
|
+
'src/config/configTransformers.ts',
|
|
20
22
|
],
|
|
21
23
|
reporter: ['text'],
|
|
22
24
|
all: true,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
thresholds: {
|
|
26
|
+
lines: 100,
|
|
27
|
+
functions: 100,
|
|
28
|
+
branches: 100,
|
|
29
|
+
statements: 100,
|
|
30
|
+
},
|
|
27
31
|
},
|
|
28
32
|
},
|
|
29
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";;AAAA,0CAA4C;AAE5C,kBAAe,IAAA,qBAAY,EAAC;IAC1B,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC,SAAS,CAAC;QACtB,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,kBAAkB;gBAClB,kCAAkC;gBAClC,sBAAsB;gBACtB,wBAAwB;gBACxB,2BAA2B;gBAC3B,kCAAkC;gBAClC,kCAAkC;aACnC;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;YAClB,GAAG,EAAE,IAAI;YACT,KAAK,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";;AAAA,0CAA4C;AAE5C,kBAAe,IAAA,qBAAY,EAAC;IAC1B,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC,SAAS,CAAC;QACtB,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,OAAO,EAAE;gBACP,kBAAkB;gBAClB,kCAAkC;gBAClC,sBAAsB;gBACtB,wBAAwB;gBACxB,2BAA2B;gBAC3B,2BAA2B;gBAC3B,4BAA4B;gBAC5B,kCAAkC;gBAClC,kCAAkC;aACnC;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;YAClB,GAAG,EAAE,IAAI;YACT,UAAU,EAAE;gBACV,KAAK,EAAE,GAAG;gBACV,SAAS,EAAE,GAAG;gBACd,QAAQ,EAAE,GAAG;gBACb,UAAU,EAAE,GAAG;aAChB;SACF;KACF;CACF,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/node-core",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.1",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Lokalise",
|
|
6
6
|
"url": "https://lokalise.com/"
|
|
@@ -28,32 +28,29 @@
|
|
|
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",
|
|
32
|
-
"lint:fix": "eslint . --fix",
|
|
33
|
-
"format": "prettier --write .",
|
|
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}\"",
|
|
34
33
|
"version": "auto-changelog -p && git add CHANGELOG.md",
|
|
35
34
|
"prepublishOnly": "npm run build"
|
|
36
35
|
},
|
|
37
36
|
"dependencies": {
|
|
38
|
-
"pino": "^8.17.
|
|
39
|
-
"undici": "^6.0
|
|
37
|
+
"pino": "^8.17.2",
|
|
38
|
+
"undici": "^6.3.0",
|
|
40
39
|
"undici-retry": "^5.0.2",
|
|
41
40
|
"zod": "^3.22.4"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@types/node": "^20.
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
46
|
-
"@typescript-eslint/parser": "^6.
|
|
47
|
-
"@vitest/coverage-v8": "^
|
|
43
|
+
"@types/node": "^20.11.5",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
45
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
46
|
+
"@vitest/coverage-v8": "^1.2.1",
|
|
48
47
|
"auto-changelog": "^2.4.0",
|
|
49
|
-
"eslint": "^8.
|
|
48
|
+
"eslint": "^8.56.0",
|
|
50
49
|
"eslint-config-prettier": "^9.1.0",
|
|
51
|
-
"eslint-plugin-import": "^2.29.
|
|
52
|
-
"eslint-plugin-
|
|
53
|
-
"
|
|
54
|
-
"prettier": "^3.1.1",
|
|
50
|
+
"eslint-plugin-import": "^2.29.1",
|
|
51
|
+
"eslint-plugin-vitest": "^0.3.20",
|
|
52
|
+
"prettier": "^3.2.4",
|
|
55
53
|
"typescript": "^5.3.3",
|
|
56
|
-
"vitest": "^
|
|
57
|
-
"vite": "4.5.0"
|
|
54
|
+
"vitest": "^1.2.1"
|
|
58
55
|
}
|
|
59
56
|
}
|