ecoinvent-interface 1.1.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,65 @@
1
+ /**
2
+ * Log levels
3
+ */
4
+ export declare enum LogLevel {
5
+ ERROR = 0,
6
+ WARN = 1,
7
+ INFO = 2,
8
+ DEBUG = 3
9
+ }
10
+ /**
11
+ * Set the global log level
12
+ *
13
+ * @param level Log level
14
+ */
15
+ export declare function setLogLevel(level: LogLevel): void;
16
+ /**
17
+ * Get the global log level
18
+ */
19
+ export declare function getLogLevel(): LogLevel;
20
+ /**
21
+ * Logger class
22
+ */
23
+ export declare class Logger {
24
+ name: string;
25
+ /**
26
+ * Create a new logger
27
+ *
28
+ * @param name Logger name
29
+ */
30
+ constructor(name: string);
31
+ /**
32
+ * Log an error message
33
+ *
34
+ * @param message Message to log
35
+ * @param args Additional arguments
36
+ */
37
+ error(message: string, ...args: any[]): void;
38
+ /**
39
+ * Log a warning message
40
+ *
41
+ * @param message Message to log
42
+ * @param args Additional arguments
43
+ */
44
+ warn(message: string, ...args: any[]): void;
45
+ /**
46
+ * Log an info message
47
+ *
48
+ * @param message Message to log
49
+ * @param args Additional arguments
50
+ */
51
+ info(message: string, ...args: any[]): void;
52
+ /**
53
+ * Log a debug message
54
+ *
55
+ * @param message Message to log
56
+ * @param args Additional arguments
57
+ */
58
+ debug(message: string, ...args: any[]): void;
59
+ }
60
+ /**
61
+ * Get a logger for a specific name
62
+ *
63
+ * @param name Logger name
64
+ */
65
+ export declare function getLogger(name: string): Logger;
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "ecoinvent-interface",
3
+ "version": "1.1.0",
4
+ "description": "JavaScript interface for accessing ecoinvent data",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/index.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "LICENSE",
12
+ "README.md"
13
+ ],
14
+ "scripts": {
15
+ "build": "rollup -c",
16
+ "dev": "rollup -c -w",
17
+ "test": "jest",
18
+ "test:watch": "jest --watch",
19
+ "test:coverage": "jest --coverage",
20
+ "clean": "rm -rf dist coverage",
21
+ "lint": "eslint src --ext .ts",
22
+ "prepublishOnly": "npm run clean && npm run build"
23
+ },
24
+ "keywords": [
25
+ "ecoinvent",
26
+ "lca",
27
+ "life cycle assessment",
28
+ "sustainability"
29
+ ],
30
+ "author": "",
31
+ "license": "MIT",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/onwp/ecoinvent-interface.git"
35
+ },
36
+ "homepage": "https://github.com/onwp/ecoinvent-interface",
37
+ "bugs": {
38
+ "url": "https://github.com/onwp/ecoinvent-interface/issues"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "devDependencies": {
44
+ "@rollup/plugin-commonjs": "^28.0.3",
45
+ "@rollup/plugin-node-resolve": "^16.0.1",
46
+ "@rollup/plugin-typescript": "^12.1.2",
47
+ "@types/jest": "^29.5.14",
48
+ "@types/node": "^22.14.0",
49
+ "@types/progress": "^2.0.7",
50
+ "axios": "^1.8.4",
51
+ "jest": "^29.7.0",
52
+ "rollup": "^4.39.0",
53
+ "rollup-plugin-dts": "^6.2.1",
54
+ "ts-jest": "^29.3.1",
55
+ "tslib": "^2.8.1",
56
+ "typescript": "^5.8.3"
57
+ },
58
+ "dependencies": {
59
+ "axios": "^1.8.4",
60
+ "env-paths": "^3.0.0",
61
+ "extract-zip": "^2.0.1",
62
+ "fast-xml-parser": "^5.2.0",
63
+ "fastest-levenshtein": "^1.0.16",
64
+ "fflate": "^0.8.2",
65
+ "idb-keyval": "^6.2.1",
66
+ "jszip": "^3.10.1",
67
+ "node-7z": "^3.0.0",
68
+ "node-7z-archive": "^1.1.7",
69
+ "progress": "^2.0.3"
70
+ }
71
+ }