lint: migrate prettier to oxfmt (#20783)

Most changes are `implements` being unwrapped this is not a oxfmt
regression
Prettier in 3.7 (we're on 3.1) changed this behaviour prettier blog
[post](https://prettier.io/blog/2025/11/27/3.7.0#change-18094)

This unifies our linting tooling

---------

Co-authored-by: github-actions <github-actions@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
neo773
2026-05-22 03:51:33 +05:30
committed by GitHub
parent e2ee4ffdff
commit 323e66433e
421 changed files with 1362 additions and 2042 deletions
+27
View File
@@ -0,0 +1,27 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"singleQuote": true,
"trailingComma": "all",
"endOfLine": "lf",
"printWidth": 80,
"sortPackageJson": false,
"ignorePatterns": [
"**/dist/**",
"**/build/**",
"**/lib/**",
"**/.next/**",
"**/coverage/**",
"**/generated/**",
"**/generated-admin/**",
"**/generated-metadata/**",
"**/.cache/**",
"**/node_modules/**",
"**/*.min.js",
"**/*.snap",
"**/*.md",
"**/*.mdx",
"**/seed-project/**/*.mjs",
"packages/twenty-zapier/build/**",
"**/upgrade-version-command/**"
]
}
+9 -13
View File
@@ -44,12 +44,12 @@
"cache": true, "cache": true,
"options": { "options": {
"cwd": "{projectRoot}", "cwd": "{projectRoot}",
"command": "npx oxlint -c .oxlintrc.json . && (prettier . --check --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint --configuration=fix' && false))" "command": "npx oxlint -c .oxlintrc.json . && (npx oxfmt --check . || (echo 'ERROR: oxfmt formatting check failed! Fix with: npx nx lint --configuration=fix' && false))"
}, },
"configurations": { "configurations": {
"ci": {}, "ci": {},
"fix": { "fix": {
"command": "npx oxlint --fix -c .oxlintrc.json . && prettier . --write --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata" "command": "npx oxlint --fix -c .oxlintrc.json . && npx oxfmt ."
} }
}, },
"dependsOn": ["^build", "twenty-oxlint-rules:build"] "dependsOn": ["^build", "twenty-oxlint-rules:build"]
@@ -59,12 +59,12 @@
"cache": false, "cache": false,
"dependsOn": ["twenty-oxlint-rules:build"], "dependsOn": ["twenty-oxlint-rules:build"],
"options": { "options": {
"command": "FILES=$(git diff --name-only --diff-filter=d main -- {projectRoot}/ | grep -E '{args.pattern}'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint -c {projectRoot}/.oxlintrc.json $FILES && (prettier --check $FILES || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint:diff-with-main --configuration=fix' && false)))", "command": "FILES=$(git diff --name-only --diff-filter=d main -- {projectRoot}/ | grep -E '{args.pattern}'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint -c {projectRoot}/.oxlintrc.json $FILES && (npx oxfmt --check $FILES || (echo 'ERROR: oxfmt formatting check failed! Fix with: npx nx lint:diff-with-main --configuration=fix' && false)))",
"pattern": "\\.(ts|tsx|js|jsx)$" "pattern": "\\.(ts|tsx|js|jsx)$"
}, },
"configurations": { "configurations": {
"fix": { "fix": {
"command": "FILES=$(git diff --name-only --diff-filter=d main -- {projectRoot}/ | grep -E '{args.pattern}'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --fix -c {projectRoot}/.oxlintrc.json $FILES && prettier --write $FILES)" "command": "FILES=$(git diff --name-only --diff-filter=d main -- {projectRoot}/ | grep -E '{args.pattern}'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --fix -c {projectRoot}/.oxlintrc.json $FILES && npx oxfmt $FILES)"
} }
} }
}, },
@@ -73,18 +73,14 @@
"cache": true, "cache": true,
"options": { "options": {
"cwd": "{projectRoot}", "cwd": "{projectRoot}",
"command": "prettier {args.files} --check --cache {args.cache} --cache-location {args.cacheLocation} --write {args.write} --cache-strategy {args.cacheStrategy}", "command": "npx oxfmt --check {args.files} {args.write}",
"cache": true, "files": ".",
"cacheLocation": "../../.cache/prettier/{projectRoot}", "write": ""
"cacheStrategy": "metadata",
"write": false
}, },
"configurations": { "configurations": {
"ci": { "ci": {},
"cacheStrategy": "content"
},
"fix": { "fix": {
"write": true "command": "npx oxfmt {args.files}"
} }
}, },
"dependsOn": ["^build"] "dependsOn": ["^build"]
+1
View File
@@ -13,6 +13,7 @@
"concurrently": "^8.2.2", "concurrently": "^8.2.2",
"http-server": "^14.1.1", "http-server": "^14.1.1",
"nx": "22.5.4", "nx": "22.5.4",
"oxfmt": "0.50.0",
"tsx": "^4.17.0", "tsx": "^4.17.0",
"verdaccio": "^6.3.1" "verdaccio": "^6.3.1"
}, },
+26 -14
View File
@@ -4,7 +4,10 @@
"ignorePatterns": ["node_modules", ".next", "storybook-static"], "ignorePatterns": ["node_modules", ".next", "storybook-static"],
"rules": { "rules": {
"func-style": ["error", "declaration", { "allowArrowFunctions": true }], "func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"no-console": ["warn", { "allow": ["group", "groupCollapsed", "groupEnd"] }], "no-console": [
"warn",
{ "allow": ["group", "groupCollapsed", "groupEnd"] }
],
"no-control-regex": "off", "no-control-regex": "off",
"no-debugger": "error", "no-debugger": "error",
"no-duplicate-imports": "error", "no-duplicate-imports": "error",
@@ -13,22 +16,31 @@
"no-redeclare": "off", "no-redeclare": "off",
"import/no-duplicates": "error", "import/no-duplicates": "error",
"typescript/no-redeclare": "error", "typescript/no-redeclare": "error",
"typescript/consistent-type-imports": ["error", { "typescript/consistent-type-imports": [
"prefer": "type-imports", "error",
"fixStyle": "inline-type-imports" {
}], "prefer": "type-imports",
"fixStyle": "inline-type-imports"
}
],
"typescript/explicit-function-return-type": "off", "typescript/explicit-function-return-type": "off",
"typescript/explicit-module-boundary-types": "off", "typescript/explicit-module-boundary-types": "off",
"typescript/no-empty-object-type": ["error", { "typescript/no-empty-object-type": [
"allowInterfaces": "with-single-extends" "error",
}], {
"allowInterfaces": "with-single-extends"
}
],
"typescript/no-empty-function": "off", "typescript/no-empty-function": "off",
"typescript/no-explicit-any": "off", "typescript/no-explicit-any": "off",
"typescript/no-unused-vars": ["warn", { "typescript/no-unused-vars": [
"vars": "all", "warn",
"varsIgnorePattern": "^_", {
"args": "after-used", "vars": "all",
"argsIgnorePattern": "^_" "varsIgnorePattern": "^_",
}] "args": "after-used",
"argsIgnorePattern": "^_"
}
]
} }
} }
+6 -6
View File
@@ -12,8 +12,8 @@
opacity: 0.85 !important; opacity: 0.85 !important;
} }
:is(.dark, [data-theme="dark"]) #topbar-cta-button a, :is(.dark, [data-theme='dark']) #topbar-cta-button a,
:is(.dark, [data-theme="dark"]) #topbar-cta-button a span { :is(.dark, [data-theme='dark']) #topbar-cta-button a span {
background-color: #ffffff !important; background-color: #ffffff !important;
color: #141414 !important; color: #141414 !important;
} }
@@ -35,14 +35,14 @@
* We use :has() to scope the rule to only the sidebar group that contains * We use :has() to scope the rule to only the sidebar group that contains
* the developers/introduction link, so other tabs are unaffected. * the developers/introduction link, so other tabs are unaffected.
*/ */
div:has(> .sidebar-group a[href="/developers/introduction"]), div:has(> .sidebar-group a[href='/developers/introduction']),
div:has(> .sidebar-group a[href="/user-guide/introduction"]) { div:has(> .sidebar-group a[href='/user-guide/introduction']) {
display: none; display: none;
} }
/* Remove the top margin on the group that follows the hidden overview group, /* Remove the top margin on the group that follows the hidden overview group,
so it sits flush at the top of the sidebar without a gap. */ so it sits flush at the top of the sidebar without a gap. */
div:has(> .sidebar-group a[href="/developers/introduction"]) + div, div:has(> .sidebar-group a[href='/developers/introduction']) + div,
div:has(> .sidebar-group a[href="/user-guide/introduction"]) + div { div:has(> .sidebar-group a[href='/user-guide/introduction']) + div {
margin-top: 0 !important; margin-top: 0 !important;
} }
@@ -36,9 +36,7 @@
{ {
"key": "userGuideOverview", "key": "userGuideOverview",
"label": "Overview", "label": "Overview",
"pages": [ "pages": ["user-guide/introduction"]
"user-guide/introduction"
]
}, },
{ {
"key": "dataModel", "key": "dataModel",
@@ -220,9 +218,7 @@
{ {
"key": "aiHowTos", "key": "aiHowTos",
"label": "How-Tos", "label": "How-Tos",
"pages": [ "pages": ["user-guide/ai/how-tos/ai-faq"]
"user-guide/ai/how-tos/ai-faq"
]
} }
] ]
}, },
@@ -309,9 +305,7 @@
{ {
"key": "permissionsAccessHowTos", "key": "permissionsAccessHowTos",
"label": "How-Tos", "label": "How-Tos",
"pages": [ "pages": ["user-guide/permissions-access/how-tos/permissions-faq"]
"user-guide/permissions-access/how-tos/permissions-faq"
]
} }
] ]
}, },
@@ -332,9 +326,7 @@
{ {
"key": "billingHowTos", "key": "billingHowTos",
"label": "How-Tos", "label": "How-Tos",
"pages": [ "pages": ["user-guide/billing/how-tos/billing-faq"]
"user-guide/billing/how-tos/billing-faq"
]
} }
] ]
}, },
@@ -359,9 +351,7 @@
{ {
"key": "settingsHowTos", "key": "settingsHowTos",
"label": "How-Tos", "label": "How-Tos",
"pages": [ "pages": ["user-guide/settings/how-tos/settings-faq"]
"user-guide/settings/how-tos/settings-faq"
]
} }
] ]
} }
@@ -374,9 +364,7 @@
{ {
"key": "developersOverview", "key": "developersOverview",
"label": "Overview", "label": "Overview",
"pages": [ "pages": ["developers/introduction"]
"developers/introduction"
]
}, },
{ {
"key": "apps", "key": "apps",
@@ -209,9 +209,7 @@
{ {
"key": "aiHowTos", "key": "aiHowTos",
"label": "How-Tos", "label": "How-Tos",
"pages": [ "pages": ["user-guide/ai/how-tos/ai-faq"]
"user-guide/ai/how-tos/ai-faq"
]
} }
] ]
}, },
@@ -290,9 +288,7 @@
{ {
"key": "permissionsAccessHowTos", "key": "permissionsAccessHowTos",
"label": "How-Tos", "label": "How-Tos",
"pages": [ "pages": ["user-guide/permissions-access/how-tos/permissions-faq"]
"user-guide/permissions-access/how-tos/permissions-faq"
]
} }
] ]
}, },
@@ -313,9 +309,7 @@
{ {
"key": "billingHowTos", "key": "billingHowTos",
"label": "How-Tos", "label": "How-Tos",
"pages": [ "pages": ["user-guide/billing/how-tos/billing-faq"]
"user-guide/billing/how-tos/billing-faq"
]
} }
] ]
}, },
@@ -340,9 +334,7 @@
{ {
"key": "settingsHowTos", "key": "settingsHowTos",
"label": "How-Tos", "label": "How-Tos",
"pages": [ "pages": ["user-guide/settings/how-tos/settings-faq"]
"user-guide/settings/how-tos/settings-faq"
]
} }
] ]
} }
@@ -355,9 +347,7 @@
{ {
"key": "developersGroup", "key": "developersGroup",
"label": "Developers", "label": "Developers",
"pages": [ "pages": ["developers/introduction"]
"developers/introduction"
]
}, },
{ {
"key": "extend", "key": "extend",
@@ -433,9 +423,7 @@
{ {
"key": "feedback", "key": "feedback",
"label": "Feedback", "label": "Feedback",
"pages": [ "pages": ["twenty-ui/progress-bar"]
"twenty-ui/progress-bar"
]
}, },
{ {
"key": "input", "key": "input",
+8 -2
View File
@@ -21,11 +21,17 @@
}, },
"lint": {}, "lint": {},
"fmt": { "fmt": {
"executor": "nx:run-commands",
"cache": true,
"options": { "options": {
"files": "." "cwd": "{projectRoot}",
"command": "prettier . --check --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata"
}, },
"configurations": { "configurations": {
"fix": {} "ci": {},
"fix": {
"command": "prettier . --write --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata"
}
} }
} }
} }
@@ -2,8 +2,8 @@ import fs from 'fs';
import path from 'path'; import path from 'path';
import { import {
DEFAULT_LANGUAGE, DEFAULT_LANGUAGE,
SUPPORTED_LANGUAGES, SUPPORTED_LANGUAGES,
} from '../navigation/supported-languages'; } from '../navigation/supported-languages';
type BasePage = string | BaseGroup; type BasePage = string | BaseGroup;
@@ -71,15 +71,11 @@ const baseStructure: BaseStructure = JSON.parse(
const docsConfig = JSON.parse(fs.readFileSync(docsPath, 'utf8')); const docsConfig = JSON.parse(fs.readFileSync(docsPath, 'utf8'));
const collectTranslations = ( const collectTranslations = (file: TranslationFile | null): TranslationMaps => {
file: TranslationFile | null,
): TranslationMaps => {
const tabLabels = new Map<string, string>(); const tabLabels = new Map<string, string>();
const groupLabels = new Map<string, string>(); const groupLabels = new Map<string, string>();
const collectGroups = ( const collectGroups = (groups?: Record<string, TranslationGroupEntry>) => {
groups?: Record<string, TranslationGroupEntry>,
) => {
if (!groups) { if (!groups) {
return; return;
} }
@@ -99,17 +95,15 @@ const collectTranslations = (
}; };
const loadTranslationFile = (language: string): TranslationFile | null => { const loadTranslationFile = (language: string): TranslationFile | null => {
const translationPath = path.join( const translationPath = path.join(localesRoot, language, 'navigation.json');
localesRoot,
language,
'navigation.json',
);
if (!fs.existsSync(translationPath)) { if (!fs.existsSync(translationPath)) {
return null; return null;
} }
return JSON.parse(fs.readFileSync(translationPath, 'utf8')) as TranslationFile; return JSON.parse(
fs.readFileSync(translationPath, 'utf8'),
) as TranslationFile;
}; };
const buildLanguageEntry = (language: string): GeneratedLanguage => { const buildLanguageEntry = (language: string): GeneratedLanguage => {
@@ -161,9 +155,8 @@ const hasLocaleContent = (language: string): boolean => {
return fs.existsSync(localeDir); return fs.existsSync(localeDir);
}; };
const languages = SUPPORTED_LANGUAGES.filter(hasLocaleContent).map( const languages =
buildLanguageEntry, SUPPORTED_LANGUAGES.filter(hasLocaleContent).map(buildLanguageEntry);
);
if (!docsConfig.navigation) { if (!docsConfig.navigation) {
docsConfig.navigation = {}; docsConfig.navigation = {};
@@ -53,75 +53,81 @@ async function main() {
const base64 = imageBytes.toString('base64'); const base64 = imageBytes.toString('base64');
const mime = sourcePath.endsWith('.png') ? 'image/png' : 'image/jpeg'; const mime = sourcePath.endsWith('.png') ? 'image/png' : 'image/jpeg';
const resultBase64 = await page.evaluate(async ({ b64, m }) => { const resultBase64 = await page.evaluate(
const LINE_SPACING = 8; async ({ b64, m }) => {
const MIN_LINE_WIDTH = 0.5; const LINE_SPACING = 8;
const MAX_LINE_WIDTH = 6; const MIN_LINE_WIDTH = 0.5;
const COLOR = { r: 74, g: 56, b: 245 }; // #4A38F5 const MAX_LINE_WIDTH = 6;
const TRANSPARENT_BG = true; const COLOR = { r: 74, g: 56, b: 245 }; // #4A38F5
const TRANSPARENT_BG = true;
const img = new Image(); const img = new Image();
await new Promise((res, rej) => { await new Promise((res, rej) => {
img.onload = res; img.onload = res;
img.onerror = rej; img.onerror = rej;
img.src = `data:${m};base64,${b64}`; img.src = `data:${m};base64,${b64}`;
}); });
const { width, height } = img; const { width, height } = img;
const scale = 2; const scale = 2;
const outW = width * scale; const outW = width * scale;
const outH = height * scale; const outH = height * scale;
// Read source pixels // Read source pixels
const tmp = document.createElement('canvas'); const tmp = document.createElement('canvas');
tmp.width = width; tmp.width = width;
tmp.height = height; tmp.height = height;
const tmpCtx = tmp.getContext('2d'); const tmpCtx = tmp.getContext('2d');
tmpCtx.drawImage(img, 0, 0); tmpCtx.drawImage(img, 0, 0);
const px = tmpCtx.getImageData(0, 0, width, height).data; const px = tmpCtx.getImageData(0, 0, width, height).data;
// Output canvas // Output canvas
const out = document.createElement('canvas'); const out = document.createElement('canvas');
out.width = outW; out.width = outW;
out.height = outH; out.height = outH;
const ctx = out.getContext('2d'); const ctx = out.getContext('2d');
// Transparent background — adapts to both light and dark mode // Transparent background — adapts to both light and dark mode
const sp = LINE_SPACING * scale; const sp = LINE_SPACING * scale;
for (let y = sp / 2; y < outH; y += sp) { for (let y = sp / 2; y < outH; y += sp) {
const srcY = Math.min(Math.floor(y / scale), height - 1); const srcY = Math.min(Math.floor(y / scale), height - 1);
let x = 0; let x = 0;
while (x < outW) { while (x < outW) {
const srcX = Math.min(Math.floor(x / scale), width - 1); const srcX = Math.min(Math.floor(x / scale), width - 1);
const i = (srcY * width + srcX) * 4; const i = (srcY * width + srcX) * 4;
const lum = (0.299 * px[i] + 0.587 * px[i+1] + 0.114 * px[i+2]) / 255; const lum =
const a = px[i+3] / 255; (0.299 * px[i] + 0.587 * px[i + 1] + 0.114 * px[i + 2]) / 255;
const dark = (1 - lum) * a; const a = px[i + 3] / 255;
const dark = (1 - lum) * a;
if (dark > 0.2) { if (dark > 0.2) {
const w = (MIN_LINE_WIDTH + (MAX_LINE_WIDTH - MIN_LINE_WIDTH) * dark) * scale; const w =
const dashLen = sp * (0.3 + 0.7 * dark); (MIN_LINE_WIDTH + (MAX_LINE_WIDTH - MIN_LINE_WIDTH) * dark) *
const gap = sp * (0.1 + 0.4 * (1 - dark)); scale;
const alpha = 0.3 + 0.7 * dark; const dashLen = sp * (0.3 + 0.7 * dark);
const gap = sp * (0.1 + 0.4 * (1 - dark));
const alpha = 0.3 + 0.7 * dark;
ctx.strokeStyle = `rgba(${COLOR.r},${COLOR.g},${COLOR.b},${alpha})`; ctx.strokeStyle = `rgba(${COLOR.r},${COLOR.g},${COLOR.b},${alpha})`;
ctx.lineWidth = w; ctx.lineWidth = w;
ctx.lineCap = 'round'; ctx.lineCap = 'round';
ctx.beginPath(); ctx.beginPath();
ctx.moveTo(x, y); ctx.moveTo(x, y);
ctx.lineTo(Math.min(x + dashLen, outW), y); ctx.lineTo(Math.min(x + dashLen, outW), y);
ctx.stroke(); ctx.stroke();
x += dashLen + gap; x += dashLen + gap;
} else { } else {
x += sp * 0.5; x += sp * 0.5;
}
} }
} }
}
return out.toDataURL('image/png').split(',')[1]; return out.toDataURL('image/png').split(',')[1];
}, { b64: base64, m: mime }); },
{ b64: base64, m: mime },
);
const outputPath = join(OUTPUT_DIR, `${illust.name}.png`); const outputPath = join(OUTPUT_DIR, `${illust.name}.png`);
writeFileSync(outputPath, Buffer.from(resultBase64, 'base64')); writeFileSync(outputPath, Buffer.from(resultBase64, 'base64'));
@@ -46,9 +46,7 @@ const baseStructure: BaseStructure = JSON.parse(
fs.readFileSync(baseStructurePath, 'utf8'), fs.readFileSync(baseStructurePath, 'utf8'),
); );
const buildGroupMap = ( const buildGroupMap = (groups: BaseGroup[]): Record<string, TemplateGroup> =>
groups: BaseGroup[],
): Record<string, TemplateGroup> =>
groups.reduce<Record<string, TemplateGroup>>((acc, group) => { groups.reduce<Record<string, TemplateGroup>>((acc, group) => {
const nestedGroups = group.pages.filter( const nestedGroups = group.pages.filter(
(page): page is BaseGroup => typeof page !== 'string', (page): page is BaseGroup => typeof page !== 'string',
@@ -78,4 +76,3 @@ const template: TemplateFile = {
}; };
fs.writeFileSync(templatePath, `${JSON.stringify(template, null, 2)}\n`); fs.writeFileSync(templatePath, `${JSON.stringify(template, null, 2)}\n`);
+74 -53
View File
@@ -21,7 +21,10 @@
], ],
"rules": { "rules": {
"func-style": ["error", "declaration", { "allowArrowFunctions": true }], "func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"no-console": ["warn", { "allow": ["group", "groupCollapsed", "groupEnd"] }], "no-console": [
"warn",
{ "allow": ["group", "groupCollapsed", "groupEnd"] }
],
"no-script-url": "error", "no-script-url": "error",
"no-control-regex": "off", "no-control-regex": "off",
"no-debugger": "error", "no-debugger": "error",
@@ -29,27 +32,30 @@
"no-undef": "off", "no-undef": "off",
"no-unused-vars": "off", "no-unused-vars": "off",
"no-redeclare": "off", "no-redeclare": "off",
"no-restricted-imports": ["error", { "no-restricted-imports": [
"patterns": [ "error",
{ {
"group": ["../*"], "patterns": [
"message": "Relative parent imports are not allowed. Use @/ alias instead." {
}, "group": ["../*"],
{ "message": "Relative parent imports are not allowed. Use @/ alias instead."
"group": ["@tabler/icons-react"], },
"message": "Please import icons from `twenty-ui`" {
}, "group": ["@tabler/icons-react"],
{ "message": "Please import icons from `twenty-ui`"
"group": ["react-hotkeys-web-hook"], },
"importNames": ["useHotkeys"], {
"message": "Please use the custom wrapper: `useScopedHotkeys` from `twenty-ui`" "group": ["react-hotkeys-web-hook"],
}, "importNames": ["useHotkeys"],
{ "message": "Please use the custom wrapper: `useScopedHotkeys` from `twenty-ui`"
"group": ["lodash"], },
"message": "Please use the standalone lodash package (for instance: `import groupBy from 'lodash.groupby'` instead of `import { groupBy } from 'lodash'`)" {
} "group": ["lodash"],
] "message": "Please use the standalone lodash package (for instance: `import groupBy from 'lodash.groupby'` instead of `import { groupBy } from 'lodash'`)"
}], }
]
}
],
"import/no-duplicates": "error", "import/no-duplicates": "error",
@@ -68,34 +74,46 @@
"typescript/no-redeclare": "error", "typescript/no-redeclare": "error",
"typescript/ban-ts-comment": "error", "typescript/ban-ts-comment": "error",
"typescript/consistent-type-imports": ["error", { "typescript/consistent-type-imports": [
"prefer": "type-imports", "error",
"fixStyle": "inline-type-imports" {
}], "prefer": "type-imports",
"fixStyle": "inline-type-imports"
}
],
"typescript/explicit-function-return-type": "off", "typescript/explicit-function-return-type": "off",
"typescript/explicit-module-boundary-types": "off", "typescript/explicit-module-boundary-types": "off",
"typescript/no-empty-object-type": ["error", { "typescript/no-empty-object-type": [
"allowInterfaces": "with-single-extends" "error",
}], {
"allowInterfaces": "with-single-extends"
}
],
"typescript/no-empty-function": "off", "typescript/no-empty-function": "off",
"typescript/no-explicit-any": "off", "typescript/no-explicit-any": "off",
"typescript/no-unused-vars": ["warn", { "typescript/no-unused-vars": [
"vars": "all", "warn",
"varsIgnorePattern": "^_", {
"args": "after-used", "vars": "all",
"argsIgnorePattern": "^_" "varsIgnorePattern": "^_",
}], "args": "after-used",
"argsIgnorePattern": "^_"
}
],
"typescript/strict-boolean-expressions": ["error", { "typescript/strict-boolean-expressions": [
"allowNullableBoolean": true, "error",
"allowNullableObject": true, {
"allowString": true, "allowNullableBoolean": true,
"allowNumber": true, "allowNullableObject": true,
"allowNullableString": true, "allowString": true,
"allowNullableNumber": true, "allowNumber": true,
"allowNullableEnum": true, "allowNullableString": true,
"allowAny": true "allowNullableNumber": true,
}], "allowNullableEnum": true,
"allowAny": true
}
],
"twenty/effect-components": "error", "twenty/effect-components": "error",
"twenty/no-hardcoded-colors": "error", "twenty/no-hardcoded-colors": "error",
@@ -108,14 +126,17 @@
"twenty/no-jotai-store-in-selector": "error", "twenty/no-jotai-store-in-selector": "error",
"twenty/no-direct-atom-family-in-selector": "error", "twenty/no-direct-atom-family-in-selector": "error",
"twenty/folder-structure": "error", "twenty/folder-structure": "error",
"twenty/enforce-module-boundaries": ["error", { "twenty/enforce-module-boundaries": [
"depConstraints": [ "error",
{ {
"sourceTag": "scope:frontend", "depConstraints": [
"onlyDependOnLibsWithTags": ["scope:shared", "scope:frontend"] {
} "sourceTag": "scope:frontend",
] "onlyDependOnLibsWithTags": ["scope:shared", "scope:frontend"]
}] }
]
}
]
}, },
"overrides": [ "overrides": [
{ {
@@ -1,8 +1,8 @@
<style> <style>
[data-is-storybook="true"] { [data-is-storybook='true'] {
background-color: transparent!important; background-color: transparent !important;
} }
:has(#storybook-panel-root) { :has(#storybook-panel-root) {
z-index: 100; z-index: 100;
} }
</style> </style>
@@ -6,19 +6,19 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.7/iframeResizer.contentWindow.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.7/iframeResizer.contentWindow.min.js"></script>
<style type="text/css"> <style type="text/css">
body { body {
margin: 0; margin: 0;
font-family: 'Inter', sans-serif; font-family: 'Inter', sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
html { html {
font-size: 13px; font-size: 13px;
} }
.sbdocs-wrapper { .sbdocs-wrapper {
padding: 0 !important; padding: 0 !important;
} }
*::-webkit-scrollbar { *::-webkit-scrollbar {
height: 4px; height: 4px;
width: 4px; width: 4px;
} }
@@ -31,4 +31,4 @@ html {
background-color: transparent; background-color: transparent;
border-radius: 2px; border-radius: 2px;
} }
</style> </style>
+1 -5
View File
@@ -19,11 +19,7 @@ module.exports = {
overwrite: true, overwrite: true,
generates: { generates: {
'./src/generated/graphql.ts': { './src/generated/graphql.ts': {
plugins: [ plugins: ['typescript', 'typescript-operations', 'typed-document-node'],
'typescript',
'typescript-operations',
'typed-document-node',
],
config: { config: {
skipTypename: false, skipTypename: false,
scalars: { scalars: {
+4 -2
View File
@@ -73,13 +73,15 @@
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html, body { html,
body {
background-color: var(--theme-dark-background-tertiary); background-color: var(--theme-dark-background-tertiary);
} }
} }
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
html, body { html,
body {
background-color: var(--theme-light-background-tertiary); background-color: var(--theme-light-background-tertiary);
} }
} }
+11 -25
View File
@@ -2,31 +2,21 @@
"name": "twenty-front", "name": "twenty-front",
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application", "projectType": "application",
"tags": [ "tags": ["scope:frontend"],
"scope:frontend"
],
"targets": { "targets": {
"build": { "build": {
"outputs": [ "outputs": ["{options.outputPath}"],
"{options.outputPath}"
],
"options": { "options": {
"outputPath": "{projectRoot}/build" "outputPath": "{projectRoot}/build"
}, },
"dependsOn": [ "dependsOn": ["^build"]
"^build"
]
}, },
"build:sourcemaps": { "build:sourcemaps": {
"outputs": [ "outputs": ["{options.outputPath}"],
"{options.outputPath}"
],
"options": { "options": {
"outputPath": "{projectRoot}/build" "outputPath": "{projectRoot}/build"
}, },
"dependsOn": [ "dependsOn": ["^build"]
"^build"
]
}, },
"serve": { "serve": {
"executor": "nx:run-commands", "executor": "nx:run-commands",
@@ -51,12 +41,8 @@
}, },
"reset:env": { "reset:env": {
"executor": "nx:run-commands", "executor": "nx:run-commands",
"inputs": [ "inputs": ["{projectRoot}/.env.example"],
"{projectRoot}/.env.example" "outputs": ["{projectRoot}/.env"],
],
"outputs": [
"{projectRoot}/.env"
],
"cache": true, "cache": true,
"options": { "options": {
"cwd": "{projectRoot}", "cwd": "{projectRoot}",
@@ -77,11 +63,11 @@
], ],
"options": { "options": {
"cwd": "{projectRoot}", "cwd": "{projectRoot}",
"command": "npx oxlint --type-aware -c .oxlintrc.json src/ && (prettier src/ --check --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint twenty-front --configuration=fix' && false))" "command": "npx oxlint --type-aware -c .oxlintrc.json src/ && (npx oxfmt --check src/ || (echo 'ERROR: oxfmt formatting check failed! Fix with: npx nx lint twenty-front --configuration=fix' && false))"
}, },
"configurations": { "configurations": {
"fix": { "fix": {
"command": "npx oxlint --type-aware --fix -c .oxlintrc.json src/ && prettier src/ --write --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata" "command": "npx oxlint --type-aware --fix -c .oxlintrc.json src/ && npx oxfmt src/"
} }
} }
}, },
@@ -90,11 +76,11 @@
"dependsOn": ["twenty-oxlint-rules:build"], "dependsOn": ["twenty-oxlint-rules:build"],
"options": { "options": {
"cwd": "{projectRoot}", "cwd": "{projectRoot}",
"command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware -c .oxlintrc.json $FILES && (prettier --check $FILES || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint:diff-with-main twenty-front --configuration=fix' && false)))" "command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware -c .oxlintrc.json $FILES && (npx oxfmt --check $FILES || (echo 'ERROR: oxfmt formatting check failed! Fix with: npx nx lint:diff-with-main twenty-front --configuration=fix' && false)))"
}, },
"configurations": { "configurations": {
"fix": { "fix": {
"command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware --fix -c .oxlintrc.json $FILES && prettier --write $FILES)" "command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware --fix -c .oxlintrc.json $FILES && npx oxfmt $FILES)"
} }
} }
}, },
@@ -7,42 +7,42 @@
* - Please do NOT modify this file. * - Please do NOT modify this file.
*/ */
const PACKAGE_VERSION = '2.12.7' const PACKAGE_VERSION = '2.12.7';
const INTEGRITY_CHECKSUM = '4db4a41e972cec1b64cc569c66952d82' const INTEGRITY_CHECKSUM = '4db4a41e972cec1b64cc569c66952d82';
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse') const IS_MOCKED_RESPONSE = Symbol('isMockedResponse');
const activeClientIds = new Set() const activeClientIds = new Set();
addEventListener('install', function () { addEventListener('install', function () {
self.skipWaiting() self.skipWaiting();
}) });
addEventListener('activate', function (event) { addEventListener('activate', function (event) {
event.waitUntil(self.clients.claim()) event.waitUntil(self.clients.claim());
}) });
addEventListener('message', async function (event) { addEventListener('message', async function (event) {
const clientId = Reflect.get(event.source || {}, 'id') const clientId = Reflect.get(event.source || {}, 'id');
if (!clientId || !self.clients) { if (!clientId || !self.clients) {
return return;
} }
const client = await self.clients.get(clientId) const client = await self.clients.get(clientId);
if (!client) { if (!client) {
return return;
} }
const allClients = await self.clients.matchAll({ const allClients = await self.clients.matchAll({
type: 'window', type: 'window',
}) });
switch (event.data) { switch (event.data) {
case 'KEEPALIVE_REQUEST': { case 'KEEPALIVE_REQUEST': {
sendToClient(client, { sendToClient(client, {
type: 'KEEPALIVE_RESPONSE', type: 'KEEPALIVE_RESPONSE',
}) });
break break;
} }
case 'INTEGRITY_CHECK_REQUEST': { case 'INTEGRITY_CHECK_REQUEST': {
@@ -52,12 +52,12 @@ addEventListener('message', async function (event) {
packageVersion: PACKAGE_VERSION, packageVersion: PACKAGE_VERSION,
checksum: INTEGRITY_CHECKSUM, checksum: INTEGRITY_CHECKSUM,
}, },
}) });
break break;
} }
case 'MOCK_ACTIVATE': { case 'MOCK_ACTIVATE': {
activeClientIds.add(clientId) activeClientIds.add(clientId);
sendToClient(client, { sendToClient(client, {
type: 'MOCKING_ENABLED', type: 'MOCKING_ENABLED',
@@ -67,33 +67,33 @@ addEventListener('message', async function (event) {
frameType: client.frameType, frameType: client.frameType,
}, },
}, },
}) });
break break;
} }
case 'CLIENT_CLOSED': { case 'CLIENT_CLOSED': {
activeClientIds.delete(clientId) activeClientIds.delete(clientId);
const remainingClients = allClients.filter((client) => { const remainingClients = allClients.filter((client) => {
return client.id !== clientId return client.id !== clientId;
}) });
// Unregister itself when there are no more clients // Unregister itself when there are no more clients
if (remainingClients.length === 0) { if (remainingClients.length === 0) {
self.registration.unregister() self.registration.unregister();
} }
break break;
} }
} }
}) });
addEventListener('fetch', function (event) { addEventListener('fetch', function (event) {
const requestInterceptedAt = Date.now() const requestInterceptedAt = Date.now();
// Bypass navigation requests. // Bypass navigation requests.
if (event.request.mode === 'navigate') { if (event.request.mode === 'navigate') {
return return;
} }
// Opening the DevTools triggers the "only-if-cached" request // Opening the DevTools triggers the "only-if-cached" request
@@ -102,19 +102,19 @@ addEventListener('fetch', function (event) {
event.request.cache === 'only-if-cached' && event.request.cache === 'only-if-cached' &&
event.request.mode !== 'same-origin' event.request.mode !== 'same-origin'
) { ) {
return return;
} }
// Bypass all requests when there are no active clients. // Bypass all requests when there are no active clients.
// Prevents the self-unregistered worked from handling requests // Prevents the self-unregistered worked from handling requests
// after it's been terminated (still remains active until the next reload). // after it's been terminated (still remains active until the next reload).
if (activeClientIds.size === 0) { if (activeClientIds.size === 0) {
return return;
} }
const requestId = crypto.randomUUID() const requestId = crypto.randomUUID();
event.respondWith(handleRequest(event, requestId, requestInterceptedAt)) event.respondWith(handleRequest(event, requestId, requestInterceptedAt));
}) });
/** /**
* @param {FetchEvent} event * @param {FetchEvent} event
@@ -122,23 +122,23 @@ addEventListener('fetch', function (event) {
* @param {number} requestInterceptedAt * @param {number} requestInterceptedAt
*/ */
async function handleRequest(event, requestId, requestInterceptedAt) { async function handleRequest(event, requestId, requestInterceptedAt) {
const client = await resolveMainClient(event) const client = await resolveMainClient(event);
const requestCloneForEvents = event.request.clone() const requestCloneForEvents = event.request.clone();
const response = await getResponse( const response = await getResponse(
event, event,
client, client,
requestId, requestId,
requestInterceptedAt, requestInterceptedAt,
) );
// Send back the response clone for the "response:*" life-cycle events. // Send back the response clone for the "response:*" life-cycle events.
// Ensure MSW is active and ready to handle the message, otherwise // Ensure MSW is active and ready to handle the message, otherwise
// this message will pend indefinitely. // this message will pend indefinitely.
if (client && activeClientIds.has(client.id)) { if (client && activeClientIds.has(client.id)) {
const serializedRequest = await serializeRequest(requestCloneForEvents) const serializedRequest = await serializeRequest(requestCloneForEvents);
// Clone the response so both the client and the library could consume it. // Clone the response so both the client and the library could consume it.
const responseClone = response.clone() const responseClone = response.clone();
sendToClient( sendToClient(
client, client,
@@ -160,10 +160,10 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
}, },
}, },
responseClone.body ? [serializedRequest.body, responseClone.body] : [], responseClone.body ? [serializedRequest.body, responseClone.body] : [],
) );
} }
return response return response;
} }
/** /**
@@ -175,30 +175,30 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
* @returns {Promise<Client | undefined>} * @returns {Promise<Client | undefined>}
*/ */
async function resolveMainClient(event) { async function resolveMainClient(event) {
const client = await self.clients.get(event.clientId) const client = await self.clients.get(event.clientId);
if (activeClientIds.has(event.clientId)) { if (activeClientIds.has(event.clientId)) {
return client return client;
} }
if (client?.frameType === 'top-level') { if (client?.frameType === 'top-level') {
return client return client;
} }
const allClients = await self.clients.matchAll({ const allClients = await self.clients.matchAll({
type: 'window', type: 'window',
}) });
return allClients return allClients
.filter((client) => { .filter((client) => {
// Get only those clients that are currently visible. // Get only those clients that are currently visible.
return client.visibilityState === 'visible' return client.visibilityState === 'visible';
}) })
.find((client) => { .find((client) => {
// Find the client ID that's recorded in the // Find the client ID that's recorded in the
// set of clients that have registered the worker. // set of clients that have registered the worker.
return activeClientIds.has(client.id) return activeClientIds.has(client.id);
}) });
} }
/** /**
@@ -211,36 +211,36 @@ async function resolveMainClient(event) {
async function getResponse(event, client, requestId, requestInterceptedAt) { async function getResponse(event, client, requestId, requestInterceptedAt) {
// Clone the request because it might've been already used // Clone the request because it might've been already used
// (i.e. its body has been read and sent to the client). // (i.e. its body has been read and sent to the client).
const requestClone = event.request.clone() const requestClone = event.request.clone();
function passthrough() { function passthrough() {
// Cast the request headers to a new Headers instance // Cast the request headers to a new Headers instance
// so the headers can be manipulated with. // so the headers can be manipulated with.
const headers = new Headers(requestClone.headers) const headers = new Headers(requestClone.headers);
// Remove the "accept" header value that marked this request as passthrough. // Remove the "accept" header value that marked this request as passthrough.
// This prevents request alteration and also keeps it compliant with the // This prevents request alteration and also keeps it compliant with the
// user-defined CORS policies. // user-defined CORS policies.
const acceptHeader = headers.get('accept') const acceptHeader = headers.get('accept');
if (acceptHeader) { if (acceptHeader) {
const values = acceptHeader.split(',').map((value) => value.trim()) const values = acceptHeader.split(',').map((value) => value.trim());
const filteredValues = values.filter( const filteredValues = values.filter(
(value) => value !== 'msw/passthrough', (value) => value !== 'msw/passthrough',
) );
if (filteredValues.length > 0) { if (filteredValues.length > 0) {
headers.set('accept', filteredValues.join(', ')) headers.set('accept', filteredValues.join(', '));
} else { } else {
headers.delete('accept') headers.delete('accept');
} }
} }
return fetch(requestClone, { headers }) return fetch(requestClone, { headers });
} }
// Bypass mocking when the client is not active. // Bypass mocking when the client is not active.
if (!client) { if (!client) {
return passthrough() return passthrough();
} }
// Bypass initial page load requests (i.e. static assets). // Bypass initial page load requests (i.e. static assets).
@@ -248,11 +248,11 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
// means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
// and is not ready to handle requests. // and is not ready to handle requests.
if (!activeClientIds.has(client.id)) { if (!activeClientIds.has(client.id)) {
return passthrough() return passthrough();
} }
// Notify the client that a request has been intercepted. // Notify the client that a request has been intercepted.
const serializedRequest = await serializeRequest(event.request) const serializedRequest = await serializeRequest(event.request);
const clientMessage = await sendToClient( const clientMessage = await sendToClient(
client, client,
{ {
@@ -264,19 +264,19 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
}, },
}, },
[serializedRequest.body], [serializedRequest.body],
) );
switch (clientMessage.type) { switch (clientMessage.type) {
case 'MOCK_RESPONSE': { case 'MOCK_RESPONSE': {
return respondWithMock(clientMessage.data) return respondWithMock(clientMessage.data);
} }
case 'PASSTHROUGH': { case 'PASSTHROUGH': {
return passthrough() return passthrough();
} }
} }
return passthrough() return passthrough();
} }
/** /**
@@ -287,21 +287,21 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
*/ */
function sendToClient(client, message, transferrables = []) { function sendToClient(client, message, transferrables = []) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const channel = new MessageChannel() const channel = new MessageChannel();
channel.port1.onmessage = (event) => { channel.port1.onmessage = (event) => {
if (event.data && event.data.error) { if (event.data && event.data.error) {
return reject(event.data.error) return reject(event.data.error);
} }
resolve(event.data) resolve(event.data);
} };
client.postMessage(message, [ client.postMessage(message, [
channel.port2, channel.port2,
...transferrables.filter(Boolean), ...transferrables.filter(Boolean),
]) ]);
}) });
} }
/** /**
@@ -314,17 +314,17 @@ function respondWithMock(response) {
// instance will have status code set to 0. Since it's not possible to create // instance will have status code set to 0. Since it's not possible to create
// a Response instance with status code 0, handle that use-case separately. // a Response instance with status code 0, handle that use-case separately.
if (response.status === 0) { if (response.status === 0) {
return Response.error() return Response.error();
} }
const mockedResponse = new Response(response.body, response) const mockedResponse = new Response(response.body, response);
Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, { Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
value: true, value: true,
enumerable: true, enumerable: true,
}) });
return mockedResponse return mockedResponse;
} }
/** /**
@@ -345,5 +345,5 @@ async function serializeRequest(request) {
referrerPolicy: request.referrerPolicy, referrerPolicy: request.referrerPolicy,
body: await request.arrayBuffer(), body: await request.arrayBuffer(),
keepalive: request.keepalive, keepalive: request.keepalive,
} };
} }
@@ -38,7 +38,9 @@ export const generateNavigationMenuItems = async (token: string) => {
navigationMenuItems: Record<string, unknown>[]; navigationMenuItems: Record<string, unknown>[];
}; };
console.log(` Got ${data.navigationMenuItems.length} navigation menu items.`); console.log(
` Got ${data.navigationMenuItems.length} navigation menu items.`,
);
writeGeneratedFile( writeGeneratedFile(
'metadata/navigation-menu-items/mock-navigation-menu-items-data.ts', 'metadata/navigation-menu-items/mock-navigation-menu-items-data.ts',
@@ -1,39 +0,0 @@
On v1.16
"settings": {"input": {"serverlessFunctionId": "e8a6a1c8-3e63-4d8b-aaa7-d8c932a6b314", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "draft"}, "outputSchema": {"message": {"type": "string", "label": "message", "value": "Hello, input: null and null", "isLeaf": true}}
"settings": {"input": {"serverlessFunctionId": "84d3e16c-10bb-4eed-ae15-714f657a2726", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "draft"}, "outputSchema": {"link": {"tab": "test", "icon": "IconVariable", "label": "Generate Function Output", "isLeaf": true}, "_outputSchemaType": "LINK"}
"settings": {"input": {"serverlessFunctionId": "cfc3c41f-5520-41f5-a83e-6a56ca6b90ba", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "1"}, "outputSchema": {"link": {"tab": "test", "icon": "IconVariable", "label": "Generate Function Output", "isLeaf": true}, "_outputSchemaType": "LINK"}
"settings": {"input": {"serverlessFunctionId": "42b11c8c-0238-4044-a5d3-9cc662066de4", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "1"}, "outputSchema": {"link": {"tab": "test", "icon": "IconVariable", "label": "Generate Function Output", "isLeaf": true}, "_outputSchemaType": "LINK"}
"settings": {"input": {"serverlessFunctionId": "42b11c8c-0238-4044-a5d3-9cc662066de4", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "draft"}, "outputSchema": {"link": {"tab": "test", "icon": "IconVariable", "label": "Generate Function Output", "isLeaf": true}, "_outputSchemaType": "LINK"}
"settings": {"input": {"serverlessFunctionId": "a7d07444-092f-4a96-8e3c-b379bc49f6e3", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "draft"}, "outputSchema": {"link": {"tab": "test", "icon": "IconVariable", "label": "Generate Function Output", "isLeaf": true}, "_outputSchemaType": "LINK"}
"settings": {"input": {"serverlessFunctionId": "a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "1"}, "outputSchema": {"link": {"tab": "test", "icon": "IconVariable", "label": "Generate Function Output", "isLeaf": true}, "_outputSchemaType": "LINK"}
"settings": {"input": {"serverlessFunctionId": "8fdff250-0b7d-4d20-ae5f-8defe4ff9d37", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "1"}, "outputSchema": {"link": {"tab": "test", "icon": "IconVariable", "label": "Generate Function Output", "isLeaf": true}, "_outputSchemaType": "LINK"}
"settings": {"input": {"serverlessFunctionId": "a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "1"}, "outputSchema": {"link": {"tab": "test", "icon": "IconVariable", "label": "Generate Function Output", "isLeaf": true}, "_outputSchemaType": "LINK"}
"settings": {"input": {"serverlessFunctionId": "798f33e3-04ee-453f-94a1-ddc1518e4618", "serverlessFunctionInput": {"a": null, "b": null}, "serverlessFunctionVersion": "1"}, "outputSchema": {"link": {"tab": "test", "icon": "IconVariable", "label": "Generate Function Output", "isLeaf": true}, "_outputSchemaType": "LINK"}
built-function/42b11c8c-0238-4044-a5d3-9cc662066de4/1/index.mjs
built-function/42b11c8c-0238-4044-a5d3-9cc662066de4/draft/index.mjs
built-function/798f33e3-04ee-453f-94a1-ddc1518e4618/1/index.mjs
built-function/798f33e3-04ee-453f-94a1-ddc1518e4618/draft/index.mjs
built-function/84d3e16c-10bb-4eed-ae15-714f657a2726/draft/index.mjs
built-function/8fdff250-0b7d-4d20-ae5f-8defe4ff9d37/1/index.mjs
built-function/8fdff250-0b7d-4d20-ae5f-8defe4ff9d37/draft/index.mjs
built-function/a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6/1/index.mjs
built-function/a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6/draft/index.mjs
built-function/a7d07444-092f-4a96-8e3c-b379bc49f6e3/draft/index.mjs
built-function/cfc3c41f-5520-41f5-a83e-6a56ca6b90ba/1/index.mjs
built-function/cfc3c41f-5520-41f5-a83e-6a56ca6b90ba/draft/index.mjs
built-function/e8a6a1c8-3e63-4d8b-aaa7-d8c932a6b314/draft/index.mjs
serverless-function/42b11c8c-0238-4044-a5d3-9cc662066de4/1/src/index.ts
serverless-function/42b11c8c-0238-4044-a5d3-9cc662066de4/draft/src/index.ts
serverless-function/798f33e3-04ee-453f-94a1-ddc1518e4618/1/src/index.ts
serverless-function/798f33e3-04ee-453f-94a1-ddc1518e4618/draft/src/index.ts
serverless-function/84d3e16c-10bb-4eed-ae15-714f657a2726/draft/src/index.ts
serverless-function/8fdff250-0b7d-4d20-ae5f-8defe4ff9d37/1/src/index.ts
serverless-function/8fdff250-0b7d-4d20-ae5f-8defe4ff9d37/draft/src/index.ts
serverless-function/a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6/1/src/index.ts
serverless-function/a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6/draft/src/index.ts
serverless-function/a7d07444-092f-4a96-8e3c-b379bc49f6e3/draft/src/index.ts
serverless-function/cfc3c41f-5520-41f5-a83e-6a56ca6b90ba/1/src/index.ts
serverless-function/cfc3c41f-5520-41f5-a83e-6a56ca6b90ba/draft/src/index.ts
serverless-function/e8a6a1c8-3e63-4d8b-aaa7-d8c932a6b314/draft/src/index.ts
@@ -1,208 +0,0 @@
On v1.17
"settings": {
"input": {
"logicFunctionId": "fa1d4f4c-b0b6-43cd-8ab9-c87ac3b233d1",
"logicFunctionInput": {
"a": null,
"b": null
}
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
"settings": {
"input": {
"serverlessFunctionId": "84d3e16c-10bb-4eed-ae15-714f657a2726",
"serverlessFunctionInput": {
"a": null,
"b": null
},
"serverlessFunctionVersion": "draft"
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
"settings": {
"input": {
"serverlessFunctionId": "cfc3c41f-5520-41f5-a83e-6a56ca6b90ba",
"serverlessFunctionInput": {
"a": null,
"b": null
},
"serverlessFunctionVersion": "1"
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
"settings": {
"input": {
"serverlessFunctionId": "42b11c8c-0238-4044-a5d3-9cc662066de4",
"serverlessFunctionInput": {
"a": null,
"b": null
},
"serverlessFunctionVersion": "1"
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
"settings": {
"input": {
"serverlessFunctionId": "42b11c8c-0238-4044-a5d3-9cc662066de4",
"serverlessFunctionInput": {
"a": null,
"b": null
},
"serverlessFunctionVersion": "draft"
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
"settings": {
"input": {
"serverlessFunctionId": "a7d07444-092f-4a96-8e3c-b379bc49f6e3",
"serverlessFunctionInput": {
"a": null,
"b": null
},
"serverlessFunctionVersion": "draft"
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
"settings": {
"input": {
"serverlessFunctionId": "a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6",
"serverlessFunctionInput": {
"a": null,
"b": null
},
"serverlessFunctionVersion": "1"
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
"settings": {
"input": {
"serverlessFunctionId": "8fdff250-0b7d-4d20-ae5f-8defe4ff9d37",
"serverlessFunctionInput": {
"a": null,
"b": null
},
"serverlessFunctionVersion": "1"
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
"settings": {
"input": {
"serverlessFunctionId": "a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6",
"serverlessFunctionInput": {
"a": null,
"b": null
},
"serverlessFunctionVersion": "1"
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
"settings": {
"input": {
"serverlessFunctionId": "798f33e3-04ee-453f-94a1-ddc1518e4618",
"serverlessFunctionInput": {
"a": null,
"b": null
},
"serverlessFunctionVersion": "1"
},
"outputSchema": {
"link": {
"tab": "test",
"icon": "IconVariable",
"label": "Generate Function Output",
"isLeaf": true
},
"_outputSchemaType": "LINK"
}
built-function/42b11c8c-0238-4044-a5d3-9cc662066de4/1/index.mjs
built-function/42b11c8c-0238-4044-a5d3-9cc662066de4/draft/index.mjs
built-function/798f33e3-04ee-453f-94a1-ddc1518e4618/1/index.mjs
built-function/798f33e3-04ee-453f-94a1-ddc1518e4618/draft/index.mjs
built-function/84d3e16c-10bb-4eed-ae15-714f657a2726/draft/index.mjs
built-function/8fdff250-0b7d-4d20-ae5f-8defe4ff9d37/1/index.mjs
built-function/8fdff250-0b7d-4d20-ae5f-8defe4ff9d37/draft/index.mjs
built-function/a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6/1/index.mjs
built-function/a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6/draft/index.mjs
built-function/a7d07444-092f-4a96-8e3c-b379bc49f6e3/draft/index.mjs
built-function/cfc3c41f-5520-41f5-a83e-6a56ca6b90ba/1/index.mjs
built-function/cfc3c41f-5520-41f5-a83e-6a56ca6b90ba/draft/index.mjs
built-function/e8a6a1c8-3e63-4d8b-aaa7-d8c932a6b314/draft/index.mjs
serverless-function/42b11c8c-0238-4044-a5d3-9cc662066de4/1/src/index.ts
serverless-function/42b11c8c-0238-4044-a5d3-9cc662066de4/draft/src/index.ts
serverless-function/798f33e3-04ee-453f-94a1-ddc1518e4618/1/src/index.ts
serverless-function/798f33e3-04ee-453f-94a1-ddc1518e4618/draft/src/index.ts
serverless-function/84d3e16c-10bb-4eed-ae15-714f657a2726/draft/src/index.ts
serverless-function/8fdff250-0b7d-4d20-ae5f-8defe4ff9d37/1/src/index.ts
serverless-function/8fdff250-0b7d-4d20-ae5f-8defe4ff9d37/draft/src/index.ts
serverless-function/a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6/1/src/index.ts
serverless-function/a3d42cb4-a5bd-4eb1-b564-5a207fa98dc6/draft/src/index.ts
serverless-function/a7d07444-092f-4a96-8e3c-b379bc49f6e3/draft/src/index.ts
serverless-function/cfc3c41f-5520-41f5-a83e-6a56ca6b90ba/1/src/index.ts
serverless-function/cfc3c41f-5520-41f5-a83e-6a56ca6b90ba/draft/src/index.ts
serverless-function/e8a6a1c8-3e63-4d8b-aaa7-d8c932a6b314/draft/src/index.ts
@@ -9,11 +9,11 @@ import { getSettingsPath } from 'twenty-shared/utils';
import { PermissionFlagType } from '~/generated-metadata/graphql'; import { PermissionFlagType } from '~/generated-metadata/graphql';
const SettingsGraphQLPlayground = lazy(() => const SettingsGraphQLPlayground = lazy(() =>
import( import('~/pages/settings/developers/playground/SettingsGraphQLPlayground').then(
'~/pages/settings/developers/playground/SettingsGraphQLPlayground' (module) => ({
).then((module) => ({ default: module.SettingsGraphQLPlayground,
default: module.SettingsGraphQLPlayground, }),
})), ),
); );
const SettingsRestPlayground = lazy(() => const SettingsRestPlayground = lazy(() =>
@@ -59,27 +59,27 @@ const SettingsNewObject = lazy(() =>
); );
const SettingsNewImapSmtpCaldavConnection = lazy(() => const SettingsNewImapSmtpCaldavConnection = lazy(() =>
import( import('@/settings/accounts/components/SettingsAccountsNewImapSmtpCaldavConnection').then(
'@/settings/accounts/components/SettingsAccountsNewImapSmtpCaldavConnection' (module) => ({
).then((module) => ({ default: module.SettingsAccountsNewImapSmtpCaldavConnection,
default: module.SettingsAccountsNewImapSmtpCaldavConnection, }),
})), ),
); );
const SettingsEditImapSmtpCaldavConnection = lazy(() => const SettingsEditImapSmtpCaldavConnection = lazy(() =>
import( import('@/settings/accounts/components/SettingsAccountsEditImapSmtpCaldavConnection').then(
'@/settings/accounts/components/SettingsAccountsEditImapSmtpCaldavConnection' (module) => ({
).then((module) => ({ default: module.SettingsAccountsEditImapSmtpCaldavConnection,
default: module.SettingsAccountsEditImapSmtpCaldavConnection, }),
})), ),
); );
const SettingsNewEmailGroupChannel = lazy(() => const SettingsNewEmailGroupChannel = lazy(() =>
import( import('@/settings/accounts/components/SettingsAccountsNewEmailGroupChannel').then(
'@/settings/accounts/components/SettingsAccountsNewEmailGroupChannel' (module) => ({
).then((module) => ({ default: module.SettingsAccountsNewEmailGroupChannel,
default: module.SettingsAccountsNewEmailGroupChannel, }),
})), ),
); );
const SettingsObjectDetailPage = lazy(() => const SettingsObjectDetailPage = lazy(() =>
@@ -99,19 +99,19 @@ const SettingsObjectOverview = lazy(() =>
); );
const SettingsDevelopersApiKeyDetail = lazy(() => const SettingsDevelopersApiKeyDetail = lazy(() =>
import( import('~/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail').then(
'~/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail' (module) => ({
).then((module) => ({ default: module.SettingsDevelopersApiKeyDetail,
default: module.SettingsDevelopersApiKeyDetail, }),
})), ),
); );
const SettingsDevelopersApiKeysNew = lazy(() => const SettingsDevelopersApiKeysNew = lazy(() =>
import( import('~/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew').then(
'~/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew' (module) => ({
).then((module) => ({ default: module.SettingsDevelopersApiKeysNew,
default: module.SettingsDevelopersApiKeysNew, }),
})), ),
); );
const SettingsLogicFunctionDetail = lazy(() => const SettingsLogicFunctionDetail = lazy(() =>
@@ -129,11 +129,11 @@ const SettingsWorkspace = lazy(() =>
); );
const SettingsWorkspaceEmailGroupChannelDetail = lazy(() => const SettingsWorkspaceEmailGroupChannelDetail = lazy(() =>
import( import('~/pages/settings/workspace/SettingsWorkspaceEmailGroupChannelDetail').then(
'~/pages/settings/workspace/SettingsWorkspaceEmailGroupChannelDetail' (module) => ({
).then((module) => ({ default: module.SettingsWorkspaceEmailGroupChannelDetail,
default: module.SettingsWorkspaceEmailGroupChannelDetail, }),
})), ),
); );
const SettingsSubdomainPage = lazy(() => const SettingsSubdomainPage = lazy(() =>
@@ -191,27 +191,27 @@ const SettingsApplicationDetails = lazy(() =>
); );
const SettingsApplicationConnectionDetail = lazy(() => const SettingsApplicationConnectionDetail = lazy(() =>
import( import('~/pages/settings/applications/SettingsApplicationConnectionDetail').then(
'~/pages/settings/applications/SettingsApplicationConnectionDetail' (module) => ({
).then((module) => ({ default: module.SettingsApplicationConnectionDetail,
default: module.SettingsApplicationConnectionDetail, }),
})), ),
); );
const SettingsApplicationFrontComponentDetail = lazy(() => const SettingsApplicationFrontComponentDetail = lazy(() =>
import( import('~/pages/settings/applications/SettingsApplicationFrontComponentDetail').then(
'~/pages/settings/applications/SettingsApplicationFrontComponentDetail' (module) => ({
).then((module) => ({ default: module.SettingsApplicationFrontComponentDetail,
default: module.SettingsApplicationFrontComponentDetail, }),
})), ),
); );
const SettingsApplicationCommandMenuItemDetail = lazy(() => const SettingsApplicationCommandMenuItemDetail = lazy(() =>
import( import('~/pages/settings/applications/SettingsApplicationCommandMenuItemDetail').then(
'~/pages/settings/applications/SettingsApplicationCommandMenuItemDetail' (module) => ({
).then((module) => ({ default: module.SettingsApplicationCommandMenuItemDetail,
default: module.SettingsApplicationCommandMenuItemDetail, }),
})), ),
); );
const SettingsLayoutViewDetail = lazy(() => const SettingsLayoutViewDetail = lazy(() =>
@@ -229,35 +229,35 @@ const SettingsLayoutPageLayoutDetail = lazy(() =>
); );
const SettingsAdminApplicationRegistrationDetail = lazy(() => const SettingsAdminApplicationRegistrationDetail = lazy(() =>
import( import('~/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDetail').then(
'~/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDetail' (module) => ({
).then((module) => ({ default: module.SettingsAdminApplicationRegistrationDetail,
default: module.SettingsAdminApplicationRegistrationDetail, }),
})), ),
); );
const SettingsAvailableApplicationDetails = lazy(() => const SettingsAvailableApplicationDetails = lazy(() =>
import( import('~/pages/settings/applications/SettingsAvailableApplicationDetails').then(
'~/pages/settings/applications/SettingsAvailableApplicationDetails' (module) => ({
).then((module) => ({ default: module.SettingsAvailableApplicationDetails,
default: module.SettingsAvailableApplicationDetails, }),
})), ),
); );
const SettingsApplicationRegistrationDetails = lazy(() => const SettingsApplicationRegistrationDetails = lazy(() =>
import( import('~/pages/settings/applications/SettingsApplicationRegistrationDetails').then(
'~/pages/settings/applications/SettingsApplicationRegistrationDetails' (module) => ({
).then((module) => ({ default: module.SettingsApplicationRegistrationDetails,
default: module.SettingsApplicationRegistrationDetails, }),
})), ),
); );
const SettingsApplicationRegistrationConfigVariableDetail = lazy(() => const SettingsApplicationRegistrationConfigVariableDetail = lazy(() =>
import( import('~/pages/settings/applications/components/SettingsApplicationRegistrationConfigVariableDetail').then(
'~/pages/settings/applications/components/SettingsApplicationRegistrationConfigVariableDetail' (module) => ({
).then((module) => ({ default: module.SettingsApplicationRegistrationConfigVariableDetail,
default: module.SettingsApplicationRegistrationConfigVariableDetail, }),
})), ),
); );
const SettingsAgentForm = lazy(() => const SettingsAgentForm = lazy(() =>
@@ -313,11 +313,11 @@ const SettingsTwoFactorAuthenticationMethod = lazy(() =>
); );
const SettingsExperience = lazy(() => const SettingsExperience = lazy(() =>
import( import('~/pages/settings/profile/appearance/components/SettingsExperience').then(
'~/pages/settings/profile/appearance/components/SettingsExperience' (module) => ({
).then((module) => ({ default: module.SettingsExperience,
default: module.SettingsExperience, }),
})), ),
); );
const SettingsAccounts = lazy(() => const SettingsAccounts = lazy(() =>
@@ -351,35 +351,35 @@ const SettingsObjects = lazy(() =>
); );
const SettingsDevelopersWebhookNew = lazy(() => const SettingsDevelopersWebhookNew = lazy(() =>
import( import('~/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookNew').then(
'~/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookNew' (module) => ({
).then((module) => ({ default: module.SettingsDevelopersWebhookNew,
default: module.SettingsDevelopersWebhookNew, }),
})), ),
); );
const SettingsDevelopersWebhookDetail = lazy(() => const SettingsDevelopersWebhookDetail = lazy(() =>
import( import('~/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail').then(
'~/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail' (module) => ({
).then((module) => ({ default: module.SettingsDevelopersWebhookDetail,
default: module.SettingsDevelopersWebhookDetail, }),
})), ),
); );
const SettingsObjectNewFieldSelect = lazy(() => const SettingsObjectNewFieldSelect = lazy(() =>
import( import('~/pages/settings/data-model/new-field/SettingsObjectNewFieldSelect').then(
'~/pages/settings/data-model/new-field/SettingsObjectNewFieldSelect' (module) => ({
).then((module) => ({ default: module.SettingsObjectNewFieldSelect,
default: module.SettingsObjectNewFieldSelect, }),
})), ),
); );
const SettingsObjectNewFieldConfigure = lazy(() => const SettingsObjectNewFieldConfigure = lazy(() =>
import( import('~/pages/settings/data-model/new-field/SettingsObjectNewFieldConfigure').then(
'~/pages/settings/data-model/new-field/SettingsObjectNewFieldConfigure' (module) => ({
).then((module) => ({ default: module.SettingsObjectNewFieldConfigure,
default: module.SettingsObjectNewFieldConfigure, }),
})), ),
); );
const SettingsObjectFieldEdit = lazy(() => const SettingsObjectFieldEdit = lazy(() =>
import('~/pages/settings/data-model/SettingsObjectFieldEdit').then( import('~/pages/settings/data-model/SettingsObjectFieldEdit').then(
@@ -442,11 +442,11 @@ const SettingsAdmin = lazy(() =>
); );
const SettingsAdminIndicatorHealthStatus = lazy(() => const SettingsAdminIndicatorHealthStatus = lazy(() =>
import( import('~/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus').then(
'~/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus' (module) => ({
).then((module) => ({ default: module.SettingsAdminIndicatorHealthStatus,
default: module.SettingsAdminIndicatorHealthStatus, }),
})), ),
); );
const SettingsAdminInferredVersion = lazy(() => const SettingsAdminInferredVersion = lazy(() =>
@@ -482,11 +482,11 @@ const SettingsAdminQueueDetail = lazy(() =>
); );
const SettingsAdminConfigVariableDetails = lazy(() => const SettingsAdminConfigVariableDetails = lazy(() =>
import( import('~/pages/settings/admin-panel/SettingsAdminConfigVariableDetails').then(
'~/pages/settings/admin-panel/SettingsAdminConfigVariableDetails' (module) => ({
).then((module) => ({ default: module.SettingsAdminConfigVariableDetails,
default: module.SettingsAdminConfigVariableDetails, }),
})), ),
); );
const SettingsAdminNewAiProvider = lazy(() => const SettingsAdminNewAiProvider = lazy(() =>
@@ -33,9 +33,8 @@ export const ExportNoteSingleRecordCommand = () => {
console.warn(initialBody); console.warn(initialBody);
} }
const { exportBlockNoteEditorToPdf } = await import( const { exportBlockNoteEditorToPdf } =
'@/command-menu-item/record/single-record/utils/exportBlockNoteEditorToPdf' await import('@/command-menu-item/record/single-record/utils/exportBlockNoteEditorToPdf');
);
await exportBlockNoteEditorToPdf(parsedBody, filename); await exportBlockNoteEditorToPdf(parsedBody, filename);
}; };
@@ -1,12 +1,8 @@
let preloadScheduled = false; let preloadScheduled = false;
const preload = () => { const preload = () => {
void import( void import('@/navigation-menu-item/display/dnd/providers/NavigationMenuItemDndKitProvider');
'@/navigation-menu-item/display/dnd/providers/NavigationMenuItemDndKitProvider' void import('@/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListDndKit');
);
void import(
'@/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListDndKit'
);
}; };
export const preloadNavigationMenuItemDndKit = (): void => { export const preloadNavigationMenuItemDndKit = (): void => {
@@ -4,11 +4,11 @@ import { NavigationSections } from '@/navigation-menu-item/common/constants/Navi
import { PageDragDropProviderMountEffect } from '@/navigation-menu-item/display/dnd/providers/PageDragDropProviderMountEffect'; import { PageDragDropProviderMountEffect } from '@/navigation-menu-item/display/dnd/providers/PageDragDropProviderMountEffect';
const LazyNavigationMenuItemDndKitProvider = lazy(() => const LazyNavigationMenuItemDndKitProvider = lazy(() =>
import( import('@/navigation-menu-item/display/dnd/providers/NavigationMenuItemDndKitProvider').then(
'@/navigation-menu-item/display/dnd/providers/NavigationMenuItemDndKitProvider' (m) => ({
).then((m) => ({ default: m.NavigationMenuItemDndKitProvider,
default: m.NavigationMenuItemDndKitProvider, }),
})), ),
); );
type PageDragDropProviderProps = { type PageDragDropProviderProps = {
@@ -14,9 +14,9 @@ import type { NavigationMenuItemSectionContentProps } from '@/navigation-menu-it
import { NavigationDrawerItem } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerItem'; import { NavigationDrawerItem } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerItem';
const LazyNavigationMenuItemFolderDnd = lazy(() => const LazyNavigationMenuItemFolderDnd = lazy(() =>
import( import('@/navigation-menu-item/display/folder/components/NavigationMenuItemFolderDnd').then(
'@/navigation-menu-item/display/folder/components/NavigationMenuItemFolderDnd' (module) => ({ default: module.NavigationMenuItemFolderDnd }),
).then((module) => ({ default: module.NavigationMenuItemFolderDnd })), ),
); );
type NavigationMenuItemFolderProps = Pick< type NavigationMenuItemFolderProps = Pick<
@@ -23,9 +23,9 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomState
import { viewsSelector } from '@/views/states/selectors/viewsSelector'; import { viewsSelector } from '@/views/states/selectors/viewsSelector';
const LazyWorkspaceSectionListDndKit = lazy(() => const LazyWorkspaceSectionListDndKit = lazy(() =>
import( import('@/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListDndKit').then(
'@/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListDndKit' (m) => ({ default: m.WorkspaceSectionListDndKit }),
).then((m) => ({ default: m.WorkspaceSectionListDndKit })), ),
); );
const StyledWorkspaceSectionContentGapOffset = styled.div` const StyledWorkspaceSectionContentGapOffset = styled.div`
@@ -10,19 +10,19 @@ import { lazy, Suspense } from 'react';
import { themeCssVariables } from 'twenty-ui/theme-constants'; import { themeCssVariables } from 'twenty-ui/theme-constants';
const FavoritesSectionDispatcher = lazy(() => const FavoritesSectionDispatcher = lazy(() =>
import( import('@/navigation-menu-item/display/sections/favorites/components/FavoritesSectionDispatcher').then(
'@/navigation-menu-item/display/sections/favorites/components/FavoritesSectionDispatcher' (module) => ({
).then((module) => ({ default: module.FavoritesSectionDispatcher,
default: module.FavoritesSectionDispatcher, }),
})), ),
); );
const WorkspaceSectionDispatcher = lazy(() => const WorkspaceSectionDispatcher = lazy(() =>
import( import('@/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionDispatcher').then(
'@/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionDispatcher' (module) => ({
).then((module) => ({ default: module.WorkspaceSectionDispatcher,
default: module.WorkspaceSectionDispatcher, }),
})), ),
); );
const StyledScrollableItemsContainer = styled.div` const StyledScrollableItemsContainer = styled.div`
@@ -17,10 +17,7 @@ import { isUndefined } from '@sniptt/guards';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isDefined, isPlainObject } from 'twenty-shared/utils'; import { isDefined, isPlainObject } from 'twenty-shared/utils';
const mergeCompositeValues = ( const mergeCompositeValues = (existingValue: unknown, incomingValue: unknown) =>
existingValue: unknown,
incomingValue: unknown,
) =>
isPlainObject(existingValue) && isPlainObject(incomingValue) isPlainObject(existingValue) && isPlainObject(incomingValue)
? { ...existingValue, ...incomingValue } ? { ...existingValue, ...incomingValue }
: incomingValue; : incomingValue;
@@ -23,11 +23,11 @@ const ActivityRichTextEditor = lazy(() =>
); );
const RichTextFieldEditor = lazy(() => const RichTextFieldEditor = lazy(() =>
import( import('@/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor').then(
'@/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor' (module) => ({
).then((module) => ({ default: module.RichTextFieldEditor,
default: module.RichTextFieldEditor, }),
})), ),
); );
const StyledContainer = styled.div` const StyledContainer = styled.div`
@@ -3,11 +3,11 @@ import { WidgetSkeletonLoader } from '@/page-layout/widgets/components/WidgetSke
import { lazy, Suspense } from 'react'; import { lazy, Suspense } from 'react';
const FieldRichTextWidget = lazy(() => const FieldRichTextWidget = lazy(() =>
import( import('@/page-layout/widgets/field-rich-text/components/FieldRichTextWidget').then(
'@/page-layout/widgets/field-rich-text/components/FieldRichTextWidget' (module) => ({
).then((module) => ({ default: module.FieldRichTextWidget,
default: module.FieldRichTextWidget, }),
})), ),
); );
type FieldRichTextWidgetRendererProps = { type FieldRichTextWidgetRendererProps = {
@@ -11,11 +11,11 @@ import { isUndefined } from '@sniptt/guards';
import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants'; import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';
const RichTextFieldEditor = lazy(() => const RichTextFieldEditor = lazy(() =>
import( import('@/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor').then(
'@/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor' (module) => ({
).then((module) => ({ default: module.RichTextFieldEditor,
default: module.RichTextFieldEditor, }),
})), ),
); );
const StyledContainer = styled.div` const StyledContainer = styled.div`
@@ -5,11 +5,11 @@ import { useCurrentWidget } from '@/page-layout/widgets/hooks/useCurrentWidget';
import { lazy, Suspense } from 'react'; import { lazy, Suspense } from 'react';
const GraphWidgetAggregateChart = lazy(() => const GraphWidgetAggregateChart = lazy(() =>
import( import('@/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart').then(
'@/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart' (module) => ({
).then((module) => ({ default: module.GraphWidgetAggregateChart,
default: module.GraphWidgetAggregateChart, }),
})), ),
); );
export const GraphWidgetAggregateChartRenderer = () => { export const GraphWidgetAggregateChartRenderer = () => {
@@ -19,11 +19,11 @@ import { getAppPath } from 'twenty-shared/utils';
import { AxisNameDisplay } from '~/generated-metadata/graphql'; import { AxisNameDisplay } from '~/generated-metadata/graphql';
const GraphWidgetBarChart = lazy(() => const GraphWidgetBarChart = lazy(() =>
import( import('@/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart').then(
'@/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart' (module) => ({
).then((module) => ({ default: module.GraphWidgetBarChart,
default: module.GraphWidgetBarChart, }),
})), ),
); );
export const GraphWidgetBarChartRenderer = () => { export const GraphWidgetBarChartRenderer = () => {
@@ -23,11 +23,11 @@ import {
} from '~/generated-metadata/graphql'; } from '~/generated-metadata/graphql';
const GraphWidgetLineChart = lazy(() => const GraphWidgetLineChart = lazy(() =>
import( import('@/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart').then(
'@/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart' (module) => ({
).then((module) => ({ default: module.GraphWidgetLineChart,
default: module.GraphWidgetLineChart, }),
})), ),
); );
export const GraphWidgetLineChartRenderer = () => { export const GraphWidgetLineChartRenderer = () => {
@@ -17,11 +17,11 @@ import { AppPath } from 'twenty-shared/types';
import { getAppPath } from 'twenty-shared/utils'; import { getAppPath } from 'twenty-shared/utils';
const GraphWidgetPieChart = lazy(() => const GraphWidgetPieChart = lazy(() =>
import( import('@/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart').then(
'@/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart' (module) => ({
).then((module) => ({ default: module.GraphWidgetPieChart,
default: module.GraphWidgetPieChart, }),
})), ),
); );
export const GraphWidgetPieChartRenderer = () => { export const GraphWidgetPieChartRenderer = () => {
@@ -3,11 +3,11 @@ import { WidgetSkeletonLoader } from '@/page-layout/widgets/components/WidgetSke
import { lazy, Suspense } from 'react'; import { lazy, Suspense } from 'react';
const StandaloneRichTextWidget = lazy(() => const StandaloneRichTextWidget = lazy(() =>
import( import('@/page-layout/widgets/standalone-rich-text/components/StandaloneRichTextWidget').then(
'@/page-layout/widgets/standalone-rich-text/components/StandaloneRichTextWidget' (module) => ({
).then((module) => ({ default: module.StandaloneRichTextWidget,
default: module.StandaloneRichTextWidget, }),
})), ),
); );
type StandaloneRichTextWidgetRendererProps = { type StandaloneRichTextWidgetRendererProps = {
@@ -18,11 +18,11 @@ const StyledContainer = styled.div`
width: 480px; width: 480px;
`; `;
interface SettingsOptionCardContentSelectProps interface SettingsOptionCardContentSelectProps extends React.ComponentProps<
extends React.ComponentProps<typeof SettingsOptionCardContentSelect> {} typeof SettingsOptionCardContentSelect
> {}
interface SettingsOptionCardContentSelectWrapperProps interface SettingsOptionCardContentSelectWrapperProps extends SettingsOptionCardContentSelectProps {
extends SettingsOptionCardContentSelectProps {
onChange: any; onChange: any;
options: any; options: any;
value: any; value: any;
@@ -1,2 +1 @@
export const SETTINGS_OBJECT_MODEL_IS_LABEL_SYNCED_WITH_NAME_LABEL_DEFAULT_VALUE = export const SETTINGS_OBJECT_MODEL_IS_LABEL_SYNCED_WITH_NAME_LABEL_DEFAULT_VALUE = true;
true;
@@ -11,11 +11,11 @@ import type { AddToNavigationDragPayload } from '@/navigation-menu-item/common/t
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState'; import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
const CommandMenuItemWithAddToNavigationDragDndKit = lazy(() => const CommandMenuItemWithAddToNavigationDragDndKit = lazy(() =>
import( import('@/command-menu/components/CommandMenuItemWithAddToNavigationDragDndKit').then(
'@/command-menu/components/CommandMenuItemWithAddToNavigationDragDndKit' (m) => ({
).then((m) => ({ default: m.CommandMenuItemWithAddToNavigationDragDndKit,
default: m.CommandMenuItemWithAddToNavigationDragDndKit, }),
})), ),
); );
type SidePanelItemWithAddToNavigationDragProps = { type SidePanelItemWithAddToNavigationDragProps = {
@@ -14,11 +14,11 @@ const ActivityRichTextEditor = lazy(() =>
); );
const RichTextFieldEditor = lazy(() => const RichTextFieldEditor = lazy(() =>
import( import('@/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor').then(
'@/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor' (module) => ({
).then((module) => ({ default: module.RichTextFieldEditor,
default: module.RichTextFieldEditor, }),
})), ),
); );
const StyledContainer = styled.div` const StyledContainer = styled.div`
@@ -15,7 +15,8 @@ import { MainButton } from 'twenty-ui/input';
const StyledContainer = styled.div` const StyledContainer = styled.div`
align-items: center; align-items: center;
background: repeating-linear-gradient( background:
repeating-linear-gradient(
0deg, 0deg,
${themeCssVariables.font.color.primary}, ${themeCssVariables.font.color.primary},
${themeCssVariables.font.color.primary} 10px, ${themeCssVariables.font.color.primary} 10px,
@@ -15,19 +15,19 @@ type WorkflowActionCodeProps = {
}; };
const WorkflowEditActionCode = lazy(() => const WorkflowEditActionCode = lazy(() =>
import( import('@/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode').then(
'@/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode' (module) => ({
).then((module) => ({ default: module.WorkflowEditActionCode,
default: module.WorkflowEditActionCode, }),
})), ),
); );
const WorkflowReadonlyActionCode = lazy(() => const WorkflowReadonlyActionCode = lazy(() =>
import( import('@/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowReadonlyActionCode').then(
'@/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowReadonlyActionCode' (module) => ({
).then((module) => ({ default: module.WorkflowReadonlyActionCode,
default: module.WorkflowReadonlyActionCode, }),
})), ),
); );
export const WorkflowActionCode = ({ export const WorkflowActionCode = ({
@@ -34,13 +34,9 @@ export const preloadMockedMetadata =
{ mockedViews }, { mockedViews },
{ mockedNavigationMenuItems }, { mockedNavigationMenuItems },
] = await Promise.all([ ] = await Promise.all([
import( import('~/testing/mock-data/generated/metadata/objects/mock-objects-metadata'),
'~/testing/mock-data/generated/metadata/objects/mock-objects-metadata'
),
import('~/testing/mock-data/generated/metadata/views/mock-views-data'), import('~/testing/mock-data/generated/metadata/views/mock-views-data'),
import( import('~/testing/mock-data/generated/metadata/navigation-menu-items/mock-navigation-menu-items-data'),
'~/testing/mock-data/generated/metadata/navigation-menu-items/mock-navigation-menu-items-data'
),
]); ]);
const { flatObjects, flatFields, flatIndexes } = const { flatObjects, flatFields, flatIndexes } =
@@ -84,9 +84,7 @@ const addAction = async (options: {
test?: boolean; test?: boolean;
}) => { }) => {
if (options.apiUrl) { if (options.apiUrl) {
console.warn( console.warn(chalk.yellow('⚠ --api-url is deprecated. Use --url instead.'));
chalk.yellow('⚠ --api-url is deprecated. Use --url instead.'),
);
} }
const configPath = options.test ? getConfigPath(true) : undefined; const configPath = options.test ? getConfigPath(true) : undefined;
const configService = new ConfigService( const configService = new ConfigService(
+51 -31
View File
@@ -24,25 +24,31 @@
], ],
"rules": { "rules": {
"func-style": ["error", "declaration", { "allowArrowFunctions": true }], "func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"no-console": ["warn", { "allow": ["group", "groupCollapsed", "groupEnd"] }], "no-console": [
"warn",
{ "allow": ["group", "groupCollapsed", "groupEnd"] }
],
"no-control-regex": "off", "no-control-regex": "off",
"no-debugger": "error", "no-debugger": "error",
"no-duplicate-imports": "error", "no-duplicate-imports": "error",
"no-undef": "off", "no-undef": "off",
"no-unused-vars": "off", "no-unused-vars": "off",
"no-redeclare": "off", "no-redeclare": "off",
"no-restricted-imports": ["error", { "no-restricted-imports": [
"patterns": [ "error",
{ {
"group": ["**../"], "patterns": [
"message": "Relative imports are not allowed." {
}, "group": ["**../"],
{ "message": "Relative imports are not allowed."
"group": ["lodash"], },
"message": "Please use the standalone lodash package (for instance: `import groupBy from 'lodash.groupby'` instead of `import { groupBy } from 'lodash'`)" {
} "group": ["lodash"],
] "message": "Please use the standalone lodash package (for instance: `import groupBy from 'lodash.groupby'` instead of `import { groupBy } from 'lodash'`)"
}], }
]
}
],
"import/no-duplicates": "error", "import/no-duplicates": "error",
@@ -51,36 +57,50 @@
"typescript/consistent-type-imports": "off", "typescript/consistent-type-imports": "off",
"typescript/explicit-function-return-type": "off", "typescript/explicit-function-return-type": "off",
"typescript/explicit-module-boundary-types": "off", "typescript/explicit-module-boundary-types": "off",
"typescript/no-empty-object-type": ["error", { "typescript/no-empty-object-type": [
"allowInterfaces": "with-single-extends" "error",
}], {
"allowInterfaces": "with-single-extends"
}
],
"typescript/no-empty-function": "off", "typescript/no-empty-function": "off",
"typescript/no-explicit-any": "warn", "typescript/no-explicit-any": "warn",
"typescript/no-floating-promises": "error", "typescript/no-floating-promises": "error",
"typescript/no-misused-promises": "error", "typescript/no-misused-promises": "error",
"typescript/no-unused-vars": ["warn", { "typescript/no-unused-vars": [
"vars": "all", "warn",
"varsIgnorePattern": "^_", {
"args": "after-used", "vars": "all",
"argsIgnorePattern": "^_" "varsIgnorePattern": "^_",
}], "args": "after-used",
"argsIgnorePattern": "^_"
}
],
"twenty/inject-workspace-repository": "warn", "twenty/inject-workspace-repository": "warn",
"twenty/rest-api-methods-should-be-guarded": "error", "twenty/rest-api-methods-should-be-guarded": "error",
"twenty/graphql-resolvers-should-be-guarded": "error", "twenty/graphql-resolvers-should-be-guarded": "error",
"twenty/upgrade-command-filename": "error", "twenty/upgrade-command-filename": "error",
"twenty/enforce-module-boundaries": ["error", { "twenty/enforce-module-boundaries": [
"depConstraints": [ "error",
{ {
"sourceTag": "scope:backend", "depConstraints": [
"onlyDependOnLibsWithTags": ["scope:shared", "scope:backend"] {
} "sourceTag": "scope:backend",
] "onlyDependOnLibsWithTags": ["scope:shared", "scope:backend"]
}] }
]
}
]
}, },
"overrides": [ "overrides": [
{ {
"files": ["**/*.spec.ts", "**/*.integration-spec.ts", "**/__tests__/**", "**/test/**"], "files": [
"**/*.spec.ts",
"**/*.integration-spec.ts",
"**/__tests__/**",
"**/test/**"
],
"rules": { "rules": {
"typescript/no-explicit-any": "off" "typescript/no-explicit-any": "off"
} }
+6 -3
View File
@@ -10,9 +10,12 @@
"baseUrl": "./../../", "baseUrl": "./../../",
"experimental": { "experimental": {
"plugins": [ "plugins": [
["@lingui/swc-plugin", { [
"stripNonEssentialFields": false "@lingui/swc-plugin",
}] {
"stripNonEssentialFields": false
}
]
] ]
} }
}, },
+4 -4
View File
@@ -158,12 +158,12 @@
], ],
"options": { "options": {
"cwd": "{projectRoot}", "cwd": "{projectRoot}",
"command": "npx oxlint --type-aware -c .oxlintrc.json src/ && (prettier src/ --check --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint twenty-server --configuration=fix' && false))" "command": "npx oxlint --type-aware -c .oxlintrc.json src/ && (npx oxfmt --check src/ || (echo 'ERROR: oxfmt formatting check failed! Fix with: npx nx lint twenty-server --configuration=fix' && false))"
}, },
"configurations": { "configurations": {
"ci": {}, "ci": {},
"fix": { "fix": {
"command": "npx oxlint --type-aware --fix -c .oxlintrc.json src/ && prettier src/ --write --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata" "command": "npx oxlint --type-aware --fix -c .oxlintrc.json src/ && npx oxfmt src/"
} }
} }
}, },
@@ -172,11 +172,11 @@
"dependsOn": ["twenty-oxlint-rules:build"], "dependsOn": ["twenty-oxlint-rules:build"],
"options": { "options": {
"cwd": "{projectRoot}", "cwd": "{projectRoot}",
"command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware -c .oxlintrc.json $FILES && (prettier --check $FILES || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint:diff-with-main twenty-server --configuration=fix' && false)))" "command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware -c .oxlintrc.json $FILES && (npx oxfmt --check $FILES || (echo 'ERROR: oxfmt formatting check failed! Fix with: npx nx lint:diff-with-main twenty-server --configuration=fix' && false)))"
}, },
"configurations": { "configurations": {
"fix": { "fix": {
"command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware --fix -c .oxlintrc.json $FILES && prettier --write $FILES)" "command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware --fix -c .oxlintrc.json $FILES && npx oxfmt $FILES)"
} }
} }
}, },
@@ -142,9 +142,7 @@ const extractCost = (
model.cacheCreationCostPerMillionTokens = cost.cache_write; model.cacheCreationCostPerMillionTokens = cost.cache_write;
} }
const longCtx = cost.context_over_200k as const longCtx = cost.context_over_200k as Record<string, unknown> | undefined;
| Record<string, unknown>
| undefined;
if (longCtx && typeof longCtx.input === 'number') { if (longCtx && typeof longCtx.input === 'number') {
model.longContextCost = { model.longContextCost = {
@@ -9,8 +9,8 @@ import { type WorkspaceIteratorService } from 'src/database/commands/command-run
export type ActiveOrSuspendedWorkspaceCommandOptions = WorkspaceCommandOptions; export type ActiveOrSuspendedWorkspaceCommandOptions = WorkspaceCommandOptions;
export abstract class ActiveOrSuspendedWorkspaceCommandRunner< export abstract class ActiveOrSuspendedWorkspaceCommandRunner<
Options extends Options extends ActiveOrSuspendedWorkspaceCommandOptions =
ActiveOrSuspendedWorkspaceCommandOptions = ActiveOrSuspendedWorkspaceCommandOptions, ActiveOrSuspendedWorkspaceCommandOptions,
> extends WorkspaceCommandRunner<Options> { > extends WorkspaceCommandRunner<Options> {
constructor( constructor(
protected readonly workspaceIteratorService: WorkspaceIteratorService, protected readonly workspaceIteratorService: WorkspaceIteratorService,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.21.0', 1775129420309) @RegisteredInstanceCommand('1.21.0', 1775129420309)
export class AddViewFieldGroupIdIndexOnViewFieldFastInstanceCommand export class AddViewFieldGroupIdIndexOnViewFieldFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`CREATE INDEX IF NOT EXISTS "IDX_VIEW_FIELD_VIEW_FIELD_GROUP_ID" ON "core"."viewField" ("viewFieldGroupId")`, `CREATE INDEX IF NOT EXISTS "IDX_VIEW_FIELD_VIEW_FIELD_GROUP_ID" ON "core"."viewField" ("viewFieldGroupId")`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.21.0', 1775165049548) @RegisteredInstanceCommand('1.21.0', 1775165049548)
export class MigrateMessagingCalendarToCoreFastInstanceCommand export class MigrateMessagingCalendarToCoreFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."messageFolder" ALTER COLUMN "parentFolderId" TYPE character varying`, `ALTER TABLE "core"."messageFolder" ALTER COLUMN "parentFolderId" TYPE character varying`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.21.0', 1775200000000) @RegisteredInstanceCommand('1.21.0', 1775200000000)
export class AddEmailThreadWidgetTypeFastInstanceCommand export class AddEmailThreadWidgetTypeFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TYPE "core"."pageLayoutWidget_type_enum" RENAME TO "pageLayoutWidget_type_enum_old"`, `ALTER TYPE "core"."pageLayoutWidget_type_enum" RENAME TO "pageLayoutWidget_type_enum_old"`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.22.0', 1775749486425) @RegisteredInstanceCommand('1.22.0', 1775749486425)
export class AddPermissionFlagRoleIdIndexFastInstanceCommand export class AddPermissionFlagRoleIdIndexFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'CREATE INDEX IF NOT EXISTS "IDX_PERMISSION_FLAG_ROLE_ID" ON "core"."permissionFlag" ("roleId") ', 'CREATE INDEX IF NOT EXISTS "IDX_PERMISSION_FLAG_ROLE_ID" ON "core"."permissionFlag" ("roleId") ',
@@ -15,9 +15,7 @@ const TABLES = [
]; ];
@RegisteredInstanceCommand('1.22.0', 1775758621017) @RegisteredInstanceCommand('1.22.0', 1775758621017)
export class AddWorkspaceIdToIndirectEntitiesFastInstanceCommand export class AddWorkspaceIdToIndirectEntitiesFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
for (const table of TABLES) { for (const table of TABLES) {
await queryRunner.query( await queryRunner.query(
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.22.0', 1775761294897) @RegisteredInstanceCommand('1.22.0', 1775761294897)
export class AddWorkspaceIdIndexesAndFksFastInstanceCommand export class AddWorkspaceIdIndexesAndFksFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'CREATE INDEX IF NOT EXISTS "IDX_78ae6cfe5f49a76c4bf842ad58" ON "core"."applicationVariable" ("workspaceId") ', 'CREATE INDEX IF NOT EXISTS "IDX_78ae6cfe5f49a76c4bf842ad58" ON "core"."applicationVariable" ("workspaceId") ',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.22.0', 1775804361516) @RegisteredInstanceCommand('1.22.0', 1775804361516)
export class DropObjectMetadataDataSourceFkFastInstanceCommand export class DropObjectMetadataDataSourceFkFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'ALTER TABLE "core"."objectMetadata" DROP CONSTRAINT "FK_0b19dd17369574578bc18c405b2"', 'ALTER TABLE "core"."objectMetadata" DROP CONSTRAINT "FK_0b19dd17369574578bc18c405b2"',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.22.0', 1776078919203) @RegisteredInstanceCommand('1.22.0', 1776078919203)
export class AddCreditBalanceToBillingCustomerFastInstanceCommand export class AddCreditBalanceToBillingCustomerFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
const tableExists = await queryRunner.query( const tableExists = await queryRunner.query(
`SELECT 1 FROM pg_tables WHERE schemaname = 'core' AND tablename = 'billingCustomer'`, `SELECT 1 FROM pg_tables WHERE schemaname = 'core' AND tablename = 'billingCustomer'`,
@@ -56,9 +56,7 @@ const BACKFILL_DEFINITIONS: BackfillDefinition[] = [
const TABLES = BACKFILL_DEFINITIONS.map((definition) => definition.table); const TABLES = BACKFILL_DEFINITIONS.map((definition) => definition.table);
@RegisteredInstanceCommand('1.22.0', 1775758621018, { type: 'slow' }) @RegisteredInstanceCommand('1.22.0', 1775758621018, { type: 'slow' })
export class BackfillWorkspaceIdOnIndirectEntitiesSlowInstanceCommand export class BackfillWorkspaceIdOnIndirectEntitiesSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
async runDataMigration(dataSource: DataSource): Promise<void> { async runDataMigration(dataSource: DataSource): Promise<void> {
for (const { table, parentTable, foreignKey } of BACKFILL_DEFINITIONS) { for (const { table, parentTable, foreignKey } of BACKFILL_DEFINITIONS) {
await dataSource.query( await dataSource.query(
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.23.0', 1775654781000) @RegisteredInstanceCommand('1.23.0', 1775654781000)
export class AddConditionalAvailabilityExpressionToPageLayoutWidgetFastInstanceCommand export class AddConditionalAvailabilityExpressionToPageLayoutWidgetFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."pageLayoutWidget" ADD COLUMN IF NOT EXISTS "conditionalAvailabilityExpression" varchar`, `ALTER TABLE "core"."pageLayoutWidget" ADD COLUMN IF NOT EXISTS "conditionalAvailabilityExpression" varchar`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.23.0', 1775752190522) @RegisteredInstanceCommand('1.23.0', 1775752190522)
export class AddTableWidgetViewTypeFastInstanceCommand export class AddTableWidgetViewTypeFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TYPE "core"."view_type_enum" ADD VALUE IF NOT EXISTS 'TABLE_WIDGET' AFTER 'FIELDS_WIDGET'`, `ALTER TYPE "core"."view_type_enum" ADD VALUE IF NOT EXISTS 'TABLE_WIDGET' AFTER 'FIELDS_WIDGET'`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.23.0', 1775752781995) @RegisteredInstanceCommand('1.23.0', 1775752781995)
export class AddStandalonePageFastInstanceCommand export class AddStandalonePageFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'ALTER TABLE "core"."navigationMenuItem" ADD "pageLayoutId" uuid', 'ALTER TABLE "core"."navigationMenuItem" ADD "pageLayoutId" uuid',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.23.0', 1776090711153) @RegisteredInstanceCommand('1.23.0', 1776090711153)
export class AddGlobalObjectContextToCommandMenuItemAvailabilityTypeFastInstanceCommand export class AddGlobalObjectContextToCommandMenuItemAvailabilityTypeFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'ALTER TYPE "core"."commandMenuItem_availabilitytype_enum" RENAME TO "commandMenuItem_availabilitytype_enum_old"', 'ALTER TYPE "core"."commandMenuItem_availabilitytype_enum" RENAME TO "commandMenuItem_availabilitytype_enum_old"',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.23.0', 1776168404836) @RegisteredInstanceCommand('1.23.0', 1776168404836)
export class AddPageLayoutIdToCommandMenuItemFastInstanceCommand export class AddPageLayoutIdToCommandMenuItemFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'ALTER TABLE "core"."commandMenuItem" ADD "pageLayoutId" uuid', 'ALTER TABLE "core"."commandMenuItem" ADD "pageLayoutId" uuid',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('1.23.0', 1785000000000) @RegisteredInstanceCommand('1.23.0', 1785000000000)
export class DropWorkspaceVersionColumnFastInstanceCommand export class DropWorkspaceVersionColumnFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."workspace" DROP COLUMN IF EXISTS "version"`, `ALTER TABLE "core"."workspace" DROP COLUMN IF EXISTS "version"`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.1.0', 1776886452831) @RegisteredInstanceCommand('2.1.0', 1776886452831)
export class AddIsPreInstalledToApplicationRegistrationFastInstanceCommand export class AddIsPreInstalledToApplicationRegistrationFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'ALTER TABLE "core"."applicationRegistration" ADD "isPreInstalled" boolean NOT NULL DEFAULT false', 'ALTER TABLE "core"."applicationRegistration" ADD "isPreInstalled" boolean NOT NULL DEFAULT false',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.1.0', 1777012800000) @RegisteredInstanceCommand('2.1.0', 1777012800000)
export class AddProviderExecutedToAgentMessagePartFastInstanceCommand export class AddProviderExecutedToAgentMessagePartFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'ALTER TABLE "core"."agentMessagePart" ADD "providerExecuted" boolean', 'ALTER TABLE "core"."agentMessagePart" ADD "providerExecuted" boolean',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { SlowInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/slow-instance-command.interface'; import { SlowInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/slow-instance-command.interface';
@RegisteredInstanceCommand('2.1.0', 1795000002000, { type: 'slow' }) @RegisteredInstanceCommand('2.1.0', 1795000002000, { type: 'slow' })
export class BackfillPageLayoutWidgetPositionSlowInstanceCommand export class BackfillPageLayoutWidgetPositionSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
async runDataMigration(dataSource: DataSource): Promise<void> { async runDataMigration(dataSource: DataSource): Promise<void> {
await dataSource.query( await dataSource.query(
`UPDATE "core"."pageLayoutWidget" `UPDATE "core"."pageLayoutWidget"
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.2.0', 1777455269302) @RegisteredInstanceCommand('2.2.0', 1777455269302)
export class AddCacheTokensToAgentChatThreadFastInstanceCommand export class AddCacheTokensToAgentChatThreadFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."agentChatThread" ADD "totalCacheReadTokens" bigint NOT NULL DEFAULT 0`, `ALTER TABLE "core"."agentChatThread" ADD "totalCacheReadTokens" bigint NOT NULL DEFAULT 0`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.2.0', 1777539664664) @RegisteredInstanceCommand('2.2.0', 1777539664664)
export class AddLogoToApplicationFastInstanceCommand export class AddLogoToApplicationFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('ALTER TABLE "core"."application" ADD "logo" text'); await queryRunner.query('ALTER TABLE "core"."application" ADD "logo" text');
} }
@@ -20,9 +20,7 @@ import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/
// `IF NOT EXISTS`), so cross-upgrade callers see it as a no-op while // `IF NOT EXISTS`), so cross-upgrade callers see it as a no-op while
// fresh-from-2.5 install paths still create the column there as before. // fresh-from-2.5 install paths still create the column there as before.
@RegisteredInstanceCommand('2.3.0', 1747234200000) @RegisteredInstanceCommand('2.3.0', 1747234200000)
export class AddSubFieldNameToViewSortEarlyFastInstanceCommand export class AddSubFieldNameToViewSortEarlyFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."viewSort" ADD COLUMN IF NOT EXISTS "subFieldName" character varying`, `ALTER TABLE "core"."viewSort" ADD COLUMN IF NOT EXISTS "subFieldName" character varying`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.3.0', 1747234300000) @RegisteredInstanceCommand('2.3.0', 1747234300000)
export class AddRelationTargetFieldMetadataIdToViewFilterEarlyFastInstanceCommand export class AddRelationTargetFieldMetadataIdToViewFilterEarlyFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."viewFilter" ADD COLUMN IF NOT EXISTS "relationTargetFieldMetadataId" uuid`, `ALTER TABLE "core"."viewFilter" ADD COLUMN IF NOT EXISTS "relationTargetFieldMetadataId" uuid`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.3.0', 1777308014234) @RegisteredInstanceCommand('2.3.0', 1777308014234)
export class AddUpgradeMigrationWorkspaceIdIndexFastInstanceCommand export class AddUpgradeMigrationWorkspaceIdIndexFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'CREATE INDEX IF NOT EXISTS "IDX_UPGRADE_MIGRATION_WORKSPACE_ID_NAME_ATTEMPT" ON "core"."upgradeMigration" ("workspaceId", "name", "attempt") WHERE "workspaceId" IS NOT NULL', 'CREATE INDEX IF NOT EXISTS "IDX_UPGRADE_MIGRATION_WORKSPACE_ID_NAME_ATTEMPT" ON "core"."upgradeMigration" ("workspaceId", "name", "attempt") WHERE "workspaceId" IS NOT NULL',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.3.0', 1777682000000) @RegisteredInstanceCommand('2.3.0', 1777682000000)
export class AddDeletedAtToAgentChatThreadFastInstanceCommand export class AddDeletedAtToAgentChatThreadFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."agentChatThread" ADD "deletedAt" TIMESTAMP WITH TIME ZONE`, `ALTER TABLE "core"."agentChatThread" ADD "deletedAt" TIMESTAMP WITH TIME ZONE`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.3.0', 1777896012579) @RegisteredInstanceCommand('2.3.0', 1777896012579)
export class ConnectionProviderSyncableEntityFastInstanceCommand export class ConnectionProviderSyncableEntityFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`CREATE TABLE "core"."connectionProvider" ( `CREATE TABLE "core"."connectionProvider" (
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.3.0', 1777915958318) @RegisteredInstanceCommand('2.3.0', 1777915958318)
export class RemoveUserDefaultAvatarUrlFastInstanceCommand export class RemoveUserDefaultAvatarUrlFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'ALTER TABLE "core"."user" DROP COLUMN "defaultAvatarUrl"', 'ALTER TABLE "core"."user" DROP COLUMN "defaultAvatarUrl"',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.3.0', 1777966965587) @RegisteredInstanceCommand('2.3.0', 1777966965587)
export class TransformApplicationVariableToSyncableEntityFastInstanceCommand export class TransformApplicationVariableToSyncableEntityFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'DROP INDEX "core"."IDX_78ae6cfe5f49a76c4bf842ad58"', 'DROP INDEX "core"."IDX_78ae6cfe5f49a76c4bf842ad58"',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.3.0', 1797000001000) @RegisteredInstanceCommand('2.3.0', 1797000001000)
export class AddToolAndWorkflowActionTriggerSettingsFastInstanceCommand export class AddToolAndWorkflowActionTriggerSettingsFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."logicFunction" ADD "toolTriggerSettings" jsonb`, `ALTER TABLE "core"."logicFunction" ADD "toolTriggerSettings" jsonb`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { SlowInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/slow-instance-command.interface'; import { SlowInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/slow-instance-command.interface';
@RegisteredInstanceCommand('2.3.0', 1777966965588, { type: 'slow' }) @RegisteredInstanceCommand('2.3.0', 1777966965588, { type: 'slow' })
export class BackfillApplicationVariableUniversalIdentifierSlowInstanceCommand export class BackfillApplicationVariableUniversalIdentifierSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
async runDataMigration(dataSource: DataSource): Promise<void> { async runDataMigration(dataSource: DataSource): Promise<void> {
await dataSource.query( await dataSource.query(
'DELETE FROM "core"."applicationVariable" WHERE "applicationId" IS NULL', 'DELETE FROM "core"."applicationVariable" WHERE "applicationId" IS NULL',
@@ -6,9 +6,7 @@ import { SlowInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/
// isTool=true previously exposed a function on both surfaces (AI tool and // isTool=true previously exposed a function on both surfaces (AI tool and
// workflow node), so we populate both new triggers when migrating. // workflow node), so we populate both new triggers when migrating.
@RegisteredInstanceCommand('2.3.0', 1797000002000, { type: 'slow' }) @RegisteredInstanceCommand('2.3.0', 1797000002000, { type: 'slow' })
export class MigrateToolTriggerSettingsSlowInstanceCommand export class MigrateToolTriggerSettingsSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
async runDataMigration(dataSource: DataSource): Promise<void> { async runDataMigration(dataSource: DataSource): Promise<void> {
const defaultJsonSchema = `'{"type":"object","properties":{}}'::jsonb`; const defaultJsonSchema = `'{"type":"object","properties":{}}'::jsonb`;
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.4.0', 1747234400000) @RegisteredInstanceCommand('2.4.0', 1747234400000)
export class AddRelationTargetFieldMetadataIdToViewFilterEarly2_4FastInstanceCommand export class AddRelationTargetFieldMetadataIdToViewFilterEarly2_4FastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."viewFilter" ADD COLUMN IF NOT EXISTS "relationTargetFieldMetadataId" uuid`, `ALTER TABLE "core"."viewFilter" ADD COLUMN IF NOT EXISTS "relationTargetFieldMetadataId" uuid`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.4.0', 1777100000000) @RegisteredInstanceCommand('2.4.0', 1777100000000)
export class AddMetadataToBillingPriceFastInstanceCommand export class AddMetadataToBillingPriceFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
const tableExists = await queryRunner.query( const tableExists = await queryRunner.query(
`SELECT 1 FROM pg_tables WHERE schemaname = 'core' AND tablename = 'billingPrice'`, `SELECT 1 FROM pg_tables WHERE schemaname = 'core' AND tablename = 'billingPrice'`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.4.0', 1778256809018) @RegisteredInstanceCommand('2.4.0', 1778256809018)
export class AddEmailGroupChannelTypeFastInstanceCommand export class AddEmailGroupChannelTypeFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'ALTER TYPE "core"."messageChannel_type_enum" RENAME TO "messageChannel_type_enum_old"', 'ALTER TYPE "core"."messageChannel_type_enum" RENAME TO "messageChannel_type_enum_old"',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.4.0', 1798000003000) @RegisteredInstanceCommand('2.4.0', 1798000003000)
export class AddApplicationIdToPublicDomainFastInstanceCommand export class AddApplicationIdToPublicDomainFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."publicDomain" ADD "applicationId" uuid`, `ALTER TABLE "core"."publicDomain" ADD "applicationId" uuid`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.5.0', 1747234500000) @RegisteredInstanceCommand('2.5.0', 1747234500000)
export class AddRelationTargetFieldMetadataIdToViewFilterEarly2_5FastInstanceCommand export class AddRelationTargetFieldMetadataIdToViewFilterEarly2_5FastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."viewFilter" ADD COLUMN IF NOT EXISTS "relationTargetFieldMetadataId" uuid`, `ALTER TABLE "core"."viewFilter" ADD COLUMN IF NOT EXISTS "relationTargetFieldMetadataId" uuid`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.5.0', 1778502963794) @RegisteredInstanceCommand('2.5.0', 1778502963794)
export class AddSubFieldNameToViewSortFastInstanceCommand export class AddSubFieldNameToViewSortFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
// Idempotent so it can coexist with the early 2.3 instance command // Idempotent so it can coexist with the early 2.3 instance command
// `1747234200000-add-sub-field-name-to-view-sort` (see that file for context). // `1747234200000-add-sub-field-name-to-view-sort` (see that file for context).
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.5.0', 1778525104406) @RegisteredInstanceCommand('2.5.0', 1778525104406)
export class AddIsInternalMessagesImportEnabledFastInstanceCommand export class AddIsInternalMessagesImportEnabledFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
'ALTER TABLE "core"."workspace" ADD COLUMN IF NOT EXISTS "isInternalMessagesImportEnabled" boolean NOT NULL DEFAULT false', 'ALTER TABLE "core"."workspace" ADD COLUMN IF NOT EXISTS "isInternalMessagesImportEnabled" boolean NOT NULL DEFAULT false',
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.5.0', 1778550000000) @RegisteredInstanceCommand('2.5.0', 1778550000000)
export class CreateSigningKeyTableFastInstanceCommand export class CreateSigningKeyTableFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`CREATE TABLE IF NOT EXISTS "core"."signingKey" ( `CREATE TABLE IF NOT EXISTS "core"."signingKey" (
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { type FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.5.0', 1798500000000) @RegisteredInstanceCommand('2.5.0', 1798500000000)
export class DropPostgresCredentialsTableFastInstanceCommand export class DropPostgresCredentialsTableFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE IF EXISTS "core"."postgresCredentials" DROP CONSTRAINT IF EXISTS "FK_9494639abc06f9c8c3691bf5d22"`, `ALTER TABLE IF EXISTS "core"."postgresCredentials" DROP CONSTRAINT IF EXISTS "FK_9494639abc06f9c8c3691bf5d22"`,
@@ -26,9 +26,7 @@ const isPlaintext = (value: string | null): value is string =>
isDefined(value) && !value.startsWith(SECRET_ENCRYPTION_ENVELOPE_V2_PREFIX); isDefined(value) && !value.startsWith(SECRET_ENCRYPTION_ENVELOPE_V2_PREFIX);
@RegisteredInstanceCommand('2.5.0', 1798000004000, { type: 'slow' }) @RegisteredInstanceCommand('2.5.0', 1798000004000, { type: 'slow' })
export class EncryptConnectedAccountTokensSlowInstanceCommand export class EncryptConnectedAccountTokensSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
constructor( constructor(
private readonly connectedAccountTokenEncryptionService: ConnectedAccountTokenEncryptionService, private readonly connectedAccountTokenEncryptionService: ConnectedAccountTokenEncryptionService,
) {} ) {}
@@ -34,9 +34,7 @@ const looksLikeLegacyCtrCiphertext = (value: string): boolean =>
LEGACY_CTR_LOOKS_LIKE_BASE64_RE.test(value); LEGACY_CTR_LOOKS_LIKE_BASE64_RE.test(value);
@RegisteredInstanceCommand('2.5.0', 1798000005000, { type: 'slow' }) @RegisteredInstanceCommand('2.5.0', 1798000005000, { type: 'slow' })
export class EncryptApplicationVariableSlowInstanceCommand export class EncryptApplicationVariableSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
private readonly logger = new Logger( private readonly logger = new Logger(
EncryptApplicationVariableSlowInstanceCommand.name, EncryptApplicationVariableSlowInstanceCommand.name,
); );
@@ -19,9 +19,7 @@ type ApplicationRegistrationVariableRow = {
}; };
@RegisteredInstanceCommand('2.5.0', 1798000006000, { type: 'slow' }) @RegisteredInstanceCommand('2.5.0', 1798000006000, { type: 'slow' })
export class EncryptApplicationRegistrationVariableSlowInstanceCommand export class EncryptApplicationRegistrationVariableSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
constructor( constructor(
private readonly secretEncryptionService: SecretEncryptionService, private readonly secretEncryptionService: SecretEncryptionService,
) {} ) {}
@@ -18,9 +18,7 @@ type SigningKeyRow = {
}; };
@RegisteredInstanceCommand('2.5.0', 1798000007000, { type: 'slow' }) @RegisteredInstanceCommand('2.5.0', 1798000007000, { type: 'slow' })
export class EncryptSigningKeyPrivateKeysSlowInstanceCommand export class EncryptSigningKeyPrivateKeysSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
constructor( constructor(
private readonly secretEncryptionService: SecretEncryptionService, private readonly secretEncryptionService: SecretEncryptionService,
) {} ) {}
@@ -14,9 +14,7 @@ import { TypedReflect } from 'src/utils/typed-reflect';
type SensitiveConfigRow = { id: string; value: unknown }; type SensitiveConfigRow = { id: string; value: unknown };
@RegisteredInstanceCommand('2.5.0', 1798000008000, { type: 'slow' }) @RegisteredInstanceCommand('2.5.0', 1798000008000, { type: 'slow' })
export class EncryptSensitiveConfigStorageSlowInstanceCommand export class EncryptSensitiveConfigStorageSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
constructor( constructor(
private readonly secretEncryptionService: SecretEncryptionService, private readonly secretEncryptionService: SecretEncryptionService,
) {} ) {}
@@ -22,9 +22,7 @@ type TwoFactorMethodRow = {
}; };
@RegisteredInstanceCommand('2.5.0', 1798000009000, { type: 'slow' }) @RegisteredInstanceCommand('2.5.0', 1798000009000, { type: 'slow' })
export class EncryptTotpSecretsSlowInstanceCommand export class EncryptTotpSecretsSlowInstanceCommand implements SlowInstanceCommand {
implements SlowInstanceCommand
{
constructor( constructor(
private readonly secretEncryptionService: SecretEncryptionService, private readonly secretEncryptionService: SecretEncryptionService,
private readonly simpleSecretEncryptionUtil: SimpleSecretEncryptionUtil, private readonly simpleSecretEncryptionUtil: SimpleSecretEncryptionUtil,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.6.0', 1778235340020) @RegisteredInstanceCommand('2.6.0', 1778235340020)
export class RenamePermissionFlagToRolePermissionFlagFastInstanceCommand export class RenamePermissionFlagToRolePermissionFlagFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."permissionFlag" RENAME TO "rolePermissionFlag"`, `ALTER TABLE "core"."permissionFlag" RENAME TO "rolePermissionFlag"`,
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.6.0', 1778235340021) @RegisteredInstanceCommand('2.6.0', 1778235340021)
export class PermissionFlagSyncableEntityFastInstanceCommand export class PermissionFlagSyncableEntityFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`CREATE TABLE "core"."permissionFlag" ( `CREATE TABLE "core"."permissionFlag" (
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.6.0', 1778235340022) @RegisteredInstanceCommand('2.6.0', 1778235340022)
export class LinkRolePermissionFlagToPermissionFlagFastInstanceCommand export class LinkRolePermissionFlagToPermissionFlagFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."rolePermissionFlag" `ALTER TABLE "core"."rolePermissionFlag"
@@ -4,9 +4,7 @@ import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decor
import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface'; import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
@RegisteredInstanceCommand('2.6.0', 1798000005000) @RegisteredInstanceCommand('2.6.0', 1798000005000)
export class AddRelationTargetFieldMetadataIdToViewFilterFastInstanceCommand export class AddRelationTargetFieldMetadataIdToViewFilterFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`ALTER TABLE "core"."viewFilter" ADD COLUMN IF NOT EXISTS "relationTargetFieldMetadataId" uuid`, `ALTER TABLE "core"."viewFilter" ADD COLUMN IF NOT EXISTS "relationTargetFieldMetadataId" uuid`,
@@ -9,9 +9,7 @@ const CALENDAR_CHANNEL_INDEX_NAME =
'IDX_CALENDAR_CHANNEL_WORKSPACE_ID_SYNC_ENABLED_SYNC_STAGE'; 'IDX_CALENDAR_CHANNEL_WORKSPACE_ID_SYNC_ENABLED_SYNC_STAGE';
@RegisteredInstanceCommand('2.6.0', 1798000010000) @RegisteredInstanceCommand('2.6.0', 1798000010000)
export class AddChannelSyncStageIndexesFastInstanceCommand export class AddChannelSyncStageIndexesFastInstanceCommand implements FastInstanceCommand {
implements FastInstanceCommand
{
public async up(queryRunner: QueryRunner): Promise<void> { public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query( await queryRunner.query(
`CREATE INDEX IF NOT EXISTS "${MESSAGE_CHANNEL_INDEX_NAME}" ON "core"."messageChannel" ("workspaceId", "isSyncEnabled", "syncStage")`, `CREATE INDEX IF NOT EXISTS "${MESSAGE_CHANNEL_INDEX_NAME}" ON "core"."messageChannel" ("workspaceId", "isSyncEnabled", "syncStage")`,

Some files were not shown because too many files have changed in this diff Show More