orangeslice 1.1.0 → 1.2.0

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.
Files changed (2) hide show
  1. package/dist/cli.js +28 -9
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -36,26 +36,45 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  const fs = __importStar(require("fs"));
38
38
  const path = __importStar(require("path"));
39
+ const child_process_1 = require("child_process");
39
40
  const DOCS_DIR = path.join(__dirname, "..", "docs");
40
41
  const TARGET_DIR = path.join(process.cwd(), "orangeslice-docs");
41
42
  async function main() {
42
- console.log("šŸŠ orangeslice - injecting B2B docs into your project...\n");
43
- // Create target directory
43
+ console.log("\n orangeslice - setting up B2B client for AI agents...\n");
44
+ // 1. Copy docs
45
+ console.log("1. Copying B2B documentation...");
44
46
  if (!fs.existsSync(TARGET_DIR)) {
45
47
  fs.mkdirSync(TARGET_DIR, { recursive: true });
46
48
  }
47
- // Copy all docs
48
49
  const files = fs.readdirSync(DOCS_DIR);
49
- let copied = 0;
50
50
  for (const file of files) {
51
51
  const src = path.join(DOCS_DIR, file);
52
52
  const dest = path.join(TARGET_DIR, file);
53
53
  fs.copyFileSync(src, dest);
54
- console.log(` āœ“ ${file}`);
55
- copied++;
54
+ console.log(` ${file}`);
56
55
  }
57
- console.log(`\nāœ… Copied ${copied} docs to ./orangeslice-docs/`);
58
- console.log("\nYour AI agent can now read these docs to understand the B2B database.");
59
- console.log("Start with B2B_DATABASE.md and B2B_SCHEMA.md\n");
56
+ console.log(` Copied ${files.length} docs to ./orangeslice-docs/\n`);
57
+ // 2. Install package
58
+ console.log("2. Installing orangeslice package...");
59
+ try {
60
+ (0, child_process_1.execSync)("npm install orangeslice", { stdio: "inherit", cwd: process.cwd() });
61
+ }
62
+ catch {
63
+ console.log(" (skipped - no package.json or npm not available)\n");
64
+ }
65
+ // 3. Show usage
66
+ console.log("\n Done! Your AI agent can now:\n");
67
+ console.log(" // Read docs in ./orangeslice-docs/ to understand the B2B schema");
68
+ console.log(" // Then query with automatic rate limiting:");
69
+ console.log("");
70
+ console.log(' import { orangeslice } from "orangeslice";');
71
+ console.log("");
72
+ console.log(" const companies = await orangeslice.b2b.sql(`");
73
+ console.log(" SELECT company_name, employee_count");
74
+ console.log(" FROM linkedin_company");
75
+ console.log(" WHERE domain = 'stripe.com'");
76
+ console.log(" `);");
77
+ console.log("");
78
+ console.log(" Start by reading: ./orangeslice-docs/B2B_DATABASE.md\n");
60
79
  }
61
80
  main().catch(console.error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orangeslice",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Rate-limited B2B API client for AI agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",