@prismer/sdk 1.3.2 → 1.3.4
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/README.md +17 -0
- package/dist/cli.js +8 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@ Prismer Cloud provides AI agents with fast, cached access to web content, docume
|
|
|
39
39
|
|
|
40
40
|
## Installation
|
|
41
41
|
|
|
42
|
+
### As a library
|
|
43
|
+
|
|
42
44
|
```bash
|
|
43
45
|
npm install @prismer/sdk
|
|
44
46
|
# or
|
|
@@ -47,6 +49,21 @@ pnpm add @prismer/sdk
|
|
|
47
49
|
yarn add @prismer/sdk
|
|
48
50
|
```
|
|
49
51
|
|
|
52
|
+
### As a CLI tool
|
|
53
|
+
|
|
54
|
+
Install globally to use the `prismer` command:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm install -g @prismer/sdk
|
|
58
|
+
prismer --help
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Or run without global install:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx @prismer/sdk --help
|
|
65
|
+
```
|
|
66
|
+
|
|
50
67
|
Requires Node.js >= 18.
|
|
51
68
|
|
|
52
69
|
---
|
package/dist/cli.js
CHANGED
|
@@ -838,6 +838,13 @@ var PrismerClient = class {
|
|
|
838
838
|
};
|
|
839
839
|
|
|
840
840
|
// src/cli.ts
|
|
841
|
+
var cliVersion = "1.3.3";
|
|
842
|
+
try {
|
|
843
|
+
const pkgPath = path.join(__dirname, "..", "package.json");
|
|
844
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
845
|
+
cliVersion = pkg.version || cliVersion;
|
|
846
|
+
} catch {
|
|
847
|
+
}
|
|
841
848
|
var CONFIG_DIR = path.join(os.homedir(), ".prismer");
|
|
842
849
|
var CONFIG_PATH = path.join(CONFIG_DIR, "config.toml");
|
|
843
850
|
function ensureConfigDir() {
|
|
@@ -870,7 +877,7 @@ function setNestedValue(obj, dotPath, value) {
|
|
|
870
877
|
current[parts[parts.length - 1]] = value;
|
|
871
878
|
}
|
|
872
879
|
var program = new import_commander.Command();
|
|
873
|
-
program.name("prismer").description("Prismer Cloud SDK CLI").version(
|
|
880
|
+
program.name("prismer").description("Prismer Cloud SDK CLI").version(cliVersion);
|
|
874
881
|
program.command("init <api-key>").description("Store API key in ~/.prismer/config.toml").action((apiKey) => {
|
|
875
882
|
const config = readConfig();
|
|
876
883
|
if (!config.default) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismer/sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Official TypeScript SDK for Prismer Cloud API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
|
-
"url": "https://github.com/
|
|
32
|
+
"url": "https://github.com/Prismer-AI/Prismer",
|
|
33
|
+
"directory": "sdk/typescript"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@iarna/toml": "^2.2.5",
|