@bpmnkit/profiles 0.0.10 → 0.0.14
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 +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/profile.d.ts +11 -1
- package/dist/profile.js +24 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@bpmnkit/profiles)
|
|
7
7
|
[](https://github.com/bpmnkit/monorepo/blob/main/LICENSE)
|
|
8
8
|
[](https://github.com/bpmnkit/monorepo)
|
|
9
|
+
[](https://github.com/bpmnkit/monorepo)
|
|
10
|
+
[](https://github.com/bpmnkit/monorepo)
|
|
9
11
|
|
|
10
12
|
[Website](https://bpmnkit.com) · [Documentation](https://docs.bpmnkit.com) · [GitHub](https://github.com/bpmnkit/monorepo) · [Changelog](https://github.com/bpmnkit/monorepo/blob/main/packages/profiles/CHANGELOG.md)
|
|
11
13
|
</div>
|
|
@@ -140,6 +142,8 @@ deleteProfile("old-profile")
|
|
|
140
142
|
| [`@bpmnkit/cli-sdk`](https://www.npmjs.com/package/@bpmnkit/cli-sdk) | Plugin authoring SDK for the casen CLI |
|
|
141
143
|
| [`@bpmnkit/create-casen-plugin`](https://www.npmjs.com/package/@bpmnkit/create-casen-plugin) | Scaffold a new casen CLI plugin in seconds |
|
|
142
144
|
| [`@bpmnkit/casen-report`](https://www.npmjs.com/package/@bpmnkit/casen-report) | HTML reports from Camunda 8 incident and SLA data |
|
|
145
|
+
| [`@bpmnkit/casen-worker-http`](https://www.npmjs.com/package/@bpmnkit/casen-worker-http) | Example HTTP worker plugin — completes jobs with live JSONPlaceholder API data |
|
|
146
|
+
| [`@bpmnkit/casen-worker-ai`](https://www.npmjs.com/package/@bpmnkit/casen-worker-ai) | AI task worker — classify, summarize, extract, and decide using Claude |
|
|
143
147
|
|
|
144
148
|
## License
|
|
145
149
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { ApiType, AuditEntry, Profile, Settings } from "./profile.js";
|
|
2
2
|
export { listModelerProfiles } from "./modeler.js";
|
|
3
|
-
export { appendAuditEntry, clearAuditLog, deleteProfile, getActiveProfile, getActiveName, getAuditLog, getConfigFilePath, getProfile, getSettings, listProfiles, saveProfile, saveSettings, useProfile, } from "./profile.js";
|
|
3
|
+
export { appendAuditEntry, clearAuditLog, deleteProfile, getActiveProfile, getActiveName, getAuditLog, getConfigFilePath, getProfile, getSettings, listProfiles, saveProfile, saveSettings, setProfileMeta, useProfile, } from "./profile.js";
|
|
4
4
|
export { createAdminClientFromProfile, createClientFromProfile } from "./client.js";
|
|
5
5
|
export { getAuthHeader } from "./token.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { listModelerProfiles } from "./modeler.js";
|
|
2
|
-
export { appendAuditEntry, clearAuditLog, deleteProfile, getActiveProfile, getActiveName, getAuditLog, getConfigFilePath, getProfile, getSettings, listProfiles, saveProfile, saveSettings, useProfile, } from "./profile.js";
|
|
2
|
+
export { appendAuditEntry, clearAuditLog, deleteProfile, getActiveProfile, getActiveName, getAuditLog, getConfigFilePath, getProfile, getSettings, listProfiles, saveProfile, saveSettings, setProfileMeta, useProfile, } from "./profile.js";
|
|
3
3
|
export { createAdminClientFromProfile, createClientFromProfile } from "./client.js";
|
|
4
4
|
export { getAuthHeader } from "./token.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/profile.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export interface Profile {
|
|
|
6
6
|
config: CamundaClientInput;
|
|
7
7
|
createdAt: string | null;
|
|
8
8
|
source?: "modeler";
|
|
9
|
+
description?: string;
|
|
10
|
+
tags?: string[];
|
|
9
11
|
}
|
|
10
12
|
export interface AuditEntry {
|
|
11
13
|
timestamp: string;
|
|
@@ -23,7 +25,15 @@ export declare function listProfiles(): Profile[];
|
|
|
23
25
|
export declare function getProfile(name: string): Profile | undefined;
|
|
24
26
|
export declare function getActiveProfile(): Profile | undefined;
|
|
25
27
|
export declare function getActiveName(): string | null;
|
|
26
|
-
export declare function saveProfile(name: string, config: CamundaClientInput, apiType?: ApiType
|
|
28
|
+
export declare function saveProfile(name: string, config: CamundaClientInput, apiType?: ApiType, opts?: {
|
|
29
|
+
description?: string;
|
|
30
|
+
tags?: string[];
|
|
31
|
+
}): void;
|
|
32
|
+
/** Update description and/or tags on an existing profile without touching its connection config. */
|
|
33
|
+
export declare function setProfileMeta(name: string, opts: {
|
|
34
|
+
description?: string;
|
|
35
|
+
tags?: string[];
|
|
36
|
+
}): boolean;
|
|
27
37
|
export declare function deleteProfile(name: string): boolean;
|
|
28
38
|
export declare function useProfile(name: string): boolean;
|
|
29
39
|
export declare function getConfigFilePath(): string;
|
package/dist/profile.js
CHANGED
|
@@ -41,6 +41,8 @@ export function listProfiles() {
|
|
|
41
41
|
apiType: store.meta[name]?.apiType ?? "c8",
|
|
42
42
|
config,
|
|
43
43
|
createdAt: store.meta[name]?.createdAt ?? null,
|
|
44
|
+
description: store.meta[name]?.description,
|
|
45
|
+
tags: store.meta[name]?.tags,
|
|
44
46
|
}));
|
|
45
47
|
// Merge Camunda Modeler connections; own profiles take precedence by name
|
|
46
48
|
const ownNames = new Set(own.map((p) => p.name));
|
|
@@ -57,6 +59,8 @@ export function getProfile(name) {
|
|
|
57
59
|
apiType: store.meta[name]?.apiType ?? "c8",
|
|
58
60
|
config,
|
|
59
61
|
createdAt: store.meta[name]?.createdAt ?? null,
|
|
62
|
+
description: store.meta[name]?.description,
|
|
63
|
+
tags: store.meta[name]?.tags,
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
66
|
export function getActiveProfile() {
|
|
@@ -68,7 +72,7 @@ export function getActiveProfile() {
|
|
|
68
72
|
export function getActiveName() {
|
|
69
73
|
return readStore().active;
|
|
70
74
|
}
|
|
71
|
-
export function saveProfile(name, config, apiType = "c8") {
|
|
75
|
+
export function saveProfile(name, config, apiType = "c8", opts) {
|
|
72
76
|
const store = readStore();
|
|
73
77
|
store.profiles[name] = config;
|
|
74
78
|
if (!store.meta[name]) {
|
|
@@ -77,11 +81,30 @@ export function saveProfile(name, config, apiType = "c8") {
|
|
|
77
81
|
else {
|
|
78
82
|
store.meta[name].apiType = apiType;
|
|
79
83
|
}
|
|
84
|
+
if (opts?.description !== undefined)
|
|
85
|
+
store.meta[name].description = opts.description || undefined;
|
|
86
|
+
if (opts?.tags !== undefined)
|
|
87
|
+
store.meta[name].tags = opts.tags.length > 0 ? opts.tags : undefined;
|
|
80
88
|
// Auto-activate if this is the first profile
|
|
81
89
|
if (store.active === null)
|
|
82
90
|
store.active = name;
|
|
83
91
|
writeStore(store);
|
|
84
92
|
}
|
|
93
|
+
/** Update description and/or tags on an existing profile without touching its connection config. */
|
|
94
|
+
export function setProfileMeta(name, opts) {
|
|
95
|
+
const store = readStore();
|
|
96
|
+
if (!(name in store.profiles))
|
|
97
|
+
return false;
|
|
98
|
+
const meta = store.meta[name];
|
|
99
|
+
if (!meta)
|
|
100
|
+
return false;
|
|
101
|
+
if (opts.description !== undefined)
|
|
102
|
+
meta.description = opts.description || undefined;
|
|
103
|
+
if (opts.tags !== undefined)
|
|
104
|
+
meta.tags = opts.tags.length > 0 ? opts.tags : undefined;
|
|
105
|
+
writeStore(store);
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
85
108
|
export function deleteProfile(name) {
|
|
86
109
|
const store = readStore();
|
|
87
110
|
if (!(name in store.profiles))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmnkit/profiles",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "Shared auth, profile storage, and client factories for the BPMN Kit CLI and proxy server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"node": ">=20"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@bpmnkit/api": "0.0.
|
|
24
|
+
"@bpmnkit/api": "0.0.16"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"bpmn",
|