@placeos/ts-client 4.2.1 → 4.2.3

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.
@@ -25,6 +25,7 @@ export declare class PlaceVariableBinding<T = any> {
25
25
  * @param next Callback for changes to the bindings value
26
26
  */
27
27
  subscribe(next: (value: T) => void): Subscription;
28
+ bindThenSubscribe(next: (value: T) => void): Subscription;
28
29
  /**
29
30
  * Bind to the status variable's value
30
31
  */
@@ -17,6 +17,8 @@ export declare class PlaceRepository extends PlaceResource {
17
17
  readonly username: string;
18
18
  /** Password to connect to repository with */
19
19
  readonly password: string;
20
+ /** Root path of the repository to serve at the `folder_name` path */
21
+ readonly root_path: string;
20
22
  /** Repository type */
21
23
  get type(): PlaceRepositoryType;
22
24
  constructor(raw_data?: Partial<PlaceRepository>);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.2.1",
2
+ "version": "4.2.3",
3
3
  "license": "MIT",
4
4
  "name": "@placeos/ts-client",
5
5
  "author": "Alex Sorafumo <alex@place.tech>",
@@ -80,6 +80,15 @@ export class PlaceVariableBinding<T = any> {
80
80
  return this.listen().subscribe(next);
81
81
  }
82
82
 
83
+ public bindThenSubscribe(next: (value: T) => void): Subscription {
84
+ const unbind = this.bind();
85
+ return this.listen().subscribe({
86
+ next,
87
+ complete: () => unbind(),
88
+ error: () => unbind(),
89
+ });
90
+ }
91
+
83
92
  /**
84
93
  * Bind to the status variable's value
85
94
  */
@@ -18,6 +18,8 @@ export class PlaceRepository extends PlaceResource {
18
18
  public readonly username: string;
19
19
  /** Password to connect to repository with */
20
20
  public readonly password: string;
21
+ /** Root path of the repository to serve at the `folder_name` path */
22
+ public readonly root_path: string;
21
23
  /** Repository type */
22
24
  public get type() {
23
25
  return this.repo_type;
@@ -33,5 +35,6 @@ export class PlaceRepository extends PlaceResource {
33
35
  this.repo_type = raw_data.repo_type || PlaceRepositoryType.Driver;
34
36
  this.username = raw_data.username || '';
35
37
  this.password = raw_data.password || '';
38
+ this.root_path = raw_data.root_path || '';
36
39
  }
37
40
  }