@ibgib/core-gib 0.0.101 → 0.0.103

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.
@@ -1062,6 +1062,7 @@ export async function rel8ToSpecialIbGib({
1062
1062
  rel8nName,
1063
1063
  ibGibsToRel8,
1064
1064
  ibGibsToUnRel8,
1065
+ addrsToUnRel8,
1065
1066
  linked,
1066
1067
  severPast,
1067
1068
  deletePreviousSpecialIbGib,
@@ -1086,9 +1087,21 @@ export async function rel8ToSpecialIbGib({
1086
1087
  */
1087
1088
  ibGibsToRel8?: IbGib_V1[],
1088
1089
  /**
1089
- * multiple ibgibs to UNrel8
1090
+ * multiple ibgibs to UNrel8.
1091
+ * YOU CANNOT SET BOTH {@link ibGibsToUnRel8} AND {@link addrsToUnRel8}
1092
+ * There is no technical reason for this, I'm just too tired to implement
1093
+ * yagni overhead.
1094
+ * @see {@link addrsToUnRel8}
1090
1095
  */
1091
1096
  ibGibsToUnRel8?: IbGib_V1[],
1097
+ /**
1098
+ * alternatively just specify addrs to unrel8.
1099
+ * YOU CANNOT SET BOTH {@link ibGibsToUnRel8} AND {@link addrsToUnRel8}
1100
+ * There is no technical reason for this, I'm just too tired to implement
1101
+ * yagni overhead.
1102
+ * @see {@link ibGibsToUnRel8}
1103
+ */
1104
+ addrsToUnRel8?: IbGibAddr[],
1092
1105
  /**
1093
1106
  * If linked, then the rel8nName will only contain one address, i.e. the
1094
1107
  * last rel8d ibgib's address.
@@ -1139,12 +1152,18 @@ export async function rel8ToSpecialIbGib({
1139
1152
  const lc = `[${rel8ToSpecialIbGib.name}](type:${type},rel8nName:${rel8nName})`;
1140
1153
  try {
1141
1154
  if (!space) { throw new Error(`space required. (E: 956192eea28047eba6dad81620bb96fb)`); }
1142
- if ((ibGibsToRel8 ?? []).length === 0 && (ibGibsToUnRel8 ?? []).length === 0) {
1155
+ if ((ibGibsToRel8 ?? []).length === 0 &&
1156
+ (ibGibsToUnRel8 ?? []).length === 0 &&
1157
+ (addrsToUnRel8 ?? []).length === 0
1158
+ ) {
1143
1159
  throw new Error(`either ibGibsToRel8 or ibGibsToUnRel8 required. (E: 5add49c8e46a54e2c6b057c22646a822)`);
1144
1160
  }
1161
+ if ((ibGibsToUnRel8 ?? []).length > 0 && (addrsToUnRel8 ?? []).length > 0) {
1162
+ throw new Error(`can't provide both ibGibsToUnRel8 and addrsToUnRel8. There isn't a technical reason but I'm too tired right now to implement the overhead to enable this atow (05/2025). (E: 31ef66be26349cfe1b1f352389b99425)`);
1163
+ }
1145
1164
 
1146
1165
  const addrsToRel8 = ibGibsToRel8?.map(ibGib => getIbGibAddr({ ibGib }));
1147
- const addrsToUnRel8 = ibGibsToUnRel8?.map(ibGib => getIbGibAddr({ ibGib }));
1166
+ addrsToUnRel8 ??= ibGibsToUnRel8?.map(ibGib => getIbGibAddr({ ibGib }));
1148
1167
 
1149
1168
  // get the special ibgib
1150
1169
  const configKey = getSpecialConfigKey({ type });