@decaf-ts/integrations 0.5.0 → 0.6.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.
Files changed (88) hide show
  1. package/dist/integrations.cjs +1 -1
  2. package/docker/keycloak-broker-compose.yml +128 -0
  3. package/docker/traefik-broker.yml +51 -0
  4. package/eslint.config.js +1 -0
  5. package/lib/cjs/graph/engine/errors/GraphBreakSignal.cjs +37 -0
  6. package/lib/cjs/graph/engine/errors/GraphBreakSignal.cjs.map +1 -0
  7. package/lib/cjs/graph/engine/errors/index.cjs +1 -0
  8. package/lib/cjs/graph/engine/errors/index.cjs.map +1 -1
  9. package/lib/cjs/graph/engine/execution/BreakGraphNodeExecutor.cjs +24 -0
  10. package/lib/cjs/graph/engine/execution/BreakGraphNodeExecutor.cjs.map +1 -0
  11. package/lib/cjs/graph/engine/execution/index.cjs +1 -0
  12. package/lib/cjs/graph/engine/execution/index.cjs.map +1 -1
  13. package/lib/cjs/graph/engine/index.cjs +2 -0
  14. package/lib/cjs/graph/engine/index.cjs.map +1 -1
  15. package/lib/cjs/graph/engine/loops/ForeachGraphNodeExecutor.cjs +51 -16
  16. package/lib/cjs/graph/engine/loops/ForeachGraphNodeExecutor.cjs.map +1 -1
  17. package/lib/cjs/graph/shared/nodes/flow-control.cjs +39 -1
  18. package/lib/cjs/graph/shared/nodes/flow-control.cjs.map +1 -1
  19. package/lib/cjs/index.cjs +3 -3
  20. package/lib/cjs/keycloak/broker.cjs +22 -0
  21. package/lib/cjs/keycloak/broker.cjs.map +1 -0
  22. package/lib/cjs/keycloak/index.cjs +1 -0
  23. package/lib/cjs/keycloak/index.cjs.map +1 -1
  24. package/lib/cjs/keycloak/services/KeycloakIdentityProviderService.cjs +69 -0
  25. package/lib/cjs/keycloak/services/KeycloakIdentityProviderService.cjs.map +1 -1
  26. package/lib/cjs/keycloak/services/KeycloakService.cjs +4 -0
  27. package/lib/cjs/keycloak/services/KeycloakService.cjs.map +1 -1
  28. package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs +5 -0
  29. package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs.map +1 -1
  30. package/lib/cjs/plugins/superset/templates.cjs +12 -18
  31. package/lib/cjs/plugins/superset/templates.cjs.map +1 -1
  32. package/lib/esm/graph/engine/errors/GraphBreakSignal.js +32 -0
  33. package/lib/esm/graph/engine/errors/GraphBreakSignal.js.map +1 -0
  34. package/lib/esm/graph/engine/errors/index.js +1 -0
  35. package/lib/esm/graph/engine/errors/index.js.map +1 -1
  36. package/lib/esm/graph/engine/execution/BreakGraphNodeExecutor.js +19 -0
  37. package/lib/esm/graph/engine/execution/BreakGraphNodeExecutor.js.map +1 -0
  38. package/lib/esm/graph/engine/execution/index.js +1 -0
  39. package/lib/esm/graph/engine/execution/index.js.map +1 -1
  40. package/lib/esm/graph/engine/index.js +2 -0
  41. package/lib/esm/graph/engine/index.js.map +1 -1
  42. package/lib/esm/graph/engine/loops/ForeachGraphNodeExecutor.js +51 -16
  43. package/lib/esm/graph/engine/loops/ForeachGraphNodeExecutor.js.map +1 -1
  44. package/lib/esm/graph/shared/nodes/flow-control.js +38 -0
  45. package/lib/esm/graph/shared/nodes/flow-control.js.map +1 -1
  46. package/lib/esm/index.js +3 -3
  47. package/lib/esm/keycloak/broker.js +17 -0
  48. package/lib/esm/keycloak/broker.js.map +1 -0
  49. package/lib/esm/keycloak/index.js +1 -0
  50. package/lib/esm/keycloak/index.js.map +1 -1
  51. package/lib/esm/keycloak/services/KeycloakIdentityProviderService.js +68 -0
  52. package/lib/esm/keycloak/services/KeycloakIdentityProviderService.js.map +1 -1
  53. package/lib/esm/keycloak/services/KeycloakService.js +4 -0
  54. package/lib/esm/keycloak/services/KeycloakService.js.map +1 -1
  55. package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js +6 -1
  56. package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js.map +1 -1
  57. package/lib/esm/plugins/superset/templates.js +12 -18
  58. package/lib/esm/plugins/superset/templates.js.map +1 -1
  59. package/lib/types/graph/engine/errors/GraphBreakSignal.d.cts +28 -0
  60. package/lib/types/graph/engine/errors/GraphBreakSignal.d.mts +28 -0
  61. package/lib/types/graph/engine/errors/index.d.cts +1 -0
  62. package/lib/types/graph/engine/errors/index.d.mts +1 -0
  63. package/lib/types/graph/engine/execution/BreakGraphNodeExecutor.d.cts +22 -0
  64. package/lib/types/graph/engine/execution/BreakGraphNodeExecutor.d.mts +22 -0
  65. package/lib/types/graph/engine/execution/index.d.cts +1 -0
  66. package/lib/types/graph/engine/execution/index.d.mts +1 -0
  67. package/lib/types/graph/engine/index.d.cts +2 -0
  68. package/lib/types/graph/engine/index.d.mts +2 -0
  69. package/lib/types/graph/engine/loops/ForeachGraphNodeExecutor.d.cts +11 -3
  70. package/lib/types/graph/engine/loops/ForeachGraphNodeExecutor.d.mts +11 -3
  71. package/lib/types/graph/engine/types.d.cts +6 -0
  72. package/lib/types/graph/engine/types.d.mts +6 -0
  73. package/lib/types/graph/shared/nodes/flow-control.d.cts +12 -1
  74. package/lib/types/graph/shared/nodes/flow-control.d.mts +12 -1
  75. package/lib/types/index.d.cts +2 -2
  76. package/lib/types/index.d.mts +2 -2
  77. package/lib/types/keycloak/broker.d.cts +6 -0
  78. package/lib/types/keycloak/broker.d.mts +6 -0
  79. package/lib/types/keycloak/index.d.cts +1 -0
  80. package/lib/types/keycloak/index.d.mts +1 -0
  81. package/lib/types/keycloak/services/KeycloakIdentityProviderService.d.cts +4 -1
  82. package/lib/types/keycloak/services/KeycloakIdentityProviderService.d.mts +4 -1
  83. package/lib/types/keycloak/services/KeycloakService.d.cts +2 -1
  84. package/lib/types/keycloak/services/KeycloakService.d.mts +2 -1
  85. package/lib/types/keycloak/types.d.cts +52 -0
  86. package/lib/types/keycloak/types.d.mts +52 -0
  87. package/package.json +4 -1
  88. package/plugins/superset/Dockerfile +9 -9
@@ -90,6 +90,58 @@ export interface KeycloakUserConfigOverrides {
90
90
  export interface KeycloakIdentityProviderConfigOverrides {
91
91
  payload?: Partial<Record<string, unknown>>;
92
92
  }
93
+ export type KeycloakBrokerProtocol = "oidc" | "saml";
94
+ export type KeycloakBrokerClientAuthMethod = "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | "none";
95
+ export interface KeycloakBrokerIdentityProviderConfig {
96
+ alias: string;
97
+ displayName: string;
98
+ protocol: KeycloakBrokerProtocol;
99
+ upstreamIssuer?: string;
100
+ discoveryUrl?: string;
101
+ clientId?: string;
102
+ clientSecret?: string;
103
+ clientAuthMethod?: KeycloakBrokerClientAuthMethod;
104
+ clientAssertionSigningAlg?: string;
105
+ clientAssertionAudience?: string;
106
+ defaultScopes?: string;
107
+ firstBrokerLoginFlowAlias?: string;
108
+ postBrokerLoginFlowAlias?: string;
109
+ trustEmail?: boolean;
110
+ storeToken?: boolean;
111
+ linkOnly?: boolean;
112
+ hideOnLogin?: boolean;
113
+ authenticateByDefault?: boolean;
114
+ enabled?: boolean;
115
+ config?: Record<string, string>;
116
+ saml?: {
117
+ entityId: string;
118
+ singleSignOnServiceUrl: string;
119
+ singleLogoutServiceUrl?: string;
120
+ signingCertificate?: string;
121
+ nameIdPolicyFormat?: string;
122
+ principalAttribute?: string;
123
+ signatureAlgorithm?: string;
124
+ postBindingResponse?: boolean;
125
+ postBindingAuthnRequest?: boolean;
126
+ wantAuthnRequestsSigned?: boolean;
127
+ };
128
+ }
129
+ /**
130
+ * Separate setup contract for realms that are configured around an upstream
131
+ * broker. It intentionally does not widen or alter the legacy setup type.
132
+ */
133
+ export interface KeycloakBrokerSetupConfig {
134
+ id: string;
135
+ host: string;
136
+ protocol: "http" | "https";
137
+ rootApiUser?: KeycloakUser;
138
+ adminApiUser?: KeycloakUser;
139
+ realmApiUser?: KeycloakUser;
140
+ client: KeycloakClientConfig;
141
+ broker: KeycloakBrokerIdentityProviderConfig;
142
+ realmConfig?: KeycloakRealmConfig;
143
+ useCompositeRoles?: boolean;
144
+ }
93
145
  export interface KeycloakSetupConfig {
94
146
  id: string;
95
147
  host: string;
@@ -90,6 +90,58 @@ export interface KeycloakUserConfigOverrides {
90
90
  export interface KeycloakIdentityProviderConfigOverrides {
91
91
  payload?: Partial<Record<string, unknown>>;
92
92
  }
93
+ export type KeycloakBrokerProtocol = "oidc" | "saml";
94
+ export type KeycloakBrokerClientAuthMethod = "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | "none";
95
+ export interface KeycloakBrokerIdentityProviderConfig {
96
+ alias: string;
97
+ displayName: string;
98
+ protocol: KeycloakBrokerProtocol;
99
+ upstreamIssuer?: string;
100
+ discoveryUrl?: string;
101
+ clientId?: string;
102
+ clientSecret?: string;
103
+ clientAuthMethod?: KeycloakBrokerClientAuthMethod;
104
+ clientAssertionSigningAlg?: string;
105
+ clientAssertionAudience?: string;
106
+ defaultScopes?: string;
107
+ firstBrokerLoginFlowAlias?: string;
108
+ postBrokerLoginFlowAlias?: string;
109
+ trustEmail?: boolean;
110
+ storeToken?: boolean;
111
+ linkOnly?: boolean;
112
+ hideOnLogin?: boolean;
113
+ authenticateByDefault?: boolean;
114
+ enabled?: boolean;
115
+ config?: Record<string, string>;
116
+ saml?: {
117
+ entityId: string;
118
+ singleSignOnServiceUrl: string;
119
+ singleLogoutServiceUrl?: string;
120
+ signingCertificate?: string;
121
+ nameIdPolicyFormat?: string;
122
+ principalAttribute?: string;
123
+ signatureAlgorithm?: string;
124
+ postBindingResponse?: boolean;
125
+ postBindingAuthnRequest?: boolean;
126
+ wantAuthnRequestsSigned?: boolean;
127
+ };
128
+ }
129
+ /**
130
+ * Separate setup contract for realms that are configured around an upstream
131
+ * broker. It intentionally does not widen or alter the legacy setup type.
132
+ */
133
+ export interface KeycloakBrokerSetupConfig {
134
+ id: string;
135
+ host: string;
136
+ protocol: "http" | "https";
137
+ rootApiUser?: KeycloakUser;
138
+ adminApiUser?: KeycloakUser;
139
+ realmApiUser?: KeycloakUser;
140
+ client: KeycloakClientConfig;
141
+ broker: KeycloakBrokerIdentityProviderConfig;
142
+ realmConfig?: KeycloakRealmConfig;
143
+ useCompositeRoles?: boolean;
144
+ }
93
145
  export interface KeycloakSetupConfig {
94
146
  id: string;
95
147
  host: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/integrations",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.mts",
@@ -313,6 +313,9 @@
313
313
  "reset": "rm -rf * && git checkout . && git pull && npm run do-install",
314
314
  "build": "build-scripts --dev",
315
315
  "build:prod": "build-scripts --prod",
316
+ "boot:plugins:kibana": "npm run build && node ./bin/boot-plugin.mjs kibana 8.14.3",
317
+ "boot:plugins:superset": "npm run build && node ./bin/boot-plugin.mjs superset 6.1.0",
318
+ "boot:plugins": "npm run boot:plugins:kibana && npm run boot:plugins:superset",
316
319
  "test": "npm run build && NODE_OPTIONS=\"--experimental-vm-modules\" jest --watchman=false --runInBand --coverage --detectOpenHandles",
317
320
  "test:unit": "NODE_OPTIONS=\"--experimental-vm-modules\" jest --watchman=false --testPathPatterns=\"/tests/unit\" --passWithNoTests --detectOpenHandles",
318
321
  "test:integration": "NODE_OPTIONS=\"--experimental-vm-modules\" jest --watchman=false --testPathPatterns=\"/tests/(integration)\" --passWithNoTests --detectOpenHandles",
@@ -8,10 +8,10 @@
8
8
  # - org_dashboard_embed_superset/ (generated by install())
9
9
  # - superset_config.py (curated runtime config)
10
10
  #
11
- FROM node:18-slim AS builder
11
+ FROM node:22-slim AS builder
12
12
 
13
13
  RUN apt-get update && apt-get install -y --no-install-recommends \
14
- git python3 python3-pip curl bash \
14
+ git python3 python3-pip curl bash zstd \
15
15
  && rm -rf /var/lib/apt/lists/*
16
16
 
17
17
  WORKDIR /build
@@ -38,10 +38,10 @@ RUN cd /build/superset/superset-embedded-sdk && npm ci && npm run build
38
38
  RUN cd /build/superset/superset-frontend && npm ci && npm run build
39
39
 
40
40
  # ─── Runtime stage ──────────────────────────────────────────────────────
41
- FROM node:18-slim AS runtime
41
+ FROM node:22-slim AS runtime
42
42
 
43
43
  RUN apt-get update && apt-get install -y --no-install-recommends \
44
- python3 python3-pip python3-venv curl bash \
44
+ python3 python3-pip python3-venv curl bash zstd \
45
45
  && rm -rf /var/lib/apt/lists/*
46
46
 
47
47
  RUN python3 -m venv /app/venv
@@ -55,7 +55,8 @@ RUN pip install --no-cache-dir \
55
55
  psycopg2-binary \
56
56
  celery \
57
57
  redis \
58
- gunicorn
58
+ gunicorn \
59
+ rich
59
60
 
60
61
  # Copy built frontend assets from builder
61
62
  COPY --from=builder /build/superset/superset-frontend/ /app/superset-frontend/
@@ -71,9 +72,8 @@ ENV FLASK_APP=superset
71
72
 
72
73
  EXPOSE 8088
73
74
 
74
- # Initialize Superset
75
- RUN superset db upgrade && \
76
- superset fab create-admin --username admin --firstname Admin --lastname User --email admin@example.com --password admin || true && \
77
- superset init
75
+ COPY entrypoint.sh /app/entrypoint.sh
76
+ RUN chmod +x /app/entrypoint.sh
78
77
 
78
+ ENTRYPOINT ["/app/entrypoint.sh"]
79
79
  CMD ["gunicorn", "-b", "0.0.0.0:8088", "-w", "4", "--timeout", "120", "superset.app:create_app()"]