From 73a106e4435589bf90e65af4e79778c9594b3c8b Mon Sep 17 00:00:00 2001 From: mertmit Date: Wed, 24 May 2023 21:44:13 +0300 Subject: [PATCH 01/13] fix: dtxp drop max length Signed-off-by: mertmit --- packages/nocodb-sdk/src/lib/Api.ts | 2 +- packages/nocodb/src/schema/swagger.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/nocodb-sdk/src/lib/Api.ts b/packages/nocodb-sdk/src/lib/Api.ts index 3d0a0e92f3..8903a6d481 100644 --- a/packages/nocodb-sdk/src/lib/Api.ts +++ b/packages/nocodb-sdk/src/lib/Api.ts @@ -1603,7 +1603,7 @@ export interface NormalColumnRequestType { /** Data Type Extra */ dtx?: StringOrNullType; /** Data Type Extra Precision */ - dtxp?: StringOrNullType | number; + dtxp?: string | number | null; /** Data Type Extra Scale */ dtxs?: StringOrNullType | number; /** Numeric Precision */ diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json index 2912be1cb4..690c3ce3bb 100644 --- a/packages/nocodb/src/schema/swagger.json +++ b/packages/nocodb/src/schema/swagger.json @@ -17834,10 +17834,13 @@ "dtxp": { "oneOf": [ { - "$ref": "#/components/schemas/StringOrNull" + "type": "string" }, { "type": "number" + }, + { + "type": "null" } ], "description": "Data Type Extra Precision" From af876ba43b223fdc5b54d51fec4585f1d4156061 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 25 May 2023 14:26:35 +0530 Subject: [PATCH 02/13] fix: read api - extract dependency fields, use it to generate select query and avoid duplicate use of nocoExecute Signed-off-by: Pranav C --- .run/Run NocoDB Sqlite.run.xml | 2 +- packages/nocodb/src/db/BaseModelSqlv2.ts | 27 ++++++++++++------- packages/nocodb/src/services/datas.service.ts | 15 ++++++----- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.run/Run NocoDB Sqlite.run.xml b/.run/Run NocoDB Sqlite.run.xml index 19996f59ba..e7b120a2af 100644 --- a/.run/Run NocoDB Sqlite.run.xml +++ b/.run/Run NocoDB Sqlite.run.xml @@ -12,4 +12,4 @@ - \ No newline at end of file + diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index f7ddc9db94..f5d04ebffe 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -130,10 +130,24 @@ class BaseModelSqlv2 { autoBind(this); } - public async readByPk(id?: any, validateFormula = false): Promise { + public async readByPk( + id?: any, + validateFormula = false, + query: any = {}, + ): Promise { const qb = this.dbDriver(this.tnPath); - await this.selectObject({ qb, validateFormula }); + const { ast, dependencyFields } = await getAst({ + query, + model: this.model, + view: this.viewId && (await View.get(this.viewId)), + }); + + await this.selectObject({ + ...(dependencyFields ?? {}), + qb, + validateFormula, + }); qb.where(_wherePk(this.model.primaryKeys, id)); @@ -153,14 +167,7 @@ class BaseModelSqlv2 { data.__proto__ = proto; } - // retrieve virtual column data as well - const project = await Project.get(this.model.project_id); - const { model, view } = await getViewAndModelByAliasOrId({ - projectName: project.title, - tableName: this.model.title, - }); - const { ast } = await getAst({ model, view }); - return data ? await nocoExecute(ast, data, {}) : {}; + return data ? await nocoExecute(ast, data, {}, query) : {}; } public async exist(id?: any): Promise { diff --git a/packages/nocodb/src/services/datas.service.ts b/packages/nocodb/src/services/datas.service.ts index 1e1aa78d24..01c663cee8 100644 --- a/packages/nocodb/src/services/datas.service.ts +++ b/packages/nocodb/src/services/datas.service.ts @@ -221,15 +221,13 @@ export class DatasService { dbDriver: await NcConnectionMgrv2.get(base), }); - const row = await baseModel.readByPk(param.rowId); + const row = await baseModel.readByPk(param.rowId, false, param.query); if (!row) { NcError.notFound('Row not found'); } - const { ast } = await getAst({ model, query: param.query, view }); - - return await nocoExecute(ast, row, {}, param.query); + return row; } async dataExist(param: PathParams & { rowId: string; query: any }) { @@ -637,13 +635,16 @@ export class DatasService { dbDriver: await NcConnectionMgrv2.get(base), }); - const { ast } = await getAst({ model, query: param.query }); + const { ast, dependencyFields } = await getAst({ + model, + query: param.query, + }); return await nocoExecute( ast, - await baseModel.readByPk(param.rowId), - {}, + await baseModel.readByPk(param.rowId, false), {}, + dependencyFields, ); } catch (e) { console.log(e); From 68fac2890e671aeac627ee6a7e0d94b28bf5055a Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 25 May 2023 14:39:46 +0530 Subject: [PATCH 03/13] fix: findone nested fields query param issue Signed-off-by: Pranav C --- packages/nocodb/src/db/BaseModelSqlv2.ts | 2 +- packages/nocodb/src/services/datas.service.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index f5d04ebffe..7e8733105f 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -197,7 +197,7 @@ class BaseModelSqlv2 { ): Promise { const { where, ...rest } = this._getListArgs(args as any); const qb = this.dbDriver(this.tnPath); - await this.selectObject({ qb, validateFormula }); + await this.selectObject({ ...args, qb, validateFormula }); const aliasColObjMap = await this.model.getAliasColObjMap(); const sorts = extractSortsObject(rest?.sort, aliasColObjMap); diff --git a/packages/nocodb/src/services/datas.service.ts b/packages/nocodb/src/services/datas.service.ts index 01c663cee8..fac808d099 100644 --- a/packages/nocodb/src/services/datas.service.ts +++ b/packages/nocodb/src/services/datas.service.ts @@ -186,7 +186,7 @@ export class DatasService { }); const data = await baseModel.findOne({ ...args, dependencyFields }); - return data ? await nocoExecute(ast, data, {}, {}) : {}; + return data ? await nocoExecute(ast, data, {}, dependencyFields) : {}; } async getDataGroupBy(param: { model: Model; view: View; query?: any }) { @@ -272,9 +272,9 @@ export class DatasService { dbDriver: await NcConnectionMgrv2.get(base), }); - const { ast } = await getAst({ model, query, view }); + const { ast, dependencyFields } = await getAst({ model, query, view }); - const listArgs: any = { ...query }; + const listArgs: any = { ...dependencyFields }; try { listArgs.filterArr = JSON.parse(listArgs.filterArrJson); } catch (e) {} From 88b648f5cf33cf0019d25947e3906aab2f6b1293 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 25 May 2023 15:54:13 +0530 Subject: [PATCH 04/13] fix: pass fields argument properly Signed-off-by: Pranav C --- packages/nocodb/tests/unit/rest/tests/tableRow.test.ts | 4 +++- packages/nocodb/tests/unit/rest/tests/viewRow.test.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts b/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts index 689bf1fbc7..33122c9a15 100644 --- a/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts @@ -1103,7 +1103,9 @@ function tableTest() { ); const nestedFields = { - 'Rental List': ['RentalDate', 'ReturnDate'], + 'Rental List': { + f: 'RentalDate,ReturnDate', + }, }; const nestedFilter = [ diff --git a/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts b/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts index 971c471879..3473c79bcf 100644 --- a/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts @@ -901,7 +901,7 @@ function viewRowTests() { ); const nestedFields = { - 'Rental List': ['RentalDate', 'ReturnDate'], + 'Rental List': { f: 'RentalDate,ReturnDate' }, }; const nestedFilter = [ From 4732d34a30631bdb6ee3fdd297934e50f19d9710 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 25 May 2023 15:54:52 +0530 Subject: [PATCH 05/13] fix: pass query params and fieldSet properly Signed-off-by: Pranav C --- packages/nocodb/src/services/datas.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nocodb/src/services/datas.service.ts b/packages/nocodb/src/services/datas.service.ts index fac808d099..c41609f6c0 100644 --- a/packages/nocodb/src/services/datas.service.ts +++ b/packages/nocodb/src/services/datas.service.ts @@ -185,7 +185,7 @@ export class DatasService { view, }); - const data = await baseModel.findOne({ ...args, dependencyFields }); + const data = await baseModel.findOne({ ...args, ...dependencyFields }); return data ? await nocoExecute(ast, data, {}, dependencyFields) : {}; } From 89fdf3d833caa34e7fc1813cdae2aa1b139bd50b Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 26 May 2023 11:18:05 +0530 Subject: [PATCH 06/13] fix: rollback transaction if bulk insert errors Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- packages/nocodb/src/db/BaseModelSqlv2.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index f7ddc9db94..2d25a11e08 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -2091,6 +2091,7 @@ class BaseModelSqlv2 { raw?: boolean; } = {}, ) { + let trx; try { // TODO: ag column handling for raw bulk insert const insertDatas = raw @@ -2115,7 +2116,7 @@ class BaseModelSqlv2 { // refer : https://www.sqlite.org/limits.html const chunkSize = this.isSqlite ? 10 : _chunkSize; - const trx = await this.dbDriver.transaction(); + trx = await this.dbDriver.transaction(); if (!foreign_key_checks) { if (this.isPg) { @@ -2146,6 +2147,7 @@ class BaseModelSqlv2 { return response; } catch (e) { + await trx?.rollback(); // await this.errorInsertb(e, data, null); throw e; } From 82c47c7165a28f311cd40e132a6c24f6a7c82d4b Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 26 May 2023 13:19:30 +0530 Subject: [PATCH 07/13] test: read row with nested fields Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../tests/unit/rest/tests/tableRow.test.ts | 230 ++++++++++-------- 1 file changed, 131 insertions(+), 99 deletions(-) diff --git a/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts b/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts index 33122c9a15..41af1ffe41 100644 --- a/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts @@ -1,8 +1,9 @@ import 'mocha'; +import request from 'supertest'; +import { UITypes } from 'nocodb-sdk'; +import { expect } from 'chai'; import init from '../../init'; import { createProject, createSakilaProject } from '../../factory/project'; -import request from 'supertest'; -import { ColumnType, UITypes } from 'nocodb-sdk'; import { createColumn, createLookupColumn, @@ -11,18 +12,18 @@ import { } from '../../factory/column'; import { createTable, getTable } from '../../factory/table'; import { + createBulkRows, createChildRow, createRow, generateDefaultRowAttributes, getOneRow, getRow, listRow, - createBulkRows, } from '../../factory/row'; import { isMysql, isPg, isSqlite } from '../../init/db'; -import Model from '../../../../src/models/Model'; -import Project from '../../../../src/models/Project'; -import { expect } from 'chai'; +import type { ColumnType } from 'nocodb-sdk'; +import type Model from '../../../../src/models/Model'; +import type Project from '../../../../src/models/Project'; const isColumnsCorrectInResponse = (row, columns: ColumnType[]) => { const responseColumnsListStr = Object.keys(row).sort().join(','); @@ -160,7 +161,7 @@ function tableTest() { it('Get desc sorted table data list with required columns', async function () { const firstNameColumn = customerColumns.find( - (col) => col.title === 'FirstName' + (col) => col.title === 'FirstName', ); const visibleColumns = [firstNameColumn]; const sortInfo = [{ fk_column_id: firstNameColumn.id, direction: 'desc' }]; @@ -214,7 +215,7 @@ function tableTest() { it('Get asc sorted table data list with required columns', async function () { const firstNameColumn = customerColumns.find( - (col) => col.title === 'FirstName' + (col) => col.title === 'FirstName', ); const visibleColumns = [firstNameColumn]; const sortInfo = [{ fk_column_id: firstNameColumn.id, direction: 'asc' }]; @@ -427,7 +428,7 @@ function tableTest() { }); const paymentListColumn = (await rentalTable.getColumns()).find( - (c) => c.title === 'Payment List' + (c) => c.title === 'Payment List', ); const nestedFilter = { @@ -513,11 +514,11 @@ function tableTest() { }); const paymentListColumn = (await rentalTable.getColumns()).find( - (c) => c.title === 'Payment List' + (c) => c.title === 'Payment List', ); const returnDateColumn = (await rentalTable.getColumns()).find( - (c) => c.title === 'ReturnDate' + (c) => c.title === 'ReturnDate', ); const nestedFilter = { @@ -630,15 +631,15 @@ function tableTest() { }); const paymentListColumn = (await customerTable.getColumns()).find( - (c) => c.title === 'Payment List' + (c) => c.title === 'Payment List', ); const activeColumn = (await customerTable.getColumns()).find( - (c) => c.title === 'Active' + (c) => c.title === 'Active', ); const addressColumn = (await customerTable.getColumns()).find( - (c) => c.title === 'Address' + (c) => c.title === 'Address', ); const nestedFilter = [ @@ -786,11 +787,11 @@ function tableTest() { }); const paymentListColumn = (await customerTable.getColumns()).find( - (c) => c.title === 'Payment List' + (c) => c.title === 'Payment List', ); const activeColumn = (await customerTable.getColumns()).find( - (c) => c.title === 'Active' + (c) => c.title === 'Active', ); const nestedFields = { @@ -866,7 +867,7 @@ function tableTest() { } const nestedRentalResponse = Object.keys( - ascResponse.body.list[0]['Rental List'] + ascResponse.body.list[0]['Rental List'], ); if ( nestedRentalResponse.includes('ReturnDate') && @@ -914,7 +915,7 @@ function tableTest() { if ( (response.body.list as Array).every( (row) => - parseInt(row['Formula']) !== parseInt(row[rollupColumnTitle]) + 10 + parseInt(row['Formula']) !== parseInt(row[rollupColumnTitle]) + 10, ) ) { throw new Error('Wrong formula'); @@ -998,13 +999,13 @@ function tableTest() { it('Find one sorted table data list with required columns', async function () { const firstNameColumn = customerColumns.find( - (col) => col.title === 'FirstName' + (col) => col.title === 'FirstName', ); const visibleColumns = [firstNameColumn]; let response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -1025,7 +1026,7 @@ function tableTest() { response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -1047,7 +1048,7 @@ function tableTest() { it('Find one desc sorted and with rollup table data list with required columns', async function () { const firstNameColumn = customerColumns.find( - (col) => col.title === 'FirstName' + (col) => col.title === 'FirstName', ); const rollupColumn = await createRollupColumn(context, { @@ -1064,7 +1065,7 @@ function tableTest() { const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -1095,11 +1096,11 @@ function tableTest() { }); const paymentListColumn = (await customerTable.getColumns()).find( - (c) => c.title === 'Payment List' + (c) => c.title === 'Payment List', ); const activeColumn = (await customerTable.getColumns()).find( - (c) => c.title === 'Active' + (c) => c.title === 'Active', ); const nestedFields = { @@ -1154,7 +1155,7 @@ function tableTest() { const ascResponse = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -1181,7 +1182,7 @@ function tableTest() { it('Groupby desc sorted and with rollup table data list with required columns', async function () { const firstNameColumn = customerColumns.find( - (col) => col.title === 'FirstName' + (col) => col.title === 'FirstName', ); const rollupColumn = await createRollupColumn(context, { @@ -1198,7 +1199,7 @@ function tableTest() { const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/groupby` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/groupby`, ) .set('xc-auth', context.token) .query({ @@ -1217,7 +1218,7 @@ function tableTest() { it('Groupby desc sorted and with rollup table data list with required columns', async function () { const firstNameColumn = customerColumns.find( - (col) => col.title === 'FirstName' + (col) => col.title === 'FirstName', ); const rollupColumn = await createRollupColumn(context, { @@ -1234,7 +1235,7 @@ function tableTest() { const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/groupby` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/groupby`, ) .set('xc-auth', context.token) .query({ @@ -1262,7 +1263,7 @@ function tableTest() { const readResponse = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${row['CustomerId']}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${row['CustomerId']}`, ) .set('xc-auth', context.token) .expect(200); @@ -1275,6 +1276,35 @@ function tableTest() { } }); + it('Read table row with nested fields', async () => { + const rowId = 1; + const actorTable = await getTable({ + project: sakilaProject, + name: 'actor', + }); + const response = await request(context.app) + .get( + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/`, + ) + .set('xc-auth', context.token) + .query({ + 'nested[Film List][fields]': 'Title,ReleaseYear,Language', + }) + .expect(200); + + const record = response.body; + expect(record['Film List']).length(19); + expect(record['Film List'][0]).to.have.all.keys( + 'Title', + 'ReleaseYear', + 'Language', + ); + expect(record['Film List'][0]['Language']).to.have.all.keys( + 'Name', + 'LanguageId', + ); + }); + it('Update table row', async function () { const table = await createTable(context, project); const row = await createRow(context, { project, table }); @@ -1398,7 +1428,7 @@ function tableTest() { if ( !(response.body.message[0] as string).includes( - 'is a LinkToAnotherRecord of' + 'is a LinkToAnotherRecord of', ) ) { throw new Error('Should give ltar foreign key error'); @@ -1413,7 +1443,7 @@ function tableTest() { const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${row['CustomerId']}/exist` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${row['CustomerId']}/exist`, ) .set('xc-auth', context.token) .expect(200); @@ -1426,7 +1456,7 @@ function tableTest() { it('Exist should be false table row when it does not exists', async function () { const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/998546/exist` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/998546/exist`, ) .set('xc-auth', context.token) .expect(200); @@ -1533,7 +1563,7 @@ function tableTest() { .patch(`/api/v1/db/data/bulk/noco/${project.id}/${table.id}`) .set('xc-auth', context.token) .send( - rows.map((row) => ({ title: `new-${row['Title']}`, id: row['Id'] })) + rows.map((row) => ({ title: `new-${row['Title']}`, id: row['Id'] })), ) .expect(200); const updatedRows: Array = await listRow({ project, table }); @@ -1614,7 +1644,7 @@ function tableTest() { it('Export csv', async () => { const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.title}/export/csv` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.title}/export/csv`, ) .set('xc-auth', context.token) .expect(200); @@ -1633,14 +1663,14 @@ function tableTest() { it('Export excel', async () => { const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.title}/export/excel` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.title}/export/excel`, ) .set('xc-auth', context.token) .expect(200); if ( !response['header']['content-disposition'].includes( - 'Customer-export.xlsx' + 'Customer-export.xlsx', ) ) { throw new Error('Wrong file name'); @@ -1655,11 +1685,11 @@ function tableTest() { it('Nested row list hm', async () => { const rowId = 1; const rentalListColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'Rental List' + (column) => column.title === 'Rental List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -1674,11 +1704,11 @@ function tableTest() { it('Nested row list hm with limit and offset', async () => { const rowId = 1; const rentalListColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'Rental List' + (column) => column.title === 'Rental List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .query({ @@ -1700,11 +1730,11 @@ function tableTest() { it('Row list hm with invalid table id', async () => { const rowId = 1; const rentalListColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'Rental List' + (column) => column.title === 'Rental List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/wrong-id/${rowId}/hm/${rentalListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/wrong-id/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .expect(404); @@ -1752,11 +1782,11 @@ function tableTest() { }); const filmTable = await getTable({ project: sakilaProject, name: 'film' }); const filmListColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'Film List' + (column) => column.title === 'Film List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -1776,11 +1806,11 @@ function tableTest() { }); const filmTable = await getTable({ project: sakilaProject, name: 'film' }); const filmListColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'Film List' + (column) => column.title === 'Film List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .query({ @@ -1807,11 +1837,11 @@ function tableTest() { name: 'actor', }); const filmListColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'Film List' + (column) => column.title === 'Film List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/mm/${filmListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(404); @@ -1825,12 +1855,12 @@ function tableTest() { it('Create hm relation with invalid table id', async () => { const rowId = 1; const rentalListColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'Rental List' + (column) => column.title === 'Rental List', )!; const refId = 1; const response = await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/hm/${rentalListColumn.id}/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/hm/${rentalListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -1843,12 +1873,12 @@ function tableTest() { it('Create hm relation with non ltar column', async () => { const rowId = 1; const firstNameColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'FirstName' + (column) => column.title === 'FirstName', )!; const refId = 1; const response = await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${firstNameColumn.id}/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${firstNameColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -1865,7 +1895,7 @@ function tableTest() { const response = await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/invalid-column/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/invalid-column/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -1900,20 +1930,20 @@ function tableTest() { it('Create list hm', async () => { const rowId = 1; const rentalListColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'Rental List' + (column) => column.title === 'Rental List', )!; const refId = 1; const lisResponseBeforeUpdate = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(200); @@ -1921,7 +1951,7 @@ function tableTest() { const lisResponseAfterUpdate = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -1944,7 +1974,7 @@ function tableTest() { const response = await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/invalid-column/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/invalid-column/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -1964,12 +1994,12 @@ function tableTest() { name: 'actor', }); const firstNameColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'FirstName' + (column) => column.title === 'FirstName', )!; const refId = 1; const response = await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${firstNameColumn.id}/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${firstNameColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -1987,13 +2017,13 @@ function tableTest() { name: 'actor', }); const filmListColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'Film List' + (column) => column.title === 'Film List', )!; const refId = 1; await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(400); @@ -2009,20 +2039,20 @@ function tableTest() { name: 'actor', }); const filmListColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'Film List' + (column) => column.title === 'Film List', )!; const refId = 2; const lisResponseBeforeUpdate = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(200); @@ -2030,7 +2060,7 @@ function tableTest() { const lisResponseAfterUpdate = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -2046,12 +2076,12 @@ function tableTest() { it('List hm with non ltar column', async () => { const rowId = 1; const firstNameColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'FirstName' + (column) => column.title === 'FirstName', )!; await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${firstNameColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${firstNameColumn.id}`, ) .set('xc-auth', context.token) .expect(400); @@ -2060,12 +2090,12 @@ function tableTest() { it('List mm with non ltar column', async () => { const rowId = 1; const firstNameColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'FirstName' + (column) => column.title === 'FirstName', )!; await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/mm/${firstNameColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/mm/${firstNameColumn.id}`, ) .set('xc-auth', context.token) .expect(400); @@ -2078,20 +2108,20 @@ function tableTest() { name: 'actor', }); const filmListColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'Film List' + (column) => column.title === 'Film List', )!; const refId = 1; const lisResponseBeforeDelete = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); await request(context.app) .delete( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(200); @@ -2099,7 +2129,7 @@ function tableTest() { const lisResponseAfterDelete = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -2118,13 +2148,13 @@ function tableTest() { const rowId = 1; const rentalListColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'Rental List' + (column) => column.title === 'Rental List', )!; const refId = 76; const response = await request(context.app) .delete( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(400); @@ -2132,7 +2162,7 @@ function tableTest() { // todo: only keep generic error message once updated in noco catchError middleware if ( !response.body.message?.includes( - "The column 'customer_id' cannot be null" + "The column 'customer_id' cannot be null", ) && !response.body.message?.includes("Column 'customer_id' cannot be null") && !response.body.message?.includes('Cannot add or update a child row') && @@ -2141,7 +2171,7 @@ function tableTest() { ) { console.log( 'Delete list hm with existing ref row id with non nullable clause', - response.body + response.body, ); throw new Error('Wrong error message'); } @@ -2171,7 +2201,7 @@ function tableTest() { const response = await request(context.app) .delete( - `/api/v1/db/data/noco/${project.id}/${table.id}/${row['Id']}/hm/${ltarColumn.id}/${childRow['Id']}` + `/api/v1/db/data/noco/${project.id}/${table.id}/${row['Id']}/hm/${ltarColumn.id}/${childRow['Id']}`, ) .set('xc-auth', context.token) .expect(200); @@ -2182,7 +2212,9 @@ function tableTest() { throw new Error('Was not deleted'); } - if (response.body['msg'] !== 'The relation data has been deleted successfully') { + if ( + response.body['msg'] !== 'The relation data has been deleted successfully' + ) { throw new Error('Response incorrect'); } }); @@ -2190,12 +2222,12 @@ function tableTest() { it('Exclude list hm', async () => { const rowId = 1; const rentalListColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'Rental List' + (column) => column.title === 'Rental List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/exclude` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(200); @@ -2209,12 +2241,12 @@ function tableTest() { it('Exclude list hm with limit and offset', async () => { const rowId = 1; const rentalListColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'Rental List' + (column) => column.title === 'Rental List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/exclude` + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/exclude`, ) .set('xc-auth', context.token) .query({ @@ -2241,12 +2273,12 @@ function tableTest() { name: 'actor', }); const filmListColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'Film List' + (column) => column.title === 'Film List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/exclude` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(200); @@ -2264,12 +2296,12 @@ function tableTest() { name: 'actor', }); const filmListColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'Film List' + (column) => column.title === 'Film List', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/exclude` + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/exclude`, ) .set('xc-auth', context.token) .query({ @@ -2296,12 +2328,12 @@ function tableTest() { name: 'address', }); const cityColumn = (await addressTable.getColumns()).find( - (column) => column.title === 'City' + (column) => column.title === 'City', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${addressTable.id}/${rowId}/bt/${cityColumn.id}/exclude` + `/api/v1/db/data/noco/${sakilaProject.id}/${addressTable.id}/${rowId}/bt/${cityColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(200); @@ -2317,12 +2349,12 @@ function tableTest() { name: 'address', }); const cityColumn = (await addressTable.getColumns()).find( - (column) => column.title === 'City' + (column) => column.title === 'City', )!; const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/${addressTable.id}/${rowId}/bt/${cityColumn.id}/exclude` + `/api/v1/db/data/noco/${sakilaProject.id}/${addressTable.id}/${rowId}/bt/${cityColumn.id}/exclude`, ) .set('xc-auth', context.token) .query({ @@ -2338,12 +2370,12 @@ function tableTest() { it('Create nested hm relation with invalid table id', async () => { const rowId = 1; const rentalListColumn = (await customerTable.getColumns()).find( - (column) => column.title === 'Rental List' + (column) => column.title === 'Rental List', )!; const refId = 1; const response = await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/hm/${rentalListColumn.id}/exclude` + `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/hm/${rentalListColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(404); @@ -2361,11 +2393,11 @@ function tableTest() { name: 'actor', }); const filmListColumn = (await actorTable.getColumns()).find( - (column) => column.title === 'Film List' + (column) => column.title === 'Film List', )!; const response = await request(context.app) .post( - `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/mm/${filmListColumn.id}/exclude` + `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/mm/${filmListColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(404); @@ -2385,7 +2417,7 @@ function tableTest() { const response = await request(context.app) .get( - `/api/v1/db/data/noco/${sakilaProject.id}/Film/group/${ratingColumn.id}` + `/api/v1/db/data/noco/${sakilaProject.id}/Film/group/${ratingColumn.id}`, ) .set('xc-auth', context.token) .expect(200); From 9847bd6f9e291e58c1b3d53b6a8c94df98ea3588 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 26 May 2023 13:52:13 +0530 Subject: [PATCH 08/13] test: update sqlite read nested Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../nocodb/tests/unit/rest/tests/tableRow.test.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts b/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts index 41af1ffe41..947c58bfba 100644 --- a/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts @@ -1299,10 +1299,14 @@ function tableTest() { 'ReleaseYear', 'Language', ); - expect(record['Film List'][0]['Language']).to.have.all.keys( - 'Name', - 'LanguageId', - ); + + // for SQLite Sakila, Language is null + if (isPg(context)) { + expect(record['Film List'][0]['Language']).to.have.all.keys( + 'Name', + 'LanguageId', + ); + } }); it('Update table row', async function () { From b161f25cc769f4eeae1ef5230b7c8969e390c3de Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 26 May 2023 15:17:29 +0530 Subject: [PATCH 09/13] fix: add source primary button Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../components/dashboard/settings/data-sources/CreateBase.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue b/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue index bb4f6d56d8..296f0bced1 100644 --- a/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue +++ b/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue @@ -495,7 +495,7 @@ watch(
- + {{ $t('activity.useConnectionUrl') }}
@@ -611,7 +611,7 @@ watch(
- + {{ $t('activity.testDbConn') }} From 681ca29e65a2e3e311366fcffaa5c529cb791fbc Mon Sep 17 00:00:00 2001 From: navi Date: Fri, 26 May 2023 17:59:03 +0100 Subject: [PATCH 10/13] New translations en.json (French) --- packages/nc-gui/lang/fr.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/lang/fr.json b/packages/nc-gui/lang/fr.json index 28d5266003..402c97bd4f 100644 --- a/packages/nc-gui/lang/fr.json +++ b/packages/nc-gui/lang/fr.json @@ -260,7 +260,7 @@ "barcodeFormat": "Format du code-barres", "qrCodeValueTooLong": "Trop de caractères pour un code QR", "barcodeValueTooLong": "Trop de caractères pour un code-barres", - "currentLocation": "Current Location", + "currentLocation": "Emplacement actuel", "lng": "Lng", "lat": "Lat", "aggregateFunction": "Fonction agrégée", @@ -385,12 +385,12 @@ "nextRecord": "Ligne suivante", "previousRecord": "Ligne précédente", "copyApiURL": "Copier l'URL de l'API", - "createTable": "Create New Table", + "createTable": "Créer une nouvelle table", "refreshTable": "Actualiser le tableau", - "renameTable": "Rename Table", - "deleteTable": "Delete Table", + "renameTable": "Renommer la table", + "deleteTable": "Supprimer la table", "addField": "Ajouter un nouveau champ à ce tableau", - "setDisplay": "Set as Display value", + "setDisplay": "Définir comme valeur d'affichage", "addRow": "Ajouter une nouvelle ligne", "saveRow": "Enregistrer la ligne", "saveAndExit": "Enregistrer et quitter", From 600375bb17bf1f09b0d24ca01839bb9d1f782410 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 27 May 2023 11:10:53 +0800 Subject: [PATCH 11/13] chore(nocodb): lint --- packages/nocodb/src/Noco.ts | 2 +- packages/nocodb/src/services/app-init.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/Noco.ts b/packages/nocodb/src/Noco.ts index 1b93161bb7..048901ac47 100644 --- a/packages/nocodb/src/Noco.ts +++ b/packages/nocodb/src/Noco.ts @@ -1,6 +1,6 @@ +import path from 'path'; import Sentry, { Handlers } from '@sentry/node'; import { Logger } from '@nestjs/common'; -import path from 'path'; import { NestFactory } from '@nestjs/core'; import clear from 'clear'; import * as express from 'express'; diff --git a/packages/nocodb/src/services/app-init.service.ts b/packages/nocodb/src/services/app-init.service.ts index c913fcaefb..e1050d480c 100644 --- a/packages/nocodb/src/services/app-init.service.ts +++ b/packages/nocodb/src/services/app-init.service.ts @@ -4,7 +4,7 @@ import { Connection } from '../connection/connection'; import initAdminFromEnv from '../helpers/initAdminFromEnv'; import NcPluginMgrv2 from '../helpers/NcPluginMgrv2'; import { MetaService } from '../meta/meta.service'; -import { User } from '../models' +import { User } from '../models'; import Noco from '../Noco'; import getInstance from '../utils/getInstance'; import NcConfigFactory from '../utils/NcConfigFactory'; From 086cea1b6fa610e0572fed50ea108892c7fc08bd Mon Sep 17 00:00:00 2001 From: wingkwong Date: Sat, 27 May 2023 03:50:55 +0000 Subject: [PATCH 12/13] [create-pull-request] automated change Signed-off-by: GitHub --- packages/nc-gui/package-lock.json | 54 +++++++++++++++++++------------ packages/nc-gui/package.json | 2 +- packages/nc-lib-gui/package.json | 2 +- packages/nocodb-sdk/package.json | 2 +- packages/nocodb/package-lock.json | 50 +++++++++++++--------------- packages/nocodb/package.json | 8 ++--- 6 files changed, 63 insertions(+), 55 deletions(-) diff --git a/packages/nc-gui/package-lock.json b/packages/nc-gui/package-lock.json index 4a50a2051b..30cf29bfd2 100644 --- a/packages/nc-gui/package-lock.json +++ b/packages/nc-gui/package-lock.json @@ -30,7 +30,7 @@ "leaflet.markercluster": "^1.5.3", "locale-codes": "^1.3.1", "monaco-editor": "^0.33.0", - "nocodb-sdk": "file:../nocodb-sdk", + "nocodb-sdk": "0.107.5", "papaparse": "^5.3.2", "pinia": "^2.0.33", "qrcode": "^1.5.1", @@ -110,7 +110,8 @@ } }, "../nocodb-sdk": { - "version": "0.107.4", + "version": "0.107.5", + "extraneous": true, "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", @@ -8775,7 +8776,6 @@ "version": "1.15.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", - "devOptional": true, "funding": [ { "type": "individual", @@ -12294,8 +12294,21 @@ } }, "node_modules/nocodb-sdk": { - "resolved": "../nocodb-sdk", - "link": true + "version": "0.107.5", + "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.107.5.tgz", + "integrity": "sha512-938oGsIC7unfdVUWYfBg0+iNViH9PQ49OTrVg09YAjQYX+6iO5QBdriD/sGSz6gRQqp/M4rBS9WpuYflaMOOeg==", + "dependencies": { + "axios": "^0.21.1", + "jsep": "^1.3.6" + } + }, + "node_modules/nocodb-sdk/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } }, "node_modules/node-abi": { "version": "3.23.0", @@ -24797,8 +24810,7 @@ "follow-redirects": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", - "devOptional": true + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" }, "form-data": { "version": "4.0.0", @@ -27348,22 +27360,22 @@ } }, "nocodb-sdk": { - "version": "file:../nocodb-sdk", + "version": "0.107.5", + "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.107.5.tgz", + "integrity": "sha512-938oGsIC7unfdVUWYfBg0+iNViH9PQ49OTrVg09YAjQYX+6iO5QBdriD/sGSz6gRQqp/M4rBS9WpuYflaMOOeg==", "requires": { - "@typescript-eslint/eslint-plugin": "^4.0.1", - "@typescript-eslint/parser": "^4.0.1", "axios": "^0.21.1", - "cspell": "^4.1.0", - "eslint": "^7.8.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-functional": "^3.0.2", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-prettier": "^4.0.0", - "jsep": "^1.3.6", - "npm-run-all": "^4.1.5", - "prettier": "^2.1.1", - "typescript": "^4.0.2" + "jsep": "^1.3.6" + }, + "dependencies": { + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "requires": { + "follow-redirects": "^1.14.0" + } + } } }, "node-abi": { diff --git a/packages/nc-gui/package.json b/packages/nc-gui/package.json index 847017b499..303de98432 100644 --- a/packages/nc-gui/package.json +++ b/packages/nc-gui/package.json @@ -54,7 +54,7 @@ "leaflet.markercluster": "^1.5.3", "locale-codes": "^1.3.1", "monaco-editor": "^0.33.0", - "nocodb-sdk": "file:../nocodb-sdk", + "nocodb-sdk": "0.107.5", "papaparse": "^5.3.2", "pinia": "^2.0.33", "qrcode": "^1.5.1", diff --git a/packages/nc-lib-gui/package.json b/packages/nc-lib-gui/package.json index 34d5efbf1b..c480b45bae 100644 --- a/packages/nc-lib-gui/package.json +++ b/packages/nc-lib-gui/package.json @@ -1,6 +1,6 @@ { "name": "nc-lib-gui", - "version": "0.107.4", + "version": "0.107.5", "description": "NocoDB GUI", "author": { "name": "NocoDB", diff --git a/packages/nocodb-sdk/package.json b/packages/nocodb-sdk/package.json index 9709ad7d86..eafc8a6866 100644 --- a/packages/nocodb-sdk/package.json +++ b/packages/nocodb-sdk/package.json @@ -1,6 +1,6 @@ { "name": "nocodb-sdk", - "version": "0.107.4", + "version": "0.107.5", "description": "NocoDB SDK", "main": "build/main/index.js", "typings": "build/main/index.d.ts", diff --git a/packages/nocodb/package-lock.json b/packages/nocodb/package-lock.json index 6095a65621..7c43a948bd 100644 --- a/packages/nocodb/package-lock.json +++ b/packages/nocodb/package-lock.json @@ -1,12 +1,12 @@ { "name": "nocodb", - "version": "0.107.4", + "version": "0.107.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "nocodb", - "version": "0.107.4", + "version": "0.107.5", "license": "AGPL-3.0-or-later", "dependencies": { "@google-cloud/storage": "^5.7.2", @@ -80,10 +80,10 @@ "mysql2": "^3.2.0", "nanoid": "^3.1.20", "nc-help": "^0.2.87", - "nc-lib-gui": "0.107.4", + "nc-lib-gui": "0.107.5", "nc-plugin": "^0.1.3", "ncp": "^2.0.0", - "nocodb-sdk": "file:../nocodb-sdk", + "nocodb-sdk": "0.107.5", "nodemailer": "^6.4.10", "object-hash": "^3.0.0", "os-locale": "^6.0.2", @@ -190,7 +190,8 @@ } }, "../nocodb-sdk": { - "version": "0.107.4", + "version": "0.107.5", + "extraneous": true, "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", @@ -13157,9 +13158,9 @@ } }, "node_modules/nc-lib-gui": { - "version": "0.107.4", - "resolved": "https://registry.npmjs.org/nc-lib-gui/-/nc-lib-gui-0.107.4.tgz", - "integrity": "sha512-+e0jjJgrBfgLGTTShkcu1QQ2I0QxE/NUCCJ5L8KeZibm71pvgxL/P2hfatSz8PvzSDU/YwXnyXZQkeaSDBzNyA==", + "version": "0.107.5", + "resolved": "https://registry.npmjs.org/nc-lib-gui/-/nc-lib-gui-0.107.5.tgz", + "integrity": "sha512-bFmKo6qDmrHY7a3itHMnp1A8qFecHyNKZABWK4GIdA8xCeSx6rLL8LGzxDRsD3fIXFwTCzSd8iPJECHaF5fcFg==", "dependencies": { "express": "^4.17.1" } @@ -13206,8 +13207,13 @@ } }, "node_modules/nocodb-sdk": { - "resolved": "../nocodb-sdk", - "link": true + "version": "0.107.5", + "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.107.5.tgz", + "integrity": "sha512-938oGsIC7unfdVUWYfBg0+iNViH9PQ49OTrVg09YAjQYX+6iO5QBdriD/sGSz6gRQqp/M4rBS9WpuYflaMOOeg==", + "dependencies": { + "axios": "^0.21.1", + "jsep": "^1.3.6" + } }, "node_modules/node-abort-controller": { "version": "3.1.1", @@ -28442,9 +28448,9 @@ } }, "nc-lib-gui": { - "version": "0.107.4", - "resolved": "https://registry.npmjs.org/nc-lib-gui/-/nc-lib-gui-0.107.4.tgz", - "integrity": "sha512-+e0jjJgrBfgLGTTShkcu1QQ2I0QxE/NUCCJ5L8KeZibm71pvgxL/P2hfatSz8PvzSDU/YwXnyXZQkeaSDBzNyA==", + "version": "0.107.5", + "resolved": "https://registry.npmjs.org/nc-lib-gui/-/nc-lib-gui-0.107.5.tgz", + "integrity": "sha512-bFmKo6qDmrHY7a3itHMnp1A8qFecHyNKZABWK4GIdA8xCeSx6rLL8LGzxDRsD3fIXFwTCzSd8iPJECHaF5fcFg==", "requires": { "express": "^4.17.1" } @@ -28479,22 +28485,12 @@ "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==" }, "nocodb-sdk": { - "version": "file:../nocodb-sdk", + "version": "0.107.5", + "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.107.5.tgz", + "integrity": "sha512-938oGsIC7unfdVUWYfBg0+iNViH9PQ49OTrVg09YAjQYX+6iO5QBdriD/sGSz6gRQqp/M4rBS9WpuYflaMOOeg==", "requires": { - "@typescript-eslint/eslint-plugin": "^4.0.1", - "@typescript-eslint/parser": "^4.0.1", "axios": "^0.21.1", - "cspell": "^4.1.0", - "eslint": "^7.8.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-functional": "^3.0.2", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-prettier": "^4.0.0", - "jsep": "^1.3.6", - "npm-run-all": "^4.1.5", - "prettier": "^2.1.1", - "typescript": "^4.0.2" + "jsep": "^1.3.6" } }, "node-abort-controller": { diff --git a/packages/nocodb/package.json b/packages/nocodb/package.json index 1b8701a2e6..c9d1481ee7 100644 --- a/packages/nocodb/package.json +++ b/packages/nocodb/package.json @@ -1,6 +1,6 @@ { "name": "nocodb", - "version": "0.107.4", + "version": "0.107.5", "description": "NocoDB Backend", "main": "dist/bundle.js", "author": { @@ -113,10 +113,10 @@ "mysql2": "^3.2.0", "nanoid": "^3.1.20", "nc-help": "^0.2.87", - "nc-lib-gui": "0.107.4", + "nc-lib-gui": "0.107.5", "nc-plugin": "^0.1.3", "ncp": "^2.0.0", - "nocodb-sdk": "file:../nocodb-sdk", + "nocodb-sdk": "0.107.5", "nodemailer": "^6.4.10", "object-hash": "^3.0.0", "os-locale": "^6.0.2", @@ -203,4 +203,4 @@ "coverageDirectory": "../coverage", "testEnvironment": "node" } -} +} \ No newline at end of file From e0f90b4fd3107726f5778c331bf74f1d5c2d0d79 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 27 May 2023 12:53:59 +0800 Subject: [PATCH 13/13] chore: local sdk path --- packages/nc-gui/package-lock.json | 52 +++++++++++---------------- packages/nc-gui/package.json | 2 +- packages/nocodb-sdk/package-lock.json | 4 +-- packages/nocodb/package-lock.json | 30 +++++++++------- packages/nocodb/package.json | 4 +-- 5 files changed, 42 insertions(+), 50 deletions(-) diff --git a/packages/nc-gui/package-lock.json b/packages/nc-gui/package-lock.json index 30cf29bfd2..db8ca28452 100644 --- a/packages/nc-gui/package-lock.json +++ b/packages/nc-gui/package-lock.json @@ -30,7 +30,7 @@ "leaflet.markercluster": "^1.5.3", "locale-codes": "^1.3.1", "monaco-editor": "^0.33.0", - "nocodb-sdk": "0.107.5", + "nocodb-sdk": "file:../nocodb-sdk", "papaparse": "^5.3.2", "pinia": "^2.0.33", "qrcode": "^1.5.1", @@ -111,7 +111,6 @@ }, "../nocodb-sdk": { "version": "0.107.5", - "extraneous": true, "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", @@ -8776,6 +8775,7 @@ "version": "1.15.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "devOptional": true, "funding": [ { "type": "individual", @@ -12294,21 +12294,8 @@ } }, "node_modules/nocodb-sdk": { - "version": "0.107.5", - "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.107.5.tgz", - "integrity": "sha512-938oGsIC7unfdVUWYfBg0+iNViH9PQ49OTrVg09YAjQYX+6iO5QBdriD/sGSz6gRQqp/M4rBS9WpuYflaMOOeg==", - "dependencies": { - "axios": "^0.21.1", - "jsep": "^1.3.6" - } - }, - "node_modules/nocodb-sdk/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dependencies": { - "follow-redirects": "^1.14.0" - } + "resolved": "../nocodb-sdk", + "link": true }, "node_modules/node-abi": { "version": "3.23.0", @@ -24810,7 +24797,8 @@ "follow-redirects": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "devOptional": true }, "form-data": { "version": "4.0.0", @@ -27360,22 +27348,22 @@ } }, "nocodb-sdk": { - "version": "0.107.5", - "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.107.5.tgz", - "integrity": "sha512-938oGsIC7unfdVUWYfBg0+iNViH9PQ49OTrVg09YAjQYX+6iO5QBdriD/sGSz6gRQqp/M4rBS9WpuYflaMOOeg==", + "version": "file:../nocodb-sdk", "requires": { + "@typescript-eslint/eslint-plugin": "^4.0.1", + "@typescript-eslint/parser": "^4.0.1", "axios": "^0.21.1", - "jsep": "^1.3.6" - }, - "dependencies": { - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "requires": { - "follow-redirects": "^1.14.0" - } - } + "cspell": "^4.1.0", + "eslint": "^7.8.0", + "eslint-config-prettier": "^6.11.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-functional": "^3.0.2", + "eslint-plugin-import": "^2.22.0", + "eslint-plugin-prettier": "^4.0.0", + "jsep": "^1.3.6", + "npm-run-all": "^4.1.5", + "prettier": "^2.1.1", + "typescript": "^4.0.2" } }, "node-abi": { diff --git a/packages/nc-gui/package.json b/packages/nc-gui/package.json index 303de98432..847017b499 100644 --- a/packages/nc-gui/package.json +++ b/packages/nc-gui/package.json @@ -54,7 +54,7 @@ "leaflet.markercluster": "^1.5.3", "locale-codes": "^1.3.1", "monaco-editor": "^0.33.0", - "nocodb-sdk": "0.107.5", + "nocodb-sdk": "file:../nocodb-sdk", "papaparse": "^5.3.2", "pinia": "^2.0.33", "qrcode": "^1.5.1", diff --git a/packages/nocodb-sdk/package-lock.json b/packages/nocodb-sdk/package-lock.json index bc7fc27f3c..3eeec3c695 100644 --- a/packages/nocodb-sdk/package-lock.json +++ b/packages/nocodb-sdk/package-lock.json @@ -1,12 +1,12 @@ { "name": "nocodb-sdk", - "version": "0.107.4", + "version": "0.107.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "nocodb-sdk", - "version": "0.107.4", + "version": "0.107.5", "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", diff --git a/packages/nocodb/package-lock.json b/packages/nocodb/package-lock.json index 7c43a948bd..de526510b2 100644 --- a/packages/nocodb/package-lock.json +++ b/packages/nocodb/package-lock.json @@ -83,7 +83,7 @@ "nc-lib-gui": "0.107.5", "nc-plugin": "^0.1.3", "ncp": "^2.0.0", - "nocodb-sdk": "0.107.5", + "nocodb-sdk": "file:../nocodb-sdk", "nodemailer": "^6.4.10", "object-hash": "^3.0.0", "os-locale": "^6.0.2", @@ -191,7 +191,6 @@ }, "../nocodb-sdk": { "version": "0.107.5", - "extraneous": true, "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", @@ -13207,13 +13206,8 @@ } }, "node_modules/nocodb-sdk": { - "version": "0.107.5", - "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.107.5.tgz", - "integrity": "sha512-938oGsIC7unfdVUWYfBg0+iNViH9PQ49OTrVg09YAjQYX+6iO5QBdriD/sGSz6gRQqp/M4rBS9WpuYflaMOOeg==", - "dependencies": { - "axios": "^0.21.1", - "jsep": "^1.3.6" - } + "resolved": "../nocodb-sdk", + "link": true }, "node_modules/node-abort-controller": { "version": "3.1.1", @@ -28485,12 +28479,22 @@ "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==" }, "nocodb-sdk": { - "version": "0.107.5", - "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.107.5.tgz", - "integrity": "sha512-938oGsIC7unfdVUWYfBg0+iNViH9PQ49OTrVg09YAjQYX+6iO5QBdriD/sGSz6gRQqp/M4rBS9WpuYflaMOOeg==", + "version": "file:../nocodb-sdk", "requires": { + "@typescript-eslint/eslint-plugin": "^4.0.1", + "@typescript-eslint/parser": "^4.0.1", "axios": "^0.21.1", - "jsep": "^1.3.6" + "cspell": "^4.1.0", + "eslint": "^7.8.0", + "eslint-config-prettier": "^6.11.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-functional": "^3.0.2", + "eslint-plugin-import": "^2.22.0", + "eslint-plugin-prettier": "^4.0.0", + "jsep": "^1.3.6", + "npm-run-all": "^4.1.5", + "prettier": "^2.1.1", + "typescript": "^4.0.2" } }, "node-abort-controller": { diff --git a/packages/nocodb/package.json b/packages/nocodb/package.json index c9d1481ee7..d9dc9b67c7 100644 --- a/packages/nocodb/package.json +++ b/packages/nocodb/package.json @@ -116,7 +116,7 @@ "nc-lib-gui": "0.107.5", "nc-plugin": "^0.1.3", "ncp": "^2.0.0", - "nocodb-sdk": "0.107.5", + "nocodb-sdk": "file:../nocodb-sdk", "nodemailer": "^6.4.10", "object-hash": "^3.0.0", "os-locale": "^6.0.2", @@ -203,4 +203,4 @@ "coverageDirectory": "../coverage", "testEnvironment": "node" } -} \ No newline at end of file +}