Browse Source

chore: use local nc-plugin (#9210)

* chore: use local nc-plugin

Signed-off-by: mertmit <mertmit99@gmail.com>

* fix: glob usage

Signed-off-by: mertmit <mertmit99@gmail.com>

* fix: actions to use local nc-plugin

Signed-off-by: mertmit <mertmit99@gmail.com>

---------

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/9226/head
Mert E. 3 months ago committed by GitHub
parent
commit
fe466ce61a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/release-docker.yml
  2. 2
      .github/workflows/release-npm.yml
  3. 2
      .github/workflows/sync-to-develop.yml
  4. 2
      package.json
  5. 5
      packages/nc-plugin/package.json
  6. 2
      packages/nocodb-sdk/package.json
  7. 1
      packages/nocodb/Dockerfile
  8. 2
      packages/nocodb/Dockerfile.local
  9. 4
      packages/nocodb/docker/webpack.config.js
  10. 6
      packages/nocodb/package.json
  11. 8
      packages/nocodb/src/db/sql-migrator/lib/KnexMigratorv2.ts
  12. 4
      packages/nocodb/webpack.config.js
  13. 2
      packages/nocodb/webpack.local.config.js
  14. 2213
      pnpm-lock.yaml
  15. 3
      pnpm-workspace.yaml

2
.github/workflows/release-docker.yml

@ -92,7 +92,7 @@ jobs:
export NODE_OPTIONS="--max_old_space_size=16384"
NOCODB_SDK_PKG_NAME=nocodb-sdk-daily
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} targetVersion=${{ github.event.inputs.tag || inputs.tag }} node scripts/bumpNocodbSdkVersion.js &&
pnpm --filter=${NOCODB_SDK_PKG_NAME} install --ignore-scripts --no-frozen-lockfile --ignore-workspace && pnpm --filter=${NOCODB_SDK_PKG_NAME} run build &&
pnpm --filter=${NOCODB_SDK_PKG_NAME} install --ignore-scripts --no-frozen-lockfile --ignore-workspace && pnpm --filter=${NOCODB_SDK_PKG_NAME} run build && pnpm --filter=nc-plugin install && pnpm --filter=nc-plugin build &&
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} node scripts/upgradeNocodbSdk.js &&
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} targetVersion=${{ github.event.inputs.tag || inputs.tag }} node scripts/bumpNcGuiVersion.js &&
pnpm --filter=nc-gui install --ignore-scripts --no-frozen-lockfile &&

2
.github/workflows/release-npm.yml

@ -61,7 +61,7 @@ jobs:
fi
echo $NOCODB_SDK_PKG_NAME
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} targetVersion=${{ github.event.inputs.tag || inputs.tag }} node scripts/bumpNocodbSdkVersion.js &&
pnpm --filter=${NOCODB_SDK_PKG_NAME} install --ignore-scripts --no-frozen-lockfile --ignore-workspace && pnpm --filter=${NOCODB_SDK_PKG_NAME} run build && pnpm --filter=${NOCODB_SDK_PKG_NAME} publish --no-git-checks &&
pnpm --filter=${NOCODB_SDK_PKG_NAME} install --ignore-scripts --no-frozen-lockfile --ignore-workspace && pnpm --filter=${NOCODB_SDK_PKG_NAME} run build && pnpm --filter=nc-plugin install && pnpm --filter=nc-plugin build && pnpm --filter=${NOCODB_SDK_PKG_NAME} publish --no-git-checks &&
sleep 90 &&
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} node scripts/upgradeNocodbSdk.js &&
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} targetVersion=${{ github.event.inputs.tag || inputs.tag }} node scripts/bumpNcGuiVersion.js &&

2
.github/workflows/sync-to-develop.yml

@ -45,7 +45,7 @@ jobs:
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
revertSDK=true node scripts/upgradeNocodbSdk.js
pnpm --filter=nocodb-sdk install --no-frozen-lockfile && pnpm --filter=nocodb-sdk run build && pnpm --filter=nocodb --filter=nc-gui --filter=playwright install --no-frozen-lockfile
pnpm --filter=nocodb-sdk install --no-frozen-lockfile && pnpm --filter=nocodb-sdk run build && pnpm --filter=nc-plugin install && pnpm --filter=nc-plugin build && pnpm --filter=nocodb --filter=nc-gui --filter=playwright install --no-frozen-lockfile
git add .
git diff-index --quiet HEAD || git commit -m "chore: update sdk path"
git push origin $BRANCH_NAME

2
package.json

@ -32,7 +32,7 @@
]
},
"scripts": {
"bootstrap": "pnpm --filter=nocodb-sdk install && pnpm --filter=nocodb-sdk run build && pnpm --filter=nocodb --filter=nc-mail-templates --filter=nc-gui --filter=playwright install",
"bootstrap": "pnpm --filter=nocodb-sdk install && pnpm --filter=nocodb-sdk run build && pnpm --filter=nc-plugin install && pnpm --filter=nc-plugin build && pnpm --filter=nocodb --filter=nc-mail-templates --filter=nc-gui --filter=playwright install",
"start:frontend": "pnpm --filter=nc-gui run dev",
"start:backend": "pnpm --filter=nocodb run start",
"lint:staged:playwright": "cd ./tests/playwright; pnpm dlx lint-staged; cd -",

5
packages/nc-plugin/package.json

@ -101,11 +101,6 @@
"!build/module/**"
]
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"prettier": {
"singleQuote": true
},

2
packages/nocodb-sdk/package.json

@ -73,4 +73,4 @@
"prettier": {
"singleQuote": true
}
}
}

1
packages/nocodb/Dockerfile

@ -39,6 +39,7 @@ RUN echo "node-linker=hoisted" > .npmrc
# install production dependencies,
# reduce node_module size with modclean & removing sqlite deps,
# and add execute permission to start.sh
RUN pnpm uninstall nc-plugin
RUN pnpm install --prod --shamefully-hoist \
&& pnpm dlx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,@azure/msal-node/dist/**" --run \
&& rm -rf ./node_modules/sqlite3/deps \

2
packages/nocodb/Dockerfile.local

@ -26,7 +26,7 @@ RUN echo "node-linker=hoisted" > .npmrc
# install production dependencies,
# reduce node_module size with modclean & removing sqlite deps,
# and add execute permission to start.sh
RUN pnpm uninstall nocodb-sdk
RUN pnpm uninstall nocodb-sdk nc-plugin
RUN pnpm install --prod --shamefully-hoist --reporter=silent \
&& pnpm dlx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,@azure/msal-node/dist/**" --run \
&& rm -rf ./node_modules/sqlite3/deps \

4
packages/nocodb/docker/webpack.config.js

@ -42,7 +42,9 @@ module.exports = {
],
nodeEnv: false,
},
externals: [nodeExternals()],
externals: [nodeExternals({
allowlist: ['nc-plugin'],
})],
plugins: [new webpack.EnvironmentPlugin(['EE'])],
target: 'node',
node: {

6
packages/nocodb/package.json

@ -97,7 +97,7 @@
"express": "^4.18.3",
"fast-levenshtein": "^2.0.6",
"fs-extra": "^9.1.0",
"glob": "^7.2.3",
"glob": "^10.4.5",
"handlebars": "^4.7.8",
"html-to-json-parser": "^2.0.1",
"import-fresh": "^3.3.0",
@ -124,7 +124,7 @@
"nanoid": "^3.3.7",
"nc-help": "0.3.4",
"nc-lib-gui": "0.252.0",
"nc-plugin": "^0.1.6",
"nc-plugin": "link:../nc-plugin",
"nestjs-throttler-storage-redis": "^0.4.4",
"nocodb-sdk": "workspace:^",
"nodemailer": "^6.9.13",
@ -214,4 +214,4 @@
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
}

8
packages/nocodb/src/db/sql-migrator/lib/KnexMigratorv2.ts

@ -1,7 +1,7 @@
import fs from 'fs';
import path from 'path';
import { promisify } from 'util';
import glob from 'glob';
import { glob } from 'glob';
import Debug from '../../util/Debug';
import Emit from '../../util/emit';
import * as fileHelp from '../../util/file.help';
@ -593,8 +593,8 @@ export default class KnexMigratorv2 {
})
.orderBy('id', 'asc');
} else {
files = await promisify(glob)(args.upFilesPattern);
filesDown = await promisify(glob)(args.downFilesPattern);
files = await glob(args.upFilesPattern);
filesDown = await glob(args.downFilesPattern);
}
// get evolutions from sql
@ -862,7 +862,7 @@ export default class KnexMigratorv2 {
.orderBy('title', 'asc');
} else {
// get all evolutions from fs
files = await promisify(glob)(args.downFilesPattern);
files = await glob(args.downFilesPattern);
}
// get done evolutions from sql
// const connection = this._getSqlConnectionFromDbAlias(

4
packages/nocodb/webpack.config.js

@ -33,7 +33,9 @@ module.exports = {
],
nodeEnv: false,
},
externals: [nodeExternals()],
externals: [nodeExternals({
allowlist: ['nc-plugin'],
})],
resolve: {
extensions: ['.tsx', '.ts', '.js', '.json'],
alias: resolveTsAliases(path.resolve('tsconfig.json')),

2
packages/nocodb/webpack.local.config.js

@ -35,7 +35,7 @@ module.exports = {
},
externals: [
nodeExternals({
allowlist: ['nocodb-sdk'],
allowlist: ['nocodb-sdk', 'nc-plugin'],
}),
],
resolve: {

2213
pnpm-lock.yaml

File diff suppressed because it is too large Load Diff

3
pnpm-workspace.yaml

@ -3,4 +3,5 @@ packages:
- 'packages/nc-gui'
- 'packages/nc-mail-templates'
- 'packages/nocodb'
- 'tests/playwright'
- 'tests/playwright'
- 'packages/nc-plugin'
Loading…
Cancel
Save