@open-charging-cloud/chargy-core 0.2.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,7 +1,7 @@
1
1
  {
2
2
  "name": "@open-charging-cloud/chargy-core",
3
- "version": "0.2.0",
4
- "description": "Shared Chargy TypeScript core for Chargy desktop, web, and mobile applications.",
3
+ "version": "0.4.0",
4
+ "description": "The ChargyCore TypeScript library shared between Chargy Desktop, Web & Mobile applications.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
7
7
  "author": "GraphDefined GmbH",
@@ -20,25 +20,33 @@
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",
46
+ "lint": "eslint .",
47
+ "lint:fix": "eslint . --fix",
40
48
  "typecheck": "tsc --noEmit",
41
- "verify": "npm run typecheck && npm test && npm run build",
49
+ "verify": "npm run typecheck && npm run lint && npm test && npm run build",
42
50
  "prepare": "npm run build"
43
51
  },
44
52
  "dependencies": {
@@ -59,15 +67,22 @@
59
67
  "pngjs": "^7.0.0"
60
68
  },
61
69
  "devDependencies": {
70
+ "@eslint/js": "^10.0.1",
62
71
  "@oozcitak/dom": "1.15.10",
63
72
  "@types/elliptic": "^6.4.18",
64
73
  "@types/node": "^25.9.3",
65
- "@vitest/coverage-v8": "^3.2.4",
66
- "@vitest/ui": "^3.2.4",
74
+ "@vitest/browser": "^4.1.9",
75
+ "@vitest/browser-playwright": "^4.1.9",
76
+ "@vitest/coverage-v8": "^4.1.9",
77
+ "@vitest/ui": "^4.1.9",
78
+ "eslint": "^10.5.0",
79
+ "globals": "^17.6.0",
80
+ "playwright": "^1.61.0",
67
81
  "rimraf": "^6.1.3",
68
82
  "tsup": "^8.5.1",
69
83
  "typescript": "^6.0.3",
70
- "vitest": "^3.2.4"
84
+ "typescript-eslint": "^8.49.0",
85
+ "vitest": "^4.1.9"
71
86
  },
72
87
  "peerDependencies": {
73
88
  "typescript": ">=5.4"