@girs/gssdp-1.0 1.0.0-3.2.4 → 1.0.0-3.2.6

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gssdp-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GSSDP-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for GSSDP-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
9
9
 
10
10
  GObject-based API for handling resource discovery and announcement over SSDP.
11
11
 
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
82
82
  const GSSDP = imports.gi.GSSDP;
83
83
  ```
84
84
 
85
+
86
+ ### ESM vs. CommonJS
87
+
88
+ GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
89
+
90
+ In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
91
+
92
+ On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
93
+
94
+ This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
95
+
96
+ Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
97
+
85
98
  ### Bundle
86
99
 
87
100
  Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
@@ -1,9 +1,12 @@
1
1
 
2
-
3
2
  declare module 'gi://GSSDP?version=1.0' {
4
3
  import GSSDP10 from '@girs/gssdp-1.0';
5
4
  export default GSSDP10;
6
5
  }
7
6
 
7
+ declare module 'gi://GSSDP' {
8
+ import GSSDP10 from '@girs/gssdp-1.0';
9
+ export default GSSDP10;
10
+ }
8
11
 
9
12
 
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import GSSDP10 from '@girs/gssdp-1.0';
4
3
 
5
4
  declare global {
package/gssdp-1.0.d.cts CHANGED
@@ -85,6 +85,26 @@ export module Client {
85
85
  * This property can only be set during object construction.
86
86
  */
87
87
  socket_ttl?: number | null
88
+ /**
89
+ * The IP address of the assoicated network interface.
90
+ */
91
+ hostIp?: string | null
92
+ /**
93
+ * UDP port to use for sending multicast M-SEARCH requests on the
94
+ * network. If not set (or set to 0) a random port will be used.
95
+ * This property can be only set during object construction.
96
+ */
97
+ msearchPort?: number | null
98
+ /**
99
+ * The SSDP server's identifier.
100
+ */
101
+ serverId?: string | null
102
+ /**
103
+ * Time-to-live value to use for all sockets created by this client.
104
+ * If not set (or set to 0) the value recommended by UPnP will be used.
105
+ * This property can only be set during object construction.
106
+ */
107
+ socketTtl?: number | null
88
108
  }
89
109
 
90
110
  }
@@ -103,6 +123,10 @@ export interface Client extends Gio.Initable {
103
123
  * The IP address of the assoicated network interface.
104
124
  */
105
125
  host_ip: string | null
126
+ /**
127
+ * The IP address of the assoicated network interface.
128
+ */
129
+ hostIp: string | null
106
130
  /**
107
131
  * The name of the network interface this client is associated with.
108
132
  * Set to NULL to autodetect.
@@ -114,6 +138,12 @@ export interface Client extends Gio.Initable {
114
138
  * This property can be only set during object construction.
115
139
  */
116
140
  readonly msearch_port: number
141
+ /**
142
+ * UDP port to use for sending multicast M-SEARCH requests on the
143
+ * network. If not set (or set to 0) a random port will be used.
144
+ * This property can be only set during object construction.
145
+ */
146
+ readonly msearchPort: number
117
147
  /**
118
148
  * The network this client is currently connected to. You could set this
119
149
  * to anything you want to identify the network this client is
@@ -127,12 +157,22 @@ export interface Client extends Gio.Initable {
127
157
  * The SSDP server's identifier.
128
158
  */
129
159
  server_id: string | null
160
+ /**
161
+ * The SSDP server's identifier.
162
+ */
163
+ serverId: string | null
130
164
  /**
131
165
  * Time-to-live value to use for all sockets created by this client.
132
166
  * If not set (or set to 0) the value recommended by UPnP will be used.
133
167
  * This property can only be set during object construction.
134
168
  */
135
169
  readonly socket_ttl: number
170
+ /**
171
+ * Time-to-live value to use for all sockets created by this client.
172
+ * If not set (or set to 0) the value recommended by UPnP will be used.
173
+ * This property can only be set during object construction.
174
+ */
175
+ readonly socketTtl: number
136
176
 
137
177
  // Own fields of GSSDP-1.0.GSSDP.Client
138
178
 
@@ -453,6 +493,15 @@ export module ResourceGroup {
453
493
  * The default is 120 based on DLNA specification.
454
494
  */
455
495
  message_delay?: number | null
496
+ /**
497
+ * The number of seconds our advertisements are valid.
498
+ */
499
+ maxAge?: number | null
500
+ /**
501
+ * The minimum number of milliseconds between SSDP messages.
502
+ * The default is 120 based on DLNA specification.
503
+ */
504
+ messageDelay?: number | null
456
505
  }
457
506
 
458
507
  }
@@ -473,11 +522,20 @@ export interface ResourceGroup {
473
522
  * The number of seconds our advertisements are valid.
474
523
  */
475
524
  max_age: number
525
+ /**
526
+ * The number of seconds our advertisements are valid.
527
+ */
528
+ maxAge: number
476
529
  /**
477
530
  * The minimum number of milliseconds between SSDP messages.
478
531
  * The default is 120 based on DLNA specification.
479
532
  */
480
533
  message_delay: number
534
+ /**
535
+ * The minimum number of milliseconds between SSDP messages.
536
+ * The default is 120 based on DLNA specification.
537
+ */
538
+ messageDelay: number
481
539
 
482
540
  // Own fields of GSSDP-1.0.GSSDP.ResourceGroup
483
541
 
package/gssdp-1.0.d.ts CHANGED
@@ -87,6 +87,26 @@ module Client {
87
87
  * This property can only be set during object construction.
88
88
  */
89
89
  socket_ttl?: number | null
90
+ /**
91
+ * The IP address of the assoicated network interface.
92
+ */
93
+ hostIp?: string | null
94
+ /**
95
+ * UDP port to use for sending multicast M-SEARCH requests on the
96
+ * network. If not set (or set to 0) a random port will be used.
97
+ * This property can be only set during object construction.
98
+ */
99
+ msearchPort?: number | null
100
+ /**
101
+ * The SSDP server's identifier.
102
+ */
103
+ serverId?: string | null
104
+ /**
105
+ * Time-to-live value to use for all sockets created by this client.
106
+ * If not set (or set to 0) the value recommended by UPnP will be used.
107
+ * This property can only be set during object construction.
108
+ */
109
+ socketTtl?: number | null
90
110
  }
91
111
 
92
112
  }
@@ -105,6 +125,10 @@ interface Client extends Gio.Initable {
105
125
  * The IP address of the assoicated network interface.
106
126
  */
107
127
  host_ip: string | null
128
+ /**
129
+ * The IP address of the assoicated network interface.
130
+ */
131
+ hostIp: string | null
108
132
  /**
109
133
  * The name of the network interface this client is associated with.
110
134
  * Set to NULL to autodetect.
@@ -116,6 +140,12 @@ interface Client extends Gio.Initable {
116
140
  * This property can be only set during object construction.
117
141
  */
118
142
  readonly msearch_port: number
143
+ /**
144
+ * UDP port to use for sending multicast M-SEARCH requests on the
145
+ * network. If not set (or set to 0) a random port will be used.
146
+ * This property can be only set during object construction.
147
+ */
148
+ readonly msearchPort: number
119
149
  /**
120
150
  * The network this client is currently connected to. You could set this
121
151
  * to anything you want to identify the network this client is
@@ -129,12 +159,22 @@ interface Client extends Gio.Initable {
129
159
  * The SSDP server's identifier.
130
160
  */
131
161
  server_id: string | null
162
+ /**
163
+ * The SSDP server's identifier.
164
+ */
165
+ serverId: string | null
132
166
  /**
133
167
  * Time-to-live value to use for all sockets created by this client.
134
168
  * If not set (or set to 0) the value recommended by UPnP will be used.
135
169
  * This property can only be set during object construction.
136
170
  */
137
171
  readonly socket_ttl: number
172
+ /**
173
+ * Time-to-live value to use for all sockets created by this client.
174
+ * If not set (or set to 0) the value recommended by UPnP will be used.
175
+ * This property can only be set during object construction.
176
+ */
177
+ readonly socketTtl: number
138
178
 
139
179
  // Own fields of GSSDP-1.0.GSSDP.Client
140
180
 
@@ -455,6 +495,15 @@ module ResourceGroup {
455
495
  * The default is 120 based on DLNA specification.
456
496
  */
457
497
  message_delay?: number | null
498
+ /**
499
+ * The number of seconds our advertisements are valid.
500
+ */
501
+ maxAge?: number | null
502
+ /**
503
+ * The minimum number of milliseconds between SSDP messages.
504
+ * The default is 120 based on DLNA specification.
505
+ */
506
+ messageDelay?: number | null
458
507
  }
459
508
 
460
509
  }
@@ -475,11 +524,20 @@ interface ResourceGroup {
475
524
  * The number of seconds our advertisements are valid.
476
525
  */
477
526
  max_age: number
527
+ /**
528
+ * The number of seconds our advertisements are valid.
529
+ */
530
+ maxAge: number
478
531
  /**
479
532
  * The minimum number of milliseconds between SSDP messages.
480
533
  * The default is 120 based on DLNA specification.
481
534
  */
482
535
  message_delay: number
536
+ /**
537
+ * The minimum number of milliseconds between SSDP messages.
538
+ * The default is 120 based on DLNA specification.
539
+ */
540
+ messageDelay: number
483
541
 
484
542
  // Own fields of GSSDP-1.0.GSSDP.ResourceGroup
485
543
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gssdp-1.0",
3
- "version": "1.0.0-3.2.4",
3
+ "version": "1.0.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for GSSDP-1.0, generated from library version 1.0.0",
5
5
  "type": "module",
6
6
  "module": "gssdp-1.0.js",
@@ -25,11 +25,11 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gssdp-1.0.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/gio-2.0": "^2.78.0-3.2.4",
29
- "@girs/gjs": "^3.2.4",
30
- "@girs/glib-2.0": "^2.78.0-3.2.4",
31
- "@girs/gobject-2.0": "^2.78.0-3.2.4",
32
- "@girs/soup-2.4": "^2.74.3-3.2.4"
28
+ "@girs/gio-2.0": "^2.78.0-3.2.6",
29
+ "@girs/gjs": "^3.2.6",
30
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
31
+ "@girs/gobject-2.0": "^2.78.0-3.2.6",
32
+ "@girs/soup-2.4": "^2.74.3-3.2.6"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "*"