128
for (const entry of response?.data ?? []) {
129
for (const hook of entry.hooks ?? []) {
131
>
byKey.set(hook.key, hook);
132
>
}
133
>
}
134
}
135
if (byKey.size === 0) {
136
return [];
137
}
139
>
.sort((a, b) => Number(a.displayOrder - b.displayOrder) || a.key.localeCompare(b.key))
140
>
.map(hookToCustomization);
141
>
const containerUri = URI.from({ scheme: CODEX_HOOKS_SCHEME, path: '/hooks' }).toString();
142
>
return [{
143
>
type: CustomizationType.Directory,
144
>
id: customizationId(containerUri),
145
>
uri: containerUri,
146
>
name: 'Hooks',
147
>
enabled: true,
148
>
contents: CustomizationType.Hook,
149
>
writable: false,
150
>
load: { kind: CustomizationLoadStatus.Loaded },
151
>
children,
152
>
}];
153
>
}