Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added core package to implement user #79

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/core/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {User} from "./src/users";
22 changes: 22 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@dapp-sdk/core",
"version": "1.0.0",
"description": "The core components for dApp-SDK. These are required by almost every other package",
"main": "dist/index.js",
"scripts": {
"build": "tsc"
},
"keywords": [
"meroku",
"dapp-sdk",
"core"
],
"publishConfig": {
"access": "public"
},
"files": [
"dist/**/*"
],
"author": "",
"license": "MIT"
}
9 changes: 9 additions & 0 deletions packages/core/src/users.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as PushAPI from "@pushprotocol/restapi";

export abstract class User {

abstract createUser(userInput: object | any): void;

abstract getUser(userInput: object | any): void;

}
14 changes: 14 additions & 0 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "@merokudao/tsconfig/corelib.json",
"include": [
"./src/**/*.ts",
"./index.ts",
"./src/**/*.d.ts"
],
"exclude": ["./dist", "./build", "./node_modules"],
"compilerOptions": {
"outDir": "dist",
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}
2 changes: 1 addition & 1 deletion packages/messaging-interface/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dapp-sdk/messaging-interface",
"description": "Messaging Interface for dApp SDK",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",
"scripts": {
"build": "tsc"
Expand Down
4 changes: 2 additions & 2 deletions packages/messaging-interface/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as PushAPI from "@pushprotocol/restapi";
import { User } from "../../core/index";

abstract class AbstractMessaging{
abstract class AbstractMessaging extends User {
abstract createUser(
userInput: object | any
): void;
Expand Down
2 changes: 2 additions & 0 deletions packages/messaging-interface/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"exclude": ["./dist", "./build", "./node_modules"],
"compilerOptions": {
"outDir": "dist",
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}
2 changes: 1 addition & 1 deletion packages/messaging-push/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dapp-sdk/messaging-push",
"version": "1.0.2",
"version": "1.0.3",
"author": "Push Protocol",
"description": "Push Protocol Implementation for Messaging in dapp-sdk",
"main": "dist/messaging-push/src/index.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/messaging-push/src/baseclass/BasePushAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import {
conversationHashResponse,
} from "../interfaces/pushinterfaces";
import AbstractMessaging from "../../../messaging-interface/src/index";
import {User} from "../../../core/index"

export class BasePushAPI extends AbstractMessaging {
export class BasePushAPI extends User {
config: IConfig;
constructor(config: IConfig) {
super();
Expand Down
2 changes: 2 additions & 0 deletions packages/messaging-push/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
"exclude": ["./dist", "./build", "./node_modules"],
"compilerOptions": {
"outDir": "dist",
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}
2 changes: 2 additions & 0 deletions packages/messaging/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
"exclude": ["./dist", "./build", "./node_modules"],
"compilerOptions": {
"outDir": "dist",
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}
6 changes: 6 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,12 @@ __metadata:
languageName: unknown
linkType: soft

"@dapp-sdk/core@workspace:packages/core":
version: 1.0.0
resolution: "@dapp-sdk/core@workspace:packages/core"
languageName: unknown
linkType: soft

"@dapp-sdk/[email protected], @dapp-sdk/finance-interface@workspace:packages/finance-interface":
version: 0.0.0-use.local
resolution: "@dapp-sdk/finance-interface@workspace:packages/finance-interface"
Expand Down