@aidc-toolkit/core 1.0.44-beta → 1.0.44

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.
Files changed (84) hide show
  1. package/dist/browser-app-data-storage-G62WSQ5Z.js +1 -0
  2. package/dist/chunk-FIUBVWNN.js +1 -0
  3. package/dist/file-app-data-storage-M6RA7QOG.js +1 -0
  4. package/dist/index.cjs +18 -0
  5. package/dist/index.d.cts +801 -0
  6. package/dist/index.d.ts +801 -30
  7. package/dist/index.js +2 -12
  8. package/package.json +2 -2
  9. package/src/version.ts +1 -1
  10. package/tsconfig-src.tsbuildinfo +1 -1
  11. package/dist/app-data-storage.d.ts +0 -118
  12. package/dist/app-data-storage.d.ts.map +0 -1
  13. package/dist/app-data-storage.js +0 -117
  14. package/dist/app-data-storage.js.map +0 -1
  15. package/dist/app-data.d.ts +0 -26
  16. package/dist/app-data.d.ts.map +0 -1
  17. package/dist/app-data.js +0 -79
  18. package/dist/app-data.js.map +0 -1
  19. package/dist/browser-app-data-storage.d.ts +0 -26
  20. package/dist/browser-app-data-storage.d.ts.map +0 -1
  21. package/dist/browser-app-data-storage.js +0 -34
  22. package/dist/browser-app-data-storage.js.map +0 -1
  23. package/dist/cache.d.ts +0 -58
  24. package/dist/cache.d.ts.map +0 -1
  25. package/dist/cache.js +0 -12
  26. package/dist/cache.js.map +0 -1
  27. package/dist/file-app-data-storage.d.ts +0 -27
  28. package/dist/file-app-data-storage.d.ts.map +0 -1
  29. package/dist/file-app-data-storage.js +0 -52
  30. package/dist/file-app-data-storage.js.map +0 -1
  31. package/dist/http-fetch.d.ts +0 -45
  32. package/dist/http-fetch.d.ts.map +0 -1
  33. package/dist/http-fetch.js +0 -26
  34. package/dist/http-fetch.js.map +0 -1
  35. package/dist/hyperlink.d.ts +0 -18
  36. package/dist/hyperlink.d.ts.map +0 -1
  37. package/dist/hyperlink.js +0 -2
  38. package/dist/hyperlink.js.map +0 -1
  39. package/dist/index.d.ts.map +0 -1
  40. package/dist/index.js.map +0 -1
  41. package/dist/local-app-data-storage.d.ts +0 -8
  42. package/dist/local-app-data-storage.d.ts.map +0 -1
  43. package/dist/local-app-data-storage.js +0 -11
  44. package/dist/local-app-data-storage.js.map +0 -1
  45. package/dist/locale/en/locale-resources.d.ts +0 -10
  46. package/dist/locale/en/locale-resources.d.ts.map +0 -1
  47. package/dist/locale/en/locale-resources.js +0 -9
  48. package/dist/locale/en/locale-resources.js.map +0 -1
  49. package/dist/locale/fr/locale-resources.d.ts +0 -10
  50. package/dist/locale/fr/locale-resources.d.ts.map +0 -1
  51. package/dist/locale/fr/locale-resources.js +0 -9
  52. package/dist/locale/fr/locale-resources.js.map +0 -1
  53. package/dist/locale/i18n.d.ts +0 -75
  54. package/dist/locale/i18n.d.ts.map +0 -1
  55. package/dist/locale/i18n.js +0 -144
  56. package/dist/locale/i18n.js.map +0 -1
  57. package/dist/logger.d.ts +0 -136
  58. package/dist/logger.d.ts.map +0 -1
  59. package/dist/logger.js +0 -256
  60. package/dist/logger.js.map +0 -1
  61. package/dist/parse-version.d.ts +0 -36
  62. package/dist/parse-version.d.ts.map +0 -1
  63. package/dist/parse-version.js +0 -23
  64. package/dist/parse-version.js.map +0 -1
  65. package/dist/remote-app-data-storage.d.ts +0 -23
  66. package/dist/remote-app-data-storage.d.ts.map +0 -1
  67. package/dist/remote-app-data-storage.js +0 -42
  68. package/dist/remote-app-data-storage.js.map +0 -1
  69. package/dist/type-helper.d.ts +0 -115
  70. package/dist/type-helper.d.ts.map +0 -1
  71. package/dist/type-helper.js +0 -163
  72. package/dist/type-helper.js.map +0 -1
  73. package/dist/type.d.ts +0 -111
  74. package/dist/type.d.ts.map +0 -1
  75. package/dist/type.js +0 -2
  76. package/dist/type.js.map +0 -1
  77. package/dist/version.d.ts +0 -5
  78. package/dist/version.d.ts.map +0 -1
  79. package/dist/version.js +0 -5
  80. package/dist/version.js.map +0 -1
  81. package/dist/website-url.d.ts +0 -29
  82. package/dist/website-url.d.ts.map +0 -1
  83. package/dist/website-url.js +0 -60
  84. package/dist/website-url.js.map +0 -1
package/dist/app-data.js DELETED
@@ -1,79 +0,0 @@
1
- import { fromByteArray, toByteArray } from "base64-js";
2
- /**
3
- * Decode application data from an encoded string.
4
- *
5
- * @param stringData
6
- * String data.
7
- *
8
- * @returns
9
- * Decoded application data.
10
- */
11
- export function decodeAppData(stringData) {
12
- let decodedAppData;
13
- try {
14
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Mapping is expected to be correct.
15
- decodedAppData = JSON.parse(stringData, (_key, value) => {
16
- let replacementValue = value;
17
- // Decode string representing date/time and binary array and pass through other values unmodified.
18
- if (typeof value === "string") {
19
- // First capture group is type, second is data; simple split at ':' character.
20
- const stringDataGroups = /^(?<type>\w+):(?<data>.*)$/u.exec(value)?.groups;
21
- if (stringDataGroups !== undefined) {
22
- const type = stringDataGroups["type"];
23
- const data = stringDataGroups["data"];
24
- switch (type) {
25
- case "dateTime":
26
- replacementValue = new Date(data);
27
- break;
28
- case "binary":
29
- replacementValue = toByteArray(data);
30
- break;
31
- }
32
- }
33
- }
34
- return replacementValue;
35
- });
36
- }
37
- catch {
38
- // String data is not valid JSON; discard it.
39
- decodedAppData = undefined;
40
- }
41
- return decodedAppData;
42
- }
43
- /**
44
- * Encode an object to a format suitable for storage.
45
- *
46
- * @param o
47
- * Object.
48
- *
49
- * @returns
50
- * Object suitable for storage with date/time and binary types encoded as strings.
51
- */
52
- function encodeObject(o) {
53
- let mappedData;
54
- // Encode date/time and binary array as string and pass through other values unmodified.
55
- if (o instanceof Date) {
56
- mappedData = `dateTime:${o.toISOString()}`;
57
- }
58
- else if (o instanceof Uint8Array) {
59
- mappedData = `binary:${fromByteArray(o)}`;
60
- }
61
- else {
62
- mappedData = Object.fromEntries(Object.entries(o).map(([key, value]) => [key, typeof value === "object" && value !== null ? encodeObject(value) : value]));
63
- }
64
- return mappedData;
65
- }
66
- /**
67
- * Encode application data as a string for storage. Encoded string is in JSON format with date/time and binary data
68
- * converted to identifiable strings for decoding.
69
- *
70
- * @param appData
71
- * Application data.
72
- *
73
- * @returns
74
- * Encoded application data.
75
- */
76
- export function encodeAppData(appData) {
77
- return JSON.stringify(typeof appData !== "object" ? appData : encodeObject(appData));
78
- }
79
- //# sourceMappingURL=app-data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-data.js","sourceRoot":"","sources":["../src/app-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAOvD;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB;IAC5C,IAAI,cAAmC,CAAC;IAExC,IAAI,CAAC;QACD,6GAA6G;QAC7G,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,KAAc,EAAE,EAAE;YAC7D,IAAI,gBAAgB,GAAG,KAAK,CAAC;YAE7B,kGAAkG;YAClG,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC5B,8EAA8E;gBAC9E,MAAM,gBAAgB,GAAG,6BAA6B,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;gBAE3E,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;oBACjC,MAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;oBACtC,MAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;oBAEtC,QAAQ,IAAI,EAAE,CAAC;wBACX,KAAK,UAAU;4BACX,gBAAgB,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;4BAClC,MAAM;wBAEV,KAAK,QAAQ;4BACT,gBAAgB,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;4BACrC,MAAM;oBACd,CAAC;gBACL,CAAC;YACL,CAAC;YAED,OAAO,gBAAgB,CAAC;QAC5B,CAAC,CAAY,CAAC;IAClB,CAAC;IAAC,MAAM,CAAC;QACL,6CAA6C;QAC7C,cAAc,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,OAAO,cAAc,CAAC;AAC1B,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,YAAY,CAAC,CAAS;IAC3B,IAAI,UAA2B,CAAC;IAEhC,wFAAwF;IACxF,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC;QACpB,UAAU,GAAG,YAAY,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;IAC/C,CAAC;SAAM,IAAI,CAAC,YAAY,UAAU,EAAE,CAAC;QACjC,UAAU,GAAG,UAAU,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9C,CAAC;SAAM,CAAC;QACJ,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAoB,EAAE,EAAE,CACtF,CAAC,GAAG,EAAE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CACnF,CAAC,CAAC;IACP,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC1C,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AACzF,CAAC"}
@@ -1,26 +0,0 @@
1
- import { AppDataStorage } from "./app-data-storage.js";
2
- /**
3
- * Application data storage using the browser local storage.
4
- */
5
- export declare class BrowserAppDataStorage extends AppDataStorage<false> {
6
- /**
7
- * Constructor.
8
- *
9
- * @param path
10
- * Storage path prepended to each key along with '/' if defined, empty string if not.
11
- */
12
- constructor(path?: string);
13
- /**
14
- * @inheritDoc
15
- */
16
- protected doRead(key: string): string | undefined;
17
- /**
18
- * @inheritDoc
19
- */
20
- protected doWrite(key: string, s: string): void;
21
- /**
22
- * @inheritDoc
23
- */
24
- protected doDelete(key: string): void;
25
- }
26
- //# sourceMappingURL=browser-app-data-storage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-app-data-storage.d.ts","sourceRoot":"","sources":["../src/browser-app-data-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC5D;;;;;OAKG;gBACS,IAAI,CAAC,EAAE,MAAM;IAIzB;;OAEG;cACgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI1D;;OAEG;cACgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAIxD;;OAEG;cACgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAGjD"}
@@ -1,34 +0,0 @@
1
- import { AppDataStorage } from "./app-data-storage.js";
2
- /**
3
- * Application data storage using the browser local storage.
4
- */
5
- export class BrowserAppDataStorage extends AppDataStorage {
6
- /**
7
- * Constructor.
8
- *
9
- * @param path
10
- * Storage path prepended to each key along with '/' if defined, empty string if not.
11
- */
12
- constructor(path) {
13
- super(false, path);
14
- }
15
- /**
16
- * @inheritDoc
17
- */
18
- doRead(key) {
19
- return localStorage.getItem(key) ?? undefined;
20
- }
21
- /**
22
- * @inheritDoc
23
- */
24
- doWrite(key, s) {
25
- localStorage.setItem(key, s);
26
- }
27
- /**
28
- * @inheritDoc
29
- */
30
- doDelete(key) {
31
- localStorage.removeItem(key);
32
- }
33
- }
34
- //# sourceMappingURL=browser-app-data-storage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-app-data-storage.js","sourceRoot":"","sources":["../src/browser-app-data-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,cAAqB;IAC5D;;;;;OAKG;IACH,YAAY,IAAa;QACrB,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACvB,CAAC;IAED;;OAEG;IACgB,MAAM,CAAC,GAAW;QACjC,OAAO,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;IAClD,CAAC;IAED;;OAEG;IACgB,OAAO,CAAC,GAAW,EAAE,CAAS;QAC7C,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACgB,QAAQ,CAAC,GAAW;QACnC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;CACJ"}
package/dist/cache.d.ts DELETED
@@ -1,58 +0,0 @@
1
- import type { Promisable } from "./type.js";
2
- /**
3
- * Generic cache. Typically used to manage a local copy of remote data that is not refreshed regularly.
4
- *
5
- * @template TCache
6
- * Type of cached data.
7
- *
8
- * @template TSource
9
- * Type of source data. The type may be different from the cached data type if a transformation is required.
10
- */
11
- export declare abstract class Cache<TCache, TSource = TCache> {
12
- /**
13
- * Get the date/time at or after which the source should be checked for updates. If the value is undefined, this is
14
- * the first usage.
15
- */
16
- abstract get nextCheckDateTime(): Promisable<Date | undefined>;
17
- /**
18
- * Get the date/time at which the cache was last updated. This may more accurately reflect the date/time at which
19
- * the last source retrieved was updated. If the value is undefined, there is no data in the cache.
20
- */
21
- abstract get cacheDateTime(): Promisable<Date | undefined>;
22
- /**
23
- * Get the cache data. This should only ever be called if the cache date/time is defined.
24
- */
25
- abstract get cacheData(): Promisable<TCache>;
26
- /**
27
- * Get the date/time at which the source was last updated. This should not be called unless the next check date/time
28
- * has passed, as it may trigger an expensive remote retrieval.
29
- */
30
- abstract get sourceDateTime(): Promisable<Date>;
31
- /**
32
- * Get the source data. This should not be called unless the next check date/time has passed, as it may trigger an
33
- * expensive remote retrieval.
34
- */
35
- abstract get sourceData(): Promisable<TSource>;
36
- /**
37
- * Update the cache with only the next check date/time. The cache date/time and cache data must not be modified.
38
- * This is typically called when the cache is up to date with the source or source retrieval has failed.
39
- *
40
- * @param nextCheckDateTime
41
- * Next check date/time.
42
- */
43
- abstract update(nextCheckDateTime: Date): Promisable<void>;
44
- /**
45
- * Update all cache parameters. This is typically called when the cache is updated from the source.
46
- *
47
- * @param nextCheckDateTime
48
- * Next check date/time.
49
- *
50
- * @param cacheDateTime
51
- * Cache date/time.
52
- *
53
- * @param cacheData
54
- * Cache data.
55
- */
56
- abstract update(nextCheckDateTime: Date, cacheDateTime: Date, cacheData: TCache): Promisable<void>;
57
- }
58
- //# sourceMappingURL=cache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;;;;GAQG;AACH,8BAAsB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAChD;;;OAGG;IACH,QAAQ,KAAK,iBAAiB,IAAI,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC;IAE/D;;;OAGG;IACH,QAAQ,KAAK,aAAa,IAAI,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC;IAE3D;;OAEG;IACH,QAAQ,KAAK,SAAS,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IAE7C;;;OAGG;IACH,QAAQ,KAAK,cAAc,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAEhD;;;OAGG;IACH,QAAQ,KAAK,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IAE/C;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,iBAAiB,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;IAE1D;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,MAAM,CAAC,iBAAiB,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC;CACrG"}
package/dist/cache.js DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * Generic cache. Typically used to manage a local copy of remote data that is not refreshed regularly.
3
- *
4
- * @template TCache
5
- * Type of cached data.
6
- *
7
- * @template TSource
8
- * Type of source data. The type may be different from the cached data type if a transformation is required.
9
- */
10
- export class Cache {
11
- }
12
- //# sourceMappingURL=cache.js.map
package/dist/cache.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,OAAgB,KAAK;CAoD1B"}
@@ -1,27 +0,0 @@
1
- import { AppDataStorage } from "./app-data-storage.js";
2
- /**
3
- * Application data storage using the file system.
4
- */
5
- export declare class FileAppDataStorage extends AppDataStorage<true> {
6
- #private;
7
- /**
8
- * Constructor.
9
- *
10
- * @param path
11
- * Storage path prepended to each key along with '/' if defined, empty string if not.
12
- */
13
- constructor(path?: string);
14
- /**
15
- * @inheritDoc
16
- */
17
- protected doRead(key: string, asBinary: boolean | undefined): Promise<string | Uint8Array | undefined>;
18
- /**
19
- * @inheritDoc
20
- */
21
- protected doWrite(key: string, data: string | Uint8Array): Promise<void>;
22
- /**
23
- * @inheritDoc
24
- */
25
- protected doDelete(key: string): Promise<void>;
26
- }
27
- //# sourceMappingURL=file-app-data-storage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-app-data-storage.d.ts","sourceRoot":"","sources":["../src/file-app-data-storage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,cAAc,CAAC,IAAI,CAAC;;IAMxD;;;;;OAKG;gBACS,IAAI,CAAC,EAAE,MAAM;IAOzB;;OAEG;cACsB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAUrH;;OAEG;cACsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAUvF;;OAEG;cACsB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAOhE"}
@@ -1,52 +0,0 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
- import { AppDataStorage } from "./app-data-storage.js";
4
- /**
5
- * Application data storage using the file system.
6
- */
7
- export class FileAppDataStorage extends AppDataStorage {
8
- /**
9
- * If true, node:fs has been polyfilled with empty object.
10
- */
11
- #isNoOp;
12
- /**
13
- * Constructor.
14
- *
15
- * @param path
16
- * Storage path prepended to each key along with '/' if defined, empty string if not.
17
- */
18
- constructor(path) {
19
- super(true, path);
20
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Condition is true in polyfilled environment.
21
- this.#isNoOp = fs?.promises?.readFile === undefined;
22
- }
23
- /**
24
- * @inheritDoc
25
- */
26
- async doRead(key, asBinary) {
27
- return !this.#isNoOp ?
28
- fs.promises.readFile(key).then(buffer => asBinary === true ? buffer : buffer.toString()).catch(() => undefined) :
29
- undefined;
30
- }
31
- /**
32
- * @inheritDoc
33
- */
34
- async doWrite(key, data) {
35
- return !this.#isNoOp ?
36
- fs.promises.mkdir(path.dirname(key), {
37
- recursive: true
38
- }).then(async () => fs.promises.writeFile(key, data)) :
39
- undefined;
40
- }
41
- /**
42
- * @inheritDoc
43
- */
44
- async doDelete(key) {
45
- return !this.#isNoOp ?
46
- fs.promises.rm(key, {
47
- force: true
48
- }) :
49
- undefined;
50
- }
51
- }
52
- //# sourceMappingURL=file-app-data-storage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-app-data-storage.js","sourceRoot":"","sources":["../src/file-app-data-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAoB;IACxD;;OAEG;IACM,OAAO,CAAU;IAE1B;;;;;OAKG;IACH,YAAY,IAAa;QACrB,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAElB,uHAAuH;QACvH,IAAI,CAAC,OAAO,GAAG,EAAE,EAAE,QAAQ,EAAE,QAAQ,KAAK,SAAS,CAAC;IACxD,CAAC;IAED;;OAEG;IACgB,KAAK,CAAC,MAAM,CAAC,GAAW,EAAE,QAA6B;QACtE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClB,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACpC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CACjD,CAAC,KAAK,CAAC,GAAG,EAAE,CACT,SAAS,CACZ,CAAC,CAAC;YACH,SAAS,CAAC;IAClB,CAAC;IAED;;OAEG;IACgB,KAAK,CAAC,OAAO,CAAC,GAAW,EAAE,IAAyB;QACnE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClB,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACjC,SAAS,EAAE,IAAI;aAClB,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CACf,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CACnC,CAAC,CAAC;YACH,SAAS,CAAC;IAClB,CAAC;IAED;;OAEG;IACgB,KAAK,CAAC,QAAQ,CAAC,GAAW;QACzC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClB,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE;gBAChB,KAAK,EAAE,IAAI;aACd,CAAC,CAAC,CAAC;YACJ,SAAS,CAAC;IAClB,CAAC;CACJ"}
@@ -1,45 +0,0 @@
1
- import type { Promisable } from "./type.js";
2
- /**
3
- * HTTP status code for OK.
4
- */
5
- export declare const HTTP_OK = 200;
6
- /**
7
- * HTTP status code for not found.
8
- */
9
- export declare const HTTP_NOT_FOUND = 404;
10
- /**
11
- * Generic HTTP response.
12
- */
13
- export interface HTTPResponse {
14
- /**
15
- * True if OK.
16
- */
17
- readonly ok: boolean;
18
- /**
19
- * HTTP status code.
20
- */
21
- readonly status: number;
22
- /**
23
- * Body as array buffer.
24
- */
25
- readonly arrayBuffer: () => Promisable<ArrayBuffer>;
26
- /**
27
- * Body as text.
28
- */
29
- readonly text: () => Promisable<string>;
30
- }
31
- /**
32
- * HTTP fetch function.
33
- */
34
- export type HTTPFetch = (url: string) => Promisable<HTTPResponse>;
35
- /**
36
- * Default HTTP fetch function using global `fetch` function.
37
- *
38
- * @param url
39
- * URL.
40
- *
41
- * @returns
42
- * HTTP response.
43
- */
44
- export declare function defaultHTTPFetch(url: string): Promise<HTTPResponse>;
45
- //# sourceMappingURL=http-fetch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-fetch.d.ts","sourceRoot":"","sources":["../src/http-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,OAAO,MAAM,CAAC;AAE3B;;GAEG;AACH,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,UAAU,CAAC,WAAW,CAAC,CAAC;IAEpD;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,UAAU,CAAC,YAAY,CAAC,CAAC;AAElE;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAOzE"}
@@ -1,26 +0,0 @@
1
- /**
2
- * HTTP status code for OK.
3
- */
4
- export const HTTP_OK = 200;
5
- /**
6
- * HTTP status code for not found.
7
- */
8
- export const HTTP_NOT_FOUND = 404;
9
- /**
10
- * Default HTTP fetch function using global `fetch` function.
11
- *
12
- * @param url
13
- * URL.
14
- *
15
- * @returns
16
- * HTTP response.
17
- */
18
- export async function defaultHTTPFetch(url) {
19
- return fetch(url).then(response => ({
20
- ok: response.ok,
21
- status: response.status,
22
- arrayBuffer: async () => response.arrayBuffer(),
23
- text: async () => response.text()
24
- }));
25
- }
26
- //# sourceMappingURL=http-fetch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-fetch.js","sourceRoot":"","sources":["../src/http-fetch.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC;AAE3B;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAgClC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAW;IAC9C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAChC,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE;QAC/C,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE;KACpC,CAAC,CAAC,CAAC;AACR,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Hyperlink.
3
- */
4
- export interface Hyperlink {
5
- /**
6
- * Reference, relative or absolute depending on the application.
7
- */
8
- readonly reference: string;
9
- /**
10
- * Human-readable text.
11
- */
12
- readonly text?: string | undefined;
13
- /**
14
- * Additional details.
15
- */
16
- readonly details?: string | undefined;
17
- }
18
- //# sourceMappingURL=hyperlink.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hyperlink.d.ts","sourceRoot":"","sources":["../src/hyperlink.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEnC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC"}
package/dist/hyperlink.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=hyperlink.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hyperlink.js","sourceRoot":"","sources":["../src/hyperlink.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,mBAAmB,WAAW,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAEjC,cAAc,aAAa,CAAC;AAE5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAE3B,mBAAmB,gBAAgB,CAAC;AAEpC,cAAc,kBAAkB,CAAC"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,cAAc,kBAAkB,CAAC;AAEjC,cAAc,aAAa,CAAC;AAE5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAI3B,cAAc,kBAAkB,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { AppDataStorage } from "./app-data-storage.js";
2
- /**
3
- * Local application data storage class for the current environment. This is a variable representing a `Promise` as the
4
- * implementing class is loaded dynamically to prevent the inclusion of unnecessary node dependencies in a browser
5
- * environment.
6
- */
7
- export declare const LocalAppDataStorage: Promise<new (path?: string) => AppDataStorage<boolean>>;
8
- //# sourceMappingURL=local-app-data-storage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-app-data-storage.d.ts","sourceRoot":"","sources":["../src/local-app-data-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC,EAAE,MAAM,KAAK,cAAc,CAAC,OAAO,CAAC,CAII,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Local application data storage class for the current environment. This is a variable representing a `Promise` as the
3
- * implementing class is loaded dynamically to prevent the inclusion of unnecessary node dependencies in a browser
4
- * environment.
5
- */
6
- export const LocalAppDataStorage =
7
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- localStorage is undefined when running under Node.js.
8
- globalThis.localStorage === undefined ?
9
- import("./file-app-data-storage.js").then(module => module.FileAppDataStorage) :
10
- import("./browser-app-data-storage.js").then(module => module.BrowserAppDataStorage);
11
- //# sourceMappingURL=local-app-data-storage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-app-data-storage.js","sourceRoot":"","sources":["../src/local-app-data-storage.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB;AAC5B,gIAAgI;AAChI,UAAU,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC;IACnC,MAAM,CAAC,4BAA4B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAChF,MAAM,CAAC,+BAA+B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- Logger: {
3
- unknownLogLevel: string;
4
- };
5
- RemoteAppDataStorage: {
6
- httpError: string;
7
- };
8
- };
9
- export default _default;
10
- //# sourceMappingURL=locale-resources.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locale-resources.d.ts","sourceRoot":"","sources":["../../../src/locale/en/locale-resources.ts"],"names":[],"mappings":";;;;;;;;AAAA,wBAOE"}
@@ -1,9 +0,0 @@
1
- export default {
2
- Logger: {
3
- unknownLogLevel: "Unknown log level \"{{logLevel}}\""
4
- },
5
- RemoteAppDataStorage: {
6
- httpError: "HTTP error {{status, number}} retrieving file"
7
- }
8
- };
9
- //# sourceMappingURL=locale-resources.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locale-resources.js","sourceRoot":"","sources":["../../../src/locale/en/locale-resources.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,MAAM,EAAE;QACJ,eAAe,EAAE,oCAAoC;KACxD;IACD,oBAAoB,EAAE;QAClB,SAAS,EAAE,+CAA+C;KAC7D;CACJ,CAAC"}
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- Logger: {
3
- unknownLogLevel: string;
4
- };
5
- RemoteAppDataStorage: {
6
- httpError: string;
7
- };
8
- };
9
- export default _default;
10
- //# sourceMappingURL=locale-resources.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locale-resources.d.ts","sourceRoot":"","sources":["../../../src/locale/fr/locale-resources.ts"],"names":[],"mappings":";;;;;;;;AAAA,wBAOE"}
@@ -1,9 +0,0 @@
1
- export default {
2
- Logger: {
3
- unknownLogLevel: "Niveau de journalisation inconnu « {{logLevel}} »"
4
- },
5
- RemoteAppDataStorage: {
6
- httpError: "Erreur HTTP {{status, number}} lors de la récupération du fichier"
7
- }
8
- };
9
- //# sourceMappingURL=locale-resources.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locale-resources.js","sourceRoot":"","sources":["../../../src/locale/fr/locale-resources.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,MAAM,EAAE;QACJ,eAAe,EAAE,mDAAmD;KACvE;IACD,oBAAoB,EAAE;QAClB,SAAS,EAAE,mEAAmE;KACjF;CACJ,CAAC"}
@@ -1,75 +0,0 @@
1
- import { type i18n, type LanguageDetectorModule, type Newable, type NewableModule, type Resource } from "i18next";
2
- import enLocaleResources from "./en/locale-resources.js";
3
- /**
4
- * Locale strings type for generic manipulation.
5
- */
6
- export interface LocaleResources {
7
- [key: string]: LocaleResources | string;
8
- }
9
- /**
10
- * Internationalization language detectors.
11
- */
12
- export declare const I18nLanguageDetectors: {
13
- /**
14
- * Command-line interface (e.g., unit tests).
15
- */
16
- readonly CLI: LanguageDetectorModule;
17
- /**
18
- * Web browser.
19
- */
20
- readonly Browser: Newable<LanguageDetectorModule>;
21
- };
22
- /**
23
- * Internationalization language detector.
24
- */
25
- export type I18nLanguageDetector = LanguageDetectorModule | Newable<LanguageDetectorModule> | NewableModule<LanguageDetectorModule>;
26
- export declare const coreNS = "aidct_core";
27
- /**
28
- * Locale resources type is extracted from the English locale resources object.
29
- */
30
- export type CoreLocaleResources = typeof enLocaleResources;
31
- /**
32
- * Core resource bundle.
33
- */
34
- export declare const coreResourceBundle: Resource;
35
- export declare const i18nextCore: i18n;
36
- /**
37
- * Initialize internationalization.
38
- *
39
- * @param i18next
40
- * Internationalization object. As multiple objects exist, this parameter represents the one for the module for which
41
- * internationalization is being initialized.
42
- *
43
- * @param languageDetector
44
- * Language detector.
45
- *
46
- * @param debug
47
- * Debug setting.
48
- *
49
- * @param defaultNS
50
- * Default namespace.
51
- *
52
- * @param defaultResourceBundle
53
- * Default resource bundle.
54
- *
55
- * @param i18nDependencyInits
56
- * Dependency internationalization initialization functions.
57
- *
58
- * @returns
59
- * Default resource bundle.
60
- */
61
- export declare function i18nInit(i18next: i18n, languageDetector: I18nLanguageDetector, debug: boolean, defaultNS: string, defaultResourceBundle: Resource, ...i18nDependencyInits: Array<(languageDetector: I18nLanguageDetector, debug: boolean) => Promise<Resource>>): Promise<Resource>;
62
- /**
63
- * Initialize internationalization.
64
- *
65
- * @param languageDetector
66
- * Language detector.
67
- *
68
- * @param debug
69
- * Debug setting.
70
- *
71
- * @returns
72
- * Core resource bundle.
73
- */
74
- export declare function i18nCoreInit(languageDetector: I18nLanguageDetector, debug?: boolean): Promise<Resource>;
75
- //# sourceMappingURL=i18n.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/locale/i18n.ts"],"names":[],"mappings":"AAAA,OAAgB,EACZ,KAAK,IAAI,EACT,KAAK,sBAAsB,EAC3B,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,QAAQ,EAChB,MAAM,SAAS,CAAC;AAGjB,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,MAAM,CAAC;CAC3C;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB;IAC9B;;OAEG;kBAG2C,sBAAsB;IAEpE;;OAEG;sBACwC,OAAO,CAAC,sBAAsB,CAAC;CACpE,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG,aAAa,CAAC,sBAAsB,CAAC,CAAC;AAkBrG,eAAO,MAAM,MAAM,eAAe,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,iBAAiB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAOhC,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,IAA+B,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,qBAAqB,EAAE,QAAQ,EAAE,GAAG,mBAAmB,EAAE,KAAK,CAAC,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAgEzR;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,KAAK,UAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAE3G"}