@girs/epc-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/epc-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Epc-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 Epc-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
  The Easy Publish and Consume library (libepc) provides an easy method to publish data using HTTPS, announce that information via DNS-SD, find that information and finally consume it.
11
11
 
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
82
82
  const Epc = imports.gi.Epc;
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,5 +1,4 @@
1
1
 
2
-
3
2
  declare module 'gi://Epc?version=1.0' {
4
3
  import Epc10 from '@girs/epc-1.0';
5
4
  export default Epc10;
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import Epc10 from '@girs/epc-1.0';
4
3
 
5
4
  declare global {
package/epc-1.0.d.cts CHANGED
@@ -283,6 +283,7 @@ export module Dispatcher {
283
283
  collision_handling?: CollisionHandling | null
284
284
  cookie?: string | null
285
285
  name?: string | null
286
+ collisionHandling?: CollisionHandling | null
286
287
  }
287
288
 
288
289
  }
@@ -292,6 +293,7 @@ export interface Dispatcher {
292
293
  // Own properties of Epc-1.0.Epc.Dispatcher
293
294
 
294
295
  collision_handling: CollisionHandling
296
+ collisionHandling: CollisionHandling
295
297
  cookie: string
296
298
  name: string
297
299
 
@@ -361,6 +363,14 @@ export module Publisher {
361
363
  service_cookie?: string | null
362
364
  service_domain?: string | null
363
365
  service_name?: string | null
366
+ authFlags?: AuthFlags | null
367
+ certificateFile?: string | null
368
+ collisionHandling?: CollisionHandling | null
369
+ contentsPath?: string | null
370
+ privateKeyFile?: string | null
371
+ serviceCookie?: string | null
372
+ serviceDomain?: string | null
373
+ serviceName?: string | null
364
374
  }
365
375
 
366
376
  }
@@ -371,14 +381,22 @@ export interface Publisher {
371
381
 
372
382
  application: string
373
383
  auth_flags: AuthFlags
384
+ authFlags: AuthFlags
374
385
  certificate_file: string
386
+ certificateFile: string
375
387
  collision_handling: CollisionHandling
388
+ collisionHandling: CollisionHandling
376
389
  contents_path: string
390
+ contentsPath: string
377
391
  private_key_file: string
392
+ privateKeyFile: string
378
393
  protocol: Protocol
379
394
  service_cookie: string
395
+ serviceCookie: string
380
396
  service_domain: string
397
+ serviceDomain: string
381
398
  service_name: string
399
+ serviceName: string
382
400
 
383
401
  // Owm methods of Epc-1.0.Epc.Publisher
384
402
 
@@ -505,6 +523,8 @@ export module ServiceMonitor {
505
523
  domain?: string | null
506
524
  service_types?: string[] | null
507
525
  skip_our_own?: boolean | null
526
+ serviceTypes?: string[] | null
527
+ skipOurOwn?: boolean | null
508
528
  }
509
529
 
510
530
  }
@@ -516,7 +536,9 @@ export interface ServiceMonitor {
516
536
  readonly application: string
517
537
  readonly domain: string
518
538
  readonly service_types: string[]
539
+ readonly serviceTypes: string[]
519
540
  skip_our_own: boolean
541
+ skipOurOwn: boolean
520
542
 
521
543
  // Owm methods of Epc-1.0.Epc.ServiceMonitor
522
544
 
package/epc-1.0.d.ts CHANGED
@@ -285,6 +285,7 @@ module Dispatcher {
285
285
  collision_handling?: CollisionHandling | null
286
286
  cookie?: string | null
287
287
  name?: string | null
288
+ collisionHandling?: CollisionHandling | null
288
289
  }
289
290
 
290
291
  }
@@ -294,6 +295,7 @@ interface Dispatcher {
294
295
  // Own properties of Epc-1.0.Epc.Dispatcher
295
296
 
296
297
  collision_handling: CollisionHandling
298
+ collisionHandling: CollisionHandling
297
299
  cookie: string
298
300
  name: string
299
301
 
@@ -363,6 +365,14 @@ module Publisher {
363
365
  service_cookie?: string | null
364
366
  service_domain?: string | null
365
367
  service_name?: string | null
368
+ authFlags?: AuthFlags | null
369
+ certificateFile?: string | null
370
+ collisionHandling?: CollisionHandling | null
371
+ contentsPath?: string | null
372
+ privateKeyFile?: string | null
373
+ serviceCookie?: string | null
374
+ serviceDomain?: string | null
375
+ serviceName?: string | null
366
376
  }
367
377
 
368
378
  }
@@ -373,14 +383,22 @@ interface Publisher {
373
383
 
374
384
  application: string
375
385
  auth_flags: AuthFlags
386
+ authFlags: AuthFlags
376
387
  certificate_file: string
388
+ certificateFile: string
377
389
  collision_handling: CollisionHandling
390
+ collisionHandling: CollisionHandling
378
391
  contents_path: string
392
+ contentsPath: string
379
393
  private_key_file: string
394
+ privateKeyFile: string
380
395
  protocol: Protocol
381
396
  service_cookie: string
397
+ serviceCookie: string
382
398
  service_domain: string
399
+ serviceDomain: string
383
400
  service_name: string
401
+ serviceName: string
384
402
 
385
403
  // Owm methods of Epc-1.0.Epc.Publisher
386
404
 
@@ -507,6 +525,8 @@ module ServiceMonitor {
507
525
  domain?: string | null
508
526
  service_types?: string[] | null
509
527
  skip_our_own?: boolean | null
528
+ serviceTypes?: string[] | null
529
+ skipOurOwn?: boolean | null
510
530
  }
511
531
 
512
532
  }
@@ -518,7 +538,9 @@ interface ServiceMonitor {
518
538
  readonly application: string
519
539
  readonly domain: string
520
540
  readonly service_types: string[]
541
+ readonly serviceTypes: string[]
521
542
  skip_our_own: boolean
543
+ skipOurOwn: boolean
522
544
 
523
545
  // Owm methods of Epc-1.0.Epc.ServiceMonitor
524
546
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/epc-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 Epc-1.0, generated from library version 1.0.0",
5
5
  "type": "module",
6
6
  "module": "epc-1.0.js",
@@ -25,9 +25,9 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit epc-1.0.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/gjs": "^3.2.4",
29
- "@girs/glib-2.0": "^2.78.0-3.2.4",
30
- "@girs/gobject-2.0": "^2.78.0-3.2.4"
28
+ "@girs/gjs": "^3.2.6",
29
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
30
+ "@girs/gobject-2.0": "^2.78.0-3.2.6"
31
31
  },
32
32
  "devDependencies": {
33
33
  "typescript": "*"