quickbase-js 0.1.0-beta.7
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/CHANGELOG.md +129 -0
- package/LICENSE +21 -0
- package/README.md +204 -0
- package/build-common.js +131 -0
- package/build-esm.js +71 -0
- package/build-umd.js +69 -0
- package/dist/esm/quickbase.d.ts +7594 -0
- package/dist/esm/quickbase.js +9752 -0
- package/dist/esm/quickbase.js.map +1 -0
- package/dist/esm/quickbase.min.js +2 -0
- package/dist/esm/quickbase.min.js.map +1 -0
- package/dist/umd/quickbase.umd.js +10502 -0
- package/dist/umd/quickbase.umd.js.map +1 -0
- package/dist/umd/quickbase.umd.min.js +2 -0
- package/dist/umd/quickbase.umd.min.js.map +1 -0
- package/examples/quicbase-jsCDN.html +36 -0
- package/examples/react.js +48 -0
- package/examples/vanillajs.html +47 -0
- package/notes.txt +158 -0
- package/open-api/fix-spec-main.ts +96 -0
- package/open-api/generate-unified-interface.ts +277 -0
- package/open-api/output/override-report.json +58 -0
- package/open-api/output/quickbase-fixed.json +10610 -0
- package/open-api/regenerate-client.ts +116 -0
- package/open-api/schema/enhance-general.ts +100 -0
- package/open-api/schema/fix-arrays.ts +69 -0
- package/open-api/schema/tags/apps.ts +90 -0
- package/open-api/schema/tags/fields.ts +156 -0
- package/open-api/schema/tags/groups.ts +51 -0
- package/open-api/schema/tags/index.ts +68 -0
- package/open-api/schema/tags/records.ts +115 -0
- package/open-api/schema/tags/tables.ts +211 -0
- package/open-api/schema/tags/users.ts +47 -0
- package/open-api/types/spec.ts +41 -0
- package/open-api/utils/infer-schema.ts +40 -0
- package/open-api/utils/naming.ts +10 -0
- package/package.json +91 -0
- package/playwright.config.ts +37 -0
- package/rollup.config.js +114 -0
- package/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json +46878 -0
- package/specs/split/apps.json +1315 -0
- package/specs/split/auth.json +191 -0
- package/specs/split/fields.json +3869 -0
- package/specs/split/records.json +754 -0
- package/specs/split/reports.json +619 -0
- package/specs/split/tables.json +1605 -0
- package/src/generated-unified/QuickbaseClient.ts +359 -0
- package/src/generated-unified/missing-types-report.json +3 -0
- package/src/index.ts +1 -0
- package/src/quickbaseClient.ts +402 -0
- package/src/tokenCache.ts +51 -0
- package/src/utils.ts +7 -0
- package/test-esm.js +1 -0
- package/test-results.json +2050 -0
- package/test-umd.js +1 -0
- package/test.ts +1 -0
- package/tests/playwright/qb/auth/cacheSwitching.test.ts +159 -0
- package/tests/playwright/qb/auth/fetchTempToken401.test.ts +219 -0
- package/tests/playwright/qb/auth/getAppWithTempToken.test.ts +162 -0
- package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +153 -0
- package/tests/playwright/qb/auth/getTempToken.test.ts +152 -0
- package/tests/playwright/qb/auth/tokenPrefetch.test.ts +179 -0
- package/tests/playwright/qb/auth/tokenRenewal.test.ts +133 -0
- package/tests/setup.ts +51 -0
- package/tests/vitest/qb/apps/copyApp.test.ts +76 -0
- package/tests/vitest/qb/apps/createApp.test.ts +64 -0
- package/tests/vitest/qb/apps/deleteApp.test.ts +76 -0
- package/tests/vitest/qb/apps/getApp.test.ts +40 -0
- package/tests/vitest/qb/fields/createField.test.ts +78 -0
- package/tests/vitest/qb/fields/deleteFields.test.ts +89 -0
- package/tests/vitest/qb/fields/getField.test.ts +85 -0
- package/tests/vitest/qb/fields/getFieldUsage.test.ts +174 -0
- package/tests/vitest/qb/fields/getFields.test.ts +232 -0
- package/tests/vitest/qb/fields/getFieldsUsage.test.ts +77 -0
- package/tests/vitest/qb/index.ts +28 -0
- package/tests/vitest/qb/records/deleteRecords.test.ts +110 -0
- package/tests/vitest/qb/records/runQuery.test.ts +146 -0
- package/tests/vitest/qb/records/upsert.test.ts +102 -0
- package/tests/vitest/qb/tables/createTable.test.ts +55 -0
- package/tests/vitest/qb/tables/deleteTable.test.ts +50 -0
- package/tests/vitest/qb/tables/getAppTables.test.ts +46 -0
- package/tests/vitest/qb/tables/getRelationships.test.ts +80 -0
- package/tests/vitest/qb/tables/getTable.test.ts +26 -0
- package/tests/vitest/qb/tables/updateTable.test.ts +48 -0
- package/tests/vitest/unit/apps/copyApp.test.ts +488 -0
- package/tests/vitest/unit/apps/createApp.test.ts +186 -0
- package/tests/vitest/unit/apps/deleteApp.test.ts +216 -0
- package/tests/vitest/unit/apps/getApp.test.ts +128 -0
- package/tests/vitest/unit/auth/fetchTempToken401.test.ts +82 -0
- package/tests/vitest/unit/auth/getTempToken.test.ts +95 -0
- package/tests/vitest/unit/auth/retryOn401.test.ts +116 -0
- package/tests/vitest/unit/auth/two401s.test.ts +86 -0
- package/tests/vitest/unit/fields/createField.test.ts +391 -0
- package/tests/vitest/unit/fields/deleteFields.test.ts +141 -0
- package/tests/vitest/unit/fields/getField.test.ts +189 -0
- package/tests/vitest/unit/fields/getFieldUsage.test.ts +147 -0
- package/tests/vitest/unit/fields/getFields.test.ts +122 -0
- package/tests/vitest/unit/fields/getFieldsUsage.test.ts +160 -0
- package/tests/vitest/unit/index.ts +33 -0
- package/tests/vitest/unit/records/deleteRecords.test.ts +112 -0
- package/tests/vitest/unit/records/runQuery.test.ts +102 -0
- package/tests/vitest/unit/records/upsert.test.ts +234 -0
- package/tests/vitest/unit/tables/createTable.test.ts +70 -0
- package/tests/vitest/unit/tables/deleteTable.test.ts +77 -0
- package/tests/vitest/unit/tables/getAppTables.test.ts +85 -0
- package/tests/vitest/unit/tables/getRelationships.test.ts +259 -0
- package/tests/vitest/unit/tables/getTable.test.ts +233 -0
- package/tests/vitest/unit/tables/updateTable.test.ts +80 -0
- package/tests/vitest/unit/umd.test.ts +8 -0
- package/text.txt +104 -0
- package/tools/generate-types.ts +29 -0
- package/tools/log-gen.ts +231 -0
- package/tools/log-gen.yaml +3826 -0
- package/tools/openapi-jars/openapi-generator-cli-7.12.0.jar +0 -0
- package/tools/openapi-schema-validator.ts +38 -0
- package/tools/spec-analyzer.ts +163 -0
- package/tools/split-spec.ts +148 -0
- package/tools/test-import.ts +3 -0
- package/tools/validate-spec.ts +40 -0
- package/tsconfig.build.json +17 -0
- package/tsconfig.json +29 -0
- package/versionrc.json +9 -0
- package/vitest.config.ts +27 -0
package/rollup.config.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import terser from "@rollup/plugin-terser";
|
|
2
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
3
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
4
|
+
import dts from "rollup-plugin-dts";
|
|
5
|
+
import typescript from "@rollup/plugin-typescript";
|
|
6
|
+
|
|
7
|
+
const isProd = process.env.NODE_ENV === "production";
|
|
8
|
+
|
|
9
|
+
// External dependencies for both ESM and UMD builds
|
|
10
|
+
const external = [
|
|
11
|
+
"node:http",
|
|
12
|
+
"node:https",
|
|
13
|
+
"node:zlib",
|
|
14
|
+
"node:stream",
|
|
15
|
+
"node:buffer",
|
|
16
|
+
"node:util",
|
|
17
|
+
"node:url",
|
|
18
|
+
"node:net",
|
|
19
|
+
"node:fs",
|
|
20
|
+
"node:path",
|
|
21
|
+
"node-fetch",
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
// Global mappings for UMD (browser) build
|
|
25
|
+
const globals = {
|
|
26
|
+
"node-fetch": "fetch", // Map node-fetch to window.fetch in browsers
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default [
|
|
30
|
+
// ESM Build
|
|
31
|
+
{
|
|
32
|
+
input: "src/quickbaseClient.ts",
|
|
33
|
+
output: {
|
|
34
|
+
dir: "dist/esm",
|
|
35
|
+
format: "esm",
|
|
36
|
+
sourcemap: true,
|
|
37
|
+
entryFileNames: "quickbase.js",
|
|
38
|
+
},
|
|
39
|
+
external,
|
|
40
|
+
plugins: [
|
|
41
|
+
nodeResolve({ preferBuiltins: true }), // Node.js resolution
|
|
42
|
+
commonjs(), // Convert CommonJS to ESM
|
|
43
|
+
typescript({
|
|
44
|
+
tsconfig: "./tsconfig.json",
|
|
45
|
+
noEmitOnError: true, // Fail on TypeScript errors
|
|
46
|
+
// Use Rollup to emit JavaScript, overriding noEmit for this build
|
|
47
|
+
}),
|
|
48
|
+
isProd && terser(), // Minification for production
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
// UMD Build
|
|
52
|
+
{
|
|
53
|
+
input: "src/quickbaseClient.ts",
|
|
54
|
+
output: {
|
|
55
|
+
file: "dist/umd/quickbase.umd.js",
|
|
56
|
+
format: "umd",
|
|
57
|
+
name: "QuickbaseJS", // Global name for browser
|
|
58
|
+
sourcemap: true,
|
|
59
|
+
globals,
|
|
60
|
+
},
|
|
61
|
+
external,
|
|
62
|
+
plugins: [
|
|
63
|
+
nodeResolve({ preferBuiltins: true, browser: true }), // Browser-first resolution
|
|
64
|
+
commonjs(), // Convert CommonJS to UMD
|
|
65
|
+
typescript({
|
|
66
|
+
tsconfig: "./tsconfig.json",
|
|
67
|
+
noEmitOnError: true, // Fail on TypeScript errors
|
|
68
|
+
// Use Rollup to emit JavaScript, overriding noEmit for this build
|
|
69
|
+
}),
|
|
70
|
+
isProd && terser(), // Minification for production
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
// ESM Declarations
|
|
74
|
+
{
|
|
75
|
+
input: "src/quickbaseClient.ts",
|
|
76
|
+
output: {
|
|
77
|
+
file: "dist/esm/quickbase.d.ts",
|
|
78
|
+
format: "esm",
|
|
79
|
+
},
|
|
80
|
+
plugins: [
|
|
81
|
+
dts({
|
|
82
|
+
tsconfig: "./tsconfig.json",
|
|
83
|
+
respectExternal: true, // Include external dependencies in declarations
|
|
84
|
+
}),
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
// UMD Declarations
|
|
88
|
+
{
|
|
89
|
+
input: "src/quickbaseClient.ts",
|
|
90
|
+
output: {
|
|
91
|
+
file: "dist/umd/quickbase.umd.d.ts",
|
|
92
|
+
format: "umd",
|
|
93
|
+
},
|
|
94
|
+
plugins: [
|
|
95
|
+
dts({
|
|
96
|
+
tsconfig: "./tsconfig.json",
|
|
97
|
+
respectExternal: true, // Include external dependencies in declarations
|
|
98
|
+
}),
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
].map((config) => ({
|
|
102
|
+
...config,
|
|
103
|
+
onwarn(warning, warn) {
|
|
104
|
+
// Suppress TypeScript plugin warnings
|
|
105
|
+
if (
|
|
106
|
+
warning.code === "PLUGIN_WARNING" &&
|
|
107
|
+
warning.plugin === "typescript" &&
|
|
108
|
+
warning.message.includes("TS5096")
|
|
109
|
+
) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
warn(warning);
|
|
113
|
+
},
|
|
114
|
+
}));
|