@codeimplants/version-control 1.0.4 → 1.0.5
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/dist/sdk.d.ts +2 -2
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +4 -4
- package/package.json +1 -1
- package/src/sdk.ts +4 -4
package/dist/sdk.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VCConfig, VCDecision } from "./types";
|
|
2
2
|
export declare class VersionSDK {
|
|
3
3
|
private config;
|
|
4
|
-
static init(config: VCConfig | string, apiKey?: string): VersionSDK;
|
|
5
|
-
static check(config: VCConfig | string, apiKey?: string): Promise<VCDecision>;
|
|
4
|
+
static init(config: VCConfig | string, apiKey?: string, debug?: boolean): VersionSDK;
|
|
5
|
+
static check(config: VCConfig | string, apiKey?: string, debug?: boolean): Promise<VCDecision>;
|
|
6
6
|
checkVersion(): Promise<VCDecision>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=sdk.d.ts.map
|
package/dist/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAK/C,qBAAa,UAAU;IACnB,OAAO,CAAC,MAAM,CAAY;IAE1B,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAK/C,qBAAa,UAAU;IACnB,OAAO,CAAC,MAAM,CAAY;IAE1B,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;WAc1D,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;IAI9F,YAAY,IAAI,OAAO,CAAC,UAAU,CAAC;CAsD5C"}
|
package/dist/sdk.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { fetchRules } from "./client";
|
|
2
2
|
import { detectAppId, detectPlatform, detectVersion } from "./detector";
|
|
3
3
|
export class VersionSDK {
|
|
4
|
-
static init(config, apiKey) {
|
|
4
|
+
static init(config, apiKey, debug) {
|
|
5
5
|
const sdk = new VersionSDK();
|
|
6
6
|
if (typeof config === "string") {
|
|
7
7
|
sdk.config = {
|
|
8
8
|
backendUrl: config,
|
|
9
9
|
apiKey: apiKey,
|
|
10
|
-
debug:
|
|
10
|
+
debug: debug
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
@@ -15,8 +15,8 @@ export class VersionSDK {
|
|
|
15
15
|
}
|
|
16
16
|
return sdk;
|
|
17
17
|
}
|
|
18
|
-
static async check(config, apiKey) {
|
|
19
|
-
return VersionSDK.init(config, apiKey).checkVersion();
|
|
18
|
+
static async check(config, apiKey, debug) {
|
|
19
|
+
return VersionSDK.init(config, apiKey, debug).checkVersion();
|
|
20
20
|
}
|
|
21
21
|
async checkVersion() {
|
|
22
22
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeimplants/version-control",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "A lightweight cross-platform SDK to remotely control app version behavior such as soft update, force update, and maintenance mode using backend-driven rules, without enforcing UI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"version-control",
|
package/src/sdk.ts
CHANGED
|
@@ -6,13 +6,13 @@ import { detectAppId, detectPlatform, detectVersion } from "./detector";
|
|
|
6
6
|
export class VersionSDK {
|
|
7
7
|
private config!: VCConfig;
|
|
8
8
|
|
|
9
|
-
static init(config: VCConfig | string, apiKey?: string) {
|
|
9
|
+
static init(config: VCConfig | string, apiKey?: string, debug?: boolean) {
|
|
10
10
|
const sdk = new VersionSDK();
|
|
11
11
|
if (typeof config === "string") {
|
|
12
12
|
sdk.config = {
|
|
13
13
|
backendUrl: config,
|
|
14
14
|
apiKey: apiKey,
|
|
15
|
-
debug:
|
|
15
|
+
debug: debug
|
|
16
16
|
};
|
|
17
17
|
} else {
|
|
18
18
|
sdk.config = config;
|
|
@@ -20,8 +20,8 @@ export class VersionSDK {
|
|
|
20
20
|
return sdk;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
static async check(config: VCConfig | string, apiKey?: string): Promise<VCDecision> {
|
|
24
|
-
return VersionSDK.init(config, apiKey).checkVersion();
|
|
23
|
+
static async check(config: VCConfig | string, apiKey?: string, debug?: boolean): Promise<VCDecision> {
|
|
24
|
+
return VersionSDK.init(config, apiKey, debug).checkVersion();
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
async checkVersion(): Promise<VCDecision> {
|