Skip to content

Commit

Permalink
refactor: remove mask io (#10527)
Browse files Browse the repository at this point in the history
* refactor: DEFAULT_PLUGIN_PUBLISHER

* fix: typo
  • Loading branch information
guanbinrui committed Aug 21, 2023
1 parent e213d7a commit f62325b
Show file tree
Hide file tree
Showing 28 changed files with 56 additions and 48 deletions.
10 changes: 0 additions & 10 deletions packages/plugin-infra/src/utils/subscription.ts

This file was deleted.

4 changes: 2 additions & 2 deletions packages/plugins/Approval/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { NetworkPluginID } from '@masknet/shared-base'
import { DEFAULT_PLUGIN_PUBLISHER, NetworkPluginID } from '@masknet/shared-base'
import { ChainId } from '@masknet/web3-shared-evm'
import { ApprovalPluginID } from './constants.js'
import { languages } from './locales/languages.js'
Expand All @@ -10,7 +10,7 @@ export const base: Plugin.Shared.Definition = {
description: {
fallback: '',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: {
type: 'opt-out',
Expand Down
5 changes: 3 additions & 2 deletions packages/plugins/Avatar/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { type Plugin, SiteAdaptor } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { PLUGIN_ID } from './constants.js'
import { languages } from './locales/languages.js'
import { type Plugin, SiteAdaptor } from '@masknet/plugin-infra'

export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: 'Avatar' },
description: {
fallback: 'NFT Avatar.',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: {
type: 'opt-in',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/Collectible/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { PLUGIN_DESCRIPTION, PLUGIN_ID, PLUGIN_NAME } from './constants.js'
import { languages } from './locales/languages.js'

export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/CrossChainBridge/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { PLUGIN_DESCRIPTION, PLUGIN_ID, PLUGIN_NAME } from './constants.js'
import { languages } from './locales/languages.js'

export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/CyberConnect/src/base.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { CYBERCONNECT_PLUGIN_ID } from './constants.js'
import { languages } from './locales/languages.js'

Expand All @@ -8,7 +9,7 @@ export const base: Plugin.Shared.Definition = {
description: {
fallback: 'A plugin for https://cyberconnect.me/',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/Debugger/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { PLUGIN_DESCRIPTION, PLUGIN_ID, PLUGIN_NAME } from './constants.js'
import { languages } from './locales/languages.js'

export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'insider',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/EVM/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import {
CHAIN_DESCRIPTORS,
type ChainId,
Expand All @@ -15,7 +16,7 @@ export const base: Plugin.Shared.Definition<ChainId, SchemaType, ProviderType, N
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/Example/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { PLUGIN_DESCRIPTION, PLUGIN_ID, PLUGIN_NAME } from './constants.js'
import { languages } from './locales/languages.js'

export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'insider',
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/External/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { Plugin } from '@masknet/plugin-infra'
import { PluginID } from '@masknet/shared-base'
import { PluginID, DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { Flags } from '@masknet/flags'
import { languages } from './locales/languages.js'

export const base: Plugin.Shared.Definition = {
ID: PluginID.External,
name: { fallback: 'Mask External Plugin Loader' },
description: { fallback: 'Able to load external plugins.' },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: Flags.mask_SDK_ready ? 'stable' : 'insider',
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/FileService/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { PluginID } from '@masknet/shared-base'
import { DEFAULT_PLUGIN_PUBLISHER, PluginID } from '@masknet/shared-base'
import { languages } from './locales/languages.js'
import { META_KEY_1, META_KEY_2 } from './constants.js'

Expand All @@ -9,7 +9,7 @@ export const base: Plugin.Shared.Definition = {
description: {
fallback: 'Upload and share files on top of Arweave network. Store data, permanently.',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/Flow/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import {
CHAIN_DESCRIPTORS,
type ChainId,
Expand All @@ -15,7 +16,7 @@ export const base: Plugin.Shared.Definition<ChainId, SchemaType, ProviderType, N
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/Gitcoin/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { PLUGIN_ID, PLUGIN_NAME, PLUGIN_DESCRIPTION } from './constants.js'
import { languages } from './locales/languages.js'

export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/GoPlusSecurity/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { PLUGIN_DESCRIPTION, PLUGIN_ID, PLUGIN_NAME } from './constants.js'
import { languages } from './locales/languages.js'

export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/Handle/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { NetworkPluginID, PluginID } from '@masknet/shared-base'
import { DEFAULT_PLUGIN_PUBLISHER, NetworkPluginID, PluginID } from '@masknet/shared-base'
import { ChainId } from '@masknet/web3-shared-evm'
import { languages } from './locales/languages.js'

Expand All @@ -9,7 +9,7 @@ export const base: Plugin.Shared.Definition = {
description: {
fallback: '',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: {
type: 'opt-out',
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/ITO/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { NetworkPluginID } from '@masknet/shared-base'
import { DEFAULT_PLUGIN_PUBLISHER, NetworkPluginID } from '@masknet/shared-base'
import { ChainId } from '@masknet/web3-shared-evm'
import { ITO_MetaKey_1, ITO_MetaKey_2, ITO_PluginID } from './constants.js'
import { languages } from './locales/languages.js'
Expand All @@ -10,7 +10,7 @@ export const base: Plugin.Shared.Definition = {
description: {
fallback: 'Participate in Public Offering on Twitter.',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: {
type: 'opt-out',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/MaskBox/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { languages } from './locales/languages.js'
import { PLUGIN_ID } from './constants.js'

export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: 'MaskBox' },
description: { fallback: 'The mystery box with NFT inside which is provided by Mask Network.' },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/NextID/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SiteAdaptor, type Plugin } from '@masknet/plugin-infra'
import { NetworkPluginID } from '@masknet/shared-base'
import { DEFAULT_PLUGIN_PUBLISHER, NetworkPluginID } from '@masknet/shared-base'
import { ChainId } from '@masknet/web3-shared-evm'
import { PLUGIN_DESCRIPTION, PLUGIN_ID, PLUGIN_NAME } from './constants.js'
import { languages } from './locales/languages.js'
Expand All @@ -8,7 +8,7 @@ export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: {
type: 'opt-in',
Expand Down
5 changes: 3 additions & 2 deletions packages/plugins/ProfileCard/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { type Plugin, SiteAdaptor } from '@masknet/plugin-infra'
import { PLUGIN_ID } from './constants.js'
import { languages } from './locales/languages.js'
import { type Plugin, SiteAdaptor } from '@masknet/plugin-infra'

export const base: Plugin.Shared.Definition = {
ID: PLUGIN_ID,
name: { fallback: 'Web3 Profile Card' },
description: {
fallback: 'Web3 Profile Card on social account avatar.',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: {
type: 'opt-in',
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/RedPacket/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { NetworkPluginID } from '@masknet/shared-base'
import { DEFAULT_PLUGIN_PUBLISHER, NetworkPluginID } from '@masknet/shared-base'
import { ChainId } from '@masknet/web3-shared-evm'
import { RedPacketMetaKey, RedPacketNftMetaKey, RedPacketPluginID } from './constants.js'
import { languages } from './locales/languages.js'
Expand All @@ -11,7 +11,7 @@ export const base: Plugin.Shared.Definition = {
fallback:
'Lucky drop is a special feature in Mask Network which was launched in early 2020. Once users have installed the Chrome/Firefox plugin, they can claim and give out cryptocurrencies on Twitter.',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: {
type: 'opt-out',
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/Savings/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { NetworkPluginID } from '@masknet/shared-base'
import { NetworkPluginID, DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { ChainId } from '@masknet/web3-shared-evm'
import { SAVINGS_PLUGIN_ID } from './constants.js'
import { languages } from './locales/languages.js'
Expand All @@ -10,7 +10,7 @@ export const base: Plugin.Shared.Definition = {
description: {
fallback: 'A plugin for Savings',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: {
type: 'opt-out',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/Snapshot/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { SNAPSHOT_PLUGIN_ID } from './constants.js'
import { languages } from './locales/languages.js'

Expand All @@ -8,7 +9,7 @@ export const base: Plugin.Shared.Definition = {
description: {
fallback: 'A plugin for https://snapshot.org/',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/Solana/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import {
CHAIN_DESCRIPTORS,
type ChainId,
Expand All @@ -15,7 +16,7 @@ export const base: Plugin.Shared.Definition<ChainId, SchemaType, ProviderType, N
ID: PLUGIN_ID,
name: { fallback: PLUGIN_NAME },
description: { fallback: PLUGIN_DESCRIPTION },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/Tips/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SiteAdaptor, type Plugin } from '@masknet/plugin-infra'
import { PluginID, NetworkPluginID } from '@masknet/shared-base'
import { PluginID, NetworkPluginID, DEFAULT_PLUGIN_PUBLISHER } from '@masknet/shared-base'
import { ChainId } from '@masknet/web3-shared-evm'
import { languages } from './locales/languages.js'

Expand All @@ -9,7 +9,7 @@ export const base: Plugin.Shared.Definition = {
description: {
fallback: 'Tips Entrance',
},
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: {
type: 'opt-out',
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/Trader/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Plugin } from '@masknet/plugin-infra'
import { NetworkPluginID } from '@masknet/shared-base'
import { DEFAULT_PLUGIN_PUBLISHER, NetworkPluginID } from '@masknet/shared-base'
import { ChainId } from '@masknet/web3-shared-evm'
import { PLUGIN_ID } from './constants/index.js'
import { languages } from './locales/languages.js'
Expand All @@ -8,7 +8,7 @@ export const base: Plugin.Shared.Definition<ChainId> = {
ID: PLUGIN_ID,
name: { fallback: 'Trader' },
description: { fallback: 'View trending of cryptocurrencies, swap ERC20 tokens in various DEX markets.' },
publisher: { name: { fallback: 'Mask Network' }, link: 'https://mask.io/' },
publisher: DEFAULT_PLUGIN_PUBLISHER,
enableRequirement: {
supports: { type: 'opt-out', sites: {} },
target: 'stable',
Expand Down

0 comments on commit f62325b

Please sign in to comment.