@girs/rest-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/rest-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Rest-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 Rest-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
  A helper library for RESTful services.
11
11
 
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
82
82
  const Rest = imports.gi.Rest;
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).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/rest-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 Rest-1.0, generated from library version 1.0.0",
5
5
  "type": "module",
6
6
  "module": "rest-1.0.js",
@@ -25,11 +25,11 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit rest-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-3.0": "^3.4.4-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-3.0": "^3.4.4-3.2.6"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "*"
@@ -1,9 +1,12 @@
1
1
 
2
-
3
2
  declare module 'gi://Rest?version=1.0' {
4
3
  import Rest10 from '@girs/rest-1.0';
5
4
  export default Rest10;
6
5
  }
7
6
 
7
+ declare module 'gi://Rest' {
8
+ import Rest10 from '@girs/rest-1.0';
9
+ export default Rest10;
10
+ }
8
11
 
9
12
 
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import Rest10 from '@girs/rest-1.0';
4
3
 
5
4
  declare global {
package/rest-1.0.d.cts CHANGED
@@ -245,6 +245,14 @@ export module OAuth2Proxy {
245
245
  redirect_uri?: string | null
246
246
  refresh_token?: string | null
247
247
  token_url?: string | null
248
+ accessToken?: string | null
249
+ authUrl?: string | null
250
+ clientId?: string | null
251
+ clientSecret?: string | null
252
+ expirationDate?: GLib.DateTime | null
253
+ redirectUri?: string | null
254
+ refreshToken?: string | null
255
+ tokenUrl?: string | null
248
256
  }
249
257
 
250
258
  }
@@ -254,13 +262,21 @@ export interface OAuth2Proxy {
254
262
  // Own properties of Rest-1.0.Rest.OAuth2Proxy
255
263
 
256
264
  access_token: string | null
265
+ accessToken: string | null
257
266
  auth_url: string | null
267
+ authUrl: string | null
258
268
  client_id: string | null
269
+ clientId: string | null
259
270
  client_secret: string | null
271
+ clientSecret: string | null
260
272
  expiration_date: GLib.DateTime
273
+ expirationDate: GLib.DateTime
261
274
  redirect_uri: string | null
275
+ redirectUri: string | null
262
276
  refresh_token: string | null
277
+ refreshToken: string | null
263
278
  token_url: string | null
279
+ tokenUrl: string | null
264
280
 
265
281
  // Own fields of Rest-1.0.Rest.OAuth2Proxy
266
282
 
@@ -483,6 +499,12 @@ export module Proxy {
483
499
  url_format?: string | null
484
500
  user_agent?: string | null
485
501
  username?: string | null
502
+ bindingRequired?: boolean | null
503
+ disableCookies?: boolean | null
504
+ sslCaFile?: string | null
505
+ sslStrict?: boolean | null
506
+ urlFormat?: string | null
507
+ userAgent?: string | null
486
508
  }
487
509
 
488
510
  }
@@ -492,12 +514,18 @@ export interface Proxy {
492
514
  // Own properties of Rest-1.0.Rest.Proxy
493
515
 
494
516
  binding_required: boolean
517
+ bindingRequired: boolean
495
518
  readonly disable_cookies: boolean
519
+ readonly disableCookies: boolean
496
520
  password: string | null
497
521
  ssl_ca_file: string | null
522
+ sslCaFile: string | null
498
523
  ssl_strict: boolean
524
+ sslStrict: boolean
499
525
  url_format: string | null
526
+ urlFormat: string | null
500
527
  user_agent: string | null
528
+ userAgent: string | null
501
529
  username: string | null
502
530
 
503
531
  // Own fields of Rest-1.0.Rest.Proxy
package/rest-1.0.d.ts CHANGED
@@ -247,6 +247,14 @@ module OAuth2Proxy {
247
247
  redirect_uri?: string | null
248
248
  refresh_token?: string | null
249
249
  token_url?: string | null
250
+ accessToken?: string | null
251
+ authUrl?: string | null
252
+ clientId?: string | null
253
+ clientSecret?: string | null
254
+ expirationDate?: GLib.DateTime | null
255
+ redirectUri?: string | null
256
+ refreshToken?: string | null
257
+ tokenUrl?: string | null
250
258
  }
251
259
 
252
260
  }
@@ -256,13 +264,21 @@ interface OAuth2Proxy {
256
264
  // Own properties of Rest-1.0.Rest.OAuth2Proxy
257
265
 
258
266
  access_token: string | null
267
+ accessToken: string | null
259
268
  auth_url: string | null
269
+ authUrl: string | null
260
270
  client_id: string | null
271
+ clientId: string | null
261
272
  client_secret: string | null
273
+ clientSecret: string | null
262
274
  expiration_date: GLib.DateTime
275
+ expirationDate: GLib.DateTime
263
276
  redirect_uri: string | null
277
+ redirectUri: string | null
264
278
  refresh_token: string | null
279
+ refreshToken: string | null
265
280
  token_url: string | null
281
+ tokenUrl: string | null
266
282
 
267
283
  // Own fields of Rest-1.0.Rest.OAuth2Proxy
268
284
 
@@ -485,6 +501,12 @@ module Proxy {
485
501
  url_format?: string | null
486
502
  user_agent?: string | null
487
503
  username?: string | null
504
+ bindingRequired?: boolean | null
505
+ disableCookies?: boolean | null
506
+ sslCaFile?: string | null
507
+ sslStrict?: boolean | null
508
+ urlFormat?: string | null
509
+ userAgent?: string | null
488
510
  }
489
511
 
490
512
  }
@@ -494,12 +516,18 @@ interface Proxy {
494
516
  // Own properties of Rest-1.0.Rest.Proxy
495
517
 
496
518
  binding_required: boolean
519
+ bindingRequired: boolean
497
520
  readonly disable_cookies: boolean
521
+ readonly disableCookies: boolean
498
522
  password: string | null
499
523
  ssl_ca_file: string | null
524
+ sslCaFile: string | null
500
525
  ssl_strict: boolean
526
+ sslStrict: boolean
501
527
  url_format: string | null
528
+ urlFormat: string | null
502
529
  user_agent: string | null
530
+ userAgent: string | null
503
531
  username: string | null
504
532
 
505
533
  // Own fields of Rest-1.0.Rest.Proxy