@ray-js/api 1.5.2 → 1.5.4

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.
@@ -3,11 +3,12 @@ type Opts = {
3
3
  deprecated?: boolean;
4
4
  namespace?: string;
5
5
  };
6
+ export declare function createFactory(kitName: string): (name: string, opts?: Opts) => any;
6
7
  export declare function factory(name: string, opts?: Opts): (option: {
7
8
  key: string;
8
9
  data?: any;
9
10
  }) => any;
10
- export declare function factoryContants(name: string, opts?: Opts): any;
11
+ export declare function factoryConstants(name: string, opts?: Opts): any;
11
12
  export declare const parseUrl: (url: string) => import("query-string").ParsedUrl;
12
13
  export declare const stringifyUrl: (object: UrlObject) => string;
13
14
  export {};
@@ -1,6 +1,13 @@
1
1
  // @ts-ignore
2
2
  import * as tyWx from '@ray-js/wechat';
3
3
  import { stringifyUrl as _stringifyUrl, parseUrl as _parseUrl } from 'query-string';
4
+ export function createFactory() {
5
+ var _this = this;
6
+ return function (name) {
7
+ let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8
+ return factory.call(_this, name, opts);
9
+ };
10
+ }
4
11
  export function factory(name) {
5
12
  let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6
13
  if (/(set|get|remove|clear)+Storage(Sync)?$/.test(name)) {
@@ -28,7 +35,7 @@ export function factory(name) {
28
35
  return wx[name].apply(this, arguments);
29
36
  };
30
37
  }
31
- export function factoryContants(name) {
38
+ export function factoryConstants(name) {
32
39
  let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
33
40
  if (opts.deprecated) {
34
41
  console.warn("\u8BE5\u53D8\u91CF ".concat(name, " \u5DF2\u5F03\u7528"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,14 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.5.2",
33
- "@ray-js/router": "1.5.2",
32
+ "@ray-js/framework": "1.5.4",
33
+ "@ray-js/router": "1.5.4",
34
34
  "@ray-js/wechat": "^0.2.9",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.5.2",
39
+ "@ray-js/cli": "1.5.4",
40
40
  "art-template": "^4.13.2",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.2",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org"
48
48
  },
49
- "gitHead": "c0c81b8edb75aa8c919e3b6503622b66166d81bd"
49
+ "gitHead": "4c6d2df39c428c48f7b04018df0359b5ecdc4c04"
50
50
  }