@webiny/app-utils 5.42.0 → 5.42.1-beta.1

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.
@@ -1,7 +1,7 @@
1
1
  import { LoadingRepository } from "./LoadingRepository";
2
2
  export declare class LoadingRepositoryFactory {
3
3
  private cache;
4
- getRepository(): LoadingRepository;
4
+ getRepository(namespace?: string): LoadingRepository;
5
5
  private getCacheKey;
6
6
  }
7
7
  export declare const loadingRepositoryFactory: LoadingRepositoryFactory;
@@ -16,8 +16,8 @@ var LoadingRepositoryFactory = exports.LoadingRepositoryFactory = /*#__PURE__*/f
16
16
  }
17
17
  return (0, _createClass2.default)(LoadingRepositoryFactory, [{
18
18
  key: "getRepository",
19
- value: function getRepository() {
20
- var cacheKey = this.getCacheKey();
19
+ value: function getRepository(namespace) {
20
+ var cacheKey = this.getCacheKey(namespace);
21
21
  if (!this.cache.has(cacheKey)) {
22
22
  this.cache.set(cacheKey, new _LoadingRepository.LoadingRepository());
23
23
  }
@@ -25,8 +25,8 @@ var LoadingRepositoryFactory = exports.LoadingRepositoryFactory = /*#__PURE__*/f
25
25
  }
26
26
  }, {
27
27
  key: "getCacheKey",
28
- value: function getCacheKey() {
29
- return Date.now().toString();
28
+ value: function getCacheKey(namespace) {
29
+ return namespace ?? Date.now().toString();
30
30
  }
31
31
  }]);
32
32
  }();
@@ -1 +1 @@
1
- {"version":3,"names":["_LoadingRepository","require","LoadingRepositoryFactory","exports","_classCallCheck2","default","_defineProperty2","Map","_createClass2","key","value","getRepository","cacheKey","getCacheKey","cache","has","set","LoadingRepository","get","Date","now","toString","loadingRepositoryFactory"],"sources":["LoadingRepositoryFactory.ts"],"sourcesContent":["import { LoadingRepository } from \"./LoadingRepository\";\n\nexport class LoadingRepositoryFactory {\n private cache: Map<string, LoadingRepository> = new Map();\n\n getRepository() {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new LoadingRepository());\n }\n\n return this.cache.get(cacheKey) as LoadingRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const loadingRepositoryFactory = new LoadingRepositoryFactory();\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAAwD,IAE3CC,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA;EAAA,SAAAA,yBAAA;IAAA,IAAAE,gBAAA,CAAAC,OAAA,QAAAH,wBAAA;IAAA,IAAAI,gBAAA,CAAAD,OAAA,iBACe,IAAIE,GAAG,CAAC,CAAC;EAAA;EAAA,WAAAC,aAAA,CAAAH,OAAA,EAAAH,wBAAA;IAAAO,GAAA;IAAAC,KAAA,EAEzD,SAAAC,aAAaA,CAAA,EAAG;MACZ,IAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAAC,CAAC;MAEnC,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,GAAG,CAACH,QAAQ,CAAC,EAAE;QAC3B,IAAI,CAACE,KAAK,CAACE,GAAG,CAACJ,QAAQ,EAAE,IAAIK,oCAAiB,CAAC,CAAC,CAAC;MACrD;MAEA,OAAO,IAAI,CAACH,KAAK,CAACI,GAAG,CAACN,QAAQ,CAAC;IACnC;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAQG,WAAWA,CAAA,EAAG;MAClB,OAAOM,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;IAChC;EAAC;AAAA;AAGE,IAAMC,wBAAwB,GAAAnB,OAAA,CAAAmB,wBAAA,GAAG,IAAIpB,wBAAwB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_LoadingRepository","require","LoadingRepositoryFactory","exports","_classCallCheck2","default","_defineProperty2","Map","_createClass2","key","value","getRepository","namespace","cacheKey","getCacheKey","cache","has","set","LoadingRepository","get","Date","now","toString","loadingRepositoryFactory"],"sources":["LoadingRepositoryFactory.ts"],"sourcesContent":["import { LoadingRepository } from \"./LoadingRepository\";\n\nexport class LoadingRepositoryFactory {\n private cache: Map<string, LoadingRepository> = new Map();\n\n getRepository(namespace?: string) {\n const cacheKey = this.getCacheKey(namespace);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new LoadingRepository());\n }\n\n return this.cache.get(cacheKey) as LoadingRepository;\n }\n\n private getCacheKey(namespace?: string) {\n return namespace ?? Date.now().toString();\n }\n}\n\nexport const loadingRepositoryFactory = new LoadingRepositoryFactory();\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAAwD,IAE3CC,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA;EAAA,SAAAA,yBAAA;IAAA,IAAAE,gBAAA,CAAAC,OAAA,QAAAH,wBAAA;IAAA,IAAAI,gBAAA,CAAAD,OAAA,iBACe,IAAIE,GAAG,CAAC,CAAC;EAAA;EAAA,WAAAC,aAAA,CAAAH,OAAA,EAAAH,wBAAA;IAAAO,GAAA;IAAAC,KAAA,EAEzD,SAAAC,aAAaA,CAACC,SAAkB,EAAE;MAC9B,IAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAACF,SAAS,CAAC;MAE5C,IAAI,CAAC,IAAI,CAACG,KAAK,CAACC,GAAG,CAACH,QAAQ,CAAC,EAAE;QAC3B,IAAI,CAACE,KAAK,CAACE,GAAG,CAACJ,QAAQ,EAAE,IAAIK,oCAAiB,CAAC,CAAC,CAAC;MACrD;MAEA,OAAO,IAAI,CAACH,KAAK,CAACI,GAAG,CAACN,QAAQ,CAAC;IACnC;EAAC;IAAAJ,GAAA;IAAAC,KAAA,EAED,SAAQI,WAAWA,CAACF,SAAkB,EAAE;MACpC,OAAOA,SAAS,IAAIQ,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;IAC7C;EAAC;AAAA;AAGE,IAAMC,wBAAwB,GAAApB,OAAA,CAAAoB,wBAAA,GAAG,IAAIrB,wBAAwB,CAAC,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-utils",
3
- "version": "5.42.0",
3
+ "version": "5.42.1-beta.1",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,12 +10,12 @@
10
10
  "author": "Webiny Ltd.",
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@webiny/utils": "5.42.0",
13
+ "@webiny/utils": "5.42.1-beta.1",
14
14
  "mobx": "6.9.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@webiny/cli": "5.42.0",
18
- "@webiny/project-utils": "5.42.0",
17
+ "@webiny/cli": "5.42.1-beta.1",
18
+ "@webiny/project-utils": "5.42.1-beta.1",
19
19
  "ttypescript": "1.5.15",
20
20
  "typescript": "4.9.5"
21
21
  },
@@ -27,5 +27,5 @@
27
27
  "build": "yarn webiny run build",
28
28
  "watch": "yarn webiny run watch"
29
29
  },
30
- "gitHead": "54553dc380e73678a22e132b20001b1f645b0e93"
30
+ "gitHead": "aa533cb9b24cfcd23c02f4ab64448082723d7dc1"
31
31
  }