@inweb/client 25.3.20 → 25.3.22

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.
@@ -98,7 +98,7 @@ export declare class Assembly {
98
98
  */
99
99
  get status(): string;
100
100
  /**
101
- * Assembly type. Returns an `assembly`.
101
+ * Assembly type. Returns an `assembly` string.
102
102
  *
103
103
  * @readonly
104
104
  */
@@ -30,7 +30,7 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
30
30
  */
31
31
  get serverUrl(): string;
32
32
  /**
33
- * Deprecated since `25.3`. Use {@link Viewer.options()} instead to change Viewer parameters.
33
+ * Deprecated since `25.3`. Use `Viewer.options()` instead to change Viewer parameters.
34
34
  */
35
35
  get options(): any;
36
36
  /**
package/lib/Api/File.d.ts CHANGED
@@ -289,8 +289,7 @@ export declare class File {
289
289
  */
290
290
  getViewpoints(): Promise<any[]>;
291
291
  /**
292
- * Add new file viewpoint. To create a new viewpoint use
293
- * {@link Viewer#createViewpoint | Viewer.createViewpoint()}.
292
+ * Add new file viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
294
293
  *
295
294
  * @async
296
295
  * @param viewpoint - Viewpoint.
@@ -109,8 +109,7 @@ export declare class Model {
109
109
  */
110
110
  getViewpoints(): Promise<any[]>;
111
111
  /**
112
- * Add new model viewpoint. To create a new viewpoint use
113
- * {@link Viewer#createViewpoint | Viewer.createViewpoint()}.
112
+ * Add new model viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
114
113
  *
115
114
  * _**Note**: Assemblу models do not support viewpoints_.
116
115
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/client",
3
- "version": "25.3.20",
3
+ "version": "25.3.22",
4
4
  "description": "JavaScript REST API client for the Open Cloud Server",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -23,7 +23,6 @@
23
23
  "scripts": {
24
24
  "build": "rollup -c rollup.config.js",
25
25
  "test": "karma start karma.conf.js",
26
- "docs": "jsdoc -c ../../.jsdoc.json",
27
26
  "ts-docs": "typedoc"
28
27
  },
29
28
  "dependencies": {
@@ -208,7 +208,7 @@ export class Assembly {
208
208
  }
209
209
 
210
210
  /**
211
- * Assembly type. Returns an `assembly`.
211
+ * Assembly type. Returns an `assembly` string.
212
212
  *
213
213
  * @readonly
214
214
  */
package/src/Api/Client.ts CHANGED
@@ -63,7 +63,7 @@ export class Client extends EventEmitter2<ClientEventMap> {
63
63
  }
64
64
 
65
65
  /**
66
- * Deprecated since `25.3`. Use {@link Viewer.options()} instead to change Viewer parameters.
66
+ * Deprecated since `25.3`. Use `Viewer.options()` instead to change Viewer parameters.
67
67
  */
68
68
  get options(): any {
69
69
  console.warn(
package/src/Api/File.ts CHANGED
@@ -483,8 +483,7 @@ export class File {
483
483
  }
484
484
 
485
485
  /**
486
- * Add new file viewpoint. To create a new viewpoint use
487
- * {@link Viewer#createViewpoint | Viewer.createViewpoint()}.
486
+ * Add new file viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
488
487
  *
489
488
  * @async
490
489
  * @param viewpoint - Viewpoint.
@@ -754,15 +753,16 @@ export class File {
754
753
  onCheckout?: (file: File, ready: boolean) => boolean;
755
754
  }
756
755
  ): Promise<this> {
757
- if (!Array.isArray(jobs)) jobs = [jobs];
756
+ const waitJobs = Array.isArray(jobs) ? jobs : [jobs];
758
757
  if (waitAll === undefined) waitAll = true;
759
758
 
760
759
  const checkDone = () =>
761
760
  this.checkout().then((file) => {
762
- const readyJobs = jobs.filter((x: string) =>
763
- ["none", "done", "failed"].includes(file.status[x]?.state || "none")
764
- );
765
- const ready = waitAll ? readyJobs.length === jobs.length : readyJobs.length > 0;
761
+ const readyJobs = waitJobs.filter((job: string) => {
762
+ const jobStatus = file.status[job] || {};
763
+ return ["none", "done", "failed"].includes(jobStatus.state || "none");
764
+ });
765
+ const ready = waitAll ? readyJobs.length === waitJobs.length : readyJobs.length > 0;
766
766
  const cancel = params?.onCheckout?.(file, ready);
767
767
  return cancel || ready;
768
768
  });
package/src/Api/Model.ts CHANGED
@@ -195,8 +195,7 @@ export class Model {
195
195
  }
196
196
 
197
197
  /**
198
- * Add new model viewpoint. To create a new viewpoint use
199
- * {@link Viewer#createViewpoint | Viewer.createViewpoint()}.
198
+ * Add new model viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
200
199
  *
201
200
  * _**Note**: Assemblу models do not support viewpoints_.
202
201
  *