From 8035ded978062b3bb0d3f6727aba155bbf0e6b09 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sun, 6 Oct 2024 23:18:02 +0530 Subject: [PATCH] refactor: package name correction Signed-off-by: Pranav C --- .github/workflows/release-secret-cli.yml | 31 +++++++++---------- packages/nc-secret-mgr/package.json | 2 +- .../100.data-sources/050.updating-secret.md | 2 +- packages/nocodb/package.json | 3 +- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release-secret-cli.yml b/.github/workflows/release-secret-cli.yml index 3ac12f8284..eb0a52984e 100644 --- a/.github/workflows/release-secret-cli.yml +++ b/.github/workflows/release-secret-cli.yml @@ -1,4 +1,4 @@ -name: "Release : Secret CLI Executables" +name: "Release : Secret CLI NPM & Executables" on: # Triggered manually @@ -15,19 +15,16 @@ jobs: runs-on: [self-hosted, aws] steps: - uses: actions/checkout@v3 - - name: Cache node modules - id: cache-npm - uses: actions/cache@v3 - env: - cache-name: cache-node-modules + - name: Setup pnpm + uses: pnpm/action-setup@v4 with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- + version: 8 + - name: Setup Node 18.19.1 + # Setup .npmrc file to publish to npm + uses: actions/setup-node@v3 + with: + node-version: 18.19.1 + registry-url: 'https://registry.npmjs.org' - name: Cache pkg modules id: cache-pkg @@ -43,11 +40,11 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - - name: Build executables + - name: Npm package build and publish run: | pnpm bootstrap cd ./packages/nocodb - pnpm run build:cli + pnpm run build:cli:module cd ../nc-secret-mgr targetVersion=${{ github.event.inputs.tag || inputs.tag }} node ../../scripts/updateVersion.js pnpm run build && pnpm run publish @@ -115,7 +112,7 @@ jobs: retention-days: 1 sign-mac-executables: runs-on: macos-latest - needs: build-executables + needs: build-and-publish steps: - uses: actions/download-artifact@master @@ -136,7 +133,7 @@ jobs: publish-mac-executables: - needs: [sign-mac-executables,build-executables] + needs: [sign-mac-executables,build-and-publish] runs-on: [self-hosted, aws] steps: - uses: actions/download-artifact@master diff --git a/packages/nc-secret-mgr/package.json b/packages/nc-secret-mgr/package.json index 999cd4e49a..89473e5ff8 100644 --- a/packages/nc-secret-mgr/package.json +++ b/packages/nc-secret-mgr/package.json @@ -1,5 +1,5 @@ { - "name": "nc-secret", + "name": "nc-secret-mgr", "version": "0.0.1", "description": "", "main": "dist/cli.js", diff --git a/packages/noco-docs/docs/100.data-sources/050.updating-secret.md b/packages/noco-docs/docs/100.data-sources/050.updating-secret.md index 78e36fd017..3f348c841b 100644 --- a/packages/noco-docs/docs/100.data-sources/050.updating-secret.md +++ b/packages/noco-docs/docs/100.data-sources/050.updating-secret.md @@ -41,7 +41,7 @@ Alternatively, you can use the `nc-secret-mgr` executable to update secrets. 2. Run the executable using the following command: ```bash - NC_DB="pg://host:port?u=user&p=password&d=database" ./nc-secret-macos-arm64 update --prev --new + NC_DB="pg://host:port?u=user&p=password&d=database" ./nc-secret-mgr-macos-arm64 update --prev --new ``` Replace `` with the name of the secret you used previously, and `` with the new value of the secret. diff --git a/packages/nocodb/package.json b/packages/nocodb/package.json index 8303f62d30..df0b7e2ead 100644 --- a/packages/nocodb/package.json +++ b/packages/nocodb/package.json @@ -21,7 +21,8 @@ "license": "AGPL-3.0-or-later", "scripts": { "build": "pnpm run docker:build", - "build:obfuscate": "EE=true webpack --config webpack.config.js", + "build:obfuscate": "EE=true webpack --config webpack.config.js", + "build:cli:module": "EE=true webpack --config webpack.cli.config.js", "obfuscate:build:publish": "pnpm run build:obfuscate && pnpm publish .", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "pnpm run watch:run",