Browse Source

refactor: plugin path correction

pull/9894/head
Pranav C 5 days ago
parent
commit
49975ffdf0
  1. 2
      packages/nocodb/src/helpers/NcPluginMgrv2.ts
  2. 2
      packages/nocodb/src/plugins/backblaze/index.ts
  3. 2
      packages/nocodb/src/plugins/linode/index.ts
  4. 0
      packages/nocodb/src/plugins/minio/Minio.ts
  5. 0
      packages/nocodb/src/plugins/minio/MinioPlugin.ts
  6. 0
      packages/nocodb/src/plugins/minio/index.ts
  7. 2
      packages/nocodb/src/plugins/ovhCloud/index.ts
  8. 2
      packages/nocodb/src/plugins/r2/index.ts
  9. 2
      packages/nocodb/src/plugins/scaleway/index.ts
  10. 2
      packages/nocodb/src/plugins/upcloud/index.ts
  11. 2
      packages/nocodb/src/plugins/vultr/index.ts
  12. 2
      packages/nocodb/src/services/command-palette.service.ts
  13. 2
      packages/nocodb/src/types/nc-plugin/lib/XcPluginConfig.ts
  14. 6
      packages/nocodb/src/version-upgrader/upgraders/0258003_ncDuplicatePluginMerge.ts

2
packages/nocodb/src/helpers/NcPluginMgrv2.ts

@ -14,7 +14,7 @@ import DiscordPluginConfig from '~/plugins/discord';
import GcsPluginConfig from '~/plugins/gcs'; import GcsPluginConfig from '~/plugins/gcs';
import LinodePluginConfig from '~/plugins/linode'; import LinodePluginConfig from '~/plugins/linode';
import MattermostPluginConfig from '~/plugins/mattermost'; import MattermostPluginConfig from '~/plugins/mattermost';
import MinioPluginConfig from '~/plugins/mino'; import MinioPluginConfig from '~/plugins/minio';
import OvhCloudPluginConfig from '~/plugins/ovhCloud'; import OvhCloudPluginConfig from '~/plugins/ovhCloud';
import S3PluginConfig from '~/plugins/s3'; import S3PluginConfig from '~/plugins/s3';
import ScalewayPluginConfig from '~/plugins/scaleway'; import ScalewayPluginConfig from '~/plugins/scaleway';

2
packages/nocodb/src/plugins/backblaze/index.ts

@ -6,7 +6,7 @@ const config: XcPluginConfig = {
builder: BackblazePlugin, builder: BackblazePlugin,
id: 'backblaze', id: 'backblaze',
title: 'Backblaze', title: 'Backblaze',
fallbackTitle: 'Backblaze B2', recoveryTitle: 'Backblaze B2',
version: '0.0.5', version: '0.0.5',
logo: 'plugins/backblaze.jpeg', logo: 'plugins/backblaze.jpeg',
tags: 'Storage', tags: 'Storage',

2
packages/nocodb/src/plugins/linode/index.ts

@ -5,7 +5,7 @@ import type { XcPluginConfig } from '~/types/nc-plugin';
const config: XcPluginConfig = { const config: XcPluginConfig = {
builder: LinodeObjectStoragePlugin, builder: LinodeObjectStoragePlugin,
id: 'linode', id: 'linode',
fallbackTitle: 'Linode Object Storage', recoveryTitle: 'Linode Object Storage',
title: 'Linode', title: 'Linode',
version: '0.0.4', version: '0.0.4',
logo: 'plugins/linode.svg', logo: 'plugins/linode.svg',

0
packages/nocodb/src/plugins/mino/Minio.ts → packages/nocodb/src/plugins/minio/Minio.ts

0
packages/nocodb/src/plugins/mino/MinioPlugin.ts → packages/nocodb/src/plugins/minio/MinioPlugin.ts

0
packages/nocodb/src/plugins/mino/index.ts → packages/nocodb/src/plugins/minio/index.ts

2
packages/nocodb/src/plugins/ovhCloud/index.ts

@ -6,7 +6,7 @@ const config: XcPluginConfig = {
builder: OvhCloud, builder: OvhCloud,
id: 'ovh', id: 'ovh',
title: 'Ovh', title: 'Ovh',
fallbackTitle: 'OvhCloud Object Storage', recoveryTitle: 'OvhCloud Object Storage',
version: '0.0.4', version: '0.0.4',
logo: 'plugins/ovhCloud.png', logo: 'plugins/ovhCloud.png',
tags: 'Storage', tags: 'Storage',

2
packages/nocodb/src/plugins/r2/index.ts

@ -6,7 +6,7 @@ const config: XcPluginConfig = {
builder: R2Plugin, builder: R2Plugin,
id: 'cloudflare-r2', id: 'cloudflare-r2',
title: 'Cloudflare R2', title: 'Cloudflare R2',
fallbackTitle: 'Cloudflare R2 Storage', recoveryTitle: 'Cloudflare R2 Storage',
version: '0.0.3', version: '0.0.3',
logo: 'plugins/r2.png', logo: 'plugins/r2.png',
description: description:

2
packages/nocodb/src/plugins/scaleway/index.ts

@ -6,7 +6,7 @@ const config: XcPluginConfig = {
builder: ScalewayObjectStoragePlugin, builder: ScalewayObjectStoragePlugin,
id: 'scaleway', id: 'scaleway',
title: 'Scaleway', title: 'Scaleway',
fallbackTitle: 'Scaleway Object Storage', recoveryTitle: 'Scaleway Object Storage',
version: '0.0.4', version: '0.0.4',
logo: 'plugins/scaleway.png', logo: 'plugins/scaleway.png',
tags: 'Storage', tags: 'Storage',

2
packages/nocodb/src/plugins/upcloud/index.ts

@ -6,7 +6,7 @@ const config: XcPluginConfig = {
builder: UpCloudPlugin, builder: UpCloudPlugin,
id: 'upcloud', id: 'upcloud',
title: 'UpCloud', title: 'UpCloud',
fallbackTitle: 'UpCloud Object Storage', recoveryTitle: 'UpCloud Object Storage',
version: '0.0.4', version: '0.0.4',
logo: 'plugins/upcloud.png', logo: 'plugins/upcloud.png',
description: description:

2
packages/nocodb/src/plugins/vultr/index.ts

@ -6,7 +6,7 @@ const config: XcPluginConfig = {
builder: VultrPlugin, builder: VultrPlugin,
title: 'Vultr', title: 'Vultr',
id: 'vultr', id: 'vultr',
fallbackTitle: 'Vultr Object Storage', recoveryTitle: 'Vultr Object Storage',
version: '0.0.4', version: '0.0.4',
logo: 'plugins/vultr.png', logo: 'plugins/vultr.png',
description: description:

2
packages/nocodb/src/services/command-palette.service.ts

@ -1,5 +1,5 @@
import { Injectable, Logger } from '@nestjs/common'; import { Injectable, Logger } from '@nestjs/common';
import { viewTypeAlias, type UserType } from 'nocodb-sdk'; import { type UserType, viewTypeAlias } from 'nocodb-sdk';
import { deserializeJSON } from '~/utils/serialize'; import { deserializeJSON } from '~/utils/serialize';
import { getCommandPaletteForUserWorkspace } from '~/helpers/commandPaletteHelpers'; import { getCommandPaletteForUserWorkspace } from '~/helpers/commandPaletteHelpers';

2
packages/nocodb/src/types/nc-plugin/lib/XcPluginConfig.ts

@ -6,7 +6,7 @@ import type XcPluginMigration from './XcPluginMigration';
export default interface XcPluginConfig { export default interface XcPluginConfig {
id: string; id: string;
title: string; title: string;
fallbackTitle?: string; recoveryTitle?: string;
logo?: string; logo?: string;
tags?: string; tags?: string;
description?: string; description?: string;

6
packages/nocodb/src/version-upgrader/upgraders/0258003_ncDuplicatePluginMerge.ts

@ -5,7 +5,7 @@ import DiscordPluginConfig from '~/plugins/discord';
import TwilioWhatsappPluginConfig from '~/plugins/twilioWhatsapp'; import TwilioWhatsappPluginConfig from '~/plugins/twilioWhatsapp';
import TwilioPluginConfig from '~/plugins/twilio'; import TwilioPluginConfig from '~/plugins/twilio';
import S3PluginConfig from '~/plugins/s3'; import S3PluginConfig from '~/plugins/s3';
import MinioPluginConfig from '~/plugins/mino'; import MinioPluginConfig from '~/plugins/minio';
import GcsPluginConfig from '~/plugins/gcs'; import GcsPluginConfig from '~/plugins/gcs';
import MattermostPluginConfig from '~/plugins/mattermost'; import MattermostPluginConfig from '~/plugins/mattermost';
import SpacesPluginConfig from '~/plugins/spaces'; import SpacesPluginConfig from '~/plugins/spaces';
@ -75,11 +75,11 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
currentPlugin.id = pluginConfig.id; currentPlugin.id = pluginConfig.id;
} }
if (pluginConfig.fallbackTitle) { if (pluginConfig.recoveryTitle) {
// get the plugin with old title // get the plugin with old title
const oldPlugin = await ncMeta const oldPlugin = await ncMeta
.knex(MetaTable.PLUGIN) .knex(MetaTable.PLUGIN)
.where('title', pluginConfig.fallbackTitle) .where('title', pluginConfig.recoveryTitle)
.first(); .first();
// if the old plugin is not present then continue // if the old plugin is not present then continue

Loading…
Cancel
Save