codmir 0.3.0 → 0.3.1

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 CHANGED
@@ -27,21 +27,21 @@ npm install codmir
27
27
  or with pnpm:
28
28
 
29
29
  ```bash
30
- pnpm add @jobrayan/codmir
30
+ pnpm add codmir
31
31
  ```
32
32
 
33
33
  or with yarn:
34
34
 
35
35
  ```bash
36
- yarn add @jobrayan/codmir
36
+ yarn add codmir
37
37
  ```
38
38
 
39
39
  ### As a CLI (Global)
40
40
 
41
41
  ```bash
42
- npm install -g @jobrayan/codmir
42
+ npm install -g codmir
43
43
  # or
44
- pnpm add -g @jobrayan/codmir
44
+ pnpm add -g codmir
45
45
  ```
46
46
 
47
47
  Then authenticate and link your project:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codmir",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "TypeScript SDK for codmir API - the AI that prevents wasted engineering time",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -17,7 +17,9 @@
17
17
  },
18
18
  "files": [
19
19
  "dist",
20
- "README.md"
20
+ "README.md",
21
+ "LICENSE",
22
+ "runkit-example.js"
21
23
  ],
22
24
  "scripts": {
23
25
  "build": "tsup src/index.ts src/cli/index.ts --format cjs,esm --dts --clean",
@@ -45,6 +47,9 @@
45
47
  "url": "https://github.com/codmir/codmir/issues"
46
48
  },
47
49
  "homepage": "https://codmir.com",
50
+ "runkit": {
51
+ "example": "runkit-example.js"
52
+ },
48
53
  "devDependencies": {
49
54
  "@semantic-release/changelog": "^6.0.3",
50
55
  "@semantic-release/commit-analyzer": "^13.0.0",
@@ -0,0 +1,36 @@
1
+ // RunKit example for codmir package
2
+ // This will appear as an interactive demo on npm
3
+
4
+ const { CodmirClient } = require('codmir');
5
+
6
+ // Initialize the client
7
+ const client = new CodmirClient({
8
+ apiKey: 'demo-api-key', // Replace with your API key
9
+ baseUrl: 'https://codmir.com'
10
+ });
11
+
12
+ // Example: List projects (will fail without valid API key)
13
+ async function demo() {
14
+ try {
15
+ console.log('codmir SDK - Interactive Demo');
16
+ console.log('==============================\n');
17
+
18
+ // You can try these methods with a valid API key:
19
+ console.log('Available methods:');
20
+ console.log('- client.tickets.create()');
21
+ console.log('- client.tickets.list()');
22
+ console.log('- client.tickets.update()');
23
+ console.log('- client.testCases.create()');
24
+ console.log('- client.testCases.list()');
25
+ console.log('\nGet your API key at: https://codmir.com/settings/tokens');
26
+
27
+ return {
28
+ message: 'codmir - the AI that prevents wasted engineering time',
29
+ docs: 'https://codmir.com/docs'
30
+ };
31
+ } catch (error) {
32
+ console.error('Error:', error.message);
33
+ }
34
+ }
35
+
36
+ demo();