@posx/core 5.3.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +85 -0
- package/build/index.d.ts +4273 -0
- package/build/index.js +1 -0
- package/build/service.factory.d.ts +35 -0
- package/package.json +37 -0
- package/package.publish.json +115 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IServiceOptions } from './types/misc.type';
|
|
2
|
+
import { IAppRemoteService } from './services/abstract.service';
|
|
3
|
+
import Dexie from 'dexie';
|
|
4
|
+
export declare const dbSchemas: {
|
|
5
|
+
items: string;
|
|
6
|
+
sections: string;
|
|
7
|
+
section_items: string;
|
|
8
|
+
categories: string;
|
|
9
|
+
shifts: string;
|
|
10
|
+
tills: string;
|
|
11
|
+
employees: string;
|
|
12
|
+
payment_methods: string;
|
|
13
|
+
invoices: string;
|
|
14
|
+
configs: string;
|
|
15
|
+
reports: string;
|
|
16
|
+
printers: string;
|
|
17
|
+
print_jobs: string;
|
|
18
|
+
print_templates: string;
|
|
19
|
+
employee_roles: string;
|
|
20
|
+
order_displays: string;
|
|
21
|
+
};
|
|
22
|
+
export declare class ServiceFactory {
|
|
23
|
+
readonly options: IServiceOptions;
|
|
24
|
+
readonly win: any;
|
|
25
|
+
private mode;
|
|
26
|
+
private readonly http;
|
|
27
|
+
private dataSource;
|
|
28
|
+
private status;
|
|
29
|
+
constructor(options: IServiceOptions, win: any);
|
|
30
|
+
initializeDatabase(): Promise<Dexie>;
|
|
31
|
+
dropDatabase(): Promise<void>;
|
|
32
|
+
clearTableData(tableName: string): import("dexie").PromiseExtended<void>;
|
|
33
|
+
getService<T>(serviceClass: any): Promise<T>;
|
|
34
|
+
getServiceByName(modelName: string): Promise<IAppRemoteService<any>>;
|
|
35
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@posx/core",
|
|
3
|
+
"version": "5.3.58",
|
|
4
|
+
"description": "POSX core libraries",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"author": "Steven Lee",
|
|
7
|
+
"license": "UNLICENSED",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"library",
|
|
10
|
+
"starter",
|
|
11
|
+
"es6"
|
|
12
|
+
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@awesome-cordova-plugins/core": "6.6.0",
|
|
15
|
+
"@awesome-cordova-plugins/network-interface": "6.6.0",
|
|
16
|
+
"@microsoft/signalr": "7.0.11",
|
|
17
|
+
"axios": "1.5.1",
|
|
18
|
+
"bcryptjs": "2.4.3",
|
|
19
|
+
"buffer": "6.0.3",
|
|
20
|
+
"crypto-browserify": "3.12.0",
|
|
21
|
+
"crypto-js": "4.2.0",
|
|
22
|
+
"dayjs": "1.11.10",
|
|
23
|
+
"dexie": "3.2.4",
|
|
24
|
+
"esc-pos-encoder-ionic": "1.1.3",
|
|
25
|
+
"lodash": "4.17.21",
|
|
26
|
+
"mathjs": "12.3.2",
|
|
27
|
+
"nanoid": "3.3.4",
|
|
28
|
+
"save": "2.9.0",
|
|
29
|
+
"selecttransform": "1.6.1",
|
|
30
|
+
"sockets-for-cordova": "1.0.0",
|
|
31
|
+
"stream-browserify": "3.0.0",
|
|
32
|
+
"uuid": "9.0.1",
|
|
33
|
+
"vm-browserify": "1.1.2",
|
|
34
|
+
"wcwidth": "1.0.1",
|
|
35
|
+
"zod": "3.23.8"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@posx/core",
|
|
3
|
+
"version": "5.3.58",
|
|
4
|
+
"description": "POSX core libraries",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"types": "build/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"up": "node ./scripts/upload-to-s3.js --trace-warnings",
|
|
9
|
+
"start": "webpack serve --config webpack.config.demo.js",
|
|
10
|
+
"build": "webpack && tsc",
|
|
11
|
+
"build:dts": "npm-dts generate -o build/index.d.ts -L debug",
|
|
12
|
+
"post:build": "rimraf build/**/* && rimraf '!build/index.d.ts' '!build/index.js' '!build/index.js.LICENSE.txt'",
|
|
13
|
+
"mvm": "mv build/*.map scripts/sourcemaps/ && mv build/**/*.map scripts/sourcemaps/ && find build -name '*.map' -type f -delete",
|
|
14
|
+
"build:demo": "webpack --config webpack.config.demo.js",
|
|
15
|
+
"test": "jest",
|
|
16
|
+
"publish": "node ./scripts/publish.js",
|
|
17
|
+
"p": "npm run up:p && npm run build && npm run build:dts && npm run post:build && npm run publish && rm -rf build",
|
|
18
|
+
"debug": "npm run build && npm run build:dts && npm run post:build",
|
|
19
|
+
"coverage": "npm run test --coverage",
|
|
20
|
+
"trypublish": "npm publish || true",
|
|
21
|
+
"gen:index": "node ./scripts/generateIndex.js",
|
|
22
|
+
"up:p": "npm version patch && git push",
|
|
23
|
+
"up:m": "npm version minor && git push",
|
|
24
|
+
"docs": "typedoc --out docs src --excludePrivate --exclude '**/demo/**/*' --exclude '**/*+(interface|function|enum).ts'",
|
|
25
|
+
"see": "node ./scripts/lookup-sm.js"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git"
|
|
29
|
+
},
|
|
30
|
+
"author": "Steven Lee",
|
|
31
|
+
"license": "UNLICENSED",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": ""
|
|
34
|
+
},
|
|
35
|
+
"homepage": "",
|
|
36
|
+
"keywords": [
|
|
37
|
+
"library",
|
|
38
|
+
"starter",
|
|
39
|
+
"es6"
|
|
40
|
+
],
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@babel/cli": "^7.22.15",
|
|
43
|
+
"@babel/core": "^7.22.11",
|
|
44
|
+
"@babel/plugin-proposal-decorators": "7.23.0",
|
|
45
|
+
"@babel/plugin-transform-class-properties": "7.22.5",
|
|
46
|
+
"@babel/plugin-transform-typescript": "^7.22.15",
|
|
47
|
+
"@babel/polyfill": "^7.12.1",
|
|
48
|
+
"@babel/preset-env": "^7.22.15",
|
|
49
|
+
"@babel/preset-typescript": "7.23.0",
|
|
50
|
+
"@capacitor/core": "5.4.2",
|
|
51
|
+
"@types/bcryptjs": "2.4.6",
|
|
52
|
+
"@types/jest": "^29.5.4",
|
|
53
|
+
"@types/lodash": "4.14.199",
|
|
54
|
+
"@types/node": "20.8.2",
|
|
55
|
+
"@types/uuid": "9.0.4",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
57
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
58
|
+
"aws-sdk": "2.1550.0",
|
|
59
|
+
"babel-eslint": "^10.1.0",
|
|
60
|
+
"babel-loader": "^9.1.3",
|
|
61
|
+
"babel-preset-minify": "^0.5.2",
|
|
62
|
+
"clean-webpack-plugin": "4.0.0",
|
|
63
|
+
"colors": "1.4.0",
|
|
64
|
+
"copy-webpack-plugin": "12.0.2",
|
|
65
|
+
"css-loader": "^6.8.1",
|
|
66
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
67
|
+
"eslint": "^7.32.0",
|
|
68
|
+
"file-loader": "^6.2.0",
|
|
69
|
+
"fs-extra": "11.1.1",
|
|
70
|
+
"glob": "10.3.10",
|
|
71
|
+
"html-webpack-plugin": "^5.5.3",
|
|
72
|
+
"jest": "^29.6.4",
|
|
73
|
+
"jest-environment-jsdom": "29.7.0",
|
|
74
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
75
|
+
"npm-dts": "1.3.12",
|
|
76
|
+
"path": "0.12.7",
|
|
77
|
+
"prompt-sync": "4.2.0",
|
|
78
|
+
"source-map": "0.5.3",
|
|
79
|
+
"sqlite3": "5.1.6",
|
|
80
|
+
"style-loader": "^3.3.2",
|
|
81
|
+
"terser-webpack-plugin": "^5.3.9",
|
|
82
|
+
"ts-jest": "29.1.1",
|
|
83
|
+
"typedoc": "0.25.3",
|
|
84
|
+
"typescript": "^4.9.5",
|
|
85
|
+
"url-loader": "^4.1.1",
|
|
86
|
+
"webpack": "^5.88.2",
|
|
87
|
+
"webpack-cli": "^5.1.4",
|
|
88
|
+
"webpack-dev-server": "4.13.3",
|
|
89
|
+
"webpack-obfuscator": "3.5.1"
|
|
90
|
+
},
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"@awesome-cordova-plugins/core": "6.6.0",
|
|
93
|
+
"@awesome-cordova-plugins/network-interface": "6.6.0",
|
|
94
|
+
"@microsoft/signalr": "7.0.11",
|
|
95
|
+
"axios": "1.5.1",
|
|
96
|
+
"bcryptjs": "2.4.3",
|
|
97
|
+
"buffer": "6.0.3",
|
|
98
|
+
"crypto-browserify": "3.12.0",
|
|
99
|
+
"crypto-js": "4.2.0",
|
|
100
|
+
"dayjs": "1.11.10",
|
|
101
|
+
"dexie": "3.2.4",
|
|
102
|
+
"esc-pos-encoder-ionic": "1.1.3",
|
|
103
|
+
"lodash": "4.17.21",
|
|
104
|
+
"mathjs": "12.3.2",
|
|
105
|
+
"nanoid": "3.3.4",
|
|
106
|
+
"save": "2.9.0",
|
|
107
|
+
"selecttransform": "1.6.1",
|
|
108
|
+
"sockets-for-cordova": "1.0.0",
|
|
109
|
+
"stream-browserify": "3.0.0",
|
|
110
|
+
"uuid": "9.0.1",
|
|
111
|
+
"vm-browserify": "1.1.2",
|
|
112
|
+
"wcwidth": "1.0.1",
|
|
113
|
+
"zod": "3.23.8"
|
|
114
|
+
}
|
|
115
|
+
}
|