Skip to content

Commit 3cb9593

Browse files
committed
Merge branch 'develop' into feature/dashboard-backup
* develop: (93 commits) chore: add no-var rule (#3846) feat: the Risk Warning Dialog (#3833) fix(twitter): tweet selector fails to get link-only tweet content (#3837) chore: cleanup try-catch (#3840) chore: simplify urlcat builder (#3843) fix: parseint radix unset (#3844) chore: improve eslint (#3835) feat: introduce arbitrum network (#3558) fix: show nan in dashboard asset list (#3828) chore: simplify typing (#3825) refactor: revamp redpacket (#3809) feat: enable new dashboard in beat (#3826) fix: eslint (#3823) Update flags.ts (#3824) refactor: add v2_enabled flag (#3820) RFC: new payload v-37 and TypedMessage binary format (#2623) fix: bridge is down (#3821) feat: set experimentalMark on 3 plugins (#3669) fix: snapshot break down (#3814) refactor: compile contracts cli (#3798) ...
2 parents 2dad32d + 6994411 commit 3cb9593

File tree

750 files changed

+33803
-10672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

750 files changed

+33803
-10672
lines changed

.circleci/config.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,9 @@ jobs:
4141
executor: maskbook_node
4242
steps:
4343
- restore_workspace
44-
- run:
45-
name: Install zip
46-
command: sudo apt-get install zip
4744
- run:
4845
name: Build Maskbook
49-
command: npx build-ci
46+
command: npx gulp build-ci
5047
- store_artifacts:
5148
path: Maskbook.base.zip
5249
destination: /Maskbook.base.zip

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"constructor-super": "error",
1313
"dot-notation": "error",
1414
"eqeqeq": "error",
15+
"no-var": "error",
1516
"no-bitwise": "error",
1617
"no-debugger": "error",
1718
"no-eval": "error",

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
restore-keys: |
4444
${{ runner.os }}-webpack-${{ hashFiles('**/pnpm-lock.yaml') }}
4545
- run: npx pnpm install
46-
- run: npx build-ci
46+
- run: npx gulp build-ci
4747
- name: Upload `Maskbook.base.zip`
4848
uses: actions/upload-artifact@v2
4949
with:

.github/workflows/linters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
2929
restore-keys: ${{ runner.os }}-node-
3030
- run: npx pnpm install
31-
- run: npx locale-kit
31+
- run: npx gulp locale-kit
3232
type-check:
3333
runs-on: ubuntu-20.04
3434
steps:
@@ -58,7 +58,7 @@ jobs:
5858
${{ runner.os }}-tsc-${{ hashFiles('packages/**/tsconfig.json') }}-${{ hashFiles('pnpm-lock.yaml') }}
5959
${{ runner.os }}-tsc-${{ hashFiles('packages/**/tsconfig.json') }}
6060
- run: npx pnpm install
61-
- run: npx build -- echo "Check tsc"
61+
- run: npx gulp codegen
6262
eslint:
6363
runs-on: ubuntu-20.04
6464
needs: [prettier, locale-kit, type-check]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ i18n_generated.d.ts.map
2222
# Build out
2323
dist
2424
build
25+
/build-*
2526
storybook-static
2627
packages/netlify/snowpack/
2728
/Maskbook.*.zip

.i18n-codegen.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@
4949
"trans": "Translate",
5050
"sourceMap": "inline"
5151
}
52+
},
53+
{
54+
"input": "./packages/plugins/Wallet/src/locales/en.json",
55+
"output": "./packages/plugins/Wallet/src/locales/i18n_generated",
56+
"parser": "i18next",
57+
"generator": {
58+
"type": "i18next/react-hooks",
59+
"hooks": "useI18N",
60+
"namespace": "com.maskbook.wallet",
61+
"trans": "Translate",
62+
"sourceMap": "inline"
63+
}
5264
}
5365
]
5466
}

.vscode/schema/constants.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,19 @@
1919
"minProperties": 1,
2020
"definitions": {
2121
"chain-id": {
22-
"enum": ["Mainnet", "Ropsten", "Rinkeby", "Gorli", "Kovan", "BSC", "BSCT", "Matic", "Mumbai"]
22+
"enum": [
23+
"Mainnet",
24+
"Ropsten",
25+
"Rinkeby",
26+
"Gorli",
27+
"Kovan",
28+
"BSC",
29+
"BSCT",
30+
"Matic",
31+
"Mumbai",
32+
"Arbitrum",
33+
"Arbitrum_Rinkeby"
34+
]
2335
},
2436
"primitive": {
2537
"type": ["string", "integer", "boolean", "null"]

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"editor.defaultFormatter": "redhat.vscode-yaml"
5454
},
5555
"[markdown]": {
56-
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint",
56+
"editor.defaultFormatter": "esbenp.prettier-vscode",
5757
"editor.wordWrap": "on",
5858
"editor.quickSuggestions": true
5959
}

.vscode/tasks.recommended.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
"tasks": [
66
{
77
"type": "npm",
8-
"script": "ts",
8+
"script": "codegen",
99
"problemMatcher": ["$tsc-watch"],
1010
"label": "Background TypeScript compiler",
11-
"detail": "dev -- echo Starting TypeScript compiler...",
1211
"isBackground": true,
1312
"group": "build",
1413
"presentation": {

docs/plugin-development-guide.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ maintainer:
99

1010
## Minimum File Structure
1111

12+
`packages/plugins/example/src` is an example of this structure.
13+
1214
```plaintext
1315
packages/maskbook/src/plugins/{your-plugin-name}
1416
├── README.md # see `README driven development`
@@ -32,12 +34,20 @@ The file need to provide this information:
3234
- Reference resource list
3335
- Known issues / Caveats
3436

37+
## Registration
38+
39+
Import your plugin definition at: `packages/maskbook/src/plugin-infra/register.ts`.
40+
41+
If your plugin is defined at `packages/plugins/*` instead of `packages/maskbook/src/plugins/*`, please make sure you have set up the monorepo correctly.
42+
43+
Plugins defined at `packages/plugins/*` and compatible with the isolated dashboard should also be registered in `packages/dashboard/src/initialization/plugins.ts`
44+
3545
## Plugin APIs
3646

3747
- Plugin definition: `packages/plugin-infra/src/types.ts`
3848
- Database: `createPluginDatabase` in `packages/maskbook/src/database/Plugin/wrap-plugin-database.ts`
39-
- Event emitter: `createPluginMessage` in `packages/maskbook/src/plugins/utils/createPluginMessage.ts`
40-
- RPC: `createPluginRPC` in `packages/maskbook/src/plugins/utils/createPluginRPC.ts`
49+
- Message emitter: `createPluginMessage` in `packages/plugin-infra/src/utils/message.ts`
50+
- RPC: `createPluginRPC` in `packages/plugin-infra/src/utils/rpc.ts`
4151
- Metadata reader: `createTypedMessageMetadataReader` in `packages/maskbook/src/protocols/typed-message/metadata.ts`
4252
- React renderer with metadata reader: `createRenderWithMetadata` in `packages/maskbook/src/protocols/typed-message/metadata.ts`
4353

0 commit comments

Comments
 (0)