
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@alien-worlds/alienworlds-api-common
Advanced tools
Components used in both the Alien Worlds API and history tools. Package contains repositories, services and entities for various mongodb collections and smart contract tables rows. The binding functions are used to simplify the injection of these componen
Components used in both the Alien Worlds API and history tools. Package contains repositories, services and entities for various mongodb collections and smart contract tables rows. The binding functions are used to simplify the injection of these components in your code.
Name | Type | Layer | Description |
---|---|---|---|
Asset | Entity | domain | |
AssetRepository | Repository abstraction | domain | |
AssetMongoSource | Data source | data | mongodb data source used in the repository |
AssetMapper | Mapper | data | converts dto to entity and vice versa |
AssetSmartContractData | Entity | domain | |
AssetSmartContractRepository | Repository abstraction | domain | |
AssetSmartContractRepositoryImpl | Repository implementation | data | |
bindAssetRepository | IOC config | bind helper - requires MongoSource instance | |
bindAssetSmartContractRepository | IOC config | bind helper - requires EosRpcSource instance and code string |
Name | Type | Layer | Description |
---|---|---|---|
AtomicTransfer | Entity | domain | |
AtomicTransferRepository | Repository abstraction | domain | |
AtomicTransferMongoSource | Data source | data | mongodb data source used in the repository |
AtomicTransferMapper | Mapper | data | converts dto to entity and vice versa |
bindAtomicTransferRepository | IOC config | bind helper - requires MongoSource instance |
Name | Type | Layer | Description |
---|---|---|---|
Mine | Entity | domain | |
MineRepository | Repository abstraction | domain | |
MineMongoSource | Data source | data | mongodb data source used in the repository |
MineMapper | Mapper | data | converts dto to entity and vice versa |
bindMineRepository | IOC config | bind helper - requires MongoSource instance |
Name | Type | Layer | Description |
---|---|---|---|
Nft | Entity | domain | |
NftRepository | Repository abstraction | domain | |
NftMongoSource | Data source | data | mongodb data source used in the repository |
NftMapper | Mapper | data | converts dto to entity and vice versa |
bindNftRepository | IOC config | bind helper - requires MongoSource instance |
Name | Type | Layer | Description |
---|---|---|---|
SchemaSmartContractData | Entity | domain | |
SchemaSmartContractRepository | Repository abstraction | domain | |
SchemaSmartContractRepositoryImpl | Repository implementation | data | |
bindSchemaSmartContractRepository | IOC config | bind helper - requires EosRpcSource instance and code string |
Name | Type | Layer | Description |
---|---|---|---|
TemplateSmartContractData | Entity | domain | |
TemplateSmartContractRepository | Repository abstraction | domain | |
TemplateSmartContractRepositoryImpl | Repository implementation | data | |
bindTemplateSmartContractRepository | IOC config | bind helper - requires EosRpcSource instance and code string |
To use these components in your code, add this package as a dependency using your Node package manager
yarn add @alien-worlds/alienworlds-api-common
You can inject the code with the binding functions or by yourself. In the ioc.config
file in your project, add the component of interest to you, remembering to initialize all the source needs in advance, e.g. MongoDB or JsonRpc Api
// with binding functions
import { bindStateRepository } from '@alien-worlds/alienworlds-api-common';
// ...
await client.connect();
const db = client.db(dbName);
const mongoSource = new MongoSource(db);
bindStateRepository(container, mongoSource);
// or without
import {
StateRepositoryImpl,
StateRepository,
StateMongoSource,
StateMapper,
} from '@alien-worlds/alienworlds-api-common';
// ...
await client.connect();
const db = client.db(dbName);
const mongoSource = new MongoSource(db);
const stateRepositoryImpl = new StateRepositoryImpl(
new StateMongoSource(mongoSource),
new StateMapper()
);
container
.bind<StateRepository>(StateRepository.Token)
.toConstantValue(stateRepositoryImpl);
If you want to release a new version of this package, just run deploy.sh
from the main project folder.
# patches version by default
sh scripts/deploy.sh
# Optionally, you can specify the version or what kind of update is (major|minor|patch)
# e.g.
sh scripts/deploy.sh 1.2.3
# or
sh scripts/deploy.sh major
This script will:
package.json
fileBefore running the script, be sure that you have a clean situation and the latest changes from the repository so that there are no conflicts
FAQs
Components used in both the Alien Worlds API and history tools. Package contains repositories, services and entities for various mongodb collections and smart contract tables rows. The binding functions are used to simplify the injection of these componen
The npm package @alien-worlds/alienworlds-api-common receives a total of 0 weekly downloads. As such, @alien-worlds/alienworlds-api-common popularity was classified as not popular.
We found that @alien-worlds/alienworlds-api-common demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.