mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 02:45:28 +00:00
chore(gui-v2): nc-lib-gui-2 -> nc-lib-gui-v2
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"test": "vitest -c test/vite.config.ts",
|
||||
"test:ui": "vitest -c test/vite.config.ts --ui",
|
||||
"coverage": "vitest -c test/vite.config.ts run --coverage",
|
||||
"build:copy:publish": "npm run generate; rm -rf ../nc-lib-gui-2/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui-2/lib/dist/ ; npm publish ../nc-lib-gui-2"
|
||||
"build:copy:publish": "npm run generate; rm -rf ../nc-lib-gui-v2/lib/dist/; rsync -rvzh ./dist/ ../nc-lib-gui-v2/lib/dist/ ; npm publish ../nc-lib-gui-v2"
|
||||
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nc-lib-gui-2",
|
||||
"version": "0.0.4",
|
||||
"name": "nc-lib-gui-v2",
|
||||
"version": "0.0.0",
|
||||
"description": "NocoDB GUI",
|
||||
"author": {
|
||||
"name": "NocoDB",
|
||||
|
||||
@@ -33,7 +33,7 @@ COPY ./docker/start-litestream.sh /usr/src/appEntry/start.sh
|
||||
# reduce node_module size with modclean & removing sqlite deps,
|
||||
# package built code into app.tar.gz & add execute permission to start.sh
|
||||
RUN npm ci --production --quiet \
|
||||
&& npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,nc-lib-gui-2/**,dayjs/**,express-status-monitor/**" --run \
|
||||
&& npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,nc-lib-gui-v2/**,dayjs/**,express-status-monitor/**" --run \
|
||||
&& rm -rf ./node_modules/sqlite3/deps \
|
||||
&& tar -czf ../appEntry/app.tar.gz ./* \
|
||||
&& chmod +x /usr/src/appEntry/start.sh
|
||||
|
||||
@@ -11,7 +11,7 @@ import * as express from 'express';
|
||||
import { Router } from 'express';
|
||||
import importFresh from 'import-fresh';
|
||||
import morgan from 'morgan';
|
||||
import NcToolGui from 'nc-lib-gui-2';
|
||||
import NcToolGui from 'nc-lib-gui-v2';
|
||||
import requestIp from 'request-ip';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'packages', 'nc-lib-gui-2', 'package.json'), 'utf8'))
|
||||
const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'packages', 'nc-lib-gui-v2', 'package.json'), 'utf8'))
|
||||
|
||||
if (process.env.targetEnv === 'DEV') {
|
||||
// nightly build
|
||||
@@ -13,4 +13,4 @@ if (process.env.targetEnv === 'DEV') {
|
||||
} else {
|
||||
packageJson.version = process.env.targetVersion
|
||||
}
|
||||
fs.writeFileSync(path.join(__dirname, '..', 'packages', 'nc-lib-gui-2', 'package.json'), JSON.stringify(packageJson, 0, 2))
|
||||
fs.writeFileSync(path.join(__dirname, '..', 'packages', 'nc-lib-gui-v2', 'package.json'), JSON.stringify(packageJson, 0, 2))
|
||||
@@ -4,14 +4,14 @@ const path = require('path')
|
||||
const execSync = require('child_process').execSync;
|
||||
|
||||
// extract latest version from package.json
|
||||
const ncLibPackage = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'packages', 'nc-lib-gui-2', 'package.json')))
|
||||
const ncLibPackage = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'packages', 'nc-lib-gui-v2', 'package.json')))
|
||||
|
||||
|
||||
const replacePackageName = (filePath) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
return fs.readFile(filePath, 'utf8', function (err, data) {
|
||||
if (err) return reject(err)
|
||||
var result = data.replace(/nc-lib-gui-2/g, ncLibPackage.name);
|
||||
var result = data.replace(/nc-lib-gui-v2/g, ncLibPackage.name);
|
||||
return fs.writeFile(filePath, result, 'utf8', function (err) {
|
||||
if (err) return reject(err)
|
||||
return resolve()
|
||||
@@ -21,7 +21,7 @@ const replacePackageName = (filePath) => {
|
||||
}
|
||||
|
||||
const bumbVersionAndSave = () => {
|
||||
// upgrade nc-lib-gui-2 version in nocodb
|
||||
// upgrade nc-lib-gui-v2 version in nocodb
|
||||
execSync(`cd packages/nocodb && npm install --save --save-exact ${ncLibPackage.name}@${ncLibPackage.version}`, {});
|
||||
const nocodbPackageFilePath = path.join(__dirname, '..', 'packages', 'nocodb', 'package.json')
|
||||
const nocoLibPackage = JSON.parse(fs.readFileSync(nocodbPackageFilePath))
|
||||
@@ -33,7 +33,7 @@ const bumbVersionAndSave = () => {
|
||||
}
|
||||
|
||||
if (process.env.targetEnv === 'DEV') {
|
||||
// replace nc-lib-gui-2 by nc-lib-gui-2-daily if it is nightly build / pr release
|
||||
// replace nc-lib-gui-v2 by nc-lib-gui-v2-daily if it is nightly build / pr release
|
||||
const filePaths = [
|
||||
path.join(__dirname, '..', 'packages', 'nocodb', 'Dockerfile'),
|
||||
path.join(__dirname, '..', 'packages', 'nocodb', 'litestream', 'Dockerfile'),
|
||||
|
||||
Reference in New Issue
Block a user