Skip to content

Commit

Permalink
chore: rename package from dapi to d-api (#6)
Browse files Browse the repository at this point in the history
there is already a `dapi` package in npm registry
  • Loading branch information
carpasse authored Feb 2, 2024
2 parents 25417d1 + 18a78d3 commit 7f5d675
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
- name: Install dependencies
run: npm ci --ignore-scripts

- name: Build
run: npm run build

- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Simple library to create complex systems out of pure functions
## Installation

```bash
npm install -D dapi
npm install -D d-api
```

## Usage
Expand All @@ -15,7 +15,7 @@ npm install -D dapi
To create an `DapiWrapper` you need to create an [`DapiDefinition`](#dapidefinition) object and pass it to the [`createDapi`](#createdapi) factory function.

```Typescript
import {createDapi} from 'dapi';
import {createDapi} from 'd-api';

type Dependencies = {
db: OracleClient,
Expand Down Expand Up @@ -153,7 +153,7 @@ export const createCustomer = async (
Ideally you should pass a `createUser` fn with its dependencies already set to the `createCustomer` fn. This way, the `createCustomer` fn does not need to know about the dependencies of the `createPerson` fn. It only needs to know about the dependencies it needs to do its job.

```Typescript
import {createDapi, DapiFn} from 'dapi';
import {createDapi, DapiFn} from 'd-api';
import type {DapiUser, UserData} from './user';
import type {Logger} from './logger';
import type {RabbitMQ} from './mqBroker';
Expand Down Expand Up @@ -435,7 +435,7 @@ Adds a decorator to a `DapiFn` of the `DapiWrapper` instance.
**Example**

```Typescript
import {createDapi} from 'dapi';
import {createDapi} from 'd-api';
import {profile} from './profiler';
import {createPerson} from './person';
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "dapi",
"name": "d-api",
"version": "0.1.0",
"description": "Simple library to create complex systems out of pure functions",
"main": "./dist/cjs/index.js",
"module": "./dist/cjs/index.mjs",
"type": "module",
"type": "commonjs",
"types": "./dist/cjs/index.d.ts",
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @module dapi
* @module d-api
*/
export {DapiMixin, type DapiDefinition, type DapiWrapper} from './DapiMixin';
export {createDapi} from './createDapi';

0 comments on commit 7f5d675

Please sign in to comment.