@jd-data-limited/easy-fm 4.1.15 → 5.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +60 -196
  2. package/dist/bin/generateTypes.js +3 -3
  3. package/dist/bin/stressSearch.d.ts +2 -0
  4. package/dist/bin/stressSearch.js +243 -0
  5. package/dist/connection/CookieJar.d.ts +19 -0
  6. package/dist/connection/CookieJar.js +99 -0
  7. package/dist/connection/FMHost.d.ts +25 -11
  8. package/dist/connection/FMHost.js +29 -11
  9. package/dist/connection/HostBase.d.ts +4 -4
  10. package/dist/connection/Session.d.ts +34 -0
  11. package/dist/connection/Session.js +109 -0
  12. package/dist/connection/database.d.ts +34 -31
  13. package/dist/connection/database.js +72 -133
  14. package/dist/connection/databaseBase.d.ts +22 -10
  15. package/dist/connection/databaseConstantSession.d.ts +15 -0
  16. package/dist/connection/databaseConstantSession.js +70 -0
  17. package/dist/connection/databaseSessionPool.d.ts +14 -0
  18. package/dist/connection/databaseSessionPool.js +148 -0
  19. package/dist/index.d.ts +24 -4
  20. package/dist/index.js +15 -1
  21. package/dist/layouts/layout.d.ts +5 -3
  22. package/dist/layouts/layout.js +11 -15
  23. package/dist/layouts/layoutBase.d.ts +3 -2
  24. package/dist/layouts/layoutInterface.d.ts +2 -1
  25. package/dist/layouts/layoutRecordManager.d.ts +6 -15
  26. package/dist/layouts/layoutRecordManager.js +6 -15
  27. package/dist/models/apiResults.d.ts +209 -93
  28. package/dist/models/apiResults.js +95 -25
  29. package/dist/records/field.d.ts +17 -2
  30. package/dist/records/field.js +161 -237
  31. package/dist/records/fields/baseField.d.ts +57 -0
  32. package/dist/records/fields/baseField.js +59 -0
  33. package/dist/records/fields/containerField.d.ts +35 -0
  34. package/dist/records/fields/containerField.js +78 -0
  35. package/dist/records/fields/field.d.ts +3 -0
  36. package/dist/records/fields/field.js +1 -0
  37. package/dist/records/fields/valueField.d.ts +41 -0
  38. package/dist/records/fields/valueField.js +108 -0
  39. package/dist/records/getOperations/recordGetOperation.d.ts +7 -4
  40. package/dist/records/getOperations/recordGetOperation.js +22 -26
  41. package/dist/records/layoutRecord.d.ts +27 -9
  42. package/dist/records/layoutRecord.js +84 -97
  43. package/dist/records/portal.d.ts +1 -5
  44. package/dist/records/portal.js +0 -4
  45. package/dist/records/portalBase.d.ts +1 -2
  46. package/dist/records/portalRecord.d.ts +7 -4
  47. package/dist/records/portalRecord.js +12 -0
  48. package/dist/records/recordBase.d.ts +8 -6
  49. package/dist/records/recordBase.js +32 -33
  50. package/dist/types.d.ts +42 -18
  51. package/dist/types.js +12 -0
  52. package/dist/utils/addHeaders.d.ts +5 -0
  53. package/dist/utils/addHeaders.js +24 -0
  54. package/dist/utils/query.d.ts +24 -8
  55. package/dist/utils/query.js +60 -20
  56. package/dist/utils/temporal.d.ts +9 -0
  57. package/dist/utils/temporal.js +110 -0
  58. package/package.json +35 -31
package/package.json CHANGED
@@ -1,14 +1,10 @@
1
1
  {
2
2
  "name": "@jd-data-limited/easy-fm",
3
- "version": "4.1.15",
3
+ "version": "5.0.0-beta.2",
4
4
  "dependencies": {
5
- "@types/follow-redirects": "^1.14.4",
6
- "@types/node": "^22.7.7",
7
- "commander": "^14.0.0",
8
- "follow-redirects": "^1.15.5",
9
- "moment": "^2.29.4",
10
- "node-fetch": "^3.3.2",
11
- "node-fetch-cookies": "^2.1.1"
5
+ "commander": "^15.0.0",
6
+ "temporal-polyfill": "^1.0.5",
7
+ "zod": "^4.6.5"
12
8
  },
13
9
  "type": "module",
14
10
  "main": "dist/index.js",
@@ -41,37 +37,45 @@
41
37
  "url": "https://github.com/JD-Data-Limited/easy-fm/issues"
42
38
  },
43
39
  "engines": {
44
- "node": ">=20.9.0"
40
+ "node": ">=22.22.3"
45
41
  },
46
42
  "devDependencies": {
47
- "@babel/cli": "^7.25.7",
48
- "@babel/core": "^7.25.8",
49
- "@babel/preset-env": "^7.25.8",
50
- "@babel/preset-typescript": "^7.25.7",
51
- "@types/btoa": "^1.2.3",
52
- "@types/events": "^3.0.0",
53
- "@types/inquirer": "^9.0.7",
54
- "@types/jest": "^29.5.13",
55
- "@typescript-eslint/eslint-plugin": "^6.21.0",
56
- "babel-jest": "^29.7.0",
57
- "dotenv": "^16.3.1",
58
- "eslint": "^8.57.0",
43
+ "@babel/cli": "^8.0.6",
44
+ "@babel/core": "^8.0.6",
45
+ "@babel/preset-env": "^8.0.6",
46
+ "@babel/preset-typescript": "^8.0.1",
47
+ "@types/btoa": "^1.2.5",
48
+ "@types/events": "^3.0.3",
49
+ "@types/inquirer": "^9.0.10",
50
+ "@types/jest": "^30.0.0",
51
+ "@types/node": "^26.6.2",
52
+ "@typescript-eslint/eslint-plugin": "^8.70.1",
53
+ "babel-jest": "^30.5.2",
54
+ "dotenv": "^18.0.2",
55
+ "eslint": "^10.11.0",
59
56
  "eslint-config-standard-with-typescript": "^43.0.1",
60
- "eslint-plugin-import": "^2.29.1",
61
- "eslint-plugin-n": "^16.6.2",
62
- "eslint-plugin-promise": "^6.1.1",
63
- "inquirer": "^9.2.13",
64
- "jest": "^29.7.0",
65
- "ts-jest": "^29.2.5",
66
- "ts-morph": "^21.0.1",
67
- "tsx": "^4.19.4",
68
- "typescript": "^5.6.3"
57
+ "eslint-plugin-import": "^2.32.0",
58
+ "eslint-plugin-n": "^18.3.0",
59
+ "eslint-plugin-promise": "^7.3.0",
60
+ "inquirer": "^14.2.2",
61
+ "jest": "^30.5.2",
62
+ "ts-jest": "^29.4.12",
63
+ "ts-morph": "^28.0.0",
64
+ "tsx": "^4.23.15",
65
+ "typedoc": "^0.28.20",
66
+ "typescript": "^6.0.3"
69
67
  },
70
68
  "bin": {
71
69
  "easyfm": "dist/bin/cli.js"
72
70
  },
73
71
  "scripts": {
74
72
  "build": "tsc",
75
- "test": "npm run build && jest"
73
+ "test": "npm run build && jest",
74
+ "test:types": "tsc --project tsconfig.test.json",
75
+ "test:coverage": "jest --coverage --testPathIgnorePatterns='/__tests__/database.test.ts$'",
76
+ "test:integration": "npm run build && jest __tests__/database.test.ts --runInBand",
77
+ "test:unit": "jest __tests__/query.test.ts __tests__/CookieJar.test.ts --runInBand",
78
+ "stress:search": "tsx src/bin/stressSearch.ts",
79
+ "docs:build": "typedoc --options ./docs/theme.json"
76
80
  }
77
81
  }