-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
baron-chain
committed
May 2, 2024
0 parents
commit cf8c6c9
Showing
5,781 changed files
with
519,874 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# i18n | ||
LOKALISE_TOKEN= | ||
LOKALISE_PROJECT_ID= | ||
|
||
# for desktop sign & notarize | ||
GH_TOKEN= | ||
APPLEID= | ||
APPLEIDPASS= | ||
ASC_PROVIDER= | ||
|
||
# for ext | ||
EXT_INJECT_RELOAD_BUTTON= | ||
EXT_INJECT_MODE= | ||
|
||
# for hardware-js-sdk iframe src | ||
HARDWARE_SDK_CONNECT_SRC= | ||
|
||
# runtime: sentry | ||
WEB_SENTRY_DSN= | ||
DESKTOP_SENTRY_DSN= | ||
NATIVE_SENTRY_DSN= | ||
EXT_SENTRY_DSN= | ||
|
||
# runtime: covanlant API token | ||
COVALENT_KEY= | ||
# Jpush | ||
JPUSH_KEY= | ||
JPUSH_CHANNEL= | ||
# Will auto add and inject variable at CI job.Must give an empty line at end of this file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# DO NOT add any env here, this file is for CI write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# VERSION: https://semver.org/ | ||
|
||
VERSION=4.24.0 | ||
|
||
# Will auto add BUILD_NUMBER variable at native CI job.Must give an empty line at end of this file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
const isDev = process.env.NODE_ENV !== 'production'; | ||
const jsRules = { | ||
// eslint-disable-next-line global-require | ||
'prettier/prettier': ['error', require('./.prettierrc.js')], | ||
'no-unused-vars': 'off', | ||
'no-use-before-define': 'off', | ||
'no-shadow': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'no-restricted-exports': 'off', | ||
'func-names': 'off', | ||
'class-methods-use-this': 'off', | ||
'import/extensions': 'off', | ||
'react/function-component-definition': 'off', | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/no-unused-prop-types': 'off', | ||
'react/no-unstable-nested-components': 'warn', | ||
'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }], | ||
'react-hooks/exhaustive-deps': [ | ||
'warn', | ||
{ | ||
'additionalHooks': '(usePromiseResult|useAsyncCall)', | ||
}, | ||
], | ||
'global-require': 'off', | ||
'import/no-unresolved': 'off', // tsc can check this | ||
'no-promise-executor-return': 'off', | ||
'default-param-last': 'off', | ||
'import/no-cycle': 'error', | ||
// 'no-console': [isDev ? 'warn' : 'off'], | ||
}; | ||
const tsRules = { | ||
'@typescript-eslint/default-param-last': 'off', | ||
'@typescript-eslint/consistent-type-imports': [ | ||
'error', | ||
{ disallowTypeAnnotations: false }, | ||
], | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/no-unused-vars': [isDev ? 'warn' : 'error'], | ||
'@typescript-eslint/no-use-before-define': ['error'], | ||
'@typescript-eslint/no-shadow': ['error'], | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'sort-imports': [ | ||
'error', | ||
{ | ||
'ignoreMemberSort': false, | ||
'ignoreDeclarationSort': true, | ||
}, | ||
], | ||
'import/order': [ | ||
'warn', | ||
{ | ||
'groups': [ | ||
'builtin', | ||
'internal', | ||
'index', | ||
'external', | ||
'parent', | ||
'sibling', | ||
'object', | ||
'type', | ||
], | ||
'pathGroups': [ | ||
{ | ||
'pattern': 'react', | ||
'group': 'builtin', | ||
'position': 'before', | ||
}, | ||
{ | ||
'pattern': '@onekeyhq/**', | ||
'group': 'external', | ||
'position': 'after', | ||
}, | ||
], | ||
'alphabetize': { | ||
'order': 'asc', | ||
'caseInsensitive': true, | ||
}, | ||
'newlines-between': 'always', | ||
'pathGroupsExcludedImportTypes': ['builtin'], | ||
'warnOnUnassignedImports': true, | ||
}, | ||
], | ||
'no-restricted-syntax': [ | ||
'error', | ||
{ | ||
selector: | ||
"ImportDeclaration[source.value='react'][specifiers.0.type='ImportDefaultSpecifier']", | ||
message: 'Default React import not allowed', | ||
}, | ||
], | ||
}; | ||
module.exports = { | ||
ignorePatterns: [ | ||
'packages/components/src/Icon/*', | ||
'packages/desktop/public/static/js-sdk/*', | ||
], | ||
env: { | ||
browser: true, | ||
es6: true, | ||
webextensions: true, | ||
serviceworker: true, | ||
worker: true, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.js', '*.jsx', '*.text-js'], | ||
extends: ['wesbos'], | ||
rules: { | ||
...jsRules, | ||
}, | ||
}, | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
extends: ['wesbos/typescript'], | ||
rules: { | ||
...jsRules, | ||
...tsRules, | ||
}, | ||
}, | ||
// test files rules must be at LAST | ||
{ | ||
files: ['test/**/*.js', 'test/**/*.ts', '**/*.test.ts'], | ||
extends: ['plugin:jest/recommended'], | ||
env: { | ||
jest: true, | ||
}, | ||
rules: { | ||
'jest/expect-expect': 'off', | ||
'jest/no-disabled-tests': 'off', | ||
'jest/no-conditional-expect': 'off', | ||
'jest/valid-title': 'off', | ||
'jest/no-interpolation-in-snapshots': 'off', | ||
'jest/no-export': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @ezailWang @loatheb @sidmorizon @originalix @huhuanming |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG]:" | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Prerequisites** | ||
Please answer the following questions for yourself before submitting an issue. **YOU MAY DELETE THE PREREQUISITES SECTION.** | ||
|
||
- [ ] I checked to make sure that this issue has not already been filed | ||
- [ ] I've asked for help in the [OneKey Discord](https://discord.com/invite/onekey) before filing this issue. | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "[Feature]" | ||
labels: feature request | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Community & Quick support** | ||
|
||
- [Community Forum](https://github.com/orgs/OneKeyHQ/discussions). Best for: help with building, discussion about best practices. | ||
- [Discord](https://discord.gg/onekey). Best for: sharing your ideas and hanging out with the community. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
name: bundlediff-ios | ||
|
||
on: | ||
pull_request: | ||
branches: [onekey] | ||
|
||
# Cancel a currently running workflow from the same PR/branch/tag | ||
# when a new workflow is triggered | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# Build current and upload stats.json | ||
# You may replace this with your own build method. All that | ||
# is required is that the stats.json be an artifact | ||
build-ios-head: | ||
name: 'Build ios head' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
|
||
- name: Setup Node.js v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
registry-url: 'https://npm.pkg.github.com' | ||
always-auth: true | ||
scope: '@onekeyhq' | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v3 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Dependency | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_OPTIONS: '--max_old_space_size=4096' | ||
run: | | ||
yarn | ||
- name: Generate stats.json | ||
env: | ||
NODE_OPTIONS: '--max_old_space_size=4096' | ||
run: yarn stats:ios | ||
|
||
- name: Upload stats.json | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: head-stats | ||
path: ./packages/app/stats.json | ||
|
||
# Build base for comparison and upload stats.json | ||
# You may replace this with your own build method. All that | ||
# is required is that the stats.json be an artifact | ||
build-ios-base: | ||
name: 'Build ios base' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.base_ref }} | ||
|
||
- name: Setup Node.js v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
registry-url: 'https://npm.pkg.github.com' | ||
always-auth: true | ||
scope: '@onekeyhq' | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/cache@v3 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Dependency | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_OPTIONS: '--max_old_space_size=4096' | ||
run: | | ||
yarn | ||
- name: Generate stats.json | ||
env: | ||
NODE_OPTIONS: '--max_old_space_size=4096' | ||
run: yarn stats:ios | ||
|
||
- name: Upload stats.json | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: base-stats | ||
path: ./packages/app/stats.json | ||
|
||
# run the action against the stats.json files | ||
compare: | ||
name: 'Compare base & head bundle sizes' | ||
runs-on: ubuntu-latest | ||
needs: [build-ios-base, build-ios-head] | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
|
||
- uses: github/[email protected] | ||
with: | ||
title: 'ios bundle diff' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
current-stats-json-path: ./head-stats/stats.json | ||
base-stats-json-path: ./base-stats/stats.json |
Oops, something went wrong.