Skip to content

feat(scripts-module): add runParams for factory modules - #98

Merged
heymdall-legal merged 2 commits into
masterfrom
feat/module-types
Aug 28, 2023
Merged

feat(scripts-module): add runParams for factory modules#98
heymdall-legal merged 2 commits into
masterfrom
feat/module-types

Conversation

@heymdall-legal

Copy link
Copy Markdown
Collaborator
  • Добавлено описание типов для Factory-модулей, доступно как FactoryModule.

  • Factory-модули теперь могут принимать runParams - отдельный параметр, который не будет передаваться на сервер, а
    сразу будет попадать из клиента в клиент.

  • Mountable модули теперь могут использовать запись вида export default mountableModule; вместо отдельных экспортов
    mount и unmount функций.

@changeset-bot

changeset-bot Bot commented Aug 24, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 005e26c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@alfalab/scripts-server Patch
@alfalab/scripts-modules Minor
example-modules Patch
example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

RunParams = void,
ServerState extends BaseModuleState = BaseModuleState,
> = {
(serverState: ServerState, runParams: RunParams): ReturnType;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Был большой соблазн поменять местами параметры у этих модулей, чтобы они были более похоже на moutable, но это был бы breaking change, а не хочется ломать api если его кто-то уже использует. Но если использования еще нет - то можно бы и поломать без поднятия мажорки

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давай поменяем. С учётом того, что с вероятностью 99.9% мы пока единственные потребители, нам не сложно будет подстроиться

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поменял

@heymdall-legal
heymdall-legal merged commit 6965441 into master Aug 28, 2023
@heymdall-legal
heymdall-legal deleted the feat/module-types branch August 28, 2023 09:29
@core-ds-bot core-ds-bot mentioned this pull request Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants