UNPKG

@augmentcode/ag-redux-toolkit

Version:

Redux + Saga state management for Svelte apps — designed for AI agents. Includes runtime TypeScript source, AI skills, and reference documentation for robust, observable, high-performance state management.

14 lines (12 loc) • 705 B
export function componentImportMessage(sourcePath) { if (sourcePath === "typed-redux-saga" || sourcePath === "redux-saga" || sourcePath.startsWith("redux-saga/")) { return "Components must not import saga effect libraries; dispatch actions or read selectors instead."; } if (/(^|\/)sagas?\//.test(sourcePath) || /(^|\/)[^/]*-saga(?:\.[cm]?[jt]sx?)?$/.test(sourcePath)) { return "Components must not import saga source; dispatch actions instead."; } if (/(?:(?:^|\/)(?:collection-utils|create-reducer)(?:$|\.)|(?:^|\/)redux-dispatch-bridge(?:$|\/))/.test(sourcePath)) { return "Components must not import collection, reducer, or removed bridge internals."; } return undefined; }