Skip to content

Dev - update branch #638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 151 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
b7c4928
new: simplify api service build
ludomikula Dec 6, 2023
b0d08a8
new: allow serving static files from mounted volume
ludomikula Dec 10, 2023
6292b35
Merge branch 'dev' into docker_build_update
FalkWolsky Dec 10, 2023
4304708
Merge pull request #574 from lowcoder-org/docker_build_update
FalkWolsky Dec 11, 2023
757d772
removed lowcoder-dev-utils
raheeliftikhar5 Dec 13, 2023
8130928
fix build issues
raheeliftikhar5 Dec 13, 2023
e9a75c0
Merge pull request #578 from raheeliftikhar5/remove-dev-utils
FalkWolsky Dec 13, 2023
3a74b79
remove create-lowcoder-plugin + version upgrade for publish
raheeliftikhar5 Dec 13, 2023
6170b11
Merge pull request #579 from raheeliftikhar5/publish-modules
FalkWolsky Dec 13, 2023
990ff84
Custom plugin publishing issues (#583)
raheeliftikhar5 Dec 14, 2023
ed99678
added hover and active color options in link styles (#585)
raheeliftikhar5 Dec 15, 2023
07836eb
Release 2.2.1 (#586)
ludomikula Dec 15, 2023
848d786
fix: quick fix for https
ludomikula Dec 16, 2023
704e079
Merge branch 'main' into dev
ludomikula Dec 18, 2023
9b319cd
Try to rework oauth refresh token handling in reactive manner
aq-ikhwa-tech Dec 18, 2023
c95d040
Merge branch 'dev' into update-refresh-token-handling
aq-ikhwa-tech Dec 18, 2023
ff17063
upgrade antd version
raheeliftikhar5 Dec 19, 2023
afccd2b
Merge pull request #592 from raheeliftikhar5/upgade-antd-5.1.12
FalkWolsky Dec 19, 2023
d9983aa
Add api to fetch api usage data
aq-ikhwa-tech Dec 20, 2023
722af3c
Merge pull request #594 from lowcoder-org/add-api-usage-stats-api-call
FalkWolsky Dec 20, 2023
2b8addc
Merge branch 'dev' into update-refresh-token-handling
FalkWolsky Dec 20, 2023
dff2119
Merge pull request #589 from lowcoder-org/update-refresh-token-handling
FalkWolsky Dec 20, 2023
cb48221
Update for Chinese Language
Dec 20, 2023
3c13c27
remove unused npm modules
raheeliftikhar5 Dec 20, 2023
09b2e2a
upgrade mermaid
raheeliftikhar5 Dec 20, 2023
f6a0416
removed @testing-library/user-event
raheeliftikhar5 Dec 20, 2023
df577d1
upgrade axios
raheeliftikhar5 Dec 20, 2023
b73df0b
upgrade codemirror
raheeliftikhar5 Dec 20, 2023
e0b7c17
remove @testing-library/react
raheeliftikhar5 Dec 21, 2023
c975e53
fix tests
raheeliftikhar5 Dec 21, 2023
e3d1e44
Merge pull request #598 from lowcoder-org/dev
FalkWolsky Dec 21, 2023
ea12bc5
upgrade react, react-dom, @types/react, @types/react-dom and fixes
raheeliftikhar5 Dec 27, 2023
b4a9873
Merge pull request #593 from raheeliftikhar5/remove-unused-modules
FalkWolsky Dec 27, 2023
54786b8
publish comps workflow
raheeliftikhar5 Dec 28, 2023
ae43e5f
upgrade styles-components dependency
raheeliftikhar5 Dec 29, 2023
1cd00c2
Add Select (dropdown) column type to tables
jreyesr Dec 31, 2023
1e03ad2
updates after styled-compoents upgrade + fixing unit tests
raheeliftikhar5 Jan 1, 2024
c3bca96
Rework to finalize oauth(inherit from login) for rest api datasource
aq-ikhwa-tech Jan 1, 2024
6469516
Add handling for oauth(inherit from login) for rest api datasource
aq-ikhwa-tech Jan 1, 2024
27f45f7
fix: remove unnecessary check
aq-ikhwa-tech Jan 1, 2024
e32669c
Merge branch 'dev' into add-auth-handling-to-rest-api-datasource
aq-ikhwa-tech Jan 1, 2024
33e9b9a
Merge pull request #611 from lowcoder-org/add-auth-handling-to-rest-a…
FalkWolsky Jan 2, 2024
6ed2520
Add oauth(inherit from login) handling for graphql datasource
aq-ikhwa-tech Jan 2, 2024
61d548e
fixed video end bug
freddysundowner Jan 3, 2024
c990411
Merge pull request #612 from lowcoder-org/add-oauth-handling-to-graphql
FalkWolsky Jan 3, 2024
83d254e
Enabling selection of OAuth Token in FE
Jan 3, 2024
818cb5d
Fix auth provider attributes matching to lc attributes
aq-ikhwa-tech Jan 3, 2024
38b992b
Merge branch 'dev' into fix-oauth-provider-attributes-mapping
aq-ikhwa-tech Jan 3, 2024
2eddc01
Merge pull request #614 from lowcoder-org/fix-oauth-provider-attribut…
FalkWolsky Jan 3, 2024
9aaf4b8
Removing Typedoc
Jan 3, 2024
57b6120
OAuth impersonation for GraphQL
Jan 3, 2024
3381113
unit test fixes
raheeliftikhar5 Jan 4, 2024
ab73917
fixed unit tests
raheeliftikhar5 Jan 4, 2024
c4f898a
test workflow
raheeliftikhar5 Jan 4, 2024
796da3c
test workflow
raheeliftikhar5 Jan 4, 2024
52c9ceb
test workflow
raheeliftikhar5 Jan 4, 2024
5f060af
test workflow
raheeliftikhar5 Jan 4, 2024
26918a7
test workflow
raheeliftikhar5 Jan 4, 2024
b4c0c16
test workflow
raheeliftikhar5 Jan 4, 2024
86ece8e
test workflow
raheeliftikhar5 Jan 4, 2024
96751cd
test workflow
raheeliftikhar5 Jan 4, 2024
1814ff6
test workflow
raheeliftikhar5 Jan 4, 2024
763b6f1
test workflow
raheeliftikhar5 Jan 4, 2024
a987f29
test workflow
raheeliftikhar5 Jan 4, 2024
893d9fd
test workflow
raheeliftikhar5 Jan 4, 2024
7f73699
test workflow
raheeliftikhar5 Jan 4, 2024
b87c556
test workflow
raheeliftikhar5 Jan 5, 2024
7f8e816
test workflow
raheeliftikhar5 Jan 5, 2024
1e702b2
test workflow
raheeliftikhar5 Jan 5, 2024
79ae92d
test workflow
raheeliftikhar5 Jan 5, 2024
8252f7e
test workflow
raheeliftikhar5 Jan 5, 2024
85feb40
test workflow
raheeliftikhar5 Jan 5, 2024
45d7cce
publish lowcoder-comps workflow
raheeliftikhar5 Jan 5, 2024
61f6c23
test lowcoder-cli pipeline
raheeliftikhar5 Jan 5, 2024
a9abad1
test lowcoder-cli pipeline
raheeliftikhar5 Jan 5, 2024
1aa6c19
test lowcoder-cli pipeline
raheeliftikhar5 Jan 5, 2024
954497f
test lowcoder-cli pipeline
raheeliftikhar5 Jan 5, 2024
74d17a7
test lowcoder-cli pipeline
raheeliftikhar5 Jan 5, 2024
41470f0
test lowcoder-cli pipeline
raheeliftikhar5 Jan 5, 2024
a160f0b
test lowcoder-cli pipeline
raheeliftikhar5 Jan 5, 2024
e90e3b3
publish lowcoder-cli workflow
raheeliftikhar5 Jan 5, 2024
92b6de6
test lowcoder-core pipeline
raheeliftikhar5 Jan 5, 2024
3a444fa
test lowcoder-core pipeline
raheeliftikhar5 Jan 5, 2024
04b61f2
publish lowcoder-core workflow
raheeliftikhar5 Jan 5, 2024
c592c10
publish lowcoder-core workflow
raheeliftikhar5 Jan 5, 2024
4344485
test lowcoder-sdk pipeline
raheeliftikhar5 Jan 5, 2024
b988fe1
test lowcoder-sdk pipeline
raheeliftikhar5 Jan 5, 2024
520b626
publish lowcoder-sdk workflow
raheeliftikhar5 Jan 5, 2024
3fd234d
branch and access token update
raheeliftikhar5 Jan 5, 2024
2416789
Merge pull request #617 from raheeliftikhar5/publish-comps-workflow
FalkWolsky Jan 5, 2024
ab6d195
Regenerate Columns in Table Fix
Jan 6, 2024
c86afa3
Update Lowcoder CLI Version
Jan 6, 2024
ef96a58
Fix the fix in Lowcoder Design - was a mistake
Jan 6, 2024
031bc86
Fix readme location in Lowcoder CLI
Jan 6, 2024
3cfd977
Update Demo Plugin Sources
Jan 6, 2024
e410d95
Update Demo Plugin Sources - fix package
Jan 6, 2024
bdc2385
Update Demo Plugin Sources - fix readme
Jan 6, 2024
4dbd74d
Update Lowcoder Readme to name our new Sponsor
Jan 6, 2024
a35a815
fix: updated helm chart to reflect all recent changes
ludomikula Jan 7, 2024
085a9d0
Add forwarding of oauth token to node service
aq-ikhwa-tech Jan 8, 2024
8f6ea6f
Merge branch 'dev' into feat/issue-412
FalkWolsky Jan 8, 2024
5692cc6
Merge pull request #602 from jreyesr/feat/issue-412
FalkWolsky Jan 8, 2024
0858b4f
Merge branch 'dev' into agora-integrationn
FalkWolsky Jan 9, 2024
07b1484
fix: add COMMON_WORKSPACE_MODE setting to docker-compose files and he…
ludomikula Jan 9, 2024
6002540
Merge pull request #620 from lowcoder-org/agora-integrationn
FalkWolsky Jan 9, 2024
2476c6f
Merge pull request #621 from lowcoder-org/dev
FalkWolsky Jan 9, 2024
9cff751
added repo check + version check with published packages
raheeliftikhar5 Jan 10, 2024
701321d
testing worflows
raheeliftikhar5 Jan 10, 2024
a740ab4
testing workflows
raheeliftikhar5 Jan 10, 2024
46a61d0
testing workflows
raheeliftikhar5 Jan 10, 2024
d769c75
testing workflows
raheeliftikhar5 Jan 10, 2024
f18b34d
testing workflows
raheeliftikhar5 Jan 10, 2024
dcffcbe
workflow updates
raheeliftikhar5 Jan 10, 2024
1d71c48
Finalize handling for open api oauth inherit from login workflow
aq-ikhwa-tech Jan 10, 2024
ede2e4e
Merge branch 'dev' into add-oauth-handling-for-open-api-datasources
aq-ikhwa-tech Jan 10, 2024
e1d2094
Update test to fix node run failure
aq-ikhwa-tech Jan 10, 2024
baaeee8
Fallback for missing Translation fields
Jan 10, 2024
cb27ed3
Merge branch 'main' into feature/translations
FalkWolsky Jan 10, 2024
dfd3ded
Merge pull request #625 from lowcoder-org/feature/translations
FalkWolsky Jan 10, 2024
86d0f29
fix column disappear on resize
raheeliftikhar5 Jan 11, 2024
cc9af45
remove double shadow from table toolbar popups
raheeliftikhar5 Jan 11, 2024
5a28671
show/hide column title in table
raheeliftikhar5 Jan 11, 2024
113c768
Merge pull request #624 from lowcoder-org/add-oauth-handling-for-open…
FalkWolsky Jan 11, 2024
9d81d29
Merge branch 'dev' into worflows-updates
FalkWolsky Jan 11, 2024
b20c97f
Merge pull request #626 from raheeliftikhar5/worflows-updates
FalkWolsky Jan 11, 2024
89b1acd
Merge pull request #618 from lowcoder-org/deployment_updates
FalkWolsky Jan 11, 2024
8d485a2
Table Styles update
Jan 11, 2024
4d6f8da
Margins, Header, Borders
Jan 12, 2024
2d76ceb
added step control for number type columns
raheeliftikhar5 Jan 12, 2024
6bd21e7
show links as per space available for table links type columns
raheeliftikhar5 Jan 12, 2024
342c9da
table events added for rowShrink and download
raheeliftikhar5 Jan 12, 2024
05eacdc
table events added for columnEdited and search
raheeliftikhar5 Jan 12, 2024
6fa43f1
added precision for float number columns
raheeliftikhar5 Jan 12, 2024
185b169
Merge pull request #628 from raheeliftikhar5/table-updates
FalkWolsky Jan 13, 2024
683c87e
Margins, Header, Borders 2
Jan 13, 2024
1be2fc5
Resize handles
Jan 14, 2024
f1ced9f
Merge pull request #630 from lowcoder-org/main
FalkWolsky Jan 14, 2024
7371565
Color settings
Jan 14, 2024
c59cf2d
Merge branch 'dev' into feature/table-styling
FalkWolsky Jan 14, 2024
f0db976
Merge pull request #631 from lowcoder-org/feature/table-styling
FalkWolsky Jan 14, 2024
8ee1306
adapted Chinese language file
Jan 14, 2024
067ded9
Style Icons
Jan 14, 2024
e1e8b3b
Button Hover fix, Text Weight
Jan 14, 2024
6e1ba90
fix for color picker to show selected color
raheeliftikhar5 Jan 15, 2024
96da6e4
Merge pull request #634 from raheeliftikhar5/color-picker-fix
FalkWolsky Jan 15, 2024
a6685f9
Merge pull request #635 from lowcoder-org/dev
FalkWolsky Jan 15, 2024
6ee55e2
Allow editing folder name + handle queries name overflow issue
raheeliftikhar5 Jan 15, 2024
c8282d1
Merge pull request #636 from raheeliftikhar5/data-queries-fix
FalkWolsky Jan 15, 2024
0ece0bf
Button Hover fix, Text Weight, Background, Tabs
Jan 15, 2024
952da2f
Merge branch 'dev' into feature/styletypes-improvement
FalkWolsky Jan 15, 2024
e616845
Merge pull request #637 from lowcoder-org/feature/styletypes-improvement
FalkWolsky Jan 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file modified .DS_Store
Binary file not shown.
50 changes: 50 additions & 0 deletions .github/workflows/publish-lowcoder-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish Lowcoder CLI

on:
push:
branches: [ "dev" ]

jobs:
publish-package:
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check version changes
uses: EndBug/version-check@v1
id: check
with:
diff-search: true
static-checking: localIsNew
file-name: client/packages/lowcoder-cli/package.json
file-url: https://unpkg.com/lowcoder-cli@latest/package.json

- name: Version update detected
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'

- name: Set up Node.js for NPM
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Install dependencies
if: steps.check.outputs.changed == 'true'
uses: borales/actions-yarn@v4.2.0
with:
cmd: install
dir: client/packages/lowcoder-cli

- name: Publish package to NPM
if: steps.check.outputs.changed == 'true'
run: npm publish
working-directory: client/packages/lowcoder-cli
env:
NODE_AUTH_TOKEN: ${{ secrets.LOWCODERNPMBOT }}
52 changes: 52 additions & 0 deletions .github/workflows/publish-lowcoder-comps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish Lowcoder Comps

on:
push:
branches: [ "dev" ]

jobs:
publish-package:
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check version changes
uses: EndBug/version-check@v1
id: check
with:
diff-search: true
static-checking: localIsNew
file-name: client/packages/lowcoder-comps/package.json
file-url: https://unpkg.com/lowcoder-comps@latest/package.json

- name: Version update detected
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'

- name: Set up Node.js for NPM
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Install dependencies
if: steps.check.outputs.changed == 'true'
uses: borales/actions-yarn@v4.2.0
with:
cmd: install
dir: client/packages/lowcoder-comps

- name: Publish
if: steps.check.outputs.changed == 'true'
uses: borales/actions-yarn@v4.2.0
with:
cmd: build_publish
dir: client/packages/lowcoder-comps
env:
NODE_AUTH_TOKEN: ${{ secrets.LOWCODERNPMBOT }}
50 changes: 50 additions & 0 deletions .github/workflows/publish-lowcoder-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish Lowcoder Core

on:
push:
branches: [ "dev" ]

jobs:
publish-package:
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check version changes
uses: EndBug/version-check@v1
id: check
with:
diff-search: true
static-checking: localIsNew
file-name: client/packages/lowcoder-core/package.json
file-url: https://unpkg.com/lowcoder-core@latest/package.json

- name: Version update detected
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'

- name: Set up Node.js for NPM
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Install dependencies
if: steps.check.outputs.changed == 'true'
uses: borales/actions-yarn@v4.2.0
with:
cmd: install
dir: client/packages/lowcoder-core

- name: Publish package to NPM
if: steps.check.outputs.changed == 'true'
run: npm publish
working-directory: client/packages/lowcoder-core
env:
NODE_AUTH_TOKEN: ${{ secrets.LOWCODERNPMBOT }}
57 changes: 57 additions & 0 deletions .github/workflows/publish-lowcoder-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish Lowcoder SDK

on:
push:
branches: [ "dev" ]

jobs:
publish-package:
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check version changes
uses: EndBug/version-check@v1
id: check
with:
diff-search: true
static-checking: localIsNew
file-name: client/packages/lowcoder-sdk/package.json
file-url: https://unpkg.com/lowcoder-sdk@latest/package.json

- name: Version update detected
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'

- name: Set up Node.js for NPM
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Install dependencies
if: steps.check.outputs.changed == 'true'
uses: borales/actions-yarn@v4.2.0
with:
cmd: install
dir: client/packages/lowcoder-sdk

- name: Build Package
if: steps.check.outputs.changed == 'true'
uses: borales/actions-yarn@v4.2.0
with:
cmd: build
dir: client/packages/lowcoder-sdk

- name: Publish package to NPM
if: steps.check.outputs.changed == 'true'
run: npm publish
working-directory: client/packages/lowcoder-sdk
env:
NODE_AUTH_TOKEN: ${{ secrets.LOWCODERNPMBOT }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ client/node_modules/
client/packages/lowcoder-plugin-demo/.yarn/install-state.gz
client/packages/lowcoder-plugin-demo/yarn.lock
client/packages/lowcoder-plugin-demo/.yarn/cache/@types-node-npm-16.18.68-56f72825c0-094ae9ed80.zip
.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ You can access Lowcoder from [cloud-hosted version](https://app.lowcoder.cloud/)
Accelerate the growth of Lowcoder and unleash its potential with your Sponsorship – together, we're shaping the future of Lowcode for everyone!
[Be a Sponsor](https://github.com/sponsors/lowcoder-org)

Like ... @CHSchuepfer. Thank you very much!
Like ... @CHSchuepfer & @spacegoats-io. Thank you very much!!
2 changes: 1 addition & 1 deletion client/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dev
dev
37 changes: 21 additions & 16 deletions client/config/test/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import path from "node:path";
import { buildVars } from "../../packages/lowcoder-dev-utils/buildVars.js";
import { currentDirName } from "../../packages/lowcoder-dev-utils/util.js";
import path, { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { buildVars } from "../../scripts/buildVars.js";

export function currentDirName(importMetaUrl) {
return dirname(fileURLToPath(importMetaUrl));
}


const globals = {};
buildVars.forEach(({ name, defaultValue }) => {
Expand All @@ -9,34 +14,34 @@ buildVars.forEach(({ name, defaultValue }) => {
const edition = process.env.REACT_APP_EDITION;
const isEEGlobal = edition === "enterprise-global";
const isEE = edition === "enterprise" || isEEGlobal;
const dirname = currentDirName(import.meta.url);
const currentDir = currentDirName(import.meta.url);

export default {
testEnvironment: "jsdom",
moduleNameMapper: {
"react-markdown": path.resolve(dirname, "./mocks/react-markdown.js"),
"\\.md\\?url$": path.resolve(dirname, "./mocks/markdown-url-module.js"),
"react-markdown": path.resolve(currentDir, "./mocks/react-markdown.js"),
"\\.md\\?url$": path.resolve(currentDir, "./mocks/markdown-url-module.js"),
"^@lowcoder-ee(.*)$": path.resolve(
dirname,
currentDir,
isEE ? "../../packages/lowcoder/src/ee/$1" : "../../packages/lowcoder/src/$1"
),
"lowcoder-sdk": path.resolve(dirname, "../../packages/lowcoder/src/index.sdk"),
"lowcoder-sdk": path.resolve(currentDir, "../../packages/lowcoder/src/index.sdk"),
},
globals,
// roots: ["<rootDir>/src"],
modulePaths: [
"<rootDir>/src",
path.resolve(dirname, "../../packages/lowcoder/src"),
path.resolve(dirname, "../../packages/lowcoder-comps/src"),
path.resolve(dirname, "../../packages/lowcoder-design/src"),
path.resolve(currentDir, "../../packages/lowcoder/src"),
path.resolve(currentDir, "../../packages/lowcoder-comps/src"),
path.resolve(currentDir, "../../packages/lowcoder-design/src"),
],
setupFiles: [path.resolve(dirname, "./jest.setup.js")],
setupFilesAfterEnv: [path.resolve(dirname, "./jest.setup-after-env.js")],
setupFiles: [path.resolve(currentDir, "./jest.setup.js")],
setupFilesAfterEnv: [path.resolve(currentDir, "./jest.setup-after-env.js"), 'jest-canvas-mock'],
transform: {
"^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": path.resolve(dirname, "./transform/babelTransform.js"),
"^.+\\.css$": path.resolve(dirname, "./transform/cssTransform.js"),
"^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": path.resolve(currentDir, "./transform/babelTransform.js"),
"^.+\\.css$": path.resolve(currentDir, "./transform/cssTransform.js"),
"^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)": path.resolve(
dirname,
currentDir,
"./transform/fileTransform.js"
),
},
Expand Down
33 changes: 33 additions & 0 deletions client/config/test/jest.setup-after-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,36 @@ window.ResizeObserver = function () {
disconnect: () => {},
};
};

Object.defineProperty(window, 'ImageData', { value: 'yourValue' });
Object.defineProperty(window, 'MediaStreamTrack', { value: 'yourValue' });
Object.defineProperty(window, 'URL', {
writable: true,
value: {
createObjectURL: jest.fn(),
}
});
Object.defineProperty(window, "navigator", {
writable: true,
value: {
mediaDevices: {
enumerateDevices: jest.fn(),
},
userAgent: '',
language: '',
browserLanguage: '',
},
});

class Worker {
constructor(stringUrl) {
this.url = stringUrl;
this.onmessage = () => {};
}

postMessage(msg) {
this.onmessage(msg);
}
}

window.Worker = Worker;
12 changes: 5 additions & 7 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
"@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-typescript": "^8.5.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/ali-oss": "^6.16.4",
"@types/file-saver": "^2.0.5",
"@types/jest": "^29.2.2",
"@types/mime": "^2.0.3",
Expand All @@ -37,21 +34,19 @@
"@types/react-resizable": "^3.0.5",
"@types/react-router-dom": "^5.3.2",
"@types/shelljs": "^0.8.11",
"@types/styled-components": "^5.1.19",
"@types/stylis": "^4.0.2",
"@types/tern": "0.23.4",
"@types/toposort": "^2.0.3",
"@types/ua-parser-js": "^0.7.36",
"@welldone-software/why-did-you-render": "^6.2.3",
"add": "^2.0.6",
"babel-jest": "^29.3.0",
"babel-preset-react-app": "^10.0.1",
"husky": "^8.0.1",
"jest": "^29.5.0",
"jest-canvas-mock": "^2.5.2",
"jest-environment-jsdom": "^29.5.0",
"lint-staged": "^13.0.1",
"lowcoder-cli": "workspace:^",
"lowcoder-dev-utils": "workspace:^",
"mq-polyfill": "^1.1.8",
"prettier": "^3.1.0",
"rimraf": "^3.0.2",
Expand All @@ -67,14 +62,17 @@
},
"packageManager": "yarn@3.6.4",
"resolutions": {
"@types/react": "^17",
"@types/react": "^18",
"moment": "2.29.2",
"canvas": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.2.1.tgz",
"react-virtualized@^9.22.3": "patch:react-virtualized@npm%3A9.22.3#./.yarn/patches/react-virtualized-npm-9.22.3-0fff3cbf64.patch",
"eslint-plugin-only-ascii@^0.0.0": "patch:eslint-plugin-only-ascii@npm%3A0.0.0#./.yarn/patches/eslint-plugin-only-ascii-npm-0.0.0-29e3417685.patch"
},
"dependencies": {
"@lottiefiles/react-lottie-player": "^3.5.3",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"@types/styled-components": "^5.1.34",
"antd-mobile": "^5.28.0",
"chalk": "4",
"number-precision": "^1.6.0",
Expand Down
Loading