
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@e-square/nx-ddd
Advanced tools
Enforces domain-driven design development.
Applications grow in size and complexity and in a large organization there are many ways to reuse code to maintain consistency and to lower the development effort.
Developing in a modular way can be done using libraries, which are simply a collection of related files that perform a certain task. These are composed together to make up an application.
Libraries require classifiers to describe their contents and intended purpose. These classifiers help to organize the libraries and to provide a way to locate them.
Scope relates to a logical grouping, business use-case, or domain contain libraries that manage a sub-domain of application logic.
Type relates to the contents of the library and indicates its purpose and usage. Examples of types are data-access
, feature
, ui
, and util
.
Developers should consider feature libraries as libraries that implement smart UI (with access to data sources) for specific business use cases or pages in an application.
A UI library contains only presentational components (also called "dumb" components).
A data-access library contains code for interacting with a back-end system. It also includes all the code related to state management.
state
- for state filesapplication
- for facadesentities
- for interfaces, enumsinfrastructure
- for servicesA utility library contains low-level utilities used by many libraries and applications.
npm i -D @e-square/nx-ddd
nx g @e-square/nx-ddd:init
OR
ng add @e-square/nx-ddd
nx g @e-square/nx-ddd:library
Create an Angular ddd feature library example.
nx g @e-square/nx-ddd:library posts --framework angular --type feature --domain blog
Create a React ddd feature library example.
nx g @e-square/nx-ddd:library posts --framework react --type feature --domain blog
@e-square/nx-ddd:init
Argument | Alias | Type | Default | Description |
---|---|---|---|---|
sharedDomain | string | 'shared' | The shared domain | |
domainTagName | string | 'scope' | The domain tag name |
@e-square/nx-ddd:library
Argument | Alias | Type | Default | Description |
---|---|---|---|---|
framework | f | 'angular' | 'react' | '' | The framework to be used for library generation |
type | t | 'feature' | 'ui' | 'data-access' | 'util' | 'data-access' | The library type |
name | string | '' | The name of the library | |
domain | d | string | '' | The domain the library belongs to |
directory | string | '' | A directory where the library is placed inside the domain directory | |
withoutTypePrefix | boolean | false | Create the library inside library type directory <domainName>/<libraryType>-<libraryName> to <domainName>/<libraryType>/<libraryName> | |
standaloneConfig | boolean | false | Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json |
FAQs
Enforces domain-driven design development
We found that @e-square/nx-ddd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.