@posx/core 5.5.323 → 5.5.325

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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@posx/core",
3
- "version": "5.5.323",
3
+ "version": "5.5.325",
4
4
  "description": "POSX core libraries",
5
- "main": "build/index.js",
5
+ "main": "./build/index.js",
6
6
  "author": "Steven Lee",
7
7
  "license": "UNLICENSED",
8
8
  "keywords": [
@@ -1,22 +1,25 @@
1
1
  {
2
2
  "name": "@posx/core",
3
- "version": "5.5.323",
3
+ "version": "5.5.325",
4
4
  "description": "POSX core libraries",
5
5
  "type": "module",
6
- "main": "build/index.js",
7
- "module": "build/index.js",
8
- "types": "build/index.d.ts",
6
+ "main": "./build/index.js",
7
+ "module": "./build/index.js",
8
+ "types": "./build/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "import": "./build/index.js",
12
12
  "types": "./build/index.d.ts"
13
13
  }
14
14
  },
15
+ "files": [
16
+ "build"
17
+ ],
15
18
  "scripts": {
16
19
  "up": "node ./scripts/upload-to-s3.cjs --trace-warnings",
17
- "start": "vite",
18
- "build": "vite build",
19
- "build:dts": "vite build",
20
+ "start": "tsdown --watch",
21
+ "build": "tsdown",
22
+ "build:dts": "tsdown --dts-only",
20
23
  "post:build": "node ./scripts/clean-build.cjs",
21
24
  "mvm": "mv build/*.map scripts/sourcemaps/ && mv build/**/*.map scripts/sourcemaps/ && find build -name '*.map' -type f -delete",
22
25
  "build:demo": "vite build --mode demo",
@@ -72,6 +75,7 @@
72
75
  "sqlite3": "5.1.6",
73
76
  "terser": "^5.36.0",
74
77
  "ts-jest": "29.4.5",
78
+ "tsdown": "0.16.1",
75
79
  "typedoc": "^0.26.0",
76
80
  "typescript": "^5.6.3",
77
81
  "vite": "^5.4.11",
@@ -0,0 +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
+ })
package/vite.config.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { defineConfig, Plugin } from 'vite'
2
2
  import { resolve } from 'path'
3
- import dts from 'vite-plugin-dts'
4
3
  import vitePluginBundleObfuscator from 'vite-plugin-bundle-obfuscator'
5
4
  import { getBanner } from './scripts/getBanner.mjs'
6
5
 
@@ -17,13 +16,6 @@ const bannerPlugin = (): Plugin => ({
17
16
 
18
17
  export default defineConfig({
19
18
  plugins: [
20
- dts({
21
- outDir: 'build',
22
- insertTypesEntry: true,
23
- rollupTypes: true,
24
- include: ['src/**/*.ts'],
25
- exclude: ['src/test/**', 'src/tests/**', '**/*.test.ts', '**/*.spec.ts'],
26
- }),
27
19
  bannerPlugin(),
28
20
  vitePluginBundleObfuscator({
29
21
  enable: true,