Skip to content
Draft
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@
"webpack-cli": "^4.9.1"
},
"_moduleAliases": {
"@core": "paf-mvp-core-js/src",
"@operator": "paf-mvp-operator-express/src",
"@client": "paf-mvp-client-express/src",
"@frontend": "paf-mvp-frontend/src"
"@onekey/core": "paf-mvp-core-js/src",
"@onekey/operator-node": "paf-mvp-operator-express/src",
"@onekey/client-node": "paf-mvp-client-express/src",
"@onekey/frontend": "paf-mvp-frontend/src"
},
"lint-staged": {
"*.{ts,tsx}": [
Expand Down
5 changes: 2 additions & 3 deletions paf-mvp-audit/cypress/integration/audit-log.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { AuditLogPage } from '../pages/audit-log.page';
import { Seed, Source, TransactionId, TransmissionResponse } from '@core/model';
import { Cookies, Seed, Source, TransactionId, TransmissionResponse } from '@onekey/core';
import { getFakeIdentifiers, getFakePreferences } from '@test-fixtures/cookies';
import { Cookies } from '@core/cookies';
import { IOneKeyLib, TransmissionRegistryContext } from '@frontend/lib/paf-lib';
import { IOneKeyLib, TransmissionRegistryContext } from '@onekey/frontend/lib/paf-lib';

describe('Audit log', () => {
let page: AuditLogPage;
Expand Down
3 changes: 1 addition & 2 deletions paf-mvp-audit/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
"esModuleInterop": true,
"types": ["@testing-library/cypress", "cypress"],
"paths": {
"@core/*": ["../../paf-mvp-core-js/src/*"],
"@test-helpers/*": ["../../paf-mvp-core-js/tests/helpers/*"],
"@test-fixtures/*": ["../../paf-mvp-core-js/tests/fixtures/*"],
"@frontend/*": ["../../paf-mvp-frontend/src/*"]
"@onekey/frontend/*": ["../../paf-mvp-frontend/src/*"]
}
},
"include": ["./"]
Expand Down
55 changes: 55 additions & 0 deletions paf-mvp-audit/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions paf-mvp-audit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"directories": {
"test": "tests"
},
"dependencies": {
"@onekey/core": "../paf-mvp-core-js/src"
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.3.0",
"@testing-library/cypress": "^8.0.2",
Expand Down
2 changes: 2 additions & 0 deletions paf-mvp-audit/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { string } from 'rollup-plugin-string';
import livereload from 'rollup-plugin-livereload';
import copy from 'rollup-plugin-copy';
import serve from 'rollup-plugin-serve';
import json from '@rollup/plugin-json';

// When developing this project independently of the other projects in the repo
const IS_PROJECT_DEV = process.env.ROLLUP_WATCH !== undefined;
Expand All @@ -26,6 +27,7 @@ const DIST = 'dist';
export default {
input: './src/main.ts',
plugins: [
json(),
string({ include: ['**/*.css', '**/*.svg'] }),
postHTML({ template: true }),
yaml(),
Expand Down
6 changes: 2 additions & 4 deletions paf-mvp-audit/src/controller.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { Locale } from './locale';
import { TransmissionResult } from '@core/model/generated-model';
import { Log } from '@core/log';
import { BindingViewOnly, Log, TransmissionResult } from '@onekey/core';
import { Model } from './model';
import { View } from './view';
import { BindingViewOnly } from '@core/ui/binding';
import providerComponent from './html/components/provider.html';
import iconTick from './images/IconTick.svg';
import { Window } from '@frontend/global';
import { Window } from '@onekey/frontend/global';

// TODO: Add back when full audit information is available.
// import iconCross from './images/iconCross.svg';
Expand Down
4 changes: 2 additions & 2 deletions paf-mvp-audit/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Locale } from './locale';
import { Controller } from './controller';
import { Window } from '@frontend/global';
import { Log, LogLevel } from '@core/log';
import { Window } from '@onekey/frontend/global';
import { Log, LogLevel } from '@onekey/core';

// Debug level while playing with MVP
Log.level = LogLevel.Debug;
Expand Down
3 changes: 1 addition & 2 deletions paf-mvp-audit/src/model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Field, IFieldBind, IModel } from '@core/ui/fields';
import { AuditLog, TransmissionResult } from '@core/model/generated-model';
import { AuditLog, Field, IFieldBind, IModel, TransmissionResult } from '@onekey/core';

/**
* Field represents the transmission result from the audit log.
Expand Down
3 changes: 1 addition & 2 deletions paf-mvp-audit/src/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import css from './css/ok-ui.css';
import auditTemplate from './html/containers/audit.html';
import buttonTemplate from './html/components/button.html';
import { Locale } from './locale';
import { IView } from '@core/ui/binding';
import { Log } from '@core/log';
import { IView, Log } from '@onekey/core';

export class View implements IView {
// The shadow root for the UI.
Expand Down
1 change: 1 addition & 0 deletions paf-mvp-client-express/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
registry=https://registry.npmjs.org/
access=public
legacy-peer-deps=true
2 changes: 1 addition & 1 deletion paf-mvp-client-express/examples/example-client-node.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint @typescript-eslint/no-unused-vars: 0 */
import { ClientNode } from '@client/client-node';
import { ClientNode } from '@onekey/client-node/client-node';

// Here is how the client is created. See config.json and public-key.pem, private-key.pem files
(async () => {
Expand Down
95 changes: 63 additions & 32 deletions paf-mvp-client-express/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions paf-mvp-client-express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekey/client-node",
"version": "1.0.9",
"version": "1.0.13",
"description": "OneKey Client node based on ExpressJS",
"module": "dist/index.mjs",
"main": "dist/index.cjs",
Expand Down Expand Up @@ -46,6 +46,10 @@
"rollup-plugin-typescript2": "^0.32.1",
"ts-jest": "^28.0.7",
"tslib": "^2.4.0",
"typescript": "^4.5.4"
"typescript": "^4.5.4",
"@onekey/core": "../paf-mvp-core-js/src"
},
"peerDependencies": {
"@onekey/core": "^1.0.13"
}
}
Loading