glitch-javascript-sdk 0.0.8 → 0.0.9

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.
@@ -0,0 +1,2 @@
1
+ import Config from "./Config";
2
+ export { Config };
@@ -1,4 +1,4 @@
1
- import Config from "./config/Config";
1
+ import { Config } from "./config";
2
2
  import { Auth } from "./api";
3
3
  import { Competitions } from "./api";
4
4
  import { Users } from "./api";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Javascrip SDK for GLitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -19,7 +19,7 @@ class Config {
19
19
  * @param baseUrl The url base endpoint of the api
20
20
  * @param authToken The JSON Web Token
21
21
  */
22
- static setConfig(baseUrl: string, authToken: string, lock? : boolean) {
22
+ public static setConfig(baseUrl: string, authToken: string, lock? : boolean) {
23
23
 
24
24
  this.setBaseUrl(baseUrl, lock);
25
25
 
@@ -35,7 +35,7 @@ class Config {
35
35
  * @param baseUrl The url that connects to the APIs base
36
36
  * @param lock If set to true, will lock the baseUrl so it cannot be changed
37
37
  */
38
- static setBaseUrl(baseUrl: string, lock? : boolean) {
38
+ public static setBaseUrl(baseUrl: string, lock? : boolean) {
39
39
 
40
40
  if(!this._baseUrlLocked) {
41
41
  Config._baseUrl = baseUrl;
@@ -53,7 +53,7 @@ class Config {
53
53
  *
54
54
  * @param authToken The JWT
55
55
  */
56
- static setAuthToken(authToken: string) {
56
+ public static setAuthToken(authToken: string) {
57
57
  Config._authToken = authToken;
58
58
 
59
59
  Requests.setAuthToken(authToken);
@@ -62,14 +62,14 @@ class Config {
62
62
  /**
63
63
  * Gets base url
64
64
  */
65
- static get baseUrl(): string {
65
+ public static get baseUrl(): string {
66
66
  return Config._baseUrl;
67
67
  }
68
68
 
69
69
  /**
70
70
  * Gets auth token
71
71
  */
72
- static get authToken(): string {
72
+ public static get authToken(): string {
73
73
  return Config._authToken;
74
74
  }
75
75
  }
@@ -0,0 +1,3 @@
1
+ import Config from "./Config";
2
+
3
+ export {Config};
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  //Configuration
3
- import Config from "./config/Config";
3
+ import { Config } from "./config";
4
4
 
5
5
  //API
6
6
  import { Auth } from "./api";