@gandalan/weblibs 1.5.25 → 1.5.26

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/index.d.ts CHANGED
@@ -1,4 +1,12 @@
1
1
  export * from "./index.js";
2
+ export { IDASFactory } from "./api/IDAS.js";
3
+ export { RESTClient } from "./api/RESTClient.js";
4
+ export { initIDAS } from "./api/authUtils.js";
5
+ export { createApi, fluentApi } from "./api/fluentApi.js";
6
+ export { createIDASApi, idasFluentApi } from "./api/idasFluentApi.js";
7
+ export { createAuthManager, fluentIdasAuthManager } from "./api/fluentAuthManager.js";
8
+ export { fetchEnvConfig } from "./api/fluentEnvUtils.js";
9
+ export { restClient } from "./api/fluentRestClient.js";
2
10
 
3
11
  export type AblageApi = {
4
12
  get: (guid: string) => Promise<AblageDTO>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gandalan/weblibs",
3
- "version": "1.5.25",
3
+ "version": "1.5.26",
4
4
  "description": "WebLibs for Gandalan JS/TS projects",
5
5
  "keywords": [
6
6
  "gandalan"
@@ -18,13 +18,22 @@ const dtoLeafDirectory = path.join(rootDir, "api", "dtos");
18
18
  const businessLeafDirectory = path.join(rootDir, "api", "business");
19
19
  const uiLeafDirectory = path.join(rootDir, "ui");
20
20
 
21
- const sourceDirectories = ["api", "ui"];
22
-
23
21
  const dtoRootMarkerStart = "// BEGIN GENERATED ROOT DTO TYPEDEFS";
24
22
  const dtoRootMarkerEnd = "// END GENERATED ROOT DTO TYPEDEFS";
25
23
  const businessRootMarkerStart = "// BEGIN GENERATED ROOT BUSINESS TYPEDEFS";
26
24
  const businessRootMarkerEnd = "// END GENERATED ROOT BUSINESS TYPEDEFS";
27
25
 
26
+ const rootValueExportStatements = [
27
+ "export { IDASFactory } from \"./api/IDAS.js\";",
28
+ "export { RESTClient } from \"./api/RESTClient.js\";",
29
+ "export { initIDAS } from \"./api/authUtils.js\";",
30
+ "export { createApi, fluentApi } from \"./api/fluentApi.js\";",
31
+ "export { createIDASApi, idasFluentApi } from \"./api/idasFluentApi.js\";",
32
+ "export { createAuthManager, fluentIdasAuthManager } from \"./api/fluentAuthManager.js\";",
33
+ "export { fetchEnvConfig } from \"./api/fluentEnvUtils.js\";",
34
+ "export { restClient } from \"./api/fluentRestClient.js\";"
35
+ ];
36
+
28
37
  const simpleImportTypePattern = /^import\((?:"|').+(?:"|')\)\.[A-Za-z0-9_$]+$/;
29
38
  const returnTypeOfCreateApiPattern = /^ReturnType<\s*typeof\s+(create[A-Za-z0-9_$]+Api)\s*>$/;
30
39
 
@@ -244,16 +253,6 @@ function toRelativeImportPath(fromFilePath, targetFilePath) {
244
253
  return relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
245
254
  }
246
255
 
247
- function toRelativeDtsImportPath(fromFilePath, targetFilePath) {
248
- const importPath = toRelativeImportPath(fromFilePath, targetFilePath);
249
-
250
- if (targetFilePath === path.join(rootDir, "api", "neherApp3Types.js")) {
251
- return importPath.replace(/\.js$/, "");
252
- }
253
-
254
- return importPath;
255
- }
256
-
257
256
  function getJSDocBlocks(source) {
258
257
  return source.match(/\/\*\*[\s\S]*?\*\//g) ?? [];
259
258
  }
@@ -1501,6 +1500,7 @@ function replaceGeneratedBlock(source, startMarker, endMarker, generatedBlock, t
1501
1500
  function buildRootDts(publicTypeEntries) {
1502
1501
  const lines = [
1503
1502
  "export * from \"./index.js\";",
1503
+ ...rootValueExportStatements,
1504
1504
  ""
1505
1505
  ];
1506
1506