quickbase-js 0.1.0-beta.9 → 1.0.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.
- package/README.md +270 -60
- package/dist/esm/quickbase.d.ts +2553 -3220
- package/dist/esm/quickbase.js +1545 -3443
- package/dist/esm/quickbase.js.map +1 -1
- package/dist/esm/quickbase.min.js +1 -1
- package/dist/esm/quickbase.min.js.map +1 -1
- package/dist/umd/quickbase.umd.js +1544 -3625
- package/dist/umd/quickbase.umd.js.map +1 -1
- package/dist/umd/quickbase.umd.min.js +1 -1
- package/dist/umd/quickbase.umd.min.js.map +1 -1
- package/package.json +25 -12
- package/CHANGELOG.md +0 -184
- package/build-common.js +0 -131
- package/build-esm.js +0 -71
- package/build-umd.js +0 -69
- package/examples/quicbase-jsCDN.html +0 -36
- package/examples/react.js +0 -48
- package/examples/vanillajs.html +0 -47
- package/open-api/fix-spec-main.ts +0 -97
- package/open-api/generate-override-report.ts +0 -214
- package/open-api/generate-unified-interface.ts +0 -336
- package/open-api/output/override-report.html +0 -11
- package/open-api/output/override-report.json +0 -14395
- package/open-api/output/quickbase-fixed.json +0 -11191
- package/open-api/regenerate-client.ts +0 -116
- package/open-api/schema/enhance-general.ts +0 -100
- package/open-api/schema/fix-arrays.ts +0 -69
- package/open-api/schema/tags/apps.ts +0 -90
- package/open-api/schema/tags/fields.ts +0 -471
- package/open-api/schema/tags/groups.ts +0 -51
- package/open-api/schema/tags/index.ts +0 -66
- package/open-api/schema/tags/records.ts +0 -115
- package/open-api/schema/tags/tables.ts +0 -211
- package/open-api/schema/tags/users.ts +0 -47
- package/open-api/types/spec.ts +0 -42
- package/open-api/utils/generateJsDoc.ts +0 -96
- package/open-api/utils/infer-schema.ts +0 -40
- package/open-api/utils/naming.ts +0 -10
- package/playwright.config.ts +0 -37
- package/rollup.config.js +0 -114
- package/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json +0 -46878
- package/specs/split/apps.json +0 -1315
- package/specs/split/auth.json +0 -191
- package/specs/split/fields.json +0 -3869
- package/specs/split/records.json +0 -754
- package/specs/split/reports.json +0 -619
- package/specs/split/tables.json +0 -1605
- package/src/RateLimitError.ts +0 -12
- package/src/ThrottleBucket.ts +0 -41
- package/src/authorizationStrategy.ts +0 -246
- package/src/generated-unified/QuickbaseClient.ts +0 -1049
- package/src/generated-unified/missing-types-report.json +0 -3
- package/src/index.ts +0 -1
- package/src/invokeMethod.ts +0 -242
- package/src/quickbaseClient.ts +0 -271
- package/src/rateLimiter.ts +0 -25
- package/src/tokenCache.ts +0 -35
- package/src/utils.ts +0 -7
- package/test-esm.js +0 -1
- package/test-results.json +0 -2050
- package/test-umd.js +0 -1
- package/test.ts +0 -1
- package/tests/playwright/qb/auth/cacheSwitching.test.ts +0 -159
- package/tests/playwright/qb/auth/fetchTempToken401.test.ts +0 -219
- package/tests/playwright/qb/auth/getAppWithTempToken.test.ts +0 -162
- package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +0 -153
- package/tests/playwright/qb/auth/getTempToken.test.ts +0 -152
- package/tests/playwright/qb/auth/tempTokenPrefetch.test.ts +0 -179
- package/tests/playwright/qb/auth/tempTokenRenewal.test.ts +0 -133
- package/tests/setup.ts +0 -53
- package/tests/vitest/qb/apps/copyApp.test.ts +0 -76
- package/tests/vitest/qb/apps/createApp.test.ts +0 -64
- package/tests/vitest/qb/apps/deleteApp.test.ts +0 -76
- package/tests/vitest/qb/apps/getApp.test.ts +0 -44
- package/tests/vitest/qb/apps/getAppEvents.test.ts +0 -67
- package/tests/vitest/qb/apps/updateApp.test.ts +0 -58
- package/tests/vitest/qb/auth/mockQuickbaseServer.ts +0 -60
- package/tests/vitest/qb/auth/retryUserToken401.test.ts +0 -73
- package/tests/vitest/qb/auth/ssoTokenIntegrationWithServer.test.ts +0 -65
- package/tests/vitest/qb/fields/createField.test.ts +0 -77
- package/tests/vitest/qb/fields/deleteFields.test.ts +0 -83
- package/tests/vitest/qb/fields/getField.test.ts +0 -85
- package/tests/vitest/qb/fields/getFieldUsage.test.ts +0 -82
- package/tests/vitest/qb/fields/getFields.test.ts +0 -232
- package/tests/vitest/qb/fields/getFieldsUsage.test.ts +0 -77
- package/tests/vitest/qb/fields/updateField.test.ts +0 -93
- package/tests/vitest/qb/formulas/runFormula.test.ts +0 -96
- package/tests/vitest/qb/index.ts +0 -29
- package/tests/vitest/qb/records/deleteRecords.test.ts +0 -110
- package/tests/vitest/qb/records/runQuery.test.ts +0 -146
- package/tests/vitest/qb/records/upsert.test.ts +0 -102
- package/tests/vitest/qb/tables/createRelationship.test.ts +0 -102
- package/tests/vitest/qb/tables/createTable.test.ts +0 -55
- package/tests/vitest/qb/tables/deleteRelationship.test.ts +0 -143
- package/tests/vitest/qb/tables/deleteTable.test.ts +0 -50
- package/tests/vitest/qb/tables/getAppTables.test.ts +0 -46
- package/tests/vitest/qb/tables/getRelationships.test.ts +0 -80
- package/tests/vitest/qb/tables/getTable.test.ts +0 -26
- package/tests/vitest/qb/tables/updateRelationship.test.ts +0 -250
- package/tests/vitest/qb/tables/updateTable.test.ts +0 -48
- package/tests/vitest/unit/ThrottleBucket.test.ts +0 -95
- package/tests/vitest/unit/apps/copyApp.test.ts +0 -581
- package/tests/vitest/unit/apps/createApp.test.ts +0 -186
- package/tests/vitest/unit/apps/deleteApp.test.ts +0 -216
- package/tests/vitest/unit/apps/getApp.test.ts +0 -128
- package/tests/vitest/unit/apps/getAppEvents.test.ts +0 -193
- package/tests/vitest/unit/apps/updateApp.test.ts +0 -412
- package/tests/vitest/unit/auth/fetchTempToken401.test.ts +0 -63
- package/tests/vitest/unit/auth/getTempToken.test.ts +0 -119
- package/tests/vitest/unit/auth/retryTempToken401.test.ts +0 -95
- package/tests/vitest/unit/auth/retryTempTokenMaxRetries.test.ts +0 -235
- package/tests/vitest/unit/auth/retryUserToken401.test.ts +0 -69
- package/tests/vitest/unit/auth/ssoTokenRefresh.test.ts +0 -325
- package/tests/vitest/unit/fields/createField.test.ts +0 -451
- package/tests/vitest/unit/fields/deleteFields.test.ts +0 -141
- package/tests/vitest/unit/fields/getField.test.ts +0 -189
- package/tests/vitest/unit/fields/getFieldUsage.test.ts +0 -180
- package/tests/vitest/unit/fields/getFields.test.ts +0 -122
- package/tests/vitest/unit/fields/getFieldsUsage.test.ts +0 -160
- package/tests/vitest/unit/fields/updateField.test.ts +0 -285
- package/tests/vitest/unit/formulas/runFormula.test.ts +0 -205
- package/tests/vitest/unit/index.ts +0 -34
- package/tests/vitest/unit/inferHttpMethod.test.ts +0 -131
- package/tests/vitest/unit/rateLimit.test.ts +0 -191
- package/tests/vitest/unit/records/deleteRecords.test.ts +0 -112
- package/tests/vitest/unit/records/runQuery.test.ts +0 -102
- package/tests/vitest/unit/records/upsert.test.ts +0 -234
- package/tests/vitest/unit/tables/createRelationship.test.ts +0 -212
- package/tests/vitest/unit/tables/createTable.test.ts +0 -70
- package/tests/vitest/unit/tables/deleteRelationship.test.ts +0 -97
- package/tests/vitest/unit/tables/deleteTable.test.ts +0 -77
- package/tests/vitest/unit/tables/getAppTables.test.ts +0 -85
- package/tests/vitest/unit/tables/getRelationships.test.ts +0 -259
- package/tests/vitest/unit/tables/getTable.test.ts +0 -233
- package/tests/vitest/unit/tables/updateRelationship.test.ts +0 -307
- package/tests/vitest/unit/tables/updateTable.test.ts +0 -80
- package/tests/vitest/unit/tokenLifespan.test.ts +0 -204
- package/tests/vitest/unit/umd.test.ts +0 -8
- package/text.txt +0 -104
- package/tools/log-gen.ts +0 -244
- package/tools/log-gen.yaml +0 -5424
- package/tools/openapi-jars/openapi-generator-cli-7.12.0.jar +0 -0
- package/tsconfig.build.json +0 -17
- package/tsconfig.json +0 -32
- package/versionrc.json +0 -9
- package/vitest.config.ts +0 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickbase-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "QuickBase JavaScript client for frameworks and vanilla JS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/quickbase.js",
|
|
@@ -23,24 +23,34 @@
|
|
|
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
32
|
"build": "npm run build:esm && npm run build:umd",
|
|
28
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",
|
|
29
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",
|
|
30
|
-
"release": "standard-version",
|
|
31
|
-
"release:beta": "standard-version --prerelease beta",
|
|
32
|
-
"release:
|
|
33
|
-
"release:
|
|
34
|
-
"release:
|
|
35
|
-
"release:
|
|
36
|
-
"
|
|
37
|
-
"
|
|
35
|
+
"release:prepare": "standard-version",
|
|
36
|
+
"release:beta": "npm run build && standard-version --prerelease beta && git push --follow-tags origin main && npm publish --tag beta",
|
|
37
|
+
"release:stable": "npm run build && standard-version --release-as 1.0.0 && git push --follow-tags origin main && npm publish",
|
|
38
|
+
"release:patch": "npm run build && standard-version --release-as patch && git push --follow-tags origin main && npm publish",
|
|
39
|
+
"release:minor": "npm run build && standard-version --release-as minor && git push --follow-tags origin main && npm publish",
|
|
40
|
+
"release:major": "npm run build && standard-version --release-as major && git push --follow-tags origin main && npm publish",
|
|
41
|
+
"release": "npm run test:all && npm run release:stable",
|
|
42
|
+
"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",
|
|
38
43
|
"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",
|
|
44
|
+
"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",
|
|
39
45
|
"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",
|
|
40
|
-
"gen:
|
|
46
|
+
"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",
|
|
47
|
+
"docs:dev": "vitepress dev docs",
|
|
48
|
+
"docs:build": "vitepress build docs",
|
|
49
|
+
"docs:preview": "vitepress preview docs",
|
|
50
|
+
"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",
|
|
41
51
|
"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",
|
|
42
|
-
"test:all": "vitest run tests/vitest/**/**/*.test.ts --reporter=basic && playwright test tests/playwright/qb --config playwright.config.ts --reporter=dot --quiet",
|
|
43
|
-
"test:pw:qb:all": "playwright test
|
|
52
|
+
"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",
|
|
53
|
+
"test:pw:qb:all": "playwright test --config playwright.config.ts tests/playwright/qb/**/*.test.ts",
|
|
44
54
|
"test:vitest:all": "vitest run tests/vitest/**/**/*.test.ts",
|
|
45
55
|
"test:vitest:qb": "vitest run tests/vitest/qb/**/*.test.ts",
|
|
46
56
|
"test:vitest:unit": "vitest run tests/vitest/unit/**/*.test.ts",
|
|
@@ -49,12 +59,14 @@
|
|
|
49
59
|
"test:vitest:qb:fields": "vitest run tests/vitest/qb/fields/*.test.ts",
|
|
50
60
|
"test:vitest:qb:records": "vitest run tests/vitest/qb/records/*.test.ts",
|
|
51
61
|
"test:vitest:qb:tables": "vitest run tests/vitest/qb/tables/*.test.ts",
|
|
62
|
+
"test:vitest:qb:quickbase-js": "vitest run tests/vitest/qb/quickbase-js/*.test.ts",
|
|
52
63
|
"test:vitest:unit:apps": "vitest run tests/vitest/unit/apps/*.test.ts",
|
|
53
64
|
"test:vitest:unit:auth": "vitest run tests/vitest/unit/auth/*.test.ts",
|
|
54
65
|
"test:vitest:unit:fields": "vitest run tests/vitest/unit/fields/*.test.ts",
|
|
55
66
|
"test:vitest:unit:formulas": "vitest run tests/vitest/unit/formulas/*.test.ts",
|
|
56
67
|
"test:vitest:unit:records": "vitest run tests/vitest/unit/records/*.test.ts",
|
|
57
68
|
"test:vitest:unit:tables": "vitest run tests/vitest/unit/tables/*.test.ts",
|
|
69
|
+
"test:vitest:unit:quickbase-js": "vitest run tests/vitest/unit/quickbase-js/*.test.ts",
|
|
58
70
|
"test:pw:qb:auth": "playwright test tests/playwright/qb/auth"
|
|
59
71
|
},
|
|
60
72
|
"devDependencies": {
|
|
@@ -86,6 +98,7 @@
|
|
|
86
98
|
"tslib": "^2.8.1",
|
|
87
99
|
"typescript": "^5.8.2",
|
|
88
100
|
"undici-types": "^7.5.0",
|
|
101
|
+
"vitepress": "^1.6.3",
|
|
89
102
|
"vitest": "^3.0.8"
|
|
90
103
|
}
|
|
91
104
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,184 +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
|
-
## [0.1.0-beta.9](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v0.1.0-beta.8...v0.1.0-beta.9) (2025-03-20)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
* 429 and throttlebucket tests pass ([5591e19](https://github.com/DrewBradfordXYZ/quickbase-js/commit/5591e19357c3c3232337ec4ede020530a635aa76))
|
|
11
|
-
* add baseUrl with a default ([5c5829f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/5c5829fcbe32e780efebea903db11a505bb9166c))
|
|
12
|
-
* add SSO strategy ([501034d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/501034d363ffd7b4d5acdd9cf2932b5d97f249ee))
|
|
13
|
-
* all relationship tests are passing ([5cdd0e9](https://github.com/DrewBradfordXYZ/quickbase-js/commit/5cdd0e9aafe5d22e354f3915e45b3950eec98cdf))
|
|
14
|
-
* auth refactor, auth tests pass, other tests still have errors ([47f353f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/47f353f0fdb38813b9c047ec06059c9ff6354225))
|
|
15
|
-
* createField unit test passes ([676b6ab](https://github.com/DrewBradfordXYZ/quickbase-js/commit/676b6ab98379300b2d16e01c58b180bf1277ed86))
|
|
16
|
-
* createRelationship unit and integration tests pass ([577e7bb](https://github.com/DrewBradfordXYZ/quickbase-js/commit/577e7bbce7f7fa3d6ffbe1f9f2b7cb00e1a5e486))
|
|
17
|
-
* inferHttpMethod test and updateRelationship test pass ([1c6b342](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1c6b34203a2100f17e9f626f547d426252922c67))
|
|
18
|
-
* jsdoc documents type properties ([191d721](https://github.com/DrewBradfordXYZ/quickbase-js/commit/191d7211c5c1cecd55b2019237c132225cf2d461))
|
|
19
|
-
* retryTempTokenMaxRetires unit test pass and update copyApp unit test is now more self contained ([8f38b1b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/8f38b1b81a525702c6a49db07c1ef5b70a686792))
|
|
20
|
-
* retryUserToken401 integration test passes ([d78b0c6](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d78b0c62cea3c1a35b9beca3db30d9fa1596c4e7))
|
|
21
|
-
* runFormula integration test passes ([4e5927d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4e5927d51d10d44534430c58321580bc363a9496))
|
|
22
|
-
* runFormula unit test passes ([871d6e9](https://github.com/DrewBradfordXYZ/quickbase-js/commit/871d6e97c4aa93bc8a206337f20b8ba325e16a64))
|
|
23
|
-
* runFormula.test.ts unit test pass ([8fe27d8](https://github.com/DrewBradfordXYZ/quickbase-js/commit/8fe27d8401ac53f4da8e7a52ea4c8645c5a46508))
|
|
24
|
-
* sso integration test passes ([c09a02c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/c09a02cd379efd935dd0c256d8cf6fb4a7402a7e))
|
|
25
|
-
* sso unit test passes ([5e5baeb](https://github.com/DrewBradfordXYZ/quickbase-js/commit/5e5baeb3fb0a00e7301183346ef49b6aee483a6a))
|
|
26
|
-
* tokenLifespan unit test passes ([09a72a9](https://github.com/DrewBradfordXYZ/quickbase-js/commit/09a72a965a99bb6bd712cb705354c1904c72aebb))
|
|
27
|
-
* updateField unit test passes ([9a2aae1](https://github.com/DrewBradfordXYZ/quickbase-js/commit/9a2aae1338c53eb92a82a6bff212c275705d027e))
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Bug Fixes
|
|
31
|
-
|
|
32
|
-
* updateRelationship integration test cleanup ([d27c030](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d27c0303ec55162bea8d479064c5a93584cdef37))
|
|
33
|
-
|
|
34
|
-
## [0.1.0-beta.8](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v0.1.0-beta.7...v0.1.0-beta.8) (2025-03-18)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### Features
|
|
38
|
-
|
|
39
|
-
* add updateField subfields that are not included in raw spec, test pass ([4481cff](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4481cff81d4e6205a90537d49bb596214c0e45bd))
|
|
40
|
-
* build now works without error ([3f6ef2c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3f6ef2c1337f50b93bb937dd4de1d702c2eb984b))
|
|
41
|
-
* dev dependencies reinstall, pipeline runs again ([91a8216](https://github.com/DrewBradfordXYZ/quickbase-js/commit/91a8216064a48708fbf598e9d7be6084052cd439))
|
|
42
|
-
* generate-report for spec diff ([53ad6e7](https://github.com/DrewBradfordXYZ/quickbase-js/commit/53ad6e7d2f94683134dfa79e50022a8d2ab0b448))
|
|
43
|
-
* integration getApp and deleteFields pass ([ba07e9a](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ba07e9a68d298ab6dbcf326c865261fcc46b51ba))
|
|
44
|
-
* integration tests pass for getAppEvents and updateApp ([58f4d20](https://github.com/DrewBradfordXYZ/quickbase-js/commit/58f4d20b5e9d539e91ac29662cae4d2a5bb4eed0))
|
|
45
|
-
* rename TokenBucket to ThrottleBucket ([3a3cdb4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3a3cdb4869856622e40ae3898f7fc66d50918b6c))
|
|
46
|
-
* throttle limits and 429 retry ([a7aec4a](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a7aec4af37f0a74c0e42a938c97e6ce1df7c5250))
|
|
47
|
-
* tokenLifespan and separate invokeMethod.ts ([2336bce](https://github.com/DrewBradfordXYZ/quickbase-js/commit/2336bce25a9a22b6f14f2e3915e58849d5cb64f3))
|
|
48
|
-
* updateApp.test.ts unit test passes ([f2a3dcc](https://github.com/DrewBradfordXYZ/quickbase-js/commit/f2a3dcc904da07bbb1c363732df551da60430de1))
|
|
49
|
-
* updateField unit test pass ([c6ad2d5](https://github.com/DrewBradfordXYZ/quickbase-js/commit/c6ad2d53996bae3f7ed8a51a5795a6bfe0c293fd))
|
|
50
|
-
* updateRelationship integration test passes, creates and cleans summary and lookup fields ([cc6645f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/cc6645f91be43b1e63dc8b3428a24af42b69ad1c))
|
|
51
|
-
* updateRelationship unit test passes ([155defc](https://github.com/DrewBradfordXYZ/quickbase-js/commit/155defcb1f3a746ac2bb135ec09db39b64dd58e2))
|
|
52
|
-
* user token 401 retry, all tests now passing ([a81a05d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a81a05d873f95d23f5721337854e2794be80ac64))
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
### Bug Fixes
|
|
56
|
-
|
|
57
|
-
* 429 retry logic now has all tests passing ([a2da0ad](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a2da0ad28c24c843d2bfd318f78827ba543e6833))
|
|
58
|
-
* build runs and all tests pass ([b1cbfaf](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b1cbfafb879d1325e60024e837e8c5602e027e47))
|
|
59
|
-
|
|
60
|
-
## [0.1.0-beta.7](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.6...v0.1.0-beta.7) (2025-03-16)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### Features
|
|
64
|
-
|
|
65
|
-
* added Record, hybrid semantic naming, fully typed QuickbaseClient with few response models left as type:any ([535a02e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/535a02e10d5974d2a2deb6dc213286da94d68dea))
|
|
66
|
-
* all fields tests pass ([84c539f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/84c539fce7ba9d57c997b831be404a1398a6ac25))
|
|
67
|
-
* all types, methods and files generated ([f25bea0](https://github.com/DrewBradfordXYZ/quickbase-js/commit/f25bea0e65a019d75b39a9caf85901d520bf1ac8))
|
|
68
|
-
* build files always produce production code ([2f78598](https://github.com/DrewBradfordXYZ/quickbase-js/commit/2f785984416c61e1b3deda2b801071cbb1303a74))
|
|
69
|
-
* copyApp unit test passes ([0e13f91](https://github.com/DrewBradfordXYZ/quickbase-js/commit/0e13f918c5daabbbd6e17c2424b3f18eca2eb3a4))
|
|
70
|
-
* FieldMap issue resolved ([b3b7b41](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b3b7b415d6a0f7701851f32a5e0b1207a07ba481))
|
|
71
|
-
* getApp and deleteApp test passes ([f5225e0](https://github.com/DrewBradfordXYZ/quickbase-js/commit/f5225e06299de58f34d6a765e73268d9a54e807d))
|
|
72
|
-
* getAppEvents spec update ([1028255](https://github.com/DrewBradfordXYZ/quickbase-js/commit/10282559cd76d004899fa2ebcea6f5f435ffae2b))
|
|
73
|
-
* import and upsert success ([ea9d9ee](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ea9d9eef8384ad73b8cffb8183fbc374ab9cc25b))
|
|
74
|
-
* log-gen yaml file gets created next to the build file ([cfe25af](https://github.com/DrewBradfordXYZ/quickbase-js/commit/cfe25afb60498909d2bac8ec963484e1c1b42d3f))
|
|
75
|
-
* logging for swagger2.0 ([819aa17](https://github.com/DrewBradfordXYZ/quickbase-js/commit/819aa170cfc02e4e5b223ac13834d50bce5dda93))
|
|
76
|
-
* missing-types-report updated to empty on success ([e35b28d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/e35b28d61563b21f7bad3e1c9c3751bfa254ab4a))
|
|
77
|
-
* QuickbaseClient is fully-typed from raw spec ([5c875c2](https://github.com/DrewBradfordXYZ/quickbase-js/commit/5c875c2ee07c38731c5609c384aaa8d3fbbdd64a))
|
|
78
|
-
* reorganize open-api folder ([a0fe5bd](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a0fe5bda606c37e7636d36c7fc5e233d191ac249))
|
|
79
|
-
* simplifyName refactor again ([2a2952e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/2a2952ea90fab818501d17908d6cd85a79c41adb))
|
|
80
|
-
* split up fix-spec- files ([85b6a3e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/85b6a3efb92520a46aa619bdfc4bf70d06984b3f))
|
|
81
|
-
* unit auth tests pass ([494897f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/494897f4551854096f89b1af43df4a455dfd9f4b))
|
|
82
|
-
* unit records tests pass ([8160b53](https://github.com/DrewBradfordXYZ/quickbase-js/commit/8160b53378447fcd8e37fac178e7d4693b502288))
|
|
83
|
-
* unit tables tests pass ([c4ec0ac](https://github.com/DrewBradfordXYZ/quickbase-js/commit/c4ec0ac378dd03e5d018b4ea83530e2c0fe905a2))
|
|
84
|
-
* unit tests for apps folder is passing ([72ae8e5](https://github.com/DrewBradfordXYZ/quickbase-js/commit/72ae8e529cddc66626617c6b1ff672f40763f7b7))
|
|
85
|
-
* update scripts to call integration tests, all tests pass ([08911f7](https://github.com/DrewBradfordXYZ/quickbase-js/commit/08911f76b214e6eb3ca8b4362c156d55383d7264))
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
### Bug Fixes
|
|
89
|
-
|
|
90
|
-
* added back CreateRelationshipRequest and UpdateRelationshipRequest ([0d932ee](https://github.com/DrewBradfordXYZ/quickbase-js/commit/0d932eed8b603c6b84e13b8834a89722b91fabf3))
|
|
91
|
-
* generate-unified-interface type fixes ([b8acd16](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b8acd16805f456336d396856c6ff88a29aa02813))
|
|
92
|
-
* playwright cleanup and type fixes ([ff30a15](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ff30a15c1a244c7eb1ad4f52941f60b775bb88d4))
|
|
93
|
-
* remove the old /paths /definitons completely in scripts ([48ee6a3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/48ee6a3b15579ca9224b89acde73f492e0769cab))
|
|
94
|
-
* update tags/tables.ts to match raw schema ([c6ed554](https://github.com/DrewBradfordXYZ/quickbase-js/commit/c6ed554f0994187224219b454d1e8671307fc189))
|
|
95
|
-
|
|
96
|
-
## [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)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
### Features
|
|
100
|
-
|
|
101
|
-
* omit credientials for all api calls that are not fetching a temp token ([b1b4aae](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b1b4aae02aaa655e6eaab2fe0d532d526e6dc69f))
|
|
102
|
-
|
|
103
|
-
## [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)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### Features
|
|
107
|
-
|
|
108
|
-
* ESM and UMD build prod ([49513e9](https://github.com/DrewBradfordXYZ/quickbase-js/commit/49513e902e7bf4dd35da3c6508242e96507a91bd))
|
|
109
|
-
* ESM and UMD support and src folder reorganization ([dc0170b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/dc0170b547e6e9e57a117fbcccfdbeb86e48a8c7))
|
|
110
|
-
|
|
111
|
-
## [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)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
### Features
|
|
115
|
-
|
|
116
|
-
* createField and deleteFields tests are passing ([4b47c4d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4b47c4deb9b3d731e6e7938c12fcebe97830568b))
|
|
117
|
-
* createField mock and integration tests pass ([b227c73](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b227c73b08f7efa5ce5f3d0c2897f82c8976a009))
|
|
118
|
-
* deleteFields spec update ([1f8beca](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1f8becaca0d6b7950648c1b9bc2b0215781fa829))
|
|
119
|
-
* getFeildsUsage.test.ts unit and integration tests pass ([82a4886](https://github.com/DrewBradfordXYZ/quickbase-js/commit/82a488622967ec24a8767cbb19c59ef4ce808749))
|
|
120
|
-
* getField.test.ts unit and integration tests pass ([3e50b70](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3e50b704f0ebea47f2fee3d02d811ea1b43db6c4))
|
|
121
|
-
* getFieldsUsage fix spec ([031faaa](https://github.com/DrewBradfordXYZ/quickbase-js/commit/031faaaeab9597f35fdd1ddcf5157ce5d774390b))
|
|
122
|
-
* getFieldUsage spec and unit test pass ([ac2824b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ac2824b226140dde99e33cf594d57bd6ffd4dc39))
|
|
123
|
-
* getFieldUsage unit and integration tests pass ([e62b586](https://github.com/DrewBradfordXYZ/quickbase-js/commit/e62b586d534620479a25dda2796ba5dcb8043705))
|
|
124
|
-
* split up fix-spec-paths and fix-spec-definitions into many files ([20d3246](https://github.com/DrewBradfordXYZ/quickbase-js/commit/20d32464e6337028778845fa55fbb19c5543f7eb))
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
### Bug Fixes
|
|
128
|
-
|
|
129
|
-
* cleanup createField.test.ts logging ([7b1306b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/7b1306bd8eb49e2c932ce267f33457e949e0f74b))
|
|
130
|
-
* createField test syntax update ([043f964](https://github.com/DrewBradfordXYZ/quickbase-js/commit/043f964a47346878440eb73cc10c110dab904ad7))
|
|
131
|
-
* getFieldsUsage type fix ([4c6f271](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4c6f271d123131ae13a236664f28fbbdfde3d564))
|
|
132
|
-
* update deleteFields error type spec ([1788e1c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1788e1ce6d4d2c8df871ec8b112be908d706f884))
|
|
133
|
-
|
|
134
|
-
## [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)
|
|
135
|
-
|
|
136
|
-
### Features
|
|
137
|
-
|
|
138
|
-
- copyApp fix-spec updates ([4c10ab4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4c10ab41464df047402a207c7b9e81026a7b6202))
|
|
139
|
-
- copyApp unit test passes ([b121bf1](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b121bf1d0130f338f131de5417896d798fe90db3))
|
|
140
|
-
- deleteApp fix spec added ([b27ce11](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b27ce11e2b08bc631d7656dedec57f6f5e579450))
|
|
141
|
-
- fix-spec-\* for getRelationship interface ([aad9fbd](https://github.com/DrewBradfordXYZ/quickbase-js/commit/aad9fbd7fc92b8aaaef901174c81169543ae86d2))
|
|
142
|
-
- getRelationship unit and integration test pass ([a1269bb](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a1269bb60523944bdf5030404539043c967f0b83))
|
|
143
|
-
- updated Upsert200Response and Upsert207Response, deleteRecords.test.ts integration type issues resolved ([d39dad5](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d39dad55d783d280db9dbae2ca4c782df3a1f12e))
|
|
144
|
-
- 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))
|
|
145
|
-
|
|
146
|
-
## [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)
|
|
147
|
-
|
|
148
|
-
## [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)
|
|
149
|
-
|
|
150
|
-
### Features
|
|
151
|
-
|
|
152
|
-
- runQuery.test.ts integration test pass ([180b17f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/180b17f265c26a0d23bde3ca6993bad1ba4f65ee))
|
|
153
|
-
- runQuery.test.ts unit test pass ([84e2fc4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/84e2fc4f237d5f558fcd20d7b6b8eb83f685d7ac))
|
|
154
|
-
|
|
155
|
-
### Bug Fixes
|
|
156
|
-
|
|
157
|
-
- added stub variables to unit tests ([d84b534](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d84b5344201300d8d59e622b025d96ad9813d4eb))
|
|
158
|
-
- create env stubs for mock tests and update getTables.test.ts ([3d31c9e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3d31c9ebc9f852b99d1a807759490055d75c6396))
|
|
159
|
-
|
|
160
|
-
## [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)
|
|
161
|
-
|
|
162
|
-
### Features
|
|
163
|
-
|
|
164
|
-
- add deleteTable integration test with 404 verification ([277aec6](https://github.com/DrewBradfordXYZ/quickbase-js/commit/277aec66a3047fab687ce81ad42b9371e8c2bf56))
|
|
165
|
-
- deleteRecords integration and unit tests ([d3beba1](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d3beba1a362b13166b38f59eeea83c289ddaf999))
|
|
166
|
-
- integration tests for deleteRecords and upsert pass ([759978b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/759978bc13cb1c50c03770232eb02a1c3c08428d))
|
|
167
|
-
- mock deleteRecords passes ([a167028](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a1670286def030950c568e92ca99ea12e20d5b62))
|
|
168
|
-
- upsert mock test passes ([dde6d07](https://github.com/DrewBradfordXYZ/quickbase-js/commit/dde6d07d4c4c73bd14189f87fdc6347744004e4e))
|
|
169
|
-
|
|
170
|
-
### Bug Fixes
|
|
171
|
-
|
|
172
|
-
- all vitests are passing again ([7206ba3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/7206ba3f28bd7a3c7f5d699988e9a9a1f0053f42))
|
|
173
|
-
- fix-spec and test updates for createTable ([9c0cdd3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/9c0cdd3b707971e6fb8f3e73598e3a600ff2b33d))
|
|
174
|
-
- fix-spec for upsertRecords and createApp ([d12de40](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d12de40feac35e5d86a0b7d5019d8058cdfcffd9))
|
|
175
|
-
- fix-spec getTable ([1eb936c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1eb936c360ce5df4818b8d5ef7ccf4dc6b769af0))
|
|
176
|
-
- fix-spec getTable deleteTable ([236349a](https://github.com/DrewBradfordXYZ/quickbase-js/commit/236349af9e30776e00754232d83d76e065aab00b))
|
|
177
|
-
- fix-spec updates for createApp ([3614958](https://github.com/DrewBradfordXYZ/quickbase-js/commit/36149589ff2544ec50a82d9dc9b183f15d07778d))
|
|
178
|
-
- fix-spec updateTable ([26e278c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/26e278cdbbe96d33e51f14e90ebb2c8b47d70f07))
|
|
179
|
-
- getTables test pass, change order for extractDbid to assign temp token dbid ([37b7685](https://github.com/DrewBradfordXYZ/quickbase-js/commit/37b7685d55a0f64e62cb91ad23df28d4916d5a50))
|
|
180
|
-
- upsert unit test type fixes ([8460cc8](https://github.com/DrewBradfordXYZ/quickbase-js/commit/8460cc8e63564bc8602dc12a9b6415094cc215f0))
|
|
181
|
-
|
|
182
|
-
### 1.0.1-beta.0 (2025-03-10)
|
|
183
|
-
|
|
184
|
-
Testing done in a consuming library for getApp() and getFields()
|
package/build-common.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
// build-common.js
|
|
2
|
-
import { execSync } from "child_process";
|
|
3
|
-
import { rollup } from "rollup";
|
|
4
|
-
import terser from "@rollup/plugin-terser";
|
|
5
|
-
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
6
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
7
|
-
import dts from "rollup-plugin-dts";
|
|
8
|
-
import { rimrafSync } from "rimraf";
|
|
9
|
-
import {
|
|
10
|
-
copyFileSync,
|
|
11
|
-
readdirSync,
|
|
12
|
-
readFileSync,
|
|
13
|
-
writeFileSync,
|
|
14
|
-
mkdirSync,
|
|
15
|
-
statSync,
|
|
16
|
-
} from "fs";
|
|
17
|
-
import { join } from "path";
|
|
18
|
-
|
|
19
|
-
export const external = [
|
|
20
|
-
"node:http",
|
|
21
|
-
"node:https",
|
|
22
|
-
"node:zlib",
|
|
23
|
-
"node:stream",
|
|
24
|
-
"node:buffer",
|
|
25
|
-
"node:util",
|
|
26
|
-
"node:url",
|
|
27
|
-
"node:net",
|
|
28
|
-
"node:fs",
|
|
29
|
-
"node:path",
|
|
30
|
-
"node-fetch",
|
|
31
|
-
];
|
|
32
|
-
export const globals = { "node-fetch": "fetch" };
|
|
33
|
-
|
|
34
|
-
export const srcDir = join(process.cwd(), "src");
|
|
35
|
-
export const tempSrcDir = join(process.cwd(), "dist/temp-src");
|
|
36
|
-
export const excludeDirs = ["specs"];
|
|
37
|
-
export const excludeFiles = ["generated/index.ts"]; // Exclude generated/index.ts to avoid duplicate exports
|
|
38
|
-
|
|
39
|
-
export function copyAndRewriteTsExtensions(src, dest) {
|
|
40
|
-
console.log(`Copying from ${src} to ${dest}`);
|
|
41
|
-
mkdirSync(dest, { recursive: true });
|
|
42
|
-
const files = readdirSync(src, { withFileTypes: true });
|
|
43
|
-
|
|
44
|
-
for (const file of files) {
|
|
45
|
-
const srcPath = join(src, file.name);
|
|
46
|
-
const destPath = join(dest, file.name);
|
|
47
|
-
|
|
48
|
-
if (file.isDirectory()) {
|
|
49
|
-
if (excludeDirs.includes(file.name)) {
|
|
50
|
-
console.log(`Skipping excluded directory ${srcPath}`);
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
copyAndRewriteTsExtensions(srcPath, destPath);
|
|
54
|
-
} else if (file.name.endsWith(".ts")) {
|
|
55
|
-
if (excludeFiles.some((excluded) => srcPath.includes(excluded))) {
|
|
56
|
-
console.log(`Skipping excluded file ${srcPath}`);
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
console.log(`Processing ${srcPath} -> ${destPath}`);
|
|
60
|
-
let fileContent = readFileSync(srcPath, "utf8");
|
|
61
|
-
|
|
62
|
-
// Remove .ts extensions from import/export statements for runtime compatibility
|
|
63
|
-
fileContent = removeTsExtensionsFromImports(fileContent);
|
|
64
|
-
fileContent = removeTsExtensionsFromStarExports(fileContent);
|
|
65
|
-
|
|
66
|
-
writeFileSync(destPath, fileContent, "utf8");
|
|
67
|
-
} else {
|
|
68
|
-
console.log(`Skipping non-.ts file ${srcPath}`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function removeTsExtensionsFromImports(content) {
|
|
74
|
-
// Matches: 'from "./some/path.ts"' or 'from "../another.ts"'
|
|
75
|
-
const importPattern = /from\s+(['"])(\.[\w\/-]+)\.ts\1/g;
|
|
76
|
-
return content.replace(importPattern, `from $1$2$1`);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function removeTsExtensionsFromStarExports(content) {
|
|
80
|
-
// Matches: 'export * from "./some/path.ts"' or 'export * from "../another.ts"'
|
|
81
|
-
const exportStarPattern = /export\s+\*\s+from\s+(['"])(\.[\w\/-]+)\.ts\1/g;
|
|
82
|
-
return content.replace(exportStarPattern, `export * from $1$2$1`);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export async function createBundle(input, plugins, format, outputOptions) {
|
|
86
|
-
const bundle = await rollup({
|
|
87
|
-
input,
|
|
88
|
-
external,
|
|
89
|
-
plugins,
|
|
90
|
-
});
|
|
91
|
-
await bundle.write(outputOptions);
|
|
92
|
-
await bundle.close();
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export function compileTypeScript() {
|
|
96
|
-
console.log("Running tsc...");
|
|
97
|
-
const tsFiles = readdirSync(tempSrcDir, { recursive: true })
|
|
98
|
-
.filter((file) => file.endsWith(".ts"))
|
|
99
|
-
.map((file) => join(tempSrcDir, file));
|
|
100
|
-
const tscCommand = `npx tsc ${tsFiles.join(" ")} --outDir ${join(
|
|
101
|
-
process.cwd(),
|
|
102
|
-
"dist/temp"
|
|
103
|
-
)} --module ESNext --target ESNext --sourceMap --moduleResolution bundler --baseUrl ${process.cwd()}`;
|
|
104
|
-
console.log(`Command: ${tscCommand}`);
|
|
105
|
-
execSync(tscCommand, { stdio: "inherit" });
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export async function generateDeclarations() {
|
|
109
|
-
console.log("Generating declarations...");
|
|
110
|
-
const dtsBundle = await rollup({
|
|
111
|
-
input: "src/quickbaseClient.ts",
|
|
112
|
-
plugins: [dts({ tsconfig: "./tsconfig.json", respectExternal: true })],
|
|
113
|
-
});
|
|
114
|
-
await dtsBundle.write({ file: "dist/esm/quickbase.d.ts", format: "esm" });
|
|
115
|
-
await dtsBundle.write({ file: "dist/umd/quickbase.umd.d.ts", format: "umd" });
|
|
116
|
-
await dtsBundle.close();
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export function listFilesWithSizes(dir, prefix = "") {
|
|
120
|
-
const files = readdirSync(dir, { withFileTypes: true });
|
|
121
|
-
for (const file of files) {
|
|
122
|
-
const filePath = join(dir, file.name);
|
|
123
|
-
if (file.isDirectory()) {
|
|
124
|
-
listFilesWithSizes(filePath, `${prefix}${file.name}/`);
|
|
125
|
-
} else {
|
|
126
|
-
const stats = statSync(filePath);
|
|
127
|
-
const sizeKB = (stats.size / 1024).toFixed(2);
|
|
128
|
-
console.log(`${prefix}${file.name} - ${sizeKB} KB`);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
package/build-esm.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { rimrafSync } from "rimraf";
|
|
2
|
-
import { join } from "path";
|
|
3
|
-
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
4
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
5
|
-
import terser from "@rollup/plugin-terser";
|
|
6
|
-
import {
|
|
7
|
-
copyAndRewriteTsExtensions,
|
|
8
|
-
compileTypeScript,
|
|
9
|
-
createBundle,
|
|
10
|
-
external,
|
|
11
|
-
globals,
|
|
12
|
-
srcDir,
|
|
13
|
-
tempSrcDir,
|
|
14
|
-
generateDeclarations,
|
|
15
|
-
listFilesWithSizes,
|
|
16
|
-
} from "./build-common.js";
|
|
17
|
-
|
|
18
|
-
// Clean specific folders for ESM build
|
|
19
|
-
rimrafSync("dist/esm");
|
|
20
|
-
rimrafSync("dist/temp");
|
|
21
|
-
rimrafSync("dist/temp-src");
|
|
22
|
-
|
|
23
|
-
// Copy and rewrite TS files
|
|
24
|
-
copyAndRewriteTsExtensions(srcDir, tempSrcDir);
|
|
25
|
-
|
|
26
|
-
// Compile TypeScript
|
|
27
|
-
compileTypeScript();
|
|
28
|
-
|
|
29
|
-
// ESM Builds
|
|
30
|
-
console.log("Building ESM bundles...");
|
|
31
|
-
|
|
32
|
-
// Generate unminified ESM bundle
|
|
33
|
-
console.log("Building unminified ESM bundle...");
|
|
34
|
-
await createBundle(
|
|
35
|
-
"dist/temp/quickbaseClient.js",
|
|
36
|
-
[nodeResolve({ preferBuiltins: true }), commonjs()],
|
|
37
|
-
"esm",
|
|
38
|
-
{
|
|
39
|
-
dir: "dist/esm",
|
|
40
|
-
format: "esm",
|
|
41
|
-
sourcemap: true,
|
|
42
|
-
entryFileNames: "quickbase.js",
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
// Generate minified ESM bundle
|
|
47
|
-
console.log("Building minified ESM bundle...");
|
|
48
|
-
await createBundle(
|
|
49
|
-
"dist/temp/quickbaseClient.js",
|
|
50
|
-
[nodeResolve({ preferBuiltins: true }), commonjs(), terser()],
|
|
51
|
-
"esm",
|
|
52
|
-
{
|
|
53
|
-
dir: "dist/esm",
|
|
54
|
-
format: "esm",
|
|
55
|
-
sourcemap: true,
|
|
56
|
-
entryFileNames: "quickbase.min.js",
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
// Generate declarations
|
|
61
|
-
await generateDeclarations();
|
|
62
|
-
|
|
63
|
-
// Clean up
|
|
64
|
-
rimrafSync("dist/temp");
|
|
65
|
-
rimrafSync("dist/temp-src");
|
|
66
|
-
|
|
67
|
-
// List generated files
|
|
68
|
-
console.log("\nGenerated files:");
|
|
69
|
-
listFilesWithSizes(join(process.cwd(), "dist/esm"));
|
|
70
|
-
|
|
71
|
-
console.log("\nESM build completed successfully");
|
package/build-umd.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { rimrafSync } from "rimraf";
|
|
2
|
-
import { join } from "path";
|
|
3
|
-
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
4
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
5
|
-
import terser from "@rollup/plugin-terser";
|
|
6
|
-
import {
|
|
7
|
-
copyAndRewriteTsExtensions,
|
|
8
|
-
compileTypeScript,
|
|
9
|
-
createBundle,
|
|
10
|
-
external,
|
|
11
|
-
globals,
|
|
12
|
-
srcDir,
|
|
13
|
-
tempSrcDir,
|
|
14
|
-
listFilesWithSizes,
|
|
15
|
-
} from "./build-common.js";
|
|
16
|
-
|
|
17
|
-
// Clean specific folders for UMD build
|
|
18
|
-
rimrafSync("dist/umd");
|
|
19
|
-
rimrafSync("dist/temp");
|
|
20
|
-
rimrafSync("dist/temp-src");
|
|
21
|
-
|
|
22
|
-
// Copy and rewrite TS files
|
|
23
|
-
copyAndRewriteTsExtensions(srcDir, tempSrcDir);
|
|
24
|
-
|
|
25
|
-
// Compile TypeScript
|
|
26
|
-
compileTypeScript();
|
|
27
|
-
|
|
28
|
-
// UMD Builds
|
|
29
|
-
console.log("Building UMD bundles...");
|
|
30
|
-
|
|
31
|
-
// Generate unminified UMD bundle
|
|
32
|
-
console.log("Building unminified UMD bundle...");
|
|
33
|
-
await createBundle(
|
|
34
|
-
"dist/temp/quickbaseClient.js",
|
|
35
|
-
[nodeResolve({ preferBuiltins: true, browser: true }), commonjs()],
|
|
36
|
-
"umd",
|
|
37
|
-
{
|
|
38
|
-
file: join(process.cwd(), "dist/umd", "quickbase.umd.js"),
|
|
39
|
-
format: "umd",
|
|
40
|
-
name: "QuickbaseJS",
|
|
41
|
-
sourcemap: true,
|
|
42
|
-
globals,
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
// Generate minified UMD bundle
|
|
47
|
-
console.log("Building minified UMD bundle...");
|
|
48
|
-
await createBundle(
|
|
49
|
-
"dist/temp/quickbaseClient.js",
|
|
50
|
-
[nodeResolve({ preferBuiltins: true, browser: true }), commonjs(), terser()],
|
|
51
|
-
"umd",
|
|
52
|
-
{
|
|
53
|
-
file: join(process.cwd(), "dist/umd", "quickbase.umd.min.js"),
|
|
54
|
-
format: "umd",
|
|
55
|
-
name: "QuickbaseJS",
|
|
56
|
-
sourcemap: true,
|
|
57
|
-
globals,
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
// Clean up
|
|
62
|
-
rimrafSync("dist/temp");
|
|
63
|
-
rimrafSync("dist/temp-src");
|
|
64
|
-
|
|
65
|
-
// List generated files
|
|
66
|
-
console.log("\nGenerated files:");
|
|
67
|
-
listFilesWithSizes(join(process.cwd(), "dist/umd"));
|
|
68
|
-
|
|
69
|
-
console.log("\nUMD build completed successfully");
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<title>Quickbase</title>
|
|
6
|
-
<script src="https://cdn.jsdelivr.net/npm/quickbase-js@1.1.0-beta.6/dist/umd/quickbase.umd.min.js"></script>
|
|
7
|
-
</head>
|
|
8
|
-
|
|
9
|
-
<body>
|
|
10
|
-
<div>
|
|
11
|
-
<h1>Quickbase-js CDN Example</h1>
|
|
12
|
-
<p id="result">Loading...</p>
|
|
13
|
-
</div>
|
|
14
|
-
<script>
|
|
15
|
-
var realm = "xxxxxxxxxxxxxxxxxxxx"; // replace with your realm
|
|
16
|
-
var appId = "xxxxxxxxxxxxxxxxxxxx"; // replace with your app ID
|
|
17
|
-
if (typeof QuickbaseJS === "undefined") {
|
|
18
|
-
document.getElementById("result").textContent = "Error: Failed to load QuickbaseJS library.";
|
|
19
|
-
} else {
|
|
20
|
-
var qbClient = QuickbaseJS.quickbase({
|
|
21
|
-
realm,
|
|
22
|
-
useTempTokens: true
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
qbClient.getApp({ appId })
|
|
26
|
-
.then(function (app) {
|
|
27
|
-
document.getElementById("result").textContent = "App Name: " + app.name;
|
|
28
|
-
})
|
|
29
|
-
.catch(function (err) {
|
|
30
|
-
document.getElementById("result").textContent = "Error: " + (err.message || "Failed to load app");
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
</script>
|
|
34
|
-
</body>
|
|
35
|
-
|
|
36
|
-
</html>
|
package/examples/react.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from "react";
|
|
2
|
-
import { quickbase } from "quickbase-js";
|
|
3
|
-
|
|
4
|
-
const App = () => {
|
|
5
|
-
const [appName, setAppName] = useState < string > "Loading...";
|
|
6
|
-
const [error, setError] = (useState < string) | (null > null);
|
|
7
|
-
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
// Initialize the QuickBase client
|
|
10
|
-
const qb = quickbase({
|
|
11
|
-
realm: "your-realm", // Replace with actual QuickBase realm
|
|
12
|
-
// ## ------------------------------
|
|
13
|
-
// ## Authentication Options
|
|
14
|
-
// ## ------------------------------
|
|
15
|
-
// ## OPTION 1: User Token Authentication
|
|
16
|
-
// ## - Use this if you have a QuickBase user token (get it from "My Profile" > "Manage User Tokens")
|
|
17
|
-
// ## - Works in Node.js or browsers, ideal for standalone apps or testing outside QuickBase
|
|
18
|
-
// ## - Use the line below and replace with your token; comment out 'useTempTokens'
|
|
19
|
-
// userToken: "your-user-token",
|
|
20
|
-
|
|
21
|
-
// ## ------------------------------
|
|
22
|
-
// ## OPTION 2: Temporary Token Authentication
|
|
23
|
-
// ## - Use this for QuickBase code pages, leveraging the browser’s authenticated session
|
|
24
|
-
// ## - No user token needed; requires running in a QuickBase browser context
|
|
25
|
-
// ## - Uncomment the line below and comment out 'userToken' if using this option
|
|
26
|
-
// useTempTokens: true,
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// Fetch the app
|
|
30
|
-
qb.getApp({ appId: "your-app-id" }) // Replace with actual app ID
|
|
31
|
-
.then((app) => {
|
|
32
|
-
setAppName(app.name);
|
|
33
|
-
})
|
|
34
|
-
.catch((err) => {
|
|
35
|
-
console.error("Error fetching app:", err);
|
|
36
|
-
setError("Failed to load app");
|
|
37
|
-
});
|
|
38
|
-
}, []); // Empty dependency array to run once on mount
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<div>
|
|
42
|
-
<h1>Quickbase Test</h1>
|
|
43
|
-
{error ? <p>{error}</p> : <p>App Name: {appName}</p>}
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default App;
|