
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
n2o-framework
Advanced tools
n2o-framework — React/TypeScript библиотека для построения UI на базе N2O: виджеты, страницы, инфраструктура (redux/saga), утилиты и стили.
yarn install
Собрать библиотеку TypeScript в lib/ и стили/шрифты в dist/
yarn build
В N2O компоненты подключаются через конфигурацию factories (реестр компонентов/адаптеров). Есть два основных способа: быстрый (через createFactoryConfig) и ручной (тонкая настройка/частичный импорт).
createFactoryConfigИспользуйте createFactoryConfig, чтобы объединить стандартную конфигурацию n2o-framework с вашей кастомной конфигурацией.
import createFactoryConfig from 'n2o-framework/lib/core/factory/createFactoryConfig';
<N2O {...createFactoryConfig(config)} />
Где config — ваши переопределения/расширения (например виджеты, редьюсеры, саги, evalContext).
Пример: добавляем виджет CustomWidget и переопределяем стандартный FormWidget
(зарезервированные имена можно посмотреть в переменной factories внутри createFactoryConfig):
const widgets = {
CustomWidget,
FormWidget,
}
Подключение redux-частей:
customReducerscustomSagasconst customReducers = { yourReducer }
const customSagas = [...yourSagas]
Расширение контекста вычислений (evalContext): можно добавить проектные функции, доступные во встроенных JS-выражениях.
Пример ориентируйтесь на src/utils/functions.ts.
const evalContextFunctions = {
$prefix: { yourFunc },
}
const evalContext = { ...evalContextFunctions }
Итоговая сборка:
const config = createFactoryConfig({
widgets,
customReducers,
customSagas,
evalContext
})
export const App = () => <N2O {...config} />
createFactoryConfig)Подходит, если вы хотите:
Шаги:
createFactoryConfig)defineAsyncdeepmerge)N2OПример: подключаем только два виджета, HtmlWidget грузим lazy:
import { defineAsync } from 'n2o-framework/lib/core/factory/defineAsync'
import { FormWidget } from 'n2o-framework/lib/components/widgets/Form/FormWidget'
export const widgets = {
HtmlWidget: defineAsync(() => import('n2o-framework/lib/components/widgets/Html/HtmlWidget')
.then(({ HtmlWidget }) => HtmlWidget)),
FormWidget,
}
export const n2oFactories = { widgets }
export const localFactories = { ...yourFactories }
export const config = deepmerge(n2oFactories, localFactories)
export const App = () => <N2O {...config} />
@i-novus/n2o-components — UI-компоненты, используемые внутри n2o-framework (лежит в frontend/n2o-components).FAQs
N2O React
The npm package n2o-framework receives a total of 167 weekly downloads. As such, n2o-framework popularity was classified as not popular.
We found that n2o-framework demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.