@jerome-benoit/sap-ai-provider-v2 4.4.0 → 4.4.2

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 (26) hide show
  1. package/dist/{chunk-VVMCHBH6.js → chunk-P4R4VKQB.js} +68 -6
  2. package/dist/chunk-P4R4VKQB.js.map +1 -0
  3. package/dist/{chunk-HRARBIFX.js → chunk-Y6KV3MOM.js} +9 -5
  4. package/dist/chunk-Y6KV3MOM.js.map +1 -0
  5. package/dist/{foundation-models-embedding-model-strategy-UWHFRSAZ.js → foundation-models-embedding-model-strategy-4PYAMRSI.js} +15 -37
  6. package/dist/foundation-models-embedding-model-strategy-4PYAMRSI.js.map +1 -0
  7. package/dist/{foundation-models-language-model-strategy-6Z3M5VEF.js → foundation-models-language-model-strategy-POJJ2ZV6.js} +9 -10
  8. package/dist/foundation-models-language-model-strategy-POJJ2ZV6.js.map +1 -0
  9. package/dist/index.cjs +100 -114
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +5 -3
  12. package/dist/index.d.ts +5 -3
  13. package/dist/index.js +6 -8
  14. package/dist/index.js.map +1 -1
  15. package/dist/{orchestration-embedding-model-strategy-6VTQ2BBR.js → orchestration-embedding-model-strategy-L3JBSV6J.js} +10 -9
  16. package/dist/orchestration-embedding-model-strategy-L3JBSV6J.js.map +1 -0
  17. package/dist/{orchestration-language-model-strategy-ZWI47D67.js → orchestration-language-model-strategy-N7YDZS5H.js} +5 -7
  18. package/dist/{orchestration-language-model-strategy-ZWI47D67.js.map → orchestration-language-model-strategy-N7YDZS5H.js.map} +1 -1
  19. package/package.json +4 -4
  20. package/dist/chunk-F3R75MRP.js +0 -65
  21. package/dist/chunk-F3R75MRP.js.map +0 -1
  22. package/dist/chunk-HRARBIFX.js.map +0 -1
  23. package/dist/chunk-VVMCHBH6.js.map +0 -1
  24. package/dist/foundation-models-embedding-model-strategy-UWHFRSAZ.js.map +0 -1
  25. package/dist/foundation-models-language-model-strategy-6Z3M5VEF.js.map +0 -1
  26. package/dist/orchestration-embedding-model-strategy-6VTQ2BBR.js.map +0 -1
@@ -26269,7 +26269,7 @@ var require_axios = __commonJS({
26269
26269
  var isNumber = typeOfTest("number");
26270
26270
  var isObject = (thing) => thing !== null && typeof thing === "object";
26271
26271
  var isBoolean = (thing) => thing === true || thing === false;
26272
- var isPlainObject = (val) => {
26272
+ var isPlainObject2 = (val) => {
26273
26273
  if (kindOf(val) !== "object") {
26274
26274
  return false;
26275
26275
  }
@@ -26351,9 +26351,9 @@ var require_axios = __commonJS({
26351
26351
  const result = {};
26352
26352
  const assignValue = (val, key) => {
26353
26353
  const targetKey = caseless && findKey(result, key) || key;
26354
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
26354
+ if (isPlainObject2(result[targetKey]) && isPlainObject2(val)) {
26355
26355
  result[targetKey] = merge(result[targetKey], val);
26356
- } else if (isPlainObject(val)) {
26356
+ } else if (isPlainObject2(val)) {
26357
26357
  result[targetKey] = merge({}, val);
26358
26358
  } else if (isArray(val)) {
26359
26359
  result[targetKey] = val.slice();
@@ -26585,7 +26585,7 @@ var require_axios = __commonJS({
26585
26585
  isNumber,
26586
26586
  isBoolean,
26587
26587
  isObject,
26588
- isPlainObject,
26588
+ isPlainObject: isPlainObject2,
26589
26589
  isEmptyObject,
26590
26590
  isReadableStream,
26591
26591
  isRequest,
@@ -29841,6 +29841,67 @@ var sapAIEmbeddingProviderOptions = lazySchema(
29841
29841
  )
29842
29842
  );
29843
29843
 
29844
+ // src/deep-merge.ts
29845
+ var DANGEROUS_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
29846
+ var MAX_DEPTH = 100;
29847
+ function deepMerge(...sources) {
29848
+ return mergeInternal(sources);
29849
+ }
29850
+ function cloneDeep(obj, seen, depth) {
29851
+ if (depth > MAX_DEPTH) {
29852
+ throw new Error("Maximum merge depth exceeded");
29853
+ }
29854
+ if (seen.has(obj)) {
29855
+ throw new Error("Circular reference detected during deep merge");
29856
+ }
29857
+ seen.add(obj);
29858
+ const result = {};
29859
+ for (const key of Object.keys(obj)) {
29860
+ if (!isSafeKey(key)) continue;
29861
+ const value = obj[key];
29862
+ result[key] = isPlainObject(value) ? cloneDeep(value, seen, depth + 1) : value;
29863
+ }
29864
+ return result;
29865
+ }
29866
+ function isPlainObject(value) {
29867
+ if (value === null || typeof value !== "object") return false;
29868
+ const proto = Object.getPrototypeOf(value);
29869
+ return proto === Object.prototype || proto === null;
29870
+ }
29871
+ function isSafeKey(key) {
29872
+ return !DANGEROUS_KEYS.has(key);
29873
+ }
29874
+ function mergeInternal(sources) {
29875
+ let result = {};
29876
+ for (const source of sources) {
29877
+ if (source == null) continue;
29878
+ result = mergeTwo(result, source, /* @__PURE__ */ new WeakSet(), 0);
29879
+ }
29880
+ return result;
29881
+ }
29882
+ function mergeTwo(target, source, seen, depth) {
29883
+ if (depth > MAX_DEPTH) {
29884
+ throw new Error("Maximum merge depth exceeded");
29885
+ }
29886
+ if (seen.has(source)) {
29887
+ throw new Error("Circular reference detected during deep merge");
29888
+ }
29889
+ seen.add(source);
29890
+ for (const key of Object.keys(source)) {
29891
+ if (!isSafeKey(key)) continue;
29892
+ const sourceValue = source[key];
29893
+ const targetValue = target[key];
29894
+ if (isPlainObject(sourceValue) && isPlainObject(targetValue)) {
29895
+ target[key] = mergeTwo({ ...targetValue }, sourceValue, seen, depth + 1);
29896
+ } else if (isPlainObject(sourceValue)) {
29897
+ target[key] = cloneDeep(sourceValue, seen, depth + 1);
29898
+ } else {
29899
+ target[key] = sourceValue;
29900
+ }
29901
+ }
29902
+ return target;
29903
+ }
29904
+
29844
29905
  // src/sap-ai-error.ts
29845
29906
  var import_util = __toESM(require_dist(), 1);
29846
29907
  import { APICallError, LoadAPIKeyError, NoSuchModelError } from "@ai-sdk/provider";
@@ -30313,7 +30374,7 @@ function tryExtractSAPErrorFromMessage(message) {
30313
30374
  }
30314
30375
 
30315
30376
  // src/version.ts
30316
- var VERSION = true ? "4.4.0" : "0.0.0-test";
30377
+ var VERSION = true ? "4.4.2" : "0.0.0-test";
30317
30378
 
30318
30379
  export {
30319
30380
  __toESM,
@@ -30324,6 +30385,7 @@ export {
30324
30385
  validateModelParamsWithWarnings,
30325
30386
  sapAILanguageModelProviderOptions,
30326
30387
  sapAIEmbeddingProviderOptions,
30388
+ deepMerge,
30327
30389
  require_dist,
30328
30390
  ApiSwitchError,
30329
30391
  UnsupportedFeatureError,
@@ -30364,4 +30426,4 @@ mime-types/index.js:
30364
30426
  axios/dist/node/axios.cjs:
30365
30427
  (*! Axios v1.13.4 Copyright (c) 2026 Matt Zabriskie and contributors *)
30366
30428
  */
30367
- //# sourceMappingURL=chunk-VVMCHBH6.js.map
30429
+ //# sourceMappingURL=chunk-P4R4VKQB.js.map