@camunda8/cli 2.1.0 → 2.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/README.md +18 -1
- package/dist/client.d.ts +30 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +55 -0
- package/dist/client.js.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +31 -2
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +60 -0
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/incidents.d.ts +4 -0
- package/dist/commands/incidents.d.ts.map +1 -1
- package/dist/commands/incidents.js +6 -4
- package/dist/commands/incidents.js.map +1 -1
- package/dist/commands/jobs.d.ts +4 -0
- package/dist/commands/jobs.d.ts.map +1 -1
- package/dist/commands/jobs.js +6 -4
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/plugins.d.ts.map +1 -1
- package/dist/commands/plugins.js +31 -148
- package/dist/commands/plugins.js.map +1 -1
- package/dist/commands/process-definitions.d.ts +4 -0
- package/dist/commands/process-definitions.d.ts.map +1 -1
- package/dist/commands/process-definitions.js +6 -4
- package/dist/commands/process-definitions.js.map +1 -1
- package/dist/commands/process-instances.d.ts +4 -0
- package/dist/commands/process-instances.d.ts.map +1 -1
- package/dist/commands/process-instances.js +8 -6
- package/dist/commands/process-instances.js.map +1 -1
- package/dist/commands/profiles.d.ts +4 -0
- package/dist/commands/profiles.d.ts.map +1 -1
- package/dist/commands/profiles.js +15 -1
- package/dist/commands/profiles.js.map +1 -1
- package/dist/commands/search.d.ts +20 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +36 -43
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/user-tasks.d.ts +4 -0
- package/dist/commands/user-tasks.d.ts.map +1 -1
- package/dist/commands/user-tasks.js +6 -4
- package/dist/commands/user-tasks.js.map +1 -1
- package/dist/default-plugins/hello-world/README.md +3 -0
- package/dist/default-plugins/hello-world/c8ctl-plugin.js +4 -0
- package/dist/index.js +49 -1
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +7 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +36 -0
- package/dist/logger.js.map +1 -1
- package/dist/plugin-loader.d.ts.map +1 -1
- package/dist/plugin-loader.js +7 -3
- package/dist/plugin-loader.js.map +1 -1
- package/dist/runtime.d.ts +20 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js.map +1 -1
- package/dist/templates/AGENTS.md +77 -0
- package/dist/templates/README.md +49 -0
- package/dist/templates/c8ctl-plugin.js +2 -0
- package/dist/templates/c8ctl-plugin.ts +50 -0
- package/dist/templates/init-plugin-next-steps.txt +9 -0
- package/dist/templates/package.json +22 -0
- package/dist/templates/tsconfig.json +15 -0
- package/package.json +3 -2
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {{PLUGIN_NAME}} - A c8ctl plugin
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { C8ctlPluginRuntime } from '@camunda8/cli/runtime';
|
|
6
|
+
|
|
7
|
+
// The c8ctl runtime is always populated by the host before plugin code runs
|
|
8
|
+
const c8ctl = globalThis.c8ctl as C8ctlPluginRuntime;
|
|
9
|
+
|
|
10
|
+
// Optional metadata for help text
|
|
11
|
+
export const metadata = {
|
|
12
|
+
name: '{{PLUGIN_NAME}}',
|
|
13
|
+
description: 'A c8ctl plugin',
|
|
14
|
+
commands: {
|
|
15
|
+
hello: {
|
|
16
|
+
description: 'Say hello from the plugin',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Required commands export
|
|
22
|
+
export const commands = {
|
|
23
|
+
hello: async (args: string[]) => {
|
|
24
|
+
const logger = c8ctl.getLogger();
|
|
25
|
+
const tenantId = c8ctl.resolveTenantId();
|
|
26
|
+
console.log('Hello from {{PLUGIN_NAME}}!');
|
|
27
|
+
console.log('c8ctl version:', c8ctl.version);
|
|
28
|
+
console.log('Node version:', c8ctl.nodeVersion);
|
|
29
|
+
console.log('Platform:', c8ctl.platform, c8ctl.arch);
|
|
30
|
+
console.log('Tenant:', tenantId);
|
|
31
|
+
|
|
32
|
+
if (args.length > 0) {
|
|
33
|
+
console.log('Arguments:', args.join(', '));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Example: Access c8ctl runtime
|
|
37
|
+
console.log('Current directory:', c8ctl.cwd);
|
|
38
|
+
console.log('Output mode:', c8ctl.outputMode);
|
|
39
|
+
|
|
40
|
+
if (c8ctl.activeProfile) {
|
|
41
|
+
console.log('Active profile:', c8ctl.activeProfile);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
logger.info('Plugin logger is ready');
|
|
45
|
+
|
|
46
|
+
// Example: create SDK client from current profile/session config
|
|
47
|
+
const client = c8ctl.createClient();
|
|
48
|
+
console.log('Client available:', typeof client === 'object');
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{PLUGIN_NAME}}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A c8ctl plugin",
|
|
6
|
+
"keywords": ["c8ctl", "c8ctl-plugin"],
|
|
7
|
+
"main": "c8ctl-plugin.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/**",
|
|
10
|
+
"c8ctl-plugin.js",
|
|
11
|
+
"README.md",
|
|
12
|
+
"AGENTS.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"watch": "tsc --watch"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "^5.0.0",
|
|
20
|
+
"@types/node": "^22.0.0"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src/**/*"],
|
|
14
|
+
"exclude": ["node_modules"]
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda8/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Camunda 8 CLI - minimal-dependency CLI for Camunda 8 operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
"LICENSE"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "npm run clean && tsc && npm run copy-plugins",
|
|
22
|
+
"build": "npm run clean && tsc && npm run copy-plugins && npm run copy-templates",
|
|
23
23
|
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
24
24
|
"copy-plugins": "node -e \"const fs=require('fs');const path=require('path');const src='default-plugins';const dest='dist/default-plugins';if(fs.existsSync(src)){fs.cpSync(src,dest,{recursive:true})}\"",
|
|
25
|
+
"copy-templates": "node -e \"const fs=require('fs');const src='src/templates';const dest='dist/templates';if(fs.existsSync(src)){fs.cpSync(src,dest,{recursive:true})}\"",
|
|
25
26
|
"prepublishOnly": "npm run build",
|
|
26
27
|
"test": "node --test tests/unit/setup.test.ts tests/unit/*.test.ts tests/integration/*.test.ts",
|
|
27
28
|
"test:unit": "node --test tests/unit/setup.test.ts tests/unit/*.test.ts",
|