assign-gingerly 0.0.93 → 0.0.95
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/DX/strictDefaultPermissions.js +64 -0
- package/DX/strictDefaultPermissions.ts +102 -0
- package/inferencer/package-lock.json +401 -40
- package/inferencer/package.json +6 -6
- package/inferencer/types/EnhancementConversionInstructions.md +25 -27
- package/inferencer/types/be-intl/types.d.ts +27 -6
- package/inferencer/types/be-literate/types.d.ts +34 -0
- package/inferencer/types/inferencer/types.d.ts +14 -0
- package/package.json +5 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTML event-handler content attributes. The browser compiles these into
|
|
3
|
+
* live event handlers as soon as they're set via `setAttribute` (and they
|
|
4
|
+
* shadow the identically-named element properties), so both forms are
|
|
5
|
+
* blocked outright — there's no safe "same-domain" version of inline script.
|
|
6
|
+
*
|
|
7
|
+
* Not exhaustive (there is no wildcard/regex support in `restrictedPropSettings`
|
|
8
|
+
* today — see docs/assign-permissions.md). Spread this array and add more
|
|
9
|
+
* names for handlers not listed here.
|
|
10
|
+
*/
|
|
11
|
+
export const xssSensitiveAttrs = [
|
|
12
|
+
'onabort', 'onanimationend', 'onanimationiteration', 'onanimationstart',
|
|
13
|
+
'onauxclick', 'onbeforeinput', 'onbeforetoggle', 'onblur',
|
|
14
|
+
'onchange', 'onclick', 'oncontextmenu', 'oncopy', 'oncut',
|
|
15
|
+
'ondblclick', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave',
|
|
16
|
+
'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onfocus',
|
|
17
|
+
'oninput', 'onkeydown', 'onkeypress', 'onkeyup', 'onload',
|
|
18
|
+
'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove',
|
|
19
|
+
'onmouseout', 'onmouseover', 'onmouseup', 'onpaste',
|
|
20
|
+
'onpointerdown', 'onpointerenter', 'onpointerleave', 'onpointermove',
|
|
21
|
+
'onpointerout', 'onpointerover', 'onpointerup', 'onreset',
|
|
22
|
+
'onscroll', 'onselect', 'onsubmit', 'ontoggle',
|
|
23
|
+
'ontouchcancel', 'ontouchend', 'ontouchmove', 'ontouchstart',
|
|
24
|
+
'ontransitionend', 'onwheel',
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* Properties that assign raw markup/CSS into the DOM. There is no generic
|
|
28
|
+
* safe redirect for these, so they're blocked outright (Phase I) rather than
|
|
29
|
+
* gated by origin. Consumers who need HTML/CSS injection should route
|
|
30
|
+
* through a sanitizer via `useMethod` in their own extended config — see
|
|
31
|
+
* docs/assign-permissions.md, Phase II.
|
|
32
|
+
*/
|
|
33
|
+
export const xssSensitiveMarkupProps = ['innerHTML', 'outerHTML', 'srcdoc', 'cssText'];
|
|
34
|
+
/**
|
|
35
|
+
* Properties that carry a URL. Cross-origin values are blocked; same-origin
|
|
36
|
+
* values (including relative paths) are allowed through for both the
|
|
37
|
+
* property and the matching attribute. This stops `javascript:`, `data:`,
|
|
38
|
+
* and cross-origin navigation/exfiltration while leaving normal same-app
|
|
39
|
+
* links, images, scripts, and form actions working.
|
|
40
|
+
*/
|
|
41
|
+
export const xssSensitiveUrlProps = ['src', 'href', 'action', 'formAction'];
|
|
42
|
+
/**
|
|
43
|
+
* Methods most associated with runtime HTML/rich-text injection. Method
|
|
44
|
+
* blocking in `restrictedMethodSettings` is by name only, not by target type
|
|
45
|
+
* (see docs/assign-permissions.md, Phase IV), so this list is deliberately
|
|
46
|
+
* narrow to DOM-specific names unlikely to collide with unrelated methods on
|
|
47
|
+
* plain objects.
|
|
48
|
+
*/
|
|
49
|
+
export const xssSensitiveMethods = ['insertAdjacentHTML', 'setHTMLUnsafe', 'execCommand'];
|
|
50
|
+
/**
|
|
51
|
+
* A restrictive `AssignPermissions` default suitable as a starting point for
|
|
52
|
+
* any consumer that lets less-trusted input drive `assignGingerly`. Merge
|
|
53
|
+
* or spread it to tighten further — see the module doc above for examples.
|
|
54
|
+
*/
|
|
55
|
+
export const strictDefaultPermissions = {
|
|
56
|
+
crossDomainImports: false,
|
|
57
|
+
restrictedPropSettings: [
|
|
58
|
+
...xssSensitiveMarkupProps,
|
|
59
|
+
{ props: xssSensitiveUrlProps, attr: true, allowFromSameDomain: true },
|
|
60
|
+
{ props: xssSensitiveAttrs, attr: true },
|
|
61
|
+
],
|
|
62
|
+
restrictedMethodSettings: [...xssSensitiveMethods],
|
|
63
|
+
};
|
|
64
|
+
export default strictDefaultPermissions;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* strictDefaultPermissions.ts — A restrictive, ready-to-use `AssignPermissions`
|
|
3
|
+
* profile for libraries built on top of assign-gingerly that expose
|
|
4
|
+
* `withMethods` / `akaMethods` power to declarative sources such as HTML
|
|
5
|
+
* attributes (e.g. https://github.com/bahrus/do-assign). Unfettered, that
|
|
6
|
+
* power lets untrusted markup drive arbitrary property assignment and method
|
|
7
|
+
* calls — this profile closes the well-known DOM XSS sinks by default.
|
|
8
|
+
*
|
|
9
|
+
* This is a trusted-script-only config object (see docs/assign-permissions.md).
|
|
10
|
+
* It is exported as plain data for convenience, not because it needs to be
|
|
11
|
+
* JSON-serializable — never construct it from an untrusted attribute or payload.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { strictDefaultPermissions } from 'assign-gingerly/DX/strictDefaultPermissions.js';
|
|
15
|
+
* import { PermissionProcessor } from 'assign-gingerly/assignPermissions/PermissionProcessor.js';
|
|
16
|
+
* import assignGingerly from 'assign-gingerly/assignGingerly.js';
|
|
17
|
+
*
|
|
18
|
+
* const permissionProcessor = new PermissionProcessor(strictDefaultPermissions);
|
|
19
|
+
* assignGingerly(target, untrustedSource, options, permissionProcessor);
|
|
20
|
+
*
|
|
21
|
+
* @example Extend rather than replace
|
|
22
|
+
* import { strictDefaultPermissions, xssSensitiveAttrs } from 'assign-gingerly/DX/strictDefaultPermissions.js';
|
|
23
|
+
*
|
|
24
|
+
* const permissionProcessor = new PermissionProcessor({
|
|
25
|
+
* ...strictDefaultPermissions,
|
|
26
|
+
* restrictedPropSettings: [
|
|
27
|
+
* ...strictDefaultPermissions.restrictedPropSettings!,
|
|
28
|
+
* 'value', // also lock down this app's own sensitive prop
|
|
29
|
+
* ],
|
|
30
|
+
* });
|
|
31
|
+
*/
|
|
32
|
+
import type { AssignPermissions } from '../types/assign-gingerly/types.js';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* HTML event-handler content attributes. The browser compiles these into
|
|
36
|
+
* live event handlers as soon as they're set via `setAttribute` (and they
|
|
37
|
+
* shadow the identically-named element properties), so both forms are
|
|
38
|
+
* blocked outright — there's no safe "same-domain" version of inline script.
|
|
39
|
+
*
|
|
40
|
+
* Not exhaustive (there is no wildcard/regex support in `restrictedPropSettings`
|
|
41
|
+
* today — see docs/assign-permissions.md). Spread this array and add more
|
|
42
|
+
* names for handlers not listed here.
|
|
43
|
+
*/
|
|
44
|
+
export const xssSensitiveAttrs = [
|
|
45
|
+
'onabort', 'onanimationend', 'onanimationiteration', 'onanimationstart',
|
|
46
|
+
'onauxclick', 'onbeforeinput', 'onbeforetoggle', 'onblur',
|
|
47
|
+
'onchange', 'onclick', 'oncontextmenu', 'oncopy', 'oncut',
|
|
48
|
+
'ondblclick', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave',
|
|
49
|
+
'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onfocus',
|
|
50
|
+
'oninput', 'onkeydown', 'onkeypress', 'onkeyup', 'onload',
|
|
51
|
+
'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove',
|
|
52
|
+
'onmouseout', 'onmouseover', 'onmouseup', 'onpaste',
|
|
53
|
+
'onpointerdown', 'onpointerenter', 'onpointerleave', 'onpointermove',
|
|
54
|
+
'onpointerout', 'onpointerover', 'onpointerup', 'onreset',
|
|
55
|
+
'onscroll', 'onselect', 'onsubmit', 'ontoggle',
|
|
56
|
+
'ontouchcancel', 'ontouchend', 'ontouchmove', 'ontouchstart',
|
|
57
|
+
'ontransitionend', 'onwheel',
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Properties that assign raw markup/CSS into the DOM. There is no generic
|
|
62
|
+
* safe redirect for these, so they're blocked outright (Phase I) rather than
|
|
63
|
+
* gated by origin. Consumers who need HTML/CSS injection should route
|
|
64
|
+
* through a sanitizer via `useMethod` in their own extended config — see
|
|
65
|
+
* docs/assign-permissions.md, Phase II.
|
|
66
|
+
*/
|
|
67
|
+
export const xssSensitiveMarkupProps = ['innerHTML', 'outerHTML', 'srcdoc', 'cssText'];
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Properties that carry a URL. Cross-origin values are blocked; same-origin
|
|
71
|
+
* values (including relative paths) are allowed through for both the
|
|
72
|
+
* property and the matching attribute. This stops `javascript:`, `data:`,
|
|
73
|
+
* and cross-origin navigation/exfiltration while leaving normal same-app
|
|
74
|
+
* links, images, scripts, and form actions working.
|
|
75
|
+
*/
|
|
76
|
+
export const xssSensitiveUrlProps = ['src', 'href', 'action', 'formAction'];
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Methods most associated with runtime HTML/rich-text injection. Method
|
|
80
|
+
* blocking in `restrictedMethodSettings` is by name only, not by target type
|
|
81
|
+
* (see docs/assign-permissions.md, Phase IV), so this list is deliberately
|
|
82
|
+
* narrow to DOM-specific names unlikely to collide with unrelated methods on
|
|
83
|
+
* plain objects.
|
|
84
|
+
*/
|
|
85
|
+
export const xssSensitiveMethods = ['insertAdjacentHTML', 'setHTMLUnsafe', 'execCommand'];
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* A restrictive `AssignPermissions` default suitable as a starting point for
|
|
89
|
+
* any consumer that lets less-trusted input drive `assignGingerly`. Merge
|
|
90
|
+
* or spread it to tighten further — see the module doc above for examples.
|
|
91
|
+
*/
|
|
92
|
+
export const strictDefaultPermissions: AssignPermissions = {
|
|
93
|
+
crossDomainImports: false,
|
|
94
|
+
restrictedPropSettings: [
|
|
95
|
+
...xssSensitiveMarkupProps,
|
|
96
|
+
{ props: xssSensitiveUrlProps, attr: true, allowFromSameDomain: true },
|
|
97
|
+
{ props: xssSensitiveAttrs, attr: true },
|
|
98
|
+
],
|
|
99
|
+
restrictedMethodSettings: [...xssSensitiveMethods],
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export default strictDefaultPermissions;
|
|
@@ -1,53 +1,393 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inferencer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "inferencer",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.14",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"assign-gingerly": "0.0.
|
|
12
|
+
"assign-gingerly": "0.0.93"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@playwright/test": "1.
|
|
16
|
-
"@types/node": "
|
|
17
|
-
"spa-ssi": "0.0.
|
|
18
|
-
"typescript": "
|
|
15
|
+
"@playwright/test": "1.62.1",
|
|
16
|
+
"@types/node": "26.4.1",
|
|
17
|
+
"spa-ssi": "0.0.28",
|
|
18
|
+
"typescript": "7.0.2"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"node_modules/@playwright/test": {
|
|
22
|
-
"version": "1.
|
|
23
|
-
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.
|
|
24
|
-
"integrity": "sha512-
|
|
22
|
+
"version": "1.62.1",
|
|
23
|
+
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.62.1.tgz",
|
|
24
|
+
"integrity": "sha512-DTcUc8qii+cpHvtOwggMtBRMjKZHXYWdw8syRYu2vtzuq4Wxphqq4NfCs5Zt44L6mA8rfDfj+PHnxFc/FeK6mQ==",
|
|
25
25
|
"dev": true,
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"playwright": "1.
|
|
28
|
+
"playwright": "1.62.1"
|
|
29
29
|
},
|
|
30
30
|
"bin": {
|
|
31
31
|
"playwright": "cli.js"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
34
|
+
"node": ">=20"
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"node_modules/@types/node": {
|
|
38
|
-
"version": "
|
|
39
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-
|
|
40
|
-
"integrity": "sha512-
|
|
38
|
+
"version": "26.4.1",
|
|
39
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.4.1.tgz",
|
|
40
|
+
"integrity": "sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==",
|
|
41
41
|
"dev": true,
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"undici-types": "
|
|
44
|
+
"undici-types": "~8.3.0"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"node_modules/@typescript/typescript-aix-ppc64": {
|
|
48
|
+
"version": "7.0.2",
|
|
49
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz",
|
|
50
|
+
"integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==",
|
|
51
|
+
"cpu": [
|
|
52
|
+
"ppc64"
|
|
53
|
+
],
|
|
54
|
+
"dev": true,
|
|
55
|
+
"license": "Apache-2.0",
|
|
56
|
+
"optional": true,
|
|
57
|
+
"os": [
|
|
58
|
+
"aix"
|
|
59
|
+
],
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=16.20.0"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"node_modules/@typescript/typescript-darwin-arm64": {
|
|
65
|
+
"version": "7.0.2",
|
|
66
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz",
|
|
67
|
+
"integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==",
|
|
68
|
+
"cpu": [
|
|
69
|
+
"arm64"
|
|
70
|
+
],
|
|
71
|
+
"dev": true,
|
|
72
|
+
"license": "Apache-2.0",
|
|
73
|
+
"optional": true,
|
|
74
|
+
"os": [
|
|
75
|
+
"darwin"
|
|
76
|
+
],
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=16.20.0"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"node_modules/@typescript/typescript-darwin-x64": {
|
|
82
|
+
"version": "7.0.2",
|
|
83
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz",
|
|
84
|
+
"integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==",
|
|
85
|
+
"cpu": [
|
|
86
|
+
"x64"
|
|
87
|
+
],
|
|
88
|
+
"dev": true,
|
|
89
|
+
"license": "Apache-2.0",
|
|
90
|
+
"optional": true,
|
|
91
|
+
"os": [
|
|
92
|
+
"darwin"
|
|
93
|
+
],
|
|
94
|
+
"engines": {
|
|
95
|
+
"node": ">=16.20.0"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"node_modules/@typescript/typescript-freebsd-arm64": {
|
|
99
|
+
"version": "7.0.2",
|
|
100
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz",
|
|
101
|
+
"integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==",
|
|
102
|
+
"cpu": [
|
|
103
|
+
"arm64"
|
|
104
|
+
],
|
|
105
|
+
"dev": true,
|
|
106
|
+
"license": "Apache-2.0",
|
|
107
|
+
"optional": true,
|
|
108
|
+
"os": [
|
|
109
|
+
"freebsd"
|
|
110
|
+
],
|
|
111
|
+
"engines": {
|
|
112
|
+
"node": ">=16.20.0"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"node_modules/@typescript/typescript-freebsd-x64": {
|
|
116
|
+
"version": "7.0.2",
|
|
117
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz",
|
|
118
|
+
"integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==",
|
|
119
|
+
"cpu": [
|
|
120
|
+
"x64"
|
|
121
|
+
],
|
|
122
|
+
"dev": true,
|
|
123
|
+
"license": "Apache-2.0",
|
|
124
|
+
"optional": true,
|
|
125
|
+
"os": [
|
|
126
|
+
"freebsd"
|
|
127
|
+
],
|
|
128
|
+
"engines": {
|
|
129
|
+
"node": ">=16.20.0"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"node_modules/@typescript/typescript-linux-arm": {
|
|
133
|
+
"version": "7.0.2",
|
|
134
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz",
|
|
135
|
+
"integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==",
|
|
136
|
+
"cpu": [
|
|
137
|
+
"arm"
|
|
138
|
+
],
|
|
139
|
+
"dev": true,
|
|
140
|
+
"license": "Apache-2.0",
|
|
141
|
+
"optional": true,
|
|
142
|
+
"os": [
|
|
143
|
+
"linux"
|
|
144
|
+
],
|
|
145
|
+
"engines": {
|
|
146
|
+
"node": ">=16.20.0"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"node_modules/@typescript/typescript-linux-arm64": {
|
|
150
|
+
"version": "7.0.2",
|
|
151
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz",
|
|
152
|
+
"integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==",
|
|
153
|
+
"cpu": [
|
|
154
|
+
"arm64"
|
|
155
|
+
],
|
|
156
|
+
"dev": true,
|
|
157
|
+
"license": "Apache-2.0",
|
|
158
|
+
"optional": true,
|
|
159
|
+
"os": [
|
|
160
|
+
"linux"
|
|
161
|
+
],
|
|
162
|
+
"engines": {
|
|
163
|
+
"node": ">=16.20.0"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"node_modules/@typescript/typescript-linux-loong64": {
|
|
167
|
+
"version": "7.0.2",
|
|
168
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz",
|
|
169
|
+
"integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==",
|
|
170
|
+
"cpu": [
|
|
171
|
+
"loong64"
|
|
172
|
+
],
|
|
173
|
+
"dev": true,
|
|
174
|
+
"license": "Apache-2.0",
|
|
175
|
+
"optional": true,
|
|
176
|
+
"os": [
|
|
177
|
+
"linux"
|
|
178
|
+
],
|
|
179
|
+
"engines": {
|
|
180
|
+
"node": ">=16.20.0"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"node_modules/@typescript/typescript-linux-mips64el": {
|
|
184
|
+
"version": "7.0.2",
|
|
185
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz",
|
|
186
|
+
"integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==",
|
|
187
|
+
"cpu": [
|
|
188
|
+
"mips64el"
|
|
189
|
+
],
|
|
190
|
+
"dev": true,
|
|
191
|
+
"license": "Apache-2.0",
|
|
192
|
+
"optional": true,
|
|
193
|
+
"os": [
|
|
194
|
+
"linux"
|
|
195
|
+
],
|
|
196
|
+
"engines": {
|
|
197
|
+
"node": ">=16.20.0"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"node_modules/@typescript/typescript-linux-ppc64": {
|
|
201
|
+
"version": "7.0.2",
|
|
202
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz",
|
|
203
|
+
"integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==",
|
|
204
|
+
"cpu": [
|
|
205
|
+
"ppc64"
|
|
206
|
+
],
|
|
207
|
+
"dev": true,
|
|
208
|
+
"license": "Apache-2.0",
|
|
209
|
+
"optional": true,
|
|
210
|
+
"os": [
|
|
211
|
+
"linux"
|
|
212
|
+
],
|
|
213
|
+
"engines": {
|
|
214
|
+
"node": ">=16.20.0"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"node_modules/@typescript/typescript-linux-riscv64": {
|
|
218
|
+
"version": "7.0.2",
|
|
219
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz",
|
|
220
|
+
"integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==",
|
|
221
|
+
"cpu": [
|
|
222
|
+
"riscv64"
|
|
223
|
+
],
|
|
224
|
+
"dev": true,
|
|
225
|
+
"license": "Apache-2.0",
|
|
226
|
+
"optional": true,
|
|
227
|
+
"os": [
|
|
228
|
+
"linux"
|
|
229
|
+
],
|
|
230
|
+
"engines": {
|
|
231
|
+
"node": ">=16.20.0"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"node_modules/@typescript/typescript-linux-s390x": {
|
|
235
|
+
"version": "7.0.2",
|
|
236
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz",
|
|
237
|
+
"integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==",
|
|
238
|
+
"cpu": [
|
|
239
|
+
"s390x"
|
|
240
|
+
],
|
|
241
|
+
"dev": true,
|
|
242
|
+
"license": "Apache-2.0",
|
|
243
|
+
"optional": true,
|
|
244
|
+
"os": [
|
|
245
|
+
"linux"
|
|
246
|
+
],
|
|
247
|
+
"engines": {
|
|
248
|
+
"node": ">=16.20.0"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"node_modules/@typescript/typescript-linux-x64": {
|
|
252
|
+
"version": "7.0.2",
|
|
253
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz",
|
|
254
|
+
"integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==",
|
|
255
|
+
"cpu": [
|
|
256
|
+
"x64"
|
|
257
|
+
],
|
|
258
|
+
"dev": true,
|
|
259
|
+
"license": "Apache-2.0",
|
|
260
|
+
"optional": true,
|
|
261
|
+
"os": [
|
|
262
|
+
"linux"
|
|
263
|
+
],
|
|
264
|
+
"engines": {
|
|
265
|
+
"node": ">=16.20.0"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"node_modules/@typescript/typescript-netbsd-arm64": {
|
|
269
|
+
"version": "7.0.2",
|
|
270
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz",
|
|
271
|
+
"integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==",
|
|
272
|
+
"cpu": [
|
|
273
|
+
"arm64"
|
|
274
|
+
],
|
|
275
|
+
"dev": true,
|
|
276
|
+
"license": "Apache-2.0",
|
|
277
|
+
"optional": true,
|
|
278
|
+
"os": [
|
|
279
|
+
"netbsd"
|
|
280
|
+
],
|
|
281
|
+
"engines": {
|
|
282
|
+
"node": ">=16.20.0"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"node_modules/@typescript/typescript-netbsd-x64": {
|
|
286
|
+
"version": "7.0.2",
|
|
287
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz",
|
|
288
|
+
"integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==",
|
|
289
|
+
"cpu": [
|
|
290
|
+
"x64"
|
|
291
|
+
],
|
|
292
|
+
"dev": true,
|
|
293
|
+
"license": "Apache-2.0",
|
|
294
|
+
"optional": true,
|
|
295
|
+
"os": [
|
|
296
|
+
"netbsd"
|
|
297
|
+
],
|
|
298
|
+
"engines": {
|
|
299
|
+
"node": ">=16.20.0"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"node_modules/@typescript/typescript-openbsd-arm64": {
|
|
303
|
+
"version": "7.0.2",
|
|
304
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz",
|
|
305
|
+
"integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==",
|
|
306
|
+
"cpu": [
|
|
307
|
+
"arm64"
|
|
308
|
+
],
|
|
309
|
+
"dev": true,
|
|
310
|
+
"license": "Apache-2.0",
|
|
311
|
+
"optional": true,
|
|
312
|
+
"os": [
|
|
313
|
+
"openbsd"
|
|
314
|
+
],
|
|
315
|
+
"engines": {
|
|
316
|
+
"node": ">=16.20.0"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"node_modules/@typescript/typescript-openbsd-x64": {
|
|
320
|
+
"version": "7.0.2",
|
|
321
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz",
|
|
322
|
+
"integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==",
|
|
323
|
+
"cpu": [
|
|
324
|
+
"x64"
|
|
325
|
+
],
|
|
326
|
+
"dev": true,
|
|
327
|
+
"license": "Apache-2.0",
|
|
328
|
+
"optional": true,
|
|
329
|
+
"os": [
|
|
330
|
+
"openbsd"
|
|
331
|
+
],
|
|
332
|
+
"engines": {
|
|
333
|
+
"node": ">=16.20.0"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"node_modules/@typescript/typescript-sunos-x64": {
|
|
337
|
+
"version": "7.0.2",
|
|
338
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz",
|
|
339
|
+
"integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==",
|
|
340
|
+
"cpu": [
|
|
341
|
+
"x64"
|
|
342
|
+
],
|
|
343
|
+
"dev": true,
|
|
344
|
+
"license": "Apache-2.0",
|
|
345
|
+
"optional": true,
|
|
346
|
+
"os": [
|
|
347
|
+
"sunos"
|
|
348
|
+
],
|
|
349
|
+
"engines": {
|
|
350
|
+
"node": ">=16.20.0"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"node_modules/@typescript/typescript-win32-arm64": {
|
|
354
|
+
"version": "7.0.2",
|
|
355
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz",
|
|
356
|
+
"integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==",
|
|
357
|
+
"cpu": [
|
|
358
|
+
"arm64"
|
|
359
|
+
],
|
|
360
|
+
"dev": true,
|
|
361
|
+
"license": "Apache-2.0",
|
|
362
|
+
"optional": true,
|
|
363
|
+
"os": [
|
|
364
|
+
"win32"
|
|
365
|
+
],
|
|
366
|
+
"engines": {
|
|
367
|
+
"node": ">=16.20.0"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"node_modules/@typescript/typescript-win32-x64": {
|
|
371
|
+
"version": "7.0.2",
|
|
372
|
+
"resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz",
|
|
373
|
+
"integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==",
|
|
374
|
+
"cpu": [
|
|
375
|
+
"x64"
|
|
376
|
+
],
|
|
377
|
+
"dev": true,
|
|
378
|
+
"license": "Apache-2.0",
|
|
379
|
+
"optional": true,
|
|
380
|
+
"os": [
|
|
381
|
+
"win32"
|
|
382
|
+
],
|
|
383
|
+
"engines": {
|
|
384
|
+
"node": ">=16.20.0"
|
|
45
385
|
}
|
|
46
386
|
},
|
|
47
387
|
"node_modules/assign-gingerly": {
|
|
48
|
-
"version": "0.0.
|
|
49
|
-
"resolved": "https://registry.npmjs.org/assign-gingerly/-/assign-gingerly-0.0.
|
|
50
|
-
"integrity": "sha512-
|
|
388
|
+
"version": "0.0.93",
|
|
389
|
+
"resolved": "https://registry.npmjs.org/assign-gingerly/-/assign-gingerly-0.0.93.tgz",
|
|
390
|
+
"integrity": "sha512-vJAlAgx0Fr3dl2jzEfEOasTzzenGtCjL9iAOAN+X6GwUFU1Be4YEwMoax2BnjOFRfMtrfHFN3V+8c2p8cpJVaw==",
|
|
51
391
|
"license": "MIT"
|
|
52
392
|
},
|
|
53
393
|
"node_modules/fsevents": {
|
|
@@ -66,62 +406,83 @@
|
|
|
66
406
|
}
|
|
67
407
|
},
|
|
68
408
|
"node_modules/playwright": {
|
|
69
|
-
"version": "1.
|
|
70
|
-
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.
|
|
71
|
-
"integrity": "sha512-
|
|
409
|
+
"version": "1.62.1",
|
|
410
|
+
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.62.1.tgz",
|
|
411
|
+
"integrity": "sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg==",
|
|
72
412
|
"dev": true,
|
|
73
413
|
"license": "Apache-2.0",
|
|
74
414
|
"dependencies": {
|
|
75
|
-
"playwright-core": "1.
|
|
415
|
+
"playwright-core": "1.62.1"
|
|
76
416
|
},
|
|
77
417
|
"bin": {
|
|
78
418
|
"playwright": "cli.js"
|
|
79
419
|
},
|
|
80
420
|
"engines": {
|
|
81
|
-
"node": ">=
|
|
421
|
+
"node": ">=20"
|
|
82
422
|
},
|
|
83
423
|
"optionalDependencies": {
|
|
84
424
|
"fsevents": "2.3.2"
|
|
85
425
|
}
|
|
86
426
|
},
|
|
87
427
|
"node_modules/playwright-core": {
|
|
88
|
-
"version": "1.
|
|
89
|
-
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.
|
|
90
|
-
"integrity": "sha512-
|
|
428
|
+
"version": "1.62.1",
|
|
429
|
+
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.62.1.tgz",
|
|
430
|
+
"integrity": "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==",
|
|
91
431
|
"dev": true,
|
|
92
432
|
"license": "Apache-2.0",
|
|
93
433
|
"bin": {
|
|
94
434
|
"playwright-core": "cli.js"
|
|
95
435
|
},
|
|
96
436
|
"engines": {
|
|
97
|
-
"node": ">=
|
|
437
|
+
"node": ">=20"
|
|
98
438
|
}
|
|
99
439
|
},
|
|
100
440
|
"node_modules/spa-ssi": {
|
|
101
|
-
"version": "0.0.
|
|
102
|
-
"resolved": "https://registry.npmjs.org/spa-ssi/-/spa-ssi-0.0.
|
|
103
|
-
"integrity": "sha512-
|
|
441
|
+
"version": "0.0.28",
|
|
442
|
+
"resolved": "https://registry.npmjs.org/spa-ssi/-/spa-ssi-0.0.28.tgz",
|
|
443
|
+
"integrity": "sha512-tTOX8sv5iTes/Rup82jFAMk+5NYyC7pHqUymGESfRvT5V/SpI994c7iWTiqUvaOhxzeApf1ogZucoCgxKXkorA==",
|
|
104
444
|
"dev": true,
|
|
105
445
|
"license": "MIT"
|
|
106
446
|
},
|
|
107
447
|
"node_modules/typescript": {
|
|
108
|
-
"version": "
|
|
109
|
-
"resolved": "https://registry.npmjs.org/typescript/-/typescript-
|
|
110
|
-
"integrity": "sha512-
|
|
448
|
+
"version": "7.0.2",
|
|
449
|
+
"resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz",
|
|
450
|
+
"integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==",
|
|
111
451
|
"dev": true,
|
|
112
452
|
"license": "Apache-2.0",
|
|
113
453
|
"bin": {
|
|
114
|
-
"tsc": "bin/tsc"
|
|
115
|
-
"tsserver": "bin/tsserver"
|
|
454
|
+
"tsc": "bin/tsc"
|
|
116
455
|
},
|
|
117
456
|
"engines": {
|
|
118
|
-
"node": ">=
|
|
457
|
+
"node": ">=16.20.0"
|
|
458
|
+
},
|
|
459
|
+
"optionalDependencies": {
|
|
460
|
+
"@typescript/typescript-aix-ppc64": "7.0.2",
|
|
461
|
+
"@typescript/typescript-darwin-arm64": "7.0.2",
|
|
462
|
+
"@typescript/typescript-darwin-x64": "7.0.2",
|
|
463
|
+
"@typescript/typescript-freebsd-arm64": "7.0.2",
|
|
464
|
+
"@typescript/typescript-freebsd-x64": "7.0.2",
|
|
465
|
+
"@typescript/typescript-linux-arm": "7.0.2",
|
|
466
|
+
"@typescript/typescript-linux-arm64": "7.0.2",
|
|
467
|
+
"@typescript/typescript-linux-loong64": "7.0.2",
|
|
468
|
+
"@typescript/typescript-linux-mips64el": "7.0.2",
|
|
469
|
+
"@typescript/typescript-linux-ppc64": "7.0.2",
|
|
470
|
+
"@typescript/typescript-linux-riscv64": "7.0.2",
|
|
471
|
+
"@typescript/typescript-linux-s390x": "7.0.2",
|
|
472
|
+
"@typescript/typescript-linux-x64": "7.0.2",
|
|
473
|
+
"@typescript/typescript-netbsd-arm64": "7.0.2",
|
|
474
|
+
"@typescript/typescript-netbsd-x64": "7.0.2",
|
|
475
|
+
"@typescript/typescript-openbsd-arm64": "7.0.2",
|
|
476
|
+
"@typescript/typescript-openbsd-x64": "7.0.2",
|
|
477
|
+
"@typescript/typescript-sunos-x64": "7.0.2",
|
|
478
|
+
"@typescript/typescript-win32-arm64": "7.0.2",
|
|
479
|
+
"@typescript/typescript-win32-x64": "7.0.2"
|
|
119
480
|
}
|
|
120
481
|
},
|
|
121
482
|
"node_modules/undici-types": {
|
|
122
|
-
"version": "
|
|
123
|
-
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-
|
|
124
|
-
"integrity": "sha512-
|
|
483
|
+
"version": "8.3.0",
|
|
484
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
|
|
485
|
+
"integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
|
|
125
486
|
"dev": true,
|
|
126
487
|
"license": "MIT"
|
|
127
488
|
}
|
package/inferencer/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inferencer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "DOM Element Enhancement that makes commonly used inferences",
|
|
5
5
|
"homepage": "https://github.com/bahrus/inferencer#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"chrome": "npx playwright cr http://localhost:8000"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"assign-gingerly": "0.0.
|
|
52
|
+
"assign-gingerly": "0.0.93"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@playwright/test": "1.
|
|
56
|
-
"spa-ssi": "0.0.
|
|
57
|
-
"@types/node": "
|
|
58
|
-
"typescript": "
|
|
55
|
+
"@playwright/test": "1.62.1",
|
|
56
|
+
"spa-ssi": "0.0.28",
|
|
57
|
+
"@types/node": "26.4.1",
|
|
58
|
+
"typescript": "7.0.2"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -98,37 +98,32 @@ Update the package.json to use the modern architecture's dependencies and build
|
|
|
98
98
|
- Replace `[emoji]` with the emoji from your README.md title (e.g., `⿻` for be-clonable)
|
|
99
99
|
- If there's no emoji in the README title, omit the `&& node [emoji].mjs > [emoji].json` part
|
|
100
100
|
|
|
101
|
-
2. Update the `dependencies` section:
|
|
101
|
+
2. Update the `dependencies` section to the modern set:
|
|
102
102
|
```json
|
|
103
103
|
"dependencies": {
|
|
104
|
-
"be-hive": "
|
|
105
|
-
"mount-observer": "
|
|
106
|
-
"roundabout-lib": "
|
|
107
|
-
"nested-regex-groups": "
|
|
104
|
+
"be-hive": "*",
|
|
105
|
+
"mount-observer": "*",
|
|
106
|
+
"roundabout-lib": "*",
|
|
107
|
+
"nested-regex-groups": "*"
|
|
108
108
|
}
|
|
109
109
|
```
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- Easier debugging when issues arise
|
|
116
|
-
|
|
117
|
-
**Note:** Including `mount-observer` as a direct dependency ensures it's installed at the root `node_modules/` level, making it accessible via the import map and available for direct use in your code. The `nested-regex-groups` package is optional but recommended if your enhancement requires complex attribute parsing.
|
|
118
|
-
|
|
119
|
-
3. **DO NOT modify the `devDependencies` section** - leave it as-is. The conversion only updates runtime dependencies, not development/testing dependencies.
|
|
120
|
-
|
|
121
|
-
4. Verify the `update` script exists in the `scripts` section:
|
|
110
|
+
- Drop the legacy dependencies (`be-enhanced`, `trans-render`, etc.). Keep a legacy dependency **only** if a converted action still imports from it and the modern stack has no replacement (e.g. `trans-render/XV/set.js` for the Uniform Storage Path protocol) — note any such carry-over in your conversion notes.
|
|
111
|
+
- `mount-observer` is listed as a direct dependency so it lands at the root `node_modules/` level, accessible via the import map. `nested-regex-groups` is optional but recommended if your enhancement needs custom attribute parsing (Step 7a).
|
|
112
|
+
- The exact version strings do not matter here — the next step replaces them all with the latest published versions.
|
|
113
|
+
|
|
114
|
+
3. **Upgrade everything to the latest version**, including `devDependencies`. Do not preserve the versions the legacy project pinned, and do not hand-pick versions from this document — the version numbers in these instructions are illustrative only and go stale. Verify the `update` script exists in `scripts`:
|
|
122
115
|
```json
|
|
123
116
|
"update": "ncu -u && npm install"
|
|
124
117
|
```
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
118
|
+
If it's missing, add it. Then run:
|
|
119
|
+
```
|
|
120
|
+
npm run update
|
|
121
|
+
```
|
|
122
|
+
`npm run update` runs npm-check-updates (`ncu -u`), which rewrites **every** entry in both `dependencies` and `devDependencies` to the latest published version (as an exact point version, no `^`/`~` range), then installs. This is the single source of truth for dependency versions after conversion — `@playwright/test`, the SSI dev server, and every runtime package included.
|
|
128
123
|
|
|
129
|
-
**IMPORTANT:**
|
|
124
|
+
**IMPORTANT:** You MUST run `npm run update` before proceeding — the subsequent steps require these packages to be installed. Use `npm run update` (not a bare `npm install`) so you get the latest versions.
|
|
130
125
|
|
|
131
|
-
**Result:**
|
|
126
|
+
**Result:** `package.json` uses the modern dependency set, and every dependency (runtime and dev) is at its latest published point version.
|
|
132
127
|
|
|
133
128
|
### Step 4: Update imports.html
|
|
134
129
|
|
|
@@ -278,7 +273,9 @@ Transform the legacy browser-based emc.js into a build-time emc.mjs configuratio
|
|
|
278
273
|
*/
|
|
279
274
|
export const emc = {
|
|
280
275
|
enhConfig: {
|
|
281
|
-
|
|
276
|
+
// Keep the SAME key the legacy project used for `enhPropKey`
|
|
277
|
+
// (traditional camelCase JS property naming, e.g. 'beLiterate').
|
|
278
|
+
enhKey: '[enhPropKey]',
|
|
282
279
|
spawn: '[project-name]/[project-name].js',
|
|
283
280
|
withAttrs: {
|
|
284
281
|
base: '[project-name]',
|
|
@@ -370,11 +367,11 @@ static config = {
|
|
|
370
367
|
}
|
|
371
368
|
```
|
|
372
369
|
|
|
373
|
-
Modern emc.mjs:
|
|
370
|
+
Modern emc.mjs (note `enhKey` keeps the legacy `enhPropKey` value verbatim — `'beCommitted'`, not `'BeCommitted'`):
|
|
374
371
|
```javascript
|
|
375
372
|
export const emc = {
|
|
376
373
|
enhConfig: {
|
|
377
|
-
enhKey: '
|
|
374
|
+
enhKey: 'beCommitted',
|
|
378
375
|
spawn: 'be-committed/be-committed.js',
|
|
379
376
|
withAttrs: {
|
|
380
377
|
base: 'be-committed',
|
|
@@ -491,7 +488,7 @@ Reference the built-in parser by name and pass your pattern configuration:
|
|
|
491
488
|
```javascript
|
|
492
489
|
export const emc = {
|
|
493
490
|
enhConfig: {
|
|
494
|
-
enhKey: '
|
|
491
|
+
enhKey: 'doInvoke',
|
|
495
492
|
spawn: 'do-invoke/do-invoke.js',
|
|
496
493
|
withAttrs: {
|
|
497
494
|
base: 'do-invoke',
|
|
@@ -612,7 +609,7 @@ const parsePatterns = [
|
|
|
612
609
|
*/
|
|
613
610
|
export const emc = {
|
|
614
611
|
enhConfig: {
|
|
615
|
-
enhKey: '
|
|
612
|
+
enhKey: 'doInvoke',
|
|
616
613
|
spawn: 'do-invoke/do-invoke.js',
|
|
617
614
|
withAttrs: {
|
|
618
615
|
base: 'do-invoke',
|
|
@@ -854,6 +851,7 @@ Transform the legacy enhancement class to use the modern architecture with round
|
|
|
854
851
|
6. **Single library call**: Only roundabout is called - no separate assignGingerly import needed
|
|
855
852
|
7. **No bootUp/export boilerplate**: Simply export the class, no await bootUp() needed
|
|
856
853
|
8. **BAP → AP**: Replace all BAP type references with AP
|
|
854
|
+
9. **Class name stays PascalCase**: The exported JS class keeps its `Be[ClassName]` / `Do[ClassName]` name. Only the *registration key* differs — `enhKey` in `emc.mjs` keeps the legacy `enhPropKey` (camelCase, e.g. `beLiterate`), because that is what consumers use to read the enhancement (`event.enh`, and traditional camelCase property access reads better).
|
|
857
855
|
|
|
858
856
|
**Instructions:**
|
|
859
857
|
|
|
@@ -23,16 +23,29 @@ export interface EndUserProps {
|
|
|
23
23
|
day?: string;
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* BCP-47 locale tag. When not supplied explicitly it is
|
|
27
|
-
*
|
|
26
|
+
* BCP-47 locale tag. When not supplied explicitly it is the element's
|
|
27
|
+
* *effective* language (`inferencer.resolveLang`: nearest `lang`/`xml:lang`
|
|
28
|
+
* ancestor, crossing shadow-root hosts, then `<html lang>`, then
|
|
29
|
+
* `navigator.language`), falling back to the runtime default locale.
|
|
28
30
|
*/
|
|
29
31
|
locale?: string;
|
|
30
32
|
|
|
31
33
|
/**
|
|
32
|
-
* When true, re-derive `locale` whenever the enhanced element's `lang`
|
|
33
|
-
* Off by default (the legacy `observeAttr` behavior).
|
|
34
|
+
* When true, re-derive `locale` whenever the enhanced element's own `lang`
|
|
35
|
+
* attribute changes. Off by default (the legacy `observeAttr` behavior).
|
|
36
|
+
* Container-`lang` changes after mount are not observed.
|
|
34
37
|
*/
|
|
35
38
|
observeLang?: boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* `be-intl-announce` — opt in to announcing re-formats to assistive tech.
|
|
42
|
+
* When set, the element becomes a polite ARIA live region
|
|
43
|
+
* (`aria-live="polite"`, `aria-atomic="true"`) *after* its first render, so
|
|
44
|
+
* a later value/locale change is spoken but the initial value is not. The
|
|
45
|
+
* `aria-live` bit is skipped for `<output>` (already an implicit polite live
|
|
46
|
+
* region). Off by default.
|
|
47
|
+
*/
|
|
48
|
+
announce?: boolean;
|
|
36
49
|
}
|
|
37
50
|
|
|
38
51
|
export interface AllProps extends EndUserProps {
|
|
@@ -51,6 +64,13 @@ export interface AllProps extends EndUserProps {
|
|
|
51
64
|
|
|
52
65
|
/** Flipped true once `roundabout()` has finished its initial attribute-read pass. */
|
|
53
66
|
initialized?: boolean;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Flipped true by `formatNumber` / `formatDate` the first time they write the
|
|
70
|
+
* value. Gates `armLiveRegion` so the live region is armed only after the
|
|
71
|
+
* initial render.
|
|
72
|
+
*/
|
|
73
|
+
rendered?: boolean;
|
|
54
74
|
}
|
|
55
75
|
|
|
56
76
|
export type AP = AllProps;
|
|
@@ -63,6 +83,7 @@ export interface Actions {
|
|
|
63
83
|
init(self: AP, enhancedElement: Element & ElementEnhancementGateway, ctx: SpawnContext, initVals: PAP): Promise<void>;
|
|
64
84
|
hydrate(self: AP): ProPAP;
|
|
65
85
|
onFormattingChange(self: AP): PAP;
|
|
66
|
-
formatNumber(self: AP): void;
|
|
67
|
-
formatDate(self: AP): void;
|
|
86
|
+
formatNumber(self: AP): PAP | void;
|
|
87
|
+
formatDate(self: AP): PAP | void;
|
|
88
|
+
armLiveRegion(self: AP): void;
|
|
68
89
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Uniform Storage Path string (e.g. "indexedDB://myDB/myFiles/{file.name}").
|
|
3
|
+
* Inlined here (was imported from trans-render/XV/types) to keep this file standalone.
|
|
4
|
+
*/
|
|
5
|
+
export type USL = string;
|
|
6
|
+
|
|
7
|
+
export interface EndUserProps {
|
|
8
|
+
readVerb: 'readAsText' | 'readAsDataURL' | 'readAsArrayBuffer' | 'readAsBinaryString';
|
|
9
|
+
writeTo: USL;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type FileAndContents = [File, any];
|
|
13
|
+
|
|
14
|
+
export interface AllProps extends EndUserProps {
|
|
15
|
+
enhancedElement: HTMLInputElement;
|
|
16
|
+
fileContents: Array<FileAndContents>;
|
|
17
|
+
writtenTo: Array<USL>;
|
|
18
|
+
resolved?: boolean;
|
|
19
|
+
rejected?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type AP = AllProps;
|
|
23
|
+
|
|
24
|
+
export type PAP = Partial<AP>;
|
|
25
|
+
|
|
26
|
+
export type ProPAP = Promise<PAP>;
|
|
27
|
+
|
|
28
|
+
import { ElementEnhancementGateway, SpawnContext } from "../assign-gingerly/types";
|
|
29
|
+
|
|
30
|
+
export interface Actions {
|
|
31
|
+
hydrate(self: AP): ProPAP;
|
|
32
|
+
storeFileContents(self: AP): ProPAP;
|
|
33
|
+
init(self: AP, enhancedElement: Element & ElementEnhancementGateway, ctx: SpawnContext, initVals: PAP): Promise<void>;
|
|
34
|
+
}
|
|
@@ -24,6 +24,8 @@ export declare class Infer<TValue = any, TDisplay = any> {
|
|
|
24
24
|
get eventType(): string;
|
|
25
25
|
/** The inferred value property name (e.g. 'value', 'checked', 'dateTime'). */
|
|
26
26
|
get valueProperty(): string;
|
|
27
|
+
/** Effective language: nearest `lang`/`xml:lang` ancestor (across shadow hosts), then `<html lang>`, then `navigator.language`. */
|
|
28
|
+
get lang(): string | undefined;
|
|
27
29
|
get defaultRemoteBindingPropName(): string;
|
|
28
30
|
/**
|
|
29
31
|
* EventTarget that emits an event named after the changed property.
|
|
@@ -41,6 +43,18 @@ export declare class Infer<TValue = any, TDisplay = any> {
|
|
|
41
43
|
*/
|
|
42
44
|
export declare function coerceElementValue(element: Element, propName?: string): any;
|
|
43
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Serialize a JS value for assignment to a DOM value property: Date -> ISO string,
|
|
48
|
+
* plain object/array -> JSON string, DOM-typed props (checked/valueAsNumber/valueAsDate) pass through.
|
|
49
|
+
*/
|
|
50
|
+
export declare function serializeForProperty(propName: string, nv: any): any;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Resolve the effective language for an element: nearest `lang`/`xml:lang` ancestor
|
|
54
|
+
* (crossing shadow-root hosts), then `<html lang>`, then `navigator.language`.
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveLang(element: Element): string | undefined;
|
|
57
|
+
|
|
44
58
|
/**
|
|
45
59
|
* Registry item for the Infer enhancement
|
|
46
60
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assign-gingerly",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.95",
|
|
4
4
|
"description": "This package provides a utility function for carefully merging one object into another.",
|
|
5
5
|
"homepage": "https://github.com/bahrus/assign-gingerly#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -200,6 +200,10 @@
|
|
|
200
200
|
"default": "./DX/emojis.js",
|
|
201
201
|
"types": "./DX/emojis.ts"
|
|
202
202
|
},
|
|
203
|
+
"./DX/strictDefaultPermissions.js": {
|
|
204
|
+
"default": "./DX/strictDefaultPermissions.js",
|
|
205
|
+
"types": "./DX/strictDefaultPermissions.ts"
|
|
206
|
+
},
|
|
203
207
|
"./assignFeatures.js": {
|
|
204
208
|
"default": "./assignFeatures.js",
|
|
205
209
|
"types": "./assignFeatures.ts"
|