diff --git a/README.md b/README.md index 837d929..56aea4f 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ 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** +### 3.2.1 (2024-09-28) - (@foxriver76) updated types - (@GermanBluefox) Added i18n module diff --git a/build/cjs/index.js b/build/cjs/index.js index 2f191e2..6f38bf0 100644 --- a/build/cjs/index.js +++ b/build/cjs/index.js @@ -38,7 +38,7 @@ var utils = __toESM(require("./utils.js")); var import_types = require("@iobroker/types"); var import_controllerTools2 = require("./controllerTools.js"); __reExport(esm_exports, require("./utils.js"), module.exports); -var I18n = __toESM(require("./utils.js")); +var I18n = __toESM(require("./i18n.js")); function getAbsoluteDefaultDataDir() { return (0, import_node_path.join)(utils.controllerDir, import_controllerTools.controllerToolsInternal.getDefaultDataDir()); } diff --git a/build/cjs/index.js.map b/build/cjs/index.js.map index ef3c6be..6edc221 100644 --- a/build/cjs/index.js.map +++ b/build/cjs/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../esm/index.js"], - "sourcesContent": ["import { join } from 'node:path';\nimport { controllerToolsInternal, resolveNamedModule } from './controllerTools.js';\nimport * as utils from './utils.js';\nimport '@iobroker/types';\n// Export utility methods to be used in adapters\nexport { commonTools } from './controllerTools.js';\nexport * from './utils.js';\nexport * as I18n from './utils.js';\n/**\n * Returns the absolute path of the data directory for the current host. On linux, this is usually `/opt/iobroker/iobroker-data`.\n */\nexport function getAbsoluteDefaultDataDir() {\n return join(utils.controllerDir, controllerToolsInternal.getDefaultDataDir());\n}\n/**\n * Returns the absolute path of the data directory for the current adapter instance.\n * On linux, this is usually `/opt/iobroker/iobroker-data/.`\n *\n * @param adapterObject The adapter instance\n */\nexport function getAbsoluteInstanceDataDir(adapterObject) {\n return join(getAbsoluteDefaultDataDir(), adapterObject.namespace);\n}\n// TODO: Expose some system utilities here, e.g. for installing npm modules (GH#1)\nexport const EXIT_CODES = Object.freeze({\n // Create a shallow copy so compact adapters cannot overwrite the dict in js-controller\n ...resolveNamedModule('exitCodes', 'EXIT_CODES'),\n});\n"], + "sourcesContent": ["import { join } from 'node:path';\nimport { controllerToolsInternal, resolveNamedModule } from './controllerTools.js';\nimport * as utils from './utils.js';\nimport '@iobroker/types';\n// Export utility methods to be used in adapters\nexport { commonTools } from './controllerTools.js';\nexport * from './utils.js';\nexport * as I18n from './i18n.js';\n/**\n * Returns the absolute path of the data directory for the current host. On linux, this is usually `/opt/iobroker/iobroker-data`.\n */\nexport function getAbsoluteDefaultDataDir() {\n return join(utils.controllerDir, controllerToolsInternal.getDefaultDataDir());\n}\n/**\n * Returns the absolute path of the data directory for the current adapter instance.\n * On linux, this is usually `/opt/iobroker/iobroker-data/.`\n *\n * @param adapterObject The adapter instance\n */\nexport function getAbsoluteInstanceDataDir(adapterObject) {\n return join(getAbsoluteDefaultDataDir(), adapterObject.namespace);\n}\n// TODO: Expose some system utilities here, e.g. for installing npm modules (GH#1)\nexport const EXIT_CODES = Object.freeze({\n // Create a shallow copy so compact adapters cannot overwrite the dict in js-controller\n ...resolveNamedModule('exitCodes', 'EXIT_CODES'),\n});\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAqB;AACrB,6BAA4D;AAC5D,YAAuB;AACvB,mBAAO;AAEP,IAAAA,0BAA4B;AAC5B,wBAAc,uBANd;AAOA,WAAsB;AAIf,SAAS,4BAA4B;AACxC,aAAO,uBAAK,MAAM,eAAe,+CAAwB,kBAAkB,CAAC;AAChF;AAOO,SAAS,2BAA2B,eAAe;AACtD,aAAO,uBAAK,0BAA0B,GAAG,cAAc,SAAS;AACpE;AAEO,MAAM,aAAa,OAAO,OAAO;AAAA,EAEpC,OAAG,2CAAmB,aAAa,YAAY;AACnD,CAAC;", "names": ["import_controllerTools"] } diff --git a/build/esm/build/cjs/index.d.ts b/build/esm/build/cjs/index.d.ts index cd799b1..7a39a56 100644 --- a/build/esm/build/cjs/index.d.ts +++ b/build/esm/build/cjs/index.d.ts @@ -2,7 +2,7 @@ import { type ExitCodes } from './exitCodes.js'; import '@iobroker/types'; export { commonTools } from './controllerTools.js'; export * from './utils.js'; -export * as I18n from './utils.js'; +export * as I18n from './i18n.js'; /** * Returns the absolute path of the data directory for the current host. On linux, this is usually `/opt/iobroker/iobroker-data`. */ diff --git a/build/esm/index.d.ts b/build/esm/index.d.ts index cd799b1..7a39a56 100644 --- a/build/esm/index.d.ts +++ b/build/esm/index.d.ts @@ -2,7 +2,7 @@ import { type ExitCodes } from './exitCodes.js'; import '@iobroker/types'; export { commonTools } from './controllerTools.js'; export * from './utils.js'; -export * as I18n from './utils.js'; +export * as I18n from './i18n.js'; /** * Returns the absolute path of the data directory for the current host. On linux, this is usually `/opt/iobroker/iobroker-data`. */ diff --git a/build/esm/index.js b/build/esm/index.js index ac21ca4..8830d8f 100644 --- a/build/esm/index.js +++ b/build/esm/index.js @@ -5,7 +5,7 @@ import '@iobroker/types'; // Export utility methods to be used in adapters export { commonTools } from './controllerTools.js'; export * from './utils.js'; -export * as I18n from './utils.js'; +export * as I18n from './i18n.js'; /** * Returns the absolute path of the data directory for the current host. On linux, this is usually `/opt/iobroker/iobroker-data`. */ diff --git a/package-lock.json b/package-lock.json index d0d8c50..50183cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@iobroker/adapter-core", - "version": "3.2.0", + "version": "3.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@iobroker/adapter-core", - "version": "3.2.0", + "version": "3.2.1", "license": "MIT", "devDependencies": { "@alcalzone/esm2cjs": "^1.1.2", diff --git a/package.json b/package.json index 80da25e..2e25cb1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@iobroker/adapter-core", - "version": "3.2.0", + "version": "3.2.1", "description": "Core module to be used in ioBroker adapters. Acts as the bridge to js-controller.", "engines": { "node": ">=16"