@aneuhold/core-ts-api-lib 3.0.7 → 3.0.8

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/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 🔖 [3.0.8] (2025-12-14)
9
+
10
+ ### ✅ Added
11
+ - Added `APIService.getCurrentAPIUrl()` to retrieve the current API base URL.
12
+
13
+ ### 🏗️ Changed
14
+ - Updated dependencies: now requires `@aneuhold/core-ts-db-lib@^4.0.4`, `@aneuhold/core-ts-lib@^2.3.16`, and `@aneuhold/local-npm-registry@^0.2.23`.
15
+
8
16
  ## 🔖 [3.0.7] (2025-12-14)
9
17
 
10
18
  ### ✅ Added
@@ -174,6 +182,7 @@ No direct code changes; version bump for compatibility.
174
182
  - Updated workflow permissions to allow repository write access
175
183
 
176
184
  <!-- Link References -->
185
+ [3.0.8]: https://github.com/aneuhold/ts-libs/compare/core-ts-api-lib-v3.0.7...core-ts-api-lib-v3.0.8
177
186
  [3.0.7]: https://github.com/aneuhold/ts-libs/compare/core-ts-api-lib-v3.0.6...core-ts-api-lib-v3.0.7
178
187
  [3.0.6]: https://github.com/aneuhold/ts-libs/compare/core-ts-api-lib-v3.0.5...core-ts-api-lib-v3.0.6
179
188
  [3.0.5]: https://github.com/aneuhold/ts-libs/compare/core-ts-api-lib-v3.0.4...core-ts-api-lib-v3.0.5
@@ -22,11 +22,19 @@ export default class APIService {
22
22
  * @returns A promise that resolves to the result of the dashboard API call.
23
23
  */
24
24
  static callDashboardAPI(input: ProjectDashboardInput): Promise<APIResponse<ProjectDashboardOutput>>;
25
+ /**
26
+ * Gets the current base URL for the API.
27
+ */
28
+ static getCurrentAPIUrl(): string;
25
29
  /**
26
30
  * Sets the base URL for the API.
27
31
  *
28
32
  * @param url - The URL to be set for the API. This should include a trailing slash.
29
33
  */
30
34
  static setAPIUrl(url: string): void;
35
+ /**
36
+ * Gets the default base URL for the API.
37
+ */
38
+ static getDefaultAPIUrl(): string;
31
39
  }
32
40
  //# sourceMappingURL=APIService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"APIService.d.ts","sourceRoot":"","sources":["../../../src/services/APIService/APIService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAGzC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B;;;;;;OAMG;WACU,YAAY,CACvB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;;;OAMG;WACU,gBAAgB,CAC3B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM;CAG7B"}
1
+ {"version":3,"file":"APIService.d.ts","sourceRoot":"","sources":["../../../src/services/APIService/APIService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAGzC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B;;;;;;OAMG;WACU,YAAY,CACvB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;;;OAMG;WACU,gBAAgB,CAC3B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,MAAM;IAIjC;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAInC;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,MAAM;CAGlC"}
@@ -24,6 +24,12 @@ export default class APIService {
24
24
  static async callDashboardAPI(input) {
25
25
  return GCloudAPIService.projectDashboard(input);
26
26
  }
27
+ /**
28
+ * Gets the current base URL for the API.
29
+ */
30
+ static getCurrentAPIUrl() {
31
+ return GCloudAPIService.getUrl();
32
+ }
27
33
  /**
28
34
  * Sets the base URL for the API.
29
35
  *
@@ -32,5 +38,11 @@ export default class APIService {
32
38
  static setAPIUrl(url) {
33
39
  GCloudAPIService.setUrl(url);
34
40
  }
41
+ /**
42
+ * Gets the default base URL for the API.
43
+ */
44
+ static getDefaultAPIUrl() {
45
+ return GCloudAPIService.defaultUrl;
46
+ }
35
47
  }
36
48
  //# sourceMappingURL=APIService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"APIService.js","sourceRoot":"","sources":["../../../src/services/APIService/APIService.ts"],"names":[],"mappings":"AASA,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AAEvE;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,YAAY,CACvB,KAA4B;QAE5B,OAAO,MAAM,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAC3B,KAA4B;QAE5B,OAAO,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,GAAW;QAC1B,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;CACF"}
1
+ {"version":3,"file":"APIService.js","sourceRoot":"","sources":["../../../src/services/APIService/APIService.ts"],"names":[],"mappings":"AASA,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AAEvE;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,YAAY,CACvB,KAA4B;QAE5B,OAAO,MAAM,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAC3B,KAA4B;QAE5B,OAAO,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB;QACrB,OAAO,gBAAgB,CAAC,MAAM,EAAE,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,GAAW;QAC1B,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB;QACrB,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACrC,CAAC;CACF"}
@@ -40,12 +40,26 @@ export default class APIService {
40
40
  return GCloudAPIService.projectDashboard(input);
41
41
  }
42
42
 
43
+ /**
44
+ * Gets the current base URL for the API.
45
+ */
46
+ static getCurrentAPIUrl(): string {
47
+ return GCloudAPIService.getUrl();
48
+ }
49
+
43
50
  /**
44
51
  * Sets the base URL for the API.
45
52
  *
46
53
  * @param url - The URL to be set for the API. This should include a trailing slash.
47
54
  */
48
- static setAPIUrl(url: string) {
55
+ static setAPIUrl(url: string): void {
49
56
  GCloudAPIService.setUrl(url);
50
57
  }
58
+
59
+ /**
60
+ * Gets the default base URL for the API.
61
+ */
62
+ static getDefaultAPIUrl(): string {
63
+ return GCloudAPIService.defaultUrl;
64
+ }
51
65
  }
@@ -6,6 +6,13 @@ import type { ProjectDashboardInput, ProjectDashboardOutput } from '../../types/
6
6
  */
7
7
  export default class GCloudAPIService {
8
8
  #private;
9
+ static readonly defaultUrl: string;
10
+ /**
11
+ * Gets the current URL of the Google Cloud API.
12
+ *
13
+ * @returns the current URL of the Google Cloud API.
14
+ */
15
+ static getUrl(): string;
9
16
  /**
10
17
  * Sets the URL of the Google Cloud API.
11
18
  *
@@ -1 +1 @@
1
- {"version":3,"file":"GCloudAPIService.d.ts","sourceRoot":"","sources":["../../../src/services/GCloudAPIService/GCloudAPIService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;;IAOnC;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC;;;;OAIG;WACU,gBAAgB,CAC3B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;OAIG;WACU,gBAAgB,CAC3B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;;;OAMG;mBACkB,IAAI;IAiBzB;;;;;OAKG;mBACkB,cAAc;CAYpC"}
1
+ {"version":3,"file":"GCloudAPIService.d.ts","sourceRoot":"","sources":["../../../src/services/GCloudAPIService/GCloudAPIService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;;IACnC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAA2D;IAQ7F;;;;OAIG;IACH,MAAM,CAAC,MAAM,IAAI,MAAM;IAIvB;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC;;;;OAIG;WACU,gBAAgB,CAC3B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;OAIG;WACU,gBAAgB,CAC3B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IAI/C;;;;;;OAMG;mBACkB,IAAI;IAiBzB;;;;;OAKG;mBACkB,cAAc;CAYpC"}
@@ -3,11 +3,20 @@ import { DateService, ErrorUtils } from '@aneuhold/core-ts-lib';
3
3
  * A service for interacting with the Google Cloud API service for personal projects.
4
4
  */
5
5
  export default class GCloudAPIService {
6
+ static defaultUrl = 'https://gcloud-backend-926119935605.us-west1.run.app/';
6
7
  /**
7
8
  * The base URL of the Google Cloud API. For example, `something.com/api/`. It will include
8
9
  * the trailing slash.
9
10
  */
10
- static #baseUrl = 'https://gcloud-backend-926119935605.us-west1.run.app/';
11
+ static #baseUrl = this.defaultUrl;
12
+ /**
13
+ * Gets the current URL of the Google Cloud API.
14
+ *
15
+ * @returns the current URL of the Google Cloud API.
16
+ */
17
+ static getUrl() {
18
+ return this.#baseUrl;
19
+ }
11
20
  /**
12
21
  * Sets the URL of the Google Cloud API.
13
22
  *
@@ -1 +1 @@
1
- {"version":3,"file":"GCloudAPIService.js","sourceRoot":"","s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K,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE;YACpD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,UAAU,EAAE,YAAY;gBACxB,cAAc,EAAE,kBAAkB;gBAClC,MAAM,EAAE,kBAAkB;aAC3B;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;SAC5B,CAAC,CAAC;QACH,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,cAAc,CAAU,QAAQ,CAAC,CAAC;QACrE,OAAO,eAAe,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACK,MAAM,CAAC,KAAK,CAAC,cAAc,CAAU,QAAkB;QAC7D,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,WAAW,CAAyB,CAAC;QAC3E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,CAAC,0BAA0B,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACtE,IAAI,EAAE,EAAa;aACpB,CAAC;QACJ,CAAC;IACH,CAAC"}
@@ -13,11 +13,22 @@ import type {
13
13
  * A service for interacting with the Google Cloud API service for personal projects.
14
14
  */
15
15
  export default class GCloudAPIService {
16
+ static readonly defaultUrl: string = 'https://gcloud-backend-926119935605.us-west1.run.app/';
17
+
16
18
  /**
17
19
  * The base URL of the Google Cloud API. For example, `something.com/api/`. It will include
18
20
  * the trailing slash.
19
21
  */
20
- static #baseUrl: string = 'https://gcloud-backend-926119935605.us-west1.run.app/';
22
+ static #baseUrl: string = this.defaultUrl;
23
+
24
+ /**
25
+ * Gets the current URL of the Google Cloud API.
26
+ *
27
+ * @returns the current URL of the Google Cloud API.
28
+ */
29
+ static getUrl(): string {
30
+ return this.#baseUrl;
31
+ }
21
32
 
22
33
  /**
23
34
  * Sets the URL of the Google Cloud API.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aneuhold/core-ts-api-lib",
3
3
  "author": "Anton G. Neuhold Jr.",
4
4
  "license": "MIT",
5
- "version": "3.0.7",
5
+ "version": "3.0.8",
6
6
  "description": "A library for interacting with the backend and defining the backend API for personal projects.",
7
7
  "packageManager": "pnpm@10.25.0",
8
8
  "type": "module",
@@ -71,12 +71,12 @@
71
71
  "TypeScript"
72
72
  ],
73
73
  "dependencies": {
74
- "@aneuhold/core-ts-db-lib": "^4.0.3",
75
- "@aneuhold/core-ts-lib": "^2.3.15",
74
+ "@aneuhold/core-ts-db-lib": "^4.0.4",
75
+ "@aneuhold/core-ts-lib": "^2.3.16",
76
76
  "bson": "^7.0.0"
77
77
  },
78
78
  "devDependencies": {
79
- "@aneuhold/local-npm-registry": "^0.2.22",
79
+ "@aneuhold/local-npm-registry": "^0.2.23",
80
80
  "@aneuhold/main-scripts": "^2.8.0",
81
81
  "@types/node": "^25.0.2",
82
82
  "eslint": "^9.39.2",