@lanes-sh/link 0.7.0 → 0.7.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/package.json
CHANGED
package/src/cli/config-repair.ts
CHANGED
|
@@ -156,6 +156,13 @@ export function ensureReservedConnection(
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
/** Whether a repair did anything, without a caller adding up two lists. */
|
|
159
|
+
/** `memory, tasks, assets, skills, vault, setup and entities`, in repair order. */
|
|
160
|
+
function listSurfaces(): string {
|
|
161
|
+
const names = [...DEFAULT_SURFACES];
|
|
162
|
+
const last = names.pop();
|
|
163
|
+
return names.length === 0 ? String(last) : `${names.join(', ')} and ${last}`;
|
|
164
|
+
}
|
|
165
|
+
|
|
159
166
|
export function repaired(repair: SurfaceRepair): boolean {
|
|
160
167
|
return repair.changes.length > 0 || repair.granted.length > 0;
|
|
161
168
|
}
|
|
@@ -293,9 +300,11 @@ export async function repairOwnerLayer(
|
|
|
293
300
|
|
|
294
301
|
say(ok(`gave ${style.bold(name)} its own owner layer`));
|
|
295
302
|
for (const change of repairLines(repair)) say(` ${style.dim(change)}`);
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
303
|
+
// Built from `DEFAULT_SURFACES` rather than typed out. The typed-out
|
|
304
|
+
// version still named six after a seventh had been added, so a person
|
|
305
|
+
// watching a deploy was told entities had arrived on the line above and
|
|
306
|
+
// that the layer was six things on the line below.
|
|
307
|
+
say(` ${style.dim(`${listSurfaces()} — your own material, no account behind any of them`)}`);
|
|
299
308
|
} catch (error) {
|
|
300
309
|
say(
|
|
301
310
|
warn(
|
|
@@ -207,17 +207,21 @@ export const entitiesProvider: ProviderDefinition = defineLocalProvider({
|
|
|
207
207
|
});
|
|
208
208
|
|
|
209
209
|
if (matches.candidates.length === 0) {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
210
|
+
// An empty directory and a query that matched nothing are different
|
|
211
|
+
// answers and a caller does something different with each. Told
|
|
212
|
+
// "matches no criteria" it learns neither: that is what `describe({})`
|
|
213
|
+
// produces when a bare listing finds an empty store, and it reads like
|
|
214
|
+
// a parser error rather than an empty one.
|
|
215
|
+
const text =
|
|
216
|
+
matches.scanned === 0
|
|
217
|
+
? `No entities are declared on ${context.connection.key} yet. ` +
|
|
218
|
+
'`entities.write` declares one. Until then there is nothing here to address ' +
|
|
219
|
+
'anyone by, so ask rather than using an address from somewhere else.'
|
|
220
|
+
: `Nothing on ${context.connection.key} matches ${describe(criteria)}. ` +
|
|
221
|
+
'Do not use an address that is not here — `entities.write` declares a new one, ' +
|
|
222
|
+
'or ask the owner.';
|
|
223
|
+
|
|
224
|
+
return { content: [{ type: 'text', text }] };
|
|
221
225
|
}
|
|
222
226
|
|
|
223
227
|
if (matches.candidates.length > 1) {
|