diff --git a/package.json b/package.json index 6ecc5f02..2c404982 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "powership", - "version": "5.7.12", + "version": "5.7.14", "private": true, "scripts": { "patch": "run-s patch:*", diff --git a/packages/accounts/package.json b/packages/accounts/package.json index c2a8bd12..17efbd35 100644 --- a/packages/accounts/package.json +++ b/packages/accounts/package.json @@ -1,6 +1,6 @@ { "name": "@powership/accounts", - "version": "5.7.12", + "version": "5.7.14", "description": "Powership accounts", "type": "module", "main": "./out/index.cjs", diff --git a/packages/babel-plugins/package.json b/packages/babel-plugins/package.json index f74f2d0f..a24dbdde 100644 --- a/packages/babel-plugins/package.json +++ b/packages/babel-plugins/package.json @@ -1,6 +1,6 @@ { "name": "@powership/babel-plugins", - "version": "5.7.12", + "version": "5.7.14", "main": "./out/index.js", "sideEffects": false, "typings": "./out/index.d.ts", diff --git a/packages/boilerplate/package.json b/packages/boilerplate/package.json index 5fbf5fa6..66f1b7e2 100644 --- a/packages/boilerplate/package.json +++ b/packages/boilerplate/package.json @@ -1,6 +1,6 @@ { "name": "@powership/boilerplate", - "version": "5.7.12", + "version": "5.7.14", "author": "antoniopresto ", "sideEffects": false, "type": "module", diff --git a/packages/entity/package.json b/packages/entity/package.json index 6705a9ad..b5e70e81 100644 --- a/packages/entity/package.json +++ b/packages/entity/package.json @@ -1,6 +1,6 @@ { "name": "@powership/entity", - "version": "5.7.12", + "version": "5.7.14", "type": "module", "main": "./out/index.cjs", "module": "./out/index.mjs", diff --git a/packages/entity/src/Entity.ts b/packages/entity/src/Entity.ts index fd378aad..e0795291 100644 --- a/packages/entity/src/Entity.ts +++ b/packages/entity/src/Entity.ts @@ -853,12 +853,49 @@ function _registerPKSKHook(input: { } if (ctx.isUpdate) { + ctx.options.update.$set = await _onUpdate({ + ...ctx.options.update.$set, + }); + if (ctx.isUpsert) { - ctx.options.update.$setOnInsert = await _onCreate({ + const processedDoc = await _onCreate({ ...ctx.options.update.$setIfNull, ...ctx.options.update.$setOnInsert, ...ctx.options.update.$set, }); + + const originalSetFields = new Set( + Object.keys(ctx.options.update.$set || {}).map( + (el) => el.split('.')[0] + ) + ); + + const setFields = {}; + const setOnInsertFields = {}; + + for (const [key, value] of Object.entries(processedDoc)) { + if (originalSetFields.has(key)) { + setFields[key] = value; + } else { + setOnInsertFields[key] = value; + } + } + + ctx.options.update.$set = setFields; + ctx.options.update.$setOnInsert = setOnInsertFields; + delete ctx.options.update.$setIfNull; + + const conflictingFields = Object.keys(setFields).filter( + (key) => key in setOnInsertFields + ); + + if (conflictingFields.length > 0) { + throw new Error( + `Found conflicting fields in update operators: ${conflictingFields.join( + ', ' + )}` + ); + } } else { if (ctx.options.update.$setIfNull) { ctx.options.update.$setIfNull = preparseFilterGraphTypeFields( @@ -876,10 +913,6 @@ function _registerPKSKHook(input: { ); } } - - ctx.options.update.$set = await _onUpdate({ - ...ctx.options.update.$set, - }); // ======= close update handling ==== } diff --git a/packages/entity/src/indexRelations/__tests__/Entity.indexRelations.spec.ts b/packages/entity/src/indexRelations/__tests__/Entity.indexRelations.spec.ts index c1b29990..bd8e871f 100644 --- a/packages/entity/src/indexRelations/__tests__/Entity.indexRelations.spec.ts +++ b/packages/entity/src/indexRelations/__tests__/Entity.indexRelations.spec.ts @@ -1,4 +1,4 @@ -import { createType, resetTypesCache } from '@powership/schema'; +import { createType, Infer, resetTypesCache } from '@powership/schema'; import { ulid } from '@powership/utils'; import { assert, IsExact } from 'conditional-type-checks'; @@ -102,6 +102,8 @@ describe('Entity.indexRelations', () => { context: {}, }); + expect(created.error).toBeUndefined(); + expect(created.item).toEqual( expect.objectContaining({ _idPK: 'payment⋮_id⋮+5511900000000⋮', diff --git a/packages/logstorm/package.json b/packages/logstorm/package.json index b21fcbe8..0e7a3ada 100644 --- a/packages/logstorm/package.json +++ b/packages/logstorm/package.json @@ -1,6 +1,6 @@ { "name": "logstorm", - "version": "5.7.12", + "version": "5.7.14", "typings": "out", "author": "antoniopresto ", "type": "module", @@ -60,7 +60,7 @@ "eslint-plugin-sort-keys-fix": "1.1.2", "eslint-plugin-typescript-sort-keys": "3.2.0", "jest": "29.7.0", - "nodemon": "2.0.20", + "nodemon": "3.1.7", "npm-run-all": "4.1.5", "prettier-plugin-multiline-arrays": "3.0.4", "rimraf": "6.0.1", diff --git a/packages/mongo/package.json b/packages/mongo/package.json index 70f7c1c1..1d4147ec 100644 --- a/packages/mongo/package.json +++ b/packages/mongo/package.json @@ -1,6 +1,6 @@ { "name": "@powership/mongo", - "version": "5.7.12", + "version": "5.7.14", "type": "module", "main": "./out/index.cjs", "module": "./out/index.mjs", diff --git a/packages/mongo/src/__tests__/parseMongoUpdateExpression.spec.ts b/packages/mongo/src/__tests__/parseMongoUpdateExpression.spec.ts index 6c8a82a3..82e9fab0 100644 --- a/packages/mongo/src/__tests__/parseMongoUpdateExpression.spec.ts +++ b/packages/mongo/src/__tests__/parseMongoUpdateExpression.spec.ts @@ -279,6 +279,92 @@ describe('parseMongoUpdateExpression', () => { ).toHaveProperty('list', ['a', 'b', 'a', 2]); }); + test('TTLCache scenario with $addToSet and $setOnInsert', async () => { + const ONE_HOUR_MS = 3600000; + const key = 'testKey'; + const key2 = 'testKey2'; + const attempt = 'testAttempt'; + + const result = await mockApp.transporter.updateOne({ + filter: { key, key2 }, + upsert: true, + update: { + $addToSet: { + value: attempt, + }, + $setOnInsert: { + key, + key2, + }, + $set: { + createdAt: new Date(), + ttl: ONE_HOUR_MS, + }, + }, + indexConfig: { + entity: 'cache', + indexes: [{ name: 'key_key2', PK: ['.key', '.key2'] }], + }, + context: {}, + }); + + expect(result.error).toBeUndefined(); + expect(result.item).toMatchObject({ + key, + key2, + value: [attempt], + ttl: ONE_HOUR_MS, + }); + }); + + test('TTLCache scenario with $set and $setOnInsert', async () => { + const ONE_HOUR_MS = 3600000; + const key = 'testKey'; + const key2 = 'testKey2'; + const attempt = 'attempt1'; + + await mockApp.transporter.createOne({ + item: { + key, + key2, + value: [attempt], + }, + indexConfig: { + entity: 'cache', + indexes: [{ name: 'key_key2', PK: ['.key', '.key2'] }], + }, + context: {}, + }); + + const attempt2 = 'attempt2'; + const result = await mockApp.transporter.updateOne({ + filter: { key, key2 }, + upsert: true, + update: { + $addToSet: { + value: attempt2, + }, + $set: { + createdAt: new Date(), + ttl: ONE_HOUR_MS, + }, + }, + indexConfig: { + entity: 'cache', + indexes: [{ name: 'key_key2', PK: ['.key', '.key2'] }], + }, + context: {}, + }); + + expect(result.error).toBeUndefined(); + expect(result.item).toMatchObject({ + key, + key2, + ttl: ONE_HOUR_MS, + value: [attempt, attempt2], + }); + }); + describe('deepObjects', () => { test('$set', async () => { await create(); diff --git a/packages/mongo/src/parseMongoUpdateExpression.ts b/packages/mongo/src/parseMongoUpdateExpression.ts index f54f179c..d805fb06 100644 --- a/packages/mongo/src/parseMongoUpdateExpression.ts +++ b/packages/mongo/src/parseMongoUpdateExpression.ts @@ -1,3 +1 @@ -import { parseAggioUpdateExpression } from '@powership/transporter'; - -export const parseMongoUpdateExpression = parseAggioUpdateExpression; +export { parseMongoUpdateExpression } from '@powership/transporter'; diff --git a/packages/plugin-engine/package.json b/packages/plugin-engine/package.json index 793799e2..9cee5849 100644 --- a/packages/plugin-engine/package.json +++ b/packages/plugin-engine/package.json @@ -1,6 +1,6 @@ { "name": "plugin-engine", - "version": "5.7.12", + "version": "5.7.14", "type": "module", "main": "./out/index.cjs", "module": "./out/index.mjs", diff --git a/packages/powership/package.json b/packages/powership/package.json index bffc47e2..0569f747 100644 --- a/packages/powership/package.json +++ b/packages/powership/package.json @@ -1,6 +1,6 @@ { "name": "powership", - "version": "5.7.12", + "version": "5.7.14", "author": "antoniopresto ", "type": "module", "main": "./out/index.cjs", diff --git a/packages/runmate/package.json b/packages/runmate/package.json index 151b3922..11d06aa5 100644 --- a/packages/runmate/package.json +++ b/packages/runmate/package.json @@ -1,6 +1,6 @@ { "name": "runmate", - "version": "5.7.12", + "version": "5.7.14", "typings": "out", "author": "antoniopresto ", "license": "MIT", @@ -74,7 +74,7 @@ "eslint-plugin-sort-keys-fix": "1.1.2", "eslint-plugin-typescript-sort-keys": "3.2.0", "jest": "29.7.0", - "nodemon": "2.0.20", + "nodemon": "3.1.7", "npm-run-all": "4.1.5", "prettier": "2.8.8", "prettier-plugin-multiline-arrays": "3.0.4", diff --git a/packages/schema/package.json b/packages/schema/package.json index 4935b17e..24eb4b87 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -1,6 +1,6 @@ { "name": "@powership/schema", - "version": "5.7.12", + "version": "5.7.14", "type": "module", "main": "./out/index.cjs", "module": "./out/index.mjs", @@ -90,7 +90,7 @@ "graphql": "16.9.0", "jest": "29.7.0", "madge": "8.0.0", - "nodemon": "2.0.20", + "nodemon": "3.1.7", "npm-run-all": "4.1.5", "prettier": "2.8.8", "prettier-plugin-multiline-arrays": "3.0.4", diff --git a/packages/server/package.json b/packages/server/package.json index ee68e14a..b113abd8 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@powership/server", - "version": "5.7.12", + "version": "5.7.14", "type": "module", "main": "./out/index.cjs", "module": "./out/index.mjs", diff --git a/packages/transporter/package.json b/packages/transporter/package.json index 96fdc8be..972db50e 100644 --- a/packages/transporter/package.json +++ b/packages/transporter/package.json @@ -1,6 +1,6 @@ { "name": "@powership/transporter", - "version": "5.7.12", + "version": "5.7.14", "type": "module", "main": "./out/index.cjs", "module": "./out/index.mjs", @@ -24,6 +24,7 @@ "build": "run-p declarations build:*", "clear": "rimraf out", "fix": "run-s fix:* ", + "watch": "nodemon --watch 'src/**/*' -e ts,tsx --exec 'pnpm run build'", "fix:prettier": "prettier \"src/**/*.ts\" --write", "fix:lint": "eslint src --ext .ts --fix", "prepublishOnly": "run-s build fix && run-p test", @@ -56,12 +57,12 @@ "sift": "17.0.1" }, "devDependencies": { - "@powership/boilerplate": "workspace:*", "@babel/cli": "7.24.8", "@babel/plugin-transform-typescript": "7.24.8", "@babel/preset-env": "7.24.8", "@babel/preset-typescript": "7.24.7", "@powership/babel-plugins": "workspace:*", + "@powership/boilerplate": "workspace:*", "@types/jest": "29.5.12", "@types/node": "20.11.25", "@typescript-eslint/eslint-plugin": "7.17.0", @@ -79,6 +80,7 @@ "mongodb": "6.4.0", "mongodb-memory-server": "10.1.2", "mongodb-memory-server-core": "10.1.2", + "nodemon": "3.1.7", "npm-run-all": "4.1.5", "prettier": "2.8.8", "prettier-plugin-multiline-arrays": "3.0.4", @@ -97,6 +99,5 @@ "readmeFile": "./README.md", "displayName": "Transporter - Base to connect any Database to Powership.", "tsconfig": "./tsconfig.module.json" - }, - "peerDependencies": {} + } } diff --git a/packages/transporter/src/index.ts b/packages/transporter/src/index.ts index 9abff0ee..09ce9dcd 100644 --- a/packages/transporter/src/index.ts +++ b/packages/transporter/src/index.ts @@ -13,4 +13,4 @@ export * from './createDocumentIndexBasedFilters'; export * from './encodeIndexValue'; export * from './parseEntityIndexFields'; export * from './parseAggioAttributeFilters'; -export * from './parseAggioUpdateExpression'; +export * from './parseMongoUpdateExpression'; diff --git a/packages/transporter/src/parseAggioUpdateExpression.ts b/packages/transporter/src/parseAggioUpdateExpression.ts deleted file mode 100644 index 24150137..00000000 --- a/packages/transporter/src/parseAggioUpdateExpression.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { merge, RuntimeError, UpdateDefinition } from '@powership/utils'; - -import { ParsedUpdateExpression } from './parseUpdateExpression'; - -export function parseAggioUpdateExpression( - operations: ParsedUpdateExpression[] -) { - const update: UpdateDefinition[] = []; - - // used to group all simple $set operations - // to prevent the error "field names may not start with '$'" for - // array positional updates - let simple$Set: UpdateDefinition | undefined; - - function _set(filter: Record) { - return (simple$Set = merge(simple$Set || {}, filter)); - } - - (operations as _ExampleUpdate[]).forEach(function (item) { - switch (item.operator) { - case '$set': { - item.entries.forEach(([key, value]) => { - _set({ - $set: { [key]: value }, - }); - }); - break; - } - - case '$setOnInsert': { - item.entries.forEach(([k, value]) => { - update.push({ - $set: { - [k]: { - $ifNull: [`$${k}`, value], - }, - }, - }); - }); - break; - } - - case '$setIfNull': { - item.entries.forEach(([k, value]) => { - update.push(stageSetIfNull(k, value)); - }); - break; - } - - case '$inc': { - item.entries.forEach(([k, value]) => { - update.push({ - $set: { - [k]: { - $sum: [`$${k}`, value], - }, - }, - }); - }); - break; - } - - case '$append': { - item.entries.forEach(([k, value]) => { - _set({ - $push: { - [k]: { ..._mergeEach(value) }, - }, - }); - }); - break; - } - - case '$prepend': { - item.entries.forEach(([k, value]) => { - _set({ - $push: { [k]: { ..._mergeEach(value), $position: 0 } }, - }); - }); - break; - } - - case '$pull': { - item.entries.forEach(([k, value]) => { - _set({ - $pull: { - [k]: { $in: _mergeEach(value, '$in').$in }, - }, - }); - }); - break; - } - - case '$addToSet': { - item.entries.forEach(([key, value]) => { - _set({ - $addToSet: { [key]: _mergeEach(value) }, - }); - }); - break; - } - - case '$remove': { - item.entries.forEach(([, _path]) => { - if (typeof _path !== 'string') return; - let path = _path as string; - - const [, indexParent, indexEnd] = path.match(/(\D*)\.(\d*)$/) || []; - const index = indexEnd !== undefined ? +indexEnd : undefined; - - if (typeof index === 'number' && index >= 0) { - path = indexParent; - const temp = `temp[[${path}]]`; - const nextIndex = index + 1; - const max = 999999999; - - if (index == 0) { - update.push({ - $set: { - [path]: { - $slice: [`$${path}`, 1, max], - }, - }, - }); - } else { - update.push( - { - $set: { - [temp]: { - $slice: [`$${path}`, 0, index], - }, - }, - }, - - { - $set: { - [path]: { - $concatArrays: [ - `$${temp}`, - { - $slice: [`$${path}`, nextIndex, max], - }, - ], - }, - }, - }, - - { $unset: [temp] } - ); - } - } else { - update.push({ - $set: { - [path]: '$$REMOVE', - }, - }); - } - }); - break; - } - - default: { - throw new RuntimeError( - `parseMongoUpdateExpression: invalid expression item.`, - { - item, - operations, - } - ); - } - } - }); - - if (!update.length) { - if (simple$Set) return simple$Set; - } else if (simple$Set) { - update.push(simple$Set); - } - - return update; -} - -function stageSetIfNull(field: string, value: any) { - return { - $set: { - [field]: { - $cond: [ - { - $ifNull: [`$${field}`, false], - }, - `$${field}`, - value, - ], - }, - }, - }; -} - -function _mergeEach(value: any, key = '$each' as K) { - const list = - value && typeof value === 'object' && value[key] ? value[key] : [value]; - return { [key]: list } as { [L in K]: any[] }; -} - -type _ExampleUpdate = ParsedUpdateExpression<{ - [k: string]: any; - _id: string; - list: any[]; - obj: { sub: { sub_sub: 1 } }; -}>; diff --git a/packages/transporter/src/parseMongoUpdateExpression.ts b/packages/transporter/src/parseMongoUpdateExpression.ts new file mode 100644 index 00000000..b5123cdc --- /dev/null +++ b/packages/transporter/src/parseMongoUpdateExpression.ts @@ -0,0 +1,260 @@ +import { RuntimeError, UpdateDefinition } from '@powership/utils'; +import { ParsedUpdateExpression } from './parseUpdateExpression'; + +type UpdateOperation = UpdateDefinition | UpdateDefinition[]; + +export function parseMongoUpdateExpression( + operations: ParsedUpdateExpression[] +): UpdateOperation { + const needsPipeline = operations.some((operation) => + requiresPipeline(operation) + ); + + const hasPositionalOperator = operations.some( + (operation) => + operation.operator === '$set' && + operation.entries.some(([key]) => key.includes('$')) + ); + + if (needsPipeline && hasPositionalOperator) { + throw new RuntimeError( + 'Cannot mix positional operators with operations that require pipeline', + { operations } + ); + } + + return needsPipeline + ? parsePipelineUpdate(operations) + : parseTraditionalUpdate(operations); +} + +function requiresPipeline(operation: ParsedUpdateExpression): boolean { + switch (operation.operator) { + case '$remove': + return operation.entries.some(([, path]) => { + if (typeof path !== 'string') return false; + return !!path.match(/(\D*)\.(\d*)$/); + }); + case '$prepend': + return true; + case '$setIfNull': + return true; + default: + return false; + } +} + +function parseTraditionalUpdate( + operations: ParsedUpdateExpression[] +): UpdateDefinition { + const update: Record = {}; + + operations.forEach((operation) => { + switch (operation.operator) { + case '$set': { + update.$set = update.$set || {}; + operation.entries.forEach(([key, value]) => { + update.$set[key] = value; + }); + break; + } + case '$setOnInsert': { + update.$setOnInsert = update.$setOnInsert || {}; + operation.entries.forEach(([key, value]) => { + update.$setOnInsert[key] = value; + }); + break; + } + case '$inc': { + update.$inc = update.$inc || {}; + operation.entries.forEach(([key, value]) => { + update.$inc[key] = value; + }); + break; + } + case '$append': { + update.$push = update.$push || {}; + operation.entries.forEach(([key, value]) => { + update.$push[key] = _mergeEach(value); + }); + break; + } + case '$pull': { + update.$pull = update.$pull || {}; + operation.entries.forEach(([key, value]) => { + update.$pull[key] = value; + }); + break; + } + case '$addToSet': { + update.$addToSet = update.$addToSet || {}; + operation.entries.forEach(([key, value]) => { + update.$addToSet[key] = _mergeEach(value); + }); + break; + } + case '$remove': { + update.$unset = update.$unset || {}; + operation.entries.forEach(([, path]) => { + if (typeof path !== 'string') return; + if (!path.match(/(\D*)\.(\d*)$/)) { + update.$unset[path] = ''; + } + }); + break; + } + } + }); + + return update; +} + +function parsePipelineUpdate( + operations: ParsedUpdateExpression[] +): UpdateDefinition[] { + const pipeline: UpdateDefinition[] = []; + + operations.forEach((operation) => { + switch (operation.operator) { + case '$set': { + operation.entries.forEach(([key, value]) => { + pipeline.push({ $set: { [key]: value } }); + }); + break; + } + case '$setOnInsert': { + operation.entries.forEach(([key, value]) => { + pipeline.push({ + $set: { + [key]: { + $ifNull: [`$${key}`, value], + }, + }, + }); + }); + break; + } + case '$setIfNull': { + operation.entries.forEach(([key, value]) => { + pipeline.push(stageSetIfNull(key, value)); + }); + break; + } + case '$inc': { + operation.entries.forEach(([key, value]) => { + pipeline.push({ + $set: { + [key]: { + $sum: [`$${key}`, value], + }, + }, + }); + }); + break; + } + case '$append': { + operation.entries.forEach(([key, value]) => { + pipeline.push({ + $set: { + [key]: { + $concatArrays: [ + { $ifNull: [`$${key}`, []] }, + _mergeEach(value).$each, + ], + }, + }, + }); + }); + break; + } + case '$remove': { + operation.entries.forEach(([, _path]) => { + if (typeof _path !== 'string') return; + const path = _path as string; + + const [, indexParent, indexEnd] = path.match(/(\D*)\.(\d*)$/) || []; + const index = indexEnd !== undefined ? +indexEnd : undefined; + + if (typeof index === 'number' && index >= 0) { + const arrayPath = indexParent; + if (index === 0) { + pipeline.push({ + $set: { + [arrayPath]: { + $slice: [`$${arrayPath}`, 1, 999999999], + }, + }, + }); + } else { + const temp = `temp[[${arrayPath}]]`; + pipeline.push( + { + $set: { + [temp]: { + $slice: [`$${arrayPath}`, 0, index], + }, + }, + }, + { + $set: { + [arrayPath]: { + $concatArrays: [ + `$${temp}`, + { + $slice: [`$${arrayPath}`, index + 1, 999999999], + }, + ], + }, + }, + }, + { $unset: [temp] } + ); + } + } else { + pipeline.push({ $set: { [path]: '$$REMOVE' } }); + } + }); + break; + } + case '$prepend': { + operation.entries.forEach(([key, value]) => { + pipeline.push({ + $set: { + [key]: { + $concatArrays: [ + _mergeEach(value).$each, + { $ifNull: [`$${key}`, []] }, + ], + }, + }, + }); + }); + break; + } + } + }); + + return pipeline; +} + +function stageSetIfNull(field: string, value: any) { + return { + $set: { + [field]: { + $cond: [ + { + $ifNull: [`$${field}`, false], + }, + `$${field}`, + value, + ], + }, + }, + }; +} + +function _mergeEach(value: any) { + return value && typeof value === 'object' && value.$each + ? value + : { $each: [value] }; +} diff --git a/packages/utils/package.json b/packages/utils/package.json index 99afb310..790c826b 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@powership/utils", - "version": "5.7.12", + "version": "5.7.14", "typings": "out", "author": "antoniopresto ", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b321d801..06c05693 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -520,8 +520,8 @@ importers: specifier: 29.7.0 version: 29.7.0(@types/node@20.11.25)(ts-node@10.9.1(@types/node@20.11.25)(typescript@5.7.2)) nodemon: - specifier: 2.0.20 - version: 2.0.20 + specifier: 3.1.7 + version: 3.1.7 npm-run-all: specifier: 4.1.5 version: 4.1.5 @@ -980,8 +980,8 @@ importers: specifier: 4.17.21 version: 4.17.21 nodemon: - specifier: 2.0.20 - version: 2.0.20 + specifier: 3.1.7 + version: 3.1.7 npm-run-all: specifier: 4.1.5 version: 4.1.5 @@ -1104,8 +1104,8 @@ importers: specifier: 8.0.0 version: 8.0.0(typescript@5.7.2) nodemon: - specifier: 2.0.20 - version: 2.0.20 + specifier: 3.1.7 + version: 3.1.7 npm-run-all: specifier: 4.1.5 version: 4.1.5 @@ -1363,6 +1363,9 @@ importers: mongodb-memory-server-core: specifier: 10.1.2 version: 10.1.2(socks@2.8.1) + nodemon: + specifier: 3.1.7 + version: 3.1.7 npm-run-all: specifier: 4.1.5 version: 4.1.5 @@ -5346,9 +5349,9 @@ packages: resolution: {integrity: sha512-1uiY543L+N7Og4yswvlm5NCKgPKDEXd9AUR9Jh3gen6oOeBsesr6LqhXom1er3eRzSUcVRWXzhv8tSNrIfGHKw==} engines: {node: '>=18'} - nodemon@2.0.20: - resolution: {integrity: sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==} - engines: {node: '>=8.10.0'} + nodemon@3.1.7: + resolution: {integrity: sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==} + engines: {node: '>=10'} hasBin: true nopt@1.0.10: @@ -5858,10 +5861,6 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.0.0: - resolution: {integrity: sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==} - hasBin: true - semver@7.5.2: resolution: {integrity: sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==} engines: {node: '>=10'} @@ -5940,9 +5939,9 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} - simple-update-notifier@1.1.0: - resolution: {integrity: sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==} - engines: {node: '>=8.10.0'} + simple-update-notifier@2.0.0: + resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} + engines: {node: '>=10'} sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -6673,7 +6672,7 @@ snapshots: '@babel/core': 7.24.9 '@babel/helper-compilation-targets': 7.24.8 '@babel/helper-plugin-utils': 7.24.8 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -7593,7 +7592,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.2 @@ -7609,7 +7608,7 @@ snapshots: '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -8258,7 +8257,7 @@ snapshots: dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.0 @@ -8391,7 +8390,7 @@ snapshots: agent-base@7.1.0: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -9041,19 +9040,19 @@ snapshots: dependencies: ms: 2.0.0 - debug@3.2.7(supports-color@5.5.0): + debug@3.2.7: dependencies: ms: 2.1.3 - optionalDependencies: - supports-color: 5.5.0 debug@4.3.4: dependencies: ms: 2.1.2 - debug@4.3.7: + debug@4.3.7(supports-color@5.5.0): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 5.5.0 dedent@1.5.1: {} @@ -9415,7 +9414,7 @@ snapshots: eslint-import-resolver-node@0.3.9: dependencies: - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7 is-core-module: 2.13.1 resolve: 1.22.8 transitivePeerDependencies: @@ -9423,7 +9422,7 @@ snapshots: eslint-module-utils@2.8.1(@typescript-eslint/parser@4.15.2(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): dependencies: - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 4.15.2(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 @@ -9433,7 +9432,7 @@ snapshots: eslint-module-utils@2.8.1(@typescript-eslint/parser@7.17.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): dependencies: - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.17.0(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 @@ -9476,7 +9475,7 @@ snapshots: array.prototype.findlastindex: 1.2.4 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7 doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 @@ -9559,7 +9558,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -9806,7 +9805,7 @@ snapshots: follow-redirects@1.15.9(debug@4.3.7): optionalDependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) for-each@0.3.3: dependencies: @@ -10063,7 +10062,7 @@ snapshots: https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -10258,7 +10257,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -11032,7 +11031,7 @@ snapshots: dependencies: async-mutex: 0.5.0 camelcase: 6.3.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) find-cache-dir: 3.3.2 follow-redirects: 1.15.9(debug@4.3.7) https-proxy-agent: 7.0.5 @@ -11106,7 +11105,7 @@ snapshots: new-find-package-json@2.0.0: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -11130,15 +11129,15 @@ snapshots: dependencies: '@babel/parser': 7.24.8 - nodemon@2.0.20: + nodemon@3.1.7: dependencies: chokidar: 3.6.0 - debug: 3.2.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@5.5.0) ignore-by-default: 1.0.1 minimatch: 3.1.2 pstree.remy: 1.1.8 - semver: 5.7.2 - simple-update-notifier: 1.1.0 + semver: 7.6.0 + simple-update-notifier: 2.0.0 supports-color: 5.5.0 touch: 3.1.0 undefsafe: 2.0.5 @@ -11651,8 +11650,6 @@ snapshots: semver@6.3.1: {} - semver@7.0.0: {} - semver@7.5.2: dependencies: lru-cache: 6.0.0 @@ -11754,9 +11751,9 @@ snapshots: signal-exit@4.1.0: {} - simple-update-notifier@1.1.0: + simple-update-notifier@2.0.0: dependencies: - semver: 7.0.0 + semver: 7.6.0 sisteransi@1.0.5: {}