teqo-backup/.agents/skills/impeccable/scripts/live/frameworks/sveltekit.mjs
Francisco Ignácio Fontoura Solla a2fbcb9c00 chore(agents): reorganiza árvore de skills — .claude/.cursor → .agents
- Remove .claude/skills (symlinks) e a árvore .cursor (rules, hooks, skills)
- Adiciona .agents/ com skills (+ references/), rules/, hooks/ e scripts
- Adiciona .codex/hooks.json (hook do impeccable)
- Corrige referências .cursor → .agents em environment.json, hooks.json e AGENTS.md
2026-08-03 21:24:11 -03:00

71 lines
1.8 KiB
JavaScript

/**
* SvelteKit registry entry.
*
* Detection and the apply/remove pair are the existing adapter's
* (`../sveltekit-adapter.mjs`); this file only declares them to the registry
* and names the artifacts the journal has to be able to heal.
*/
import {
SVELTE_LAYOUT_MARKER_OPEN,
SVELTE_LIVE_ROOT_COMPONENT,
applySvelteKitLiveAdapter,
detectSvelteKitProject,
removeSvelteKitLiveAdapter,
unpatchSvelteLayout,
} from '../sveltekit-adapter.mjs';
export const sveltekit = {
name: 'sveltekit',
detect(cwd, config) {
return detectSvelteKitProject(cwd, config);
},
inject: {
kind: 'adapter',
apply({ cwd, port, token, config }) {
return applySvelteKitLiveAdapter({ cwd, port, token, config });
},
remove({ cwd, config }) {
return removeSvelteKitLiveAdapter({ cwd, config });
},
// The generated root component and the `src/lib/impeccable/` runtime paths
// are already in the static LIVE_IGNORE_PATTERNS list, so nothing extra.
ignorePatterns() {
return [];
},
artifacts({ project }) {
return [
{
kind: 'created',
path: SVELTE_LIVE_ROOT_COMPONENT,
marker: 'impeccable-live-root',
pruneTo: 'src',
},
{
kind: 'patched',
path: project?.layoutFile || 'src/routes/+layout.svelte',
patch: 'sveltekit-layout',
markers: [SVELTE_LAYOUT_MARKER_OPEN],
},
];
},
unpatch: {
'sveltekit-layout': unpatchSvelteLayout,
},
},
source: {
extensions: ['.svelte'],
// Svelte resets component-local state on markup HMR updates, so variants
// are mounted from generated components rather than written into the route.
preview: 'component',
commentSyntax: 'html',
},
};