quickbase-js 1.1.0-beta.6 → 1.1.0

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 (111) hide show
  1. package/README.md +253 -135
  2. package/dist/esm/quickbase.d.ts +5614 -2861
  3. package/dist/esm/quickbase.js +3204 -2116
  4. package/dist/esm/quickbase.js.map +1 -1
  5. package/dist/esm/quickbase.min.js +1 -1
  6. package/dist/esm/quickbase.min.js.map +1 -1
  7. package/dist/umd/quickbase.umd.js +3533 -2325
  8. package/dist/umd/quickbase.umd.js.map +1 -1
  9. package/dist/umd/quickbase.umd.min.js +1 -1
  10. package/dist/umd/quickbase.umd.min.js.map +1 -1
  11. package/package.json +49 -32
  12. package/CHANGELOG.md +0 -93
  13. package/build.js +0 -186
  14. package/dist/umd/quickbase.umd.d.ts +0 -5341
  15. package/examples/react.js +0 -48
  16. package/examples/vanillajs.html +0 -47
  17. package/examples/vanillatest.html +0 -49
  18. package/log-gen.yaml +0 -1372
  19. package/open-api/definitions/apps.ts +0 -274
  20. package/open-api/definitions/auth.ts +0 -10
  21. package/open-api/definitions/fields.ts +0 -751
  22. package/open-api/definitions/index.ts +0 -18
  23. package/open-api/definitions/records.ts +0 -269
  24. package/open-api/definitions/relationships.ts +0 -90
  25. package/open-api/definitions/reports.ts +0 -10
  26. package/open-api/definitions/tables.ts +0 -112
  27. package/open-api/fix-spec-main.ts +0 -176
  28. package/open-api/generate-unified-interface.ts +0 -170
  29. package/open-api/output/quickbase-fixed.json +0 -6760
  30. package/open-api/paths/apps.ts +0 -100
  31. package/open-api/paths/auth.ts +0 -25
  32. package/open-api/paths/fields.ts +0 -207
  33. package/open-api/paths/index.ts +0 -17
  34. package/open-api/paths/records.ts +0 -68
  35. package/open-api/paths/relationships.ts +0 -32
  36. package/open-api/paths/reports.ts +0 -34
  37. package/open-api/paths/tables.ts +0 -162
  38. package/open-api/regenerate-client.ts +0 -110
  39. package/playwright-results.txt/.last-run.json +0 -4
  40. package/playwright.config.ts +0 -37
  41. package/rollup.config.mjs +0 -114
  42. package/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json +0 -46878
  43. package/src/generated-unified/QuickbaseClient.ts +0 -62
  44. package/src/index.ts +0 -1
  45. package/src/quickbaseClient.ts +0 -313
  46. package/src/tokenCache.ts +0 -51
  47. package/test-artifacts/.last-run.json +0 -6
  48. package/test-esm.js +0 -1
  49. package/test-results.json +0 -2050
  50. package/test-umd.js +0 -1
  51. package/test.ts +0 -1
  52. package/tests/playwright/qb/auth/cacheSwitching.test.ts +0 -189
  53. package/tests/playwright/qb/auth/fetchTempToken401.test.ts +0 -217
  54. package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +0 -151
  55. package/tests/playwright/qb/auth/getTempToken.test.ts +0 -180
  56. package/tests/playwright/qb/auth/tokenPrefetch.test.ts +0 -192
  57. package/tests/playwright/qb/auth/tokenRenewal.test.ts +0 -110
  58. package/tests/playwright/qb/auth/umd.test.ts +0 -10
  59. package/tests/setup.ts +0 -51
  60. package/tests/vitest/qb/apps/copyApp.test.ts +0 -76
  61. package/tests/vitest/qb/apps/createApp.test.ts +0 -64
  62. package/tests/vitest/qb/apps/deleteApp.test.ts +0 -76
  63. package/tests/vitest/qb/apps/getApp.test.ts +0 -40
  64. package/tests/vitest/qb/fields/createField.test.ts +0 -78
  65. package/tests/vitest/qb/fields/deleteFields.test.ts +0 -89
  66. package/tests/vitest/qb/fields/getField.test.ts +0 -85
  67. package/tests/vitest/qb/fields/getFieldUsage.test.ts +0 -174
  68. package/tests/vitest/qb/fields/getFields.test.ts +0 -232
  69. package/tests/vitest/qb/fields/getFieldsUsage.test.ts +0 -77
  70. package/tests/vitest/qb/index.ts +0 -28
  71. package/tests/vitest/qb/records/deleteRecords.test.ts +0 -110
  72. package/tests/vitest/qb/records/runQuery.test.ts +0 -146
  73. package/tests/vitest/qb/records/upsert.test.ts +0 -102
  74. package/tests/vitest/qb/tables/createTable.test.ts +0 -55
  75. package/tests/vitest/qb/tables/deleteTable.test.ts +0 -50
  76. package/tests/vitest/qb/tables/getAppTables.test.ts +0 -46
  77. package/tests/vitest/qb/tables/getRelationships.test.ts +0 -80
  78. package/tests/vitest/qb/tables/getTable.test.ts +0 -26
  79. package/tests/vitest/qb/tables/updateTable.test.ts +0 -48
  80. package/tests/vitest/unit/apps/copyApp.test.ts +0 -282
  81. package/tests/vitest/unit/apps/createApp.test.ts +0 -125
  82. package/tests/vitest/unit/apps/deleteApp.test.ts +0 -215
  83. package/tests/vitest/unit/apps/getApp.test.ts +0 -86
  84. package/tests/vitest/unit/auth/fetchTempToken401.test.ts +0 -85
  85. package/tests/vitest/unit/auth/getTempToken.test.ts +0 -95
  86. package/tests/vitest/unit/auth/retryOn401.test.ts +0 -106
  87. package/tests/vitest/unit/auth/two401s.test.ts +0 -77
  88. package/tests/vitest/unit/fields/createField.test.ts +0 -391
  89. package/tests/vitest/unit/fields/deleteFields.test.ts +0 -141
  90. package/tests/vitest/unit/fields/getField.test.ts +0 -189
  91. package/tests/vitest/unit/fields/getFieldUsage.test.ts +0 -147
  92. package/tests/vitest/unit/fields/getFields.test.ts +0 -122
  93. package/tests/vitest/unit/fields/getFieldsUsage.test.ts +0 -160
  94. package/tests/vitest/unit/index.ts +0 -33
  95. package/tests/vitest/unit/records/deleteRecords.test.ts +0 -112
  96. package/tests/vitest/unit/records/runQuery.test.ts +0 -102
  97. package/tests/vitest/unit/records/upsert.test.ts +0 -218
  98. package/tests/vitest/unit/tables/createTable.test.ts +0 -70
  99. package/tests/vitest/unit/tables/deleteTable.test.ts +0 -77
  100. package/tests/vitest/unit/tables/getAppTables.test.ts +0 -85
  101. package/tests/vitest/unit/tables/getRelationships.test.ts +0 -259
  102. package/tests/vitest/unit/tables/getTable.test.ts +0 -233
  103. package/tests/vitest/unit/tables/updateTable.test.ts +0 -80
  104. package/tests/vitest/unit/umd.test.ts +0 -8
  105. package/text.txt +0 -104
  106. package/tools/log-gen.ts +0 -175
  107. package/tools/openapi-jars/openapi-generator-cli-7.12.0.jar +0 -0
  108. package/tsconfig.build.json +0 -17
  109. package/tsconfig.json +0 -29
  110. package/versionrc.json +0 -9
  111. package/vitest.config.ts +0 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quickbase-js",
3
- "version": "1.1.0-beta.6",
3
+ "version": "1.1.0",
4
4
  "description": "QuickBase JavaScript client for frameworks and vanilla JS",
5
5
  "type": "module",
6
6
  "main": "dist/esm/quickbase.js",
@@ -11,6 +11,7 @@
11
11
  },
12
12
  "exports": {
13
13
  ".": {
14
+ "types": "./dist/esm/quickbase.d.ts",
14
15
  "import": {
15
16
  "minified": "./dist/esm/quickbase.min.js",
16
17
  "default": "./dist/esm/quickbase.js"
@@ -19,59 +20,73 @@
19
20
  "minified": "./dist/umd/quickbase.umd.min.js",
20
21
  "default": "./dist/umd/quickbase.umd.js"
21
22
  },
22
- "types": "./dist/esm/quickbase.d.ts",
23
23
  "umd:types": "./dist/umd/quickbase.umd.d.ts"
24
24
  }
25
25
  },
26
+ "files": [
27
+ "dist/**/*",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
26
31
  "scripts": {
27
- "release": "standard-version",
32
+ "build": "npm run build:esm && npm run build:umd",
33
+ "build:esm": "rimraf dist/esm dist/temp dist/temp-src && node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' build-esm.js",
34
+ "build:umd": "rimraf dist/umd dist/temp dist/temp-src && node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' build-umd.js",
35
+ "release:prepare": "standard-version",
28
36
  "release:beta": "standard-version --prerelease beta",
29
- "release:alpha": "standard-version --prerelease alpha",
30
- "release:push": "npm run release:beta && git push --follow-tags origin main",
31
- "release:publish": "npm run release:push && npm publish --tag beta",
32
- "release:stable": "standard-version && git push --follow-tags origin main && npm publish",
33
- "fix-spec": "node --loader ts-node/esm open-api/fix-spec-main.ts",
34
- "regenerate:openapi": "rimraf src/generated && node --loader ts-node/esm open-api/regenerate-client.ts",
35
- "regenerate:unified": "node --loader ts-node/esm open-api/generate-unified-interface.ts",
36
- "regenerate:all": "npm run fix-spec && npm run regenerate:openapi && npm run regenerate:unified",
37
- "log-gen": "node --loader ts-node/esm tools/log-gen.ts",
38
- "build": "rimraf dist && node --loader ts-node/esm build.js",
39
- "build:prod": "rimraf dist && NODE_ENV=production node --loader ts-node/esm build.js",
40
- "test:all": "vitest run tests/vitest/**/**/*.test.ts --reporter=basic && playwright test tests/playwright/qb --config playwright.config.ts --reporter=dot --quiet",
41
- "test:pw:qb:all": "playwright test tests/playwright/qb --config playwright.config.ts",
37
+ "release:patch": "standard-version --release-as patch",
38
+ "release:minor": "standard-version --release-as minor",
39
+ "release:major": "standard-version --release-as major",
40
+ "gen:fixspec": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/fix-spec-main.ts",
41
+ "gen:openapi": "rimraf src/generated && node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/regenerate-client.ts",
42
+ "gen:openapi:post": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/post-process-generated.ts",
43
+ "gen:unified": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/generate-unified-interface.ts",
44
+ "gen:docsdata": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/generateDocsJson.ts",
45
+ "docs:dev": "vitepress dev docs",
46
+ "docs:build": "vitepress build docs",
47
+ "docs:preview": "vitepress preview docs",
48
+ "gen:all": "npm run gen:fixspec && npm run gen:openapi && npm run gen:openapi:post && npm run gen:unified && npm run gen:docsdata && npm run docs:build",
49
+ "log-gen": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' tools/log-gen.ts",
50
+ "test:all": "NODE_OPTIONS='--no-experimental-strip-types' vitest run tests/vitest/**/**/*.test.ts --reporter=basic && NODE_OPTIONS='--no-experimental-strip-types' playwright test tests/playwright/qb --config playwright.config.ts --reporter=dot --quiet",
51
+ "test:pw:qb:all": "playwright test --config playwright.config.ts tests/playwright/qb/**/*.test.ts",
42
52
  "test:vitest:all": "vitest run tests/vitest/**/**/*.test.ts",
43
53
  "test:vitest:qb": "vitest run tests/vitest/qb/**/*.test.ts",
44
54
  "test:vitest:unit": "vitest run tests/vitest/unit/**/*.test.ts",
45
- "test:vitest:qb:apps": "vitest run tests/vitest/qb/apps/**/*.test.ts",
46
- "test:vitest:qb:auth": "vitest run tests/vitest/qb/auth/**/*.test.ts",
47
- "test:vitest:qb:fields": "vitest run tests/vitest/qb/fields/**/*.test.ts",
48
- "test:vitest:qb:records": "vitest run tests/vitest/qb/records/**/*.test.ts",
49
- "test:vitest:qb:tables": "vitest run tests/vitest/qb/tables/**/*.test.ts",
50
- "test:vitest:unit:apps": "vitest run tests/vitest/unit/apps/**/*.test.ts",
51
- "test:vitest:unit:auth": "vitest run tests/vitest/unit/auth/**/*.test.ts",
52
- "test:vitest:unit:fields": "vitest run tests/vitest/unit/fields/**/*.test.ts",
53
- "test:vitest:unit:records": "vitest run tests/vitest/unit/records/**/*.test.ts",
54
- "test:vitest:unit:tables": "vitest run tests/vitest/unit/tables/**/*.test.ts",
55
+ "test:vitest:qb:apps": "vitest run tests/vitest/qb/apps/*.test.ts",
56
+ "test:vitest:qb:auth": "vitest run tests/vitest/qb/auth/*.test.ts",
57
+ "test:vitest:qb:fields": "vitest run tests/vitest/qb/fields/*.test.ts",
58
+ "test:vitest:qb:records": "vitest run tests/vitest/qb/records/*.test.ts",
59
+ "test:vitest:qb:tables": "vitest run tests/vitest/qb/tables/*.test.ts",
60
+ "test:vitest:qb:quickbase-js": "vitest run tests/vitest/qb/quickbase-js/*.test.ts",
61
+ "test:vitest:unit:apps": "vitest run tests/vitest/unit/apps/*.test.ts",
62
+ "test:vitest:unit:auth": "vitest run tests/vitest/unit/auth/*.test.ts",
63
+ "test:vitest:unit:fields": "vitest run tests/vitest/unit/fields/*.test.ts",
64
+ "test:vitest:unit:formulas": "vitest run tests/vitest/unit/formulas/*.test.ts",
65
+ "test:vitest:unit:records": "vitest run tests/vitest/unit/records/*.test.ts",
66
+ "test:vitest:unit:tables": "vitest run tests/vitest/unit/tables/*.test.ts",
67
+ "test:vitest:unit:quickbase-js": "vitest run tests/vitest/unit/quickbase-js/*.test.ts",
55
68
  "test:pw:qb:auth": "playwright test tests/playwright/qb/auth"
56
69
  },
57
- "dependencies": {
58
- "typescript": "^5.8.2"
59
- },
60
70
  "devDependencies": {
61
- "@openapitools/openapi-generator-cli": "^2.17.0",
71
+ "@openapitools/openapi-generator-cli": "^2.18.4",
62
72
  "@playwright/test": "^1.51.0",
63
73
  "@rollup/plugin-commonjs": "^28.0.3",
64
- "@rollup/plugin-node-resolve": "^16.0.0",
74
+ "@rollup/plugin-node-resolve": "^16.0.1",
65
75
  "@rollup/plugin-terser": "^0.4.4",
66
76
  "@rollup/plugin-typescript": "^12.1.2",
77
+ "@types/fast-json-patch": "^1.0.4",
67
78
  "@types/js-yaml": "^4.0.9",
68
79
  "@types/node": "^22.13.10",
69
80
  "dotenv": "^16.4.7",
70
- "glob": "^11.0.1",
81
+ "express": "^4.21.2",
82
+ "fast-json-patch": "^3.1.1",
83
+ "glob": "^10.4.5",
71
84
  "js-yaml": "^4.1.0",
72
85
  "jsdom": "^26.0.0",
73
86
  "node-fetch": "^3.3.2",
87
+ "openapi-schema-validator": "^12.1.3",
74
88
  "openapi-types": "^12.1.3",
89
+ "openapi-typescript": "^7.6.1",
75
90
  "rimraf": "^5.0.10",
76
91
  "rollup": "^4.35.0",
77
92
  "rollup-plugin-dts": "^6.1.1",
@@ -79,7 +94,9 @@
79
94
  "ts-morph": "^25.0.1",
80
95
  "ts-node": "^10.9.2",
81
96
  "tslib": "^2.8.1",
97
+ "typescript": "^5.8.2",
82
98
  "undici-types": "^7.5.0",
99
+ "vitepress": "^1.6.3",
83
100
  "vitest": "^3.0.8"
84
101
  }
85
102
  }
package/CHANGELOG.md DELETED
@@ -1,93 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
-
5
- ## [1.1.0-beta.6](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.5...v1.1.0-beta.6) (2025-03-13)
6
-
7
-
8
- ### Features
9
-
10
- * omit credientials for all api calls that are not fetching a temp token ([b1b4aae](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b1b4aae02aaa655e6eaab2fe0d532d526e6dc69f))
11
-
12
- ## [1.1.0-beta.5](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.4...v1.1.0-beta.5) (2025-03-13)
13
-
14
-
15
- ### Features
16
-
17
- * ESM and UMD build prod ([49513e9](https://github.com/DrewBradfordXYZ/quickbase-js/commit/49513e902e7bf4dd35da3c6508242e96507a91bd))
18
- * ESM and UMD support and src folder reorganization ([dc0170b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/dc0170b547e6e9e57a117fbcccfdbeb86e48a8c7))
19
-
20
- ## [1.1.0-beta.4](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.3...v1.1.0-beta.4) (2025-03-12)
21
-
22
-
23
- ### Features
24
-
25
- * createField and deleteFields tests are passing ([4b47c4d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4b47c4deb9b3d731e6e7938c12fcebe97830568b))
26
- * createField mock and integration tests pass ([b227c73](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b227c73b08f7efa5ce5f3d0c2897f82c8976a009))
27
- * deleteFields spec update ([1f8beca](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1f8becaca0d6b7950648c1b9bc2b0215781fa829))
28
- * getFeildsUsage.test.ts unit and integration tests pass ([82a4886](https://github.com/DrewBradfordXYZ/quickbase-js/commit/82a488622967ec24a8767cbb19c59ef4ce808749))
29
- * getField.test.ts unit and integration tests pass ([3e50b70](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3e50b704f0ebea47f2fee3d02d811ea1b43db6c4))
30
- * getFieldsUsage fix spec ([031faaa](https://github.com/DrewBradfordXYZ/quickbase-js/commit/031faaaeab9597f35fdd1ddcf5157ce5d774390b))
31
- * getFieldUsage spec and unit test pass ([ac2824b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ac2824b226140dde99e33cf594d57bd6ffd4dc39))
32
- * getFieldUsage unit and integration tests pass ([e62b586](https://github.com/DrewBradfordXYZ/quickbase-js/commit/e62b586d534620479a25dda2796ba5dcb8043705))
33
- * split up fix-spec-paths and fix-spec-definitions into many files ([20d3246](https://github.com/DrewBradfordXYZ/quickbase-js/commit/20d32464e6337028778845fa55fbb19c5543f7eb))
34
-
35
-
36
- ### Bug Fixes
37
-
38
- * cleanup createField.test.ts logging ([7b1306b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/7b1306bd8eb49e2c932ce267f33457e949e0f74b))
39
- * createField test syntax update ([043f964](https://github.com/DrewBradfordXYZ/quickbase-js/commit/043f964a47346878440eb73cc10c110dab904ad7))
40
- * getFieldsUsage type fix ([4c6f271](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4c6f271d123131ae13a236664f28fbbdfde3d564))
41
- * update deleteFields error type spec ([1788e1c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1788e1ce6d4d2c8df871ec8b112be908d706f884))
42
-
43
- ## [1.1.0-beta.3](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.2...v1.1.0-beta.3) (2025-03-11)
44
-
45
- ### Features
46
-
47
- - copyApp fix-spec updates ([4c10ab4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4c10ab41464df047402a207c7b9e81026a7b6202))
48
- - copyApp unit test passes ([b121bf1](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b121bf1d0130f338f131de5417896d798fe90db3))
49
- - deleteApp fix spec added ([b27ce11](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b27ce11e2b08bc631d7656dedec57f6f5e579450))
50
- - fix-spec-\* for getRelationship interface ([aad9fbd](https://github.com/DrewBradfordXYZ/quickbase-js/commit/aad9fbd7fc92b8aaaef901174c81169543ae86d2))
51
- - getRelationship unit and integration test pass ([a1269bb](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a1269bb60523944bdf5030404539043c967f0b83))
52
- - updated Upsert200Response and Upsert207Response, deleteRecords.test.ts integration type issues resolved ([d39dad5](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d39dad55d783d280db9dbae2ca4c782df3a1f12e))
53
- - usertokens 401s do not generate a token, createApp unit and integration tests, deleteApp integration tests pass ([e3a092d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/e3a092d76f283d5c5200ddbb5afd32782fc15379))
54
-
55
- ## [1.1.0-beta.2](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.1...v1.1.0-beta.2) (2025-03-11)
56
-
57
- ## [1.1.0-beta.1](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.0...v1.1.0-beta.1) (2025-03-11)
58
-
59
- ### Features
60
-
61
- - runQuery.test.ts integration test pass ([180b17f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/180b17f265c26a0d23bde3ca6993bad1ba4f65ee))
62
- - runQuery.test.ts unit test pass ([84e2fc4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/84e2fc4f237d5f558fcd20d7b6b8eb83f685d7ac))
63
-
64
- ### Bug Fixes
65
-
66
- - added stub variables to unit tests ([d84b534](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d84b5344201300d8d59e622b025d96ad9813d4eb))
67
- - create env stubs for mock tests and update getTables.test.ts ([3d31c9e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3d31c9ebc9f852b99d1a807759490055d75c6396))
68
-
69
- ## [1.1.0-beta.0](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.0.1-beta.0...v1.1.0-beta.0) (2025-03-11)
70
-
71
- ### Features
72
-
73
- - add deleteTable integration test with 404 verification ([277aec6](https://github.com/DrewBradfordXYZ/quickbase-js/commit/277aec66a3047fab687ce81ad42b9371e8c2bf56))
74
- - deleteRecords integration and unit tests ([d3beba1](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d3beba1a362b13166b38f59eeea83c289ddaf999))
75
- - integration tests for deleteRecords and upsert pass ([759978b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/759978bc13cb1c50c03770232eb02a1c3c08428d))
76
- - mock deleteRecords passes ([a167028](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a1670286def030950c568e92ca99ea12e20d5b62))
77
- - upsert mock test passes ([dde6d07](https://github.com/DrewBradfordXYZ/quickbase-js/commit/dde6d07d4c4c73bd14189f87fdc6347744004e4e))
78
-
79
- ### Bug Fixes
80
-
81
- - all vitests are passing again ([7206ba3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/7206ba3f28bd7a3c7f5d699988e9a9a1f0053f42))
82
- - fix-spec and test updates for createTable ([9c0cdd3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/9c0cdd3b707971e6fb8f3e73598e3a600ff2b33d))
83
- - fix-spec for upsertRecords and createApp ([d12de40](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d12de40feac35e5d86a0b7d5019d8058cdfcffd9))
84
- - fix-spec getTable ([1eb936c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1eb936c360ce5df4818b8d5ef7ccf4dc6b769af0))
85
- - fix-spec getTable deleteTable ([236349a](https://github.com/DrewBradfordXYZ/quickbase-js/commit/236349af9e30776e00754232d83d76e065aab00b))
86
- - fix-spec updates for createApp ([3614958](https://github.com/DrewBradfordXYZ/quickbase-js/commit/36149589ff2544ec50a82d9dc9b183f15d07778d))
87
- - fix-spec updateTable ([26e278c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/26e278cdbbe96d33e51f14e90ebb2c8b47d70f07))
88
- - getTables test pass, change order for extractDbid to assign temp token dbid ([37b7685](https://github.com/DrewBradfordXYZ/quickbase-js/commit/37b7685d55a0f64e62cb91ad23df28d4916d5a50))
89
- - upsert unit test type fixes ([8460cc8](https://github.com/DrewBradfordXYZ/quickbase-js/commit/8460cc8e63564bc8602dc12a9b6415094cc215f0))
90
-
91
- ### 1.0.1-beta.0 (2025-03-10)
92
-
93
- Testing done in a consuming library for getApp() and getFields()
package/build.js DELETED
@@ -1,186 +0,0 @@
1
- import { execSync } from 'child_process';
2
- import { rollup } from 'rollup';
3
- import terser from '@rollup/plugin-terser';
4
- import nodeResolve from '@rollup/plugin-node-resolve';
5
- import commonjs from '@rollup/plugin-commonjs';
6
- import dts from 'rollup-plugin-dts';
7
- import { rimrafSync } from 'rimraf';
8
- import { copyFileSync, readdirSync, readFileSync, writeFileSync, mkdirSync, statSync } from 'fs';
9
- import { join } from 'path';
10
-
11
- // Clean the dist folder
12
- rimrafSync('dist');
13
- rimrafSync('dist/temp-src');
14
-
15
- // Step 1: Copy runtime-relevant files from src/ to dist/temp-src and remove .ts extensions
16
- const srcDir = join(process.cwd(), 'src');
17
- const tempSrcDir = join(process.cwd(), 'dist/temp-src');
18
- const runtimeDirs = ['generated', 'generated-unified'];
19
- const runtimeFiles = ['index.ts', 'quickbaseClient.ts', 'tokenCache.ts'];
20
-
21
- function copyAndRewriteTsExtensions(src, dest) {
22
- console.log(`Copying from ${src} to ${dest}`);
23
- mkdirSync(dest, { recursive: true });
24
- const files = readdirSync(src, { withFileTypes: true });
25
- for (const file of files) {
26
- const srcPath = join(src, file.name);
27
- const destPath = join(dest, file.name);
28
- if (file.isDirectory()) {
29
- if (runtimeDirs.includes(file.name) || runtimeDirs.some(dir => src.includes(dir))) {
30
- copyAndRewriteTsExtensions(srcPath, destPath);
31
- } else {
32
- console.log(`Skipping non-runtime directory ${srcPath}`);
33
- }
34
- } else if (file.name.endsWith('.ts')) {
35
- if (runtimeFiles.includes(file.name) || src.includes('generated') || src.includes('generated-unified')) {
36
- console.log(`Processing ${srcPath} -> ${destPath}`);
37
- let content = readFileSync(srcPath, 'utf8');
38
- content = content.replace(/(from\s+["']\.[\w\/-]+)\.ts(["'])/g, '$1$2');
39
- content = content.replace(/(export\s+\*\s+from\s+["']\.[\w\/-]+)\.ts(["'])/g, '$1$2');
40
- writeFileSync(destPath, content, 'utf8');
41
- } else {
42
- console.log(`Skipping non-runtime file ${srcPath}`);
43
- }
44
- } else {
45
- console.log(`Skipping non-.ts file ${srcPath}`);
46
- }
47
- }
48
- }
49
- copyAndRewriteTsExtensions(srcDir, tempSrcDir);
50
-
51
- // Step 2: Compile TypeScript to JavaScript with tsc
52
- console.log('Running tsc...');
53
- const tsFiles = readdirSync(tempSrcDir, { recursive: true })
54
- .filter(file => file.endsWith('.ts'))
55
- .map(file => join(tempSrcDir, file));
56
- const tscCommand = `npx tsc ${tsFiles.join(' ')} --outDir ${join(process.cwd(), 'dist/temp')} --module ESNext --target ESNext --sourceMap --moduleResolution bundler --baseUrl ${process.cwd()}`;
57
- console.log(`Command: ${tscCommand}`);
58
- execSync(tscCommand, { stdio: 'inherit' });
59
-
60
- // Step 3: Rollup configuration
61
- const isProd = process.env.NODE_ENV === 'production';
62
- const external = [
63
- 'node:http', 'node:https', 'node:zlib', 'node:stream', 'node:buffer',
64
- 'node:util', 'node:url', 'node:net', 'node:fs', 'node:path', 'node-fetch',
65
- ];
66
- const globals = { 'node-fetch': 'fetch' };
67
-
68
- // Function to create Rollup bundle
69
- async function createBundle(input, plugins, format, outputOptions) {
70
- const bundle = await rollup({
71
- input,
72
- external,
73
- plugins,
74
- });
75
- await bundle.write(outputOptions);
76
- await bundle.close();
77
- }
78
-
79
- // ESM Builds
80
- console.log('Building ESM bundles...');
81
- // Unminified ESM build (always generated)
82
- await createBundle(
83
- 'dist/temp/quickbaseClient.js',
84
- [
85
- nodeResolve({ preferBuiltins: true }),
86
- commonjs(),
87
- ],
88
- 'esm',
89
- {
90
- dir: 'dist/esm',
91
- format: 'esm',
92
- sourcemap: true,
93
- entryFileNames: 'quickbase.js',
94
- }
95
- );
96
-
97
- // Minified ESM build (only in production)
98
- if (isProd) {
99
- await createBundle(
100
- 'dist/temp/quickbaseClient.js',
101
- [
102
- nodeResolve({ preferBuiltins: true }),
103
- commonjs(),
104
- terser(),
105
- ],
106
- 'esm',
107
- {
108
- dir: 'dist/esm',
109
- format: 'esm',
110
- sourcemap: true,
111
- entryFileNames: 'quickbase.min.js',
112
- }
113
- );
114
- }
115
-
116
- // UMD Builds
117
- console.log('Building UMD bundles...');
118
- // Unminified UMD build (always generated)
119
- await createBundle(
120
- 'dist/temp/quickbaseClient.js',
121
- [
122
- nodeResolve({ preferBuiltins: true, browser: true }),
123
- commonjs(),
124
- ],
125
- 'umd',
126
- {
127
- file: join(process.cwd(), 'dist/umd', 'quickbase.umd.js'),
128
- format: 'umd',
129
- name: 'QuickbaseJS',
130
- sourcemap: true,
131
- globals,
132
- }
133
- );
134
-
135
- // Minified UMD build (only in production)
136
- if (isProd) {
137
- await createBundle(
138
- 'dist/temp/quickbaseClient.js',
139
- [
140
- nodeResolve({ preferBuiltins: true, browser: true }),
141
- commonjs(),
142
- terser(),
143
- ],
144
- 'umd',
145
- {
146
- file: join(process.cwd(), 'dist/umd', 'quickbase.umd.min.js'),
147
- format: 'umd',
148
- name: 'QuickbaseJS',
149
- sourcemap: true,
150
- globals,
151
- }
152
- );
153
- }
154
-
155
- // Declarations
156
- console.log('Generating declarations...');
157
- const dtsBundle = await rollup({
158
- input: 'src/quickbaseClient.ts',
159
- plugins: [dts({ tsconfig: './tsconfig.json', respectExternal: true })],
160
- });
161
- await dtsBundle.write({ file: 'dist/esm/quickbase.d.ts', format: 'esm' });
162
- await dtsBundle.write({ file: 'dist/umd/quickbase.umd.d.ts', format: 'umd' });
163
- await dtsBundle.close();
164
-
165
- // Clean up
166
- rimrafSync('dist/temp');
167
- rimrafSync('dist/temp-src');
168
-
169
- // List generated files and their sizes
170
- console.log('\nGenerated files:');
171
- function listFilesWithSizes(dir, prefix = '') {
172
- const files = readdirSync(dir, { withFileTypes: true });
173
- for (const file of files) {
174
- const filePath = join(dir, file.name);
175
- if (file.isDirectory()) {
176
- listFilesWithSizes(filePath, `${prefix}${file.name}/`);
177
- } else {
178
- const stats = statSync(filePath);
179
- const sizeKB = (stats.size / 1024).toFixed(2);
180
- console.log(`${prefix}${file.name} - ${sizeKB} KB`);
181
- }
182
- }
183
- }
184
- listFilesWithSizes(join(process.cwd(), 'dist'));
185
-
186
- console.log('\nBuild completed successfully');