bdy 1.16.6-stage → 1.16.7-dev

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.16.6-stage",
4
+ "version": "1.16.7-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -21,17 +21,17 @@ const optionsSchema = zod_1.z.object({
21
21
  .optional()
22
22
  .transform((value) => value?.map((v) => {
23
23
  let scope, type, value;
24
- if (v.includes('::')) {
25
- const parts = v.split('::');
26
- scope = parts[0];
27
- const typeValuePair = parts[1].split('=');
28
- type = typeValuePair[0];
29
- value = typeValuePair[1];
24
+ if (v.includes('::CSS=') || v.includes('::XPATH=')) {
25
+ const [scopePart, ...rest] = v.split('::');
26
+ const [typePart, ...valuePart] = rest.join('::').split('=');
27
+ type = typePart;
28
+ value = valuePart.join('=');
29
+ scope = scopePart;
30
30
  }
31
31
  else {
32
- const typeValuePair = v.split('=');
33
- type = typeValuePair[0];
34
- value = typeValuePair[1];
32
+ const [typePart, ...valuePart] = v.split('=');
33
+ type = typePart;
34
+ value = valuePart.join('=');
35
35
  scope = DEFAULT_SCOPE;
36
36
  }
37
37
  return { scope, type, value };
@@ -136,17 +136,17 @@ const optionsSchema = zod_1.z.object({
136
136
  .optional()
137
137
  .transform((value) => value?.map((v) => {
138
138
  let scope, type, value;
139
- if (v.includes('::')) {
140
- const parts = v.split('::');
141
- scope = parts[0];
142
- const typeValuePair = parts[1].split('=');
143
- type = typeValuePair[0];
144
- value = typeValuePair[1];
139
+ if (v.includes('::CSS=') || v.includes('::XPATH=')) {
140
+ const [scopePart, ...rest] = v.split('::');
141
+ const [typePart, ...valuePart] = rest.join('::').split('=');
142
+ type = typePart;
143
+ value = valuePart.join('=');
144
+ scope = scopePart;
145
145
  }
146
146
  else {
147
- const typeValuePair = v.split('=');
148
- type = typeValuePair[0];
149
- value = typeValuePair[1];
147
+ const [typePart, ...valuePart] = v.split('=');
148
+ type = typePart;
149
+ value = valuePart.join('=');
150
150
  scope = DEFAULT_SCOPE;
151
151
  }
152
152
  return { scope, type, value };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.16.6-stage",
4
+ "version": "1.16.7-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {