orangeslice 1.0.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.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const child_process_1 = require("child_process");
40
+ const DOCS_DIR = path.join(__dirname, "..", "docs");
41
+ const TARGET_DIR = path.join(process.cwd(), "orangeslice-docs");
42
+ async function main() {
43
+ console.log("\n orangeslice - setting up B2B client for AI agents...\n");
44
+ // 1. Copy docs
45
+ console.log("1. Copying B2B documentation...");
46
+ if (!fs.existsSync(TARGET_DIR)) {
47
+ fs.mkdirSync(TARGET_DIR, { recursive: true });
48
+ }
49
+ const files = fs.readdirSync(DOCS_DIR);
50
+ for (const file of files) {
51
+ const src = path.join(DOCS_DIR, file);
52
+ const dest = path.join(TARGET_DIR, file);
53
+ fs.copyFileSync(src, dest);
54
+ console.log(` ${file}`);
55
+ }
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");
79
+ }
80
+ main().catch(console.error);
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "orangeslice",
3
- "version": "1.0.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",
7
+ "bin": {
8
+ "orangeslice": "dist/cli.js"
9
+ },
7
10
  "files": [
8
11
  "dist",
9
12
  "docs",