@singi-labs/sifa-sdk 0.19.10 → 0.19.11
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.cjs +34 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +33 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2618,6 +2618,37 @@ function normalizeDoi(value) {
|
|
|
2618
2618
|
return value.trim().replace(/^https?:\/\/(dx\.)?doi\.org\//i, "").replace(/^doi:\s*/i, "");
|
|
2619
2619
|
}
|
|
2620
2620
|
|
|
2621
|
+
// src/format/endorsement-context.ts
|
|
2622
|
+
var RELATIONSHIP_PREFIX = /^\[(\w+?)(?:: ([^\]]+))?\]\s*/;
|
|
2623
|
+
function formatRelationship(type, detail) {
|
|
2624
|
+
const trimmed = detail?.trim() || void 0;
|
|
2625
|
+
switch (type) {
|
|
2626
|
+
case "worked_together":
|
|
2627
|
+
return trimmed ? `Worked together at ${trimmed}` : "Worked together";
|
|
2628
|
+
case "collaborated_in":
|
|
2629
|
+
return trimmed ? `Collaborated in ${trimmed}` : "Collaborated";
|
|
2630
|
+
case "supervised_by":
|
|
2631
|
+
return "Manager or mentor relationship";
|
|
2632
|
+
case "co_authored":
|
|
2633
|
+
return "Co-authored";
|
|
2634
|
+
case "other":
|
|
2635
|
+
return trimmed ?? null;
|
|
2636
|
+
default:
|
|
2637
|
+
return null;
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
function parseEndorsementComment(comment) {
|
|
2641
|
+
if (!comment) return { relationship: null, note: null };
|
|
2642
|
+
const match = comment.match(RELATIONSHIP_PREFIX);
|
|
2643
|
+
if (!match) {
|
|
2644
|
+
const note2 = comment.trim();
|
|
2645
|
+
return { relationship: null, note: note2 || null };
|
|
2646
|
+
}
|
|
2647
|
+
const relationship = formatRelationship(match[1] ?? "", match[2]);
|
|
2648
|
+
const note = comment.slice(match[0].length).trim();
|
|
2649
|
+
return { relationship, note: note || null };
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2621
2652
|
// src/format/handle-utils.ts
|
|
2622
2653
|
function sanitizeHandleInput(raw) {
|
|
2623
2654
|
let identifier = raw.trim().replace(/^https?:\/\/bsky\.app\/profile\//i, "").replace(/^at:\/\//i, "").replace(/^@/, "").replace(/^https?:\/\//i, "");
|
|
@@ -6447,7 +6478,7 @@ function describeSifaRecord(collection, value) {
|
|
|
6447
6478
|
}
|
|
6448
6479
|
|
|
6449
6480
|
// src/index.ts
|
|
6450
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
6481
|
+
var SIFA_SDK_VERSION = "0.19.11";
|
|
6451
6482
|
|
|
6452
6483
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
6453
6484
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
|
@@ -6599,6 +6630,7 @@ exports.formatDistanceToNow = formatDistanceToNow;
|
|
|
6599
6630
|
exports.formatEventDate = formatEventDate;
|
|
6600
6631
|
exports.formatLocation = formatLocation;
|
|
6601
6632
|
exports.formatPresentationDuration = formatPresentationDuration;
|
|
6633
|
+
exports.formatRelationship = formatRelationship;
|
|
6602
6634
|
exports.formatRelativeTime = formatRelativeTime;
|
|
6603
6635
|
exports.formatSingleDate = formatSingleDate;
|
|
6604
6636
|
exports.formatSpanDate = formatSpanDate;
|
|
@@ -6677,6 +6709,7 @@ exports.normalizeSkillCategory = normalizeSkillCategory;
|
|
|
6677
6709
|
exports.normalizeWorkplaceTypes = normalizeWorkplaceTypes;
|
|
6678
6710
|
exports.openToTokenToValue = openToTokenToValue;
|
|
6679
6711
|
exports.openToValueToToken = openToValueToToken;
|
|
6712
|
+
exports.parseEndorsementComment = parseEndorsementComment;
|
|
6680
6713
|
exports.parseIntendedAudiences = parseIntendedAudiences;
|
|
6681
6714
|
exports.parseLocationString = parseLocationString;
|
|
6682
6715
|
exports.parsePresentationDuration = parsePresentationDuration;
|