mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-01 22:18:07 +00:00
chore: bump to node 22 wip (#10065)
* chore: bump to node 22 * chore: add non-enumerable config to clones Signed-off-by: mertmit <mertmit99@gmail.com> --------- Signed-off-by: mertmit <mertmit99@gmail.com> Co-authored-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
4
.github/workflows/ci-cd.yml
vendored
4
.github/workflows/ci-cd.yml
vendored
@@ -67,7 +67,7 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -102,7 +102,7 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
|
||||
2
.github/workflows/jest-unit-test.yml
vendored
2
.github/workflows/jest-unit-test.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
|
||||
2
.github/workflows/publish-blog.yml
vendored
2
.github/workflows/publish-blog.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Build blogs
|
||||
run: |
|
||||
cd packages/noco-blog
|
||||
|
||||
2
.github/workflows/publish-dev-docs.yml
vendored
2
.github/workflows/publish-dev-docs.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Build docs
|
||||
run: |
|
||||
cd packages/noco-docs
|
||||
|
||||
2
.github/workflows/publish-docs.yml
vendored
2
.github/workflows/publish-docs.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Build docs
|
||||
run: |
|
||||
cd packages/noco-docs
|
||||
|
||||
2
.github/workflows/publish-noco-i18n.yml
vendored
2
.github/workflows/publish-noco-i18n.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Build noco-i18n
|
||||
run: |
|
||||
cd packages/noco-i18n
|
||||
|
||||
2
.github/workflows/publish-prev-docs.yml
vendored
2
.github/workflows/publish-prev-docs.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Build prev docs
|
||||
run: |
|
||||
cd packages/noco-docs-prev
|
||||
|
||||
2
.github/workflows/release-docker.yml
vendored
2
.github/workflows/release-docker.yml
vendored
@@ -84,7 +84,7 @@ jobs:
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
|
||||
- name: upgrade packages for nightly build or pr build
|
||||
if: ${{ github.event.inputs.targetEnv == 'DEV' || inputs.targetEnv == 'DEV' }}
|
||||
|
||||
2
.github/workflows/release-draft.yml
vendored
2
.github/workflows/release-draft.yml
vendored
@@ -70,5 +70,5 @@ jobs:
|
||||
})
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- run: "npx github-release-notes@0.17.2 release --token ${{ secrets.GITHUB_TOKEN }} --draft --tags ${{ github.event.inputs.tag || inputs.tag }}..${{ github.event.inputs.prev_tag || inputs.prev_tag }}"
|
||||
|
||||
14
.github/workflows/release-executables.yml
vendored
14
.github/workflows/release-executables.yml
vendored
@@ -63,7 +63,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
|
||||
- name : Install nocodb, other dependencies and build executables
|
||||
run: |
|
||||
@@ -99,39 +99,39 @@ jobs:
|
||||
# build darwin x64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=x64 --os=darwin sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-x64 -o Noco-macos-x64
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-macos-x64 -o Noco-macos-x64
|
||||
mv ./Noco-macos-x64 ./mac-dist/
|
||||
|
||||
# build darwin arm64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=arm64 --os=darwin sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-arm64 -o Noco-macos-arm64
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-macos-arm64 -o Noco-macos-arm64
|
||||
mv ./Noco-macos-arm64 ./mac-dist/
|
||||
|
||||
|
||||
# build linux x64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=x64 --os=linux sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-x64 -o Noco-linux-x64
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-linux-x64 -o Noco-linux-x64
|
||||
mv ./Noco-linux-x64 ./dist/
|
||||
|
||||
# build linux arm64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=arm64 --os=linux sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-arm64 -o Noco-linux-arm64
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-linux-arm64 -o Noco-linux-arm64
|
||||
mv ./Noco-linux-arm64 ./dist/
|
||||
|
||||
|
||||
# build windows x64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=x64 --os=win32 sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-win-x64 -o Noco-win-x64.exe
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-win-x64 -o Noco-win-x64.exe
|
||||
mv ./Noco-win-x64.exe ./dist/
|
||||
|
||||
# build windows arm64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=arm64 --os=win32 sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-win-arm64 -o Noco-win-arm64.exe
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-win-arm64 -o Noco-win-arm64.exe
|
||||
mv ./Noco-win-arm64.exe ./dist/
|
||||
|
||||
- name: Upload executables to asset
|
||||
|
||||
2
.github/workflows/release-npm.yml
vendored
2
.github/workflows/release-npm.yml
vendored
@@ -50,7 +50,7 @@ jobs:
|
||||
# Setup .npmrc file to publish to npm
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- run: |
|
||||
export NODE_OPTIONS="--max_old_space_size=16384"
|
||||
|
||||
6
.github/workflows/release-secret-cli.yml
vendored
6
.github/workflows/release-secret-cli.yml
vendored
@@ -20,11 +20,11 @@ jobs:
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
- name: Setup Node 18.19.1
|
||||
- name: Setup Node 22.12.0
|
||||
# Setup .npmrc file to publish to npm
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Cache pkg modules
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 22.12.0
|
||||
|
||||
- name: Install nocodb, other dependencies and build executables
|
||||
run: |
|
||||
|
||||
2
.github/workflows/release-timely-docker.yml
vendored
2
.github/workflows/release-timely-docker.yml
vendored
@@ -84,7 +84,7 @@ jobs:
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
|
||||
- name: install dependencies
|
||||
run: pnpm bootstrap
|
||||
|
||||
14
.github/workflows/release-timely-executables.yml
vendored
14
.github/workflows/release-timely-executables.yml
vendored
@@ -64,7 +64,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
|
||||
- name: Update nocodb-timely
|
||||
env:
|
||||
@@ -106,39 +106,39 @@ jobs:
|
||||
# build darwin x64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=x64 --os=darwin sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-x64 -o Noco-macos-x64
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-macos-x64 -o Noco-macos-x64
|
||||
mv ./Noco-macos-x64 ./mac-dist/
|
||||
|
||||
# build darwin arm64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=arm64 --os=darwin sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-arm64 -o Noco-macos-arm64
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-macos-arm64 -o Noco-macos-arm64
|
||||
mv ./Noco-macos-arm64 ./mac-dist/
|
||||
|
||||
|
||||
# build linux x64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=x64 --os=linux sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-x64 -o Noco-linux-x64
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-linux-x64 -o Noco-linux-x64
|
||||
mv ./Noco-linux-x64 ./dist/
|
||||
|
||||
# build linux arm64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=arm64 --os=linux sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-arm64 -o Noco-linux-arm64
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-linux-arm64 -o Noco-linux-arm64
|
||||
mv ./Noco-linux-arm64 ./dist/
|
||||
|
||||
|
||||
# build windows x64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=x64 --os=win32 sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-win-x64 -o Noco-win-x64.exe
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-win-x64 -o Noco-win-x64.exe
|
||||
mv ./Noco-win-x64.exe ./dist/
|
||||
|
||||
# build windows arm64 executable
|
||||
npm uninstall sharp
|
||||
npm install --cpu=arm64 --os=win32 sharp
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node18-win-arm64 -o Noco-win-arm64.exe
|
||||
npx --yes pkg@5.8.1 . --compress GZip -t node22-win-arm64 -o Noco-win-arm64.exe
|
||||
mv ./Noco-win-arm64.exe ./dist/
|
||||
|
||||
- name: Upload executables(except mac executables) to release
|
||||
|
||||
2
.github/workflows/sync-to-develop.yml
vendored
2
.github/workflows/sync-to-develop.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
|
||||
2
.github/workflows/unit-test.yml
vendored
2
.github/workflows/unit-test.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: 18.19.0
|
||||
node-version: 22.12.0
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
|
||||
2
.github/workflows/update-sdk-path.yml
vendored
2
.github/workflows/update-sdk-path.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
|
||||
2
.github/workflows/validate-docs-links.yml
vendored
2
.github/workflows/validate-docs-links.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.19.1
|
||||
node-version: 22.12.0
|
||||
- name: Build docs
|
||||
run: |
|
||||
cd packages/noco-docs
|
||||
|
||||
2
.npmrc
2
.npmrc
@@ -1,3 +1,3 @@
|
||||
engine-strict=true
|
||||
shamefully-hoist=true
|
||||
use-node-version=18.19.1
|
||||
use-node-version=22.12.0
|
||||
|
||||
@@ -57,7 +57,9 @@
|
||||
"ip@<1.1.9": ">=1.1.9",
|
||||
"ip@=2.0.0": ">=2.0.1",
|
||||
"xml2js@<0.5.0": ">=0.5.0",
|
||||
"ufo": ">=1.5.3"
|
||||
"ufo": ">=1.5.3",
|
||||
"ws@<8.17.1": ">=8.17.1",
|
||||
"@azure/msal-node": "^2.16.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ RUN cp $GOPATH/bin/litestream /usr/src/lt
|
||||
###########
|
||||
# Builder
|
||||
###########
|
||||
FROM node:18-alpine as builder
|
||||
FROM node:22-alpine as builder
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# install node-gyp dependencies
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
###########
|
||||
# Builder
|
||||
###########
|
||||
FROM node:18-alpine as builder
|
||||
FROM node:22-alpine as builder
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# install node-gyp dependencies
|
||||
|
||||
@@ -20,7 +20,7 @@ RUN git clone https://github.com/benbjohnson/litestream.git litestream \
|
||||
###########
|
||||
# Builder
|
||||
###########
|
||||
FROM --platform=$BUILDPLATFORM node:18-alpine as builder
|
||||
FROM --platform=$BUILDPLATFORM node:22-alpine as builder
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install node-gyp dependencies
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
"jsonfile": "^6.1.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"kafkajs": "^2.2.4",
|
||||
"knex": "2.4.2",
|
||||
"knex": "^3.1.0",
|
||||
"list-github-dir-content": "^3.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"mailersend": "^1.5.0",
|
||||
@@ -147,6 +147,7 @@
|
||||
"reflect-metadata": "^0.2.1",
|
||||
"request-filtering-agent": "^1.1.2",
|
||||
"request-ip": "^3.3.0",
|
||||
"rfdc": "^1.3.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"sharp": "^0.33.4",
|
||||
"slash": "^3.0.0",
|
||||
@@ -174,7 +175,7 @@
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/mocha": "^10.0.6",
|
||||
"@types/multer": "^1.4.11",
|
||||
"@types/node": "20.11.30",
|
||||
"@types/node": "^22.10.2",
|
||||
"@types/passport-google-oauth20": "^2.0.16",
|
||||
"@types/passport-jwt": "^3.0.13",
|
||||
"@types/supertest": "^2.0.16",
|
||||
|
||||
@@ -4,6 +4,7 @@ import KnexClient from '../KnexClient';
|
||||
import Debug from '../../../util/Debug';
|
||||
import Result from '../../../util/Result';
|
||||
import type { ColumnType } from 'nocodb-sdk';
|
||||
import deepClone from '~/helpers/deepClone';
|
||||
|
||||
const log = new Debug('MssqlClient');
|
||||
|
||||
@@ -276,9 +277,9 @@ class MssqlClient extends KnexClient {
|
||||
log.api(`${_func}:args:`, args);
|
||||
|
||||
try {
|
||||
const connectionParamsWithoutDb = JSON.parse(
|
||||
JSON.stringify(this.connectionConfig),
|
||||
);
|
||||
const connectionParamsWithoutDb = deepClone(this.connectionConfig);
|
||||
connectionParamsWithoutDb.connection.password =
|
||||
this.connectionConfig.connection.password;
|
||||
delete connectionParamsWithoutDb.connection.database;
|
||||
const tempSqlClient = knex(connectionParamsWithoutDb);
|
||||
|
||||
@@ -322,9 +323,9 @@ class MssqlClient extends KnexClient {
|
||||
log.api(`${_func}:args:`, args);
|
||||
|
||||
try {
|
||||
const connectionParamsWithoutDb = JSON.parse(
|
||||
JSON.stringify(this.connectionConfig),
|
||||
);
|
||||
const connectionParamsWithoutDb = deepClone(this.connectionConfig);
|
||||
connectionParamsWithoutDb.connection.password =
|
||||
this.connectionConfig.connection.password;
|
||||
delete connectionParamsWithoutDb.connection.database;
|
||||
const tempSqlClient = knex(connectionParamsWithoutDb);
|
||||
await this.sqlClient.destroy();
|
||||
@@ -1314,9 +1315,9 @@ class MssqlClient extends KnexClient {
|
||||
log.api(`${_func}:args:`, args);
|
||||
|
||||
try {
|
||||
const connectionParamsWithoutDb = JSON.parse(
|
||||
JSON.stringify(this.connectionConfig),
|
||||
);
|
||||
const connectionParamsWithoutDb = deepClone(this.connectionConfig);
|
||||
connectionParamsWithoutDb.connection.password =
|
||||
this.connectionConfig.connection.password;
|
||||
|
||||
if (
|
||||
connectionParamsWithoutDb.connection.database === args.database_name
|
||||
|
||||
@@ -15,6 +15,7 @@ import KnexClient from '../KnexClient';
|
||||
import queries from './mysql.queries';
|
||||
import fakerFunctionList from './fakerFunctionList';
|
||||
import * as findDataType from './findDataTypeMapping';
|
||||
import deepClone from '~/helpers/deepClone';
|
||||
|
||||
const log = new Debug('MysqlClient');
|
||||
const evt = new Emit();
|
||||
@@ -300,9 +301,9 @@ class MysqlClient extends KnexClient {
|
||||
|
||||
try {
|
||||
// create a new knex client without database param
|
||||
const connectionParamsWithoutDb = JSON.parse(
|
||||
JSON.stringify(this.connectionConfig),
|
||||
);
|
||||
const connectionParamsWithoutDb = deepClone(this.connectionConfig);
|
||||
connectionParamsWithoutDb.connection.password =
|
||||
this.connectionConfig.connection.password;
|
||||
|
||||
delete connectionParamsWithoutDb.connection.database;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import find from 'lodash/find';
|
||||
import KnexClient from '../KnexClient';
|
||||
import Debug from '../../../util/Debug';
|
||||
import Result from '../../../util/Result';
|
||||
import deepClone from '~/helpers/deepClone';
|
||||
|
||||
const log = new Debug('OracleClient');
|
||||
|
||||
@@ -154,9 +155,9 @@ class OracleClient extends KnexClient {
|
||||
log.api(`${_func}:args:`, args);
|
||||
|
||||
try {
|
||||
const connectionParamsWithoutDb = JSON.parse(
|
||||
JSON.stringify(this.connectionConfig),
|
||||
);
|
||||
const connectionParamsWithoutDb = deepClone(this.connectionConfig);
|
||||
connectionParamsWithoutDb.connection.password =
|
||||
this.connectionConfig.connection.password;
|
||||
connectionParamsWithoutDb.connection.database = 'xe';
|
||||
connectionParamsWithoutDb.connection.user = 'system';
|
||||
connectionParamsWithoutDb.connection.password = 'oracle';
|
||||
@@ -202,9 +203,9 @@ class OracleClient extends KnexClient {
|
||||
log.api(`${_func}:args:`, args);
|
||||
|
||||
try {
|
||||
const connectionParamsWithoutDb = JSON.parse(
|
||||
JSON.stringify(this.connectionConfig),
|
||||
);
|
||||
const connectionParamsWithoutDb = deepClone(this.connectionConfig);
|
||||
connectionParamsWithoutDb.connection.password =
|
||||
this.connectionConfig.connection.password;
|
||||
connectionParamsWithoutDb.connection.database = 'xe';
|
||||
connectionParamsWithoutDb.connection.user = 'system';
|
||||
connectionParamsWithoutDb.connection.password = 'oracle';
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
generateCastQuery,
|
||||
} from '~/db/sql-client/lib/pg/typeCast';
|
||||
import pgQueries from '~/db/sql-client/lib/pg/pg.queries';
|
||||
import deepClone from '~/helpers/deepClone';
|
||||
|
||||
const log = new Debug('PGClient');
|
||||
|
||||
@@ -254,9 +255,9 @@ class PGClient extends KnexClient {
|
||||
try {
|
||||
await this.raw('SELECT 1+1 as data');
|
||||
} catch (e1) {
|
||||
const connectionParamsWithoutDb = JSON.parse(
|
||||
JSON.stringify(this.connectionConfig),
|
||||
);
|
||||
const connectionParamsWithoutDb = deepClone(this.connectionConfig);
|
||||
connectionParamsWithoutDb.connection.password =
|
||||
this.connectionConfig.connection.password;
|
||||
connectionParamsWithoutDb.connection.database = 'postgres';
|
||||
const tempSqlClient = knex({
|
||||
...connectionParamsWithoutDb,
|
||||
@@ -459,9 +460,9 @@ class PGClient extends KnexClient {
|
||||
let tempSqlClient;
|
||||
|
||||
try {
|
||||
const connectionParamsWithoutDb = JSON.parse(
|
||||
JSON.stringify(this.connectionConfig),
|
||||
);
|
||||
const connectionParamsWithoutDb = deepClone(this.connectionConfig);
|
||||
connectionParamsWithoutDb.connection.password =
|
||||
this.connectionConfig.connection.password;
|
||||
let rows = [];
|
||||
try {
|
||||
connectionParamsWithoutDb.connection.database = 'postgres';
|
||||
@@ -534,9 +535,9 @@ class PGClient extends KnexClient {
|
||||
log.api(`${_func}:args:`, args);
|
||||
|
||||
try {
|
||||
const connectionParamsWithoutDb = JSON.parse(
|
||||
JSON.stringify(this.connectionConfig),
|
||||
);
|
||||
const connectionParamsWithoutDb = deepClone(this.connectionConfig);
|
||||
connectionParamsWithoutDb.connection.password =
|
||||
this.connectionConfig.connection.password;
|
||||
connectionParamsWithoutDb.connection.database = 'postgres';
|
||||
const tempSqlClient = knex({
|
||||
...connectionParamsWithoutDb,
|
||||
|
||||
5
packages/nocodb/src/helpers/deepClone.ts
Normal file
5
packages/nocodb/src/helpers/deepClone.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import rfdc from 'rfdc';
|
||||
|
||||
const deepClone = rfdc();
|
||||
|
||||
export default deepClone;
|
||||
@@ -3,6 +3,7 @@ import process from 'process';
|
||||
import { knex } from 'knex';
|
||||
import SqlMgrv2 from '../../src/db/sql-mgr/v2/SqlMgrv2';
|
||||
import { jdbcToXcUrl, xcUrlToDbConfig } from '../../src/utils/nc-config';
|
||||
import deepClone from '../../src/helpers/deepClone';
|
||||
import type { Knex } from 'knex';
|
||||
import type { DbConfig } from '../../src/interface/config';
|
||||
|
||||
@@ -222,7 +223,8 @@ export default class TestDbMngr {
|
||||
}
|
||||
|
||||
static getDbConfigWithNoDb() {
|
||||
const dbConfig = JSON.parse(JSON.stringify(TestDbMngr.dbConfig));
|
||||
const dbConfig = deepClone(TestDbMngr.dbConfig);
|
||||
dbConfig.connection.password = TestDbMngr.dbConfig.connection.password;
|
||||
delete dbConfig.connection.database;
|
||||
return dbConfig;
|
||||
}
|
||||
@@ -240,6 +242,8 @@ export default class TestDbMngr {
|
||||
static getSakilaDbConfig() {
|
||||
const sakilaDbConfig = JSON.parse(JSON.stringify(TestDbMngr.dbConfig));
|
||||
sakilaDbConfig.connection.database = TestDbMngr.sakilaDbName;
|
||||
sakilaDbConfig.connection.password =
|
||||
TestDbMngr.dbConfig.connection.password;
|
||||
sakilaDbConfig.connection.multipleStatements = true;
|
||||
if (TestDbMngr.isSqlite()) {
|
||||
sakilaDbConfig.connection.filename = `${__dirname}/test_sakila.db`;
|
||||
|
||||
412
pnpm-lock.yaml
generated
412
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -15,12 +15,12 @@
|
||||
"node_modules/**/*"
|
||||
],
|
||||
"targets": [
|
||||
"node18-linux-arm64",
|
||||
"node18-macos-arm64",
|
||||
"node18-win-arm64",
|
||||
"node18-linux-x64",
|
||||
"node18-macos-x64",
|
||||
"node18-win-x64"
|
||||
"node22-linux-arm64",
|
||||
"node22-macos-arm64",
|
||||
"node22-win-arm64",
|
||||
"node22-linux-x64",
|
||||
"node22-macos-x64",
|
||||
"node22-win-x64"
|
||||
]
|
||||
},
|
||||
"keywords": [],
|
||||
|
||||
@@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Node.js (and npm, which includes npx)
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# docker image created from /Users/rajanishgj/Documents/GitHub/nocohub/tests/docker/Dockerfile
|
||||
#
|
||||
|
||||
NC_REQ_NODE_V="18.17.1"
|
||||
NC_REQ_NODE_V="22.12.0"
|
||||
NC_REQ_PNPM_V="8.8.0"
|
||||
|
||||
NODE_PATH="/home/docker/actions-runner/_work/_tool/node/${NC_REQ_NODE_V}/x64/bin/node"
|
||||
|
||||
Reference in New Issue
Block a user