homebridge-dummy 1.0.0-alpha.0 → 1.0.0-alpha.2
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.
- package/CHANGELOG.md +3 -3
- package/config.schema.json +6 -1
- package/dist/homebridge-ui/public/index.html +1 -1
- package/dist/homebridge-ui/public/ui.js +1 -1
- package/dist/i18n/en.d.ts +19 -1
- package/dist/i18n/en.js +20 -2
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/i18n.d.ts +19 -1
- package/dist/i18n/template.d.ts +19 -1
- package/dist/i18n/zz.d.ts +19 -1
- package/package.json +2 -2
- package/src/homebridge-ui/public/index.html +1 -1
- package/.gitattributes +0 -2
- package/eslint.config.ts +0 -35
package/CHANGELOG.md
CHANGED
|
@@ -6,11 +6,11 @@ All notable changes to homebridge-dummy will be documented in this file.
|
|
|
6
6
|
|
|
7
7
|
Please report any issues you encounter here: https://github.com/mpatfield/homebridge-dummy/issues
|
|
8
8
|
|
|
9
|
-
## 1.0.0-alpha.
|
|
9
|
+
## 1.0.0-alpha.2 (2025-07-01)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
### ‼️ BREAKING This version is a complete code rewrite. Automations using Homebridge Dummy accessories will need to be reconfigured.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Full details [here](https://github.com/mpatfield/homebridge-dummy?tab=readme-ov-file#v10-migration).
|
|
14
14
|
|
|
15
15
|
## 0.9.2 (2025-06-26)
|
|
16
16
|
|
package/config.schema.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a="Homebridge Dummy";var d={github:'<a target="_blank" href="https://github.com/mpatfield/homebridge-dummy/">GitHub</a>',migration:'<a target="_blank" href="https://github.com/mpatfield/homebridge-dummy?tab=readme-ov-file#
|
|
1
|
+
"use strict";(()=>{var a="Homebridge Dummy";var d={github:'<a target="_blank" href="https://github.com/mpatfield/homebridge-dummy/">GitHub</a>',migration:'<a target="_blank" href="https://github.com/mpatfield/homebridge-dummy?tab=readme-ov-file#v10-migration">GitHub</a>',dummy:a},g=e=>{document.querySelectorAll("[i18n]").forEach(n=>{let i=n.getAttribute("i18n"),o=e.config[i],t=n.getAttribute("i18n_replace");t&&(o=o.replace("%s",d[t])),n.innerHTML=o})},u=e=>{let n=["span","label","legend","option","p"];Array.from(window.parent.document.querySelectorAll(n.join(","))).sort((o,t)=>n.indexOf(o.tagName.toLowerCase())-n.indexOf(t.tagName.toLowerCase())).forEach(o=>{let t=o.innerHTML;t=t.replaceAll(/\$\{config\.(title|description|enumNames)\.([^}]+)\}/g,(m,r,c)=>e.config[r]&&typeof e.config[r]=="object"&&c in e.config[r]?e.config[r][c]:m),o.innerHTML!==t&&(o.innerHTML=t)})},l=e=>{let n=Array.from(window.parent.document.querySelectorAll("fieldset legend"));for(let i of n){let t=i.closest("fieldset")?.querySelector('input[type="text"][name="name"]');t&&i.textContent!==(t.value||e.config.title.accessory)&&(i.textContent=t.value!==""?t.value:e.config.title.accessory),t&&!t.dataset.accessoryNameListener&&(t.addEventListener("input",()=>l(e)),t.dataset.accessoryNameListener="true")}},s=e=>{document.getElementById("intro").style.display="none",document.getElementById("migration").style.display="none",document.getElementById("support").style.display="block",new MutationObserver(()=>{u(e),l(e)}).observe(window.parent.document.body,{childList:!0,subtree:!0}),homebridge.showSchemaForm(),homebridge.enableSaveButton(),homebridge.hideSpinner()},f=e=>{document.getElementById("intro").style.display="none",document.getElementById("migration").style.display="block",document.getElementById("skipMigration").addEventListener("click",async()=>{await homebridge.updatePluginConfig([{name:a}]),await homebridge.savePluginConfig(),s(e)}),document.getElementById("doMigration").addEventListener("click",async()=>{await homebridge.updatePluginConfig([{name:a,migrationNeeded:!0}]),await homebridge.savePluginConfig(),homebridge.closeSettings(),homebridge.toast.info(e.config.migrationRestartDescription.replace("%s",a),e.config.migrationRestartTitle)})},y=e=>{homebridge.disableSaveButton(),document.getElementById("showSettings").addEventListener("click",async()=>{await homebridge.updatePluginConfig([{name:a}]),s(e)}),document.getElementById("showMigration").addEventListener("click",()=>{f(e)}),document.getElementById("intro").style.display="block",homebridge.hideSpinner()};(async()=>{homebridge.showSpinner();let e=await homebridge.i18nCurrentLang(),n=await homebridge.request("i18n",e);g(n),(await homebridge.getPluginConfig()).length?s(n):y(n)})();})();
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -30,11 +30,29 @@ declare const en: {
|
|
|
30
30
|
thankYou: string;
|
|
31
31
|
yes: string;
|
|
32
32
|
no: string;
|
|
33
|
-
description: {
|
|
33
|
+
description: {
|
|
34
|
+
random: string;
|
|
35
|
+
timer: string;
|
|
36
|
+
};
|
|
37
|
+
enumNames: {
|
|
38
|
+
hours: string;
|
|
39
|
+
lightbulb: string;
|
|
40
|
+
minutes: string;
|
|
41
|
+
seconds: string;
|
|
42
|
+
switch: string;
|
|
43
|
+
};
|
|
34
44
|
title: {
|
|
35
45
|
accessory: string;
|
|
46
|
+
defaultBrightness: string;
|
|
47
|
+
defaultOn: string;
|
|
48
|
+
delay: string;
|
|
36
49
|
disableLogging: string;
|
|
37
50
|
name: string;
|
|
51
|
+
options: string;
|
|
52
|
+
timer: string;
|
|
53
|
+
type: string;
|
|
54
|
+
units: string;
|
|
55
|
+
random: string;
|
|
38
56
|
};
|
|
39
57
|
};
|
|
40
58
|
startup: {
|
package/dist/i18n/en.js
CHANGED
|
@@ -19,7 +19,7 @@ const en = {
|
|
|
19
19
|
},
|
|
20
20
|
config: {
|
|
21
21
|
migrate: 'Are you upgrading from an earlier version?',
|
|
22
|
-
migrationDetails1: 'There
|
|
22
|
+
migrationDetails1: 'There are significant code changes in this version',
|
|
23
23
|
migrationDetails2: 'HomeKit automations using %s accessories will need to be reconfigured!',
|
|
24
24
|
migrationDetails3: '%s will try to migrate your accessories so they won\'t need to be recreated in Homebridge',
|
|
25
25
|
migrationDetails4: 'Would you like to migrate now?',
|
|
@@ -30,11 +30,29 @@ const en = {
|
|
|
30
30
|
thankYou: 'Thank you for installing %s',
|
|
31
31
|
yes: 'Yes',
|
|
32
32
|
no: 'No',
|
|
33
|
-
description: {
|
|
33
|
+
description: {
|
|
34
|
+
random: 'Delay will be randomized with the above value as a maximum',
|
|
35
|
+
timer: 'Optional settings to automatically toggle the accessory',
|
|
36
|
+
},
|
|
37
|
+
enumNames: {
|
|
38
|
+
hours: 'Hours',
|
|
39
|
+
lightbulb: 'Lightbulb',
|
|
40
|
+
minutes: 'Minutes',
|
|
41
|
+
seconds: 'Seconds',
|
|
42
|
+
switch: 'Switch',
|
|
43
|
+
},
|
|
34
44
|
title: {
|
|
35
45
|
accessory: 'Accessory',
|
|
46
|
+
defaultBrightness: 'Default Brightness',
|
|
47
|
+
defaultOn: 'Default to On',
|
|
48
|
+
delay: 'Delay',
|
|
36
49
|
disableLogging: 'Disable Logging',
|
|
37
50
|
name: 'Name',
|
|
51
|
+
options: 'Additional Settings',
|
|
52
|
+
timer: 'Timer',
|
|
53
|
+
type: 'Type',
|
|
54
|
+
units: 'Units',
|
|
55
|
+
random: 'Random',
|
|
38
56
|
},
|
|
39
57
|
},
|
|
40
58
|
startup: {
|
package/dist/i18n/en.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG;IAET,SAAS,EAAE;QAET,eAAe,EAAE,2CAA2C;QAE5D,SAAS,EAAE;YACT,UAAU,EAAE,qBAAqB;YACjC,OAAO,EAAE,cAAc;SACxB;QAED,KAAK,EAAE;YACL,OAAO,EAAE,UAAU;YACnB,QAAQ,EAAE,WAAW;SACtB;QAED,KAAK,EAAE;YACL,MAAM,EAAE,4BAA4B;YACpC,KAAK,EAAE,wBAAwB;YAC/B,UAAU,EAAE,0BAA0B;YACtC,UAAU,EAAE,0BAA0B;YACtC,QAAQ,EAAE,wBAAwB;SACnC;KACF;IAED,MAAM,EAAE;QACN,OAAO,EAAE,4CAA4C;QACrD,iBAAiB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AE,OAAO;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,QAAQ;SACjB;KACF;IAED,OAAO,EAAE;QACP,eAAe,EAAE,iFAAiF;QAClG,iBAAiB,EAAE,uCAAuC;QAC1D,sBAAsB,EAAE,2CAA2C;QACnE,eAAe,EAAE,kHAAkH;QACnI,eAAe,EAAE,0DAA0D;QAC3E,eAAe,EAAE,+FAA+F;QAChH,YAAY,EAAE,uBAAuB;QACrC,eAAe,EAAE,qBAAqB;QACtC,kBAAkB,EAAE,sBAAsB;QAC1C,aAAa,EAAE,kBAAkB;QACjC,eAAe,EAAE,+BAA+B;QAChD,OAAO,EAAE;YACP,4GAA4G;YAC5G,8EAA8E;YAC9E,4EAA4E;YAC5E,qHAAqH;SACtH;KACF;CACF,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
package/dist/i18n/i18n.d.ts
CHANGED
|
@@ -39,11 +39,29 @@ declare const translations: {
|
|
|
39
39
|
thankYou: string;
|
|
40
40
|
yes: string;
|
|
41
41
|
no: string;
|
|
42
|
-
description: {
|
|
42
|
+
description: {
|
|
43
|
+
random: string;
|
|
44
|
+
timer: string;
|
|
45
|
+
};
|
|
46
|
+
enumNames: {
|
|
47
|
+
hours: string;
|
|
48
|
+
lightbulb: string;
|
|
49
|
+
minutes: string;
|
|
50
|
+
seconds: string;
|
|
51
|
+
switch: string;
|
|
52
|
+
};
|
|
43
53
|
title: {
|
|
44
54
|
accessory: string;
|
|
55
|
+
defaultBrightness: string;
|
|
56
|
+
defaultOn: string;
|
|
57
|
+
delay: string;
|
|
45
58
|
disableLogging: string;
|
|
46
59
|
name: string;
|
|
60
|
+
options: string;
|
|
61
|
+
timer: string;
|
|
62
|
+
type: string;
|
|
63
|
+
units: string;
|
|
64
|
+
random: string;
|
|
47
65
|
};
|
|
48
66
|
};
|
|
49
67
|
startup: {
|
package/dist/i18n/template.d.ts
CHANGED
|
@@ -30,11 +30,29 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
30
30
|
thankYou: string;
|
|
31
31
|
yes: string;
|
|
32
32
|
no: string;
|
|
33
|
-
description: {
|
|
33
|
+
description: {
|
|
34
|
+
random: string;
|
|
35
|
+
timer: string;
|
|
36
|
+
};
|
|
37
|
+
enumNames: {
|
|
38
|
+
hours: string;
|
|
39
|
+
lightbulb: string;
|
|
40
|
+
minutes: string;
|
|
41
|
+
seconds: string;
|
|
42
|
+
switch: string;
|
|
43
|
+
};
|
|
34
44
|
title: {
|
|
35
45
|
accessory: string;
|
|
46
|
+
defaultBrightness: string;
|
|
47
|
+
defaultOn: string;
|
|
48
|
+
delay: string;
|
|
36
49
|
disableLogging: string;
|
|
37
50
|
name: string;
|
|
51
|
+
options: string;
|
|
52
|
+
timer: string;
|
|
53
|
+
type: string;
|
|
54
|
+
units: string;
|
|
55
|
+
random: string;
|
|
38
56
|
};
|
|
39
57
|
};
|
|
40
58
|
startup: {
|
package/dist/i18n/zz.d.ts
CHANGED
|
@@ -30,11 +30,29 @@ declare const zz: {
|
|
|
30
30
|
thankYou: string;
|
|
31
31
|
yes: string;
|
|
32
32
|
no: string;
|
|
33
|
-
description: {
|
|
33
|
+
description: {
|
|
34
|
+
random: string;
|
|
35
|
+
timer: string;
|
|
36
|
+
};
|
|
37
|
+
enumNames: {
|
|
38
|
+
hours: string;
|
|
39
|
+
lightbulb: string;
|
|
40
|
+
minutes: string;
|
|
41
|
+
seconds: string;
|
|
42
|
+
switch: string;
|
|
43
|
+
};
|
|
34
44
|
title: {
|
|
35
45
|
accessory: string;
|
|
46
|
+
defaultBrightness: string;
|
|
47
|
+
defaultOn: string;
|
|
48
|
+
delay: string;
|
|
36
49
|
disableLogging: string;
|
|
37
50
|
name: string;
|
|
51
|
+
options: string;
|
|
52
|
+
timer: string;
|
|
53
|
+
type: string;
|
|
54
|
+
units: string;
|
|
55
|
+
random: string;
|
|
38
56
|
};
|
|
39
57
|
};
|
|
40
58
|
startup: {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName": "Homebridge Dummy",
|
|
5
5
|
"description": "Dummy devices for Homebridge",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "1.0.0-alpha.
|
|
7
|
+
"version": "1.0.0-alpha.2",
|
|
8
8
|
"homepage": "https://github.com/mpatfield/homebridge-dummy#readme",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"main": "dist/homebridge/index.js",
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "rimraf ./dist && tsc && npm run build:html && npm run build:ui",
|
|
23
|
-
"build:html": "
|
|
23
|
+
"build:html": "node --loader ts-node/esm ./scripts/build-html.ts",
|
|
24
24
|
"build:ui": "esbuild src/homebridge-ui/ui.ts --bundle --outfile=dist/homebridge-ui/public/ui.js --minify",
|
|
25
25
|
"lint": "eslint . --max-warnings=0",
|
|
26
26
|
"prepublishOnly": "npm run lint && npm run build"
|
package/.gitattributes
DELETED
package/eslint.config.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import eslint from '@eslint/js';
|
|
2
|
-
import tseslint from 'typescript-eslint';
|
|
3
|
-
|
|
4
|
-
export default tseslint.config(
|
|
5
|
-
{
|
|
6
|
-
ignores: ['dist/**'],
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
rules: {
|
|
10
|
-
'quotes': ['error', 'single'],
|
|
11
|
-
'indent': ['error', 2, { 'SwitchCase': 0 }],
|
|
12
|
-
'linebreak-style': ['error', 'unix'],
|
|
13
|
-
'semi': ['error', 'always'],
|
|
14
|
-
'comma-dangle': ['error', 'always-multiline'],
|
|
15
|
-
'dot-notation': 'error',
|
|
16
|
-
'eqeqeq': ['error', 'smart'],
|
|
17
|
-
'curly': ['error', 'all'],
|
|
18
|
-
'brace-style': ['error'],
|
|
19
|
-
'prefer-arrow-callback': 'warn',
|
|
20
|
-
'max-len': ['warn', 160],
|
|
21
|
-
'object-curly-spacing': ['error', 'always'],
|
|
22
|
-
'no-use-before-define': 'off',
|
|
23
|
-
'@typescript-eslint/no-use-before-define': ['error', { 'classes': false, 'enums': false }],
|
|
24
|
-
'@typescript-eslint/no-unused-vars': ['error', { 'caughtErrors': 'none' }],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
languageOptions: {
|
|
29
|
-
ecmaVersion: 2022,
|
|
30
|
-
sourceType: 'module',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
eslint.configs.recommended,
|
|
34
|
-
...tseslint.configs.recommended,
|
|
35
|
-
);
|