@camunda8/orchestration-cluster-api 1.1.4 → 1.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/CHANGELOG.md CHANGED
@@ -1,13 +1,25 @@
1
- ## [1.1.4](https://github.com/camunda/orchestration-cluster-api-js/compare/v1.1.3...v1.1.4) (2025-11-13)
1
+ # [1.2.0](https://github.com/camunda/orchestration-cluster-api-js/compare/v1.1.5...v1.2.0) (2025-11-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * add silly level logging ([a8a4aad](https://github.com/camunda/orchestration-cluster-api-js/commit/a8a4aadd3556d5c441d63d2a9b3943a68dc747e5))
2
7
 
8
+ ## [1.1.5](https://github.com/camunda/orchestration-cluster-api-js/compare/v1.1.4...v1.1.5) (2025-11-13)
9
+
10
+ ### Bug Fixes
11
+
12
+ - use creds from SaaS correctly. fixes [#28](https://github.com/camunda/orchestration-cluster-api-js/issues/28) ([348bc9e](https://github.com/camunda/orchestration-cluster-api-js/commit/348bc9e3916b7a549ddd17215cd4367877805216))
13
+
14
+ ## [1.1.4](https://github.com/camunda/orchestration-cluster-api-js/compare/v1.1.3...v1.1.4) (2025-11-13)
3
15
 
4
16
  ### Bug Fixes
5
17
 
6
- * **ci:** prevent BUILDINFO drift from parallel matrix jobs ([45edce6](https://github.com/camunda/orchestration-cluster-api-js/commit/45edce610714cf8cb51ca31833f5469bc925085b))
7
- * **gen:** regenerate artifacts ([da77e80](https://github.com/camunda/orchestration-cluster-api-js/commit/da77e809ca58c41f5486c392e46d6ad43954a369))
8
- * mark methods experimental ([f88a8cd](https://github.com/camunda/orchestration-cluster-api-js/commit/f88a8cd6689774ff5cb08c279b04f788d2298375))
9
- * remove pre-release note ([0c3c26d](https://github.com/camunda/orchestration-cluster-api-js/commit/0c3c26d4b674a33aa5f1a3e9c68f131f90411729))
10
- * update dependencies ([faacf92](https://github.com/camunda/orchestration-cluster-api-js/commit/faacf92d995add72bcbc41e9740b9bf746b714e3))
18
+ - **ci:** prevent BUILDINFO drift from parallel matrix jobs ([45edce6](https://github.com/camunda/orchestration-cluster-api-js/commit/45edce610714cf8cb51ca31833f5469bc925085b))
19
+ - **gen:** regenerate artifacts ([da77e80](https://github.com/camunda/orchestration-cluster-api-js/commit/da77e809ca58c41f5486c392e46d6ad43954a369))
20
+ - mark methods experimental ([f88a8cd](https://github.com/camunda/orchestration-cluster-api-js/commit/f88a8cd6689774ff5cb08c279b04f788d2298375))
21
+ - remove pre-release note ([0c3c26d](https://github.com/camunda/orchestration-cluster-api-js/commit/0c3c26d4b674a33aa5f1a3e9c68f131f90411729))
22
+ - update dependencies ([faacf92](https://github.com/camunda/orchestration-cluster-api-js/commit/faacf92d995add72bcbc41e9740b9bf746b714e3))
11
23
 
12
24
  ## [1.1.3](https://github.com/camunda/orchestration-cluster-api-js/compare/v1.1.2...v1.1.3) (2025-11-10)
13
25
 
package/README.md CHANGED
@@ -806,6 +806,10 @@ To enable debug logs via env:
806
806
  CAMUNDA_SDK_LOG_LEVEL=debug
807
807
  ```
808
808
 
809
+ ### Unsafe Deep Diagnostics (`silly`)
810
+
811
+ Setting `CAMUNDA_SDK_LOG_LEVEL=silly` enables the deepest diagnostics. In addition to everything at `trace`, the SDK will emit HTTP request and response body previews for all HTTP methods under the `telemetry` scope (log line contains `http.body`). This can leak sensitive information (secrets, PII). A warning (`log.level.silly.enabled`) is emitted on client construction. Use only for short‑lived local debugging; never enable in production or share captured logs externally. Body output is truncated (max ~4KB) and form-data parts identify uploaded files as `[File]`.
812
+
809
813
  ### Bring Your Own Logger
810
814
 
811
815
  Provide a `transport` function to forward structured `LogEvent` objects into any logging library.
@@ -2,7 +2,7 @@ import {
2
2
  __export,
3
3
  __require,
4
4
  createLogger
5
- } from "./chunk-IEZVLX66.js";
5
+ } from "./chunk-W6JB7JZH.js";
6
6
 
7
7
  // src/runtime/errors.ts
8
8
  function isSdkError(e) {
@@ -8864,9 +8864,9 @@ var SCHEMA = {
8864
8864
  },
8865
8865
  CAMUNDA_SDK_LOG_LEVEL: {
8866
8866
  type: "enum",
8867
- choices: ["silent", "error", "warn", "info", "debug", "trace"],
8867
+ choices: ["silent", "error", "warn", "info", "debug", "trace", "silly"],
8868
8868
  default: "error",
8869
- doc: "SDK log level."
8869
+ doc: 'SDK log level. "silly" adds unsafe deep diagnostics including HTTP request and response bodies.'
8870
8870
  },
8871
8871
  CAMUNDA_SDK_TELEMETRY_LOG: {
8872
8872
  type: "boolean",
@@ -9094,6 +9094,7 @@ function hydrateConfig(options = {}) {
9094
9094
  provided[k] = baseEnv[k].trim();
9095
9095
  }
9096
9096
  }
9097
+ const userSetStrategy = provided["CAMUNDA_AUTH_STRATEGY"] !== void 0 && provided["CAMUNDA_AUTH_STRATEGY"].trim() !== "";
9097
9098
  const parseErrors = [];
9098
9099
  function boolParserFactory(key) {
9099
9100
  return (v) => {
@@ -9158,6 +9159,12 @@ function hydrateConfig(options = {}) {
9158
9159
  if (envInput["CAMUNDA_SUPPORT_LOG_ENABLED"] === void 0 && envInput["CAMUNDA_SUPPORT_LOGGER"] !== void 0) {
9159
9160
  envInput["CAMUNDA_SUPPORT_LOG_ENABLED"] = envInput["CAMUNDA_SUPPORT_LOGGER"];
9160
9161
  }
9162
+ if (envInput["CAMUNDA_REST_ADDRESS"] === void 0 && baseEnv["ZEEBE_REST_ADDRESS"] !== void 0 && baseEnv["ZEEBE_REST_ADDRESS"].trim() !== "") {
9163
+ envInput["CAMUNDA_REST_ADDRESS"] = baseEnv["ZEEBE_REST_ADDRESS"].trim();
9164
+ }
9165
+ if ((envInput["CAMUNDA_AUTH_STRATEGY"] === void 0 || envInput["CAMUNDA_AUTH_STRATEGY"].trim() === "") && envInput["CAMUNDA_OAUTH_URL"] !== void 0 && envInput["CAMUNDA_OAUTH_URL"].trim() !== "" && envInput["CAMUNDA_CLIENT_ID"] !== void 0 && envInput["CAMUNDA_CLIENT_ID"].trim() !== "" && envInput["CAMUNDA_CLIENT_SECRET"] !== void 0 && envInput["CAMUNDA_CLIENT_SECRET"].trim() !== "") {
9166
+ envInput["CAMUNDA_AUTH_STRATEGY"] = "OAUTH";
9167
+ }
9161
9168
  let envTyped = {};
9162
9169
  envTyped = createEnv(typedEnvSchema, { env: envInput });
9163
9170
  for (const k of allKeys()) {
@@ -9171,6 +9178,9 @@ function hydrateConfig(options = {}) {
9171
9178
  rawMap[k] = String(entry.default);
9172
9179
  }
9173
9180
  }
9181
+ if (!userSetStrategy && rawMap["CAMUNDA_AUTH_STRATEGY"] === "NONE" && rawMap["CAMUNDA_OAUTH_URL"] && rawMap["CAMUNDA_OAUTH_URL"].trim() !== "" && rawMap["CAMUNDA_CLIENT_ID"] && rawMap["CAMUNDA_CLIENT_ID"].trim() !== "" && rawMap["CAMUNDA_CLIENT_SECRET"] && rawMap["CAMUNDA_CLIENT_SECRET"].trim() !== "") {
9182
+ rawMap["CAMUNDA_AUTH_STRATEGY"] = "OAUTH";
9183
+ }
9174
9184
  const authStrategyRaw = (rawMap["CAMUNDA_AUTH_STRATEGY"] || "NONE").toString();
9175
9185
  const authStrategy = authStrategyRaw.trim().toUpperCase();
9176
9186
  if (!["NONE", "OAUTH", "BASIC"].includes(authStrategy)) {
@@ -9614,7 +9624,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
9614
9624
  }
9615
9625
 
9616
9626
  // src/runtime/version.ts
9617
- var packageVersion = "1.1.4";
9627
+ var packageVersion = "1.2.0";
9618
9628
 
9619
9629
  // src/runtime/supportLogger.ts
9620
9630
  var NoopSupportLogger = class {
@@ -9815,6 +9825,46 @@ function wrapFetch(orig, opts) {
9815
9825
  const requestId = "r" + (++globalRequestCounter).toString(36);
9816
9826
  const correlationId = opts.correlation ? opts.correlation() : void 0;
9817
9827
  const start = Date.now();
9828
+ let bodyPreview;
9829
+ try {
9830
+ const lvl = logger?.level?.();
9831
+ if (lvl === "silly" && (method === "POST" || method === "PUT" || method === "PATCH")) {
9832
+ let body = init?.body;
9833
+ if (body === void 0 && typeof Request !== "undefined" && input instanceof Request) {
9834
+ try {
9835
+ body = await input.clone().text();
9836
+ } catch {
9837
+ body = void 0;
9838
+ }
9839
+ }
9840
+ if (body !== void 0 && body !== null) {
9841
+ if (typeof body === "string") bodyPreview = body;
9842
+ else if (body instanceof URLSearchParams) bodyPreview = body.toString();
9843
+ else if (typeof FormData !== "undefined" && body instanceof FormData) {
9844
+ const entries = [];
9845
+ for (const [k, v] of body.entries()) {
9846
+ entries.push(`${k}=${typeof v === "string" ? v.slice(0, 200) : "[File]"}`);
9847
+ }
9848
+ bodyPreview = entries.join("&");
9849
+ } else if (body instanceof Blob) {
9850
+ bodyPreview = `[Blob size=${body.size}]`;
9851
+ } else if (body instanceof ArrayBuffer) {
9852
+ bodyPreview = `[ArrayBuffer byteLength=${body.byteLength}]`;
9853
+ } else if (body instanceof Uint8Array) {
9854
+ bodyPreview = `[Uint8Array length=${body.length}]`;
9855
+ } else if (typeof body === "object") {
9856
+ try {
9857
+ bodyPreview = JSON.stringify(body).slice(0, 4e3);
9858
+ } catch {
9859
+ bodyPreview = "[Unstringifiable object body]";
9860
+ }
9861
+ }
9862
+ if (bodyPreview && bodyPreview.length > 4e3)
9863
+ bodyPreview = bodyPreview.slice(0, 4e3) + "\u2026";
9864
+ }
9865
+ }
9866
+ } catch {
9867
+ }
9818
9868
  const startEvt = {
9819
9869
  type: "http.start",
9820
9870
  ts: start,
@@ -9827,6 +9877,11 @@ function wrapFetch(orig, opts) {
9827
9877
  try {
9828
9878
  hooks?.beforeRequest?.(startEvt);
9829
9879
  mirrorLog(startEvt);
9880
+ if (bodyPreview && logger?.level?.() === "silly") {
9881
+ logger.silly(() => [
9882
+ `op=${method} ${redactedUrl} http.body requestId=${requestId} size=${bodyPreview.length} preview=${bodyPreview}`
9883
+ ]);
9884
+ }
9830
9885
  } catch {
9831
9886
  }
9832
9887
  try {
@@ -9848,6 +9903,44 @@ function wrapFetch(orig, opts) {
9848
9903
  mirrorLog(endEvt);
9849
9904
  } catch {
9850
9905
  }
9906
+ try {
9907
+ if (logger?.level?.() === "silly") {
9908
+ let respPreview;
9909
+ const cloned = res.clone();
9910
+ const ctype = cloned.headers.get("Content-Type") || "";
9911
+ let originalSize;
9912
+ if (/^(application\/json|text\/)/i.test(ctype)) {
9913
+ try {
9914
+ const text = await cloned.text();
9915
+ originalSize = text.length;
9916
+ respPreview = text.slice(0, 4e3);
9917
+ if (text.length > 4e3) respPreview += "\u2026";
9918
+ } catch {
9919
+ respPreview = void 0;
9920
+ }
9921
+ } else if (/multipart\//i.test(ctype)) {
9922
+ respPreview = "[multipart body omitted]";
9923
+ } else if (/octet-stream|binary/i.test(ctype)) {
9924
+ respPreview = "[binary body omitted]";
9925
+ } else {
9926
+ try {
9927
+ const text = await cloned.text();
9928
+ if (text) {
9929
+ originalSize = text.length;
9930
+ respPreview = text.slice(0, 200);
9931
+ if (text.length > 200) respPreview += "\u2026";
9932
+ }
9933
+ } catch {
9934
+ }
9935
+ }
9936
+ if (respPreview) {
9937
+ logger.silly(() => [
9938
+ `op=${method} ${redactedUrl} http.response requestId=${requestId} status=${res.status} size=${originalSize} preview=${respPreview}`
9939
+ ]);
9940
+ }
9941
+ }
9942
+ } catch {
9943
+ }
9851
9944
  try {
9852
9945
  const opName = `${endEvt.method} ${endEvt.url}`;
9853
9946
  opts.supportLogger?.log(
@@ -10650,7 +10743,7 @@ var CamundaClient = class {
10650
10743
  });
10651
10744
  } else if (
10652
10745
  // Auto-enable mirror telemetry when trace level and user did not explicitly set CAMUNDA_SDK_TELEMETRY_LOG to a disabling value.
10653
- this._log.level() === "trace" && !this._config.telemetry?.log && // No explicit override provided
10746
+ /^(trace|silly)$/.test(this._log.level()) && !this._config.telemetry?.log && // No explicit override provided
10654
10747
  this._overrides["CAMUNDA_SDK_TELEMETRY_LOG"] === void 0 && // And env var either absent or truthy enabling value
10655
10748
  (typeof process === "undefined" || process.env["CAMUNDA_SDK_TELEMETRY_LOG"] === void 0 || /^(1|true|yes|on)$/i.test(process.env["CAMUNDA_SDK_TELEMETRY_LOG"] || ""))
10656
10749
  ) {
@@ -10667,6 +10760,12 @@ var CamundaClient = class {
10667
10760
  fetch: this._fetch,
10668
10761
  throwOnError: opts.throwOnError !== false
10669
10762
  });
10763
+ if (this._log.level() === "silly") {
10764
+ this._log.warn(
10765
+ "log.level.silly.enabled",
10766
+ "HTTP request and response bodies will be logged; this may leak sensitive information. Use only for local debugging."
10767
+ );
10768
+ }
10670
10769
  installAuthInterceptor(
10671
10770
  this._client,
10672
10771
  () => this._config.auth.strategy,
@@ -10745,7 +10844,7 @@ var CamundaClient = class {
10745
10844
  supportLogger: this._supportLogger,
10746
10845
  mirrorToLog: true
10747
10846
  });
10748
- } else if (this._log.level() === "trace" && !this._config.telemetry?.log && this._overrides["CAMUNDA_SDK_TELEMETRY_LOG"] === void 0 && (typeof process === "undefined" || process.env["CAMUNDA_SDK_TELEMETRY_LOG"] === void 0 || /^(1|true|yes|on)$/i.test(process.env["CAMUNDA_SDK_TELEMETRY_LOG"] || ""))) {
10847
+ } else if (/^(trace|silly)$/.test(this._log.level()) && !this._config.telemetry?.log && this._overrides["CAMUNDA_SDK_TELEMETRY_LOG"] === void 0 && (typeof process === "undefined" || process.env["CAMUNDA_SDK_TELEMETRY_LOG"] === void 0 || /^(1|true|yes|on)$/i.test(process.env["CAMUNDA_SDK_TELEMETRY_LOG"] || ""))) {
10749
10848
  this._fetch = wrapFetch(this._fetch || fetch, {
10750
10849
  hooks: void 0,
10751
10850
  correlation: this._config.telemetry?.correlation ? () => getCorrelation() : void 0,
@@ -18773,4 +18872,4 @@ export {
18773
18872
  withTimeoutTE,
18774
18873
  eventuallyTE
18775
18874
  };
18776
- //# sourceMappingURL=chunk-7HDBRIEN.js.map
18875
+ //# sourceMappingURL=chunk-7RIALC7K.js.map