@covia/covia-sdk 1.10.0 → 1.10.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.
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +12 -3
- package/dist/index.mjs +12 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -692,7 +692,14 @@ interface SkillManagerVenue {
|
|
|
692
692
|
declare class SkillManager {
|
|
693
693
|
private venue;
|
|
694
694
|
constructor(venue: SkillManagerVenue);
|
|
695
|
-
/**
|
|
695
|
+
/**
|
|
696
|
+
* Return every skill asset directly contained at `path`. A single entry
|
|
697
|
+
* that fails to resolve (e.g. a legacy bare-string alias the plain assets
|
|
698
|
+
* endpoint can't follow — see covia-ai/frontend#229) is skipped rather
|
|
699
|
+
* than failing the whole listing: one broken skill must not take down
|
|
700
|
+
* every other skill at this location, the same "don't discard what was
|
|
701
|
+
* already collected" principle this method already applies across pages.
|
|
702
|
+
*/
|
|
696
703
|
list(path: string): Promise<Skill[]>;
|
|
697
704
|
/** Return the ordinary asset at exactly `path`, with typed skill metadata. */
|
|
698
705
|
get(path: string): Promise<Skill>;
|
package/dist/index.d.ts
CHANGED
|
@@ -692,7 +692,14 @@ interface SkillManagerVenue {
|
|
|
692
692
|
declare class SkillManager {
|
|
693
693
|
private venue;
|
|
694
694
|
constructor(venue: SkillManagerVenue);
|
|
695
|
-
/**
|
|
695
|
+
/**
|
|
696
|
+
* Return every skill asset directly contained at `path`. A single entry
|
|
697
|
+
* that fails to resolve (e.g. a legacy bare-string alias the plain assets
|
|
698
|
+
* endpoint can't follow — see covia-ai/frontend#229) is skipped rather
|
|
699
|
+
* than failing the whole listing: one broken skill must not take down
|
|
700
|
+
* every other skill at this location, the same "don't discard what was
|
|
701
|
+
* already collected" principle this method already applies across pages.
|
|
702
|
+
*/
|
|
696
703
|
list(path: string): Promise<Skill[]>;
|
|
697
704
|
/** Return the ordinary asset at exactly `path`, with typed skill metadata. */
|
|
698
705
|
get(path: string): Promise<Skill>;
|
package/dist/index.js
CHANGED
|
@@ -2681,7 +2681,14 @@ var SkillManager = class {
|
|
|
2681
2681
|
constructor(venue) {
|
|
2682
2682
|
this.venue = venue;
|
|
2683
2683
|
}
|
|
2684
|
-
/**
|
|
2684
|
+
/**
|
|
2685
|
+
* Return every skill asset directly contained at `path`. A single entry
|
|
2686
|
+
* that fails to resolve (e.g. a legacy bare-string alias the plain assets
|
|
2687
|
+
* endpoint can't follow — see covia-ai/frontend#229) is skipped rather
|
|
2688
|
+
* than failing the whole listing: one broken skill must not take down
|
|
2689
|
+
* every other skill at this location, the same "don't discard what was
|
|
2690
|
+
* already collected" principle this method already applies across pages.
|
|
2691
|
+
*/
|
|
2685
2692
|
async list(path) {
|
|
2686
2693
|
const location = path.replace(/\/+$/, "");
|
|
2687
2694
|
const skills = [];
|
|
@@ -2693,10 +2700,12 @@ var SkillManager = class {
|
|
|
2693
2700
|
throw new CoviaError(`Skill listing at ${location} disappeared mid-listing`);
|
|
2694
2701
|
}
|
|
2695
2702
|
const keys = page.keys ?? [];
|
|
2696
|
-
const
|
|
2703
|
+
const results = await Promise.allSettled(
|
|
2697
2704
|
keys.map((key) => this.get(`${location}/${key}`))
|
|
2698
2705
|
);
|
|
2699
|
-
|
|
2706
|
+
for (const result of results) {
|
|
2707
|
+
if (result.status === "fulfilled") skills.push(result.value);
|
|
2708
|
+
}
|
|
2700
2709
|
const nextOffset = (page.offset ?? offset) + keys.length;
|
|
2701
2710
|
if (keys.length === 0 || nextOffset >= (page.count ?? nextOffset)) break;
|
|
2702
2711
|
if (nextOffset <= offset) {
|
package/dist/index.mjs
CHANGED
|
@@ -2679,7 +2679,14 @@ var SkillManager = class {
|
|
|
2679
2679
|
constructor(venue) {
|
|
2680
2680
|
this.venue = venue;
|
|
2681
2681
|
}
|
|
2682
|
-
/**
|
|
2682
|
+
/**
|
|
2683
|
+
* Return every skill asset directly contained at `path`. A single entry
|
|
2684
|
+
* that fails to resolve (e.g. a legacy bare-string alias the plain assets
|
|
2685
|
+
* endpoint can't follow — see covia-ai/frontend#229) is skipped rather
|
|
2686
|
+
* than failing the whole listing: one broken skill must not take down
|
|
2687
|
+
* every other skill at this location, the same "don't discard what was
|
|
2688
|
+
* already collected" principle this method already applies across pages.
|
|
2689
|
+
*/
|
|
2683
2690
|
async list(path) {
|
|
2684
2691
|
const location = path.replace(/\/+$/, "");
|
|
2685
2692
|
const skills = [];
|
|
@@ -2691,10 +2698,12 @@ var SkillManager = class {
|
|
|
2691
2698
|
throw new CoviaError(`Skill listing at ${location} disappeared mid-listing`);
|
|
2692
2699
|
}
|
|
2693
2700
|
const keys = page.keys ?? [];
|
|
2694
|
-
const
|
|
2701
|
+
const results = await Promise.allSettled(
|
|
2695
2702
|
keys.map((key) => this.get(`${location}/${key}`))
|
|
2696
2703
|
);
|
|
2697
|
-
|
|
2704
|
+
for (const result of results) {
|
|
2705
|
+
if (result.status === "fulfilled") skills.push(result.value);
|
|
2706
|
+
}
|
|
2698
2707
|
const nextOffset = (page.offset ?? offset) + keys.length;
|
|
2699
2708
|
if (keys.length === 0 || nextOffset >= (page.count ?? nextOffset)) break;
|
|
2700
2709
|
if (nextOffset <= offset) {
|