@hylid/custom-jsapi 4.0.8 → 4.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/bridge.js CHANGED
@@ -11,7 +11,12 @@ import { getCallAppLink as tossGetCallAppLink } from "./common/toss";
11
11
  import { getCallAppLink as truemoneyGetCallAppLink } from "./common/truemoney";
12
12
  import { getAppScanLink as alipayGetAppScanLink } from "./common/alipay/getAppScanLink";
13
13
  import { getAppScanLink as alipayhkGetAppScanLink } from "./common/alipayhk/getAppScanLink";
14
+ import { getAppScanLink as danaGetAppScanLink } from "./common/dana/getAppScanLink";
15
+ import { getAppScanLink as gcashGetAppScanLink } from "./common/gcash/getAppScanLink";
14
16
  import { getAppScanLink as mpayGetAppScanLink } from "./common/mpay/getAppScanLink";
17
+ import { getAppScanLink as tmnGetAppScanLink } from "./common/truemoney/getAppScanLink";
18
+ import { getAppScanLink as tngdGetAppScanLink } from "./common/tngd/getAppScanLink";
19
+ import { getAppScanLink as tossGetAppScanLink } from "./common/toss/getAppScanLink";
15
20
  import { getGeneralAppInfo as alipayGetGeneralAppInfo } from "./common/alipay/getGeneralAppInfo";
16
21
  import { getGeneralAppInfo as alipayhkGetGeneralAppInfo } from "./common/alipayhk/getGeneralAppInfo";
17
22
  import { getGeneralAppInfo as danaGetGeneralAppInfo } from "./common/dana/getGeneralAppInfo";
@@ -50,10 +55,15 @@ export var getAppScanLink = function getAppScanLink() {
50
55
  }
51
56
  if (clientEnv.isALIPAY) return alipayGetAppScanLink.apply(void 0, args);
52
57
  if (clientEnv.isALIPAYHK) return alipayhkGetAppScanLink.apply(void 0, args);
58
+ if (clientEnv.isDANA) return danaGetAppScanLink.apply(void 0, args);
59
+ if (clientEnv.isGCASH) return gcashGetAppScanLink.apply(void 0, args);
53
60
  if (clientEnv.isMPAY) return mpayGetAppScanLink.apply(void 0, args);
61
+ if (clientEnv.isTRUEMONEY) return tmnGetAppScanLink.apply(void 0, args);
62
+ if (clientEnv.isTNGD) return tngdGetAppScanLink.apply(void 0, args);
63
+ if (clientEnv.isTOSSPAY) return tossGetAppScanLink.apply(void 0, args);
54
64
  return notFound('getAppScanLink');
55
65
  };
56
- export var getAppScanLinkCreator = bySpecificClient((_b = {}, _b[CLIENT.ALIPAY] = alipayGetAppScanLink, _b[CLIENT.ALIPAYHK] = alipayhkGetAppScanLink, _b[CLIENT.MPAY] = mpayGetAppScanLink, _b), function () {
66
+ export var getAppScanLinkCreator = bySpecificClient((_b = {}, _b[CLIENT.ALIPAY] = alipayGetAppScanLink, _b[CLIENT.ALIPAYHK] = alipayhkGetAppScanLink, _b[CLIENT.DANA] = danaGetAppScanLink, _b[CLIENT.GCASH] = gcashGetAppScanLink, _b[CLIENT.MPAY] = mpayGetAppScanLink, _b[CLIENT.TRUEMONEY] = tmnGetAppScanLink, _b[CLIENT.TNGD] = tngdGetAppScanLink, _b[CLIENT.TOSSPAY] = tossGetAppScanLink, _b), function () {
57
67
  return notFound('getAppScanLink');
58
68
  });
59
69
  export var getGeneralAppInfo = function getGeneralAppInfo() {
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from '../../utils/getAppScanLink';
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from "../../utils/getAppScanLink";
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from '../../utils/getAppScanLink';
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from "../../utils/getAppScanLink";
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from '../../utils/getAppScanLink';
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from "../../utils/getAppScanLink";
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from '../../utils/getAppScanLink';
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from "../../utils/getAppScanLink";
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from '../../utils/getAppScanLink';
@@ -0,0 +1 @@
1
+ export { getAppScanLink } from "../../utils/getAppScanLink";
@@ -0,0 +1,2 @@
1
+ import { HyCustomJSAPI } from '@hylid/types';
2
+ export declare const getAppScanLink: HyCustomJSAPI['getAppScanLink'];
@@ -0,0 +1,39 @@
1
+ var __assign = this && this.__assign || function () {
2
+ __assign = Object.assign || function (t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
6
+ }
7
+ return t;
8
+ };
9
+ return __assign.apply(this, arguments);
10
+ };
11
+ import { stringify } from 'qs-es5';
12
+ import { getCallAppPage } from "./getCallAppPage";
13
+ export var getAppScanLink = function getAppScanLink(opt) {
14
+ var _a = opt || {},
15
+ appId = _a.appId,
16
+ query = _a.query,
17
+ debugConfig = _a.debugConfig;
18
+ var params = {
19
+ _ariver_appid: appId,
20
+ // griver android 存在多次解码导致参数丢失,这里多进行一次编码,进行兼容处理
21
+ _ariver_path: getCallAppPage(opt, true)
22
+ };
23
+ if (debugConfig === null || debugConfig === void 0 ? void 0 : debugConfig.version) {
24
+ var token = debugConfig.token,
25
+ version = debugConfig.version;
26
+ params = __assign(__assign({}, params), {
27
+ _ariver_source: 'debug',
28
+ _ariver_scene: 'INSTALL',
29
+ _ariver_version: version,
30
+ _ariver_token: token
31
+ });
32
+ }
33
+ if (query) {
34
+ params = __assign(__assign({}, params), {
35
+ query: stringify(query)
36
+ });
37
+ }
38
+ return 'mini://platformapi/startapp?' + stringify(params);
39
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hylid/custom-jsapi",
3
- "version": "4.0.8",
3
+ "version": "4.0.10",
4
4
  "main": "lib/index.js",
5
5
  "files": [
6
6
  "lib"
@@ -9,9 +9,9 @@
9
9
  "access": "public"
10
10
  },
11
11
  "dependencies": {
12
- "@hylid/call": "^4.0.8",
13
- "@hylid/env": "^4.0.8",
14
- "@hylid/types": "^4.0.8",
12
+ "@hylid/call": "^4.0.10",
13
+ "@hylid/env": "^4.0.10",
14
+ "@hylid/types": "^4.0.10",
15
15
  "qs-es5": "^6.8.4"
16
16
  },
17
17
  "license": "MIT",