diff --git a/README.md b/README.md index 56aea4f..5333def 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,11 @@ If you find errors in the definitions, e.g., function calls that should be allow Placeholder for the next version (at the beginning of the line): ### **WORK IN PROGRESS** --> + +### __WORK IN PROGRESS__ + +- (Apollon77) Fix types + ### 3.2.1 (2024-09-28) - (@foxriver76) updated types diff --git a/build/esm/build/cjs/controllerTools.d.ts b/build/cjs/controllerTools.d.ts similarity index 100% rename from build/esm/build/cjs/controllerTools.d.ts rename to build/cjs/controllerTools.d.ts diff --git a/build/cjs/controllerTools.js b/build/cjs/controllerTools.js index da415d1..05a9e96 100644 --- a/build/cjs/controllerTools.js +++ b/build/cjs/controllerTools.js @@ -33,7 +33,7 @@ module.exports = __toCommonJS(controllerTools_exports); var import_node_path = require("node:path"); var import_node_module = require("node:module"); var import_helpers = require("./helpers.js"); -var utils = __toESM(require("./utils.js")); +var utils = __toESM(require("./utils.js"), 1); const import_meta = {}; const require2 = (0, import_node_module.createRequire)(import_meta.url || `file://${__filename}`); let controllerCommonModulesInternal; diff --git a/build/esm/build/cjs/exitCodes.d.ts b/build/cjs/exitCodes.d.ts similarity index 100% rename from build/esm/build/cjs/exitCodes.d.ts rename to build/cjs/exitCodes.d.ts diff --git a/build/esm/build/cjs/helpers.d.ts b/build/cjs/helpers.d.ts similarity index 100% rename from build/esm/build/cjs/helpers.d.ts rename to build/cjs/helpers.d.ts diff --git a/build/esm/build/cjs/i18n.d.ts b/build/cjs/i18n.d.ts similarity index 100% rename from build/esm/build/cjs/i18n.d.ts rename to build/cjs/i18n.d.ts diff --git a/build/esm/build/cjs/index.d.ts b/build/cjs/index.d.ts similarity index 100% rename from build/esm/build/cjs/index.d.ts rename to build/cjs/index.d.ts diff --git a/build/cjs/index.js b/build/cjs/index.js index 6f38bf0..aebde27 100644 --- a/build/cjs/index.js +++ b/build/cjs/index.js @@ -34,11 +34,11 @@ __export(esm_exports, { module.exports = __toCommonJS(esm_exports); var import_node_path = require("node:path"); var import_controllerTools = require("./controllerTools.js"); -var utils = __toESM(require("./utils.js")); +var utils = __toESM(require("./utils.js"), 1); var import_types = require("@iobroker/types"); var import_controllerTools2 = require("./controllerTools.js"); __reExport(esm_exports, require("./utils.js"), module.exports); -var I18n = __toESM(require("./i18n.js")); +var I18n = __toESM(require("./i18n.js"), 1); function getAbsoluteDefaultDataDir() { return (0, import_node_path.join)(utils.controllerDir, import_controllerTools.controllerToolsInternal.getDefaultDataDir()); } diff --git a/build/esm/build/cjs/utils.d.ts b/build/cjs/utils.d.ts similarity index 100% rename from build/esm/build/cjs/utils.d.ts rename to build/cjs/utils.d.ts diff --git a/package.json b/package.json index 2e25cb1..45ef895 100644 --- a/package.json +++ b/package.json @@ -14,15 +14,20 @@ "module": "build/esm/index.js", "exports": { ".": { - "import": "./build/esm/index.js", - "require": "./build/cjs/index.js", - "types": "./build/esm/index.d.ts" + "import": { + "types": "./build/esm/index.d.ts", + "default": "./build/esm/index.js" + }, + "require": { + "types": "./build/cjs/index.d.ts", + "default": "./build/cjs/index.js" + } } }, "scripts": { "prebuild": "rimraf ./build", "build": "tsc -p src/tsconfig.json", - "postbuild": "esm2cjs --in build/esm --out build/cjs -l error && cpy ./**/*.d.ts ./build/cjs/ --cwd=build/esm/", + "postbuild": "esm2cjs --in ./build/esm --out ./build/cjs -l error && cpy ./**/*.d.ts ../cjs/ --cwd=build/esm/", "watch": "tsc -p src/tsconfig.json --watch", "lint:ts": "eslint -c eslint.config.mjs src", "lint": "npm run lint:ts",