Browse Source

Merge branch 'develop' into feat/health-api

pull/2460/head
Wing-Kam Wong 2 years ago
parent
commit
6e5b1d0b86
  1. 203
      .github/workflows/release-executables.yml
  2. 2
      .github/workflows/release-nightly-dev.yml
  3. 15
      .github/workflows/release-nocodb.yml
  4. 2
      .github/workflows/release-pr.yml
  5. 158
      .github/workflows/release-timely-executables.yml
  6. 13
      packages/nc-gui/components/CreateOrEditProject.vue
  7. 18
      packages/nc-gui/components/project/spreadsheet/components/EditableCell.vue
  8. 13
      packages/nc-gui/components/project/spreadsheet/components/editableCell/DurationCell.vue
  9. 3
      packages/nc-gui/components/project/spreadsheet/components/editableCell/TimePickerCell.vue
  10. 24
      packages/nc-gui/components/project/spreadsheet/mixins/cell.js
  11. 21
      packages/noco-docs/content/en/developer-resources/rest-apis.md
  12. 42
      packages/noco-docs/content/en/engineering/timely-build.md
  13. 8
      packages/noco-docs/content/en/getting-started/installation.md
  14. 44
      packages/noco-docs/content/en/setup-and-usages/primary-key.md
  15. 2
      packages/noco-docs/content/en/setup-and-usages/primary-value.md
  16. 36
      packages/nocodb-sdk/src/lib/Api.ts
  17. 14
      packages/nocodb/package-lock.json
  18. 2
      packages/nocodb/package.json
  19. 28
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts
  20. 1
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts
  21. 2
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts
  22. 4
      packages/nocodb/src/lib/jobs/RedisJobsMgr.ts
  23. 7
      packages/nocodb/src/lib/meta/api/projectApis.ts
  24. 21
      packages/nocodb/src/lib/meta/api/swagger/helpers/templates/paths.ts
  25. 2
      packages/nocodb/src/lib/meta/api/userApi/ui/auth/emailVerify.ts
  26. 40
      packages/nocodb/src/lib/meta/api/userApi/userApis.ts
  27. 1
      packages/nocodb/src/lib/models/Filter.ts
  28. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-darwin-arm64/node_sqlite3.node
  29. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-darwin-x64/node_sqlite3.node
  30. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-linux-x64/node_sqlite3.node
  31. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-win32-ia32/node_sqlite3.node
  32. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-win32-x64/node_sqlite3.node
  33. 12
      scripts/pkg-executable/index.js
  34. 33
      scripts/pkg-executable/package.json
  35. 18
      scripts/sdk/swagger.json

203
.github/workflows/release-executables.yml

@ -5,13 +5,13 @@ on:
workflow_dispatch:
inputs:
tag:
description: "Timely version"
description: "Tag name"
required: true
# Triggered by release-nightly-dev.yml / release-pr.yml
# Triggered by release-nocodb.yml
workflow_call:
inputs:
tag:
description: "Timely version"
description: "Tag name"
required: true
type: string
secrets:
@ -21,10 +21,15 @@ jobs:
build-executables:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Get the latest draft release for asset upload url
- uses: cardinalby/git-get-release-action@v1
id: get_release
env:
GITHUB_TOKEN: ${{ secrets.NC_GITHUB_TOKEN }}
with:
token: ${{ secrets.NC_GITHUB_TOKEN }}
repository: 'nocodb/nocodb-timely'
latest: 1
draft: true
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
@ -38,6 +43,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache pkg modules
id: cache-pkg
uses: actions/cache@v3
@ -51,8 +57,11 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# 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
# install ldid
@ -61,26 +70,17 @@ jobs:
./make.sh
sudo cp ./ldid /usr/local/bin
- name: Update nocodb-timely
env:
TAG: ${{ github.event.inputs.tag || inputs.tag }}
run: |
npm i -E nocodb-daily@$TAG
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit package.json -m "Update to $TAG"
git tag $TAG
git push --tags
- uses: actions/setup-node@v3
with:
node-version: 16
- name : Install dependencies and build executables
- name : Install nocodb, other dependencies and build executables
run: |
cd ./scripts/pkg-executable
# Install nocodb version based on provided tag name
npm i -E nocodb@$TAG
# install npm dependendencies
npm i
@ -88,31 +88,66 @@ jobs:
rsync -rvzhP ./binaries/binding/ ./node_modules/sqlite3/lib/binding/
# clean up code to optimize size
npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run
npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run
# build executables
npm run build
ls ./dist
# Move macOS executables for signing
mkdir ./mac-dist
mv ./dist/Noco-macos-arm64 ./mac-dist/
mv ./dist/Noco-macos-x64 ./mac-dist/
- name: Upload executables(except mac executables) to release
uses: svenstaro/upload-release-action@v2
- name: Upload win-arm64 build to asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/dist/Noco-win-arm64.exe
asset_name: Noco-win-arm64
asset_content_type: application/octet-stream
- name: Upload win-x64 build to asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo_token: ${{ secrets.NC_GITHUB_TOKEN }}
file: dist/**
tag: ${{ github.event.inputs.tag || inputs.tag }}
overwrite: true
file_glob: true
repo_name: nocodb/nocodb-timely
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/dist/Noco-win-x64.exe
asset_name: Noco-win-x64
asset_content_type: application/octet-stream
- name: Upload linux-arm64 build to asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/dist/Noco-linux-arm64
asset_name: Noco-linux-arm64
asset_content_type: application/octet-stream
- name: Upload linux-x64 build to asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/dist/Noco-linux-x64
asset_name: Noco-linux-x64
asset_content_type: application/octet-stream
- uses: actions/upload-artifact@master
with:
name: ${{ github.event.inputs.tag || inputs.tag }}
path: mac-dist
path: scripts/pkg-executable/mac-dist
retention-days: 1
outputs:
upload_url: ${{ steps.get_release.outputs.upload_url }}
sign-mac-executables:
runs-on: macos-latest
needs: build-executables
@ -121,37 +156,111 @@ jobs:
- uses: actions/download-artifact@master
with:
name: ${{ github.event.inputs.tag || inputs.tag }}
path: mac-dist
path: scripts/pkg-executable/mac-dist
- name: Sign macOS executables
run: |
/usr/bin/codesign --force -s - ./mac-dist/Noco-macos-arm64 -v
/usr/bin/codesign --force -s - ./mac-dist/Noco-macos-x64 -v
/usr/bin/codesign --force -s - ./scripts/pkg-executable/mac-dist/Noco-macos-arm64 -v
/usr/bin/codesign --force -s - ./scripts/pkg-executable/mac-dist/Noco-macos-x64 -v
- uses: actions/upload-artifact@master
with:
name: ${{ github.event.inputs.tag || inputs.tag }}
path: mac-dist
path: scripts/pkg-executable/mac-dist
retention-days: 1
publish-mac-executables:
needs: sign-mac-executables
publish-mac-executables-and-homebrew:
needs: [sign-mac-executables,build-executables]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@master
with:
name: ${{ github.event.inputs.tag || inputs.tag }}
path: mac-dist
path: scripts/pkg-executable/mac-dist
- name: Upload mac executables to release
uses: svenstaro/upload-release-action@v2
- uses: actions/checkout@v3
with:
path: 'homebrew-nocodb'
token: ${{ secrets.NC_GITHUB_TOKEN }}
repository: 'nocodb/homebrew-nocodb'
fetch-depth: 0
- name: Compress files and calculate checksum
run: |
cd ./scripts/pkg-executable
cp ./mac-dist/Noco-macos-x64 ./mac-dist/nocodb
tar -czf ./mac-dist/nocodb.tar.gz ./mac-dist/nocodb
rm ./mac-dist/nocodb
echo "::set-output name=CHECKSUM::$(shasum -a 256 ./mac-dist/nocodb.tar.gz | awk '{print $1}')"
id: compress
- name: Upload macos-x64 build to asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build-executables.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/mac-dist/Noco-macos-x64
asset_name: Noco-macos-x64
asset_content_type: application/octet-stream
- name: Upload macos-arm64 build to asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build-executables.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/mac-dist/Noco-macos-arm64
asset_name: Noco-macos-arm64
asset_content_type: application/octet-stream
- name: Upload macos compressed build(for homebrew) to asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo_token: ${{ secrets.NC_GITHUB_TOKEN }}
file: mac-dist/**
tag: ${{ github.event.inputs.tag || inputs.tag }}
overwrite: true
file_glob: true
repo_name: nocodb/nocodb-timely
upload_url: ${{ needs.build-executables.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/mac-dist/nocodb.tar.gz
asset_name: nocodb.tar.gz
asset_content_type: application/octet-stream
- name: Generate Homebrew Formula class and push
run: |
FORMULA_CLASS_STR=$(cat << EOF
class Nocodb < Formula
desc "Get Human Readable file size information. - CLI"
homepage "https://github.com/nocodb/nocodb"
url "https://github.com/nocodb/nocodb/releases/download/${{ github.event.inputs.tag || inputs.tag }}/nocodb.tar.gz"
sha256 "${{ steps.compress.outputs.CHECKSUM }}"
license "MIT"
version "${{ github.event.inputs.tag || inputs.tag }}"
def install
bin.install "nocodb"
end
end
EOF
)
cd ./homebrew-nocodb
printf "$FORMULA_CLASS_STR" > ./Formula/nocodb.rb
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit ./Formula/nocodb.rb -m "Automatic publish"
git push

2
.github/workflows/release-nightly-dev.yml

@ -51,7 +51,7 @@ jobs:
# Build executables and publish to GitHub
release-executables:
needs: [set-tag, release-npm]
uses: ./.github/workflows/release-executables.yml
uses: ./.github/workflows/release-timely-executables.yml
with:
tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.nightly_build_tag }}
secrets:

15
.github/workflows/release-nocodb.yml

@ -44,14 +44,14 @@ jobs:
# bump the version from PREV_TAG
TARGET_TAG=$(echo ${PREV_TAG} | awk -F. -v OFS=. '{$NF += 1 ; print}')
fi
echo target version: ${TARGET_TAG}
echo previous version: ${PREV_TAG}
echo "::set-output name=target_tag::${TARGET_TAG}"
echo "::set-output name=prev_tag::${PREV_TAG}"
- name: Verify
run : |
echo ${{ steps.process-input.outputs.target_tag }}
echo ${{ steps.process-input.outputs.target_tag }}
# Merge develop to master
pr-to-master:
@ -94,6 +94,15 @@ jobs:
DOCKERHUB_USERNAME: "${{ secrets.DOCKERHUB_USERNAME }}"
DOCKERHUB_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}"
# Build executables and publish to GitHub
release-executables:
needs: [release-draft-note, process-input]
uses: ./.github/workflows/release-executables.yml
with:
tag: ${{ needs.process-input.outputs.target_tag }}
secrets:
NC_GITHUB_TOKEN: "${{ secrets.NC_GITHUB_TOKEN }}"
# Close all issues with target tags 'Fixed' & 'Resolved'
close-fixed-issues:
needs: [release-docker, process-input]
@ -101,7 +110,7 @@ jobs:
with:
issue_label: 'Status: Fixed'
version: ${{ needs.process-input.outputs.target_tag }}
close-resolved-issues:
needs: [close-fixed-issues, process-input]
uses: ./.github/workflows/release-close-issue.yml

2
.github/workflows/release-pr.yml

@ -80,7 +80,7 @@ jobs:
# Build executables and publish to GitHub
release-executables:
needs: [set-tag, release-npm]
uses: ./.github/workflows/release-executables.yml
uses: ./.github/workflows/release-timely-executables.yml
with:
tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}
secrets:

158
.github/workflows/release-timely-executables.yml

@ -0,0 +1,158 @@
name: "Release : Timely Executables"
on:
# Triggered manually
workflow_dispatch:
inputs:
tag:
description: "Timely version"
required: true
# Triggered by release-nightly-dev.yml / release-pr.yml
workflow_call:
inputs:
tag:
description: "Timely version"
required: true
type: string
secrets:
NC_GITHUB_TOKEN:
required: true
jobs:
build-executables:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.NC_GITHUB_TOKEN }}
repository: 'nocodb/nocodb-timely'
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
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 }}-
- name: Cache pkg modules
id: cache-pkg
uses: actions/cache@v3
env:
cache-name: cache-pkg
with:
# pkg cache files are stored in `~/.pkg-cache`
path: ~/.pkg-cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install QEMU and ldid
run: |
sudo apt update
# Install qemu
sudo apt install qemu binfmt-support qemu-user-static
# install ldid
git clone https://github.com/daeken/ldid.git
cd ./ldid
./make.sh
sudo cp ./ldid /usr/local/bin
- name: Update nocodb-timely
env:
TAG: ${{ github.event.inputs.tag || inputs.tag }}
run: |
npm i -E nocodb-daily@$TAG
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit package.json -m "Update to $TAG"
git tag $TAG
git push --tags
- uses: actions/setup-node@v3
with:
node-version: 16
- name : Install dependencies and build executables
run: |
# install npm dependendencies
npm i
# Copy sqlite binaries
rsync -rvzhP ./binaries/binding/ ./node_modules/sqlite3/lib/binding/
# clean up code to optimize size
npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run
# build executables
npm run build
mkdir ./mac-dist
mv ./dist/Noco-macos-arm64 ./mac-dist/
mv ./dist/Noco-macos-x64 ./mac-dist/
- name: Upload executables(except mac executables) to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.NC_GITHUB_TOKEN }}
file: dist/**
tag: ${{ github.event.inputs.tag || inputs.tag }}
overwrite: true
file_glob: true
repo_name: nocodb/nocodb-timely
- uses: actions/upload-artifact@master
with:
name: ${{ github.event.inputs.tag || inputs.tag }}
path: mac-dist
retention-days: 1
sign-mac-executables:
runs-on: macos-latest
needs: build-executables
steps:
- uses: actions/download-artifact@master
with:
name: ${{ github.event.inputs.tag || inputs.tag }}
path: mac-dist
- name: Sign macOS executables
run: |
/usr/bin/codesign --force -s - ./mac-dist/Noco-macos-arm64 -v
/usr/bin/codesign --force -s - ./mac-dist/Noco-macos-x64 -v
- uses: actions/upload-artifact@master
with:
name: ${{ github.event.inputs.tag || inputs.tag }}
path: mac-dist
retention-days: 1
publish-mac-executables:
needs: sign-mac-executables
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@master
with:
name: ${{ github.event.inputs.tag || inputs.tag }}
path: mac-dist
- name: Upload mac executables to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.NC_GITHUB_TOKEN }}
file: mac-dist/**
tag: ${{ github.event.inputs.tag || inputs.tag }}
overwrite: true
file_glob: true
repo_name: nocodb/nocodb-timely

13
packages/nc-gui/components/CreateOrEditProject.vue

@ -453,14 +453,14 @@
"
/>
</v-col>
<!-- todo : Schema name -->
<!-- Schema name -->
<v-col
v-if="db.client === 'mssql' || db.client === 'pg'"
cols="4"
class="py-0"
>
<v-text-field
v-model="schema"
v-model="db.searchPath[0]"
:disabled="edit && enableDbEdit < 2"
class="body-2 database-field"
:rules="form.requiredRule"
@ -891,7 +891,6 @@ export default {
layout: 'empty',
data() {
return {
schema: 'public',
testSuccess: false,
projectCreated: false,
allSchemas: false,
@ -1542,9 +1541,7 @@ export default {
this.projectReloading = true
const con = projectJson.envs._noco.db[0]
if (con.client === 'pg' || con.client === 'mssql') {
con.searchPath = [this.schema]
} else if ('searchPath' in con) {
if (con.client !== 'pg' && con.client !== 'mssql' && 'searchPath' in con) {
delete con.searchPath
}
@ -1895,9 +1892,9 @@ export default {
},
onDatabaseTypeChanged(client, db1, index, env) {
if (this.databaseNames[client] === 'mssql') {
this.schema = 'dbo'
this.project.envs[env].db[index].searchPath[0] = 'dbo'
} else if (this.databaseNames[client] === 'pg') {
this.schema = 'public'
this.project.envs[env].db[index].searchPath[0] = 'public'
}
for (const env in this.project.envs) {

18
packages/nc-gui/components/project/spreadsheet/components/EditableCell.vue

@ -42,6 +42,7 @@
:is-form="isForm"
:column="column"
:is-locked="isLocked"
v-on="parentListeners"
/>
<boolean-cell
@ -74,6 +75,7 @@
v-else-if="isTime"
v-model="localState"
v-on="parentListeners"
@save="$emit('save')"
/>
<date-time-picker-cell
@ -95,7 +97,6 @@
:is-form="isForm"
:column="column"
v-on="parentListeners"
@input="$emit('save')"
/>
<json-editable-cell
@ -111,7 +112,6 @@
v-model="localState"
:column="column"
v-on="parentListeners"
@input="$emit('save')"
/>
<set-list-cell
v-else-if="isSet"
@ -210,10 +210,10 @@ export default {
if (val !== this.value) {
this.changed = true
this.$emit('input', val)
if (this.isAttachment || this.isBoolean || this.isRating || this.isTime || this.isDateTime || this.isDate || this.isDuration) {
this.syncData()
} else if (!this.isCurrency && !this.isEnum && !this.isSet) {
if (this.isAutoSaved) {
this.syncDataDebounce(this)
} else if (!this.isManualSaved) {
this.saveData()
}
}
}
@ -241,7 +241,7 @@ export default {
// this.$refs.input.focus();
},
beforeDestroy() {
if (this.changed && !(this.isAttachment || this.isBoolean || this.isRating || this.isTime || this.isDateTime || this.isDuration)) {
if (this.changed && this.isAutoSaved) {
this.changed = false
this.$emit('change')
}
@ -253,6 +253,12 @@ export default {
this.changed = false
this.$emit('update')
}
},
saveData() {
if (this.changed && !this.destroyed) {
this.changed = false
this.$emit('save')
}
}
}
}

13
packages/nc-gui/components/project/spreadsheet/components/editableCell/DurationCell.vue

@ -7,6 +7,7 @@
@blur="onBlur"
@keypress="checkDurationFormat($event)"
@keydown.enter="isEdited && $emit('input', durationInMS)"
v-on="parentListeners"
>
<div v-if="showWarningMessage == true" class="duration-warning">
<!-- TODO: i18n -->
@ -51,6 +52,18 @@ export default {
},
durationType() {
return this.column?.meta?.duration || 0
},
parentListeners() {
const $listeners = {}
if (this.$listeners.blur) {
$listeners.blur = this.$listeners.blur
}
if (this.$listeners.focus) {
$listeners.focus = this.$listeners.focus
}
return $listeners
}
},
mounted() {

3
packages/nc-gui/components/project/spreadsheet/components/editableCell/TimePickerCell.vue

@ -5,7 +5,7 @@
</template>
<div class="d-flex flex-column justify-center" @click.stop>
<v-time-picker v-model="localState" v-on="parentListeners" />
<v-btn small color="primary" @click="$emit('update')">
<v-btn small color="primary" @click="$emit('save')">
<!-- Save -->
{{ $t('general.save') }}
</v-btn>
@ -15,7 +15,6 @@
<script>
import dayjs from 'dayjs'
import { MysqlUi } from 'nocodb-sdk'
export default {
name: 'TimePickerCell',

24
packages/nc-gui/components/project/spreadsheet/mixins/cell.js

@ -70,6 +70,30 @@ export default {
},
isDuration() {
return this.uiDatatype === UITypes.Duration
},
isAutoSaved() {
return [
UITypes.SingleLineText,
UITypes.LongText,
UITypes.PhoneNumber,
UITypes.Email,
UITypes.URL,
UITypes.Number,
UITypes.Decimal,
UITypes.Percent,
UITypes.Count,
UITypes.AutoNumber,
UITypes.SpecificDBType,
UITypes.Geometry
].includes(this.uiDatatype)
},
isManualSaved() {
return [
UITypes.Currency,
UITypes.Year,
UITypes.Time,
UITypes.Duration
].includes(this.uiDatatype)
}
}
}

21
packages/noco-docs/content/en/developer-resources/rest-apis.md

@ -21,15 +21,15 @@ Currently, the default value for {orgs} is <b>noco</b>. Users will be able to ch
| Category | Method | Tag | Function Name | Path |
|---|---|---|---|---|
| Auth | Post | auth | signup | /api/v1/db/auth/user/signup |
| Auth | Post | auth | signin | /api/v1/db/auth/user/signin |
| Auth | Get | auth | me | /api/v1/db/auth/user/me |
| Auth | Post | auth | passwordForgot | /api/v1/db/auth/password/forgot |
| Auth | Post | auth | passwordChange | /api/v1/db/auth/password/change |
| Auth | Post | auth | passwordReset | /api/v1/db/auth/password/reset/{token} |
| Auth | Post | auth | tokenRefresh | /api/v1/db/auth/token/refresh |
| Auth | Post | auth | passwordResetTokenValidate | /api/v1/db/auth/token/validate/{token} |
| Auth | Post | auth | emailValidate | /api/v1/db/auth/email/validate/{email} |
| Auth | Post | auth | signup | /api/v1/auth/user/signup |
| Auth | Post | auth | signin | /api/v1/auth/user/signin |
| Auth | Get | auth | me | /api/v1/auth/user/me |
| Auth | Post | auth | passwordForgot | /api/v1/auth/password/forgot |
| Auth | Post | auth | passwordChange | /api/v1/auth/password/change |
| Auth | Post | auth | passwordReset | /api/v1/auth/password/reset/{token} |
| Auth | Post | auth | tokenRefresh | /api/v1/auth/token/refresh |
| Auth | Post | auth | passwordResetTokenValidate | /api/v1/auth/token/validate/{token} |
| Auth | Post | auth | emailValidate | /api/v1/auth/email/validate/{email} |
### Public APIs
@ -194,7 +194,8 @@ Currently, the default value for {orgs} is <b>noco</b>. Users will be able to ch
| Operation | Meaning | Example |
|---|---|---|
| eq | equal | (colName,eq,colValue) |
| not | not equal | (colName,not,colValue) |
| neq | not equal | (colName,neq,colValue) |
| not | not equal (alias of neq) | (colName,not,colValue) |
| gt | greater than | (colName,gt,colValue) |
| ge | greater or equal | (colName,ge,colValue) |
| lt | less than | (colName,lt,colValue) |

42
packages/noco-docs/content/en/engineering/timely-build.md

@ -0,0 +1,42 @@
---
title: "Timely Build"
description: "Timely Build"
position: 5000
category: "Engineering"
menuTitle: "Timely Build"
---
NocoDB provides timely build versions on Docker and Executables by compiling our source code and packaging as a deliverable so that it can
- reduce pull request cycle time
- allow issue reporters / reviewers to verify the fix without setting up their local machines
## Docker
When a non-draft Pull Request is created, reopened or synchronized, a timely build for Docker would be triggered for the changes only included in the following paths.
- `packages/nocodb-sdk/**`
- `packages/nc-gui/**`
- `packages/nc-plugin/**`
- `packages/nocodb/**`
The docker images will be built and pushed to Docker Hub (See [nocodb/nocodb-timely](https://hub.docker.com/r/nocodb/nocodb-timely/tags) for the full list). Once the image is ready, Github bot will add a comment with the command in the pull request. The tag would be `<NOCODB_CURRENT_VERSION>-pr-<PR_NUMBER>-<YYYYMMDD>-<HHMM>`.
![image](https://user-images.githubusercontent.com/35857179/175012097-240dab05-da93-4c4e-87c1-1c36fb1350bd.png)
## Executables
Similarly, we provide a timely build for executables for non-docker users. The source code will be built, packaged as binary files, and pushed to Github (See [nocodb/nocodb-timely](https://github.com/nocodb/nocodb-timely/releases) for the full list).
Currently, we only support the following targets:
- `node16-linux-arm64`
- `node16-macos-arm64`
- `node16-win-arm64`
- `node16-linux-x64`
- `node16-macos-x64`
- `node16-win-x64`
Once the executables are ready, Github bot will add a comment with the commands in the pull request.
![image](https://user-images.githubusercontent.com/35857179/175012070-f5f3e7b8-6dc5-4d1c-9f7e-654bc5039521.png)

8
packages/noco-docs/content/en/getting-started/installation.md

@ -57,6 +57,14 @@ npm install
npm start
```
### Homebrew
```bash
brew tap nocodb/nocodb
brew install nocodb
nocodb
```
### Docker
If you are a Docker user, you may try this way!

44
packages/noco-docs/content/en/setup-and-usages/primary-key.md

@ -0,0 +1,44 @@
---
title: "Primary Key"
description: "Primary Key"
position: 575
category: "Product"
menuTitle: "Primary Key"
---
## What is a Primary Key ?
- A primary key is a special database table column designated to uniquely identify each table record.
## What is the use of Primary Key ?
- As it uniquely identifies an individual record of a table, it is used internally by NocoDB for all operations associated with a record
## Primary Key in NocoDB
- Primary Key that gets defined / used in NocoDB depends on how underlying table was created. Summary is captured below
1. From UI, Create new table / Import from Excel / Import from CSV
1. An `ID` [datatype: Integer] system field created by default during table creation is used as primary key
2. Additional system fields `created-at`, `updated-at` are inserted by default & can be omitted optionally; these fields can be deleted after table creation
2. Connect to existing external database
1. Existing `primary key` field defined for a table is retained as is; NocoDB doesn't insert a new ID field
2. Additional system fields `created-at`, `updated-at` are not inserted by default
3. Import from Airtable
1. Airtable record ID is marked as primary key for imported records, and is mapped to field `ncRecordId` [datatype: varchar]
2. If a new record is inserted after migration & if ncRecordId field was omitted during record insertion - auto generated string will be inserted by NocoDB
3. Computed hash value for the entire record is stored in system field `ncRecordHash`
4. Additional system fields `created-at`, `updated-at` are not inserted by default
4. Create new table using SDK / API
1. No default primary key field is introduced by NocoDB. It has to be explicitly specified during table creation (using attribute `pk: true`)
## What if Primary Key was missing?
It is possible to have a table without any primary key.
- External database table can be created without primary key configuration.
- New table can be created using SDK / API without primary key
In such scenario's, new records can be created in NocoDB for this table, but records can't be updated or deleted [as there is now way for NocoDB to uniquely identify these records]
#### Example : Primary Key & optional system fields during new table creation
![Screenshot 2022-06-16 at 12 15 43 PM](https://user-images.githubusercontent.com/86527202/174010350-8610b9c1-a761-4bff-a53d-dc728df47e1b.png)
#### Example : Show System Fields
![Screenshot 2022-06-16 at 12 16 07 PM](https://user-images.githubusercontent.com/86527202/174010379-9e300d42-ad89-4653-afa2-f70fca407ca8.png)
## Can I change the Primary Key to another column within tables ?
- You can't update Primary Key from NocoDB UI. You can reconfigure it at database level directly & trigger `metasync` explicitly

2
packages/noco-docs/content/en/setup-and-usages/primary-value.md

@ -1,7 +1,7 @@
---
title: "Primary value"
description: "Primary value"
position: 575
position: 580
category: "Product"
menuTitle: "Primary value"
---

36
packages/nocodb-sdk/src/lib/Api.ts

@ -805,7 +805,7 @@ export class Api<
* @tags Auth
* @name Signup
* @summary Signup
* @request POST:/api/v1/db/auth/user/signup
* @request POST:/api/v1/auth/user/signup
* @response `200` `{ token?: string }` OK
* @response `400` `{ msg?: string }` Bad Request
* @response `401` `void` Unauthorized
@ -816,7 +816,7 @@ export class Api<
params: RequestParams = {}
) =>
this.request<{ token?: string }, { msg?: string } | void>({
path: `/api/v1/db/auth/user/signup`,
path: `/api/v1/auth/user/signup`,
method: 'POST',
body: data,
format: 'json',
@ -829,7 +829,7 @@ export class Api<
* @tags Auth
* @name Signin
* @summary Signin
* @request POST:/api/v1/db/auth/user/signin
* @request POST:/api/v1/auth/user/signin
* @response `200` `{ token?: string }` OK
* @response `400` `{ msg?: string }` Bad Request
*/
@ -838,7 +838,7 @@ export class Api<
params: RequestParams = {}
) =>
this.request<{ token?: string }, { msg?: string }>({
path: `/api/v1/db/auth/user/signin`,
path: `/api/v1/auth/user/signin`,
method: 'POST',
body: data,
type: ContentType.Json,
@ -852,12 +852,12 @@ export class Api<
* @tags Auth
* @name Me
* @summary User info
* @request GET:/api/v1/db/auth/user/me
* @request GET:/api/v1/auth/user/me
* @response `200` `UserInfoType` OK
*/
me: (query?: { project_id?: string }, params: RequestParams = {}) =>
this.request<UserInfoType, any>({
path: `/api/v1/db/auth/user/me`,
path: `/api/v1/auth/user/me`,
method: 'GET',
query: query,
format: 'json',
@ -870,13 +870,13 @@ export class Api<
* @tags Auth
* @name PasswordForgot
* @summary Password forgot
* @request POST:/api/v1/db/auth/password/forgot
* @request POST:/api/v1/auth/password/forgot
* @response `200` `void` OK
* @response `401` `void` Unauthorized
*/
passwordForgot: (data: { email?: string }, params: RequestParams = {}) =>
this.request<void, void>({
path: `/api/v1/db/auth/password/forgot`,
path: `/api/v1/auth/password/forgot`,
method: 'POST',
body: data,
type: ContentType.Json,
@ -889,7 +889,7 @@ export class Api<
* @tags Auth
* @name PasswordChange
* @summary Password change
* @request POST:/api/v1/db/auth/password/change
* @request POST:/api/v1/auth/password/change
* @response `200` `{ msg?: string }` OK
* @response `400` `{ msg?: string }` Bad request
*/
@ -898,7 +898,7 @@ export class Api<
params: RequestParams = {}
) =>
this.request<{ msg?: string }, { msg?: string }>({
path: `/api/v1/db/auth/password/change`,
path: `/api/v1/auth/password/change`,
method: 'POST',
body: data,
type: ContentType.Json,
@ -912,12 +912,12 @@ export class Api<
* @tags Auth
* @name PasswordResetTokenValidate
* @summary Reset token verify
* @request POST:/api/v1/db/auth/token/validate/{token}
* @request POST:/api/v1/auth/token/validate/{token}
* @response `200` `void` OK
*/
passwordResetTokenValidate: (token: string, params: RequestParams = {}) =>
this.request<void, any>({
path: `/api/v1/db/auth/token/validate/${token}`,
path: `/api/v1/auth/token/validate/${token}`,
method: 'POST',
...params,
}),
@ -928,12 +928,12 @@ export class Api<
* @tags Auth
* @name EmailValidate
* @summary Verify email
* @request POST:/api/v1/db/auth/email/validate/{token}
* @request POST:/api/v1/auth/email/validate/{token}
* @response `200` `void` OK
*/
emailValidate: (token: string, params: RequestParams = {}) =>
this.request<void, any>({
path: `/api/v1/db/auth/email/validate/${token}`,
path: `/api/v1/auth/email/validate/${token}`,
method: 'POST',
...params,
}),
@ -944,7 +944,7 @@ export class Api<
* @tags Auth
* @name PasswordReset
* @summary Password reset
* @request POST:/api/v1/db/auth/password/reset/{token}
* @request POST:/api/v1/auth/password/reset/{token}
* @response `200` `void` OK
*/
passwordReset: (
@ -953,7 +953,7 @@ export class Api<
params: RequestParams = {}
) =>
this.request<void, any>({
path: `/api/v1/db/auth/password/reset/${token}`,
path: `/api/v1/auth/password/reset/${token}`,
method: 'POST',
body: data,
type: ContentType.Json,
@ -966,12 +966,12 @@ export class Api<
* @tags Auth
* @name TokenRefresh
* @summary Refresh token
* @request POST:/api/v1/db/auth/token/refresh
* @request POST:/api/v1/auth/token/refresh
* @response `200` `void` OK
*/
tokenRefresh: (params: RequestParams = {}) =>
this.request<void, any>({
path: `/api/v1/db/auth/token/refresh`,
path: `/api/v1/auth/token/refresh`,
method: 'POST',
...params,
}),

14
packages/nocodb/package-lock.json generated

@ -70,7 +70,7 @@
"mysql2": "^2.2.5",
"nanoid": "^3.1.20",
"nc-common": "0.0.6",
"nc-help": "0.2.65",
"nc-help": "0.2.66",
"nc-lib-gui": "0.91.10",
"nc-plugin": "0.1.2",
"ncp": "^2.0.0",
@ -16352,9 +16352,9 @@
}
},
"node_modules/nc-help": {
"version": "0.2.65",
"resolved": "https://registry.npmjs.org/nc-help/-/nc-help-0.2.65.tgz",
"integrity": "sha512-Sia+ZhfrCCFu70khjVCUMJ7B8xYlSyfatKt7WERDzqiykC7rOGFxfyhKPfhDzep+X1CDT3R+psd4lTi4d52wdg==",
"version": "0.2.66",
"resolved": "https://registry.npmjs.org/nc-help/-/nc-help-0.2.66.tgz",
"integrity": "sha512-yYoaUGJNcdvk9J/ORYyBV7CCgMJ9onBYasfvE1qSHq9HMKY8pJGiV5Hxui232XU1rDkuzZ9t55StcSKj76qtLg==",
"dependencies": {
"@rudderstack/rudder-sdk-node": "^1.1.3",
"axios": "^0.21.1",
@ -38040,9 +38040,9 @@
"integrity": "sha512-3AryS9uwa5NfISLxMciUonrH7YfXp+nlahB9T7girXIsLQrmwX4MdnuKs32akduCOGpKmjTJSWmATULbuMkbfw=="
},
"nc-help": {
"version": "0.2.65",
"resolved": "https://registry.npmjs.org/nc-help/-/nc-help-0.2.65.tgz",
"integrity": "sha512-Sia+ZhfrCCFu70khjVCUMJ7B8xYlSyfatKt7WERDzqiykC7rOGFxfyhKPfhDzep+X1CDT3R+psd4lTi4d52wdg==",
"version": "0.2.66",
"resolved": "https://registry.npmjs.org/nc-help/-/nc-help-0.2.66.tgz",
"integrity": "sha512-yYoaUGJNcdvk9J/ORYyBV7CCgMJ9onBYasfvE1qSHq9HMKY8pJGiV5Hxui232XU1rDkuzZ9t55StcSKj76qtLg==",
"requires": {
"@rudderstack/rudder-sdk-node": "^1.1.3",
"axios": "^0.21.1",

2
packages/nocodb/package.json

@ -154,7 +154,7 @@
"mysql2": "^2.2.5",
"nanoid": "^3.1.20",
"nc-common": "0.0.6",
"nc-help": "0.2.65",
"nc-help": "0.2.66",
"nc-lib-gui": "0.91.10",
"nc-plugin": "0.1.2",
"ncp": "^2.0.0",

28
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

@ -90,7 +90,7 @@ class BaseModelSqlv2 {
}
public async readByPk(id?: any): Promise<any> {
const qb = this.dbDriver(this.model.table_name);
const qb = this.dbDriver(this.tnPath);
await this.selectObject({ qb });
@ -106,7 +106,7 @@ class BaseModelSqlv2 {
}
public async exist(id?: any): Promise<any> {
const qb = this.dbDriver(this.model.table_name);
const qb = this.dbDriver(this.tnPath);
await this.selectObject({ qb });
const pks = this.model.primaryKeys;
if ((id + '').split('___').length != pks.length) {
@ -119,12 +119,14 @@ class BaseModelSqlv2 {
args: {
where?: string;
filterArr?: Filter[];
sort?: string | string[];
} = {}
): Promise<any> {
const qb = this.dbDriver(this.model.table_name);
const qb = this.dbDriver(this.tnPath);
await this.selectObject({ qb });
const aliasColObjMap = await this.model.getAliasColObjMap();
const sorts = extractSortsObject(args?.sort, aliasColObjMap);
const filterObj = extractFilterFromXwhere(args?.where, aliasColObjMap);
await conditionV2(
@ -145,6 +147,12 @@ class BaseModelSqlv2 {
this.dbDriver
);
if (Array.isArray(sorts) && sorts?.length) {
await sortV2(sorts, qb, this.dbDriver);
} else if (this.model.primaryKey) {
qb.orderBy(this.model.primaryKey.column_name);
}
const data = await qb.first();
if (data) {
@ -167,15 +175,12 @@ class BaseModelSqlv2 {
): Promise<any> {
const { where, ...rest } = this._getListArgs(args as any);
const qb = this.dbDriver(this.model.table_name);
const qb = this.dbDriver(this.tnPath);
await this.selectObject({ qb });
const aliasColObjMap = await this.model.getAliasColObjMap();
let sorts = extractSortsObject(args?.sort, aliasColObjMap);
const filterObj = extractFilterFromXwhere(args?.where, aliasColObjMap);
// todo: replace with view id
if (!ignoreFilterSort && this.viewId) {
await conditionV2(
@ -241,7 +246,6 @@ class BaseModelSqlv2 {
if (!ignoreFilterSort) applyPaginate(qb, rest);
const proto = await this.getProto();
const data = await this.extractRawQueryAndExec(qb);
return data?.map(d => {
@ -257,7 +261,7 @@ class BaseModelSqlv2 {
await this.model.getColumns();
const { where } = this._getListArgs(args);
const qb = this.dbDriver(this.model.table_name);
const qb = this.dbDriver(this.tnPath);
// qb.xwhere(where, await this.model.getAliasColMapping());
const aliasColObjMap = await this.model.getAliasColObjMap();
@ -326,7 +330,7 @@ class BaseModelSqlv2 {
) {
const { where, ...rest } = this._getListArgs(args as any);
const qb = this.dbDriver(this.model.table_name);
const qb = this.dbDriver(this.tnPath);
qb.count(`${this.model.primaryKey?.column_name || '*'} as count`);
qb.select(args.column_name);
@ -1610,7 +1614,7 @@ class BaseModelSqlv2 {
} else {
await this.model.getColumns();
const { where } = this._getListArgs(args);
const qb = this.dbDriver(this.model.table_name);
const qb = this.dbDriver(this.tnPath);
const aliasColObjMap = await this.model.getAliasColObjMap();
const filterObj = extractFilterFromXwhere(where, aliasColObjMap);
@ -1672,7 +1676,7 @@ class BaseModelSqlv2 {
try {
await this.model.getColumns();
const { where } = this._getListArgs(args);
const qb = this.dbDriver(this.model.table_name);
const qb = this.dbDriver(this.tnPath);
const aliasColObjMap = await this.model.getAliasColObjMap();
const filterObj = extractFilterFromXwhere(where, aliasColObjMap);

1
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts

@ -216,6 +216,7 @@ const parseConditionV2 = async (
qb = qb.where(field, val);
break;
case 'neq':
case 'not':
qb = qb.whereNot(field, val);
break;
case 'like':

2
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts

@ -86,7 +86,7 @@ const getAst = async ({
(!fields?.length || fields.includes(col.title)) &&
value
: fields?.length
? fields.includes(col.title)
? fields.includes(col.title) && value
: value
};
}, Promise.resolve({}));

4
packages/nocodb/src/lib/jobs/RedisJobsMgr.ts

@ -11,7 +11,9 @@ export default class RedisJobsMgr extends JobsMgr {
super();
this.queue = {};
this.workers = {};
this.connection = new Redis(config);
this.connection = new Redis(config, {
maxRetriesPerRequest: null
});
}
async add(

7
packages/nocodb/src/lib/meta/api/projectApis.ts

@ -416,6 +416,13 @@ export async function projectCost(req, res) {
cost = Math.min(120 * userCount, 36000);
}
Tele.event({
event: 'a:project:cost',
data: {
cost
}
});
res.json({ cost });
}

21
packages/nocodb/src/lib/meta/api/swagger/helpers/templates/paths.ts

@ -166,6 +166,27 @@ export const getModelPaths = async (ctx: {
}
}
},
[`/api/v1/db/data/${ctx.orgs}/${ctx.projectName}/${ctx.tableName}/find-one`]: {
get: {
summary: `${ctx.tableName} find-one`,
operationId: 'db-table-row-find-one',
description: `Find first record matching the conditions.`,
tags: [ctx.tableName],
parameters: [fieldsParam, whereParam, sortParam],
responses: {
'200': {
description: 'OK',
content: {
'application/json': {
schema: {
$ref: `#/components/schemas/${ctx.tableName}Response`
}
}
}
}
}
}
},
[`/api/v1/db/data/${ctx.orgs}/${ctx.projectName}/${ctx.tableName}/groupby`]: {
get: {
summary: `${ctx.tableName} groupby`,

2
packages/nocodb/src/lib/meta/api/userApi/ui/auth/emailVerify.ts

@ -54,7 +54,7 @@ export default `<!DOCTYPE html>
methods: {},
async created() {
try {
const valid = (await axios.post('<%- baseUrl %>/api/v1/db/auth/email/validate/' + this.token)).data;
const valid = (await axios.post('<%- baseUrl %>/api/v1/auth/email/validate/' + this.token)).data;
this.valid = !!valid;
} catch (e) {
this.valid = false;

40
packages/nocodb/src/lib/meta/api/userApi/userApis.ts

@ -327,10 +327,10 @@ async function passwordForgot(req: Request<any, any>, res): Promise<any> {
subject: 'Password Reset Link',
text: `Visit following link to update your password : ${
(req as any).ncSiteUrl
}/api/v1/db/auth/password/reset/${token}.`,
}/api/v1/auth/password/reset/${token}.`,
html: ejs.render(template, {
resetLink:
(req as any).ncSiteUrl + `/api/v1/db/auth/password/reset/${token}`
(req as any).ncSiteUrl + `/api/v1/auth/password/reset/${token}`
})
})
);
@ -516,7 +516,7 @@ const mapRoutes = router => {
})(req, res, next)
);
// new API
// deprecated APIs
router.post('/api/v1/db/auth/user/signup', catchError(signup));
router.post('/api/v1/db/auth/user/signin', catchError(signin));
router.get(
@ -549,5 +549,39 @@ const mapRoutes = router => {
'/api/v1/db/auth/password/reset/:tokenId',
catchError(renderPasswordReset)
);
// new API
router.post('/api/v1/auth/user/signup', catchError(signup));
router.post('/api/v1/auth/user/signin', catchError(signin));
router.get(
'/api/v1/auth/user/me',
extractProjectIdAndAuthenticate,
catchError(me)
);
router.post('/api/v1/auth/password/forgot', catchError(passwordForgot));
router.post(
'/api/v1/auth/token/validate/:tokenId',
catchError(tokenValidate)
);
router.post(
'/api/v1/auth/password/reset/:tokenId',
catchError(passwordReset)
);
router.post(
'/api/v1/auth/email/validate/:tokenId',
catchError(emailVerification)
);
router.post(
'/api/v1/auth/password/change',
ncMetaAclMw(passwordChange, 'passwordChange')
);
router.post(
'/api/v1/auth/token/refresh',
ncMetaAclMw(refreshToken, 'refreshToken')
);
router.get(
'/api/v1/auth/password/reset/:tokenId',
catchError(renderPasswordReset)
);
};
export { mapRoutes as userApis };

1
packages/nocodb/src/lib/models/Filter.ts

@ -23,6 +23,7 @@ export default class Filter {
comparison_op?:
| 'eq'
| 'neq'
| 'not'
| 'like'
| 'nlike'
| 'empty'

BIN
scripts/pkg-executable/binaries/binding/napi-v3-darwin-arm64/node_sqlite3.node

Binary file not shown.

BIN
scripts/pkg-executable/binaries/binding/napi-v3-darwin-x64/node_sqlite3.node

Binary file not shown.

BIN
scripts/pkg-executable/binaries/binding/napi-v3-linux-x64/node_sqlite3.node

Binary file not shown.

BIN
scripts/pkg-executable/binaries/binding/napi-v3-win32-ia32/node_sqlite3.node

Binary file not shown.

BIN
scripts/pkg-executable/binaries/binding/napi-v3-win32-x64/node_sqlite3.node

Binary file not shown.

12
scripts/pkg-executable/index.js

@ -0,0 +1,12 @@
process.env.NC_BINARY_BUILD = 'true';
(async () => {
try {
const app = require('express')();
const {Noco} = require("nocodb");
const httpServer = app.listen(process.env.PORT || 8080);
app.use(await Noco.init({}, httpServer, app));
console.log(`Visit : localhost:${process.env.PORT}/dashboard`)
} catch(e) {
console.log(e)
}
})()

33
scripts/pkg-executable/package.json

@ -0,0 +1,33 @@
{
"name": "Noco",
"version": "1.0.0",
"description": "",
"main": "index.js",
"bin": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js",
"upgrade": "npm uninstall --save nocodb && npm install --save nocodb",
"build": "npx pkg . --out-path dist --compress GZip"
},
"pkg": {
"assets": [
"node_modules/**/*"
],
"targets": [
"node16-linux-arm64",
"node16-macos-arm64",
"node16-win-arm64",
"node16-linux-x64",
"node16-macos-x64",
"node16-win-x64"
]
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.17.1",
"nocodb": "0.91.10"
}
}

18
scripts/sdk/swagger.json

@ -10,7 +10,7 @@
}
],
"paths": {
"/api/v1/db/auth/user/signup": {
"/api/v1/auth/user/signup": {
"post": {
"summary": "Signup",
"operationId": "auth-signup",
@ -95,7 +95,7 @@
"description": "Create a new user with provided email and password and first user is marked as super admin. "
}
},
"/api/v1/db/auth/user/signin": {
"/api/v1/auth/user/signin": {
"post": {
"summary": "Signin",
"operationId": "auth-signin",
@ -167,7 +167,7 @@
},
"parameters": []
},
"/api/v1/db/auth/user/me": {
"/api/v1/auth/user/me": {
"parameters": [],
"get": {
"summary": "User info",
@ -214,7 +214,7 @@
]
}
},
"/api/v1/db/auth/password/forgot": {
"/api/v1/auth/password/forgot": {
"post": {
"summary": "Password forgot",
"operationId": "auth-password-forgot",
@ -248,7 +248,7 @@
},
"parameters": []
},
"/api/v1/db/auth/password/change": {
"/api/v1/auth/password/change": {
"post": {
"summary": "Password change",
"operationId": "auth-password-change",
@ -336,7 +336,7 @@
},
"parameters": []
},
"/api/v1/db/auth/token/validate/{token}": {
"/api/v1/auth/token/validate/{token}": {
"post": {
"summary": "Reset token verify",
"operationId": "auth-password-reset-token-validate",
@ -361,7 +361,7 @@
}
]
},
"/api/v1/db/auth/email/validate/{token}": {
"/api/v1/auth/email/validate/{token}": {
"post": {
"summary": "Verify email",
"operationId": "auth-email-validate",
@ -386,7 +386,7 @@
}
]
},
"/api/v1/db/auth/password/reset/{token}": {
"/api/v1/auth/password/reset/{token}": {
"post": {
"summary": "Password reset",
"operationId": "auth-password-reset",
@ -425,7 +425,7 @@
}
]
},
"/api/v1/db/auth/token/refresh": {
"/api/v1/auth/token/refresh": {
"post": {
"summary": "Refresh token",
"operationId": "auth-token-refresh",

Loading…
Cancel
Save