• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 8477114564

29 Mar 2024 04:16AM CUT coverage: 82.458% (+60.6%) from 21.83%
8477114564

push

github

web-flow
feat: support increment import (#484)

* fix: should not set content-length in `axios` header

* chore: remove sdk `BaseSelect` customer filter

* feat: support increment import

* test: add inplace import e2e

fix: sqlite conflict error in import e2e

* fix: `BaseSelect` filter ignore case sensitive

* fix: gen uniq name compatible pure number string

* chore: unify import fn name

* feat: add inplace import error tips

* chore: move import types to `@teable/openapi` from `@teable/core`

* feat: reset selected import field when shift sheet when inplace import mul-workbook in excel

* chore: adjust inplace import params description in `@teable/openapi`

* chore: lint error

* feat: inplace import auth validate

* test: compatible import e2e datecompare

3937 of 4142 branches covered (95.05%)

66 of 70 new or added lines in 3 files covered. (94.29%)

26136 of 31696 relevant lines covered (82.46%)

1210.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/apps/nestjs-backend/src/features/calculation/utils/name-console.ts
1
// eslint-disable-next-line @typescript-eslint/no-explicit-any, sonarjs/cognitive-complexity
×
2
function replaceFieldIdsWithNames(obj: any, fieldMap: { [fieldId: string]: { name: string } }) {
×
3
  if (typeof obj === 'object' && obj !== null) {
×
4
    for (const key in obj) {
×
5
      // eslint-disable-next-line no-prototype-builtins
×
6
      if (obj.hasOwnProperty(key)) {
×
7
        let newKey = key;
×
8
        if (key.startsWith('fld') && fieldMap[key]) {
×
9
          newKey = fieldMap[key].name;
×
10
        }
×
11
        obj[newKey] = replaceFieldIdsWithNames(obj[key], fieldMap);
×
12
        if (newKey !== key) delete obj[key];
×
13
      }
×
14
    }
×
15
  } else if (typeof obj === 'string' && obj.startsWith('fld') && fieldMap[obj]) {
×
16
    obj = fieldMap[obj].name;
×
17
  }
×
18
  return obj;
×
19
}
×
20

×
21
export function nameConsole(
×
22
  key: string,
×
23
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
×
24
  obj: any,
×
25
  fieldMap: { [fieldId: string]: { name: string } }
×
26
) {
×
27
  obj = JSON.parse(JSON.stringify(obj));
×
28
  console.log(key, JSON.stringify(replaceFieldIdsWithNames(obj, fieldMap), null, 2));
×
29
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc