@bob-kit/client 0.0.4 → 0.0.35

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/cache.js CHANGED
@@ -1,4 +1,7 @@
1
- export class MemoryCache {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MemoryCache = void 0;
4
+ class MemoryCache {
2
5
  constructor() {
3
6
  this.cache = new Map();
4
7
  }
@@ -12,3 +15,4 @@ export class MemoryCache {
12
15
  return this.cache.set(id, value);
13
16
  }
14
17
  }
18
+ exports.MemoryCache = MemoryCache;
package/dist/daemon.js CHANGED
@@ -1,10 +1,13 @@
1
- import { spawn } from "node:child_process";
2
- export class Daemon {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Daemon = void 0;
4
+ const node_child_process_1 = require("node:child_process");
5
+ class Daemon {
3
6
  constructor(driver) {
4
7
  this.buffer = "";
5
8
  this.queue = [];
6
9
  const cwd = process.cwd();
7
- this.process = spawn(`./motor`, ["-d", driver, "--json", "--daemon"], {
10
+ this.process = (0, node_child_process_1.spawn)(`./motor`, ["-d", driver, "--json", "--daemon"], {
8
11
  stdio: ["pipe", "pipe", "pipe"],
9
12
  windowsHide: true,
10
13
  });
@@ -45,3 +48,4 @@ export class Daemon {
45
48
  return !!this.process && !this.process.killed;
46
49
  }
47
50
  }
51
+ exports.Daemon = Daemon;
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
- import { Daemon } from "./daemon.js";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bobQuery = void 0;
4
+ exports.default = bob;
5
+ const daemon_js_1 = require("./daemon.js");
2
6
  let daemon;
3
- export const bobQuery = async ({ id, driver: { cache, driver }, input, }) => {
4
- daemon = new Daemon(driver);
7
+ const bobQuery = async ({ id, driver: { cache, driver }, input, }) => {
8
+ daemon = new daemon_js_1.Daemon(driver);
5
9
  const query = typeof input === "string" ? input : input.join("?");
6
10
  const cacheKey = id ?? query;
7
11
  if (cache) {
@@ -22,9 +26,10 @@ export const bobQuery = async ({ id, driver: { cache, driver }, input, }) => {
22
26
  }
23
27
  return json;
24
28
  };
25
- export default function bob(driver) {
29
+ exports.bobQuery = bobQuery;
30
+ function bob(driver) {
26
31
  const execute = async (input, parameters = [], id) => {
27
- const { error, tables, actions } = await bobQuery({ input, driver, id });
32
+ const { error, tables, actions } = await (0, exports.bobQuery)({ input, driver, id });
28
33
  if (error)
29
34
  return { error };
30
35
  if (tables) {
package/dist/install.js CHANGED
@@ -1,8 +1,43 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { pipeline } from "stream";
4
- import { promisify } from "util";
5
- const streamPipeline = promisify(pipeline);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const fs = __importStar(require("fs"));
37
+ const path = __importStar(require("path"));
38
+ const stream_1 = require("stream");
39
+ const util_1 = require("util");
40
+ const streamPipeline = (0, util_1.promisify)(stream_1.pipeline);
6
41
  function detectBobFile() {
7
42
  const platform = process.platform; // 'win32', 'darwin', 'linux'
8
43
  const arch = process.arch; // 'x64', 'arm64', etc.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bob-kit/client",
3
- "version": "0.0.4",
3
+ "version": "0.0.35",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "",