From 9ef6cbd566a817a541590fb73534d6b902898103 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 3 Dec 2024 16:39:53 +0000 Subject: [PATCH 01/68] basic 3.0 metrics --- .../backend-core/src/events/publishers/index.ts | 1 + .../backend-core/src/events/publishers/rowAction.ts | 13 +++++++++++++ packages/backend-core/src/events/publishers/view.ts | 7 ++++--- .../server/src/api/controllers/rowAction/crud.ts | 3 +++ packages/server/src/api/controllers/view/viewsV2.ts | 4 ++++ packages/types/src/sdk/events/index.ts | 1 + packages/types/src/sdk/events/rowAction.ts | 6 ++++++ packages/types/src/sdk/events/view.ts | 7 +++++-- 8 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 packages/backend-core/src/events/publishers/rowAction.ts create mode 100644 packages/types/src/sdk/events/rowAction.ts diff --git a/packages/backend-core/src/events/publishers/index.ts b/packages/backend-core/src/events/publishers/index.ts index 9c92b80499..aaec62f979 100644 --- a/packages/backend-core/src/events/publishers/index.ts +++ b/packages/backend-core/src/events/publishers/index.ts @@ -23,3 +23,4 @@ export { default as plugin } from "./plugin" export { default as backup } from "./backup" export { default as environmentVariable } from "./environmentVariable" export { default as auditLog } from "./auditLog" +export { default as rowAction } from "./rowAction" diff --git a/packages/backend-core/src/events/publishers/rowAction.ts b/packages/backend-core/src/events/publishers/rowAction.ts new file mode 100644 index 0000000000..5adfd22d2d --- /dev/null +++ b/packages/backend-core/src/events/publishers/rowAction.ts @@ -0,0 +1,13 @@ +import { publishEvent } from "../events" +import { Event, RowActionCreatedEvent } from "@budibase/types" + +async function created( + rowAction: RowActionCreatedEvent, + timestamp?: string | number +) { + await publishEvent(Event.TABLE_CREATED, rowAction, timestamp) +} + +export default { + created, +} diff --git a/packages/backend-core/src/events/publishers/view.ts b/packages/backend-core/src/events/publishers/view.ts index ccbf960b04..0ec8f67485 100644 --- a/packages/backend-core/src/events/publishers/view.ts +++ b/packages/backend-core/src/events/publishers/view.ts @@ -11,7 +11,7 @@ import { ViewFilterDeletedEvent, ViewFilterUpdatedEvent, ViewUpdatedEvent, - View, + ViewV2, ViewCalculation, Table, TableExportFormat, @@ -19,9 +19,10 @@ import { /* eslint-disable */ -async function created(view: View, timestamp?: string | number) { +async function created(view: Partial, timestamp?: string | number) { const properties: ViewCreatedEvent = { - tableId: view.tableId, + name: view.name, + type: view.type, } await publishEvent(Event.VIEW_CREATED, properties, timestamp) } diff --git a/packages/server/src/api/controllers/rowAction/crud.ts b/packages/server/src/api/controllers/rowAction/crud.ts index 3baaff6fcc..525fcabcfc 100644 --- a/packages/server/src/api/controllers/rowAction/crud.ts +++ b/packages/server/src/api/controllers/rowAction/crud.ts @@ -6,6 +6,7 @@ import { RowActionResponse, RowActionsResponse, } from "@budibase/types" +import { events } from "@budibase/backend-core" import sdk from "../../../sdk" async function getTable(ctx: Ctx) { @@ -59,6 +60,8 @@ export async function create( name: ctx.request.body.name, }) + await events.rowAction.created(createdAction) + ctx.body = { tableId, id: createdAction.id, diff --git a/packages/server/src/api/controllers/view/viewsV2.ts b/packages/server/src/api/controllers/view/viewsV2.ts index 986764a697..46c44ed577 100644 --- a/packages/server/src/api/controllers/view/viewsV2.ts +++ b/packages/server/src/api/controllers/view/viewsV2.ts @@ -16,6 +16,7 @@ import { CountDistinctCalculationFieldMetadata, CountCalculationFieldMetadata, } from "@budibase/types" +import { events } from "@budibase/backend-core" import { builderSocket, gridSocket } from "../../../websockets" import { helpers } from "@budibase/shared-core" @@ -149,6 +150,9 @@ export async function create(ctx: Ctx) { primaryDisplay: view.primaryDisplay, } const result = await sdk.views.create(tableId, parsedView) + + await events.view.created(view) + ctx.status = 201 ctx.body = { data: result, diff --git a/packages/types/src/sdk/events/index.ts b/packages/types/src/sdk/events/index.ts index 043e62faa4..7a067fd202 100644 --- a/packages/types/src/sdk/events/index.ts +++ b/packages/types/src/sdk/events/index.ts @@ -24,3 +24,4 @@ export * from "./plugin" export * from "./backup" export * from "./environmentVariable" export * from "./auditLog" +export * from "./rowAction" diff --git a/packages/types/src/sdk/events/rowAction.ts b/packages/types/src/sdk/events/rowAction.ts new file mode 100644 index 0000000000..924f11cf76 --- /dev/null +++ b/packages/types/src/sdk/events/rowAction.ts @@ -0,0 +1,6 @@ +import { BaseEvent } from "./event" + +export interface RowActionCreatedEvent extends BaseEvent { + name: string + automationId: string +} diff --git a/packages/types/src/sdk/events/view.ts b/packages/types/src/sdk/events/view.ts index 452094d2f4..84fcb0facc 100644 --- a/packages/types/src/sdk/events/view.ts +++ b/packages/types/src/sdk/events/view.ts @@ -1,8 +1,11 @@ -import { ViewCalculation } from "../../documents" +import { ViewCalculation, ViewV2Schema, ViewV2Type } from "../../documents" import { BaseEvent, TableExportFormat } from "./event" +import { LegacyFilter, SortOrder, SortType, UISearchFilter } from "../../api" +import { SearchFilters } from "../search" export interface ViewCreatedEvent extends BaseEvent { - tableId: string + name: string + type?: ViewV2Type } export interface ViewUpdatedEvent extends BaseEvent { From 8f20b3853b177713a262834ad01042a314290399 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 5 Dec 2024 16:39:25 +0000 Subject: [PATCH 02/68] wip --- .eslintignore | 13 - .eslintrc.json | 129 ---------- eslint.config.mjs | 212 ++++++++++++++++ package.json | 20 +- yarn.lock | 634 +++++++++++++++++++++++++++++++--------------- 5 files changed, 649 insertions(+), 359 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.json create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 2bc00912d2..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,13 +0,0 @@ -node_modules -public -dist -packages/server/builder -packages/server/coverage -packages/worker/coverage -packages/backend-core/coverage -packages/server/client -packages/server/coverage -packages/builder/.routify -packages/sdk/sdk -**/*.ivm.bundle.js -packages/server/build/oldClientVersions/**/** diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 4e6a169dae..0000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "es6": true, - "jest": true, - "node": true - }, - "parser": "@babel/eslint-parser", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module", - "allowImportExportEverywhere": true - }, - "ignorePatterns": [ - "node_modules", - "dist", - "public", - "*.spec.js", - "bundle.js" - ], - "extends": ["eslint:recommended"], - "plugins": ["import", "eslint-plugin-local-rules"], - "overrides": [ - { - "files": ["**/*.svelte"], - "extends": "plugin:svelte/recommended", - "parser": "svelte-eslint-parser", - "parserOptions": { - "parser": "@typescript-eslint/parser", - "ecmaVersion": 2019, - "allowImportExportEverywhere": true - } - }, - { - "files": ["**/*.ts"], - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], - "extends": ["eslint:recommended"], - "globals": { - "NodeJS": true - }, - "rules": { - "no-unused-vars": "off", - "local-rules/no-barrel-imports": "error", - "local-rules/no-budibase-imports": "error", - "local-rules/no-console-error": "error", - "@typescript-eslint/no-unused-vars": [ - "error", - { - "varsIgnorePattern": "^_", - "argsIgnorePattern": "^_", - "destructuredArrayIgnorePattern": "^_", - "ignoreRestSiblings": true - } - ], - "no-redeclare": "off", - "@typescript-eslint/no-redeclare": "error", - // have to turn this off to allow function overloading in typescript - "no-dupe-class-members": "off" - } - }, - { - "files": ["**/*.spec.ts"], - "parser": "@typescript-eslint/parser", - "plugins": ["jest", "@typescript-eslint"], - "extends": ["eslint:recommended", "plugin:jest/recommended"], - "env": { - "jest/globals": true - }, - "globals": { - "NodeJS": true - }, - "rules": { - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { - "varsIgnorePattern": "^_", - "argsIgnorePattern": "^_", - "destructuredArrayIgnorePattern": "^_", - "ignoreRestSiblings": true - } - ], - "local-rules/no-test-com": "error", - "local-rules/email-domain-example-com": "error", - "no-console": "warn", - // We have a lot of tests that don't have assertions, they use our test - // API client that does the assertions for them - "jest/expect-expect": "off", - // We do this in some tests where the behaviour of internal tables - // differs to external, but the API is broadly the same - "jest/no-conditional-expect": "off", - // have to turn this off to allow function overloading in typescript - "no-dupe-class-members": "off", - "no-redeclare": "off" - } - }, - { - "files": [ - "packages/builder/**/*", - "packages/client/**/*", - "packages/frontend-core/**/*" - ], - "rules": { - "no-console": ["error", { "allow": ["warn", "error", "debug"] }] - } - } - ], - "rules": { - "no-self-assign": "off", - "no-unused-vars": [ - "error", - { - "varsIgnorePattern": "^_", - "argsIgnorePattern": "^_", - "destructuredArrayIgnorePattern": "^_", - "ignoreRestSiblings": true - } - ], - "import/no-relative-packages": "error", - "import/export": "error", - "import/no-duplicates": "error", - "import/newline-after-import": "error" - }, - "globals": { - "GeolocationPositionError": true - } -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000000..4a063737b4 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,212 @@ +import _import from "eslint-plugin-import" +import localRules from "eslint-plugin-local-rules" +import { fixupPluginRules } from "@eslint/compat" +import globals from "globals" +import babelParser from "@babel/eslint-parser" +import parser from "svelte-eslint-parser" +import typescriptEslint from "@typescript-eslint/eslint-plugin" +import tsParser from "@typescript-eslint/parser" +import jest from "eslint-plugin-jest" +import path from "node:path" +import { fileURLToPath } from "node:url" +import js from "@eslint/js" +import { FlatCompat } from "@eslint/eslintrc" + +import eslint from "@eslint/js" +import tseslint from "typescript-eslint" + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, +}) + +export default [ + { + ignores: [ + "**/node_modules", + "**/dist", + "**/public", + "**/*.spec.js", + "**/bundle.js", + "**/node_modules", + "**/public", + "**/dist", + "packages/server/builder", + "packages/server/coverage", + "packages/worker/coverage", + "packages/backend-core/coverage", + "packages/server/client", + "packages/server/coverage", + "packages/builder/.routify", + "packages/sdk/sdk", + "**/*.ivm.bundle.js", + "packages/server/build/oldClientVersions/**/**/*", + ], + }, + tseslint.configs.recommended, + eslint.configs.recommended, + { + plugins: { + import: fixupPluginRules(_import), + "local-rules": localRules, + }, + + languageOptions: { + globals: { + ...globals.browser, + ...globals.jest, + ...globals.node, + // GeolocationPositionError: true, + }, + + parser: babelParser, + ecmaVersion: 2019, + sourceType: "module", + + parserOptions: { + allowImportExportEverywhere: true, + }, + }, + + rules: { + "no-self-assign": "off", + + "no-unused-vars": [ + "error", + { + varsIgnorePattern: "^_", + argsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + ignoreRestSiblings: true, + }, + ], + + "import/no-relative-packages": "error", + "import/export": "error", + "import/no-duplicates": "error", + "import/newline-after-import": "error", + }, + }, + ...compat.extends("plugin:svelte/recommended").map(config => ({ + ...config, + files: ["**/*.svelte"], + })), + { + files: ["**/*.svelte"], + + languageOptions: { + parser: parser, + ecmaVersion: 2019, + sourceType: "script", + + parserOptions: { + parser: "@typescript-eslint/parser", + allowImportExportEverywhere: true, + }, + }, + }, + ...compat.extends("eslint:recommended").map(config => ({ + ...config, + files: ["**/*.ts"], + })), + { + files: ["**/*.ts"], + + plugins: { + "@typescript-eslint": typescriptEslint, + }, + + languageOptions: { + globals: { + NodeJS: true, + }, + + parser: tsParser, + }, + + rules: { + "no-unused-vars": "off", + "local-rules/no-barrel-imports": "error", + "local-rules/no-budibase-imports": "error", + "local-rules/no-console-error": "error", + + "@typescript-eslint/no-unused-vars": [ + "error", + { + varsIgnorePattern: "^_", + argsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + ignoreRestSiblings: true, + }, + ], + + "no-redeclare": "off", + "@typescript-eslint/no-redeclare": "error", + "no-dupe-class-members": "off", + }, + }, + ...compat + .extends("eslint:recommended", "plugin:jest/recommended") + .map(config => ({ + ...config, + files: ["**/*.spec.ts"], + })), + { + files: ["**/*.spec.ts"], + + plugins: { + jest, + "@typescript-eslint": typescriptEslint, + }, + + languageOptions: { + globals: { + ...jest.environments.globals.globals, + NodeJS: true, + }, + + parser: tsParser, + }, + + rules: { + "no-unused-vars": "off", + + "@typescript-eslint/no-unused-vars": [ + "error", + { + varsIgnorePattern: "^_", + argsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + ignoreRestSiblings: true, + }, + ], + + "local-rules/no-test-com": "error", + "local-rules/email-domain-example-com": "error", + "no-console": "warn", + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "no-dupe-class-members": "off", + "no-redeclare": "off", + }, + }, + { + files: [ + "packages/builder/**/*", + "packages/client/**/*", + "packages/frontend-core/**/*", + ], + + rules: { + "no-console": [ + "error", + { + allow: ["warn", "error", "debug"], + }, + ], + }, + }, +] diff --git a/package.json b/package.json index 69eeaaa681..ece57f9cba 100644 --- a/package.json +++ b/package.json @@ -3,21 +3,22 @@ "private": true, "devDependencies": { "@babel/core": "^7.22.5", - "@babel/eslint-parser": "^7.22.5", + "@babel/eslint-parser": "7.25.9", "@babel/preset-env": "^7.22.5", "@esbuild-plugins/tsconfig-paths": "^0.1.2", + "@eslint/compat": "^1.2.4", "@types/node": "20.10.0", "@types/proper-lockfile": "^4.1.4", - "@typescript-eslint/parser": "6.9.0", + "@typescript-eslint/parser": "8.17.0", "cross-spawn": "7.0.6", "depcheck": "^1.4.7", "esbuild": "^0.18.17", "esbuild-node-externals": "^1.14.0", - "eslint": "^8.52.0", - "eslint-plugin-import": "^2.29.0", - "eslint-plugin-jest": "^27.9.0", - "eslint-plugin-local-rules": "^2.0.0", - "eslint-plugin-svelte": "^2.34.0", + "eslint": "9.16.0", + "eslint-plugin-import": "2.31.0", + "eslint-plugin-jest": "28.9.0", + "eslint-plugin-local-rules": "3.0.2", + "eslint-plugin-svelte": "2.46.1", "husky": "^8.0.3", "kill-port": "^1.6.1", "lerna": "7.4.2", @@ -29,7 +30,7 @@ "svelte": "4.2.19", "svelte-eslint-parser": "^0.33.1", "typescript": "5.7.2", - "typescript-eslint": "^7.3.1", + "typescript-eslint": "8.17.0", "yargs": "^17.7.2" }, "scripts": { @@ -115,7 +116,8 @@ "passport": "0.6.0", "fast-xml-parser": "4.4.1", "@azure/identity": "4.2.1", - "kind-of": "6.0.3" + "kind-of": "6.0.3", + "globals": "15.13.0" }, "engines": { "node": ">=20.0.0 <21.0.0" diff --git a/yarn.lock b/yarn.lock index b23894b464..4988e5237d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -964,10 +964,10 @@ json5 "^2.2.2" semver "^6.3.0" -"@babel/eslint-parser@^7.22.5": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.23.3.tgz#7bf0db1c53b54da0c8a12627373554a0828479ca" - integrity sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw== +"@babel/eslint-parser@7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.25.9.tgz#603c68a63078796527bc9d0833f5e52dd5f9224c" + integrity sha512-5UXfgpK0j0Xr/xIdgdLEhOFxaDZ0bRPWJJchRpqOSur/3rZoPbqqki5mm0p4NE2cs28krBEiSM2MB7//afRSQQ== dependencies: "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" eslint-visitor-keys "^2.1.0" @@ -2670,6 +2670,32 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== +"@eslint-community/regexpp@^4.12.1": + version "4.12.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + +"@eslint/compat@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@eslint/compat/-/compat-1.2.4.tgz#b69b0d76ce73fe66d7f8633c406acea151f5c559" + integrity sha512-S8ZdQj/N69YAtuqFt7653jwcvuUj131+6qGLUyDqfDg1OIoBQ66OCuXC473YQfO2AaxITTutiRQiDwoo7ZLYyg== + +"@eslint/config-array@^0.19.0": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.1.tgz#734aaea2c40be22bbb1f2a9dac687c57a6a4c984" + integrity sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA== + dependencies: + "@eslint/object-schema" "^2.1.5" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.9.0": + version "0.9.1" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.1.tgz#31763847308ef6b7084a4505573ac9402c51f9d1" + integrity sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q== + dependencies: + "@types/json-schema" "^7.0.15" + "@eslint/eslintrc@^2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" @@ -2685,11 +2711,43 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@eslint/eslintrc@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" + integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^10.0.1" + globals "^14.0.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + "@eslint/js@8.57.0": version "8.57.0" resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@9.16.0": + version "9.16.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.16.0.tgz#3df2b2dd3b9163056616886c86e4082f45dbf3f4" + integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg== + +"@eslint/object-schema@^2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.5.tgz#8670a8f6258a2be5b2c620ff314a1d984c23eb2e" + integrity sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ== + +"@eslint/plugin-kit@^0.2.3": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz#2b78e7bb3755784bb13faa8932a1d994d6537792" + integrity sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg== + dependencies: + levn "^0.4.1" + "@fastify/busboy@^2.0.0": version "2.1.1" resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d" @@ -2810,6 +2868,19 @@ dependencies: "@hapi/hoek" "^9.0.0" +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.6" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== + dependencies: + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.3.0" + "@humanwhocodes/config-array@^0.11.14": version "0.11.14" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" @@ -2829,6 +2900,16 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@humanwhocodes/retry@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== + +"@humanwhocodes/retry@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== + "@hutson/parse-repository-url@^3.0.0": version "3.0.2" resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" @@ -4232,6 +4313,11 @@ node-fetch "^2.6.0" utf-8-validate "^5.0.2" +"@rtsao/scc@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" + integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== + "@shopify/jest-koa-mocks@5.1.1": version "5.1.1" resolved "https://registry.yarnpkg.com/@shopify/jest-koa-mocks/-/jest-koa-mocks-5.1.1.tgz#d615815b0cf0ec9823d054da68c419508b3c3193" @@ -5512,6 +5598,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== +"@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + "@types/express-serve-static-core@^4.17.33": version "4.17.33" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz#de35d30a9d637dc1450ad18dd583d75d5733d543" @@ -5594,7 +5685,7 @@ expect "^29.0.0" pretty-format "^29.0.0" -"@types/json-schema@^7.0.6", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.15", "@types/json-schema@^7.0.6": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -6047,11 +6138,6 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.7.tgz#b9eb89d7dfa70d5d1ce525bc1411a35347f533a3" integrity sha512-4g1jrL98mdOIwSOUh6LTlB0Cs9I0dQPwINUhBg7C6pN4HLr8GS8xsksJxilW6S6dQHVi2K/o+lQuQcg7LroCnw== -"@types/semver@^7.3.12": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - "@types/serve-static@*": version "1.15.1" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.1.tgz#86b1753f0be4f9a1bee68d459fcda5be4ea52b5d" @@ -6218,74 +6304,47 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz#b16d3cf3ee76bf572fdf511e79c248bdec619ea3" - integrity sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw== +"@typescript-eslint/eslint-plugin@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz#2ee073c421f4e81e02d10e731241664b6253b23c" + integrity sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.18.0" - "@typescript-eslint/type-utils" "7.18.0" - "@typescript-eslint/utils" "7.18.0" - "@typescript-eslint/visitor-keys" "7.18.0" + "@typescript-eslint/scope-manager" "8.17.0" + "@typescript-eslint/type-utils" "8.17.0" + "@typescript-eslint/utils" "8.17.0" + "@typescript-eslint/visitor-keys" "8.17.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@6.9.0": - version "6.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.9.0.tgz#2b402cadeadd3f211c25820e5433413347b27391" - integrity sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw== +"@typescript-eslint/parser@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.17.0.tgz#2ee972bb12fa69ac625b85813dc8d9a5a053ff52" + integrity sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg== dependencies: - "@typescript-eslint/scope-manager" "6.9.0" - "@typescript-eslint/types" "6.9.0" - "@typescript-eslint/typescript-estree" "6.9.0" - "@typescript-eslint/visitor-keys" "6.9.0" + "@typescript-eslint/scope-manager" "8.17.0" + "@typescript-eslint/types" "8.17.0" + "@typescript-eslint/typescript-estree" "8.17.0" + "@typescript-eslint/visitor-keys" "8.17.0" debug "^4.3.4" -"@typescript-eslint/parser@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.18.0.tgz#83928d0f1b7f4afa974098c64b5ce6f9051f96a0" - integrity sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg== +"@typescript-eslint/scope-manager@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz#a3f49bf3d4d27ff8d6b2ea099ba465ef4dbcaa3a" + integrity sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg== dependencies: - "@typescript-eslint/scope-manager" "7.18.0" - "@typescript-eslint/types" "7.18.0" - "@typescript-eslint/typescript-estree" "7.18.0" - "@typescript-eslint/visitor-keys" "7.18.0" - debug "^4.3.4" + "@typescript-eslint/types" "8.17.0" + "@typescript-eslint/visitor-keys" "8.17.0" -"@typescript-eslint/scope-manager@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" - integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== +"@typescript-eslint/type-utils@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz#d326569f498cdd0edf58d5bb6030b4ad914e63d3" + integrity sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" - -"@typescript-eslint/scope-manager@6.9.0": - version "6.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.9.0.tgz#2626e9a7fe0e004c3e25f3b986c75f584431134e" - integrity sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw== - dependencies: - "@typescript-eslint/types" "6.9.0" - "@typescript-eslint/visitor-keys" "6.9.0" - -"@typescript-eslint/scope-manager@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz#c928e7a9fc2c0b3ed92ab3112c614d6bd9951c83" - integrity sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA== - dependencies: - "@typescript-eslint/types" "7.18.0" - "@typescript-eslint/visitor-keys" "7.18.0" - -"@typescript-eslint/type-utils@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz#2165ffaee00b1fbbdd2d40aa85232dab6998f53b" - integrity sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA== - dependencies: - "@typescript-eslint/typescript-estree" "7.18.0" - "@typescript-eslint/utils" "7.18.0" + "@typescript-eslint/typescript-estree" "8.17.0" + "@typescript-eslint/utils" "8.17.0" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -6299,51 +6358,20 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@6.9.0": - version "6.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.9.0.tgz#86a0cbe7ac46c0761429f928467ff3d92f841098" - integrity sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw== +"@typescript-eslint/types@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.17.0.tgz#ef84c709ef8324e766878834970bea9a7e3b72cf" + integrity sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA== -"@typescript-eslint/types@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9" - integrity sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ== - -"@typescript-eslint/typescript-estree@5.62.0", "@typescript-eslint/typescript-estree@^5.13.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" - integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== +"@typescript-eslint/typescript-estree@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz#40b5903bc929b1e8dd9c77db3cb52cfb199a2a34" + integrity sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/types" "8.17.0" + "@typescript-eslint/visitor-keys" "8.17.0" debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/typescript-estree@6.9.0": - version "6.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.0.tgz#d0601b245be873d8fe49f3737f93f8662c8693d4" - integrity sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ== - dependencies: - "@typescript-eslint/types" "6.9.0" - "@typescript-eslint/visitor-keys" "6.9.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/typescript-estree@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz#b5868d486c51ce8f312309ba79bdb9f331b37931" - integrity sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA== - dependencies: - "@typescript-eslint/types" "7.18.0" - "@typescript-eslint/visitor-keys" "7.18.0" - debug "^4.3.4" - globby "^11.1.0" + fast-glob "^3.3.2" is-glob "^4.0.3" minimatch "^9.0.4" semver "^7.6.0" @@ -6362,29 +6390,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.18.0.tgz#bca01cde77f95fc6a8d5b0dbcbfb3d6ca4be451f" - integrity sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw== +"@typescript-eslint/typescript-estree@^5.13.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@8.17.0", "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.17.0.tgz#41c05105a2b6ab7592f513d2eeb2c2c0236d8908" + integrity sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "7.18.0" - "@typescript-eslint/types" "7.18.0" - "@typescript-eslint/typescript-estree" "7.18.0" - -"@typescript-eslint/utils@^5.10.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" - integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" - eslint-scope "^5.1.1" - semver "^7.3.7" + "@typescript-eslint/scope-manager" "8.17.0" + "@typescript-eslint/types" "8.17.0" + "@typescript-eslint/typescript-estree" "8.17.0" "@typescript-eslint/visitor-keys@4.33.0": version "4.33.0" @@ -6402,21 +6429,13 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@6.9.0": - version "6.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.0.tgz#cc69421c10c4ac997ed34f453027245988164e80" - integrity sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg== +"@typescript-eslint/visitor-keys@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz#4dbcd0e28b9bf951f4293805bf34f98df45e1aa8" + integrity sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg== dependencies: - "@typescript-eslint/types" "6.9.0" - eslint-visitor-keys "^3.4.1" - -"@typescript-eslint/visitor-keys@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz#0564629b6124d67607378d0f0332a0495b25e7d7" - integrity sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg== - dependencies: - "@typescript-eslint/types" "7.18.0" - eslint-visitor-keys "^3.4.3" + "@typescript-eslint/types" "8.17.0" + eslint-visitor-keys "^4.2.0" "@ungap/structured-clone@^1.2.0": version "1.2.0" @@ -6701,6 +6720,11 @@ acorn@^8.1.0, acorn@^8.10.0, acorn@^8.11.0, acorn@^8.11.3, acorn@^8.2.4, acorn@^ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== +acorn@^8.14.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -7002,6 +7026,18 @@ array-includes@^3.1.7: get-intrinsic "^1.2.1" is-string "^1.0.7" +array-includes@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" + integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" + is-string "^1.0.7" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -7023,6 +7059,18 @@ array.prototype.findlastindex@^1.2.3: es-shim-unscopables "^1.0.0" get-intrinsic "^1.2.1" +array.prototype.findlastindex@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" + integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + array.prototype.flat@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" @@ -8797,7 +8845,7 @@ cron-validate@1.4.5: dependencies: yup "0.32.9" -cross-spawn@7.0.6: +cross-spawn@7.0.6, cross-spawn@^7.0.5: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -10119,7 +10167,7 @@ es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0: unbox-primitive "^1.0.2" which-typed-array "^1.1.15" -es-abstract@^1.23.3: +es-abstract@^1.23.2, es-abstract@^1.23.3: version "1.23.5" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.5.tgz#f4599a4946d57ed467515ed10e4f157289cd52fb" integrity sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ== @@ -10214,7 +10262,7 @@ es-set-tostringtag@^2.0.3: has-tostringtag "^1.0.2" hasown "^2.0.1" -es-shim-unscopables@^1.0.0: +es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== @@ -10322,10 +10370,12 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-compat-utils@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz#f45e3b5ced4c746c127cf724fb074cd4e730d653" - integrity sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg== +eslint-compat-utils@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz#7fc92b776d185a70c4070d03fd26fde3d59652e4" + integrity sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q== + dependencies: + semver "^7.5.4" eslint-config-airbnb-base@^15.0.0: version "15.0.0" @@ -10346,6 +10396,13 @@ eslint-import-resolver-node@^0.3.9: is-core-module "^2.13.0" resolve "^1.22.4" +eslint-module-utils@^2.12.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz#fe4cfb948d61f49203d7b08871982b65b9af0b0b" + integrity sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg== + dependencies: + debug "^3.2.7" + eslint-module-utils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" @@ -10353,7 +10410,32 @@ eslint-module-utils@^2.8.0: dependencies: debug "^3.2.7" -eslint-plugin-import@^2.26.0, eslint-plugin-import@^2.29.0: +eslint-plugin-import@2.31.0: + version "2.31.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz#310ce7e720ca1d9c0bb3f69adfd1c6bdd7d9e0e7" + integrity sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A== + dependencies: + "@rtsao/scc" "^1.1.0" + array-includes "^3.1.8" + array.prototype.findlastindex "^1.2.5" + array.prototype.flat "^1.3.2" + array.prototype.flatmap "^1.3.2" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.9" + eslint-module-utils "^2.12.0" + hasown "^2.0.2" + is-core-module "^2.15.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.fromentries "^2.0.8" + object.groupby "^1.0.3" + object.values "^1.2.0" + semver "^6.3.1" + string.prototype.trimend "^1.0.8" + tsconfig-paths "^3.15.0" + +eslint-plugin-import@^2.26.0: version "2.29.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== @@ -10376,37 +10458,36 @@ eslint-plugin-import@^2.26.0, eslint-plugin-import@^2.29.0: semver "^6.3.1" tsconfig-paths "^3.15.0" -eslint-plugin-jest@^27.9.0: - version "27.9.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz#7c98a33605e1d8b8442ace092b60e9919730000b" - integrity sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug== +eslint-plugin-jest@28.9.0: + version "28.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.9.0.tgz#19168dfaed124339cd2252c4c4d1ac3688aeb243" + integrity sha512-rLu1s1Wf96TgUUxSw6loVIkNtUjq1Re7A9QdCCHSohnvXEBAjuL420h0T/fMmkQlNsQP2GhQzEUpYHPfxBkvYQ== dependencies: - "@typescript-eslint/utils" "^5.10.0" + "@typescript-eslint/utils" "^6.0.0 || ^7.0.0 || ^8.0.0" -eslint-plugin-local-rules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-local-rules/-/eslint-plugin-local-rules-2.0.0.tgz#cda95d7616cc0e2609d76c347c187ca2be1e252e" - integrity sha512-sWueme0kUcP0JC1+6OBDQ9edBDVFJR92WJHSRbhiRExlenMEuUisdaVBPR+ItFBFXo2Pdw6FD2UfGZWkz8e93g== +eslint-plugin-local-rules@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-local-rules/-/eslint-plugin-local-rules-3.0.2.tgz#84c02ea1d604ecb00970779ad27f00738ff361ae" + integrity sha512-IWME7GIYHXogTkFsToLdBCQVJ0U4kbSuVyDT+nKoR4UgtnVrrVeNWuAZkdEu1nxkvi9nsPccGehEEF6dgA28IQ== -eslint-plugin-svelte@^2.34.0: - version "2.35.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-svelte/-/eslint-plugin-svelte-2.35.1.tgz#7b1e3c263b09dbc9293c25fe02d03d309725d2b9" - integrity sha512-IF8TpLnROSGy98Z3NrsKXWDSCbNY2ReHDcrYTuXZMbfX7VmESISR78TWgO9zdg4Dht1X8coub5jKwHzP0ExRug== +eslint-plugin-svelte@2.46.1: + version "2.46.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-svelte/-/eslint-plugin-svelte-2.46.1.tgz#22691c8685420cd4eabf0cbaa31a0cfb8395595b" + integrity sha512-7xYr2o4NID/f9OEYMqxsEQsCsj4KaMy4q5sANaKkAb6/QeCjYFxRmDm2S3YC3A3pl1kyPZ/syOx/i7LcWYSbIw== dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - debug "^4.3.1" - eslint-compat-utils "^0.1.2" + "@eslint-community/eslint-utils" "^4.4.0" + "@jridgewell/sourcemap-codec" "^1.4.15" + eslint-compat-utils "^0.5.1" esutils "^2.0.3" - known-css-properties "^0.29.0" - postcss "^8.4.5" + known-css-properties "^0.35.0" + postcss "^8.4.38" postcss-load-config "^3.1.4" postcss-safe-parser "^6.0.0" - postcss-selector-parser "^6.0.11" - semver "^7.5.3" - svelte-eslint-parser ">=0.33.0 <1.0.0" + postcss-selector-parser "^6.1.0" + semver "^7.6.2" + svelte-eslint-parser "^0.43.0" -eslint-scope@5.1.1, eslint-scope@^5.1.1: +eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -10422,6 +10503,14 @@ eslint-scope@^7.0.0, eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" +eslint-scope@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" + integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" @@ -10432,7 +10521,52 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.52.0, eslint@^8.56.0: +eslint-visitor-keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== + +eslint@9.16.0: + version "9.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.16.0.tgz#66832e66258922ac0a626f803a9273e37747f2a6" + integrity sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.19.0" + "@eslint/core" "^0.9.0" + "@eslint/eslintrc" "^3.2.0" + "@eslint/js" "9.16.0" + "@eslint/plugin-kit" "^0.2.3" + "@humanfs/node" "^0.16.6" + "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.4.1" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.5" + debug "^4.3.2" + escape-string-regexp "^4.0.0" + eslint-scope "^8.2.0" + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" + esquery "^1.5.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^8.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + json-stable-stringify-without-jsonify "^1.0.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + +eslint@^8.56.0: version "8.57.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== @@ -10481,6 +10615,15 @@ esm@^3.2.25: resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== +espree@^10.0.1, espree@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" + integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== + dependencies: + acorn "^8.14.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.0" + espree@^9.0.0, espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -10510,7 +10653,7 @@ esprima@~3.1.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" integrity sha512-AWwVMNxwhN8+NIPQzAQZCm7RkLC4RbM3B1OobMuyp3i+w73X57KCKaVIxaRZb+DYCojq7rspo+fmuQfAboyhFg== -esquery@^1.4.2: +esquery@^1.4.2, esquery@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== @@ -10739,6 +10882,17 @@ fast-glob@^3.2.11, fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-patch@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" @@ -10872,6 +11026,13 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== + dependencies: + flat-cache "^4.0.0" + file-type@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/file-type/-/file-type-11.1.0.tgz#93780f3fed98b599755d846b99a1617a2ad063b8" @@ -11016,6 +11177,14 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.4" + flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" @@ -11026,6 +11195,11 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== +flatted@^3.2.9: + version "3.3.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.2.tgz#adba1448a9841bec72b42c532ea23dbbedef1a27" + integrity sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA== + flatten@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" @@ -11674,17 +11848,10 @@ global@~4.4.0: min-document "^2.19.0" process "^0.11.10" -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== - dependencies: - type-fest "^0.20.2" +globals@15.13.0, globals@^11.1.0, globals@^13.19.0, globals@^14.0.0: + version "15.13.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.13.0.tgz#bbec719d69aafef188ecd67954aae76a696010fc" + integrity sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g== globalthis@^1.0.1, globalthis@^1.0.3: version "1.0.3" @@ -12644,7 +12811,7 @@ is-class-hotfix@~0.0.6: resolved "https://registry.yarnpkg.com/is-class-hotfix/-/is-class-hotfix-0.0.6.tgz#a527d31fb23279281dde5f385c77b5de70a72435" integrity sha512-0n+pzCC6ICtVr/WXnN2f03TK/3BfXY7me4cjCAqT8TYXEl0+JBRoqBo94JJHXcyDSLUeWbNX8Fvy5g5RJdAstQ== -is-core-module@^2.12.0: +is-core-module@^2.12.0, is-core-module@^2.15.1: version "2.15.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== @@ -13770,6 +13937,11 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-format-highlight@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/json-format-highlight/-/json-format-highlight-1.0.4.tgz#2e44277edabcec79a3d2c84e984c62e2258037b9" @@ -13943,6 +14115,13 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" +keyv@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kill-port@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/kill-port/-/kill-port-1.6.1.tgz#560fe79484583bdf3a5e908557dae614447618aa" @@ -13986,10 +14165,10 @@ knex@2.4.2: tarn "^3.0.2" tildify "2.0.0" -known-css-properties@^0.29.0: - version "0.29.0" - resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.29.0.tgz#e8ba024fb03886f23cb882e806929f32d814158f" - integrity sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ== +known-css-properties@^0.35.0: + version "0.35.0" + resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.35.0.tgz#f6f8e40ab4e5700fa32f5b2ef5218a56bc853bd6" + integrity sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A== koa-body@4.2.0: version "4.2.0" @@ -16159,6 +16338,16 @@ object.fromentries@^2.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" +object.fromentries@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + object.groupby@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" @@ -16169,6 +16358,15 @@ object.groupby@^1.0.1: es-abstract "^1.22.1" get-intrinsic "^1.2.1" +object.groupby@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" + integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + object.values@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" @@ -16178,6 +16376,15 @@ object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" +object.values@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" + integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + octal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/octal/-/octal-1.0.0.tgz#63e7162a68efbeb9e213588d58e989d1e5c4530b" @@ -17129,15 +17336,15 @@ postcss-safe-parser@^6.0.0: resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz#bb4c29894171a94bc5c996b9a30317ef402adaa1" integrity sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ== -postcss-scss@^4.0.8: +postcss-scss@^4.0.8, postcss-scss@^4.0.9: version "4.0.9" resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.9.tgz#a03c773cd4c9623cb04ce142a52afcec74806685" integrity sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A== -postcss-selector-parser@^6.0.11: - version "6.0.13" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz#d05d8d76b1e8e173257ef9d60b706a8e5e99bf1b" - integrity sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ== +postcss-selector-parser@^6.1.0: + version "6.1.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" + integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" @@ -17160,7 +17367,7 @@ postcss-values-parser@^6.0.2: is-url-superb "^4.0.0" quote-unquote "^1.0.0" -postcss@^8.1.7, postcss@^8.3.11, postcss@^8.4.12, postcss@^8.4.27, postcss@^8.4.29, postcss@^8.4.5: +postcss@^8.1.7, postcss@^8.3.11, postcss@^8.4.12, postcss@^8.4.27, postcss@^8.4.29: version "8.4.41" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681" integrity sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ== @@ -17169,7 +17376,7 @@ postcss@^8.1.7, postcss@^8.3.11, postcss@^8.4.12, postcss@^8.4.27, postcss@^8.4. picocolors "^1.0.1" source-map-js "^1.2.0" -postcss@^8.4.48: +postcss@^8.4.38, postcss@^8.4.39, postcss@^8.4.48: version "8.4.49" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.49.tgz#4ea479048ab059ab3ae61d082190fabfd994fe19" integrity sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA== @@ -18765,7 +18972,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -"semver@2 || 3 || 4 || 5", semver@7.5.3, semver@^5.6.0, semver@^5.7.1, semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@~2.3.1: +"semver@2 || 3 || 4 || 5", semver@7.5.3, semver@^5.6.0, semver@^5.7.1, semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2, semver@~2.3.1: version "7.5.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== @@ -19753,7 +19960,7 @@ svelte-dnd-action@^0.9.8: resolved "https://registry.yarnpkg.com/svelte-dnd-action/-/svelte-dnd-action-0.9.22.tgz#003eee9dddb31d8c782f6832aec8b1507fff194d" integrity sha512-lOQJsNLM1QWv5mdxIkCVtk6k4lHCtLgfE59y8rs7iOM6erchbLC9hMEFYSveZz7biJV0mpg7yDSs4bj/RT/YkA== -"svelte-eslint-parser@>=0.33.0 <1.0.0", svelte-eslint-parser@^0.33.1: +svelte-eslint-parser@^0.33.1: version "0.33.1" resolved "https://registry.yarnpkg.com/svelte-eslint-parser/-/svelte-eslint-parser-0.33.1.tgz#c64dbed2fad099577429b3c39377f6b8d36e5d97" integrity sha512-vo7xPGTlKBGdLH8T5L64FipvTrqv3OQRx9d2z5X05KKZDlF4rQk8KViZO4flKERY+5BiVdOh7zZ7JGJWo5P0uA== @@ -19764,6 +19971,17 @@ svelte-dnd-action@^0.9.8: postcss "^8.4.29" postcss-scss "^4.0.8" +svelte-eslint-parser@^0.43.0: + version "0.43.0" + resolved "https://registry.yarnpkg.com/svelte-eslint-parser/-/svelte-eslint-parser-0.43.0.tgz#649e80f65183c4c1d1536d03dcb903e0632f4da4" + integrity sha512-GpU52uPKKcVnh8tKN5P4UZpJ/fUDndmq7wfsvoVXsyP+aY0anol7Yqo01fyrlaWGMFfm4av5DyrjlaXdLRJvGA== + dependencies: + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + postcss "^8.4.39" + postcss-scss "^4.0.9" + svelte-hmr@^0.15.1: version "0.15.3" resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.15.3.tgz#df54ccde9be3f091bf5f18fc4ef7b8eb6405fbe6" @@ -20334,7 +20552,7 @@ triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== -ts-api-utils@^1.0.1, ts-api-utils@^1.3.0: +ts-api-utils@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== @@ -20598,14 +20816,14 @@ typeof@^1.0.0: resolved "https://registry.yarnpkg.com/typeof/-/typeof-1.0.0.tgz#9c84403f2323ae5399167275497638ea1d2f2440" integrity sha512-Pze0mIxYXhaJdpw1ayMzOA7rtGr1OmsTY/Z+FWtRKIqXFz6aoDLjqdbWE/tcIBSC8nhnVXiRrEXujodR/xiFAA== -typescript-eslint@^7.3.1: - version "7.18.0" - resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.18.0.tgz#e90d57649b2ad37a7475875fa3e834a6d9f61eb2" - integrity sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA== +typescript-eslint@8.17.0: + version "8.17.0" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.17.0.tgz#fa4033c26b3b40f778287bc12918d985481b220b" + integrity sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA== dependencies: - "@typescript-eslint/eslint-plugin" "7.18.0" - "@typescript-eslint/parser" "7.18.0" - "@typescript-eslint/utils" "7.18.0" + "@typescript-eslint/eslint-plugin" "8.17.0" + "@typescript-eslint/parser" "8.17.0" + "@typescript-eslint/utils" "8.17.0" typescript@5.7.2: version "5.7.2" From f4f70220d232bb4f52dbc436e9fa8f5ca1bdeab5 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 11:49:52 +0100 Subject: [PATCH 03/68] Monorepo package versions to * --- package.json | 8 ++++---- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 6 +++--- packages/client/package.json | 10 +++++----- packages/frontend-core/package.json | 6 +++--- packages/pro | 2 +- packages/server/package.json | 14 +++++++------- packages/shared-core/package.json | 2 +- packages/worker/package.json | 10 +++++----- 11 files changed, 38 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index 2e9a2cc9af..3ccba61a71 100644 --- a/package.json +++ b/package.json @@ -99,10 +99,10 @@ ] }, "resolutions": { - "@budibase/backend-core": "0.0.0", - "@budibase/shared-core": "0.0.0", - "@budibase/string-templates": "0.0.0", - "@budibase/types": "0.0.0", + "@budibase/backend-core": "*", + "@budibase/shared-core": "*", + "@budibase/string-templates": "*", + "@budibase/types": "*", "@budibase/pro": "npm:@budibase/pro@latest", "tough-cookie": "4.1.3", "node-fetch": "2.6.7", diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 3248fd8ceb..b2cb1ba526 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -31,8 +31,8 @@ "dependencies": { "@budibase/nano": "10.1.5", "@budibase/pouchdb-replication-stream": "1.2.11", - "@budibase/shared-core": "0.0.0", - "@budibase/types": "0.0.0", + "@budibase/shared-core": "*", + "@budibase/types": "*", "@techpass/passport-openidconnect": "0.3.3", "aws-cloudfront-sign": "3.0.2", "aws-sdk": "2.1692.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 35f6676fdc..89f72bc46d 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -29,8 +29,8 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "1.2.1", - "@budibase/shared-core": "0.0.0", - "@budibase/string-templates": "0.0.0", + "@budibase/shared-core": "*", + "@budibase/string-templates": "*", "@spectrum-css/accordion": "3.0.24", "@spectrum-css/actionbutton": "1.0.1", "@spectrum-css/actiongroup": "1.0.1", diff --git a/packages/builder/package.json b/packages/builder/package.json index c98e817486..485cced7ab 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -48,11 +48,11 @@ ] }, "dependencies": { - "@budibase/bbui": "0.0.0", - "@budibase/frontend-core": "0.0.0", - "@budibase/shared-core": "0.0.0", - "@budibase/string-templates": "0.0.0", - "@budibase/types": "0.0.0", + "@budibase/bbui": "*", + "@budibase/frontend-core": "*", + "@budibase/shared-core": "*", + "@budibase/string-templates": "*", + "@budibase/types": "*", "@codemirror/autocomplete": "^6.7.1", "@codemirror/commands": "^6.2.4", "@codemirror/lang-javascript": "^6.1.8", diff --git a/packages/cli/package.json b/packages/cli/package.json index 8efdcc7816..2d5f3b47ef 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -15,9 +15,9 @@ "start": "ts-node ./src/index.ts" }, "dependencies": { - "@budibase/backend-core": "0.0.0", - "@budibase/string-templates": "0.0.0", - "@budibase/types": "0.0.0", + "@budibase/backend-core": "*", + "@budibase/string-templates": "*", + "@budibase/types": "*", "chalk": "4.1.0", "cli-progress": "3.11.2", "commander": "7.1.0", diff --git a/packages/client/package.json b/packages/client/package.json index 073869415d..23d75f5fd1 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -19,11 +19,11 @@ "dev": "vite build --watch" }, "dependencies": { - "@budibase/bbui": "0.0.0", - "@budibase/frontend-core": "0.0.0", - "@budibase/shared-core": "0.0.0", - "@budibase/string-templates": "0.0.0", - "@budibase/types": "0.0.0", + "@budibase/bbui": "*", + "@budibase/frontend-core": "*", + "@budibase/shared-core": "*", + "@budibase/string-templates": "*", + "@budibase/types": "*", "@spectrum-css/card": "3.0.3", "apexcharts": "^3.48.0", "dayjs": "^1.10.8", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 2eed29f77c..44ffd6580f 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -6,9 +6,9 @@ "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "0.0.0", - "@budibase/shared-core": "0.0.0", - "@budibase/types": "0.0.0", + "@budibase/bbui": "*", + "@budibase/shared-core": "*", + "@budibase/types": "*", "dayjs": "^1.10.8", "lodash": "4.17.21", "shortid": "2.2.15", diff --git a/packages/pro b/packages/pro index 7b8789efd9..bbef2952d5 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 7b8789efd940d9f8e5be9927243b19f07361c445 +Subproject commit bbef2952d51ce5a592cf1d537ab2a7cc433c6c8c diff --git a/packages/server/package.json b/packages/server/package.json index 63d7ed3a9a..0c7afdfe23 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -51,14 +51,14 @@ "dependencies": { "@apidevtools/swagger-parser": "10.0.3", "@azure/msal-node": "^2.5.1", - "@budibase/backend-core": "0.0.0", - "@budibase/client": "0.0.0", - "@budibase/frontend-core": "0.0.0", + "@budibase/backend-core": "*", + "@budibase/client": "*", + "@budibase/frontend-core": "*", "@budibase/nano": "10.1.5", - "@budibase/pro": "0.0.0", - "@budibase/shared-core": "0.0.0", - "@budibase/string-templates": "0.0.0", - "@budibase/types": "0.0.0", + "@budibase/pro": "*", + "@budibase/shared-core": "*", + "@budibase/string-templates": "*", + "@budibase/types": "*", "@bull-board/api": "5.10.2", "@bull-board/koa": "5.10.2", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index da74d090b6..7c5c7aabbb 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -16,7 +16,7 @@ "test:watch": "yarn test --watchAll" }, "dependencies": { - "@budibase/types": "0.0.0", + "@budibase/types": "*", "cron-validate": "1.4.5" }, "devDependencies": { diff --git a/packages/worker/package.json b/packages/worker/package.json index 36c88a9a49..9038b0c4f5 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -38,11 +38,11 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "0.0.0", - "@budibase/pro": "0.0.0", - "@budibase/shared-core": "0.0.0", - "@budibase/string-templates": "0.0.0", - "@budibase/types": "0.0.0", + "@budibase/backend-core": "*", + "@budibase/pro": "*", + "@budibase/shared-core": "*", + "@budibase/string-templates": "*", + "@budibase/types": "*", "@koa/router": "13.1.0", "@techpass/passport-openidconnect": "0.3.3", "@types/global-agent": "2.1.1", From 8cfe886d465fa925f9ebb47386137da4e2b9dab8 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 12:01:14 +0100 Subject: [PATCH 04/68] Add base tsconfig.build.json --- nx.json | 3 ++- tsconfig.build.json | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tsconfig.build.json diff --git a/nx.json b/nx.json index 22b23a7874..a71ee6961c 100644 --- a/nx.json +++ b/nx.json @@ -12,7 +12,8 @@ "inputs": [ "{workspaceRoot}/scripts/*", "{workspaceRoot}/lerna.json", - "{workspaceRoot}/.github/workflows/*" + "{workspaceRoot}/.github/workflows/*", + "{workspaceRoot}/tsconfig.build.json" ] }, "test": { diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000000..022e0ae76d --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": ["es2020"], + "strict": true, + "noImplicitAny": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "declaration": true, + "isolatedModules": true + }, + "exclude": [] +} From 17910271507e00e87eb0a9120bd3b352b2cab24a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 12:08:52 +0100 Subject: [PATCH 05/68] Use base tsconfig --- packages/types/tsconfig.build.json | 17 +++-------------- packages/types/tsconfig.json | 6 +----- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/packages/types/tsconfig.build.json b/packages/types/tsconfig.build.json index 1e289260e4..3c2699efee 100644 --- a/packages/types/tsconfig.build.json +++ b/packages/types/tsconfig.build.json @@ -1,19 +1,8 @@ { + "extends": "../../tsconfig.build.json", "compilerOptions": { - "target": "es6", - "module": "commonjs", - "lib": ["es2020"], - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "incremental": true, - "sourceMap": true, - "declaration": true, - "skipLibCheck": true, - "outDir": "dist", - "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + "outDir": "dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.spec.js"] + "exclude": ["node_modules", "dist"] } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index ad5356c2dc..d8faaf5080 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,7 +1,3 @@ { - "extends": "./tsconfig.build.json", - "compilerOptions": { - "composite": true - }, - "exclude": ["node_modules", "dist"] + "extends": "./tsconfig.build.json" } From 9272e170bea8ee3ec70107c71bb87f455ba5bc1c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 12:17:10 +0100 Subject: [PATCH 06/68] Run dev without building types --- packages/client/package.json | 3 +-- packages/pro | 2 +- packages/shared-core/package.json | 10 ---------- packages/types/package.json | 1 - 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/client/package.json b/packages/client/package.json index 23d75f5fd1..6b9131dac0 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -62,8 +62,7 @@ { "projects": [ "@budibase/shared-core", - "@budibase/string-templates", - "@budibase/types" + "@budibase/string-templates" ], "target": "build" } diff --git a/packages/pro b/packages/pro index bbef2952d5..ef5c39d488 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit bbef2952d51ce5a592cf1d537ab2a7cc433c6c8c +Subproject commit ef5c39d48843cd0c2e8b72b08a89a35ee380a214 diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 7c5c7aabbb..395bf420c4 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -34,16 +34,6 @@ "target": "build" } ] - }, - "dev": { - "dependsOn": [ - { - "projects": [ - "@budibase/types" - ], - "target": "build" - } - ] } } } diff --git a/packages/types/package.json b/packages/types/package.json index ae99d31838..ac01e06da3 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -10,7 +10,6 @@ "prebuild": "rimraf dist/", "build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", - "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020" }, "jest": {}, From 9f72e285f74de735ffe56a5c40d4a79fbc1f39c6 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 12:43:50 +0100 Subject: [PATCH 07/68] Run dev without building types --- packages/backend-core/package.json | 16 +--------------- packages/client/package.json | 1 - packages/server/package.json | 2 +- packages/shared-core/package.json | 14 -------------- packages/worker/package.json | 2 +- 5 files changed, 3 insertions(+), 32 deletions(-) diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index b2cb1ba526..d089a166a6 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -23,6 +23,7 @@ "prepack": "cp package.json dist", "build": "tsc -p tsconfig.build.json --paths null && node ./scripts/build.js", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", + "build:oss": "node ./scripts/build.js", "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020", "check:dependencies": "node ../../scripts/depcheck.js", "test": "bash scripts/test.sh", @@ -94,20 +95,5 @@ "testcontainers": "^10.7.2", "timekeeper": "2.2.0", "typescript": "5.5.2" - }, - "nx": { - "targets": { - "build": { - "dependsOn": [ - { - "projects": [ - "@budibase/shared-core", - "@budibase/types" - ], - "target": "build" - } - ] - } - } } } diff --git a/packages/client/package.json b/packages/client/package.json index 6b9131dac0..7c266bba1d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -61,7 +61,6 @@ "dependsOn": [ { "projects": [ - "@budibase/shared-core", "@budibase/string-templates" ], "target": "build" diff --git a/packages/server/package.json b/packages/server/package.json index 0c7afdfe23..f8b8b30488 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -188,7 +188,7 @@ "projects": [ "@budibase/backend-core" ], - "target": "build" + "target": "build:oss" } ] }, diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 395bf420c4..e7b98e469b 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -22,19 +22,5 @@ "devDependencies": { "rimraf": "3.0.2", "typescript": "5.5.2" - }, - "nx": { - "targets": { - "build": { - "dependsOn": [ - { - "projects": [ - "@budibase/types" - ], - "target": "build" - } - ] - } - } } } diff --git a/packages/worker/package.json b/packages/worker/package.json index 9038b0c4f5..68bddd1128 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -109,7 +109,7 @@ "projects": [ "@budibase/backend-core" ], - "target": "build" + "target": "build:oss" } ] } From 7f3dab40bf177bc31fdeb3e3b78a18ac30c1f42b Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 12:51:23 +0100 Subject: [PATCH 08/68] Run dev without building shared-core --- packages/shared-core/package.json | 1 - packages/shared-core/tsconfig.build.json | 20 +++----------------- packages/types/tsconfig.build.json | 1 + tsconfig.build.json | 11 ++++++++++- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index e7b98e469b..c532a74b8f 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -10,7 +10,6 @@ "prebuild": "rimraf dist/", "build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly --paths null", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", - "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020", "test": "jest", "test:watch": "yarn test --watchAll" diff --git a/packages/shared-core/tsconfig.build.json b/packages/shared-core/tsconfig.build.json index c1d5bc96e8..9598938197 100644 --- a/packages/shared-core/tsconfig.build.json +++ b/packages/shared-core/tsconfig.build.json @@ -1,22 +1,8 @@ { + "extends": "../../tsconfig.build.json", "compilerOptions": { - "target": "es6", - "module": "commonjs", - "lib": ["es2020"], - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "incremental": true, - "sourceMap": true, - "declaration": true, - "types": ["node"], - "outDir": "dist", - "skipLibCheck": true, - "paths": { - "@budibase/types": ["../types/src"] - }, - "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" + "rootDir": "src/", + "outDir": "dist" }, "include": ["src/**/*.ts"], "exclude": ["**/*.spec.ts", "**/*.spec.js", "__mocks__", "src/tests"] diff --git a/packages/types/tsconfig.build.json b/packages/types/tsconfig.build.json index 3c2699efee..34c2b771c3 100644 --- a/packages/types/tsconfig.build.json +++ b/packages/types/tsconfig.build.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.build.json", "compilerOptions": { + "rootDir": "src/", "outDir": "dist" }, "include": ["src/**/*"], diff --git a/tsconfig.build.json b/tsconfig.build.json index 022e0ae76d..3efd5f56b6 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -9,7 +9,16 @@ "resolveJsonModule": true, "skipLibCheck": true, "declaration": true, - "isolatedModules": true + "isolatedModules": true, + "paths": { + "@budibase/types": ["packages/types/src"], + "@budibase/backend-core": ["packages/backend-core/src"], + "@budibase/backend-core/*": ["packages/backend-core/*"], + "@budibase/shared-core": ["packages/shared-core/src"], + "@budibase/pro": ["packages/pro/src"], + "@budibase/string-templates": ["packages/string-templates/src"], + "@budibase/string-templates/*": ["packages/string-templates/*"] + } }, "exclude": [] } From d0b61ebd7dac0d18dae6163f2b4a0e87b25c19fd Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 13:01:47 +0100 Subject: [PATCH 09/68] Reuse tsconfig.json --- packages/string-templates/.npmignore | 2 +- packages/string-templates/rollup.config.js | 4 +++- packages/string-templates/tsconfig.json | 16 +++++----------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/packages/string-templates/.npmignore b/packages/string-templates/.npmignore index fb547825eb..5eb98cf496 100644 --- a/packages/string-templates/.npmignore +++ b/packages/string-templates/.npmignore @@ -1,4 +1,4 @@ * !dist/**/* -dist/tsconfig.build.tsbuildinfo +dist/tsconfig.tsbuildinfo !package.json \ No newline at end of file diff --git a/packages/string-templates/rollup.config.js b/packages/string-templates/rollup.config.js index b745e97d91..5f76376711 100644 --- a/packages/string-templates/rollup.config.js +++ b/packages/string-templates/rollup.config.js @@ -24,7 +24,9 @@ const config = (input, outputFile, format) => ({ warn(warning) }, plugins: [ - typescript(), + typescript({ + moduleResolution: "node", + }), resolve({ preferBuiltins: true, browser: true, diff --git a/packages/string-templates/tsconfig.json b/packages/string-templates/tsconfig.json index 7fc13ace8e..a3d8890deb 100644 --- a/packages/string-templates/tsconfig.json +++ b/packages/string-templates/tsconfig.json @@ -1,15 +1,9 @@ { - "include": ["src/**/*"], + "extends": "../../tsconfig.build.json", "compilerOptions": { - "declaration": true, - "target": "es6", - "moduleResolution": "node", - "noImplicitAny": true, - "incremental": true, "lib": ["dom"], - "outDir": "dist", - "esModuleInterop": true, - "types": ["node", "jest"], - "resolveJsonModule": true - } + "baseUrl": ".", + "outDir": "dist" + }, + "include": ["src/**/*"] } From 0af85d9c89a657eb86cb9b11af78a022384deb4d Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 13:10:19 +0100 Subject: [PATCH 10/68] Fix trailing --- tsconfig.build.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tsconfig.build.json b/tsconfig.build.json index 3efd5f56b6..29bad4c5a0 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -11,13 +11,13 @@ "declaration": true, "isolatedModules": true, "paths": { - "@budibase/types": ["packages/types/src"], - "@budibase/backend-core": ["packages/backend-core/src"], - "@budibase/backend-core/*": ["packages/backend-core/*"], - "@budibase/shared-core": ["packages/shared-core/src"], - "@budibase/pro": ["packages/pro/src"], - "@budibase/string-templates": ["packages/string-templates/src"], - "@budibase/string-templates/*": ["packages/string-templates/*"] + "@budibase/types": ["./packages/types/src"], + "@budibase/backend-core": ["./packages/backend-core/src"], + "@budibase/backend-core/*": ["./packages/backend-core/*"], + "@budibase/shared-core": ["./packages/shared-core/src"], + "@budibase/pro": ["./packages/pro/src"], + "@budibase/string-templates": ["./packages/string-templates/src"], + "@budibase/string-templates/*": ["./packages/string-templates/*"] } }, "exclude": [] From 150548461a981ab48df2617b88362fc5e3809e1d Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 14:16:45 +0100 Subject: [PATCH 11/68] Fix build --- packages/shared-core/package.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index c532a74b8f..83cc3d0974 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -21,5 +21,19 @@ "devDependencies": { "rimraf": "3.0.2", "typescript": "5.5.2" + }, + "nx": { + "targets": { + "build": { + "dependsOn": [ + { + "projects": [ + "@budibase/types" + ], + "target": "build" + } + ] + } + } } } From 317a6511467209326a6a878a6be22e4da4902143 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 14:25:17 +0100 Subject: [PATCH 12/68] Add types dep to build --- packages/backend-core/package.json | 15 +++++++++++++++ packages/pro | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index d089a166a6..85d401de8c 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -95,5 +95,20 @@ "testcontainers": "^10.7.2", "timekeeper": "2.2.0", "typescript": "5.5.2" + }, + "nx": { + "targets": { + "build": { + "dependsOn": [ + { + "projects": [ + "@budibase/shared-core", + "@budibase/types" + ], + "target": "build" + } + ] + } + } } } diff --git a/packages/pro b/packages/pro index ef5c39d488..fdcf810756 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit ef5c39d48843cd0c2e8b72b08a89a35ee380a214 +Subproject commit fdcf810756ffdc3d9363cc783bfb827cc65b2715 From 7a119cbd8910f1685eddf05c167349d05c91dc8a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 14:29:16 +0100 Subject: [PATCH 13/68] Use base tsconfig in backend-core --- packages/backend-core/tsconfig.build.json | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/packages/backend-core/tsconfig.build.json b/packages/backend-core/tsconfig.build.json index c714f4d942..a5ffd6956a 100644 --- a/packages/backend-core/tsconfig.build.json +++ b/packages/backend-core/tsconfig.build.json @@ -1,23 +1,5 @@ { - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "lib": ["es2020"], - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "incremental": true, - "sourceMap": true, - "declaration": true, - "types": ["node", "jest"], - "outDir": "dist", - "skipLibCheck": true, - "paths": { - "@budibase/types": ["../types/src"], - "@budibase/shared-core": ["../shared-core/src"] - } - }, + "extends": "../../tsconfig.build.json", "include": ["**/*.js", "**/*.ts"], "exclude": [ "node_modules", From 7701d2bb59e655eea80c0c40d51f5516c518ab9e Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 14:31:53 +0100 Subject: [PATCH 14/68] Use base tsconfig in builder --- packages/builder/tsconfig.build.json | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/builder/tsconfig.build.json b/packages/builder/tsconfig.build.json index ca1316f83c..506a50fc27 100644 --- a/packages/builder/tsconfig.build.json +++ b/packages/builder/tsconfig.build.json @@ -1,17 +1,5 @@ { - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "lib": ["es2019"], - "allowJs": true, - "outDir": "dist", - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "incremental": true, - "skipLibCheck": true - }, + "extends": "../../tsconfig.build.json", "include": ["./src/**/*"], "exclude": ["node_modules", "**/*.json", "**/*.spec.ts", "**/*.spec.js"] } From 07570261a2f26d51e60f311c9ea0d06deefabbe4 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 14:32:31 +0100 Subject: [PATCH 15/68] Use base tsconfig in cli --- packages/cli/tsconfig.build.json | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/packages/cli/tsconfig.build.json b/packages/cli/tsconfig.build.json index e52d886194..68ab2d45f9 100644 --- a/packages/cli/tsconfig.build.json +++ b/packages/cli/tsconfig.build.json @@ -1,25 +1,5 @@ { - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "lib": ["es2020"], - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "incremental": true, - "types": ["node", "jest"], - "outDir": "dist", - "skipLibCheck": true, - "baseUrl": ".", - "paths": { - "@budibase/types": ["../types/src"], - "@budibase/backend-core": ["../backend-core/src"], - "@budibase/backend-core/*": ["../backend-core/*"], - "@budibase/shared-core": ["../shared-core/src"], - "@budibase/string-templates": ["../string-templates/src"] - } - }, + "extends": "../../tsconfig.build.json", "include": ["src/**/*"], "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.spec.js"] } From 3d5f276304db8bf1c5747c5408318e72bb0feffc Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 14:33:39 +0100 Subject: [PATCH 16/68] Use base tsconfig in pro --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index fdcf810756..278179b45e 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit fdcf810756ffdc3d9363cc783bfb827cc65b2715 +Subproject commit 278179b45e303c44c4f496bfaa7b338f19af8b44 From 9bf7098c7de530d37337b60b29df55dde80b6776 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 15:59:43 +0100 Subject: [PATCH 17/68] Fix exports --- packages/backend-core/src/events/processors/types.ts | 2 +- packages/backend-core/src/queue/queue.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend-core/src/events/processors/types.ts b/packages/backend-core/src/events/processors/types.ts index 5256a1bc62..714bf0ef4e 100644 --- a/packages/backend-core/src/events/processors/types.ts +++ b/packages/backend-core/src/events/processors/types.ts @@ -1 +1 @@ -export { EventProcessor } from "@budibase/types" +export type { EventProcessor } from "@budibase/types" diff --git a/packages/backend-core/src/queue/queue.ts b/packages/backend-core/src/queue/queue.ts index f5d710f02d..4e1086823b 100644 --- a/packages/backend-core/src/queue/queue.ts +++ b/packages/backend-core/src/queue/queue.ts @@ -7,7 +7,7 @@ import { addListeners, StalledFn } from "./listeners" import { Duration } from "../utils" import * as timers from "../timers" -export { QueueOptions, Queue, JobOptions } from "bull" +export type { QueueOptions, Queue, JobOptions } from "bull" // the queue lock is held for 5 minutes const QUEUE_LOCK_MS = Duration.fromMinutes(5).toMs() From 79b5238d9fa84ec2a80e92f166163b2a443922d3 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 16:04:23 +0100 Subject: [PATCH 18/68] Fix backend-core build --- packages/backend-core/package.json | 2 +- packages/backend-core/tsconfig.build.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 85d401de8c..32eb4c03a3 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -21,7 +21,7 @@ "scripts": { "prebuild": "rimraf dist/", "prepack": "cp package.json dist", - "build": "tsc -p tsconfig.build.json --paths null && node ./scripts/build.js", + "build": "node ./scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly --paths null", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "build:oss": "node ./scripts/build.js", "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020", diff --git a/packages/backend-core/tsconfig.build.json b/packages/backend-core/tsconfig.build.json index a5ffd6956a..45652a0354 100644 --- a/packages/backend-core/tsconfig.build.json +++ b/packages/backend-core/tsconfig.build.json @@ -1,6 +1,8 @@ { "extends": "../../tsconfig.build.json", - "include": ["**/*.js", "**/*.ts"], + "compilerOptions": { + "outDir": "dist" + }, "exclude": [ "node_modules", "dist", From bc31be6ef1aa0e94236ec08494d4372f35840226 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 17:09:05 +0100 Subject: [PATCH 19/68] Use base tsconfig in server --- package.json | 1 + packages/server/tsconfig.build.json | 25 +------------------------ packages/server/tsconfig.json | 5 ----- scripts/build.js | 7 +++++-- yarn.lock | 12 ++++++++---- 5 files changed, 15 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index 3ccba61a71..24c05fac17 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "husky": "^8.0.3", "kill-port": "^1.6.1", "lerna": "7.4.2", + "load-tsconfig": "^0.2.5", "madge": "^6.0.0", "nx-cloud": "16.0.5", "prettier": "2.8.8", diff --git a/packages/server/tsconfig.build.json b/packages/server/tsconfig.build.json index c4b9b8788e..77026b8258 100644 --- a/packages/server/tsconfig.build.json +++ b/packages/server/tsconfig.build.json @@ -1,28 +1,5 @@ { - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "lib": ["es2020"], - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "incremental": true, - "types": ["node", "jest"], - "outDir": "dist/src", - "skipLibCheck": true, - "baseUrl": ".", - "paths": { - "@budibase/types": ["../types/src"], - "@budibase/backend-core": ["../backend-core/src"], - "@budibase/backend-core/*": ["../backend-core/*"], - "@budibase/shared-core": ["../shared-core/src"], - "@budibase/pro": ["../pro/src"], - "@budibase/string-templates": ["../string-templates/src"], - "@budibase/string-templates/*": ["../string-templates/*"] - }, - "allowArbitraryExtensions": true - }, + "extends": "../../tsconfig.build.json", "include": ["src/**/*"], "exclude": [ "node_modules", diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index 9d633c6455..c962785810 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -1,10 +1,5 @@ { "extends": "./tsconfig.build.json", - "compilerOptions": { - "lib": ["es2020", "dom"], - "composite": true, - "baseUrl": "." - }, "ts-node": { "require": ["tsconfig-paths/register"], "swc": true diff --git a/scripts/build.js b/scripts/build.js index 93a2a1e589..8ea6b49023 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -8,6 +8,7 @@ const path = require("path") const { build } = require("esbuild") const { compile } = require("svelte/compiler") +const { loadTsConfig } = require("load-tsconfig") const { default: TsconfigPathsPlugin, @@ -47,8 +48,10 @@ var { argv } = require("yargs") async function runBuild(entry, outfile) { const isDev = process.env.NODE_ENV !== "production" const tsconfig = argv["p"] || `tsconfig.build.json` - const tsconfigPathPluginContent = JSON.parse( - fs.readFileSync(tsconfig, "utf-8") + + const { data: tsconfigPathPluginContent } = loadTsConfig( + process.cwd(), + tsconfig ) const sharedConfig = { diff --git a/yarn.lock b/yarn.lock index acfa2984ca..8a228db081 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2201,8 +2201,8 @@ dependencies: "@budibase/nano" "10.1.5" "@budibase/pouchdb-replication-stream" "1.2.11" - "@budibase/shared-core" "0.0.0" - "@budibase/types" "0.0.0" + "@budibase/shared-core" "*" + "@budibase/types" "*" "@techpass/passport-openidconnect" "0.3.3" aws-cloudfront-sign "3.0.2" aws-sdk "2.1692.0" @@ -2304,7 +2304,7 @@ "@budibase/shared-core@3.2.16": version "0.0.0" dependencies: - "@budibase/types" "0.0.0" + "@budibase/types" "*" cron-validate "1.4.5" "@budibase/string-templates@3.2.16": @@ -2319,7 +2319,6 @@ version "0.0.0" dependencies: scim-patch "^0.8.1" - zod "^3.23.8" "@bull-board/api@5.10.2": version "5.10.2" @@ -14625,6 +14624,11 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" +load-tsconfig@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.5.tgz#453b8cd8961bfb912dea77eb6c168fe8cca3d3a1" + integrity sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg== + local-pkg@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" From 1049127c9b94bc50624dec823659d06813fbf9e1 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 17:11:54 +0100 Subject: [PATCH 20/68] Fix dev --- tsconfig.build.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig.build.json b/tsconfig.build.json index 29bad4c5a0..b783612353 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -10,6 +10,7 @@ "skipLibCheck": true, "declaration": true, "isolatedModules": true, + "baseUrl": ".", "paths": { "@budibase/types": ["./packages/types/src"], "@budibase/backend-core": ["./packages/backend-core/src"], From 38b988bb29dc7eced29f85f3bf6010de6e8c0dcd Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 5 Dec 2024 17:41:09 +0100 Subject: [PATCH 21/68] Use base tsconfig in worker --- packages/worker/tsconfig.build.json | 22 +--------------------- packages/worker/tsconfig.json | 4 ---- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/packages/worker/tsconfig.build.json b/packages/worker/tsconfig.build.json index f38f31fe67..e8e3cb0847 100644 --- a/packages/worker/tsconfig.build.json +++ b/packages/worker/tsconfig.build.json @@ -1,25 +1,5 @@ { - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "lib": ["es2020"], - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "incremental": true, - "types": ["node", "jest"], - "outDir": "dist", - "skipLibCheck": true, - "paths": { - "@budibase/types": ["../types/src"], - "@budibase/backend-core": ["../backend-core/src"], - "@budibase/backend-core/*": ["../backend-core/*"], - "@budibase/shared-core": ["../shared-core/src"], - "@budibase/pro": ["../pro/src"], - "@budibase/string-templates": ["../string-templates/src"] - } - }, + "extends": "../../tsconfig.build.json", "include": ["src/**/*"], "exclude": [ "node_modules", diff --git a/packages/worker/tsconfig.json b/packages/worker/tsconfig.json index a02147aa81..475cf6edda 100644 --- a/packages/worker/tsconfig.json +++ b/packages/worker/tsconfig.json @@ -1,9 +1,5 @@ { "extends": "./tsconfig.build.json", - "compilerOptions": { - "composite": true, - "baseUrl": "." - }, "ts-node": { "require": ["tsconfig-paths/register"] }, From 3332f2fa228e958f2a2541ed7c9715a3d2544867 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 5 Dec 2024 17:32:07 +0000 Subject: [PATCH 22/68] metrics for view joins and grouped filters --- .../processors/posthog/PosthogProcessor.ts | 4 +- .../src/events/publishers/table.ts | 33 +++++++++--- .../src/events/publishers/view.ts | 17 ++++-- .../src/api/controllers/table/external.ts | 4 +- .../server/src/api/controllers/table/index.ts | 11 +++- .../src/api/controllers/table/internal.ts | 4 +- .../server/src/api/controllers/view/views.ts | 54 +++++++------------ .../src/api/controllers/view/viewsV2.ts | 11 ++-- .../functions/backfill/app/tables.ts | 2 +- .../src/sdk/app/tables/external/index.ts | 2 +- .../src/sdk/app/tables/internal/index.ts | 2 +- packages/server/src/sdk/app/views/external.ts | 4 +- packages/server/src/sdk/app/views/index.ts | 5 +- packages/server/src/sdk/app/views/internal.ts | 4 +- packages/types/src/sdk/events/table.ts | 3 ++ packages/types/src/sdk/events/view.ts | 7 +-- 16 files changed, 100 insertions(+), 67 deletions(-) diff --git a/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts index 12d2bb7e2c..687fe54256 100644 --- a/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts +++ b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts @@ -13,8 +13,8 @@ const EXCLUDED_EVENTS: Event[] = [ Event.ROLE_UPDATED, Event.DATASOURCE_UPDATED, Event.QUERY_UPDATED, - Event.TABLE_UPDATED, - Event.VIEW_UPDATED, + // Event.TABLE_UPDATED, + // Event.VIEW_UPDATED, Event.VIEW_FILTER_UPDATED, Event.VIEW_CALCULATION_UPDATED, Event.AUTOMATION_TRIGGER_UPDATED, diff --git a/packages/backend-core/src/events/publishers/table.ts b/packages/backend-core/src/events/publishers/table.ts index dc3200291a..de765e2cdd 100644 --- a/packages/backend-core/src/events/publishers/table.ts +++ b/packages/backend-core/src/events/publishers/table.ts @@ -1,13 +1,14 @@ import { publishEvent } from "../events" import { Event, - TableExportFormat, + FieldType, Table, TableCreatedEvent, - TableUpdatedEvent, TableDeletedEvent, TableExportedEvent, + TableExportFormat, TableImportedEvent, + TableUpdatedEvent, } from "@budibase/types" async function created(table: Table, timestamp?: string | number) { @@ -20,14 +21,34 @@ async function created(table: Table, timestamp?: string | number) { await publishEvent(Event.TABLE_CREATED, properties, timestamp) } -async function updated(table: Table) { +async function updated(oldTable: Table, newTable: Table) { + // only publish the event if it has fields we are interested in + let defaultValues, aiColumn + + // check that new fields have been added + for (const key in newTable.schema) { + if (!oldTable.schema[key]) { + const newColumn = newTable.schema[key] + if ("default" in newColumn) { + defaultValues = true + } + if (newColumn.type === FieldType.AI) { + aiColumn = newColumn.operation + } + } + } + const properties: TableUpdatedEvent = { - tableId: table._id as string, + tableId: newTable._id as string, + defaultValues, + aiColumn, audited: { - name: table.name, + name: newTable.name, }, } - await publishEvent(Event.TABLE_UPDATED, properties) + if (defaultValues || aiColumn) { + await publishEvent(Event.TABLE_UPDATED, properties) + } } async function deleted(table: Table) { diff --git a/packages/backend-core/src/events/publishers/view.ts b/packages/backend-core/src/events/publishers/view.ts index 0ec8f67485..6d107d58f3 100644 --- a/packages/backend-core/src/events/publishers/view.ts +++ b/packages/backend-core/src/events/publishers/view.ts @@ -11,6 +11,7 @@ import { ViewFilterDeletedEvent, ViewFilterUpdatedEvent, ViewUpdatedEvent, + View, ViewV2, ViewCalculation, Table, @@ -19,17 +20,27 @@ import { /* eslint-disable */ -async function created(view: Partial, timestamp?: string | number) { +async function created(view: ViewV2, timestamp?: string | number) { const properties: ViewCreatedEvent = { name: view.name, type: view.type, + tableId: view.tableId, } await publishEvent(Event.VIEW_CREATED, properties, timestamp) } -async function updated(view: View) { +async function updated(newView: ViewV2) { + // // check whether any of the fields are different + let viewJoins = 0 + for (const key in newView.schema) { + if (newView.schema[key]?.columns) { + viewJoins += Object.keys(newView.schema[key]?.columns).length + } + } const properties: ViewUpdatedEvent = { - tableId: view.tableId, + tableId: newView.tableId, + groupedFilters: newView.queryUI?.groups?.length || 0, + viewJoins, } await publishEvent(Event.VIEW_UPDATED, properties) } diff --git a/packages/server/src/api/controllers/table/external.ts b/packages/server/src/api/controllers/table/external.ts index 6f09bf4a61..d3f5ef99f6 100644 --- a/packages/server/src/api/controllers/table/external.ts +++ b/packages/server/src/api/controllers/table/external.ts @@ -45,13 +45,13 @@ export async function updateTable( inputs.created = true } try { - const { datasource, table } = await sdk.tables.external.save( + const { datasource, oldTable, table } = await sdk.tables.external.save( datasourceId!, inputs, { tableId, renaming } ) builderSocket?.emitDatasourceUpdate(ctx, datasource) - return table + return { table, oldTable } } catch (err: any) { if (err instanceof Error) { ctx.throw(400, err.message) diff --git a/packages/server/src/api/controllers/table/index.ts b/packages/server/src/api/controllers/table/index.ts index 77c1f3923a..0b0c9531e9 100644 --- a/packages/server/src/api/controllers/table/index.ts +++ b/packages/server/src/api/controllers/table/index.ts @@ -119,8 +119,15 @@ export async function save(ctx: UserCtx) { await events.table.created(savedTable) } else { const api = pickApi({ table }) - savedTable = await api.updateTable(ctx, renaming) - await events.table.updated(savedTable) + const { table: updatedTable, oldTable } = await api.updateTable( + ctx, + renaming + ) + savedTable = updatedTable + + if (oldTable) { + await events.table.updated(oldTable, savedTable) + } } if (renaming) { await sdk.views.renameLinkedViews(savedTable, renaming) diff --git a/packages/server/src/api/controllers/table/internal.ts b/packages/server/src/api/controllers/table/internal.ts index 40ce5e279d..67c4ec100c 100644 --- a/packages/server/src/api/controllers/table/internal.ts +++ b/packages/server/src/api/controllers/table/internal.ts @@ -30,14 +30,14 @@ export async function updateTable( } try { - const { table } = await sdk.tables.internal.save(tableToSave, { + const { table, oldTable } = await sdk.tables.internal.save(tableToSave, { userId: ctx.user._id, rowsToImport: rows, tableId: ctx.request.body._id, renaming, }) - return table + return { table, oldTable } } catch (err: any) { if (err instanceof Error) { ctx.throw(400, err.message) diff --git a/packages/server/src/api/controllers/view/views.ts b/packages/server/src/api/controllers/view/views.ts index b1f1f6c154..f1aa219aca 100644 --- a/packages/server/src/api/controllers/view/views.ts +++ b/packages/server/src/api/controllers/view/views.ts @@ -60,35 +60,31 @@ export async function save(ctx: Ctx) { existingTable.views[viewName] = existingTable.views[originalName] } await db.put(table) - await handleViewEvents( - existingTable.views[viewName] as View, - table.views[viewName] - ) ctx.body = table.views[viewName] builderSocket?.emitTableUpdate(ctx, table) } -export async function calculationEvents(existingView: View, newView: View) { - const existingCalculation = existingView && existingView.calculation - const newCalculation = newView && newView.calculation - - if (existingCalculation && !newCalculation) { - await events.view.calculationDeleted(existingView) - } - - if (!existingCalculation && newCalculation) { - await events.view.calculationCreated(newView) - } - - if ( - existingCalculation && - newCalculation && - existingCalculation !== newCalculation - ) { - await events.view.calculationUpdated(newView) - } -} +// export async function calculationEvents(existingView: View, newView: View) { +// const existingCalculation = existingView && existingView.calculation +// const newCalculation = newView && newView.calculation +// +// if (existingCalculation && !newCalculation) { +// await events.view.calculationDeleted(existingView) +// } +// +// if (!existingCalculation && newCalculation) { +// await events.view.calculationCreated(newView) +// } +// +// if ( +// existingCalculation && +// newCalculation && +// existingCalculation !== newCalculation +// ) { +// await events.view.calculationUpdated(newView) +// } +// } export async function filterEvents(existingView: View, newView: View) { const hasExistingFilters = !!( @@ -115,16 +111,6 @@ export async function filterEvents(existingView: View, newView: View) { } } -async function handleViewEvents(existingView: View, newView: View) { - if (!existingView) { - await events.view.created(newView) - } else { - await events.view.updated(newView) - } - await calculationEvents(existingView, newView) - await filterEvents(existingView, newView) -} - export async function destroy(ctx: Ctx) { const db = context.getAppDB() const viewName = decodeURIComponent(ctx.params.viewName) diff --git a/packages/server/src/api/controllers/view/viewsV2.ts b/packages/server/src/api/controllers/view/viewsV2.ts index 46c44ed577..38983a978e 100644 --- a/packages/server/src/api/controllers/view/viewsV2.ts +++ b/packages/server/src/api/controllers/view/viewsV2.ts @@ -151,7 +151,7 @@ export async function create(ctx: Ctx) { } const result = await sdk.views.create(tableId, parsedView) - await events.view.created(view) + await events.view.created(result) ctx.status = 201 ctx.body = { @@ -190,10 +190,11 @@ export async function update(ctx: Ctx) { primaryDisplay: view.primaryDisplay, } - const result = await sdk.views.update(tableId, parsedView) - ctx.body = { - data: result, - } + const { view: result } = await sdk.views.update(tableId, parsedView) + + await events.view.updated(result) + + ctx.body = { data: result } const table = await sdk.tables.getTable(tableId) builderSocket?.emitTableUpdate(ctx, table) diff --git a/packages/server/src/migrations/functions/backfill/app/tables.ts b/packages/server/src/migrations/functions/backfill/app/tables.ts index 081b81ede5..c6e46173dc 100644 --- a/packages/server/src/migrations/functions/backfill/app/tables.ts +++ b/packages/server/src/migrations/functions/backfill/app/tables.ts @@ -14,7 +14,7 @@ export const backfill = async (appDb: Database, timestamp: string | number) => { continue } - await events.view.created(view, timestamp) + // await events.view.created(view, timestamp) if (view.calculation) { await events.view.calculationCreated(view, timestamp) diff --git a/packages/server/src/sdk/app/tables/external/index.ts b/packages/server/src/sdk/app/tables/external/index.ts index 941d193b94..a7a15cac22 100644 --- a/packages/server/src/sdk/app/tables/external/index.ts +++ b/packages/server/src/sdk/app/tables/external/index.ts @@ -282,7 +282,7 @@ export async function save( tableToSave.sql = true } - return { datasource: updatedDatasource, table: tableToSave } + return { datasource: updatedDatasource, table: tableToSave, oldTable } } export async function destroy(datasourceId: string, table: Table) { diff --git a/packages/server/src/sdk/app/tables/internal/index.ts b/packages/server/src/sdk/app/tables/internal/index.ts index fbcbed03dc..5b9f346e93 100644 --- a/packages/server/src/sdk/app/tables/internal/index.ts +++ b/packages/server/src/sdk/app/tables/internal/index.ts @@ -171,7 +171,7 @@ export async function save( } // has to run after, make sure it has _id await runStaticFormulaChecks(table, { oldTable, deletion: false }) - return { table } + return { table, oldTable } } export async function destroy(table: Table) { diff --git a/packages/server/src/sdk/app/views/external.ts b/packages/server/src/sdk/app/views/external.ts index bee153a910..9016a3bd61 100644 --- a/packages/server/src/sdk/app/views/external.ts +++ b/packages/server/src/sdk/app/views/external.ts @@ -63,7 +63,7 @@ export async function create( export async function update( tableId: string, view: Readonly -): Promise { +): Promise<{ view: ViewV2; existingView: ViewV2 }> { const db = context.getAppDB() const { datasourceId, tableName } = breakExternalTableId(tableId) @@ -87,7 +87,7 @@ export async function update( delete views[existingView.name] views[view.name] = view await db.put(ds) - return view + return { view, existingView } } export async function remove(viewId: string): Promise { diff --git a/packages/server/src/sdk/app/views/index.ts b/packages/server/src/sdk/app/views/index.ts index 58537c96ad..f483ebc0bc 100644 --- a/packages/server/src/sdk/app/views/index.ts +++ b/packages/server/src/sdk/app/views/index.ts @@ -315,7 +315,10 @@ export async function create( return view } -export async function update(tableId: string, view: ViewV2): Promise { +export async function update( + tableId: string, + view: ViewV2 +): Promise<{ view: ViewV2; existingView: ViewV2 }> { await guardViewSchema(tableId, view) return pickApi(tableId).update(tableId, view) diff --git a/packages/server/src/sdk/app/views/internal.ts b/packages/server/src/sdk/app/views/internal.ts index 63807bcfd4..ec152abe54 100644 --- a/packages/server/src/sdk/app/views/internal.ts +++ b/packages/server/src/sdk/app/views/internal.ts @@ -54,7 +54,7 @@ export async function create( export async function update( tableId: string, view: Readonly -): Promise { +): Promise<{ view: ViewV2; existingView: ViewV2 }> { const db = context.getAppDB() const table = await sdk.tables.getTable(tableId) table.views ??= {} @@ -76,7 +76,7 @@ export async function update( delete table.views[existingView.name] table.views[view.name] = view await db.put(table) - return view + return { view, existingView } } export async function remove(viewId: string): Promise { diff --git a/packages/types/src/sdk/events/table.ts b/packages/types/src/sdk/events/table.ts index 8df2a95796..4a5880b1db 100644 --- a/packages/types/src/sdk/events/table.ts +++ b/packages/types/src/sdk/events/table.ts @@ -1,4 +1,5 @@ import { BaseEvent, TableExportFormat } from "./event" +import { AIOperationEnum } from "../ai" export interface TableCreatedEvent extends BaseEvent { tableId: string @@ -9,6 +10,8 @@ export interface TableCreatedEvent extends BaseEvent { export interface TableUpdatedEvent extends BaseEvent { tableId: string + defaultValues: boolean | undefined + aiColumn: AIOperationEnum | undefined audited: { name: string } diff --git a/packages/types/src/sdk/events/view.ts b/packages/types/src/sdk/events/view.ts index 84fcb0facc..c73a591a34 100644 --- a/packages/types/src/sdk/events/view.ts +++ b/packages/types/src/sdk/events/view.ts @@ -1,15 +1,16 @@ -import { ViewCalculation, ViewV2Schema, ViewV2Type } from "../../documents" +import { ViewCalculation, ViewV2Type } from "../../documents" import { BaseEvent, TableExportFormat } from "./event" -import { LegacyFilter, SortOrder, SortType, UISearchFilter } from "../../api" -import { SearchFilters } from "../search" export interface ViewCreatedEvent extends BaseEvent { name: string type?: ViewV2Type + tableId: string } export interface ViewUpdatedEvent extends BaseEvent { tableId: string + groupedFilters: number + viewJoins: number } export interface ViewDeletedEvent extends BaseEvent { From 84927bbb984b20579c629b2ce04ede9004059c9b Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 5 Dec 2024 18:13:32 +0000 Subject: [PATCH 23/68] Update to latest eslint, including new config file format. --- eslint.config.mjs | 178 +++++++----------- package.json | 4 +- .../src/events/publishers/query.ts | 2 - .../src/events/publishers/rows.ts | 2 - .../src/events/publishers/view.ts | 2 - .../stores/datasourceCreation.test.js | 1 - .../src/components/Updating.svelte | 1 - .../src/api/routes/tests/application.spec.ts | 2 +- .../src/api/routes/tests/search.spec.ts | 10 - .../src/integration-test/postgres.spec.ts | 2 +- packages/server/src/integrations/redis.ts | 2 +- packages/server/src/integrations/rest.ts | 4 +- .../integrations/tests/googlesheets.spec.ts | 1 - .../src/integrations/tests/rest.spec.ts | 1 - .../src/integrations/tests/sqlAlias.spec.ts | 6 +- .../server/src/jsRunner/vm/isolated-vm.ts | 2 +- packages/server/src/middleware/builder.ts | 2 +- .../migrations/functions/usageQuotas/index.ts | 2 +- .../server/src/startup/tests/startup.spec.ts | 2 +- packages/server/src/utilities/global.ts | 2 +- packages/server/src/websockets/builder.ts | 2 +- packages/server/src/websockets/grid.ts | 2 +- packages/server/src/websockets/middleware.ts | 2 +- packages/server/src/websockets/websocket.ts | 2 +- packages/types/src/sdk/migrations.ts | 2 +- .../src/api/routes/global/tests/auth.spec.ts | 4 +- .../src/api/routes/global/tests/users.spec.ts | 2 +- .../worker/src/middleware/handleScimBody.ts | 2 +- packages/worker/src/tests/api/email.ts | 2 +- yarn.lock | 123 +----------- 30 files changed, 105 insertions(+), 266 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 4a063737b4..59c2202e94 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,29 +1,17 @@ -import _import from "eslint-plugin-import" -import localRules from "eslint-plugin-local-rules" -import { fixupPluginRules } from "@eslint/compat" import globals from "globals" import babelParser from "@babel/eslint-parser" -import parser from "svelte-eslint-parser" -import typescriptEslint from "@typescript-eslint/eslint-plugin" +import svelteParser from "svelte-eslint-parser" import tsParser from "@typescript-eslint/parser" -import jest from "eslint-plugin-jest" -import path from "node:path" -import { fileURLToPath } from "node:url" -import js from "@eslint/js" -import { FlatCompat } from "@eslint/eslintrc" + +import eslintPluginJest from "eslint-plugin-jest" +import eslintPluginSvelte from "eslint-plugin-svelte" +import eslintPluginLocalRules from "eslint-plugin-local-rules" import eslint from "@eslint/js" import tseslint from "typescript-eslint" -const __filename = fileURLToPath(import.meta.url) -const __dirname = path.dirname(__filename) -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all, -}) - export default [ + eslint.configs.recommended, { ignores: [ "**/node_modules", @@ -46,12 +34,9 @@ export default [ "packages/server/build/oldClientVersions/**/**/*", ], }, - tseslint.configs.recommended, - eslint.configs.recommended, { plugins: { - import: fixupPluginRules(_import), - "local-rules": localRules, + "local-rules": eslintPluginLocalRules, }, languageOptions: { @@ -59,7 +44,7 @@ export default [ ...globals.browser, ...globals.jest, ...globals.node, - // GeolocationPositionError: true, + GeolocationPositionError: true, }, parser: babelParser, @@ -73,7 +58,7 @@ export default [ rules: { "no-self-assign": "off", - + "prefer-const": "off", "no-unused-vars": [ "error", { @@ -81,90 +66,81 @@ export default [ argsIgnorePattern: "^_", destructuredArrayIgnorePattern: "^_", ignoreRestSiblings: true, + caughtErrors: "none", }, ], - - "import/no-relative-packages": "error", - "import/export": "error", - "import/no-duplicates": "error", - "import/newline-after-import": "error", }, }, - ...compat.extends("plugin:svelte/recommended").map(config => ({ - ...config, - files: ["**/*.svelte"], - })), - { - files: ["**/*.svelte"], - - languageOptions: { - parser: parser, - ecmaVersion: 2019, - sourceType: "script", - - parserOptions: { - parser: "@typescript-eslint/parser", - allowImportExportEverywhere: true, - }, - }, - }, - ...compat.extends("eslint:recommended").map(config => ({ - ...config, - files: ["**/*.ts"], - })), - { - files: ["**/*.ts"], - - plugins: { - "@typescript-eslint": typescriptEslint, - }, - - languageOptions: { - globals: { - NodeJS: true, - }, - - parser: tsParser, - }, - - rules: { - "no-unused-vars": "off", - "local-rules/no-barrel-imports": "error", - "local-rules/no-budibase-imports": "error", - "local-rules/no-console-error": "error", - - "@typescript-eslint/no-unused-vars": [ - "error", - { - varsIgnorePattern: "^_", - argsIgnorePattern: "^_", - destructuredArrayIgnorePattern: "^_", - ignoreRestSiblings: true, - }, - ], - - "no-redeclare": "off", - "@typescript-eslint/no-redeclare": "error", - "no-dupe-class-members": "off", - }, - }, - ...compat - .extends("eslint:recommended", "plugin:jest/recommended") - .map(config => ({ + ...eslintPluginSvelte.configs["flat/recommended"].map(config => { + return { ...config, - files: ["**/*.spec.ts"], - })), + files: ["**/*.svelte"], + + languageOptions: { + parser: svelteParser, + ecmaVersion: 2019, + sourceType: "script", + + parserOptions: { + parser: "@typescript-eslint/parser", + allowImportExportEverywhere: true, + }, + }, + } + }), + ...tseslint.configs.recommended.map(config => { + return { + ...config, + files: ["**/*.ts"], + + languageOptions: { + globals: { + NodeJS: true, + }, + + parser: tsParser, + }, + + rules: { + "prefer-spread": "off", + "no-unused-vars": "off", + "prefer-rest-params": "off", + "local-rules/no-barrel-imports": "error", + "local-rules/no-budibase-imports": "error", + "local-rules/no-console-error": "error", + + "@typescript-eslint/no-this-alias": "off", + "@typescript-eslint/no-unused-expressions": "off", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-require-imports": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-unused-vars": [ + "error", + { + varsIgnorePattern: "^_", + argsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + ignoreRestSiblings: true, + caughtErrors: "none", + }, + ], + + "no-redeclare": "off", + "@typescript-eslint/no-redeclare": "error", + "no-dupe-class-members": "off", + }, + } + }), { files: ["**/*.spec.ts"], plugins: { - jest, - "@typescript-eslint": typescriptEslint, + jest: eslintPluginJest, }, languageOptions: { globals: { - ...jest.environments.globals.globals, + ...eslintPluginJest.environments.globals.globals, NodeJS: true, }, @@ -172,18 +148,6 @@ export default [ }, rules: { - "no-unused-vars": "off", - - "@typescript-eslint/no-unused-vars": [ - "error", - { - varsIgnorePattern: "^_", - argsIgnorePattern: "^_", - destructuredArrayIgnorePattern: "^_", - ignoreRestSiblings: true, - }, - ], - "local-rules/no-test-com": "error", "local-rules/email-domain-example-com": "error", "no-console": "warn", diff --git a/package.json b/package.json index ece57f9cba..f95685c6ff 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "@babel/eslint-parser": "7.25.9", "@babel/preset-env": "^7.22.5", "@esbuild-plugins/tsconfig-paths": "^0.1.2", - "@eslint/compat": "^1.2.4", "@types/node": "20.10.0", "@types/proper-lockfile": "^4.1.4", "@typescript-eslint/parser": "8.17.0", @@ -15,7 +14,6 @@ "esbuild": "^0.18.17", "esbuild-node-externals": "^1.14.0", "eslint": "9.16.0", - "eslint-plugin-import": "2.31.0", "eslint-plugin-jest": "28.9.0", "eslint-plugin-local-rules": "3.0.2", "eslint-plugin-svelte": "2.46.1", @@ -28,7 +26,7 @@ "prettier-plugin-svelte": "^2.3.0", "proper-lockfile": "^4.1.2", "svelte": "4.2.19", - "svelte-eslint-parser": "^0.33.1", + "svelte-eslint-parser": "0.43.0", "typescript": "5.7.2", "typescript-eslint": "8.17.0", "yargs": "^17.7.2" diff --git a/packages/backend-core/src/events/publishers/query.ts b/packages/backend-core/src/events/publishers/query.ts index 48603257d2..3bc8ffa5fd 100644 --- a/packages/backend-core/src/events/publishers/query.ts +++ b/packages/backend-core/src/events/publishers/query.ts @@ -12,8 +12,6 @@ import { QueriesRunEvent, } from "@budibase/types" -/* eslint-disable */ - const created = async ( datasource: Datasource, query: Query, diff --git a/packages/backend-core/src/events/publishers/rows.ts b/packages/backend-core/src/events/publishers/rows.ts index 9608613e89..e19681e5fe 100644 --- a/packages/backend-core/src/events/publishers/rows.ts +++ b/packages/backend-core/src/events/publishers/rows.ts @@ -6,8 +6,6 @@ import { Table, } from "@budibase/types" -/* eslint-disable */ - const created = async (count: number, timestamp?: string | number) => { const properties: RowsCreatedEvent = { count, diff --git a/packages/backend-core/src/events/publishers/view.ts b/packages/backend-core/src/events/publishers/view.ts index ccbf960b04..9cc4138ca0 100644 --- a/packages/backend-core/src/events/publishers/view.ts +++ b/packages/backend-core/src/events/publishers/view.ts @@ -17,8 +17,6 @@ import { TableExportFormat, } from "@budibase/types" -/* eslint-disable */ - async function created(view: View, timestamp?: string | number) { const properties: ViewCreatedEvent = { tableId: view.tableId, diff --git a/packages/builder/src/pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/stores/datasourceCreation.test.js b/packages/builder/src/pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/stores/datasourceCreation.test.js index 75a3afc2ff..1cb3842c89 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/stores/datasourceCreation.test.js +++ b/packages/builder/src/pages/builder/app/[application]/data/_components/CreateExternalDatasourceModal/stores/datasourceCreation.test.js @@ -12,7 +12,6 @@ vi.mock("stores/selectors", () => ({ describe("datasource creation store", () => { beforeEach(ctx => { vi.clearAllMocks() - // eslint-disable-next-line no-import-assign ctx.store = createDatasourceCreationStore() ctx.integration = { data: "integration" } diff --git a/packages/frontend-core/src/components/Updating.svelte b/packages/frontend-core/src/components/Updating.svelte index 97e83e2322..311a6b91c8 100644 --- a/packages/frontend-core/src/components/Updating.svelte +++ b/packages/frontend-core/src/components/Updating.svelte @@ -7,7 +7,6 @@ async function checkMigrationsFinished() { let totalWaitMs = 0 - // eslint-disable-next-line no-constant-condition while (true) { const waitForMs = 5000 + Math.random() * 5000 await new Promise(resolve => setTimeout(resolve, waitForMs)) diff --git a/packages/server/src/api/routes/tests/application.spec.ts b/packages/server/src/api/routes/tests/application.spec.ts index 1511c1aa61..9480593c2a 100644 --- a/packages/server/src/api/routes/tests/application.spec.ts +++ b/packages/server/src/api/routes/tests/application.spec.ts @@ -208,7 +208,7 @@ describe("/applications", () => { it("should reject with a known url", async () => { await config.api.application.create( - { name: "made up", url: app?.url! }, + { name: "made up", url: app!.url! }, { body: { message: "App URL is already in use." }, status: 400 } ) }) diff --git a/packages/server/src/api/routes/tests/search.spec.ts b/packages/server/src/api/routes/tests/search.spec.ts index dd1221d6fb..6aac1d2069 100644 --- a/packages/server/src/api/routes/tests/search.spec.ts +++ b/packages/server/src/api/routes/tests/search.spec.ts @@ -314,9 +314,7 @@ if (descriptions.length) { const cloned = cloneDeep(response) const foundRows = response.rows - // eslint-disable-next-line jest/no-standalone-expect expect(foundRows).toHaveLength(expectedRows.length) - // eslint-disable-next-line jest/no-standalone-expect expect([...foundRows]).toEqual( expectedRows.map((expectedRow: any) => expect.objectContaining(this.popRow(expectedRow, foundRows)) @@ -333,9 +331,7 @@ if (descriptions.length) { const cloned = cloneDeep(response) const foundRows = response.rows - // eslint-disable-next-line jest/no-standalone-expect expect(foundRows).toHaveLength(expectedRows.length) - // eslint-disable-next-line jest/no-standalone-expect expect([...foundRows]).toEqual( expect.arrayContaining( expectedRows.map((expectedRow: any) => @@ -358,10 +354,8 @@ if (descriptions.length) { keyof SearchResponse > for (let key of keys) { - // eslint-disable-next-line jest/no-standalone-expect expect(response[key]).toBeDefined() if (properties[key]) { - // eslint-disable-next-line jest/no-standalone-expect expect(response[key]).toEqual(properties[key]) } } @@ -375,7 +369,6 @@ if (descriptions.length) { const response = await this.performSearch() const cloned = cloneDeep(response) for (let property of properties) { - // eslint-disable-next-line jest/no-standalone-expect expect(response[property]).toBeUndefined() } return cloned @@ -389,7 +382,6 @@ if (descriptions.length) { const cloned = cloneDeep(response) const foundRows = response.rows - // eslint-disable-next-line jest/no-standalone-expect expect([...foundRows]).toEqual( expect.arrayContaining( expectedRows.map((expectedRow: any) => @@ -409,7 +401,6 @@ if (descriptions.length) { async toHaveLength(length: number) { const { rows: foundRows } = await this.performSearch() - // eslint-disable-next-line jest/no-standalone-expect expect(foundRows).toHaveLength(length) } } @@ -2169,7 +2160,6 @@ if (descriptions.length) { let bookmark: string | number = undefined let rows: Row[] = [] - // eslint-disable-next-line no-constant-condition while (true) { const response = await config.api.row.search( tableOrViewId, diff --git a/packages/server/src/integration-test/postgres.spec.ts b/packages/server/src/integration-test/postgres.spec.ts index 4f63579ba1..88250373f8 100644 --- a/packages/server/src/integration-test/postgres.spec.ts +++ b/packages/server/src/integration-test/postgres.spec.ts @@ -107,7 +107,7 @@ if (mainDescriptions.length) { const table = response.datasource.entities?.["binaryTable"] expect(table).toBeDefined() expect(table?.schema.id.externalType).toBe("bytea") - const row = await config.api.row.save(table?._id!, { + const row = await config.api.row.save(table!._id!, { id: "1111", column1: "hello", column2: 222, diff --git a/packages/server/src/integrations/redis.ts b/packages/server/src/integrations/redis.ts index e127cddd56..ff0e1d25c3 100644 --- a/packages/server/src/integrations/redis.ts +++ b/packages/server/src/integrations/redis.ts @@ -129,7 +129,7 @@ class RedisIntegration { return this.client.quit() } - async redisContext(query: Function) { + async redisContext(query: () => Promise) { try { return await query() } catch (err) { diff --git a/packages/server/src/integrations/rest.ts b/packages/server/src/integrations/rest.ts index ce2ec7d545..1b00a18f18 100644 --- a/packages/server/src/integrations/rest.ts +++ b/packages/server/src/integrations/rest.ts @@ -313,7 +313,9 @@ export class RestIntegration implements IntegrationBase { } // Util to add pagination values to a certain body type - const addPaginationToBody = (insertFn: Function) => { + const addPaginationToBody = ( + insertFn: (pageParam: string, page?: string | number) => void + ) => { if (pagination?.location === "body") { if (pagination?.pageParam && paginationValues?.page != null) { insertFn(pagination.pageParam, paginationValues.page) diff --git a/packages/server/src/integrations/tests/googlesheets.spec.ts b/packages/server/src/integrations/tests/googlesheets.spec.ts index 34be1c0c6c..2c0e4dce84 100644 --- a/packages/server/src/integrations/tests/googlesheets.spec.ts +++ b/packages/server/src/integrations/tests/googlesheets.spec.ts @@ -389,7 +389,6 @@ describe("Google Sheets Integration", () => { }) // TODO: this gets the error "Sheet is not large enough to fit 27 columns. Resize the sheet first." - // eslint-disable-next-line jest/no-commented-out-tests // it("should be able to add a new column", async () => { // const updatedTable = await config.api.table.save({ // ...table, diff --git a/packages/server/src/integrations/tests/rest.spec.ts b/packages/server/src/integrations/tests/rest.spec.ts index e869c58875..fac6f58c3b 100644 --- a/packages/server/src/integrations/tests/rest.spec.ts +++ b/packages/server/src/integrations/tests/rest.spec.ts @@ -456,7 +456,6 @@ describe("REST Integration", () => { // node-fetch >=3, and we're not on that because upgrading to it produces errors to // do with ESM that are above my pay grade. - // eslint-disable-next-line jest/no-commented-out-tests // it("doesn't fail when legacyHttpParser is set", async () => { // const server = createServer((req, res) => { // res.writeHead(200, { diff --git a/packages/server/src/integrations/tests/sqlAlias.spec.ts b/packages/server/src/integrations/tests/sqlAlias.spec.ts index 0f43e41755..3d67a7aa41 100644 --- a/packages/server/src/integrations/tests/sqlAlias.spec.ts +++ b/packages/server/src/integrations/tests/sqlAlias.spec.ts @@ -144,10 +144,10 @@ describe("Captures of real examples", () => { queryJson ) const filters = queryJson.filters - const notEqualsValue = Object.values(filters?.notEqual!)[0] + const notEqualsValue = Object.values(filters!.notEqual!)[0] const rangeValue: { high?: string | number; low?: string | number } = - Object.values(filters?.range!)[0] - const equalValue = Object.values(filters?.equal!)[0] + Object.values(filters!.range!)[0] + const equalValue = Object.values(filters!.equal!)[0] expect(query).toEqual({ bindings: [ diff --git a/packages/server/src/jsRunner/vm/isolated-vm.ts b/packages/server/src/jsRunner/vm/isolated-vm.ts index b8ed90aa23..3863be742d 100644 --- a/packages/server/src/jsRunner/vm/isolated-vm.ts +++ b/packages/server/src/jsRunner/vm/isolated-vm.ts @@ -72,7 +72,7 @@ export class IsolatedVM implements VM { this.addToContext({ helpersStripProtocol: new ivm.Callback((str: string) => { - var parsed = url.parse(str) as any + let parsed = url.parse(str) as any parsed.protocol = "" return parsed.format() }), diff --git a/packages/server/src/middleware/builder.ts b/packages/server/src/middleware/builder.ts index 87c7eef51f..bc775991df 100644 --- a/packages/server/src/middleware/builder.ts +++ b/packages/server/src/middleware/builder.ts @@ -50,7 +50,7 @@ async function updateAppUpdatedAt(ctx: UserCtx) { const metadata = await db.get(DocumentType.APP_METADATA) metadata.updatedAt = new Date().toISOString() - metadata.updatedBy = getGlobalIDFromUserMetadataID(ctx.user?.userId!) + metadata.updatedBy = getGlobalIDFromUserMetadataID(ctx.user!.userId!) const response = await db.put(metadata) metadata._rev = response.rev diff --git a/packages/server/src/migrations/functions/usageQuotas/index.ts b/packages/server/src/migrations/functions/usageQuotas/index.ts index ed1a765551..e94e993b21 100644 --- a/packages/server/src/migrations/functions/usageQuotas/index.ts +++ b/packages/server/src/migrations/functions/usageQuotas/index.ts @@ -1,3 +1,3 @@ -export const runQuotaMigration = async (migration: Function) => { +export const runQuotaMigration = async (migration: () => Promise) => { await migration() } diff --git a/packages/server/src/startup/tests/startup.spec.ts b/packages/server/src/startup/tests/startup.spec.ts index 7209033db8..ffc29655e1 100644 --- a/packages/server/src/startup/tests/startup.spec.ts +++ b/packages/server/src/startup/tests/startup.spec.ts @@ -47,7 +47,7 @@ describe("check BB_ADMIN environment variables", () => { }) expect(user).toBeDefined() expect(user?.password).toBeDefined() - expect(await utils.compare(PASSWORD, user?.password!)).toEqual( + expect(await utils.compare(PASSWORD, user!.password!)).toEqual( true ) } diff --git a/packages/server/src/utilities/global.ts b/packages/server/src/utilities/global.ts index c1fcf35634..975dfbded5 100644 --- a/packages/server/src/utilities/global.ts +++ b/packages/server/src/utilities/global.ts @@ -78,7 +78,7 @@ export async function getCachedSelf( // this has to be tenant aware, can't depend on the context to find it out // running some middlewares before the tenancy causes context to break const user = await cache.user.getUser({ - userId: ctx.user?._id!, + userId: ctx.user!._id!, }) return processUser(user, { appId }) } diff --git a/packages/server/src/websockets/builder.ts b/packages/server/src/websockets/builder.ts index cf92d68ef3..c4a8ca2955 100644 --- a/packages/server/src/websockets/builder.ts +++ b/packages/server/src/websockets/builder.ts @@ -92,7 +92,7 @@ export default class BuilderSocket extends BaseSocket { } } - async updateUser(socket: Socket, patch: Object) { + async updateUser(socket: Socket, patch: object) { await super.updateUser(socket, { builderMetadata: { ...socket.data.builderMetadata, diff --git a/packages/server/src/websockets/grid.ts b/packages/server/src/websockets/grid.ts index 3911313cc3..661d47cb6d 100644 --- a/packages/server/src/websockets/grid.ts +++ b/packages/server/src/websockets/grid.ts @@ -70,7 +70,7 @@ export default class GridSocket extends BaseSocket { }) } - async updateUser(socket: Socket, patch: Object) { + async updateUser(socket: Socket, patch: object) { await super.updateUser(socket, { gridMetadata: { ...socket.data.gridMetadata, diff --git a/packages/server/src/websockets/middleware.ts b/packages/server/src/websockets/middleware.ts index 0a52dcbdeb..7962149cd8 100644 --- a/packages/server/src/websockets/middleware.ts +++ b/packages/server/src/websockets/middleware.ts @@ -58,7 +58,7 @@ export const createContext = ( export const runMiddlewares = async ( ctx: any, middlewares: any[], - callback: Function + callback: () => Promise ) => { if (!middlewares[0]) { await callback() diff --git a/packages/server/src/websockets/websocket.ts b/packages/server/src/websockets/websocket.ts index 5dcf8c8f6f..2f031a72d9 100644 --- a/packages/server/src/websockets/websocket.ts +++ b/packages/server/src/websockets/websocket.ts @@ -250,7 +250,7 @@ export class BaseSocket { } // Updates a connected user's metadata, assuming a room change is not required. - async updateUser(socket: Socket, patch: Object) { + async updateUser(socket: Socket, patch: object) { socket.data = { ...socket.data, ...patch, diff --git a/packages/types/src/sdk/migrations.ts b/packages/types/src/sdk/migrations.ts index 0692b27f8e..f2b0ed48e3 100644 --- a/packages/types/src/sdk/migrations.ts +++ b/packages/types/src/sdk/migrations.ts @@ -1,6 +1,6 @@ export interface Migration extends MigrationDefinition { appOpts?: object - fn: Function + fn: () => void silent?: boolean preventRetry?: boolean } diff --git a/packages/worker/src/api/routes/global/tests/auth.spec.ts b/packages/worker/src/api/routes/global/tests/auth.spec.ts index f6bdd7f663..bff959469e 100644 --- a/packages/worker/src/api/routes/global/tests/auth.spec.ts +++ b/packages/worker/src/api/routes/global/tests/auth.spec.ts @@ -54,7 +54,7 @@ describe("/api/global/auth", () => { describe("POST /api/global/auth/:tenantId/login", () => { it("logs in with correct credentials", async () => { const tenantId = config.tenantId! - const email = config.user?.email! + const email = config.user!.email! const password = config.userPassword const response = await config.api.auth.login(tenantId, email, password) @@ -65,7 +65,7 @@ describe("/api/global/auth", () => { it("should return 403 with incorrect credentials", async () => { const tenantId = config.tenantId! - const email = config.user?.email! + const email = config.user!.email! const password = "incorrect123" const response = await config.api.auth.login( diff --git a/packages/worker/src/api/routes/global/tests/users.spec.ts b/packages/worker/src/api/routes/global/tests/users.spec.ts index b6237c7b4b..239877b71a 100644 --- a/packages/worker/src/api/routes/global/tests/users.spec.ts +++ b/packages/worker/src/api/routes/global/tests/users.spec.ts @@ -343,7 +343,7 @@ describe("/api/global/users", () => { }) it("should not allow a user to update their own admin/builder status", async () => { - const user = (await config.api.users.getUser(config.user?._id!)) + const user = (await config.api.users.getUser(config.user!._id!)) .body as User await config.api.users.saveUser({ ...user, diff --git a/packages/worker/src/middleware/handleScimBody.ts b/packages/worker/src/middleware/handleScimBody.ts index bfcd6dfcf2..07e6286b6b 100644 --- a/packages/worker/src/middleware/handleScimBody.ts +++ b/packages/worker/src/middleware/handleScimBody.ts @@ -1,7 +1,7 @@ import { Ctx } from "@budibase/types" export const handleScimBody = (ctx: Ctx, next: any) => { - var type = ctx.req.headers["content-type"] || "" + let type = ctx.req.headers["content-type"] || "" type = type.split(";")[0] if (type === "application/scim+json") { diff --git a/packages/worker/src/tests/api/email.ts b/packages/worker/src/tests/api/email.ts index dc464ba16d..b2f30e6ac1 100644 --- a/packages/worker/src/tests/api/email.ts +++ b/packages/worker/src/tests/api/email.ts @@ -15,7 +15,7 @@ export class EmailAPI extends TestAPI { attachments, purpose, tenantId: this.config.getTenantId(), - userId: this.config.user?._id!, + userId: this.config.user!._id!, }) .set(this.config.defaultHeaders()) .expect("Content-Type", /json/) diff --git a/yarn.lock b/yarn.lock index 4988e5237d..4b4ab5146f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2675,11 +2675,6 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== -"@eslint/compat@^1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@eslint/compat/-/compat-1.2.4.tgz#b69b0d76ce73fe66d7f8633c406acea151f5c559" - integrity sha512-S8ZdQj/N69YAtuqFt7653jwcvuUj131+6qGLUyDqfDg1OIoBQ66OCuXC473YQfO2AaxITTutiRQiDwoo7ZLYyg== - "@eslint/config-array@^0.19.0": version "0.19.1" resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.1.tgz#734aaea2c40be22bbb1f2a9dac687c57a6a4c984" @@ -4313,11 +4308,6 @@ node-fetch "^2.6.0" utf-8-validate "^5.0.2" -"@rtsao/scc@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" - integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== - "@shopify/jest-koa-mocks@5.1.1": version "5.1.1" resolved "https://registry.yarnpkg.com/@shopify/jest-koa-mocks/-/jest-koa-mocks-5.1.1.tgz#d615815b0cf0ec9823d054da68c419508b3c3193" @@ -7026,18 +7016,6 @@ array-includes@^3.1.7: get-intrinsic "^1.2.1" is-string "^1.0.7" -array-includes@^3.1.8: - version "3.1.8" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" - integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.2" - es-object-atoms "^1.0.0" - get-intrinsic "^1.2.4" - is-string "^1.0.7" - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -7059,18 +7037,6 @@ array.prototype.findlastindex@^1.2.3: es-shim-unscopables "^1.0.0" get-intrinsic "^1.2.1" -array.prototype.findlastindex@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" - integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.2" - es-errors "^1.3.0" - es-object-atoms "^1.0.0" - es-shim-unscopables "^1.0.2" - array.prototype.flat@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" @@ -10167,7 +10133,7 @@ es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0: unbox-primitive "^1.0.2" which-typed-array "^1.1.15" -es-abstract@^1.23.2, es-abstract@^1.23.3: +es-abstract@^1.23.3: version "1.23.5" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.5.tgz#f4599a4946d57ed467515ed10e4f157289cd52fb" integrity sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ== @@ -10262,7 +10228,7 @@ es-set-tostringtag@^2.0.3: has-tostringtag "^1.0.2" hasown "^2.0.1" -es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: +es-shim-unscopables@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== @@ -10396,13 +10362,6 @@ eslint-import-resolver-node@^0.3.9: is-core-module "^2.13.0" resolve "^1.22.4" -eslint-module-utils@^2.12.0: - version "2.12.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz#fe4cfb948d61f49203d7b08871982b65b9af0b0b" - integrity sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg== - dependencies: - debug "^3.2.7" - eslint-module-utils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" @@ -10410,31 +10369,6 @@ eslint-module-utils@^2.8.0: dependencies: debug "^3.2.7" -eslint-plugin-import@2.31.0: - version "2.31.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz#310ce7e720ca1d9c0bb3f69adfd1c6bdd7d9e0e7" - integrity sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A== - dependencies: - "@rtsao/scc" "^1.1.0" - array-includes "^3.1.8" - array.prototype.findlastindex "^1.2.5" - array.prototype.flat "^1.3.2" - array.prototype.flatmap "^1.3.2" - debug "^3.2.7" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.9" - eslint-module-utils "^2.12.0" - hasown "^2.0.2" - is-core-module "^2.15.1" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.fromentries "^2.0.8" - object.groupby "^1.0.3" - object.values "^1.2.0" - semver "^6.3.1" - string.prototype.trimend "^1.0.8" - tsconfig-paths "^3.15.0" - eslint-plugin-import@^2.26.0: version "2.29.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" @@ -10495,7 +10429,7 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.0.0, eslint-scope@^7.2.2: +eslint-scope@^7.2.2: version "7.2.2" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== @@ -10516,7 +10450,7 @@ eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== @@ -10624,7 +10558,7 @@ espree@^10.0.1, espree@^10.3.0: acorn-jsx "^5.3.2" eslint-visitor-keys "^4.2.0" -espree@^9.0.0, espree@^9.6.0, espree@^9.6.1: +espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== @@ -12811,7 +12745,7 @@ is-class-hotfix@~0.0.6: resolved "https://registry.yarnpkg.com/is-class-hotfix/-/is-class-hotfix-0.0.6.tgz#a527d31fb23279281dde5f385c77b5de70a72435" integrity sha512-0n+pzCC6ICtVr/WXnN2f03TK/3BfXY7me4cjCAqT8TYXEl0+JBRoqBo94JJHXcyDSLUeWbNX8Fvy5g5RJdAstQ== -is-core-module@^2.12.0, is-core-module@^2.15.1: +is-core-module@^2.12.0: version "2.15.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== @@ -16338,16 +16272,6 @@ object.fromentries@^2.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" -object.fromentries@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" - integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.2" - es-object-atoms "^1.0.0" - object.groupby@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" @@ -16358,15 +16282,6 @@ object.groupby@^1.0.1: es-abstract "^1.22.1" get-intrinsic "^1.2.1" -object.groupby@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" - integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.2" - object.values@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" @@ -16376,15 +16291,6 @@ object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -object.values@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" - integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-object-atoms "^1.0.0" - octal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/octal/-/octal-1.0.0.tgz#63e7162a68efbeb9e213588d58e989d1e5c4530b" @@ -17336,7 +17242,7 @@ postcss-safe-parser@^6.0.0: resolved "https://registry.yarnpkg.com/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz#bb4c29894171a94bc5c996b9a30317ef402adaa1" integrity sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ== -postcss-scss@^4.0.8, postcss-scss@^4.0.9: +postcss-scss@^4.0.9: version "4.0.9" resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.9.tgz#a03c773cd4c9623cb04ce142a52afcec74806685" integrity sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A== @@ -17367,7 +17273,7 @@ postcss-values-parser@^6.0.2: is-url-superb "^4.0.0" quote-unquote "^1.0.0" -postcss@^8.1.7, postcss@^8.3.11, postcss@^8.4.12, postcss@^8.4.27, postcss@^8.4.29: +postcss@^8.1.7, postcss@^8.3.11, postcss@^8.4.12, postcss@^8.4.27: version "8.4.41" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681" integrity sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ== @@ -19960,18 +19866,7 @@ svelte-dnd-action@^0.9.8: resolved "https://registry.yarnpkg.com/svelte-dnd-action/-/svelte-dnd-action-0.9.22.tgz#003eee9dddb31d8c782f6832aec8b1507fff194d" integrity sha512-lOQJsNLM1QWv5mdxIkCVtk6k4lHCtLgfE59y8rs7iOM6erchbLC9hMEFYSveZz7biJV0mpg7yDSs4bj/RT/YkA== -svelte-eslint-parser@^0.33.1: - version "0.33.1" - resolved "https://registry.yarnpkg.com/svelte-eslint-parser/-/svelte-eslint-parser-0.33.1.tgz#c64dbed2fad099577429b3c39377f6b8d36e5d97" - integrity sha512-vo7xPGTlKBGdLH8T5L64FipvTrqv3OQRx9d2z5X05KKZDlF4rQk8KViZO4flKERY+5BiVdOh7zZ7JGJWo5P0uA== - dependencies: - eslint-scope "^7.0.0" - eslint-visitor-keys "^3.0.0" - espree "^9.0.0" - postcss "^8.4.29" - postcss-scss "^4.0.8" - -svelte-eslint-parser@^0.43.0: +svelte-eslint-parser@0.43.0, svelte-eslint-parser@^0.43.0: version "0.43.0" resolved "https://registry.yarnpkg.com/svelte-eslint-parser/-/svelte-eslint-parser-0.43.0.tgz#649e80f65183c4c1d1536d03dcb903e0632f4da4" integrity sha512-GpU52uPKKcVnh8tKN5P4UZpJ/fUDndmq7wfsvoVXsyP+aY0anol7Yqo01fyrlaWGMFfm4av5DyrjlaXdLRJvGA== From edef8435b2e58b6a73a0b81b1f72571a5f52ea0b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 03:21:12 +0000 Subject: [PATCH 24/68] Bump path-to-regexp from 0.1.11 to 0.1.12 Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 0.1.11 to 0.1.12. - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.11...v0.1.12) --- updated-dependencies: - dependency-name: path-to-regexp dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index b23894b464..5bf77d9a72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2279,7 +2279,7 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@npm:@budibase/pro@latest": +"@budibase/pro@0.0.0", "@budibase/pro@npm:@budibase/pro@latest": version "3.2.16" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-3.2.16.tgz#571751c5ab288ecbdd14791e4dab207b9523150f" integrity sha512-HRKfpyYk+fJ87rOAvuBw1EcBv33xliSEf/ww7Wmvzx/xdxas6a7ZHoblw0BU8tnb5Q2rmYTf61RlqOIC4iC+0Q== @@ -16782,9 +16782,9 @@ path-scurry@^1.11.1, path-scurry@^1.6.1: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-to-regexp@^0.1.10: - version "0.1.11" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.11.tgz#a527e662c89efc4646dbfa8100bf3e847e495761" - integrity sha512-c0t+KCuUkO/YDLPG4WWzEwx3J5F/GHXsD1h/SNZfySqAIKe/BaP95x8fWtOfRJokpS5yYHRJjMtYlXD8jxnpbw== + version "0.1.12" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7" + integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ== path-to-regexp@^6.1.0, path-to-regexp@^6.3.0: version "6.3.0" @@ -20159,11 +20159,6 @@ timekeeper@2.2.0: resolved "https://registry.yarnpkg.com/timekeeper/-/timekeeper-2.2.0.tgz#9645731fce9e3280a18614a57a9d1b72af3ca368" integrity sha512-W3AmPTJWZkRwu+iSNxPIsLZ2ByADsOLbbLxe46UJyWj3mlYLlwucKiq+/dPm0l9wTzqoF3/2PH0AGFCebjq23A== -timekeeper@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/timekeeper/-/timekeeper-2.3.1.tgz#2deb6e0b95d93625fda84c18d47f84a99e4eba01" - integrity sha512-LeQRS7/4JcC0PgdSFnfUiStQEdiuySlCj/5SJ18D+T1n9BoY7PxKFfCwLulpHXoLUFr67HxBddQdEX47lDGx1g== - tiny-glob@^0.2.9: version "0.2.9" resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2" @@ -20396,7 +20391,7 @@ tsconfig-paths@^3.10.1, tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tsconfig-paths@^4.1.2, tsconfig-paths@^4.2.0: +tsconfig-paths@^4.1.2: version "4.2.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg== From e2fcd757f783d11d34782e5eb66fa05e3df09cde Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 6 Dec 2024 14:30:43 +0000 Subject: [PATCH 25/68] Stop coercing all values to strings when using CoreCheckboxGroup --- packages/bbui/src/Form/Core/CheckboxGroup.svelte | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/bbui/src/Form/Core/CheckboxGroup.svelte b/packages/bbui/src/Form/Core/CheckboxGroup.svelte index d1a107fcc5..5aca7911e8 100644 --- a/packages/bbui/src/Form/Core/CheckboxGroup.svelte +++ b/packages/bbui/src/Form/Core/CheckboxGroup.svelte @@ -13,9 +13,8 @@ const dispatch = createEventDispatcher() - const onChange = e => { - const optionValue = e.target.value - if (e.target.checked && !value.includes(optionValue)) { + const onChange = optionValue => { + if (!value.includes(optionValue)) { dispatch("change", [...value, optionValue]) } else { dispatch( @@ -39,10 +38,9 @@ class="spectrum-Checkbox spectrum-Checkbox--sizeM spectrum-FieldGroup-item" > onChange(optionValue)} type="checkbox" class="spectrum-Checkbox-input" - value={optionValue} checked={value.includes(optionValue)} {disabled} /> From 8f165d5b684c564514f17b4c42cd9a51ada82d4b Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 6 Dec 2024 17:02:49 +0000 Subject: [PATCH 26/68] types --- .../processors/posthog/PosthogProcessor.ts | 2 -- .../src/events/publishers/view.ts | 1 - .../server/src/api/controllers/view/views.ts | 21 ------------------- .../functions/backfill/app/tables.ts | 18 ---------------- packages/server/src/sdk/app/views/external.ts | 4 ++-- packages/server/src/sdk/app/views/internal.ts | 2 +- 6 files changed, 3 insertions(+), 45 deletions(-) diff --git a/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts index 687fe54256..4700b47be2 100644 --- a/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts +++ b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts @@ -13,8 +13,6 @@ const EXCLUDED_EVENTS: Event[] = [ Event.ROLE_UPDATED, Event.DATASOURCE_UPDATED, Event.QUERY_UPDATED, - // Event.TABLE_UPDATED, - // Event.VIEW_UPDATED, Event.VIEW_FILTER_UPDATED, Event.VIEW_CALCULATION_UPDATED, Event.AUTOMATION_TRIGGER_UPDATED, diff --git a/packages/backend-core/src/events/publishers/view.ts b/packages/backend-core/src/events/publishers/view.ts index 6d107d58f3..3097ae4cfa 100644 --- a/packages/backend-core/src/events/publishers/view.ts +++ b/packages/backend-core/src/events/publishers/view.ts @@ -30,7 +30,6 @@ async function created(view: ViewV2, timestamp?: string | number) { } async function updated(newView: ViewV2) { - // // check whether any of the fields are different let viewJoins = 0 for (const key in newView.schema) { if (newView.schema[key]?.columns) { diff --git a/packages/server/src/api/controllers/view/views.ts b/packages/server/src/api/controllers/view/views.ts index f1aa219aca..9fdd808d38 100644 --- a/packages/server/src/api/controllers/view/views.ts +++ b/packages/server/src/api/controllers/view/views.ts @@ -65,27 +65,6 @@ export async function save(ctx: Ctx) { builderSocket?.emitTableUpdate(ctx, table) } -// export async function calculationEvents(existingView: View, newView: View) { -// const existingCalculation = existingView && existingView.calculation -// const newCalculation = newView && newView.calculation -// -// if (existingCalculation && !newCalculation) { -// await events.view.calculationDeleted(existingView) -// } -// -// if (!existingCalculation && newCalculation) { -// await events.view.calculationCreated(newView) -// } -// -// if ( -// existingCalculation && -// newCalculation && -// existingCalculation !== newCalculation -// ) { -// await events.view.calculationUpdated(newView) -// } -// } - export async function filterEvents(existingView: View, newView: View) { const hasExistingFilters = !!( existingView && diff --git a/packages/server/src/migrations/functions/backfill/app/tables.ts b/packages/server/src/migrations/functions/backfill/app/tables.ts index c6e46173dc..e8437bd529 100644 --- a/packages/server/src/migrations/functions/backfill/app/tables.ts +++ b/packages/server/src/migrations/functions/backfill/app/tables.ts @@ -7,24 +7,6 @@ export const backfill = async (appDb: Database, timestamp: string | number) => { for (const table of tables) { await events.table.created(table, timestamp) - - if (table.views) { - for (const view of Object.values(table.views)) { - if (sdk.views.isV2(view)) { - continue - } - - // await events.view.created(view, timestamp) - - if (view.calculation) { - await events.view.calculationCreated(view, timestamp) - } - - if (view.filters?.length) { - await events.view.filterCreated(view, timestamp) - } - } - } } return tables.length diff --git a/packages/server/src/sdk/app/views/external.ts b/packages/server/src/sdk/app/views/external.ts index 9016a3bd61..65e0ff410d 100644 --- a/packages/server/src/sdk/app/views/external.ts +++ b/packages/server/src/sdk/app/views/external.ts @@ -63,7 +63,7 @@ export async function create( export async function update( tableId: string, view: Readonly -): Promise<{ view: ViewV2; existingView: ViewV2 }> { +): Promise<{ view: Readonly; existingView: ViewV2 }> { const db = context.getAppDB() const { datasourceId, tableName } = breakExternalTableId(tableId) @@ -87,7 +87,7 @@ export async function update( delete views[existingView.name] views[view.name] = view await db.put(ds) - return { view, existingView } + return { view, existingView } as { view: ViewV2; existingView: ViewV2 } } export async function remove(viewId: string): Promise { diff --git a/packages/server/src/sdk/app/views/internal.ts b/packages/server/src/sdk/app/views/internal.ts index ec152abe54..4f7abad357 100644 --- a/packages/server/src/sdk/app/views/internal.ts +++ b/packages/server/src/sdk/app/views/internal.ts @@ -76,7 +76,7 @@ export async function update( delete table.views[existingView.name] table.views[view.name] = view await db.put(table) - return { view, existingView } + return { view, existingView } as { view: ViewV2; existingView: ViewV2 } } export async function remove(viewId: string): Promise { From 492d5a37f28a8ed88eae084f8897d9c50f0baf94 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 6 Dec 2024 19:44:35 +0000 Subject: [PATCH 27/68] fix table tests --- packages/server/src/api/routes/tests/table.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/routes/tests/table.spec.ts b/packages/server/src/api/routes/tests/table.spec.ts index 8556a598c6..393fa8260c 100644 --- a/packages/server/src/api/routes/tests/table.spec.ts +++ b/packages/server/src/api/routes/tests/table.spec.ts @@ -247,6 +247,8 @@ if (descriptions.length) { }, }, }, + views: {}, + sql: true }) ) @@ -254,9 +256,8 @@ if (descriptions.length) { ...table, name: generator.guid(), }) - expect(events.table.updated).toHaveBeenCalledTimes(1) - expect(events.table.updated).toHaveBeenCalledWith(updatedTable) + expect(events.table.updated).toHaveBeenCalledWith(table, updatedTable) }) it("updates all the row fields for a table when a schema key is renamed", async () => { From fb5f32da23d72857649bb452df6a77920208bf1d Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 6 Dec 2024 20:08:42 +0000 Subject: [PATCH 28/68] remove view events from v1 tests --- .../server/src/api/routes/tests/view.spec.ts | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/packages/server/src/api/routes/tests/view.spec.ts b/packages/server/src/api/routes/tests/view.spec.ts index 57b589e79d..2217116f2d 100644 --- a/packages/server/src/api/routes/tests/view.spec.ts +++ b/packages/server/src/api/routes/tests/view.spec.ts @@ -84,14 +84,6 @@ describe("/views", () => { const view = await saveView({ calculation: ViewCalculation.COUNT }) expect(view.tableId).toBe(table._id) - expect(events.view.created).toHaveBeenCalledTimes(1) - expect(events.view.updated).not.toHaveBeenCalled() - expect(events.view.calculationCreated).toHaveBeenCalledTimes(1) - expect(events.view.calculationUpdated).not.toHaveBeenCalled() - expect(events.view.calculationDeleted).not.toHaveBeenCalled() - expect(events.view.filterCreated).not.toHaveBeenCalled() - expect(events.view.filterUpdated).not.toHaveBeenCalled() - expect(events.view.filterDeleted).not.toHaveBeenCalled() }) it("creates a view with a filter", async () => { @@ -109,14 +101,6 @@ describe("/views", () => { }) expect(view.tableId).toBe(table._id) - expect(events.view.created).toHaveBeenCalledTimes(1) - expect(events.view.updated).not.toHaveBeenCalled() - expect(events.view.calculationCreated).not.toHaveBeenCalled() - expect(events.view.calculationUpdated).not.toHaveBeenCalled() - expect(events.view.calculationDeleted).not.toHaveBeenCalled() - expect(events.view.filterCreated).toHaveBeenCalledTimes(1) - expect(events.view.filterUpdated).not.toHaveBeenCalled() - expect(events.view.filterDeleted).not.toHaveBeenCalled() }) it("updates the table row with the new view metadata", async () => { @@ -166,13 +150,6 @@ describe("/views", () => { await saveView() expect(events.view.created).not.toHaveBeenCalled() - expect(events.view.updated).toHaveBeenCalledTimes(1) - expect(events.view.calculationCreated).not.toHaveBeenCalled() - expect(events.view.calculationUpdated).not.toHaveBeenCalled() - expect(events.view.calculationDeleted).not.toHaveBeenCalled() - expect(events.view.filterCreated).not.toHaveBeenCalled() - expect(events.view.filterUpdated).not.toHaveBeenCalled() - expect(events.view.filterDeleted).not.toHaveBeenCalled() }) it("updates a view calculation", async () => { @@ -182,13 +159,6 @@ describe("/views", () => { await saveView({ calculation: ViewCalculation.COUNT }) expect(events.view.created).not.toHaveBeenCalled() - expect(events.view.updated).toHaveBeenCalledTimes(1) - expect(events.view.calculationCreated).not.toHaveBeenCalled() - expect(events.view.calculationUpdated).toHaveBeenCalledTimes(1) - expect(events.view.calculationDeleted).not.toHaveBeenCalled() - expect(events.view.filterCreated).not.toHaveBeenCalled() - expect(events.view.filterUpdated).not.toHaveBeenCalled() - expect(events.view.filterDeleted).not.toHaveBeenCalled() }) it("deletes a view calculation", async () => { @@ -198,13 +168,6 @@ describe("/views", () => { await saveView({ calculation: undefined }) expect(events.view.created).not.toHaveBeenCalled() - expect(events.view.updated).toHaveBeenCalledTimes(1) - expect(events.view.calculationCreated).not.toHaveBeenCalled() - expect(events.view.calculationUpdated).not.toHaveBeenCalled() - expect(events.view.calculationDeleted).toHaveBeenCalledTimes(1) - expect(events.view.filterCreated).not.toHaveBeenCalled() - expect(events.view.filterUpdated).not.toHaveBeenCalled() - expect(events.view.filterDeleted).not.toHaveBeenCalled() }) it("updates a view filter", async () => { @@ -230,13 +193,6 @@ describe("/views", () => { }) expect(events.view.created).not.toHaveBeenCalled() - expect(events.view.updated).toHaveBeenCalledTimes(1) - expect(events.view.calculationCreated).not.toHaveBeenCalled() - expect(events.view.calculationUpdated).not.toHaveBeenCalled() - expect(events.view.calculationDeleted).not.toHaveBeenCalled() - expect(events.view.filterCreated).not.toHaveBeenCalled() - expect(events.view.filterUpdated).toHaveBeenCalledTimes(1) - expect(events.view.filterDeleted).not.toHaveBeenCalled() }) it("deletes a view filter", async () => { @@ -254,13 +210,6 @@ describe("/views", () => { await saveView({ filters: [] }) expect(events.view.created).not.toHaveBeenCalled() - expect(events.view.updated).toHaveBeenCalledTimes(1) - expect(events.view.calculationCreated).not.toHaveBeenCalled() - expect(events.view.calculationUpdated).not.toHaveBeenCalled() - expect(events.view.calculationDeleted).not.toHaveBeenCalled() - expect(events.view.filterCreated).not.toHaveBeenCalled() - expect(events.view.filterUpdated).not.toHaveBeenCalled() - expect(events.view.filterDeleted).toHaveBeenCalledTimes(1) }) }) From 41c1632d60f8551bf8f1638856e42a47cce7f004 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 6 Dec 2024 20:09:18 +0000 Subject: [PATCH 29/68] lint --- packages/server/src/api/routes/tests/table.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/routes/tests/table.spec.ts b/packages/server/src/api/routes/tests/table.spec.ts index 393fa8260c..39b6a68eaf 100644 --- a/packages/server/src/api/routes/tests/table.spec.ts +++ b/packages/server/src/api/routes/tests/table.spec.ts @@ -248,7 +248,7 @@ if (descriptions.length) { }, }, views: {}, - sql: true + sql: true, }) ) From 917c23529546299a4b519a0d12e3aea2eea764d8 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Sun, 8 Dec 2024 23:18:07 +0000 Subject: [PATCH 30/68] send individual events for view calcs and joins --- .../processors/posthog/PosthogProcessor.ts | 1 + .../src/events/publishers/rowAction.ts | 2 +- .../src/events/publishers/view.ts | 61 ++++++++++++------- .../tests/core/utilities/mocks/events.ts | 1 + .../server/src/api/controllers/view/views.ts | 25 -------- .../src/api/controllers/view/viewsV2.ts | 58 +++++++++++++++++- .../src/api/routes/tests/viewV2.spec.ts | 9 ++- packages/types/src/sdk/events/event.ts | 8 +++ packages/types/src/sdk/events/view.ts | 12 ++-- 9 files changed, 124 insertions(+), 53 deletions(-) diff --git a/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts index 4700b47be2..e8e8f35d6d 100644 --- a/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts +++ b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts @@ -13,6 +13,7 @@ const EXCLUDED_EVENTS: Event[] = [ Event.ROLE_UPDATED, Event.DATASOURCE_UPDATED, Event.QUERY_UPDATED, + Event.VIEW_UPDATED, Event.VIEW_FILTER_UPDATED, Event.VIEW_CALCULATION_UPDATED, Event.AUTOMATION_TRIGGER_UPDATED, diff --git a/packages/backend-core/src/events/publishers/rowAction.ts b/packages/backend-core/src/events/publishers/rowAction.ts index 5adfd22d2d..eac35cc489 100644 --- a/packages/backend-core/src/events/publishers/rowAction.ts +++ b/packages/backend-core/src/events/publishers/rowAction.ts @@ -5,7 +5,7 @@ async function created( rowAction: RowActionCreatedEvent, timestamp?: string | number ) { - await publishEvent(Event.TABLE_CREATED, rowAction, timestamp) + await publishEvent(Event.ROW_ACTION_CREATED, rowAction, timestamp) } export default { diff --git a/packages/backend-core/src/events/publishers/view.ts b/packages/backend-core/src/events/publishers/view.ts index 3097ae4cfa..3ce24e9a0a 100644 --- a/packages/backend-core/src/events/publishers/view.ts +++ b/packages/backend-core/src/events/publishers/view.ts @@ -1,6 +1,11 @@ import { publishEvent } from "../events" import { + CalculationType, Event, + Table, + TableExportFormat, + View, + ViewCalculation, ViewCalculationCreatedEvent, ViewCalculationDeletedEvent, ViewCalculationUpdatedEvent, @@ -11,11 +16,8 @@ import { ViewFilterDeletedEvent, ViewFilterUpdatedEvent, ViewUpdatedEvent, - View, ViewV2, - ViewCalculation, - Table, - TableExportFormat, + ViewJoinCreatedEvent, } from "@budibase/types" /* eslint-disable */ @@ -29,17 +31,9 @@ async function created(view: ViewV2, timestamp?: string | number) { await publishEvent(Event.VIEW_CREATED, properties, timestamp) } -async function updated(newView: ViewV2) { - let viewJoins = 0 - for (const key in newView.schema) { - if (newView.schema[key]?.columns) { - viewJoins += Object.keys(newView.schema[key]?.columns).length - } - } +async function updated(view: ViewV2) { const properties: ViewUpdatedEvent = { - tableId: newView.tableId, - groupedFilters: newView.queryUI?.groups?.length || 0, - viewJoins, + tableId: view.tableId, } await publishEvent(Event.VIEW_UPDATED, properties) } @@ -59,16 +53,27 @@ async function exported(table: Table, format: TableExportFormat) { await publishEvent(Event.VIEW_EXPORTED, properties) } -async function filterCreated(view: View, timestamp?: string | number) { +async function filterCreated( + { tableId, filterGroups }: { tableId: string; filterGroups: number }, + timestamp?: string | number +) { const properties: ViewFilterCreatedEvent = { - tableId: view.tableId, + tableId, + filterGroups, } await publishEvent(Event.VIEW_FILTER_CREATED, properties, timestamp) } -async function filterUpdated(view: View) { +async function filterUpdated({ + tableId, + filterGroups, +}: { + tableId: string + filterGroups: number +}) { const properties: ViewFilterUpdatedEvent = { - tableId: view.tableId, + tableId: tableId, + filterGroups, } await publishEvent(Event.VIEW_FILTER_UPDATED, properties) } @@ -80,10 +85,16 @@ async function filterDeleted(view: View) { await publishEvent(Event.VIEW_FILTER_DELETED, properties) } -async function calculationCreated(view: View, timestamp?: string | number) { +async function calculationCreated( + { + tableId, + calculationType, + }: { tableId: string; calculationType: CalculationType }, + timestamp?: string | number +) { const properties: ViewCalculationCreatedEvent = { - tableId: view.tableId, - calculation: view.calculation as ViewCalculation, + tableId, + calculation: calculationType, } await publishEvent(Event.VIEW_CALCULATION_CREATED, properties, timestamp) } @@ -104,6 +115,13 @@ async function calculationDeleted(existingView: View) { await publishEvent(Event.VIEW_CALCULATION_DELETED, properties) } +async function viewJoinCreated(tableId: any, timestamp?: string | number) { + const properties: ViewJoinCreatedEvent = { + tableId, + } + await publishEvent(Event.VIEW_JOIN_CREATED, properties, timestamp) +} + export default { created, updated, @@ -115,4 +133,5 @@ export default { calculationCreated, calculationUpdated, calculationDeleted, + viewJoinCreated, } diff --git a/packages/backend-core/tests/core/utilities/mocks/events.ts b/packages/backend-core/tests/core/utilities/mocks/events.ts index 96f351de10..433986352e 100644 --- a/packages/backend-core/tests/core/utilities/mocks/events.ts +++ b/packages/backend-core/tests/core/utilities/mocks/events.ts @@ -117,6 +117,7 @@ beforeAll(async () => { jest.spyOn(events.view, "calculationCreated") jest.spyOn(events.view, "calculationUpdated") jest.spyOn(events.view, "calculationDeleted") + jest.spyOn(events.view, "viewJoinCreated") jest.spyOn(events.plugin, "init") jest.spyOn(events.plugin, "imported") diff --git a/packages/server/src/api/controllers/view/views.ts b/packages/server/src/api/controllers/view/views.ts index 9fdd808d38..0626f4e55c 100644 --- a/packages/server/src/api/controllers/view/views.ts +++ b/packages/server/src/api/controllers/view/views.ts @@ -65,31 +65,6 @@ export async function save(ctx: Ctx) { builderSocket?.emitTableUpdate(ctx, table) } -export async function filterEvents(existingView: View, newView: View) { - const hasExistingFilters = !!( - existingView && - existingView.filters && - existingView.filters.length - ) - const hasNewFilters = !!(newView && newView.filters && newView.filters.length) - - if (hasExistingFilters && !hasNewFilters) { - await events.view.filterDeleted(newView) - } - - if (!hasExistingFilters && hasNewFilters) { - await events.view.filterCreated(newView) - } - - if ( - hasExistingFilters && - hasNewFilters && - !isEqual(existingView.filters, newView.filters) - ) { - await events.view.filterUpdated(newView) - } -} - export async function destroy(ctx: Ctx) { const db = context.getAppDB() const viewName = decodeURIComponent(ctx.params.viewName) diff --git a/packages/server/src/api/controllers/view/viewsV2.ts b/packages/server/src/api/controllers/view/viewsV2.ts index 497a880fab..e611df0de3 100644 --- a/packages/server/src/api/controllers/view/viewsV2.ts +++ b/packages/server/src/api/controllers/view/viewsV2.ts @@ -16,10 +16,14 @@ import { CountCalculationFieldMetadata, CreateViewResponse, UpdateViewResponse, + View, + Event, } from "@budibase/types" import { events } from "@budibase/backend-core" import { builderSocket, gridSocket } from "../../../websockets" import { helpers } from "@budibase/shared-core" +import isEqual from "lodash/isEqual" +import { publishEvent } from "@budibase/backend-core/src/events" function stripUnknownFields( field: ViewFieldMetadata @@ -164,6 +168,54 @@ export async function create(ctx: Ctx) { gridSocket?.emitViewUpdate(ctx, result) } +async function handleViewEvents(existingView: ViewV2, view: ViewV2) { + // Grouped filters + if (view.queryUI?.groups) { + const filterGroups = view.queryUI?.groups?.length || 0 + const properties = { filterGroups, tableId: view.tableId } + if (!existingView?.queryUI) { + await publishEvent(Event.VIEW_FILTER_CREATED, properties) + await events.view.filterCreated(properties) + } else { + if ( + filterGroups > + ((existingView && existingView?.queryUI?.groups?.length) || 0) + ) { + await events.view.filterUpdated(properties) + } + } + } + + // if new columns in the view + for (const key in view.schema) { + if (!existingView?.schema?.[key]) { + const newColumn = view.schema[key] + + // view calculations + // @ts-expect-error non calculation types just won't have the calculationType field + const calculationType = newColumn.calculationType + if (calculationType) { + // Send the event + await events.view.calculationCreated({ + calculationType, + tableId: view.tableId, + }) + } + + // view joins + if (newColumn.columns) { + for (const column in newColumn?.columns) { + // if the new column is visible and it wasn't before + if (!existingView?.schema?.[key].columns?.[column].visible) { + // new view join exposing a column + await events.view.viewJoinCreated({ tableId: view.tableId }) + } + } + } + } + } +} + export async function update(ctx: Ctx) { const view = ctx.request.body @@ -191,8 +243,12 @@ export async function update(ctx: Ctx) { primaryDisplay: view.primaryDisplay, } - const { view: result } = await sdk.views.update(tableId, parsedView) + const { view: result, existingView } = await sdk.views.update( + tableId, + parsedView + ) + await handleViewEvents(existingView, result) await events.view.updated(result) ctx.body = { data: result } diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 23ae7c79d3..9dfe565cee 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -42,7 +42,7 @@ import { } from "../../../integrations/tests/utils" import merge from "lodash/merge" import { quotas } from "@budibase/pro" -import { db, roles, context } from "@budibase/backend-core" +import { db, roles, context, events } from "@budibase/backend-core" const descriptions = datasourceDescribe({ exclude: [DatabaseName.MONGODB] }) @@ -129,6 +129,7 @@ if (descriptions.length) { id: expect.stringMatching(new RegExp(`${table._id!}_`)), version: 2, }) + expect(events.view.created).toHaveBeenCalledTimes(1) }) it("can persist views with all fields", async () => { @@ -195,6 +196,7 @@ if (descriptions.length) { } expect(res).toEqual(expected) + expect(events.view.created).toHaveBeenCalledTimes(1) }) it("can create a view with just a query field, no queryUI, for backwards compatibility", async () => { @@ -224,6 +226,7 @@ if (descriptions.length) { }, } const res = await config.api.viewV2.create(newView) + expect(events.view.created).toHaveBeenCalledTimes(1) const expected: ViewV2 = { ...newView, @@ -283,6 +286,7 @@ if (descriptions.length) { } const createdView = await config.api.viewV2.create(newView) + expect(events.view.created).toHaveBeenCalledTimes(1) expect(createdView).toEqual({ ...newView, @@ -990,6 +994,7 @@ if (descriptions.length) { expect((await config.api.table.get(tableId)).views).toEqual({ [view.name]: expected, }) + expect(events.view.updated).toHaveBeenCalledTimes(1) }) it("can update all fields", async () => { @@ -1621,6 +1626,7 @@ if (descriptions.length) { field: "age", } await config.api.viewV2.update(view) + expect(events.view.calculationCreated).toHaveBeenCalledTimes(1) const { rows } = await config.api.row.search(view.id) expect(rows).toHaveLength(2) @@ -2154,6 +2160,7 @@ if (descriptions.length) { }), }) ) + expect(events.view.viewJoinCreated).not.toBeCalled() }) it("does not rename columns with the same name but from other tables", async () => { diff --git a/packages/types/src/sdk/events/event.ts b/packages/types/src/sdk/events/event.ts index 242b182dec..23c0eb0cbd 100644 --- a/packages/types/src/sdk/events/event.ts +++ b/packages/types/src/sdk/events/event.ts @@ -118,6 +118,7 @@ export enum Event { VIEW_CALCULATION_CREATED = "view:calculation:created", VIEW_CALCULATION_UPDATED = "view:calculation:updated", VIEW_CALCULATION_DELETED = "view:calculation:deleted", + VIEW_JOIN_CREATED = "view:join:created", // ROWS ROWS_CREATED = "rows:created", @@ -192,6 +193,9 @@ export enum Event { // AUDIT LOG AUDIT_LOGS_FILTERED = "audit_log:filtered", AUDIT_LOGS_DOWNLOADED = "audit_log:downloaded", + + // ROW ACTION + ROW_ACTION_CREATED = "row_action:created", } export const UserGroupSyncEvents: Event[] = [ @@ -376,6 +380,7 @@ export const AuditedEventFriendlyName: Record = { [Event.VIEW_CALCULATION_CREATED]: undefined, [Event.VIEW_CALCULATION_UPDATED]: undefined, [Event.VIEW_CALCULATION_DELETED]: undefined, + [Event.VIEW_JOIN_CREATED]: undefined, // SERVED - NOT AUDITED [Event.SERVED_BUILDER]: undefined, @@ -395,6 +400,9 @@ export const AuditedEventFriendlyName: Record = { // AUDIT LOG - NOT AUDITED [Event.AUDIT_LOGS_FILTERED]: undefined, [Event.AUDIT_LOGS_DOWNLOADED]: undefined, + + // ROW ACTIONS - NOT AUDITED + [Event.ROW_ACTION_CREATED]: undefined, } // properties added at the final stage of the event pipeline diff --git a/packages/types/src/sdk/events/view.ts b/packages/types/src/sdk/events/view.ts index c73a591a34..0ea153ad9d 100644 --- a/packages/types/src/sdk/events/view.ts +++ b/packages/types/src/sdk/events/view.ts @@ -1,4 +1,4 @@ -import { ViewCalculation, ViewV2Type } from "../../documents" +import { CalculationType, ViewCalculation, ViewV2Type } from "../../documents" import { BaseEvent, TableExportFormat } from "./event" export interface ViewCreatedEvent extends BaseEvent { @@ -9,8 +9,6 @@ export interface ViewCreatedEvent extends BaseEvent { export interface ViewUpdatedEvent extends BaseEvent { tableId: string - groupedFilters: number - viewJoins: number } export interface ViewDeletedEvent extends BaseEvent { @@ -24,10 +22,12 @@ export interface ViewExportedEvent extends BaseEvent { export interface ViewFilterCreatedEvent extends BaseEvent { tableId: string + filterGroups: number } export interface ViewFilterUpdatedEvent extends BaseEvent { tableId: string + filterGroups: number } export interface ViewFilterDeletedEvent extends BaseEvent { @@ -36,7 +36,7 @@ export interface ViewFilterDeletedEvent extends BaseEvent { export interface ViewCalculationCreatedEvent extends BaseEvent { tableId: string - calculation: ViewCalculation + calculation: CalculationType } export interface ViewCalculationUpdatedEvent extends BaseEvent { @@ -48,3 +48,7 @@ export interface ViewCalculationDeletedEvent extends BaseEvent { tableId: string calculation: ViewCalculation } + +export interface ViewJoinCreatedEvent extends BaseEvent { + tableId: string +} From ec84cf1a56ffe87a6f23fc9a74f3900c52e6ced1 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Sun, 8 Dec 2024 23:50:22 +0000 Subject: [PATCH 31/68] lint --- .../server/src/api/controllers/view/views.ts | 2 - .../src/api/controllers/view/viewsV2.ts | 57 ++++++++------- .../server/src/api/routes/tests/table.spec.ts | 1 + .../src/api/routes/tests/viewV2.spec.ts | 70 ++++++++++++++----- 4 files changed, 80 insertions(+), 50 deletions(-) diff --git a/packages/server/src/api/controllers/view/views.ts b/packages/server/src/api/controllers/view/views.ts index 0626f4e55c..bc734c5657 100644 --- a/packages/server/src/api/controllers/view/views.ts +++ b/packages/server/src/api/controllers/view/views.ts @@ -19,8 +19,6 @@ import { builderSocket } from "../../../websockets" const cloneDeep = require("lodash/cloneDeep") -import isEqual from "lodash/isEqual" - export async function fetch(ctx: Ctx) { ctx.body = await getViews() } diff --git a/packages/server/src/api/controllers/view/viewsV2.ts b/packages/server/src/api/controllers/view/viewsV2.ts index e611df0de3..2751a81234 100644 --- a/packages/server/src/api/controllers/view/viewsV2.ts +++ b/packages/server/src/api/controllers/view/viewsV2.ts @@ -16,14 +16,10 @@ import { CountCalculationFieldMetadata, CreateViewResponse, UpdateViewResponse, - View, - Event, } from "@budibase/types" import { events } from "@budibase/backend-core" import { builderSocket, gridSocket } from "../../../websockets" import { helpers } from "@budibase/shared-core" -import isEqual from "lodash/isEqual" -import { publishEvent } from "@budibase/backend-core/src/events" function stripUnknownFields( field: ViewFieldMetadata @@ -168,48 +164,51 @@ export async function create(ctx: Ctx) { gridSocket?.emitViewUpdate(ctx, result) } +async function handleViewFilterEvents(existingView: ViewV2, view: ViewV2) { + const filterGroups = view.queryUI?.groups?.length || 0 + const properties = { filterGroups, tableId: view.tableId } + if (!existingView?.queryUI) { + await events.view.filterCreated(properties) + } else { + if ( + filterGroups > + ((existingView && existingView?.queryUI?.groups?.length) || 0) + ) { + await events.view.filterUpdated(properties) + } + } +} + async function handleViewEvents(existingView: ViewV2, view: ViewV2) { // Grouped filters if (view.queryUI?.groups) { - const filterGroups = view.queryUI?.groups?.length || 0 - const properties = { filterGroups, tableId: view.tableId } - if (!existingView?.queryUI) { - await publishEvent(Event.VIEW_FILTER_CREATED, properties) - await events.view.filterCreated(properties) - } else { - if ( - filterGroups > - ((existingView && existingView?.queryUI?.groups?.length) || 0) - ) { - await events.view.filterUpdated(properties) - } - } + await handleViewFilterEvents(existingView, view) } // if new columns in the view for (const key in view.schema) { if (!existingView?.schema?.[key]) { - const newColumn = view.schema[key] - // view calculations // @ts-expect-error non calculation types just won't have the calculationType field - const calculationType = newColumn.calculationType + const calculationType = view.schema[key].calculationType if (calculationType) { - // Send the event await events.view.calculationCreated({ calculationType, tableId: view.tableId, }) } + } - // view joins - if (newColumn.columns) { - for (const column in newColumn?.columns) { - // if the new column is visible and it wasn't before - if (!existingView?.schema?.[key].columns?.[column].visible) { - // new view join exposing a column - await events.view.viewJoinCreated({ tableId: view.tableId }) - } + // view joins + if (view.schema[key].columns) { + for (const column in view.schema[key]?.columns) { + // if the new column is visible and it wasn't before + if ( + !existingView?.schema?.[key].columns?.[column].visible && + view.schema?.[key].columns?.[column].visible + ) { + // new view join exposing a column + await events.view.viewJoinCreated({ tableId: view.tableId }) } } } diff --git a/packages/server/src/api/routes/tests/table.spec.ts b/packages/server/src/api/routes/tests/table.spec.ts index 39b6a68eaf..e47181e21f 100644 --- a/packages/server/src/api/routes/tests/table.spec.ts +++ b/packages/server/src/api/routes/tests/table.spec.ts @@ -247,6 +247,7 @@ if (descriptions.length) { }, }, }, + primary: ["_id"], views: {}, sql: true, }) diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 9dfe565cee..739603bb3c 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -1,39 +1,39 @@ import { + ArrayOperator, + BasicOperator, + BBReferenceFieldSubType, + CalculationType, CreateViewRequest, Datasource, + EmptyFilterOption, FieldSchema, FieldType, INTERNAL_TABLE_SOURCE_ID, + JsonFieldSubType, + JsonTypes, + LegacyFilter, + NumericCalculationFieldMetadata, PermissionLevel, QuotaUsageType, + RelationshipType, + RenameColumn, Row, SaveTableRequest, + SearchFilters, + SearchResponse, + SearchViewRowRequest, SortOrder, SortType, StaticQuotaName, Table, + TableSchema, TableSourceType, + UILogicalOperator, + UISearchFilter, UpdateViewRequest, ViewV2, - SearchResponse, - BasicOperator, - CalculationType, - RelationshipType, - TableSchema, - RenameColumn, - BBReferenceFieldSubType, - NumericCalculationFieldMetadata, ViewV2Schema, ViewV2Type, - JsonTypes, - EmptyFilterOption, - JsonFieldSubType, - UISearchFilter, - LegacyFilter, - SearchViewRowRequest, - ArrayOperator, - UILogicalOperator, - SearchFilters, } from "@budibase/types" import { generator, mocks } from "@budibase/backend-core/tests" import { @@ -42,7 +42,7 @@ import { } from "../../../integrations/tests/utils" import merge from "lodash/merge" import { quotas } from "@budibase/pro" -import { db, roles, context, events } from "@budibase/backend-core" +import { context, db, events, roles } from "@budibase/backend-core" const descriptions = datasourceDescribe({ exclude: [DatabaseName.MONGODB] }) @@ -1360,6 +1360,8 @@ if (descriptions.length) { }, }) + expect(events.view.filterCreated).toHaveBeenCalledTimes(1) + updatedView = await config.api.viewV2.get(view.id) expected = { onEmptyFilter: EmptyFilterOption.RETURN_ALL, @@ -2160,7 +2162,7 @@ if (descriptions.length) { }), }) ) - expect(events.view.viewJoinCreated).not.toBeCalled() + expect(events.view.viewJoinCreated).not.toHaveBeenCalled() }) it("does not rename columns with the same name but from other tables", async () => { @@ -2233,6 +2235,36 @@ if (descriptions.length) { ) }) + it("handles events for changing column visibility from default false", async () => { + let auxTable = await createAuxTable() + let aux2Table = await createAuxTable() + + const table = await createMainTable([ + { name: "aux", tableId: auxTable._id!, fk: "fk_aux" }, + { name: "aux2", tableId: aux2Table._id!, fk: "fk_aux2" }, + ]) + + const view = await createView(table._id!, { + aux: { + visible: true, + columns: { + name: { visible: false, readonly: true }, + }, + }, + aux2: { + visible: true, + columns: { + name: { visible: false, readonly: true }, + }, + }, + }) + + // @ts-expect-error column exists above + view.schema.aux2.columns.name.visible = true + await config.api.viewV2.update(view) + expect(events.view.viewJoinCreated).toHaveBeenCalledTimes(1) + }) + it("updates all views references", async () => { let auxTable = await createAuxTable() From 1d0b7d83e7b8f46e06f7ec77da039ffe32f6a07d Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 9 Dec 2024 08:45:36 +0000 Subject: [PATCH 32/68] view test --- packages/server/src/api/routes/tests/view.spec.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/server/src/api/routes/tests/view.spec.ts b/packages/server/src/api/routes/tests/view.spec.ts index 2217116f2d..e1968d2899 100644 --- a/packages/server/src/api/routes/tests/view.spec.ts +++ b/packages/server/src/api/routes/tests/view.spec.ts @@ -73,11 +73,6 @@ describe("/views", () => { } describe("create", () => { - it("returns a success message when the view is successfully created", async () => { - await saveView() - expect(events.view.created).toHaveBeenCalledTimes(1) - }) - it("creates a view with a calculation", async () => { jest.clearAllMocks() From 59e406cb827234aed546375749df3dde0cbf3727 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 9 Dec 2024 10:13:04 +0100 Subject: [PATCH 33/68] Add extra paths --- tsconfig.build.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.build.json b/tsconfig.build.json index b783612353..d51625a34f 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -18,7 +18,8 @@ "@budibase/shared-core": ["./packages/shared-core/src"], "@budibase/pro": ["./packages/pro/src"], "@budibase/string-templates": ["./packages/string-templates/src"], - "@budibase/string-templates/*": ["./packages/string-templates/*"] + "@budibase/string-templates/*": ["./packages/string-templates/*"], + "@budibase/frontend-core": ["./packages/frontend-core/src"] } }, "exclude": [] From 509950d36839d1fe08f15e40477b12a69f1d6b10 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 9 Dec 2024 09:35:01 +0000 Subject: [PATCH 34/68] Fix tests. --- packages/backend-core/src/migrations/migrations.ts | 2 +- packages/pro | 2 +- packages/types/src/sdk/migrations.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/backend-core/src/migrations/migrations.ts b/packages/backend-core/src/migrations/migrations.ts index fe6bc17386..c8320b5724 100644 --- a/packages/backend-core/src/migrations/migrations.ts +++ b/packages/backend-core/src/migrations/migrations.ts @@ -35,7 +35,7 @@ export const backPopulateMigrations = async (opts: MigrationNoOpOptions) => { // filter migrations to the type and populate a no-op migration const migrations: Migration[] = DEFINITIONS.filter( def => def.type === opts.type - ).map(d => ({ ...d, fn: () => {} })) + ).map(d => ({ ...d, fn: async () => {} })) await runMigrations(migrations, { noOp: opts }) } diff --git a/packages/pro b/packages/pro index e49ac51191..b2f2e2b9d4 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit e49ac51191d88787912673366d350d36987354fd +Subproject commit b2f2e2b9d45906744196875b87a121948e8e4c09 diff --git a/packages/types/src/sdk/migrations.ts b/packages/types/src/sdk/migrations.ts index f2b0ed48e3..6db0c85879 100644 --- a/packages/types/src/sdk/migrations.ts +++ b/packages/types/src/sdk/migrations.ts @@ -1,6 +1,8 @@ +import { Database } from "./db" + export interface Migration extends MigrationDefinition { appOpts?: object - fn: () => void + fn: (db: Database) => Promise silent?: boolean preventRetry?: boolean } From bca9bd27dbeb8666dd589d49f387da4455f6ccc8 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 9 Dec 2024 10:17:17 +0000 Subject: [PATCH 35/68] backfill tests --- packages/server/src/migrations/tests/index.spec.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/server/src/migrations/tests/index.spec.ts b/packages/server/src/migrations/tests/index.spec.ts index 6b3f3314ba..3a23d8f011 100644 --- a/packages/server/src/migrations/tests/index.spec.ts +++ b/packages/server/src/migrations/tests/index.spec.ts @@ -73,16 +73,12 @@ describe("migrations", () => { expect(events.query.created).toHaveBeenCalledTimes(2) expect(events.role.created).toHaveBeenCalledTimes(3) // created roles + admin (created on table creation) expect(events.table.created).toHaveBeenCalledTimes(3) - expect(events.view.created).toHaveBeenCalledTimes(2) - expect(events.view.calculationCreated).toHaveBeenCalledTimes(1) - expect(events.view.filterCreated).toHaveBeenCalledTimes(1) - expect(events.screen.created).toHaveBeenCalledTimes(2) expect(events.backfill.appSucceeded).toHaveBeenCalledTimes(2) // to make sure caching is working as expected expect( events.processors.analyticsProcessor.processEvent - ).toHaveBeenCalledTimes(24) // Addtion of of the events above + ).toHaveBeenCalledTimes(20) // Addition of of the events above }) }) }) From bea39bc873ce9ff85dae9daf6268067203ec7d0d Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 9 Dec 2024 11:25:44 +0100 Subject: [PATCH 36/68] Fix check:types --- packages/builder/tsconfig.build.json | 3 +++ .../server/src/api/routes/tests/queries/generic-sql.spec.ts | 2 +- .../server/src/api/routes/tests/utilities/TestFunctions.ts | 2 +- packages/server/tsconfig.build.json | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/builder/tsconfig.build.json b/packages/builder/tsconfig.build.json index 506a50fc27..119fe56c81 100644 --- a/packages/builder/tsconfig.build.json +++ b/packages/builder/tsconfig.build.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.build.json", + "compilerOptions": { + "allowJs": true + }, "include": ["./src/**/*"], "exclude": ["node_modules", "**/*.json", "**/*.spec.ts", "**/*.spec.js"] } diff --git a/packages/server/src/api/routes/tests/queries/generic-sql.spec.ts b/packages/server/src/api/routes/tests/queries/generic-sql.spec.ts index e7ddc0df22..13dd1b719b 100644 --- a/packages/server/src/api/routes/tests/queries/generic-sql.spec.ts +++ b/packages/server/src/api/routes/tests/queries/generic-sql.spec.ts @@ -3,7 +3,7 @@ import { DatabaseName, datasourceDescribe, } from "../../../../integrations/tests/utils" -import { Expectations } from "src/tests/utilities/api/base" +import { Expectations } from "../../../../tests/utilities/api/base" import { events } from "@budibase/backend-core" import { Knex } from "knex" import { generator } from "@budibase/backend-core/tests" diff --git a/packages/server/src/api/routes/tests/utilities/TestFunctions.ts b/packages/server/src/api/routes/tests/utilities/TestFunctions.ts index 6fa9e054b9..9d5417d041 100644 --- a/packages/server/src/api/routes/tests/utilities/TestFunctions.ts +++ b/packages/server/src/api/routes/tests/utilities/TestFunctions.ts @@ -4,7 +4,7 @@ import { AppStatus } from "../../../../db/utils" import { roles, tenancy, context, db } from "@budibase/backend-core" import env from "../../../../environment" import Nano from "@budibase/nano" -import TestConfiguration from "src/tests/utilities/TestConfiguration" +import TestConfiguration from "../../../../tests/utilities/TestConfiguration" class Request { appId: any diff --git a/packages/server/tsconfig.build.json b/packages/server/tsconfig.build.json index 77026b8258..f4a11a9de9 100644 --- a/packages/server/tsconfig.build.json +++ b/packages/server/tsconfig.build.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.build.json", + "compilerOptions": { + "allowArbitraryExtensions": true, + "isolatedModules": false + }, "include": ["src/**/*"], "exclude": [ "node_modules", From 788831efb033047594acb7c053f6e63571f60597 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 9 Dec 2024 11:27:39 +0100 Subject: [PATCH 37/68] Update pro submodule --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index 278179b45e..b13412544d 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 278179b45e303c44c4f496bfaa7b338f19af8b44 +Subproject commit b13412544db0cca6e55bc3ef0079ff88a97b94d6 From b98571302a0ebfdf498bb8bacfdb3b3895e1f3cf Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 9 Dec 2024 10:56:57 +0000 Subject: [PATCH 38/68] Fix build. --- packages/server/src/websockets/websocket.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/websockets/websocket.ts b/packages/server/src/websockets/websocket.ts index 2f031a72d9..e8cd306fd2 100644 --- a/packages/server/src/websockets/websocket.ts +++ b/packages/server/src/websockets/websocket.ts @@ -57,7 +57,7 @@ export class BaseSocket { const ctx = createContext(this.app, socket) try { - await runMiddlewares(ctx, middlewares, () => { + await runMiddlewares(ctx, middlewares, async () => { // Middlewares are finished // Extract some data from our enriched koa context to persist // as metadata for the socket From 6865052ef0a64e8d5f43299d5d5f98ff8d829ce6 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 9 Dec 2024 11:21:23 +0000 Subject: [PATCH 39/68] Get us much closer to using the recommended set of lints. --- eslint.config.mjs | 43 ++++++++++--------- hosting/scripts/setup.js | 4 +- package.json | 1 + .../tests/core/users/users.spec.js | 4 +- .../query/import/tests/index.spec.js | 4 +- .../src/api/routes/tests/analytics.spec.js | 29 ++++++------- .../server/src/api/routes/tests/dev.spec.js | 8 ++-- .../src/api/routes/tests/layout.spec.js | 4 +- .../integrations/tests/googlesheets.spec.ts | 32 +++++++------- .../src/integrations/tests/rest.spec.ts | 39 +++++++++-------- yarn.lock | 5 +++ 11 files changed, 91 insertions(+), 82 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 59c2202e94..2d2385cbdb 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -6,6 +6,7 @@ import tsParser from "@typescript-eslint/parser" import eslintPluginJest from "eslint-plugin-jest" import eslintPluginSvelte from "eslint-plugin-svelte" import eslintPluginLocalRules from "eslint-plugin-local-rules" +import eslintPluginVitest from "@vitest/eslint-plugin" import eslint from "@eslint/js" import tseslint from "typescript-eslint" @@ -17,17 +18,10 @@ export default [ "**/node_modules", "**/dist", "**/public", - "**/*.spec.js", "**/bundle.js", - "**/node_modules", - "**/public", - "**/dist", + "**/coverage", "packages/server/builder", - "packages/server/coverage", - "packages/worker/coverage", - "packages/backend-core/coverage", "packages/server/client", - "packages/server/coverage", "packages/builder/.routify", "packages/sdk/sdk", "**/*.ivm.bundle.js", @@ -102,18 +96,12 @@ export default [ }, rules: { - "prefer-spread": "off", - "no-unused-vars": "off", - "prefer-rest-params": "off", "local-rules/no-barrel-imports": "error", "local-rules/no-budibase-imports": "error", "local-rules/no-console-error": "error", - "@typescript-eslint/no-this-alias": "off", - "@typescript-eslint/no-unused-expressions": "off", - "@typescript-eslint/no-empty-object-type": "off", - "@typescript-eslint/no-require-imports": "off", - "@typescript-eslint/ban-ts-comment": "off", + // @typscript-eslint/no-unused-vars supersedes no-unused-vars + "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": [ "error", { @@ -125,22 +113,28 @@ export default [ }, ], + // @typescript-eslint/no-redeclare supersedes no-redeclare "no-redeclare": "off", "@typescript-eslint/no-redeclare": "error", + + // @typescript-eslint/no-dupe-class-members supersedes no-dupe-class-members "no-dupe-class-members": "off", + "@typescript-eslint/no-dupe-class-members": "error", }, } }), { - files: ["**/*.spec.ts"], + files: ["**/*.spec.ts", "**/*.spec.js"], plugins: { jest: eslintPluginJest, + vitest: eslintPluginVitest, }, languageOptions: { globals: { ...eslintPluginJest.environments.globals.globals, + ...eslintPluginVitest.environments.env.globals, NodeJS: true, }, @@ -148,13 +142,20 @@ export default [ }, rules: { - "local-rules/no-test-com": "error", - "local-rules/email-domain-example-com": "error", + ...eslintPluginVitest.configs.recommended.rules, + ...eslintPluginJest.configs.recommended.rules, + "no-console": "warn", + + "vitest/expect-expect": "off", + "jest/expect-expect": "off", "jest/no-conditional-expect": "off", - "no-dupe-class-members": "off", - "no-redeclare": "off", + "jest/no-disabled-tests": "off", + "jest/no-standalone-expect": "off", + + "local-rules/no-test-com": "error", + "local-rules/email-domain-example-com": "error", }, }, { diff --git a/hosting/scripts/setup.js b/hosting/scripts/setup.js index c62ac14f29..35ee32bd64 100755 --- a/hosting/scripts/setup.js +++ b/hosting/scripts/setup.js @@ -2,7 +2,6 @@ const os = require("os") const exec = require("child_process").exec -const fs = require("fs") const platform = os.platform() const windows = platform === "win32" @@ -17,10 +16,11 @@ function execute(command) { async function commandExistsUnix(command) { const unixCmd = `command -v ${command} 2>/dev/null && { echo >&1 ${command}; exit 0; }` - return execute(command) + return execute(unixCmd) } async function commandExistsWindows(command) { + // eslint-disable-next-line no-control-regex if (/[\x00-\x1f<>:"|?*]/.test(command)) { return false } diff --git a/package.json b/package.json index f95685c6ff..b047d25461 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "@types/node": "20.10.0", "@types/proper-lockfile": "^4.1.4", "@typescript-eslint/parser": "8.17.0", + "@vitest/eslint-plugin": "^1.1.14", "cross-spawn": "7.0.6", "depcheck": "^1.4.7", "esbuild": "^0.18.17", diff --git a/packages/backend-core/tests/core/users/users.spec.js b/packages/backend-core/tests/core/users/users.spec.js index f08c435b95..dde0d87fb7 100644 --- a/packages/backend-core/tests/core/users/users.spec.js +++ b/packages/backend-core/tests/core/users/users.spec.js @@ -11,15 +11,15 @@ const { getCreatorCount } = require("../../../src/users/users") describe("Users", () => { let getGlobalDBMock - let getGlobalUserParamsMock let paginationMock beforeEach(() => { jest.resetAllMocks() getGlobalDBMock = jest.spyOn(context, "getGlobalDB") - getGlobalUserParamsMock = jest.spyOn(db, "getGlobalUserParams") paginationMock = jest.spyOn(db, "pagination") + + jest.spyOn(db, "getGlobalUserParams") }) it("Retrieves the number of creators", async () => { diff --git a/packages/server/src/api/controllers/query/import/tests/index.spec.js b/packages/server/src/api/controllers/query/import/tests/index.spec.js index fcbd4509ee..409a55e81b 100644 --- a/packages/server/src/api/controllers/query/import/tests/index.spec.js +++ b/packages/server/src/api/controllers/query/import/tests/index.spec.js @@ -111,8 +111,8 @@ describe("Rest Importer", () => { const importResult = await restImporter.importQueries(datasource._id) expect(importResult.errorQueries.length).toBe(0) expect(importResult.queries.length).toBe(assertions[key].count) - expect(events.query.imported).toBeCalledTimes(1) - expect(events.query.imported).toBeCalledWith( + expect(events.query.imported).toHaveBeenCalledTimes(1) + expect(events.query.imported).toHaveBeenCalledWith( datasource, assertions[key].source, assertions[key].count diff --git a/packages/server/src/api/routes/tests/analytics.spec.js b/packages/server/src/api/routes/tests/analytics.spec.js index c69307656d..0b947ebcd9 100644 --- a/packages/server/src/api/routes/tests/analytics.spec.js +++ b/packages/server/src/api/routes/tests/analytics.spec.js @@ -4,14 +4,13 @@ const { events, constants } = require("@budibase/backend-core") describe("/static", () => { let request = setup.getRequest() let config = setup.getConfig() - let app const timezone = "Europe/London" afterAll(setup.afterAll) beforeAll(async () => { - app = await config.init() + await config.init() }) beforeEach(() => { @@ -26,10 +25,10 @@ describe("/static", () => { .set(config.defaultHeaders()) .expect(200) - expect(events.serve.servedBuilder).toBeCalledTimes(1) - expect(events.serve.servedBuilder).toBeCalledWith(timezone) - expect(events.serve.servedApp).not.toBeCalled() - expect(events.serve.servedAppPreview).not.toBeCalled() + expect(events.serve.servedBuilder).toHaveBeenCalledTimes(1) + expect(events.serve.servedBuilder).toHaveBeenCalledWith(timezone) + expect(events.serve.servedApp).not.toHaveBeenCalled() + expect(events.serve.servedAppPreview).not.toHaveBeenCalled() }) it("should ping from app preview", async () => { @@ -39,12 +38,12 @@ describe("/static", () => { .set(config.defaultHeaders()) .expect(200) - expect(events.serve.servedAppPreview).toBeCalledTimes(1) - expect(events.serve.servedAppPreview).toBeCalledWith( + expect(events.serve.servedAppPreview).toHaveBeenCalledTimes(1) + expect(events.serve.servedAppPreview).toHaveBeenCalledWith( config.getApp(), timezone ) - expect(events.serve.servedApp).not.toBeCalled() + expect(events.serve.servedApp).not.toHaveBeenCalled() }) it("should ping from app", async () => { @@ -57,13 +56,13 @@ describe("/static", () => { .set(headers) .expect(200) - expect(events.serve.servedApp).toBeCalledTimes(1) - expect(events.serve.servedApp).toBeCalledWith( + expect(events.serve.servedApp).toHaveBeenCalledTimes(1) + expect(events.serve.servedApp).toHaveBeenCalledWith( config.getProdApp(), timezone, undefined ) - expect(events.serve.servedAppPreview).not.toBeCalled() + expect(events.serve.servedAppPreview).not.toHaveBeenCalled() }) it("should ping from an embedded app", async () => { @@ -76,13 +75,13 @@ describe("/static", () => { .set(headers) .expect(200) - expect(events.serve.servedApp).toBeCalledTimes(1) - expect(events.serve.servedApp).toBeCalledWith( + expect(events.serve.servedApp).toHaveBeenCalledTimes(1) + expect(events.serve.servedApp).toHaveBeenCalledWith( config.getProdApp(), timezone, true ) - expect(events.serve.servedAppPreview).not.toBeCalled() + expect(events.serve.servedAppPreview).not.toHaveBeenCalled() }) }) }) diff --git a/packages/server/src/api/routes/tests/dev.spec.js b/packages/server/src/api/routes/tests/dev.spec.js index 73f506d17f..4c999e98c3 100644 --- a/packages/server/src/api/routes/tests/dev.spec.js +++ b/packages/server/src/api/routes/tests/dev.spec.js @@ -19,7 +19,7 @@ describe("/dev", () => { .set(config.defaultHeaders()) .expect("Content-Type", /json/) .expect(200) - expect(events.app.reverted).toBeCalledTimes(1) + expect(events.app.reverted).toHaveBeenCalledTimes(1) }) }) @@ -32,8 +32,10 @@ describe("/dev", () => { .expect(200) expect(res.body.version).toBe("0.0.0+jest") - expect(events.installation.versionChecked).toBeCalledTimes(1) - expect(events.installation.versionChecked).toBeCalledWith("0.0.0+jest") + expect(events.installation.versionChecked).toHaveBeenCalledTimes(1) + expect(events.installation.versionChecked).toHaveBeenCalledWith( + "0.0.0+jest" + ) }) }) }) diff --git a/packages/server/src/api/routes/tests/layout.spec.js b/packages/server/src/api/routes/tests/layout.spec.js index c3a3010e32..c5ffeb9c20 100644 --- a/packages/server/src/api/routes/tests/layout.spec.js +++ b/packages/server/src/api/routes/tests/layout.spec.js @@ -25,7 +25,7 @@ describe("/layouts", () => { .expect("Content-Type", /json/) .expect(200) expect(res.body._rev).toBeDefined() - expect(events.layout.created).toBeCalledTimes(1) + expect(events.layout.created).toHaveBeenCalledTimes(1) }) it("should apply authorization to endpoint", async () => { @@ -45,7 +45,7 @@ describe("/layouts", () => { .expect("Content-Type", /json/) .expect(200) expect(res.body.message).toBeDefined() - expect(events.layout.deleted).toBeCalledTimes(1) + expect(events.layout.deleted).toHaveBeenCalledTimes(1) }) it("should apply authorization to endpoint", async () => { diff --git a/packages/server/src/integrations/tests/googlesheets.spec.ts b/packages/server/src/integrations/tests/googlesheets.spec.ts index 2c0e4dce84..966123513c 100644 --- a/packages/server/src/integrations/tests/googlesheets.spec.ts +++ b/packages/server/src/integrations/tests/googlesheets.spec.ts @@ -389,24 +389,24 @@ describe("Google Sheets Integration", () => { }) // TODO: this gets the error "Sheet is not large enough to fit 27 columns. Resize the sheet first." - // it("should be able to add a new column", async () => { - // const updatedTable = await config.api.table.save({ - // ...table, - // schema: { - // ...table.schema, - // newColumn: { - // name: "newColumn", - // type: FieldType.STRING, - // }, - // }, - // }) + it.skip("should be able to add a new column", async () => { + const updatedTable = await config.api.table.save({ + ...table, + schema: { + ...table.schema, + newColumn: { + name: "newColumn", + type: FieldType.STRING, + }, + }, + }) - // expect(updatedTable.schema.newColumn).toBeDefined() + expect(updatedTable.schema.newColumn).toBeDefined() - // expect(mock.cell("A1")).toEqual("name") - // expect(mock.cell("B1")).toEqual("description") - // expect(mock.cell("C1")).toEqual("newColumn") - // }) + expect(mock.cell("A1")).toEqual("name") + expect(mock.cell("B1")).toEqual("description") + expect(mock.cell("C1")).toEqual("newColumn") + }) it("should be able to delete a column", async () => { const row = await config.api.row.save(table._id!, { diff --git a/packages/server/src/integrations/tests/rest.spec.ts b/packages/server/src/integrations/tests/rest.spec.ts index fac6f58c3b..0411a1380e 100644 --- a/packages/server/src/integrations/tests/rest.spec.ts +++ b/packages/server/src/integrations/tests/rest.spec.ts @@ -3,6 +3,8 @@ import { RestIntegration } from "../rest" import { BodyType, RestAuthType } from "@budibase/types" import { Response } from "node-fetch" import TestConfiguration from "../../../src/tests/utilities/TestConfiguration" +import { createServer } from "http" +import { AddressInfo } from "net" const UUID_REGEX = "[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" @@ -455,28 +457,27 @@ describe("REST Integration", () => { // NOTE(samwho): it seems like this code doesn't actually work because it requires // node-fetch >=3, and we're not on that because upgrading to it produces errors to // do with ESM that are above my pay grade. + it.skip("doesn't fail when legacyHttpParser is set", async () => { + const server = createServer((req, res) => { + res.writeHead(200, { + "Transfer-Encoding": "chunked", + "Content-Length": "10", + }) + res.end(JSON.stringify({ foo: "bar" })) + }) - // it("doesn't fail when legacyHttpParser is set", async () => { - // const server = createServer((req, res) => { - // res.writeHead(200, { - // "Transfer-Encoding": "chunked", - // "Content-Length": "10", - // }) - // res.end(JSON.stringify({ foo: "bar" })) - // }) + server.listen() + await new Promise(resolve => server.once("listening", resolve)) - // server.listen() - // await new Promise(resolve => server.once("listening", resolve)) + const address = server.address() as AddressInfo - // const address = server.address() as AddressInfo - - // const integration = new RestIntegration({ - // url: `http://localhost:${address.port}`, - // legacyHttpParser: true, - // }) - // const { data } = await integration.read({}) - // expect(data).toEqual({ foo: "bar" }) - // }) + const integration = new RestIntegration({ + url: `http://localhost:${address.port}`, + legacyHttpParser: true, + }) + const { data } = await integration.read({}) + expect(data).toEqual({ foo: "bar" }) + }) it("doesn't fail when legacyHttpParser is true", async () => { nock("https://example.com").get("/").reply(200, { foo: "bar" }) diff --git a/yarn.lock b/yarn.lock index 4b4ab5146f..1e44ea753a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6432,6 +6432,11 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== +"@vitest/eslint-plugin@^1.1.14": + version "1.1.14" + resolved "https://registry.yarnpkg.com/@vitest/eslint-plugin/-/eslint-plugin-1.1.14.tgz#dc3bb332461282cfab213b76e5e42bd2dad5929b" + integrity sha512-ej0cT5rUt7uvwxuu7Qxkm7fI+eaOq8vD34qGpuRoXCdvOybOlE5GDqtgvVCYbxLANkcRJfm5VDU1TnJmQRHi9g== + "@vitest/expect@0.29.8": version "0.29.8" resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.29.8.tgz#6ecdd031b4ea8414717d10b65ccd800908384612" From 66cd757c2715b1644ef8a40e3360a09c553ad473 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 9 Dec 2024 12:44:49 +0100 Subject: [PATCH 40/68] Unify node types --- examples/nextjs-api-sales/package.json | 2 +- examples/nextjs-api-sales/yarn.lock | 23 +- package.json | 2 +- packages/backend-core/package.json | 3 +- packages/cli/package.json | 2 +- packages/pro | 2 +- packages/server/package.json | 3 +- packages/shared-core/package.json | 2 +- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 3 +- yarn.lock | 478 +++---------------------- 12 files changed, 84 insertions(+), 440 deletions(-) diff --git a/examples/nextjs-api-sales/package.json b/examples/nextjs-api-sales/package.json index 21c548c6cc..1f4335462b 100644 --- a/examples/nextjs-api-sales/package.json +++ b/examples/nextjs-api-sales/package.json @@ -18,7 +18,7 @@ "react-notifications-component": "^3.4.1" }, "devDependencies": { - "@types/node": "17.0.21", + "@types/node": "^20.17.9", "@types/react": "17.0.39", "eslint": "8.10.0", "eslint-config-next": "12.1.0", diff --git a/examples/nextjs-api-sales/yarn.lock b/examples/nextjs-api-sales/yarn.lock index 867835a6b7..d4ba8a29a5 100644 --- a/examples/nextjs-api-sales/yarn.lock +++ b/examples/nextjs-api-sales/yarn.lock @@ -147,10 +147,12 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/node@17.0.21": - version "17.0.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644" - integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ== +"@types/node@^20.17.9": + version "20.17.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.9.tgz#5f141d4b7ee125cdee5faefe28de095398865bab" + integrity sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw== + dependencies: + undici-types "~6.19.2" "@types/prop-types@*": version "15.7.4" @@ -1746,10 +1748,10 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typescript@5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.2.tgz#c26f023cb0054e657ce04f72583ea2d85f8d0507" - integrity sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew== +typescript@5.7.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== unbox-primitive@^1.0.1: version "1.0.1" @@ -1761,6 +1763,11 @@ unbox-primitive@^1.0.1: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" diff --git a/package.json b/package.json index 32888cf056..2b23df6ab7 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "@babel/eslint-parser": "^7.22.5", "@babel/preset-env": "^7.22.5", "@esbuild-plugins/tsconfig-paths": "^0.1.2", - "@types/node": "20.10.0", + "@types/node": "^20.17.9", "@types/proper-lockfile": "^4.1.4", "@typescript-eslint/parser": "6.9.0", "cross-spawn": "7.0.6", diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index b669c885cb..3e1b5f324b 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -24,7 +24,7 @@ "build": "node ./scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly --paths null", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "build:oss": "node ./scripts/build.js", - "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020", + "check:types": "tsc -p tsconfig.json --noEmit --paths null", "check:dependencies": "node ../../scripts/depcheck.js", "test": "bash scripts/test.sh", "test:watch": "jest --watchAll" @@ -77,7 +77,6 @@ "@types/cookies": "0.7.8", "@types/jest": "29.5.5", "@types/lodash": "4.14.200", - "@types/node": "^22.9.0", "@types/node-fetch": "2.6.4", "@types/pouchdb": "6.4.2", "@types/redlock": "4.0.7", diff --git a/packages/cli/package.json b/packages/cli/package.json index 8545ae90a6..927824a522 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -11,7 +11,7 @@ "scripts": { "tsc": "node ../../scripts/build.js", "build": "yarn tsc", - "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020", + "check:types": "tsc -p tsconfig.json --noEmit --paths null", "start": "ts-node ./src/index.ts" }, "dependencies": { diff --git a/packages/pro b/packages/pro index b13412544d..c22f82b908 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit b13412544db0cca6e55bc3ef0079ff88a97b94d6 +Subproject commit c22f82b908664a1624b43646547822221bf05bc1 diff --git a/packages/server/package.json b/packages/server/package.json index 67da1aa8b4..1dd3df1d73 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -12,7 +12,7 @@ "prebuild": "rimraf dist/", "build": "node ./scripts/build.js", "postbuild": "copyfiles -f ../client/dist/budibase-client.js ../client/manifest.json client && copyfiles -f ../../yarn.lock ./dist/", - "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020", + "check:types": "tsc -p tsconfig.json --noEmit --paths null", "check:dependencies": "node ../../scripts/depcheck.js", "build:isolated-vm-lib:snippets": "esbuild --minify --bundle src/jsRunner/bundles/snippets.ts --outfile=src/jsRunner/bundles/snippets.ivm.bundle.js --platform=node --format=iife --global-name=snippets", "build:isolated-vm-lib:string-templates": "esbuild --minify --bundle src/jsRunner/bundles/index-helpers.ts --outfile=src/jsRunner/bundles/index-helpers.ivm.bundle.js --platform=node --format=iife --external:handlebars --global-name=helpers", @@ -147,7 +147,6 @@ "@types/koa__router": "12.0.4", "@types/lodash": "4.14.200", "@types/mssql": "9.1.5", - "@types/node": "^22.9.0", "@types/node-fetch": "2.6.4", "@types/oracledb": "6.5.1", "@types/pg": "8.6.6", diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index b30db9f0d8..d76849c9a2 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -10,7 +10,7 @@ "prebuild": "rimraf dist/", "build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly --paths null", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", - "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020", + "check:types": "tsc -p tsconfig.json --noEmit --paths null", "test": "jest", "test:watch": "yarn test --watchAll" }, diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 6891aee490..7256bdde0d 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -17,7 +17,7 @@ "scripts": { "build": "tsc --emitDeclarationOnly && rollup -c", "dev": "rollup -cw", - "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020", + "check:types": "tsc -p tsconfig.json --noEmit --paths null", "test": "jest", "manifest": "ts-node ./scripts/gen-collection-info.ts" }, diff --git a/packages/types/package.json b/packages/types/package.json index 9fc8ca4953..9be5c8460b 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -10,7 +10,7 @@ "prebuild": "rimraf dist/", "build": "node ../../scripts/build.js && tsc -p tsconfig.build.json --emitDeclarationOnly", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", - "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020" + "check:types": "tsc -p tsconfig.json --noEmit --paths null" }, "jest": {}, "devDependencies": { diff --git a/packages/worker/package.json b/packages/worker/package.json index d1ca44225f..ff21d88ac0 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -15,7 +15,7 @@ "prebuild": "rimraf dist/", "build": "node ../../scripts/build.js", "postbuild": "copyfiles -f ../../yarn.lock ./dist/", - "check:types": "tsc -p tsconfig.json --noEmit --paths null --target es2020", + "check:types": "tsc -p tsconfig.json --noEmit --paths null", "check:dependencies": "node ../../scripts/depcheck.js", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "run:docker": "node dist/index.js", @@ -85,7 +85,6 @@ "@types/koa": "2.13.4", "@types/koa__router": "12.0.4", "@types/lodash": "4.14.200", - "@types/node": "^22.9.0", "@types/node-fetch": "2.6.4", "@types/server-destroy": "1.0.1", "@types/supertest": "2.0.14", diff --git a/yarn.lock b/yarn.lock index dcc26d202a..88691df5a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -706,16 +706,7 @@ dependencies: tslib "^2.6.2" -"@azure/core-auth@^1.3.0", "@azure/core-auth@^1.4.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.5.0.tgz#a41848c5c31cb3b7c84c409885267d55a2c92e44" - integrity sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw== - dependencies: - "@azure/abort-controller" "^1.0.0" - "@azure/core-util" "^1.1.0" - tslib "^2.2.0" - -"@azure/core-auth@^1.5.0", "@azure/core-auth@^1.7.2", "@azure/core-auth@^1.8.0": +"@azure/core-auth@^1.3.0", "@azure/core-auth@^1.4.0", "@azure/core-auth@^1.5.0", "@azure/core-auth@^1.7.2", "@azure/core-auth@^1.8.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.9.0.tgz#ac725b03fabe3c892371065ee9e2041bee0fd1ac" integrity sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw== @@ -782,7 +773,7 @@ dependencies: tslib "^2.2.0" -"@azure/core-rest-pipeline@^1.1.0": +"@azure/core-rest-pipeline@^1.1.0", "@azure/core-rest-pipeline@^1.3.0", "@azure/core-rest-pipeline@^1.8.0", "@azure/core-rest-pipeline@^1.9.1": version "1.18.0" resolved "https://registry.yarnpkg.com/@azure/core-rest-pipeline/-/core-rest-pipeline-1.18.0.tgz#165f1cd9bb1060be3b6895742db3d1f1106271d3" integrity sha512-QSoGUp4Eq/gohEFNJaUOwTN7BCc2nHTjjbm75JT0aD7W65PWM1H/tItz0GsABn22uaKyGxiMhWQLt2r+FGU89Q== @@ -796,21 +787,6 @@ https-proxy-agent "^7.0.0" tslib "^2.6.2" -"@azure/core-rest-pipeline@^1.3.0", "@azure/core-rest-pipeline@^1.8.0", "@azure/core-rest-pipeline@^1.9.1": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@azure/core-rest-pipeline/-/core-rest-pipeline-1.11.0.tgz#fc0e8f56caac08a9d4ac91c07a6c5a360ea31c82" - integrity sha512-nB4KXl6qAyJmBVLWA7SakT4tzpYZTCk4pvRBeI+Ye0WYSOrlTqlMhc4MSS/8atD3ufeYWdkN380LLoXlUUzThw== - dependencies: - "@azure/abort-controller" "^1.0.0" - "@azure/core-auth" "^1.4.0" - "@azure/core-tracing" "^1.0.1" - "@azure/core-util" "^1.3.0" - "@azure/logger" "^1.0.0" - form-data "^4.0.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" - tslib "^2.2.0" - "@azure/core-tracing@1.0.0-preview.13": version "1.0.0-preview.13" resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz#55883d40ae2042f6f1e12b17dd0c0d34c536d644" @@ -826,15 +802,7 @@ dependencies: tslib "^2.2.0" -"@azure/core-util@^1.0.0", "@azure/core-util@^1.1.0", "@azure/core-util@^1.3.0", "@azure/core-util@^1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.6.1.tgz#fea221c4fa43c26543bccf799beb30c1c7878f5a" - integrity sha512-h5taHeySlsV9qxuK64KZxy4iln1BtMYlNt5jbuEFN3UFSAd1EwKg/Gjl5a6tZ/W8t6li3xPnutOx7zbDyXnPmQ== - dependencies: - "@azure/abort-controller" "^1.0.0" - tslib "^2.2.0" - -"@azure/core-util@^1.1.1", "@azure/core-util@^1.11.0": +"@azure/core-util@^1.0.0", "@azure/core-util@^1.1.1", "@azure/core-util@^1.11.0", "@azure/core-util@^1.3.0", "@azure/core-util@^1.6.1": version "1.11.0" resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.11.0.tgz#f530fc67e738aea872fbdd1cc8416e70219fada7" integrity sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g== @@ -921,15 +889,7 @@ events "^3.0.0" tslib "^2.2.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.22.5", "@babel/code-frame@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" - integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== - dependencies: - "@babel/highlight" "^7.23.4" - chalk "^2.4.2" - -"@babel/code-frame@^7.25.9": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.5", "@babel/code-frame@^7.25.9": version "7.26.2" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== @@ -973,17 +933,7 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.1" -"@babel/generator@^7.22.5", "@babel/generator@^7.23.6", "@babel/generator@^7.7.2": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e" - integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== - dependencies: - "@babel/types" "^7.23.6" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/generator@^7.25.9": +"@babel/generator@^7.22.5", "@babel/generator@^7.25.9", "@babel/generator@^7.7.2": version "7.26.2" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.2.tgz#87b75813bec87916210e5e01939a4c823d6bb74f" integrity sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw== @@ -1067,12 +1017,12 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-environment-visitor@^7.18.9", "@babel/helper-environment-visitor@^7.22.20", "@babel/helper-environment-visitor@^7.22.5": +"@babel/helper-environment-visitor@^7.18.9", "@babel/helper-environment-visitor@^7.22.5": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== -"@babel/helper-function-name@^7.22.5", "@babel/helper-function-name@^7.23.0": +"@babel/helper-function-name@^7.22.5": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== @@ -1163,29 +1113,19 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-split-export-declaration@^7.22.5", "@babel/helper-split-export-declaration@^7.22.6": +"@babel/helper-split-export-declaration@^7.22.5": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== dependencies: "@babel/types" "^7.22.5" -"@babel/helper-string-parser@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" - integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== - "@babel/helper-string-parser@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== -"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.22.5": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" - integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== - -"@babel/helper-validator-identifier@^7.25.9": +"@babel/helper-validator-identifier@^7.22.5", "@babel/helper-validator-identifier@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== @@ -1214,21 +1154,7 @@ "@babel/traverse" "^7.22.5" "@babel/types" "^7.22.5" -"@babel/highlight@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" - integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== - dependencies: - "@babel/helper-validator-identifier" "^7.22.20" - chalk "^2.4.2" - js-tokens "^4.0.0" - -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.22.5", "@babel/parser@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b" - integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== - -"@babel/parser@^7.23.0", "@babel/parser@^7.25.3", "@babel/parser@^7.25.9", "@babel/parser@^7.26.2": +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.5", "@babel/parser@^7.23.0", "@babel/parser@^7.25.3", "@babel/parser@^7.25.9", "@babel/parser@^7.26.2": version "7.26.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.2.tgz#fd7b6f487cfea09889557ef5d4eeb9ff9a5abd11" integrity sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ== @@ -2122,16 +2048,7 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.22.15", "@babel/template@^7.22.5", "@babel/template@^7.3.3": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" - integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== - dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/parser" "^7.22.15" - "@babel/types" "^7.22.15" - -"@babel/template@^7.25.9": +"@babel/template@^7.22.15", "@babel/template@^7.22.5", "@babel/template@^7.25.9", "@babel/template@^7.3.3": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016" integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg== @@ -2140,23 +2057,7 @@ "@babel/parser" "^7.25.9" "@babel/types" "^7.25.9" -"@babel/traverse@^7.22.5": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.6.tgz#b53526a2367a0dd6edc423637f3d2d0f2521abc5" - integrity sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ== - dependencies: - "@babel/code-frame" "^7.23.5" - "@babel/generator" "^7.23.6" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.23.6" - "@babel/types" "^7.23.6" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/traverse@^7.23.2": +"@babel/traverse@^7.22.5", "@babel/traverse@^7.23.2": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.9.tgz#a50f8fe49e7f69f53de5bea7e413cd35c5e13c84" integrity sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw== @@ -2169,16 +2070,7 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.6.tgz#be33fdb151e1f5a56877d704492c240fc71c7ccd" - integrity sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg== - dependencies: - "@babel/helper-string-parser" "^7.23.4" - "@babel/helper-validator-identifier" "^7.22.20" - to-fast-properties "^2.0.0" - -"@babel/types@^7.25.9", "@babel/types@^7.26.0": +"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.0.tgz#deabd08d6b753bc8e0f198f8709fb575e31774ff" integrity sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA== @@ -3370,7 +3262,7 @@ "@jimp/types" "1.1.4" tinycolor2 "^1.6.0" -"@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": +"@jridgewell/gen-mapping@^0.3.5": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== @@ -3410,7 +3302,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -5729,7 +5621,7 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node-fetch@^2.5.0": +"@types/node-fetch@^2.5.0", "@types/node-fetch@^2.6.4": version "2.6.12" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.12.tgz#8ab5c3ef8330f13100a7479e2cd56d3386830a03" integrity sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA== @@ -5737,40 +5629,18 @@ "@types/node" "*" form-data "^4.0.0" -"@types/node-fetch@^2.6.4": - version "2.6.11" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" - integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== - dependencies: - "@types/node" "*" - form-data "^4.0.0" - -"@types/node@*", "@types/node@>=10.0.0", "@types/node@>=13.13.4", "@types/node@>=13.7.0": - version "22.5.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.1.tgz#de01dce265f6b99ed32b295962045d10b5b99560" - integrity sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw== - dependencies: - undici-types "~6.19.2" - -"@types/node@16.9.1": - version "16.9.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708" - integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== - -"@types/node@20.10.0": - version "20.10.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.0.tgz#16ddf9c0a72b832ec4fcce35b8249cf149214617" - integrity sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ== - dependencies: - undici-types "~5.26.4" - -"@types/node@>=18", "@types/node@^22.9.0": +"@types/node@*", "@types/node@>=10.0.0", "@types/node@>=13.13.4", "@types/node@>=13.7.0", "@types/node@>=18": version "22.9.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.1.tgz#bdf91c36e0e7ecfb7257b2d75bf1b206b308ca71" integrity sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg== dependencies: undici-types "~6.19.8" +"@types/node@16.9.1": + version "16.9.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708" + integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== + "@types/node@>=8.0.0 <15": version "14.18.37" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.37.tgz#0bfcd173e8e1e328337473a8317e37b3b14fd30d" @@ -5788,12 +5658,12 @@ dependencies: undici-types "~5.26.4" -"@types/node@^20.4.5": - version "20.14.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.5.tgz#fe35e3022ebe58b8f201580eb24e1fcfc0f2487d" - integrity sha512-aoRR+fJkZT2l0aGOJhuA8frnCSoNX6W7U2mpNq63+BxBIj5BQFt8rHy627kijCmm63ijdSdwvGgpUsU6MBsZZA== +"@types/node@^20.17.9", "@types/node@^20.4.5": + version "20.17.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.9.tgz#5f141d4b7ee125cdee5faefe28de095398865bab" + integrity sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw== dependencies: - undici-types "~5.26.4" + undici-types "~6.19.2" "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -7450,12 +7320,7 @@ big-integer@^1.6.43: resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg== -bignumber.js@^9.0.0: - version "9.1.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" - integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== - -bignumber.js@^9.1.2: +bignumber.js@^9.0.0, bignumber.js@^9.1.2: version "9.1.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== @@ -7673,12 +7538,7 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" -bson@^6.7.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/bson/-/bson-6.8.0.tgz#5063c41ba2437c2b8ff851b50d9e36cb7aaa7525" - integrity sha512-iOJg8pr7wq2tg/zSlCCHMi3hMm5JTOxLTagf3zxhcenHsFp+c6uOs6K7W5UE7A4QIJGtqh/ZovFNMP4mOPJynQ== - -bson@^6.9.0: +bson@^6.7.0, bson@^6.9.0: version "6.10.0" resolved "https://registry.yarnpkg.com/bson/-/bson-6.10.0.tgz#559c767cc8b605c3ab14e5896214c8f2abdd6a12" integrity sha512-ROchNosXMJD2cbQGm84KoP7vOGPO6/bOAW0veMMbzhXLqoZptcaYRVLitwvuhwhjjpU1qP4YZRWLhgETdgqUQw== @@ -8797,7 +8657,7 @@ cron-validate@1.4.5: dependencies: yup "0.32.9" -cross-spawn@7.0.6: +cross-spawn@7.0.6, cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -8806,15 +8666,6 @@ cross-spawn@7.0.6: shebang-command "^2.0.0" which "^2.0.1" -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -9083,12 +8934,12 @@ dd-trace@5.26.0: shell-quote "^1.8.1" tlhunter-sorted-set "^0.1.0" -debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== +debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: - ms "2.1.2" + ms "^2.1.3" debug@4.3.4: version "4.3.4" @@ -9104,13 +8955,6 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.3.5: - version "4.3.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== - dependencies: - ms "^2.1.3" - debuglog@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -9308,7 +9152,7 @@ define-lazy-prop@^2.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== -define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: +define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -9829,17 +9673,7 @@ duplexer@^0.1.1: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== -duplexify@^4.0.0, duplexify@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" - integrity sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw== - dependencies: - end-of-stream "^1.4.1" - inherits "^2.0.3" - readable-stream "^3.1.1" - stream-shift "^1.0.0" - -duplexify@^4.1.3: +duplexify@^4.0.0, duplexify@^4.1.2, duplexify@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.3.tgz#a07e1c0d0a2c001158563d32592ba58bddb0236f" integrity sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA== @@ -10067,59 +9901,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0: - version "1.23.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" - integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== - dependencies: - array-buffer-byte-length "^1.0.1" - arraybuffer.prototype.slice "^1.0.3" - available-typed-arrays "^1.0.7" - call-bind "^1.0.7" - data-view-buffer "^1.0.1" - data-view-byte-length "^1.0.1" - data-view-byte-offset "^1.0.0" - es-define-property "^1.0.0" - es-errors "^1.3.0" - es-object-atoms "^1.0.0" - es-set-tostringtag "^2.0.3" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.6" - get-intrinsic "^1.2.4" - get-symbol-description "^1.0.2" - globalthis "^1.0.3" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - has-proto "^1.0.3" - has-symbols "^1.0.3" - hasown "^2.0.2" - internal-slot "^1.0.7" - is-array-buffer "^3.0.4" - is-callable "^1.2.7" - is-data-view "^1.0.1" - is-negative-zero "^2.0.3" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.3" - is-string "^1.0.7" - is-typed-array "^1.1.13" - is-weakref "^1.0.2" - object-inspect "^1.13.1" - object-keys "^1.1.1" - object.assign "^4.1.5" - regexp.prototype.flags "^1.5.2" - safe-array-concat "^1.1.2" - safe-regex-test "^1.0.3" - string.prototype.trim "^1.2.9" - string.prototype.trimend "^1.0.8" - string.prototype.trimstart "^1.0.8" - typed-array-buffer "^1.0.2" - typed-array-byte-length "^1.0.1" - typed-array-byte-offset "^1.0.2" - typed-array-length "^1.0.6" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.15" - -es-abstract@^1.23.3: +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.3: version "1.23.5" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.5.tgz#f4599a4946d57ed467515ed10e4f157289cd52fb" integrity sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ== @@ -11271,18 +11053,7 @@ gaxios@^5.0.0, gaxios@^5.0.1: is-stream "^2.0.0" node-fetch "^2.6.9" -gaxios@^6.0.0, gaxios@^6.1.1: - version "6.7.0" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-6.7.0.tgz#37b7c5961cb67d8d4b0ae8110dcd83cc6791eb6d" - integrity sha512-DSrkyMTfAnAm4ks9Go20QGOcXEyW/NmZhvTYBU2rb4afBB393WIMQPWPEDMl/k8xqiNN9HYq2zao3oWXsdl2Tg== - dependencies: - extend "^3.0.2" - https-proxy-agent "^7.0.1" - is-stream "^2.0.0" - node-fetch "^2.6.9" - uuid "^10.0.0" - -gaxios@^6.0.2: +gaxios@^6.0.0, gaxios@^6.0.2, gaxios@^6.1.1: version "6.7.1" resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-6.7.1.tgz#ebd9f7093ede3ba502685e73390248bb5b7f71fb" integrity sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ== @@ -11686,14 +11457,7 @@ globals@^13.19.0: dependencies: type-fest "^0.20.2" -globalthis@^1.0.1, globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - -globalthis@^1.0.4: +globalthis@^1.0.1, globalthis@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== @@ -11745,19 +11509,7 @@ google-auth-library@^8.0.1: jws "^4.0.0" lru-cache "^6.0.0" -google-auth-library@^9.3.0: - version "9.11.0" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-9.11.0.tgz#bd6da364bcde4e0cc4ed70a0e0df5112b6a671dd" - integrity sha512-epX3ww/mNnhl6tL45EQ/oixsY8JLEgUFoT4A5E/5iAR4esld9Kqv6IJGk7EmGuOgDvaarwF95hU2+v7Irql9lw== - dependencies: - base64-js "^1.3.0" - ecdsa-sig-formatter "^1.0.11" - gaxios "^6.1.1" - gcp-metadata "^6.1.0" - gtoken "^7.0.0" - jws "^4.0.0" - -google-auth-library@^9.6.3: +google-auth-library@^9.3.0, google-auth-library@^9.6.3: version "9.15.0" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-9.15.0.tgz#1b009c08557929c881d72f953f17e839e91b009b" integrity sha512-7ccSEJFDFO7exFbO6NRyC+xH8/mZ1GZGG2xxx9iHxZWcjUjJpjWxIMw3cofAKcueZ6DATiukmmprD7yavQHOyQ== @@ -12644,20 +12396,13 @@ is-class-hotfix@~0.0.6: resolved "https://registry.yarnpkg.com/is-class-hotfix/-/is-class-hotfix-0.0.6.tgz#a527d31fb23279281dde5f385c77b5de70a72435" integrity sha512-0n+pzCC6ICtVr/WXnN2f03TK/3BfXY7me4cjCAqT8TYXEl0+JBRoqBo94JJHXcyDSLUeWbNX8Fvy5g5RJdAstQ== -is-core-module@^2.12.0: +is-core-module@^2.12.0, is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.5.0, is-core-module@^2.8.1: version "2.15.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== dependencies: hasown "^2.0.2" -is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.5.0, is-core-module@^2.8.1: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== - dependencies: - hasown "^2.0.0" - is-data-view@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" @@ -13743,11 +13488,6 @@ jsdom@^21.1.1: ws "^8.13.0" xml-name-validator "^4.0.0" -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - jsesc@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" @@ -14915,20 +14655,13 @@ magic-string@^0.26.7: dependencies: sourcemap-codec "^1.4.8" -magic-string@^0.30.11: +magic-string@^0.30.11, magic-string@^0.30.3, magic-string@^0.30.4: version "0.30.13" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.13.tgz#92438e3ff4946cf54f18247c981e5c161c46683c" integrity sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g== dependencies: "@jridgewell/sourcemap-codec" "^1.5.0" -magic-string@^0.30.3, magic-string@^0.30.4: - version "0.30.11" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.11.tgz#301a6f93b3e8c2cb13ac1a7a673492c0dfd12954" - integrity sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A== - dependencies: - "@jridgewell/sourcemap-codec" "^1.5.0" - make-dir@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" @@ -15620,7 +15353,7 @@ neo-async@^2.6.2: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -nock@13.5.4, nock@^13.5.4: +nock@13.5.4: version "13.5.4" resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.4.tgz#8918f0addc70a63736170fef7106a9721e0dc479" integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw== @@ -15629,7 +15362,7 @@ nock@13.5.4, nock@^13.5.4: json-stringify-safe "^5.0.1" propagate "^2.0.0" -nock@^13.5.6: +nock@^13.5.4, nock@^13.5.6: version "13.5.6" resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.6.tgz#5e693ec2300bbf603b61dae6df0225673e6c4997" integrity sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ== @@ -16092,12 +15825,7 @@ object-hash@^3.0.0: resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== -object-inspect@^1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== - -object-inspect@^1.13.3: +object-inspect@^1.13.1, object-inspect@^1.13.3: version "1.13.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a" integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA== @@ -16914,12 +16642,7 @@ pgpass@1.x: dependencies: split2 "^4.1.0" -picocolors@^1.0.0, picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== - -picocolors@^1.1.1: +picocolors@^1.0.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== @@ -17165,16 +16888,7 @@ postcss-values-parser@^6.0.2: is-url-superb "^4.0.0" quote-unquote "^1.0.0" -postcss@^8.1.7, postcss@^8.3.11, postcss@^8.4.12, postcss@^8.4.27, postcss@^8.4.29, postcss@^8.4.5: - version "8.4.41" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681" - integrity sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ== - dependencies: - nanoid "^3.3.7" - picocolors "^1.0.1" - source-map-js "^1.2.0" - -postcss@^8.4.48: +postcss@^8.1.7, postcss@^8.3.11, postcss@^8.4.12, postcss@^8.4.27, postcss@^8.4.29, postcss@^8.4.48, postcss@^8.4.5: version "8.4.49" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.49.tgz#4ea479048ab059ab3ae61d082190fabfd994fe19" integrity sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA== @@ -18015,10 +17729,10 @@ readable-stream@1.1.14, readable-stream@^1.0.26-4, readable-stream@^1.0.27-1: isarray "0.0.1" string_decoder "~0.10.x" -"readable-stream@2 || 3", readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.1.tgz#f9f9b5f536920253b3d26e7660e7da4ccff9bb62" - integrity sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ== +"readable-stream@2 || 3", readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -18037,15 +17751,6 @@ readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.2.2, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readable-stream@^4.0.0, readable-stream@^4.2.0: version "4.5.1" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.1.tgz#3f2e4e66eab45606ac8f31597b9edb80c13b12ab" @@ -18205,17 +17910,7 @@ regenerator-transform@^0.15.1: dependencies: "@babel/runtime" "^7.8.4" -regexp.prototype.flags@^1.5.1, regexp.prototype.flags@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" - integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== - dependencies: - call-bind "^1.0.6" - define-properties "^1.2.1" - es-errors "^1.3.0" - set-function-name "^2.0.1" - -regexp.prototype.flags@^1.5.3: +regexp.prototype.flags@^1.5.1, regexp.prototype.flags@^1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz#b3ae40b1d2499b8350ab2c3fe6ef3845d3a96f42" integrity sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ== @@ -18830,7 +18525,7 @@ set-function-length@^1.2.1: gopd "^1.0.1" has-property-descriptors "^1.0.2" -set-function-name@^2.0.1, set-function-name@^2.0.2: +set-function-name@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== @@ -19122,12 +18817,7 @@ sort-keys@^2.0.0: dependencies: is-plain-obj "^1.0.0" -source-map-js@^1.0.1, source-map-js@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" - integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== - -source-map-js@^1.2.1: +source-map-js@^1.0.1, source-map-js@^1.2.0, source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== @@ -19254,12 +18944,7 @@ split@^1.0.1: dependencies: through "2" -sprintf-js@^1.1.1, sprintf-js@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" - integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== - -sprintf-js@^1.1.3: +sprintf-js@^1.1.1, sprintf-js@^1.1.2, sprintf-js@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== @@ -19383,11 +19068,6 @@ stream-events@^1.0.5: dependencies: stubs "^3.0.0" -stream-shift@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" - integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== - stream-shift@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" @@ -19796,7 +19476,7 @@ svelte-spa-router@^4.0.1: dependencies: regexparam "2.0.2" -svelte@4.2.19: +svelte@4.2.19, svelte@^4.2.10: version "4.2.19" resolved "https://registry.yarnpkg.com/svelte/-/svelte-4.2.19.tgz#4e6e84a8818e2cd04ae0255fcf395bc211e61d4c" integrity sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw== @@ -19816,26 +19496,6 @@ svelte@4.2.19: magic-string "^0.30.4" periscopic "^3.1.0" -svelte@^4.2.10: - version "4.2.12" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-4.2.12.tgz#13d98d2274d24d3ad216c8fdc801511171c70bb1" - integrity sha512-d8+wsh5TfPwqVzbm4/HCXC783/KPHV60NvwitJnyTA5lWn1elhXMNWhXGCJ7PwPa8qFUnyJNIyuIRt2mT0WMug== - dependencies: - "@ampproject/remapping" "^2.2.1" - "@jridgewell/sourcemap-codec" "^1.4.15" - "@jridgewell/trace-mapping" "^0.3.18" - "@types/estree" "^1.0.1" - acorn "^8.9.0" - aria-query "^5.3.0" - axobject-query "^4.0.0" - code-red "^1.0.3" - css-tree "^2.3.1" - estree-walker "^3.0.3" - is-reference "^3.0.1" - locate-character "^3.0.0" - magic-string "^0.30.4" - periscopic "^3.1.0" - svg.draggable.js@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz#c514a2f1405efb6f0263e7958f5b68fce50603ba" @@ -20229,11 +19889,6 @@ to-buffer@^1.1.1: resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - to-gfm-code-block@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" @@ -20415,12 +20070,7 @@ tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.4.1, tslib@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" - integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== - -tslib@^2.5.0: +tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.4.1, tslib@^2.5.0, tslib@^2.6.2: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -20612,16 +20262,11 @@ typescript-eslint@^7.3.1: "@typescript-eslint/parser" "7.18.0" "@typescript-eslint/utils" "7.18.0" -typescript@5.7.2: +typescript@5.7.2, "typescript@>=3 < 6": version "5.7.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== -"typescript@>=3 < 6": - version "5.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" - integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== - typescript@^3.9.10, typescript@^3.9.5, typescript@^3.9.7: version "3.9.10" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" @@ -20926,11 +20571,6 @@ uuid@8.3.2, uuid@^8.0.0, uuid@^8.3.0, uuid@^8.3.1, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294" - integrity sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ== - uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" From 53c28b5436376a809d265d0cef5ea2ab87939fed Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 9 Dec 2024 12:48:52 +0100 Subject: [PATCH 41/68] Update worker and server es target --- packages/server/tsconfig.build.json | 1 + packages/worker/tsconfig.build.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/server/tsconfig.build.json b/packages/server/tsconfig.build.json index f4a11a9de9..d8ba3806b9 100644 --- a/packages/server/tsconfig.build.json +++ b/packages/server/tsconfig.build.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.build.json", "compilerOptions": { + "target": "es2020", "allowArbitraryExtensions": true, "isolatedModules": false }, diff --git a/packages/worker/tsconfig.build.json b/packages/worker/tsconfig.build.json index e8e3cb0847..0a65525cfd 100644 --- a/packages/worker/tsconfig.build.json +++ b/packages/worker/tsconfig.build.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.build.json", + "compilerOptions": { + "target": "es2020" + }, "include": ["src/**/*"], "exclude": [ "node_modules", From e296cf140fb0cabb5b568ed546cde4dd5ddfc911 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 9 Dec 2024 12:55:49 +0100 Subject: [PATCH 42/68] Fix check types --- packages/backend-core/src/environment.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend-core/src/environment.ts b/packages/backend-core/src/environment.ts index 56d9cd6e10..954fdd4135 100644 --- a/packages/backend-core/src/environment.ts +++ b/packages/backend-core/src/environment.ts @@ -134,10 +134,10 @@ const environment = { BUDIBASE_ENVIRONMENT: process.env.BUDIBASE_ENVIRONMENT, JS_BCRYPT: process.env.JS_BCRYPT, JWT_SECRET: process.env.JWT_SECRET - ? createSecretKey(Buffer.from(process.env.JWT_SECRET)) + ? createSecretKey(process.env.JWT_SECRET, "utf8") : undefined, JWT_SECRET_FALLBACK: process.env.JWT_SECRET_FALLBACK - ? createSecretKey(Buffer.from(process.env.JWT_SECRET_FALLBACK)) + ? createSecretKey(process.env.JWT_SECRET_FALLBACK, "utf8") : undefined, ENCRYPTION_KEY: process.env.ENCRYPTION_KEY, API_ENCRYPTION_KEY: getAPIEncryptionKey(), From b6fcdf301dbb352cd00dba25434ee894af7231fc Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 9 Dec 2024 11:59:04 +0000 Subject: [PATCH 43/68] PR comments --- .../src/events/publishers/table.ts | 2 +- .../src/api/controllers/view/viewsV2.ts | 33 ++++++++----------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/packages/backend-core/src/events/publishers/table.ts b/packages/backend-core/src/events/publishers/table.ts index de765e2cdd..77a2c3e1a4 100644 --- a/packages/backend-core/src/events/publishers/table.ts +++ b/packages/backend-core/src/events/publishers/table.ts @@ -29,7 +29,7 @@ async function updated(oldTable: Table, newTable: Table) { for (const key in newTable.schema) { if (!oldTable.schema[key]) { const newColumn = newTable.schema[key] - if ("default" in newColumn) { + if ("default" in newColumn && newColumn.default != null) { defaultValues = true } if (newColumn.type === FieldType.AI) { diff --git a/packages/server/src/api/controllers/view/viewsV2.ts b/packages/server/src/api/controllers/view/viewsV2.ts index 2751a81234..66a6194096 100644 --- a/packages/server/src/api/controllers/view/viewsV2.ts +++ b/packages/server/src/api/controllers/view/viewsV2.ts @@ -187,29 +187,22 @@ async function handleViewEvents(existingView: ViewV2, view: ViewV2) { // if new columns in the view for (const key in view.schema) { - if (!existingView?.schema?.[key]) { - // view calculations - // @ts-expect-error non calculation types just won't have the calculationType field - const calculationType = view.schema[key].calculationType - if (calculationType) { - await events.view.calculationCreated({ - calculationType, - tableId: view.tableId, - }) - } + if ("calculationType" in view.schema[key] && !existingView?.schema?.[key]) { + await events.view.calculationCreated({ + calculationType: view.schema[key].calculationType, + tableId: view.tableId, + }) } // view joins - if (view.schema[key].columns) { - for (const column in view.schema[key]?.columns) { - // if the new column is visible and it wasn't before - if ( - !existingView?.schema?.[key].columns?.[column].visible && - view.schema?.[key].columns?.[column].visible - ) { - // new view join exposing a column - await events.view.viewJoinCreated({ tableId: view.tableId }) - } + for (const column in view.schema[key]?.columns ?? []) { + // if the new column is visible and it wasn't before + if ( + !existingView?.schema?.[key].columns?.[column].visible && + view.schema?.[key].columns?.[column].visible + ) { + // new view join exposing a column + await events.view.viewJoinCreated({ tableId: view.tableId }) } } } From 84d9f6816cf766cb5bbfc21789b25b2bd50bbaaf Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 9 Dec 2024 12:52:21 +0000 Subject: [PATCH 44/68] Enable a variety of useful looking lints. --- eslint.config.mjs | 128 ++++++++++-------- .../backend-core/src/db/couch/DatabaseImpl.ts | 2 +- packages/backend-core/src/db/couch/utils.ts | 4 +- packages/backend-core/src/db/lucene.ts | 2 +- .../src/events/processors/Processors.ts | 2 +- .../src/middleware/authenticated.ts | 4 +- .../src/middleware/passport/sso/sso.ts | 2 +- .../src/objectStore/objectStore.ts | 2 +- .../backend-core/src/redis/redlockImpl.ts | 2 +- .../tests/core/utilities/structures/quotas.ts | 2 +- packages/bbui/src/Form/Core/Signature.svelte | 2 +- .../backend/RoleEditor/BracketEdge.svelte | 6 +- .../app/embedded-map/EmbeddedMapControls.js | 8 +- packages/client/src/stores/theme.js | 1 + packages/server/src/api/controllers/dev.ts | 2 +- .../api/controllers/row/ExternalRequest.ts | 2 +- .../src/api/controllers/row/utils/basic.ts | 2 +- .../src/api/controllers/view/exporters.ts | 2 +- .../src/api/routes/tests/search.spec.ts | 2 +- .../tests/utilities/AutomationTestBuilder.ts | 2 +- .../src/integrations/microsoftSqlServer.ts | 2 +- packages/server/src/integrations/oracle.ts | 2 +- packages/server/src/integrations/postgres.ts | 4 +- packages/server/src/integrations/rest.ts | 2 +- .../src/integrations/tests/sqlAlias.spec.ts | 2 +- packages/server/src/middleware/builder.ts | 4 +- .../server/src/sdk/app/permissions/index.ts | 2 - .../src/sdk/app/rows/search/internal/sqs.ts | 2 +- .../server/src/tests/utilities/structures.ts | 6 +- packages/server/src/utilities/retry.ts | 2 +- packages/server/src/websockets/websocket.ts | 2 +- packages/shared-core/src/helpers/cron.ts | 2 +- .../string-templates/test/hbsToJs.spec.ts | 1 + packages/string-templates/test/utils.ts | 2 +- packages/types/src/sdk/db.ts | 2 +- packages/worker/src/sdk/accounts/metadata.ts | 5 +- packages/worker/src/tests/api/accounts.ts | 5 - packages/worker/src/tests/api/auditLogs.ts | 5 - packages/worker/src/tests/api/auth.ts | 5 - packages/worker/src/tests/api/configs.ts | 5 - packages/worker/src/tests/api/email.ts | 5 - packages/worker/src/tests/api/environment.ts | 5 - packages/worker/src/tests/api/groups.ts | 5 - packages/worker/src/tests/api/license.ts | 5 - packages/worker/src/tests/api/migrations.ts | 5 - packages/worker/src/tests/api/restore.ts | 5 - packages/worker/src/tests/api/roles.ts | 5 - packages/worker/src/tests/api/scim/groups.ts | 5 - packages/worker/src/tests/api/scim/shared.ts | 5 - packages/worker/src/tests/api/scim/users.ts | 5 - packages/worker/src/tests/api/self.ts | 5 - packages/worker/src/tests/api/status.ts | 5 - packages/worker/src/tests/api/templates.ts | 5 - packages/worker/src/tests/api/users.ts | 11 +- scripts/build.js | 2 +- 55 files changed, 120 insertions(+), 199 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 2d2385cbdb..c497974612 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -51,8 +51,23 @@ export default [ }, rules: { - "no-self-assign": "off", - "prefer-const": "off", + "no-self-compare": "error", + "no-template-curly-in-string": "error", + "no-unmodified-loop-condition": "error", + "no-unreachable-loop": "error", + "no-implied-eval": "error", + "no-extend-native": "error", + "no-labels": "error", + "no-lone-blocks": "error", + "no-new-wrappers": "error", + "no-octal-escape": "error", + "no-return-assign": "error", + "no-useless-concat": "error", + "no-useless-constructor": "error", + "no-useless-rename": "error", + "no-var": "error", + "no-void": "error", + "no-unused-vars": [ "error", { @@ -65,64 +80,69 @@ export default [ ], }, }, - ...eslintPluginSvelte.configs["flat/recommended"].map(config => { - return { - ...config, - files: ["**/*.svelte"], + ...eslintPluginSvelte.configs["flat/recommended"].map(config => ({ + ...config, + files: ["**/*.svelte"], - languageOptions: { - parser: svelteParser, - ecmaVersion: 2019, - sourceType: "script", + languageOptions: { + parser: svelteParser, + ecmaVersion: 2019, + sourceType: "script", - parserOptions: { - parser: "@typescript-eslint/parser", - allowImportExportEverywhere: true, + parserOptions: { + parser: "@typescript-eslint/parser", + allowImportExportEverywhere: true, + }, + }, + })), + ...tseslint.configs.strict.map(config => ({ + ...config, + files: ["**/*.ts"], + + languageOptions: { + globals: { + NodeJS: true, + }, + + parser: tsParser, + }, + + rules: { + "local-rules/no-barrel-imports": "error", + "local-rules/no-budibase-imports": "error", + "local-rules/no-console-error": "error", + + "@typescript-eslint/no-inferrable-types": "error", + "@typescript-eslint/adjacent-overload-signatures": "error", + "@typescript-eslint/class-literal-property-style": "error", + "@typescript-eslint/no-confusing-non-null-assertion": "error", + "@typescript-eslint/no-unnecessary-parameter-property-assignment": + "error", + "@typescript-eslint/no-useless-empty-export": "error", + + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "error", + { + varsIgnorePattern: "^_", + argsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + ignoreRestSiblings: true, + caughtErrors: "none", }, - }, - } - }), - ...tseslint.configs.recommended.map(config => { - return { - ...config, - files: ["**/*.ts"], + ], - languageOptions: { - globals: { - NodeJS: true, - }, + "no-redeclare": "off", + "@typescript-eslint/no-redeclare": "error", - parser: tsParser, - }, + // @typescript-eslint/no-dupe-class-members supersedes no-dupe-class-members + "no-dupe-class-members": "off", + "@typescript-eslint/no-dupe-class-members": "error", - rules: { - "local-rules/no-barrel-imports": "error", - "local-rules/no-budibase-imports": "error", - "local-rules/no-console-error": "error", - - // @typscript-eslint/no-unused-vars supersedes no-unused-vars - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { - varsIgnorePattern: "^_", - argsIgnorePattern: "^_", - destructuredArrayIgnorePattern: "^_", - ignoreRestSiblings: true, - caughtErrors: "none", - }, - ], - - // @typescript-eslint/no-redeclare supersedes no-redeclare - "no-redeclare": "off", - "@typescript-eslint/no-redeclare": "error", - - // @typescript-eslint/no-dupe-class-members supersedes no-dupe-class-members - "no-dupe-class-members": "off", - "@typescript-eslint/no-dupe-class-members": "error", - }, - } - }), + "no-useless-constructor": "off", + "@typescript-eslint/no-useless-constructor": "error", + }, + })), { files: ["**/*.spec.ts", "**/*.spec.js"], diff --git a/packages/backend-core/src/db/couch/DatabaseImpl.ts b/packages/backend-core/src/db/couch/DatabaseImpl.ts index 371f3dc997..98e24e0996 100644 --- a/packages/backend-core/src/db/couch/DatabaseImpl.ts +++ b/packages/backend-core/src/db/couch/DatabaseImpl.ts @@ -289,7 +289,7 @@ export class DatabaseImpl implements Database { return } let errorFound = false - let errorMessage: string = "Unable to bulk remove documents: " + let errorMessage = "Unable to bulk remove documents: " for (let res of response) { if (res.error) { errorFound = true diff --git a/packages/backend-core/src/db/couch/utils.ts b/packages/backend-core/src/db/couch/utils.ts index 270d953320..2200024bb2 100644 --- a/packages/backend-core/src/db/couch/utils.ts +++ b/packages/backend-core/src/db/couch/utils.ts @@ -4,7 +4,7 @@ import { checkSlashesInUrl } from "../../helpers" export async function directCouchCall( path: string, - method: string = "GET", + method = "GET", body?: any ) { let { url, cookie } = getCouchInfo() @@ -43,7 +43,7 @@ export async function directCouchUrlCall({ export async function directCouchQuery( path: string, - method: string = "GET", + method = "GET", body?: any ) { const response = await directCouchCall(path, method, body) diff --git a/packages/backend-core/src/db/lucene.ts b/packages/backend-core/src/db/lucene.ts index 0206bb2140..9d897553dd 100644 --- a/packages/backend-core/src/db/lucene.ts +++ b/packages/backend-core/src/db/lucene.ts @@ -279,7 +279,7 @@ export class QueryBuilder { let query = allOr ? "" : "*:*" let allFiltersEmpty = true const allPreProcessingOpts = { escape: true, lowercase: true, wrap: true } - let tableId: string = "" + let tableId = "" if (this.#query.equal!.tableId) { tableId = this.#query.equal!.tableId delete this.#query.equal!.tableId diff --git a/packages/backend-core/src/events/processors/Processors.ts b/packages/backend-core/src/events/processors/Processors.ts index 72de945d44..8fe8034280 100644 --- a/packages/backend-core/src/events/processors/Processors.ts +++ b/packages/backend-core/src/events/processors/Processors.ts @@ -2,7 +2,7 @@ import { Event, Identity, Group } from "@budibase/types" import { EventProcessor } from "./types" export default class Processor implements EventProcessor { - initialised: boolean = false + initialised = false processors: EventProcessor[] = [] constructor(processors: EventProcessor[]) { diff --git a/packages/backend-core/src/middleware/authenticated.ts b/packages/backend-core/src/middleware/authenticated.ts index 6713cc7687..54d808de86 100644 --- a/packages/backend-core/src/middleware/authenticated.ts +++ b/packages/backend-core/src/middleware/authenticated.ts @@ -137,9 +137,9 @@ export default function ( } const tenantId = getHeader(ctx, Header.TENANT_ID) - let authenticated: boolean = false, + let authenticated = false, user: User | { tenantId: string } | undefined = undefined, - internal: boolean = false, + internal = false, loginMethod: LoginMethod | undefined = undefined if (authCookie && !apiKey) { const sessionId = authCookie.sessionId diff --git a/packages/backend-core/src/middleware/passport/sso/sso.ts b/packages/backend-core/src/middleware/passport/sso/sso.ts index 8901fcc56f..1bb43d4466 100644 --- a/packages/backend-core/src/middleware/passport/sso/sso.ts +++ b/packages/backend-core/src/middleware/passport/sso/sso.ts @@ -20,7 +20,7 @@ export const ssoSaveUserNoOp: SaveSSOUserFunction = (user: SSOUser) => */ export async function authenticate( details: SSOAuthDetails, - requireLocalAccount: boolean = true, + requireLocalAccount = true, done: any, saveUserFn: SaveSSOUserFunction ) { diff --git a/packages/backend-core/src/objectStore/objectStore.ts b/packages/backend-core/src/objectStore/objectStore.ts index 68b1b10ec2..79875b5e99 100644 --- a/packages/backend-core/src/objectStore/objectStore.ts +++ b/packages/backend-core/src/objectStore/objectStore.ts @@ -334,7 +334,7 @@ export async function listAllObjects(bucketName: string, path: string) { export function getPresignedUrl( bucketName: string, key: string, - durationSeconds: number = 3600 + durationSeconds = 3600 ) { const objectStore = ObjectStore(bucketName, { presigning: true }) const params = { diff --git a/packages/backend-core/src/redis/redlockImpl.ts b/packages/backend-core/src/redis/redlockImpl.ts index adeb5b12ec..a48fac0c3d 100644 --- a/packages/backend-core/src/redis/redlockImpl.ts +++ b/packages/backend-core/src/redis/redlockImpl.ts @@ -92,7 +92,7 @@ function getLockName(opts: LockOptions) { // determine lock name // by default use the tenantId for uniqueness, unless using a system lock const prefix = opts.systemLock ? "system" : context.getTenantId() - let name: string = `lock:${prefix}_${opts.name}` + let name = `lock:${prefix}_${opts.name}` // add additional unique name if required if (opts.resource) { name = name + `_${opts.resource}` diff --git a/packages/backend-core/tests/core/utilities/structures/quotas.ts b/packages/backend-core/tests/core/utilities/structures/quotas.ts index 83c3a8a766..4b3c357b13 100644 --- a/packages/backend-core/tests/core/utilities/structures/quotas.ts +++ b/packages/backend-core/tests/core/utilities/structures/quotas.ts @@ -1,6 +1,6 @@ import { MonthlyQuotaName, QuotaUsage } from "@budibase/types" -export const usage = (users: number = 0, creators: number = 0): QuotaUsage => { +export const usage = (users = 0, creators = 0): QuotaUsage => { return { _id: "usage_quota", quotaReset: new Date().toISOString(), diff --git a/packages/bbui/src/Form/Core/Signature.svelte b/packages/bbui/src/Form/Core/Signature.svelte index 729d3ac5e2..e02560568c 100644 --- a/packages/bbui/src/Form/Core/Signature.svelte +++ b/packages/bbui/src/Form/Core/Signature.svelte @@ -85,7 +85,7 @@ } const getPos = e => { - var rect = canvasRef.getBoundingClientRect() + let rect = canvasRef.getBoundingClientRect() const canvasX = e.offsetX || e.targetTouches?.[0].pageX - rect.left const canvasY = e.offsetY || e.targetTouches?.[0].pageY - rect.top diff --git a/packages/builder/src/components/backend/RoleEditor/BracketEdge.svelte b/packages/builder/src/components/backend/RoleEditor/BracketEdge.svelte index 182b56f122..058c47f00c 100644 --- a/packages/builder/src/components/backend/RoleEditor/BracketEdge.svelte +++ b/packages/builder/src/components/backend/RoleEditor/BracketEdge.svelte @@ -24,9 +24,9 @@ const j = 32 // Outer radius strength (higher is stronger) // Calculate unit vector - var dx = x1 - x2 - var dy = y1 - y2 - var len = Math.sqrt(dx * dx + dy * dy) + let dx = x1 - x2 + let dy = y1 - y2 + let len = Math.sqrt(dx * dx + dy * dy) dx = dx / len dy = dy / len diff --git a/packages/client/src/components/app/embedded-map/EmbeddedMapControls.js b/packages/client/src/components/app/embedded-map/EmbeddedMapControls.js index de14190b64..190bc810bf 100644 --- a/packages/client/src/components/app/embedded-map/EmbeddedMapControls.js +++ b/packages/client/src/components/app/embedded-map/EmbeddedMapControls.js @@ -30,7 +30,7 @@ const FullScreenControl = L.Control.extend({ fullScreenTitle: "Enter Fullscreen", }, onAdd: function () { - var fullScreenClassName = "leaflet-control-fullscreen", + let fullScreenClassName = "leaflet-control-fullscreen", container = L.DomUtil.create("div", fullScreenClassName + " leaflet-bar"), options = this.options @@ -45,7 +45,7 @@ const FullScreenControl = L.Control.extend({ return container }, _fullScreen: function () { - var map = this._map + let map = this._map if (screenfull.isEnabled) { screenfull.toggle(map.getContainer()) } @@ -80,7 +80,7 @@ const LocationControl = L.Control.extend({ locationTitle: "Show Your Location", }, onAdd: function () { - var locationClassName = "leaflet-control-location", + let locationClassName = "leaflet-control-location", container = L.DomUtil.create("div", locationClassName + " leaflet-bar"), options = this.options @@ -136,7 +136,7 @@ const LocationControl = L.Control.extend({ }) }, _getPosition: function () { - var options = { + let options = { enableHighAccuracy: false, timeout: 5000, maximumAge: 30000, diff --git a/packages/client/src/stores/theme.js b/packages/client/src/stores/theme.js index 523d34cdc5..5171449a91 100644 --- a/packages/client/src/stores/theme.js +++ b/packages/client/src/stores/theme.js @@ -1,3 +1,4 @@ +/* eslint-disable no-useless-concat */ import { derived } from "svelte/store" import { appStore } from "./app" import { builderStore } from "./builder" diff --git a/packages/server/src/api/controllers/dev.ts b/packages/server/src/api/controllers/dev.ts index ad0909a294..099f297cd4 100644 --- a/packages/server/src/api/controllers/dev.ts +++ b/packages/server/src/api/controllers/dev.ts @@ -22,7 +22,7 @@ import { async function redirect( ctx: any, method: "GET" | "POST" | "DELETE", - path: string = "global" + path = "global" ) { const { devPath } = ctx.params const queryString = ctx.originalUrl.split("?")[1] || "" diff --git a/packages/server/src/api/controllers/row/ExternalRequest.ts b/packages/server/src/api/controllers/row/ExternalRequest.ts index 5f01f323e6..e0171a062e 100644 --- a/packages/server/src/api/controllers/row/ExternalRequest.ts +++ b/packages/server/src/api/controllers/row/ExternalRequest.ts @@ -378,7 +378,7 @@ export class ExternalRequest { } // many to one else { - const thisKey: string = "id" + const thisKey = "id" // @ts-ignore const otherKey: string = field.fieldName for (const relationship of row[key]) { diff --git a/packages/server/src/api/controllers/row/utils/basic.ts b/packages/server/src/api/controllers/row/utils/basic.ts index a7aa82e1f2..214080382c 100644 --- a/packages/server/src/api/controllers/row/utils/basic.ts +++ b/packages/server/src/api/controllers/row/utils/basic.ts @@ -45,7 +45,7 @@ export function getInternalRowId(row: Row, table: Table): string { export function generateIdForRow( row: Row | undefined, table: Table, - isLinked: boolean = false + isLinked = false ): string { const primary = table.primary if (!row || !primary) { diff --git a/packages/server/src/api/controllers/view/exporters.ts b/packages/server/src/api/controllers/view/exporters.ts index 87e4bfc056..76e5f865a3 100644 --- a/packages/server/src/api/controllers/view/exporters.ts +++ b/packages/server/src/api/controllers/view/exporters.ts @@ -16,7 +16,7 @@ function escapeCsvString(str: string) { export function csv( headers: string[], rows: Row[], - delimiter: string = ",", + delimiter = ",", customHeaders: { [key: string]: string } = {} ) { let csvRows = [getHeaders(headers, customHeaders)] diff --git a/packages/server/src/api/routes/tests/search.spec.ts b/packages/server/src/api/routes/tests/search.spec.ts index 6aac1d2069..6276d38e25 100644 --- a/packages/server/src/api/routes/tests/search.spec.ts +++ b/packages/server/src/api/routes/tests/search.spec.ts @@ -2133,7 +2133,7 @@ if (descriptions.length) { // repeat the search many times to check the first row is always the same let bookmark: string | number | undefined, hasNextPage: boolean | undefined = true, - rowCount: number = 0 + rowCount= 0 do { const response = await config.api.row.search( tableOrViewId, diff --git a/packages/server/src/automations/tests/utilities/AutomationTestBuilder.ts b/packages/server/src/automations/tests/utilities/AutomationTestBuilder.ts index 7a0d489f80..a3ea174da1 100644 --- a/packages/server/src/automations/tests/utilities/AutomationTestBuilder.ts +++ b/packages/server/src/automations/tests/utilities/AutomationTestBuilder.ts @@ -263,7 +263,7 @@ class AutomationBuilder extends BaseStepBuilder { private automationConfig: Automation private config: TestConfiguration private triggerOutputs: any - private triggerSet: boolean = false + private triggerSet = false constructor( options: { name?: string; appId?: string; config?: TestConfiguration } = {} diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 7d886fc33a..f3590d1885 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -223,7 +223,7 @@ const COLUMN_DEFINITION_METADATA: Record = { class SqlServerIntegration extends Sql implements DatasourcePlus { private readonly config: MSSQLConfig - private index: number = 0 + private index= 0 private client?: sqlServer.ConnectionPool MASTER_TABLES = [ diff --git a/packages/server/src/integrations/oracle.ts b/packages/server/src/integrations/oracle.ts index d8708d9053..5fbb95aab3 100644 --- a/packages/server/src/integrations/oracle.ts +++ b/packages/server/src/integrations/oracle.ts @@ -116,7 +116,7 @@ const OracleContraintTypes = { class OracleIntegration extends Sql implements DatasourcePlus { private readonly config: OracleConfig - private index: number = 1 + private index = 1 private static readonly COLUMNS_SQL = ` SELECT diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index b41ac28ede..f4db9d6959 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -149,7 +149,7 @@ const SCHEMA: Integration = { class PostgresIntegration extends Sql implements DatasourcePlus { private readonly client: Client private readonly config: PostgresConfig - private index: number = 1 + private index= 1 private open: boolean PRIMARY_KEYS_SQL = () => ` @@ -252,7 +252,7 @@ class PostgresIntegration extends Sql implements DatasourcePlus { }) } - async internalQuery(query: SqlQuery, close: boolean = true) { + async internalQuery(query: SqlQuery, close = true) { if (!this.open) { await this.openConnection() } diff --git a/packages/server/src/integrations/rest.ts b/packages/server/src/integrations/rest.ts index 1b00a18f18..4f8b246233 100644 --- a/packages/server/src/integrations/rest.ts +++ b/packages/server/src/integrations/rest.ts @@ -171,7 +171,7 @@ export class RestIntegration implements IntegrationBase { path.basename(parse(contentDisposition).parameters?.filename) || "" } - let triedParsing: boolean = false, + let triedParsing = false, responseTxt: string | undefined try { if (filename) { diff --git a/packages/server/src/integrations/tests/sqlAlias.spec.ts b/packages/server/src/integrations/tests/sqlAlias.spec.ts index 3d67a7aa41..b94f0c4c87 100644 --- a/packages/server/src/integrations/tests/sqlAlias.spec.ts +++ b/packages/server/src/integrations/tests/sqlAlias.spec.ts @@ -245,7 +245,7 @@ describe("Captures of real examples", () => { tableNames.push(generator.guid()) } const aliasing = new AliasTables(tableNames) - let alias: string = "" + let alias= "" for (let table of tableNames) { alias = aliasing.getAlias(table) } diff --git a/packages/server/src/middleware/builder.ts b/packages/server/src/middleware/builder.ts index bc775991df..90bbd368ef 100644 --- a/packages/server/src/middleware/builder.ts +++ b/packages/server/src/middleware/builder.ts @@ -59,9 +59,7 @@ async function updateAppUpdatedAt(ctx: UserCtx) { await setDebounce(appId, DEBOUNCE_TIME_SEC) } catch (err: any) { // if a 409 occurs, then multiple clients connected at the same time - ignore - if (err?.status === 409) { - return - } else { + if (err && err.status !== 409) { throw err } } diff --git a/packages/server/src/sdk/app/permissions/index.ts b/packages/server/src/sdk/app/permissions/index.ts index 7c385864f4..6e912a0235 100644 --- a/packages/server/src/sdk/app/permissions/index.ts +++ b/packages/server/src/sdk/app/permissions/index.ts @@ -104,8 +104,6 @@ export async function getDependantResources( return p }, {} as Record) } - - return } export async function updatePermissionOnRole( diff --git a/packages/server/src/sdk/app/rows/search/internal/sqs.ts b/packages/server/src/sdk/app/rows/search/internal/sqs.ts index 19380bde43..aa799390b8 100644 --- a/packages/server/src/sdk/app/rows/search/internal/sqs.ts +++ b/packages/server/src/sdk/app/rows/search/internal/sqs.ts @@ -437,7 +437,7 @@ export async function search( ) // check for pagination final row - let nextRow: boolean = false + let nextRow = false if (paginate && params.limit && rows.length > params.limit) { // remove the extra row that confirmed if there is another row to move to nextRow = true diff --git a/packages/server/src/tests/utilities/structures.ts b/packages/server/src/tests/utilities/structures.ts index beb03ecf08..33e6e407dc 100644 --- a/packages/server/src/tests/utilities/structures.ts +++ b/packages/server/src/tests/utilities/structures.ts @@ -535,7 +535,7 @@ export function basicRow(tableId: string) { export function basicLinkedRow( tableId: string, linkedRowId: string, - linkField: string = "link" + linkField = "link" ) { // this is based on the basic linked tables you get from the test configuration return { @@ -586,14 +586,14 @@ export function basicUser(role: string) { } } -export function basicScreen(route: string = "/") { +export function basicScreen(route = "/") { return createHomeScreen({ roleId: BUILTIN_ROLE_IDS.BASIC, route, }) } -export function powerScreen(route: string = "/") { +export function powerScreen(route = "/") { return createHomeScreen({ roleId: BUILTIN_ROLE_IDS.POWER, route, diff --git a/packages/server/src/utilities/retry.ts b/packages/server/src/utilities/retry.ts index af5d4d7cb5..f6e8cbd0e5 100644 --- a/packages/server/src/utilities/retry.ts +++ b/packages/server/src/utilities/retry.ts @@ -1,6 +1,6 @@ export async function retry any>( fn: T, - maxTry: number = 5, + maxTry = 5, retryCount = 1 ): Promise>> { const currRetry = typeof retryCount === "number" ? retryCount : 1 diff --git a/packages/server/src/websockets/websocket.ts b/packages/server/src/websockets/websocket.ts index e8cd306fd2..607cf12b78 100644 --- a/packages/server/src/websockets/websocket.ts +++ b/packages/server/src/websockets/websocket.ts @@ -33,7 +33,7 @@ export class BaseSocket { constructor( app: Koa, server: http.Server, - path: string = "/", + path = "/", additionalMiddlewares?: any[] ) { this.app = app diff --git a/packages/shared-core/src/helpers/cron.ts b/packages/shared-core/src/helpers/cron.ts index a13c19c265..dab45ebcab 100644 --- a/packages/shared-core/src/helpers/cron.ts +++ b/packages/shared-core/src/helpers/cron.ts @@ -33,7 +33,7 @@ function improveErrors(errors: string[]): string[] { export function getNextExecutionDates( cronExpression: string, - limit: number = 4 + limit = 4 ): string[] { const parsed = cronParser.parseExpression(cronExpression) const nextRuns = [] diff --git a/packages/string-templates/test/hbsToJs.spec.ts b/packages/string-templates/test/hbsToJs.spec.ts index ae071cfe37..51fba083aa 100644 --- a/packages/string-templates/test/hbsToJs.spec.ts +++ b/packages/string-templates/test/hbsToJs.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-template-curly-in-string */ import { convertToJS } from "../src/index" function checkLines(response: string, lines: string[]) { diff --git a/packages/string-templates/test/utils.ts b/packages/string-templates/test/utils.ts index 957366fc59..4934567788 100644 --- a/packages/string-templates/test/utils.ts +++ b/packages/string-templates/test/utils.ts @@ -11,7 +11,7 @@ function tryParseJson(str: string) { try { return JSON.parse(str.replace(/'/g, '"')) } catch (e) { - return + // do nothing } } diff --git a/packages/types/src/sdk/db.ts b/packages/types/src/sdk/db.ts index 9feecbdb2b..eb922bd81e 100644 --- a/packages/types/src/sdk/db.ts +++ b/packages/types/src/sdk/db.ts @@ -128,13 +128,13 @@ export interface Database { name: string exists(): Promise + exists(docId: string): Promise /** * @deprecated the plan is to get everything using `tryGet` instead, then rename * `tryGet` to `get`. */ get(id?: string): Promise tryGet(id?: string): Promise - exists(docId: string): Promise getMultiple( ids: string[], opts?: { allowMissing?: boolean; excludeDocs?: boolean } diff --git a/packages/worker/src/sdk/accounts/metadata.ts b/packages/worker/src/sdk/accounts/metadata.ts index 11ab069839..1cace19981 100644 --- a/packages/worker/src/sdk/accounts/metadata.ts +++ b/packages/worker/src/sdk/accounts/metadata.ts @@ -40,10 +40,7 @@ export const getMetadata = async ( try { return await db.get(accountId) } catch (e: any) { - if (e.status === 404) { - // do nothing - return - } else { + if (e.status !== 404) { throw e } } diff --git a/packages/worker/src/tests/api/accounts.ts b/packages/worker/src/tests/api/accounts.ts index bc6d055b77..25861226f9 100644 --- a/packages/worker/src/tests/api/accounts.ts +++ b/packages/worker/src/tests/api/accounts.ts @@ -1,12 +1,7 @@ import { Account, AccountMetadata } from "@budibase/types" -import TestConfiguration from "../TestConfiguration" import { TestAPI } from "./base" export class AccountAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - saveMetadata = async (account: Account) => { const res = await this.request .put(`/api/system/accounts/${account.accountId}/metadata`) diff --git a/packages/worker/src/tests/api/auditLogs.ts b/packages/worker/src/tests/api/auditLogs.ts index d7bc4d99fb..c79b4ea934 100644 --- a/packages/worker/src/tests/api/auditLogs.ts +++ b/packages/worker/src/tests/api/auditLogs.ts @@ -1,12 +1,7 @@ import { AuditLogSearchParams, SearchAuditLogsResponse } from "@budibase/types" -import TestConfiguration from "../TestConfiguration" import { TestAPI } from "./base" export class AuditLogAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - search = async (search: AuditLogSearchParams) => { const res = await this.request .post("/api/global/auditlogs/search") diff --git a/packages/worker/src/tests/api/auth.ts b/packages/worker/src/tests/api/auth.ts index 552d4da505..2587fe4c8f 100644 --- a/packages/worker/src/tests/api/auth.ts +++ b/packages/worker/src/tests/api/auth.ts @@ -1,11 +1,6 @@ -import TestConfiguration from "../TestConfiguration" import { TestAPI, TestAPIOpts } from "./base" export class AuthAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - updatePassword = ( resetCode: string, password: string, diff --git a/packages/worker/src/tests/api/configs.ts b/packages/worker/src/tests/api/configs.ts index e0c1c806af..36d145412a 100644 --- a/packages/worker/src/tests/api/configs.ts +++ b/packages/worker/src/tests/api/configs.ts @@ -1,11 +1,6 @@ -import TestConfiguration from "../TestConfiguration" import { TestAPI } from "./base" export class ConfigAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - getConfigChecklist = () => { return this.request .get(`/api/global/configs/checklist`) diff --git a/packages/worker/src/tests/api/email.ts b/packages/worker/src/tests/api/email.ts index b2f30e6ac1..a8f5967d58 100644 --- a/packages/worker/src/tests/api/email.ts +++ b/packages/worker/src/tests/api/email.ts @@ -1,12 +1,7 @@ import { EmailAttachment } from "@budibase/types" -import TestConfiguration from "../TestConfiguration" import { TestAPI } from "./base" export class EmailAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - sendEmail = (purpose: string, attachments?: EmailAttachment[]) => { return this.request .post(`/api/global/email/send`) diff --git a/packages/worker/src/tests/api/environment.ts b/packages/worker/src/tests/api/environment.ts index d6a76f3b06..b394f692ec 100644 --- a/packages/worker/src/tests/api/environment.ts +++ b/packages/worker/src/tests/api/environment.ts @@ -1,11 +1,6 @@ -import TestConfiguration from "../TestConfiguration" import { TestAPI } from "./base" export class EnvironmentAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - getEnvironment = () => { return this.request .get(`/api/system/environment`) diff --git a/packages/worker/src/tests/api/groups.ts b/packages/worker/src/tests/api/groups.ts index 5153c19db0..5d983a53d4 100644 --- a/packages/worker/src/tests/api/groups.ts +++ b/packages/worker/src/tests/api/groups.ts @@ -1,12 +1,7 @@ import { UserGroup } from "@budibase/types" -import TestConfiguration from "../TestConfiguration" import { TestAPI } from "./base" export class GroupsAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - saveGroup = ( group: UserGroup, { expect }: { expect: number | object } = { expect: 200 } diff --git a/packages/worker/src/tests/api/license.ts b/packages/worker/src/tests/api/license.ts index a6645226af..bf7c952ab0 100644 --- a/packages/worker/src/tests/api/license.ts +++ b/packages/worker/src/tests/api/license.ts @@ -1,4 +1,3 @@ -import TestConfiguration from "../TestConfiguration" import { TestAPI } from "./base" import { ActivateLicenseKeyRequest, @@ -6,10 +5,6 @@ import { } from "@budibase/types" export class LicenseAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - refresh = async () => { return this.request .post("/api/global/license/refresh") diff --git a/packages/worker/src/tests/api/migrations.ts b/packages/worker/src/tests/api/migrations.ts index 6038cbd5d8..6d62fe994a 100644 --- a/packages/worker/src/tests/api/migrations.ts +++ b/packages/worker/src/tests/api/migrations.ts @@ -1,11 +1,6 @@ -import TestConfiguration from "../TestConfiguration" import { TestAPI, TestAPIOpts } from "./base" export class MigrationAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - runMigrations = (opts?: TestAPIOpts) => { return this.request .post(`/api/system/migrations/run`) diff --git a/packages/worker/src/tests/api/restore.ts b/packages/worker/src/tests/api/restore.ts index c6a646317d..a39428da07 100644 --- a/packages/worker/src/tests/api/restore.ts +++ b/packages/worker/src/tests/api/restore.ts @@ -1,11 +1,6 @@ -import TestConfiguration from "../TestConfiguration" import { TestAPI, TestAPIOpts } from "./base" export class RestoreAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - restored = (opts?: TestAPIOpts) => { return this.request .post(`/api/system/restored`) diff --git a/packages/worker/src/tests/api/roles.ts b/packages/worker/src/tests/api/roles.ts index 8e7647583a..6c7be76054 100644 --- a/packages/worker/src/tests/api/roles.ts +++ b/packages/worker/src/tests/api/roles.ts @@ -1,11 +1,6 @@ -import TestConfiguration from "../TestConfiguration" import { TestAPI, TestAPIOpts } from "./base" export class RolesAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - get = (opts?: TestAPIOpts) => { return this.request .get(`/api/global/roles`) diff --git a/packages/worker/src/tests/api/scim/groups.ts b/packages/worker/src/tests/api/scim/groups.ts index d2df007614..0ec705fc52 100644 --- a/packages/worker/src/tests/api/scim/groups.ts +++ b/packages/worker/src/tests/api/scim/groups.ts @@ -4,14 +4,9 @@ import { ScimGroupResponse, ScimUpdateRequest, } from "@budibase/types" -import TestConfiguration from "../../TestConfiguration" import { RequestSettings, ScimTestAPI } from "./shared" export class ScimGroupsAPI extends ScimTestAPI { - constructor(config: TestConfiguration) { - super(config) - } - get = async ( requestSettings?: Partial & { params?: { diff --git a/packages/worker/src/tests/api/scim/shared.ts b/packages/worker/src/tests/api/scim/shared.ts index 546a940093..fca6f77abd 100644 --- a/packages/worker/src/tests/api/scim/shared.ts +++ b/packages/worker/src/tests/api/scim/shared.ts @@ -1,4 +1,3 @@ -import TestConfiguration from "../../TestConfiguration" import { TestAPI } from "../base" const defaultConfig: RequestSettings = { @@ -14,10 +13,6 @@ export type RequestSettings = { } export abstract class ScimTestAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - call = ( url: string, method: "get" | "post" | "patch" | "delete", diff --git a/packages/worker/src/tests/api/scim/users.ts b/packages/worker/src/tests/api/scim/users.ts index 318492d378..f518d49ce6 100644 --- a/packages/worker/src/tests/api/scim/users.ts +++ b/packages/worker/src/tests/api/scim/users.ts @@ -4,14 +4,9 @@ import { ScimUserResponse, ScimUpdateRequest, } from "@budibase/types" -import TestConfiguration from "../../TestConfiguration" import { RequestSettings, ScimTestAPI } from "./shared" export class ScimUsersAPI extends ScimTestAPI { - constructor(config: TestConfiguration) { - super(config) - } - get = async ( requestSettings?: Partial & { params?: { diff --git a/packages/worker/src/tests/api/self.ts b/packages/worker/src/tests/api/self.ts index 1c1492f37f..6f8cd8decf 100644 --- a/packages/worker/src/tests/api/self.ts +++ b/packages/worker/src/tests/api/self.ts @@ -1,12 +1,7 @@ -import TestConfiguration from "../TestConfiguration" import { User } from "@budibase/types" import { TestAPI } from "./base" export class SelfAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - updateSelf = (user: User, update: any) => { return this.request .post(`/api/global/self`) diff --git a/packages/worker/src/tests/api/status.ts b/packages/worker/src/tests/api/status.ts index 5b0f77efc6..c658411abc 100644 --- a/packages/worker/src/tests/api/status.ts +++ b/packages/worker/src/tests/api/status.ts @@ -1,11 +1,6 @@ -import TestConfiguration from "../TestConfiguration" import { TestAPI } from "./base" export class StatusAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - getStatus = () => { return this.request.get(`/api/system/status`).expect(200) } diff --git a/packages/worker/src/tests/api/templates.ts b/packages/worker/src/tests/api/templates.ts index 0c8110394f..23e327b392 100644 --- a/packages/worker/src/tests/api/templates.ts +++ b/packages/worker/src/tests/api/templates.ts @@ -1,11 +1,6 @@ -import TestConfiguration from "../TestConfiguration" import { TestAPI, TestAPIOpts } from "./base" export class TemplatesAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - definitions = (opts?: TestAPIOpts) => { return this.request .get(`/api/global/template/definitions`) diff --git a/packages/worker/src/tests/api/users.ts b/packages/worker/src/tests/api/users.ts index b54fb45d2c..b964ba5112 100644 --- a/packages/worker/src/tests/api/users.ts +++ b/packages/worker/src/tests/api/users.ts @@ -9,14 +9,9 @@ import { } from "@budibase/types" import structures from "../structures" import { generator } from "@budibase/backend-core/tests" -import TestConfiguration from "../TestConfiguration" import { TestAPI, TestAPIOpts } from "./base" export class UserAPI extends TestAPI { - constructor(config: TestConfiguration) { - super(config) - } - // INVITE sendUserInvite = async (sendMailMock: any, email: string, status = 200) => { @@ -178,11 +173,7 @@ export class UserAPI extends TestAPI { .expect(opts?.status ? opts.status : 200) } - grantBuilderToApp = ( - userId: string, - appId: string, - statusCode: number = 200 - ) => { + grantBuilderToApp = (userId: string, appId: string, statusCode = 200) => { return this.request .post(`/api/global/users/${userId}/app/${appId}/builder`) .set(this.config.defaultHeaders()) diff --git a/scripts/build.js b/scripts/build.js index 93a2a1e589..d96b27b166 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -42,7 +42,7 @@ const svelteCompilePlugin = { }, } -var { argv } = require("yargs") +let { argv } = require("yargs") async function runBuild(entry, outfile) { const isDev = process.env.NODE_ENV !== "production" From e5453cc766db170affd212cc61dac0697f7ca9e0 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 9 Dec 2024 13:45:11 +0000 Subject: [PATCH 45/68] only fire view updated events when 2 or more groups are applied --- .../src/api/controllers/view/viewsV2.ts | 14 +++---- .../src/api/routes/tests/viewV2.spec.ts | 41 ++++++++++++++++++- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/packages/server/src/api/controllers/view/viewsV2.ts b/packages/server/src/api/controllers/view/viewsV2.ts index 66a6194096..4c65d673e8 100644 --- a/packages/server/src/api/controllers/view/viewsV2.ts +++ b/packages/server/src/api/controllers/view/viewsV2.ts @@ -167,15 +167,11 @@ export async function create(ctx: Ctx) { async function handleViewFilterEvents(existingView: ViewV2, view: ViewV2) { const filterGroups = view.queryUI?.groups?.length || 0 const properties = { filterGroups, tableId: view.tableId } - if (!existingView?.queryUI) { - await events.view.filterCreated(properties) - } else { - if ( - filterGroups > - ((existingView && existingView?.queryUI?.groups?.length) || 0) - ) { - await events.view.filterUpdated(properties) - } + if ( + filterGroups >= 2 && + ((existingView && existingView?.queryUI?.groups?.length) || 0) + ) { + await events.view.filterUpdated(properties) } } diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 739603bb3c..244a0a23eb 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -997,6 +997,45 @@ if (descriptions.length) { expect(events.view.updated).toHaveBeenCalledTimes(1) }) + it("handles view grouped filter events", async () => { + view.queryUI = { + logicalOperator: UILogicalOperator.ALL, + onEmptyFilter: EmptyFilterOption.RETURN_ALL, + groups: [ + { + logicalOperator: UILogicalOperator.ALL, + filters: [ + { + operator: BasicOperator.EQUAL, + field: "newField", + value: "newValue", + }, + ], + }, + ], + } + await config.api.viewV2.update(view) + expect(events.view.filterUpdated).not.toHaveBeenCalled() + + // @ts-ignore + view.queryUI.groups.push({ + logicalOperator: UILogicalOperator.ALL, + filters: [ + { + operator: BasicOperator.EQUAL, + field: "otherField", + value: "otherValue", + }, + ], + }) + + await config.api.viewV2.update(view) + expect(events.view.filterUpdated).toHaveBeenCalledWith({ + filterGroups: 2, + tableId: view.tableId, + }) + }) + it("can update all fields", async () => { const tableId = table._id! @@ -1360,8 +1399,6 @@ if (descriptions.length) { }, }) - expect(events.view.filterCreated).toHaveBeenCalledTimes(1) - updatedView = await config.api.viewV2.get(view.id) expected = { onEmptyFilter: EmptyFilterOption.RETURN_ALL, From 7d5ca8449fb5b98ec74e2966b633fb1514077865 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 9 Dec 2024 14:01:47 +0000 Subject: [PATCH 46/68] only fire for 2 grouped filters --- .../src/events/processors/posthog/PosthogProcessor.ts | 1 - packages/server/src/api/controllers/view/viewsV2.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts index e8e8f35d6d..6c45da09e6 100644 --- a/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts +++ b/packages/backend-core/src/events/processors/posthog/PosthogProcessor.ts @@ -14,7 +14,6 @@ const EXCLUDED_EVENTS: Event[] = [ Event.DATASOURCE_UPDATED, Event.QUERY_UPDATED, Event.VIEW_UPDATED, - Event.VIEW_FILTER_UPDATED, Event.VIEW_CALCULATION_UPDATED, Event.AUTOMATION_TRIGGER_UPDATED, Event.USER_GROUP_UPDATED, diff --git a/packages/server/src/api/controllers/view/viewsV2.ts b/packages/server/src/api/controllers/view/viewsV2.ts index 4c65d673e8..da579efed7 100644 --- a/packages/server/src/api/controllers/view/viewsV2.ts +++ b/packages/server/src/api/controllers/view/viewsV2.ts @@ -169,7 +169,7 @@ async function handleViewFilterEvents(existingView: ViewV2, view: ViewV2) { const properties = { filterGroups, tableId: view.tableId } if ( filterGroups >= 2 && - ((existingView && existingView?.queryUI?.groups?.length) || 0) + filterGroups > (existingView?.queryUI?.groups?.length || 0) ) { await events.view.filterUpdated(properties) } From 4dd5b70fc2719d2a7e06f13c272ecf6aed527bd0 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 9 Dec 2024 14:12:48 +0000 Subject: [PATCH 47/68] Update yarn lock. --- yarn.lock | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5bf77d9a72..145493e809 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2279,7 +2279,7 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@0.0.0", "@budibase/pro@npm:@budibase/pro@latest": +"@budibase/pro@npm:@budibase/pro@latest": version "3.2.16" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-3.2.16.tgz#571751c5ab288ecbdd14791e4dab207b9523150f" integrity sha512-HRKfpyYk+fJ87rOAvuBw1EcBv33xliSEf/ww7Wmvzx/xdxas6a7ZHoblw0BU8tnb5Q2rmYTf61RlqOIC4iC+0Q== @@ -20159,6 +20159,11 @@ timekeeper@2.2.0: resolved "https://registry.yarnpkg.com/timekeeper/-/timekeeper-2.2.0.tgz#9645731fce9e3280a18614a57a9d1b72af3ca368" integrity sha512-W3AmPTJWZkRwu+iSNxPIsLZ2ByADsOLbbLxe46UJyWj3mlYLlwucKiq+/dPm0l9wTzqoF3/2PH0AGFCebjq23A== +timekeeper@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/timekeeper/-/timekeeper-2.3.1.tgz#2deb6e0b95d93625fda84c18d47f84a99e4eba01" + integrity sha512-LeQRS7/4JcC0PgdSFnfUiStQEdiuySlCj/5SJ18D+T1n9BoY7PxKFfCwLulpHXoLUFr67HxBddQdEX47lDGx1g== + tiny-glob@^0.2.9: version "0.2.9" resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2" @@ -20391,7 +20396,7 @@ tsconfig-paths@^3.10.1, tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tsconfig-paths@^4.1.2: +tsconfig-paths@^4.1.2, tsconfig-paths@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg== From d4f7dc3974f98d662e5b220f2380e7f9cca6680e Mon Sep 17 00:00:00 2001 From: andz-bb Date: Mon, 9 Dec 2024 16:29:52 +0000 Subject: [PATCH 48/68] Disable filter value binding input when no column is selected in filter screen --- packages/frontend-core/src/components/CoreFilterBuilder.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend-core/src/components/CoreFilterBuilder.svelte b/packages/frontend-core/src/components/CoreFilterBuilder.svelte index 3aff981082..2bf40bda37 100644 --- a/packages/frontend-core/src/components/CoreFilterBuilder.svelte +++ b/packages/frontend-core/src/components/CoreFilterBuilder.svelte @@ -407,6 +407,7 @@ /> Date: Mon, 9 Dec 2024 17:19:18 +0000 Subject: [PATCH 49/68] Update pro reference. --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index b2f2e2b9d4..9d88d38d82 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit b2f2e2b9d45906744196875b87a121948e8e4c09 +Subproject commit 9d88d38d82b928f43005197e1a9ec9856572946b From 34684df87a2910adbbe7f618d679a56dcb33bee5 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 9 Dec 2024 20:59:13 +0000 Subject: [PATCH 50/68] Fix formatting. --- packages/server/src/api/routes/tests/search.spec.ts | 2 +- packages/server/src/integrations/microsoftSqlServer.ts | 2 +- packages/server/src/integrations/postgres.ts | 2 +- packages/server/src/integrations/tests/sqlAlias.spec.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/routes/tests/search.spec.ts b/packages/server/src/api/routes/tests/search.spec.ts index 6276d38e25..67f303aac3 100644 --- a/packages/server/src/api/routes/tests/search.spec.ts +++ b/packages/server/src/api/routes/tests/search.spec.ts @@ -2133,7 +2133,7 @@ if (descriptions.length) { // repeat the search many times to check the first row is always the same let bookmark: string | number | undefined, hasNextPage: boolean | undefined = true, - rowCount= 0 + rowCount = 0 do { const response = await config.api.row.search( tableOrViewId, diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index f3590d1885..477813239b 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -223,7 +223,7 @@ const COLUMN_DEFINITION_METADATA: Record = { class SqlServerIntegration extends Sql implements DatasourcePlus { private readonly config: MSSQLConfig - private index= 0 + private index = 0 private client?: sqlServer.ConnectionPool MASTER_TABLES = [ diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index f4db9d6959..5551d33778 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -149,7 +149,7 @@ const SCHEMA: Integration = { class PostgresIntegration extends Sql implements DatasourcePlus { private readonly client: Client private readonly config: PostgresConfig - private index= 1 + private index = 1 private open: boolean PRIMARY_KEYS_SQL = () => ` diff --git a/packages/server/src/integrations/tests/sqlAlias.spec.ts b/packages/server/src/integrations/tests/sqlAlias.spec.ts index b94f0c4c87..7c6f583762 100644 --- a/packages/server/src/integrations/tests/sqlAlias.spec.ts +++ b/packages/server/src/integrations/tests/sqlAlias.spec.ts @@ -245,7 +245,7 @@ describe("Captures of real examples", () => { tableNames.push(generator.guid()) } const aliasing = new AliasTables(tableNames) - let alias= "" + let alias = "" for (let table of tableNames) { alias = aliasing.getAlias(table) } From 1c476e0e1de625f7db09cd107358a8eb42f15197 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 9 Dec 2024 21:25:20 +0000 Subject: [PATCH 51/68] Fix types. --- packages/worker/src/tests/api/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/worker/src/tests/api/base.ts b/packages/worker/src/tests/api/base.ts index 460d61e70a..78ca0bf961 100644 --- a/packages/worker/src/tests/api/base.ts +++ b/packages/worker/src/tests/api/base.ts @@ -10,7 +10,7 @@ export abstract class TestAPI { config: TestConfiguration request: SuperTest - protected constructor(config: TestConfiguration) { + constructor(config: TestConfiguration) { this.config = config this.request = config.request } From c56131843429dcee1f0a7c93bb44394439ba6d89 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 10 Dec 2024 12:15:57 +0100 Subject: [PATCH 52/68] Update and replace old plugins --- packages/string-templates/package.json | 6 +- packages/string-templates/rollup.config.js | 17 +- yarn.lock | 633 +-------------------- 3 files changed, 32 insertions(+), 624 deletions(-) diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 7256bdde0d..1d7a4507ab 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -31,15 +31,13 @@ "@rollup/plugin-commonjs": "^17.1.0", "@rollup/plugin-inject": "^5.0.5", "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-typescript": "8.3.0", "doctrine": "^3.0.0", "jest": "29.7.0", "marked": "^4.0.10", "rollup": "^2.36.2", - "rollup-plugin-inject-process-env": "^1.3.1", - "rollup-plugin-node-builtins": "^2.1.2", - "rollup-plugin-node-globals": "^1.4.0", - "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-polyfill-node": "^0.13.0", "rollup-plugin-terser": "^7.0.2", "ts-jest": "29.1.1", "typescript": "5.7.2" diff --git a/packages/string-templates/rollup.config.js b/packages/string-templates/rollup.config.js index 5f76376711..1664c2e782 100644 --- a/packages/string-templates/rollup.config.js +++ b/packages/string-templates/rollup.config.js @@ -1,12 +1,10 @@ import commonjs from "@rollup/plugin-commonjs" -import resolve from "rollup-plugin-node-resolve" +import resolve from "@rollup/plugin-node-resolve" import json from "@rollup/plugin-json" -import { terser } from "rollup-plugin-terser" -import builtins from "rollup-plugin-node-builtins" -import globals from "rollup-plugin-node-globals" import typescript from "@rollup/plugin-typescript" -import injectProcessEnv from "rollup-plugin-inject-process-env" +import polyfillNode from "rollup-plugin-polyfill-node" import inject from "@rollup/plugin-inject" +import { terser } from "rollup-plugin-terser" const production = !process.env.ROLLUP_WATCH @@ -27,18 +25,14 @@ const config = (input, outputFile, format) => ({ typescript({ moduleResolution: "node", }), + polyfillNode(), // Replaces Node.js built-ins for browser compatibility resolve({ preferBuiltins: true, browser: true, }), commonjs(), - globals(), - inject({ Buffer: ["buffer", "Buffer"] }), - builtins(), json(), - injectProcessEnv({ - NO_JS: process.env.NO_JS, - }), + inject({ Buffer: ["buffer", "Buffer"] }), production && terser(), ], }) @@ -46,5 +40,4 @@ const config = (input, outputFile, format) => ({ export default [ config("src/index.ts", "./dist/bundle.cjs", "cjs"), config("src/index.ts", "./dist/bundle.mjs", "esm"), - config("src/iife.ts", "./dist/iife.mjs", "esm"), ] diff --git a/yarn.lock b/yarn.lock index ff0aec603a..442d6e65e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2088,7 +2088,7 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@3.2.16": +"@budibase/backend-core@3.2.26": version "0.0.0" dependencies: "@budibase/nano" "10.1.5" @@ -2172,15 +2172,15 @@ through2 "^2.0.0" "@budibase/pro@npm:@budibase/pro@latest": - version "3.2.16" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-3.2.16.tgz#571751c5ab288ecbdd14791e4dab207b9523150f" - integrity sha512-HRKfpyYk+fJ87rOAvuBw1EcBv33xliSEf/ww7Wmvzx/xdxas6a7ZHoblw0BU8tnb5Q2rmYTf61RlqOIC4iC+0Q== + version "3.2.26" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-3.2.26.tgz#3525535e07827ff820eefeeb94ad9e0e818ac698" + integrity sha512-+V04NbKSBN3Up6vcyBFFpecQ3MrJvVuXN74JE9yLj+KVxQXJ1kwCrMgea/XyJomSc72PWb9sQzXADWTe5i5STA== dependencies: "@anthropic-ai/sdk" "^0.27.3" - "@budibase/backend-core" "3.2.16" - "@budibase/shared-core" "3.2.16" - "@budibase/string-templates" "3.2.16" - "@budibase/types" "3.2.16" + "@budibase/backend-core" "3.2.26" + "@budibase/shared-core" "3.2.26" + "@budibase/string-templates" "3.2.26" + "@budibase/types" "3.2.26" "@koa/router" "13.1.0" bull "4.10.1" dd-trace "5.26.0" @@ -2193,13 +2193,13 @@ scim-patch "^0.8.1" scim2-parse-filter "^0.2.8" -"@budibase/shared-core@3.2.16": +"@budibase/shared-core@3.2.26": version "0.0.0" dependencies: "@budibase/types" "*" cron-validate "1.4.5" -"@budibase/string-templates@3.2.16": +"@budibase/string-templates@3.2.26": version "0.0.0" dependencies: "@budibase/handlebars-helpers" "^0.13.2" @@ -2207,7 +2207,7 @@ handlebars "^4.7.8" lodash.clonedeep "^4.5.0" -"@budibase/types@3.2.16": +"@budibase/types@3.2.26": version "0.0.0" dependencies: scim-patch "^0.8.1" @@ -5976,13 +5976,6 @@ "@types/tough-cookie" "*" form-data "^2.5.0" -"@types/resolve@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" - integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== - dependencies: - "@types/node" "*" - "@types/resolve@1.20.2": version "1.20.2" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" @@ -6499,13 +6492,6 @@ abstract-leveldown@^7.2.0: level-supports "^2.0.1" queue-microtask "^1.2.3" -abstract-leveldown@~0.12.0, abstract-leveldown@~0.12.1: - version "0.12.4" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz#29e18e632e60e4e221d5810247852a63d7b2e410" - integrity sha512-TOod9d5RDExo6STLMGa+04HGkl+TlMfbDnTyN93/ETJ9DpQ0DaYLqcMZlbXvdc4W3vVo1Qrl+WhSp8zvDsJ+jA== - dependencies: - xtend "~3.0.0" - abstract-leveldown@~2.7.1: version "2.7.2" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" @@ -6570,7 +6556,7 @@ acorn-walk@^8.0.2, acorn-walk@^8.1.1, acorn-walk@^8.2.0: dependencies: acorn "^8.11.0" -acorn@^5.2.1, acorn@^5.7.3: +acorn@^5.2.1: version "5.7.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== @@ -6975,15 +6961,6 @@ asn1.js-rfc5280@^3.0.0: dependencies: asn1.js "^5.0.0" -asn1.js@^4.10.1: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - asn1.js@^5.0.0, asn1.js@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" @@ -7381,13 +7358,6 @@ bl@^6.0.11: inherits "^2.0.4" readable-stream "^4.2.0" -bl@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-0.8.2.tgz#c9b6bca08d1bc2ea00fc8afb4f1a5fd1e1c66e4e" - integrity sha512-pfqikmByp+lifZCS0p6j6KreV6kNU6Apzpm2nKOk+94cZb/jvle55+JxWiByUQ0Wo/+XnDXEy5MxxKMb6r0VIw== - dependencies: - readable-stream "~1.0.26" - bluebird@^3.5.1, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -7398,12 +7368,12 @@ bmp-ts@^1.0.9: resolved "https://registry.yarnpkg.com/bmp-ts/-/bmp-ts-1.0.9.tgz#0fd124ba812be9b786b29e5b186ee76d74ff5538" integrity sha512-cTEHk2jLrPyi+12M3dhpEbnnPOsaZuq7C45ylbbQIiWgDFZq4UVYPEY5mlqjvsj/6gJv9qX5sa+ebDzLXT28Vw== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: +bn.js@^4.0.0: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0, bn.js@^5.2.1: +bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== @@ -7454,11 +7424,6 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - browser-process-hrtime@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" @@ -7469,70 +7434,6 @@ browser-request@^0.3.3: resolved "https://registry.yarnpkg.com/browser-request/-/browser-request-0.3.3.tgz#9ece5b5aca89a29932242e18bf933def9876cc17" integrity sha512-YyNI4qJJ+piQG6MMEuo7J3Bzaqssufx04zpEKYfSrl/1Op59HWali9zMtBpXnkmqMcOuWJPZvudrm9wISmnCbg== -browserify-aes@^1.0.4, browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-fs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-fs/-/browserify-fs-1.0.0.tgz#f075aa8a729d4d1716d066620e386fcc1311a96f" - integrity sha512-8LqHRPuAEKvyTX34R6tsw4bO2ro6j9DmlYBhiYWHRM26Zv2cBw1fJOU0NeUQ0RkXkPn/PFBjhA0dm4AgaBurTg== - dependencies: - level-filesystem "^1.0.1" - level-js "^2.1.3" - levelup "^0.18.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.3.tgz#7afe4c01ec7ee59a89a558a4b75bd85ae62d4208" - integrity sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw== - dependencies: - bn.js "^5.2.1" - browserify-rsa "^4.1.0" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.5" - hash-base "~3.0" - inherits "^2.0.4" - parse-asn1 "^5.1.7" - readable-stream "^2.3.8" - safe-buffer "^5.2.1" - browserslist@^4.21.3, browserslist@^4.21.5: version "4.21.5" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" @@ -7590,11 +7491,6 @@ buffer-equal-constant-time@1.0.1: resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== -buffer-es6@^4.9.2, buffer-es6@^4.9.3: - version "4.9.3" - resolved "https://registry.yarnpkg.com/buffer-es6/-/buffer-es6-4.9.3.tgz#f26347b82df76fd37e18bcb5288c4970cfd5c404" - integrity sha512-Ibt+oXxhmeYJSsCkODPqNpPmyegefiD8rfutH1NYGhMZQhSp95Rz7haemgnJ6dxa6LT+JLLbtgOMORRluwKktw== - buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" @@ -7615,11 +7511,6 @@ buffer-writer@2.0.0: resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-2.0.0.tgz#ce7eb81a38f7829db09c873f2fbb792c0c98ec04" integrity sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw== -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - buffer@4.9.2: version "4.9.2" resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" @@ -7657,7 +7548,7 @@ buildcheck@~0.0.6: resolved "https://registry.yarnpkg.com/buildcheck/-/buildcheck-0.0.6.tgz#89aa6e417cfd1e2196e3f8fe915eb709d2fe4238" integrity sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A== -builtin-modules@^3.1.0, builtin-modules@^3.3.0: +builtin-modules@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== @@ -7966,14 +7857,6 @@ ci-info@^3.2.0, ci-info@^3.6.1: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - cjs-module-lexer@^1.0.0, cjs-module-lexer@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" @@ -8091,11 +7974,6 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== -clone@~0.1.9: - version "0.1.19" - resolved "https://registry.yarnpkg.com/clone/-/clone-0.1.19.tgz#613fb68639b26a494ac53253e15b1a6bd88ada85" - integrity sha512-IO78I0y6JcSpEPHzK4obKdsL7E7oLdRVDVOLwr2Hkbjsb+Eoz0dxW6tef0WizoKu0gLC4oZSZuEF4U2K6w1WQw== - cluster-key-slot@1.1.2, cluster-key-slot@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz#88ddaa46906e303b5de30d3153b7d9fe0a0c19ac" @@ -8318,16 +8196,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concat-stream@^1.4.4: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - concat-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" @@ -8608,37 +8476,6 @@ crc@^3.4.4: dependencies: buffer "^5.1.0" -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - create-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" @@ -8685,23 +8522,6 @@ cross-spawn@7.0.6, cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3, c shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - crypto-random-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" @@ -9142,13 +8962,6 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== -deferred-leveldown@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-0.2.0.tgz#2cef1f111e1c57870d8bbb8af2650e587cd2f5b4" - integrity sha512-+WCbb4+ez/SZ77Sdy1iadagFiVzMB89IKOBhglgnUkVxOxRWmmFsz8UDSNWh4Rhq+3wr/vMFlYj+rdEwWUDdng== - dependencies: - abstract-leveldown "~0.12.1" - deferred-leveldown@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" @@ -9275,14 +9088,6 @@ dequal@^2.0.3: resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - destroy@^1.0.4: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" @@ -9489,15 +9294,6 @@ diff@^5.1.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -9760,19 +9556,6 @@ electron-to-chromium@^1.4.284: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.317.tgz#9a3d38a1a37f26a417d3d95dafe198ff11ed072b" integrity sha512-JhCRm9v30FMNzQSsjl4kXaygU+qHBD0Yh7mKxyjmF0V8VwYVB6qpBRX28GyAucrM9wDCpSUctT6FpMUQxbyKuA== -elliptic@^6.5.3, elliptic@^6.5.5: - version "6.5.7" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b" - integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - email-validator@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/email-validator/-/email-validator-2.0.4.tgz#b8dfaa5d0dae28f1b03c95881d904d4e40bfe7ed" @@ -9906,7 +9689,7 @@ err-code@^2.0.2: resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== -errno@^0.1.1, errno@~0.1.1, errno@~0.1.7: +errno@~0.1.1, errno@~0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== @@ -10398,11 +10181,6 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== -estree-walker@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39" - integrity sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig== - estree-walker@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" @@ -10455,14 +10233,6 @@ events@^3.0.0, events@^3.3.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - execa@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" @@ -10943,11 +10713,6 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" -foreach@~2.0.1: - version "2.0.6" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.6.tgz#87bcc8a1a0e74000ff2bf9802110708cfb02eb6e" - integrity sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg== - foreground-child@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" @@ -11120,13 +10885,6 @@ functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -fwd-stream@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/fwd-stream/-/fwd-stream-1.0.4.tgz#ed281cabed46feecf921ee32dc4c50b372ac7cfa" - integrity sha512-q2qaK2B38W07wfPSQDKMiKOD5Nzv2XyuvQlrmh1q0pxyHNanKHq8lwQ6n9zHucAwA5EbzRJKEgds2orn88rYTg== - dependencies: - readable-stream "~1.0.26-4" - gauge@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" @@ -11853,31 +11611,6 @@ has-yarn@^2.1.0: resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash-base@~3.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" @@ -11903,15 +11636,6 @@ hexoid@^2.0.0: resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-2.0.0.tgz#fb36c740ebbf364403fa1ec0c7efd268460ec5b9" integrity sha512-qlspKUK7IlSQv2o+5I7yhUd7TxlOG2Vr5LTa3ve2XSNVKAL/n/u/7KLvKmFNimomDIKvZFXWHv0T12mv7rT8Aw== -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -12138,11 +11862,6 @@ iconv-lite@0.6.3, iconv-lite@^0.6.2, iconv-lite@^0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -idb-wrapper@^1.5.0: - version "1.7.2" - resolved "https://registry.yarnpkg.com/idb-wrapper/-/idb-wrapper-1.7.2.tgz#8251afd5e77fe95568b1c16152eb44b396767ea2" - integrity sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg== - identity-obj-proxy@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14" @@ -12247,11 +11966,6 @@ indexes-of@^1.0.1: resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" integrity sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA== -indexof@~0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - integrity sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg== - infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" @@ -12654,11 +12368,6 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== -is-object@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-0.1.2.tgz#00efbc08816c33cfc4ac8251d132e10dc65098d7" - integrity sha512-GkfZZlIZtpkFrqyAXPQSRBMsaHAw+CgoKe2HXAkjd/sfoI9+hS8PT4wg2rJxdQyUKr7N2vHJbg7/jQtE5l5vBQ== - is-path-inside@^3.0.2, is-path-inside@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -12873,11 +12582,6 @@ is-yarn-global@^0.3.0: resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== -is@~0.2.6: - version "0.2.7" - resolved "https://registry.yarnpkg.com/is/-/is-0.2.7.tgz#3b34a2c48f359972f35042849193ae7264b63562" - integrity sha512-ajQCouIvkcSnl2iRdK70Jug9mohIHVX9uKpoWnl115ov0R5mzBvRrXxrnHbsA+8AdwCwc/sfw7HXmd4I5EJBdQ== - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -12893,11 +12597,6 @@ isarray@^2.0.5: resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== -isbuffer@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/isbuffer/-/isbuffer-0.0.0.tgz#38c146d9df528b8bf9b0701c3d43cf12df3fc39b" - integrity sha512-xU+NoHp+YtKQkaM2HsQchYn0sltxMxew0HavMfHbjnucBoTSGbw745tL+Z7QBANleWM1eEQMenEpi174mIeS4g== - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -14147,15 +13846,6 @@ lerna@7.4.2: yargs "16.2.0" yargs-parser "20.2.4" -level-blobs@^0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/level-blobs/-/level-blobs-0.1.7.tgz#9ab9b97bb99f1edbf9f78a3433e21ed56386bdaf" - integrity sha512-n0iYYCGozLd36m/Pzm206+brIgXP8mxPZazZ6ZvgKr+8YwOZ8/PPpYC5zMUu2qFygRN8RO6WC/HH3XWMW7RMVg== - dependencies: - level-peek "1.0.6" - once "^1.3.0" - readable-stream "^1.0.26-4" - level-codec@9.0.2, level-codec@^9.0.0: version "9.0.2" resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" @@ -14182,40 +13872,6 @@ level-errors@^2.0.0, level-errors@~2.0.0: dependencies: errno "~0.1.1" -level-filesystem@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/level-filesystem/-/level-filesystem-1.2.0.tgz#a00aca9919c4a4dfafdca6a8108d225aadff63b3" - integrity sha512-PhXDuCNYpngpxp3jwMT9AYBMgOvB6zxj3DeuIywNKmZqFj2djj9XfT2XDVslfqmo0Ip79cAd3SBy3FsfOZPJ1g== - dependencies: - concat-stream "^1.4.4" - errno "^0.1.1" - fwd-stream "^1.0.4" - level-blobs "^0.1.7" - level-peek "^1.0.6" - level-sublevel "^5.2.0" - octal "^1.0.0" - once "^1.3.0" - xtend "^2.2.0" - -level-fix-range@2.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/level-fix-range/-/level-fix-range-2.0.0.tgz#c417d62159442151a19d9a2367868f1724c2d548" - integrity sha512-WrLfGWgwWbYPrHsYzJau+5+te89dUbENBg3/lsxOs4p2tYOhCHjbgXxBAj4DFqp3k/XBwitcRXoCh8RoCogASA== - dependencies: - clone "~0.1.9" - -level-fix-range@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/level-fix-range/-/level-fix-range-1.0.2.tgz#bf15b915ae36d8470c821e883ddf79cd16420828" - integrity sha512-9llaVn6uqBiSlBP+wKiIEoBa01FwEISFgHSZiyec2S0KpyLUkGR4afW/FCZ/X8y+QJvzS0u4PGOlZDdh1/1avQ== - -"level-hooks@>=4.4.0 <5": - version "4.5.0" - resolved "https://registry.yarnpkg.com/level-hooks/-/level-hooks-4.5.0.tgz#1b9ae61922930f3305d1a61fc4d83c8102c0dd93" - integrity sha512-fxLNny/vL/G4PnkLhWsbHnEaRi+A/k8r5EH/M77npZwYL62RHi2fV0S824z3QdpAk6VTgisJwIRywzBHLK4ZVA== - dependencies: - string-range "~1.2" - level-iterator-stream@~4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" @@ -14225,18 +13881,6 @@ level-iterator-stream@~4.0.0: readable-stream "^3.4.0" xtend "^4.0.2" -level-js@^2.1.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/level-js/-/level-js-2.2.4.tgz#bc055f4180635d4489b561c9486fa370e8c11697" - integrity sha512-lZtjt4ZwHE00UMC1vAb271p9qzg8vKlnDeXfIesH3zL0KxhHRDjClQLGLWhyR0nK4XARnd4wc/9eD1ffd4PshQ== - dependencies: - abstract-leveldown "~0.12.0" - idb-wrapper "^1.5.0" - isbuffer "~0.0.0" - ltgt "^2.1.2" - typedarray-to-buffer "~1.0.0" - xtend "~2.1.2" - level-js@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/level-js/-/level-js-5.0.2.tgz#5e280b8f93abd9ef3a305b13faf0b5397c969b55" @@ -14255,23 +13899,6 @@ level-packager@^5.1.0: encoding-down "^6.3.0" levelup "^4.3.2" -level-peek@1.0.6, level-peek@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/level-peek/-/level-peek-1.0.6.tgz#bec51c72a82ee464d336434c7c876c3fcbcce77f" - integrity sha512-TKEzH5TxROTjQxWMczt9sizVgnmJ4F3hotBI48xCTYvOKd/4gA/uY0XjKkhJFo6BMic8Tqjf6jFMLWeg3MAbqQ== - dependencies: - level-fix-range "~1.0.2" - -level-sublevel@^5.2.0: - version "5.2.3" - resolved "https://registry.yarnpkg.com/level-sublevel/-/level-sublevel-5.2.3.tgz#744c12c72d2e72be78dde3b9b5cd84d62191413a" - integrity sha512-tO8jrFp+QZYrxx/Gnmjawuh1UBiifpvKNAcm4KCogesWr1Nm2+ckARitf+Oo7xg4OHqMW76eAqQ204BoIlscjA== - dependencies: - level-fix-range "2.0" - level-hooks ">=4.4.0 <5" - string-range "~1.2.1" - xtend "~2.0.4" - level-supports@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-2.1.0.tgz#9af908d853597ecd592293b2fad124375be79c5f" @@ -14329,19 +13956,6 @@ levelup@4.4.0, levelup@^4.3.2: level-supports "~1.0.0" xtend "~4.0.0" -levelup@^0.18.2: - version "0.18.6" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-0.18.6.tgz#e6a01cb089616c8ecc0291c2a9bd3f0c44e3e5eb" - integrity sha512-uB0auyRqIVXx+hrpIUtol4VAPhLRcnxcOsd2i2m6rbFIDarO5dnrupLOStYYpEcu8ZT087Z9HEuYw1wjr6RL6Q== - dependencies: - bl "~0.8.1" - deferred-leveldown "~0.2.0" - errno "~0.1.1" - prr "~0.0.0" - readable-stream "~1.0.26" - semver "~2.3.1" - xtend "~3.0.0" - leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -14752,13 +14366,6 @@ madge@^6.0.0: typescript "^3.9.5" walkdir "^0.4.1" -magic-string@^0.22.5: - version "0.22.5" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" - integrity sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w== - dependencies: - vlq "^0.2.2" - magic-string@^0.25.7: version "0.25.9" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" @@ -14886,15 +14493,6 @@ matcher@^3.0.0: dependencies: escape-string-regexp "^4.0.0" -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - mdn-data@2.0.30: version "2.0.30" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc" @@ -14972,14 +14570,6 @@ micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.3" picomatch "^2.3.1" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - mime-db@1.52.0, "mime-db@>= 1.43.0 < 2", mime-db@^1.28.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -15042,16 +14632,11 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: +minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - "minimatch@2 || 3", minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -15961,20 +15546,6 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-keys@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.2.0.tgz#cddec02998b091be42bf1035ae32e49f1cb6ea67" - integrity sha512-XODjdR2pBh/1qrjPcbSeSgEtKbYo7LqYNq64/TPuCf7j9SfDD3i21yatKoIy39yIWNvVM59iutfQQpCv1RfFzA== - dependencies: - foreach "~2.0.1" - indexof "~0.0.1" - is "~0.2.6" - -object-keys@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" - integrity sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw== - object-sizeof@2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/object-sizeof/-/object-sizeof-2.6.1.tgz#1e2b6a01d182c268dbb07ee3403f539de45f63d3" @@ -16029,11 +15600,6 @@ object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -octal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/octal/-/octal-1.0.0.tgz#63e7162a68efbeb9e213588d58e989d1e5c4530b" - integrity sha512-nnda7W8d+A3vEIY+UrDQzzboPf1vhs4JYVhff5CDkq9QNoZY7Xrxeo/htox37j9dZf7yNHevZzqtejWgy1vCqQ== - omggif@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/omggif/-/omggif-1.0.10.tgz#ddaaf90d4a42f532e9e7cb3a95ecdd47f17c7b19" @@ -16424,18 +15990,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0, parse-asn1@^5.1.7: - version "5.1.7" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.7.tgz#73cdaaa822125f9647165625eb45f8a051d2df06" - integrity sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg== - dependencies: - asn1.js "^4.10.1" - browserify-aes "^1.2.0" - evp_bytestokey "^1.0.3" - hash-base "~3.0" - pbkdf2 "^3.1.2" - safe-buffer "^5.2.1" - parse-bmfont-ascii@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz#11ac3c3ff58f7c2020ab22769079108d4dfa0285" @@ -16669,17 +16223,6 @@ pause@0.0.1: resolved "https://registry.yarnpkg.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" integrity sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg== -pbkdf2@^3.0.3, pbkdf2@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - peek-readable@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/peek-readable/-/peek-readable-4.1.0.tgz#4ece1111bf5c2ad8867c314c81356847e8a62e72" @@ -17454,11 +16997,6 @@ proc-log@^3.0.0: resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8" integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== -process-es6@^0.11.2, process-es6@^0.11.6: - version "0.11.6" - resolved "https://registry.yarnpkg.com/process-es6/-/process-es6-0.11.6.tgz#c6bb389f9a951f82bd4eb169600105bd2ff9c778" - integrity sha512-GYBRQtL4v3wgigq10Pv58jmTbFXlIiTbSfgnNqZLY0ldUPqy1rRxDI5fCjoCpnM6TqmHQI8ydzTBXW86OYc0gA== - process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -17573,11 +17111,6 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" - integrity sha512-LmUECmrW7RVj6mDWKjTXfKug7TFGdiz9P18HMcO4RHL+RW7MCOGNvpj5j47Rnp6ne6r4fZ2VzyUWEpKbg+tsjQ== - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -17598,18 +17131,6 @@ pstree.remy@^1.1.8: resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -17723,21 +17244,13 @@ quote-unquote@^1.0.0: resolved "https://registry.yarnpkg.com/quote-unquote/-/quote-unquote-1.0.0.tgz#67a9a77148effeaf81a4d428404a710baaac8a0b" integrity sha512-twwRO/ilhlG/FIgYeKGFqyHhoEhqgnKVkcmqMKi2r524gz3ZbDTcyFt38E9xjJI2vT+KbRNHVbnJ/e0I25Azwg== -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: +randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - randomstring@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/randomstring/-/randomstring-1.1.5.tgz#6df0628f75cbd5932930d9fe3ab4e956a18518c3" @@ -17846,7 +17359,7 @@ read@^2.0.0: dependencies: mute-stream "~1.0.0" -readable-stream@1.1.14, readable-stream@^1.0.26-4, readable-stream@^1.0.27-1: +readable-stream@1.1.14, readable-stream@^1.0.27-1: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" integrity sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ== @@ -17865,7 +17378,7 @@ readable-stream@1.1.14, readable-stream@^1.0.26-4, readable-stream@^1.0.27-1: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@^2.3.8, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== @@ -17894,7 +17407,7 @@ readable-stream@~0.0.2: resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-0.0.4.tgz#f32d76e3fb863344a548d79923007173665b3b8d" integrity sha512-azrivNydKRYt7zwLV5wWUK7YzKTWs3q87xSmY6DlHapPrCvaT6ZrukvM5erV+yCSSPmZT8zkSdttOHQpWWm9zw== -readable-stream@~1.0.26, readable-stream@~1.0.26-4, readable-stream@~1.0.31: +readable-stream@~1.0.31: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== @@ -18209,7 +17722,7 @@ resolve.exports@^2.0.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.0.tgz#c1a0028c2d166ec2fbf7d0644584927e76e7400e" integrity sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg== -resolve@^1.10.0, resolve@^1.11.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.1, resolve@^1.22.3, resolve@^1.22.4: +resolve@^1.10.0, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.1, resolve@^1.22.3, resolve@^1.22.4: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -18276,14 +17789,6 @@ rimraf@^4.4.1: dependencies: glob "^9.2.0" -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - roarr@^2.15.3: version "2.15.4" resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.4.tgz#f5fe795b7b838ccfe35dc608e0282b9eba2e7afd" @@ -18296,46 +17801,6 @@ roarr@^2.15.3: semver-compare "^1.0.0" sprintf-js "^1.1.2" -rollup-plugin-inject-process-env@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-inject-process-env/-/rollup-plugin-inject-process-env-1.3.1.tgz#2d7660fe76f2b221b976cb35597763ffcaad3db3" - integrity sha512-kKDoL30IZr0wxbNVJjq+OS92RJSKRbKV6B5eNW4q3mZTFqoWDh6lHy+mPDYuuGuERFNKXkG+AKxvYqC9+DRpKQ== - dependencies: - magic-string "^0.25.7" - -rollup-plugin-node-builtins@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-builtins/-/rollup-plugin-node-builtins-2.1.2.tgz#24a1fed4a43257b6b64371d8abc6ce1ab14597e9" - integrity sha512-bxdnJw8jIivr2yEyt8IZSGqZkygIJOGAWypXvHXnwKAbUcN4Q/dGTx7K0oAJryC/m6aq6tKutltSeXtuogU6sw== - dependencies: - browserify-fs "^1.0.0" - buffer-es6 "^4.9.2" - crypto-browserify "^3.11.0" - process-es6 "^0.11.2" - -rollup-plugin-node-globals@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-globals/-/rollup-plugin-node-globals-1.4.0.tgz#5e1f24a9bb97c0ef51249f625e16c7e61b7c020b" - integrity sha512-xRkB+W/m1KLIzPUmG0ofvR+CPNcvuCuNdjVBVS7ALKSxr3EDhnzNceGkGi1m8MToSli13AzKFYH4ie9w3I5L3g== - dependencies: - acorn "^5.7.3" - buffer-es6 "^4.9.3" - estree-walker "^0.5.2" - magic-string "^0.22.5" - process-es6 "^0.11.6" - rollup-pluginutils "^2.3.1" - -rollup-plugin-node-resolve@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523" - integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw== - dependencies: - "@types/resolve" "0.0.8" - builtin-modules "^3.1.0" - is-module "^1.0.0" - resolve "^1.11.1" - rollup-pluginutils "^2.8.1" - rollup-plugin-polyfill-node@^0.13.0: version "0.13.0" resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.13.0.tgz#28e5705b59438da894e55133a0fe7a86b57d9b0a" @@ -18358,7 +17823,7 @@ rollup-plugin-web-worker-loader@^1.6.1: resolved "https://registry.yarnpkg.com/rollup-plugin-web-worker-loader/-/rollup-plugin-web-worker-loader-1.6.1.tgz#9d7a27575b64b0780fe4e8b3bc87470d217e485f" integrity sha512-4QywQSz1NXFHKdyiou16mH3ijpcfLtLGOrAqvAqu1Gx+P8+zj+3gwC2BSL/VW1d+LW4nIHC8F7d7OXhs9UdR2A== -rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: +rollup-pluginutils@^2.8.2: version "2.8.2" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== @@ -18462,7 +17927,7 @@ safe-array-concat@^1.1.2: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -18592,7 +18057,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -"semver@2 || 3 || 4 || 5", semver@7.5.3, semver@^5.6.0, semver@^5.7.1, semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2, semver@~2.3.1: +"semver@2 || 3 || 4 || 5", semver@7.5.3, semver@^5.6.0, semver@^5.7.1, semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2: version "7.5.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== @@ -18672,14 +18137,6 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" @@ -19235,11 +18692,6 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-range@~1.2, string-range@~1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/string-range/-/string-range-1.2.2.tgz#a893ed347e72299bc83befbbf2a692a8d239d5dd" - integrity sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w== - "string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -20358,11 +19810,6 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typedarray-to-buffer@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-1.0.4.tgz#9bb8ba0e841fb3f4cf1fe7c245e9f3fa8a5fe99c" - integrity sha512-vjMKrfSoUDN8/Vnqitw2FmstOfuJ73G6CrSEKnf11A6RmasVxHqfeBcnTb6RsL4pTMuV5Zsv9IiHRphMZyckUw== - typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -20846,11 +20293,6 @@ vitest@^0.29.2: vite-node "0.29.8" why-is-node-running "^2.2.2" -vlq@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" - integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== - vuvuzela@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz#3be145e58271c73ca55279dd851f12a682114b0b" @@ -21296,36 +20738,11 @@ xmlhttprequest-ssl@~2.0.0: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== -xtend@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.2.0.tgz#eef6b1f198c1c8deafad8b1765a04dad4a01c5a9" - integrity sha512-SLt5uylT+4aoXxXuwtQp5ZnMMzhDb1Xkg4pEqc00WUJCQifPfV9Ub1VrNhp9kXkrjZD2I2Hl8WnjP37jzZLPZw== - xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -xtend@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.0.6.tgz#5ea657a6dba447069c2e59c58a1138cb0c5e6cee" - integrity sha512-fOZg4ECOlrMl+A6Msr7EIFcON1L26mb4NY5rurSkOex/TWhazOrg6eXD/B0XkuiYcYhQDWLXzQxLMVJ7LXwokg== - dependencies: - is-object "~0.1.2" - object-keys "~0.2.0" - -xtend@~2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" - integrity sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ== - dependencies: - object-keys "~0.4.0" - -xtend@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a" - integrity sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg== - y18n@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" From 7169fc8096c5becdb4b9bf440e20973d4977a9cb Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 10 Dec 2024 12:18:27 +0100 Subject: [PATCH 53/68] Clean --- packages/string-templates/rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/string-templates/rollup.config.js b/packages/string-templates/rollup.config.js index 1664c2e782..d06efc3539 100644 --- a/packages/string-templates/rollup.config.js +++ b/packages/string-templates/rollup.config.js @@ -25,7 +25,7 @@ const config = (input, outputFile, format) => ({ typescript({ moduleResolution: "node", }), - polyfillNode(), // Replaces Node.js built-ins for browser compatibility + polyfillNode(), resolve({ preferBuiltins: true, browser: true, From de41404188eec3d81488e0d2cc9f647b267cf9e5 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 10 Dec 2024 12:49:43 +0000 Subject: [PATCH 54/68] Fixing generated readme workflow. --- .github/workflows/readme-openapi.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/readme-openapi.yml b/.github/workflows/readme-openapi.yml index 14e9887dd6..b52787934f 100644 --- a/.github/workflows/readme-openapi.yml +++ b/.github/workflows/readme-openapi.yml @@ -20,9 +20,4 @@ jobs: - run: yarn --frozen-lockfile - name: update specs - run: cd packages/server && yarn specs - - - name: Run `openapi` command - uses: readmeio/rdme@v8 - with: - rdme: openapi specs/openapi.yaml --key=${{ secrets.README_API_KEY }} --id=6728a74f5918b50036c61841 + run: cd packages/server && yarn specs && openapi specs/openapi.yaml --key=${{ secrets.README_API_KEY }} --id=6728a74f5918b50036c61841 From 4b75e3d1dc3e189f6cfb71e8448f1213ea8a4a80 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 10 Dec 2024 13:10:27 +0000 Subject: [PATCH 55/68] Updating how we list columns from a table - to avoid using to_regclass which is not available in Postgres 9.5. --- packages/server/src/integrations/postgres.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index 5551d33778..33c2d76a96 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -173,8 +173,13 @@ class PostgresIntegration extends Sql implements DatasourcePlus { ` COLUMNS_SQL = () => ` - select * from information_schema.columns where table_schema = ANY(current_schemas(false)) - AND pg_table_is_visible(to_regclass(format('%I.%I', table_schema, table_name))); + SELECT columns.* + FROM information_schema.columns columns + JOIN pg_class pg_class ON pg_class.relname = columns.table_name + JOIN pg_namespace name_space ON name_space.oid = pg_class.relnamespace + WHERE columns.table_schema = ANY(current_schemas(false)) + AND columns.table_schema = name_space.nspname + AND pg_table_is_visible(pg_class.oid); ` constructor(config: PostgresConfig) { From 322dc2e5a62ced845dfa4c045f3ca1540b795b17 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 10 Dec 2024 13:33:38 +0000 Subject: [PATCH 56/68] Adding legacy postgres option. --- .../server/src/integration-test/postgres.spec.ts | 5 +++-- .../server/src/integrations/tests/utils/images.ts | 1 + .../server/src/integrations/tests/utils/index.ts | 3 +++ .../src/integrations/tests/utils/postgres.ts | 14 +++++++++++--- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/server/src/integration-test/postgres.spec.ts b/packages/server/src/integration-test/postgres.spec.ts index 88250373f8..6e674aa58e 100644 --- a/packages/server/src/integration-test/postgres.spec.ts +++ b/packages/server/src/integration-test/postgres.spec.ts @@ -1,5 +1,4 @@ import { Datasource, FieldType, Table } from "@budibase/types" -import _ from "lodash" import { generator } from "@budibase/backend-core/tests" import { DatabaseName, @@ -8,7 +7,9 @@ import { } from "../integrations/tests/utils" import { Knex } from "knex" -const mainDescriptions = datasourceDescribe({ only: [DatabaseName.POSTGRES] }) +const mainDescriptions = datasourceDescribe({ + only: [DatabaseName.POSTGRES, DatabaseName.POSTGRES_LEGACY], +}) if (mainDescriptions.length) { describe.each(mainDescriptions)( diff --git a/packages/server/src/integrations/tests/utils/images.ts b/packages/server/src/integrations/tests/utils/images.ts index 8c2bb9b220..00686412c6 100644 --- a/packages/server/src/integrations/tests/utils/images.ts +++ b/packages/server/src/integrations/tests/utils/images.ts @@ -9,5 +9,6 @@ dotenv.config({ export const MSSQL_IMAGE = `mcr.microsoft.com/mssql/server@${process.env.MSSQL_SHA}` export const MYSQL_IMAGE = `mysql@${process.env.MYSQL_SHA}` export const POSTGRES_IMAGE = `postgres@${process.env.POSTGRES_SHA}` +export const POSTGRES_LEGACY_IMAGE = `postgres:9.5.25` export const MONGODB_IMAGE = `mongo@${process.env.MONGODB_SHA}` export const MARIADB_IMAGE = `mariadb@${process.env.MARIADB_SHA}` diff --git a/packages/server/src/integrations/tests/utils/index.ts b/packages/server/src/integrations/tests/utils/index.ts index cdf2c4021c..9f443c3988 100644 --- a/packages/server/src/integrations/tests/utils/index.ts +++ b/packages/server/src/integrations/tests/utils/index.ts @@ -9,6 +9,7 @@ import * as oracle from "./oracle" import { testContainerUtils } from "@budibase/backend-core/tests" import { Knex } from "knex" import TestConfiguration from "../../../tests/utilities/TestConfiguration" +import { getLegacyDatasource } from "./postgres" export type DatasourceProvider = () => Promise @@ -16,6 +17,7 @@ export const { startContainer } = testContainerUtils export enum DatabaseName { POSTGRES = "postgres", + POSTGRES_LEGACY = "postgres_legacy", MONGODB = "mongodb", MYSQL = "mysql", SQL_SERVER = "mssql", @@ -26,6 +28,7 @@ export enum DatabaseName { const providers: Record = { [DatabaseName.POSTGRES]: postgres.getDatasource, + [DatabaseName.POSTGRES_LEGACY]: postgres.getLegacyDatasource, [DatabaseName.MONGODB]: mongodb.getDatasource, [DatabaseName.MYSQL]: mysql.getDatasource, [DatabaseName.SQL_SERVER]: mssql.getDatasource, diff --git a/packages/server/src/integrations/tests/utils/postgres.ts b/packages/server/src/integrations/tests/utils/postgres.ts index fc52a724ad..cca127e84f 100644 --- a/packages/server/src/integrations/tests/utils/postgres.ts +++ b/packages/server/src/integrations/tests/utils/postgres.ts @@ -3,14 +3,14 @@ import { GenericContainer, Wait } from "testcontainers" import { generator, testContainerUtils } from "@budibase/backend-core/tests" import { startContainer } from "." import knex, { Knex } from "knex" -import { POSTGRES_IMAGE } from "./images" +import { POSTGRES_IMAGE, POSTGRES_LEGACY_IMAGE } from "./images" let ports: Promise -export async function getDatasource(): Promise { +async function datasourceWithImage(image: string): Promise { if (!ports) { ports = startContainer( - new GenericContainer(POSTGRES_IMAGE) + new GenericContainer(image) .withExposedPorts(5432) .withEnvironment({ POSTGRES_PASSWORD: "password" }) .withWaitStrategy( @@ -51,6 +51,14 @@ export async function getDatasource(): Promise { return datasource } +export async function getDatasource(): Promise { + return datasourceWithImage(POSTGRES_IMAGE) +} + +export async function getLegacyDatasource(): Promise { + return datasourceWithImage(POSTGRES_LEGACY_IMAGE) +} + export async function knexClient( ds: Datasource, opts?: Knex.Config From 36f8ae45fe468ca4a015733b58fd4e0b82e2e037 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 10 Dec 2024 14:17:46 +0000 Subject: [PATCH 57/68] Rejig the filtering behaviour in the builder around empty config. Empty filters wont cause errors on load and will clear when they are saved --- .../FlowChart/BranchNode.svelte | 11 ++++---- .../SetupPanel/AutomationBlockSetup.svelte | 5 ++-- .../buttons/TableFilterButton.svelte | 4 +-- .../controls/FilterEditor/FilterEditor.svelte | 5 ++-- .../app/dynamic-filter/DynamicFilter.svelte | 3 ++- packages/frontend-core/src/utils/utils.js | 25 +++++++++++++++++++ packages/shared-core/src/filters.ts | 4 +-- 7 files changed, 42 insertions(+), 15 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/BranchNode.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/BranchNode.svelte index 670067ea26..c9205d0254 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/BranchNode.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/BranchNode.svelte @@ -19,7 +19,7 @@ import FlowItemHeader from "./FlowItemHeader.svelte" import FlowItemActions from "./FlowItemActions.svelte" import { automationStore, selectedAutomation } from "stores/builder" - import { QueryUtils } from "@budibase/frontend-core" + import { QueryUtils, Utils } from "@budibase/frontend-core" import { cloneDeep } from "lodash/fp" import { createEventDispatcher, getContext } from "svelte" import DragZone from "./DragZone.svelte" @@ -36,13 +36,11 @@ const view = getContext("draggableView") let drawer - let condition let open = true let confirmDeleteModal $: branch = step.inputs?.branches?.[branchIdx] - $: editableConditionUI = cloneDeep(branch.conditionUI || {}) - $: condition = QueryUtils.buildQuery(editableConditionUI) + $: editableConditionUI = branch.conditionUI || {} // Parse all the bindings into fields for the condition builder $: schemaFields = bindings.map(binding => { @@ -80,9 +78,10 @@ slot="buttons" on:click={() => { drawer.hide() + const updatedConditionsUI = Utils.parseFilter(editableConditionUI) dispatch("change", { - conditionUI: editableConditionUI, - condition, + conditionUI: updatedConditionsUI, + condition: QueryUtils.buildQuery(updatedConditionsUI), }) }} > diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 3faf9140f4..ab01b56152 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -594,10 +594,11 @@ } function saveFilters(key) { - const query = QueryUtils.buildQuery(tempFilters) + const update = Utils.parseFilter(tempFilters) + const query = QueryUtils.buildQuery(update) onChange({ [key]: query, - [`${key}-def`]: tempFilters, // need to store the builder definition in the automation + [`${key}-def`]: update, // need to store the builder definition in the automation }) drawer.hide() diff --git a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte index c6103b1697..d4a71c9ef8 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte @@ -4,7 +4,7 @@ import FilterBuilder from "components/design/settings/controls/FilterEditor/FilterBuilder.svelte" import { getUserBindings } from "dataBinding" import { makePropSafe } from "@budibase/string-templates" - import { search } from "@budibase/frontend-core" + import { search, Utils } from "@budibase/frontend-core" import { tables } from "stores/builder" import DetailPopover from "components/common/DetailPopover.svelte" @@ -73,7 +73,7 @@ cta slot="buttons" on:click={() => { - dispatch("change", localFilters) + dispatch("change", Utils.parseFilter(localFilters)) popover.hide() }} > diff --git a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterEditor.svelte b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterEditor.svelte index c48cc3b8ce..b8a6b86b4d 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterEditor.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterEditor.svelte @@ -10,7 +10,7 @@ import { getDatasourceForProvider, getSchemaForDatasource } from "dataBinding" import FilterBuilder from "./FilterBuilder.svelte" import { tables, selectedScreen } from "stores/builder" - import { search } from "@budibase/frontend-core" + import { search, Utils } from "@budibase/frontend-core" import { utils } from "@budibase/shared-core" const dispatch = createEventDispatcher() @@ -33,7 +33,8 @@ $: text = getText(value) async function saveFilter() { - dispatch("change", localFilters) + const update = Utils.parseFilter(localFilters) + dispatch("change", update) notifications.success("Filters saved") drawer.hide() } diff --git a/packages/client/src/components/app/dynamic-filter/DynamicFilter.svelte b/packages/client/src/components/app/dynamic-filter/DynamicFilter.svelte index 4ab01de17d..28858f3112 100644 --- a/packages/client/src/components/app/dynamic-filter/DynamicFilter.svelte +++ b/packages/client/src/components/app/dynamic-filter/DynamicFilter.svelte @@ -6,6 +6,7 @@ QueryUtils, Constants, CoreFilterBuilder, + Utils, } from "@budibase/frontend-core" import Button from "../Button.svelte" @@ -95,7 +96,7 @@ } const updateQuery = () => { - filters = editableFilters + filters = Utils.parseFilter(editableFilters) } onDestroy(() => { diff --git a/packages/frontend-core/src/utils/utils.js b/packages/frontend-core/src/utils/utils.js index fef9a7a31b..c424aea5b2 100644 --- a/packages/frontend-core/src/utils/utils.js +++ b/packages/frontend-core/src/utils/utils.js @@ -1,5 +1,6 @@ import { makePropSafe as safe } from "@budibase/string-templates" import { Helpers } from "@budibase/bbui" +import { cloneDeep } from "lodash" export const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)) @@ -351,3 +352,27 @@ export const buildMultiStepFormBlockDefaultProps = props => { title, } } + +/** + * Parse out empty or invalid UI filters and clear empty groups + * @param {Object} filter UI filter + * @returns {Object} parsed filter + */ +export function parseFilter(filter) { + if (!filter?.groups) { + return filter + } + + const update = cloneDeep(filter) + + update.groups = update.groups + .map(group => { + group.filters = group.filters.filter(filter => { + return filter.field && filter.operator + }) + return group.filters.length ? group : null + }) + .filter(group => group) + + return update +} diff --git a/packages/shared-core/src/filters.ts b/packages/shared-core/src/filters.ts index 61950fd523..a023015b7e 100644 --- a/packages/shared-core/src/filters.ts +++ b/packages/shared-core/src/filters.ts @@ -298,7 +298,8 @@ export class ColumnSplitter { function buildCondition(filter: undefined): undefined function buildCondition(filter: SearchFilter): SearchFilters function buildCondition(filter?: SearchFilter): SearchFilters | undefined { - if (!filter) { + // Ignore empty or invalid filters + if (!filter || !filter?.operator || !filter?.field) { return } @@ -475,7 +476,6 @@ export function buildQuery( if (group.logicalOperator) { operator = logicalOperatorFromUI(group.logicalOperator) } - return { [operator]: { conditions: filters.map(buildCondition).filter(f => f) }, } From 50323a44599e69f2ee306d5a4beaaf24885bd8b8 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 10 Dec 2024 15:52:08 +0000 Subject: [PATCH 58/68] Bump version to 3.2.27 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index afd0db6374..d893fc97bd 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "3.2.26", + "version": "3.2.27", "npmClient": "yarn", "concurrency": 20, "command": { From 340d9c34ffd6eba7d4fb591da8ce5c69d58a5151 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 10 Dec 2024 17:30:54 +0000 Subject: [PATCH 59/68] Linting and CI update. --- .github/workflows/budibase_ci.yml | 2 +- packages/server/src/integrations/tests/utils/index.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 2151e1e342..5eea636b5d 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -155,7 +155,7 @@ jobs: strategy: matrix: datasource: - [mssql, mysql, postgres, mongodb, mariadb, oracle, sqs, none] + [mssql, mysql, postgres, postgres_legacy, mongodb, mariadb, oracle, sqs, none] steps: - name: Checkout repo uses: actions/checkout@v4 diff --git a/packages/server/src/integrations/tests/utils/index.ts b/packages/server/src/integrations/tests/utils/index.ts index 9f443c3988..00aff70b13 100644 --- a/packages/server/src/integrations/tests/utils/index.ts +++ b/packages/server/src/integrations/tests/utils/index.ts @@ -9,7 +9,6 @@ import * as oracle from "./oracle" import { testContainerUtils } from "@budibase/backend-core/tests" import { Knex } from "knex" import TestConfiguration from "../../../tests/utilities/TestConfiguration" -import { getLegacyDatasource } from "./postgres" export type DatasourceProvider = () => Promise From 07c24c16a467aebc17e4d8d273e7165522edfaa1 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 10 Dec 2024 18:00:49 +0000 Subject: [PATCH 60/68] Updating CI and adding postgres legacy to test suite fully. Also fixing a schema export issue. --- .github/workflows/budibase_ci.yml | 2 ++ .../server/src/api/routes/tests/datasource.spec.ts | 11 +++++++++-- packages/server/src/integrations/tests/utils/index.ts | 6 +++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 5eea636b5d..e2f000cf7e 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -190,6 +190,8 @@ jobs: docker pull mariadb@${{ steps.dotenv.outputs.MARIADB_SHA }} elif [ "${{ matrix.datasource }}" == "oracle" ]; then docker pull budibase/oracle-database:23.2-slim-faststart + elif [ "${{ matrix.datasource }}" == "postgres_legacy" ]; then + docker pull postgres:9.5.25 fi docker pull minio/minio & docker pull redis & diff --git a/packages/server/src/api/routes/tests/datasource.spec.ts b/packages/server/src/api/routes/tests/datasource.spec.ts index 514ed02c86..babb44b329 100644 --- a/packages/server/src/api/routes/tests/datasource.spec.ts +++ b/packages/server/src/api/routes/tests/datasource.spec.ts @@ -590,13 +590,13 @@ if (descriptions.length) { } const datasources = datasourceDescribe({ - exclude: [DatabaseName.MONGODB, DatabaseName.SQS, DatabaseName.ORACLE], + only: [DatabaseName.POSTGRES_LEGACY], }) if (datasources.length) { describe.each(datasources)( "$dbName", - ({ config, dsProvider, isPostgres, isMySQL, isMariaDB }) => { + ({ config, dsProvider, isPostgres, isLegacy, isMySQL, isMariaDB }) => { let datasource: Datasource let client: Knex @@ -647,6 +647,13 @@ if (datasources.length) { // can load it. We're using postgres 16 in tests at the time of writing. schema = schema.replace("SET transaction_timeout = 0;", "") } + if (isPostgres && isLegacy) { + // in older versions of Postgres, this is not a valid option - Postgres 9.5 does not support this. + schema = schema.replace( + "SET idle_in_transaction_session_timeout = 0;", + "" + ) + } await config.api.table.destroy(table._id!, table._rev!) diff --git a/packages/server/src/integrations/tests/utils/index.ts b/packages/server/src/integrations/tests/utils/index.ts index 00aff70b13..9e2c4f7e70 100644 --- a/packages/server/src/integrations/tests/utils/index.ts +++ b/packages/server/src/integrations/tests/utils/index.ts @@ -147,7 +147,11 @@ export function datasourceDescribe(opts: DatasourceDescribeOpts) { DatabaseName.ORACLE, ].includes(dbName), isMySQL: dbName === DatabaseName.MYSQL, - isPostgres: dbName === DatabaseName.POSTGRES, + isPostgres: + dbName === DatabaseName.POSTGRES || + dbName === DatabaseName.POSTGRES_LEGACY, + // check if any of the legacy tags + isLegacy: dbName === DatabaseName.POSTGRES_LEGACY, isMongodb: dbName === DatabaseName.MONGODB, isMSSQL: dbName === DatabaseName.SQL_SERVER, isOracle: dbName === DatabaseName.ORACLE, From 2f1b6d007dc3b6243d3297155abf5584bb587c66 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 11 Dec 2024 11:52:34 +0100 Subject: [PATCH 61/68] Fix string-templates on dev --- packages/string-templates/rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/string-templates/rollup.config.js b/packages/string-templates/rollup.config.js index d06efc3539..cfe78aee57 100644 --- a/packages/string-templates/rollup.config.js +++ b/packages/string-templates/rollup.config.js @@ -32,7 +32,7 @@ const config = (input, outputFile, format) => ({ }), commonjs(), json(), - inject({ Buffer: ["buffer", "Buffer"] }), + inject({ Buffer: ["buffer", "Buffer"], process: "process/browser" }), production && terser(), ], }) From 6fd45839c01e134c6ba037b2320125090a98f3bd Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 11 Dec 2024 15:09:20 +0100 Subject: [PATCH 62/68] Don't minify client on dev mode --- packages/client/package.json | 2 +- packages/client/vite.config.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/package.json b/packages/client/package.json index 7c266bba1d..2ae049f6d0 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -16,7 +16,7 @@ }, "scripts": { "build": "vite build", - "dev": "vite build --watch" + "dev": "vite build --watch --mode=dev" }, "dependencies": { "@budibase/bbui": "*", diff --git a/packages/client/vite.config.mjs b/packages/client/vite.config.mjs index 9c623b709f..22f451fadd 100644 --- a/packages/client/vite.config.mjs +++ b/packages/client/vite.config.mjs @@ -25,8 +25,8 @@ export default defineConfig(({ mode }) => { outDir: "dist", name: "budibase_client", fileName: () => "budibase-client.js", - minify: isProduction, }, + minify: isProduction, }, plugins: [ svelte({ From ec27d3ee4e270be6d13e796457991d1b5336b665 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 11 Dec 2024 17:04:13 +0100 Subject: [PATCH 63/68] Fix checking role hierarchy when having a single role --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index 977baca179..466e181a1f 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 977baca179fef1192f8fe051122288a4128f7a63 +Subproject commit 466e181a1f9cc74372077be4482f38e3e4b77492 From 81bf8783f2f1ecee403600407c83f963ddfb50ff Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 12 Dec 2024 10:55:05 +0100 Subject: [PATCH 64/68] Add tests --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index 466e181a1f..985e54cb79 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 466e181a1f9cc74372077be4482f38e3e4b77492 +Subproject commit 985e54cb79aeacc878073ef3db3e447763891989 From 96f149a96d8941ee39daa30a28e379eec6a73d3c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 12 Dec 2024 11:29:19 +0000 Subject: [PATCH 65/68] PR comments. --- packages/server/src/api/routes/tests/datasource.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/routes/tests/datasource.spec.ts b/packages/server/src/api/routes/tests/datasource.spec.ts index babb44b329..21e9effa77 100644 --- a/packages/server/src/api/routes/tests/datasource.spec.ts +++ b/packages/server/src/api/routes/tests/datasource.spec.ts @@ -590,7 +590,7 @@ if (descriptions.length) { } const datasources = datasourceDescribe({ - only: [DatabaseName.POSTGRES_LEGACY], + exclude: [DatabaseName.MONGODB, DatabaseName.SQS, DatabaseName.ORACLE], }) if (datasources.length) { From a636dbac58372cb2f6fb649c37e6ebf1fb28dca3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:31:25 +0000 Subject: [PATCH 66/68] Bump nanoid from 3.3.7 to 3.3.8 in /examples/nextjs-api-sales Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] --- examples/nextjs-api-sales/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/nextjs-api-sales/yarn.lock b/examples/nextjs-api-sales/yarn.lock index d4ba8a29a5..40bf33da70 100644 --- a/examples/nextjs-api-sales/yarn.lock +++ b/examples/nextjs-api-sales/yarn.lock @@ -1244,9 +1244,9 @@ ms@^2.1.1: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== nanoid@^3.3.6: - version "3.3.7" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" - integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== natural-compare@^1.4.0: version "1.4.0" From 3d74a39408ebdd4712aa537a359c11c7f02b271f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 12 Dec 2024 12:40:01 +0100 Subject: [PATCH 67/68] Update pro submodule --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index 985e54cb79..e7c9f08aeb 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 985e54cb79aeacc878073ef3db3e447763891989 +Subproject commit e7c9f08aeb0498a20594f3c912afedcfdc220a6a From 1c5a973ec0a562e94abee92e8cfc042e7452276a Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 12 Dec 2024 12:06:09 +0000 Subject: [PATCH 68/68] Bump version to 3.2.28 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index d893fc97bd..055b5c3ce7 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "3.2.27", + "version": "3.2.28", "npmClient": "yarn", "concurrency": 20, "command": {