@rimori/client 1.1.6 → 1.1.7

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.
@@ -72,6 +72,8 @@ export declare class SharedContentController {
72
72
  * @template T The type of data stored in the content
73
73
  */
74
74
  export interface SharedContent<T> {
75
+ /** The id of the content */
76
+ id: string;
75
77
  /** The type/category of the content (e.g. 'grammar_exercises', 'flashcards', etc.) */
76
78
  contentType: string;
77
79
  /** The human readable title/topic of the content */
@@ -18,12 +18,13 @@ export class StandaloneClient {
18
18
  return __awaiter(this, void 0, void 0, function* () {
19
19
  if (!StandaloneClient.instance) {
20
20
  const config = yield fetch("http://localhost:3000/config.json").then(res => res.json()).catch(err => {
21
- console.error("Error fetching config.json", err);
21
+ console.warn("Error fetching config.json, using default values", err);
22
22
  return {
23
23
  SUPABASE_URL: "https://pheptqdoqsdnadgoihvr.supabase.co",
24
24
  SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBoZXB0cWRvcXNkbmFkZ29paHZyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzE2OTY2ODcsImV4cCI6MjA0NzI3MjY4N30.4GPFAXTF8685FaXISdAPNCIM-H3RGLo8GbyhQpu1mP0",
25
25
  };
26
26
  });
27
+ console.log("config", config);
27
28
  StandaloneClient.instance = new StandaloneClient({ url: config.SUPABASE_URL, key: config.SUPABASE_ANON_KEY });
28
29
  }
29
30
  return StandaloneClient.instance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimori/client",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -255,6 +255,9 @@ export class SharedContentController {
255
255
  * @template T The type of data stored in the content
256
256
  */
257
257
  export interface SharedContent<T> {
258
+ /** The id of the content */
259
+ id: string;
260
+
258
261
  /** The type/category of the content (e.g. 'grammar_exercises', 'flashcards', etc.) */
259
262
  contentType: string;
260
263
 
@@ -19,12 +19,13 @@ export class StandaloneClient {
19
19
  public static async getInstance(): Promise<StandaloneClient> {
20
20
  if (!StandaloneClient.instance) {
21
21
  const config = await fetch("http://localhost:3000/config.json").then(res => res.json()).catch(err => {
22
- console.error("Error fetching config.json", err);
22
+ console.warn("Error fetching config.json, using default values", err);
23
23
  return {
24
24
  SUPABASE_URL: "https://pheptqdoqsdnadgoihvr.supabase.co",
25
25
  SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBoZXB0cWRvcXNkbmFkZ29paHZyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzE2OTY2ODcsImV4cCI6MjA0NzI3MjY4N30.4GPFAXTF8685FaXISdAPNCIM-H3RGLo8GbyhQpu1mP0",
26
26
  }
27
27
  });
28
+ console.log("config", config);
28
29
  StandaloneClient.instance = new StandaloneClient({ url: config.SUPABASE_URL, key: config.SUPABASE_ANON_KEY });
29
30
  }
30
31
  return StandaloneClient.instance;