@posx/core 5.5.340 → 5.5.351

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.
@@ -1,120 +1,120 @@
1
- {
2
- "name": "@posx/core",
3
- "version": "5.5.340",
4
- "description": "POSX core libraries",
5
- "type": "module",
6
- "main": "./build/index.js",
7
- "module": "./build/index.js",
8
- "types": "./build/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./build/index.js",
12
- "types": "./build/index.d.ts"
13
- }
14
- },
15
- "files": [
16
- "build"
17
- ],
18
- "scripts": {
19
- "up": "node ./scripts/upload-to-s3.cjs --trace-warnings",
20
- "start": "tsdown --watch",
21
- "build": "tsdown",
22
- "build:dts": "tsdown --dts-only",
23
- "post:build": "node ./scripts/clean-build.cjs",
24
- "mvm": "mv build/*.map scripts/sourcemaps/ && mv build/**/*.map scripts/sourcemaps/ && find build -name '*.map' -type f -delete",
25
- "build:demo": "vite build --mode demo",
26
- "test": "jest --maxWorkers=2",
27
- "test:watch": "jest --watch",
28
- "publish": "node ./scripts/publish.cjs",
29
- "p": "pnpm i && npm test && npm run up:p && npm run build && npm run post:build && npm run publish && rm -rf build",
30
- "debug": "npm run build && npm run post:build",
31
- "coverage": "jest --coverage",
32
- "trypublish": "npm publish || true",
33
- "gen:index": "node ./scriptswc/generateIndex.cjs",
34
- "up:p": "npm version patch && git push",
35
- "up:m": "npm version minor && git push",
36
- "docs": "typedoc --out docs src --excludePrivate --exclude '**/demo/**/*' --exclude '**/*+(interface|function|enum).ts'",
37
- "see": "node ./scripts/lookup-sm.cjs"
38
- },
39
- "repository": {
40
- "type": "git"
41
- },
42
- "author": "Steven Lee",
43
- "license": "UNLICENSED",
44
- "bugs": {
45
- "url": ""
46
- },
47
- "homepage": "",
48
- "keywords": [
49
- "library",
50
- "starter",
51
- "es6"
52
- ],
53
- "devDependencies": {
54
- "@capacitor/core": "5.4.2",
55
- "@litepos/autoquery": "5.0.6",
56
- "@types/bcryptjs": "2.4.6",
57
- "@types/jest": "30.0.0",
58
- "@types/lodash": "4.14.199",
59
- "@types/node": "20.8.2",
60
- "@types/uuid": "9.0.4",
61
- "@typescript-eslint/eslint-plugin": "^4.33.0",
62
- "@typescript-eslint/parser": "^4.33.0",
63
- "@vitest/coverage-v8": "^2.1.0",
64
- "ajv": "8.17.1",
65
- "aws-sdk": "2.1550.0",
66
- "colors": "1.4.0",
67
- "eslint": "^7.32.0",
68
- "fs-extra": "11.1.1",
69
- "glob": "10.3.10",
70
- "jest": "30.2.0",
71
- "jest-environment-jsdom": "30.2.0",
72
- "jsdom": "27.1.0",
73
- "prompt-sync": "4.2.0",
74
- "rollup-plugin-obfuscator": "^1.1.0",
75
- "sqlite3": "5.1.6",
76
- "terser": "^5.36.0",
77
- "ts-jest": "29.4.5",
78
- "tsdown": "0.16.1",
79
- "typedoc": "^0.26.0",
80
- "typescript": "^5.6.3",
81
- "vite": "^5.4.11",
82
- "vite-plugin-bundle-obfuscator": "1.8.0",
83
- "vite-plugin-dts": "^4.3.0",
84
- "vitest": "^2.1.0"
85
- },
86
- "dependencies": {
87
- "@awesome-cordova-plugins/core": "6.6.0",
88
- "@awesome-cordova-plugins/network-interface": "6.6.0",
89
- "@microsoft/signalr": "7.0.11",
90
- "axios": "1.5.1",
91
- "bcryptjs": "2.4.3",
92
- "buffer": "6.0.3",
93
- "crypto-browserify": "3.12.0",
94
- "crypto-js": "4.2.0",
95
- "dayjs": "^1.11.10",
96
- "dexie": "3.2.4",
97
- "esc-pos-encoder-ionic": "1.1.3",
98
- "handlebars": "4.7.8",
99
- "lodash": "4.17.21",
100
- "mathjs": "12.3.2",
101
- "nanoid": "3.3.4",
102
- "save": "2.9.0",
103
- "selecttransform": "1.6.1",
104
- "sockets-for-cordova": "1.0.0",
105
- "stream-browserify": "3.0.0",
106
- "uuid": "9.0.1",
107
- "vm-browserify": "1.1.2",
108
- "wcwidth": "1.0.1",
109
- "zod": "3.23.8"
110
- },
111
- "peerDependencies": {
112
- "@litepos/autoquery": "^5.0.6",
113
- "rxjs": "^7.0.0"
114
- },
115
- "peerDependenciesMeta": {
116
- "rxjs": {
117
- "optional": true
118
- }
119
- }
120
- }
1
+ {
2
+ "name": "@posx/core",
3
+ "version": "5.5.351",
4
+ "description": "POSX core libraries",
5
+ "type": "module",
6
+ "main": "./build/index.js",
7
+ "module": "./build/index.js",
8
+ "types": "./build/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./build/index.js",
12
+ "types": "./build/index.d.ts"
13
+ }
14
+ },
15
+ "files": [
16
+ "build"
17
+ ],
18
+ "scripts": {
19
+ "up": "node ./scripts/upload-to-s3.cjs --trace-warnings",
20
+ "start": "tsdown --watch",
21
+ "build": "tsdown",
22
+ "build:dts": "tsdown --dts-only",
23
+ "post:build": "node ./scripts/clean-build.cjs",
24
+ "mvm": "mv build/*.map scripts/sourcemaps/ && mv build/**/*.map scripts/sourcemaps/ && find build -name '*.map' -type f -delete",
25
+ "build:demo": "vite build --mode demo",
26
+ "test": "jest --maxWorkers=2",
27
+ "test:watch": "jest --watch",
28
+ "publish": "node ./scripts/publish.cjs",
29
+ "p": "pnpm i && npm test && npm run up:p && npm run build && npm run post:build && npm run publish && rm -rf build",
30
+ "debug": "npm run build && npm run post:build",
31
+ "coverage": "jest --coverage",
32
+ "trypublish": "npm publish || true",
33
+ "gen:index": "node ./scriptswc/generateIndex.cjs",
34
+ "up:p": "npm version patch && git push",
35
+ "up:m": "npm version minor && git push",
36
+ "docs": "typedoc --out docs src --excludePrivate --exclude '**/demo/**/*' --exclude '**/*+(interface|function|enum).ts'",
37
+ "see": "node ./scripts/lookup-sm.cjs"
38
+ },
39
+ "repository": {
40
+ "type": "git"
41
+ },
42
+ "author": "Steven Lee",
43
+ "license": "UNLICENSED",
44
+ "bugs": {
45
+ "url": ""
46
+ },
47
+ "homepage": "",
48
+ "keywords": [
49
+ "library",
50
+ "starter",
51
+ "es6"
52
+ ],
53
+ "devDependencies": {
54
+ "@capacitor/core": "5.4.2",
55
+ "@litepos/autoquery": "5.0.6",
56
+ "@types/bcryptjs": "2.4.6",
57
+ "@types/jest": "30.0.0",
58
+ "@types/lodash": "4.14.199",
59
+ "@types/node": "20.8.2",
60
+ "@types/uuid": "9.0.4",
61
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
62
+ "@typescript-eslint/parser": "^4.33.0",
63
+ "@vitest/coverage-v8": "^2.1.0",
64
+ "ajv": "8.17.1",
65
+ "aws-sdk": "2.1550.0",
66
+ "colors": "1.4.0",
67
+ "eslint": "^7.32.0",
68
+ "fs-extra": "11.1.1",
69
+ "glob": "10.3.10",
70
+ "jest": "30.2.0",
71
+ "jest-environment-jsdom": "30.2.0",
72
+ "jsdom": "27.1.0",
73
+ "prompt-sync": "4.2.0",
74
+ "rollup-plugin-obfuscator": "^1.1.0",
75
+ "sqlite3": "5.1.6",
76
+ "terser": "^5.36.0",
77
+ "ts-jest": "29.4.5",
78
+ "tsdown": "0.16.1",
79
+ "typedoc": "^0.26.0",
80
+ "typescript": "^5.6.3",
81
+ "vite": "^5.4.11",
82
+ "vite-plugin-bundle-obfuscator": "1.8.0",
83
+ "vite-plugin-dts": "^4.3.0",
84
+ "vitest": "^2.1.0"
85
+ },
86
+ "dependencies": {
87
+ "@awesome-cordova-plugins/core": "6.6.0",
88
+ "@awesome-cordova-plugins/network-interface": "6.6.0",
89
+ "@microsoft/signalr": "7.0.11",
90
+ "axios": "1.5.1",
91
+ "bcryptjs": "2.4.3",
92
+ "buffer": "6.0.3",
93
+ "crypto-browserify": "3.12.0",
94
+ "crypto-js": "4.2.0",
95
+ "dayjs": "^1.11.10",
96
+ "dexie": "3.2.4",
97
+ "esc-pos-encoder-ionic": "1.1.3",
98
+ "handlebars": "4.7.8",
99
+ "lodash": "4.17.21",
100
+ "mathjs": "12.3.2",
101
+ "nanoid": "3.3.4",
102
+ "save": "2.9.0",
103
+ "selecttransform": "1.6.1",
104
+ "sockets-for-cordova": "1.0.0",
105
+ "stream-browserify": "3.0.0",
106
+ "uuid": "9.0.1",
107
+ "vm-browserify": "1.1.2",
108
+ "wcwidth": "1.0.1",
109
+ "zod": "3.23.8"
110
+ },
111
+ "peerDependencies": {
112
+ "@litepos/autoquery": "^5.0.6",
113
+ "rxjs": "^7.0.0"
114
+ },
115
+ "peerDependenciesMeta": {
116
+ "rxjs": {
117
+ "optional": true
118
+ }
119
+ }
120
+ }
package/tsdown.config.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { defineConfig } from 'tsdown'
2
-
3
- export default defineConfig({
4
- entry: 'src/index.ts',
5
- outDir: 'build',
6
- format: 'esm',
7
- platform: 'neutral',
8
- target: 'es2020',
9
- clean: true,
10
- sourcemap: true,
11
- dts: {
12
- resolve: true,
13
- },
14
- external: [
15
- '@litepos/autoquery',
16
- 'rxjs',
17
- ],
18
- })
1
+ import { defineConfig } from 'tsdown'
2
+
3
+ export default defineConfig({
4
+ entry: 'src/index.ts',
5
+ outDir: 'build',
6
+ format: 'esm',
7
+ platform: 'neutral',
8
+ target: 'es2020',
9
+ clean: true,
10
+ sourcemap: true,
11
+ dts: {
12
+ resolve: true,
13
+ },
14
+ external: [
15
+ '@litepos/autoquery',
16
+ 'rxjs',
17
+ ],
18
+ })
package/vite.config.ts CHANGED
@@ -1,86 +1,86 @@
1
- import { defineConfig, Plugin } from 'vite'
2
- import { resolve } from 'path'
3
- import vitePluginBundleObfuscator from 'vite-plugin-bundle-obfuscator'
4
- import { getBanner } from './scripts/getBanner.mjs'
5
-
6
- const bannerPlugin = (): Plugin => ({
7
- name: 'banner-plugin',
8
- generateBundle(_, bundle) {
9
- for (const chunk of Object.values(bundle)) {
10
- if (chunk.type === 'chunk' && chunk.fileName === 'index.js') {
11
- chunk.code = getBanner() + '\n' + chunk.code
12
- }
13
- }
14
- },
15
- })
16
-
17
- export default defineConfig({
18
- plugins: [
19
- bannerPlugin(),
20
- vitePluginBundleObfuscator({
21
- enable: true,
22
- log: false,
23
- autoExcludeNodeModules: true,
24
- threadPool: { enable: true, size: 4 },
25
- options: {
26
- compact: true,
27
- controlFlowFlattening: false,
28
- deadCodeInjection: false,
29
- debugProtection: false,
30
- identifierNamesGenerator: 'hexadecimal',
31
- renameGlobals: false,
32
- selfDefending: false,
33
- simplify: true,
34
- stringArray: true,
35
- stringArrayRotate: true,
36
- stringArrayShuffle: true,
37
- stringArrayIndexShift: true,
38
- stringArrayThreshold: 0.6,
39
- unicodeEscapeSequence: false,
40
- },
41
- }),
42
- ],
43
- build: {
44
- outDir: 'build',
45
- lib: {
46
- entry: resolve(__dirname, 'src/index.ts'),
47
- name: '@posx/core',
48
- formats: ['es'],
49
- fileName: () => 'index.js',
50
- },
51
- rollupOptions: {
52
- external: [
53
- '@litepos/autoquery',
54
- 'rxjs',
55
- ],
56
- output: {
57
- preserveModules: false,
58
- },
59
- },
60
- sourcemap: true,
61
- minify: 'terser',
62
- terserOptions: {
63
- compress: {
64
- drop_console: true,
65
- drop_debugger: true,
66
- pure_funcs: ['console.log', 'console.info', 'console.debug', 'console.warn'],
67
- passes: 2,
68
- },
69
- mangle: true,
70
- format: {
71
- comments: false,
72
- beautify: false,
73
- semicolons: true,
74
- },
75
- },
76
- cssMinify: true,
77
- },
78
- resolve: {
79
- alias: {
80
- buffer: 'buffer/',
81
- crypto: 'crypto-browserify',
82
- stream: 'stream-browserify',
83
- vm: 'vm-browserify',
84
- },
85
- },
86
- })
1
+ import { defineConfig, Plugin } from 'vite'
2
+ import { resolve } from 'path'
3
+ import vitePluginBundleObfuscator from 'vite-plugin-bundle-obfuscator'
4
+ import { getBanner } from './scripts/getBanner.mjs'
5
+
6
+ const bannerPlugin = (): Plugin => ({
7
+ name: 'banner-plugin',
8
+ generateBundle(_, bundle) {
9
+ for (const chunk of Object.values(bundle)) {
10
+ if (chunk.type === 'chunk' && chunk.fileName === 'index.js') {
11
+ chunk.code = getBanner() + '\n' + chunk.code
12
+ }
13
+ }
14
+ },
15
+ })
16
+
17
+ export default defineConfig({
18
+ plugins: [
19
+ bannerPlugin(),
20
+ vitePluginBundleObfuscator({
21
+ enable: true,
22
+ log: false,
23
+ autoExcludeNodeModules: true,
24
+ threadPool: { enable: true, size: 4 },
25
+ options: {
26
+ compact: true,
27
+ controlFlowFlattening: false,
28
+ deadCodeInjection: false,
29
+ debugProtection: false,
30
+ identifierNamesGenerator: 'hexadecimal',
31
+ renameGlobals: false,
32
+ selfDefending: false,
33
+ simplify: true,
34
+ stringArray: true,
35
+ stringArrayRotate: true,
36
+ stringArrayShuffle: true,
37
+ stringArrayIndexShift: true,
38
+ stringArrayThreshold: 0.6,
39
+ unicodeEscapeSequence: false,
40
+ },
41
+ }),
42
+ ],
43
+ build: {
44
+ outDir: 'build',
45
+ lib: {
46
+ entry: resolve(__dirname, 'src/index.ts'),
47
+ name: '@posx/core',
48
+ formats: ['es'],
49
+ fileName: () => 'index.js',
50
+ },
51
+ rollupOptions: {
52
+ external: [
53
+ '@litepos/autoquery',
54
+ 'rxjs',
55
+ ],
56
+ output: {
57
+ preserveModules: false,
58
+ },
59
+ },
60
+ sourcemap: true,
61
+ minify: 'terser',
62
+ terserOptions: {
63
+ compress: {
64
+ drop_console: true,
65
+ drop_debugger: true,
66
+ pure_funcs: ['console.log', 'console.info', 'console.debug', 'console.warn'],
67
+ passes: 2,
68
+ },
69
+ mangle: true,
70
+ format: {
71
+ comments: false,
72
+ beautify: false,
73
+ semicolons: true,
74
+ },
75
+ },
76
+ cssMinify: true,
77
+ },
78
+ resolve: {
79
+ alias: {
80
+ buffer: 'buffer/',
81
+ crypto: 'crypto-browserify',
82
+ stream: 'stream-browserify',
83
+ vm: 'vm-browserify',
84
+ },
85
+ },
86
+ })