@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
@@ -1,144 +0,0 @@
1
- import i18next from "i18next";
2
- import I18nextBrowserLanguageDetector from "i18next-browser-languagedetector";
3
- import I18nextCLILanguageDetector from "i18next-cli-language-detector";
4
- import enLocaleResources from "./en/locale-resources.js";
5
- import frLocaleResources from "./fr/locale-resources.js";
6
- /**
7
- * Internationalization language detectors.
8
- */
9
- export const I18nLanguageDetectors = {
10
- /**
11
- * Command-line interface (e.g., unit tests).
12
- */
13
- // TODO Refactor when https://github.com/neet/i18next-cli-language-detector/issues/281 resolved.
14
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Per above.
15
- CLI: I18nextCLILanguageDetector,
16
- /**
17
- * Web browser.
18
- */
19
- Browser: I18nextBrowserLanguageDetector
20
- };
21
- /**
22
- * Convert a string to lower case, skipping words that are all upper case.
23
- *
24
- * @param value
25
- * Value.
26
- *
27
- * @returns
28
- * Lower case string if value is a string. If not, value is returned as a string but not converted to lower case.
29
- */
30
- function toLowerCase(value) {
31
- return typeof value === "string" ?
32
- // Words with no lower case letters are preserved as they are likely mnemonics.
33
- value.split(" ").map(word => /[a-z]/u.test(word) ? word.toLowerCase() : word).join(" ") :
34
- String(value);
35
- }
36
- export const coreNS = "aidct_core";
37
- /**
38
- * Core resource bundle.
39
- */
40
- export const coreResourceBundle = {
41
- en: {
42
- aidct_core: enLocaleResources
43
- },
44
- fr: {
45
- aidct_core: frLocaleResources
46
- }
47
- };
48
- // Explicit type is necessary because type can't be inferred without additional references.
49
- export const i18nextCore = i18next.createInstance();
50
- /**
51
- * Initialize internationalization.
52
- *
53
- * @param i18next
54
- * Internationalization object. As multiple objects exist, this parameter represents the one for the module for which
55
- * internationalization is being initialized.
56
- *
57
- * @param languageDetector
58
- * Language detector.
59
- *
60
- * @param debug
61
- * Debug setting.
62
- *
63
- * @param defaultNS
64
- * Default namespace.
65
- *
66
- * @param defaultResourceBundle
67
- * Default resource bundle.
68
- *
69
- * @param i18nDependencyInits
70
- * Dependency internationalization initialization functions.
71
- *
72
- * @returns
73
- * Default resource bundle.
74
- */
75
- export async function i18nInit(i18next, languageDetector, debug, defaultNS, defaultResourceBundle, ...i18nDependencyInits) {
76
- let initAll = undefined;
77
- // Initialization may be called more than once.
78
- if (!i18next.isInitialized) {
79
- const mergedResourceBundle = {};
80
- /**
81
- * Merge a package resource bundle into the merged resource bundle.
82
- *
83
- * @param resourceBundle
84
- * Package resource bundle.
85
- */
86
- function mergeResourceBundle(resourceBundle) {
87
- // Merge languages.
88
- for (const [language, languageResourceBundle] of Object.entries(resourceBundle)) {
89
- if (!(language in mergedResourceBundle)) {
90
- mergedResourceBundle[language] = {};
91
- }
92
- const mergedLanguageResourceBundle = mergedResourceBundle[language];
93
- // Merge namespaces.
94
- for (const [namespace, resourceKey] of Object.entries(languageResourceBundle)) {
95
- if (namespace in mergedLanguageResourceBundle) {
96
- // Error prior to internationalization initialization; no localization possible.
97
- throw new Error(`Duplicate namespace ${namespace} in merged resource bundle for language ${language}`);
98
- }
99
- mergedLanguageResourceBundle[namespace] = resourceKey;
100
- }
101
- }
102
- }
103
- mergeResourceBundle(defaultResourceBundle);
104
- // Build chain to initialize dependencies and merge their resource bundles.
105
- for (const i18nDependencyInit of i18nDependencyInits) {
106
- const initDependency = i18nDependencyInit(languageDetector, debug).then(mergeResourceBundle);
107
- initAll = initAll === undefined ? initDependency : initAll.then(async () => initDependency);
108
- }
109
- const initThis = i18next.use(languageDetector).init({
110
- debug,
111
- defaultNS,
112
- resources: mergedResourceBundle,
113
- // Allow fallback by removing variant code then country code until match is found.
114
- nonExplicitSupportedLngs: true,
115
- // Fallback to first language defined.
116
- fallbackLng: Object.keys(mergedResourceBundle)[0],
117
- detection: {
118
- // Disabling cache allows read but requires explicit saving of i18nextLng attribute (e.g., via UI).
119
- caches: []
120
- }
121
- }).then(() => {
122
- // Add toLowerCase formatter.
123
- i18next.services.formatter?.add("toLowerCase", toLowerCase);
124
- });
125
- initAll = initAll === undefined ? initThis : initAll.then(async () => initThis);
126
- }
127
- return initAll !== undefined ? initAll.then(() => defaultResourceBundle) : defaultResourceBundle;
128
- }
129
- /**
130
- * Initialize internationalization.
131
- *
132
- * @param languageDetector
133
- * Language detector.
134
- *
135
- * @param debug
136
- * Debug setting.
137
- *
138
- * @returns
139
- * Core resource bundle.
140
- */
141
- export async function i18nCoreInit(languageDetector, debug = false) {
142
- return i18nInit(i18nextCore, languageDetector, debug, coreNS, coreResourceBundle);
143
- }
144
- //# sourceMappingURL=i18n.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/locale/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,OAMN,MAAM,SAAS,CAAC;AACjB,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AACvE,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AASzD;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC;;OAEG;IACH,gGAAgG;IAChG,qFAAqF;IACrF,GAAG,EAAE,0BAA+D;IAEpE;;OAEG;IACH,OAAO,EAAE,8BAAiE;CACpE,CAAC;AAQX;;;;;;;;GAQG;AACH,SAAS,WAAW,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC;QAC9B,+EAA+E;QAC/E,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACzF,MAAM,CAAC,KAAK,CAAC,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,MAAM,M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CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,gBAAsC,EAAE,KAAK,GAAG,KAAK;IACpF,OAAO,QAAQ,CAAC,WAAW,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC;AACtF,CAAC"}
package/dist/logger.d.ts DELETED
@@ -1,136 +0,0 @@
1
- import { type ISettingsParam, Logger } from "tslog";
2
- /**
3
- * Log levels.
4
- */
5
- export declare const LogLevels: {
6
- readonly Silly: 0;
7
- readonly Trace: 1;
8
- readonly Debug: 2;
9
- readonly Info: 3;
10
- readonly Warn: 4;
11
- readonly Error: 5;
12
- readonly Fatal: 6;
13
- };
14
- /**
15
- * Log level key.
16
- */
17
- export type LogLevelKey = keyof typeof LogLevels;
18
- /**
19
- * Log level.
20
- */
21
- export type LogLevel = typeof LogLevels[LogLevelKey];
22
- /**
23
- * Get the log level enumeration value corresponding to a string or number.
24
- *
25
- * @param untypedLogLevel
26
- * Untyped log level.
27
- *
28
- * @returns
29
- * Typed log level or default `LogLevels.Info` if untyped log level not provided..
30
- */
31
- export declare function logLevelOf(untypedLogLevel?: string | number): LogLevel;
32
- /**
33
- * Get a logger with an optional log level. The underlying implementation is
34
- * [`tslog`](https://tslog.js.org/).
35
- *
36
- * @param logLevel
37
- * Log level as enumeration value or string. Mapped to `minLevel` and sets `hideLogPositionForProduction` to true in
38
- * settings if at {@linkcode LogLevels.Info} or higher. Default is {@linkcode LogLevels.Info}.
39
- *
40
- * @param settings
41
- * Detailed settings. See [`tslog`](https://tslog.js.org/#/?id=settings) documentation for details. The `minLevel` is
42
- * ignored in favour of `logLevel` but `hideLogPositionForProduction` will override the default logic.
43
- *
44
- * @param logObj
45
- * Default log object. See [`tslog`](https://tslog.js.org/#/?id=defining-and-accessing-logobj) documentation for
46
- * details.
47
- *
48
- * @returns
49
- * Logger.
50
- *
51
- * @template T
52
- * Log object type.
53
- */
54
- export declare function getLogger<T extends object = object>(logLevel?: string | number, settings?: ISettingsParam<T>, logObj?: T): Logger<T>;
55
- /**
56
- * Get a loggable representation of a value. Values are returned unmodified, except as follows:
57
- *
58
- * - Big integers are converted to whole numbers where possible, otherwise as their decimal string representations.
59
- * - Arrays are limited to a maximum of ten elements. Any array longer than ten elements is replaced with the first four
60
- * elements, a string of three dots, and the last four elements. This may still create large results for
61
- * multidimensional arrays.
62
- * - Errors are converted to objects with `name`, `message`, and `stack` properties.
63
- * - Symbols are converted to their string representations.
64
- * - Functions are converted to strings of the form `Function(name)`.
65
- *
66
- * @param value
67
- * Value.
68
- *
69
- * @returns
70
- * Loggable value.
71
- */
72
- export declare function loggableValue(value: unknown): unknown;
73
- /**
74
- * Logger transport that stores messages in memory.
75
- */
76
- export declare class MemoryTransport<T extends object> {
77
- #private;
78
- /**
79
- * Constructor.
80
- *
81
- * @param logger
82
- * Logger.
83
- *
84
- * @param maximumLength
85
- * Maximum length of messages array.
86
- *
87
- * @param truncateLength
88
- * Length to which messages array is truncated when maximum is reached. Default is 50% of `maximumLength`, maximum
89
- * is 80% of `maximumLength`.
90
- */
91
- constructor(logger: Logger<T>, maximumLength: number, truncateLength?: number);
92
- /**
93
- * Get the messages.
94
- */
95
- get messages(): string[];
96
- /**
97
- * Get the maximum length of messages array.
98
- */
99
- get maximumLength(): number;
100
- /**
101
- * Get the length to which messages array is truncated when maximum is reached.
102
- */
103
- get truncateLength(): number;
104
- /**
105
- * Add a notification callback. If one already exists under the current name, do nothing.
106
- *
107
- * @param name
108
- * Callback name.
109
- *
110
- * @param notificationCallback
111
- * Callback.
112
- *
113
- * @returns
114
- * True if successfully added.
115
- */
116
- addNotificationCallback(name: string, notificationCallback: (message: string | undefined, messages: readonly string[]) => void): boolean;
117
- /**
118
- * Remove a notification callback.
119
- *
120
- * @param name
121
- * Callback name.
122
- */
123
- removeNotificationCallback(name: string): void;
124
- /**
125
- * Resize the messages array.
126
- *
127
- * @param maximumLength
128
- * Maximum length of messages array.
129
- *
130
- * @param truncateLength
131
- * Length to which messages array is truncated when maximum is reached. Default is 50% of `maximumLength`, maximum
132
- * is 80% of `maximumLength`.
133
- */
134
- resize(maximumLength: number, truncateLength?: number): void;
135
- }
136
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGpD;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;CAQZ,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,SAAS,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CA2BtE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAUpI;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CA4CrD;AAED;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC,SAAS,MAAM;;IAqBzC;;;;;;;;;;;;OAYG;gBACS,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM;IAoB7E;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,EAAE,CAEvB;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;;;;;;;;;OAWG;IACH,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,GAAG,OAAO;IAaxI;;;;;OAKG;IACH,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI9C;;;;;;;;;OASG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;CAI/D"}
package/dist/logger.js DELETED
@@ -1,256 +0,0 @@
1
- import { Logger } from "tslog";
2
- import { i18nextCore } from "./locale/i18n.js";
3
- /**
4
- * Log levels.
5
- */
6
- export const LogLevels = {
7
- Silly: 0,
8
- Trace: 1,
9
- Debug: 2,
10
- Info: 3,
11
- Warn: 4,
12
- Error: 5,
13
- Fatal: 6
14
- };
15
- /**
16
- * Get the log level enumeration value corresponding to a string or number.
17
- *
18
- * @param untypedLogLevel
19
- * Untyped log level.
20
- *
21
- * @returns
22
- * Typed log level or default `LogLevels.Info` if untyped log level not provided..
23
- */
24
- export function logLevelOf(untypedLogLevel) {
25
- let typedLogLevel;
26
- if (typeof untypedLogLevel === "string") {
27
- if (untypedLogLevel in LogLevels) {
28
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- String exists as a key.
29
- typedLogLevel = LogLevels[untypedLogLevel];
30
- }
31
- else {
32
- throw new RangeError(i18nextCore.t("Logger.unknownLogLevel", {
33
- logLevel: untypedLogLevel
34
- }));
35
- }
36
- }
37
- else if (untypedLogLevel !== undefined) {
38
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Assume that valid log level has been provided.
39
- if (Object.values(LogLevels).includes(untypedLogLevel)) {
40
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Valid log level has been provided.
41
- typedLogLevel = untypedLogLevel;
42
- }
43
- else {
44
- throw new RangeError(i18nextCore.t("Logger.unknownLogLevel", {
45
- logLevel: untypedLogLevel
46
- }));
47
- }
48
- }
49
- else {
50
- typedLogLevel = LogLevels.Info;
51
- }
52
- return typedLogLevel;
53
- }
54
- /**
55
- * Get a logger with an optional log level. The underlying implementation is
56
- * [`tslog`](https://tslog.js.org/).
57
- *
58
- * @param logLevel
59
- * Log level as enumeration value or string. Mapped to `minLevel` and sets `hideLogPositionForProduction` to true in
60
- * settings if at {@linkcode LogLevels.Info} or higher. Default is {@linkcode LogLevels.Info}.
61
- *
62
- * @param settings
63
- * Detailed settings. See [`tslog`](https://tslog.js.org/#/?id=settings) documentation for details. The `minLevel` is
64
- * ignored in favour of `logLevel` but `hideLogPositionForProduction` will override the default logic.
65
- *
66
- * @param logObj
67
- * Default log object. See [`tslog`](https://tslog.js.org/#/?id=defining-and-accessing-logobj) documentation for
68
- * details.
69
- *
70
- * @returns
71
- * Logger.
72
- *
73
- * @template T
74
- * Log object type.
75
- */
76
- export function getLogger(logLevel, settings, logObj) {
77
- const minLevel = logLevelOf(logLevel);
78
- return new Logger({
79
- // Hiding log position for production can be overridden in settings parameter.
80
- hideLogPositionForProduction: minLevel >= LogLevels.Info,
81
- ...settings ?? {},
82
- // Minimum log level overrides settings parameter.
83
- minLevel
84
- }, logObj);
85
- }
86
- /**
87
- * Get a loggable representation of a value. Values are returned unmodified, except as follows:
88
- *
89
- * - Big integers are converted to whole numbers where possible, otherwise as their decimal string representations.
90
- * - Arrays are limited to a maximum of ten elements. Any array longer than ten elements is replaced with the first four
91
- * elements, a string of three dots, and the last four elements. This may still create large results for
92
- * multidimensional arrays.
93
- * - Errors are converted to objects with `name`, `message`, and `stack` properties.
94
- * - Symbols are converted to their string representations.
95
- * - Functions are converted to strings of the form `Function(name)`.
96
- *
97
- * @param value
98
- * Value.
99
- *
100
- * @returns
101
- * Loggable value.
102
- */
103
- export function loggableValue(value) {
104
- let replacementValue;
105
- switch (typeof value) {
106
- case "string":
107
- case "number":
108
- case "boolean":
109
- case "undefined":
110
- replacementValue = value;
111
- break;
112
- case "bigint":
113
- // Big integers not supported in JSON.
114
- replacementValue = value >= Number.MIN_SAFE_INTEGER && value <= Number.MAX_SAFE_INTEGER ? Number(value) : value.toString(10);
115
- break;
116
- case "object":
117
- if (value === null) {
118
- replacementValue = value;
119
- }
120
- else if (Array.isArray(value)) {
121
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Slicing array is necessary to keep log size down.
122
- replacementValue = (value.length <= 10 ? value : [...value.slice(0, 4), "...", ...value.slice(-4)]).map(entry => loggableValue(entry));
123
- }
124
- else if (value instanceof Error) {
125
- replacementValue = loggableValue({
126
- name: value.name,
127
- message: value.message,
128
- stack: value.stack?.split("\n")
129
- });
130
- }
131
- else {
132
- // Apply recursively to all properties of the object.
133
- replacementValue = Object.fromEntries(Object.entries(value).map(([k, v]) => [k, loggableValue(v)]));
134
- }
135
- break;
136
- case "symbol":
137
- replacementValue = value.toString();
138
- break;
139
- case "function":
140
- replacementValue = `Function(${value.name})`;
141
- break;
142
- }
143
- return replacementValue;
144
- }
145
- /**
146
- * Logger transport that stores messages in memory.
147
- */
148
- export class MemoryTransport {
149
- /**
150
- * Notification callbacks map.
151
- */
152
- #notificationCallbacksMap = new Map();
153
- /**
154
- * Messages.
155
- */
156
- #messages = [];
157
- /**
158
- * Maximum length of messages array.
159
- */
160
- #maximumLength = 0;
161
- /**
162
- * Length to which messages array is truncated when maximum is reached.
163
- */
164
- #truncateLength = 0;
165
- /**
166
- * Constructor.
167
- *
168
- * @param logger
169
- * Logger.
170
- *
171
- * @param maximumLength
172
- * Maximum length of messages array.
173
- *
174
- * @param truncateLength
175
- * Length to which messages array is truncated when maximum is reached. Default is 50% of `maximumLength`, maximum
176
- * is 80% of `maximumLength`.
177
- */
178
- constructor(logger, maximumLength, truncateLength) {
179
- this.resize(maximumLength, truncateLength);
180
- logger.attachTransport((logObject) => {
181
- // Truncate logger messages if necessary.
182
- if (this.#messages.length >= this.#maximumLength) {
183
- this.#messages.splice(0, this.#maximumLength - this.#truncateLength);
184
- }
185
- const message = JSON.stringify(logObject);
186
- this.#messages.push(message);
187
- // Notify all registered callbacks.
188
- for (const notificationCallback of this.#notificationCallbacksMap.values()) {
189
- notificationCallback(message, this.#messages);
190
- }
191
- });
192
- }
193
- /**
194
- * Get the messages.
195
- */
196
- get messages() {
197
- return this.#messages;
198
- }
199
- /**
200
- * Get the maximum length of messages array.
201
- */
202
- get maximumLength() {
203
- return this.#maximumLength;
204
- }
205
- /**
206
- * Get the length to which messages array is truncated when maximum is reached.
207
- */
208
- get truncateLength() {
209
- return this.#truncateLength;
210
- }
211
- /**
212
- * Add a notification callback. If one already exists under the current name, do nothing.
213
- *
214
- * @param name
215
- * Callback name.
216
- *
217
- * @param notificationCallback
218
- * Callback.
219
- *
220
- * @returns
221
- * True if successfully added.
222
- */
223
- addNotificationCallback(name, notificationCallback) {
224
- const added = !this.#notificationCallbacksMap.has(name);
225
- if (added) {
226
- this.#notificationCallbacksMap.set(name, notificationCallback);
227
- // Notify with existing messages.
228
- notificationCallback(undefined, this.#messages);
229
- }
230
- return added;
231
- }
232
- /**
233
- * Remove a notification callback.
234
- *
235
- * @param name
236
- * Callback name.
237
- */
238
- removeNotificationCallback(name) {
239
- this.#notificationCallbacksMap.delete(name);
240
- }
241
- /**
242
- * Resize the messages array.
243
- *
244
- * @param maximumLength
245
- * Maximum length of messages array.
246
- *
247
- * @param truncateLength
248
- * Length to which messages array is truncated when maximum is reached. Default is 50% of `maximumLength`, maximum
249
- * is 80% of `maximumLength`.
250
- */
251
- resize(maximumLength, truncateLength) {
252
- this.#maximumLength = maximumLength;
253
- this.#truncateLength = truncateLength !== undefined ? Math.min(truncateLength, Math.floor(maximumLength * 0.8)) : Math.floor(maximumLength / 2);
254
- }
255
- }
256
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRo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BAA0B,CAAC,IAAY;QACnC,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,aAAqB,EAAE,cAAuB;QACjD,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,eAAe,GAAG,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC;IACpJ,CAAC;CACJ"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Parsed version.
3
- */
4
- export interface ParsedVersion {
5
- /**
6
- * Major version.
7
- */
8
- readonly majorVersion: number;
9
- /**
10
- * Minor version.
11
- */
12
- readonly minorVersion: number;
13
- /**
14
- * Patch version.
15
- */
16
- readonly patchVersion: number;
17
- /**
18
- * Pre-release identifier.
19
- */
20
- readonly preReleaseIdentifier: string | undefined;
21
- /**
22
- * Date/time included with pre-release identifier.
23
- */
24
- readonly dateTime: string | undefined;
25
- }
26
- /**
27
- * Parse version.
28
- *
29
- * @param version
30
- * Version, typically from package.json.
31
- *
32
- * @returns
33
- * Parsed version.
34
- */
35
- export declare function parseVersion(version: string): ParsedVersion;
36
- //# sourceMappingURL=parse-version.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-version.d.ts","sourceRoot":"","sources":["../src/parse-version.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IAElD;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAc3D"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Parse version.
3
- *
4
- * @param version
5
- * Version, typically from package.json.
6
- *
7
- * @returns
8
- * Parsed version.
9
- */
10
- export function parseVersion(version) {
11
- const parsedVersionGroups = /^(?<majorVersion>\d+)\.(?<minorVersion>\d+)\.(?<patchVersion>\d+)(?:-(?<preReleaseIdentifier>alpha|beta)(?:\.(?<dateTime>\d{12}))?)?$/u.exec(version)?.groups;
12
- if (parsedVersionGroups === undefined) {
13
- throw new Error(`Invalid package version ${version}`);
14
- }
15
- return {
16
- majorVersion: Number(parsedVersionGroups["majorVersion"]),
17
- minorVersion: Number(parsedVersionGroups["minorVersion"]),
18
- patchVersion: Number(parsedVersionGroups["patchVersion"]),
19
- preReleaseIdentifier: parsedVersionGroups["preReleaseIdentifier"],
20
- dateTime: parsedVersionGroups["dateTime"]
21
- };
22
- }
23
- //# sourceMappingURL=parse-version.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-version.js","sourceRoot":"","sources":["../src/parse-version.ts"],"names":[],"mappings":"AA8BA;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IACxC,MAAM,mBAAmB,GAAG,wIAAwI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE3L,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,OAAO;QACH,YAAY,EAAE,MAAM,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;QACzD,YAAY,EAAE,MAAM,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;QACzD,YAAY,EAAE,MAAM,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;QACzD,oBAAoB,EAAE,mBAAmB,CAAC,sBAAsB,CAAC;QACjE,QAAQ,EAAE,mBAAmB,CAAC,UAAU,CAAC;KAC5C,CAAC;AACN,CAAC"}
@@ -1,23 +0,0 @@
1
- import { ReadOnlyAppDataStorage } from "./app-data-storage.js";
2
- import { type HTTPFetch } from "./http-fetch.js";
3
- /**
4
- * Remote application data storage using HTTP.
5
- */
6
- export declare class RemoteAppDataStorage extends ReadOnlyAppDataStorage<true> {
7
- #private;
8
- /**
9
- * Constructor.
10
- *
11
- * @param baseURL
12
- * Base URL. The URL must not end with a slash.
13
- *
14
- * @param httpFetch
15
- * HTTP fetch function.
16
- */
17
- constructor(baseURL: string, httpFetch?: HTTPFetch);
18
- /**
19
- * @inheritDoc
20
- */
21
- protected doRead(key: string, asBinary: boolean | undefined): Promise<string | Uint8Array | undefined>;
22
- }
23
- //# sourceMappingURL=remote-app-data-storage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-app-data-storage.d.ts","sourceRoot":"","sources":["../src/remote-app-data-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGnF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,sBAAsB,CAAC,IAAI,CAAC;;IAGlE;;;;;;;;OAQG;gBACS,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,SAA4B;IAMpE;;OAEG;cACsB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;CAiBxH"}