@or-sdk/store 0.24.0 → 0.24.1-beta.549.0
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/README.md +21 -0
- package/dist/cjs/Store.js.map +1 -1
- package/dist/esm/Store.js.map +1 -1
- package/dist/types/Store.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/Store.ts +1 -12
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Installation:
|
|
2
|
+
```
|
|
3
|
+
$ npm i @or-sdk/store
|
|
4
|
+
```
|
|
5
|
+
|
|
6
|
+
## Usage:
|
|
7
|
+
```typescript
|
|
8
|
+
import { Store } from '@or-sdk/store'
|
|
9
|
+
|
|
10
|
+
// with direct api url
|
|
11
|
+
const store = new Store({
|
|
12
|
+
token: 'my-account-token-string',
|
|
13
|
+
storeUrl: 'http://example.store/endpoint'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// with service discovery(slower)
|
|
17
|
+
const store = new Store({
|
|
18
|
+
token: 'my-account-token-string',
|
|
19
|
+
discoveryUrl: 'http://example.store/endpoint'
|
|
20
|
+
});
|
|
21
|
+
```
|
package/dist/cjs/Store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,yCAA0C;
|
|
1
|
+
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,yCAA0C;AAE1C;IAA2B,yBAAI;IAG7B,eAAY,MAAmB;QAA/B,iBAWC;QAVS,IAAA,KAAK,GAA0C,MAAM,MAAhD,EAAE,YAAY,GAA4B,MAAM,aAAlC,EAAE,WAAW,GAAe,MAAM,YAArB,EAAE,QAAQ,GAAK,MAAM,SAAX,CAAY;gBAE9D,kBAAM;YACJ,YAAY,cAAA;YACZ,KAAK,OAAA;YACL,UAAU,EAAE,uBAAW;YACvB,UAAU,EAAE,QAAQ;SACrB,CAAC;QAEF,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;IACjC,CAAC;IAQY,oCAAoB,GAAjC,UAAkC,OAAkB;;;gBAClD,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,MAAM,EAAE,MAAM;wBACd,KAAK,EAAE,2BAAoB,IAAI,CAAC,WAAW,iBAAO,OAAO,CAAC,EAAE,sBAAY,OAAO,CAAC,OAAO,CAAE;wBACzF,IAAI,EAAE,OAAO;qBACd,CAAC,EAAC;;;KACJ;IACH,YAAC;AAAD,CAAC,AA7BD,CAA2B,WAAI,GA6B9B;AA7BY,sBAAK"}
|
package/dist/esm/Store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,OAAO,KAAM,SAAQ,IAAI;IAG7B,YAAY,MAAmB;QAC7B,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAE9D,KAAK,CAAC;YACJ,YAAY;YACZ,KAAK;YACL,UAAU,EAAE,WAAW;YACvB,UAAU,EAAE,QAAQ;SACrB,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAQY,oBAAoB,CAAC,OAAkB;;YAClD,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE,oBAAoB,IAAI,CAAC,WAAW,OAAO,OAAO,CAAC,EAAE,YAAY,OAAO,CAAC,OAAO,EAAE;gBACzF,IAAI,EAAE,OAAO;aACd,CAAC,CAAC;QACL,CAAC;KAAA;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGpE,qBAAa,KAAM,SAAQ,IAAI;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,MAAM,EAAE,WAAW;IAmBlB,oBAAoB,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAOlF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/store",
|
|
3
|
-
"version": "0.24.0",
|
|
3
|
+
"version": "0.24.1-beta.549.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -25,6 +25,5 @@
|
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
|
-
}
|
|
29
|
-
"gitHead": "2359a0fc3850132af47bd9e0766b62185e66c986"
|
|
28
|
+
}
|
|
30
29
|
}
|
package/src/Store.ts
CHANGED
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
import { Base } from '@or-sdk/base';
|
|
2
2
|
import { StoreConfig, GetParams, UploadCredentials } from './types';
|
|
3
3
|
import { SERVICE_KEY } from './constants';
|
|
4
|
-
|
|
5
|
-
* Store client
|
|
6
|
-
* ## Installation:
|
|
7
|
-
* ```
|
|
8
|
-
* $ npm i @or-sdk/store
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
4
|
+
|
|
11
5
|
export class Store extends Base {
|
|
12
6
|
private readonly packageType: string;
|
|
13
7
|
|
|
14
|
-
/**
|
|
15
|
-
* ```typescript
|
|
16
|
-
* const storeApi = new Store({token: 'my-account-token-string'});
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
8
|
constructor(params: StoreConfig) {
|
|
20
9
|
const { token, discoveryUrl, packageType, storeUrl } = params;
|
|
21
10
|
|