@open-charging-cloud/chargy-core 0.3.0 → 0.4.0

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.
@@ -0,0 +1,3 @@
1
+ export type PdfJsLib = typeof import("pdfjs-dist");
2
+ export declare function importPdfJs(): Promise<PdfJsLib>;
3
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/pdfjs/browser.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,cAAc,YAAY,CAAC,CAAC;AAEnD,wBAAsB,WAAW,IAAI,OAAO,CAAC,QAAQ,CAAC,CAUrD"}
@@ -0,0 +1,3 @@
1
+ import type { PdfJsLib } from "./browser";
2
+ export declare function importPdfJs(): Promise<PdfJsLib>;
3
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/pdfjs/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,wBAAsB,WAAW,IAAI,OAAO,CAAC,QAAQ,CAAC,CAUrD"}
@@ -0,0 +1,3 @@
1
+ export { importPdfJs } from "./browser";
2
+ export type { PdfJsLib } from "./browser";
3
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/pdfjs/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-charging-cloud/chargy-core",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "The ChargyCore TypeScript library shared between Chargy Desktop, Web & Mobile applications.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -20,21 +20,27 @@
20
20
  "exports": {
21
21
  ".": {
22
22
  "types": "./dist/index.d.ts",
23
- "import": "./dist/index.js"
23
+ "browser": "./dist/browser/index.js",
24
+ "node": "./dist/node/index.js",
25
+ "import": "./dist/browser/index.js",
26
+ "default": "./dist/browser/index.js"
24
27
  },
25
28
  "./i18n.json": "./i18n.json",
26
29
  "./package.json": "./package.json"
27
30
  },
28
31
  "types": "./dist/index.d.ts",
29
- "main": "./dist/index.js",
30
- "module": "./dist/index.js",
32
+ "main": "./dist/node/index.js",
33
+ "module": "./dist/browser/index.js",
31
34
  "scripts": {
32
35
  "clean": "rimraf dist",
33
36
  "build": "npm run clean && npm run build:js && npm run build:types",
34
37
  "build:js": "tsup",
35
38
  "build:types": "tsc -p tsconfig.build.json",
36
- "test": "vitest run",
37
- "test:watch": "vitest",
39
+ "test": "npm run test:node && npm run build && npm run test:bundle && npm run test:browser",
40
+ "test:node": "vitest run --config vitest.config.ts",
41
+ "test:bundle": "vitest run --config vitest.bundle.config.ts",
42
+ "test:browser": "vitest run --config vitest.browser.config.ts --browser",
43
+ "test:watch": "vitest --config vitest.config.ts",
38
44
  "test:ui": "vitest --ui",
39
45
  "test:coverage": "vitest run --coverage",
40
46
  "lint": "eslint .",
@@ -65,10 +71,13 @@
65
71
  "@oozcitak/dom": "1.15.10",
66
72
  "@types/elliptic": "^6.4.18",
67
73
  "@types/node": "^25.9.3",
74
+ "@vitest/browser": "^4.1.9",
75
+ "@vitest/browser-playwright": "^4.1.9",
68
76
  "@vitest/coverage-v8": "^4.1.9",
69
77
  "@vitest/ui": "^4.1.9",
70
78
  "eslint": "^10.5.0",
71
79
  "globals": "^17.6.0",
80
+ "playwright": "^1.61.0",
72
81
  "rimraf": "^6.1.3",
73
82
  "tsup": "^8.5.1",
74
83
  "typescript": "^6.0.3",