diff --git a/packages/nocodb-nest/package-lock.json b/packages/nocodb-nest/package-lock.json index 939f49ad14..a8c65609ef 100644 --- a/packages/nocodb-nest/package-lock.json +++ b/packages/nocodb-nest/package-lock.json @@ -334,9 +334,9 @@ } }, "node_modules/@azure/core-http": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.0.tgz", - "integrity": "sha512-BxI2SlGFPPz6J1XyZNIVUf0QZLBKFX+ViFjKOkzqD18J1zOINIQ8JSBKKr+i+v8+MB6LacL6Nn/sP/TE13+s2Q==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.1.tgz", + "integrity": "sha512-A3x+um3cAPgQe42Lu7Iv/x8/fNjhL/nIoEfqFxfn30EyxK6zC13n+OUxzZBRC0IzQqssqIbt4INf5YG7lYYFtw==", "dependencies": { "@azure/abort-controller": "^1.0.0", "@azure/core-auth": "^1.3.0", @@ -351,7 +351,7 @@ "tslib": "^2.2.0", "tunnel": "^0.0.6", "uuid": "^8.3.0", - "xml2js": "^0.4.19" + "xml2js": "^0.5.0" }, "engines": { "node": ">=14.0.0" @@ -378,6 +378,18 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/@azure/core-http/node_modules/xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/@azure/core-lro": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.5.1.tgz", @@ -17120,9 +17132,9 @@ "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, "node_modules/vm2": { - "version": "3.9.14", - "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.14.tgz", - "integrity": "sha512-HgvPHYHeQy8+QhzlFryvSteA4uQLBCOub02mgqdR+0bN/akRZ48TGB1v0aCv7ksyc0HXx16AZtMHKS38alc6TA==", + "version": "3.9.16", + "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.16.tgz", + "integrity": "sha512-3T9LscojNTxdOyG+e8gFeyBXkMlOBYDoF6dqZbj+MPVHi9x10UfiTAJIobuchRCp3QvC+inybTbMJIUrLsig0w==", "dependencies": { "acorn": "^8.7.0", "acorn-walk": "^8.2.0" @@ -17996,9 +18008,9 @@ } }, "@azure/core-http": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.0.tgz", - "integrity": "sha512-BxI2SlGFPPz6J1XyZNIVUf0QZLBKFX+ViFjKOkzqD18J1zOINIQ8JSBKKr+i+v8+MB6LacL6Nn/sP/TE13+s2Q==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.1.tgz", + "integrity": "sha512-A3x+um3cAPgQe42Lu7Iv/x8/fNjhL/nIoEfqFxfn30EyxK6zC13n+OUxzZBRC0IzQqssqIbt4INf5YG7lYYFtw==", "requires": { "@azure/abort-controller": "^1.0.0", "@azure/core-auth": "^1.3.0", @@ -18013,13 +18025,22 @@ "tslib": "^2.2.0", "tunnel": "^0.0.6", "uuid": "^8.3.0", - "xml2js": "^0.4.19" + "xml2js": "^0.5.0" }, "dependencies": { "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } } } }, @@ -30914,9 +30935,9 @@ } }, "vm2": { - "version": "3.9.14", - "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.14.tgz", - "integrity": "sha512-HgvPHYHeQy8+QhzlFryvSteA4uQLBCOub02mgqdR+0bN/akRZ48TGB1v0aCv7ksyc0HXx16AZtMHKS38alc6TA==", + "version": "3.9.16", + "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.16.tgz", + "integrity": "sha512-3T9LscojNTxdOyG+e8gFeyBXkMlOBYDoF6dqZbj+MPVHi9x10UfiTAJIobuchRCp3QvC+inybTbMJIUrLsig0w==", "requires": { "acorn": "^8.7.0", "acorn-walk": "^8.2.0" diff --git a/packages/nocodb-nest/package.json b/packages/nocodb-nest/package.json index c6dd1f11aa..c829bdf78a 100644 --- a/packages/nocodb-nest/package.json +++ b/packages/nocodb-nest/package.json @@ -23,8 +23,6 @@ "test:unit:pg": "cp tests/unit/.pg.env tests/unit/.env; cross-env TS_NODE_PROJECT=./tests/unit/tsconfig.json mocha -r ts-node/register tests/unit/index.test.ts --recursive --timeout 300000 --exit --delay" }, "dependencies": { - "@types/chai": "^4.2.12", - "@types/mocha": "^8.0.1", "@google-cloud/storage": "^5.7.2", "@graphql-tools/merge": "^6.0.12", "@nestjs/common": "^9.0.0", @@ -33,6 +31,8 @@ "@nestjs/mapped-types": "*", "@nestjs/platform-express": "^9.4.0", "@sentry/node": "^6.3.5", + "@types/chai": "^4.2.12", + "@types/mocha": "^8.0.1", "airtable": "^0.11.3", "ajv": "^8.12.0", "ajv-formats": "^2.1.1", diff --git a/packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.ts b/packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.ts index d965c5ce22..5e80ac44e7 100644 --- a/packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.ts +++ b/packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.ts @@ -16,7 +16,7 @@ import { DataAliasNestedService } from './data-alias-nested.service'; @Controller() @UseGuards(ExtractProjectIdMiddleware, AuthGuard('jwt')) -class DataAliasNestedController { +export class DataAliasNestedController { constructor(private dataAliasNestedService: DataAliasNestedService) {} // todo: handle case where the given column is not ltar diff --git a/packages/nocodb-nest/src/modules/datas/datas.module.ts b/packages/nocodb-nest/src/modules/datas/datas.module.ts index 38347a6e0a..c5947d5f17 100644 --- a/packages/nocodb-nest/src/modules/datas/datas.module.ts +++ b/packages/nocodb-nest/src/modules/datas/datas.module.ts @@ -4,6 +4,7 @@ import { DatasService } from './datas.service'; import { DatasController } from './datas.controller'; import { BulkDataAliasController } from './bulk-data-alias/bulk-data-alias.controller'; import { DataAliasExportController } from './data-alias-export/data-alias-export.controller'; +import { DataAliasNestedController } from './data-alias-nested/data-alias-nested.controller'; import { OldDatasController } from './old-datas/old-datas.controller'; import { BulkDataAliasService } from './bulk-data-alias/bulk-data-alias.service'; import { DataAliasNestedService } from './data-alias-nested/data-alias-nested.service'; @@ -16,6 +17,7 @@ import { OldDatasService } from './old-datas/old-datas.service'; BulkDataAliasController, DataAliasExportController, OldDatasController, + DataAliasNestedController, ], providers: [ DatasService, diff --git a/packages/nocodb-nest/tests/unit/model/tests/baseModelSql.test.ts b/packages/nocodb-nest/tests/unit/model/tests/baseModelSql.test.ts index 3369384e20..d341a37a5c 100644 --- a/packages/nocodb-nest/tests/unit/model/tests/baseModelSql.test.ts +++ b/packages/nocodb-nest/tests/unit/model/tests/baseModelSql.test.ts @@ -273,7 +273,7 @@ function baseModelSqlTests() { const deletedRow = await baseModelSql.readByPk(rowIdToDeleted); - expect(deletedRow).to.be.an('object').that.is.empty; + expect(deletedRow).to.be.undefined; console.log('Delete record', await Audit.projectAuditList(project.id, {})); const rowDeletedAudit = (await Audit.projectAuditList(project.id, {})).find(