@cldmv/slothlet 3.1.0 → 3.2.1

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 (32) hide show
  1. package/AGENT-USAGE.md +129 -0
  2. package/README.md +11 -9
  3. package/dist/lib/builders/api_builder.mjs +99 -4
  4. package/dist/lib/handlers/api-manager.mjs +179 -14
  5. package/dist/lib/handlers/metadata.mjs +17 -0
  6. package/dist/lib/handlers/unified-wrapper.mjs +38 -11
  7. package/dist/lib/handlers/version-manager.mjs +828 -0
  8. package/dist/lib/helpers/config.mjs +20 -5
  9. package/dist/lib/i18n/languages/de-de.json +15 -1
  10. package/dist/lib/i18n/languages/en-gb.json +15 -1
  11. package/dist/lib/i18n/languages/en-us.json +15 -1
  12. package/dist/lib/i18n/languages/es-mx.json +15 -1
  13. package/dist/lib/i18n/languages/fr-fr.json +15 -1
  14. package/dist/lib/i18n/languages/hi-in.json +15 -1
  15. package/dist/lib/i18n/languages/ja-jp.json +15 -1
  16. package/dist/lib/i18n/languages/ko-kr.json +15 -1
  17. package/dist/lib/i18n/languages/pt-br.json +15 -1
  18. package/dist/lib/i18n/languages/ru-ru.json +15 -1
  19. package/dist/lib/i18n/languages/zh-cn.json +15 -1
  20. package/dist/slothlet.mjs +70 -1
  21. package/package.json +5 -2
  22. package/types/dist/lib/builders/api_builder.d.mts.map +1 -1
  23. package/types/dist/lib/handlers/api-manager.d.mts +28 -0
  24. package/types/dist/lib/handlers/api-manager.d.mts.map +1 -1
  25. package/types/dist/lib/handlers/metadata.d.mts +15 -0
  26. package/types/dist/lib/handlers/metadata.d.mts.map +1 -1
  27. package/types/dist/lib/handlers/unified-wrapper.d.mts.map +1 -1
  28. package/types/dist/lib/handlers/version-manager.d.mts +234 -0
  29. package/types/dist/lib/handlers/version-manager.d.mts.map +1 -0
  30. package/types/dist/lib/helpers/config.d.mts.map +1 -1
  31. package/types/dist/slothlet.d.mts +15 -0
  32. package/types/dist/slothlet.d.mts.map +1 -1
@@ -371,6 +371,23 @@ export class Metadata extends ComponentBase {
371
371
  }
372
372
 
373
373
 
374
+ getPathMetadata(apiPath) {
375
+
376
+
377
+ if (!apiPath || typeof apiPath !== "string") return {};
378
+ const parts = apiPath.split(".");
379
+ const collected = {};
380
+ for (let i = 1; i <= parts.length; i++) {
381
+ const parentPath = parts.slice(0, i).join(".");
382
+ const parentMeta = this.#userMetadataStore.get(parentPath);
383
+ if (parentMeta?.metadata) {
384
+ Object.assign(collected, parentMeta.metadata);
385
+ }
386
+ }
387
+ return { ...this.#globalUserMetadata, ...collected };
388
+ }
389
+
390
+
374
391
  removePathMetadata(apiPath, key) {
375
392
  if (!apiPath || typeof apiPath !== "string") return;
376
393
 
@@ -660,6 +660,14 @@ export class UnifiedWrapper extends ComponentBase {
660
660
  return;
661
661
  }
662
662
 
663
+
664
+
665
+
666
+
667
+
668
+
669
+ if (util.types.isProxy(this.____slothletInternal.impl)) return;
670
+
663
671
  const ownKeys = Reflect.ownKeys(this.____slothletInternal.impl);
664
672
 
665
673
  const internalKeys = new Set([
@@ -1331,7 +1339,12 @@ export class UnifiedWrapper extends ComponentBase {
1331
1339
  !wrapper.____slothletInternal.state.materialized &&
1332
1340
  !wrapper.____slothletInternal.state.inFlight
1333
1341
  ) {
1334
- wrapper._materialize();
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+ wrapper._materialize().catch(() => {});
1335
1348
  }
1336
1349
 
1337
1350
  if (prop === util.inspect.custom) {
@@ -1889,7 +1902,9 @@ export class UnifiedWrapper extends ComponentBase {
1889
1902
  !wrapper.____slothletInternal.state.materialized &&
1890
1903
  wrapper.____slothletInternal.materializeFunc
1891
1904
  ) {
1892
- wrapper._materialize();
1905
+
1906
+
1907
+ wrapper._materialize().catch(() => {});
1893
1908
  }
1894
1909
 
1895
1910
 
@@ -2043,7 +2058,9 @@ export class UnifiedWrapper extends ComponentBase {
2043
2058
  !wrapper.____slothletInternal.state.materialized &&
2044
2059
  !wrapper.____slothletInternal.state.inFlight
2045
2060
  ) {
2046
- wrapper._materialize();
2061
+
2062
+
2063
+ wrapper._materialize().catch(() => {});
2047
2064
  }
2048
2065
 
2049
2066
 
@@ -2240,7 +2257,7 @@ export class UnifiedWrapper extends ComponentBase {
2240
2257
  !wrapper.____slothletInternal.state.materialized &&
2241
2258
  !wrapper.____slothletInternal.state.inFlight
2242
2259
  ) {
2243
- wrapper._materialize();
2260
+ wrapper._materialize().catch(() => {});
2244
2261
  }
2245
2262
 
2246
2263
 
@@ -2294,7 +2311,9 @@ export class UnifiedWrapper extends ComponentBase {
2294
2311
  !cachedWrapper.____slothletInternal.state.materialized &&
2295
2312
  !cachedWrapper.____slothletInternal.state.inFlight
2296
2313
  ) {
2297
- cachedWrapper._materialize();
2314
+
2315
+
2316
+ cachedWrapper._materialize().catch(() => {});
2298
2317
  }
2299
2318
  }
2300
2319
 
@@ -2342,7 +2361,7 @@ export class UnifiedWrapper extends ComponentBase {
2342
2361
  !cachedWrapper.____slothletInternal.state.materialized &&
2343
2362
  !cachedWrapper.____slothletInternal.state.inFlight
2344
2363
  ) {
2345
- cachedWrapper._materialize();
2364
+ cachedWrapper._materialize().catch(() => {});
2346
2365
  }
2347
2366
  }
2348
2367
  return cached;
@@ -2375,7 +2394,7 @@ export class UnifiedWrapper extends ComponentBase {
2375
2394
 
2376
2395
 
2377
2396
  if (!wrapper.____slothletInternal.state.materialized && !wrapper.____slothletInternal.state.inFlight) {
2378
- wrapper._materialize();
2397
+ wrapper._materialize().catch(() => {});
2379
2398
  }
2380
2399
 
2381
2400
  this.slothlet.debug("wrapper", {
@@ -2554,7 +2573,9 @@ export class UnifiedWrapper extends ComponentBase {
2554
2573
  !wrapper.____slothletInternal.state.materialized &&
2555
2574
  !wrapper.____slothletInternal.state.inFlight
2556
2575
  ) {
2557
- wrapper._materialize();
2576
+
2577
+
2578
+ wrapper._materialize().catch(() => {});
2558
2579
  }
2559
2580
 
2560
2581
 
@@ -2761,7 +2782,9 @@ export class UnifiedWrapper extends ComponentBase {
2761
2782
  !wrapper.____slothletInternal.state.materialized &&
2762
2783
  !wrapper.____slothletInternal.state.inFlight
2763
2784
  ) {
2764
- wrapper._materialize();
2785
+
2786
+
2787
+ wrapper._materialize().catch(() => {});
2765
2788
  }
2766
2789
 
2767
2790
 
@@ -2788,7 +2811,9 @@ export class UnifiedWrapper extends ComponentBase {
2788
2811
  !wrapper.____slothletInternal.state.materialized &&
2789
2812
  !wrapper.____slothletInternal.state.inFlight
2790
2813
  ) {
2791
- wrapper._materialize();
2814
+
2815
+
2816
+ wrapper._materialize().catch(() => {});
2792
2817
  }
2793
2818
 
2794
2819
  if (prop === "____slothletInternal") return undefined;
@@ -2837,7 +2862,9 @@ export class UnifiedWrapper extends ComponentBase {
2837
2862
  !wrapper.____slothletInternal.state.materialized &&
2838
2863
  !wrapper.____slothletInternal.state.inFlight
2839
2864
  ) {
2840
- wrapper._materialize();
2865
+
2866
+
2867
+ wrapper._materialize().catch(() => {});
2841
2868
  }
2842
2869
 
2843
2870
  const keys = new Set();