Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(fe): format (#16777)
p0nyf8829ad54507
diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjsindex 1cdc7532a4..4475442f28 100644--- a/frontend/eslint.config.mjs+++ b/frontend/eslint.config.mjs@@ -1,5 +1,6 @@import vueI18n from "@intlify/eslint-plugin-vue-i18n";import vueTsEslintConfig from "@vue/eslint-config-typescript";+import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";import pluginVue from "eslint-plugin-vue";export default [@@ -13,6 +14,7 @@ export default [rootDir: import.meta.dirname,}),...vueI18n.configs["flat/recommended"],+ eslintPluginPrettierRecommended,{ignores: ["**/dist/**",diff --git a/frontend/package.json b/frontend/package.jsonindex cb4d5a0c6a..efa9e58350 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -123,6 +123,8 @@"code-inspector-plugin": "^0.20.12","dotenv": "^16.5.0","eslint": "9.28.0",+ "eslint-config-prettier": "^10.1.5",+ "eslint-plugin-prettier": "^5.5.1","eslint-plugin-vue": "9.33.0","events": "^3.3.0","jquery": "3.7.1",diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yamlindex 56ea4ec993..17977cb1f3 100644--- a/frontend/pnpm-lock.yaml+++ b/frontend/pnpm-lock.yaml@@ -326,6 +326,12 @@ importers:eslint:specifier: 9.28.0version: 9.28.0([email protected])+ eslint-config-prettier:+ specifier: ^10.1.5+ version: 10.1.5([email protected]([email protected]))+ eslint-plugin-prettier:+ specifier: ^5.5.1+ version: 5.5.1([email protected]([email protected]([email protected])))([email protected]([email protected]))([email protected])eslint-plugin-vue:specifier: 9.33.0version: 9.33.0([email protected]([email protected]))@@ -3357,8 +3363,8 @@ packages:peerDependencies:eslint: '>=7.0.0'- resolution: {integrity: sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg==}+ resolution: {integrity: sha512-dobTkHT6XaEVOo8IO90Q4DOSxnm3Y151QxPJlM/vKC0bVy+d6cVWQZLlFiuZPP0wS6vZwSKeJgKkcS+KfMBlRw==}engines: {node: ^14.18.0 || >=16.0.0}peerDependencies:'@types/eslint': '>=8.0.0'@@ -8697,7 +8703,7 @@ snapshots:dependencies:eslint: 9.28.0([email protected])eslint-config-prettier: 10.1.5([email protected]([email protected]))- eslint-plugin-prettier: 5.4.1([email protected]([email protected]([email protected])))([email protected]([email protected]))([email protected])+ eslint-plugin-prettier: 5.5.1([email protected]([email protected]([email protected])))([email protected]([email protected]))([email protected])prettier: 3.5.3transitivePeerDependencies:- '@types/eslint'@@ -9467,7 +9473,7 @@ snapshots:dependencies:eslint: 9.28.0([email protected])- [email protected]([email protected]([email protected]([email protected])))([email protected]([email protected]))([email protected]):+ [email protected]([email protected]([email protected]([email protected])))([email protected]([email protected]))([email protected]):dependencies:eslint: 9.28.0([email protected])prettier: 3.5.3diff --git a/frontend/src/axios.ts b/frontend/src/axios.tsindex a2a9a91c6e..02e6432e50 100644--- a/frontend/src/axios.ts+++ b/frontend/src/axios.ts@@ -1,7 +1,7 @@import axios from "axios";-import { isDev } from "./utils";import { isSilent } from "./plugins/silent-request";import { pushNotification } from "./store";+import { isDev } from "./utils";axios.defaults.timeout = 30000;axios.interceptors.request.use((request) => {diff --git a/frontend/src/components/AuditLog/AuditLogDataTable.vue b/frontend/src/components/AuditLog/AuditLogDataTable.vueindex 69f40ee4a9..8d4f1452d0 100644--- a/frontend/src/components/AuditLog/AuditLogDataTable.vue+++ b/frontend/src/components/AuditLog/AuditLogDataTable.vue@@ -12,7 +12,6 @@<script lang="tsx" setup>import { fromBinary } from "@bufbuild/protobuf";import dayjs from "dayjs";-import { humanizeDurationV1 } from "@/utils";import { NDataTable, type DataTableColumn } from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";@@ -21,8 +20,12 @@ import { useProjectV1Store, useUserStore } from "@/store";import { projectNamePrefix } from "@/store/modules/v1/common";import { getDateForPbTimestampProtoEs } from "@/types";import type { AuditLog } from "@/types/proto-es/v1/audit_log_service_pb";-import { AuditDataSchema, AuditLog_Severity } from "@/types/proto-es/v1/audit_log_service_pb";+import {+ AuditDataSchema,+ AuditLog_Severity,+} from "@/types/proto-es/v1/audit_log_service_pb";import { SettingSchema } from "@/types/proto-es/v1/setting_service_pb";+import { humanizeDurationV1 } from "@/utils";import { extractProjectResourceName } from "@/utils";import JSONStringView from "./JSONStringView.vue";@@ -62,7 +65,7 @@ const columnList = computed((): AuditDataTableColumn[] => {key: "severity",width: 96,title: t("audit-log.table.level"),- render: (auditLog) => (AuditLog_Severity[auditLog.severity]),+ render: (auditLog) => AuditLog_Severity[auditLog.severity],},{key: "project",diff --git a/frontend/src/components/AuditLog/AuditLogSearch/AuditLogSearch.vue b/frontend/src/components/AuditLog/AuditLogSearch/AuditLogSearch.vueindex 3a4cf5c6cf..08181bbfe5 100644--- a/frontend/src/components/AuditLog/AuditLogSearch/AuditLogSearch.vue+++ b/frontend/src/components/AuditLog/AuditLogSearch/AuditLogSearch.vue@@ -159,11 +159,13 @@ const scopeOptions = computed((): ScopeOption[] => {id: "level",title: t("audit-log.advanced-search.scope.level.title"),description: t("audit-log.advanced-search.scope.level.description"),- options: Object.keys(AuditLog_Severity).filter((v) => isNaN(Number(v))).map((severity) => {+ options: Object.keys(AuditLog_Severity)+ .filter((v) => isNaN(Number(v)))+ .map((severity) => {return {- value: severity,- keywords: [severity],- render: () => "",+ value: severity,+ keywords: [severity],+ render: () => "",};}),},diff --git a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDataTable.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDataTable.vueindex e6714a660c..3c12c2dd58 100644--- a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDataTable.vue+++ b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDataTable.vue@@ -76,7 +76,9 @@ const columnList = computed((): ChangelistDataTableColumn[] => {width: 256,render: (changelist) => {return (- <HumanizeDate date={getDateForPbTimestampProtoEs(changelist.updateTime)} />+ <HumanizeDate+ date={getDateForPbTimestampProtoEs(changelist.updateTime)}+ />);},},diff --git a/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue b/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vueindex eeeecb309f..bbf7a8d5cf 100644--- a/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue+++ b/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue@@ -138,6 +138,7 @@</template><script setup lang="ts">+import { create as createProto } from "@bufbuild/protobuf";import { asyncComputed } from "@vueuse/core";import { UploadIcon } from "lucide-vue-next";import {@@ -154,7 +155,6 @@ import { zindexable as vZindexable } from "vdirs";import { computed, reactive, ref, watch } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";-import { create as createProto } from "@bufbuild/protobuf";import { BBSpin } from "@/bbkit";import ErrorList from "@/components/misc/ErrorList.vue";import {diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vueindex 700274e665..bb256e6ad8 100644--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue@@ -72,8 +72,8 @@</template><script setup lang="ts">-import { asyncComputed } from "@vueuse/core";import { create } from "@bufbuild/protobuf";+import { asyncComputed } from "@vueuse/core";import { FileIcon, HistoryIcon } from "lucide-vue-next";import { NButton, NRadio, NRadioGroup } from "naive-ui";import { zindexable as vZindexable } from "vdirs";diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogForm.vueindex ab6a41f456..ec29f77e40 100644--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogForm.vue+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogForm.vue@@ -45,10 +45,10 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { orderBy } from "lodash-es";import { NCheckbox, NCheckboxGroup } from "naive-ui";import { computed, reactive, watch } from "vue";-import { create } from "@bufbuild/protobuf";import { ChangelogDataTable } from "@/components/Changelog";import { DatabaseSelect } from "@/components/v2";import {diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/utils.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/utils.tsindex dc1b6b4412..b3048c9367 100644--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/utils.ts+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/utils.ts@@ -1,5 +1,5 @@-import { reactive } from "vue";import { create } from "@bufbuild/protobuf";+import { reactive } from "vue";import { useLocalSheetStore } from "@/store";import { Changelist_ChangeSchema } from "@/types/proto-es/v1/changelist_service_pb";diff --git a/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vue b/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vueindex b0d7844b22..3245a2a108 100644--- a/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vue+++ b/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vue@@ -60,6 +60,7 @@</template><script setup lang="ts">+import { create as createProto } from "@bufbuild/protobuf";import { computedAsync } from "@vueuse/core";import { NButton } from "naive-ui";import { zindexable as vZindexable } from "vdirs";@@ -70,7 +71,6 @@ import DownloadSheetButton from "@/components/Sheet/DownloadSheetButton.vue";import { Drawer, DrawerContent, ErrorTipsButton } from "@/components/v2";import { pushNotification, useSheetV1Store } from "@/store";import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";-import { create as createProto } from "@bufbuild/protobuf";import {getSheetStatement,setSheetStatement,diff --git a/frontend/src/components/Changelog/ChangelogDataTable.vue b/frontend/src/components/Changelog/ChangelogDataTable.vueindex 424aa2f48e..2a171676cf 100644--- a/frontend/src/components/Changelog/ChangelogDataTable.vue+++ b/frontend/src/components/Changelog/ChangelogDataTable.vue@@ -169,7 +169,9 @@ const columnList = computed(() => {ellipsis: true,render: (changelog) => {return (- <HumanizeDate date={getDateForPbTimestampProtoEs(changelog.createTime)} />+ <HumanizeDate+ date={getDateForPbTimestampProtoEs(changelog.createTime)}+ />);},},diff --git a/frontend/src/components/Changelog/ChangelogDetail.vue b/frontend/src/components/Changelog/ChangelogDetail.vueindex 0fcc7609b6..b2ffc970c6 100644--- a/frontend/src/components/Changelog/ChangelogDetail.vue+++ b/frontend/src/components/Changelog/ChangelogDetail.vue@@ -23,7 +23,9 @@{{ $t("common.version") }} {{ changelog.version }}</NTag><span class="text-xl">{{- getDateForPbTimestampProtoEs(changelog.createTime)?.toLocaleString()+ getDateForPbTimestampProtoEs(+ changelog.createTime+ )?.toLocaleString()}}</span></div><dl@@ -141,9 +143,7 @@ import {import { getDateForPbTimestampProtoEs } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import type { Changelog } from "@/types/proto-es/v1/database_service_pb";-import {- ChangelogView,-} from "@/types/proto-es/v1/database_service_pb";+import { ChangelogView } from "@/types/proto-es/v1/database_service_pb";import {extractIssueUID,getStatementSize,diff --git a/frontend/src/components/ColumnDataTable/index.vue b/frontend/src/components/ColumnDataTable/index.vueindex 8fba23fe5c..52ba5ec07b 100644--- a/frontend/src/components/ColumnDataTable/index.vue+++ b/frontend/src/components/ColumnDataTable/index.vue@@ -24,12 +24,12 @@ import {} from "@/store";import type { ComposedDatabase } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import type {ColumnMetadata,TableMetadata,} from "@/types/proto-es/v1/database_service_pb";import type { DataClassificationSetting_DataClassificationConfig } from "@/types/proto-es/v1/setting_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasProjectPermissionV2 } from "@/utils";import ClassificationCell from "./ClassificationCell.vue";import LabelsCell from "./LabelsCell.vue";diff --git a/frontend/src/components/ColumnDataTable/utils.ts b/frontend/src/components/ColumnDataTable/utils.tsindex e743ba3c3a..8c7f083cd9 100644--- a/frontend/src/components/ColumnDataTable/utils.ts+++ b/frontend/src/components/ColumnDataTable/utils.ts@@ -1,5 +1,5 @@-import { cloneDeep } from "lodash-es";import { create } from "@bufbuild/protobuf";+import { cloneDeep } from "lodash-es";import { t } from "@/plugins/i18n";import { pushNotification, useDatabaseCatalogV1Store } from "@/store";import { Engine } from "@/types/proto-es/v1/common_pb";@@ -78,13 +78,15 @@ export const updateColumnCatalog = async ({const columns = targetTable.kind.value.columns || [];const columnIndex = columns.findIndex((c: any) => c.name === column);if (columnIndex < 0) {- columns.push(create(ColumnCatalogSchema, {- name: column,- semanticType: columnCatalog.semanticType,- labels: columnCatalog.labels,- classification: columnCatalog.classification,- objectSchema: columnCatalog.objectSchema- }));+ columns.push(+ create(ColumnCatalogSchema, {+ name: column,+ semanticType: columnCatalog.semanticType,+ labels: columnCatalog.labels,+ classification: columnCatalog.classification,+ objectSchema: columnCatalog.objectSchema,+ })+ );} else {columns[columnIndex] = {...columns[columnIndex],@@ -125,7 +127,9 @@ export const updateTableCatalog = async ({pendingUpdateCatalog.schemas.push(targetSchema);}- const tableIndex = targetSchema.tables.findIndex((t: any) => t.name === table);+ const tableIndex = targetSchema.tables.findIndex(+ (t: any) => t.name === table+ );if (tableIndex < 0) {targetSchema.tables.push(create(TableCatalogSchema, {diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RiskTips.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RiskTips.vueindex 890ebb90b1..cf23e7d6d8 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RiskTips.vue+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RiskTips.vue@@ -5,10 +5,7 @@keypath="custom-approval.approval-flow.risk-not-configured-tips"><template #link>- <router-link- :to="{ name: WORKSPACE_ROUTE_RISKS }"- class="normal-link"- >+ <router-link :to="{ name: WORKSPACE_ROUTE_RISKS }" class="normal-link">{{ $t("custom-approval.approval-flow.the-related-risk-rules") }}</router-link></template>diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vueindex 084aff9a2e..dce8975e44 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/common/StepsTable.vue@@ -21,6 +21,7 @@</template><script lang="tsx" setup>+import { create } from "@bufbuild/protobuf";import {ArrowUpIcon,ArrowDownIcon,@@ -34,14 +35,16 @@ import { useI18n } from "vue-i18n";import { RoleSelect } from "@/components/v2";import { SpinnerButton } from "@/components/v2/Form";import { PresetRoleType } from "@/types";-import type { ApprovalFlow, ApprovalStep } from "@/types/proto-es/v1/issue_service_pb";+import type {+ ApprovalFlow,+ ApprovalStep,+} from "@/types/proto-es/v1/issue_service_pb";import {ApprovalNode_Type,ApprovalStep_Type,ApprovalNodeSchema,ApprovalStepSchema,} from "@/types/proto-es/v1/issue_service_pb";-import { create } from "@bufbuild/protobuf";import { approvalNodeText } from "@/utils";import { useCustomApprovalContext } from "../context";@@ -146,15 +149,17 @@ const reorder = (step: ApprovalStep, index: number, offset: -1 | 1) => {emit("update");};const addStep = () => {- steps.value.push(create(ApprovalStepSchema, {- type: ApprovalStep_Type.ANY,- nodes: [- create(ApprovalNodeSchema, {- type: ApprovalNode_Type.ANY_IN_GROUP,- role: PresetRoleType.WORKSPACE_ADMIN,- }),- ],- }));+ steps.value.push(+ create(ApprovalStepSchema, {+ type: ApprovalStep_Type.ANY,+ nodes: [+ create(ApprovalNodeSchema, {+ type: ApprovalNode_Type.ANY_IN_GROUP,+ role: PresetRoleType.WORKSPACE_ADMIN,+ }),+ ],+ })+ );emit("update");};diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.tsindex 3d9eb3b60a..1163e58421 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/logic/utils.ts@@ -1,5 +1,5 @@-import { v4 as uuidv4 } from "uuid";import { create as createProto } from "@bufbuild/protobuf";+import { v4 as uuidv4 } from "uuid";import type { LocalApprovalRule } from "@/types";import { ApprovalTemplateSchema } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskForm.vue b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskForm.vueindex d705370b32..fd4b706599 100644--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskForm.vue+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RiskForm.vue@@ -92,6 +92,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { cloneDeep, head, uniq, flatten } from "lodash-es";import { NButton, NInput } from "naive-ui";import { computed, reactive, watch } from "vue";@@ -107,10 +108,9 @@ import {emptySimpleExpr,} from "@/plugins/cel";import { useSupportedSourceList } from "@/types";-import { create } from "@bufbuild/protobuf";+import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import type { Risk } from "@/types/proto-es/v1/risk_service_pb";import { Risk_Source, RiskSchema } from "@/types/proto-es/v1/risk_service_pb";-import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import {batchConvertCELStringToParsedExpr,batchConvertParsedExprToCELString,diff --git a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RuleTemplateTable.vue b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RuleTemplateTable.vueindex c2f9ce6b0d..24172304f8 100644--- a/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RuleTemplateTable.vue+++ b/frontend/src/components/CustomApproval/Settings/components/RiskCenter/RiskDialog/RuleTemplateTable.vue@@ -28,6 +28,7 @@</template><script lang="tsx" setup>+import { create } from "@bufbuild/protobuf";import { NButton, NDataTable, useDialog } from "naive-ui";import type { DataTableColumn } from "naive-ui";import { computed, ref } from "vue";@@ -35,7 +36,6 @@ import { useI18n } from "vue-i18n";import { BBModal } from "@/bbkit";import type { ConditionGroupExpr } from "@/plugins/cel";import { buildCELExpr } from "@/plugins/cel";-import { create } from "@bufbuild/protobuf";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import type { Risk } from "@/types/proto-es/v1/risk_service_pb";import { Risk_Source } from "@/types/proto-es/v1/risk_service_pb";diff --git a/frontend/src/components/CustomApproval/Settings/components/common/utils.ts b/frontend/src/components/CustomApproval/Settings/components/common/utils.tsindex 3f95262853..418d1c2ff1 100644--- a/frontend/src/components/CustomApproval/Settings/components/common/utils.ts+++ b/frontend/src/components/CustomApproval/Settings/components/common/utils.ts@@ -1,3 +1,6 @@+import { CheckIcon } from "lucide-vue-next";+import type { SelectOption } from "naive-ui";+import { h, type VNode } from "vue";import { type OptionConfig } from "@/components/ExprEditor/context";import { SQLTypeList, type Factor } from "@/plugins/cel";import { t } from "@/plugins/i18n";@@ -23,9 +26,6 @@ import {getDefaultPagination,supportedEngineV1List,} from "@/utils";-import { CheckIcon } from "lucide-vue-next";-import type { SelectOption } from "naive-ui";-import { h, type VNode } from "vue";export const sourceText = (source: Risk_Source) => {switch (source) {diff --git a/frontend/src/components/Database/DatabaseChangelogPanel.vue b/frontend/src/components/Database/DatabaseChangelogPanel.vueindex 4996cfc408..b62b981127 100644--- a/frontend/src/components/Database/DatabaseChangelogPanel.vue+++ b/frontend/src/components/Database/DatabaseChangelogPanel.vue@@ -109,6 +109,8 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import dayjs from "dayjs";import saveAs from "file-saver";import JSZip from "jszip";@@ -133,7 +135,6 @@ import {} from "@/store";import type { ComposedDatabase, Table, SearchChangeLogParams } from "@/types";import { DEFAULT_PROJECT_NAME } from "@/types";-import { create } from "@bufbuild/protobuf";import {Changelog_Status,Changelog_Type,@@ -142,7 +143,6 @@ import {UpdateDatabaseRequestSchema,} from "@/types/proto-es/v1/database_service_pb";import type { Changelog } from "@/types/proto-es/v1/database_service_pb";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { extractProjectResourceName } from "@/utils";import { getChangelogChangeType } from "@/utils/v1/changelog";@@ -177,7 +177,9 @@ const state = reactive<LocalState>({const searchChangeLogParams = computed((): SearchChangeLogParams => ({tables: state.selectedAffectedTables,- types: state.selectedChangeType ? [Changelog_Type[state.selectedChangeType]] : undefined,+ types: state.selectedChangeType+ ? [Changelog_Type[state.selectedChangeType]]+ : undefined,}));@@ -187,7 +189,9 @@ const searchChangelogFilter = computed(() => {searchChangeLogParams.value.types &&searchChangeLogParams.value.types.length > 0) {- filter.push(`type = "${searchChangeLogParams.value.types.map(Number).join(" | ")}"`);+ filter.push(+ `type = "${searchChangeLogParams.value.types.map(Number).join(" | ")}"`+ );}if (searchChangeLogParams.value.tables &&@@ -279,7 +283,9 @@ const handleExportChangelogs = async () => {}const filePathPrefix = dayjs(- changelog.createTime ? new Date(Number(changelog.createTime.seconds) * 1000) : new Date()+ changelog.createTime+ ? new Date(Number(changelog.createTime.seconds) * 1000)+ : new Date()).format("YYYY-MM-DDTHH-mm-ss");if (changelog.type === Changelog_Type.MIGRATE ||@@ -310,15 +316,17 @@ const handleExportChangelogs = async () => {};const updateDatabaseDrift = async () => {- const updatedDatabase = create(DatabaseSchema$,{+ const updatedDatabase = create(DatabaseSchema$, {...props.database,drifted: false,});-- await databaseStore.updateDatabase(create(UpdateDatabaseRequestSchema, {- database: updatedDatabase,- updateMask: create(FieldMaskSchema, { paths: ["drifted"] }),- }));++ await databaseStore.updateDatabase(+ create(UpdateDatabaseRequestSchema, {+ database: updatedDatabase,+ updateMask: create(FieldMaskSchema, { paths: ["drifted"] }),+ })+ );pushNotification({module: "bytebase",style: "SUCCESS",diff --git a/frontend/src/components/Database/DatabaseOverviewInfo.vue b/frontend/src/components/Database/DatabaseOverviewInfo.vueindex 58f05e7159..4ab783dd81 100644--- a/frontend/src/components/Database/DatabaseOverviewInfo.vue+++ b/frontend/src/components/Database/DatabaseOverviewInfo.vue@@ -43,7 +43,13 @@{{ $t("database.last-successful-sync") }}</dt><dd class="mt-1 text-sm text-main">- {{ humanizeDate(database.successfulSyncTime ? new Date(Number(database.successfulSyncTime.seconds) * 1000) : undefined) }}+ {{+ humanizeDate(+ database.successfulSyncTime+ ? new Date(Number(database.successfulSyncTime.seconds) * 1000)+ : undefined+ )+ }}</dd></div></dl>diff --git a/frontend/src/components/Database/DatabaseRevisionPanel.vue b/frontend/src/components/Database/DatabaseRevisionPanel.vueindex de050ef413..cac7d50ad5 100644--- a/frontend/src/components/Database/DatabaseRevisionPanel.vue+++ b/frontend/src/components/Database/DatabaseRevisionPanel.vue@@ -18,12 +18,12 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { RevisionDataTable } from "@/components/Revision";import PagedTable from "@/components/v2/Model/PagedTable.vue";-import { create } from "@bufbuild/protobuf";import { revisionServiceClientConnect } from "@/grpcweb";-import { ListRevisionsRequestSchema } from "@/types/proto-es/v1/revision_service_pb";import type { ComposedDatabase } from "@/types";+import { ListRevisionsRequestSchema } from "@/types/proto-es/v1/revision_service_pb";import { useDatabaseDetailContext } from "./context";const props = defineProps<{diff --git a/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue b/frontend/src/components/Database/DatabaseSensitiveDataPanel.vueindex 66ffe63887..858aadafb7 100644--- a/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue+++ b/frontend/src/components/Database/DatabaseSensitiveDataPanel.vue@@ -70,6 +70,7 @@</template><script lang="tsx" setup>+import { create } from "@bufbuild/protobuf";import { ShieldCheckIcon } from "lucide-vue-next";import { NButton } from "naive-ui";import { computed, reactive, watch } from "vue";@@ -85,14 +86,13 @@ import { isCurrentColumnException } from "@/components/SensitiveData/utils";import { SearchBox } from "@/components/v2";import { featureToRef, usePolicyV1Store, useDatabaseCatalog } from "@/store";import { type ComposedDatabase } from "@/types";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import {ObjectSchema_Type,type ObjectSchema,} from "@/types/proto-es/v1/database_catalog_service_pb";-import { create } from "@bufbuild/protobuf";import { MaskingExceptionPolicySchema } from "@/types/proto-es/v1/org_policy_service_pb";import { PolicyType } from "@/types/proto-es/v1/org_policy_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasProjectPermissionV2, instanceV1MaskingForNoSQL } from "@/utils";const props = defineProps<{@@ -173,7 +173,10 @@ const flattenObjectSchema = (}return resp;case ObjectSchema_Type.ARRAY:- if (objectSchema.kind?.case === "arrayKind" && objectSchema.kind.value.kind) {+ if (+ objectSchema.kind?.case === "arrayKind" &&+ objectSchema.kind.value.kind+ ) {return flattenObjectSchema(parentPath, objectSchema.kind.value.kind);}return [];diff --git a/frontend/src/components/Database/context.ts b/frontend/src/components/Database/context.tsindex 8d151ed7da..c1aedb9980 100644--- a/frontend/src/components/Database/context.ts+++ b/frontend/src/components/Database/context.ts@@ -1,3 +1,5 @@+import type { InjectionKey, Ref } from "vue";+import { computed, inject, provide, ref } from "vue";import { useAppFeature, useDatabaseV1ByName } from "@/store";import {databaseNamePrefix,@@ -8,10 +10,8 @@ import { DEFAULT_PROJECT_NAME } from "@/types";import {hasPermissionToCreateChangeDatabaseIssue,hasProjectPermissionV2,- instanceV1HasAlterSchema+ instanceV1HasAlterSchema,} from "@/utils";-import type { InjectionKey, Ref } from "vue";-import { computed, inject, provide, ref } from "vue";export type DatabaseDetailContext = {database: Ref<ComposedDatabase>;@@ -59,9 +59,8 @@ export const provideDatabaseDetailContext = (};const allowGetDatabase = computed(() => checkPermission("bb.databases.get"));- const allowUpdateDatabase = computed(- () =>- checkPermission("bb.databases.update")+ const allowUpdateDatabase = computed(() =>+ checkPermission("bb.databases.update"));const allowSyncDatabase = computed(() => {return (diff --git a/frontend/src/components/DatabaseDetail/Settings/DatabaseSettingsPanel.vue b/frontend/src/components/DatabaseDetail/Settings/DatabaseSettingsPanel.vueindex 40082bc34e..ef49d97d91 100644--- a/frontend/src/components/DatabaseDetail/Settings/DatabaseSettingsPanel.vue+++ b/frontend/src/components/DatabaseDetail/Settings/DatabaseSettingsPanel.vue@@ -37,9 +37,10 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { cloneDeep } from "lodash-es";import { computed } from "vue";-import { create } from "@bufbuild/protobuf";import { useI18n } from "vue-i18n";import { useDatabaseDetailContext } from "@/components/Database/context";import { EnvironmentSelect } from "@/components/v2";@@ -51,9 +52,8 @@ import {environmentNamePrefix,} from "@/store";import { type ComposedDatabase } from "@/types";-import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";import { UpdateDatabaseRequestSchema } from "@/types/proto-es/v1/database_service_pb";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";+import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";import Labels from "./components/Labels.vue";import Secrets from "./components/Secrets.vue";@@ -83,11 +83,13 @@ const handleSelectEnvironment = async (name: string | undefined) => {}const databasePatch = cloneDeep(props.database);databasePatch.environment = name;-- await databaseStore.updateDatabase(create(UpdateDatabaseRequestSchema, {- database: databasePatch,- updateMask: create(FieldMaskSchema, { paths: ["environment"] }),- }));++ await databaseStore.updateDatabase(+ create(UpdateDatabaseRequestSchema, {+ database: databasePatch,+ updateMask: create(FieldMaskSchema, { paths: ["environment"] }),+ })+ );pushNotification({module: "bytebase",style: "SUCCESS",diff --git a/frontend/src/components/DatabaseDetail/Settings/components/Labels.vue b/frontend/src/components/DatabaseDetail/Settings/components/Labels.vueindex 403f4ee111..f028fb9676 100644--- a/frontend/src/components/DatabaseDetail/Settings/components/Labels.vue+++ b/frontend/src/components/DatabaseDetail/Settings/components/Labels.vue@@ -35,16 +35,16 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { isEqual } from "lodash-es";import { NButton } from "naive-ui";import { computed, reactive, ref, watch } from "vue";-import { create } from "@bufbuild/protobuf";import { useI18n } from "vue-i18n";import { LabelListEditor } from "@/components/Label/";import { pushNotification, useDatabaseV1Store } from "@/store";import { type ComposedDatabase } from "@/types";-import { convertKVListToLabels, convertLabelsToKVList } from "@/utils";import { UpdateDatabaseRequestSchema } from "@/types/proto-es/v1/database_service_pb";+import { convertKVListToLabels, convertLabelsToKVList } from "@/utils";type LocalState = {kvList: { key: string; value: string }[];@@ -91,13 +91,15 @@ const handleSave = async () => {// Otherwise the server API won't update the labels field correctly.const labels = convertKVListToLabels(state.kvList, false /* !omitEmpty */);- await useDatabaseV1Store().updateDatabase(create(UpdateDatabaseRequestSchema,{- database: {- ...props.database,- labels,- },- updateMask: { paths: ["labels"] },- }));+ await useDatabaseV1Store().updateDatabase(+ create(UpdateDatabaseRequestSchema, {+ database: {+ ...props.database,+ labels,+ },+ updateMask: { paths: ["labels"] },+ })+ );pushNotification({module: "bytebase",style: "SUCCESS",diff --git a/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue b/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vueindex 9b4acf2792..2c5c337ecc 100644--- a/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue+++ b/frontend/src/components/DatabaseDetail/Settings/components/Secrets.vue@@ -167,6 +167,7 @@</template><script setup lang="tsx">+import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";import { NButton, NInput, NDataTable } from "naive-ui";import type { DataTableColumn } from "naive-ui";@@ -179,7 +180,6 @@ import {FeatureModal,} from "@/components/FeatureGuard";import { Drawer, DrawerContent, SpinnerButton } from "@/components/v2";-import { create } from "@bufbuild/protobuf";import {pushNotification,useDatabaseSecretStore,diff --git a/frontend/src/components/DatabaseDetail/SyncDatabaseButton.vue b/frontend/src/components/DatabaseDetail/SyncDatabaseButton.vueindex 2db9b610eb..020a6054bf 100644--- a/frontend/src/components/DatabaseDetail/SyncDatabaseButton.vue+++ b/frontend/src/components/DatabaseDetail/SyncDatabaseButton.vue@@ -12,6 +12,7 @@</template><script setup lang="ts">+import { ConnectError } from "@connectrpc/connect";import { NButton } from "naive-ui";import { computed, ref } from "vue";import { useI18n } from "vue-i18n";@@ -23,7 +24,6 @@ import {import { isValidDatabaseName } from "@/types";import type { ComposedDatabase } from "@/types";import { hasProjectPermissionV2 } from "@/utils";-import { ConnectError } from "@connectrpc/connect";const props = defineProps<{text: boolean;diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vueindex 61ab1349e9..bb89677bbf 100644--- a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue@@ -65,6 +65,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { cloneDeep, head, isEqual } from "lodash-es";import { Trash2Icon } from "lucide-vue-next";import { NButton, NDivider, NInput, useDialog } from "naive-ui";@@ -89,10 +90,12 @@ import {getProjectNameAndDatabaseGroupName,} from "@/store/modules/v1/common";import type { ComposedProject } from "@/types";-import { create } from "@bufbuild/protobuf";import type { Expr as CELExpr } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";-import { DatabaseGroupSchema, type DatabaseGroup } from "@/types/proto-es/v1/database_group_service_pb";+import {+ DatabaseGroupSchema,+ type DatabaseGroup,+} from "@/types/proto-es/v1/database_group_service_pb";import { batchConvertParsedExprToCELString } from "@/utils";import { ResourceIdField } from "../v2";import MatchedDatabaseView from "./MatchedDatabaseView.vue";diff --git a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vueindex 74052da542..33ea8aa11b 100644--- a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue+++ b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue@@ -60,6 +60,7 @@</template><script lang="ts" setup>+import type { ConnectError } from "@connectrpc/connect";import { useDebounceFn } from "@vueuse/core";import { NButton, NEllipsis, NCollapse, NCollapseItem } from "naive-ui";import { watch, reactive } from "vue";@@ -70,7 +71,6 @@ import type { ConditionGroupExpr } from "@/plugins/cel";import { validateSimpleExpr } from "@/plugins/cel";import { useDatabaseV1Store, useDBGroupStore } from "@/store";import { DEBOUNCE_SEARCH_DELAY, isValidDatabaseName } from "@/types";-import type { ConnectError } from "@connectrpc/connect";interface DatabaseMatchList {index: number;diff --git a/frontend/src/components/DatabaseInfo.vue b/frontend/src/components/DatabaseInfo.vueindex cf17b83315..7ea3a8f5d3 100644--- a/frontend/src/components/DatabaseInfo.vue+++ b/frontend/src/components/DatabaseInfo.vue@@ -7,7 +7,10 @@:text-class="link ? 'hover:underline' : ''"><template- v-if="formatEnvironmentName(instanceEnvironment.id) !== database.effectiveEnvironment"+ v-if="+ formatEnvironmentName(instanceEnvironment.id) !==+ database.effectiveEnvironment+ "#prefix><EnvironmentV1Name@@ -53,7 +56,11 @@ import {InstanceV1Name,} from "@/components/v2";import { useEnvironmentV1Store } from "@/store";-import { formatEnvironmentName, unknownEnvironment, type ComposedDatabase } from "@/types";+import {+ formatEnvironmentName,+ unknownEnvironment,+ type ComposedDatabase,+} from "@/types";const props = withDefaults(defineProps<{diff --git a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vueindex 7629710c2e..11873efad4 100644--- a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue+++ b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue@@ -28,9 +28,7 @@<span class="textlabel">{{$t("environment.access-control.restrict-admin-connection.self")}}</span>- <FeatureBadge- :feature="PlanFeature.FEATURE_QUERY_POLICY"- />+ <FeatureBadge :feature="PlanFeature.FEATURE_QUERY_POLICY" /></div><div v-if="adminDataSourceQueryRestrictionEnabled" class="ml-12"><NRadioGroup@@ -72,9 +70,7 @@<label>{{ $t("environment.statement-execution.title") }}</label>- <FeatureBadge- :feature="PlanFeature.FEATURE_QUERY_POLICY"- />+ <FeatureBadge :feature="PlanFeature.FEATURE_QUERY_POLICY" /></div><div><div class="w-full inline-flex items-center gap-x-2">diff --git a/frontend/src/components/EnvironmentForm/EnvironmentForm.vue b/frontend/src/components/EnvironmentForm/EnvironmentForm.vueindex 50a26b9754..6f4989f191 100644--- a/frontend/src/components/EnvironmentForm/EnvironmentForm.vue+++ b/frontend/src/components/EnvironmentForm/EnvironmentForm.vue@@ -9,6 +9,10 @@</template><script lang="ts" setup>+import { useEventListener } from "@vueuse/core";+import { toRef } from "vue";+import { useI18n } from "vue-i18n";+import { onBeforeRouteLeave } from "vue-router";import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";import { hasFeature } from "@/store";import { VirtualRoleType } from "@/types";@@ -16,10 +20,6 @@ import type { Policy } from "@/types/proto-es/v1/org_policy_service_pb";import { PolicyType } from "@/types/proto-es/v1/org_policy_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import type { Environment } from "@/types/v1/environment";-import { useEventListener } from "@vueuse/core";-import { toRef } from "vue";-import { useI18n } from "vue-i18n";-import { onBeforeRouteLeave } from "vue-router";import { FeatureModal } from "../FeatureGuard";import { provideEnvironmentFormContext } from "./context";@@ -88,7 +88,10 @@ useEmitteryEventListener(events, "create", (params) => {return;}}- const rp = rolloutPolicy.policy.case === "rolloutPolicy" ? rolloutPolicy.policy.value : undefined;+ const rp =+ rolloutPolicy.policy.case === "rolloutPolicy"+ ? rolloutPolicy.policy.value+ : undefined;if (rp?.automatic === false) {if (rp.issueRoles.includes(VirtualRoleType.LAST_APPROVER)) {if (!hasFeature(PlanFeature.FEATURE_APPROVAL_WORKFLOW)) {@@ -114,7 +117,8 @@ useEmitteryEventListener(events, "update", (environment) => {useEmitteryEventListener(events, "update-policy", (params) => {const { policyType, policy } = params;if (policyType === PolicyType.ROLLOUT_POLICY) {- const rp = policy.policy.case === "rolloutPolicy" ? policy.policy.value : undefined;+ const rp =+ policy.policy.case === "rolloutPolicy" ? policy.policy.value : undefined;if (rp?.automatic === false) {if (rp.issueRoles.includes(VirtualRoleType.LAST_APPROVER)) {if (!hasFeature(PlanFeature.FEATURE_APPROVAL_WORKFLOW)) {diff --git a/frontend/src/components/EnvironmentForm/RolloutPolicyConfig.vue b/frontend/src/components/EnvironmentForm/RolloutPolicyConfig.vueindex 4b8fa7cdf6..03582ffbdc 100644--- a/frontend/src/components/EnvironmentForm/RolloutPolicyConfig.vue+++ b/frontend/src/components/EnvironmentForm/RolloutPolicyConfig.vue@@ -48,12 +48,15 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { cloneDeep, uniq } from "lodash-es";import { NCheckbox } from "naive-ui";import { ref, watch, computed } from "vue";-import { create } from "@bufbuild/protobuf";import { VirtualRoleType } from "@/types";-import type { Policy, RolloutPolicy } from "@/types/proto-es/v1/org_policy_service_pb";+import type {+ Policy,+ RolloutPolicy,+} from "@/types/proto-es/v1/org_policy_service_pb";import { RolloutPolicySchema } from "@/types/proto-es/v1/org_policy_service_pb";import { RoleSelect } from "../v2";@@ -128,7 +131,10 @@ const updateRoles = (roles: string[]) => {};watch(- () => props.policy.policy?.case === "rolloutPolicy" ? props.policy.policy.value : undefined,+ () =>+ props.policy.policy?.case === "rolloutPolicy"+ ? props.policy.policy.value+ : undefined,(p) => {if (p) {rolloutPolicy.value = cloneDeep(p);diff --git a/frontend/src/components/EnvironmentForm/context.ts b/frontend/src/components/EnvironmentForm/context.tsindex eaab356f44..d9702be433 100644--- a/frontend/src/components/EnvironmentForm/context.ts+++ b/frontend/src/components/EnvironmentForm/context.ts@@ -4,7 +4,10 @@ import { useDialog } from "naive-ui";import type { InjectionKey, Ref } from "vue";import { provide, inject, computed, ref, watch } from "vue";import type { ResourceIdField } from "@/components/v2";-import { PolicyType, type Policy } from "@/types/proto-es/v1/org_policy_service_pb";+import {+ PolicyType,+ type Policy,+} from "@/types/proto-es/v1/org_policy_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import type { Environment } from "@/types/v1/environment";import { hasWorkspacePermissionV2 } from "@/utils";diff --git a/frontend/src/components/ExpirationSelector.vue b/frontend/src/components/ExpirationSelector.vueindex 018657fd1a..ff1ef17120 100644--- a/frontend/src/components/ExpirationSelector.vue+++ b/frontend/src/components/ExpirationSelector.vue@@ -6,7 +6,7 @@:options="selectOptions"@update:value="onSelect"/>-+<template v-if="state.selected === -1"><div class="space-y-2"><NDatePicker@@ -27,8 +27,11 @@</div></div></template>-- <div v-if="state.expirationTimestampInMS && state.selected !== -1" class="p-3 bg-gray-50 rounded-md">++ <div+ v-if="state.expirationTimestampInMS && state.selected !== -1"+ class="p-3 bg-gray-50 rounded-md"+ ><div class="text-sm text-gray-600">{{ $t("common.access-expires") }}:<span class="font-medium text-gray-900">@@ -99,8 +102,11 @@ const maximumRoleExpiration = computed(() => {if (props.role === PresetRoleType.PROJECT_OWNER) {return undefined;}- const seconds = settingV1Store.workspaceProfileSetting?.maximumRoleExpiration?.seconds- ? Number(settingV1Store.workspaceProfileSetting.maximumRoleExpiration.seconds)+ const seconds = settingV1Store.workspaceProfileSetting?.maximumRoleExpiration+ ?.seconds+ ? Number(+ settingV1Store.workspaceProfileSetting.maximumRoleExpiration.seconds+ ): undefined;if (!seconds) {return undefined;@@ -153,9 +159,9 @@ const options = computed((): ExpirationOption[] => {label: t("common.date.year", { years: 1 }),},];-+const availableOptions: ExpirationOption[] = [];-+// Add "Never expires" at the top if no maximum role expiration is setif (!maximumRoleExpiration.value) {availableOptions.push({@@ -163,22 +169,24 @@ const options = computed((): ExpirationOption[] => {label: t("project.members.never-expires"),});}-+// Add custom date option prominently after "Never expires"availableOptions.push({value: -1,label: t("issue.grant-request.custom-date"),});-+// Add time-based optionsif (maximumRoleExpiration.value) {- availableOptions.push(...baseOptions.filter(- (option) => option.value <= maximumRoleExpiration.value!- ));+ availableOptions.push(+ ...baseOptions.filter(+ (option) => option.value <= maximumRoleExpiration.value!+ )+ );} else {availableOptions.push(...baseOptions);}-+return availableOptions;});@@ -203,7 +211,7 @@ const onSelect = (value: number) => {// For value === -1 (custom date), the timestamp is set by the date picker// Don't save custom date selection as it's not reusablestate.selected = value;-+// Emit the change immediately for pre-defined optionsif (value !== -1) {emit("update:timestampInMs", state.expirationTimestampInMS);diff --git a/frontend/src/components/ExternalTableDetailDrawer.vue b/frontend/src/components/ExternalTableDetailDrawer.vueindex ed7dddd366..47ba38894b 100644--- a/frontend/src/components/ExternalTableDetailDrawer.vue+++ b/frontend/src/components/ExternalTableDetailDrawer.vue@@ -126,6 +126,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { computedAsync } from "@vueuse/core";import { computed, ref, reactive } from "vue";import {@@ -145,7 +146,6 @@ import {hasSchemaProperty,isDatabaseV1Queryable,} from "@/utils";-import { create } from "@bufbuild/protobuf";import ColumnDataTable from "./ColumnDataTable/index.vue";import { SQLEditorButtonV1 } from "./DatabaseDetail";diff --git a/frontend/src/components/FeatureGuard/FeatureAttention.vue b/frontend/src/components/FeatureGuard/FeatureAttention.vueindex 5cbbe9d237..65cf71520e 100644--- a/frontend/src/components/FeatureGuard/FeatureAttention.vue+++ b/frontend/src/components/FeatureGuard/FeatureAttention.vue@@ -21,6 +21,9 @@</template><script lang="ts" setup>+import { computed, reactive } from "vue";+import { useI18n } from "vue-i18n";+import { useRouter } from "vue-router";import { BBAttention } from "@/bbkit";import { useLanguage } from "@/composables/useLanguage";import { useActuatorV1Store, useSubscriptionV1Store } from "@/store";@@ -29,11 +32,11 @@ import type {Instance,InstanceResource,} from "@/types/proto-es/v1/instance_service_pb";-import { PlanFeature, PlanType } from "@/types/proto-es/v1/subscription_service_pb";+import {+ PlanFeature,+ PlanType,+} from "@/types/proto-es/v1/subscription_service_pb";import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";-import { computed, reactive } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";import InstanceAssignment from "../InstanceAssignment.vue";import WeChatQRModal from "../WeChatQRModal.vue";@@ -135,14 +138,19 @@ const descriptionText = computed(() => {if (!hasFeature.value) {const startTrial = subscriptionStore.isTrialing- ? ""- : t("subscription.trial-for-days", {- days: subscriptionStore.trialingDays,- });+ ? ""+ : t("subscription.trial-for-days", {+ days: subscriptionStore.trialingDays,+ });// Check if feature is available in any plan// TODO(d): simplify the check.- const requiredPlan = subscriptionStore.getMinimumRequiredPlan(props.feature);- if (requiredPlan === PlanType.FREE && subscriptionStore.hasFeature(props.feature)) {+ const requiredPlan = subscriptionStore.getMinimumRequiredPlan(+ props.feature+ );+ if (+ requiredPlan === PlanType.FREE &&+ subscriptionStore.hasFeature(props.feature)+ ) {return `${description}\n${startTrial}`;}const trialText = t("subscription.required-plan-with-trial", {diff --git a/frontend/src/components/FeatureGuard/FeatureBadge.vue b/frontend/src/components/FeatureGuard/FeatureBadge.vueindex b92a94ec1d..94e883c177 100644--- a/frontend/src/components/FeatureGuard/FeatureBadge.vue+++ b/frontend/src/components/FeatureGuard/FeatureBadge.vue@@ -40,9 +40,9 @@{{$t("subscription.require-subscription", {requiredPlan: $t(- `subscription.plan.${- PlanType[subscriptionStore.getMinimumRequiredPlan(feature)].toLowerCase()- }.title`+ `subscription.plan.${PlanType[+ subscriptionStore.getMinimumRequiredPlan(feature)+ ].toLowerCase()}.title`),})}}@@ -64,7 +64,10 @@ import type {Instance,InstanceResource,} from "@/types/proto-es/v1/instance_service_pb";-import { PlanFeature, PlanType } from "@/types/proto-es/v1/subscription_service_pb";+import {+ PlanFeature,+ PlanType,+} from "@/types/proto-es/v1/subscription_service_pb";import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";import InstanceAssignment from "../InstanceAssignment.vue";diff --git a/frontend/src/components/FeatureGuard/FeatureModal.vue b/frontend/src/components/FeatureGuard/FeatureModal.vueindex 40b2c8712b..6d59c14eb0 100644--- a/frontend/src/components/FeatureGuard/FeatureModal.vue+++ b/frontend/src/components/FeatureGuard/FeatureModal.vue@@ -97,6 +97,10 @@</template><script lang="ts" setup>+import { NButton } from "naive-ui";+import { computed, reactive } from "vue";+import { useI18n } from "vue-i18n";+import { useRouter } from "vue-router";import { BBModal } from "@/bbkit";import { useLanguage } from "@/composables/useLanguage";import { useSubscriptionV1Store } from "@/store";@@ -110,10 +114,6 @@ import {PlanType,} from "@/types/proto-es/v1/subscription_service_pb";import { autoSubscriptionRoute, hasWorkspacePermissionV2 } from "@/utils";-import { NButton } from "naive-ui";-import { computed, reactive } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";import InstanceAssignment from "../InstanceAssignment.vue";import WeChatQRModal from "../WeChatQRModal.vue";diff --git a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vueindex ff28806cc4..f6f3dd734d 100644--- a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue+++ b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue@@ -152,6 +152,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { NSelect, NTooltip } from "naive-ui";import scrollIntoView from "scroll-into-view-if-needed";import { computed, onMounted, reactive, ref, watch, watchEffect } from "vue";@@ -166,7 +167,6 @@ import {Setting_SettingName,ValueSchema as SettingValueSchema,} from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";interface LocalState {enabled: boolean;diff --git a/frontend/src/components/GeneralSetting/AccountSetting.vue b/frontend/src/components/GeneralSetting/AccountSetting.vueindex 3f720e0433..9dc31be967 100644--- a/frontend/src/components/GeneralSetting/AccountSetting.vue+++ b/frontend/src/components/GeneralSetting/AccountSetting.vue@@ -21,7 +21,9 @@/><div class="font-medium flex items-center gap-x-2">{{ $t("settings.general.workspace.disallow-signup.enable") }}- <FeatureBadge :feature="PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP" />+ <FeatureBadge+ :feature="PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP"+ /></div></div><div class="mt-1 mb-3 text-sm text-gray-400">@@ -86,7 +88,9 @@)}}</NTooltip>- <FeatureBadge :feature="PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN" />+ <FeatureBadge+ :feature="PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN"+ /></div></div><div class="mt-1 mb-3 text-sm text-gray-400">@@ -115,6 +119,13 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";+import { isEqual } from "lodash-es";+import { TriangleAlertIcon } from "lucide-vue-next";+import { NDivider, NTooltip } from "naive-ui";+import { storeToRefs } from "pinia";+import { computed, reactive, ref, watchEffect } from "vue";import { Switch } from "@/components/v2";import {featureToRef,@@ -124,13 +135,6 @@ import {import { useSettingV1Store } from "@/store/modules/v1/setting";import { type WorkspaceProfileSetting } from "@/types/proto-es/v1/setting_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";-import { isEqual } from "lodash-es";-import { TriangleAlertIcon } from "lucide-vue-next";-import { NDivider, NTooltip } from "naive-ui";-import { storeToRefs } from "pinia";-import { computed, reactive, ref, watchEffect } from "vue";import { FeatureBadge, FeatureModal } from "../FeatureGuard";import PasswordRestrictionSetting from "./PasswordRestrictionSetting.vue";import SignInFrequencySetting from "./SignInFrequencySetting.vue";@@ -171,7 +175,9 @@ const state = reactive<LocalState>({const { isSaaSMode } = storeToRefs(actuatorStore);const has2FAFeature = featureToRef(PlanFeature.FEATURE_TWO_FA);-const hasDisallowSignupFeature = featureToRef(PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP);+const hasDisallowSignupFeature = featureToRef(+ PlanFeature.FEATURE_DISALLOW_SELF_SERVICE_SIGNUP+);const hasDisallowPasswordSigninFeature = featureToRef(PlanFeature.FEATURE_DISALLOW_PASSWORD_SIGNIN);@@ -181,9 +187,7 @@ watchEffect(async () => {});const existActiveIdentityProvider = computed(() => {- return (- idpStore.identityProviderList.length > 0- );+ return idpStore.identityProviderList.length > 0;});const isDirty = computed(() => {@@ -212,7 +216,9 @@ const onUpdate = async () => {state.disallowSignup !==settingV1Store.workspaceProfileSetting?.disallowSignup) {- updateMaskPaths.push("value.workspace_profile_setting_value.disallow_signup");+ updateMaskPaths.push(+ "value.workspace_profile_setting_value.disallow_signup"+ );}if (state.require2fa !== settingV1Store.workspaceProfileSetting?.require2fa) {updateMaskPaths.push("value.workspace_profile_setting_value.require_2fa");@@ -230,7 +236,7 @@ const onUpdate = async () => {await settingV1Store.updateWorkspaceProfile({payload,updateMask: create(FieldMaskSchema, {- paths: updateMaskPaths+ paths: updateMaskPaths,}),});}diff --git a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue b/frontend/src/components/GeneralSetting/AnnouncementSetting.vueindex f67db5a5d1..6b6f2c8db7 100644--- a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue+++ b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue@@ -99,6 +99,8 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { cloneDeep, isEqual } from "lodash-es";import { NInput, NTooltip } from "naive-ui";import { computed, reactive } from "vue";@@ -106,10 +108,11 @@ import { AnnouncementLevelSelect } from "@/components/v2";import { featureToRef } from "@/store";import { useSettingV1Store } from "@/store/modules/v1/setting";import type { Announcement } from "@/types/proto-es/v1/setting_service_pb";-import { Announcement_AlertLevel, AnnouncementSchema } from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";+import {+ Announcement_AlertLevel,+ AnnouncementSchema,+} from "@/types/proto-es/v1/setting_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { FeatureBadge } from "../FeatureGuard";const props = defineProps<{@@ -118,7 +121,9 @@ const props = defineProps<{}>();const settingV1Store = useSettingV1Store();-const hasAnnouncementFeature = featureToRef(PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT);+const hasAnnouncementFeature = featureToRef(+ PlanFeature.FEATURE_DASHBOARD_ANNOUNCEMENT+);const rawAnnouncement = computed(() =>cloneDeep(@@ -141,7 +146,7 @@ const updateAnnouncementSetting = async () => {announcement: { ...state },},updateMask: create(FieldMaskSchema, {- paths: ["value.workspace_profile_setting_value.announcement"]+ paths: ["value.workspace_profile_setting_value.announcement"],}),});};diff --git a/frontend/src/components/GeneralSetting/BrandingSetting.vue b/frontend/src/components/GeneralSetting/BrandingSetting.vueindex 20daba2476..b04ff66ec0 100644--- a/frontend/src/components/GeneralSetting/BrandingSetting.vue+++ b/frontend/src/components/GeneralSetting/BrandingSetting.vue@@ -62,13 +62,16 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { NButton, NTooltip } from "naive-ui";import { computed, reactive } from "vue";import { featureToRef } from "@/store";import { useActuatorV1Store } from "@/store/modules/v1/actuator";import { useSettingV1Store } from "@/store/modules/v1/setting";-import { Setting_SettingName, ValueSchema as SettingValueSchema } from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";+import {+ Setting_SettingName,+ ValueSchema as SettingValueSchema,+} from "@/types/proto-es/v1/setting_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { FeatureBadge, FeatureModal } from "../FeatureGuard";import SingleFileSelector from "../SingleFileSelector.vue";diff --git a/frontend/src/components/GeneralSetting/DatabaseChangeModeSetting.vue b/frontend/src/components/GeneralSetting/DatabaseChangeModeSetting.vueindex 62162a9c70..4a22a74feb 100644--- a/frontend/src/components/GeneralSetting/DatabaseChangeModeSetting.vue+++ b/frontend/src/components/GeneralSetting/DatabaseChangeModeSetting.vue@@ -43,6 +43,8 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { NButton } from "naive-ui";import { computed, reactive } from "vue";import { BBModal } from "@/bbkit";@@ -51,8 +53,6 @@ import { WORKSPACE_ROUTE_LANDING } from "@/router/dashboard/workspaceRoutes";import { SQL_EDITOR_HOME_MODULE } from "@/router/sqlEditor";import { useSettingV1Store } from "@/store/modules/v1/setting";import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { isSQLEditorRoute } from "@/utils";import WorkspaceMode from "@/views/Setup/WorkspaceMode.vue";@@ -97,7 +97,7 @@ const onUpdate = async () => {databaseChangeMode: state.databaseChangeMode,},updateMask: create(FieldMaskSchema, {- paths: ["value.workspace_profile_setting_value.database_change_mode"]+ paths: ["value.workspace_profile_setting_value.database_change_mode"],}),});if (diff --git a/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue b/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vueindex 8fce8236db..25f9499422 100644--- a/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue+++ b/frontend/src/components/GeneralSetting/DomainRestrictionSetting.vue@@ -72,12 +72,12 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { isEqual, cloneDeep } from "lodash-es";import { PlusIcon, XIcon } from "lucide-vue-next";import { NCheckbox, NInput, NButton } from "naive-ui";import { computed, reactive } from "vue";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { featureToRef } from "@/store";import { useSettingV1Store } from "@/store/modules/v1/setting";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";diff --git a/frontend/src/components/GeneralSetting/MaximumRoleExpirationSetting.vue b/frontend/src/components/GeneralSetting/MaximumRoleExpirationSetting.vueindex ced3678677..d07fb2b0b8 100644--- a/frontend/src/components/GeneralSetting/MaximumRoleExpirationSetting.vue+++ b/frontend/src/components/GeneralSetting/MaximumRoleExpirationSetting.vue@@ -30,12 +30,12 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { DurationSchema, FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { isEqual } from "lodash-es";import { NInputNumber, NCheckbox } from "naive-ui";import { computed, reactive } from "vue";import { useSettingV1Store } from "@/store/modules/v1/setting";-import { DurationSchema, FieldMaskSchema } from "@bufbuild/protobuf/wkt";-import { create } from "@bufbuild/protobuf";const DEFAULT_EXPIRATION_DAYS = 90;@@ -49,10 +49,12 @@ const getInitialState = (): LocalState => {inputValue: DEFAULT_EXPIRATION_DAYS,neverExpire: true,};- const seconds =- settingV1Store.workspaceProfileSetting?.maximumRoleExpiration?.seconds- ? Number(settingV1Store.workspaceProfileSetting.maximumRoleExpiration.seconds)- : undefined;+ const seconds = settingV1Store.workspaceProfileSetting?.maximumRoleExpiration+ ?.seconds+ ? Number(+ settingV1Store.workspaceProfileSetting.maximumRoleExpiration.seconds+ )+ : undefined;if (seconds && seconds > 0) {defaultState.inputValue =Math.floor(seconds / (60 * 60 * 24)) || DEFAULT_EXPIRATION_DAYS;@@ -75,10 +77,13 @@ const handleSettingChange = async () => {}await settingV1Store.updateWorkspaceProfile({payload: {- maximumRoleExpiration: create(DurationSchema, { seconds: BigInt(seconds), nanos: 0 }),+ maximumRoleExpiration: create(DurationSchema, {+ seconds: BigInt(seconds),+ nanos: 0,+ }),},updateMask: create(FieldMaskSchema, {- paths: ["value.workspace_profile_setting_value.maximum_role_expiration"]+ paths: ["value.workspace_profile_setting_value.maximum_role_expiration"],}),});Object.assign(state, getInitialState());diff --git a/frontend/src/components/GeneralSetting/NetworkSetting.vue b/frontend/src/components/GeneralSetting/NetworkSetting.vueindex 5445924c40..b6faa011c5 100644--- a/frontend/src/components/GeneralSetting/NetworkSetting.vue+++ b/frontend/src/components/GeneralSetting/NetworkSetting.vue@@ -39,12 +39,12 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { NInput, NTooltip } from "naive-ui";import { storeToRefs } from "pinia";import { computed, reactive } from "vue";import { useSettingV1Store, useActuatorV1Store } from "@/store";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import LearnMoreLink from "../LearnMoreLink.vue";const props = defineProps<{@@ -86,7 +86,7 @@ const updateNetworkSetting = async () => {externalUrl: state.externalUrl,},updateMask: create(FieldMaskSchema, {- paths: ["value.workspace_profile_setting_value.external_url"]+ paths: ["value.workspace_profile_setting_value.external_url"],}),});diff --git a/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue b/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vueindex 0b492a2710..ca3370d6a5 100644--- a/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue+++ b/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue@@ -139,9 +139,7 @@<template #day><NInputNumberv-if="state.passwordRotation"- :value="- Number(state.passwordRotation.seconds) / (24 * 60 * 60)- "+ :value="Number(state.passwordRotation.seconds) / (24 * 60 * 60)":readonly="!allowEdit":min="1"class="w-24 mx-2"@@ -174,15 +172,19 @@</template><script setup lang="tsx">+import { create } from "@bufbuild/protobuf";+import { DurationSchema } from "@bufbuild/protobuf/wkt";import { cloneDeep, isEqual } from "lodash-es";import { NInputNumber, NCheckbox } from "naive-ui";import { computed, ref, reactive } from "vue";import { featureToRef } from "@/store";import { useSettingV1Store } from "@/store/modules/v1/setting";-import { DurationSchema } from "@bufbuild/protobuf/wkt";import type { PasswordRestrictionSetting } from "@/types/proto-es/v1/setting_service_pb";-import { Setting_SettingName, PasswordRestrictionSettingSchema, ValueSchema as SettingValueSchema } from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";+import {+ Setting_SettingName,+ PasswordRestrictionSettingSchema,+ ValueSchema as SettingValueSchema,+} from "@/types/proto-es/v1/setting_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { FeatureBadge, FeatureModal } from "../FeatureGuard";@@ -194,10 +196,14 @@ defineProps<{const settingV1Store = useSettingV1Store();const showFeatureModal = ref<boolean>(false);-const hasPasswordFeature = featureToRef(PlanFeature.FEATURE_PASSWORD_RESTRICTIONS);+const hasPasswordFeature = featureToRef(+ PlanFeature.FEATURE_PASSWORD_RESTRICTIONS+);const passwordRestrictionSetting = computed(() => {- const setting = settingV1Store.getSettingByName(Setting_SettingName.PASSWORD_RESTRICTION);+ const setting = settingV1Store.getSettingByName(+ Setting_SettingName.PASSWORD_RESTRICTION+ );if (setting?.value?.value?.case === "passwordRestrictionSetting") {return setting.value.value.value;}diff --git a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vueindex c30272069a..270a57c78b 100644--- a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue+++ b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue@@ -41,12 +41,12 @@ import {usePolicyByParentAndType,usePolicyV1Store,} from "@/store";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import {PolicyResourceType,PolicyType,QueryDataPolicySchema,} from "@/types/proto-es/v1/org_policy_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";import { FeatureBadge } from "../FeatureGuard";diff --git a/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue b/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vueindex be0a6f79c7..b23f54c9b9 100644--- a/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue+++ b/frontend/src/components/GeneralSetting/RestrictIssueCreationConfigure.vue@@ -26,17 +26,14 @@<script setup lang="ts">import { create } from "@bufbuild/protobuf";-import {- usePolicyByParentAndType,- usePolicyV1Store-} from "@/store";+import { computed, ref, watch } from "vue";+import { usePolicyByParentAndType, usePolicyV1Store } from "@/store";import {PolicyResourceType,PolicyType,RestrictIssueCreationForSQLReviewPolicySchema,} from "@/types/proto-es/v1/org_policy_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";-import { computed, ref, watch } from "vue";import { Switch } from "../v2";const props = withDefaults(@@ -53,10 +50,7 @@ const props = withDefaults(const policyV1Store = usePolicyV1Store();const allowEdit = computed(() => {- return (- props.allowEdit &&- hasWorkspacePermissionV2("bb.policies.update")- );+ return props.allowEdit && hasWorkspacePermissionV2("bb.policies.update");});const { policy, ready } = usePolicyByParentAndType(diff --git a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vueindex b6d814b522..b0edd4b957 100644--- a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue+++ b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue@@ -49,16 +49,16 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { DurationSchema } from "@bufbuild/protobuf/wkt";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { isEqual } from "lodash-es";import { NInputNumber, NRadioGroup, NRadio, NTooltip } from "naive-ui";import { computed, reactive, watch } from "vue";import { featureToRef } from "@/store";import { useSettingV1Store } from "@/store/modules/v1/setting";import { defaultTokenDurationInHours } from "@/types";-import { DurationSchema } from "@bufbuild/protobuf/wkt";-import { create } from "@bufbuild/protobuf";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { FeatureBadge, FeatureModal } from "../FeatureGuard";const getInitialState = (): LocalState => {@@ -67,10 +67,9 @@ const getInitialState = (): LocalState => {timeFormat: "DAYS",showFeatureModal: false,};- const seconds =- settingV1Store.workspaceProfileSetting?.tokenDuration?.seconds- ? Number(settingV1Store.workspaceProfileSetting.tokenDuration.seconds)- : undefined;+ const seconds = settingV1Store.workspaceProfileSetting?.tokenDuration?.seconds+ ? Number(settingV1Store.workspaceProfileSetting.tokenDuration.seconds)+ : undefined;if (seconds && seconds > 0) {if (seconds < 60 * 60 * 24) {defaultState.inputValue = Math.floor(seconds / (60 * 60)) || 1;@@ -96,7 +95,9 @@ const props = defineProps<{const settingV1Store = useSettingV1Store();const state = reactive<LocalState>(getInitialState());-const hasSecureTokenFeature = featureToRef(PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL);+const hasSecureTokenFeature = featureToRef(+ PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL+);const allowChangeSetting = computed(() => {return hasSecureTokenFeature.value && props.allowEdit;@@ -116,10 +117,13 @@ const handleFrequencySettingChange = async () => {: state.inputValue * 24 * 60 * 60;await settingV1Store.updateWorkspaceProfile({payload: {- tokenDuration: create(DurationSchema, { seconds: BigInt(seconds), nanos: 0 }),+ tokenDuration: create(DurationSchema, {+ seconds: BigInt(seconds),+ nanos: 0,+ }),},updateMask: create(FieldMaskSchema, {- paths: ["value.workspace_profile_setting_value.token_duration"]+ paths: ["value.workspace_profile_setting_value.token_duration"],}),});};diff --git a/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vue b/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vueindex 0c9dd0a0e2..6e66dc19f7 100644--- a/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vue+++ b/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vue@@ -55,14 +55,14 @@ import { issueServiceClientConnect } from "@/grpcweb";import { useCurrentUserV1, useProjectV1Store } from "@/store";import type { DatabaseResource } from "@/types";import { getUserEmailInBinding } from "@/types";+import type { Binding } from "@/types/proto-es/v1/iam_policy_pb";+import { BindingSchema } from "@/types/proto-es/v1/iam_policy_pb";import {CreateIssueRequestSchema,IssueSchema,Issue_Type as NewIssue_Type,GrantRequestSchema,} from "@/types/proto-es/v1/issue_service_pb";-import type { Binding } from "@/types/proto-es/v1/iam_policy_pb";-import { BindingSchema } from "@/types/proto-es/v1/iam_policy_pb";import { generateIssueTitle, displayRoleTitle } from "@/utils";interface LocalState {diff --git a/frontend/src/components/Icon/CheckIcon.vue b/frontend/src/components/Icon/CheckIcon.vueindex 1957a5f069..06e310ccb4 100644--- a/frontend/src/components/Icon/CheckIcon.vue+++ b/frontend/src/components/Icon/CheckIcon.vue@@ -4,4 +4,4 @@<script setup lang="ts">import CheckIcon from "~icons/tabler/check";-</script>\ No newline at end of file+</script>diff --git a/frontend/src/components/Icon/TableIcon.vue b/frontend/src/components/Icon/TableIcon.vueindex 55225a4bcc..d81e64f405 100644--- a/frontend/src/components/Icon/TableIcon.vue+++ b/frontend/src/components/Icon/TableIcon.vue@@ -1,6 +1,6 @@<template><div class="relative">- <TableIcon v-bind="$attrs"/>+ <TableIcon v-bind="$attrs" /></div></template><script setup lang="ts">diff --git a/frontend/src/components/Icon/ViewIcon.vue b/frontend/src/components/Icon/ViewIcon.vueindex dd7dd00aa4..23cdb412a7 100644--- a/frontend/src/components/Icon/ViewIcon.vue+++ b/frontend/src/components/Icon/ViewIcon.vue@@ -1,6 +1,6 @@<template><div class="relative">- <TableIcon v-bind="$attrs" class="text-gray-400"/>+ <TableIcon v-bind="$attrs" class="text-gray-400" /><GlassesIconclass="absolute bottom-0 right-0 w-3/4 h-3/4"stroke="rgb(var(--color-accent))"diff --git a/frontend/src/components/Icon/index.ts b/frontend/src/components/Icon/index.tsindex 6d9a3b9bf9..51c6093663 100644--- a/frontend/src/components/Icon/index.ts+++ b/frontend/src/components/Icon/index.ts@@ -11,10 +11,10 @@ import PrimaryKeyIcon from "./PrimaryKeyIcon.vue";import ProcedureIcon from "./ProcedureIcon.vue";import SchemaIcon from "./SchemaIcon.vue";import SequenceIcon from "./SequenceIcon.vue";-import TriggerIcon from "./TriggerIcon.vue";import SkipIcon from "./SkipIcon.vue";import TableIcon from "./TableIcon.vue";import TablePartitionIcon from "./TablePartitionIcon.vue";+import TriggerIcon from "./TriggerIcon.vue";import ViewIcon from "./ViewIcon.vue";export {diff --git a/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue b/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vueindex bbd5546ef0..ff1a558eae 100644--- a/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue+++ b/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue@@ -429,6 +429,7 @@</template><script setup lang="ts">+import { create as createProto } from "@bufbuild/protobuf";import { head } from "lodash-es";import {KeyIcon,@@ -452,7 +453,6 @@ import {import { computed, reactive, ref, watch } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";-import { create as createProto } from "@bufbuild/protobuf";import { BBAttention, BBTextField } from "@/bbkit";import { FeatureBadge } from "@/components/FeatureGuard";import { Drawer, DrawerContent } from "@/components/v2";@@ -533,7 +533,9 @@ const configForLDAP = ref<LDAPIdentityProviderConfig>(}));const scopesStringOfConfig = ref<string>("");-const fieldMapping = reactive<FieldMapping>(createProto(FieldMappingSchema, {}));+const fieldMapping = reactive<FieldMapping>(+ createProto(FieldMappingSchema, {})+);const resourceIdField = ref<InstanceType<typeof ResourceIdField>>();const resourceIdValue = ref<string>("");@@ -892,7 +894,8 @@ const handleTemplateSelect = (template: IdentityProviderTemplate) => {scopes: template.config.scopes || [],skipTlsVerify: template.config.skipTlsVerify || false,authStyle: template.config.authStyle || OAuth2AuthStyle.IN_PARAMS,- fieldMapping: template.config.fieldMapping || createProto(FieldMappingSchema, {}),+ fieldMapping:+ template.config.fieldMapping || createProto(FieldMappingSchema, {}),});configForOAuth2.value = newConfig;diff --git a/frontend/src/components/IdentityProvider/IdentityProviderEditForm.vue b/frontend/src/components/IdentityProvider/IdentityProviderEditForm.vueindex 5162c45ab7..8a5dde035a 100644--- a/frontend/src/components/IdentityProvider/IdentityProviderEditForm.vue+++ b/frontend/src/components/IdentityProvider/IdentityProviderEditForm.vue@@ -239,6 +239,7 @@</template><script setup lang="ts">+import { create as createProto } from "@bufbuild/protobuf";import { cloneDeep, isEqual } from "lodash-es";import {ArrowRightIcon,@@ -251,7 +252,6 @@ import { NButton, NTooltip } from "naive-ui";import { computed, reactive, ref, watch } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";-import { create as createProto } from "@bufbuild/protobuf";import { BBTextField, BBButtonConfirm } from "@/bbkit";import { ResourceIdField } from "@/components/v2";import { WORKSPACE_ROUTE_IDENTITY_PROVIDERS } from "@/router/dashboard/workspaceRoutes";@@ -326,7 +326,9 @@ const configForLDAP = ref<LDAPIdentityProviderConfig>());const scopesStringOfConfig = ref<string>("");-const fieldMapping = reactive<FieldMapping>(createProto(FieldMappingSchema, {}));+const fieldMapping = reactive<FieldMapping>(+ createProto(FieldMappingSchema, {})+);// Computedconst resourceId = computed(() => {@@ -477,36 +479,23 @@ const initializeFromProps = () => {OAuth2IdentityProviderConfigSchema,oauth2Config);- Object.assign(- fieldMapping,- oauth2Config.fieldMapping || {}- );- scopesStringOfConfig.value = (- oauth2Config.scopes || []- ).join(" ");+ Object.assign(fieldMapping, oauth2Config.fieldMapping || {});+ scopesStringOfConfig.value = (oauth2Config.scopes || []).join(" ");} else if (props.identityProvider.config?.config?.case === "oidcConfig") {const oidcConfig = props.identityProvider.config.config.value;configForOIDC.value = createProto(OIDCIdentityProviderConfigSchema,oidcConfig);- Object.assign(- fieldMapping,- oidcConfig.fieldMapping || {}- );- scopesStringOfConfig.value = (- oidcConfig.scopes || []- ).join(" ");+ Object.assign(fieldMapping, oidcConfig.fieldMapping || {});+ scopesStringOfConfig.value = (oidcConfig.scopes || []).join(" ");} else if (props.identityProvider.config?.config?.case === "ldapConfig") {const ldapConfig = props.identityProvider.config.config.value;configForLDAP.value = createProto(LDAPIdentityProviderConfigSchema,ldapConfig);- Object.assign(- fieldMapping,- ldapConfig.fieldMapping || {}- );+ Object.assign(fieldMapping, ldapConfig.fieldMapping || {});}};diff --git a/frontend/src/components/IdentityProvider/TestConnection.vue b/frontend/src/components/IdentityProvider/TestConnection.vueindex 5a4554ad77..93c7aef722 100644--- a/frontend/src/components/IdentityProvider/TestConnection.vue+++ b/frontend/src/components/IdentityProvider/TestConnection.vue@@ -88,9 +88,9 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { NButton, NModal } from "naive-ui";import { ref, onUnmounted, watch } from "vue";-import { create } from "@bufbuild/protobuf";import { identityProviderServiceClientConnect } from "@/grpcweb";import { pushNotification } from "@/store";import type { OAuthWindowEventPayload } from "@/types";@@ -98,9 +98,7 @@ import type {IdentityProvider,TestIdentityProviderResponse,} from "@/types/proto-es/v1/idp_service_pb";-import {- IdentityProviderType,-} from "@/types/proto-es/v1/idp_service_pb";+import { IdentityProviderType } from "@/types/proto-es/v1/idp_service_pb";import {TestIdentityProviderRequestSchema,CreateIdentityProviderRequestSchema,@@ -153,7 +151,8 @@ const loginWithIdentityProviderEventListener = async (event: Event) => {},},});- const response = await identityProviderServiceClientConnect.testIdentityProvider(request);+ const response =+ await identityProviderServiceClientConnect.testIdentityProvider(request);testIdentityProviderResponse.value = response;showClaimsDialog.value = true;@@ -188,7 +187,10 @@ const testConnection = async () => {identityProvider: idp,validateOnly: true,});- const response = await identityProviderServiceClientConnect.createIdentityProvider(request);+ const response =+ await identityProviderServiceClientConnect.createIdentityProvider(+ request+ );idpForTesting = response;}@@ -227,7 +229,10 @@ const testConnection = async () => {const request = create(TestIdentityProviderRequestSchema, {identityProvider: idp,});- const response = await identityProviderServiceClientConnect.testIdentityProvider(request);+ const response =+ await identityProviderServiceClientConnect.testIdentityProvider(+ request+ );// Show claims in dialog (LDAP will have empty claims)testIdentityProviderResponse.value = response;diff --git a/frontend/src/components/IdentityProvider/index.ts b/frontend/src/components/IdentityProvider/index.tsindex 3a1c0765bd..5ace0dc8d5 100644--- a/frontend/src/components/IdentityProvider/index.ts+++ b/frontend/src/components/IdentityProvider/index.ts@@ -2,4 +2,4 @@ export { default as IdentityProviderTable } from "./IdentityProviderTable.vue";export { default as IdentityProviderCreateWizard } from "./IdentityProviderCreateWizard.vue";export { default as IdentityProviderEditForm } from "./IdentityProviderEditForm.vue";export { default as IdentityProviderForm } from "./IdentityProviderForm.vue";-export { default as IdentityProviderExternalURL } from "./IdentityProviderExternalURL.vue";\ No newline at end of file+export { default as IdentityProviderExternalURL } from "./IdentityProviderExternalURL.vue";diff --git a/frontend/src/components/IndexTable.vue b/frontend/src/components/IndexTable.vueindex 0246d57a9d..8ebebae7ac 100644--- a/frontend/src/components/IndexTable.vue+++ b/frontend/src/components/IndexTable.vue@@ -37,10 +37,7 @@ const props = defineProps({const { t } = useI18n();const showVisibleColumn = computed(() => {const engine = props.database.instanceResource.engine;- return (- engine !== Engine.POSTGRES &&- engine !== Engine.MONGODB- );+ return engine !== Engine.POSTGRES && engine !== Engine.MONGODB;});const showCommentColumn = computed(() => {const engine = props.database.instanceResource.engine;diff --git a/frontend/src/components/Instance/InstanceSyncButton.vue b/frontend/src/components/Instance/InstanceSyncButton.vueindex a30a0e60b3..560bbcfea3 100644--- a/frontend/src/components/Instance/InstanceSyncButton.vue+++ b/frontend/src/components/Instance/InstanceSyncButton.vue@@ -28,6 +28,7 @@</template><script lang="tsx" setup>+import type { ConnectError } from "@connectrpc/connect";import { ChevronDownIcon } from "lucide-vue-next";import type { DropdownOption } from "naive-ui";import { NButton, NDropdown, NTooltip } from "naive-ui";@@ -35,7 +36,6 @@ import { computed, ref } from "vue";import { useI18n } from "vue-i18n";import { pushNotification } from "@/store";import { hasWorkspacePermissionV2 } from "@/utils";-import type { ConnectError } from "@connectrpc/connect";withDefaults(defineProps<{diff --git a/frontend/src/components/InstanceForm/Buttons.vue b/frontend/src/components/InstanceForm/Buttons.vueindex c03ae232fd..669b041abf 100644--- a/frontend/src/components/InstanceForm/Buttons.vue+++ b/frontend/src/components/InstanceForm/Buttons.vue@@ -49,6 +49,12 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";+import { cloneDeep, isEqual } from "lodash-es";+import { NButton } from "naive-ui";+import { computed, ref } from "vue";+import { useI18n } from "vue-i18n";+import { useRouter } from "vue-router";import {pushNotification,useDatabaseV1Store,@@ -67,12 +73,6 @@ import {} from "@/types/proto-es/v1/instance_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { defer, isValidSpannerHost } from "@/utils";-import { cloneDeep, isEqual } from "lodash-es";-import { create } from "@bufbuild/protobuf";-import { NButton } from "naive-ui";-import { computed, ref } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";import ScanIntervalInput from "./ScanIntervalInput.vue";import {calcDataSourceUpdateMask,@@ -363,18 +363,10 @@ const doUpdate = async () => {) {updateMask.push("sync_interval");}- if (- instancePatch.maximumConnections !==- inst.maximumConnections- ) {+ if (instancePatch.maximumConnections !== inst.maximumConnections) {updateMask.push("maximum_connections");}- if (- !isEqual(- instancePatch.syncDatabases,- inst.syncDatabases- )- ) {+ if (!isEqual(instancePatch.syncDatabases, inst.syncDatabases)) {updateMask.push("sync_databases");}if (updateMask.length === 0) {diff --git a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vueindex 9df83b4da5..c21a573aca 100644--- a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue+++ b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue@@ -92,36 +92,54 @@</label><div class="flex mt-2 items-center space-x-2"><NInput- :value="dataSource.saslConfig?.mechanism?.case === 'krbConfig' ? dataSource.saslConfig.mechanism.value.primary : ''"+ :value="+ dataSource.saslConfig?.mechanism?.case === 'krbConfig'+ ? dataSource.saslConfig.mechanism.value.primary+ : ''+ ":disabled="!allowEdit"placeholder="primary"- @update:value="(val) => {- if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {- dataSource.saslConfig.mechanism.value.primary = val;+ @update:value="+ (val) => {+ if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {+ dataSource.saslConfig.mechanism.value.primary = val;+ }}- }"+ "/><span>/</span><NInput- :value="dataSource.saslConfig?.mechanism?.case === 'krbConfig' ? dataSource.saslConfig.mechanism.value.instance : ''"+ :value="+ dataSource.saslConfig?.mechanism?.case === 'krbConfig'+ ? dataSource.saslConfig.mechanism.value.instance+ : ''+ ":disabled="!allowEdit"placeholder="instance, optional"- @update:value="(val) => {- if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {- dataSource.saslConfig.mechanism.value.instance = val;+ @update:value="+ (val) => {+ if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {+ dataSource.saslConfig.mechanism.value.instance = val;+ }}- }"+ "/><span>@</span><NInput- :value="dataSource.saslConfig?.mechanism?.case === 'krbConfig' ? dataSource.saslConfig.mechanism.value.realm : ''"+ :value="+ dataSource.saslConfig?.mechanism?.case === 'krbConfig'+ ? dataSource.saslConfig.mechanism.value.realm+ : ''+ ":disabled="!allowEdit"placeholder="realm"- @update:value="(val) => {- if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {- dataSource.saslConfig.mechanism.value.realm = val;+ @update:value="+ (val) => {+ if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {+ dataSource.saslConfig.mechanism.value.realm = val;+ }}- }"+ "/></div></div>@@ -133,40 +151,59 @@<div class="flex items-center space-x-2"><div class="w-fit"><NRadioGroup- :value="dataSource.saslConfig?.mechanism?.case === 'krbConfig' ? dataSource.saslConfig.mechanism.value.kdcTransportProtocol : 'tcp'"+ :value="+ dataSource.saslConfig?.mechanism?.case === 'krbConfig'+ ? dataSource.saslConfig.mechanism.value.kdcTransportProtocol+ : 'tcp'+ "class="textlabel w-32":disabled="!allowEdit"- @update:value="(val) => {- if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {- dataSource.saslConfig.mechanism.value.kdcTransportProtocol = val;+ @update:value="+ (val) => {+ if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {+ dataSource.saslConfig.mechanism.value.kdcTransportProtocol =+ val;+ }}- }"+ "><NRadio value="tcp"> TCP </NRadio><NRadio value="udp"> UDP </NRadio></NRadioGroup></div><NInput- :value="dataSource.saslConfig?.mechanism?.case === 'krbConfig' ? dataSource.saslConfig.mechanism.value.kdcHost : ''"+ :value="+ dataSource.saslConfig?.mechanism?.case === 'krbConfig'+ ? dataSource.saslConfig.mechanism.value.kdcHost+ : ''+ ":disabled="!allowEdit"placeholder="KDC host"- @update:value="(val) => {- if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {- dataSource.saslConfig.mechanism.value.kdcHost = val;+ @update:value="+ (val) => {+ if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {+ dataSource.saslConfig.mechanism.value.kdcHost = val;+ }}- }"+ "/><span>:</span><NInput- :value="dataSource.saslConfig?.mechanism?.case === 'krbConfig' ? dataSource.saslConfig.mechanism.value.kdcPort : ''"+ :value="+ dataSource.saslConfig?.mechanism?.case === 'krbConfig'+ ? dataSource.saslConfig.mechanism.value.kdcPort+ : ''+ ":disabled="!allowEdit"placeholder="KDC port, optional":allow-input="onlyAllowNumber"- @update:value="(val) => {- if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {- dataSource.saslConfig.mechanism.value.kdcPort = val;+ @update:value="+ (val) => {+ if (dataSource.saslConfig?.mechanism?.case === 'krbConfig') {+ dataSource.saslConfig.mechanism.value.kdcPort = val;+ }}- }"+ "/></div></div>@@ -248,29 +285,43 @@{{ $t("instance.iam-extension.tenant-id") }}</label><NInput- v-model:value="(dataSource.iamExtension?.case === 'azureCredential' ? dataSource.iamExtension.value : {}).tenantId"+ v-model:value="+ (dataSource.iamExtension?.case === 'azureCredential'+ ? dataSource.iamExtension.value+ : {}+ ).tenantId+ "class="mt-2 w-full":disabled="!allowEdit":placeholder="''"- @update:value="(val) => {- if (dataSource.iamExtension?.case === 'azureCredential') {- dataSource.iamExtension.value.tenantId = val;+ @update:value="+ (val) => {+ if (dataSource.iamExtension?.case === 'azureCredential') {+ dataSource.iamExtension.value.tenantId = val;+ }}- }"+ "/><label for="client-id" class="textlabel block mt-2">{{ $t("instance.iam-extension.client-id") }}</label><NInput- v-model:value="(dataSource.iamExtension?.case === 'azureCredential' ? dataSource.iamExtension.value : {}).clientId"+ v-model:value="+ (dataSource.iamExtension?.case === 'azureCredential'+ ? dataSource.iamExtension.value+ : {}+ ).clientId+ "class="mt-2 w-full":disabled="!allowEdit":placeholder="''"- @update:value="(val) => {- if (dataSource.iamExtension?.case === 'azureCredential') {- dataSource.iamExtension.value.clientId = val;+ @update:value="+ (val) => {+ if (dataSource.iamExtension?.case === 'azureCredential') {+ dataSource.iamExtension.value.clientId = val;+ }}- }"+ "/><label for="client-secret" class="textlabel block mt-2">{{ $t("instance.iam-extension.client-secret") }}@@ -278,15 +329,22 @@<NInputtype="password"show-password-on="click"- v-model:value="(dataSource.iamExtension?.case === 'azureCredential' ? dataSource.iamExtension.value : {}).clientSecret"+ v-model:value="+ (dataSource.iamExtension?.case === 'azureCredential'+ ? dataSource.iamExtension.value+ : {}+ ).clientSecret+ "class="mt-2 w-full":disabled="!allowEdit":placeholder="$t('instance.type-or-paste-credentials-write-only')"- @update:value="(val) => {- if (dataSource.iamExtension?.case === 'azureCredential') {- dataSource.iamExtension.value.clientSecret = val;+ @update:value="+ (val) => {+ if (dataSource.iamExtension?.case === 'azureCredential') {+ dataSource.iamExtension.value.clientSecret = val;+ }}- }"+ "/></div><div@@ -298,16 +356,23 @@><label class="textlabel block mt-2"> Credential File Content</label><NInput- v-model:value="(dataSource.iamExtension?.case === 'gcpCredential' ? dataSource.iamExtension.value : {}).content"+ v-model:value="+ (dataSource.iamExtension?.case === 'gcpCredential'+ ? dataSource.iamExtension.value+ : {}+ ).content+ "type="textarea"class="mt-2 w-full":disabled="!allowEdit":placeholder="$t('instance.type-or-paste-credentials-write-only')"- @update:value="(val) => {- if (dataSource.iamExtension?.case === 'gcpCredential') {- dataSource.iamExtension.value.content = val;+ @update:value="+ (val) => {+ if (dataSource.iamExtension?.case === 'gcpCredential') {+ dataSource.iamExtension.value.content = val;+ }}- }"+ "/></div><div@@ -319,39 +384,60 @@><label class="textlabel block mt-2"> Access Key ID </label><NInput- v-model:value="(dataSource.iamExtension?.case === 'awsCredential' ? dataSource.iamExtension.value : {}).accessKeyId"+ v-model:value="+ (dataSource.iamExtension?.case === 'awsCredential'+ ? dataSource.iamExtension.value+ : {}+ ).accessKeyId+ "class="mt-2 w-full":disabled="!allowEdit":placeholder="$t('common.write-only')"- @update:value="(val) => {- if (dataSource.iamExtension?.case === 'awsCredential') {- dataSource.iamExtension.value.accessKeyId = val;+ @update:value="+ (val) => {+ if (dataSource.iamExtension?.case === 'awsCredential') {+ dataSource.iamExtension.value.accessKeyId = val;+ }}- }"+ "/><label class="textlabel block mt-2"> Secret Access Key </label><NInput- v-model:value="(dataSource.iamExtension?.case === 'awsCredential' ? dataSource.iamExtension.value : {}).secretAccessKey"+ v-model:value="+ (dataSource.iamExtension?.case === 'awsCredential'+ ? dataSource.iamExtension.value+ : {}+ ).secretAccessKey+ "class="mt-2 w-full":disabled="!allowEdit":placeholder="$t('common.write-only')"- @update:value="(val) => {- if (dataSource.iamExtension?.case === 'awsCredential') {- dataSource.iamExtension.value.secretAccessKey = val;+ @update:value="+ (val) => {+ if (dataSource.iamExtension?.case === 'awsCredential') {+ dataSource.iamExtension.value.secretAccessKey = val;+ }}- }"+ "/><label class="textlabel block mt-2"> Session Token </label><NInput- v-model:value="(dataSource.iamExtension?.case === 'awsCredential' ? dataSource.iamExtension.value : {}).sessionToken"+ v-model:value="+ (dataSource.iamExtension?.case === 'awsCredential'+ ? dataSource.iamExtension.value+ : {}+ ).sessionToken+ "class="mt-2 w-full":disabled="!allowEdit":placeholder="$t('common.write-only')"- @update:value="(val) => {- if (dataSource.iamExtension?.case === 'awsCredential') {- dataSource.iamExtension.value.sessionToken = val;+ @update:value="+ (val) => {+ if (dataSource.iamExtension?.case === 'awsCredential') {+ dataSource.iamExtension.value.sessionToken = val;+ }}- }"+ "/></div></template>@@ -597,7 +683,11 @@/></div><BBTextField- :value="dataSource.externalSecret?.authOption?.case === 'token' ? dataSource.externalSecret.authOption.value : ''"+ :value="+ dataSource.externalSecret?.authOption?.case === 'token'+ ? dataSource.externalSecret.authOption.value+ : ''+ "class="mt-2 w-full":disabled="!allowEdit":placeholder="secretInputPlaceholder"@@ -606,14 +696,19 @@(val: string) => {const ds = dataSource;if (ds.externalSecret) {- ds.externalSecret.authOption = { case: 'token', value: val };+ ds.externalSecret.authOption = {+ case: 'token',+ value: val,+ };}}"/></div><div- v-else-if="dataSource.externalSecret?.authOption?.case === 'appRole'"+ v-else-if="+ dataSource.externalSecret?.authOption?.case === 'appRole'+ "class="space-y-4"><div class="sm:col-span-2 sm:col-start-1">@@ -626,7 +721,11 @@<span class="text-red-600">*</span></label><BBTextField- :value="dataSource.externalSecret?.authOption?.case === 'appRole' ? dataSource.externalSecret.authOption.value.roleId : ''"+ :value="+ dataSource.externalSecret?.authOption?.case === 'appRole'+ ? dataSource.externalSecret.authOption.value.roleId+ : ''+ ":required="isCreating"class="mt-2 w-full":disabled="!allowEdit"@@ -665,14 +764,23 @@</template></i18n-t><NRadioGroup- :value="dataSource.externalSecret?.authOption?.case === 'appRole' ? dataSource.externalSecret.authOption.value.type : DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN"+ :value="+ dataSource.externalSecret?.authOption?.case === 'appRole'+ ? dataSource.externalSecret.authOption.value.type+ : DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN+ "class="textlabel my-1":disabled="!allowEdit"- @update:value="(val) => {- if (dataSource.externalSecret?.authOption?.case === 'appRole') {- dataSource.externalSecret.authOption.value.type = val;+ @update:value="+ (val) => {+ if (+ dataSource.externalSecret?.authOption?.case ===+ 'appRole'+ ) {+ dataSource.externalSecret.authOption.value.type = val;+ }}- }"+ "><NRadio:value="@@ -698,7 +806,11 @@</NRadio></NRadioGroup><BBTextField- :value="dataSource.externalSecret?.authOption?.case === 'appRole' ? dataSource.externalSecret.authOption.value.secretId : ''"+ :value="+ dataSource.externalSecret?.authOption?.case === 'appRole'+ ? dataSource.externalSecret.authOption.value.secretId+ : ''+ "class="mt-2 w-full":disabled="!allowEdit":placeholder="secretInputPlaceholder"@@ -1162,6 +1274,7 @@ MIIEvQ...<script setup lang="ts">/* eslint-disable vue/no-mutating-props */+import { create } from "@bufbuild/protobuf";import {NButton,NCheckbox,@@ -1180,7 +1293,6 @@ import { FeatureBadge } from "@/components/FeatureGuard";import LearnMoreLink from "@/components/LearnMoreLink.vue";import DroppableTextarea from "@/components/misc/DroppableTextarea.vue";import type { DataSourceOptions } from "@/types/dataSource";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { Engine } from "@/types/proto-es/v1/common_pb";import type { DataSource } from "@/types/proto-es/v1/instance_service_pb";import {@@ -1198,7 +1310,7 @@ import {KerberosConfigSchema,SASLConfigSchema,} from "@/types/proto-es/v1/instance_service_pb";-import { create } from "@bufbuild/protobuf";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { onlyAllowNumber } from "@/utils";import type { EditDataSource } from "../common";import { useInstanceFormContext } from "../context";@@ -1316,11 +1428,12 @@ watch(} else {props.dataSource.iamExtension = {case: "awsCredential",- value: create(DataSource_AWSCredentialSchema,- props.dataSource.iamExtension?.case === "awsCredential"- ? props.dataSource.iamExtension.value+ value: create(+ DataSource_AWSCredentialSchema,+ props.dataSource.iamExtension?.case === "awsCredential"+ ? props.dataSource.iamExtension.value: {}- )+ ),};}break;@@ -1330,11 +1443,12 @@ watch(} else {props.dataSource.iamExtension = {case: "gcpCredential",- value: create(DataSource_GCPCredentialSchema,- props.dataSource.iamExtension?.case === "gcpCredential"- ? props.dataSource.iamExtension.value+ value: create(+ DataSource_GCPCredentialSchema,+ props.dataSource.iamExtension?.case === "gcpCredential"+ ? props.dataSource.iamExtension.value: {}- )+ ),};}break;@@ -1344,11 +1458,12 @@ watch(} else {props.dataSource.iamExtension = {case: "azureCredential",- value: create(DataSource_AzureCredentialSchema,- props.dataSource.iamExtension?.case === "azureCredential"- ? props.dataSource.iamExtension.value+ value: create(+ DataSource_AzureCredentialSchema,+ props.dataSource.iamExtension?.case === "azureCredential"+ ? props.dataSource.iamExtension.value: {}- )+ ),};}break;@@ -1357,7 +1472,9 @@ watch();const hiveAuthentication = computed(() => {- return props.dataSource.saslConfig?.mechanism?.case === "krbConfig" ? "KERBEROS" : "PASSWORD";+ return props.dataSource.saslConfig?.mechanism?.case === "krbConfig"+ ? "KERBEROS"+ : "PASSWORD";});const onHiveAuthenticationChange = (val: "KERBEROS" | "PASSWORD") => {@@ -1368,8 +1485,8 @@ const onHiveAuthenticationChange = (val: "KERBEROS" | "PASSWORD") => {case: "krbConfig",value: create(KerberosConfigSchema, {kdcTransportProtocol: "tcp",- })- }+ }),+ },});} else {ds.saslConfig = undefined;@@ -1387,7 +1504,11 @@ const secretInputPlaceholder = computed(() => {"instance.external-secret-vault.vault-auth-type.token.self")} - ${t("common.write-only")}`;case DataSourceExternalSecret_AuthType.VAULT_APP_ROLE:- switch (props.dataSource.externalSecret.authOption?.case === 'appRole' ? props.dataSource.externalSecret.authOption.value.type : undefined) {+ switch (+ props.dataSource.externalSecret.authOption?.case === "appRole"+ ? props.dataSource.externalSecret.authOption.value.type+ : undefined+ ) {case DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN:return `${t("instance.external-secret-vault.vault-auth-type.approle.secret-id-plain-text"@@ -1471,12 +1592,12 @@ const changeExternalSecretAuthType = (case: "appRole",value: create(DataSourceExternalSecret_AppRoleAuthOptionSchema, {type: DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN,- })+ }),};} else {ds.externalSecret.authOption = {case: "token",- value: ""+ value: "",};}ds.externalSecret.authType = authType;diff --git a/frontend/src/components/InstanceForm/DataSourceSection/SshConnectionForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/SshConnectionForm.vueindex 8ce4c97b5e..07db51ccb9 100644--- a/frontend/src/components/InstanceForm/DataSourceSection/SshConnectionForm.vue+++ b/frontend/src/components/InstanceForm/DataSourceSection/SshConnectionForm.vue@@ -87,12 +87,12 @@</template><script lang="ts" setup>-import DroppableTextarea from "@/components/misc/DroppableTextarea.vue";-import type { Instance } from "@/types/proto-es/v1/instance_service_pb";-import { onlyAllowNumber } from "@/utils";import { NInput, NRadio } from "naive-ui";import { reactive, watch } from "vue";import { useI18n } from "vue-i18n";+import DroppableTextarea from "@/components/misc/DroppableTextarea.vue";+import type { Instance } from "@/types/proto-es/v1/instance_service_pb";+import { onlyAllowNumber } from "@/utils";const SshTypes = ["NONE", "TUNNEL+PK"] as const;diff --git a/frontend/src/components/InstanceForm/Form.vue b/frontend/src/components/InstanceForm/Form.vueindex e759127348..a2240033b0 100644--- a/frontend/src/components/InstanceForm/Form.vue+++ b/frontend/src/components/InstanceForm/Form.vue@@ -442,7 +442,7 @@rel="noopener noreferrer"class="normal-link">- {{ $t('instance.sentence.firewall-info') }}+ {{ $t("instance.sentence.firewall-info") }}</a></BBAttention>@@ -479,12 +479,14 @@<InstanceArchiveRestoreButtonv-if="!hideArchiveRestore && !isCreating && instance"- :instance="(instance as ComposedInstance)"+ :instance="instance as ComposedInstance"/></div></template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";+import type { Duration } from "@bufbuild/protobuf/wkt";import { TrashIcon } from "lucide-vue-next";import {NButton,@@ -519,7 +521,10 @@ import {import { type ComposedInstance } from "@/types";import { UNKNOWN_ID, isValidEnvironmentName } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";-import { DataSource_AuthenticationType, DataSource_AddressSchema } from "@/types/proto-es/v1/instance_service_pb";+import {+ DataSource_AuthenticationType,+ DataSource_AddressSchema,+} from "@/types/proto-es/v1/instance_service_pb";import { DataSource_RedisType } from "@/types/proto-es/v1/instance_service_pb";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import {@@ -530,8 +535,6 @@ import {urlfy,supportedEngineV1List,} from "@/utils";--import LearnMoreLink from "../LearnMoreLink.vue";import BigQueryHostInput from "./BigQueryHostInput.vue";import DataSourceSection from "./DataSourceSection/DataSourceSection.vue";@@ -545,8 +548,6 @@ import {RedisConnectionType,} from "./constants";import { useInstanceFormContext } from "./context";-import { create } from "@bufbuild/protobuf";-import type { Duration } from "@bufbuild/protobuf/wkt";defineProps<{hideArchiveRestore?: boolean;@@ -637,7 +638,6 @@ const showAdditionalAddresses = computed(() => {return false;});-// The default host name is 127.0.0.1 or host.docker.internal which is not applicable to Snowflake, so we change// the host name between 127.0.0.1/host.docker.internal and "" if user hasn't changed default yet.const changeInstanceEngine = (engine: Engine) => {diff --git a/frontend/src/components/InstanceForm/ScanIntervalInput.vue b/frontend/src/components/InstanceForm/ScanIntervalInput.vueindex 8249d876ef..012e3a1944 100644--- a/frontend/src/components/InstanceForm/ScanIntervalInput.vue+++ b/frontend/src/components/InstanceForm/ScanIntervalInput.vue@@ -11,9 +11,9 @@<span v-if="instance.lastSyncTime" class="textinfolabel">({{$t("sql-editor.last-synced", {- time: dayjs(getDateForPbTimestampProtoEs(instance.lastSyncTime)).format(- "YYYY-MM-DD HH:mm:ss"- ),+ time: dayjs(+ getDateForPbTimestampProtoEs(instance.lastSyncTime)+ ).format("YYYY-MM-DD HH:mm:ss"),})}})</span>@@ -67,13 +67,13 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";+import type { Duration } from "@bufbuild/protobuf/wkt";+import { DurationSchema } from "@bufbuild/protobuf/wkt";import dayjs from "dayjs";import { NInputNumber, NRadio } from "naive-ui";import { reactive, watch } from "vue";import { getDateForPbTimestampProtoEs, type ComposedInstance } from "@/types";-import type { Duration } from "@bufbuild/protobuf/wkt";-import { create } from "@bufbuild/protobuf";-import { DurationSchema } from "@bufbuild/protobuf/wkt";import { useInstanceFormContext } from "./context";type Mode = "DEFAULT" | "CUSTOM";diff --git a/frontend/src/components/InstanceForm/common.ts b/frontend/src/components/InstanceForm/common.tsindex 8a442f476f..f9b12203e1 100644--- a/frontend/src/components/InstanceForm/common.ts+++ b/frontend/src/components/InstanceForm/common.ts@@ -6,9 +6,12 @@ import {UNKNOWN_ENVIRONMENT_NAME,UNKNOWN_INSTANCE_NAME,} from "@/types";-import type { DataSource, Instance } from "@/types/proto-es/v1/instance_service_pb";-import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";import { Engine, State } from "@/types/proto-es/v1/common_pb";+import type {+ DataSource,+ Instance,+} from "@/types/proto-es/v1/instance_service_pb";+import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import { calcUpdateMask } from "@/utils";diff --git a/frontend/src/components/InstanceForm/constants.ts b/frontend/src/components/InstanceForm/constants.tsindex bbe9835c3d..ff27044e38 100644--- a/frontend/src/components/InstanceForm/constants.ts+++ b/frontend/src/components/InstanceForm/constants.ts@@ -10,7 +10,7 @@ export const defaultPortForEngine = (engine: OldEngine) => {return "3306";case OldEngine.POSTGRES:return "5432";- case OldEngine.SNOWFLAKE:+ case OldEngine.SNOWFLAKE:return "";case OldEngine.SQLITE:return "";@@ -35,7 +35,7 @@ export const defaultPortForEngine = (engine: OldEngine) => {case OldEngine.DM:return "5236";case OldEngine.RISINGWAVE:- return "4566";+ return "4566";case OldEngine.OCEANBASE_ORACLE:return "1521";case OldEngine.STARROCKS:@@ -61,7 +61,7 @@ export const defaultPortForEngine = (engine: OldEngine) => {case OldEngine.TRINO:return "8080";}- throw new Error("engine port unknown");+ throw new Error("engine port unknown");};export const EngineList = computed(() => {@@ -70,7 +70,8 @@ export const EngineList = computed(() => {export const EngineIconPath: Record<string, string> = {[OldEngine.MYSQL]: new URL("@/assets/db/mysql.png", import.meta.url).href,- [OldEngine.POSTGRES]: new URL("@/assets/db/postgres.png", import.meta.url).href,+ [OldEngine.POSTGRES]: new URL("@/assets/db/postgres.png", import.meta.url)+ .href,[OldEngine.TIDB]: new URL("@/assets/db/tidb.png", import.meta.url).href,[OldEngine.SNOWFLAKE]: new URL("@/assets/db/snowflake.png", import.meta.url).href,@@ -82,7 +83,8 @@ export const EngineIconPath: Record<string, string> = {[OldEngine.ORACLE]: new URL("@/assets/db/oracle.svg", import.meta.url).href,[OldEngine.DM]: new URL("@/assets/db/dm.png", import.meta.url).href,[OldEngine.MSSQL]: new URL("@/assets/db/mssql.svg", import.meta.url).href,- [OldEngine.REDSHIFT]: new URL("@/assets/db/redshift.svg", import.meta.url).href,+ [OldEngine.REDSHIFT]: new URL("@/assets/db/redshift.svg", import.meta.url)+ .href,[OldEngine.MARIADB]: new URL("@/assets/db/mariadb.png", import.meta.url).href,[OldEngine.OCEANBASE]: new URL("@/assets/db/oceanbase-mysql.svg",@@ -102,14 +104,20 @@ export const EngineIconPath: Record<string, string> = {"@/assets/db/elasticsearch.svg",import.meta.url).href,- [OldEngine.BIGQUERY]: new URL("@/assets/db/bigquery.svg", import.meta.url).href,- [OldEngine.DYNAMODB]: new URL("@/assets/db/dynamodb.svg", import.meta.url).href,+ [OldEngine.BIGQUERY]: new URL("@/assets/db/bigquery.svg", import.meta.url)+ .href,+ [OldEngine.DYNAMODB]: new URL("@/assets/db/dynamodb.svg", import.meta.url)+ .href,[OldEngine.DATABRICKS]: new URL("@/assets/db/databricks.svg", import.meta.url).href,- [OldEngine.COCKROACHDB]: new URL("@/assets/db/cockroachdb.png", import.meta.url)+ [OldEngine.COCKROACHDB]: new URL(+ "@/assets/db/cockroachdb.png",+ import.meta.url+ ).href,+ [OldEngine.COSMOSDB]: new URL("@/assets/db/cosmosdb.svg", import.meta.url)+ .href,+ [OldEngine.CASSANDRA]: new URL("@/assets/db/cassandra.svg", import.meta.url).href,- [OldEngine.COSMOSDB]: new URL("@/assets/db/cosmosdb.svg", import.meta.url).href,- [OldEngine.CASSANDRA]: new URL("@/assets/db/cassandra.svg", import.meta.url).href,[OldEngine.TRINO]: new URL("@/assets/db/trino.svg", import.meta.url).href,};diff --git a/frontend/src/components/InstanceForm/context.ts b/frontend/src/components/InstanceForm/context.tsindex 616e8536fd..e7d4bbc0be 100644--- a/frontend/src/components/InstanceForm/context.ts+++ b/frontend/src/components/InstanceForm/context.ts@@ -1,3 +1,5 @@+import { create } from "@bufbuild/protobuf";+import { createContextValues } from "@connectrpc/connect";import Emittery from "emittery";import { cloneDeep, isEqual, omit } from "lodash-es";import { useDialog } from "naive-ui";@@ -5,14 +7,7 @@ import type { InjectionKey, Ref } from "vue";import { computed, inject, provide, ref } from "vue";import { useI18n } from "vue-i18n";import { instanceServiceClientConnect } from "@/grpcweb";-import { create } from "@bufbuild/protobuf";-import { createContextValues } from "@connectrpc/connect";import { silentContextKey } from "@/grpcweb/context-key";-import {- CreateInstanceRequestSchema,- AddDataSourceRequestSchema,- UpdateDataSourceRequestSchema-} from "@/types/proto-es/v1/instance_service_pb";import {environmentNamePrefix,pushNotification,@@ -20,9 +15,17 @@ import {useSubscriptionV1Store,} from "@/store";import { isValidEnvironmentName, unknownEnvironment } from "@/types";-import type { Instance, DataSource } from "@/types/proto-es/v1/instance_service_pb";-import { InstanceSchema } from "@/types/proto-es/v1/instance_service_pb";import { Engine, State } from "@/types/proto-es/v1/common_pb";+import {+ CreateInstanceRequestSchema,+ AddDataSourceRequestSchema,+ UpdateDataSourceRequestSchema,+} from "@/types/proto-es/v1/instance_service_pb";+import type {+ Instance,+ DataSource,+} from "@/types/proto-es/v1/instance_service_pb";+import { InstanceSchema } from "@/types/proto-es/v1/instance_service_pb";import {DataSourceExternalSecret_AuthType,DataSourceExternalSecret_SecretType,@@ -150,7 +153,7 @@ export const provideInstanceFormContext = (baseContext: {}}- if (ds.saslConfig?.mechanism?.case === 'krbConfig') {+ if (ds.saslConfig?.mechanism?.case === "krbConfig") {const krbConfig = ds.saslConfig.mechanism.value;if (!krbConfig.primary ||@@ -195,10 +198,13 @@ export const provideInstanceFormContext = (baseContext: {switch (ds.externalSecret.authType) {case DataSourceExternalSecret_AuthType.TOKEN:- return !!(ds.externalSecret.authOption?.case === 'token' && ds.externalSecret.authOption.value);+ return !!(+ ds.externalSecret.authOption?.case === "token" &&+ ds.externalSecret.authOption.value+ );case DataSourceExternalSecret_AuthType.VAULT_APP_ROLE:return !!(- ds.externalSecret.authOption?.case === 'appRole' &&+ ds.externalSecret.authOption?.case === "appRole" &&ds.externalSecret.authOption.value?.roleId &&ds.externalSecret.authOption.value.secretId);@@ -404,8 +410,7 @@ export const provideInstanceFormContext = (baseContext: {});await instanceServiceClientConnect.addDataSource(request, {contextValues: createContextValues().set(silentContextKey, true),- }- );+ });return ok();} catch (err) {return fail(ds.host, err);diff --git a/frontend/src/components/InstanceForm/specs.ts b/frontend/src/components/InstanceForm/specs.tsindex bbae03e50a..8db5ae3da2 100644--- a/frontend/src/components/InstanceForm/specs.ts+++ b/frontend/src/components/InstanceForm/specs.ts@@ -1,7 +1,11 @@import { computed, type Ref } from "vue";-import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";import { Engine } from "@/types/proto-es/v1/common_pb";-import { instanceV1HasExtraParameters, instanceV1HasSSH, instanceV1HasSSL } from "@/utils";+import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";+import {+ instanceV1HasExtraParameters,+ instanceV1HasSSH,+ instanceV1HasSSL,+} from "@/utils";import type { BasicInfo, EditDataSource } from "./common";import { defaultPortForEngine } from "./constants";@@ -76,7 +80,7 @@ export const useInstanceSpecs = (showAuthenticationDatabase,hasReadonlyReplicaHost,hasReadonlyReplicaPort,- hasExtraParameters+ hasExtraParameters,};};diff --git a/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue b/frontend/src/components/IssueV1/DataExportIssueDetailPage.vueindex 7a3e9c1b4f..062185a7a1 100644--- a/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue+++ b/frontend/src/components/IssueV1/DataExportIssueDetailPage.vue@@ -64,9 +64,9 @@import { computed, ref } from "vue";import { FeatureAttention } from "@/components/FeatureGuard";import { useCurrentProjectV1 } from "@/store";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import type { Plan, Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import type { Task } from "@/types/proto-es/v1/rollout_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { SQLCheckSection } from "../Plan/components";import { providePlanSQLCheckContext } from "../Plan/components/SQLCheckSection";import { provideSidebarContext } from "../Plan/logic";diff --git a/frontend/src/components/IssueV1/components/BannerSection.vue b/frontend/src/components/IssueV1/components/BannerSection.vueindex 7cfed4b26d..dc92569a2e 100644--- a/frontend/src/components/IssueV1/components/BannerSection.vue+++ b/frontend/src/components/IssueV1/components/BannerSection.vue@@ -55,10 +55,7 @@ import {Issue_Approver_Status,} from "@/types/proto-es/v1/issue_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";-import {- activeTaskInRollout,- isDatabaseChangeRelatedIssue,-} from "@/utils";+import { activeTaskInRollout, isDatabaseChangeRelatedIssue } from "@/utils";import {useIssueContext,isUnfinishedResolvedTask as checkUnfinishedResolvedTask,diff --git a/frontend/src/components/IssueV1/components/DataExportSection/ExportOptionSection/ExportOptionSection.vue b/frontend/src/components/IssueV1/components/DataExportSection/ExportOptionSection/ExportOptionSection.vueindex ee0aa8b8d2..b660b9e71a 100644--- a/frontend/src/components/IssueV1/components/DataExportSection/ExportOptionSection/ExportOptionSection.vue+++ b/frontend/src/components/IssueV1/components/DataExportSection/ExportOptionSection/ExportOptionSection.vue@@ -58,6 +58,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { cloneDeep, head } from "lodash-es";import { NButton, NTooltip } from "naive-ui";import { computed, watch, reactive, ref } from "vue";@@ -67,11 +68,10 @@ import {useIssueContext,} from "@/components/IssueV1/logic";import ErrorList from "@/components/misc/ErrorList.vue";-import { create } from "@bufbuild/protobuf";import { planServiceClientConnect } from "@/grpcweb";-import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { pushNotification } from "@/store";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";+import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import {Plan_SpecSchema,Plan_ExportDataConfigSchema,@@ -94,12 +94,17 @@ const spec = computed();const state = reactive<LocalState>({- config: create(Plan_ExportDataConfigSchema, spec.value.config?.case === "exportDataConfig" ? {- targets: spec.value.config.value.targets,- sheet: spec.value.config.value.sheet,- format: spec.value.config.value.format,- password: spec.value.config.value.password,- } : {}),+ config: create(+ Plan_ExportDataConfigSchema,+ spec.value.config?.case === "exportDataConfig"+ ? {+ targets: spec.value.config.value.targets,+ sheet: spec.value.config.value.sheet,+ format: spec.value.config.value.format,+ password: spec.value.config.value.password,+ }+ : {}+ ),isEditing: false,});@@ -122,17 +127,22 @@ const convertedFormat = computed({},set(value) {state.config.format = value;- }+ },});const handleCancelEdit = () => {state.isEditing = false;- state.config = create(Plan_ExportDataConfigSchema, spec.value.config?.case === "exportDataConfig" ? {- targets: spec.value.config.value.targets,- sheet: spec.value.config.value.sheet,- format: spec.value.config.value.format,- password: spec.value.config.value.password,- } : {});+ state.config = create(+ Plan_ExportDataConfigSchema,+ spec.value.config?.case === "exportDataConfig"+ ? {+ targets: spec.value.config.value.targets,+ sheet: spec.value.config.value.sheet,+ format: spec.value.config.value.format,+ password: spec.value.config.value.password,+ }+ : {}+ );// Trigger a re-render of the child components.refreshKey.value++;};diff --git a/frontend/src/components/IssueV1/components/DescriptionSection/DescriptionSection.vue b/frontend/src/components/IssueV1/components/DescriptionSection/DescriptionSection.vueindex a0bdc142c0..ddb2b03dc0 100644--- a/frontend/src/components/IssueV1/components/DescriptionSection/DescriptionSection.vue+++ b/frontend/src/components/IssueV1/components/DescriptionSection/DescriptionSection.vue@@ -70,15 +70,18 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { NInput, NButton } from "naive-ui";import { computed, nextTick, reactive, ref, watch } from "vue";import { useI18n } from "vue-i18n";-import { create } from "@bufbuild/protobuf";import { useRenderMarkdown } from "@/components/MarkdownEditor";import { issueServiceClientConnect } from "@/grpcweb";import { emitWindowEvent } from "@/plugins";import { pushNotification, useCurrentProjectV1 } from "@/store";-import { IssueSchema, UpdateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import {+ IssueSchema,+ UpdateIssueRequestSchema,+} from "@/types/proto-es/v1/issue_service_pb";import { isGrantRequestIssue } from "@/utils";import { useIssueContext } from "../../logic";diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vueindex e357c85d07..1ccacffe54 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue@@ -80,7 +80,11 @@ import { useSheetV1Store, useCurrentProjectV1 } from "@/store";import { dialectOfEngineV1, languageOfEngineV1 } from "@/types";import type { Engine } from "@/types/proto-es/v1/common_pb";import { CreateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import type { Issue } from "@/types/proto-es/v1/issue_service_pb";+import { IssueSchema, Issue_Type } from "@/types/proto-es/v1/issue_service_pb";import { CreatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";+import type { Plan_ExportDataConfig } from "@/types/proto-es/v1/plan_service_pb";+import { type Plan_ChangeDatabaseConfig } from "@/types/proto-es/v1/plan_service_pb";import {CheckReleaseRequestSchema,ReleaseFileType,@@ -88,10 +92,6 @@ import {import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import type { Sheet } from "@/types/proto-es/v1/sheet_service_pb";import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";-import type { Issue } from "@/types/proto-es/v1/issue_service_pb";-import { IssueSchema, Issue_Type } from "@/types/proto-es/v1/issue_service_pb";-import type { Plan_ExportDataConfig } from "@/types/proto-es/v1/plan_service_pb";-import { type Plan_ChangeDatabaseConfig } from "@/types/proto-es/v1/plan_service_pb";import { databaseForTask } from "@/utils";import {defer,@@ -215,8 +215,12 @@ const createSheets = async () => {const specList = issue.value.planEntity?.specs ?? [];for (const spec of specList) {- const config = spec.config?.case === "changeDatabaseConfig" ? spec.config.value :- spec.config?.case === "exportDataConfig" ? spec.config.value : null;+ const config =+ spec.config?.case === "changeDatabaseConfig"+ ? spec.config.value+ : spec.config?.case === "exportDataConfig"+ ? spec.config.value+ : null;if (!config) continue;configWithSheetList.push(config);if (pendingCreateSheetMap.has(config.sheet)) continue;diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/request/ExportArchiveDownloadButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/request/ExportArchiveDownloadButton.vueindex afd70b834c..c2fe0d3362 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/request/ExportArchiveDownloadButton.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/request/ExportArchiveDownloadButton.vue@@ -22,19 +22,22 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import dayjs from "dayjs";import { head, last } from "lodash-es";import { DownloadIcon, CircleCheckBigIcon } from "lucide-vue-next";import { NButton } from "naive-ui";import { computed, reactive } from "vue";import { watchEffect } from "vue";-import { create } from "@bufbuild/protobuf";import { useIssueContext } from "@/components/IssueV1";import { issueServiceClientConnect } from "@/grpcweb";-import { BatchUpdateIssuesStatusRequestSchema, IssueStatus as NewIssueStatus } from "@/types/proto-es/v1/issue_service_pb";import { useSQLStore } from "@/store";-import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import { ExportFormat } from "@/types/proto-es/v1/common_pb";+import {+ BatchUpdateIssuesStatusRequestSchema,+ IssueStatus as NewIssueStatus,+} from "@/types/proto-es/v1/issue_service_pb";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import {Plan_ExportDataConfigSchema,Plan_SpecSchema,@@ -61,8 +64,12 @@ const taskRun = computed(() => {});const exportDataConfig = computed(() => {- const spec = head(issue.value.planEntity?.specs) || create(Plan_SpecSchema, {});- return spec.config?.value as Plan_ExportDataConfig || create(Plan_ExportDataConfigSchema, {});+ const spec =+ head(issue.value.planEntity?.specs) || create(Plan_SpecSchema, {});+ return (+ (spec.config?.value as Plan_ExportDataConfig) ||+ create(Plan_ExportDataConfigSchema, {})+ );});watchEffect(async () => {diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Title.vue b/frontend/src/components/IssueV1/components/HeaderSection/Title.vueindex e540a564b9..3ad54e15a0 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/Title.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/Title.vue@@ -17,15 +17,18 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { NInput } from "naive-ui";import type { CSSProperties } from "vue";import { computed, reactive, watch } from "vue";import { useI18n } from "vue-i18n";-import { create } from "@bufbuild/protobuf";import { issueServiceClientConnect } from "@/grpcweb";import { emitWindowEvent } from "@/plugins";import { pushNotification } from "@/store";-import { IssueSchema, UpdateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import {+ IssueSchema,+ UpdateIssueRequestSchema,+} from "@/types/proto-es/v1/issue_service_pb";import { useIssueContext } from "../../logic";type ViewMode = "EDIT" | "VIEW";diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vueindex c23747e358..d333fd6aec 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue@@ -111,11 +111,11 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { PencilIcon } from "lucide-vue-next";import { NButton } from "naive-ui";import { computed, onMounted, reactive, ref, watch, watchEffect } from "vue";import { useRoute } from "vue-router";-import { create } from "@bufbuild/protobuf";import MarkdownEditor from "@/components/MarkdownEditor";import UserAvatar from "@/components/User/UserAvatar.vue";import {diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionIcon.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionIcon.vueindex 71f033668f..bebe0dced6 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionIcon.vue+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionIcon.vue@@ -156,7 +156,10 @@ const user = computedAsync(() => {const icon = computed((): ActionIconType => {const { issueComment } = props;- if (issueComment.type === IssueCommentType.APPROVAL && issueComment.event?.case === "approval") {+ if (+ issueComment.type === IssueCommentType.APPROVAL &&+ issueComment.event?.case === "approval"+ ) {const { status } = issueComment.event.value;switch (status) {case IssueComment_Approval_Status.APPROVED:@@ -168,7 +171,10 @@ const icon = computed((): ActionIconType => {}} else if (issueComment.type === IssueCommentType.STAGE_END) {return "complete";- } else if (issueComment.type === IssueCommentType.TASK_UPDATE && issueComment.event?.case === "taskUpdate") {+ } else if (+ issueComment.type === IssueCommentType.TASK_UPDATE &&+ issueComment.event?.case === "taskUpdate"+ ) {const { toStatus } = issueComment.event.value;let action: ActionIconType = "update";if (toStatus !== undefined) {@@ -200,8 +206,12 @@ const icon = computed((): ActionIconType => {}}return action;- } else if (issueComment.type === IssueCommentType.ISSUE_UPDATE && issueComment.event?.case === "issueUpdate") {- const { toTitle, toDescription, toLabels, fromLabels } = issueComment.event.value;+ } else if (+ issueComment.type === IssueCommentType.ISSUE_UPDATE &&+ issueComment.event?.case === "issueUpdate"+ ) {+ const { toTitle, toDescription, toLabels, fromLabels } =+ issueComment.event.value;if (toTitle !== undefined ||toDescription !== undefined ||@@ -211,7 +221,10 @@ const icon = computed((): ActionIconType => {return "update";}// Otherwise, show avatar icon based on the creator.- } else if (issueComment.type === IssueCommentType.TASK_PRIOR_BACKUP && issueComment.event?.case === "taskPriorBackup") {+ } else if (+ issueComment.type === IssueCommentType.TASK_PRIOR_BACKUP &&+ issueComment.event?.case === "taskPriorBackup"+ ) {const taskPriorBackup = issueComment.event.value;if (taskPriorBackup.error !== "") {return "fail";diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vueindex d86c2a158c..2f61ceaa80 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/ActionSentence.vue@@ -35,7 +35,10 @@ const userStore = useUserStore();const renderActionSentence = () => {const { issueComment, issue } = props;- if (issueComment.type === IssueCommentType.APPROVAL && issueComment.event?.case === "approval") {+ if (+ issueComment.type === IssueCommentType.APPROVAL &&+ issueComment.event?.case === "approval"+ ) {const { status } = issueComment.event.value;let verb = "";if (status === IssueComment_Approval_Status.APPROVED) {@@ -48,7 +51,10 @@ const renderActionSentence = () => {if (verb) {return maybeAutomaticallyVerb(issueComment, verb);}- } else if (issueComment.type === IssueCommentType.ISSUE_UPDATE && issueComment.event?.case === "issueUpdate") {+ } else if (+ issueComment.type === IssueCommentType.ISSUE_UPDATE &&+ issueComment.event?.case === "issueUpdate"+ ) {const {fromTitle,toTitle,@@ -79,7 +85,10 @@ const renderActionSentence = () => {} else if (fromLabels.length !== 0 || toLabels.length !== 0) {return t("activity.sentence.changed-labels");}- } else if (issueComment.type === IssueCommentType.STAGE_END && issueComment.event?.case === "stageEnd") {+ } else if (+ issueComment.type === IssueCommentType.STAGE_END &&+ issueComment.event?.case === "stageEnd"+ ) {const { stage } = issueComment.event.value;const stageEntity = findStageByName(issue.rolloutEntity, stage);const params: VerbTypeTarget = {@@ -89,7 +98,10 @@ const renderActionSentence = () => {verb: t("activity.sentence.completed"),};return renderVerbTypeTarget(params);- } else if (issueComment.type === IssueCommentType.TASK_UPDATE && issueComment.event?.case === "taskUpdate") {+ } else if (+ issueComment.type === IssueCommentType.TASK_UPDATE &&+ issueComment.event?.case === "taskUpdate"+ ) {const { tasks, fromSheet, toSheet, toStatus } = issueComment.event.value;if (toStatus !== undefined) {@@ -149,8 +161,12 @@ const renderActionSentence = () => {</Translation>);}- } else if (issueComment.type === IssueCommentType.TASK_PRIOR_BACKUP && issueComment.event?.case === "taskPriorBackup") {- const { task, tables, originalLine, database, error } = issueComment.event.value;+ } else if (+ issueComment.type === IssueCommentType.TASK_PRIOR_BACKUP &&+ issueComment.event?.case === "taskPriorBackup"+ ) {+ const { task, tables, originalLine, database, error } =+ issueComment.event.value;if (error) {return t("activity.sentence.failed-to-backup", { error });}diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vueindex 52a7a2c30f..b2f2a9e88d 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue@@ -27,7 +27,9 @@><span class="opacity-80">({{ $t("common.edited") }}</span><HumanizeTs- :ts="getTimeForPbTimestampProtoEs(issueComment.updateTime, 0) / 1000"+ :ts="+ getTimeForPbTimestampProtoEs(issueComment.updateTime, 0) / 1000+ "class="ml-1"/>)</span>diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/TaskName.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/TaskName.vueindex bbf60687da..15721cae9b 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/TaskName.vue+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/TaskName.vue@@ -20,6 +20,7 @@<script lang="ts" setup>import scrollIntoView from "scroll-into-view-if-needed";import { computed } from "vue";+import type { LocationQueryRaw } from "vue-router";import { stageForTask, projectOfIssue } from "@/components/IssueV1/logic";import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";import type { ComposedIssue } from "@/types";@@ -32,7 +33,6 @@ import {extractTaskUID,issueV1Slug,} from "@/utils";-import type { LocationQueryRaw } from "vue-router";const props = defineProps<{issue: ComposedIssue;diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/common.ts b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/common.tsindex 7f6faf33a1..282bd445de 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/common.ts+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/common.ts@@ -15,7 +15,8 @@ export const isSimilarIssueComment = (}if (a.type === IssueCommentType.TASK_UPDATE) {- const fromTaskUpdate = a.event?.case === "taskUpdate" ? a.event.value : null;+ const fromTaskUpdate =+ a.event?.case === "taskUpdate" ? a.event.value : null;const toTaskUpdate = b.event?.case === "taskUpdate" ? b.event.value : null;if (!fromTaskUpdate || !toTaskUpdate) {return false;diff --git a/frontend/src/components/IssueV1/components/IssueStatusIcon.vue b/frontend/src/components/IssueV1/components/IssueStatusIcon.vueindex 0618840f73..f14ff040d8 100644--- a/frontend/src/components/IssueV1/components/IssueStatusIcon.vue+++ b/frontend/src/components/IssueV1/components/IssueStatusIcon.vue@@ -47,9 +47,7 @@{{isUnfinishedResolvedIssue? $t("issue.unfinished-resolved-issue-tips")- : $t(- `issue.status.${IssueStatus[props.issueStatus].toLowerCase()}`- )+ : $t(`issue.status.${IssueStatus[props.issueStatus].toLowerCase()}`)}}</div></template>diff --git a/frontend/src/components/IssueV1/components/Panel/BatchIssueStatusActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/BatchIssueStatusActionPanel.vueindex dee9acfdd2..f426e1c514 100644--- a/frontend/src/components/IssueV1/components/Panel/BatchIssueStatusActionPanel.vue+++ b/frontend/src/components/IssueV1/components/Panel/BatchIssueStatusActionPanel.vue@@ -59,6 +59,7 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { NButton, NInput } from "naive-ui";import { computed, reactive, ref } from "vue";import { useI18n } from "vue-i18n";@@ -68,11 +69,10 @@ import {issueStatusActionDisplayName,IssueStatusActionToIssueStatusMap,} from "@/components/IssueV1/logic";-import { create } from "@bufbuild/protobuf";import { issueServiceClientConnect } from "@/grpcweb";import { pushNotification } from "@/store";-import { BatchUpdateIssuesStatusRequestSchema } from "@/types/proto-es/v1/issue_service_pb";import type { ComposedIssue } from "@/types";+import { BatchUpdateIssuesStatusRequestSchema } from "@/types/proto-es/v1/issue_service_pb";import CommonDrawer from "./CommonDrawer.vue";type LocalState = {diff --git a/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue b/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vueindex 528893dddb..8b006fadcd 100644--- a/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue+++ b/frontend/src/components/IssueV1/components/Panel/IssueStatusActionPanel.vue@@ -89,6 +89,7 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { NButton, NCheckbox, NInput, NTooltip } from "naive-ui";import { computed, reactive, ref } from "vue";import { useI18n } from "vue-i18n";@@ -99,12 +100,11 @@ import {issueStatusActionDisplayName,IssueStatusActionToIssueStatusMap,} from "@/components/IssueV1/logic";-import { create } from "@bufbuild/protobuf";import ErrorList from "@/components/misc/ErrorList.vue";import { issueServiceClientConnect } from "@/grpcweb";import { pushNotification } from "@/store";-import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { BatchUpdateIssuesStatusRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { flattenTaskV1List } from "@/utils";import CommonDrawer from "./CommonDrawer.vue";diff --git a/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/TaskRollbackButton.vue b/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/TaskRollbackButton.vueindex bcfaf284e4..86c96479a7 100644--- a/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/TaskRollbackButton.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/TaskRollbackButton.vue@@ -8,27 +8,32 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { Undo2Icon } from "lucide-vue-next";import { NButton } from "naive-ui";import { v4 as uuidv4 } from "uuid";import { computed, ref } from "vue";-import { create } from "@bufbuild/protobuf";-import { PreviewTaskRunRollbackRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import { useRouter } from "vue-router";+import type { LocationQueryRaw } from "vue-router";import {latestTaskRunForTask,useIssueContext,} from "@/components/IssueV1/logic";import { rolloutServiceClientConnect } from "@/grpcweb";import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";-import { pushNotification, useSheetV1Store, useStorageStore, useCurrentProjectV1 } from "@/store";+import {+ pushNotification,+ useSheetV1Store,+ useStorageStore,+ useCurrentProjectV1,+} from "@/store";+import { PreviewTaskRunRollbackRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import {extractIssueUID,extractProjectResourceName,hasProjectPermissionV2,sheetNameOfTaskV1,} from "@/utils";-import type { LocationQueryRaw } from "vue-router";const router = useRouter();const { issue, selectedTask } = useIssueContext();@@ -67,7 +72,8 @@ const createRestoreIssue = async () => {const request = create(PreviewTaskRunRollbackRequestSchema, {name: latestTaskRun.value.name,});- const response = await rolloutServiceClientConnect.previewTaskRunRollback(request);+ const response =+ await rolloutServiceClientConnect.previewTaskRunRollback(request);const { statement } = response;isLoading.value = false;diff --git a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vueindex 938e9f553d..dd61bb0be7 100644--- a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue@@ -74,9 +74,9 @@ import { ApprovalFlowSection } from "@/components/Plan/components/IssueReviewVieimport { issueServiceClientConnect } from "@/grpcweb";import { pushNotification, useCurrentProjectV1 } from "@/store";import { UpdateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { IssueSchema } from "@/types/proto-es/v1/issue_service_pb";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { specForTask, useIssueContext } from "../../logic";import IssueLabels from "./IssueLabels.vue";import PreBackupSection from "./PreBackupSection";diff --git a/frontend/src/components/IssueV1/components/Sidebar/TaskCheckSummarySection/AffectedRowsView.vue b/frontend/src/components/IssueV1/components/Sidebar/TaskCheckSummarySection/AffectedRowsView.vueindex 6583927b01..bd386b52bb 100644--- a/frontend/src/components/IssueV1/components/Sidebar/TaskCheckSummarySection/AffectedRowsView.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/TaskCheckSummarySection/AffectedRowsView.vue@@ -62,21 +62,20 @@ const affectedTaskMap = computed(() => {props.taskSummaryReportMap.forEach((planCheckRun, task) => {if (planCheckRun.results.every(- (result) => result.report?.case !== "sqlSummaryReport" || result.report.value.affectedRows === undefined+ (result) =>+ result.report?.case !== "sqlSummaryReport" ||+ result.report.value.affectedRows === undefined)) {return;}- const count = planCheckRun.results.reduce(- (acc, result) => {- if (result.report?.case === "sqlSummaryReport") {- return acc + (result.report.value.affectedRows || 0);- }- return acc;- },- 0- );+ const count = planCheckRun.results.reduce((acc, result) => {+ if (result.report?.case === "sqlSummaryReport") {+ return acc + (result.report.value.affectedRows || 0);+ }+ return acc;+ }, 0);tempMap.set(task, count);});return new Map(Array.from(tempMap.entries()).sort((a, b) => b[1] - a[1]));@@ -96,20 +95,19 @@ const summaryReportResults = computed(() =>);const affectedRows = computed(() =>- summaryReportResults.value.reduce(- (acc, result) => {- if (result.report?.case === "sqlSummaryReport") {- return acc + (result.report.value.affectedRows || 0);- }- return acc;- },- 0- )+ summaryReportResults.value.reduce((acc, result) => {+ if (result.report?.case === "sqlSummaryReport") {+ return acc + (result.report.value.affectedRows || 0);+ }+ return acc;+ }, 0));const shouldShow = computed(() =>summaryReportResults.value.some(- (result) => result.report?.case === "sqlSummaryReport" && result.report.value.affectedRows !== undefined+ (result) =>+ result.report?.case === "sqlSummaryReport" &&+ result.report.value.affectedRows !== undefined));diff --git a/frontend/src/components/IssueV1/components/StageSection/StageSection.vue b/frontend/src/components/IssueV1/components/StageSection/StageSection.vueindex bc801816e2..c1b2002857 100644--- a/frontend/src/components/IssueV1/components/StageSection/StageSection.vue+++ b/frontend/src/components/IssueV1/components/StageSection/StageSection.vue@@ -55,8 +55,8 @@ import { NScrollbar, NEmpty } from "naive-ui";import { computed } from "vue";import { useIssueContext } from "@/components/IssueV1/logic";import NoPermissionPlaceholder from "@/components/misc/NoPermissionPlaceholder.vue";-import { hasProjectPermissionV2 } from "@/utils";import { useCurrentProjectV1 } from "@/store";+import { hasProjectPermissionV2 } from "@/utils";import StageCard from "./StageCard.vue";const { isCreating, issue } = useIssueContext();diff --git a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vueindex 321a6abf05..ac5857a5f4 100644--- a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue+++ b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue@@ -206,10 +206,10 @@ import {} from "@/store";import type { SQLDialect } from "@/types";import { dialectOfEngineV1 } from "@/types";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";import type { Advice } from "@/types/proto-es/v1/sql_service_pb";-import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import { databaseForTask } from "@/utils";import {flattenTaskV1List,@@ -283,7 +283,9 @@ const allowEditStatementWhenCreating = computed(() => {if ((issue.value.planEntity?.specs?.filter(- (spec) => spec.config?.case === "changeDatabaseConfig" && spec.config.value.release+ (spec) =>+ spec.config?.case === "changeDatabaseConfig" &&+ spec.config.value.release) ?? []).length > 0) {@@ -341,7 +343,9 @@ const shouldShowEditButton = computed(() => {if ((issue.value.planEntity?.specs?.filter(- (spec) => spec.config?.case === "changeDatabaseConfig" && spec.config.value.release+ (spec) =>+ spec.config?.case === "changeDatabaseConfig" &&+ spec.config.value.release) ?? []).length > 0) {diff --git a/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts b/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.tsindex 753ae385de..31fe5b3b88 100644--- a/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts+++ b/frontend/src/components/IssueV1/components/StatementSection/useSQLAdviceMarkers.ts@@ -64,9 +64,14 @@ const getLatestAdviceOptions = (planCheckRunList: PlanCheckRun[]) => {result.status === PlanCheckRun_Result_Status.ERROR ||result.status === PlanCheckRun_Result_Status.WARNING)- .filter((result) => result.report?.case === "sqlReviewReport" && result.report.value.line !== undefined)+ .filter(+ (result) =>+ result.report?.case === "sqlReviewReport" &&+ result.report.value.line !== undefined+ ).map<AdviceOption>((result) => {- const sqlReviewReport = result.report?.case === "sqlReviewReport" ? result.report.value : null;+ const sqlReviewReport =+ result.report?.case === "sqlReviewReport" ? result.report.value : null;const line = sqlReviewReport?.line ?? 0;const column = sqlReviewReport?.column ?? Number.MAX_SAFE_INTEGER;const code = result.code;diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vueindex d2d6125c87..7d90c37290 100644--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue@@ -87,7 +87,9 @@ const schemaVersion = computed(() => {if ((issue.value.planEntity?.specs?.filter(- (spec) => spec.config?.case === "changeDatabaseConfig" && spec.config.value?.release+ (spec) =>+ spec.config?.case === "changeDatabaseConfig" &&+ spec.config.value?.release) ?? []).length > 0) {diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vueindex efd3302504..950496b772 100644--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue@@ -68,8 +68,8 @@ import { usePlanSQLCheckContext } from "@/components/Plan/components/SQLCheckSecimport { useVerticalScrollState } from "@/composables/useScrollState";import { batchGetOrFetchDatabases, useCurrentProjectV1 } from "@/store";import { DEBOUNCE_SEARCH_DELAY } from "@/types";-import type { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";import type { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";+import type { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";import { databaseForTask } from "@/utils";import { isDev } from "@/utils";import { useIssueContext } from "../../logic";diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vueindex 6e938f8360..00a508c948 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunComment.vue@@ -37,7 +37,10 @@ import {getTimeForPbTimestampProtoEs,getDateForPbTimestampProtoEs,} from "@/types";-import { TaskRun_Status, Task_Type } from "@/types/proto-es/v1/rollout_service_pb";+import {+ TaskRun_Status,+ Task_Type,+} from "@/types/proto-es/v1/rollout_service_pb";import { isPostgresFamily } from "@/types/v1/instance";import { databaseForTask } from "@/utils";import { databaseV1Url, extractTaskUID, flattenTaskV1List } from "@/utils";diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunDetail.vueindex 95c8e7c9f4..b47328cc05 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue@@ -30,7 +30,10 @@ import { computed, reactive, ref, watch } from "vue";import { useSheetV1Store } from "@/store";import { Engine } from "@/types/proto-es/v1/common_pb";import type { Database } from "@/types/proto-es/v1/database_service_pb";-import { TaskRun_Status, type TaskRun } from "@/types/proto-es/v1/rollout_service_pb";+import {+ TaskRun_Status,+ type TaskRun,+} from "@/types/proto-es/v1/rollout_service_pb";import TaskRunLogTable from "./TaskRunLogTable";import TaskRunSession from "./TaskRunSession";diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/AffectedRowsCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/AffectedRowsCell.vueindex 7f8fbb170f..4fe7d38be8 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/AffectedRowsCell.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/AffectedRowsCell.vue@@ -1,6 +1,10 @@<template><span v-if="!isNaN(affectedRows)">- {{ $t("issue.task-run.task-run-log.estimated-affected-rows-n", { n: affectedRows }) }}+ {{+ $t("issue.task-run.task-run-log.estimated-affected-rows-n", {+ n: affectedRows,+ })+ }}</span><span v-else class="text-control-placeholder">-</span></template>diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vueindex 1722e5c2b5..e2e1ba9c94 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue@@ -24,9 +24,9 @@ import AffectedRowsCell from "./AffectedRowsCell.vue";import DatabaseSyncCell from "./DatabaseSyncCell.vue";import ErrorCell from "./ErrorCell.vue";import PriorBackupCell from "./PriorBackupCell.vue";+import RetryInfoCell from "./RetryInfoCell.vue";import StatusUpdateCell from "./StatusUpdateCell.vue";import TransactionControlCell from "./TransactionControlCell.vue";-import RetryInfoCell from "./RetryInfoCell.vue";type View =| "N/A"@@ -51,7 +51,7 @@ const view = computed((): View => {transactionControl,databaseSync,priorBackup,- retryInfo,+ retryInfo,} = props.entry;if (type === TaskRunLogEntry_Type.COMMAND_EXECUTE && commandExecute) {if (!commandExecute.raw.response) {diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/RetryInfoCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/RetryInfoCell.vueindex 1cbfe84d90..513f9ea141 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/RetryInfoCell.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/RetryInfoCell.vue@@ -1,6 +1,11 @@<template><span v-if="!isNaN(retryCount) && !isNaN(maxRetries)">- {{ $t("issue.task-run.task-run-log.retry-info", { n: retryCount, m: maxRetries }) }}+ {{+ $t("issue.task-run.task-run-log.retry-info", {+ n: retryCount,+ m: maxRetries,+ })+ }}</span><span v-else class="text-control-placeholder">-</span></template>@@ -17,7 +22,10 @@ const props = defineProps<{const { retryCount, maxRetries } = computed(() => {const { type, retryInfo } = props.entry;if (type === TaskRunLogEntry_Type.RETRY_INFO && retryInfo) {- return { retryCount: retryInfo.retryCount, maxRetries: retryInfo.maximumRetries };+ return {+ retryCount: retryInfo.retryCount,+ maxRetries: retryInfo.maximumRetries,+ };}return { retryCount: Number.NaN, maxRetries: Number.NaN };}).value;diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DurationCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DurationCell.vueindex 8f9d2ee301..3c16412382 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DurationCell.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DurationCell.vue@@ -22,12 +22,12 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";+import { DurationSchema } from "@bufbuild/protobuf/wkt";import { NTooltip } from "naive-ui";import { computed } from "vue";-import { DurationSchema } from "@bufbuild/protobuf/wkt";import { humanizeDurationV1 } from "@/utils";import type { FlattenLogEntry } from "./common";-import { create } from "@bufbuild/protobuf";const props = defineProps<{entry: FlattenLogEntry;@@ -37,7 +37,7 @@ const toDuration = (startTime: Date, endTime: Date) => {const ms = endTime.getTime() - startTime.getTime();const seconds = Math.floor(ms / 1000);const nanos = (ms % 1000) * 1e6;- return create(DurationSchema,{+ return create(DurationSchema, {seconds: BigInt(seconds),nanos,});diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/LogTimeCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/LogTimeCell.vueindex 9809d21d22..e40cdfe3a7 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/LogTimeCell.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/LogTimeCell.vue@@ -1,6 +1,10 @@<template><div class="text-sm">- <HumanizeDate v-if="logTime" :date="logTime" format="YYYY-MM-DD HH:mm:ss.SSS UTCZZ" />+ <HumanizeDate+ v-if="logTime"+ :date="logTime"+ format="YYYY-MM-DD HH:mm:ss.SSS UTCZZ"+ /><div v-else class="text-control-placeholder">-</div></div></template>diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/TaskRunLogTable.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/TaskRunLogTable.vueindex a18ffc443a..4b764dc602 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/TaskRunLogTable.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/TaskRunLogTable.vue@@ -9,15 +9,15 @@</template><script setup lang="tsx">+import { create } from "@bufbuild/protobuf";import { computedAsync } from "@vueuse/core";import { last } from "lodash-es";import { CircleAlertIcon } from "lucide-vue-next";import { NTooltip, NDataTable, type DataTableColumn } from "naive-ui";import { computed, ref } from "vue";-import { create } from "@bufbuild/protobuf";-import { GetTaskRunLogRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import { useI18n } from "vue-i18n";import { rolloutServiceClientConnect } from "@/grpcweb";+import { GetTaskRunLogRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import {type TaskRun,TaskRunLogEntry_Type,diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSection.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSection.vueindex 8fdb77ea0f..c77aa8efbb 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSection.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSection.vue@@ -5,14 +5,14 @@</template><script lang="ts" setup>-import { computed, watchEffect } from "vue";import { create } from "@bufbuild/protobuf";-import { GetTaskRunLogRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";+import { computed, watchEffect } from "vue";import {useIssueContext,taskRunListForTask,} from "@/components/IssueV1/logic";import { rolloutServiceClientConnect } from "@/grpcweb";+import { GetTaskRunLogRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import { TaskRun_Status } from "@/types/proto-es/v1/rollout_service_pb";import TaskRunTable from "./TaskRunTable.vue";diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSession/PostgresSessionTable.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSession/PostgresSessionTable.vueindex 355270d381..78d21d0ef9 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSession/PostgresSessionTable.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSession/PostgresSessionTable.vue@@ -171,7 +171,9 @@ const columns = computed(() => {title: () => "backend_start",width: 120,render: (session) => {- return <TimeCell date={getDateForPbTimestampProtoEs(session.backendStart)} />;+ return (+ <TimeCell date={getDateForPbTimestampProtoEs(session.backendStart)} />+ );},},{@@ -179,7 +181,9 @@ const columns = computed(() => {title: () => "xact_start",width: 120,render: (session) => {- return <TimeCell date={getDateForPbTimestampProtoEs(session.xactStart)} />;+ return (+ <TimeCell date={getDateForPbTimestampProtoEs(session.xactStart)} />+ );},},{@@ -187,7 +191,9 @@ const columns = computed(() => {title: () => "query_start",width: 120,render: (session) => {- return <TimeCell date={getDateForPbTimestampProtoEs(session.queryStart)} />;+ return (+ <TimeCell date={getDateForPbTimestampProtoEs(session.queryStart)} />+ );},},];diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSession/TaskRunSession.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSession/TaskRunSession.vueindex 458a176493..1aef01dc4b 100644--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSession/TaskRunSession.vue+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunSession/TaskRunSession.vue@@ -15,15 +15,18 @@</template><script setup lang="tsx">-import { computedAsync } from "@vueuse/core";-import { computed, ref } from "vue";import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { silentContextKey } from "@/grpcweb/context-key";-import { GetTaskRunSessionRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";+import { computedAsync } from "@vueuse/core";+import { computed, ref } from "vue";import { BBSpin } from "@/bbkit";import { rolloutServiceClientConnect } from "@/grpcweb";-import { TaskRun_Status, type TaskRun } from "@/types/proto-es/v1/rollout_service_pb";+import { silentContextKey } from "@/grpcweb/context-key";+import { GetTaskRunSessionRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";+import {+ TaskRun_Status,+ type TaskRun,+} from "@/types/proto-es/v1/rollout_service_pb";import PostgresSessionTable from "./PostgresSessionTable.vue";const props = defineProps<{diff --git a/frontend/src/components/IssueV1/components/TaskStatusIcon.vue b/frontend/src/components/IssueV1/components/TaskStatusIcon.vueindex 96e8e664f6..8ef8cb1885 100644--- a/frontend/src/components/IssueV1/components/TaskStatusIcon.vue+++ b/frontend/src/components/IssueV1/components/TaskStatusIcon.vue@@ -60,10 +60,10 @@ import { computed } from "vue";import { SkipIcon } from "@/components/Icon";import { usePlanSQLCheckContext } from "@/components/Plan/components/SQLCheckSection/context";import { useCurrentProjectV1 } from "@/store";-import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";import { PlanCheckRun_Result_Status } from "@/types/proto-es/v1/plan_service_pb";import type { Task } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";+import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";import { databaseForTask } from "@/utils";import { planCheckStatusForTask, useIssueContext } from "../logic";diff --git a/frontend/src/components/IssueV1/logic/action/task.ts b/frontend/src/components/IssueV1/logic/action/task.tsindex 064b8c8f22..b97e1b4b03 100644--- a/frontend/src/components/IssueV1/logic/action/task.ts+++ b/frontend/src/components/IssueV1/logic/action/task.ts@@ -1,3 +1,5 @@+import { head } from "lodash-es";+import type { ButtonProps } from "naive-ui";import { t } from "@/plugins/i18n";import { useCurrentUserV1 } from "@/store";import { userNamePrefix } from "@/store/modules/v1/common";@@ -10,8 +12,6 @@ import {hasWorkspacePermissionV2,isUserIncludedInList,} from "@/utils";-import { head } from "lodash-es";-import type { ButtonProps } from "naive-ui";import { projectOfIssue } from "../utils";export type TaskRolloutAction =diff --git a/frontend/src/components/IssueV1/logic/base.ts b/frontend/src/components/IssueV1/logic/base.tsindex 7eead979b5..291c956d6c 100644--- a/frontend/src/components/IssueV1/logic/base.ts+++ b/frontend/src/components/IssueV1/logic/base.ts@@ -63,7 +63,9 @@ export const useBaseIssueContext = (const taskUID = String(uidFromSlug(taskSlug));for (const stage of stageList) {if (- stage.tasks.findIndex((task) => extractTaskUID(task.name) === taskUID) >= 0+ stage.tasks.findIndex(+ (task) => extractTaskUID(task.name) === taskUID+ ) >= 0) {return stage;}diff --git a/frontend/src/components/IssueV1/logic/initialize/create.ts b/frontend/src/components/IssueV1/logic/initialize/create.tsindex a968fc4d2a..e359d0eb1d 100644--- a/frontend/src/components/IssueV1/logic/initialize/create.ts+++ b/frontend/src/components/IssueV1/logic/initialize/create.ts@@ -1,10 +1,12 @@+import { create } from "@bufbuild/protobuf";+import { reactive } from "vue";+import { useRoute } from "vue-router";import {buildPlan,extractInitialSQLFromQuery,getLocalSheetByName,type CreatePlanParams,} from "@/components/Plan";-import { create } from "@bufbuild/protobuf";import { rolloutServiceClientConnect } from "@/grpcweb";import { useCurrentUserV1, useProjectV1Store, useSheetV1Store } from "@/store";import { projectNamePrefix } from "@/store/modules/v1/common";@@ -23,8 +25,6 @@ import {sheetNameOfTaskV1,extractEnvironmentResourceName,} from "@/utils";-import { reactive } from "vue";-import { useRoute } from "vue-router";import { nextUID } from "../base";export const createIssueSkeleton = async (diff --git a/frontend/src/components/IssueV1/logic/plan-check.ts b/frontend/src/components/IssueV1/logic/plan-check.tsindex a5d2bd2aba..4de4454d5e 100644--- a/frontend/src/components/IssueV1/logic/plan-check.ts+++ b/frontend/src/components/IssueV1/logic/plan-check.ts@@ -49,7 +49,10 @@ export const planCheckStatusForTask = (task: Task) => {export const planCheckRunSummaryForIssue = (issue: ComposedIssue) => {const sheets = issue.planEntity?.specs.reduce((acc, spec) => {- if (spec.config?.case === "changeDatabaseConfig" && spec.config.value.sheet) {+ if (+ spec.config?.case === "changeDatabaseConfig" &&+ spec.config.value.sheet+ ) {acc.add(spec.config.value.sheet);}return acc;diff --git a/frontend/src/components/IssueV1/logic/rollout.ts b/frontend/src/components/IssueV1/logic/rollout.tsindex bbd24c68d8..c372c460f2 100644--- a/frontend/src/components/IssueV1/logic/rollout.ts+++ b/frontend/src/components/IssueV1/logic/rollout.ts@@ -4,10 +4,7 @@ import { extractUserId, useCurrentUserV1 } from "@/store";import type { ComposedIssue } from "@/types";import { Issue_Type, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import type { Task } from "@/types/proto-es/v1/rollout_service_pb";-import {- Task_Status,- Task_Type,-} from "@/types/proto-es/v1/rollout_service_pb";+import { Task_Status, Task_Type } from "@/types/proto-es/v1/rollout_service_pb";import { extractDatabaseGroupName, hasProjectPermissionV2 } from "@/utils";import { projectOfIssue, specForTask } from ".";@@ -16,9 +13,10 @@ export const isGroupingChangeTaskV1 = (issue: ComposedIssue, task: Task) => {if (!spec) {return false;}- const target = spec.config?.case === "changeDatabaseConfig"- ? head(spec.config.value.targets)- : undefined;+ const target =+ spec.config?.case === "changeDatabaseConfig"+ ? head(spec.config.value.targets)+ : undefined;const databaseGroup = extractDatabaseGroupName(target ?? "");return databaseGroup !== "";};diff --git a/frontend/src/components/IssueV1/logic/utils.ts b/frontend/src/components/IssueV1/logic/utils.tsindex 283dd5fb38..251616be08 100644--- a/frontend/src/components/IssueV1/logic/utils.ts+++ b/frontend/src/components/IssueV1/logic/utils.ts@@ -1,3 +1,6 @@+import { create } from "@bufbuild/protobuf";+import { NButton } from "naive-ui";+import { h } from "vue";import { t } from "@/plugins/i18n";import {useDatabaseV1Store,@@ -14,7 +17,6 @@ import {unknownInstance,} from "@/types";import { State } from "@/types/proto-es/v1/common_pb";-import { create } from "@bufbuild/protobuf";import { InstanceResourceSchema } from "@/types/proto-es/v1/instance_service_pb";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";@@ -26,8 +28,6 @@ import {flattenTaskV1List,isValidIssueName,} from "@/utils";-import { NButton } from "naive-ui";-import { h } from "vue";import type { IssueContext } from "./context";export const projectOfIssue = (issue: ComposedIssue): ComposedProject =>@@ -112,7 +112,8 @@ export const extractCoreDatabaseInfoFromDatabaseCreateTask = (}const environmentStore = useEnvironmentV1Store();- const { instance: instanceFromStore } = useInstanceResourceByName(instanceName);+ const { instance: instanceFromStore } =+ useInstanceResourceByName(instanceName);// Create InstanceResource from the instance dataconst instanceData = instanceFromStore.value;const instanceResource = create(InstanceResourceSchema, {@@ -135,7 +136,8 @@ export const extractCoreDatabaseInfoFromDatabaseCreateTask = (project: project.name,projectEntity: project,effectiveEnvironment: instanceResource.environment,- effectiveEnvironmentEntity: effectiveEnvironmentEntity ?? unknownEnvironment(),+ effectiveEnvironmentEntity:+ effectiveEnvironmentEntity ?? unknownEnvironment(),instanceResource,};};diff --git a/frontend/src/components/Member/utils.ts b/frontend/src/components/Member/utils.tsindex f4aa159d25..fe3450d18d 100644--- a/frontend/src/components/Member/utils.ts+++ b/frontend/src/components/Member/utils.ts@@ -1,3 +1,4 @@+import { create } from "@bufbuild/protobuf";import { extractGroupEmail, useGroupStore, useUserStore } from "@/store";import {extractUserId,@@ -10,10 +11,9 @@ import {groupBindingPrefix,} from "@/types";import { State } from "@/types/proto-es/v1/common_pb";-import { create } from "@bufbuild/protobuf";import { GroupSchema } from "@/types/proto-es/v1/group_service_pb";-import { UserSchema } from "@/types/proto-es/v1/user_service_pb";import type { IamPolicy } from "@/types/proto-es/v1/iam_policy_pb";+import { UserSchema } from "@/types/proto-es/v1/user_service_pb";import type { User } from "@/types/proto-es/v1/user_service_pb";import { UserType } from "@/types/proto-es/v1/user_service_pb";import type { MemberBinding, GroupBinding } from "./types";diff --git a/frontend/src/components/Plan/components/AddSpecDrawer.vue b/frontend/src/components/Plan/components/AddSpecDrawer.vueindex c34364471c..a9ffdc7430 100644--- a/frontend/src/components/Plan/components/AddSpecDrawer.vue+++ b/frontend/src/components/Plan/components/AddSpecDrawer.vue@@ -10,9 +10,7 @@<div class="flex flex-col gap-y-4"><!-- Steps indicator --><NSteps :current="currentStep">- <NStep- :title="stepTitle"- />+ <NStep :title="stepTitle" /><NStep :title="$t('plan.select-targets')" /></NSteps>@@ -132,6 +130,7 @@</template><script setup lang="ts">+import { create as createProto } from "@bufbuild/protobuf";import { FileDiffIcon, EditIcon } from "lucide-vue-next";import { NButton, NRadio, NRadioGroup, NSteps, NStep } from "naive-ui";import { v4 as uuidv4 } from "uuid";@@ -143,12 +142,14 @@ import type { DatabaseSelectState } from "@/components/DatabaseAndGroupSelector"import { getLocalSheetByName, getNextLocalSheetUID } from "@/components/Plan";import { Drawer, DrawerContent } from "@/components/v2";import { useCurrentProjectV1 } from "@/store";-import { create as createProto } from "@bufbuild/protobuf";import {Plan_ChangeDatabaseConfig_Type,Plan_ChangeDatabaseConfigSchema,} from "@/types/proto-es/v1/plan_service_pb";-import { Plan_SpecSchema, type Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";+import {+ Plan_SpecSchema,+ type Plan_Spec,+} from "@/types/proto-es/v1/plan_service_pb";import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";defineProps<{@@ -163,7 +164,9 @@ const { project } = useCurrentProjectV1();const { t } = useI18n();const show = defineModel<boolean>("show", { default: false });-const selectedChangeType: Ref<Plan_ChangeDatabaseConfig_Type> = ref(Plan_ChangeDatabaseConfig_Type.MIGRATE);+const selectedChangeType: Ref<Plan_ChangeDatabaseConfig_Type> = ref(+ Plan_ChangeDatabaseConfig_Type.MIGRATE+);const isCreating = ref(false);const currentStep = ref(1);@@ -186,11 +189,11 @@ const canSubmit = computed(() => {const stepTitle = computed(() => {if (currentStep.value === 1) {- return t('plan.change-type');+ return t("plan.change-type");}return selectedChangeType.value === Plan_ChangeDatabaseConfig_Type.DATA- ? t('plan.data-change')- : t('plan.schema-migration');+ ? t("plan.data-change")+ : t("plan.schema-migration");});const isMigrateSelected = computed(() => {@@ -250,7 +253,9 @@ const handleConfirm = async () => {const sheet = createProto(SheetSchema, {...getLocalSheetByName(`${project.value.name}/sheets/${sheetUID}`),title:- selectedChangeType.value === Plan_ChangeDatabaseConfig_Type.MIGRATE ? "Schema Migration" : "Data Change",+ selectedChangeType.value === Plan_ChangeDatabaseConfig_Type.MIGRATE+ ? "Schema Migration"+ : "Data Change",});// Create specdiff --git a/frontend/src/components/Plan/components/ChecksView/ChecksView.vue b/frontend/src/components/Plan/components/ChecksView/ChecksView.vueindex 110cd5c740..948871cf65 100644--- a/frontend/src/components/Plan/components/ChecksView/ChecksView.vue+++ b/frontend/src/components/Plan/components/ChecksView/ChecksView.vue@@ -142,7 +142,8 @@</div><divv-if="- result.report?.case === 'sqlReviewReport' && result.report.value.line > 0+ result.report?.case === 'sqlReviewReport' &&+ result.report.value.line > 0"class="text-xs text-control-lighter mt-1">@@ -370,6 +371,8 @@ const getStatusLabel = (status: PlanCheckRun_Result_Status) => {const formatTime = (timestamp: any): string => {if (!timestamp) return "";- return humanizeTs(new Date(Number(timestamp.seconds) * 1000).getTime() / 1000);+ return humanizeTs(+ new Date(Number(timestamp.seconds) * 1000).getTime() / 1000+ );};</script>diff --git a/frontend/src/components/Plan/components/ChecksView/index.ts b/frontend/src/components/Plan/components/ChecksView/index.tsindex 9d5cc03838..9ce0fe3c54 100644--- a/frontend/src/components/Plan/components/ChecksView/index.ts+++ b/frontend/src/components/Plan/components/ChecksView/index.ts@@ -1 +1 @@-export { default as ChecksView } from "./ChecksView.vue";\ No newline at end of file+export { default as ChecksView } from "./ChecksView.vue";diff --git a/frontend/src/components/Plan/components/Configuration/GhostSection/GhostFlagsPanel.vue b/frontend/src/components/Plan/components/Configuration/GhostSection/GhostFlagsPanel.vueindex 5cf9780248..9ef470e6be 100644--- a/frontend/src/components/Plan/components/Configuration/GhostSection/GhostFlagsPanel.vue+++ b/frontend/src/components/Plan/components/Configuration/GhostSection/GhostFlagsPanel.vue@@ -36,6 +36,7 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { cloneDeep, isEqual } from "lodash-es";import { NButton, NTooltip } from "naive-ui";import { computed, ref, watch } from "vue";@@ -43,10 +44,9 @@ import { useI18n } from "vue-i18n";import LearnMoreLink from "@/components/LearnMoreLink.vue";import ErrorList from "@/components/misc/ErrorList.vue";import { Drawer, DrawerContent } from "@/components/v2";-import { create } from "@bufbuild/protobuf";import { planServiceClientConnect } from "@/grpcweb";-import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { pushNotification } from "@/store";+import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import FlagsForm from "./FlagsForm";import { useGhostSettingContext } from "./context";@@ -66,7 +66,9 @@ const title = computed(() => {return t("task.online-migration.configure-ghost-parameters");});const config = computed(() => {- return selectedSpec.value?.config?.case === "changeDatabaseConfig" ? selectedSpec.value.config.value : undefined;+ return selectedSpec.value?.config?.case === "changeDatabaseConfig"+ ? selectedSpec.value.config.value+ : undefined;});const flags = ref<Record<string, string>>({});@@ -97,7 +99,11 @@ const trySave = async () => {}if (isCreating.value) {- if (!selectedSpec.value || selectedSpec.value.config?.case !== "changeDatabaseConfig") return;+ if (+ !selectedSpec.value ||+ selectedSpec.value.config?.case !== "changeDatabaseConfig"+ )+ return;selectedSpec.value.config.value.ghostFlags = cloneDeep(flags.value);} else {const planPatch = cloneDeep(plan.value);diff --git a/frontend/src/components/Plan/components/Configuration/GhostSection/GhostSwitch.vue b/frontend/src/components/Plan/components/Configuration/GhostSection/GhostSwitch.vueindex 5350f01ff5..8851857fe9 100644--- a/frontend/src/components/Plan/components/Configuration/GhostSection/GhostSwitch.vue+++ b/frontend/src/components/Plan/components/Configuration/GhostSection/GhostSwitch.vue@@ -16,6 +16,7 @@</template><script setup lang="tsx">+import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";import { NSwitch, NTooltip } from "naive-ui";import { computed } from "vue";@@ -23,10 +24,9 @@ import { useI18n } from "vue-i18n";import { targetsForSpec } from "@/components/Plan/logic";import type { ErrorItem } from "@/components/misc/ErrorList.vue";import { default as ErrorList } from "@/components/misc/ErrorList.vue";-import { create } from "@bufbuild/protobuf";import { planServiceClientConnect } from "@/grpcweb";-import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { pushNotification } from "@/store";+import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { Plan_ChangeDatabaseConfig_Type } from "@/types/proto-es/v1/plan_service_pb";import { allowGhostForDatabase } from "./common";import { useGhostSettingContext } from "./context";@@ -128,7 +128,11 @@ const toggleChecked = async (on: boolean) => {}if (isCreating.value) {- if (!selectedSpec.value || selectedSpec.value.config?.case !== "changeDatabaseConfig") return;+ if (+ !selectedSpec.value ||+ selectedSpec.value.config?.case !== "changeDatabaseConfig"+ )+ return;selectedSpec.value.config.value.type = on? Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST: Plan_ChangeDatabaseConfig_Type.MIGRATE;diff --git a/frontend/src/components/Plan/components/Configuration/GhostSection/common.ts b/frontend/src/components/Plan/components/Configuration/GhostSection/common.tsindex d700ee9095..68684a9ad5 100644--- a/frontend/src/components/Plan/components/Configuration/GhostSection/common.ts+++ b/frontend/src/components/Plan/components/Configuration/GhostSection/common.ts@@ -32,7 +32,10 @@ export const allowGhostForDatabase = (database: ComposedDatabase) => {};export const allowGhostForSpec = (spec: Plan_Spec | undefined) => {- const config = spec?.config?.case === "changeDatabaseConfig" ? spec.config.value : undefined;+ const config =+ spec?.config?.case === "changeDatabaseConfig"+ ? spec.config.value+ : undefined;if (!config) return false;return [@@ -47,7 +50,10 @@ export const getGhostEnabledForSpec = (if (isDBGroupChangeSpec(spec)) {return undefined;}- const config = spec?.config?.case === "changeDatabaseConfig" ? spec.config.value : undefined;+ const config =+ spec?.config?.case === "changeDatabaseConfig"+ ? spec.config.value+ : undefined;if (!config) {return undefined;}diff --git a/frontend/src/components/Plan/components/Configuration/PreBackupSection/context.ts b/frontend/src/components/Plan/components/Configuration/PreBackupSection/context.tsindex 3f8575a4e0..420690f92d 100644--- a/frontend/src/components/Plan/components/Configuration/PreBackupSection/context.ts+++ b/frontend/src/components/Plan/components/Configuration/PreBackupSection/context.ts@@ -1,3 +1,4 @@+import { create } from "@bufbuild/protobuf";import Emittery from "emittery";import { cloneDeep } from "lodash-es";import {@@ -9,13 +10,12 @@ import {type Ref,} from "vue";import { isDatabaseChangeSpec, targetsForSpec } from "@/components/Plan/logic";-import { create } from "@bufbuild/protobuf";import { planServiceClientConnect } from "@/grpcweb";-import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { useCurrentUserV1, extractUserId, useDatabaseV1Store } from "@/store";import { isValidDatabaseName, type ComposedProject } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import { IssueStatus, type Issue } from "@/types/proto-es/v1/issue_service_pb";+import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import {Plan_ChangeDatabaseConfig_Type,type Plan,@@ -72,7 +72,8 @@ export const providePreBackupSettingContext = (refs: {if (!selectedSpec.value ||selectedSpec.value.config?.case !== "changeDatabaseConfig" ||- selectedSpec.value.config.value.type !== Plan_ChangeDatabaseConfig_Type.DATA+ selectedSpec.value.config.value.type !==+ Plan_ChangeDatabaseConfig_Type.DATA) {return false;}@@ -131,9 +132,7 @@ export const providePreBackupSettingContext = (refs: {});const enabled = computed((): boolean => {- if (- selectedSpec.value?.config?.case === "changeDatabaseConfig"- ) {+ if (selectedSpec.value?.config?.case === "changeDatabaseConfig") {return Boolean(selectedSpec.value.config.value.enablePriorBackup);}return false;diff --git a/frontend/src/components/Plan/components/DescriptionSection.vue b/frontend/src/components/Plan/components/DescriptionSection.vueindex dba4ff520f..817e1a16d0 100644--- a/frontend/src/components/Plan/components/DescriptionSection.vue+++ b/frontend/src/components/Plan/components/DescriptionSection.vue@@ -66,19 +66,19 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { NInput, NButton } from "naive-ui";import { computed, nextTick, reactive, ref, watch } from "vue";import { useI18n } from "vue-i18n";-import { create } from "@bufbuild/protobuf";import { useRenderMarkdown } from "@/components/MarkdownEditor";import { planServiceClientConnect } from "@/grpcweb";-import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import {pushNotification,useCurrentUserV1,extractUserId,useCurrentProjectV1,} from "@/store";+import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { PlanSchema } from "@/types/proto-es/v1/plan_service_pb";import { hasProjectPermissionV2 } from "@/utils";import { usePlanContext } from "../logic";diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vueindex 5b8d84babe..8db13967a2 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue@@ -116,7 +116,8 @@ const createSheets = async () => {for (let i = 0; i < specs.length; i++) {const spec = specs[i];- const config = spec.config?.case === "changeDatabaseConfig" ? spec.config.value : null;+ const config =+ spec.config?.case === "changeDatabaseConfig" ? spec.config.value : null;if (!config) continue;configWithSheetList.push(config);if (pendingCreateSheetMap.has(config.sheet)) continue;diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueCreationActionPanel.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueCreationActionPanel.vueindex f4dc2c35e1..33fa9c2168 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueCreationActionPanel.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueCreationActionPanel.vue@@ -82,10 +82,14 @@ import {usePolicyV1Store,} from "@/store";import { CreateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import {+ IssueSchema,+ IssueStatus,+ Issue_Type,+} from "@/types/proto-es/v1/issue_service_pb";import { PolicyType } from "@/types/proto-es/v1/org_policy_service_pb";-import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";-import { IssueSchema, IssueStatus, Issue_Type } from "@/types/proto-es/v1/issue_service_pb";import { PlanCheckRun_Result_Status } from "@/types/proto-es/v1/plan_service_pb";+import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import {extractProjectResourceName,hasProjectPermissionV2,diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueStatusActionPanel.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueStatusActionPanel.vueindex b1b4f81f38..e5026b60fe 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueStatusActionPanel.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueStatusActionPanel.vue@@ -54,18 +54,18 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { NButton, NInput } from "naive-ui";import { computed, reactive, ref } from "vue";import { useI18n } from "vue-i18n";import CommonDrawer from "@/components/IssueV1/components/Panel/CommonDrawer.vue";import { usePlanContextWithIssue } from "@/components/Plan/logic";-import { create } from "@bufbuild/protobuf";import { issueServiceClientConnect } from "@/grpcweb";import { useCurrentProjectV1 } from "@/store";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";-import {+import {BatchUpdateIssuesStatusRequestSchema,- IssueStatus as NewIssueStatus+ IssueStatus as NewIssueStatus,} from "@/types/proto-es/v1/issue_service_pb";import type { IssueStatusAction } from "../unified";@@ -115,8 +115,11 @@ const handleConfirm = async () => {throw new Error(`Unsupported action: ${action}`);}// Convert old enum to new enum (values match)- const newStatus = issueStatus === IssueStatus.OPEN ? NewIssueStatus.OPEN : NewIssueStatus.CANCELED;-+ const newStatus =+ issueStatus === IssueStatus.OPEN+ ? NewIssueStatus.OPEN+ : NewIssueStatus.CANCELED;+const request = create(BatchUpdateIssuesStatusRequestSchema, {parent: project.value.name,issues: [issue.value.name],diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/index.ts b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/index.tsindex 6fa7bee9b2..c37f772551 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/index.ts+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/index.ts@@ -1,3 +1,3 @@export { default as IssueReviewActionPanel } from "./IssueReviewActionPanel.vue";export { default as IssueStatusActionPanel } from "./IssueStatusActionPanel.vue";-export { default as IssueCreationActionPanel } from "./IssueCreationActionPanel.vue";\ No newline at end of file+export { default as IssueCreationActionPanel } from "./IssueCreationActionPanel.vue";diff --git a/frontend/src/components/Plan/components/HeaderSection/TitleInput.vue b/frontend/src/components/Plan/components/HeaderSection/TitleInput.vueindex ea5c5164e7..fb881c4295 100644--- a/frontend/src/components/Plan/components/HeaderSection/TitleInput.vue+++ b/frontend/src/components/Plan/components/HeaderSection/TitleInput.vue@@ -17,20 +17,23 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { NInput } from "naive-ui";import type { CSSProperties } from "vue";import { computed, reactive, watch } from "vue";import { useI18n } from "vue-i18n";-import { create } from "@bufbuild/protobuf";import { planServiceClientConnect, issueServiceClientConnect } from "@/grpcweb";-import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";-import { IssueSchema, UpdateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";import {pushNotification,useCurrentUserV1,extractUserId,useCurrentProjectV1,} from "@/store";+import {+ IssueSchema,+ UpdateIssueRequestSchema,+} from "@/types/proto-es/v1/issue_service_pb";+import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { PlanSchema } from "@/types/proto-es/v1/plan_service_pb";import { hasProjectPermissionV2 } from "@/utils";import { usePlanContext } from "../../logic";diff --git a/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/index.ts b/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/index.tsindex 70500baac7..5627692a1e 100644--- a/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/index.ts+++ b/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/index.ts@@ -1 +1 @@-export { default as ActivitySection } from "./ActivitySection.vue";\ No newline at end of file+export { default as ActivitySection } from "./ActivitySection.vue";diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vueindex c5de819d44..b756e3b4eb 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue@@ -58,8 +58,8 @@ import { computed, ref } from "vue";import { BBSpin } from "@/bbkit";import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";import { useIssueV1Store } from "@/store";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import ApprovalStepItem from "./ApprovalStepItem.vue";const props = defineProps<{diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vueindex a2482e6b73..794f9dbb99 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalStepItem.vue@@ -78,11 +78,9 @@ import { useI18n } from "vue-i18n";import { useCurrentUserV1, useUserStore, useCurrentProjectV1 } from "@/store";import { userNamePrefix } from "@/store/modules/v1/common";import { SYSTEM_BOT_EMAIL } from "@/types";-import { ApprovalNode_Type } from "@/types/proto-es/v1/issue_service_pb";import { State } from "@/types/proto-es/v1/common_pb";-import {- Issue_Approver_Status,-} from "@/types/proto-es/v1/issue_service_pb";+import { ApprovalNode_Type } from "@/types/proto-es/v1/issue_service_pb";+import { Issue_Approver_Status } from "@/types/proto-es/v1/issue_service_pb";import type {ApprovalStep,Issue,@@ -125,7 +123,8 @@ const status = computed((): "approved" | "rejected" | "current" | "pending" => {const prevApprover = props.issue.approvers[i];if (!prevApprover ||- (prevApprover.status !== Issue_Approver_Status.APPROVED && prevApprover.status !== Issue_Approver_Status.REJECTED)+ (prevApprover.status !== Issue_Approver_Status.APPROVED &&+ prevApprover.status !== Issue_Approver_Status.REJECTED)) {return "pending";}diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vueindex 3d00a83c1f..b8f0abf836 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue@@ -46,7 +46,10 @@ import {useCurrentProjectV1,useCurrentUserV1,} from "@/store";-import { UpdateIssueRequestSchema, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";+import {+ UpdateIssueRequestSchema,+ IssueStatus,+} from "@/types/proto-es/v1/issue_service_pb";import { hasProjectPermissionV2 } from "@/utils";import { usePlanContextWithIssue } from "../../../logic/context";import ApprovalFlowSection from "./ApprovalFlowSection/ApprovalFlowSection.vue";diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/index.ts b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/index.tsindex 836295309d..54aabdb28e 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/index.ts+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/index.ts@@ -1 +1 @@-export { default as Sidebar } from "./Sidebar.vue";\ No newline at end of file+export { default as Sidebar } from "./Sidebar.vue";diff --git a/frontend/src/components/Plan/components/RolloutView/StageCard.vue b/frontend/src/components/Plan/components/RolloutView/StageCard.vueindex b8067d6e5f..beacde8e47 100644--- a/frontend/src/components/Plan/components/RolloutView/StageCard.vue+++ b/frontend/src/components/Plan/components/RolloutView/StageCard.vue@@ -110,13 +110,8 @@ import {pushNotification,} from "@/store";import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";-import type {- Stage,- Task,-} from "@/types/proto-es/v1/rollout_service_pb";-import {- Task_Status,-} from "@/types/proto-es/v1/rollout_service_pb";+import type { Stage, Task } from "@/types/proto-es/v1/rollout_service_pb";+import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { extractProjectResourceName } from "@/utils";import { extractSchemaVersionFromTask } from "@/utils";import { usePlanContextWithRollout } from "../../logic";diff --git a/frontend/src/components/Plan/components/RolloutView/StagesView.vue b/frontend/src/components/Plan/components/RolloutView/StagesView.vueindex c68f245a56..91946f2bfb 100644--- a/frontend/src/components/Plan/components/RolloutView/StagesView.vue+++ b/frontend/src/components/Plan/components/RolloutView/StagesView.vue@@ -19,7 +19,10 @@</template><script setup lang="ts">-import type { Stage, Task_Status } from "@/types/proto-es/v1/rollout_service_pb";+import type {+ Stage,+ Task_Status,+} from "@/types/proto-es/v1/rollout_service_pb";import StageCard from "./StageCard.vue";defineProps<{diff --git a/frontend/src/components/Plan/components/RolloutView/TaskFilter.vue b/frontend/src/components/Plan/components/RolloutView/TaskFilter.vueindex 155bed7f1c..ea20141721 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskFilter.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskFilter.vue@@ -45,7 +45,10 @@ import { flatten } from "lodash-es";import { NTag } from "naive-ui";import { computed } from "vue";import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";-import type { Rollout, Task_Status } from "@/types/proto-es/v1/rollout_service_pb";+import type {+ Rollout,+ Task_Status,+} from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status as TaskStatusEnum } from "@/types/proto-es/v1/rollout_service_pb";import { stringifyTaskStatus } from "@/utils";import { useRolloutViewContext } from "./context";diff --git a/frontend/src/components/Plan/components/RolloutView/TaskOperations.vue b/frontend/src/components/Plan/components/RolloutView/TaskOperations.vueindex cff7fb32c1..adfa245a43 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskOperations.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskOperations.vue@@ -56,7 +56,11 @@ import { computed, h, reactive } from "vue";import { useI18n } from "vue-i18n";import { useCurrentProjectV1 } from "@/store";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";-import type { Task, Rollout, Stage } from "@/types/proto-es/v1/rollout_service_pb";+import type {+ Task,+ Rollout,+ Stage,+} from "@/types/proto-es/v1/rollout_service_pb";import { usePlanContext } from "../../logic";import TaskRolloutActionPanel from "./TaskRolloutActionPanel.vue";import { useTaskActionPermissions } from "./taskPermissions";diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue b/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vueindex 9eea5fefb3..288cda2ba6 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue@@ -223,13 +223,17 @@ import CommonDrawer from "@/components/IssueV1/components/Panel/CommonDrawer.vueimport { ErrorList } from "@/components/IssueV1/components/common";import { rolloutServiceClientConnect } from "@/grpcweb";import { pushNotification, useEnvironmentV1Store } from "@/store";+import { Issue_Approver_Status } from "@/types/proto-es/v1/issue_service_pb";import {BatchRunTasksRequestSchema,BatchSkipTasksRequestSchema,BatchCancelTaskRunsRequestSchema,} from "@/types/proto-es/v1/rollout_service_pb";-import { Issue_Approver_Status } from "@/types/proto-es/v1/issue_service_pb";-import type { Stage, Task, TaskRun } from "@/types/proto-es/v1/rollout_service_pb";+import type {+ Stage,+ Task,+ TaskRun,+} from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { usePlanContext } from "../../logic";import { useIssueReviewContext } from "../../logic/issue-review";diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRunComment.vue b/frontend/src/components/Plan/components/RolloutView/TaskRunComment.vueindex 9082779b09..49338aad46 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskRunComment.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskRunComment.vue@@ -28,7 +28,10 @@import { NEllipsis } from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";-import { getTimeForPbTimestampProtoEs, getDateForPbTimestampProtoEs } from "@/types";+import {+ getTimeForPbTimestampProtoEs,+ getDateForPbTimestampProtoEs,+} from "@/types";import type { TaskRun } from "@/types/proto-es/v1/rollout_service_pb";import { TaskRun_Status } from "@/types/proto-es/v1/rollout_service_pb";@@ -103,9 +106,10 @@ const commentLink = computed((): CommentLink => {taskRun.status === TaskRun_Status.PENDING ||taskRun.status === TaskRun_Status.RUNNING) {- const task = taskRun.schedulerInfo?.waitingCause?.cause?.case === "task"- ? taskRun.schedulerInfo.waitingCause.cause.value.task- : undefined;+ const task =+ taskRun.schedulerInfo?.waitingCause?.cause?.case === "task"+ ? taskRun.schedulerInfo.waitingCause.cause.value.task+ : undefined;if (task) {return {title: t("common.blocking-task"),diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRunTable.vue b/frontend/src/components/Plan/components/RolloutView/TaskRunTable.vueindex 8b98361ea6..a8df3cea69 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskRunTable.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskRunTable.vue@@ -24,6 +24,9 @@</template><script lang="tsx" setup>+import { create } from "@bufbuild/protobuf";+import type { Duration } from "@bufbuild/protobuf/wkt";+import { DurationSchema } from "@bufbuild/protobuf/wkt";import type { DataTableColumn } from "naive-ui";import { NButton, NDataTable, NTag } from "naive-ui";import { computed, ref } from "vue";@@ -32,10 +35,10 @@ import TaskRunDetail from "@/components/IssueV1/components/TaskRunSection/TaskRuimport HumanizeDate from "@/components/misc/HumanizeDate.vue";import { Drawer, DrawerContent } from "@/components/v2";import { useCurrentProjectV1 } from "@/store";-import { getDateForPbTimestampProtoEs, getTimeForPbTimestampProtoEs } from "@/types";-import { create } from "@bufbuild/protobuf";-import type { Duration } from "@bufbuild/protobuf/wkt";-import { DurationSchema } from "@bufbuild/protobuf/wkt";+import {+ getDateForPbTimestampProtoEs,+ getTimeForPbTimestampProtoEs,+} from "@/types";import type { Task, TaskRun } from "@/types/proto-es/v1/rollout_service_pb";import { TaskRun_Status } from "@/types/proto-es/v1/rollout_service_pb";import { databaseForTask } from "@/utils";@@ -98,7 +101,9 @@ const columnList = computed((): DataTableColumn<TaskRun>[] => {width: 140,render: (taskRun: TaskRun) =>taskRun.startTime ? (- <HumanizeDate date={getDateForPbTimestampProtoEs(taskRun.startTime)} />+ <HumanizeDate+ date={getDateForPbTimestampProtoEs(taskRun.startTime)}+ />) : ("-"),@@ -109,9 +114,7 @@ const columnList = computed((): DataTableColumn<TaskRun>[] => {width: 120,render: (taskRun: TaskRun) => {const duration = executionDurationOfTaskRun(taskRun);- return duration- ? humanizeDurationV1(duration)- : "-";+ return duration ? humanizeDurationV1(duration) : "-";},},{diff --git a/frontend/src/components/Plan/components/RolloutView/TaskView.vue b/frontend/src/components/Plan/components/RolloutView/TaskView.vueindex cadc1bb169..d3b0711b3d 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskView.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskView.vue@@ -82,7 +82,11 @@ import { InstanceV1EngineIcon, CopyButton } from "@/components/v2";import { rolloutServiceClientConnect } from "@/grpcweb";import { useCurrentProjectV1, useSheetV1Store } from "@/store";import { getDateForPbTimestampProtoEs, unknownTask } from "@/types";-import type { Task, TaskRun, Rollout } from "@/types/proto-es/v1/rollout_service_pb";+import type {+ Task,+ TaskRun,+ Rollout,+} from "@/types/proto-es/v1/rollout_service_pb";import {ListTaskRunsRequestSchema,GetRolloutRequestSchema,diff --git a/frontend/src/components/Plan/components/RolloutView/context.ts b/frontend/src/components/Plan/components/RolloutView/context.tsindex bc442396c4..7eccad135d 100644--- a/frontend/src/components/Plan/components/RolloutView/context.ts+++ b/frontend/src/components/Plan/components/RolloutView/context.ts@@ -5,7 +5,10 @@ import { computed, inject, provide, ref, onUnmounted } from "vue";import { rolloutServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";import { useCurrentProjectV1 } from "@/store";-import { PreviewRolloutRequestSchema, RolloutSchema } from "@/types/proto-es/v1/rollout_service_pb";+import {+ PreviewRolloutRequestSchema,+ RolloutSchema,+} from "@/types/proto-es/v1/rollout_service_pb";import type { Rollout, Stage } from "@/types/proto-es/v1/rollout_service_pb";import { usePlanContextWithRollout } from "../../logic";diff --git a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vueindex 53b2d3ce9e..7c56f0e1e0 100644--- a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue+++ b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue@@ -48,19 +48,26 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { asyncComputed } from "@vueuse/core";import { NButton, NPopover } from "naive-ui";import { computed, ref } from "vue";import { useI18n } from "vue-i18n";-import { create } from "@bufbuild/protobuf";import { BBSpin } from "@/bbkit";import { SQLCheckPanel } from "@/components/SQLCheck";import { STATEMENT_SKIP_CHECK_THRESHOLD } from "@/components/SQLCheck/common";import ErrorList from "@/components/misc/ErrorList.vue";import { releaseServiceClientConnect } from "@/grpcweb";import type { CheckReleaseResponse } from "@/types/proto-es/v1/release_service_pb";-import { CheckReleaseRequestSchema, CheckReleaseResponseSchema, ReleaseFileType } from "@/types/proto-es/v1/release_service_pb";-import { AdviceSchema, Advice_Status as ProtoESAdvice_Status } from "@/types/proto-es/v1/sql_service_pb";+import {+ CheckReleaseRequestSchema,+ CheckReleaseResponseSchema,+ ReleaseFileType,+} from "@/types/proto-es/v1/release_service_pb";+import {+ AdviceSchema,+ Advice_Status as ProtoESAdvice_Status,+} from "@/types/proto-es/v1/sql_service_pb";import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";import type { Defer, VueStyle } from "@/utils";import { defer } from "@/utils";diff --git a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckSection.vue b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckSection.vueindex cbccad609d..a496d5527d 100644--- a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckSection.vue+++ b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckSection.vue@@ -47,7 +47,7 @@ const { database, resultMap } = usePlanSQLCheckContext();const checkResult = computed(() => {const result = resultMap.value[database.value.name] || undefined;if (!result) return undefined;-+return result;});</script>diff --git a/frontend/src/components/Plan/components/SQLCheckSection/common.ts b/frontend/src/components/Plan/components/SQLCheckSection/common.tsindex 282ea3aa95..f17f728bf4 100644--- a/frontend/src/components/Plan/components/SQLCheckSection/common.ts+++ b/frontend/src/components/Plan/components/SQLCheckSection/common.ts@@ -1,13 +1,14 @@-import {- Plan_ChangeDatabaseConfig_Type,-} from "@/types/proto-es/v1/plan_service_pb";+import { Plan_ChangeDatabaseConfig_Type } from "@/types/proto-es/v1/plan_service_pb";import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import { Release_File_ChangeType } from "@/types/proto-es/v1/release_service_pb";export const getSpecChangeType = (spec?: Plan_Spec): Release_File_ChangeType => {- const changeDatabaseConfig = spec?.config?.case === "changeDatabaseConfig" ? spec.config.value : undefined;+ const changeDatabaseConfig =+ spec?.config?.case === "changeDatabaseConfig"+ ? spec.config.value+ : undefined;switch (changeDatabaseConfig?.type) {case Plan_ChangeDatabaseConfig_Type.MIGRATE:return Release_File_ChangeType.DDL;diff --git a/frontend/src/components/Plan/components/SQLCheckSection/context.ts b/frontend/src/components/Plan/components/SQLCheckSection/context.tsindex ef3972d87c..a8b5db8ae2 100644--- a/frontend/src/components/Plan/components/SQLCheckSection/context.ts+++ b/frontend/src/components/Plan/components/SQLCheckSection/context.ts@@ -1,8 +1,8 @@import type { InjectionKey, Ref } from "vue";import { computed, inject, provide, ref } from "vue";import { unknownDatabase, type ComposedProject } from "@/types";-import type { CheckReleaseResponse_CheckResult } from "@/types/proto-es/v1/release_service_pb";import type { Plan, Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";+import type { CheckReleaseResponse_CheckResult } from "@/types/proto-es/v1/release_service_pb";import type { Task } from "@/types/proto-es/v1/rollout_service_pb";import { databaseForTask } from "@/utils";import { databaseForSpec } from "../../logic";diff --git a/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue b/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vueindex 668ff149f6..b6c6bb3e03 100644--- a/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue+++ b/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue@@ -134,11 +134,11 @@ import Drawer from "@/components/v2/Container/Drawer.vue";import DrawerContent from "@/components/v2/Container/DrawerContent.vue";import { releaseServiceClientConnect } from "@/grpcweb";import { getRuleLocalization, ruleTemplateMapV2 } from "@/types";+import { Plan_ChangeDatabaseConfig_Type } from "@/types/proto-es/v1/plan_service_pb";import {CheckReleaseRequestSchema,ReleaseFileType,} from "@/types/proto-es/v1/release_service_pb";-import { Plan_ChangeDatabaseConfig_Type } from "@/types/proto-es/v1/plan_service_pb";import {Release_File_ChangeType,type CheckReleaseResponse_CheckResult,@@ -162,7 +162,10 @@ const checkResults = ref<CheckReleaseResponse_CheckResult[] | undefined>(const statement = computed(() => {if (!selectedSpec.value) return "";- const config = selectedSpec.value.config?.case === "changeDatabaseConfig" ? selectedSpec.value.config.value : undefined;+ const config =+ selectedSpec.value.config?.case === "changeDatabaseConfig"+ ? selectedSpec.value.config.value+ : undefined;if (!config) return "";const sheet = getLocalSheetByName(config.sheet);return getSheetStatement(sheet);@@ -234,7 +237,10 @@ const drawerAdvices = computed(() => {const runChecks = async () => {if (!plan.value.name || !selectedSpec.value) return;- const config = selectedSpec.value.config?.case === "changeDatabaseConfig" ? selectedSpec.value.config.value : undefined;+ const config =+ selectedSpec.value.config?.case === "changeDatabaseConfig"+ ? selectedSpec.value.config.value+ : undefined;if (!config) return;isRunningChecks.value = true;@@ -260,9 +266,10 @@ const runChecks = async () => {version: "0",type: ReleaseFileType.VERSIONED,statement: new TextEncoder().encode(statement),- changeType: config.type === Plan_ChangeDatabaseConfig_Type.DATA- ? Release_File_ChangeType.DML- : Release_File_ChangeType.DDL,+ changeType:+ config.type === Plan_ChangeDatabaseConfig_Type.DATA+ ? Release_File_ChangeType.DML+ : Release_File_ChangeType.DDL,},],},diff --git a/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vueindex 20460c82a7..16c82f86b5 100644--- a/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue+++ b/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue@@ -417,8 +417,7 @@ const updateStatement = async (statement: string) => {const sheet = create(SheetSchema, {...createEmptyLocalSheet(),title: plan.value.title,- engine: specEngine- ,+ engine: specEngine,});setSheetStatement(sheet, statement);const createdSheet = await useSheetV1Store().createSheet(diff --git a/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue b/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vueindex f9af073668..0799e5776e 100644--- a/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue+++ b/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue@@ -110,9 +110,7 @@</h4><div class="text-xs"><span class="text-gray-500"- >{{- getVCSTypeText(release.vcsSource.vcsType)- }}:</span+ >{{ getVCSTypeText(release.vcsSource.vcsType) }}:</span><av-if="release.vcsSource.url"diff --git a/frontend/src/components/Plan/components/StatementSection/ReleaseView/index.ts b/frontend/src/components/Plan/components/StatementSection/ReleaseView/index.tsindex b9ee3b18ec..c92ede339b 100644--- a/frontend/src/components/Plan/components/StatementSection/ReleaseView/index.ts+++ b/frontend/src/components/Plan/components/StatementSection/ReleaseView/index.ts@@ -1 +1 @@-export { default } from "./ReleaseView.vue";\ No newline at end of file+export { default } from "./ReleaseView.vue";diff --git a/frontend/src/components/Plan/components/StatementSection/useSQLAdviceMarkers.ts b/frontend/src/components/Plan/components/StatementSection/useSQLAdviceMarkers.tsindex c8a1d33f9a..757c395b47 100644--- a/frontend/src/components/Plan/components/StatementSection/useSQLAdviceMarkers.ts+++ b/frontend/src/components/Plan/components/StatementSection/useSQLAdviceMarkers.ts@@ -62,9 +62,16 @@ const getLatestAdviceOptions = (planCheckRuns: PlanCheckRun[]) => {result.status === PlanCheckRun_Result_Status.ERROR ||result.status === PlanCheckRun_Result_Status.WARNING)- .filter((result) => result.report?.case === "sqlReviewReport" && result.report.value.line !== undefined)+ .filter(+ (result) =>+ result.report?.case === "sqlReviewReport" &&+ result.report.value.line !== undefined+ ).map<AdviceOption>((result) => {- const sqlReviewReport = result.report?.case === "sqlReviewReport" ? result.report.value : undefined;+ const sqlReviewReport =+ result.report?.case === "sqlReviewReport"+ ? result.report.value+ : undefined;const line = sqlReviewReport!.line;const column = sqlReviewReport?.column ?? Number.MAX_SAFE_INTEGER;const code = result.code;diff --git a/frontend/src/components/Plan/components/common/validateSpec.ts b/frontend/src/components/Plan/components/common/validateSpec.tsindex 41dc04720c..bbadaf9bbf 100644--- a/frontend/src/components/Plan/components/common/validateSpec.ts+++ b/frontend/src/components/Plan/components/common/validateSpec.ts@@ -11,7 +11,10 @@ export const useSpecsValidation = (specs: Plan_Spec[]) => {const checkSpecStatement = async (spec: Plan_Spec): Promise<boolean> => {// Only changeDatabaseConfig and exportDataConfig specs have statements- if (spec.config?.case !== "changeDatabaseConfig" && spec.config?.case !== "exportDataConfig") {+ if (+ spec.config?.case !== "changeDatabaseConfig" &&+ spec.config?.case !== "exportDataConfig"+ ) {return false;}diff --git a/frontend/src/components/Plan/logic/initialize/create.ts b/frontend/src/components/Plan/logic/initialize/create.tsindex f7cd2f8da4..11395c86ce 100644--- a/frontend/src/components/Plan/logic/initialize/create.ts+++ b/frontend/src/components/Plan/logic/initialize/create.ts@@ -9,9 +9,7 @@ import {} from "@/store";import { projectNamePrefix } from "@/store/modules/v1/common";import type { ComposedProject, IssueType } from "@/types";-import type {- Plan_Spec,-} from "@/types/proto-es/v1/plan_service_pb";+import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import {PlanSchema,Plan_ChangeDatabaseConfigSchema,diff --git a/frontend/src/components/Plan/logic/initialize/index.ts b/frontend/src/components/Plan/logic/initialize/index.tsindex 4a1cf0736f..bd32e9afb0 100644--- a/frontend/src/components/Plan/logic/initialize/index.ts+++ b/frontend/src/components/Plan/logic/initialize/index.ts@@ -8,9 +8,9 @@ import {import { projectNamePrefix, usePlanStore } from "@/store";import { EMPTY_ID, UNKNOWN_ID } from "@/types";import { GetIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";-import { GetRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import type { Plan, PlanCheckRun } from "@/types/proto-es/v1/plan_service_pb";+import { GetRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";import { emptyPlan } from "@/types/v1/issue/plan";import { createPlanSkeleton } from "./create";diff --git a/frontend/src/components/Plan/logic/plan-check.ts b/frontend/src/components/Plan/logic/plan-check.tsindex e9e6f14636..18e8fe2018 100644--- a/frontend/src/components/Plan/logic/plan-check.ts+++ b/frontend/src/components/Plan/logic/plan-check.ts@@ -1,4 +1,7 @@-import type { Plan_Spec, PlanCheckRun } from "@/types/proto-es/v1/plan_service_pb";+import type {+ Plan_Spec,+ PlanCheckRun,+} from "@/types/proto-es/v1/plan_service_pb";import { sheetNameForSpec, targetsForSpec } from "./plan";export const planSpecHasPlanChecks = (spec: Plan_Spec) => {diff --git a/frontend/src/components/Plan/logic/plan.ts b/frontend/src/components/Plan/logic/plan.tsindex 8c01e44f7f..342e0dbb06 100644--- a/frontend/src/components/Plan/logic/plan.ts+++ b/frontend/src/components/Plan/logic/plan.ts@@ -78,7 +78,10 @@ export const databaseEngineForSpec = async (export const isDatabaseChangeSpec = (spec?: Plan_Spec) => {if (!spec) return false;- if (spec.config?.case === "changeDatabaseConfig" || spec.config?.case === "exportDataConfig") {+ if (+ spec.config?.case === "changeDatabaseConfig" ||+ spec.config?.case === "exportDataConfig"+ ) {return targetsForSpec(spec).every(isValidDatabaseName);}return false;@@ -86,7 +89,10 @@ export const isDatabaseChangeSpec = (spec?: Plan_Spec) => {export const isDBGroupChangeSpec = (spec?: Plan_Spec) => {if (!spec) return false;- if (spec.config?.case === "changeDatabaseConfig" || spec.config?.case === "exportDataConfig") {+ if (+ spec.config?.case === "changeDatabaseConfig" ||+ spec.config?.case === "exportDataConfig"+ ) {return targetsForSpec(spec).every(isValidDatabaseGroupName);}return false;diff --git a/frontend/src/components/Plan/logic/poller/utils.ts b/frontend/src/components/Plan/logic/poller/utils.tsindex 8fe4bbdb4b..e8882acebe 100644--- a/frontend/src/components/Plan/logic/poller/utils.ts+++ b/frontend/src/components/Plan/logic/poller/utils.ts@@ -8,14 +8,14 @@ import {import { useIssueCommentStore } from "@/store";import type { ComposedProject } from "@/types";import { GetIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import { ListIssueCommentsRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {GetPlanRequestSchema,ListPlanCheckRunsRequestSchema,} from "@/types/proto-es/v1/plan_service_pb";-import { GetRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";-import { ListIssueCommentsRequestSchema } from "@/types/proto-es/v1/issue_service_pb";-import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import type { Plan, PlanCheckRun } from "@/types/proto-es/v1/plan_service_pb";+import { GetRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";import { hasProjectPermissionV2 } from "@/utils";diff --git a/frontend/src/components/Plan/logic/sheet.ts b/frontend/src/components/Plan/logic/sheet.tsindex 5601b01fae..12f58b00d3 100644--- a/frontend/src/components/Plan/logic/sheet.ts+++ b/frontend/src/components/Plan/logic/sheet.ts@@ -1,6 +1,6 @@+import { create } from "@bufbuild/protobuf";import { reactive } from "vue";import type { Sheet } from "@/types/proto-es/v1/sheet_service_pb";-import { create } from "@bufbuild/protobuf";import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";const state = {diff --git a/frontend/src/components/PlanCheckRun/PlanCheckRunBar.vue b/frontend/src/components/PlanCheckRun/PlanCheckRunBar.vueindex 86a7a9528e..9214293e78 100644--- a/frontend/src/components/PlanCheckRun/PlanCheckRunBar.vue+++ b/frontend/src/components/PlanCheckRun/PlanCheckRunBar.vue@@ -33,11 +33,11 @@</template><script lang="ts" setup>-import { ref } from "vue";import { create } from "@bufbuild/protobuf";+import { ref } from "vue";import { planServiceClientConnect } from "@/grpcweb";-import { RunPlanChecksRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import type { ComposedDatabase } from "@/types";+import { RunPlanChecksRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import type {PlanCheckRun,PlanCheckRun_Type,diff --git a/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue b/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vueindex b747118589..55a4e6e60d 100644--- a/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue+++ b/frontend/src/components/PlanCheckRun/PlanCheckRunDetail.vue@@ -77,7 +77,10 @@>{{ $t("sql-review.rule-detail") }}</span></div>- <div v-if="(row.checkResult as any).sqlSummaryReport" class="pl-2 first:pl-0">+ <div+ v-if="(row.checkResult as any).sqlSummaryReport"+ class="pl-2 first:pl-0"+ ><span>{{ (row.checkResult as any).sqlSummaryReport?.affectedRows }}</span>@@ -96,7 +99,9 @@<!-- Only show the error line for latest plan check run --><div- v-if="showCodeLocation && (row.checkResult as any).sqlReviewReport?.line"+ v-if="+ showCodeLocation && (row.checkResult as any).sqlReviewReport?.line+ "class="pl-2 first:pl-0"><span@@ -184,7 +189,9 @@<!-- Only show the error line for latest plan check run --><template- v-if="showCodeLocation && (row.checkResult as any).sqlReviewReport?.line"+ v-if="+ showCodeLocation && (row.checkResult as any).sqlReviewReport?.line+ "><span class="border-r border-control-border ml-1"></span><span@@ -235,15 +242,14 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { XIcon } from "lucide-vue-next";import { NButton } from "naive-ui";import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";-import { create } from "@bufbuild/protobuf";import { SQLRuleEditDialog } from "@/components/SQLReview/components";import { planServiceClientConnect } from "@/grpcweb";-import { BatchCancelPlanCheckRunsRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { WORKSPACE_ROUTE_SQL_REVIEW } from "@/router/dashboard/workspaceRoutes";import { useReviewPolicyForDatabase } from "@/store";import {@@ -260,6 +266,7 @@ import {convertPolicyRuleToRuleTemplate,} from "@/types";import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { BatchCancelPlanCheckRunsRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import type {PlanCheckRun,PlanCheckRun_Result,@@ -399,7 +406,9 @@ const categoryAndTitle = (return ["", messageWithCode(checkResult.title, code)];}if ((checkResult as any).sqlSummaryReport) {- if (typeof (checkResult as any).sqlSummaryReport?.affectedRows === "number") {+ if (+ typeof (checkResult as any).sqlSummaryReport?.affectedRows === "number"+ ) {return ["",`${t("task.check-type.affected-rows.self")} (${t("task.check-type.affected-rows.description")})`,diff --git a/frontend/src/components/PlanCheckRun/PlanCheckRunPanel.vue b/frontend/src/components/PlanCheckRun/PlanCheckRunPanel.vueindex 454aff9372..b5a5b24e28 100644--- a/frontend/src/components/PlanCheckRun/PlanCheckRunPanel.vue+++ b/frontend/src/components/PlanCheckRun/PlanCheckRunPanel.vue@@ -102,7 +102,9 @@ const tabItemList = computed(() => {i === 0? t("common.latest"): planCheckRun.createTime- ? humanizeDate(getDateForPbTimestampProtoEs(planCheckRun.createTime))+ ? humanizeDate(+ getDateForPbTimestampProtoEs(planCheckRun.createTime)+ ): `UID(${extractPlanCheckRunUID(planCheckRun.name)})`;return {label,diff --git a/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue b/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vueindex eb4b3bc012..10ee7527a4 100644--- a/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue+++ b/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue@@ -266,6 +266,17 @@</template><script setup lang="tsx">+import { create as createProto } from "@bufbuild/protobuf";+import { cloneDeep, isEqual } from "lodash-es";+import { TriangleAlertIcon } from "lucide-vue-next";+import {+ NColorPicker,+ NDynamicTags,+ NInputNumber,+ NTag,+ NTooltip,+} from "naive-ui";+import { computed, reactive, ref } from "vue";import { Switch } from "@/components/v2";import { useProjectV1Store } from "@/store";import type { ComposedProject } from "@/types";@@ -277,17 +288,6 @@ import {LabelSchema,Project_ExecutionRetryPolicySchema,} from "@/types/proto-es/v1/project_service_pb";-import { cloneDeep, isEqual } from "lodash-es";-import { create as createProto } from "@bufbuild/protobuf";-import { TriangleAlertIcon } from "lucide-vue-next";-import {- NColorPicker,- NDynamicTags,- NInputNumber,- NTag,- NTooltip,-} from "naive-ui";-import { computed, reactive, ref } from "vue";interface LocalState {issueLabels: Label[];@@ -349,11 +349,13 @@ const onLabelsUpdate = (values: string[]) => {if (new Set(labelValues.value).has(newValue)) {return;}- state.issueLabels.push(createProto(LabelSchema, {- color: defaultColor,- value: newValue,- group: "",- }));+ state.issueLabels.push(+ createProto(LabelSchema, {+ color: defaultColor,+ value: newValue,+ group: "",+ })+ );};const renderLabel = (value: string, index: number) => {diff --git a/frontend/src/components/ProjectDatabasesPanel.vue b/frontend/src/components/ProjectDatabasesPanel.vueindex 7fe3e585eb..c34775e4dc 100644--- a/frontend/src/components/ProjectDatabasesPanel.vue+++ b/frontend/src/components/ProjectDatabasesPanel.vue@@ -163,7 +163,9 @@ const selectedEngines = computed(() => {.map((scope) => {// Convert string engine name to Engine enumconst engineKey = scope.value.toUpperCase();- return Engine[engineKey as keyof typeof Engine] ?? Engine.ENGINE_UNSPECIFIED;+ return (+ Engine[engineKey as keyof typeof Engine] ?? Engine.ENGINE_UNSPECIFIED+ );});});diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vueindex 012c91ae6d..1bbf93c553 100644--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue@@ -88,6 +88,9 @@<script lang="ts" setup>/* eslint-disable vue/no-mutating-props */+import { isUndefined } from "lodash-es";+import { NButton, NInput } from "naive-ui";+import { computed, reactive, watch } from "vue";import ExpirationSelector from "@/components/ExpirationSelector.vue";import QuerierDatabaseResourceForm from "@/components/GrantRequestPanel/DatabaseResourceForm/index.vue";import MaxRowCountSelect from "@/components/GrantRequestPanel/MaxRowCountSelect.vue";@@ -99,9 +102,6 @@ import type { Binding } from "@/types/proto-es/v1/iam_policy_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { checkRoleContainsAnyPermission } from "@/utils";import { buildConditionExpr } from "@/utils/issue/cel";-import { isUndefined } from "lodash-es";-import { NButton, NInput } from "naive-ui";-import { computed, reactive, watch } from "vue";const props = withDefaults(defineProps<{diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMembersPanel.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMembersPanel.vueindex d7dec0cb26..2d9a033c3a 100644--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMembersPanel.vue+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMembersPanel.vue@@ -43,6 +43,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";import { NButton } from "naive-ui";import { computed, reactive, ref } from "vue";@@ -54,7 +55,6 @@ import {useProjectIamPolicyStore,} from "@/store";import { PresetRoleType, type ComposedProject } from "@/types";-import { create } from "@bufbuild/protobuf";import type { Binding } from "@/types/proto-es/v1/iam_policy_pb";import { BindingSchema } from "@/types/proto-es/v1/iam_policy_pb";import { getBindingIdentifier } from "../utils";diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vueindex b8d0ca3751..997a67af38 100644--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue@@ -183,7 +183,8 @@ const panelTitle = computed(() => {});const maximumRoleExpiration = computed(() => {- const seconds = settingStore.workspaceProfileSetting?.maximumRoleExpiration?.seconds+ const seconds = settingStore.workspaceProfileSetting?.maximumRoleExpiration+ ?.seconds? Number(settingStore.workspaceProfileSetting.maximumRoleExpiration.seconds): undefined;if (!seconds) {diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/RoleDescription.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/RoleDescription.vueindex 83bd72f1d1..3d183641b3 100644--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/RoleDescription.vue+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/RoleDescription.vue@@ -12,13 +12,13 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { computed, onMounted, ref } from "vue";import { useRouter } from "vue-router";-import { create } from "@bufbuild/protobuf";import { issueServiceClientConnect } from "@/grpcweb";-import { GetIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";import { pushNotification } from "@/store";import { UNKNOWN_ID } from "@/types";+import { GetIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";import { isValidIssueName } from "@/utils";type DescriptionType = "TEXT" | "ISSUE";diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vueindex edb124df91..40f7f846c8 100644--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue@@ -134,8 +134,8 @@</template><script lang="tsx" setup>-import { cloneDeep, isEqual } from "lodash-es";import { create } from "@bufbuild/protobuf";+import { cloneDeep, isEqual } from "lodash-es";import { Building2Icon, PenIcon, TrashIcon } from "lucide-vue-next";import { NButton, NTag, NTooltip, NDataTable, useDialog } from "naive-ui";import type { DataTableColumn } from "naive-ui";diff --git a/frontend/src/components/RegenerateRecoveryCodesView.vue b/frontend/src/components/RegenerateRecoveryCodesView.vueindex 02b3a353fa..8e4726ea47 100644--- a/frontend/src/components/RegenerateRecoveryCodesView.vue+++ b/frontend/src/components/RegenerateRecoveryCodesView.vue@@ -18,13 +18,13 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { NButton } from "naive-ui";import { onMounted, reactive } from "vue";import { useI18n } from "vue-i18n";import { pushNotification, useCurrentUserV1, useUserStore } from "@/store";import { UpdateUserRequestSchema } from "@/types/proto-es/v1/user_service_pb";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import RecoveryCodesView from "./RecoveryCodesView.vue";interface LocalState {@@ -60,7 +60,7 @@ const regenerateTempMfaSecret = async () => {name: currentUser.value.name,},updateMask: create(FieldMaskSchema, {- paths: []+ paths: [],}),regenerateTempMfaSecret: true,})@@ -74,7 +74,7 @@ const regenerateRecoveryCodes = async () => {name: currentUser.value.name,},updateMask: create(FieldMaskSchema, {- paths: []+ paths: [],}),regenerateRecoveryCodes: true,})diff --git a/frontend/src/components/Release/ReleaseDataTable.vue b/frontend/src/components/Release/ReleaseDataTable.vueindex dd124ca3d5..5ba259f950 100644--- a/frontend/src/components/Release/ReleaseDataTable.vue+++ b/frontend/src/components/Release/ReleaseDataTable.vue@@ -112,7 +112,9 @@ const columnList = computed(title: t("common.created-at"),width: 128,render: (release) =>- humanizeTs(getTimeForPbTimestampProtoEs(release.createTime, 0) / 1000),+ humanizeTs(+ getTimeForPbTimestampProtoEs(release.createTime, 0) / 1000+ ),},];return columns.filter((column) => !column.hide);diff --git a/frontend/src/components/Release/ReleaseDetail/BasicInfo.vue b/frontend/src/components/Release/ReleaseDetail/BasicInfo.vueindex f6c04e2d34..c636be59df 100644--- a/frontend/src/components/Release/ReleaseDetail/BasicInfo.vue+++ b/frontend/src/components/Release/ReleaseDetail/BasicInfo.vue@@ -16,11 +16,7 @@><VCSIcon custom-class="h-4" :type="vcsSource.vcsType" /><EllipsisText>- <a- :href="vcsSource.url"- target="_blank"- class="normal-link !text-sm"- >+ <a :href="vcsSource.url" target="_blank" class="normal-link !text-sm">{{ beautifyUrl(vcsSource.url) }}</a></EllipsisText>diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vueindex b8c0606377..9fe02c4440 100644--- a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue@@ -50,6 +50,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { NButton } from "naive-ui";import { computed, reactive } from "vue";@@ -65,10 +66,13 @@ import {import { silentContextKey } from "@/grpcweb/context-key";import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";import { pushNotification, useDatabaseV1Store, useDBGroupStore } from "@/store";+import { DatabaseGroupSchema } from "@/types/proto-es/v1/database_group_service_pb";import { CreatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";+import {+ PlanSchema,+ Plan_ChangeDatabaseConfigSchema,+} from "@/types/proto-es/v1/plan_service_pb";import { PreviewRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";-import { PlanSchema, Plan_ChangeDatabaseConfigSchema } from "@/types/proto-es/v1/plan_service_pb";-import { create } from "@bufbuild/protobuf";import {extractProjectResourceName,generateIssueTitle,@@ -76,7 +80,6 @@ import {} from "@/utils";import { useReleaseDetailContext } from "../context";import { createIssueFromPlan } from "./utils";-import { DatabaseGroupSchema } from "@/types/proto-es/v1/database_group_service_pb";const emit = defineEmits<{(event: "close"): void;@@ -115,9 +118,12 @@ const handleCreate = async () => {const databaseList = state.targetSelectState.selectedDatabaseNameList.map((name) => databaseStore.getDatabaseByName(name));- const databaseGroup = create(DatabaseGroupSchema, dbGroupStore.getDBGroupByName(- state.targetSelectState.selectedDatabaseGroup || ""- ));+ const databaseGroup = create(+ DatabaseGroupSchema,+ dbGroupStore.getDBGroupByName(+ state.targetSelectState.selectedDatabaseGroup || ""+ )+ );const newPlan = create(PlanSchema, {title: `Release "${release.value.title}"`,description: `Apply release "${release.value.title}" to selected databases.`,diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/TitleEditor.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/TitleEditor.vueindex 852f0c52ba..2537f59e50 100644--- a/frontend/src/components/Release/ReleaseDetail/NavBar/TitleEditor.vue+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/TitleEditor.vue@@ -16,11 +16,11 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { NInput } from "naive-ui";import type { CSSProperties } from "vue";import { computed, reactive, watch } from "vue";import { useI18n } from "vue-i18n";-import { create } from "@bufbuild/protobuf";import { pushNotification, useReleaseStore } from "@/store";import { State } from "@/types/proto-es/v1/common_pb";import { ReleaseSchema } from "@/types/proto-es/v1/release_service_pb";diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/utils.ts b/frontend/src/components/Release/ReleaseDetail/NavBar/utils.tsindex 54e7e681be..7028250fee 100644--- a/frontend/src/components/Release/ReleaseDetail/NavBar/utils.ts+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/utils.ts@@ -1,9 +1,16 @@import { create } from "@bufbuild/protobuf";-import { issueServiceClientConnect, rolloutServiceClientConnect } from "@/grpcweb";-import { CreateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import {+ issueServiceClientConnect,+ rolloutServiceClientConnect,+} from "@/grpcweb";import { useCurrentUserV1 } from "@/store";import { emptyIssue, type ComposedIssue } from "@/types";-import { IssueSchema, Issue_Type, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";+import { CreateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import {+ IssueSchema,+ Issue_Type,+ IssueStatus,+} from "@/types/proto-es/v1/issue_service_pb";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";@@ -28,7 +35,8 @@ export const createIssueFromPlan = async (project: string, plan: Plan) => {plan: plan.name,},});- const createdRollout = await rolloutServiceClientConnect.createRollout(rolloutRequest);+ const createdRollout =+ await rolloutServiceClientConnect.createRollout(rolloutRequest);const composedIssue: ComposedIssue = {...emptyIssue(),...createdIssue,diff --git a/frontend/src/components/Revision/RevisionDataTable.vue b/frontend/src/components/Revision/RevisionDataTable.vueindex 08352fb24e..884f58e9f4 100644--- a/frontend/src/components/Revision/RevisionDataTable.vue+++ b/frontend/src/components/Revision/RevisionDataTable.vue@@ -128,7 +128,9 @@ const columnList = computed(() => {width: 128,resizable: true,render: (revision) => (- <HumanizeDate date={getDateForPbTimestampProtoEs(revision.createTime)} />+ <HumanizeDate+ date={getDateForPbTimestampProtoEs(revision.createTime)}+ />),},];diff --git a/frontend/src/components/Revision/RevisionDetailPanel.vue b/frontend/src/components/Revision/RevisionDetailPanel.vueindex 51870bcab7..b9177a2d64 100644--- a/frontend/src/components/Revision/RevisionDetailPanel.vue+++ b/frontend/src/components/Revision/RevisionDetailPanel.vue@@ -11,7 +11,9 @@><span>{{ $t("database.revision.applied-at") }}:- <HumanizeDate :date="getDateForPbTimestampProtoEs(revision.createTime)" />+ <HumanizeDate+ :date="getDateForPbTimestampProtoEs(revision.createTime)"+ /></span><span v-if="relatedIssueUID">{{ $t("common.issue") }}:@@ -48,15 +50,15 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { NDivider } from "naive-ui";import { computed, reactive, ref, watch } from "vue";-import { create } from "@bufbuild/protobuf";-import { GetTaskRunRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import { MonacoEditor } from "@/components/MonacoEditor";import { CopyButton } from "@/components/v2";import { rolloutServiceClientConnect } from "@/grpcweb";import { useRevisionStore, useSheetV1Store } from "@/store";import { getDateForPbTimestampProtoEs, type ComposedDatabase } from "@/types";+import { GetTaskRunRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import type { TaskRun } from "@/types/proto-es/v1/rollout_service_pb";import { extractIssueUID, getSheetStatement } from "@/utils";import TaskRunLogTable from "../IssueV1/components/TaskRunSection/TaskRunLogTable/TaskRunLogTable.vue";diff --git a/frontend/src/components/Role/Setting/RoleSetting.vue b/frontend/src/components/Role/Setting/RoleSetting.vueindex e3de65e52a..061e938e2d 100644--- a/frontend/src/components/Role/Setting/RoleSetting.vue+++ b/frontend/src/components/Role/Setting/RoleSetting.vue@@ -56,11 +56,11 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { sortBy } from "lodash-es";import { PlusIcon } from "lucide-vue-next";import { NButton } from "naive-ui";import { computed, onMounted, reactive, ref } from "vue";-import { create } from "@bufbuild/protobuf";import { BBSpin } from "@/bbkit";import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";import { featureToRef, useRoleStore } from "@/store";diff --git a/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleOperationsCell.vue b/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleOperationsCell.vueindex 29107059a9..2c984c14cc 100644--- a/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleOperationsCell.vue+++ b/frontend/src/components/Role/Setting/components/RoleDataTable/cells/RoleOperationsCell.vue@@ -19,6 +19,7 @@</template><script lang="tsx" setup>+import { Code } from "@connectrpc/connect";import { NButton } from "naive-ui";import { computed, ref } from "vue";import { useI18n } from "vue-i18n";@@ -28,7 +29,6 @@ import type { Role } from "@/types/proto-es/v1/role_service_pb";import { hasWorkspacePermissionV2, isCustomRole } from "@/utils";import { getErrorCode, extractGrpcErrorMessage } from "@/utils/grpcweb";import { useCustomRoleSettingContext } from "../../../context";-import { Code } from "@connectrpc/connect";const props = defineProps<{role: Role;diff --git a/frontend/src/components/Role/Setting/components/RolePanel.vue b/frontend/src/components/Role/Setting/components/RolePanel.vueindex 8e90d1c108..326fbde77e 100644--- a/frontend/src/components/Role/Setting/components/RolePanel.vue+++ b/frontend/src/components/Role/Setting/components/RolePanel.vue@@ -103,12 +103,12 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { cloneDeep, uniq } from "lodash-es";import { PlusIcon } from "lucide-vue-next";import { NButton, NInput, NTransfer } from "naive-ui";import { computed, reactive, watch, nextTick, ref } from "vue";import { useI18n } from "vue-i18n";-import { create } from "@bufbuild/protobuf";import { BBSpin } from "@/bbkit";import { FeatureBadge } from "@/components/FeatureGuard";import { Drawer, DrawerContent, ResourceIdField } from "@/components/v2";diff --git a/frontend/src/components/Rollout/RolloutDataTable.vue b/frontend/src/components/Rollout/RolloutDataTable.vueindex fccee1801b..d3b700acf2 100644--- a/frontend/src/components/Rollout/RolloutDataTable.vue+++ b/frontend/src/components/Rollout/RolloutDataTable.vue@@ -145,7 +145,9 @@ const columnList = computed(title: t("common.created-at"),width: 128,render: (rollout) =>- humanizeTs(getTimeForPbTimestampProtoEs(rollout.createTime, 0) / 1000),+ humanizeTs(+ getTimeForPbTimestampProtoEs(rollout.createTime, 0) / 1000+ ),},];return columns.filter((column) => !column.hide);diff --git a/frontend/src/components/SQLCheck/SQLCheckPanel.vue b/frontend/src/components/SQLCheck/SQLCheckPanel.vueindex 8001f0ba87..afa855455d 100644--- a/frontend/src/components/SQLCheck/SQLCheckPanel.vue+++ b/frontend/src/components/SQLCheck/SQLCheckPanel.vue@@ -130,8 +130,11 @@ watchEffect(async () => {parentPath: "",policyType: PolicyType.RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW,});- if (workspaceLevelPolicy?.policy?.case === "restrictIssueCreationForSqlReviewPolicy" &&- workspaceLevelPolicy.policy.value.disallow) {+ if (+ workspaceLevelPolicy?.policy?.case ===+ "restrictIssueCreationForSqlReviewPolicy" &&+ workspaceLevelPolicy.policy.value.disallow+ ) {restrictIssueCreationForSqlReviewPolicy.value = true;return;}@@ -141,8 +144,11 @@ watchEffect(async () => {parentPath: props.project,policyType: PolicyType.RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW,});- if (projectLevelPolicy?.policy?.case === "restrictIssueCreationForSqlReviewPolicy" &&- projectLevelPolicy.policy.value.disallow) {+ if (+ projectLevelPolicy?.policy?.case ===+ "restrictIssueCreationForSqlReviewPolicy" &&+ projectLevelPolicy.policy.value.disallow+ ) {restrictIssueCreationForSqlReviewPolicy.value = true;return;}diff --git a/frontend/src/components/SQLReview/components/SQLRuleTable.vue b/frontend/src/components/SQLReview/components/SQLRuleTable.vueindex da0b63ae95..ea5ade6cdc 100644--- a/frontend/src/components/SQLReview/components/SQLRuleTable.vue+++ b/frontend/src/components/SQLReview/components/SQLRuleTable.vue@@ -54,9 +54,9 @@{{$t("sql-review.not-available-for-free", {plan: $t(- `subscription.plan.${- PlanType[currentPlan].toLowerCase()- }.title`+ `subscription.plan.${PlanType[+ currentPlan+ ].toLowerCase()}.title`),})}}@@ -130,13 +130,10 @@ import type { DataTableColumn } from "naive-ui";import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";import { useCurrentPlan } from "@/store";-import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import type { RuleTemplateV2 } from "@/types";-import {- getRuleLocalization,- ruleIsAvailableInSubscription,-} from "@/types";+import { getRuleLocalization, ruleIsAvailableInSubscription } from "@/types";import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";+import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import RuleConfig from "./RuleConfigComponents/RuleConfig.vue";import RuleLevelSwitch from "./RuleLevelSwitch.vue";import type { RuleListWithCategory } from "./SQLReviewCategoryTabFilter.vue";diff --git a/frontend/src/components/SchemaEditorLite/Modals/EditColumnForeignKeyModal.vue b/frontend/src/components/SchemaEditorLite/Modals/EditColumnForeignKeyModal.vueindex 109af40c7b..0f7d4d8c22 100644--- a/frontend/src/components/SchemaEditorLite/Modals/EditColumnForeignKeyModal.vue+++ b/frontend/src/components/SchemaEditorLite/Modals/EditColumnForeignKeyModal.vue@@ -77,6 +77,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { TrashIcon } from "lucide-vue-next";import type { SelectOption } from "naive-ui";import { NButton, NSelect, NInputGroup, NInput } from "naive-ui";@@ -92,7 +93,6 @@ import type {import type { ForeignKeyMetadata } from "@/types/proto-es/v1/database_service_pb";import { ForeignKeyMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import { hasSchemaProperty } from "@/utils";-import { create } from "@bufbuild/protobuf";import { useSchemaEditorContext } from "../context";import {removeColumnFromForeignKey,diff --git a/frontend/src/components/SchemaEditorLite/Modals/FunctionNameModal.vue b/frontend/src/components/SchemaEditorLite/Modals/FunctionNameModal.vueindex 4ce74a9c1c..f45d9d4bb0 100644--- a/frontend/src/components/SchemaEditorLite/Modals/FunctionNameModal.vue+++ b/frontend/src/components/SchemaEditorLite/Modals/FunctionNameModal.vue@@ -29,6 +29,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import type { InputInst } from "naive-ui";import { NButton, NInput } from "naive-ui";import { computed, onMounted, reactive, ref } from "vue";@@ -43,7 +44,6 @@ import type {import type { FunctionMetadata } from "@/types/proto-es/v1/database_service_pb";import { FunctionMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import { useSchemaEditorContext } from "../context";-import { create } from "@bufbuild/protobuf";// Function name must start with a non-space character, end with a non-space character.const functionNameFieldRegexp = /^\S\S*\S?$/;diff --git a/frontend/src/components/SchemaEditorLite/Modals/ProcedureNameModal.vue b/frontend/src/components/SchemaEditorLite/Modals/ProcedureNameModal.vueindex 6274c075ee..ed01d9d88e 100644--- a/frontend/src/components/SchemaEditorLite/Modals/ProcedureNameModal.vue+++ b/frontend/src/components/SchemaEditorLite/Modals/ProcedureNameModal.vue@@ -29,6 +29,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import type { InputInst } from "naive-ui";import { NButton, NInput } from "naive-ui";import { computed, onMounted, reactive, ref } from "vue";@@ -43,7 +44,6 @@ import type {import type { ProcedureMetadata } from "@/types/proto-es/v1/database_service_pb";import { ProcedureMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import { useSchemaEditorContext } from "../context";-import { create } from "@bufbuild/protobuf";// Procedure name must start with a non-space character, end with a non-space character.const procedureNameFieldRegexp = /^\S\S*\S?$/;diff --git a/frontend/src/components/SchemaEditorLite/Modals/SchemaNameModal.vue b/frontend/src/components/SchemaEditorLite/Modals/SchemaNameModal.vueindex 96e3507208..5025615c30 100644--- a/frontend/src/components/SchemaEditorLite/Modals/SchemaNameModal.vue+++ b/frontend/src/components/SchemaEditorLite/Modals/SchemaNameModal.vue@@ -25,6 +25,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { NButton, NInput } from "naive-ui";import { reactive } from "vue";import { useI18n } from "vue-i18n";@@ -34,7 +35,6 @@ import type { ComposedDatabase } from "@/types";import type { DatabaseMetadata } from "@/types/proto-es/v1/database_service_pb";import { SchemaMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import { useSchemaEditorContext } from "../context";-import { create } from "@bufbuild/protobuf";const schemaNameFieldRegexp = /^\S+$/;diff --git a/frontend/src/components/SchemaEditorLite/Modals/TableNameModal.vue b/frontend/src/components/SchemaEditorLite/Modals/TableNameModal.vueindex 47192beb9e..151a6db0a1 100644--- a/frontend/src/components/SchemaEditorLite/Modals/TableNameModal.vue+++ b/frontend/src/components/SchemaEditorLite/Modals/TableNameModal.vue@@ -29,6 +29,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import type { InputInst } from "naive-ui";import { NButton, NInput } from "naive-ui";import { computed, onMounted, reactive, ref } from "vue";@@ -41,16 +42,13 @@ import type {DatabaseMetadata,SchemaMetadata,} from "@/types/proto-es/v1/database_service_pb";-import type {- TableMetadata,-} from "@/types/proto-es/v1/database_service_pb";+import type { TableMetadata } from "@/types/proto-es/v1/database_service_pb";import {ColumnMetadataSchema,TableMetadataSchema,} from "@/types/proto-es/v1/database_service_pb";import { useSchemaEditorContext } from "../context";import { upsertColumnPrimaryKey } from "../edit";-import { create } from "@bufbuild/protobuf";// Table name must start with a non-space character, end with a non-space character, and can contain space in between.const tableNameFieldRegexp = /^\S[\S ]*\S?$/;diff --git a/frontend/src/components/SchemaEditorLite/Modals/ViewNameModal.vue b/frontend/src/components/SchemaEditorLite/Modals/ViewNameModal.vueindex 3861b29624..5b27624da8 100644--- a/frontend/src/components/SchemaEditorLite/Modals/ViewNameModal.vue+++ b/frontend/src/components/SchemaEditorLite/Modals/ViewNameModal.vue@@ -29,6 +29,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import type { InputInst } from "naive-ui";import { NButton, NInput } from "naive-ui";import { computed, onMounted, reactive, ref } from "vue";@@ -43,7 +44,6 @@ import type {import type { ViewMetadata } from "@/types/proto-es/v1/database_service_pb";import { ViewMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import { useSchemaEditorContext } from "../context";-import { create } from "@bufbuild/protobuf";// View name must start with a non-space character, end with a non-space character.const viewNameFieldRegexp = /^\S\S*\S?$/;diff --git a/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vueindex 7f2a696925..4bb6263943 100644--- a/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/DatabaseEditor.vue@@ -142,10 +142,14 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { head, sumBy } from "lodash-es";+import { PlusIcon } from "lucide-vue-next";+import { NButton, NSelect, NTooltip } from "naive-ui";+import { computed, nextTick, reactive, watch } from "vue";import SchemaDiagram, { SchemaDiagramIcon } from "@/components/SchemaDiagram";import { Drawer, DrawerContent } from "@/components/v2";import type { ComposedDatabase } from "@/types";-import { Engine } from "@/types/proto-es/v1/common_pb";import type {ColumnMetadata,@@ -157,17 +161,12 @@ import type {TableMetadata as NewTableMetadata,ColumnMetadata as NewColumnMetadata,} from "@/types/proto-es/v1/database_service_pb";-import {+import {TableMetadataSchema,ColumnMetadataSchema,} from "@/types/proto-es/v1/database_service_pb";import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto-es/v1/setting_service_pb";import TableTemplates from "@/views/SchemaTemplate/TableTemplates.vue";-import { head, sumBy } from "lodash-es";-import { create } from "@bufbuild/protobuf";-import { PlusIcon } from "lucide-vue-next";-import { NButton, NSelect, NTooltip } from "naive-ui";-import { computed, nextTick, reactive, watch } from "vue";import TableNameModal from "../Modals/TableNameModal.vue";import { useSchemaEditorContext } from "../context";import TableList from "./TableList";@@ -192,7 +191,6 @@ const emit = defineEmits<{(event: "update:selected-schema-name", schema: string | undefined): void;}>();-// Conversion function for TableMetadata at service boundariesconst convertNewTableToOld = (newTable: NewTableMetadata): TableMetadata => {return create(TableMetadataSchema, {@@ -209,7 +207,9 @@ const convertNewTableToOld = (newTable: NewTableMetadata): TableMetadata => {};// Conversion function for ColumnMetadata at service boundaries-const convertNewColumnToOld = (newColumn: NewColumnMetadata): ColumnMetadata => {+const convertNewColumnToOld = (+ newColumn: NewColumnMetadata+): ColumnMetadata => {return create(ColumnMetadataSchema, {name: newColumn.name,position: newColumn.position,diff --git a/frontend/src/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.vueindex 1c7a70ea8e..4471fd4a60 100644--- a/frontend/src/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.vue@@ -27,6 +27,7 @@</template><script setup lang="tsx">+import { create } from "@bufbuild/protobuf";import { useElementSize } from "@vueuse/core";import { head, pull } from "lodash-es";import { ChevronDownIcon } from "lucide-vue-next";@@ -46,7 +47,6 @@ import {} from "@/types/proto-es/v1/database_service_pb";import type { EditStatus } from "../..";import { useSchemaEditorContext } from "../../context";-import { create } from "@bufbuild/protobuf";import { markUUID } from "../common";import {OperationCell,diff --git a/frontend/src/components/SchemaEditorLite/Panels/PartitionsEditor/components/TypeCell.vue b/frontend/src/components/SchemaEditorLite/Panels/PartitionsEditor/components/TypeCell.vueindex cd6486a248..2574c6bfc6 100644--- a/frontend/src/components/SchemaEditorLite/Panels/PartitionsEditor/components/TypeCell.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/PartitionsEditor/components/TypeCell.vue@@ -19,9 +19,7 @@ import { NSelect, type SelectOption } from "naive-ui";import type { CSSProperties } from "vue";import { computed, ref } from "vue";import type { TablePartitionMetadata } from "@/types/proto-es/v1/database_service_pb";-import {- TablePartitionMetadata_Type,-} from "@/types/proto-es/v1/database_service_pb";+import { TablePartitionMetadata_Type } from "@/types/proto-es/v1/database_service_pb";const props = defineProps<{readonly?: boolean;diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vueindex f7f0d6f01e..cb6f968dea 100644--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue@@ -56,24 +56,22 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { useElementSize } from "@vueuse/core";import { pick } from "lodash-es";import type { DataTableColumn, DataTableInst } from "naive-ui";import { NCheckbox, NDataTable } from "naive-ui";import { computed, h, reactive, ref } from "vue";-import { create } from "@bufbuild/protobuf";import { useI18n } from "vue-i18n";import ClassificationCell from "@/components/ColumnDataTable/ClassificationCell.vue";import LabelEditorDrawer from "@/components/LabelEditorDrawer.vue";import SemanticTypesDrawer from "@/components/SensitiveData/components/SemanticTypesDrawer.vue";import { InlineInput } from "@/components/v2";import { useSettingV1Store, hasFeature } from "@/store";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import type { ComposedDatabase } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import type { ColumnCatalog } from "@/types/proto-es/v1/database_catalog_service_pb";import { ColumnCatalogSchema } from "@/types/proto-es/v1/database_catalog_service_pb";-import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";import type {ColumnMetadata,DatabaseMetadata,@@ -81,6 +79,8 @@ import type {SchemaMetadata,TableMetadata,} from "@/types/proto-es/v1/database_service_pb";+import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import ColumnDefaultValueExpressionModal from "../../Modals/ColumnDefaultValueExpressionModal.vue";import { useSchemaEditorContext } from "../../context";import type { EditStatus } from "../../types";@@ -239,7 +239,9 @@ const markColumnStatus = (};const semanticTypeList = computed(() => {- const setting = settingStore.getSettingByName(Setting_SettingName.SEMANTIC_TYPES);+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SEMANTIC_TYPES+ );if (setting?.value?.value?.case === "semanticTypeSettingValue") {return setting.value.value.value.types ?? [];}@@ -627,7 +629,9 @@ const isColumnPrimaryKey = (column: ColumnMetadata): boolean => {};const schemaTemplateColumnTypes = computed(() => {- const setting = settingStore.getSettingByName(Setting_SettingName.SCHEMA_TEMPLATE);+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SCHEMA_TEMPLATE+ );if (setting?.value?.value?.case === "schemaTemplateSettingValue") {const columnTypes = setting.value.value.value.columnTypes;if (columnTypes && columnTypes.length > 0) {diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DefaultValueCell.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DefaultValueCell.vueindex 648459e35c..0306245344 100644--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DefaultValueCell.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/components/DefaultValueCell.vue@@ -125,13 +125,21 @@ const placeholder = computed(() => {// Computed property for engines that use simple input (PostgreSQL, MySQL, and MSSQL)const useSimpleInput = computed(() => {- return props.engine === Engine.POSTGRES || props.engine === Engine.MYSQL || props.engine === Engine.MSSQL;+ return (+ props.engine === Engine.POSTGRES ||+ props.engine === Engine.MYSQL ||+ props.engine === Engine.MSSQL+ );});const simpleInputValue = computed(() => {// For PostgreSQL, we use defaultString field which contains the schema-qualified expression// For MySQL and MSSQL, we also use defaultString for now (until proto types are updated)- if (props.engine === Engine.POSTGRES || props.engine === Engine.MYSQL || props.engine === Engine.MSSQL) {+ if (+ props.engine === Engine.POSTGRES ||+ props.engine === Engine.MYSQL ||+ props.engine === Engine.MSSQL+ ) {return props.column.defaultString || "";}return "";diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vueindex 14fae848ee..8ef8502f1e 100644--- a/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/TableEditor.vue@@ -185,6 +185,12 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { cloneDeep, head, pull } from "lodash-es";+import { ArrowLeftIcon, PlusIcon } from "lucide-vue-next";+import { NButton } from "naive-ui";+import { computed, reactive, ref } from "vue";+import { useI18n } from "vue-i18n";import { IndexIcon, TablePartitionIcon } from "@/components/Icon";import { Drawer, DrawerContent } from "@/components/v2";import { pushNotification } from "@/store/modules";@@ -216,12 +222,6 @@ import {randomString,} from "@/utils";import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";-import { cloneDeep, head, pull } from "lodash-es";-import { create } from "@bufbuild/protobuf";-import { ArrowLeftIcon, PlusIcon } from "lucide-vue-next";-import { NButton } from "naive-ui";-import { computed, reactive, ref } from "vue";-import { useI18n } from "vue-i18n";import EditColumnForeignKeyModal from "../Modals/EditColumnForeignKeyModal.vue";import { useSchemaEditorContext } from "../context";import {@@ -280,9 +280,10 @@ const {selectionEnabled,} = useSchemaEditorContext();-// Conversion function for ColumnMetadata at service boundaries-const convertNewColumnToOld = (newColumn: NewColumnMetadata): ColumnMetadata => {+const convertNewColumnToOld = (+ newColumn: NewColumnMetadata+): ColumnMetadata => {return create(ColumnMetadataSchema, {name: newColumn.name,position: newColumn.position,diff --git a/frontend/src/components/SchemaEditorLite/Panels/ViewEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/ViewEditor.vueindex be3b0365f9..37d12f53f5 100644--- a/frontend/src/components/SchemaEditorLite/Panels/ViewEditor.vue+++ b/frontend/src/components/SchemaEditorLite/Panels/ViewEditor.vue@@ -19,6 +19,7 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";import { computed } from "vue";import type { ComposedDatabase } from "@/types";@@ -27,11 +28,8 @@ import type {ViewMetadata,SchemaMetadata,} from "@/types/proto-es/v1/database_service_pb";-import {- DatabaseMetadataSchema,-} from "@/types/proto-es/v1/database_service_pb";+import { DatabaseMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import { useSchemaEditorContext } from "../context";-import { create } from "@bufbuild/protobuf";import type { EditStatus } from "../types";import CommonCodeEditor from "./CommonCodeEditor.vue";import PreviewPane from "./PreviewPane.vue";diff --git a/frontend/src/components/SchemaEditorLite/SchemaEditorLite.vue b/frontend/src/components/SchemaEditorLite/SchemaEditorLite.vueindex a4b7100a8a..30500aa744 100644--- a/frontend/src/components/SchemaEditorLite/SchemaEditorLite.vue+++ b/frontend/src/components/SchemaEditorLite/SchemaEditorLite.vue@@ -63,7 +63,9 @@ const state = reactive<LocalState>({// Prepare schema template contexts.onMounted(async () => {- await settingStore.getOrFetchSettingByName(Setting_SettingName.SCHEMA_TEMPLATE);+ await settingStore.getOrFetchSettingByName(+ Setting_SettingName.SCHEMA_TEMPLATE+ );state.initialized = true;});diff --git a/frontend/src/components/SchemaEditorLite/TabsContainer.vue b/frontend/src/components/SchemaEditorLite/TabsContainer.vueindex 41e9716f99..de46d0ae00 100644--- a/frontend/src/components/SchemaEditorLite/TabsContainer.vue+++ b/frontend/src/components/SchemaEditorLite/TabsContainer.vue@@ -93,13 +93,8 @@ const emit = defineEmits<{}>();const { t } = useI18n();-const {- tabList,- currentTab,- setCurrentTab,- closeTab,- getTableStatus,-} = useSchemaEditorContext();+const { tabList, currentTab, setCurrentTab, closeTab, getTableStatus } =+ useSchemaEditorContext();const tabsContainerRef = ref();const searchPattern = ref("");const originalTabContext = ref<TabContext | undefined>(undefined);diff --git a/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts b/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.tsindex 3d60ba7f3d..dc8bc4bb9a 100644--- a/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts+++ b/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts@@ -1,5 +1,5 @@-import { cloneDeep, isEqual, pick } from "lodash-es";import { create } from "@bufbuild/protobuf";+import { cloneDeep, isEqual, pick } from "lodash-es";import type { ComposedDatabase } from "@/types";import type {DatabaseCatalog,@@ -822,7 +822,7 @@ export class DiffMerge {name: table.name,kind: {case: "columns",- value: create(TableCatalog_ColumnsSchema, {})+ value: create(TableCatalog_ColumnsSchema, {}),},}),targetTableCatalog ??@@ -830,7 +830,7 @@ export class DiffMerge {name: table.name,kind: {case: "columns",- value: create(TableCatalog_ColumnsSchema, {})+ value: create(TableCatalog_ColumnsSchema, {}),},}));@@ -907,7 +907,7 @@ export class DiffMerge {case: "columns",value: create(TableCatalog_ColumnsSchema, {columns: mergedColumnCatalogs,- })+ }),};this.timer.end("mergeColumnCatalog", table.columns.length);}diff --git a/frontend/src/components/SchemaEditorLite/algorithm/utils.ts b/frontend/src/components/SchemaEditorLite/algorithm/utils.tsindex 63c540ca85..be639ff24f 100644--- a/frontend/src/components/SchemaEditorLite/algorithm/utils.ts+++ b/frontend/src/components/SchemaEditorLite/algorithm/utils.ts@@ -1,12 +1,10 @@+import { create } from "@bufbuild/protobuf";import type {TableCatalog,SchemaCatalog,DatabaseCatalog,} from "@/types/proto-es/v1/database_catalog_service_pb";-import {- TableCatalog_ColumnsSchema,-} from "@/types/proto-es/v1/database_catalog_service_pb";-import { create } from "@bufbuild/protobuf";+import { TableCatalog_ColumnsSchema } from "@/types/proto-es/v1/database_catalog_service_pb";import type {DatabaseMetadata,SchemaMetadata,@@ -27,11 +25,11 @@ export const cleanupUnusedCatalog = (if (tableCatalog.kind?.case !== "columns") {tableCatalog.kind = {case: "columns",- value: create(TableCatalog_ColumnsSchema, {})+ value: create(TableCatalog_ColumnsSchema, {}),};}- tableCatalog.kind.value.columns = tableCatalog.kind.value.columns.filter((cc) =>- columnMap.has(cc.name)+ tableCatalog.kind.value.columns = tableCatalog.kind.value.columns.filter(+ (cc) => columnMap.has(cc.name));};const cleanupTableCatalog = (diff --git a/frontend/src/components/SchemaEditorLite/common.ts b/frontend/src/components/SchemaEditorLite/common.tsindex 6cb42b5f69..10364f1d2c 100644--- a/frontend/src/components/SchemaEditorLite/common.ts+++ b/frontend/src/components/SchemaEditorLite/common.ts@@ -1,18 +1,16 @@-import { isEqual } from "lodash-es";-+import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";+import { isEqual } from "lodash-es";import { sqlServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";-import { t } from "@/plugins/i18n";import { useSettingV1Store } from "@/store";import type { ComposedDatabase } from "@/types";import type { DatabaseCatalog } from "@/types/proto-es/v1/database_catalog_service_pb";import type { DatabaseMetadata } from "@/types/proto-es/v1/database_service_pb";+import { DiffMetadataRequestSchema } from "@/types/proto-es/v1/sql_service_pb";import { extractGrpcErrorMessage } from "@/utils/grpcweb";import { validateDatabaseMetadata } from "./utils";-import { create } from "@bufbuild/protobuf";-import { DiffMetadataRequestSchema } from "@/types/proto-es/v1/sql_service_pb";export type GenerateDiffDDLResult = {statement: string;@@ -60,7 +58,7 @@ export const generateDiffDDL = async ({database.projectEntity.dataClassificationConfigId);- const newRequest = create(DiffMetadataRequestSchema,{+ const newRequest = create(DiffMetadataRequestSchema, {sourceMetadata: sourceMetadata,targetMetadata: targetMetadata,sourceCatalog,@@ -69,9 +67,12 @@ export const generateDiffDDL = async ({classificationFromConfig:classificationConfig?.classificationFromConfig ?? false,});- const diffResponse = await sqlServiceClientConnect.diffMetadata(newRequest, {- contextValues: createContextValues().set(silentContextKey, true),- });+ const diffResponse = await sqlServiceClientConnect.diffMetadata(+ newRequest,+ {+ contextValues: createContextValues().set(silentContextKey, true),+ }+ );const { diff } = diffResponse;if (diff.length === 0) {if (diff --git a/frontend/src/components/SchemaEditorLite/edit.ts b/frontend/src/components/SchemaEditorLite/edit.tsindex 86f3ce813e..85d22407b1 100644--- a/frontend/src/components/SchemaEditorLite/edit.ts+++ b/frontend/src/components/SchemaEditorLite/edit.ts@@ -1,6 +1,6 @@+import { create } from "@bufbuild/protobuf";import { MD5 } from "crypto-js";import { pull, pullAt } from "lodash-es";-import { create } from "@bufbuild/protobuf";import { Engine } from "@/types/proto-es/v1/common_pb";import type {ForeignKeyMetadata,diff --git a/frontend/src/components/SchemaTemplate/FieldTemplateForm.vue b/frontend/src/components/SchemaTemplate/FieldTemplateForm.vueindex fc81e07055..aa4137520f 100644--- a/frontend/src/components/SchemaTemplate/FieldTemplateForm.vue+++ b/frontend/src/components/SchemaTemplate/FieldTemplateForm.vue@@ -238,6 +238,7 @@</template><script lang="ts" setup>+import { create as createProto } from "@bufbuild/protobuf";import { isEqual, cloneDeep } from "lodash-es";import { XIcon, PencilIcon } from "lucide-vue-next";import type { SelectOption } from "naive-ui";@@ -261,12 +262,9 @@ import {MiniActionButton,} from "@/components/v2";import { useSettingV1Store, useNotificationStore } from "@/store";-import { create as createProto } from "@bufbuild/protobuf";import { ColumnCatalogSchema } from "@/types/proto-es/v1/database_catalog_service_pb";import { ColumnMetadataSchema } from "@/types/proto-es/v1/database_service_pb";-import type {- SchemaTemplateSetting_FieldTemplate,-} from "@/types/proto-es/v1/setting_service_pb";+import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto-es/v1/setting_service_pb";import {SchemaTemplateSetting_FieldTemplateSchema,SchemaTemplateSettingSchema,@@ -297,27 +295,26 @@ interface LocalState extends SchemaTemplateSetting_FieldTemplate {kvList: { key: string; value: string }[];}-const state = reactive<LocalState>(--- {- ...createProto(SchemaTemplateSetting_FieldTemplateSchema, {- id: props.template.id,- engine: props.template.engine,- category: props.template.category,- column: createProto(ColumnMetadataSchema, props.template.column ?? {}),- catalog: createProto(ColumnCatalogSchema, props.template.catalog ?? {}),- }),- showClassificationDrawer: false,- showSemanticTypesDrawer: false,- showColumnDefaultValueExpressionModal: false,+const state = reactive<LocalState>({+ ...createProto(SchemaTemplateSetting_FieldTemplateSchema, {+ id: props.template.id,+ engine: props.template.engine,+ category: props.template.category,+ column: createProto(ColumnMetadataSchema, props.template.column ?? {}),+ catalog: createProto(ColumnCatalogSchema, props.template.catalog ?? {}),+ }),+ showClassificationDrawer: false,+ showSemanticTypesDrawer: false,+ showColumnDefaultValueExpressionModal: false,kvList: [],});const { t } = useI18n();const settingStore = useSettingV1Store();const semanticTypeList = computed(() => {- const setting = settingStore.getSettingByName(Setting_SettingName.SEMANTIC_TYPES);+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SEMANTIC_TYPES+ );if (!setting?.value?.value) return [];const value = setting.value.value;if (value.case === "semanticTypeSettingValue") {@@ -390,7 +387,9 @@ const defaultValueOptions = computed(() => {});const schemaTemplateColumnTypes = computed(() => {- const setting = settingStore.getSettingByName(Setting_SettingName.SCHEMA_TEMPLATE);+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SCHEMA_TEMPLATE+ );if (!setting?.value?.value) return [];const value = setting.value.value;if (value.case !== "schemaTemplateSettingValue") return [];@@ -443,7 +442,10 @@ const submit = async () => {);let settingValue = createProto(SchemaTemplateSettingSchema, {});- if (setting?.value?.value && setting.value.value.case === "schemaTemplateSettingValue") {+ if (+ setting?.value?.value &&+ setting.value.value.case === "schemaTemplateSettingValue"+ ) {settingValue = cloneDeep(setting.value.value.value);}diff --git a/frontend/src/components/SchemaTemplate/FieldTemplateTable.vue b/frontend/src/components/SchemaTemplate/FieldTemplateTable.vueindex db312914d5..9df4907e1f 100644--- a/frontend/src/components/SchemaTemplate/FieldTemplateTable.vue+++ b/frontend/src/components/SchemaTemplate/FieldTemplateTable.vue@@ -10,6 +10,7 @@</template><script lang="tsx" setup>+import { create as createProto } from "@bufbuild/protobuf";import { pullAt } from "lodash-es";import { PencilIcon, TrashIcon } from "lucide-vue-next";import { NPopconfirm, NDataTable } from "naive-ui";@@ -20,7 +21,6 @@ import { getColumnDefaultValuePlaceholder } from "@/components/SchemaEditorLite"import { MiniActionButton } from "@/components/v2";import { DatabaseLabelsCell } from "@/components/v2/Model/DatabaseV1Table/cells";import { useSettingV1Store } from "@/store";-import { create as createProto } from "@bufbuild/protobuf";import type { Engine } from "@/types/proto-es/v1/common_pb";import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto-es/v1/setting_service_pb";import {@@ -176,7 +176,10 @@ const deleteTemplate = async (id: string) => {);let settingValue = createProto(SchemaTemplateSettingSchema, {});- if (setting?.value?.value && setting.value.value.case === "schemaTemplateSettingValue") {+ if (+ setting?.value?.value &&+ setting.value.value.case === "schemaTemplateSettingValue"+ ) {settingValue = setting.value.value.value;}@@ -197,7 +200,9 @@ const deleteTemplate = async (id: string) => {};const semanticTypeList = computed(() => {- const setting = settingStore.getSettingByName(Setting_SettingName.SEMANTIC_TYPES);+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SEMANTIC_TYPES+ );if (!setting?.value?.value) return [];const value = setting.value.value;if (value.case === "semanticTypeSettingValue") {diff --git a/frontend/src/components/SchemaTemplate/TableTemplateForm.vue b/frontend/src/components/SchemaTemplate/TableTemplateForm.vueindex 9989d0a315..f7c3e8430e 100644--- a/frontend/src/components/SchemaTemplate/TableTemplateForm.vue+++ b/frontend/src/components/SchemaTemplate/TableTemplateForm.vue@@ -177,6 +177,13 @@</template><script lang="ts" setup>+import { create as createProto } from "@bufbuild/protobuf";+import { cloneDeep, isEqual, pull } from "lodash-es";+import { PencilIcon, PlusIcon, XIcon } from "lucide-vue-next";+import type { SelectOption } from "naive-ui";+import { NButton, NInput } from "naive-ui";+import { computed, reactive, ref, toRef } from "vue";+import { useI18n } from "vue-i18n";import {TableColumnEditor,provideSchemaEditorContext,@@ -196,9 +203,9 @@ import {import { pushNotification, useSettingV1Store } from "@/store";import { unknownProject } from "@/types";import { TableCatalogSchema } from "@/types/proto-es/v1/database_catalog_service_pb";-import {+import {ColumnMetadataSchema,- type ColumnMetadata+ type ColumnMetadata,} from "@/types/proto-es/v1/database_service_pb";import { type ColumnMetadata as OldColumnMetadata } from "@/types/proto-es/v1/database_service_pb";import {@@ -208,15 +215,8 @@ import {type SchemaTemplateSetting_TableTemplate,ValueSchema as SettingValueSchema,} from "@/types/proto-es/v1/setting_service_pb";-import { create as createProto } from "@bufbuild/protobuf";import { arraySwap, instanceV1AllowsReorderColumns } from "@/utils";import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";-import { cloneDeep, isEqual, pull } from "lodash-es";-import { PencilIcon, PlusIcon, XIcon } from "lucide-vue-next";-import type { SelectOption } from "naive-ui";-import { NButton, NInput } from "naive-ui";-import { computed, reactive, ref, toRef } from "vue";-import { useI18n } from "vue-i18n";import ClassificationLevelBadge from "./ClassificationLevelBadge.vue";import SelectClassificationDrawer from "./SelectClassificationDrawer.vue";import {@@ -349,7 +349,7 @@ const submitDisabled = computed(() => {const onSubmit = async () => {const template = rebuildTableTemplateFromMetadata({...editing.value,- tableCatalog: tableCatalog.value+ tableCatalog: tableCatalog.value? tableCatalog.value: createProto(TableCatalogSchema, {}),});@@ -357,9 +357,10 @@ const onSubmit = async () => {Setting_SettingName.SCHEMA_TEMPLATE);- const existingValue = setting?.value?.value?.case === "schemaTemplateSettingValue"- ? setting.value.value.value- : undefined;+ const existingValue =+ setting?.value?.value?.case === "schemaTemplateSettingValue"+ ? setting.value.value.value+ : undefined;const settingValue = createProto(SchemaTemplateSettingSchema, {columnTypes: existingValue?.columnTypes ?? [],fieldTemplates: existingValue?.fieldTemplates ?? [],diff --git a/frontend/src/components/SchemaTemplate/TableTemplateTable.vue b/frontend/src/components/SchemaTemplate/TableTemplateTable.vueindex 1295c72354..8262568c8c 100644--- a/frontend/src/components/SchemaTemplate/TableTemplateTable.vue+++ b/frontend/src/components/SchemaTemplate/TableTemplateTable.vue@@ -10,6 +10,7 @@</template><script lang="tsx" setup>+import { create as createProto } from "@bufbuild/protobuf";import { pullAt } from "lodash-es";import { PencilIcon, TrashIcon } from "lucide-vue-next";import { NPopconfirm, NDataTable } from "naive-ui";@@ -25,7 +26,6 @@ import {Setting_SettingName,ValueSchema as SettingValueSchema,} from "@/types/proto-es/v1/setting_service_pb";-import { create as createProto } from "@bufbuild/protobuf";import { EngineIcon } from "../Icon";import ClassificationLevelBadge from "./ClassificationLevelBadge.vue";import { classificationConfig } from "./utils";@@ -140,9 +140,10 @@ const deleteTemplate = async (id: string) => {Setting_SettingName.SCHEMA_TEMPLATE);- const existingValue = setting?.value?.value?.case === "schemaTemplateSettingValue"- ? setting.value.value.value- : undefined;+ const existingValue =+ setting?.value?.value?.case === "schemaTemplateSettingValue"+ ? setting.value.value.value+ : undefined;const settingValue = createProto(SchemaTemplateSettingSchema, {fieldTemplates: existingValue?.fieldTemplates || [],columnTypes: existingValue?.columnTypes || [],diff --git a/frontend/src/components/SchemaTemplate/utils.ts b/frontend/src/components/SchemaTemplate/utils.tsindex 13b743fc95..711226b8e7 100644--- a/frontend/src/components/SchemaTemplate/utils.ts+++ b/frontend/src/components/SchemaTemplate/utils.ts@@ -1,6 +1,6 @@+import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";import { computed, reactive } from "vue";-import { create } from "@bufbuild/protobuf";import { useSettingV1Store } from "@/store";import { unknownDatabase, type ComposedDatabase } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";@@ -29,30 +29,37 @@ import {export const engineList = [Engine.MYSQL, Engine.POSTGRES];// Create empty schema template table template-export const createEmptyTableTemplate = (): SchemaTemplateSetting_TableTemplate => {- return create(SchemaTemplateSetting_TableTemplateSchema, {- id: "",- category: "",- engine: Engine.ENGINE_UNSPECIFIED,- table: create(TableMetadataSchema, {}),- catalog: create(TableCatalogSchema, {- name: "",- kind: {- case: "columns",- value: create(TableCatalog_ColumnsSchema, {}),- },- }),- });-};+export const createEmptyTableTemplate =+ (): SchemaTemplateSetting_TableTemplate => {+ return create(SchemaTemplateSetting_TableTemplateSchema, {+ id: "",+ category: "",+ engine: Engine.ENGINE_UNSPECIFIED,+ table: create(TableMetadataSchema, {}),+ catalog: create(TableCatalogSchema, {+ name: "",+ kind: {+ case: "columns",+ value: create(TableCatalog_ColumnsSchema, {}),+ },+ }),+ });+ };export const categoryList = computed(() => {const settingStore = useSettingV1Store();- const setting = settingStore.getSettingByName(Setting_SettingName.SCHEMA_TEMPLATE);-- if (!setting || !setting.value || setting.value.value.case !== "schemaTemplateSettingValue") {+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SCHEMA_TEMPLATE+ );++ if (+ !setting ||+ !setting.value ||+ setting.value.value.case !== "schemaTemplateSettingValue"+ ) {return [];}-+const schemaTemplateSetting = setting.value.value.value;const fieldTemplateList = schemaTemplateSetting.fieldTemplates ?? [];const tableTemplateList = schemaTemplateSetting.tableTemplates ?? [];@@ -73,12 +80,18 @@ export const categoryList = computed(() => {export const classificationConfig = computed((): DataClassificationSetting_DataClassificationConfig | undefined => {const settingStore = useSettingV1Store();- const setting = settingStore.getSettingByName(Setting_SettingName.DATA_CLASSIFICATION);-- if (!setting || !setting.value || setting.value.value.case !== "dataClassificationSettingValue") {+ const setting = settingStore.getSettingByName(+ Setting_SettingName.DATA_CLASSIFICATION+ );++ if (+ !setting ||+ !setting.value ||+ setting.value.value.case !== "dataClassificationSettingValue"+ ) {return undefined;}-+const configs = setting.value.value.value.configs;return configs.length > 0 ? configs[0] : undefined;}diff --git a/frontend/src/components/SensitiveData/ClassificationView.vue b/frontend/src/components/SensitiveData/ClassificationView.vueindex 253a815019..ed2b285986 100644--- a/frontend/src/components/SensitiveData/ClassificationView.vue+++ b/frontend/src/components/SensitiveData/ClassificationView.vue@@ -92,6 +92,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { head, isEqual, isEmpty } from "lodash-es";import { UploadIcon } from "lucide-vue-next";import { NSwitch, useDialog, NDivider, NButton } from "naive-ui";@@ -112,7 +113,6 @@ import {Setting_SettingName,ValueSchema as SettingValueSchema,} from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";import LearnMoreLink from "../LearnMoreLink.vue";@@ -155,13 +155,16 @@ const hasClassificationConfig = computed(const state = reactive<LocalState>({showExampleModal: false,- classification: create(DataClassificationSetting_DataClassificationConfigSchema, {- id: uuidv4(),- title: "",- levels: [],- classification: {},- classificationFromConfig: false,- }),+ classification: create(+ DataClassificationSetting_DataClassificationConfigSchema,+ {+ id: uuidv4(),+ title: "",+ levels: [],+ classification: {},+ classificationFromConfig: false,+ }+ ),});// Initialize state with formerConfig@@ -307,11 +310,17 @@ const onFileSelect = (file: File) => {Object.assign(state.classification, {title: data.title || state.classification.title || "",levels: data.levels.map((level) =>- create(DataClassificationSetting_DataClassificationConfig_LevelSchema, level)+ create(+ DataClassificationSetting_DataClassificationConfig_LevelSchema,+ level+ )),classification: Object.values(data.classification).reduce((map, data) => {- map[data.id] = create(DataClassificationSetting_DataClassificationConfig_DataClassificationSchema, data);+ map[data.id] = create(+ DataClassificationSetting_DataClassificationConfig_DataClassificationSchema,+ data+ );return map;},{} as { [key: string]: DataClassification }@@ -365,46 +374,67 @@ const example = {}),],classification: {- "1": create(DataClassificationSetting_DataClassificationConfig_DataClassificationSchema, {- id: "1",- title: "Basic",- description: "",- }),- "1-1": create(DataClassificationSetting_DataClassificationConfig_DataClassificationSchema, {- id: "1-1",- title: "Basic",- description: "",- levelId: "1",- }),- "1-2": create(DataClassificationSetting_DataClassificationConfig_DataClassificationSchema, {- id: "1-2",- title: "Contact",- description: "",- levelId: "2",- }),- "1-3": create(DataClassificationSetting_DataClassificationConfig_DataClassificationSchema, {- id: "1-3",- title: "Health",- description: "",- levelId: "4",- }),- "2": create(DataClassificationSetting_DataClassificationConfig_DataClassificationSchema, {- id: "2",- title: "Relationship",- description: "",- }),- "2-1": create(DataClassificationSetting_DataClassificationConfig_DataClassificationSchema, {- id: "2-1",- title: "Social",- description: "",- levelId: "1",- }),- "2-2": create(DataClassificationSetting_DataClassificationConfig_DataClassificationSchema, {- id: "2-2",- title: "Business",- description: "",- levelId: "3",- }),+ "1": create(+ DataClassificationSetting_DataClassificationConfig_DataClassificationSchema,+ {+ id: "1",+ title: "Basic",+ description: "",+ }+ ),+ "1-1": create(+ DataClassificationSetting_DataClassificationConfig_DataClassificationSchema,+ {+ id: "1-1",+ title: "Basic",+ description: "",+ levelId: "1",+ }+ ),+ "1-2": create(+ DataClassificationSetting_DataClassificationConfig_DataClassificationSchema,+ {+ id: "1-2",+ title: "Contact",+ description: "",+ levelId: "2",+ }+ ),+ "1-3": create(+ DataClassificationSetting_DataClassificationConfig_DataClassificationSchema,+ {+ id: "1-3",+ title: "Health",+ description: "",+ levelId: "4",+ }+ ),+ "2": create(+ DataClassificationSetting_DataClassificationConfig_DataClassificationSchema,+ {+ id: "2",+ title: "Relationship",+ description: "",+ }+ ),+ "2-1": create(+ DataClassificationSetting_DataClassificationConfig_DataClassificationSchema,+ {+ id: "2-1",+ title: "Social",+ description: "",+ levelId: "1",+ }+ ),+ "2-2": create(+ DataClassificationSetting_DataClassificationConfig_DataClassificationSchema,+ {+ id: "2-2",+ title: "Business",+ description: "",+ levelId: "3",+ }+ ),},} satisfies UploadClassificationConfig;</script>diff --git a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vueindex a1a2ae38a2..a26303d56e 100644--- a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue+++ b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue@@ -112,6 +112,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import {PlusIcon,PencilIcon,@@ -137,10 +138,12 @@ import {useProjectV1Store,useInstanceV1Store,} from "@/store";-import { create } from "@bufbuild/protobuf";import type { Policy } from "@/types/proto-es/v1/org_policy_service_pb";import type { MaskingRulePolicy_MaskingRule } from "@/types/proto-es/v1/org_policy_service_pb";-import { MaskingRulePolicySchema, MaskingRulePolicy_MaskingRuleSchema } from "@/types/proto-es/v1/org_policy_service_pb";+import {+ MaskingRulePolicySchema,+ MaskingRulePolicy_MaskingRuleSchema,+} from "@/types/proto-es/v1/org_policy_service_pb";import {PolicyType,PolicyResourceType,@@ -203,9 +206,7 @@ const updateList = async () => {}state.maskingRuleItemList = (- policy.policy?.case === "maskingRulePolicy"- ? policy.policy.value.rules- : []+ policy.policy?.case === "maskingRulePolicy" ? policy.policy.value.rules : []).map((rule) => {return {mode: "NORMAL",diff --git a/frontend/src/components/SensitiveData/GrantAccessForm.vue b/frontend/src/components/SensitiveData/GrantAccessForm.vueindex 54502598fc..ceee11ce20 100644--- a/frontend/src/components/SensitiveData/GrantAccessForm.vue+++ b/frontend/src/components/SensitiveData/GrantAccessForm.vue@@ -97,6 +97,7 @@</template><script lang="tsx" setup>+import { create } from "@bufbuild/protobuf";import { isUndefined } from "lodash-es";import { NButton, NCheckbox, NDatePicker, NInput } from "naive-ui";import { computed, reactive } from "vue";@@ -106,7 +107,6 @@ import MembersBindingSelect from "@/components/Member/MembersBindingSelect.vue";import FormLayout from "@/components/v2/Form/FormLayout.vue";import { usePolicyV1Store, pushNotification } from "@/store";import type { DatabaseResource } from "@/types";-import { create } from "@bufbuild/protobuf";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import type {Policy,@@ -254,7 +254,7 @@ const getPendingUpdatePolicy = async (parentPath,policyType: PolicyType.MASKING_EXCEPTION,});- const existed =+ const existed =policy?.policy?.case === "maskingExceptionPolicy"? policy.policy.value.maskingExceptions: [];diff --git a/frontend/src/components/SensitiveData/MaskingExceptionUserTable.vue b/frontend/src/components/SensitiveData/MaskingExceptionUserTable.vueindex 6f68d01a9e..688ed56a6f 100644--- a/frontend/src/components/SensitiveData/MaskingExceptionUserTable.vue+++ b/frontend/src/components/SensitiveData/MaskingExceptionUserTable.vue@@ -13,6 +13,7 @@</template><script lang="tsx" setup>+import { create } from "@bufbuild/protobuf";import { orderBy } from "lodash-es";import { TrashIcon, InfoIcon } from "lucide-vue-next";import type { DataTableColumn } from "naive-ui";@@ -48,7 +49,6 @@ import {isValidDatabaseName,type ComposedProject,} from "@/types";-import { create } from "@bufbuild/protobuf";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import { MaskingExceptionPolicy_MaskingException_Action } from "@/types/proto-es/v1/org_policy_service_pb";import type { MaskingExceptionPolicy_MaskingException } from "@/types/proto-es/v1/org_policy_service_pb";diff --git a/frontend/src/components/SensitiveData/SemanticTypesView.vue b/frontend/src/components/SensitiveData/SemanticTypesView.vueindex 77a853a165..2e80b7a674 100644--- a/frontend/src/components/SensitiveData/SemanticTypesView.vue+++ b/frontend/src/components/SensitiveData/SemanticTypesView.vue@@ -37,6 +37,7 @@/></template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { PlusIcon } from "lucide-vue-next";import { NButton } from "naive-ui";import { v4 as uuidv4 } from "uuid";@@ -44,8 +45,11 @@ import { computed, reactive, onMounted } from "vue";import { useI18n } from "vue-i18n";import { featureToRef, pushNotification, useSettingV1Store } from "@/store";import type { SemanticTypeSetting_SemanticType } from "@/types/proto-es/v1/setting_service_pb";-import { SemanticTypeSetting_SemanticTypeSchema, Setting_SettingName, ValueSchema as SettingValueSchema } from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";+import {+ SemanticTypeSetting_SemanticTypeSchema,+ Setting_SettingName,+ ValueSchema as SettingValueSchema,+} from "@/types/proto-es/v1/setting_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";import SemanticTemplateDrawer from "./components/SemanticTemplateDrawer.vue";@@ -75,8 +79,8 @@ const semanticTypeSettingValue = computed(() => {const semanticTypeSetting = settingStore.getSettingByName(Setting_SettingName.SEMANTIC_TYPES);- return semanticTypeSetting?.value?.value?.case === "semanticTypeSettingValue"- ? semanticTypeSetting.value.value.value.types ?? []+ return semanticTypeSetting?.value?.value?.case === "semanticTypeSettingValue"+ ? (semanticTypeSetting.value.value.value.types ?? []): [];});@@ -181,9 +185,10 @@ const onCancel = (index: number) => {const semanticTypeSetting = settingStore.getSettingByName(Setting_SettingName.SEMANTIC_TYPES);- const types = semanticTypeSetting?.value?.value?.case === "semanticTypeSettingValue"- ? semanticTypeSetting.value.value.value.types ?? []- : [];+ const types =+ semanticTypeSetting?.value?.value?.case === "semanticTypeSettingValue"+ ? (semanticTypeSetting.value.value.value.types ?? [])+ : [];const origin = types.find((s) => s.id === item.item.id);if (!origin) {return;diff --git a/frontend/src/components/SensitiveData/components/MaskingAlgorithmsCreateDrawer.vue b/frontend/src/components/SensitiveData/components/MaskingAlgorithmsCreateDrawer.vueindex 0bebfb5e02..df2c89596a 100644--- a/frontend/src/components/SensitiveData/components/MaskingAlgorithmsCreateDrawer.vue+++ b/frontend/src/components/SensitiveData/components/MaskingAlgorithmsCreateDrawer.vue@@ -296,6 +296,7 @@</Drawer></template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";import { TrashIcon } from "lucide-vue-next";import {@@ -331,7 +332,6 @@ import {Algorithm_RangeMask_SliceSchema,Algorithm_InnerOuterMask_MaskType,} from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";import type { MaskingType } from "./utils";import { getMaskingType } from "./utils";@@ -415,10 +415,22 @@ watch(() => props.algorithm,(algorithm) => {state.maskingType = getMaskingType(algorithm) ?? "full-mask";- state.fullMask = algorithm?.mask?.case === "fullMask" ? algorithm.mask.value : create(FullMaskSchema, {});- state.rangeMask = algorithm?.mask?.case === "rangeMask" ? algorithm.mask.value : cloneDeep(defaultRangeMask.value);- state.md5Mask = algorithm?.mask?.case === "md5Mask" ? algorithm.mask.value : create(MD5MaskSchema, {});- state.innerOuterMask = algorithm?.mask?.case === "innerOuterMask" ? algorithm.mask.value : cloneDeep(defaultInnerOuterMask.value);+ state.fullMask =+ algorithm?.mask?.case === "fullMask"+ ? algorithm.mask.value+ : create(FullMaskSchema, {});+ state.rangeMask =+ algorithm?.mask?.case === "rangeMask"+ ? algorithm.mask.value+ : cloneDeep(defaultRangeMask.value);+ state.md5Mask =+ algorithm?.mask?.case === "md5Mask"+ ? algorithm.mask.value+ : create(MD5MaskSchema, {});+ state.innerOuterMask =+ algorithm?.mask?.case === "innerOuterMask"+ ? algorithm.mask.value+ : cloneDeep(defaultInnerOuterMask.value);});diff --git a/frontend/src/components/SensitiveData/components/MaskingRuleConfig.vue b/frontend/src/components/SensitiveData/components/MaskingRuleConfig.vueindex 9d2ef61eec..9080ec913b 100644--- a/frontend/src/components/SensitiveData/components/MaskingRuleConfig.vue+++ b/frontend/src/components/SensitiveData/components/MaskingRuleConfig.vue@@ -83,6 +83,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { head } from "lodash-es";import { TrashIcon } from "lucide-vue-next";import type { SelectOption } from "naive-ui";@@ -100,6 +101,7 @@ import {emptySimpleExpr,} from "@/plugins/cel";import { useSettingV1Store } from "@/store";+import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import type { MaskingRulePolicy_MaskingRule } from "@/types/proto-es/v1/org_policy_service_pb";import type { SemanticTypeSetting_SemanticType as SemanticType } from "@/types/proto-es/v1/setting_service_pb";import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";@@ -108,8 +110,6 @@ import {batchConvertParsedExprToCELString,} from "@/utils";import { factorSupportDropdown, factorOperatorOverrideMap } from "./utils";-import { create } from "@bufbuild/protobuf";-import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";export interface SemanticTypeSelectOption extends SelectOption {value: string;diff --git a/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue b/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vueindex 16c0e60557..d766d8be88 100644--- a/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue+++ b/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue@@ -11,6 +11,7 @@</template><script lang="tsx" setup>+import { create } from "@bufbuild/protobuf";import { TrashIcon } from "lucide-vue-next";import { NDataTable, NPopconfirm, type DataTableColumn } from "naive-ui";import { computed, h, ref, watch, withModifiers } from "vue";@@ -27,7 +28,6 @@ import {useDatabaseCatalog,} from "@/store";import type { ComposedDatabase } from "@/types";-import { create } from "@bufbuild/protobuf";import { DataClassificationSetting_DataClassificationConfigSchema } from "@/types/proto-es/v1/setting_service_pb";import { autoDatabaseRoute } from "@/utils";diff --git a/frontend/src/components/SensitiveData/components/utils.ts b/frontend/src/components/SensitiveData/components/utils.tsindex 4bd99310a6..ee480ee79e 100644--- a/frontend/src/components/SensitiveData/components/utils.ts+++ b/frontend/src/components/SensitiveData/components/utils.ts@@ -1,3 +1,4 @@+import { create } from "@bufbuild/protobuf";import { uniq } from "lodash-es";import type { SelectOption } from "naive-ui";import { getRenderOptionFunc } from "@/components/CustomApproval/Settings/components/common";@@ -6,11 +7,10 @@ import { EqualityOperatorList, CollectionOperatorList } from "@/plugins/cel";import { useSettingV1Store } from "@/store";import type { ComposedInstance } from "@/types";import type { Algorithm } from "@/types/proto-es/v1/setting_service_pb";-import {+import {Setting_SettingName,AlgorithmSchema,} from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";import { extractInstanceResourceName } from "@/utils";export const getClassificationLevelOptions = () => {@@ -21,10 +21,11 @@ export const getClassificationLevelOptions = () => {if (!setting || !setting.value) {return [];}-- const config = setting.value.value.case === "dataClassificationSettingValue"- ? setting.value.value.value.configs- : [];++ const config =+ setting.value.value.case === "dataClassificationSettingValue"+ ? setting.value.value.value.configs+ : [];if (config.length === 0) {return [];}@@ -93,7 +94,9 @@ export const createFullMaskAlgorithm = (substitution = "*"): Algorithm => {});};-export const createRangeMaskAlgorithm = (slices: { start: number; end: number; substitution: string }[]): Algorithm => {+export const createRangeMaskAlgorithm = (+ slices: { start: number; end: number; substitution: string }[]+): Algorithm => {return create(AlgorithmSchema, {mask: {case: "rangeMask",@@ -111,7 +114,11 @@ export const createMd5MaskAlgorithm = (salt = ""): Algorithm => {});};-export const createInnerOuterMaskAlgorithm = (prefixLen = 0, suffixLen = 0, substitution = "*"): Algorithm => {+export const createInnerOuterMaskAlgorithm = (+ prefixLen = 0,+ suffixLen = 0,+ substitution = "*"+): Algorithm => {return create(AlgorithmSchema, {mask: {case: "innerOuterMask",diff --git a/frontend/src/components/SensitiveData/useSemanticType.ts b/frontend/src/components/SensitiveData/useSemanticType.tsindex 098b6a2453..6bf6dad04a 100644--- a/frontend/src/components/SensitiveData/useSemanticType.ts+++ b/frontend/src/components/SensitiveData/useSemanticType.ts@@ -6,7 +6,9 @@ export const useSemanticType = (semanticTypeId: MaybeRef<string>) => {const settingV1Store = useSettingV1Store();const semanticTypeList = computed(() => {- const setting = settingV1Store.getSettingByName(Setting_SettingName.SEMANTIC_TYPES);+ const setting = settingV1Store.getSettingByName(+ Setting_SettingName.SEMANTIC_TYPES+ );if (setting?.value?.value?.case === "semanticTypeSettingValue") {return setting.value.value.value.types ?? [];}diff --git a/frontend/src/components/Sheet/DownloadSheetButton.vue b/frontend/src/components/Sheet/DownloadSheetButton.vueindex 4611a2b6d5..efb645c396 100644--- a/frontend/src/components/Sheet/DownloadSheetButton.vue+++ b/frontend/src/components/Sheet/DownloadSheetButton.vue@@ -5,9 +5,9 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { NButton } from "naive-ui";import { ref } from "vue";-import { create } from "@bufbuild/protobuf";import { sheetServiceClientConnect } from "@/grpcweb";import { GetSheetRequestSchema } from "@/types/proto-es/v1/sheet_service_pb";diff --git a/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue b/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vueindex f6cae7816f..039aafeb06 100644--- a/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue+++ b/frontend/src/components/SyncDatabaseSchemaV1/DatabaseSchemaSelector.vue@@ -254,11 +254,11 @@ watch(if (database) {try {isPreparingSchemaVersionOptions.value = true;- const changelogList = await changelogStore.getOrFetchChangelogListOfDatabase(database.name);- const filteredChangelogList = changelogList- .filter((changelog) =>- ALLOWED_CHANGELOG_TYPES.includes(changelog.type)- );+ const changelogList =+ await changelogStore.getOrFetchChangelogListOfDatabase(database.name);+ const filteredChangelogList = changelogList.filter((changelog) =>+ ALLOWED_CHANGELOG_TYPES.includes(changelog.type)+ );if (filteredChangelogList.length > 0) {// Default select the first changelog.diff --git a/frontend/src/components/SyncDatabaseSchemaV1/SelectTargetDatabasesView.vue b/frontend/src/components/SyncDatabaseSchemaV1/SelectTargetDatabasesView.vueindex 9cb29de923..ab0584cad2 100644--- a/frontend/src/components/SyncDatabaseSchemaV1/SelectTargetDatabasesView.vue+++ b/frontend/src/components/SyncDatabaseSchemaV1/SelectTargetDatabasesView.vue@@ -156,10 +156,10 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { head } from "lodash-es";import { NEllipsis, NTabs, NTabPane } from "naive-ui";import { computed, nextTick, onMounted, reactive, ref, watch } from "vue";-import { create } from "@bufbuild/protobuf";import { useI18n } from "vue-i18n";import { useRoute } from "vue-router";import { BBSpin } from "@/bbkit";@@ -344,7 +344,7 @@ watch(},sdlFormat: false,});-+const diffResp = await databaseStore.diffSchema(diffRequest);const schemaDiff = diffResp.diff ?? "";schemaDiffCache.value[name] = {diff --git a/frontend/src/components/TableDataTable.vue b/frontend/src/components/TableDataTable.vueindex 1553561d2f..787117f4da 100644--- a/frontend/src/components/TableDataTable.vue+++ b/frontend/src/components/TableDataTable.vue@@ -26,6 +26,12 @@</template><script lang="ts" setup>+import type { DataTableColumn } from "naive-ui";+import { NDataTable } from "naive-ui";+import type { PropType } from "vue";+import { computed, h, onMounted, reactive, watch } from "vue";+import { useI18n } from "vue-i18n";+import { useRoute, useRouter } from "vue-router";import ClassificationCell from "@/components/ColumnDataTable/ClassificationCell.vue";import { updateTableCatalog } from "@/components/ColumnDataTable/utils";import {@@ -39,12 +45,6 @@ import { Engine } from "@/types/proto-es/v1/common_pb";import type { TableMetadata } from "@/types/proto-es/v1/database_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { bytesToString, hasSchemaProperty } from "@/utils";-import type { DataTableColumn } from "naive-ui";-import { NDataTable } from "naive-ui";-import type { PropType } from "vue";-import { computed, h, onMounted, reactive, watch } from "vue";-import { useI18n } from "vue-i18n";-import { useRoute, useRouter } from "vue-router";import TableDetailDrawer from "./TableDetailDrawer.vue";type LocalState = {diff --git a/frontend/src/components/TableDetailDrawer.vue b/frontend/src/components/TableDetailDrawer.vueindex cac1d80728..f115638f89 100644--- a/frontend/src/components/TableDetailDrawer.vue+++ b/frontend/src/components/TableDetailDrawer.vue@@ -166,7 +166,9 @@</div><template- v-if="instanceV1HasCollationAndCharacterSet(instanceEngineNew)"+ v-if="+ instanceV1HasCollationAndCharacterSet(instanceEngineNew)+ "><div class="col-span-1"><dt class="text-sm font-medium text-control-light">@@ -301,6 +303,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { computedAsync } from "@vueuse/core";import { cloneDeep } from "lodash-es";import { CodeIcon } from "lucide-vue-next";@@ -327,17 +330,14 @@ import {useDatabaseCatalogV1Store,} from "@/store";import { DEFAULT_PROJECT_NAME, defaultProject } from "@/types";-import type { DataClassificationSetting_DataClassificationConfig } from "@/types/proto-es/v1/setting_service_pb";import { Engine } from "@/types/proto-es/v1/common_pb";-import type {- TableCatalog,-} from "@/types/proto-es/v1/database_catalog_service_pb";+import type { TableCatalog } from "@/types/proto-es/v1/database_catalog_service_pb";import {TableCatalogSchema,SchemaCatalogSchema,} from "@/types/proto-es/v1/database_catalog_service_pb";import { GetSchemaStringRequest_ObjectType } from "@/types/proto-es/v1/database_service_pb";-import { create } from "@bufbuild/protobuf";+import type { DataClassificationSetting_DataClassificationConfig } from "@/types/proto-es/v1/setting_service_pb";import {bytesToString,instanceV1HasCollationAndCharacterSet,diff --git a/frontend/src/components/TableSchemaViewer.vue b/frontend/src/components/TableSchemaViewer.vueindex 8e33eb02d1..527f5f3e71 100644--- a/frontend/src/components/TableSchemaViewer.vue+++ b/frontend/src/components/TableSchemaViewer.vue@@ -20,17 +20,15 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { onMounted, ref, computed } from "vue";import { nextTick } from "vue";import { MonacoEditor } from "@/components/MonacoEditor";import { CopyButton } from "@/components/v2";-import { create } from "@bufbuild/protobuf";import { databaseServiceClientConnect } from "@/grpcweb";import type { ComposedDatabase } from "@/types";import type { GetSchemaStringRequest_ObjectType } from "@/types/proto-es/v1/database_service_pb";-import {- GetSchemaStringRequestSchema,-} from "@/types/proto-es/v1/database_service_pb";+import { GetSchemaStringRequestSchema } from "@/types/proto-es/v1/database_service_pb";import { hasSchemaProperty } from "@/utils";const props = defineProps<{@@ -68,7 +66,8 @@ onMounted(async () => {schema: props.schema,object: props.object,});- const response = await databaseServiceClientConnect.getSchemaString(request);+ const response =+ await databaseServiceClientConnect.getSchemaString(request);schemaString.value = response.schemaString.trim();});});diff --git a/frontend/src/components/TransferDatabaseForm/TransferDatabaseForm.vue b/frontend/src/components/TransferDatabaseForm/TransferDatabaseForm.vueindex e7995a03eb..b6c3849430 100644--- a/frontend/src/components/TransferDatabaseForm/TransferDatabaseForm.vue+++ b/frontend/src/components/TransferDatabaseForm/TransferDatabaseForm.vue@@ -77,6 +77,8 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { NButton, NTooltip } from "naive-ui";import { computed, reactive, watchEffect } from "vue";import { toRef } from "vue";@@ -97,8 +99,6 @@ import {UpdateDatabaseRequestSchema,BatchUpdateDatabasesRequestSchema,} from "@/types/proto-es/v1/database_service_pb";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import type { InstanceResource } from "@/types/proto-es/v1/instance_service_pb";import type { Environment } from "@/types/v1/environment";import { hasProjectPermissionV2 } from "@/utils";diff --git a/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue b/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vueindex d293ae5a4a..4cd6744bce 100644--- a/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue+++ b/frontend/src/components/TransferDatabaseForm/TransferSourceSelector.vue@@ -98,6 +98,9 @@ const changeInstanceFilter = (name: string | undefined) => {return emit("update:instance", undefined);}- emit("update:instance", useInstanceResourceByName(name).instance.value as InstanceResource);+ emit(+ "update:instance",+ useInstanceResourceByName(name).instance.value as InstanceResource+ );};</script>diff --git a/frontend/src/components/TransferOutDatabaseForm/TransferOutDatabaseForm.vue b/frontend/src/components/TransferOutDatabaseForm/TransferOutDatabaseForm.vueindex ec317dcfe5..9e0b390fdd 100644--- a/frontend/src/components/TransferOutDatabaseForm/TransferOutDatabaseForm.vue+++ b/frontend/src/components/TransferOutDatabaseForm/TransferOutDatabaseForm.vue@@ -69,6 +69,8 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { NButton, NTooltip, NDivider, NRadioGroup, NRadio } from "naive-ui";import { computed, ref, watch } from "vue";import { useI18n } from "vue-i18n";@@ -91,8 +93,6 @@ import {UpdateDatabaseRequestSchema,BatchUpdateDatabasesRequestSchema,} from "@/types/proto-es/v1/database_service_pb";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { autoProjectRoute } from "@/utils";import DatabaseV1Table from "../v2/Model/DatabaseV1Table/DatabaseV1Table.vue";diff --git a/frontend/src/components/TrialModal.vue b/frontend/src/components/TrialModal.vueindex a1caf31a30..6ad5a148b1 100644--- a/frontend/src/components/TrialModal.vue+++ b/frontend/src/components/TrialModal.vue@@ -15,9 +15,7 @@</template><template #plan><span class="font-bold text-accent">- {{- $t(`subscription.plan.enterprise.title`)- }}+ {{ $t(`subscription.plan.enterprise.title`) }}</span></template></i18n-t>@@ -48,14 +46,14 @@</template><script lang="ts" setup>+import { NButton } from "naive-ui";+import { reactive } from "vue";+import { useRouter } from "vue-router";import { BBModal } from "@/bbkit";import { useLanguage } from "@/composables/useLanguage";import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";import { useSubscriptionV1Store } from "@/store";import { ENTERPRISE_INQUIRE_LINK } from "@/types";-import { NButton } from "naive-ui";-import { reactive } from "vue";-import { useRouter } from "vue-router";import WeChatQRModal from "./WeChatQRModal.vue";interface LocalState {diff --git a/frontend/src/components/UpgradeSubscriptionButton.vue b/frontend/src/components/UpgradeSubscriptionButton.vueindex 990cdabe67..e1f9c8d1e4 100644--- a/frontend/src/components/UpgradeSubscriptionButton.vue+++ b/frontend/src/components/UpgradeSubscriptionButton.vue@@ -16,14 +16,14 @@</template><script lang="ts" setup>-import { useLanguage } from "@/composables/useLanguage";-import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";-import { useSubscriptionV1Store } from "@/store";-import { ENTERPRISE_INQUIRE_LINK } from "@/types";import { NButton } from "naive-ui";import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";+import { useLanguage } from "@/composables/useLanguage";+import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";+import { useSubscriptionV1Store } from "@/store";+import { ENTERPRISE_INQUIRE_LINK } from "@/types";import WeChatQRModal from "./WeChatQRModal.vue";interface LocalState {diff --git a/frontend/src/components/User/Settings/AADSyncDrawer.vue b/frontend/src/components/User/Settings/AADSyncDrawer.vueindex 2bd564bce3..a04de0677b 100644--- a/frontend/src/components/User/Settings/AADSyncDrawer.vue+++ b/frontend/src/components/User/Settings/AADSyncDrawer.vue@@ -112,6 +112,7 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { ReplyIcon } from "lucide-vue-next";import { NButton, NInput, useDialog } from "naive-ui";import { computed, ref } from "vue";@@ -123,8 +124,11 @@ import { Drawer, DrawerContent } from "@/components/v2";import { CopyButton } from "@/components/v2";import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/router/dashboard/workspaceSetting";import { pushNotification, useSettingV1Store } from "@/store";-import { Setting_SettingName, SCIMSettingSchema, ValueSchema as SettingValueSchema } from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";+import {+ Setting_SettingName,+ SCIMSettingSchema,+ ValueSchema as SettingValueSchema,+} from "@/types/proto-es/v1/setting_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";defineProps<{@@ -147,9 +151,11 @@ const hasPermission = computed(() =>);const workspaceId = computed(() => {- const setting = settingV1Store.getSettingByName(Setting_SettingName.WORKSPACE_ID);- return setting?.value?.value?.case === "stringValue"- ? setting.value.value.value+ const setting = settingV1Store.getSettingByName(+ Setting_SettingName.WORKSPACE_ID+ );+ return setting?.value?.value?.case === "stringValue"+ ? setting.value.value.value: "";});@@ -166,8 +172,8 @@ const scimUrl = computed(() => {const scimToken = computed(() => {const setting = settingV1Store.getSettingByName(Setting_SettingName.SCIM);- return setting?.value?.value?.case === "scimSetting"- ? setting.value.value.value.token ?? ""+ return setting?.value?.value?.case === "scimSetting"+ ? (setting.value.value.value.token ?? ""): "";});diff --git a/frontend/src/components/User/Settings/CreateGroupDrawer.vue b/frontend/src/components/User/Settings/CreateGroupDrawer.vueindex 1b500b0f1a..c7ec1f379b 100644--- a/frontend/src/components/User/Settings/CreateGroupDrawer.vue+++ b/frontend/src/components/User/Settings/CreateGroupDrawer.vue@@ -131,8 +131,8 @@</template><script lang="ts" setup>-import { cloneDeep, isEqual } from "lodash-es";import { create } from "@bufbuild/protobuf";+import { cloneDeep, isEqual } from "lodash-es";import { Trash2Icon } from "lucide-vue-next";import { NButton, NInput, NTooltip } from "naive-ui";import { computed, reactive } from "vue";@@ -151,10 +151,7 @@ import {groupNamePrefix,extractUserId,} from "@/store/modules/v1/common";-import type {- Group,- GroupMember,-} from "@/types/proto-es/v1/group_service_pb";+import type { Group, GroupMember } from "@/types/proto-es/v1/group_service_pb";import {GroupSchema,GroupMemberSchema,diff --git a/frontend/src/components/User/Settings/RemoveGroupButton.vue b/frontend/src/components/User/Settings/RemoveGroupButton.vueindex b10183dc79..c660e424cf 100644--- a/frontend/src/components/User/Settings/RemoveGroupButton.vue+++ b/frontend/src/components/User/Settings/RemoveGroupButton.vue@@ -38,7 +38,10 @@ import {} from "@/store";import { extractUserId } from "@/store/modules/v1/common";import { getGroupEmailInBinding } from "@/types";-import { type Group, GroupMember_Role } from "@/types/proto-es/v1/group_service_pb";+import {+ type Group,+ GroupMember_Role,+} from "@/types/proto-es/v1/group_service_pb";import { PolicyType } from "@/types/proto-es/v1/org_policy_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";@@ -92,7 +95,7 @@ const resourcesOccupied = computedAsync(async () => {policyType: PolicyType.MASKING_EXCEPTION,});- const exceptions =+ const exceptions =policy?.policy?.case === "maskingExceptionPolicy"? policy.policy.value.maskingExceptions: [];diff --git a/frontend/src/components/User/Settings/UserDataTable/index.vue b/frontend/src/components/User/Settings/UserDataTable/index.vueindex f00285a348..f116bb585e 100644--- a/frontend/src/components/User/Settings/UserDataTable/index.vue+++ b/frontend/src/components/User/Settings/UserDataTable/index.vue@@ -21,6 +21,8 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import type { DataTableColumn } from "naive-ui";import { NDataTable } from "naive-ui";import { computed, reactive, h } from "vue";@@ -28,9 +30,10 @@ import { useI18n } from "vue-i18n";import { BBAlert } from "@/bbkit";import { useUserStore, useWorkspaceV1Store, pushNotification } from "@/store";import type { Group } from "@/types/proto-es/v1/group_service_pb";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";-import { type User, UpdateUserRequestSchema } from "@/types/proto-es/v1/user_service_pb";+import {+ type User,+ UpdateUserRequestSchema,+} from "@/types/proto-es/v1/user_service_pb";import { toClipboard } from "@/utils";import GroupsCell from "./cells/GroupsCell.vue";import UserNameCell from "./cells/UserNameCell.vue";@@ -138,14 +141,16 @@ const resetServiceKey = () => {return;}userStore- .updateUser(create(UpdateUserRequestSchema, {- user,- updateMask: create(FieldMaskSchema, {- paths: ["service_key"]- }),- regenerateRecoveryCodes: false,- regenerateTempMfaSecret: false,- }))+ .updateUser(+ create(UpdateUserRequestSchema, {+ user,+ updateMask: create(FieldMaskSchema, {+ paths: ["service_key"],+ }),+ regenerateRecoveryCodes: false,+ regenerateTempMfaSecret: false,+ })+ ).then((updatedUser) => {if (updatedUser.serviceKey) {toClipboard(updatedUser.serviceKey).then(() => {diff --git a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberNameCell.vue b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberNameCell.vueindex 3fb31cd91e..80a1287ed8 100644--- a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberNameCell.vue+++ b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberNameCell.vue@@ -34,13 +34,13 @@>{{(() => {- switch(role) {+ switch (role) {case GroupMember_Role.OWNER:- return $t('settings.members.groups.form.role.owner');+ return $t("settings.members.groups.form.role.owner");case GroupMember_Role.MEMBER:- return $t('settings.members.groups.form.role.member');+ return $t("settings.members.groups.form.role.member");default:- return 'ROLE UNRECOGNIZED';+ return "ROLE UNRECOGNIZED";}})()}}@@ -62,10 +62,8 @@ import SystemBotTag from "@/components/misc/SystemBotTag.vue";import YouTag from "@/components/misc/YouTag.vue";import { useCurrentUserV1, usePermissionStore } from "@/store";import { SYSTEM_BOT_USER_NAME } from "@/types";+import { GroupMember_Role } from "@/types/proto-es/v1/group_service_pb";import { UserType, type User } from "@/types/proto-es/v1/user_service_pb";-import {- GroupMember_Role,-} from "@/types/proto-es/v1/group_service_pb";withDefaults(defineProps<{diff --git a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberRoleSelect.vue b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberRoleSelect.vueindex 3fa0db871f..4ca374a99c 100644--- a/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberRoleSelect.vue+++ b/frontend/src/components/User/Settings/UserDataTableByGroup/cells/GroupMemberRoleSelect.vue@@ -14,9 +14,7 @@import { NSelect, type SelectOption } from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";-import {- GroupMember_Role,-} from "@/types/proto-es/v1/group_service_pb";+import { GroupMember_Role } from "@/types/proto-es/v1/group_service_pb";defineProps<{value: GroupMember_Role;diff --git a/frontend/src/components/User/UserView.vue b/frontend/src/components/User/UserView.vueindex b5808c2a1f..03295d5130 100644--- a/frontend/src/components/User/UserView.vue+++ b/frontend/src/components/User/UserView.vue@@ -9,8 +9,8 @@<script setup lang="ts">import { computed } from "vue";-import type { User } from "@/types/proto-es/v1/user_service_pb";import type { BBAvatarSizeType } from "@/bbkit/types";+import type { User } from "@/types/proto-es/v1/user_service_pb";import UserAvatar from "./UserAvatar.vue";type SizeType = "tiny" | "small" | "normal" | "large";@@ -55,4 +55,4 @@ const textClass = computed(() => {};return sizeClasses[props.size];});-</script>\ No newline at end of file+</script>diff --git a/frontend/src/components/misc/DroppableTextarea.vue b/frontend/src/components/misc/DroppableTextarea.vueindex 75a327c6da..90767d19c4 100644--- a/frontend/src/components/misc/DroppableTextarea.vue+++ b/frontend/src/components/misc/DroppableTextarea.vue@@ -50,15 +50,14 @@ export default {</script><script lang="ts" setup>-import { computed, reactive, ref, watch } from "vue";import { useDropZone, useMutationObserver } from "@vueuse/core";import { head } from "lodash-es";+import { NInput } from "naive-ui";+import { computed, reactive, ref, watch } from "vue";+import { onMounted } from "vue";import { useI18n } from "vue-i18n";--import { pushNotification } from "@/store";import { BBSpin } from "@/bbkit";-import { onMounted } from "vue";-import { NInput } from "naive-ui";+import { pushNotification } from "@/store";import { readFileAsArrayBuffer } from "@/utils";type LocalState = {diff --git a/frontend/src/components/misc/Watermark.vue b/frontend/src/components/misc/Watermark.vueindex e3632b8a10..ef755a1733 100644--- a/frontend/src/components/misc/Watermark.vue+++ b/frontend/src/components/misc/Watermark.vue@@ -35,7 +35,12 @@<script lang="ts" setup>import { NWatermark } from "naive-ui";import { computed } from "vue";-import { featureToRef, useCurrentUserV1, extractUserId, useActuatorV1Store } from "@/store";+import {+ featureToRef,+ useCurrentUserV1,+ extractUserId,+ useActuatorV1Store,+} from "@/store";import { useSettingV1Store } from "@/store/modules/v1/setting";import { UNKNOWN_USER_NAME } from "@/types";import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";@@ -46,7 +51,12 @@ const SIZE = 16;const PADDING = 6;const currentUserV1 = useCurrentUserV1();-const version = computed(() => useActuatorV1Store().version + "-" + useActuatorV1Store().gitCommitBE.substring(0, 7));+const version = computed(+ () =>+ useActuatorV1Store().version ++ "-" ++ useActuatorV1Store().gitCommitBE.substring(0, 7)+);const setting = computed(() =>useSettingV1Store().getSettingByName(Setting_SettingName.WATERMARK));@@ -57,7 +67,11 @@ const lines = computed(() => {const uid = extractUserId(user.name);if (user.name === UNKNOWN_USER_NAME) return [];if (!hasWatermarkFeature.value) return [];- if (setting.value?.value?.value?.case !== "stringValue" || setting.value.value.value.value !== "1") return [];+ if (+ setting.value?.value?.value?.case !== "stringValue" ||+ setting.value.value.value.value !== "1"+ )+ return [];const lines: string[] = [];lines.push(`${user.title} (${uid})`);diff --git a/frontend/src/components/v2/Form/ResourceIdField.vue b/frontend/src/components/v2/Form/ResourceIdField.vueindex 3e850b0035..5eff8273db 100644--- a/frontend/src/components/v2/Form/ResourceIdField.vue+++ b/frontend/src/components/v2/Form/ResourceIdField.vue@@ -3,12 +3,15 @@<template v-if="readonly || !state.manualEdit"><div class="textinfolabel text-sm gap-x-1 flex items-center">{{ $t("resource-id.self", { resource: resourceName }) }}:- <div v-if="state.resourceId" class="text-gray-600 font-medium mr-1 flex items-center gap-x-1">+ <div+ v-if="state.resourceId"+ class="text-gray-600 font-medium mr-1 flex items-center gap-x-1"+ >{{ state.resourceId }}- <CopyButton v-if="readonly" :content="value"/>+ <CopyButton v-if="readonly" :content="value" /></div><span v-else class="text-control-placeholder italic">- {{ "<EMPTY>" }}+ <EMPTY></span><template v-if="!readonly"><span>@@ -59,14 +62,14 @@</template><script lang="ts" setup>+import { Code } from "@connectrpc/connect";import { NInput, type InputProps } from "naive-ui";import { computed, reactive, watch } from "vue";import { useI18n } from "vue-i18n";+import { CopyButton } from "@/components/v2";import type { ResourceId, ValidatedMessage } from "@/types";import { randomString } from "@/utils";import { getErrorCode } from "@/utils/grpcweb";-import { CopyButton } from "@/components/v2"-import { Code } from "@connectrpc/connect";// characters is the validated characters for resource id.const characters = "abcdefghijklmnopqrstuvwxyz1234567890-";diff --git a/frontend/src/components/v2/Form/SpinnerButton.vue b/frontend/src/components/v2/Form/SpinnerButton.vueindex 7fbb421921..dc2b0420e2 100644--- a/frontend/src/components/v2/Form/SpinnerButton.vue+++ b/frontend/src/components/v2/Form/SpinnerButton.vue@@ -27,15 +27,15 @@ defineComponent({</script><script lang="ts" setup>-import { computed, ref, useAttrs } from "vue";import { omit } from "lodash-es";-import type { VueClass } from "@/utils";import {type ButtonProps,type PopconfirmProps,NButton,NPopconfirm,} from "naive-ui";+import { computed, ref, useAttrs } from "vue";+import type { VueClass } from "@/utils";export interface SpinnerButtonProps extends /* @vue-ignore */ ButtonProps {onConfirm: () => Promise<any>;diff --git a/frontend/src/components/v2/Model/EnvironmentV1Table.vue b/frontend/src/components/v2/Model/EnvironmentV1Table.vueindex e40e1bcc69..7a00286450 100644--- a/frontend/src/components/v2/Model/EnvironmentV1Table.vue+++ b/frontend/src/components/v2/Model/EnvironmentV1Table.vue@@ -18,7 +18,10 @@ import { NDataTable, type DataTableColumn } from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";-import { formatEnvironmentName, type Environment } from "@/types/v1/environment";+import {+ formatEnvironmentName,+ type Environment,+} from "@/types/v1/environment";import { EnvironmentV1Name } from ".";withDefaults(diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vueindex 55a09364b7..c59f6b574e 100644--- a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue@@ -43,6 +43,8 @@</template><script setup lang="tsx">+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { GraduationCapIcon, SquareStackIcon } from "lucide-vue-next";import { NButton } from "naive-ui";import type { VNode } from "vue";@@ -57,11 +59,9 @@ import {pushNotification,} from "@/store";import type { ComposedInstance } from "@/types";+import { UpdateInstanceRequestSchema } from "@/types/proto-es/v1/instance_service_pb";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";-import { UpdateInstanceRequestSchema } from "@/types/proto-es/v1/instance_service_pb";interface Action {icon?: VNode;@@ -149,13 +149,15 @@ const syncSchema = async (enableFullSync: boolean) => {const onEnvironmentUpdate = async (environment: string) => {const updated = await instanceStore.batchUpdateInstances(- props.instanceList.map((instance) => create(UpdateInstanceRequestSchema, {- instance: {- ...instance,- environment,- },- updateMask: create(FieldMaskSchema, { paths: ["environment"] }),- }))+ props.instanceList.map((instance) =>+ create(UpdateInstanceRequestSchema, {+ instance: {+ ...instance,+ environment,+ },+ updateMask: create(FieldMaskSchema, { paths: ["environment"] }),+ })+ ));emit("update", updated);pushNotification({diff --git a/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue b/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vueindex 45a0b3cb71..2d8bdce5fe 100644--- a/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue+++ b/frontend/src/components/v2/Model/ProductionEnvironmentV1Icon.vue@@ -16,8 +16,8 @@import { NTooltip } from "naive-ui";import { computed } from "vue";import { featureToRef } from "@/store";-import type { Environment } from "@/types/v1/environment";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";+import type { Environment } from "@/types/v1/environment";const props = withDefaults(defineProps<{@@ -37,6 +37,6 @@ const enabled = computed((): boolean => {if (!hasEnvironmentTierPolicyFeature.value) {return false;}- return props.environment?.tags?.protected === "protected"+ return props.environment?.tags?.protected === "protected";});</script>diff --git a/frontend/src/components/v2/Model/Project/ProjectOperations.vue b/frontend/src/components/v2/Model/Project/ProjectOperations.vueindex 119108766a..0c675c1e43 100644--- a/frontend/src/components/v2/Model/Project/ProjectOperations.vue+++ b/frontend/src/components/v2/Model/Project/ProjectOperations.vue@@ -4,7 +4,7 @@class="text-sm flex flex-col lg:flex-row items-start lg:items-center bg-blue-100 py-3 px-4 text-main gap-y-2 gap-x-4 overflow-x-auto"><span class="whitespace-nowrap">- {{ $t('project.batch.selected', { count: projectList.length }) }}+ {{ $t("project.batch.selected", { count: projectList.length }) }}</span><div class="flex items-center"><template v-for="action in actions" :key="action.text">@@ -25,7 +25,7 @@</template></div></div>-+<BBAlertv-model:show="state.showArchiveConfirm"type="warning"@@ -42,32 +42,43 @@{{ $t("project.batch.force-archive-description") }}</div></NCheckbox>-+<!-- Project List --><div class="max-h-40 overflow-y-auto border rounded p-2 bg-gray-50"><div class="text-xs font-medium text-gray-600 mb-2">- {{ $t('project.batch.projects-to-archive') }}:+ {{ $t("project.batch.projects-to-archive") }}:</div><div class="space-y-1">- <div v-for="project in projectList" :key="project.name"- class="text-sm flex items-center space-x-2">+ <div+ v-for="project in projectList"+ :key="project.name"+ class="text-sm flex items-center space-x-2"+ ><CheckIcon class="w-3 h-3 text-green-600" /><span>{{ project.title }}</span>- <span class="text-gray-500">({{ extractProjectResourceName(project.name) }})</span>+ <span class="text-gray-500"+ >({{ extractProjectResourceName(project.name) }})</span+ ></div></div></div><!-- Warning for projects with resources -->- <NAlert v-if="projectsWithResources.length > 0" type="warning" size="small">+ <NAlert+ v-if="projectsWithResources.length > 0"+ type="warning"+ size="small"+ ><template #header>- {{ $t('project.batch.resource-warning.title') }}+ {{ $t("project.batch.resource-warning.title") }}</template><div class="text-sm">- {{ $t('project.batch.resource-warning.description') }}+ {{ $t("project.batch.resource-warning.description") }}<ul class="mt-1 list-disc list-inside"><li v-for="project in projectsWithResources" :key="project.name">- {{ project.title }} ({{ extractProjectResourceName(project.name) }})+ {{ project.title }} ({{+ extractProjectResourceName(project.name)+ }})</li></ul></div>@@ -130,7 +141,7 @@ const actions = computed((): Action[] => {if (hasWorkspacePermissionV2("bb.projects.delete")) {list.push({icon: h(ArchiveIcon),- text: t('common.archive'),+ text: t("common.archive"),disabled: props.projectList.length === 0,click: () => (state.showArchiveConfirm = true),});@@ -138,26 +149,28 @@ const actions = computed((): Action[] => {// Add more batch operations here in the future// For example: batch update settings, batch export, etc.-+return list;});const handleBatchArchive = async () => {try {state.loading = true;-+// Use the batch delete APIawait projectStore.batchDeleteProjects(- props.projectList.map(p => p.name),+ props.projectList.map((p) => p.name),state.force);-+pushNotification({module: "bytebase",style: "SUCCESS",- title: t('project.batch.archive.success', { count: props.projectList.length }),+ title: t("project.batch.archive.success", {+ count: props.projectList.length,+ }),});-+state.showArchiveConfirm = false;state.force = false;emit("update");@@ -165,11 +178,11 @@ const handleBatchArchive = async () => {pushNotification({module: "bytebase",style: "CRITICAL",- title: t('project.batch.archive.error'),+ title: t("project.batch.archive.error"),description: error.message,});} finally {state.loading = false;}};-</script>\ No newline at end of file+</script>diff --git a/frontend/src/components/v2/Model/Project/index.ts b/frontend/src/components/v2/Model/Project/index.tsindex 38619cefdf..657c3db5ac 100644--- a/frontend/src/components/v2/Model/Project/index.ts+++ b/frontend/src/components/v2/Model/Project/index.ts@@ -1 +1 @@-export { default as ProjectOperations } from "./ProjectOperations.vue";\ No newline at end of file+export { default as ProjectOperations } from "./ProjectOperations.vue";diff --git a/frontend/src/components/v2/TabFilter/EnvironmentTabFilter.vue b/frontend/src/components/v2/TabFilter/EnvironmentTabFilter.vueindex 86844ffd19..0b5e144c6d 100644--- a/frontend/src/components/v2/TabFilter/EnvironmentTabFilter.vue+++ b/frontend/src/components/v2/TabFilter/EnvironmentTabFilter.vue@@ -21,7 +21,11 @@import { computed } from "vue";import { useI18n } from "vue-i18n";import { useEnvironmentV1List } from "@/store";-import { formatEnvironmentName, UNKNOWN_ENVIRONMENT_NAME, unknownEnvironment } from "@/types";+import {+ formatEnvironmentName,+ UNKNOWN_ENVIRONMENT_NAME,+ unknownEnvironment,+} from "@/types";import type { Environment } from "@/types/v1/environment";import { EnvironmentV1Name } from "../Model";import TabFilter from "./TabFilter.vue";diff --git a/frontend/src/composables/useExecuteSQL.ts b/frontend/src/composables/useExecuteSQL.tsindex e16a6d40f0..1a0f4c30af 100644--- a/frontend/src/composables/useExecuteSQL.ts+++ b/frontend/src/composables/useExecuteSQL.ts@@ -472,7 +472,7 @@ const useExecuteSQL = () => {const isOnlySelectError = (resultSet: SQLResultSetV1) => {if (resultSet.error === "Support SELECT sql statement only" &&- resultSet.status === Code.InvalidArgument+ resultSet.status === Code.InvalidArgument) {return true;}diff --git a/frontend/src/composables/utils.ts b/frontend/src/composables/utils.tsindex 6dedc50a68..870cdcf792 100644--- a/frontend/src/composables/utils.ts+++ b/frontend/src/composables/utils.ts@@ -1,10 +1,13 @@+import { create as createProto } from "@bufbuild/protobuf";+import { NullValue } from "@bufbuild/protobuf/wkt";import { orderBy } from "lodash-es";import { stringify } from "uuid";-import { create as createProto } from "@bufbuild/protobuf";import type { SQLResultSetV1 } from "@/types";-import { NullValue } from "@bufbuild/protobuf/wkt";import type { QueryRow, RowValue } from "@/types/proto-es/v1/sql_service_pb";-import { QueryRowSchema, RowValueSchema } from "@/types/proto-es/v1/sql_service_pb";+import {+ QueryRowSchema,+ RowValueSchema,+} from "@/types/proto-es/v1/sql_service_pb";type NoSQLRowData = {key: string;@@ -240,7 +243,10 @@ export const flattenNoSQLResult = (resultSet: SQLResultSetV1) => {}).map((_) => "TEXT");for (const row of result.rows) {- if (row.values.length !== 1 || row.values[0].kind.case !== "stringValue") {+ if (+ row.values.length !== 1 ||+ row.values[0].kind.case !== "stringValue"+ ) {continue;}const data = JSON.parse(row.values[0].kind.value);diff --git a/frontend/src/customAppProfile.ts b/frontend/src/customAppProfile.tsindex 5746327835..86b7731b34 100644--- a/frontend/src/customAppProfile.ts+++ b/frontend/src/customAppProfile.ts@@ -12,7 +12,8 @@ export const overrideAppProfile = () => {const databaseChangeMode = computed(() => {if (setting.value?.value?.value?.case === "workspaceProfileSettingValue") {const mode = setting.value.value.value.value.databaseChangeMode;- if (mode === NewDatabaseChangeMode.EDITOR) return NewDatabaseChangeMode.EDITOR;+ if (mode === NewDatabaseChangeMode.EDITOR)+ return NewDatabaseChangeMode.EDITOR;}return NewDatabaseChangeMode.PIPELINE;});@@ -28,7 +29,9 @@ export const overrideAppProfile = () => {};const overrideAppFeatures = (- databaseChangeMode: NewDatabaseChangeMode.PIPELINE | NewDatabaseChangeMode.EDITOR+ databaseChangeMode:+ | NewDatabaseChangeMode.PIPELINE+ | NewDatabaseChangeMode.EDITOR) => {const actuatorStore = useActuatorV1Store();diff --git a/frontend/src/grpcweb/context-key/ignored_codes.ts b/frontend/src/grpcweb/context-key/ignored_codes.tsindex f7d7ae5ce6..4c0abcb66f 100644--- a/frontend/src/grpcweb/context-key/ignored_codes.ts+++ b/frontend/src/grpcweb/context-key/ignored_codes.ts@@ -2,4 +2,4 @@ import { Code, createContextKey } from "@connectrpc/connect";export const ignoredCodesContextKey = createContextKey<Code[]>([], {description: "ignored status codes",-});\ No newline at end of file+});diff --git a/frontend/src/grpcweb/context-key/index.ts b/frontend/src/grpcweb/context-key/index.tsindex ae17ec410a..29aef2076a 100644--- a/frontend/src/grpcweb/context-key/index.ts+++ b/frontend/src/grpcweb/context-key/index.ts@@ -1,2 +1,2 @@export { silentContextKey } from "./silent";-export { ignoredCodesContextKey } from "./ignored_codes";\ No newline at end of file+export { ignoredCodesContextKey } from "./ignored_codes";diff --git a/frontend/src/grpcweb/context-key/silent.ts b/frontend/src/grpcweb/context-key/silent.tsindex 2dd7e283d0..5b4f3b77d8 100644--- a/frontend/src/grpcweb/context-key/silent.ts+++ b/frontend/src/grpcweb/context-key/silent.ts@@ -2,4 +2,4 @@ import { createContextKey } from "@connectrpc/connect";export const silentContextKey = createContextKey<boolean>(false, {description: "silent mode, won't redirect nor pop notifications",-});\ No newline at end of file+});diff --git a/frontend/src/grpcweb/methods.ts b/frontend/src/grpcweb/methods.tsindex 83bede2101..a8792b3cca 100644--- a/frontend/src/grpcweb/methods.ts+++ b/frontend/src/grpcweb/methods.ts@@ -1,4 +1,4 @@-import { getOption } from '@bufbuild/protobuf';+import { getOption } from "@bufbuild/protobuf";import { ActuatorService } from "@/types/proto-es/v1/actuator_service_pb";import { audit } from "@/types/proto-es/v1/annotation_pb";import { AuditLogService } from "@/types/proto-es/v1/audit_log_service_pb";@@ -17,8 +17,8 @@ import { OrgPolicyService } from "@/types/proto-es/v1/org_policy_service_pb";import { PlanService } from "@/types/proto-es/v1/plan_service_pb";import { ProjectService } from "@/types/proto-es/v1/project_service_pb";import { ReleaseService } from "@/types/proto-es/v1/release_service_pb";-import { RevisionService } from "@/types/proto-es/v1/revision_service_pb";import { ReviewConfigService } from "@/types/proto-es/v1/review_config_service_pb";+import { RevisionService } from "@/types/proto-es/v1/revision_service_pb";import { RiskService } from "@/types/proto-es/v1/risk_service_pb";import { RoleService } from "@/types/proto-es/v1/role_service_pb";import { RolloutService } from "@/types/proto-es/v1/rollout_service_pb";@@ -74,4 +74,4 @@ export const ALL_METHODS_WITH_AUDIT = [return methods;}).flat()- .sort();\ No newline at end of file+ .sort();diff --git a/frontend/src/layouts/ProjectV1Layout.vue b/frontend/src/layouts/ProjectV1Layout.vueindex 8c02284e64..b8bec544fa 100644--- a/frontend/src/layouts/ProjectV1Layout.vue+++ b/frontend/src/layouts/ProjectV1Layout.vue@@ -60,6 +60,7 @@</template><script lang="tsx" setup>+import type { ConnectError } from "@connectrpc/connect";import { UsersIcon } from "lucide-vue-next";import { NButton, NEllipsis, NSpin } from "naive-ui";import { computed, reactive, watchEffect } from "vue";@@ -92,11 +93,10 @@ import {PresetRoleType,UNKNOWN_PROJECT_NAME,} from "@/types";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { State } from "@/types/proto-es/v1/common_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasProjectPermissionV2 } from "@/utils";import { useBodyLayoutContext } from "./common";-import type { ConnectError } from "@connectrpc/connect";interface LocalState {showRequestRolePanel: boolean;diff --git a/frontend/src/locales/dynamic/en-US.json b/frontend/src/locales/dynamic/en-US.jsonindex a65a8bbe41..095041a5cb 100644--- a/frontend/src/locales/dynamic/en-US.json+++ b/frontend/src/locales/dynamic/en-US.json@@ -377,4 +377,4 @@"review-config": "Review Config","role": "Role"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/dynamic/es-ES.json b/frontend/src/locales/dynamic/es-ES.jsonindex 1ae2bc02de..84403d4e01 100644--- a/frontend/src/locales/dynamic/es-ES.json+++ b/frontend/src/locales/dynamic/es-ES.json@@ -377,4 +377,4 @@"review-config": "Revisar configuración","role": "Rol"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/dynamic/ja-JP.json b/frontend/src/locales/dynamic/ja-JP.jsonindex 97e4ff9dcf..e53ff9ca61 100644--- a/frontend/src/locales/dynamic/ja-JP.json+++ b/frontend/src/locales/dynamic/ja-JP.json@@ -377,4 +377,4 @@"review-config": "設定を確認する","role": "役割"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/dynamic/vi-VN.json b/frontend/src/locales/dynamic/vi-VN.jsonindex f05279f3f2..f5284656da 100644--- a/frontend/src/locales/dynamic/vi-VN.json+++ b/frontend/src/locales/dynamic/vi-VN.json@@ -377,4 +377,4 @@"review-config": "Cấu hình đánh giá","role": "Vai trò"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/dynamic/zh-CN.json b/frontend/src/locales/dynamic/zh-CN.jsonindex ab2362f6a9..3a65998a41 100644--- a/frontend/src/locales/dynamic/zh-CN.json+++ b/frontend/src/locales/dynamic/zh-CN.json@@ -377,4 +377,4 @@"review-config": "审查配置","role": "角色"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/sql-review/es-ES.json b/frontend/src/locales/sql-review/es-ES.jsonindex 37e3583a07..c460902465 100644--- a/frontend/src/locales/sql-review/es-ES.json+++ b/frontend/src/locales/sql-review/es-ES.json@@ -731,4 +731,4 @@"warning": "Advertencia","disabled": "Deshabilitado"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/sql-review/ja-JP.json b/frontend/src/locales/sql-review/ja-JP.jsonindex 2661594bdd..26bf5be49f 100644--- a/frontend/src/locales/sql-review/ja-JP.json+++ b/frontend/src/locales/sql-review/ja-JP.json@@ -731,4 +731,4 @@"warning": "警告","disabled": "無効化"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/sql-review/vi-VN.json b/frontend/src/locales/sql-review/vi-VN.jsonindex 4a6d0bdcbc..a4d7c154b7 100644--- a/frontend/src/locales/sql-review/vi-VN.json+++ b/frontend/src/locales/sql-review/vi-VN.json@@ -731,4 +731,4 @@"warning": "Cảnh báo","disabled": "Đã tắt"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/sql-review/zh-CN.json b/frontend/src/locales/sql-review/zh-CN.jsonindex e79ba10c2c..21cd6b150f 100644--- a/frontend/src/locales/sql-review/zh-CN.json+++ b/frontend/src/locales/sql-review/zh-CN.json@@ -731,4 +731,4 @@"warning": "警告","disabled": "禁用"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/subscription/es-ES.json b/frontend/src/locales/subscription/es-ES.jsonindex b5755b1b0e..be64d71833 100644--- a/frontend/src/locales/subscription/es-ES.json+++ b/frontend/src/locales/subscription/es-ES.json@@ -50,4 +50,4 @@"desc": "Funciones adicionales de seguridad, cumplimiento y permisos. Soporte dedicado con SLA."}}-}\ No newline at end of file+}diff --git a/frontend/src/locales/subscription/ja-JP.json b/frontend/src/locales/subscription/ja-JP.jsonindex b1ed8fc667..62d3438003 100644--- a/frontend/src/locales/subscription/ja-JP.json+++ b/frontend/src/locales/subscription/ja-JP.json@@ -50,4 +50,4 @@"desc": "追加のセキュリティ、コンプライアンス、および権限機能。SLA付きの専任サポート。"}}-}\ No newline at end of file+}diff --git a/frontend/src/locales/subscription/vi-VN.json b/frontend/src/locales/subscription/vi-VN.jsonindex 4c29d445fb..c93bc6ad92 100644--- a/frontend/src/locales/subscription/vi-VN.json+++ b/frontend/src/locales/subscription/vi-VN.json@@ -50,4 +50,4 @@"desc": "Các tính năng bảo mật, tuân thủ và quyền bổ sung. Hỗ trợ chuyên dụng với SLA."}}-}\ No newline at end of file+}diff --git a/frontend/src/locales/subscription/zh-CN.json b/frontend/src/locales/subscription/zh-CN.jsonindex 19ed30a59d..dbbbd429b1 100644--- a/frontend/src/locales/subscription/zh-CN.json+++ b/frontend/src/locales/subscription/zh-CN.json@@ -50,4 +50,4 @@"desc": "额外的安全,合规,权限功能,SLA 支持。"}}-}\ No newline at end of file+}diff --git a/frontend/src/plugins/ai/components/ChatPanel.vue b/frontend/src/plugins/ai/components/ChatPanel.vueindex 84ebf4953c..0259aaa0ce 100644--- a/frontend/src/plugins/ai/components/ChatPanel.vue+++ b/frontend/src/plugins/ai/components/ChatPanel.vue@@ -28,14 +28,18 @@</template><script lang="ts" setup>+import { create as createProto } from "@bufbuild/protobuf";import { head } from "lodash-es";import { NSpin } from "naive-ui";import { storeToRefs } from "pinia";import { reactive, watch } from "vue";-import { create as createProto } from "@bufbuild/protobuf";import { sqlServiceClientConnect } from "@/grpcweb";import { useSQLEditorTabStore } from "@/store";-import { type AICompletionRequest_Message, AICompletionRequest_MessageSchema, AICompletionRequestSchema } from "@/types/proto-es/v1/sql_service_pb";+import {+ type AICompletionRequest_Message,+ AICompletionRequest_MessageSchema,+ AICompletionRequestSchema,+} from "@/types/proto-es/v1/sql_service_pb";import { nextAnimationFrame } from "@/utils";import { onConnectionChanged, useAIContext, useCurrentChat } from "../logic";import * as promptUtils from "../logic/prompt";@@ -114,10 +118,12 @@ const requestAI = async (query: string) => {const messages: AICompletionRequest_Message[] = [];conversation.messageList.forEach((message) => {const { author, prompt } = message;- messages.push(createProto(AICompletionRequest_MessageSchema, {- role: author === "USER" ? "user" : "assistant",- content: prompt,- }));+ messages.push(+ createProto(AICompletionRequest_MessageSchema, {+ role: author === "USER" ? "user" : "assistant",+ content: prompt,+ })+ );});state.loading = true;try {diff --git a/frontend/src/plugins/ai/components/ProvideAIContext.vue b/frontend/src/plugins/ai/components/ProvideAIContext.vueindex 323943a9c6..be9989beef 100644--- a/frontend/src/plugins/ai/components/ProvideAIContext.vue+++ b/frontend/src/plugins/ai/components/ProvideAIContext.vue@@ -3,6 +3,10 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import Emittery from "emittery";+import { storeToRefs } from "pinia";+import { computed, reactive, ref, toRef } from "vue";import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";import {useConnectionOfCurrentSQLEditorTab,@@ -10,12 +14,11 @@ import {useSettingV1Store,useSQLEditorTabStore,} from "@/store";-import { AISettingSchema, Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";+import {+ AISettingSchema,+ Setting_SettingName,+} from "@/types/proto-es/v1/setting_service_pb";import { wrapRefAsPromise } from "@/utils";-import Emittery from "emittery";-import { storeToRefs } from "pinia";-import { computed, reactive, ref, toRef } from "vue";import { provideAIContext, useChatByTab, useCurrentChat } from "../logic";import { useConversationStore } from "../store";import type { AIContext, AIContextEvents } from "../types";diff --git a/frontend/src/plugins/ai/logic/useDynamicSuggestions.ts b/frontend/src/plugins/ai/logic/useDynamicSuggestions.tsindex b926c07c99..6a6ff9ab0b 100644--- a/frontend/src/plugins/ai/logic/useDynamicSuggestions.ts+++ b/frontend/src/plugins/ai/logic/useDynamicSuggestions.ts@@ -1,11 +1,13 @@+import { create as createProto } from "@bufbuild/protobuf";import { head, uniq, values } from "lodash-es";import { computed, reactive, ref } from "vue";-import { create as createProto } from "@bufbuild/protobuf";-import { hashCode } from "@/bbkit/BBUtil";import { sqlServiceClientConnect } from "@/grpcweb";--import { type AICompletionRequest_Message, AICompletionRequest_MessageSchema, AICompletionRequestSchema } from "@/types/proto-es/v1/sql_service_pb";+import {+ type AICompletionRequest_Message,+ AICompletionRequest_MessageSchema,+ AICompletionRequestSchema,+} from "@/types/proto-es/v1/sql_service_pb";import { WebStorageHelper } from "@/utils";import { useAIContext } from "./context";import * as promptUtils from "./prompt";diff --git a/frontend/src/plugins/ai/types/context.ts b/frontend/src/plugins/ai/types/context.tsindex 47c91c4fb0..ce4951989a 100644--- a/frontend/src/plugins/ai/types/context.ts+++ b/frontend/src/plugins/ai/types/context.ts@@ -1,8 +1,8 @@+import type Emittery from "emittery";+import type { Ref } from "vue";import type { Engine } from "@/types/proto-es/v1/common_pb";import type { DatabaseMetadata } from "@/types/proto-es/v1/database_service_pb";import type { AISetting } from "@/types/proto-es/v1/setting_service_pb";-import type Emittery from "emittery";-import type { Ref } from "vue";import type { Conversation } from "./conversation";export type AIContextEvents = Emittery<{diff --git a/frontend/src/plugins/cel/logic/build.ts b/frontend/src/plugins/cel/logic/build.tsindex ee90b150bf..5e6ded7dd0 100644--- a/frontend/src/plugins/cel/logic/build.ts+++ b/frontend/src/plugins/cel/logic/build.ts@@ -1,11 +1,11 @@-import { head } from "lodash-es";import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";+import { head } from "lodash-es";import { celServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";-import { BatchParseRequestSchema } from "@/types/proto-es/v1/cel_service_pb";import type { Expr as CELExpr } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";import { ExprSchema } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";+import { BatchParseRequestSchema } from "@/types/proto-es/v1/cel_service_pb";import type { ConditionExpr, ConditionGroupExpr, SimpleExpr } from "../types";import {isEqualityExpr,diff --git a/frontend/src/plugins/cel/logic/resolve.ts b/frontend/src/plugins/cel/logic/resolve.tsindex 2575932bc0..0093e38cf2 100644--- a/frontend/src/plugins/cel/logic/resolve.ts+++ b/frontend/src/plugins/cel/logic/resolve.ts@@ -32,14 +32,20 @@ import stringifyExpr from "./stringify";// Helper functions to extract constant values from proto-es oneof patternsconst getConstantInt64Value = (expr: CELExpr): number => {- if (expr.exprKind?.case === "constExpr" && expr.exprKind.value.constantKind?.case === "int64Value") {+ if (+ expr.exprKind?.case === "constExpr" &&+ expr.exprKind.value.constantKind?.case === "int64Value"+ ) {return Number(expr.exprKind.value.constantKind.value);}return 0;};const getConstantStringValue = (expr: CELExpr): string => {- if (expr.exprKind?.case === "constExpr" && expr.exprKind.value.constantKind?.case === "stringValue") {+ if (+ expr.exprKind?.case === "constExpr" &&+ expr.exprKind.value.constantKind?.case === "stringValue"+ ) {return expr.exprKind.value.constantKind.value;}return "";@@ -118,8 +124,10 @@ export const resolveCELExpr = (expr: CELExpr): SimpleExpr => {};const resolveEqualityExpr = (expr: CELExpr): EqualityExpr => {- const callExpr = expr.exprKind?.case === "callExpr" ? expr.exprKind.value : null;- if (!callExpr) throw new Error(`Expected callExpr but got ${expr.exprKind?.case}`);+ const callExpr =+ expr.exprKind?.case === "callExpr" ? expr.exprKind.value : null;+ if (!callExpr)+ throw new Error(`Expected callExpr but got ${expr.exprKind?.case}`);const operator = callExpr.function as EqualityOperator;const [factorExpr, valueExpr] = callExpr.args;const factor = getFactorName(factorExpr);@@ -141,8 +149,10 @@ const resolveEqualityExpr = (expr: CELExpr): EqualityExpr => {};const resolveCompareExpr = (expr: CELExpr): CompareExpr => {- const callExpr = expr.exprKind?.case === "callExpr" ? expr.exprKind.value : null;- if (!callExpr) throw new Error(`Expected callExpr but got ${expr.exprKind?.case}`);+ const callExpr =+ expr.exprKind?.case === "callExpr" ? expr.exprKind.value : null;+ if (!callExpr)+ throw new Error(`Expected callExpr but got ${expr.exprKind?.case}`);const operator = callExpr.function as CompareOperator;const [factorExpr, valueExpr] = callExpr.args;const factor = getFactorName(factorExpr);@@ -159,7 +169,8 @@ const resolveCompareExpr = (expr: CELExpr): CompareExpr => {operator,args: [factor,- valueExpr.exprKind?.case === "callExpr" && valueExpr.exprKind.value.args[0]?.exprKind?.case === "constExpr"+ valueExpr.exprKind?.case === "callExpr" &&+ valueExpr.exprKind.value.args[0]?.exprKind?.case === "constExpr"? new Date(getConstantStringValue(valueExpr.exprKind.value.args[0])): new Date(),],@@ -169,8 +180,10 @@ const resolveCompareExpr = (expr: CELExpr): CompareExpr => {};const resolveStringExpr = (expr: CELExpr): StringExpr => {- const callExpr = expr.exprKind?.case === "callExpr" ? expr.exprKind.value : null;- if (!callExpr) throw new Error(`Expected callExpr but got ${expr.exprKind?.case}`);+ const callExpr =+ expr.exprKind?.case === "callExpr" ? expr.exprKind.value : null;+ if (!callExpr)+ throw new Error(`Expected callExpr but got ${expr.exprKind?.case}`);const operator = callExpr.function as StringOperator;const factor = getFactorName(callExpr.target!);const value = callExpr.args[0];@@ -185,8 +198,10 @@ const resolveCollectionExpr = (expr: CELExpr,negative: boolean = false): CollectionExpr => {- const callExpr = expr.exprKind?.case === "callExpr" ? expr.exprKind.value : null;- if (!callExpr) throw new Error(`Expected callExpr but got ${expr.exprKind?.case}`);+ const callExpr =+ expr.exprKind?.case === "callExpr" ? expr.exprKind.value : null;+ if (!callExpr)+ throw new Error(`Expected callExpr but got ${expr.exprKind?.case}`);let operator = callExpr.function as CollectionOperator;if (negative) {operator = "@not_in";@@ -201,7 +216,8 @@ const resolveCollectionExpr = (args: [factor,valuesExpr.exprKind?.case === "listExpr"- ? valuesExpr.exprKind.value.elements?.map(getConstantInt64Value) ?? []+ ? (valuesExpr.exprKind.value.elements?.map(getConstantInt64Value) ??+ []): [],],};@@ -213,7 +229,8 @@ const resolveCollectionExpr = (args: [factor,valuesExpr.exprKind?.case === "listExpr"- ? valuesExpr.exprKind.value.elements?.map(getConstantStringValue) ?? []+ ? (valuesExpr.exprKind.value.elements?.map(getConstantStringValue) ??+ []): [],],};@@ -243,9 +260,10 @@ const getFactorName = (expr: CELExpr): string => {return expr.exprKind.value.name;} else if (expr.exprKind?.case === "selectExpr") {const selectExpr = expr.exprKind.value;- const operandName = selectExpr.operand?.exprKind?.case === "identExpr"- ? selectExpr.operand.exprKind.value.name- : "";+ const operandName =+ selectExpr.operand?.exprKind?.case === "identExpr"+ ? selectExpr.operand.exprKind.value.name+ : "";return `${operandName}.${selectExpr.field}`;}throw new Error(`cannot resolve factor name ${JSON.stringify(expr)}`);diff --git a/frontend/src/plugins/cel/logic/stringify.ts b/frontend/src/plugins/cel/logic/stringify.tsindex 3054b3a520..980ac217d3 100644--- a/frontend/src/plugins/cel/logic/stringify.ts+++ b/frontend/src/plugins/cel/logic/stringify.ts@@ -23,9 +23,7 @@ function stringifyExpr(expr: Expr): string {const functionName = callExpr.function.replace(/_/g, "");if (callExpr.target) {const target = stringifyExpr(callExpr.target);- const args = callExpr.args- .map((arg) => stringifyExpr(arg))- .join(", ");+ const args = callExpr.args.map((arg) => stringifyExpr(arg)).join(", ");return `${target}.${functionName}(${args})`;} else {const args = callExpr.args.map((arg) => stringifyExpr(arg));@@ -45,9 +43,12 @@ function stringifyExpr(expr: Expr): string {const structExpr = expr.exprKind.value;const entries = structExpr.entries.map((entry) => {- const key = entry.keyKind?.case === "fieldKey"- ? entry.keyKind.value- : entry.keyKind?.case === "mapKey" ? stringifyExpr(entry.keyKind.value) : "";+ const key =+ entry.keyKind?.case === "fieldKey"+ ? entry.keyKind.value+ : entry.keyKind?.case === "mapKey"+ ? stringifyExpr(entry.keyKind.value)+ : "";const value = stringifyExpr(entry.value!);return `${key}: ${value}`;})diff --git a/frontend/src/plugins/i18n.test.ts b/frontend/src/plugins/i18n.test.tsindex 5338906e7f..8189db561d 100644--- a/frontend/src/plugins/i18n.test.ts+++ b/frontend/src/plugins/i18n.test.ts@@ -1,8 +1,8 @@import { describe, expect, test } from "vitest";+import { Engine } from "@/types/proto-es/v1/common_pb";import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";import { TEMPLATE_LIST_V2, getRuleLocalizationKey } from "../types/sqlReview";import { mergedLocalMessage } from "./i18n-messages";-import { Engine } from "@/types/proto-es/v1/common_pb";describe("Test i18n messages", () => {for (const keyA of Object.keys(mergedLocalMessage)) {@@ -48,8 +48,14 @@ describe("Test i18n for SQL review", () => {test(`check i18n for rule ${rule.type}`, () => {const key = getRuleLocalizationKey(rule.type);expect(!!i18nForSQLReview["rule"][key], "rule-key").toBe(true);- expect(!!i18nForSQLReview["rule"][key]["title"], "rule-key-title").toBe(true);- expect(!!i18nForSQLReview["rule"][key]["description"], "rule-key-description").toBe(true);+ expect(+ !!i18nForSQLReview["rule"][key]["title"],+ "rule-key-title"+ ).toBe(true);+ expect(+ !!i18nForSQLReview["rule"][key]["description"],+ "rule-key-description"+ ).toBe(true);expect(!!i18nForSQLReview["category"][rule.category.toLowerCase()],"category-rule.category"@@ -58,20 +64,22 @@ describe("Test i18n for SQL review", () => {!!i18nForSQLReview["level"][sqlReviewRuleLevelToString(rule.level).toLowerCase()],- 'level-rule.level'+ "level-rule.level").toBe(true);expect(- !!i18nForSQLReview["engine"][- Engine[rule.engine].toLowerCase()- ],- 'engine.rule-engine'+ !!i18nForSQLReview["engine"][Engine[rule.engine].toLowerCase()],+ "engine.rule-engine").toBe(true);for (const component of rule.componentList) {- expect(!!i18nForSQLReview["rule"][key]["component"], 'rule-key-component').toBe(true);expect(- !!i18nForSQLReview["rule"][key]["component"][component.key], 'rule-key-component-component.key'+ !!i18nForSQLReview["rule"][key]["component"],+ "rule-key-component"+ ).toBe(true);+ expect(+ !!i18nForSQLReview["rule"][key]["component"][component.key],+ "rule-key-component-component.key").toBe(true);}});diff --git a/frontend/src/shims-3rd-party.d.ts b/frontend/src/shims-3rd-party.d.tsindex 6f5b424459..8172621b19 100644--- a/frontend/src/shims-3rd-party.d.ts+++ b/frontend/src/shims-3rd-party.d.ts@@ -1,5 +1,6 @@declare module "pev2" {import type { defineComponent } from "vue";const Plan: ReturnType<typeof defineComponent>;+ // eslint-disable-next-line prettier/prettierexport { Plan };}diff --git a/frontend/src/store/modules/idp.ts b/frontend/src/store/modules/idp.tsindex 63a8d39428..c9b28a4226 100644--- a/frontend/src/store/modules/idp.ts+++ b/frontend/src/store/modules/idp.ts@@ -1,5 +1,8 @@import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";+import { isEqual, isUndefined } from "lodash-es";+import { defineStore } from "pinia";+import { ref, computed } from "vue";import { identityProviderServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";import type { IdentityProvider } from "@/types/proto-es/v1/idp_service_pb";@@ -10,9 +13,6 @@ import {ListIdentityProvidersRequestSchema,UpdateIdentityProviderRequestSchema,} from "@/types/proto-es/v1/idp_service_pb";-import { isEqual, isUndefined } from "lodash-es";-import { defineStore } from "pinia";-import { ref, computed } from "vue";export const useIdentityProviderStore = defineStore("idp", () => {const identityProviderMapByName = ref(new Map<string, IdentityProvider>());@@ -23,7 +23,8 @@ export const useIdentityProviderStore = defineStore("idp", () => {const fetchIdentityProviderList = async () => {const request = create(ListIdentityProvidersRequestSchema, {});- const response = await identityProviderServiceClientConnect.listIdentityProviders(request);+ const response =+ await identityProviderServiceClientConnect.listIdentityProviders(request);for (const identityProvider of response.identityProviders) {identityProviderMapByName.value.set(identityProvider.name,@@ -33,16 +34,19 @@ export const useIdentityProviderStore = defineStore("idp", () => {return response.identityProviders;};- const getOrFetchIdentityProviderByName = async (name: string, silent = false) => {+ const getOrFetchIdentityProviderByName = async (+ name: string,+ silent = false+ ) => {const cachedData = identityProviderMapByName.value.get(name);if (cachedData) {return cachedData;}const request = create(GetIdentityProviderRequestSchema, { name });- const identityProvider = await identityProviderServiceClientConnect.getIdentityProvider(- request,- { contextValues: createContextValues().set(silentContextKey, silent) }- );+ const identityProvider =+ await identityProviderServiceClientConnect.getIdentityProvider(request, {+ contextValues: createContextValues().set(silentContextKey, silent),+ });identityProviderMapByName.value.set(identityProvider.name,identityProvider@@ -59,7 +63,10 @@ export const useIdentityProviderStore = defineStore("idp", () => {identityProvider: createProvider,identityProviderId: createProvider.name,});- const identityProvider = await identityProviderServiceClientConnect.createIdentityProvider(request);+ const identityProvider =+ await identityProviderServiceClientConnect.createIdentityProvider(+ request+ );identityProviderMapByName.value.set(identityProvider.name,identityProvider@@ -78,9 +85,14 @@ export const useIdentityProviderStore = defineStore("idp", () => {const fullProvider = { ...originData, ...update } as IdentityProvider;const request = create(UpdateIdentityProviderRequestSchema, {identityProvider: fullProvider,- updateMask: { paths: getUpdateMaskFromIdentityProviders(originData, update) },+ updateMask: {+ paths: getUpdateMaskFromIdentityProviders(originData, update),+ },});- const identityProvider = await identityProviderServiceClientConnect.updateIdentityProvider(request);+ const identityProvider =+ await identityProviderServiceClientConnect.updateIdentityProvider(+ request+ );identityProviderMapByName.value.set(identityProvider.name,identityProviderdiff --git a/frontend/src/store/modules/release.ts b/frontend/src/store/modules/release.tsindex c25f03cf92..706aa57468 100644--- a/frontend/src/store/modules/release.ts+++ b/frontend/src/store/modules/release.ts@@ -1,21 +1,21 @@+import { create } from "@bufbuild/protobuf";+import { createContextValues } from "@connectrpc/connect";import { head } from "lodash-es";import { defineStore } from "pinia";import { computed, reactive, ref, unref, watch } from "vue";-import { create } from "@bufbuild/protobuf";-import { createContextValues } from "@connectrpc/connect";import { releaseServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";import type { MaybeRef, ComposedRelease, Pagination } from "@/types";import { isValidReleaseName, unknownRelease, unknownUser } from "@/types";+import { State } from "@/types/proto-es/v1/common_pb";import type { Release } from "@/types/proto-es/v1/release_service_pb";import { ReleaseSchema } from "@/types/proto-es/v1/release_service_pb";-import { State } from "@/types/proto-es/v1/common_pb";-import {+import {GetReleaseRequestSchema,ListReleasesRequestSchema,UpdateReleaseRequestSchema,DeleteReleaseRequestSchema,- UndeleteReleaseRequestSchema+ UndeleteReleaseRequestSchema,} from "@/types/proto-es/v1/release_service_pb";import { DEFAULT_PAGE_SIZE } from "./common";import { useUserStore } from "./user";@@ -77,7 +77,7 @@ export const useReleaseStore = defineStore("release", () => {...create(ReleaseSchema, {}),...release,};-+const request = create(UpdateReleaseRequestSchema, {release: fullRelease,updateMask: { paths: updateMask },@@ -142,7 +142,9 @@ export const useReleaseByName = (name: MaybeRef<string>) => {};};-export const batchComposeRelease = async (releaseList: Release[]): Promise<ComposedRelease[]> => {+export const batchComposeRelease = async (+ releaseList: Release[]+): Promise<ComposedRelease[]> => {const userStore = useUserStore();await userStore.batchGetUsers(releaseList.map((release) => release.creator));diff --git a/frontend/src/store/modules/revision.ts b/frontend/src/store/modules/revision.tsindex 5da3e2f4e1..ff23a69b24 100644--- a/frontend/src/store/modules/revision.ts+++ b/frontend/src/store/modules/revision.ts@@ -1,6 +1,6 @@+import { create } from "@bufbuild/protobuf";import { defineStore } from "pinia";import { computed, reactive } from "vue";-import { create } from "@bufbuild/protobuf";import { revisionServiceClientConnect } from "@/grpcweb";import type { Pagination } from "@/types";import type { Revision } from "@/types/proto-es/v1/revision_service_pb";diff --git a/frontend/src/store/modules/risk.ts b/frontend/src/store/modules/risk.tsindex d24035fcea..556f965fae 100644--- a/frontend/src/store/modules/risk.ts+++ b/frontend/src/store/modules/risk.ts@@ -2,9 +2,7 @@ import { create } from "@bufbuild/protobuf";import { defineStore } from "pinia";import { ref, computed } from "vue";import { riskServiceClientConnect } from "@/grpcweb";-import type {- Risk,-} from "@/types/proto-es/v1/risk_service_pb";+import type { Risk } from "@/types/proto-es/v1/risk_service_pb";import {CreateRiskRequestSchema,DeleteRiskRequestSchema,@@ -15,7 +13,7 @@ import {export const useRiskStore = defineStore("risk", () => {// Internal state uses proto-es typesconst _riskList = ref<Risk[]>([]);-+const riskList = computed(() => {return _riskList.value;});@@ -35,7 +33,9 @@ export const useRiskStore = defineStore("risk", () => {// updateconst request = create(UpdateRiskRequestSchema, {risk: risk,- updateMask: { paths: ["title", "level", "active", "condition", "source"] },+ updateMask: {+ paths: ["title", "level", "active", "condition", "source"],+ },});const updated = await riskServiceClientConnect.updateRisk(request);Object.assign(existedRisk, updated);diff --git a/frontend/src/store/modules/role.ts b/frontend/src/store/modules/role.tsindex d1ce8ee59b..bb60bb8d06 100644--- a/frontend/src/store/modules/role.ts+++ b/frontend/src/store/modules/role.ts@@ -1,12 +1,12 @@+import { create } from "@bufbuild/protobuf";import { defineStore } from "pinia";import { ref } from "vue";-import { create } from "@bufbuild/protobuf";import { roleServiceClientConnect } from "@/grpcweb";import type { Role } from "@/types/proto-es/v1/role_service_pb";-import {+import {ListRolesRequestSchema,UpdateRoleRequestSchema,- DeleteRoleRequestSchema+ DeleteRoleRequestSchema,} from "@/types/proto-es/v1/role_service_pb";import { useGracefulRequest } from "./utils";diff --git a/frontend/src/store/modules/rollout.ts b/frontend/src/store/modules/rollout.tsindex e3330b76db..f23e1d0fa6 100644--- a/frontend/src/store/modules/rollout.ts+++ b/frontend/src/store/modules/rollout.ts@@ -1,16 +1,16 @@+import { create } from "@bufbuild/protobuf";+import { createContextValues } from "@connectrpc/connect";import { head } from "lodash-es";import { defineStore } from "pinia";import { computed, reactive, ref, unref, watch } from "vue";-import { create } from "@bufbuild/protobuf";-import { createContextValues } from "@connectrpc/connect";import { rolloutServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";import type { MaybeRef, Pagination, ComposedRollout } from "@/types";import { isValidRolloutName, unknownRollout, unknownUser } from "@/types";import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";-import {- GetRolloutRequestSchema,- ListRolloutsRequestSchema+import {+ GetRolloutRequestSchema,+ ListRolloutsRequestSchema,} from "@/types/proto-es/v1/rollout_service_pb";import { DEFAULT_PAGE_SIZE } from "./common";import { useUserStore } from "./user";diff --git a/frontend/src/store/modules/sqlEditor/queryHistory.ts b/frontend/src/store/modules/sqlEditor/queryHistory.tsindex e57fd01a1e..0d6d025b14 100644--- a/frontend/src/store/modules/sqlEditor/queryHistory.ts+++ b/frontend/src/store/modules/sqlEditor/queryHistory.ts@@ -2,8 +2,8 @@ import { create } from "@bufbuild/protobuf";import { defineStore } from "pinia";import { reactive } from "vue";import { sqlServiceClientConnect } from "@/grpcweb";-import { SearchQueryHistoriesRequestSchema } from "@/types/proto-es/v1/sql_service_pb";import { isValidProjectName, isValidDatabaseName } from "@/types";+import { SearchQueryHistoriesRequestSchema } from "@/types/proto-es/v1/sql_service_pb";import type { QueryHistory } from "@/types/proto-es/v1/sql_service_pb";export interface QueryHistoryFilter {diff --git a/frontend/src/store/modules/sqlEditor/tab.ts b/frontend/src/store/modules/sqlEditor/tab.tsindex 71b40ab2d6..49a3d5d8dc 100644--- a/frontend/src/store/modules/sqlEditor/tab.ts+++ b/frontend/src/store/modules/sqlEditor/tab.ts@@ -11,8 +11,8 @@ import type {BatchQueryContext,} from "@/types";import { DEFAULT_SQL_EDITOR_TAB_MODE, isValidDatabaseName } from "@/types";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import {WebStorageHelper,defaultSQLEditorTab,diff --git a/frontend/src/store/modules/sqlReview.ts b/frontend/src/store/modules/sqlReview.tsindex e9670cb26a..82a5f5c44c 100644--- a/frontend/src/store/modules/sqlReview.ts+++ b/frontend/src/store/modules/sqlReview.ts@@ -12,17 +12,17 @@ import type {MaybeRef,ComposedDatabase,} from "@/types";+import {+ PolicyType,+ TagPolicySchema,+ SQLReviewRuleSchema,+} from "@/types/proto-es/v1/org_policy_service_pb";import {DeleteReviewConfigRequestSchema,UpdateReviewConfigRequestSchema,ListReviewConfigsRequestSchema,GetReviewConfigRequestSchema,} from "@/types/proto-es/v1/review_config_service_pb";-import {- PolicyType,- TagPolicySchema,- SQLReviewRuleSchema,-} from "@/types/proto-es/v1/org_policy_service_pb";import type { ReviewConfig } from "@/types/proto-es/v1/review_config_service_pb";import { ReviewConfigSchema } from "@/types/proto-es/v1/review_config_service_pb";import { usePolicyV1Store } from "./v1/policy";@@ -302,9 +302,10 @@ export const useSQLReviewStore = defineStore("sqlReview", {if (!policy) {return;}- const sqlReviewName = policy.policy?.case === "tagPolicy"- ? policy.policy.value.tags[reviewConfigTagName]- : undefined;+ const sqlReviewName =+ policy.policy?.case === "tagPolicy"+ ? policy.policy.value.tags[reviewConfigTagName]+ : undefined;if (!sqlReviewName) {return;}diff --git a/frontend/src/store/modules/user.ts b/frontend/src/store/modules/user.tsindex 56a93e59b6..6e86d7acff 100644--- a/frontend/src/store/modules/user.ts+++ b/frontend/src/store/modules/user.ts@@ -15,7 +15,10 @@ import {userBindingPrefix,} from "@/types";import { State } from "@/types/proto-es/v1/common_pb";-import type { UpdateUserRequest, User } from "@/types/proto-es/v1/user_service_pb";+import type {+ UpdateUserRequest,+ User,+} from "@/types/proto-es/v1/user_service_pb";import { UserType } from "@/types/proto-es/v1/user_service_pb";import {GetUserRequestSchema,diff --git a/frontend/src/store/modules/v1/actuator.ts b/frontend/src/store/modules/v1/actuator.tsindex e80fd19894..b928a86157 100644--- a/frontend/src/store/modules/v1/actuator.ts+++ b/frontend/src/store/modules/v1/actuator.ts@@ -19,9 +19,7 @@ import type {ResourcePackage,} from "@/types/proto-es/v1/actuator_service_pb";import { State } from "@/types/proto-es/v1/common_pb";-import {- PasswordRestrictionSettingSchema,-} from "@/types/proto-es/v1/setting_service_pb";+import { PasswordRestrictionSettingSchema } from "@/types/proto-es/v1/setting_service_pb";import { UserType } from "@/types/proto-es/v1/user_service_pb";import { semverCompare } from "@/utils";diff --git a/frontend/src/store/modules/v1/auditLog.ts b/frontend/src/store/modules/v1/auditLog.tsindex b3adbe42c2..4c95647ca7 100644--- a/frontend/src/store/modules/v1/auditLog.ts+++ b/frontend/src/store/modules/v1/auditLog.ts@@ -1,8 +1,8 @@+import { create } from "@bufbuild/protobuf";import dayjs from "dayjs";import utc from "dayjs/plugin/utc";import type { BinaryLike } from "node:crypto";import { defineStore } from "pinia";-import { create } from "@bufbuild/protobuf";import { auditLogServiceClientConnect } from "@/grpcweb";import type { SearchAuditLogsParams } from "@/types";import {diff --git a/frontend/src/store/modules/v1/auth.ts b/frontend/src/store/modules/v1/auth.tsindex 09fe387acd..02d46d209d 100644--- a/frontend/src/store/modules/v1/auth.ts+++ b/frontend/src/store/modules/v1/auth.ts@@ -26,11 +26,14 @@ import {LoginRequestSchema,type LoginRequest,} from "@/types/proto-es/v1/auth_service_pb";-import { CreateUserRequestSchema, UserSchema } from "@/types/proto-es/v1/user_service_pb";import {DatabaseChangeMode,Setting_SettingName,} from "@/types/proto-es/v1/setting_service_pb";+import {+ CreateUserRequestSchema,+ UserSchema,+} from "@/types/proto-es/v1/user_service_pb";import type { User } from "@/types/proto-es/v1/user_service_pb";import { UserType } from "@/types/proto-es/v1/user_service_pb";diff --git a/frontend/src/store/modules/v1/changelist.ts b/frontend/src/store/modules/v1/changelist.tsindex 8d0e712d0a..2ae8cac3c0 100644--- a/frontend/src/store/modules/v1/changelist.ts+++ b/frontend/src/store/modules/v1/changelist.ts@@ -1,7 +1,7 @@-import { defineStore } from "pinia";-import { reactive } from "vue";import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";+import { defineStore } from "pinia";+import { reactive } from "vue";import { changelistServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";import type {@@ -64,16 +64,16 @@ export const useChangelistStore = defineStore("changelist", () => {};const createChangelist = async (request: CreateChangelistRequest) => {- const created = await changelistServiceClientConnect.createChangelist(request);+ const created =+ await changelistServiceClientConnect.createChangelist(request);await upsertChangelistMap([created], true /* compose */);return created;};- const fetchChangelists = async (- request: Partial<ListChangelistsRequest>- ) => {+ const fetchChangelists = async (request: Partial<ListChangelistsRequest>) => {const connectRequest = create(ListChangelistsRequestSchema, request as any);- const response = await changelistServiceClientConnect.listChangelists(connectRequest);+ const response =+ await changelistServiceClientConnect.listChangelists(connectRequest);await upsertChangelistMap(response.changelists, false /* !compose */);return response;};@@ -86,7 +86,8 @@ export const useChangelistStore = defineStore("changelist", () => {changelist: changelist,updateMask: { paths: updateMask },});- const updated = await changelistServiceClientConnect.updateChangelist(connectRequest);+ const updated =+ await changelistServiceClientConnect.updateChangelist(connectRequest);await upsertChangelistMap([updated], true /* compose */);return updated;};diff --git a/frontend/src/store/modules/v1/changelog.ts b/frontend/src/store/modules/v1/changelog.tsindex 3f651a0840..c7e78d68a5 100644--- a/frontend/src/store/modules/v1/changelog.ts+++ b/frontend/src/store/modules/v1/changelog.ts@@ -1,13 +1,13 @@+import { create } from "@bufbuild/protobuf";import { defineStore } from "pinia";import { reactive } from "vue";-import { create } from "@bufbuild/protobuf";import { databaseServiceClientConnect } from "@/grpcweb";-import {+import { useCache } from "@/store/cache";+import { UNKNOWN_ID } from "@/types";+import {ListChangelogsRequestSchema,GetChangelogRequestSchema,} from "@/types/proto-es/v1/database_service_pb";-import { useCache } from "@/store/cache";-import { UNKNOWN_ID } from "@/types";import {ChangelogView,type GetChangelogRequest,@@ -29,10 +29,7 @@ export const useChangelogStore = defineStore("changelog", () => {) => {changelogsMapByDatabase.set(parent, changelogs);changelogs.forEach((changelog) => {- cache.setEntity(- [changelog.name, ChangelogView.BASIC],- changelog- );+ cache.setEntity([changelog.name, ChangelogView.BASIC], changelog);});};diff --git a/frontend/src/store/modules/v1/database.ts b/frontend/src/store/modules/v1/database.tsindex 70d9b730d2..d21d3fe29e 100644--- a/frontend/src/store/modules/v1/database.ts+++ b/frontend/src/store/modules/v1/database.ts@@ -1,21 +1,10 @@+import { create } from "@bufbuild/protobuf";+import { createContextValues } from "@connectrpc/connect";import { uniq } from "lodash-es";import { defineStore } from "pinia";import { computed, reactive, ref, unref, watch, markRaw } from "vue";-import { create } from "@bufbuild/protobuf";-import { createContextValues } from "@connectrpc/connect";import { databaseServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";-import {- GetDatabaseRequestSchema,- ListDatabasesRequestSchema,- BatchGetDatabasesRequestSchema,- BatchUpdateDatabasesRequestSchema,- UpdateDatabaseRequestSchema,- BatchSyncDatabasesRequestSchema,- SyncDatabaseRequestSchema,- GetDatabaseSchemaRequestSchema,- DiffSchemaRequestSchema,-} from "@/types/proto-es/v1/database_service_pb";import type { ComposedInstance, ComposedDatabase, MaybeRef } from "@/types";import {isValidEnvironmentName,@@ -27,6 +16,17 @@ import {unknownInstanceResource,} from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";+import {+ GetDatabaseRequestSchema,+ ListDatabasesRequestSchema,+ BatchGetDatabasesRequestSchema,+ BatchUpdateDatabasesRequestSchema,+ UpdateDatabaseRequestSchema,+ BatchSyncDatabasesRequestSchema,+ SyncDatabaseRequestSchema,+ GetDatabaseSchemaRequestSchema,+ DiffSchemaRequestSchema,+} from "@/types/proto-es/v1/database_service_pb";import type {Database,UpdateDatabaseRequest,@@ -244,12 +244,9 @@ export const useDatabaseV1Store = defineStore("database_v1", () => {const request = create(GetDatabaseRequestSchema, {name,});- const database = await databaseServiceClientConnect.getDatabase(- request,- {- contextValues: createContextValues().set(silentContextKey, silent),- }- );+ const database = await databaseServiceClientConnect.getDatabase(request, {+ contextValues: createContextValues().set(silentContextKey, silent),+ });const [composed] = await upsertDatabaseMap([database]);@@ -291,7 +288,8 @@ export const useDatabaseV1Store = defineStore("database_v1", () => {updateMask: req.updateMask,})),});- const response = await databaseServiceClientConnect.batchUpdateDatabases(request);+ const response =+ await databaseServiceClientConnect.batchUpdateDatabases(request);const updatedDatabases = response.databases; // Work directly with proto-es typesconst composed = await upsertDatabaseMap(updatedDatabases);return composed;@@ -314,7 +312,8 @@ export const useDatabaseV1Store = defineStore("database_v1", () => {name: `${database}/schema`,sdlFormat,});- const schema = await databaseServiceClientConnect.getDatabaseSchema(request);+ const schema =+ await databaseServiceClientConnect.getDatabaseSchema(request);return schema;};const diffSchema = async (params: DiffSchemaRequest) => {diff --git a/frontend/src/store/modules/v1/databaseCatalog.ts b/frontend/src/store/modules/v1/databaseCatalog.tsindex 70611a918a..0a6ae7b033 100644--- a/frontend/src/store/modules/v1/databaseCatalog.ts+++ b/frontend/src/store/modules/v1/databaseCatalog.ts@@ -1,22 +1,20 @@-import { defineStore } from "pinia";-import { computed, unref, watchEffect } from "vue";import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";+import { defineStore } from "pinia";+import { computed, unref, watchEffect } from "vue";import { databaseCatalogServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";import { useCache } from "@/store/cache";import type { MaybeRef } from "@/types";import { UNKNOWN_ID, EMPTY_ID, UNKNOWN_INSTANCE_NAME } from "@/types";-import type {- DatabaseCatalog,-} from "@/types/proto-es/v1/database_catalog_service_pb";-import {+import type { DatabaseCatalog } from "@/types/proto-es/v1/database_catalog_service_pb";+import {GetDatabaseCatalogRequestSchema,UpdateDatabaseCatalogRequestSchema,DatabaseCatalogSchema,TableCatalogSchema,TableCatalog_ColumnsSchema,- ColumnCatalogSchema+ ColumnCatalogSchema,} from "@/types/proto-es/v1/database_catalog_service_pb";import { extractDatabaseResourceName, hasProjectPermissionV2 } from "@/utils";import { useDatabaseV1Store } from "./database";@@ -73,12 +71,14 @@ export const useDatabaseCatalogV1Store = defineStore(const request = create(GetDatabaseCatalogRequestSchema, {name: catalogResourceName,});- const promise = databaseCatalogServiceClientConnect.getDatabaseCatalog(request, {- contextValues: createContextValues().set(silentContextKey, silent),- }).then((res) => {- setCache(res);- return res- });+ const promise = databaseCatalogServiceClientConnect+ .getDatabaseCatalog(request, {+ contextValues: createContextValues().set(silentContextKey, silent),+ })+ .then((res) => {+ setCache(res);+ return res;+ });return promise;};@@ -87,7 +87,10 @@ export const useDatabaseCatalogV1Store = defineStore(const request = create(UpdateDatabaseCatalogRequestSchema, {catalog: catalog,});- const response = await databaseCatalogServiceClientConnect.updateDatabaseCatalog(request);+ const response =+ await databaseCatalogServiceClientConnect.updateDatabaseCatalog(+ request+ );setCache(response);return response;};@@ -161,7 +164,10 @@ export const getColumnCatalog = (column: string) => {const tableCatalog = getTableCatalog(catalog, schema, table);- const columns = tableCatalog.kind?.case === "columns" ? tableCatalog.kind.value.columns : [];+ const columns =+ tableCatalog.kind?.case === "columns"+ ? tableCatalog.kind.value.columns+ : [];return (columns.find((c: any) => c.name === column) ??create(ColumnCatalogSchema, {diff --git a/frontend/src/store/modules/v1/databaseSecret.ts b/frontend/src/store/modules/v1/databaseSecret.tsindex 29c80c7a99..c50c6c565f 100644--- a/frontend/src/store/modules/v1/databaseSecret.ts+++ b/frontend/src/store/modules/v1/databaseSecret.ts@@ -1,7 +1,7 @@-import { defineStore } from "pinia";-import { reactive } from "vue";import { create } from "@bufbuild/protobuf";import { createContextValues, Code } from "@connectrpc/connect";+import { defineStore } from "pinia";+import { reactive } from "vue";import { databaseServiceClientConnect } from "@/grpcweb";import { ignoredCodesContextKey } from "@/grpcweb/context-key";import {@@ -24,12 +24,12 @@ export const useDatabaseSecretStore = defineStore("database-secret", () => {const request = create(ListSecretsRequestSchema, {parent,});- const response = await databaseServiceClientConnect.listSecrets(- request,- {- contextValues: createContextValues().set(ignoredCodesContextKey, [Code.NotFound, Code.PermissionDenied]),- }- );+ const response = await databaseServiceClientConnect.listSecrets(request, {+ contextValues: createContextValues().set(ignoredCodesContextKey, [+ Code.NotFound,+ Code.PermissionDenied,+ ]),+ });const secrets = response.secrets; // Work directly with proto-es typessecretMapByDatabase.set(parent, secrets);return secrets;@@ -46,7 +46,8 @@ export const useDatabaseSecretStore = defineStore("database-secret", () => {updateMask: { paths: updateMask },allowMissing,});- const updatedSecret = await databaseServiceClientConnect.updateSecret(request);+ const updatedSecret =+ await databaseServiceClientConnect.updateSecret(request);if (secretMapByDatabase.has(database)) {const list = secretMapByDatabase.get(database) ?? [];const index = list.findIndex((s) => s.name === secret.name);diff --git a/frontend/src/store/modules/v1/dbSchema.ts b/frontend/src/store/modules/v1/dbSchema.tsindex 4349dc6050..3dd0964fd5 100644--- a/frontend/src/store/modules/v1/dbSchema.ts+++ b/frontend/src/store/modules/v1/dbSchema.ts@@ -1,14 +1,14 @@-import { defineStore } from "pinia";-import { computed, unref, watchEffect } from "vue";import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";+import { defineStore } from "pinia";+import { computed, unref, watchEffect } from "vue";import { databaseServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";-import { GetDatabaseMetadataRequestSchema } from "@/types/proto-es/v1/database_service_pb";// Removed conversion imports as part of Bold Migration Strategyimport { useCache } from "@/store/cache";import type { MaybeRef } from "@/types";import { UNKNOWN_ID, EMPTY_ID, UNKNOWN_INSTANCE_NAME } from "@/types";+import { GetDatabaseMetadataRequestSchema } from "@/types/proto-es/v1/database_service_pb";import type {TableMetadata,DatabaseMetadata,@@ -191,12 +191,9 @@ export const useDBSchemaV1Store = defineStore("dbSchema_v1", () => {const request = create(GetDatabaseMetadataRequestSchema, {name: metadataResourceName,});- const promise = databaseServiceClientConnect.getDatabaseMetadata(- request,- {- contextValues: createContextValues().set(silentContextKey, silent),- }- ); // Work directly with proto-es types+ const promise = databaseServiceClientConnect.getDatabaseMetadata(request, {+ contextValues: createContextValues().set(silentContextKey, silent),+ }); // Work directly with proto-es typessetRequestCache(metadataResourceName, promise);promise.then((res) => {mergeCache(res, true);@@ -253,7 +250,9 @@ export const useDBSchemaV1Store = defineStore("dbSchema_v1", () => {schema?: string;}) => {const tableList = getTableList({ database, schema });- return tableList.find((t) => t.name === table) ?? create(TableMetadataSchema, {});+ return (+ tableList.find((t) => t.name === table) ?? create(TableMetadataSchema, {})+ );};const getOrFetchTableMetadata = async ({diff --git a/frontend/src/store/modules/v1/environment.ts b/frontend/src/store/modules/v1/environment.tsindex fdc62cce06..f8d437a89e 100644--- a/frontend/src/store/modules/v1/environment.ts+++ b/frontend/src/store/modules/v1/environment.ts@@ -93,7 +93,7 @@ const updateEnvironmentSetting = async (name: `settings/${Setting_SettingName[Setting_SettingName.ENVIRONMENT]}`,value: {value: {- case: "environmentSetting",+ case: "environmentSetting",value: environment,},},diff --git a/frontend/src/store/modules/v1/experimental-issue.ts b/frontend/src/store/modules/v1/experimental-issue.tsindex 637b9c3feb..eb54230b85 100644--- a/frontend/src/store/modules/v1/experimental-issue.ts+++ b/frontend/src/store/modules/v1/experimental-issue.ts@@ -18,18 +18,18 @@ import {CreateIssueRequestSchema,GetIssueRequestSchema,} from "@/types/proto-es/v1/issue_service_pb";+import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {GetPlanRequestSchema,ListPlanCheckRunsRequestSchema,CreatePlanRequestSchema,} from "@/types/proto-es/v1/plan_service_pb";+import type { Plan } from "@/types/proto-es/v1/plan_service_pb";import {GetRolloutRequestSchema,ListTaskRunsRequestSchema,CreateRolloutRequestSchema,} from "@/types/proto-es/v1/rollout_service_pb";-import type { Issue } from "@/types/proto-es/v1/issue_service_pb";-import type { Plan } from "@/types/proto-es/v1/plan_service_pb";import { TaskRunLogSchema } from "@/types/proto-es/v1/rollout_service_pb";import { extractProjectResourceName, hasProjectPermissionV2 } from "@/utils";import { DEFAULT_PAGE_SIZE } from "../common";diff --git a/frontend/src/store/modules/v1/instance.ts b/frontend/src/store/modules/v1/instance.tsindex 1d92a65c20..7a9c60fc8f 100644--- a/frontend/src/store/modules/v1/instance.ts+++ b/frontend/src/store/modules/v1/instance.ts@@ -1,11 +1,21 @@-import { defineStore } from "pinia";-import { reactive } from "vue";import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";+import { defineStore } from "pinia";+import { reactive } from "vue";import { instanceServiceClientConnect } from "@/grpcweb";// Removed conversion imports - using proto-es types directlyimport { silentContextKey } from "@/grpcweb/context-key";-import {+import type { ComposedInstance } from "@/types";+import {+ unknownEnvironment,+ unknownInstance,+ isValidProjectName,+ isValidInstanceName,+ isValidEnvironmentName,+} from "@/types";+import { Engine } from "@/types/proto-es/v1/common_pb";+import { State } from "@/types/proto-es/v1/common_pb";+import {CreateInstanceRequestSchema,UpdateInstanceRequestSchema,DeleteInstanceRequestSchema,@@ -18,18 +28,8 @@ import {AddDataSourceRequestSchema,UpdateDataSourceRequestSchema,RemoveDataSourceRequestSchema,- ListInstancesRequestSchema+ ListInstancesRequestSchema,} from "@/types/proto-es/v1/instance_service_pb";-import type { ComposedInstance } from "@/types";-import {- unknownEnvironment,- unknownInstance,- isValidProjectName,- isValidInstanceName,- isValidEnvironmentName,-} from "@/types";-import { Engine } from "@/types/proto-es/v1/common_pb";-import { State } from "@/types/proto-es/v1/common_pb";// Using proto-es types directly, no conversions needed for internal operationsimport type {DataSource,@@ -86,15 +86,15 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {// Store uses proto-es types directlyconst instanceMapByName = reactive(new Map<string, ComposedInstance>());const instanceRequestCache = new Map<string, Promise<ComposedInstance>>();--const reset = () => {instanceMapByName.clear();};// Actions- const upsertInstances = async (list: Instance[]): Promise<ComposedInstance[]> => {+ const upsertInstances = async (+ list: Instance[]+ ): Promise<ComposedInstance[]> => {const composedInstances = await Promise.all(list.map((instance) => composeInstance(instance)));@@ -169,12 +169,16 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {const request = create(BatchUpdateInstancesRequestSchema, {requests: requests,});- const response = await instanceServiceClientConnect.batchUpdateInstances(request);+ const response =+ await instanceServiceClientConnect.batchUpdateInstances(request);const composed = await upsertInstances(response.instances);return composed;};- const fetchInstanceByName = async (name: string, silent = false): Promise<ComposedInstance> => {+ const fetchInstanceByName = async (+ name: string,+ silent = false+ ): Promise<ComposedInstance> => {const request = create(GetInstanceRequestSchema, {name,});@@ -188,7 +192,10 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {const instance = instanceMapByName.get(name);return instance ?? unknownInstance();};- const getOrFetchInstanceByName = async (name: string, silent = false): Promise<ComposedInstance> => {+ const getOrFetchInstanceByName = async (+ name: string,+ silent = false+ ): Promise<ComposedInstance> => {const cachedData = instanceMapByName.get(name);if (cachedData) {return cachedData;@@ -227,7 +234,8 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {dataSource: dataSource,updateMask: { paths: updateMask },});- const response = await instanceServiceClientConnect.updateDataSource(request);+ const response =+ await instanceServiceClientConnect.updateDataSource(request);const [composed] = await upsertInstances([response]);return composed;};@@ -239,7 +247,8 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {name: instance.name,dataSource: dataSource,});- const response = await instanceServiceClientConnect.removeDataSource(request);+ const response =+ await instanceServiceClientConnect.removeDataSource(request);const [composed] = await upsertInstances([response]);return composed;};@@ -271,8 +280,6 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {};};--return {reset,upsertInstances,@@ -294,7 +301,9 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {});// Compose function for proto-es types-const composeInstance = async (instance: Instance): Promise<ComposedInstance> => {+const composeInstance = async (+ instance: Instance+): Promise<ComposedInstance> => {const composed = instance as ComposedInstance;const environmentEntity =(await useEnvironmentV1Store().getOrFetchEnvironmentByName(@@ -303,5 +312,3 @@ const composeInstance = async (instance: Instance): Promise<ComposedInstance> =>composed.environmentEntity = environmentEntity;return composed;};--diff --git a/frontend/src/store/modules/v1/issueComment.ts b/frontend/src/store/modules/v1/issueComment.tsindex 40c2ca8074..c34bda2b50 100644--- a/frontend/src/store/modules/v1/issueComment.ts+++ b/frontend/src/store/modules/v1/issueComment.ts@@ -1,6 +1,6 @@+import { create } from "@bufbuild/protobuf";import { defineStore } from "pinia";import { reactive } from "vue";-import { create } from "@bufbuild/protobuf";import { issueServiceClientConnect } from "@/grpcweb";import {CreateIssueCommentRequestSchema,@@ -62,12 +62,10 @@ export const useIssueCommentStore = defineStore("issue_comment", () => {pageSize: request.pageSize,pageToken: request.pageToken,});- const resp = await issueServiceClientConnect.listIssueComments(connectRequest);+ const resp =+ await issueServiceClientConnect.listIssueComments(connectRequest);const issueComments = resp.issueComments;- issueCommentMap.set(- request.parent,- issueComments.map(composeIssueComment)- );+ issueCommentMap.set(request.parent, issueComments.map(composeIssueComment));return {nextPageToken: resp.nextPageToken,@@ -88,7 +86,8 @@ export const useIssueCommentStore = defineStore("issue_comment", () => {comment,}),});- const newIssueComment = await issueServiceClientConnect.createIssueComment(request);+ const newIssueComment =+ await issueServiceClientConnect.createIssueComment(request);const issueComment = newIssueComment;issueCommentMap.set(issueName, [...(issueCommentMap.get(issueName) ?? []),diff --git a/frontend/src/store/modules/v1/localSheet.ts b/frontend/src/store/modules/v1/localSheet.tsindex de5b4bf070..d9328c56ad 100644--- a/frontend/src/store/modules/v1/localSheet.ts+++ b/frontend/src/store/modules/v1/localSheet.ts@@ -1,6 +1,6 @@+import { create as createProto } from "@bufbuild/protobuf";import { defineStore } from "pinia";import { reactive } from "vue";-import { create as createProto } from "@bufbuild/protobuf";import type { Sheet } from "@/types/proto-es/v1/sheet_service_pb";import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";import { extractProjectResourceName } from "@/utils";@@ -21,10 +21,7 @@ export const useLocalSheetStore = defineStore("local_sheet", () => {return state.uid--;};- const createLocalSheet = (- name: string,- defaults: Partial<Sheet> = {}- ) => {+ const createLocalSheet = (name: string, defaults: Partial<Sheet> = {}) => {const sheet = createProto(SheetSchema, {name,title: defaults.title || "",diff --git a/frontend/src/store/modules/v1/permission.ts b/frontend/src/store/modules/v1/permission.tsindex e8f7c209bc..8092b36667 100644--- a/frontend/src/store/modules/v1/permission.ts+++ b/frontend/src/store/modules/v1/permission.ts@@ -9,8 +9,8 @@ import {} from "@/types";import { type User } from "@/types/proto-es/v1/user_service_pb";import { bindingListInIAM } from "@/utils";-import { useCurrentUserV1 } from "./auth";import { useRoleStore } from "../role";+import { useCurrentUserV1 } from "./auth";import { useWorkspaceV1Store } from "./workspace";export const usePermissionStore = defineStore("permission", () => {diff --git a/frontend/src/store/modules/v1/plan.ts b/frontend/src/store/modules/v1/plan.tsindex 847a1116b4..b8a8774dcf 100644--- a/frontend/src/store/modules/v1/plan.ts+++ b/frontend/src/store/modules/v1/plan.ts@@ -1,7 +1,7 @@+import { create } from "@bufbuild/protobuf";import dayjs from "dayjs";import { uniq } from "lodash-es";import { defineStore } from "pinia";-import { create } from "@bufbuild/protobuf";import { planServiceClientConnect } from "@/grpcweb";import {SearchPlansRequestSchema,diff --git a/frontend/src/store/modules/v1/policy.ts b/frontend/src/store/modules/v1/policy.tsindex c988fb1178..4fd06b8991 100644--- a/frontend/src/store/modules/v1/policy.ts+++ b/frontend/src/store/modules/v1/policy.ts@@ -1,6 +1,8 @@import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { Code, ConnectError } from "@connectrpc/connect";+import { defineStore } from "pinia";+import { computed, ref, unref, watchEffect } from "vue";import { orgPolicyServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";import { policyNamePrefix } from "@/store/modules/v1/common";@@ -17,8 +19,6 @@ import {DeletePolicyRequestSchema,RolloutPolicySchema,} from "@/types/proto-es/v1/org_policy_service_pb";-import { defineStore } from "pinia";-import { computed, ref, unref, watchEffect } from "vue";import { useCurrentUserV1 } from "./auth";interface PolicyState {@@ -78,7 +78,8 @@ export const usePolicyV1Store = defineStore("policy_v1", {policyType: policyType,showDeleted,});- const response = await orgPolicyServiceClientConnect.listPolicies(request);+ const response =+ await orgPolicyServiceClientConnect.listPolicies(request);const policies = response.policies;for (const policy of policies) {this.policyMapByName.set(policy.name, policy);@@ -130,7 +131,7 @@ export const usePolicyV1Store = defineStore("policy_v1", {try {const request = create(GetPolicyRequestSchema, { name });const policy = await orgPolicyServiceClientConnect.getPolicy(request, {- contextValues: createContextValues().set(silentContextKey, true)+ contextValues: createContextValues().set(silentContextKey, true),});this.policyMapByName.set(policy.name, policy);return policy;@@ -155,7 +156,9 @@ export const usePolicyV1Store = defineStore("policy_v1", {return this.getPolicyByName(name);},getPolicyByName(name: string) {- const policy = this.policyMapByName.get(replacePolicyTypeNameToLowerCase(name));+ const policy = this.policyMapByName.get(+ replacePolicyTypeNameToLowerCase(name)+ );return policy;},async upsertPolicy({@@ -175,7 +178,8 @@ export const usePolicyV1Store = defineStore("policy_v1", {name: policyName,inheritFromParent: policy.inheritFromParent ?? false,type: policy.type,- resourceType: policy.resourceType ?? PolicyResourceType.RESOURCE_TYPE_UNSPECIFIED,+ resourceType:+ policy.resourceType ?? PolicyResourceType.RESOURCE_TYPE_UNSPECIFIED,enforce: policy.enforce ?? false,policy: policy.policy,});@@ -184,7 +188,8 @@ export const usePolicyV1Store = defineStore("policy_v1", {updateMask: { paths: ["payload"] },allowMissing: true,});- const response = await orgPolicyServiceClientConnect.updatePolicy(request);+ const response =+ await orgPolicyServiceClientConnect.updatePolicy(request);this.policyMapByName.set(response.name, response);return response;},diff --git a/frontend/src/store/modules/v1/project.ts b/frontend/src/store/modules/v1/project.tsindex 5aac47d096..3152daec01 100644--- a/frontend/src/store/modules/v1/project.ts+++ b/frontend/src/store/modules/v1/project.ts@@ -17,9 +17,7 @@ import {isValidProjectName,} from "@/types";import { State } from "@/types/proto-es/v1/common_pb";-import type {- Project,-} from "@/types/proto-es/v1/project_service_pb";+import type { Project } from "@/types/proto-es/v1/project_service_pb";import {GetProjectRequestSchema,ListProjectsRequestSchema,@@ -122,7 +120,8 @@ export const useProjectV1Store = defineStore("project_v1", () => {params.silent ?? true);- let response: { projects: Project[]; nextPageToken: string } | undefined = undefined;+ let response: { projects: Project[]; nextPageToken: string } | undefined =+ undefined;let pageToken = params.pageToken;while (true) {let resp;diff --git a/frontend/src/store/modules/v1/projectIamPolicy.ts b/frontend/src/store/modules/v1/projectIamPolicy.tsindex 69d859d458..e29548e5e1 100644--- a/frontend/src/store/modules/v1/projectIamPolicy.ts+++ b/frontend/src/store/modules/v1/projectIamPolicy.ts@@ -1,16 +1,8 @@+import { create } from "@bufbuild/protobuf";import { isUndefined, uniq } from "lodash-es";import { defineStore } from "pinia";import { computed, ref, unref, watch } from "vue";-import { create } from "@bufbuild/protobuf";import { projectServiceClientConnect } from "@/grpcweb";-import {- GetIamPolicyRequestSchema,- SetIamPolicyRequestSchema,- IamPolicySchema,-} from "@/types/proto-es/v1/iam_policy_pb";-import {- BatchGetIamPolicyRequestSchema,-} from "@/types/proto-es/v1/project_service_pb";import {ALL_USERS_USER_EMAIL,QueryPermissionQueryAny,@@ -20,13 +12,19 @@ import {type QueryPermission,} from "@/types";import type { Expr } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";+import {+ GetIamPolicyRequestSchema,+ SetIamPolicyRequestSchema,+ IamPolicySchema,+} from "@/types/proto-es/v1/iam_policy_pb";import type { IamPolicy } from "@/types/proto-es/v1/iam_policy_pb";+import { BatchGetIamPolicyRequestSchema } from "@/types/proto-es/v1/project_service_pb";import type { User } from "@/types/proto-es/v1/user_service_pb";import { getUserEmailListInBinding } from "@/utils";import { convertFromExpr } from "@/utils/issue/cel";-import { useCurrentUserV1 } from "./auth";import { useRoleStore } from "../role";import { useUserStore } from "../user";+import { useCurrentUserV1 } from "./auth";import { usePermissionStore } from "./permission";export const useProjectIamPolicyStore = defineStore(@@ -77,7 +75,8 @@ export const useProjectIamPolicyStore = defineStore(scope: "projects/-",names: projectList,});- const response = await projectServiceClientConnect.batchGetIamPolicy(request);+ const response =+ await projectServiceClientConnect.batchGetIamPolicy(request);for (const item of response.policyResults) {if (item.policy) {await setIamPolicy(item.project, item.policy);diff --git a/frontend/src/store/modules/v1/projectWebhook.ts b/frontend/src/store/modules/v1/projectWebhook.tsindex 1dad8c54e9..70c39dc213 100644--- a/frontend/src/store/modules/v1/projectWebhook.ts+++ b/frontend/src/store/modules/v1/projectWebhook.ts@@ -1,5 +1,5 @@-import { defineStore } from "pinia";import { create } from "@bufbuild/protobuf";+import { defineStore } from "pinia";import { projectServiceClientConnect } from "@/grpcweb";import type { IdType } from "@/types";import type { Project, Webhook } from "@/types/proto-es/v1/project_service_pb";diff --git a/frontend/src/store/modules/v1/sheet.ts b/frontend/src/store/modules/v1/sheet.tsindex 5243a49bd8..e6a3c8eaf9 100644--- a/frontend/src/store/modules/v1/sheet.ts+++ b/frontend/src/store/modules/v1/sheet.ts@@ -1,17 +1,17 @@+import { create } from "@bufbuild/protobuf";import { defineStore } from "pinia";import { computed, unref, watchEffect } from "vue";-import { create } from "@bufbuild/protobuf";import { sheetServiceClientConnect } from "@/grpcweb";import { useCache } from "@/store/cache";import type { MaybeRef } from "@/types";import { UNKNOWN_ID } from "@/types";+import { Engine } from "@/types/proto-es/v1/common_pb";import type { Sheet } from "@/types/proto-es/v1/sheet_service_pb";import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";-import { Engine } from "@/types/proto-es/v1/common_pb";-import {+import {CreateSheetRequestSchema,GetSheetRequestSchema,- UpdateSheetRequestSchema+ UpdateSheetRequestSchema,} from "@/types/proto-es/v1/sheet_service_pb";import { extractSheetUID, getSheetStatement } from "@/utils";diff --git a/frontend/src/store/modules/v1/sql.ts b/frontend/src/store/modules/v1/sql.tsindex cdc400d488..60d19f58a2 100644--- a/frontend/src/store/modules/v1/sql.ts+++ b/frontend/src/store/modules/v1/sql.ts@@ -1,5 +1,5 @@-import { Code, ConnectError, createContextValues } from "@connectrpc/connect";import { create as createProto } from "@bufbuild/protobuf";+import { Code, ConnectError, createContextValues } from "@connectrpc/connect";import { defineStore } from "pinia";import { sqlServiceClientConnect } from "@/grpcweb";import {@@ -8,11 +8,14 @@ import {} from "@/grpcweb/context-key";import type { SQLResultSetV1 } from "@/types";import { PlanCheckRun_ResultSchema } from "@/types/proto-es/v1/plan_service_pb";-import type { ExportRequest, QueryRequest } from "@/types/proto-es/v1/sql_service_pb";-import {+import type {+ ExportRequest,+ QueryRequest,+} from "@/types/proto-es/v1/sql_service_pb";+import {type Advice,AdviceSchema,- Advice_Status+ Advice_Status,} from "@/types/proto-es/v1/sql_service_pb";import { extractGrpcErrorMessage } from "@/utils/grpcweb";@@ -20,10 +23,13 @@ export const getSqlReviewReports = (err: unknown): Advice[] => {const advices: Advice[] = [];if (err instanceof ConnectError) {for (const report of err.findDetails(PlanCheckRun_ResultSchema)) {- const startPosition = report.report.case === 'sqlReviewReport' ? {- line: report.report.value.line,- column: report.report.value.column,- }: undefined+ const startPosition =+ report.report.case === "sqlReviewReport"+ ? {+ line: report.report.value.line,+ column: report.report.value.column,+ }+ : undefined;advices.push(createProto(AdviceSchema, {status: Advice_Status.ERROR,@@ -62,10 +68,7 @@ export const useSQLStore = defineStore("sql", () => {error: extractGrpcErrorMessage(err),results: [],advices: getSqlReviewReports(err),- status:- err instanceof ConnectError- ? err.code- : Code.Unknown,+ status: err instanceof ConnectError ? err.code : Code.Unknown,};}};diff --git a/frontend/src/store/modules/v1/subscription.ts b/frontend/src/store/modules/v1/subscription.tsindex c35c007663..2cdf4fa465 100644--- a/frontend/src/store/modules/v1/subscription.ts+++ b/frontend/src/store/modules/v1/subscription.ts@@ -1,8 +1,8 @@+import { create } from "@bufbuild/protobuf";import dayjs from "dayjs";import { defineStore } from "pinia";import type { Ref } from "vue";import { computed } from "vue";-import { create } from "@bufbuild/protobuf";import { subscriptionServiceClientConnect } from "@/grpcweb";import {PLANS,@@ -202,7 +202,8 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {async fetchSubscription() {try {const request = create(GetSubscriptionRequestSchema, {});- const subscription = await subscriptionServiceClientConnect.getSubscription(request);+ const subscription =+ await subscriptionServiceClientConnect.getSubscription(request);this.setSubscription(subscription);return subscription;} catch (e) {@@ -213,7 +214,8 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {const request = create(UpdateSubscriptionRequestSchema, {license,});- const subscription = await subscriptionServiceClientConnect.updateSubscription(request);+ const subscription =+ await subscriptionServiceClientConnect.updateSubscription(request);this.setSubscription(subscription);return subscription;},diff --git a/frontend/src/store/modules/v1/worksheet.ts b/frontend/src/store/modules/v1/worksheet.tsindex 1ff709ec3b..e55d758944 100644--- a/frontend/src/store/modules/v1/worksheet.ts+++ b/frontend/src/store/modules/v1/worksheet.ts@@ -17,9 +17,7 @@ import {Worksheet_Visibility,} from "@/types/proto-es/v1/worksheet_service_pb";import type { WorksheetOrganizer } from "@/types/proto-es/v1/worksheet_service_pb";-import type {- Worksheet,-} from "@/types/proto-es/v1/worksheet_service_pb";+import type { Worksheet } from "@/types/proto-es/v1/worksheet_service_pb";import {extractWorksheetUID,getSheetStatement,@@ -223,10 +221,7 @@ export const useWorkSheetStore = defineStore("worksheet_v1", () => {return response.worksheets;};- const patchWorksheet = async (- worksheet: Worksheet,- updateMask: string[]- ) => {+ const patchWorksheet = async (worksheet: Worksheet, updateMask: string[]) => {if (!worksheet.name) return;const request = create(UpdateWorksheetRequestSchema, {worksheet: worksheet,diff --git a/frontend/src/store/modules/v1/workspace.ts b/frontend/src/store/modules/v1/workspace.tsindex 71c9085f78..77260244c8 100644--- a/frontend/src/store/modules/v1/workspace.ts+++ b/frontend/src/store/modules/v1/workspace.ts@@ -1,7 +1,7 @@+import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";import { defineStore } from "pinia";import { ref, computed } from "vue";-import { create } from "@bufbuild/protobuf";import { workspaceServiceClientConnect } from "@/grpcweb";import { userNamePrefix } from "@/store/modules/v1/common";import { groupBindingPrefix, ALL_USERS_USER_EMAIL } from "@/types";@@ -18,7 +18,7 @@ import { extractGroupEmail } from "./group";export const useWorkspaceV1Store = defineStore("workspace_v1", () => {const _workspaceIamPolicy = ref<IamPolicy>(create(IamPolicySchema, {}));-+const workspaceIamPolicy = computed(() => {return _workspaceIamPolicy.value;});diff --git a/frontend/src/store/modules/workspaceApprovalSetting.ts b/frontend/src/store/modules/workspaceApprovalSetting.tsindex ab2f0f8bfe..4521c6ac78 100644--- a/frontend/src/store/modules/workspaceApprovalSetting.ts+++ b/frontend/src/store/modules/workspaceApprovalSetting.ts@@ -1,24 +1,23 @@+import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";import { defineStore } from "pinia";import { ref } from "vue";-import { create } from "@bufbuild/protobuf";import { settingServiceClientConnect } from "@/grpcweb";+import { type LocalApprovalConfig, type LocalApprovalRule } from "@/types";+import type { Risk_Source } from "@/types/proto-es/v1/risk_service_pb";import type { Setting } from "@/types/proto-es/v1/setting_service_pb";-import {- GetSettingRequestSchema,+import {+ GetSettingRequestSchema,UpdateSettingRequestSchema,SettingSchema,Setting_SettingName,ValueSchema as SettingValueSchema,} from "@/types/proto-es/v1/setting_service_pb";-import { type LocalApprovalConfig, type LocalApprovalRule } from "@/types";-import type { Risk_Source } from "@/types/proto-es/v1/risk_service_pb";import {resolveLocalApprovalConfig,buildWorkspaceApprovalSetting,seedWorkspaceApprovalSetting,} from "@/utils";-import { useGracefulRequest } from "./utils";const SETTING_NAME = `settings/${Setting_SettingName[Setting_SettingName.WORKSPACE_APPROVAL]}`;@@ -56,7 +55,7 @@ export const useWorkspaceApprovalSettingStore = defineStore(const updateConfig = async () => {const approvalSetting = await buildWorkspaceApprovalSetting(config.value);-+const setting = create(SettingSchema, {name: SETTING_NAME,value: create(SettingValueSchema, {@@ -66,7 +65,7 @@ export const useWorkspaceApprovalSettingStore = defineStore(},}),});-+const request = create(UpdateSettingRequestSchema, {allowMissing: true,setting,@@ -155,4 +154,4 @@ export const useWorkspaceApprovalSettingStore = defineStore(updateRuleFlow,};}-);\ No newline at end of file+);diff --git a/frontend/src/types/iam/index.ts b/frontend/src/types/iam/index.tsindex 4de86745d2..525322eff1 100644--- a/frontend/src/types/iam/index.ts+++ b/frontend/src/types/iam/index.ts@@ -1,8 +1,7 @@import type { Permission } from "./permission";import PERMISSION_DATA from "./permission.yaml";-export const PERMISSIONS: Permission[] =- PERMISSION_DATA.permissions;+export const PERMISSIONS: Permission[] = PERMISSION_DATA.permissions;export * from "./permission";diff --git a/frontend/src/types/iam/permission.ts b/frontend/src/types/iam/permission.tsindex 36f4b94dde..3dc3d0f1ea 100644--- a/frontend/src/types/iam/permission.ts+++ b/frontend/src/types/iam/permission.ts@@ -120,8 +120,7 @@ export type Permission =| "bb.worksheets.get"| "bb.worksheets.manage"| "bb.workspaces.getIamPolicy"- | "bb.workspaces.setIamPolicy"- ;+ | "bb.workspaces.setIamPolicy";export type QueryPermission = PickLiteral<Permission,diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.tsindex 548c982a77..24b6178207 100644--- a/frontend/src/types/index.ts+++ b/frontend/src/types/index.ts@@ -31,4 +31,3 @@ export * from "./workspaceApprovalSetting";export * from "./timestamp";export * from "./v1";-diff --git a/frontend/src/types/plan.ts b/frontend/src/types/plan.tsindex a94ace0d52..92d6a24429 100644--- a/frontend/src/types/plan.ts+++ b/frontend/src/types/plan.ts@@ -1,7 +1,7 @@import {PlanFeature,PlanType,- type PlanLimitConfig+ type PlanLimitConfig,} from "@/types/proto-es/v1/subscription_service_pb";import planData from "./plan.yaml";@@ -9,7 +9,9 @@ import planData from "./plan.yaml";export const PLANS: PlanLimitConfig[] = planData.plans.map((plan: any) => ({...plan,type: PlanType[plan.type as keyof typeof PlanType],- features: plan.features.map((f: string) => PlanFeature[f as keyof typeof PlanFeature])+ features: plan.features.map(+ (f: string) => PlanFeature[f as keyof typeof PlanFeature]+ ),}));// Create a plan feature matrix from the YAML data@@ -26,7 +28,10 @@ PLANS.forEach((plan) => {});// Helper function to check if a plan has a feature-export const planHasFeature = (plan: PlanType, feature: PlanFeature): boolean => {+export const planHasFeature = (+ plan: PlanType,+ feature: PlanFeature+): boolean => {const planFeatures = planFeatureMatrix.get(plan);return planFeatures?.has(feature) ?? false;};@@ -48,20 +53,24 @@ export const hasFeature = (plan: PlanType, feature: PlanFeature): boolean => {};// Helper function to check instance features-export const hasInstanceFeature = (plan: PlanType, feature: PlanFeature, instanceActivated = true): boolean => {+export const hasInstanceFeature = (+ plan: PlanType,+ feature: PlanFeature,+ instanceActivated = true+): boolean => {if (!hasFeature(plan, feature)) {return false;}-+// For FREE plan, don't check instance activationif (plan === PlanType.FREE) {return true;}-+// For instance-limited features, check activationif (instanceLimitFeature.has(feature)) {return instanceActivated;}-+return true;};diff --git a/frontend/src/types/review.ts b/frontend/src/types/review.tsindex 49549f2d50..8ff994a785 100644--- a/frontend/src/types/review.ts+++ b/frontend/src/types/review.ts@@ -1,5 +1,9 @@import { create as createProto } from "@bufbuild/protobuf";-import type { ApprovalStep, Issue_Approver, ApprovalTemplate } from "./proto-es/v1/issue_service_pb";+import type {+ ApprovalStep,+ Issue_Approver,+ ApprovalTemplate,+} from "./proto-es/v1/issue_service_pb";import { ApprovalTemplateSchema } from "./proto-es/v1/issue_service_pb";export type ReviewFlow = {diff --git a/frontend/src/types/risk.ts b/frontend/src/types/risk.tsindex 08f05d886e..dc2749c8c8 100644--- a/frontend/src/types/risk.ts+++ b/frontend/src/types/risk.ts@@ -29,9 +29,6 @@ export const useSupportedSourceList = () => {];}- return [- Risk_Source.DATA_EXPORT,- Risk_Source.REQUEST_ROLE,- ];+ return [Risk_Source.DATA_EXPORT, Risk_Source.REQUEST_ROLE];});};diff --git a/frontend/src/types/semantic-types.yaml b/frontend/src/types/semantic-types.yamlindex 7cbb83abdc..9615f0cebc 100644--- a/frontend/src/types/semantic-types.yaml+++ b/frontend/src/types/semantic-types.yaml@@ -1,2 +1,2 @@- id: bb.default-- id: bb.default-partial\ No newline at end of file+- id: bb.default-partialdiff --git a/frontend/src/types/semanticTypes.ts b/frontend/src/types/semanticTypes.tsindex 8e7adc7b4b..3003faf205 100644--- a/frontend/src/types/semanticTypes.ts+++ b/frontend/src/types/semanticTypes.ts@@ -1,9 +1,7 @@import { create } from "@bufbuild/protobuf";import { t } from "@/plugins/i18n";import type { Algorithm } from "@/types/proto-es/v1/setting_service_pb";-import {- SemanticTypeSetting_SemanticTypeSchema,-} from "@/types/proto-es/v1/setting_service_pb";+import { SemanticTypeSetting_SemanticTypeSchema } from "@/types/proto-es/v1/setting_service_pb";import buildInSemanticTypes from "./semantic-types.yaml";interface BuildInSemantic {@@ -16,7 +14,9 @@ export const getSemanticTemplateList = () => {const key = buildInSemantic.id.split(".").join("-");return create(SemanticTypeSetting_SemanticTypeSchema, {id: buildInSemantic.id,- title: t(`dynamic.settings.sensitive-data.semantic-types.template.${key}.title`),+ title: t(+ `dynamic.settings.sensitive-data.semantic-types.template.${key}.title`+ ),description: t(`dynamic.settings.sensitive-data.semantic-types.template.${key}.description`),diff --git a/frontend/src/types/sql-review.dev.yaml b/frontend/src/types/sql-review.dev.yamlindex 9e7a05529a..f54f416dac 100644--- a/frontend/src/types/sql-review.dev.yaml+++ b/frontend/src/types/sql-review.dev.yaml@@ -1487,4 +1487,4 @@ ruleList:engine: MYSQL- type: statement.object-owner-checklevel: WARNING- engine: POSTGRES\ No newline at end of file+ engine: POSTGRESdiff --git a/frontend/src/types/sqlEditor/tree.ts b/frontend/src/types/sqlEditor/tree.tsindex b65a3595d1..8fc28fe340 100644--- a/frontend/src/types/sqlEditor/tree.ts+++ b/frontend/src/types/sqlEditor/tree.ts@@ -27,7 +27,7 @@ export type LabelTarget = {export type SQLEditorTreeNodeTarget<T extends SQLEditorTreeNodeType = any> =T extends "instance"- ? Omit<InstanceResource, '$typeName'>+ ? Omit<InstanceResource, "$typeName">: T extends "environment"? Environment: T extends "database"diff --git a/frontend/src/types/sqlReview.ts b/frontend/src/types/sqlReview.tsindex bcfde4d335..f14ede52ef 100644--- a/frontend/src/types/sqlReview.ts+++ b/frontend/src/types/sqlReview.ts@@ -1,10 +1,8 @@import { t, te } from "@/plugins/i18n";import { Engine } from "@/types/proto-es/v1/common_pb";-import { engineToString } from "@/utils/v1/common-conversions";-import {- SQLReviewRuleLevel,-} from "@/types/proto-es/v1/org_policy_service_pb";+import { SQLReviewRuleLevel } from "@/types/proto-es/v1/org_policy_service_pb";import type { PlanType } from "@/types/proto-es/v1/subscription_service_pb";+import { engineToString } from "@/utils/v1/common-conversions";import sqlReviewSchema from "./sql-review-schema.yaml";import sqlReviewDevTemplate from "./sql-review.dev.yaml";import sqlReviewProdTemplate from "./sql-review.prod.yaml";@@ -177,28 +175,28 @@ export const getRuleMapByEngine = (}, new Map<Engine, Map<string, RuleTemplateV2>>());};-const convertRuleTemplateV2Raw = (sqlReviewSchema: RuleTemplateV2Raw[]): RuleTemplateV2[] => {+const convertRuleTemplateV2Raw = (+ sqlReviewSchema: RuleTemplateV2Raw[]+): RuleTemplateV2[] => {return sqlReviewSchema.map((rawRule) => {// Convert engine string key to enum valueconst engineKey = rawRule.engine as keyof typeof Engine;const engine = Engine[engineKey] ?? Engine.ENGINE_UNSPECIFIED;-+// Convert level string key to enum valueconst levelKey = rawRule.level as keyof typeof SQLReviewRuleLevel;const level = SQLReviewRuleLevel[levelKey] ?? SQLReviewRuleLevel.DISABLED;-+return {...rawRule,engine,level,};});-}+};export const ruleTemplateMapV2 = getRuleMapByEngine(- convertRuleTemplateV2Raw(- sqlReviewSchema as RuleTemplateV2Raw[]- )+ convertRuleTemplateV2Raw(sqlReviewSchema as RuleTemplateV2Raw[]));// Build the frontend template list based on schema and template.@@ -227,10 +225,8 @@ export const TEMPLATE_LIST_V2: SQLReviewPolicyTemplateV2[] = (function () {// Convert engine string to enum for map lookupconst engineKey = rule.engine as keyof typeof Engine;const engine = Engine[engineKey] ?? Engine.ENGINE_UNSPECIFIED;-- const ruleTemplate = ruleTemplateMapV2- .get(engine)- ?.get(rule.type);++ const ruleTemplate = ruleTemplateMapV2.get(engine)?.get(rule.type);if (!ruleTemplate) {continue;}diff --git a/frontend/src/types/timestamp.ts b/frontend/src/types/timestamp.tsindex 43500408ef..5cc129bf52 100644--- a/frontend/src/types/timestamp.ts+++ b/frontend/src/types/timestamp.ts@@ -1,6 +1,5 @@import type { Timestamp as TimestampProtoEs } from "@bufbuild/protobuf/wkt";-// Helper functions for proto-es timestamps (which use bigint for seconds)export const getTimeForPbTimestampProtoEs = (timestamp?: TimestampProtoEs,diff --git a/frontend/src/types/v1/changelist.ts b/frontend/src/types/v1/changelist.tsindex 1aa71a51a8..11ab5ce300 100644--- a/frontend/src/types/v1/changelist.ts+++ b/frontend/src/types/v1/changelist.ts@@ -1,6 +1,6 @@+import { create } from "@bufbuild/protobuf";import { SYSTEM_BOT_USER_NAME } from "@/types";import { ChangelistSchema } from "@/types/proto-es/v1/changelist_service_pb";-import { create } from "@bufbuild/protobuf";export const UNKNOWN_CHANGELIST_NAME = "projects/-1/changelists/-1";diff --git a/frontend/src/types/v1/dataSource.ts b/frontend/src/types/v1/dataSource.tsindex 4eb544ff7a..9d61ef5249 100644--- a/frontend/src/types/v1/dataSource.ts+++ b/frontend/src/types/v1/dataSource.ts@@ -1,5 +1,5 @@-import { v4 as uuidv4 } from "uuid";import { create } from "@bufbuild/protobuf";+import { v4 as uuidv4 } from "uuid";// DataSource type used in function signatures, imported in value importsimport {DataSourceSchema,diff --git a/frontend/src/types/v1/database.ts b/frontend/src/types/v1/database.tsindex 0182890969..78a7522921 100644--- a/frontend/src/types/v1/database.ts+++ b/frontend/src/types/v1/database.ts@@ -1,7 +1,7 @@+import { create } from "@bufbuild/protobuf";import { extractDatabaseResourceName, isNullOrUndefined } from "@/utils";import { EMPTY_ID, UNKNOWN_ID } from "../const";import { State } from "../proto-es/v1/common_pb";-import { create } from "@bufbuild/protobuf";import type { Database } from "../proto-es/v1/database_service_pb";import { DatabaseSchema$ } from "../proto-es/v1/database_service_pb";import type { InstanceResource } from "../proto-es/v1/instance_service_pb";diff --git a/frontend/src/types/v1/environment.ts b/frontend/src/types/v1/environment.tsindex d5cf7c3ebc..99341a2c05 100644--- a/frontend/src/types/v1/environment.ts+++ b/frontend/src/types/v1/environment.ts@@ -1,7 +1,10 @@-import { create } from '@bufbuild/protobuf';+import { create } from "@bufbuild/protobuf";import { environmentNamePrefix } from "@/store";import { EMPTY_ID, UNKNOWN_ID } from "../const";-import { EnvironmentSetting_EnvironmentSchema, type EnvironmentSetting_Environment } from "../proto-es/v1/setting_service_pb";+import {+ EnvironmentSetting_EnvironmentSchema,+ type EnvironmentSetting_Environment,+} from "../proto-es/v1/setting_service_pb";export const ENVIRONMENT_ALL_NAME = "environments/-";export const EMPTY_ENVIRONMENT_NAME = `environments/${EMPTY_ID}`;diff --git a/frontend/src/types/v1/group.ts b/frontend/src/types/v1/group.tsindex 6f1262088b..25ccb5e85f 100644--- a/frontend/src/types/v1/group.ts+++ b/frontend/src/types/v1/group.ts@@ -1,7 +1,7 @@+import { create as createProto } from "@bufbuild/protobuf";import { groupNamePrefix } from "@/store/modules/v1/common";import { UNKNOWN_ID } from "../const";import { GroupSchema } from "../proto-es/v1/group_service_pb";-import { create as createProto } from "@bufbuild/protobuf";export const UNKNOWN_GROUP_NAME = `${groupNamePrefix}${UNKNOWN_ID}`;diff --git a/frontend/src/types/v1/instance.ts b/frontend/src/types/v1/instance.tsindex 6b4d2fb5ef..6613b56804 100644--- a/frontend/src/types/v1/instance.ts+++ b/frontend/src/types/v1/instance.ts@@ -1,10 +1,16 @@+import { create } from "@bufbuild/protobuf";import { environmentNamePrefix } from "@/store";import type { Environment } from "@/types/v1/environment";import { EMPTY_ID, UNKNOWN_ID } from "../const";import { Engine, State } from "../proto-es/v1/common_pb";-import type { Instance, InstanceResource } from "../proto-es/v1/instance_service_pb";-import { create } from "@bufbuild/protobuf";-import { InstanceSchema, InstanceResourceSchema } from "../proto-es/v1/instance_service_pb";+import type {+ Instance,+ InstanceResource,+} from "../proto-es/v1/instance_service_pb";+import {+ InstanceSchema,+ InstanceResourceSchema,+} from "../proto-es/v1/instance_service_pb";import { UNKNOWN_ENVIRONMENT_NAME, unknownEnvironment } from "./environment";export const EMPTY_INSTANCE_NAME = `instances/${EMPTY_ID}`;@@ -35,7 +41,7 @@ export const unknownInstanceResource = (): InstanceResource => {name: UNKNOWN_INSTANCE_NAME,engine: instance.engine,title: "<<Unknown instance>>",- activation: true,+ activation: true,dataSources: [],environment: UNKNOWN_ENVIRONMENT_NAME,});diff --git a/frontend/src/types/v1/issue/plan.ts b/frontend/src/types/v1/issue/plan.tsindex 798a6c63b2..2961a0643a 100644--- a/frontend/src/types/v1/issue/plan.ts+++ b/frontend/src/types/v1/issue/plan.ts@@ -1,9 +1,10 @@import { create as createProto } from "@bufbuild/protobuf";import { EMPTY_ID, UNKNOWN_ID } from "@/types/const";-import type {- Plan,+import type { Plan } from "@/types/proto-es/v1/plan_service_pb";+import {+ PlanSchema,+ Plan_SpecSchema,} from "@/types/proto-es/v1/plan_service_pb";-import { PlanSchema, Plan_SpecSchema } from "@/types/proto-es/v1/plan_service_pb";export const EMPTY_PLAN_NAME = `projects/${EMPTY_ID}/plans/${EMPTY_ID}`;export const UNKNOWN_PLAN_NAME = `projects/${UNKNOWN_ID}/plans/${UNKNOWN_ID}`;diff --git a/frontend/src/types/v1/issue/rollout.ts b/frontend/src/types/v1/issue/rollout.tsindex 2d4ae1564b..2de66440f9 100644--- a/frontend/src/types/v1/issue/rollout.ts+++ b/frontend/src/types/v1/issue/rollout.ts@@ -1,3 +1,4 @@+import { create } from "@bufbuild/protobuf";import { EMPTY_ID, UNKNOWN_ID } from "@/types/const";import type {TaskRun,@@ -13,7 +14,6 @@ import {EMPTY_ENVIRONMENT_NAME,UNKNOWN_ENVIRONMENT_NAME,} from "../environment";-import { create } from "@bufbuild/protobuf";export const EMPTY_STAGE_NAME = `${EMPTY_ROLLOUT_NAME}/stages/${EMPTY_ID}`;export const UNKNOWN_STAGE_NAME = `${UNKNOWN_ROLLOUT_NAME}/stages/${UNKNOWN_ID}`;diff --git a/frontend/src/types/v1/project.ts b/frontend/src/types/v1/project.tsindex 92e22b4ab7..7a18359408 100644--- a/frontend/src/types/v1/project.ts+++ b/frontend/src/types/v1/project.ts@@ -1,10 +1,10 @@+import { create as createProto } from "@bufbuild/protobuf";import { EMPTY_ID, UNKNOWN_ID } from "../const";import { State } from "../proto-es/v1/common_pb";import type { IamPolicy } from "../proto-es/v1/iam_policy_pb";import { IamPolicySchema } from "../proto-es/v1/iam_policy_pb";import type { Project } from "../proto-es/v1/project_service_pb";import { ProjectSchema } from "../proto-es/v1/project_service_pb";-import { create as createProto } from "@bufbuild/protobuf";export const DEFAULT_PROJECT_UID = 1;export const EMPTY_PROJECT_NAME = `projects/${EMPTY_ID}`;diff --git a/frontend/src/types/v1/projectWebhook.ts b/frontend/src/types/v1/projectWebhook.tsindex c386670da7..148c8c3d63 100644--- a/frontend/src/types/v1/projectWebhook.ts+++ b/frontend/src/types/v1/projectWebhook.ts@@ -1,10 +1,10 @@+import { create as createProto } from "@bufbuild/protobuf";import { t } from "@/plugins/i18n";import {Activity_Type,WebhookSchema,Webhook_Type,} from "../proto-es/v1/project_service_pb";-import { create as createProto } from "@bufbuild/protobuf";export const emptyProjectWebhook = () => {return createProto(WebhookSchema, {diff --git a/frontend/src/types/v1/sql.ts b/frontend/src/types/v1/sql.tsindex 07096c0cf9..677b883e8d 100644--- a/frontend/src/types/v1/sql.ts+++ b/frontend/src/types/v1/sql.ts@@ -1,5 +1,5 @@-import type { Advice, QueryResponse } from "../proto-es/v1/sql_service_pb";import type { Code } from "@connectrpc/connect";+import type { Advice, QueryResponse } from "../proto-es/v1/sql_service_pb";export interface SQLResultSetV1 extends Omit<QueryResponse, "$typeName"> {error: string; // empty if no error occurreddiff --git a/frontend/src/types/v1/user.ts b/frontend/src/types/v1/user.tsindex 67355d18ec..9879a207b0 100644--- a/frontend/src/types/v1/user.ts+++ b/frontend/src/types/v1/user.ts@@ -1,8 +1,8 @@+import { create } from "@bufbuild/protobuf";import { t } from "@/plugins/i18n";import { SYSTEM_BOT_ID } from "../common";import { EMPTY_ID, UNKNOWN_ID } from "../const";import { State } from "../proto-es/v1/common_pb";-import { create } from "@bufbuild/protobuf";import type { User } from "../proto-es/v1/user_service_pb";import { UserType, UserSchema } from "../proto-es/v1/user_service_pb";diff --git a/frontend/src/utils/auto-route.ts b/frontend/src/utils/auto-route.tsindex e568a5a02f..becac9ec25 100644--- a/frontend/src/utils/auto-route.ts+++ b/frontend/src/utils/auto-route.ts@@ -18,15 +18,18 @@ import {SQL_EDITOR_SETTING_USERS_MODULE,} from "@/router/sqlEditor";import { useAppFeature } from "@/store";-import type { User } from "@/types/proto-es/v1/user_service_pb";import type { Database } from "@/types/proto-es/v1/database_service_pb";-import { formatEnvironmentName, type Environment } from "@/types/v1/environment";import type {Instance,InstanceResource,} from "@/types/proto-es/v1/instance_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";+import type { User } from "@/types/proto-es/v1/user_service_pb";+import {+ formatEnvironmentName,+ type Environment,+} from "@/types/v1/environment";import {extractDatabaseResourceName,extractInstanceResourceName,diff --git a/frontend/src/utils/grpcweb.ts b/frontend/src/utils/grpcweb.tsindex 8f35a11f23..a8c79af986 100644--- a/frontend/src/utils/grpcweb.ts+++ b/frontend/src/utils/grpcweb.ts@@ -2,9 +2,9 @@ import { Code, ConnectError } from "@connectrpc/connect";export const getErrorCode = (error: unknown) => {if (error instanceof ConnectError) {- return error.code;+ return error.code;}- return Code.Unknown+ return Code.Unknown;};export const extractGrpcErrorMessage = (err: unknown) => {diff --git a/frontend/src/utils/util.ts b/frontend/src/utils/util.tsindex 41e259da35..11819d7cb0 100644--- a/frontend/src/utils/util.ts+++ b/frontend/src/utils/util.ts@@ -1,3 +1,4 @@+import type { Duration } from "@bufbuild/protobuf/wkt";import dayjs from "dayjs";import dayOfYear from "dayjs/plugin/dayOfYear";import duration from "dayjs/plugin/duration";@@ -6,7 +7,6 @@ import utc from "dayjs/plugin/utc";import { escapeRegExp, round } from "lodash-es";import semver from "semver";import { watchEffect, type Ref } from "vue";-import type { Duration } from "@bufbuild/protobuf/wkt";dayjs.extend(dayOfYear);dayjs.extend(duration);@@ -35,13 +35,11 @@ export function humanizeTs(ts: number): string {return time.local().format("MMM D YYYY");}-export const humanizeDurationV1 = (- duration: Duration | undefined,-) => {+export const humanizeDurationV1 = (duration: Duration | undefined) => {if (!duration) return "-";const { seconds, nanos } = duration;const totalMs = Number(seconds) * 1000 + nanos / 1e6;-+// For durations less than 1 second, show in millisecondsif (totalMs < 1000) {if (totalMs < 0.01) {@@ -58,13 +56,13 @@ export const humanizeDurationV1 = (// For 100ms-1s, show no decimal placesreturn `${totalMs.toFixed(0)}ms`;}-+// For durations between 1-60 seconds, show in seconds with 1 decimalconst totalSeconds = totalMs / 1000;if (totalSeconds < 60) {return `${totalSeconds.toFixed(1)}s`;}-+// For durations between 1-60 minutes, show in minutes and secondsconst minutes = Math.floor(totalSeconds / 60);if (minutes < 60) {@@ -74,7 +72,7 @@ export const humanizeDurationV1 = (}return `${minutes}m${remainingSeconds}s`;}-+// For durations over 1 hour, show in hours and minutesconst hours = Math.floor(minutes / 60);const remainingMinutes = minutes % 60;diff --git a/frontend/src/utils/v1/cel.ts b/frontend/src/utils/v1/cel.tsindex 2260722262..4fb906fc6f 100644--- a/frontend/src/utils/v1/cel.ts+++ b/frontend/src/utils/v1/cel.ts@@ -2,12 +2,12 @@ import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { celServiceClientConnect } from "@/grpcweb";import { silentContextKey } from "@/grpcweb/context-key";-import {- BatchParseRequestSchema,- BatchDeparseRequestSchema-} from "@/types/proto-es/v1/cel_service_pb";import type { Expr } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";import { ExprSchema } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";+import {+ BatchParseRequestSchema,+ BatchDeparseRequestSchema,+} from "@/types/proto-es/v1/cel_service_pb";export const batchConvertCELStringToParsedExpr = async (celList: string[]@@ -19,7 +19,7 @@ export const batchConvertCELStringToParsedExpr = async (const response = await celServiceClientConnect.batchParse(request, {contextValues: createContextValues().set(silentContextKey, true),});-+// Convert new Expr array to old Expr array for compatibilityreturn response.expressions;} catch (error) {diff --git a/frontend/src/utils/v1/changelog.ts b/frontend/src/utils/v1/changelog.tsindex 0a2ce9f83c..68e847e18a 100644--- a/frontend/src/utils/v1/changelog.ts+++ b/frontend/src/utils/v1/changelog.ts@@ -1,11 +1,14 @@-import { isEqual, isUndefined, orderBy, uniqBy } from "lodash-es";import { create } from "@bufbuild/protobuf";+import { isEqual, isUndefined, orderBy, uniqBy } from "lodash-es";import { t } from "@/plugins/i18n";import { useDBSchemaV1Store, useDatabaseV1Store } from "@/store";import type { ComposedDatabase } from "@/types";import { UNKNOWN_ID } from "@/types";import { type AffectedTable, EmptyAffectedTable } from "@/types";-import { Changelog_Type, ChangelogSchema } from "@/types/proto-es/v1/database_service_pb";+import {+ Changelog_Type,+ ChangelogSchema,+} from "@/types/proto-es/v1/database_service_pb";import type { Changelog } from "@/types/proto-es/v1/database_service_pb";import { databaseV1Url, extractDatabaseResourceName } from "./database";diff --git a/frontend/src/utils/v1/database.ts b/frontend/src/utils/v1/database.tsindex 60f108b1b1..aa787fe0b9 100644--- a/frontend/src/utils/v1/database.ts+++ b/frontend/src/utils/v1/database.ts@@ -5,9 +5,7 @@ import {} from "@/store/modules/v1/common";import type { ComposedDatabase, QueryPermission } from "@/types";import { QueryPermissionQueryAny, UNKNOWN_ID } from "@/types";-import {- hasWorkspacePermissionV2-} from "../iam";+import { hasWorkspacePermissionV2 } from "../iam";import { extractProjectResourceName } from "./project";export const databaseV1Url = (db: ComposedDatabase) => {diff --git a/frontend/src/utils/v1/iam.ts b/frontend/src/utils/v1/iam.tsindex 99ad2bcf19..6ea117d5c2 100644--- a/frontend/src/utils/v1/iam.ts+++ b/frontend/src/utils/v1/iam.ts@@ -5,7 +5,6 @@ import { groupBindingPrefix, ALL_USERS_USER_EMAIL } from "@/types";import type { IamPolicy, Binding } from "@/types/proto-es/v1/iam_policy_pb";import { convertFromExpr } from "@/utils/issue/cel";-export const isBindingPolicyExpired = (binding: Binding): boolean => {if (binding.parsedExpr) {const conditionExpr = convertFromExpr(binding.parsedExpr);diff --git a/frontend/src/utils/v1/instance-conversions.ts b/frontend/src/utils/v1/instance-conversions.tsindex 48c805e411..b26a34efb7 100644--- a/frontend/src/utils/v1/instance-conversions.ts+++ b/frontend/src/utils/v1/instance-conversions.ts@@ -1,4 +1,4 @@-import {+import {DataSourceType as NewDataSourceType,DataSource_AuthenticationType as NewDataSource_AuthenticationType,} from "@/types/proto-es/v1/instance_service_pb";@@ -6,7 +6,9 @@ import {// ========== SCOPE VALUE CONVERSIONS (for AdvancedSearch components) ==========// Convert scope value (string or number) to proto-es DataSourceType-export const convertScopeValueToDataSourceType = (value: string | number): NewDataSourceType => {+export const convertScopeValueToDataSourceType = (+ value: string | number+): NewDataSourceType => {switch (value) {case 0:case "DATA_SOURCE_UNSPECIFIED":@@ -25,7 +27,9 @@ export const convertScopeValueToDataSourceType = (value: string | number): NewDa};// Convert scope value (string or number) to proto-es DataSource_AuthenticationType-export const convertScopeValueToDataSourceAuthenticationType = (value: string | number): NewDataSource_AuthenticationType => {+export const convertScopeValueToDataSourceAuthenticationType = (+ value: string | number+): NewDataSource_AuthenticationType => {switch (value) {case 0:case "AUTHENTICATION_UNSPECIFIED":diff --git a/frontend/src/utils/v1/sql.ts b/frontend/src/utils/v1/sql.tsindex d1ef75ee86..32333ac1cf 100644--- a/frontend/src/utils/v1/sql.ts+++ b/frontend/src/utils/v1/sql.ts@@ -1,6 +1,6 @@+import { toJson } from "@bufbuild/protobuf";import dayjs from "dayjs";import Long from "long";-import { toJson } from "@bufbuild/protobuf";import { getDateForPbTimestampProtoEs } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import type {@@ -13,10 +13,7 @@ import { isNullOrUndefined } from "../util";// extractSQLRowValuePlain extracts a plain value from a RowValue.export const extractSQLRowValuePlain = (value: RowValue | undefined) => {- if (- typeof value === "undefined" ||- value.kind?.case === "nullValue"- ) {+ if (typeof value === "undefined" || value.kind?.case === "nullValue") {return null;}@@ -52,7 +49,9 @@ export const extractSQLRowValuePlain = (value: RowValue | undefined) => {}// Check if it's readable text- const isReadableText = byteArray.every((byte: number) => byte >= 32 && byte <= 126);+ const isReadableText = byteArray.every(+ (byte: number) => byte >= 32 && byte <= 126+ );if (isReadableText) {try {return new TextDecoder().decode(new Uint8Array(byteArray));@@ -71,10 +70,16 @@ export const extractSQLRowValuePlain = (value: RowValue | undefined) => {);}- if (value.kind?.case === "timestampValue" && value.kind.value.googleTimestamp) {+ if (+ value.kind?.case === "timestampValue" &&+ value.kind.value.googleTimestamp+ ) {return formatTimestamp(value.kind.value);}- if (value.kind?.case === "timestampTzValue" && value.kind.value.googleTimestamp) {+ if (+ value.kind?.case === "timestampTzValue" &&+ value.kind.value.googleTimestamp+ ) {return formatTimestampWithTz(value.kind.value);}if (value.kind?.case === "valueValue") {@@ -296,13 +301,12 @@ export const compareQueryRowValues = (// extractSQLRowValueRaw extracts a raw value from a RowValue.const extractSQLRowValueRaw = (value: RowValue | undefined) => {- if (- typeof value === "undefined" ||- value.kind?.case === "nullValue"- ) {+ if (typeof value === "undefined" || value.kind?.case === "nullValue") {return null;}- const keys = Object.keys(toJson(RowValueSchema, value) as Record<string, any>);+ const keys = Object.keys(+ toJson(RowValueSchema, value) as Record<string, any>+ );if (keys.length === 0) {return undefined;}diff --git a/frontend/src/utils/workspaceApprovalSetting.ts b/frontend/src/utils/workspaceApprovalSetting.tsindex c3f378ed8f..470e7f2c51 100644--- a/frontend/src/utils/workspaceApprovalSetting.ts+++ b/frontend/src/utils/workspaceApprovalSetting.ts@@ -1,5 +1,5 @@-import { cloneDeep, isNumber } from "lodash-es";import { create as createProto } from "@bufbuild/protobuf";+import { cloneDeep, isNumber } from "lodash-es";import { v4 as uuidv4 } from "uuid";import type { EqualityExpr, LogicalExpr, SimpleExpr } from "@/plugins/cel";import {@@ -14,10 +14,10 @@ import type { ParsedApprovalRule, UnrecognizedApprovalRule } from "@/types";import { DEFAULT_RISK_LEVEL, PresetRoleType } from "@/types";import type { LocalApprovalConfig, LocalApprovalRule } from "@/types";import { PresetRiskLevelList, useSupportedSourceList } from "@/types";-import type { Expr as _Expr } from "@/types/proto-es/google/type/expr_pb";-import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import type { Expr as CELExpr } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";import { ExprSchema as CELExprSchema } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";+import type { Expr as _Expr } from "@/types/proto-es/google/type/expr_pb";+import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import type {ApprovalNode as _ApprovalNode,ApprovalStep as _ApprovalStep,@@ -42,9 +42,7 @@ import {ApprovalStepSchema as ProtoEsApprovalStepSchema,ApprovalNodeSchema as ProtoEsApprovalNodeSchema,} from "@/types/proto-es/v1/issue_service_pb";-import {- Risk_Source,-} from "@/types/proto-es/v1/risk_service_pb";+import { Risk_Source } from "@/types/proto-es/v1/risk_service_pb";import type {WorkspaceApprovalSetting,WorkspaceApprovalSetting_Rule as ApprovalRule,@@ -216,9 +214,7 @@ export const buildWorkspaceApprovalSetting = async (}}- const expressionList = await batchConvertParsedExprToCELString(- exprList- );+ const expressionList = await batchConvertParsedExprToCELString(exprList);for (let i = 0; i < expressionList.length; i++) {const ruleIndex = ruleIndexList[i];approvalRuleMap.get(ruleIndex)!.condition = createProto(ExprSchema, {@@ -247,9 +243,11 @@ const resolveSourceExpr = (expr: SimpleExpr): Risk_Source => {return Risk_Source.SOURCE_UNSPECIFIED;}const sourceValue = args[1];- const source = typeof sourceValue === 'string' ?- (Risk_Source[sourceValue as keyof typeof Risk_Source] ?? Risk_Source.SOURCE_UNSPECIFIED) :- sourceValue as Risk_Source;+ const source =+ typeof sourceValue === "string"+ ? (Risk_Source[sourceValue as keyof typeof Risk_Source] ??+ Risk_Source.SOURCE_UNSPECIFIED)+ : (sourceValue as Risk_Source);if (!useSupportedSourceList().value.includes(source)) {return Risk_Source.SOURCE_UNSPECIFIED;}@@ -326,7 +324,7 @@ export const seedWorkspaceApprovalSetting = () => {title,description,flow: {- steps: roles.map((role) =>+ steps: roles.map((role) =>createProto(ProtoEsApprovalStepSchema, {type: ProtoEsApprovalStep_Type.ANY,nodes: [diff --git a/frontend/src/views/BannerUpgradeSubscription.vue b/frontend/src/views/BannerUpgradeSubscription.vueindex fa7773c2d0..f886d79462 100644--- a/frontend/src/views/BannerUpgradeSubscription.vue+++ b/frontend/src/views/BannerUpgradeSubscription.vue@@ -49,16 +49,15 @@<div class="pl-4 my-2"><ul class="list-disc list-inside"><li v-for="feature in unlicensedFeatures" :key="feature">- {{- $t(`dynamic.subscription.features.${feature}.title`)- }}+ {{ $t(`dynamic.subscription.features.${feature}.title`) }}({{$t(- `subscription.plan.${- PlanType[subscriptionStore.getMinimumRequiredPlan(- PlanFeature[feature as keyof typeof PlanFeature] ?? PlanFeature.FEATURE_UNSPECIFIED- )].toLowerCase()- }.title`+ `subscription.plan.${PlanType[+ subscriptionStore.getMinimumRequiredPlan(+ PlanFeature[feature as keyof typeof PlanFeature] ??+ PlanFeature.FEATURE_UNSPECIFIED+ )+ ].toLowerCase()}.title`)}})</li>@@ -73,14 +72,17 @@</template><script lang="ts" setup>-import { BBModal } from "@/bbkit";-import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";-import { useActuatorV1Store, useSubscriptionV1Store } from "@/store";-import { PlanFeature, PlanType } from "@/types/proto-es/v1/subscription_service_pb";import { NButton } from "naive-ui";import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";+import { BBModal } from "@/bbkit";+import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/router/dashboard/workspaceSetting";+import { useActuatorV1Store, useSubscriptionV1Store } from "@/store";+import {+ PlanFeature,+ PlanType,+} from "@/types/proto-es/v1/subscription_service_pb";interface LocalState {showModal: boolean;@@ -109,7 +111,9 @@ const neededPlan = computed(() => {let plan = PlanType.FREE;for (const feature of unlicensedFeatures.value) {- const featureEnum = PlanFeature[feature as keyof typeof PlanFeature] ?? PlanFeature.FEATURE_UNSPECIFIED;+ const featureEnum =+ PlanFeature[feature as keyof typeof PlanFeature] ??+ PlanFeature.FEATURE_UNSPECIFIED;const requiredPlan = subscriptionStore.getMinimumRequiredPlan(featureEnum);if (requiredPlan > plan) {plan = requiredPlan;diff --git a/frontend/src/views/DatabaseDashboard.vue b/frontend/src/views/DatabaseDashboard.vueindex fbfdc8cd63..bf8c461084 100644--- a/frontend/src/views/DatabaseDashboard.vue+++ b/frontend/src/views/DatabaseDashboard.vue@@ -173,7 +173,9 @@ const selectedEngines = computed(() => {// Convert string scope value to Engine enumconst engineKey = scope.value.toUpperCase();const engineValue = Engine[engineKey as keyof typeof Engine];- return typeof engineValue === "number" ? engineValue : Engine.ENGINE_UNSPECIFIED;+ return typeof engineValue === "number"+ ? engineValue+ : Engine.ENGINE_UNSPECIFIED;});});diff --git a/frontend/src/views/DatabaseDetail/ChangelogDetail.vue b/frontend/src/views/DatabaseDetail/ChangelogDetail.vueindex f780d6195f..be09f7aada 100644--- a/frontend/src/views/DatabaseDetail/ChangelogDetail.vue+++ b/frontend/src/views/DatabaseDetail/ChangelogDetail.vue@@ -29,10 +29,10 @@<script lang="ts" setup>import { NBreadcrumb, NBreadcrumbItem } from "naive-ui";import { useRouter } from "vue-router";+import { BBSpin } from "@/bbkit";import { ChangelogDetail as ChangelogDetailView } from "@/components/Changelog";import { useDatabaseV1ByName } from "@/store";import { databaseV1Url } from "@/utils";-import { BBSpin } from "@/bbkit";const props = defineProps<{project: string;diff --git a/frontend/src/views/EnvironmentDashboard.vue b/frontend/src/views/EnvironmentDashboard.vueindex d5240a548c..9d1a12e965 100644--- a/frontend/src/views/EnvironmentDashboard.vue+++ b/frontend/src/views/EnvironmentDashboard.vue@@ -85,6 +85,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import {ChevronLeftIcon,ChevronRightIcon,@@ -119,7 +120,6 @@ import type { Policy } from "@/types/proto-es/v1/org_policy_service_pb";import { PolicyResourceType } from "@/types/proto-es/v1/org_policy_service_pb";import { EnvironmentSetting_EnvironmentSchema } from "@/types/proto-es/v1/setting_service_pb";import type { Environment } from "@/types/v1/environment";-import { create } from "@bufbuild/protobuf";import { arraySwap, hasWorkspacePermissionV2 } from "@/utils";import { type VueClass } from "@/utils";import EnvironmentDetail from "@/views/EnvironmentDetail.vue";diff --git a/frontend/src/views/ExportCenter/DataExportIssueDataTable/DataExportIssueDataTable.vue b/frontend/src/views/ExportCenter/DataExportIssueDataTable/DataExportIssueDataTable.vueindex 817e54abed..e98fb8a970 100644--- a/frontend/src/views/ExportCenter/DataExportIssueDataTable/DataExportIssueDataTable.vue+++ b/frontend/src/views/ExportCenter/DataExportIssueDataTable/DataExportIssueDataTable.vue@@ -184,7 +184,10 @@ const issueRelatedDatabase = (issue: ComposedIssue) => {const issueRelatedStatement = (issue: ComposedIssue) => {const task = head(flattenTaskV1List(issue.rolloutEntity));- const sheetName = task?.payload?.case === "databaseDataExport" ? task.payload.value.sheet : undefined;+ const sheetName =+ task?.payload?.case === "databaseDataExport"+ ? task.payload.value.sheet+ : undefined;if (!task || !sheetName) {return;}@@ -202,7 +205,10 @@ watch(// Prepare the sheet for each issue.for (const issue of list) {const task = head(flattenTaskV1List(issue.rolloutEntity));- const sheetName = task?.payload?.case === "databaseDataExport" ? task.payload.value.sheet : undefined;+ const sheetName =+ task?.payload?.case === "databaseDataExport"+ ? task.payload.value.sheet+ : undefined;if (!task || !sheetName) {continue;}diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vueindex 727ae14d9f..4059d9596a 100644--- a/frontend/src/views/ProfileDashboard.vue+++ b/frontend/src/views/ProfileDashboard.vue@@ -217,6 +217,8 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { computedAsync, useTitle } from "@vueuse/core";import { cloneDeep, isEqual } from "lodash-es";import type { DropdownOption } from "naive-ui";@@ -252,13 +254,9 @@ import {SYSTEM_BOT_USER_NAME,unknownUser,} from "@/types";-import { create } from "@bufbuild/protobuf";import { State } from "@/types/proto-es/v1/common_pb";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";-import type {- User,-} from "@/types/proto-es/v1/user_service_pb";+import type { User } from "@/types/proto-es/v1/user_service_pb";import {UpdateUserRequestSchema,UserType,@@ -407,14 +405,16 @@ const saveEdit = async () => {updateMaskPaths.push("password");}try {- await userStore.updateUser(create(UpdateUserRequestSchema, {- user: userPatch,- updateMask: create(FieldMaskSchema, {- paths: updateMaskPaths- }),- regenerateRecoveryCodes: false,- regenerateTempMfaSecret: false,- }));+ await userStore.updateUser(+ create(UpdateUserRequestSchema, {+ user: userPatch,+ updateMask: create(FieldMaskSchema, {+ paths: updateMaskPaths,+ }),+ regenerateRecoveryCodes: false,+ regenerateTempMfaSecret: false,+ })+ );} catch (error) {pushNotification({module: "bytebase",@@ -469,7 +469,7 @@ const handleDisable2FA = async () => {mfaEnabled: false,},updateMask: create(FieldMaskSchema, {- paths: ["mfa_enabled"]+ paths: ["mfa_enabled"],}),}));diff --git a/frontend/src/views/ReviewCenter/index.vue b/frontend/src/views/ReviewCenter/index.vueindex 5c3b1ba4f0..879c9aea38 100644--- a/frontend/src/views/ReviewCenter/index.vue+++ b/frontend/src/views/ReviewCenter/index.vue@@ -174,7 +174,8 @@ const allowToCreatePlan = computed(() => {const handleSpecCreated = async (spec: Plan_Spec) => {const template =- spec.config?.case === "changeDatabaseConfig" && spec.config.value.type === Plan_ChangeDatabaseConfig_Type.DATA+ spec.config?.case === "changeDatabaseConfig" &&+ spec.config.value.type === Plan_ChangeDatabaseConfig_Type.DATA? "bb.issue.database.data.update": "bb.issue.database.schema.update";const targets = targetsForSpec(spec);diff --git a/frontend/src/views/SchemaTemplate/ColumnTypes.vue b/frontend/src/views/SchemaTemplate/ColumnTypes.vueindex 8680fd1bac..807857e68e 100644--- a/frontend/src/views/SchemaTemplate/ColumnTypes.vue+++ b/frontend/src/views/SchemaTemplate/ColumnTypes.vue@@ -116,20 +116,23 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { cloneDeep, isEqual, uniq, uniqBy } from "lodash-es";import { NButton, NDivider, NInput, NRadioGroup, NRadio } from "naive-ui";import { computed, onMounted, ref } from "vue";import EngineIcon from "@/components/Icon/EngineIcon.vue";import { pushNotification, useSettingV1Store } from "@/store";import { Engine } from "@/types/proto-es/v1/common_pb";-import type { SchemaTemplateSetting_FieldTemplate, SchemaTemplateSetting_ColumnType } from "@/types/proto-es/v1/setting_service_pb";+import type {+ SchemaTemplateSetting_FieldTemplate,+ SchemaTemplateSetting_ColumnType,+} from "@/types/proto-es/v1/setting_service_pb";import {SchemaTemplateSetting_ColumnTypeSchema,SchemaTemplateSettingSchema,Setting_SettingName,ValueSchema as SettingValueSchema,} from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";import { getDataTypeSuggestionList } from "@/utils";import ColumnTypesUpdateFailedModal from "./ColumnTypesUpdateFailedModal.vue";@@ -156,13 +159,17 @@ const allowToUpdateColumnTypeTemplateForMySQL = computed(() => {if (props.readonly) {return false;}- const setting = settingStore.getSettingByName(Setting_SettingName.SCHEMA_TEMPLATE);+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SCHEMA_TEMPLATE+ );const columnTypes =- setting?.value?.value?.case === "schemaTemplateSettingValue"+ setting?.value?.value?.case === "schemaTemplateSettingValue"? setting.value.value.value.columnTypes || []: [];- const existingTemplate = columnTypes.find((item) => item.engine === Engine.MYSQL);- const originTemplate = existingTemplate+ const existingTemplate = columnTypes.find(+ (item) => item.engine === Engine.MYSQL+ );+ const originTemplate = existingTemplate? create(SchemaTemplateSetting_ColumnTypeSchema, {engine: existingTemplate.engine,enabled: existingTemplate.enabled,@@ -196,13 +203,17 @@ const allowToUpdateColumnTypeTemplateForPostgreSQL = computed(() => {if (props.readonly) {return false;}- const setting = settingStore.getSettingByName(Setting_SettingName.SCHEMA_TEMPLATE);+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SCHEMA_TEMPLATE+ );const columnTypes =- setting?.value?.value?.case === "schemaTemplateSettingValue"+ setting?.value?.value?.case === "schemaTemplateSettingValue"? setting.value.value.value.columnTypes || []: [];- const existingTemplate = columnTypes.find((item) => item.engine === Engine.POSTGRES);- const originTemplate = existingTemplate+ const existingTemplate = columnTypes.find(+ (item) => item.engine === Engine.POSTGRES+ );+ const originTemplate = existingTemplate? create(SchemaTemplateSetting_ColumnTypeSchema, {engine: existingTemplate.engine,enabled: existingTemplate.enabled,@@ -237,7 +248,7 @@ const getOrFetchSchemaTemplate = async () => {Setting_SettingName.SCHEMA_TEMPLATE);const columnTypes =- setting?.value?.value?.case === "schemaTemplateSettingValue"+ setting?.value?.value?.case === "schemaTemplateSettingValue"? setting.value.value.value.columnTypes || []: [];const mysqlColumnTypes = columnTypes.find(@@ -248,7 +259,7 @@ const getOrFetchSchemaTemplate = async () => {);return {fieldTemplates:- setting?.value?.value?.case === "schemaTemplateSettingValue"+ setting?.value?.value?.case === "schemaTemplateSettingValue"? setting.value.value.value.fieldTemplates || []: [],mysqlColumnTypes,@@ -369,7 +380,6 @@ const handlePostgreSQLEnabledChange = (event: InputEvent) => {if (columnTypeTemplateForPostgreSQL.value.types.filter(Boolean).length === 0) {-columnTypesForPostgreSQL.value = getDataTypeSuggestionList(Engine.POSTGRES).join("\n");@@ -445,17 +455,15 @@ const upsertSchemaTemplateSetting = async (const setting = await settingStore.getOrFetchSettingByName(Setting_SettingName.SCHEMA_TEMPLATE);- const existingValue = setting?.value?.value?.case === "schemaTemplateSettingValue"- ? setting.value.value.value- : undefined;+ const existingValue =+ setting?.value?.value?.case === "schemaTemplateSettingValue"+ ? setting.value.value.value+ : undefined;const schemaTemplateSettingValue = create(SchemaTemplateSettingSchema, {fieldTemplates: existingValue?.fieldTemplates || [],tableTemplates: existingValue?.tableTemplates || [],columnTypes: uniqBy(- [- columnType,- ...(existingValue?.columnTypes || []),- ],+ [columnType, ...(existingValue?.columnTypes || [])],"engine"),});diff --git a/frontend/src/views/SchemaTemplate/FieldTemplates.vue b/frontend/src/views/SchemaTemplate/FieldTemplates.vueindex 5be43aff05..1d7358865b 100644--- a/frontend/src/views/SchemaTemplate/FieldTemplates.vue+++ b/frontend/src/views/SchemaTemplate/FieldTemplates.vue@@ -66,6 +66,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { PlusIcon } from "lucide-vue-next";import { NButton, NCheckbox } from "naive-ui";import { v1 as uuidv1 } from "uuid";@@ -77,15 +78,10 @@ import { engineList } from "@/components/SchemaTemplate/utils";import { Drawer, SearchBox } from "@/components/v2";import { useSettingV1Store } from "@/store";import { Engine } from "@/types/proto-es/v1/common_pb";-import {- ColumnMetadataSchema,-} from "@/types/proto-es/v1/database_service_pb";-import {- ColumnCatalogSchema,-} from "@/types/proto-es/v1/database_catalog_service_pb";-import { create } from "@bufbuild/protobuf";+import { ColumnCatalogSchema } from "@/types/proto-es/v1/database_catalog_service_pb";+import { ColumnMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import type { SchemaTemplateSetting_FieldTemplate } from "@/types/proto-es/v1/setting_service_pb";-import {+import {Setting_SettingName,SchemaTemplateSetting_FieldTemplateSchema,} from "@/types/proto-es/v1/setting_service_pb";@@ -107,21 +103,22 @@ defineEmits<{(event: "apply", item: SchemaTemplateSetting_FieldTemplate): void;}>();-const initialTemplate = (): SchemaTemplateSetting_FieldTemplate => create(SchemaTemplateSetting_FieldTemplateSchema, {- id: uuidv1(),- engine: props.engine ?? Engine.MYSQL,- category: "",- column: create(ColumnMetadataSchema, {- name: "",- type: "",- nullable: false,- comment: "",- position: 0,- characterSet: "",- collation: "",- }),- catalog: create(ColumnCatalogSchema, {}),-});+const initialTemplate = (): SchemaTemplateSetting_FieldTemplate =>+ create(SchemaTemplateSetting_FieldTemplateSchema, {+ id: uuidv1(),+ engine: props.engine ?? Engine.MYSQL,+ category: "",+ column: create(ColumnMetadataSchema, {+ name: "",+ type: "",+ nullable: false,+ comment: "",+ position: 0,+ characterSet: "",+ collation: "",+ }),+ catalog: create(ColumnCatalogSchema, {}),+ });const state = reactive<LocalState>({showDrawer: false,@@ -130,7 +127,6 @@ const state = reactive<LocalState>({selectedEngine: new Set<Engine>(),});-onMounted(() => {if (props.engine) {state.selectedEngine.add(props.engine);@@ -158,9 +154,11 @@ const toggleEngineCheck = (engine: Engine) => {const settingStore = useSettingV1Store();const schemaTemplateList = computed(() => {- const setting = settingStore.getSettingByName(Setting_SettingName.SCHEMA_TEMPLATE);- return setting?.value?.value?.case === "schemaTemplateSettingValue"- ? setting.value.value.value.fieldTemplates ?? []+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SCHEMA_TEMPLATE+ );+ return setting?.value?.value?.case === "schemaTemplateSettingValue"+ ? (setting.value.value.value.fieldTemplates ?? []): [];});diff --git a/frontend/src/views/SchemaTemplate/TableTemplates.vue b/frontend/src/views/SchemaTemplate/TableTemplates.vueindex 4aaa61171f..0dade109f2 100644--- a/frontend/src/views/SchemaTemplate/TableTemplates.vue+++ b/frontend/src/views/SchemaTemplate/TableTemplates.vue@@ -66,6 +66,7 @@</template><script lang="ts" setup>+import { create as createProto } from "@bufbuild/protobuf";import { PlusIcon } from "lucide-vue-next";import { NButton, NCheckbox } from "naive-ui";import { v1 as uuidv1 } from "uuid";@@ -77,14 +78,13 @@ import { engineList } from "@/components/SchemaTemplate/utils";import { Drawer, SearchBox } from "@/components/v2";import { useSettingV1Store } from "@/store";import { Engine } from "@/types/proto-es/v1/common_pb";-import { TableMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import { TableCatalogSchema } from "@/types/proto-es/v1/database_catalog_service_pb";+import { TableMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import type { SchemaTemplateSetting_TableTemplate } from "@/types/proto-es/v1/setting_service_pb";-import {+import {Setting_SettingName,- SchemaTemplateSetting_TableTemplateSchema+ SchemaTemplateSetting_TableTemplateSchema,} from "@/types/proto-es/v1/setting_service_pb";-import { create as createProto } from "@bufbuild/protobuf";interface LocalState {template: SchemaTemplateSetting_TableTemplate;@@ -103,17 +103,18 @@ defineEmits<{(event: "apply", item: SchemaTemplateSetting_TableTemplate): void;}>();-const initialTemplate = (): SchemaTemplateSetting_TableTemplate => createProto(SchemaTemplateSetting_TableTemplateSchema, {- id: uuidv1(),- engine: props.engine ?? Engine.MYSQL,- category: "",- table: createProto(TableMetadataSchema, {- name: "",- userComment: "",- columns: [],- }),- catalog: createProto(TableCatalogSchema, {}),-});+const initialTemplate = (): SchemaTemplateSetting_TableTemplate =>+ createProto(SchemaTemplateSetting_TableTemplateSchema, {+ id: uuidv1(),+ engine: props.engine ?? Engine.MYSQL,+ category: "",+ table: createProto(TableMetadataSchema, {+ name: "",+ userComment: "",+ columns: [],+ }),+ catalog: createProto(TableCatalogSchema, {}),+ });const state = reactive<LocalState>({showDrawer: false,@@ -149,10 +150,13 @@ const toggleEngineCheck = (engine: Engine) => {const settingStore = useSettingV1Store();const schemaTemplateList = computed(() => {- const setting = settingStore.getSettingByName(Setting_SettingName.SCHEMA_TEMPLATE);- const settingValue = setting?.value?.value?.case === "schemaTemplateSettingValue"- ? setting.value.value.value- : undefined;+ const setting = settingStore.getSettingByName(+ Setting_SettingName.SCHEMA_TEMPLATE+ );+ const settingValue =+ setting?.value?.value?.case === "schemaTemplateSettingValue"+ ? setting.value.value.value+ : undefined;return settingValue?.tableTemplates ?? [];});diff --git a/frontend/src/views/SettingWorkspaceCustomApproval.vue b/frontend/src/views/SettingWorkspaceCustomApproval.vueindex e1cf2d80f7..548603da23 100644--- a/frontend/src/views/SettingWorkspaceCustomApproval.vue+++ b/frontend/src/views/SettingWorkspaceCustomApproval.vue@@ -49,7 +49,9 @@ const state = reactive<LocalState>({showFeatureModal: false,});const tab = useRouteHash("rules", TabValueList, "replace");-const hasCustomApprovalFeature = featureToRef(PlanFeature.FEATURE_APPROVAL_WORKFLOW);+const hasCustomApprovalFeature = featureToRef(+ PlanFeature.FEATURE_APPROVAL_WORKFLOW+);provideCustomApprovalContext({hasFeature: hasCustomApprovalFeature,diff --git a/frontend/src/views/SettingWorkspaceDataClassification.vue b/frontend/src/views/SettingWorkspaceDataClassification.vueindex 438595b160..5c364ca50d 100644--- a/frontend/src/views/SettingWorkspaceDataClassification.vue+++ b/frontend/src/views/SettingWorkspaceDataClassification.vue@@ -14,5 +14,7 @@ import { ClassificationView } from "@/components/SensitiveData";import { featureToRef } from "@/store";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";-const hasSensitiveDataFeature = featureToRef(PlanFeature.FEATURE_DATA_CLASSIFICATION);+const hasSensitiveDataFeature = featureToRef(+ PlanFeature.FEATURE_DATA_CLASSIFICATION+);</script>diff --git a/frontend/src/views/SettingWorkspaceIM.vue b/frontend/src/views/SettingWorkspaceIM.vueindex 1c36c1408e..bcbdeb4475 100644--- a/frontend/src/views/SettingWorkspaceIM.vue+++ b/frontend/src/views/SettingWorkspaceIM.vue@@ -48,6 +48,8 @@</template><script lang="tsx" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { cloneDeep, isEqual } from "lodash-es";import { NTabs, NTabPane, NButton } from "naive-ui";import { computed, watch, reactive } from "vue";@@ -68,8 +70,6 @@ import {Setting_SettingName,ValueSchema as SettingValueSchema,} from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";interface LocalState {selectedTab: Webhook_Type;@@ -438,27 +438,37 @@ const onSave = async () => {switch (state.selectedTab) {case Webhook_Type.SLACK:if (setting.value?.value?.case === "appImSettingValue") {- state.setting.slack = setting.value.value.value.slack ?? create(AppIMSetting_SlackSchema, {});+ state.setting.slack =+ setting.value.value.value.slack ??+ create(AppIMSetting_SlackSchema, {});}break;case Webhook_Type.FEISHU:if (setting.value?.value?.case === "appImSettingValue") {- state.setting.feishu = setting.value.value.value.feishu ?? create(AppIMSetting_FeishuSchema, {});+ state.setting.feishu =+ setting.value.value.value.feishu ??+ create(AppIMSetting_FeishuSchema, {});}break;case Webhook_Type.WECOM:if (setting.value?.value?.case === "appImSettingValue") {- state.setting.wecom = setting.value.value.value.wecom ?? create(AppIMSetting_WecomSchema, {});+ state.setting.wecom =+ setting.value.value.value.wecom ??+ create(AppIMSetting_WecomSchema, {});}break;case Webhook_Type.LARK:if (setting.value?.value?.case === "appImSettingValue") {- state.setting.lark = setting.value.value.value.lark ?? create(AppIMSetting_LarkSchema, {});+ state.setting.lark =+ setting.value.value.value.lark ??+ create(AppIMSetting_LarkSchema, {});}break;case Webhook_Type.DINGTALK:if (setting.value?.value?.case === "appImSettingValue") {- state.setting.dingtalk = setting.value.value.value.dingtalk ?? create(AppIMSetting_DingTalkSchema, {});+ state.setting.dingtalk =+ setting.value.value.value.dingtalk ??+ create(AppIMSetting_DingTalkSchema, {});}break;}diff --git a/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue b/frontend/src/views/SettingWorkspaceSQLReviewCreate.vueindex 5ee54cae4e..ea46a63e67 100644--- a/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue+++ b/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue@@ -9,9 +9,9 @@</template><script lang="ts" setup>+import { computed, watchEffect } from "vue";import { SQLReviewCreation } from "@/components/SQLReview";import { useSQLReviewStore } from "@/store";-import { computed, watchEffect } from "vue";const attachedResources = computed(() => {const url = new URL(window.location.href);diff --git a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vueindex 54ade3a997..7175d92d61 100644--- a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue+++ b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue@@ -143,6 +143,18 @@</template><script lang="tsx" setup>+import { useTitle } from "@vueuse/core";+import { NButton } from "naive-ui";+import {+ computed,+ nextTick,+ onMounted,+ reactive,+ watch,+ watchEffect,+} from "vue";+import { useI18n } from "vue-i18n";+import { useRoute, useRouter } from "vue-router";import {BBAlert,BBAttention,@@ -172,18 +184,6 @@ import {} from "@/types";import type { Engine } from "@/types/proto-es/v1/common_pb";import { hasWorkspacePermissionV2, sqlReviewNameFromSlug } from "@/utils";-import { useTitle } from "@vueuse/core";-import { NButton } from "naive-ui";-import {- computed,- nextTick,- onMounted,- reactive,- watch,- watchEffect,-} from "vue";-import { useI18n } from "vue-i18n";-import { useRoute, useRouter } from "vue-router";const props = defineProps<{sqlReviewPolicySlug: string;diff --git a/frontend/src/views/SettingWorkspaceSchemaTemplate.vue b/frontend/src/views/SettingWorkspaceSchemaTemplate.vueindex ff54c95594..1c56cc6451 100644--- a/frontend/src/views/SettingWorkspaceSchemaTemplate.vue+++ b/frontend/src/views/SettingWorkspaceSchemaTemplate.vue@@ -34,12 +34,12 @@import { NTabs, NTabPane } from "naive-ui";import { reactive, watch } from "vue";import { useRoute, useRouter } from "vue-router";+import { FeatureAttention } from "@/components/FeatureGuard";import { featureToRef } from "@/store";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import ColumnTypes from "@/views/SchemaTemplate/ColumnTypes.vue";import FieldTemplates from "@/views/SchemaTemplate/FieldTemplates.vue";import TableTemplates from "@/views/SchemaTemplate/TableTemplates.vue";-import { FeatureAttention } from "@/components/FeatureGuard";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";interface LocalState {selectedTab: "FIELD_TEMPLATE" | "COLUMN_TYPE_RESTRICTION" | "TABLE_TEMPLATE";diff --git a/frontend/src/views/SettingWorkspaceSubscription.vue b/frontend/src/views/SettingWorkspaceSubscription.vueindex ccc1504749..c6dd6de71d 100644--- a/frontend/src/views/SettingWorkspaceSubscription.vue+++ b/frontend/src/views/SettingWorkspaceSubscription.vue@@ -217,8 +217,12 @@ const userLimit = computed((): string => {const workspaceIdField = ref<HTMLInputElement | null>(null);const workspaceId = computed(() => {- const setting = settingV1Store.getSettingByName(Setting_SettingName.WORKSPACE_ID);- return setting?.value?.value?.case === "stringValue" ? setting.value.value.value : "";+ const setting = settingV1Store.getSettingByName(+ Setting_SettingName.WORKSPACE_ID+ );+ return setting?.value?.value?.case === "stringValue"+ ? setting.value.value.value+ : "";});const selectWorkspaceId = () => {diff --git a/frontend/src/views/SettingWorkspaceUsers.vue b/frontend/src/views/SettingWorkspaceUsers.vueindex 994ddb6ddb..f2be1aabeb 100644--- a/frontend/src/views/SettingWorkspaceUsers.vue+++ b/frontend/src/views/SettingWorkspaceUsers.vue@@ -180,6 +180,7 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { PlusIcon, SettingsIcon } from "lucide-vue-next";import { NButton, NCheckbox, NPopover, NTabPane, NTabs } from "naive-ui";import { computed, onMounted, reactive, ref, watch } from "vue";@@ -209,7 +210,6 @@ import { groupNamePrefix } from "@/store/modules/v1/common";import { State } from "@/types/proto-es/v1/common_pb";import type { Group } from "@/types/proto-es/v1/group_service_pb";import { WorkspaceProfileSettingSchema } from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { type User } from "@/types/proto-es/v1/user_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";@@ -318,7 +318,10 @@ const fetchInactiveUserList = async ({};const workspaceProfileSetting = computed(() =>- create(WorkspaceProfileSettingSchema, settingV1Store.workspaceProfileSetting || {})+ create(+ WorkspaceProfileSettingSchema,+ settingV1Store.workspaceProfileSetting || {}+ ));const hasDirectorySyncFeature = featureToRef(diff --git a/frontend/src/views/Setup/AdminSetup.vue b/frontend/src/views/Setup/AdminSetup.vueindex 33b7cfae99..46be7a2d7b 100644--- a/frontend/src/views/Setup/AdminSetup.vue+++ b/frontend/src/views/Setup/AdminSetup.vue@@ -98,6 +98,8 @@</template><script lang="tsx" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { NRadio, NRadioGroup, NSpace } from "naive-ui";import { ref, computed, reactive, onMounted } from "vue";import { useI18n } from "vue-i18n";@@ -114,9 +116,10 @@ import {import { projectNamePrefix } from "@/store/modules/v1/common";import { emptyProject } from "@/types";import type { Project } from "@/types/proto-es/v1/project_service_pb";-import { DatabaseChangeMode, Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";-import { create } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";+import {+ DatabaseChangeMode,+ Setting_SettingName,+} from "@/types/proto-es/v1/setting_service_pb";import WorkspaceMode from "./WorkspaceMode.vue";interface LocalState {@@ -216,7 +219,7 @@ const tryFinishSetup = async () => {databaseChangeMode: state.mode,},updateMask: create(FieldMaskSchema, {- paths: ["value.workspace_profile_setting_value.database_change_mode"]+ paths: ["value.workspace_profile_setting_value.database_change_mode"],}),});onCancel(getHomePageByMode(state.mode));@@ -232,8 +235,8 @@ onMounted(async () => {);return onCancel(getHomePageByMode(- profileSetting?.value?.value?.case === "workspaceProfileSettingValue"- ? profileSetting.value.value.value.databaseChangeMode+ profileSetting?.value?.value?.case === "workspaceProfileSettingValue"+ ? profileSetting.value.value.value.databaseChangeMode: undefined));diff --git a/frontend/src/views/TwoFactorSetup.vue b/frontend/src/views/TwoFactorSetup.vueindex 7308156355..71021d01ca 100644--- a/frontend/src/views/TwoFactorSetup.vue+++ b/frontend/src/views/TwoFactorSetup.vue@@ -80,6 +80,9 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";+import type { ConnectError } from "@connectrpc/connect";import * as QRCode from "qrcode";import { computed, onMounted, reactive, watch } from "vue";import { useI18n } from "vue-i18n";@@ -92,10 +95,7 @@ import { StepTab } from "@/components/v2";import { AUTH_2FA_SETUP_MODULE } from "@/router/auth";import { SETTING_ROUTE_PROFILE } from "@/router/dashboard/workspaceSetting";import { pushNotification, useCurrentUserV1, useUserStore } from "@/store";-import { create } from "@bufbuild/protobuf";import { UpdateUserRequestSchema } from "@/types/proto-es/v1/user_service_pb";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";-import type { ConnectError } from "@connectrpc/connect";const issuerName = "Bytebase";@@ -154,7 +154,7 @@ const regenerateTempMfaSecret = async () => {name: currentUser.value.name,},updateMask: create(FieldMaskSchema, {- paths: []+ paths: [],}),regenerateTempMfaSecret: true,})@@ -169,8 +169,8 @@ const verifyTOPCode = async () => {name: currentUser.value.name,},updateMask: create(FieldMaskSchema, {- paths: []- }),+ paths: [],+ }),otpCode: state.otpCode,}));@@ -213,7 +213,7 @@ const tryFinishSetup = async () => {mfaEnabled: true,},updateMask: create(FieldMaskSchema, {- paths: ["mfa_enabled"]+ paths: ["mfa_enabled"],}),}));diff --git a/frontend/src/views/auth/PasswordReset.vue b/frontend/src/views/auth/PasswordReset.vueindex 7ff950a3a6..97fce5f313 100644--- a/frontend/src/views/auth/PasswordReset.vue+++ b/frontend/src/views/auth/PasswordReset.vue@@ -34,6 +34,8 @@</template><script lang="ts" setup>+import { create as createProto } from "@bufbuild/protobuf";+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { NButton } from "naive-ui";import { computed, reactive, ref, onMounted } from "vue";import { useI18n } from "vue-i18n";@@ -46,11 +48,9 @@ import {useAuthStore,useCurrentUserV1,} from "@/store";+import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";import type { User } from "@/types/proto-es/v1/user_service_pb";import { UpdateUserRequestSchema } from "@/types/proto-es/v1/user_service_pb";-import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";-import { create as createProto } from "@bufbuild/protobuf";-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";interface LocalState {password: string;@@ -108,7 +108,7 @@ const onConfirm = async () => {createProto(UpdateUserRequestSchema, {user: patch,updateMask: createProto(FieldMaskSchema, {- paths: ["password"]+ paths: ["password"],}),}));diff --git a/frontend/src/views/auth/Signin.vue b/frontend/src/views/auth/Signin.vueindex 8f155bfe10..b8bda434af 100644--- a/frontend/src/views/auth/Signin.vue+++ b/frontend/src/views/auth/Signin.vue@@ -175,6 +175,7 @@<script lang="ts" setup>import { create } from "@bufbuild/protobuf";+import type { ConnectError } from "@connectrpc/connect";import { EyeIcon, EyeOffIcon } from "lucide-vue-next";import { NButton, NCard, NTabPane, NTabs } from "naive-ui";import { storeToRefs } from "pinia";@@ -196,7 +197,6 @@ import type { IdentityProvider } from "@/types/proto-es/v1/idp_service_pb";import { IdentityProviderType } from "@/types/proto-es/v1/idp_service_pb";import { openWindowForSSO } from "@/utils";import AuthFooter from "./AuthFooter.vue";-import type { ConnectError } from "@connectrpc/connect";const props = withDefaults(defineProps<{diff --git a/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue b/frontend/src/views/project/ProjectDatabaseGroupDashboard.vueindex d47a424f6c..fa34ebe5dc 100644--- a/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue+++ b/frontend/src/views/project/ProjectDatabaseGroupDashboard.vue@@ -57,8 +57,8 @@ import {import { SearchBox } from "@/components/v2";import { PROJECT_V1_ROUTE_DATABASE_GROUPS_CREATE } from "@/router/dashboard/projectV1";import { useProjectByName, hasFeature } from "@/store";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { projectNamePrefix } from "@/store/modules/v1/common";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasProjectPermissionV2 } from "@/utils";interface LocalState {diff --git a/frontend/src/views/project/ProjectDatabaseGroupDetail.vue b/frontend/src/views/project/ProjectDatabaseGroupDetail.vueindex 54df4f8879..7819952a59 100644--- a/frontend/src/views/project/ProjectDatabaseGroupDetail.vue+++ b/frontend/src/views/project/ProjectDatabaseGroupDetail.vue@@ -4,7 +4,10 @@v-bind="$attrs"class="h-full flex-1 relative space-y-4">- <FeatureAttention :feature="PlanFeature.FEATURE_DATABASE_GROUPS" class="mb-4" />+ <FeatureAttention+ :feature="PlanFeature.FEATURE_DATABASE_GROUPS"+ class="mb-4"+ /><divv-if="hasDatabaseGroupFeature && !state.editing"@@ -105,7 +108,9 @@ const hasMatchedDatabases = computed(() => (databaseGroup.value?.matchedDatabases.length ?? 0) > 0);-const hasDatabaseGroupFeature = featureToRef(PlanFeature.FEATURE_DATABASE_GROUPS);+const hasDatabaseGroupFeature = featureToRef(+ PlanFeature.FEATURE_DATABASE_GROUPS+);watchEffect(async () => {await dbGroupStore.getOrFetchDBGroupByName(databaseGroupResourceName.value, {diff --git a/frontend/src/views/project/ProjectMaskingExemption.vue b/frontend/src/views/project/ProjectMaskingExemption.vueindex 38f732ccb3..bf47fda3a8 100644--- a/frontend/src/views/project/ProjectMaskingExemption.vue+++ b/frontend/src/views/project/ProjectMaskingExemption.vue@@ -79,9 +79,9 @@ import { type AccessUser } from "@/components/SensitiveData/types";import { SearchBox, DatabaseSelect } from "@/components/v2";import { PROJECT_V1_ROUTE_MASKING_EXEMPTION_CREATE } from "@/router/dashboard/projectV1";import { useProjectByName, hasFeature } from "@/store";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { projectNamePrefix } from "@/store/modules/v1/common";import { MaskingExceptionPolicy_MaskingException_Action as Action } from "@/types/proto-es/v1/org_policy_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasProjectPermissionV2 } from "@/utils";interface LocalState {diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/HoverPanel/ColumnInfo.vue b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/HoverPanel/ColumnInfo.vueindex 221ca83746..cee67ca638 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/HoverPanel/ColumnInfo.vue+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/HoverPanel/ColumnInfo.vue@@ -28,13 +28,13 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { CheckIcon, XIcon } from "lucide-vue-next";import { computed } from "vue";import { getColumnDefaultValuePlaceholder } from "@/components/SchemaEditorLite";import { useDBSchemaV1Store, useDatabaseV1Store } from "@/store";import { Engine } from "@/types/proto-es/v1/common_pb";import { ColumnMetadataSchema } from "@/types/proto-es/v1/database_service_pb";-import { create } from "@bufbuild/protobuf";import InfoItem from "./InfoItem.vue";const props = defineProps<{diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/HoverPanel/TablePartitionInfo.vue b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/HoverPanel/TablePartitionInfo.vueindex 093992fd35..cc1c74c666 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/HoverPanel/TablePartitionInfo.vue+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/HoverPanel/TablePartitionInfo.vue@@ -16,13 +16,13 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { computed } from "vue";import { useDBSchemaV1Store } from "@/store";import {TablePartitionMetadata_Type,TablePartitionMetadataSchema,} from "@/types/proto-es/v1/database_service_pb";-import { create } from "@bufbuild/protobuf";import InfoItem from "./InfoItem.vue";const props = defineProps<{diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/CheckNode.vue b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/CheckNode.vueindex 5ed227dee6..5b44483421 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/CheckNode.vue+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/TreeNode/CheckNode.vue@@ -1,10 +1,10 @@<template>- <CommonNode- :text="target.check"- :keyword="keyword"- :highlight="true"- :indent="0"- >+ <CommonNode+ :text="target.check"+ :keyword="keyword"+ :highlight="true"+ :indent="0"+ ><template #icon><CheckIcon class="!w-3.5 !h-3.5 text-gray-500" /></template>@@ -21,15 +21,15 @@</NTag></div></template>- </CommonNode>+ </CommonNode></template><script setup lang="ts">import { NTag } from "naive-ui";import { computed } from "vue";import { CheckIcon } from "@/components/Icon";-import type { TreeNode } from "../tree";import { useDBSchemaV1Store } from "@/store";+import type { TreeNode } from "../tree";import CommonNode from "./CommonNode.vue";const props = defineProps<{@@ -38,9 +38,7 @@ const props = defineProps<{}>();const dbSchema = useDBSchemaV1Store();-const target = computed(- () => (props.node as TreeNode<"check">).meta.target-);+const target = computed(() => (props.node as TreeNode<"check">).meta.target);const tableMetadata = computed(() => {if ("table" in target.value) {diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/actions.tsx b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/actions.tsxindex 21abd64b45..c44358b7eb 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/actions.tsx+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/actions.tsx@@ -11,12 +11,10 @@ import {LinkIcon,SquarePenIcon,} from "lucide-vue-next";-import {- TableIcon,-} from "@/components/Icon";import { NButton, useDialog, type DropdownOption } from "naive-ui";import { computed, h, nextTick, ref } from "vue";import { useRouter } from "vue-router";+import { TableIcon } from "@/components/Icon";import formatSQL from "@/components/MonacoEditor/sqlFormatter";import { useExecuteSQL } from "@/composables/useExecuteSQL";import { t } from "@/plugins/i18n";@@ -41,9 +39,7 @@ import {typeToView,} from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";-import {- GetSchemaStringRequest_ObjectType,-} from "@/types/proto-es/v1/database_service_pb";+import { GetSchemaStringRequest_ObjectType } from "@/types/proto-es/v1/database_service_pb";import type { DataSource } from "@/types/proto-es/v1/instance_service_pb";import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";import {@@ -62,12 +58,10 @@ import {isSimilarSQLEditorTab,} from "@/utils";import { keyWithPosition } from "../../EditorCommon";-import {- useCurrentTabViewStateContext,-} from "../../EditorPanel";+import { useCurrentTabViewStateContext } from "../../EditorPanel";import { useSQLEditorContext } from "../../context";import type { NodeTarget, NodeType, TreeNode } from "./tree";-import { readableTextForNodeTarget } from "./tree"+import { readableTextForNodeTarget } from "./tree";type DropdownOptionWithTreeNode = DropdownOption & {onSelect?: () => void;@@ -168,7 +162,17 @@ export const useActions = () => {runQuery(db, schema, tableOrViewName, query);};- const openNewTab = ({ title, view, schema, table }: { title?: string; schema?: string; table?: string, view?: EditorPanelView }) => {+ const openNewTab = ({+ title,+ view,+ schema,+ table,+ }: {+ title?: string;+ schema?: string;+ table?: string;+ view?: EditorPanelView;+ }) => {const tabStore = useSQLEditorTabStore();const tabViewStateStore = useTabViewStateStore();@@ -200,8 +204,8 @@ export const useActions = () => {}tabStore.addTab(clonedTab);- updateViewState({ view, schema, table});- }+ updateViewState({ view, schema, table });+ };const viewDetail = async (node: TreeNode) => {const { type, target } = node.meta;@@ -243,12 +247,14 @@ export const useActions = () => {detail.procedure = keyWithPosition(procedure, position);break;case "function":- const { function: func, position: funcPosition } = target as NodeTarget<"function">;+ const { function: func, position: funcPosition } =+ target as NodeTarget<"function">;name = func;detail.func = keyWithPosition(func, funcPosition);- break+ break;case "trigger":- const { trigger, position: triggerPosition } = target as NodeTarget<"trigger">;+ const { trigger, position: triggerPosition } =+ target as NodeTarget<"trigger">;name = trigger;detail.trigger = keyWithPosition(trigger, triggerPosition);break;@@ -258,7 +264,9 @@ export const useActions = () => {detail,});if (name) {- useSQLEditorTabStore().updateCurrentTab({ title: `Detail for ${type} ${name}` })+ useSQLEditorTabStore().updateCurrentTab({+ title: `Detail for ${type} ${name}`,+ });}};@@ -311,14 +319,17 @@ export const useDropdown = () => {title: `[${db.databaseName}] ${action.title}`,view: action.view,schema,- })- }- })+ });+ },+ });}}if (type === "table" || type === "view") {- const tableOrView = readableTextForNodeTarget(type, target as NodeTarget<"table" | "view">);+ const tableOrView = readableTextForNodeTarget(+ type,+ target as NodeTarget<"table" | "view">+ );items.push({key: "copy-name",label: t("sql-editor.copy-name"),@@ -328,9 +339,9 @@ export const useDropdown = () => {copyToClipboard(name);},});- if (type === 'view') {- const { view } = target as NodeTarget<"view">;- if (supportGetStringSchema(db.instanceResource.engine)) {+ if (type === "view") {+ const { view } = target as NodeTarget<"view">;+ if (supportGetStringSchema(db.instanceResource.engine)) {items.push({key: "view-schema-text",label: t("sql-editor.view-schema-text"),@@ -339,7 +350,7 @@ export const useDropdown = () => {schemaViewer.value = {schema,object: view,- type: GetSchemaStringRequest_ObjectType.VIEW+ type: GetSchemaStringRequest_ObjectType.VIEW,};},});@@ -354,8 +365,14 @@ export const useDropdown = () => {label: t("sql-editor.copy-all-column-names"),icon: () => <CopyIcon class="w-4 h-4" />,onSelect: () => {- const tableMetadata = dbSchema.getTableMetadata({ database, schema, table })- const name = tableMetadata.columns.map((col) => col.name).join(", ");+ const tableMetadata = dbSchema.getTableMetadata({+ database,+ schema,+ table,+ });+ const name = tableMetadata.columns+ .map((col) => col.name)+ .join(", ");copyToClipboard(name);},});@@ -447,7 +464,11 @@ export const useDropdown = () => {});if (type === "table") {const { table } = target as NodeTarget<"table">;- const tableMetadata = dbSchema.getTableMetadata({ database, schema, table })+ const tableMetadata = dbSchema.getTableMetadata({+ database,+ schema,+ table,+ });const columns = tableMetadata.columns.map((column) => column.name);generateSQLChildren.push({@@ -456,12 +477,7 @@ export const useDropdown = () => {icon: () => <FilePlusIcon class="w-4 h-4" />,onSelect: async () => {const statement = await formatCode(- generateSimpleInsertStatement(- engine,- schema,- table,- columns- ),+ generateSimpleInsertStatement(engine, schema, table, columns),engine);applyContentToCurrentTabOrCopyToClipboard(statement, $d);@@ -473,12 +489,7 @@ export const useDropdown = () => {icon: () => <FileDiffIcon class="w-4 h-4" />,onSelect: async () => {const statement = await formatCode(- generateSimpleUpdateStatement(- engine,- schema,- table,- columns- ),+ generateSimpleUpdateStatement(engine, schema, table, columns),engine);applyContentToCurrentTabOrCopyToClipboard(statement, $d);@@ -574,8 +585,9 @@ export const useDropdown = () => {};const engineForTarget = (target: NodeTarget) => {- const { database } = target as NodeTarget<"database">- return useDatabaseV1Store().getDatabaseByName(database).instanceResource.engine;+ const { database } = target as NodeTarget<"database">;+ return useDatabaseV1Store().getDatabaseByName(database).instanceResource+ .engine;};const targetSupportsGenerateSQL = (target: NodeTarget) => {diff --git a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/tree.ts b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/tree.tsindex 311eadeed3..c7d62f444a 100644--- a/frontend/src/views/sql-editor/AsidePanel/SchemaPane/tree.ts+++ b/frontend/src/views/sql-editor/AsidePanel/SchemaPane/tree.ts@@ -519,19 +519,17 @@ const mapTableNodes = ();node.children.push(triggerNode);}-+// Map checksif (table.checkConstraints.length > 0) {- const checksFolderNode = createExpandableTextNode(- "check",- node.key,- () => t("database.checks")+ const checksFolderNode = createExpandableTextNode("check", node.key, () =>+ t("database.checks"));checksFolderNode.children = mapCheckNodes(node.meta.target,table.checkConstraints,checksFolderNode.key- )+ );node.children.push(checksFolderNode);}diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vueindex eebe0017fd..c0071ffdab 100644--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue@@ -206,9 +206,9 @@ import {getDataSourceTypeI18n,isValidProjectName,} from "@/types";-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { Engine } from "@/types/proto-es/v1/common_pb";import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import {findAncestor,isDescendantOf,@@ -555,7 +555,9 @@ const selectedEngines = computed(() => {.map((scope) => {// Convert from string engine name to proto-es enum valueconst engineName = scope.value.toUpperCase();- return Engine[engineName as keyof typeof Engine] ?? Engine.ENGINE_UNSPECIFIED;+ return (+ Engine[engineName as keyof typeof Engine] ?? Engine.ENGINE_UNSPECIFIED+ );});});diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/actions.tsx b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/actions.tsxindex b87137fe60..dee0c76376 100644--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/actions.tsx+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/actions.tsx@@ -47,9 +47,7 @@ export const useDropdown = () => {});const context = ref<TreeNode>();- const allowAdmin = computed(() =>- hasWorkspacePermissionV2("bb.sql.admin")- );+ const allowAdmin = computed(() => hasWorkspacePermissionV2("bb.sql.admin"));const options = computed((): DropdownOptionWithTreeNode[] => {const node = context.value;diff --git a/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue b/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vueindex 57cd612bd4..d3361f0579 100644--- a/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue+++ b/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue@@ -38,9 +38,7 @@ const props = defineProps({},});-const allowAdmin = computed(() =>- hasWorkspacePermissionV2("bb.sql.admin")-);+const allowAdmin = computed(() => hasWorkspacePermissionV2("bb.sql.admin"));const tabStore = useSQLEditorTabStore();const { currentTab, isDisconnected } = storeToRefs(tabStore);diff --git a/frontend/src/views/sql-editor/EditorCommon/OpenAIButton/OpenAIButton.vue b/frontend/src/views/sql-editor/EditorCommon/OpenAIButton/OpenAIButton.vueindex 206fd691d0..2d72849667 100644--- a/frontend/src/views/sql-editor/EditorCommon/OpenAIButton/OpenAIButton.vue+++ b/frontend/src/views/sql-editor/EditorCommon/OpenAIButton/OpenAIButton.vue@@ -65,7 +65,10 @@ import {useSettingV1Store,useSQLEditorTabStore,} from "@/store";-import { DatabaseChangeMode, Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";+import {+ DatabaseChangeMode,+ Setting_SettingName,+} from "@/types/proto-es/v1/setting_service_pb";import { hasWorkspacePermissionV2, nextAnimationFrame } from "@/utils";import { useSQLEditorContext } from "../../context";import Button from "./Button.vue";@@ -87,8 +90,8 @@ const databaseChangeMode = useAppFeature("bb.feature.database-change-mode");const openAIEnabled = computed(() => {const setting = settingV1Store.getSettingByName(Setting_SettingName.AI);- return setting?.value?.value?.case === "aiSetting"- ? setting.value.value.value.enabled+ return setting?.value?.value?.case === "aiSetting"+ ? setting.value.value.value.enabled: false;});diff --git a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vueindex e32e23ec41..71a6d82064 100644--- a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue+++ b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue@@ -131,11 +131,11 @@ import {DataSourceType,DataSource_RedisType,} from "@/types/proto-es/v1/instance_service_pb";-import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";import {DataSourceQueryPolicy_Restriction,PolicyType,} from "@/types/proto-es/v1/org_policy_service_pb";+import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";import { QueryOption_RedisRunCommandsOn } from "@/types/proto-es/v1/sql_service_pb";import { getValidDataSourceByPolicy, readableDataSourceType } from "@/utils";import { getAdminDataSourceRestrictionOfDatabase } from "@/utils";diff --git a/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue b/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vueindex c568c21969..327ef2a835 100644--- a/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ReadonlyDatasourceHint.vue@@ -32,9 +32,7 @@ import { SQL_EDITOR_SETTING_INSTANCE_MODULE } from "@/router/sqlEditor";import { useSQLEditorTabStore } from "@/store";import { isValidInstanceName } from "@/types";import type { InstanceResource } from "@/types/proto-es/v1/instance_service_pb";-import {- DataSourceType,-} from "@/types/proto-es/v1/instance_service_pb";+import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";import { useSidebarItems as useSettingItems } from "../Setting/Sidebar";diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vueindex 8e76765cd1..7575b27bcd 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/DataTable.vue@@ -143,8 +143,11 @@ import { NEmpty } from "naive-ui";import { computed, nextTick, onMounted, ref, watch } from "vue";import { FeatureBadge } from "@/components/FeatureGuard";import { useConnectionOfCurrentSQLEditorTab } from "@/store";+import {+ type QueryRow,+ type RowValue,+} from "@/types/proto-es/v1/sql_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";-import { type QueryRow, type RowValue } from "@/types/proto-es/v1/sql_service_pb";import { useSQLResultViewContext } from "../context";import TableCell from "./TableCell.vue";import {diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/TableCell.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/TableCell.vueindex e7fd5671a0..7d2595d4b5 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/TableCell.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DataTable/TableCell.vue@@ -114,16 +114,19 @@ watchEffect(() => {return;}if (!binaryFormat.value) {- const bytesValue = props.value.kind?.case === "bytesValue" ? props.value.kind.value : undefined;+ const bytesValue =+ props.value.kind?.case === "bytesValue"+ ? props.value.kind.value+ : undefined;if (bytesValue) {const binaryFormat = detectBinaryFormat({bytesValue,columnType: props.columnType,});- setBinaryFormat({- rowIndex: props.rowIndex,- colIndex: props.colIndex,- setIndex: props.setIndex,+ setBinaryFormat({+ rowIndex: props.rowIndex,+ colIndex: props.colIndex,+ setIndex: props.setIndex,format: binaryFormat,});}@@ -187,7 +190,10 @@ const classes = computed(() => {// Format the binary value based on selected format (proto-es oneof pattern)const formattedValue = computed(() => {- const bytesValue = props.value.kind?.case === "bytesValue" ? props.value.kind.value : undefined;+ const bytesValue =+ props.value.kind?.case === "bytesValue"+ ? props.value.kind.value+ : undefined;if (!bytesValue) {return props.value;}diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/ErrorView.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/ErrorView.vueindex d7ba002b11..b23e84b3c8 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/ErrorView.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/ErrorView.vue@@ -27,6 +27,7 @@</template><script lang="ts" setup>+import { Code } from "@connectrpc/connect";import { NButton } from "naive-ui";import { storeToRefs } from "pinia";import { computed } from "vue";@@ -38,7 +39,6 @@ import { Advice_Status } from "@/types/proto-es/v1/sql_service_pb";import { useSQLResultViewContext } from "../context";import AdviceItem from "./AdviceItem.vue";import PostgresError from "./PostgresError.vue";-import { Code } from "@connectrpc/connect";const props = defineProps<{error: string | undefined;diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/PostgresError.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/PostgresError.vueindex 2890932ee7..a0c06f80d1 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/PostgresError.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ErrorView/PostgresError.vue@@ -1,16 +1,21 @@<template>- <div v-for="(error, i) in postgresErrors" :key="i" class="text-sm grid gap-1 pl-8" style="grid-template-columns: auto 1fr;">+ <div+ v-for="(error, i) in postgresErrors"+ :key="i"+ class="text-sm grid gap-1 pl-8"+ style="grid-template-columns: auto 1fr"+ ><template v-if="error.detail"><div>DETAIL:</div>- <div>{{error.detail}}</div>+ <div>{{ error.detail }}</div></template><template v-if="error.hint"><div>HINT:</div>- <div>{{error.hint}}</div>+ <div>{{ error.hint }}</div></template><template v-if="error.where"><div>WHERE:</div>- <div>{{error.where}}</div>+ <div>{{ error.where }}</div></template></div></template>diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vueindex 43f24d86a0..a85b479e5c 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue@@ -112,6 +112,7 @@</template><script lang="ts" setup>+import { Code } from "@connectrpc/connect";import { Info } from "lucide-vue-next";import {darkTheme,@@ -148,7 +149,6 @@ import RequestQueryButton from "./RequestQueryButton.vue";import SingleResultViewV1 from "./SingleResultViewV1.vue";import type { SQLResultViewContext } from "./context";import { provideSQLResultViewContext } from "./context";-import { Code } from "@connectrpc/connect";type ViewMode = "SINGLE-RESULT" | "MULTI-RESULT" | "EMPTY" | "ERROR";@@ -252,7 +252,10 @@ const disallowCopyingData = computed(() => {parentPath: props.database?.project,policyType: PolicyType.DISABLE_COPY_DATA,});- if (projectLevelPolicy?.policy?.case === "disableCopyDataPolicy" && projectLevelPolicy.policy.value.active) {+ if (+ projectLevelPolicy?.policy?.case === "disableCopyDataPolicy" &&+ projectLevelPolicy.policy.value.active+ ) {return true;}// If the database is provided, use its effective environment.@@ -264,7 +267,10 @@ const disallowCopyingData = computed(() => {parentPath: environment,policyType: PolicyType.DISABLE_COPY_DATA,});- if (policy?.policy?.case === "disableCopyDataPolicy" && policy.policy.value.active) {+ if (+ policy?.policy?.case === "disableCopyDataPolicy" &&+ policy.policy.value.active+ ) {return true;}return false;diff --git a/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue b/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vueindex b5cc249a7c..a8eaa93def 100644--- a/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue+++ b/frontend/src/views/sql-editor/EditorCommon/SaveSheetModal.vue@@ -14,6 +14,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { reactive } from "vue";import { BBModal } from "@/bbkit";import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";@@ -24,7 +25,6 @@ import {} from "@/store";import type { SQLEditorTab } from "@/types";import { UNKNOWN_ID } from "@/types";-import { create } from "@bufbuild/protobuf";import type { Worksheet } from "@/types/proto-es/v1/worksheet_service_pb";import {WorksheetSchema,@@ -65,7 +65,7 @@ const doSaveSheet = async (if (sheetId !== UNKNOWN_ID) {const currentSheet = await worksheetV1Store.getWorksheetByName(worksheet);if (!currentSheet) return;-+const updatedSheet = await worksheetV1Store.patchWorksheet({...currentSheet,diff --git a/frontend/src/views/sql-editor/EditorPanel/Panels/Panels.vue b/frontend/src/views/sql-editor/EditorPanel/Panels/Panels.vueindex bdd8763597..f6b070d886 100644--- a/frontend/src/views/sql-editor/EditorPanel/Panels/Panels.vue+++ b/frontend/src/views/sql-editor/EditorPanel/Panels/Panels.vue@@ -64,12 +64,12 @@ import {useSQLEditorTabStore,} from "@/store";import { isValidDatabaseName } from "@/types";+import type { DatabaseMetadata } from "@/types/proto-es/v1/database_service_pb";import {extractDatabaseResourceName,nextAnimationFrame,type VueClass,} from "@/utils";-import type { DatabaseMetadata } from "@/types/proto-es/v1/database_service_pb";import DatabaseChooser from "@/views/sql-editor/EditorCommon/DatabaseChooser.vue";import { useCurrentTabViewStateContext } from "../context/viewState.tsx";import DiagramPanel from "./DiagramPanel";@@ -80,9 +80,9 @@ import PackagesPanel from "./PackagesPanel";import ProceduresPanel from "./ProceduresPanel";import SequencesPanel from "./SequencesPanel";import TablesPanel from "./TablesPanel";+import TriggersPanel from "./TriggersPanel/TriggersPanel.vue";import ViewsPanel from "./ViewsPanel";import { SchemaSelectToolbar } from "./common";-import TriggersPanel from "./TriggersPanel/TriggersPanel.vue";defineProps<{contentClass?: VueClass;@@ -106,7 +106,11 @@ const databaseMetadata = computedAsync(() => {watch([() => tab.value?.id, databaseMetadata, selectedSchemaName],- ([id, database, schema]: [string | undefined, DatabaseMetadata | undefined, string | undefined]) => {+ ([id, database, schema]: [+ string | undefined,+ DatabaseMetadata | undefined,+ string | undefined,+ ]) => {if (!id) return;if (!database) return;if (@@ -114,7 +118,10 @@ watch() {return;}- if (!schema || database.schemas.findIndex((s: any) => s.name === schema) < 0) {+ if (+ !schema ||+ database.schemas.findIndex((s: any) => s.name === schema) < 0+ ) {selectedSchemaName.value = first(database.schemas)?.name;}},diff --git a/frontend/src/views/sql-editor/EditorPanel/Panels/TriggersPanel/TriggersPanel.vue b/frontend/src/views/sql-editor/EditorPanel/Panels/TriggersPanel/TriggersPanel.vueindex f1433c3bcd..2dc2c6f8f1 100644--- a/frontend/src/views/sql-editor/EditorPanel/Panels/TriggersPanel/TriggersPanel.vue+++ b/frontend/src/views/sql-editor/EditorPanel/Panels/TriggersPanel/TriggersPanel.vue@@ -1,101 +1,93 @@<template>- <div v-if="metadata?.schema" class="h-full overflow-hidden flex flex-col">- <div- v-show="!metadata.trigger"- class="w-full h-[44px] py-2 px-2 border-b flex flex-row gap-x-2 justify-end items-center"- >- <SearchBox- v-model:value="state.keyword"- size="small"- style="width: 10rem"- />- </div>- <TriggersTable- v-show="!metadata.trigger"- :db="database"- :database="metadata.database"- :schema="metadata.schema"- :table="metadata.table"- :triggers="metadata.table?.triggers"- :keyword="state.keyword"- @click="select"+ <div v-if="metadata?.schema" class="h-full overflow-hidden flex flex-col">+ <div+ v-show="!metadata.trigger"+ class="w-full h-[44px] py-2 px-2 border-b flex flex-row gap-x-2 justify-end items-center"+ >+ <SearchBox+ v-model:value="state.keyword"+ size="small"+ style="width: 10rem"/>-- <template v-if="metadata.trigger">- <CodeViewer- :db="database"- :title="metadata.trigger.name"- :code="metadata.trigger.body"- @back="deselect"- >- <template #title-icon>- <TriggerIcon class="w-4 h-4 text-main" />- </template>- </CodeViewer>- </template></div>- </template>-- <script setup lang="ts">- import { computed, reactive } from "vue";- import { SearchBox } from "@/components/v2";- import {- useConnectionOfCurrentSQLEditorTab,- useDBSchemaV1Store,- } from "@/store";- import type {- TriggerMetadata,- } from "@/types/proto-es/v1/database_service_pb";- import {- extractKeyWithPosition,- keyWithPosition,- } from "@/views/sql-editor/EditorCommon";- import { useCurrentTabViewStateContext } from "../../context/viewState";- import { CodeViewer } from "../common";- import TriggersTable from "./TriggersTable.vue";- import TriggerIcon from "@/components/Icon/TriggerIcon.vue";-- const { database } = useConnectionOfCurrentSQLEditorTab();- const { viewState, updateViewState } = useCurrentTabViewStateContext();- const databaseMetadata = computed(() => {- return useDBSchemaV1Store().getDatabaseMetadata(database.value.name);- });- const state = reactive({- keyword: "",+ <TriggersTable+ v-show="!metadata.trigger"+ :db="database"+ :database="metadata.database"+ :schema="metadata.schema"+ :table="metadata.table"+ :triggers="metadata.table?.triggers"+ :keyword="state.keyword"+ @click="select"+ />++ <template v-if="metadata.trigger">+ <CodeViewer+ :db="database"+ :title="metadata.trigger.name"+ :code="metadata.trigger.body"+ @back="deselect"+ >+ <template #title-icon>+ <TriggerIcon class="w-4 h-4 text-main" />+ </template>+ </CodeViewer>+ </template>+ </div>+</template>++<script setup lang="ts">+import { computed, reactive } from "vue";+import TriggerIcon from "@/components/Icon/TriggerIcon.vue";+import { SearchBox } from "@/components/v2";+import {+ useConnectionOfCurrentSQLEditorTab,+ useDBSchemaV1Store,+} from "@/store";+import type { TriggerMetadata } from "@/types/proto-es/v1/database_service_pb";+import {+ extractKeyWithPosition,+ keyWithPosition,+} from "@/views/sql-editor/EditorCommon";+import { useCurrentTabViewStateContext } from "../../context/viewState";+import { CodeViewer } from "../common";+import TriggersTable from "./TriggersTable.vue";++const { database } = useConnectionOfCurrentSQLEditorTab();+const { viewState, updateViewState } = useCurrentTabViewStateContext();+const databaseMetadata = computed(() => {+ return useDBSchemaV1Store().getDatabaseMetadata(database.value.name);+});+const state = reactive({+ keyword: "",+});++const metadata = computed(() => {+ const database = databaseMetadata.value;+ const schema = database.schemas.find(+ (s) => s.name === viewState.value?.schema+ );+ const table = schema?.tables.find((t) => t.name === viewState.value?.table);+ const [name, position] = extractKeyWithPosition(+ viewState.value?.detail?.trigger ?? ""+ );+ const trigger = table?.triggers.find(+ (p, i) => p.name === name && i === position+ );+ return { database, schema, table, trigger };+});++const select = (selected: { trigger: TriggerMetadata; position: number }) => {+ updateViewState({+ detail: {+ trigger: keyWithPosition(selected.trigger.name, selected.position),+ },});-- const metadata = computed(() => {- const database = databaseMetadata.value;- const schema = database.schemas.find(- (s) => s.name === viewState.value?.schema- );- const table = schema?.tables.find(- (t) => t.name === viewState.value?.table- );- const [name, position] = extractKeyWithPosition(- viewState.value?.detail?.trigger ?? ""- );- const trigger = table?.triggers.find(- (p, i) => p.name === name && i === position- );- return { database, schema, table, trigger };+};++const deselect = () => {+ updateViewState({+ detail: {},});-- const select = (selected: {- trigger: TriggerMetadata;- position: number;- }) => {- updateViewState({- detail: {- trigger: keyWithPosition(selected.trigger.name, selected.position),- },- });- };-- const deselect = () => {- updateViewState({- detail: {},- });- };- </script>-\ No newline at end of file+};+</script>diff --git a/frontend/src/views/sql-editor/EditorPanel/Panels/TriggersPanel/TriggersTable.vue b/frontend/src/views/sql-editor/EditorPanel/Panels/TriggersPanel/TriggersTable.vueindex d2e2cdef85..2ef7b77ed3 100644--- a/frontend/src/views/sql-editor/EditorPanel/Panels/TriggersPanel/TriggersTable.vue+++ b/frontend/src/views/sql-editor/EditorPanel/Panels/TriggersPanel/TriggersTable.vue@@ -1,154 +1,153 @@<template>- <div ref="containerElRef" class="w-full h-full px-2 py-2 overflow-x-auto">- <NDataTable- v-bind="$attrs"- ref="dataTableRef"- size="small"- :row-key="- ({ trigger, position }) => keyWithPosition(trigger.name, position)- "- :columns="columns"- :data="layoutReady ? filteredTriggers : []"- :row-props="rowProps"- :max-height="tableBodyHeight"- :virtual-scroll="true"- :striped="true"- :bordered="true"- :bottom-bordered="true"- row-class-name="cursor-pointer"- />- </div>- </template>-- <script setup lang="tsx">- import { NDataTable, type DataTableColumn } from "naive-ui";- import { computed, h, watch } from "vue";- import { useI18n } from "vue-i18n";- import type { ComposedDatabase } from "@/types";- import type {- DatabaseMetadata,- TriggerMetadata,- SchemaMetadata,- TableMetadata,- } from "@/types/proto-es/v1/database_service_pb";- import { getHighlightHTMLByRegExp, useAutoHeightDataTable } from "@/utils";- import { keyWithPosition } from "@/views/sql-editor/EditorCommon";- import { useCurrentTabViewStateContext } from "../../context/viewState";-- type TriggerWithPosition = {- trigger: TriggerMetadata;- position: number;- };-- const props = defineProps<{- db: ComposedDatabase;- database: DatabaseMetadata;- schema: SchemaMetadata;- table?: TableMetadata;- triggers?: TriggerMetadata[];- keyword?: string;- maxHeight?: number;- }>();-- const emit = defineEmits<{- (- event: "click",- metadata: {- database: DatabaseMetadata;- schema: SchemaMetadata;- table?: TableMetadata;- trigger: TriggerMetadata;- position: number;- }- ): void;- }>();-- const { t } = useI18n();- const { viewState } = useCurrentTabViewStateContext();-- const triggersWithPosition = computed(() => {- return props.triggers?.map<TriggerWithPosition>((trigger, position) => ({- trigger,- position,- }));- });-- const filteredTriggers = computed(() => {- const keyword = props.keyword?.trim().toLowerCase();- if (keyword) {- return triggersWithPosition.value?.filter(({ trigger }) =>- trigger.name.toLowerCase().includes(keyword)- );+ <div ref="containerElRef" class="w-full h-full px-2 py-2 overflow-x-auto">+ <NDataTable+ v-bind="$attrs"+ ref="dataTableRef"+ size="small"+ :row-key="+ ({ trigger, position }) => keyWithPosition(trigger.name, position)+ "+ :columns="columns"+ :data="layoutReady ? filteredTriggers : []"+ :row-props="rowProps"+ :max-height="tableBodyHeight"+ :virtual-scroll="true"+ :striped="true"+ :bordered="true"+ :bottom-bordered="true"+ row-class-name="cursor-pointer"+ />+ </div>+</template>++<script setup lang="tsx">+import { NDataTable, type DataTableColumn } from "naive-ui";+import { computed, h, watch } from "vue";+import { useI18n } from "vue-i18n";+import type { ComposedDatabase } from "@/types";+import type {+ DatabaseMetadata,+ TriggerMetadata,+ SchemaMetadata,+ TableMetadata,+} from "@/types/proto-es/v1/database_service_pb";+import { getHighlightHTMLByRegExp, useAutoHeightDataTable } from "@/utils";+import { keyWithPosition } from "@/views/sql-editor/EditorCommon";+import { useCurrentTabViewStateContext } from "../../context/viewState";++type TriggerWithPosition = {+ trigger: TriggerMetadata;+ position: number;+};++const props = defineProps<{+ db: ComposedDatabase;+ database: DatabaseMetadata;+ schema: SchemaMetadata;+ table?: TableMetadata;+ triggers?: TriggerMetadata[];+ keyword?: string;+ maxHeight?: number;+}>();++const emit = defineEmits<{+ (+ event: "click",+ metadata: {+ database: DatabaseMetadata;+ schema: SchemaMetadata;+ table?: TableMetadata;+ trigger: TriggerMetadata;+ position: number;}- return triggersWithPosition.value;- });-- const {- dataTableRef,- containerElRef,- virtualListRef,- tableBodyHeight,- layoutReady,- } = useAutoHeightDataTable(- filteredTriggers.value,- computed(() => ({- maxHeight: props.maxHeight ? props.maxHeight : null,- }))- );-- const columns = computed(() => {- const columns: (DataTableColumn<TriggerWithPosition> & {- hide?: boolean;- })[] = [- {- key: "name",- title: t("schema-editor.database.name"),- resizable: true,- className: "truncate",- render: ({ trigger }) => {- return h("span", {- innerHTML: getHighlightHTMLByRegExp(- trigger.name,- props.keyword ?? ""- ),- });- },- },- ];- return columns;- });-- const rowProps = ({ trigger, position }: TriggerWithPosition) => {- return {- onClick: () => {- emit("click", {- database: props.database,- schema: props.schema,- table: props.table,- trigger,- position,+ ): void;+}>();++const { t } = useI18n();+const { viewState } = useCurrentTabViewStateContext();++const triggersWithPosition = computed(() => {+ return props.triggers?.map<TriggerWithPosition>((trigger, position) => ({+ trigger,+ position,+ }));+});++const filteredTriggers = computed(() => {+ const keyword = props.keyword?.trim().toLowerCase();+ if (keyword) {+ return triggersWithPosition.value?.filter(({ trigger }) =>+ trigger.name.toLowerCase().includes(keyword)+ );+ }+ return triggersWithPosition.value;+});++const {+ dataTableRef,+ containerElRef,+ virtualListRef,+ tableBodyHeight,+ layoutReady,+} = useAutoHeightDataTable(+ filteredTriggers.value,+ computed(() => ({+ maxHeight: props.maxHeight ? props.maxHeight : null,+ }))+);++const columns = computed(() => {+ const columns: (DataTableColumn<TriggerWithPosition> & {+ hide?: boolean;+ })[] = [+ {+ key: "name",+ title: t("schema-editor.database.name"),+ resizable: true,+ className: "truncate",+ render: ({ trigger }) => {+ return h("span", {+ innerHTML: getHighlightHTMLByRegExp(+ trigger.name,+ props.keyword ?? ""+ ),});},- };- };-- watch(- [() => viewState.value?.detail.trigger, virtualListRef],- ([trigger, vl]) => {- if (trigger && vl) {- vl.scrollTo({ key: trigger });- }},- { immediate: true }- );- </script>-- <style lang="postcss" scoped>- :deep(.n-data-table-th .n-data-table-resize-button::after) {- @apply bg-control-bg h-2/3;- }- :deep(.n-data-table-td.input-cell) {- @apply pl-0.5 pr-1 py-0;- }- </style>-\ No newline at end of file+ ];+ return columns;+});++const rowProps = ({ trigger, position }: TriggerWithPosition) => {+ return {+ onClick: () => {+ emit("click", {+ database: props.database,+ schema: props.schema,+ table: props.table,+ trigger,+ position,+ });+ },+ };+};++watch(+ [() => viewState.value?.detail.trigger, virtualListRef],+ ([trigger, vl]) => {+ if (trigger && vl) {+ vl.scrollTo({ key: trigger });+ }+ },+ { immediate: true }+);+</script>++<style lang="postcss" scoped>+:deep(.n-data-table-th .n-data-table-resize-button::after) {+ @apply bg-control-bg h-2/3;+}+:deep(.n-data-table-td.input-cell) {+ @apply pl-0.5 pr-1 py-0;+}+</style>diff --git a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vueindex 2242dcd6c2..9e77a98b42 100644--- a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue+++ b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue@@ -101,6 +101,7 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { useLocalStorage } from "@vueuse/core";import dayjs from "dayjs";import { head } from "lodash-es";@@ -124,13 +125,10 @@ import {useSQLStore,} from "@/store";import type { ComposedDatabase, SQLEditorDatabaseQueryContext } from "@/types";-import { create } from "@bufbuild/protobuf";import { ExportFormat } from "@/types/proto-es/v1/common_pb";import { ExportRequestSchema } from "@/types/proto-es/v1/sql_service_pb";import { hexToRgb } from "@/utils";--const MAX_EXPORT = 20;type BatchQueryItem = {diff --git a/frontend/src/views/sql-editor/EditorPanel/Welcome/Button.vue b/frontend/src/views/sql-editor/EditorPanel/Welcome/Button.vueindex 0e4b5848a4..2c87ca47ca 100644--- a/frontend/src/views/sql-editor/EditorPanel/Welcome/Button.vue+++ b/frontend/src/views/sql-editor/EditorPanel/Welcome/Button.vue@@ -1,5 +1,8 @@<template>- <NButton type="primary" style="--n-height: 7rem; --n-padding: 0 6px; min-width: 7rem;">+ <NButton+ type="primary"+ style="--n-height: 7rem; --n-padding: 0 6px; min-width: 7rem"+ ><div><slot name="icon" /></div>diff --git a/frontend/src/views/sql-editor/EditorPanel/context/viewState.tsx b/frontend/src/views/sql-editor/EditorPanel/context/viewState.tsxindex 52331fd759..cefda1741b 100644--- a/frontend/src/views/sql-editor/EditorPanel/context/viewState.tsx+++ b/frontend/src/views/sql-editor/EditorPanel/context/viewState.tsx@@ -1,5 +1,18 @@+import { InfoIcon } from "lucide-vue-next";import { storeToRefs } from "pinia";import { computed, inject, provide, watch, type InjectionKey } from "vue";+import type { VNodeChild } from "vue";+import {+ FunctionIcon,+ TableIcon,+ ViewIcon,+ ProcedureIcon,+ ExternalTableIcon,+ PackageIcon,+ SequenceIcon,+} from "@/components/Icon";+import { SchemaDiagramIcon } from "@/components/SchemaDiagram";+import { t } from "@/plugins/i18n";import {useConnectionOfCurrentSQLEditorTab,useSQLEditorTabStore,@@ -14,19 +27,6 @@ import {instanceV1SupportsPackage,instanceV1SupportsSequence,} from "@/utils";-import type { VNodeChild } from "vue";-import { t } from "@/plugins/i18n";-import {- FunctionIcon,- TableIcon,- ViewIcon,- ProcedureIcon,- ExternalTableIcon,- PackageIcon,- SequenceIcon,-} from "@/components/Icon";-import { InfoIcon } from "lucide-vue-next"-import { SchemaDiagramIcon } from "@/components/SchemaDiagram";const KEY = Symbol("bb.sql-editor.editor-panel"@@ -45,58 +45,62 @@ export const provideCurrentTabViewStateContext = () => {});const availableActions = computed(() => {- const actions: { view: EditorPanelView; title: string; icon: () => VNodeChild }[] = [+ const actions: {+ view: EditorPanelView;+ title: string;+ icon: () => VNodeChild;+ }[] = [{view: "INFO",title: t("common.info"),- icon: () => <InfoIcon class="w-4 h-4" />+ icon: () => <InfoIcon class="w-4 h-4" />,},{view: "TABLES",title: t("db.tables"),- icon: () => <TableIcon class="w-4 h-4" />+ icon: () => <TableIcon class="w-4 h-4" />,},{view: "VIEWS",title: t("db.views"),- icon: () => <ViewIcon class="w-4 h-4" />+ icon: () => <ViewIcon class="w-4 h-4" />,},{view: "FUNCTIONS",title: t("db.functions"),- icon: () => <FunctionIcon class="w-4 h-4" />+ icon: () => <FunctionIcon class="w-4 h-4" />,},{view: "PROCEDURES",title: t("db.procedures"),- icon: () => <ProcedureIcon class="w-4 h-4" />+ icon: () => <ProcedureIcon class="w-4 h-4" />,},];if (instanceV1SupportsSequence(instance.value)) {actions.push({view: "SEQUENCES",title: t("db.sequences"),- icon: () => <SequenceIcon class="w-4 h-4" />+ icon: () => <SequenceIcon class="w-4 h-4" />,});}if (instanceV1SupportsExternalTable(instance.value)) {actions.push({view: "EXTERNAL_TABLES",title: t("db.external-tables"),- icon: () => <ExternalTableIcon class="w-4 h-4" />+ icon: () => <ExternalTableIcon class="w-4 h-4" />,});}if (instanceV1SupportsPackage(instance.value)) {actions.push({view: "PACKAGES",title: t("db.packages"),- icon: () => <PackageIcon class="w-4 h-4" />+ icon: () => <PackageIcon class="w-4 h-4" />,});}actions.push({view: "DIAGRAM",title: t("schema-diagram.self"),- icon: () => <SchemaDiagramIcon class="w-4 h-4" />+ icon: () => <SchemaDiagramIcon class="w-4 h-4" />,});return actions;});diff --git a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vueindex a71457f84c..b03320325b 100644--- a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue+++ b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue@@ -30,6 +30,7 @@</template><script lang="ts" setup>+import { create } from "@bufbuild/protobuf";import { DotIcon, EllipsisIcon } from "lucide-vue-next";import type { DropdownProps } from "naive-ui";import {@@ -41,7 +42,6 @@ import {} from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";-import { create } from "@bufbuild/protobuf";import {useWorkSheetStore,pushNotification,