Browse Source

Merge branch 'develop' into feat/kanban-view

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
4a797490ba
  1. 281
      packages/nocodb-sdk/package-lock.json
  2. 27
      packages/nocodb/package-lock.json
  3. 2
      packages/nocodb/package.json
  4. 78
      packages/nocodb/src/lib/meta/api/sync/helpers/job.ts
  5. 5
      packages/nocodb/src/lib/meta/api/sync/helpers/readAndProcessData.ts
  6. 5
      scripts/cypress/integration/common/6d_language_validation.js

281
packages/nocodb-sdk/package-lock.json generated

@ -538,19 +538,6 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/nyc/node_modules/yargs-parser": {
"version": "18.1.3",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"dev": true,
"dependencies": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/table/node_modules/ansi-styles": { "node_modules/table/node_modules/ansi-styles": {
"version": "4.3.0", "version": "4.3.0",
"dev": true, "dev": true,
@ -1578,18 +1565,6 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/gh-pages/node_modules/array-union": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
"integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==",
"dev": true,
"dependencies": {
"array-uniq": "^1.0.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/escape-goat": { "node_modules/escape-goat": {
"version": "2.1.1", "version": "2.1.1",
"dev": true, "dev": true,
@ -1811,15 +1786,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/nyc/node_modules/camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/npm-run-all/node_modules/path-key": { "node_modules/npm-run-all/node_modules/path-key": {
"version": "2.0.1", "version": "2.0.1",
"dev": true, "dev": true,
@ -2140,15 +2106,6 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/gh-pages/node_modules/universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"dev": true,
"engines": {
"node": ">= 4.0.0"
}
},
"node_modules/signal-exit": { "node_modules/signal-exit": {
"version": "3.0.7", "version": "3.0.7",
"dev": true, "dev": true,
@ -2582,15 +2539,6 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/typedoc/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/trim-repeated": { "node_modules/trim-repeated": {
"version": "1.0.0", "version": "1.0.0",
"dev": true, "dev": true,
@ -3022,18 +2970,6 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/git-semver-tags/node_modules/type-fest": {
"version": "0.18.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz",
"integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/strip-indent": { "node_modules/strip-indent": {
"version": "3.0.0", "version": "3.0.0",
"dev": true, "dev": true,
@ -4158,15 +4094,6 @@
"node": ">=0.8.0" "node": ">=0.8.0"
} }
}, },
"node_modules/inquirer/node_modules/is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/dotgitignore/node_modules/path-exists": { "node_modules/dotgitignore/node_modules/path-exists": {
"version": "3.0.0", "version": "3.0.0",
"dev": true, "dev": true,
@ -5217,15 +5144,6 @@
"once": "^1.4.0" "once": "^1.4.0"
} }
}, },
"node_modules/array-uniq": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
"integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/escalade": { "node_modules/escalade": {
"version": "3.1.1", "version": "3.1.1",
"dev": true, "dev": true,
@ -5242,21 +5160,6 @@
"node": ">=4.0.0" "node": ">=4.0.0"
} }
}, },
"node_modules/standard-version/node_modules/p-limit": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
"dependencies": {
"yocto-queue": "^0.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/eslint-module-utils/node_modules/p-limit": { "node_modules/eslint-module-utils/node_modules/p-limit": {
"version": "1.3.0", "version": "1.3.0",
"dev": true, "dev": true,
@ -5693,15 +5596,6 @@
"node": "^10.12.0 || >=12.0.0" "node": "^10.12.0 || >=12.0.0"
} }
}, },
"node_modules/standard-version/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/js-tokens": { "node_modules/js-tokens": {
"version": "4.0.0", "version": "4.0.0",
"dev": true, "dev": true,
@ -7207,18 +7101,6 @@
"node": ">=4.8" "node": ">=4.8"
} }
}, },
"node_modules/standard-version/node_modules/supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/spawn-wrap": { "node_modules/spawn-wrap": {
"version": "2.0.0", "version": "2.0.0",
"dev": true, "dev": true,
@ -7251,18 +7133,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/strip-json-comments": { "node_modules/strip-json-comments": {
"version": "2.0.1", "version": "2.0.1",
"dev": true, "dev": true,
@ -7340,21 +7210,6 @@
"license": "MIT", "license": "MIT",
"optional": true "optional": true
}, },
"node_modules/standard-version/node_modules/p-locate": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
"dependencies": {
"p-limit": "^3.0.2"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@nodelib/fs.walk": { "node_modules/@nodelib/fs.walk": {
"version": "1.2.8", "version": "1.2.8",
"dev": true, "dev": true,
@ -7608,21 +7463,6 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
} }
}, },
"node_modules/standard-version/node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
"dependencies": {
"p-locate": "^5.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/detect-newline": { "node_modules/detect-newline": {
"version": "3.1.0", "version": "3.1.0",
"dev": true, "dev": true,
@ -8611,15 +8451,6 @@
"ini": "^1.3.2" "ini": "^1.3.2"
} }
}, },
"node_modules/standard-version/node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/semver-diff": { "node_modules/semver-diff": {
"version": "3.1.1", "version": "3.1.1",
"dev": true, "dev": true,
@ -10637,12 +10468,6 @@
"version": "2.1.0", "version": "2.1.0",
"dev": true "dev": true
}, },
"array-uniq": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
"integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==",
"dev": true
},
"array.prototype.flat": { "array.prototype.flat": {
"version": "1.2.5", "version": "1.2.5",
"dev": true, "dev": true,
@ -12789,15 +12614,6 @@
"globby": "^6.1.0" "globby": "^6.1.0"
}, },
"dependencies": { "dependencies": {
"array-union": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
"integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==",
"dev": true,
"requires": {
"array-uniq": "^1.0.1"
}
},
"commander": { "commander": {
"version": "2.20.3", "version": "2.20.3",
"dev": true "dev": true
@ -12825,12 +12641,6 @@
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"dev": true "dev": true
},
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"dev": true
} }
} }
}, },
@ -12927,12 +12737,6 @@
"semver": { "semver": {
"version": "6.3.0", "version": "6.3.0",
"dev": true "dev": true
},
"type-fest": {
"version": "0.18.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz",
"integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==",
"dev": true
} }
} }
}, },
@ -13300,12 +13104,6 @@
"version": "3.0.0", "version": "3.0.0",
"dev": true "dev": true
}, },
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
"dev": true
},
"restore-cursor": { "restore-cursor": {
"version": "2.0.0", "version": "2.0.0",
"dev": true, "dev": true,
@ -14266,12 +14064,6 @@
"color-convert": "^2.0.1" "color-convert": "^2.0.1"
} }
}, },
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true
},
"cliui": { "cliui": {
"version": "6.0.0", "version": "6.0.0",
"dev": true, "dev": true,
@ -14313,16 +14105,6 @@
"y18n": "^4.0.0", "y18n": "^4.0.0",
"yargs-parser": "^18.1.2" "yargs-parser": "^18.1.2"
} }
},
"yargs-parser": {
"version": "18.1.3",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"dev": true,
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
} }
} }
}, },
@ -15260,12 +15042,6 @@
"supports-color": "^5.3.0" "supports-color": "^5.3.0"
} }
}, },
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true
},
"find-up": { "find-up": {
"version": "5.0.0", "version": "5.0.0",
"dev": true, "dev": true,
@ -15273,48 +15049,6 @@
"locate-path": "^6.0.0", "locate-path": "^6.0.0",
"path-exists": "^4.0.0" "path-exists": "^4.0.0"
} }
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true
},
"locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
"requires": {
"p-locate": "^5.0.0"
}
},
"p-limit": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
"requires": {
"yocto-queue": "^0.1.0"
}
},
"p-locate": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
"requires": {
"p-limit": "^3.0.2"
}
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
} }
} }
}, },
@ -15794,15 +15528,6 @@
"shiki": "^0.10.1" "shiki": "^0.10.1"
}, },
"dependencies": { "dependencies": {
"brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
}
},
"glob": { "glob": {
"version": "8.0.3", "version": "8.0.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz",
@ -16079,12 +15804,6 @@
"yn": { "yn": {
"version": "3.1.1", "version": "3.1.1",
"dev": true "dev": true
},
"yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
"dev": true
} }
} }
} }

27
packages/nocodb/package-lock.json generated

@ -96,6 +96,7 @@
"slash": "^3.0.0", "slash": "^3.0.0",
"socket.io": "^4.4.1", "socket.io": "^4.4.1",
"sqlite3": "5.0.0", "sqlite3": "5.0.0",
"tinycolor2": "^1.4.2",
"twilio": "^3.55.1", "twilio": "^3.55.1",
"unique-names-generator": "^4.3.1", "unique-names-generator": "^4.3.1",
"uuid": "^8.2.0", "uuid": "^8.2.0",
@ -117,6 +118,7 @@
"@types/node": "^18.0.0", "@types/node": "^18.0.0",
"@types/nodemailer": "^6.4.0", "@types/nodemailer": "^6.4.0",
"@types/supertest": "^2.0.10", "@types/supertest": "^2.0.10",
"@types/tinycolor2": "^1.4.3",
"@typescript-eslint/eslint-plugin": "^4.0.1", "@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1", "@typescript-eslint/parser": "^4.0.1",
"@webserverless/fc-express": "^0.1.4", "@webserverless/fc-express": "^0.1.4",
@ -1987,6 +1989,12 @@
"@types/superagent": "*" "@types/superagent": "*"
} }
}, },
"node_modules/@types/tinycolor2": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.3.tgz",
"integrity": "sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==",
"dev": true
},
"node_modules/@types/trusted-types": { "node_modules/@types/trusted-types": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz",
@ -21295,6 +21303,14 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/tinycolor2": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",
"integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==",
"engines": {
"node": "*"
}
},
"node_modules/tmp": { "node_modules/tmp": {
"version": "0.0.33", "version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@ -26293,6 +26309,12 @@
"@types/superagent": "*" "@types/superagent": "*"
} }
}, },
"@types/tinycolor2": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.3.tgz",
"integrity": "sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==",
"dev": true
},
"@types/trusted-types": { "@types/trusted-types": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz",
@ -41473,6 +41495,11 @@
"integrity": "sha512-wMctrWD2HZZLuIlchlkE2dfXJh7J2KDI9Dwl+2abPYg0mswQHfOAyQW3jJg1pY5VfttSINZuKcXoB3FGypVklA==", "integrity": "sha512-wMctrWD2HZZLuIlchlkE2dfXJh7J2KDI9Dwl+2abPYg0mswQHfOAyQW3jJg1pY5VfttSINZuKcXoB3FGypVklA==",
"dev": true "dev": true
}, },
"tinycolor2": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",
"integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA=="
},
"tmp": { "tmp": {
"version": "0.0.33", "version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",

2
packages/nocodb/package.json

@ -181,6 +181,7 @@
"slash": "^3.0.0", "slash": "^3.0.0",
"socket.io": "^4.4.1", "socket.io": "^4.4.1",
"sqlite3": "5.0.0", "sqlite3": "5.0.0",
"tinycolor2": "^1.4.2",
"twilio": "^3.55.1", "twilio": "^3.55.1",
"unique-names-generator": "^4.3.1", "unique-names-generator": "^4.3.1",
"uuid": "^8.2.0", "uuid": "^8.2.0",
@ -202,6 +203,7 @@
"@types/node": "^18.0.0", "@types/node": "^18.0.0",
"@types/nodemailer": "^6.4.0", "@types/nodemailer": "^6.4.0",
"@types/supertest": "^2.0.10", "@types/supertest": "^2.0.10",
"@types/tinycolor2": "^1.4.3",
"@typescript-eslint/eslint-plugin": "^4.0.1", "@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1", "@typescript-eslint/parser": "^4.0.1",
"@webserverless/fc-express": "^0.1.4", "@webserverless/fc-express": "^0.1.4",

78
packages/nocodb/src/lib/meta/api/sync/helpers/job.ts

@ -11,22 +11,57 @@ import hash from 'object-hash';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc'; import utc from 'dayjs/plugin/utc';
import tinycolor from 'tinycolor2';
import { importData, importLTARData } from './readAndProcessData'; import { importData, importLTARData } from './readAndProcessData';
dayjs.extend(utc); dayjs.extend(utc);
const selectColors = { const selectColors = {
"blue": "#cfdfff", // normal
"cyan": "#d0f0fd", blue: '#cfdfff',
"teal": "#c2f5e9", cyan: '#d0f0fd',
"green": "#d1f7c4", teal: '#c2f5e9',
"orange": "#fee2d5", green: '#d1f7c4',
"yellow": "#ffeab6", orange: '#fee2d5',
"red": "#ffdce5", yellow: '#ffeab6',
"pink": "#ffdaf6", red: '#ffdce5',
"purple": "#ede2fe", pink: '#ffdaf6',
"gray": "#eee" purple: '#ede2fe',
} gray: '#eee',
// medium
blueMedium: '#9cc7ff',
cyanMedium: '#77d1f3',
tealMedium: '#72ddc3',
greenMedium: '#93e088',
orangeMedium: '#ffa981',
yellowMedium: '#ffd66e',
redMedium: '#ff9eb7',
pinkMedium: '#f99de2',
purpleMedium: '#cdb0ff',
grayMedium: '#ccc',
// dark
blueDark: '#2d7ff9',
cyanDark: '#18bfff',
tealDark: '#20d9d2',
greenDark: '#20c933',
orangeDark: '#ff6f2c',
yellowDark: '#fcb400',
redDark: '#f82b60',
pinkDark: '#ff08c2',
purpleDark: '#8b46ff',
grayDark: '#666',
// darker
blueDarker: '#2750ae',
cyanDarker: '#0b76b7',
tealDarker: '#06a09b',
greenDarker: '#338a17',
orangeDarker: '#d74d26',
yellowDarker: '#b87503',
redDarker: '#ba1e45',
pinkDarker: '#b2158b',
purpleDarker: '#6b1cb0',
grayDarker: '#444',
};
export default async ( export default async (
syncDB: AirtableSyncConfig, syncDB: AirtableSyncConfig,
@ -411,13 +446,15 @@ export default async (
// TODO fix record mapping (this causes every record to map first option, we can't handle them using data api as they don't provide option id within data we might instead get the correct mapping from schema file ) // TODO fix record mapping (this causes every record to map first option, we can't handle them using data api as they don't provide option id within data we might instead get the correct mapping from schema file )
let dupNo = 1; let dupNo = 1;
const defaultName = (value as any).name; const defaultName = (value as any).name;
while (options.find(el => el.title === (value as any).name)) { while (options.find((el) => el.title === (value as any).name)) {
(value as any).name = `${defaultName}_${dupNo++}`; (value as any).name = `${defaultName}_${dupNo++}`;
} }
options.push({ options.push({
order: order++, order: order++,
title: (value as any).name, title: (value as any).name,
color: selectColors[(value as any).color] ? selectColors[(value as any).color] : null color: selectColors[(value as any).color]
? selectColors[(value as any).color]
: tinycolor.random().toHexString(),
}); });
sMap.addToMappingTbl( sMap.addToMappingTbl(
@ -538,9 +575,11 @@ export default async (
case 'select': case 'select':
case 'multiSelect': case 'multiSelect':
ncCol.colOptions = { ncCol.colOptions = {
options: [...colOptions.data] options: [...colOptions.data],
} };
ncCol.dtxp = colOptions.data.map(el => `'${el.title}'`).join(','); // if options are empty, configure '' as default option
ncCol.dtxp =
colOptions.data.map((el) => `'${el.title}'`).join(',') || "''";
break; break;
case undefined: case undefined:
break; break;
@ -1362,12 +1401,14 @@ export default async (
break; break;
case UITypes.MultiSelect: case UITypes.MultiSelect:
rec[key] = value.map((v) => { rec[key] = value
.map((v) => {
if (v === '') { if (v === '') {
return 'nc_empty'; return 'nc_empty';
} }
return `${v.replace(/,/g, '.')}`; return `${v.replace(/,/g, '.')}`;
}).join(','); })
.join(',');
break; break;
case UITypes.Attachment: case UITypes.Attachment:
@ -2215,6 +2256,7 @@ export default async (
logDetailed, logDetailed,
records: recordsMap[ncTbl.id], records: recordsMap[ncTbl.id],
atNcAliasRef, atNcAliasRef,
ncLinkMappingTable,
}); });
} }

5
packages/nocodb/src/lib/meta/api/sync/helpers/readAndProcessData.ts

@ -136,6 +136,7 @@ export async function importLTARData({
logBasic = (_str) => {}, logBasic = (_str) => {},
records, records,
atNcAliasRef, atNcAliasRef,
ncLinkMappingTable,
}: { }: {
projectName: string; projectName: string;
table: { title?: string; id?: string }; table: { title?: string; id?: string };
@ -151,6 +152,7 @@ export async function importLTARData({
[ncTitle: string]: string; [ncTitle: string]: string;
}; };
}; };
ncLinkMappingTable: Record<string, Record<string, any>>[];
}) { }) {
const assocTableMetas: Array<{ const assocTableMetas: Array<{
modelMeta: { id?: string; title?: string }; modelMeta: { id?: string; title?: string };
@ -182,6 +184,9 @@ export async function importLTARData({
// skip if already inserted // skip if already inserted
if (colMeta.colOptions.fk_mm_model_id in insertedAssocRef) continue; if (colMeta.colOptions.fk_mm_model_id in insertedAssocRef) continue;
// self links: skip if the column under consideration is the add-on column NocoDB creates
if (ncLinkMappingTable.every((a) => a.nc.title !== colMeta.title)) continue;
// mark as inserted // mark as inserted
insertedAssocRef[colMeta.colOptions.fk_mm_model_id] = true; insertedAssocRef[colMeta.colOptions.fk_mm_model_id] = true;

5
scripts/cypress/integration/common/6d_language_validation.js

@ -61,6 +61,7 @@ export const genTest = (apiType, dbType) => {
}; };
let langMenu = [ let langMenu = [
"help-translate",
"ar.json", "ar.json",
"bn_IN.json", "bn_IN.json",
"da.json", "da.json",
@ -95,11 +96,11 @@ export const genTest = (apiType, dbType) => {
]; ];
// Index is the order in which menu options appear // Index is the order in which menu options appear
for (let i = 0; i < langMenu.length; i++) for (let i = 1; i < langMenu.length; i++)
langVerification(i, langMenu[i]); langVerification(i, langMenu[i]);
// reset to English // reset to English
langVerification(4, langMenu[4]); langVerification(5, langMenu[5]);
}); });
}; };

Loading…
Cancel
Save