@capybara-hq/plugin-sdk 0.1.0-rc.60 → 0.1.0-rc.61
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/dist/device-provider.d.ts +5 -2
- package/dist/device-provider.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -143,10 +143,13 @@ export interface DeviceRef {
|
|
|
143
143
|
/** The current instance, or null when the device has none. */
|
|
144
144
|
handle: SandboxHandle | null;
|
|
145
145
|
}
|
|
146
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* One limit line of a {@link DeviceReport} (shown as is; the provider enforces it). `value` is
|
|
148
|
+
* text too: words in it get a Chinese form; pure data (a path, a size) may carry `en` only.
|
|
149
|
+
*/
|
|
147
150
|
export interface DeviceReportLimit {
|
|
148
151
|
label: DeviceText;
|
|
149
|
-
value:
|
|
152
|
+
value: DeviceText;
|
|
150
153
|
}
|
|
151
154
|
/**
|
|
152
155
|
* What a provider tells about a device ({@link DeviceProvider.report}): shown to people, never
|
package/dist/device-provider.js
CHANGED
|
@@ -128,10 +128,10 @@ export function parseDeviceReport(value) {
|
|
|
128
128
|
if (!isRecord(raw))
|
|
129
129
|
throw new TypeError(`${what} must be an object`);
|
|
130
130
|
exactKeys(raw, ["label", "value"], what);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
return {
|
|
132
|
+
label: parseText(raw.label, L.limitLabelChars, `${what}.label`),
|
|
133
|
+
value: parseText(raw.value, L.limitValueChars, `${what}.value`),
|
|
134
|
+
};
|
|
135
135
|
});
|
|
136
136
|
if (typeof reset !== "boolean")
|
|
137
137
|
throw new TypeError("device report reset must be a boolean");
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED