Skip to content

Commit d2cf6a0

Browse files
authored
started adapter.ts port (#1917)
* started adapter.ts port * added more types to AdapterOptions * more types * more types * more types fixed * started porting first methods in our new style * some more methods ported * added more signatures to methods * start porting async methods * more async methods defined * do not use this.log internally * more types * switch to interface merging * imports * dynamic methods with overloads need to be defined by interface merging * ported lots of methods * more types fixed * more types * more types * working towards first compile * more fixes * finish line for first build is close * first build * some types improved * fix some tests * fixed setState signature and strictObjectCheck * some type improvements + tests fixed * fix build * better types * more types * more types * typo * fix tests * more types * only 10 methods left * fix tests * deleteDevice * more types * port finished for first review * fix this context * fix forbidden_chars, generated typedoc docs via postbuild * incorporate #1923 * use markdown docs instead of html, to be easier compatible with offical docs * exlucde private methods and attributes from public docs * forgot private prefix on one method * remove jsdoc memberof and alias as it is redundant * asserts -> assert * fix build * fix this context test * some review addressed * some more review * some more review * move simple definitions above constructor * move types into separate file and fix missing unknown strategy on some methods * type adapterConfig * fix del state * fix missing overloads * fix format date * address comments
1 parent b02ab71 commit d2cf6a0

File tree

86 files changed

+15085
-161201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+15085
-161201
lines changed

package-lock.json

Lines changed: 106 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
"@types/mocha": "^9.0.0",
3535
"@types/node": "^17.0.5",
3636
"@types/node-forge": "^1.0.0",
37+
"@types/node-schedule": "^2.1.0",
38+
"@types/pidusage": "^2.0.2",
3739
"@types/readline-sync": "^1.4.4",
3840
"@types/semver": "^7.3.10",
3941
"@types/tar": "^6.1.1",
@@ -59,6 +61,8 @@
5961
"semver": "^7.3.7",
6062
"sinon": "^13.0.2",
6163
"sinon-chai": "^3.7.0",
64+
"typedoc": "^0.22.15",
65+
"typedoc-plugin-markdown": "^3.12.1",
6266
"typescript": "^4.7.4"
6367
},
6468
"scripts": {

packages/adapter/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@iobroker/db-states-jsonl": "file:../db-states-jsonl",
1414
"@iobroker/db-states-redis": "file:../db-states-redis",
1515
"@iobroker/js-controller-common": "file:../common",
16+
"@iobroker/js-controller-common-db": "file:../common-db",
1617
"@iobroker/plugin-base": "~1.2.1",
1718
"@iobroker/plugin-sentry": "~1.2.0",
1819
"deep-clone": "^3.0.3",
@@ -39,7 +40,7 @@
3940
},
4041
"scripts": {
4142
"build": "tsc -b tsconfig.build.json",
42-
"postbuild": "cpy ./src/cert/ ./build/"
43+
"postbuild": "cpy ./cert ../build/ --cwd=src && typedoc --excludePrivate --plugin typedoc-plugin-markdown src/lib/adapter/adapter.ts --out ../controller/doc"
4344
},
4445
"main": "build/index.js",
4546
"types": "build/index.d.ts",

packages/adapter/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export { default as Adapter } from './lib/adapter/adapter';
1+
export { Adapter } from './lib/adapter/adapter';
22
export { Utils } from './lib/adapter/utils';
3+
export * from './lib/_Types';

0 commit comments

Comments
 (0)