indobase-js 1.0.1 → 1.0.3

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/index.cjs CHANGED
@@ -15,23 +15,35 @@ var __copyProps = (to, from, except, desc) => {
15
15
  }
16
16
  return to;
17
17
  };
18
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
19
 
21
20
  // src/index.ts
22
21
  var index_exports = {};
23
22
  __export(index_exports, {
24
23
  PACKAGE_NAME: () => PACKAGE_NAME,
25
- SDK_VERSION: () => SDK_VERSION
24
+ SDK_VERSION: () => SDK_VERSION,
25
+ createIndobaseClient: () => createIndobaseClient
26
26
  });
27
27
  module.exports = __toCommonJS(index_exports);
28
- __reExport(index_exports, require("@indobase/indobase-js"), module.exports);
29
- var SDK_VERSION = "1.0.0";
30
- var PACKAGE_NAME = "@indobase/js";
28
+
29
+ // src/client.ts
30
+ function createIndobaseClient(url, apiKey) {
31
+ return {
32
+ url,
33
+ apiKey,
34
+ connect() {
35
+ console.log("Connected to Indobase:", url);
36
+ }
37
+ };
38
+ }
39
+
40
+ // src/index.ts
41
+ var SDK_VERSION = "1.0.2";
42
+ var PACKAGE_NAME = "indobase-js";
31
43
  // Annotate the CommonJS export names for ESM import in node:
32
44
  0 && (module.exports = {
33
45
  PACKAGE_NAME,
34
46
  SDK_VERSION,
35
- ...require("@indobase/indobase-js")
47
+ createIndobaseClient
36
48
  });
37
49
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Main SDK entry point for @indobase/js\r\n//\r\n// This SDK wraps the core @indobase packages:\r\n// - @indobase/auth-js - Authentication\r\n// - @indobase/postgrest-js - Database queries\r\n// - @indobase/functions-js - Edge functions\r\n// - @indobase/realtime-js - Real-time subscriptions\r\n// - @indobase/storage-js - Storage\r\n//\r\n// Usage:\r\n// import { createIndobaseClient } from '@indobase/js'\r\n// const client = createIndobaseClient('https://your-project.indobase.co', 'your-api-key')\r\n//\r\n// For type definitions, the types are re-exported from the core packages.\r\n\r\n// Re-export the main client creator\r\n// The actual implementation is in @indobase/indobase-js which must be built first\r\nimport type { IndobaseClientOptions, QueryResult, QueryData, QueryError } from './types'\r\n\r\nexport type {\r\n IndobaseClientOptions,\r\n QueryResult,\r\n QueryData,\r\n QueryError\r\n}\r\n\r\nexport * from '@indobase/indobase-js'\r\n\r\n// Version info\r\nexport const SDK_VERSION = '1.0.0'\r\nexport const PACKAGE_NAME = '@indobase/js'\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BA,0BAAc,kCA1Bd;AA6BO,IAAM,cAAc;AACpB,IAAM,eAAe;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/client.ts"],"sourcesContent":["import type { IndobaseClientOptions, QueryResult, QueryData, QueryError } from './types'\r\n\r\nexport type {\r\n IndobaseClientOptions,\r\n QueryResult,\r\n QueryData,\r\n QueryError\r\n}\r\n\r\nexport * from './client'\r\n\r\nexport const SDK_VERSION = '1.0.2'\r\nexport const PACKAGE_NAME = 'indobase-js'","export function createIndobaseClient(url: string, apiKey: string) {\r\n return {\r\n url,\r\n apiKey,\r\n connect() {\r\n console.log(\"Connected to Indobase:\", url)\r\n }\r\n }\r\n }"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,SAAS,qBAAqB,KAAa,QAAgB;AAC9D,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,UAAU;AACR,cAAQ,IAAI,0BAA0B,GAAG;AAAA,IAC3C;AAAA,EACF;AACF;;;ADGK,IAAM,cAAc;AACpB,IAAM,eAAe;","names":[]}
package/dist/index.d.cts CHANGED
@@ -1,5 +1,3 @@
1
- export * from '@indobase/indobase-js';
2
-
3
1
  interface IndobaseClientOptions<SchemaName extends string = 'public'> {
4
2
  auth?: {
5
3
  persistSession?: boolean;
@@ -42,7 +40,13 @@ interface QueryError {
42
40
  code: string;
43
41
  }
44
42
 
45
- declare const SDK_VERSION = "1.0.0";
46
- declare const PACKAGE_NAME = "@indobase/js";
43
+ declare function createIndobaseClient(url: string, apiKey: string): {
44
+ url: string;
45
+ apiKey: string;
46
+ connect(): void;
47
+ };
48
+
49
+ declare const SDK_VERSION = "1.0.2";
50
+ declare const PACKAGE_NAME = "indobase-js";
47
51
 
48
- export { type IndobaseClientOptions, PACKAGE_NAME, type QueryData, type QueryError, type QueryResult, SDK_VERSION };
52
+ export { type IndobaseClientOptions, PACKAGE_NAME, type QueryData, type QueryError, type QueryResult, SDK_VERSION, createIndobaseClient };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- export * from '@indobase/indobase-js';
2
-
3
1
  interface IndobaseClientOptions<SchemaName extends string = 'public'> {
4
2
  auth?: {
5
3
  persistSession?: boolean;
@@ -42,7 +40,13 @@ interface QueryError {
42
40
  code: string;
43
41
  }
44
42
 
45
- declare const SDK_VERSION = "1.0.0";
46
- declare const PACKAGE_NAME = "@indobase/js";
43
+ declare function createIndobaseClient(url: string, apiKey: string): {
44
+ url: string;
45
+ apiKey: string;
46
+ connect(): void;
47
+ };
48
+
49
+ declare const SDK_VERSION = "1.0.2";
50
+ declare const PACKAGE_NAME = "indobase-js";
47
51
 
48
- export { type IndobaseClientOptions, PACKAGE_NAME, type QueryData, type QueryError, type QueryResult, SDK_VERSION };
52
+ export { type IndobaseClientOptions, PACKAGE_NAME, type QueryData, type QueryError, type QueryResult, SDK_VERSION, createIndobaseClient };
package/dist/index.js CHANGED
@@ -1,9 +1,20 @@
1
+ // src/client.ts
2
+ function createIndobaseClient(url, apiKey) {
3
+ return {
4
+ url,
5
+ apiKey,
6
+ connect() {
7
+ console.log("Connected to Indobase:", url);
8
+ }
9
+ };
10
+ }
11
+
1
12
  // src/index.ts
2
- export * from "@indobase/indobase-js";
3
- var SDK_VERSION = "1.0.0";
4
- var PACKAGE_NAME = "@indobase/js";
13
+ var SDK_VERSION = "1.0.2";
14
+ var PACKAGE_NAME = "indobase-js";
5
15
  export {
6
16
  PACKAGE_NAME,
7
- SDK_VERSION
17
+ SDK_VERSION,
18
+ createIndobaseClient
8
19
  };
9
20
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Main SDK entry point for @indobase/js\r\n//\r\n// This SDK wraps the core @indobase packages:\r\n// - @indobase/auth-js - Authentication\r\n// - @indobase/postgrest-js - Database queries\r\n// - @indobase/functions-js - Edge functions\r\n// - @indobase/realtime-js - Real-time subscriptions\r\n// - @indobase/storage-js - Storage\r\n//\r\n// Usage:\r\n// import { createIndobaseClient } from '@indobase/js'\r\n// const client = createIndobaseClient('https://your-project.indobase.co', 'your-api-key')\r\n//\r\n// For type definitions, the types are re-exported from the core packages.\r\n\r\n// Re-export the main client creator\r\n// The actual implementation is in @indobase/indobase-js which must be built first\r\nimport type { IndobaseClientOptions, QueryResult, QueryData, QueryError } from './types'\r\n\r\nexport type {\r\n IndobaseClientOptions,\r\n QueryResult,\r\n QueryData,\r\n QueryError\r\n}\r\n\r\nexport * from '@indobase/indobase-js'\r\n\r\n// Version info\r\nexport const SDK_VERSION = '1.0.0'\r\nexport const PACKAGE_NAME = '@indobase/js'\r\n"],"mappings":";AA0BA,cAAc;AAGP,IAAM,cAAc;AACpB,IAAM,eAAe;","names":[]}
1
+ {"version":3,"sources":["../src/client.ts","../src/index.ts"],"sourcesContent":["export function createIndobaseClient(url: string, apiKey: string) {\r\n return {\r\n url,\r\n apiKey,\r\n connect() {\r\n console.log(\"Connected to Indobase:\", url)\r\n }\r\n }\r\n }","import type { IndobaseClientOptions, QueryResult, QueryData, QueryError } from './types'\r\n\r\nexport type {\r\n IndobaseClientOptions,\r\n QueryResult,\r\n QueryData,\r\n QueryError\r\n}\r\n\r\nexport * from './client'\r\n\r\nexport const SDK_VERSION = '1.0.2'\r\nexport const PACKAGE_NAME = 'indobase-js'"],"mappings":";AAAO,SAAS,qBAAqB,KAAa,QAAgB;AAC9D,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,UAAU;AACR,cAAQ,IAAI,0BAA0B,GAAG;AAAA,IAC3C;AAAA,EACF;AACF;;;ACGK,IAAM,cAAc;AACpB,IAAM,eAAe;","names":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "indobase-js",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Official JavaScript client for Indobase",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
- "main": "dist/index.js",
8
- "module": "dist/index.mjs",
9
- "types": "dist/index.d.ts",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
10
  "bin": {
11
11
  "indobase": "dist/cli.cjs"
12
12
  },
@@ -20,8 +20,8 @@
20
20
  "exports": {
21
21
  ".": {
22
22
  "types": "./dist/index.d.ts",
23
- "import": "./dist/index.mjs",
24
- "require": "./dist/index.js"
23
+ "import": "./dist/index.js",
24
+ "require": "./dist/index.cjs"
25
25
  },
26
26
  "./package.json": "./package.json"
27
27
  },
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "repository": {
47
47
  "type": "git",
48
- "url": "https://github.com/Indobase/Indobase-js.git",
48
+ "url": "git+https://github.com/Indobase/Indobase-js.git",
49
49
  "directory": "."
50
50
  },
51
51
  "keywords": [