diff --git a/.github/workflows/release-secret-cli.yml b/.github/workflows/release-secret-cli.yml index 87691dd99d..84938b967a 100644 --- a/.github/workflows/release-secret-cli.yml +++ b/.github/workflows/release-secret-cli.yml @@ -12,7 +12,7 @@ on: required: true jobs: build-and-publish: - runs-on: [self-hosted, aws] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup pnpm @@ -41,20 +41,22 @@ jobs: ${{ runner.os }}- - name: Npm package build and publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | pnpm bootstrap cd ./packages/nocodb pnpm run build:cli:module cd ../nc-secret-mgr targetVersion=${{ github.event.inputs.tag || inputs.tag }} node ../../scripts/updateCliVersion.js - pnpm run build && pnpm run publish + pnpm run build && pnpm run npm:publish # for building images for all platforms these libraries are required in Linux - name: Install QEMU and ldid run: | sudo apt update # Install qemu - sudo apt install qemu binfmt-support qemu-user-static + sudo apt install qemu binfmt-support qemu-user-static -y # install ldid git clone https://github.com/daeken/ldid.git cd ./ldid @@ -134,7 +136,7 @@ jobs: publish-mac-executables: needs: [sign-mac-executables,build-and-publish] - runs-on: [self-hosted, aws] + runs-on: ubuntu-latest steps: - uses: actions/download-artifact@master with: diff --git a/packages/nc-secret-mgr/.eslintrc.js b/packages/nc-secret-mgr/.eslintrc.js new file mode 100644 index 0000000000..ca8a1f1230 --- /dev/null +++ b/packages/nc-secret-mgr/.eslintrc.js @@ -0,0 +1,82 @@ +module.exports = { + parser: '@typescript-eslint/parser', + parserOptions: { + project: 'tsconfig.json', + tsconfigRootDir: __dirname, + sourceType: 'module', + }, + plugins: ['import', 'eslint-comments', 'functional'], + extends: [ + 'eslint:recommended', + 'plugin:eslint-comments/recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:import/typescript', + 'plugin:prettier/recommended', + ], + root: true, + env: { + node: true, + jest: true, + es6: true, + }, + ignorePatterns: [ + 'node_modules', + 'build', + 'coverage', + 'dist', + 'nc', + '.eslintrc.js', + 'src/nocodb/cli.js', + ], + rules: { + '@typescript-eslint/explicit-module-boundary-types': 'off', + 'eslint-comments/disable-enable-pair': [ + 'error', + { + allowWholeFile: true, + }, + ], + 'eslint-comments/no-unused-disable': 'error', + 'sort-imports': [ + 'error', + { + ignoreDeclarationSort: true, + ignoreCase: true, + }, + ], + 'import/order': [ + 'error', + { + groups: [ + 'builtin', + 'external', + 'internal', + 'parent', + 'sibling', + 'index', + 'object', + 'type', + ], + }, + ], + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], + '@typescript-eslint/no-this-alias': 'off', + + // todo: enable + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-var-requires': 'off', + 'no-useless-catch': 'off', + 'no-empty': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/consistent-type-imports': 'warn', + }, +}; diff --git a/packages/nc-secret-mgr/package.json b/packages/nc-secret-mgr/package.json index 44bdd067fa..87dcbfa73f 100644 --- a/packages/nc-secret-mgr/package.json +++ b/packages/nc-secret-mgr/package.json @@ -9,7 +9,7 @@ "dev": "cross-env NC_DB=\"pg://localhost:5432?u=postgres&p=password&d=meta_2024_09_07\" nodemon --watch 'src/**/*.ts' --exec 'ts-node --project tsconfig.json' src/index.ts -- a b --nc-db abc", "test": "mocha --require ts-node/register src/**/*.spec.ts", "build:pkg": "npx pkg . --out-path dist --compress GZip", - "publish": "npm publish .", + "npm:publish": "npm publish .", "lint": "eslint src/**/*.ts --fix" }, "pkg": {