Skip to content

Commit

Permalink
feat(push): v2
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Apr 20, 2022
1 parent 1b5464d commit 90e93c2
Show file tree
Hide file tree
Showing 44 changed files with 2,826 additions and 893 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ packages/*/packages/mpvue-page-factory
packages/*/packages/mpvue-template-compiler
packages/*/packages/postcss-normalize-whitespace
packages/*/packages/uni-app
packages/*/packages/uni-push
packages/*/packages/uni-stat
packages/*/packages/uni-cloud
packages/*/packages/vue-loader
Expand Down
6 changes: 6 additions & 0 deletions build/rollup.config.mp.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ module.exports = {
entries: [{
find: '@dcloudio',
replacement: path.resolve(__dirname, '../packages')
}, {
find: 'uni-core',
replacement: path.resolve(__dirname, '../src/core')
}, {
find: 'uni-api-protocol',
replacement: path.resolve(__dirname, '../src/core/helpers/protocol')
}, {
find: 'uni-shared/query',
replacement: path.resolve(__dirname, '../src/shared/query.js')
Expand Down
12 changes: 10 additions & 2 deletions lib/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const third = [
'restoreGlobal',
'getSubNVueById',
'getCurrentSubNVue',
'setPageMeta',
'setPageMeta',
'onHostEventReceive',
'onNativeEventReceive',
'sendNativeEvent',
Expand All @@ -257,6 +257,13 @@ const ad = [
'createInteractiveAd'
]

const plugin = [
'invokePushCallback',
'getPushCid',
'onPushMessage',
'offPushMessage',
]

const apis = [
...base,
...network,
Expand All @@ -271,7 +278,8 @@ const apis = [
...file,
...canvas,
...third,
...ad
...ad,
...plugin
]

module.exports = apis
2 changes: 1 addition & 1 deletion packages/uni-app-plus/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ const promiseInterceptor = {
};

const SYNC_API_RE =
/^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale/;
/^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback/;

const CONTEXT_API_RE = /^create|Manager$/;

Expand Down
Loading

0 comments on commit 90e93c2

Please sign in to comment.