@bpmnkit/connector-gen 0.0.8 → 0.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 +6 -0
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +3 -2
- package/dist/build-template.js +1 -0
- package/dist/catalog.d.ts +5 -0
- package/dist/catalog.js +77 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@bpmnkit/connector-gen)
|
|
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/connector-gen/CHANGELOG.md)
|
|
11
13
|
</div>
|
|
@@ -86,9 +88,13 @@ interface GenerateOptions {
|
|
|
86
88
|
| [`@bpmnkit/operate`](https://www.npmjs.com/package/@bpmnkit/operate) | Monitoring & operations frontend for Camunda clusters |
|
|
87
89
|
| [`@bpmnkit/cli`](https://www.npmjs.com/package/@bpmnkit/cli) | Camunda 8 command-line interface (casen) |
|
|
88
90
|
| [`@bpmnkit/proxy`](https://www.npmjs.com/package/@bpmnkit/proxy) | Local AI bridge and Camunda API proxy server |
|
|
91
|
+
| [`@bpmnkit/patterns`](https://www.npmjs.com/package/@bpmnkit/patterns) | Domain process patterns for BPMNKit AIKit |
|
|
92
|
+
| [`@bpmnkit/worker-client`](https://www.npmjs.com/package/@bpmnkit/worker-client) | Thin Zeebe REST client for standalone workers |
|
|
89
93
|
| [`@bpmnkit/cli-sdk`](https://www.npmjs.com/package/@bpmnkit/cli-sdk) | Plugin authoring SDK for the casen CLI |
|
|
90
94
|
| [`@bpmnkit/create-casen-plugin`](https://www.npmjs.com/package/@bpmnkit/create-casen-plugin) | Scaffold a new casen CLI plugin in seconds |
|
|
91
95
|
| [`@bpmnkit/casen-report`](https://www.npmjs.com/package/@bpmnkit/casen-report) | HTML reports from Camunda 8 incident and SLA data |
|
|
96
|
+
| [`@bpmnkit/casen-worker-http`](https://www.npmjs.com/package/@bpmnkit/casen-worker-http) | Example HTTP worker plugin — completes jobs with live JSONPlaceholder API data |
|
|
97
|
+
| [`@bpmnkit/casen-worker-ai`](https://www.npmjs.com/package/@bpmnkit/casen-worker-ai) | AI task worker — classify, summarize, extract, and decide using Claude |
|
|
92
98
|
|
|
93
99
|
## License
|
|
94
100
|
|
package/dist/browser.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
*/
|
|
11
11
|
export { buildTemplate, buildTemplates } from "./build-template.js";
|
|
12
|
-
export { CATALOG, getCatalogEntry } from "./catalog.js";
|
|
12
|
+
export { CATALOG, getCatalogEntry, getCatalogIconUri } from "./catalog.js";
|
|
13
13
|
export type { CatalogEntry } from "./catalog.js";
|
|
14
14
|
export { detectDefaultAuth, getBaseUrl, getOperations, getServers, isRef, parseOpenApi, resolve, resolveRef, } from "./parse-openapi.js";
|
|
15
15
|
export type { DetectedAuth } from "./parse-openapi.js";
|
package/dist/browser.js
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
*/
|
|
11
11
|
export { buildTemplate, buildTemplates } from "./build-template.js";
|
|
12
|
-
export { CATALOG, getCatalogEntry } from "./catalog.js";
|
|
12
|
+
export { CATALOG, getCatalogEntry, getCatalogIconUri } from "./catalog.js";
|
|
13
13
|
export { detectDefaultAuth, getBaseUrl, getOperations, getServers, isRef, parseOpenApi, resolve, resolveRef, } from "./parse-openapi.js";
|
|
14
14
|
export { CONNECTOR_SCHEMA } from "./types.js";
|
|
15
15
|
import { buildTemplates } from "./build-template.js";
|
|
16
|
-
import { CATALOG, getCatalogEntry } from "./catalog.js";
|
|
16
|
+
import { CATALOG, getCatalogEntry, getCatalogIconUri } from "./catalog.js";
|
|
17
17
|
import { detectDefaultAuth, getOperations, parseOpenApi } from "./parse-openapi.js";
|
|
18
18
|
/**
|
|
19
19
|
* Parse an OpenAPI spec (string or object) and generate connector templates.
|
|
@@ -47,6 +47,7 @@ export async function generateFromCatalog(id, overrides = {}) {
|
|
|
47
47
|
const opts = {
|
|
48
48
|
idPrefix: overrides.idPrefix ?? entry.idPrefix,
|
|
49
49
|
defaultAuthType: overrides.defaultAuthType ?? entry.defaultAuth,
|
|
50
|
+
icon: overrides.icon ?? getCatalogIconUri(id),
|
|
50
51
|
...overrides,
|
|
51
52
|
};
|
|
52
53
|
const { templates } = await generateFromUrl(entry.url, opts);
|
package/dist/build-template.js
CHANGED
package/dist/catalog.d.ts
CHANGED
|
@@ -10,4 +10,9 @@ export interface CatalogEntry {
|
|
|
10
10
|
}
|
|
11
11
|
export declare const CATALOG: CatalogEntry[];
|
|
12
12
|
export declare function getCatalogEntry(id: string): CatalogEntry | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Returns a base64 SVG data URI icon for a catalog entry — a rounded square
|
|
15
|
+
* in the brand's primary color with the first letter of the service name.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getCatalogIconUri(id: string): string | undefined;
|
|
13
18
|
//# sourceMappingURL=catalog.d.ts.map
|
package/dist/catalog.js
CHANGED
|
@@ -803,4 +803,81 @@ export const CATALOG = [
|
|
|
803
803
|
export function getCatalogEntry(id) {
|
|
804
804
|
return CATALOG.find((e) => e.id === id);
|
|
805
805
|
}
|
|
806
|
+
// ── Icons ─────────────────────────────────────────────────────────────────────
|
|
807
|
+
/** Brand colors sourced from Simple Icons (simpleicons.org). All chosen for legible white text. */
|
|
808
|
+
const BRAND_COLORS = {
|
|
809
|
+
github: "#24292e",
|
|
810
|
+
cloudflare: "#F38020",
|
|
811
|
+
stripe: "#635BFF",
|
|
812
|
+
notion: "#191919",
|
|
813
|
+
resend: "#191919",
|
|
814
|
+
openai: "#10A37F",
|
|
815
|
+
figma: "#F24E1E",
|
|
816
|
+
twilio: "#F22F46",
|
|
817
|
+
slack: "#4A154B",
|
|
818
|
+
jira: "#0052CC",
|
|
819
|
+
hubspot: "#FF7A59",
|
|
820
|
+
discord: "#5865F2",
|
|
821
|
+
pagerduty: "#06AC38",
|
|
822
|
+
zoom: "#2D8CFF",
|
|
823
|
+
mailchimp: "#C21A01",
|
|
824
|
+
asana: "#F06A6A",
|
|
825
|
+
sendgrid: "#1A82E2",
|
|
826
|
+
paypal: "#003087",
|
|
827
|
+
plaid: "#00A67E",
|
|
828
|
+
vercel: "#191919",
|
|
829
|
+
anthropic: "#C97045",
|
|
830
|
+
shopify: "#7AB648",
|
|
831
|
+
datadog: "#632CA6",
|
|
832
|
+
sentry: "#362D59",
|
|
833
|
+
intercom: "#1F8DED",
|
|
834
|
+
contentful: "#2478CC",
|
|
835
|
+
airtable: "#1071C9",
|
|
836
|
+
twitch: "#9146FF",
|
|
837
|
+
klaviyo: "#1E1E2E",
|
|
838
|
+
brex: "#3B2FC9",
|
|
839
|
+
box: "#0061D5",
|
|
840
|
+
spotify: "#1DB954",
|
|
841
|
+
gitlab: "#FC6D26",
|
|
842
|
+
netlify: "#00C7B7",
|
|
843
|
+
launchdarkly: "#405BFF",
|
|
844
|
+
postmark: "#E77925",
|
|
845
|
+
circleci: "#343434",
|
|
846
|
+
grafana: "#F46800",
|
|
847
|
+
digitalocean: "#0080FF",
|
|
848
|
+
linode: "#00B050",
|
|
849
|
+
square: "#3E4348",
|
|
850
|
+
zendesk: "#03363D",
|
|
851
|
+
bitbucket: "#0052CC",
|
|
852
|
+
miro: "#050038",
|
|
853
|
+
okta: "#007DC1",
|
|
854
|
+
meraki: "#1BA0D7",
|
|
855
|
+
docker: "#2496ED",
|
|
856
|
+
kubernetes: "#326CE5",
|
|
857
|
+
freshdesk: "#27B2AA",
|
|
858
|
+
dropbox: "#0061FF",
|
|
859
|
+
xero: "#13B5EA",
|
|
860
|
+
bigcommerce: "#34313F",
|
|
861
|
+
recurly: "#FF5B59",
|
|
862
|
+
ably: "#FF5416",
|
|
863
|
+
openfga: "#3E4A61",
|
|
864
|
+
};
|
|
865
|
+
/**
|
|
866
|
+
* Returns a base64 SVG data URI icon for a catalog entry — a rounded square
|
|
867
|
+
* in the brand's primary color with the first letter of the service name.
|
|
868
|
+
*/
|
|
869
|
+
export function getCatalogIconUri(id) {
|
|
870
|
+
const color = BRAND_COLORS[id];
|
|
871
|
+
if (!color)
|
|
872
|
+
return undefined;
|
|
873
|
+
const entry = getCatalogEntry(id);
|
|
874
|
+
if (!entry)
|
|
875
|
+
return undefined;
|
|
876
|
+
const letter = entry.name
|
|
877
|
+
.replace(/^[^A-Za-z]*/, "")
|
|
878
|
+
.charAt(0)
|
|
879
|
+
.toUpperCase();
|
|
880
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect width="24" height="24" rx="5" fill="${color}"/><text x="12" y="17" font-family="ui-sans-serif,system-ui,sans-serif" font-size="13" font-weight="700" fill="white" text-anchor="middle">${letter}</text></svg>`;
|
|
881
|
+
return `data:image/svg+xml;base64,${btoa(svg)}`;
|
|
882
|
+
}
|
|
806
883
|
//# sourceMappingURL=catalog.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { buildTemplate, buildTemplates } from "./build-template.js";
|
|
2
|
-
export { CATALOG, getCatalogEntry } from "./catalog.js";
|
|
2
|
+
export { CATALOG, getCatalogEntry, getCatalogIconUri } from "./catalog.js";
|
|
3
3
|
export type { CatalogEntry } from "./catalog.js";
|
|
4
4
|
export { CONNECTOR_STATS } from "./stats.js";
|
|
5
5
|
export { detectDefaultAuth, getBaseUrl, getOperations, getServers, isRef, parseOpenApi, resolve, resolveRef, } from "./parse-openapi.js";
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { buildTemplate, buildTemplates } from "./build-template.js";
|
|
2
|
-
export { CATALOG, getCatalogEntry } from "./catalog.js";
|
|
2
|
+
export { CATALOG, getCatalogEntry, getCatalogIconUri } from "./catalog.js";
|
|
3
3
|
export { CONNECTOR_STATS } from "./stats.js";
|
|
4
4
|
export { detectDefaultAuth, getBaseUrl, getOperations, getServers, isRef, parseOpenApi, resolve, resolveRef, } from "./parse-openapi.js";
|
|
5
5
|
export { CONNECTOR_SCHEMA } from "./types.js";
|
|
6
6
|
export { writeTemplates } from "./write-templates.js";
|
|
7
7
|
import { buildTemplates } from "./build-template.js";
|
|
8
|
-
import { CATALOG, getCatalogEntry } from "./catalog.js";
|
|
8
|
+
import { CATALOG, getCatalogEntry, getCatalogIconUri } from "./catalog.js";
|
|
9
9
|
import { detectDefaultAuth, getOperations, parseOpenApi } from "./parse-openapi.js";
|
|
10
10
|
import { writeTemplates } from "./write-templates.js";
|
|
11
11
|
/**
|
|
@@ -47,6 +47,7 @@ export async function generateFromCatalog(id, overrides = {}) {
|
|
|
47
47
|
const opts = {
|
|
48
48
|
idPrefix: overrides.idPrefix ?? entry.idPrefix,
|
|
49
49
|
defaultAuthType: overrides.defaultAuthType ?? entry.defaultAuth,
|
|
50
|
+
icon: overrides.icon ?? getCatalogIconUri(id),
|
|
50
51
|
...overrides,
|
|
51
52
|
};
|
|
52
53
|
const { templates, files } = await generateFromUrl(entry.url, opts);
|
package/dist/types.d.ts
CHANGED
|
@@ -236,6 +236,8 @@ export interface GeneratorOptions {
|
|
|
236
236
|
filter?: string;
|
|
237
237
|
/** Pre-select a specific auth type */
|
|
238
238
|
defaultAuthType?: AuthHint;
|
|
239
|
+
/** Icon data URI (e.g. "data:image/svg+xml;base64,...") applied to all generated templates */
|
|
240
|
+
icon?: string;
|
|
239
241
|
}
|
|
240
242
|
export interface WriteOptions {
|
|
241
243
|
outputDir: string;
|