Browse Source

refactor: plugin path correction

pull/9894/head
Pranav C 18 hours 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 LinodePluginConfig from '~/plugins/linode';
import MattermostPluginConfig from '~/plugins/mattermost';
import MinioPluginConfig from '~/plugins/mino';
import MinioPluginConfig from '~/plugins/minio';
import OvhCloudPluginConfig from '~/plugins/ovhCloud';
import S3PluginConfig from '~/plugins/s3';
import ScalewayPluginConfig from '~/plugins/scaleway';

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

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

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

@ -5,7 +5,7 @@ import type { XcPluginConfig } from '~/types/nc-plugin';
const config: XcPluginConfig = {
builder: LinodeObjectStoragePlugin,
id: 'linode',
fallbackTitle: 'Linode Object Storage',
recoveryTitle: 'Linode Object Storage',
title: 'Linode',
version: '0.0.4',
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,
id: 'ovh',
title: 'Ovh',
fallbackTitle: 'OvhCloud Object Storage',
recoveryTitle: 'OvhCloud Object Storage',
version: '0.0.4',
logo: 'plugins/ovhCloud.png',
tags: 'Storage',

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save