@contextvm/ctxcn 1.0.11 → 1.0.12
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 +24 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/src/env.d.ts +2 -0
- package/dist/src/env.d.ts.map +1 -0
- package/dist/src/env.js +8 -0
- package/dist/src/env.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -115,6 +115,30 @@ For better security, you can use environment variables instead of storing privat
|
|
|
115
115
|
export CTXCN_PRIVATE_KEY="your-private-key-here"
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
+
### Logging
|
|
119
|
+
|
|
120
|
+
The CLI sets the ContextVM SDK logger to a minimal level by default to reduce noisy output during operations (for example when running [`src/commands/add.ts`](src/commands/add.ts:1)). By default the CLI will set `LOG_LEVEL=error` unless you explicitly provide a different value.
|
|
121
|
+
|
|
122
|
+
You can override the logging behavior with the following environment variables supported by the SDK:
|
|
123
|
+
|
|
124
|
+
- `LOG_LEVEL` — Minimum log level: `debug`, `info`, `warn`, `error`. Default used by the CLI: `error`.
|
|
125
|
+
- `LOG_DESTINATION` — Destination for logs: `stderr` (default), `stdout`, or `file`.
|
|
126
|
+
- `LOG_FILE` — Path to the log file when `LOG_DESTINATION=file`.
|
|
127
|
+
- `LOG_ENABLED` — Enable or disable logging: `true` (default) or `false`.
|
|
128
|
+
|
|
129
|
+
Examples:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Run the add command with verbose debug logs
|
|
133
|
+
LOG_LEVEL=debug npx @contextvm/ctxcn add <pubkey>
|
|
134
|
+
|
|
135
|
+
# Log to a file instead of the console
|
|
136
|
+
LOG_DESTINATION=file LOG_FILE=./app.log npx @contextvm/ctxcn add <pubkey>
|
|
137
|
+
|
|
138
|
+
# Disable SDK logging entirely
|
|
139
|
+
LOG_ENABLED=false npx @contextvm/ctxcn add <pubkey>
|
|
140
|
+
```
|
|
141
|
+
|
|
118
142
|
The generated clients use the following order of precedence for private keys:
|
|
119
143
|
|
|
120
144
|
1. Private key passed directly in the constructor options
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AACA,OAAO,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,qBAAqB,EACrB,cAAc,GACf,MAAM,8BAA8B,CAAC;AAEtC,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAExB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,UAAU,EAAE,CAAC;YACb,OAAO;QACT,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAE1B,QAAQ,OAAO,EAAE,CAAC;YAChB,KAAK,MAAM;gBACT,MAAM,UAAU,CAAC,GAAG,CAAC,CAAC;gBACtB,MAAM;YACR,KAAK,KAAK;gBACR,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,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G,OAAO,CAAC,GAAG,EAAE,CAAC;QAE1B,QAAQ,OAAO,EAAE,CAAC;YAChB,KAAK,MAAM;gBACT,MAAM,UAAU,CAAC,GAAG,CAAC,CAAC;gBACtB,MAAM;YACR,KAAK,KAAK;gBACR,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,qBAAqB,CACnB,8DAA8D,CAC/D,CAAC;gBACJ,CAAC;gBACD,MAAM,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAC7B,MAAM;YACR,KAAK,QAAQ;gBACX,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC7B,MAAM,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;gBACtC,MAAM;YACR,KAAK,MAAM;gBACT,UAAU,EAAE,CAAC;gBACb,MAAM;YACR;gBACE,qBAAqB,CAAC,oBAAoB,OAAO,GAAG,CAAC,CAAC;gBACtD,MAAM;QACV,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IACxC,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":""}
|
package/dist/src/env.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Set a default log level for the SDK to reduce noise during CLI operations.
|
|
2
|
+
// This must be done before any SDK modules are imported.
|
|
3
|
+
// This can be overridden by the user by setting the LOG_LEVEL environment variable.
|
|
4
|
+
if (!process.env.LOG_LEVEL) {
|
|
5
|
+
process.env.LOG_LEVEL = "error";
|
|
6
|
+
}
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,yDAAyD;AACzD,oFAAoF;AACpF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC;AAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contextvm/ctxcn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "A command-line utility inspired by shadcn that streamlines the integration of ContextVM (CVM) servers into your TypeScript projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|