desktopr 1.2.0 → 1.2.1

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.
@@ -17,9 +17,12 @@ const waitTauri = async () => {
17
17
  };
18
18
  exports.waitTauri = waitTauri;
19
19
  const newWindow = async (core, options) => {
20
- if (options?.label &&
21
- options.label.trim().toLowerCase().startsWith((_constants_1.COMAPNION_WINDOW_LABEL_PREFIX).trim().toLowerCase()))
22
- throw new Error(`[Reserved window label] ${_constants_1.COMAPNION_WINDOW_LABEL_PREFIX}* is an app reserved label`);
20
+ if (options?.label) {
21
+ if (options.label.trim().toLowerCase().startsWith((_constants_1.COMAPNION_WINDOW_LABEL_PREFIX).trim().toLowerCase()))
22
+ throw new Error(`[Reserved window label] '${_constants_1.COMAPNION_WINDOW_LABEL_PREFIX}' is an app reserved label`);
23
+ if (options.label.trim().toLowerCase().startsWith("main"))
24
+ throw new Error(`[Reserved window label] 'main' is an app reserved label`);
25
+ }
23
26
  const randomWindowLabel = `w_${Math.random()
24
27
  .toString(36)
25
28
  .substring(2, 2 + 8)}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "desktopr",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Official JS/TS SDK for the Desktopr native bridge",
5
5
  "main": "dist-sdk/sdk/index.js",
6
6
  "types": "dist-sdk/sdk/index.d.ts",