@leettools/common 0.1.0

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 (71) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +16 -0
  3. package/dist/config.d.ts +8 -0
  4. package/dist/config.d.ts.map +1 -0
  5. package/dist/config.js +59 -0
  6. package/dist/config.js.map +1 -0
  7. package/dist/content.d.ts +6 -0
  8. package/dist/content.d.ts.map +1 -0
  9. package/dist/content.js +33 -0
  10. package/dist/content.js.map +1 -0
  11. package/dist/csv.d.ts +10 -0
  12. package/dist/csv.d.ts.map +1 -0
  13. package/dist/csv.js +63 -0
  14. package/dist/csv.js.map +1 -0
  15. package/dist/deprecatied.d.ts +5 -0
  16. package/dist/deprecatied.d.ts.map +1 -0
  17. package/dist/deprecatied.js +18 -0
  18. package/dist/deprecatied.js.map +1 -0
  19. package/dist/errors.d.ts +106 -0
  20. package/dist/errors.d.ts.map +1 -0
  21. package/dist/errors.js +196 -0
  22. package/dist/errors.js.map +1 -0
  23. package/dist/index.d.ts +14 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +14 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/json.d.ts +8 -0
  28. package/dist/json.d.ts.map +1 -0
  29. package/dist/json.js +46 -0
  30. package/dist/json.js.map +1 -0
  31. package/dist/language.d.ts +13 -0
  32. package/dist/language.d.ts.map +1 -0
  33. package/dist/language.js +89 -0
  34. package/dist/language.js.map +1 -0
  35. package/dist/node/dotenv_utils.d.ts +13 -0
  36. package/dist/node/dotenv_utils.d.ts.map +1 -0
  37. package/dist/node/dotenv_utils.js +82 -0
  38. package/dist/node/dotenv_utils.js.map +1 -0
  39. package/dist/node/file_utils.d.ts +30 -0
  40. package/dist/node/file_utils.d.ts.map +1 -0
  41. package/dist/node/file_utils.js +211 -0
  42. package/dist/node/file_utils.js.map +1 -0
  43. package/dist/node/module_utils.d.ts +2 -0
  44. package/dist/node/module_utils.d.ts.map +1 -0
  45. package/dist/node/module_utils.js +30 -0
  46. package/dist/node/module_utils.js.map +1 -0
  47. package/dist/registry.d.ts +11 -0
  48. package/dist/registry.d.ts.map +1 -0
  49. package/dist/registry.js +48 -0
  50. package/dist/registry.js.map +1 -0
  51. package/dist/template.d.ts +5 -0
  52. package/dist/template.d.ts.map +1 -0
  53. package/dist/template.js +62 -0
  54. package/dist/template.js.map +1 -0
  55. package/dist/time.d.ts +7 -0
  56. package/dist/time.d.ts.map +1 -0
  57. package/dist/time.js +47 -0
  58. package/dist/time.js.map +1 -0
  59. package/dist/tokenizer.d.ts +3 -0
  60. package/dist/tokenizer.d.ts.map +1 -0
  61. package/dist/tokenizer.js +26 -0
  62. package/dist/tokenizer.js.map +1 -0
  63. package/dist/types.d.ts +17 -0
  64. package/dist/types.d.ts.map +1 -0
  65. package/dist/types.js +128 -0
  66. package/dist/types.js.map +1 -0
  67. package/dist/url.d.ts +6 -0
  68. package/dist/url.d.ts.map +1 -0
  69. package/dist/url.js +48 -0
  70. package/dist/url.js.map +1 -0
  71. package/package.json +89 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # @leettools/common
2
+
3
+ Dependency-light TypeScript primitives shared by LeetTools packages. This package contains
4
+ no backend, user, organization, knowledge-base, search, MCP, or LLM policy. Some helpers
5
+ are runtime-specific; callers choose imports that fit their client or server environment.
6
+
7
+ ```ts
8
+ import { ensureJsonItemList, normalizeUrl, truncateString } from '@leettools/common'
9
+ ```
10
+
11
+ Public subpaths: `config`, `content`, `csv`, `deprecatied`, `errors`, `json`, `language`,
12
+ `registry`, `template`, `time`, `tokenizer`, `types`, and `url`.
13
+
14
+ Node-specific utilities are exposed under `node/*`, for example
15
+ `@leettools/common/node/file_utils`, `@leettools/common/node/dotenv_utils`, and
16
+ `@leettools/common/node/module_utils`.
@@ -0,0 +1,8 @@
1
+ export type OptionBag = Record<string, unknown>;
2
+ export declare function valueToBool(value: unknown): boolean;
3
+ export declare function daysLimitToTimestamps(daysLimit: number, nowMs?: number): [number, number];
4
+ export declare function getIntOptionValue(options: OptionBag, optionName: string, defaultValue?: number | null): number | null;
5
+ export declare function getBoolOptionValue(options: OptionBag, optionName: string, defaultValue?: boolean | null): boolean | null;
6
+ export declare function getFloatOptionValue(options: OptionBag, optionName: string, defaultValue?: number | null): number | null;
7
+ export declare function getStrOptionValue(options: OptionBag, optionName: string, defaultValue?: string | null): string | null;
8
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE/C,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAmBnD;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,SAAa,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAK7F;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,GAAE,MAAM,GAAG,IAAW,GACjC,MAAM,GAAG,IAAI,CAOf;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,GAAE,OAAO,GAAG,IAAW,GAClC,OAAO,GAAG,IAAI,CAUhB;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,GAAE,MAAM,GAAG,IAAW,GACjC,MAAM,GAAG,IAAI,CAOf;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,GAAE,MAAM,GAAG,IAAW,GACjC,MAAM,GAAG,IAAI,CAGf"}
package/dist/config.js ADDED
@@ -0,0 +1,59 @@
1
+ import { UnexpectedCaseError } from './errors.js';
2
+ export function valueToBool(value) {
3
+ if (typeof value === 'boolean') {
4
+ return value;
5
+ }
6
+ if (typeof value === 'number' && Number.isInteger(value)) {
7
+ return value !== 0;
8
+ }
9
+ if (value === null || value === undefined) {
10
+ return false;
11
+ }
12
+ const normalized = String(value).trim().toLowerCase();
13
+ if (['true', '1', 't', 'yes', 'y'].includes(normalized)) {
14
+ return true;
15
+ }
16
+ if (['false', '0', 'f', 'no', 'n'].includes(normalized)) {
17
+ return false;
18
+ }
19
+ throw new UnexpectedCaseError(`Cannot convert ${String(value)} to bool.`);
20
+ }
21
+ export function daysLimitToTimestamps(daysLimit, nowMs = Date.now()) {
22
+ if (daysLimit === 0) {
23
+ return [0, Number.MAX_SAFE_INTEGER];
24
+ }
25
+ return [nowMs - daysLimit * 24 * 60 * 60 * 1000, nowMs];
26
+ }
27
+ export function getIntOptionValue(options, optionName, defaultValue = null) {
28
+ const value = options[optionName];
29
+ if (value === null || value === undefined) {
30
+ return defaultValue;
31
+ }
32
+ const parsed = Number.parseInt(String(value), 10);
33
+ return Number.isNaN(parsed) ? defaultValue : parsed;
34
+ }
35
+ export function getBoolOptionValue(options, optionName, defaultValue = null) {
36
+ const value = options[optionName];
37
+ if (value === null || value === undefined) {
38
+ return defaultValue;
39
+ }
40
+ try {
41
+ return valueToBool(value);
42
+ }
43
+ catch {
44
+ return defaultValue;
45
+ }
46
+ }
47
+ export function getFloatOptionValue(options, optionName, defaultValue = null) {
48
+ const value = options[optionName];
49
+ if (value === null || value === undefined) {
50
+ return defaultValue;
51
+ }
52
+ const parsed = Number.parseFloat(String(value));
53
+ return Number.isNaN(parsed) ? defaultValue : parsed;
54
+ }
55
+ export function getStrOptionValue(options, optionName, defaultValue = null) {
56
+ const value = options[optionName];
57
+ return value === null || value === undefined ? defaultValue : String(value);
58
+ }
59
+ //# sourceMappingURL=config.js.map
@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C,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAA;AACrD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,OAAkB,EAClB,UAAkB,EAClB,eAA8B,IAAI;IAElC,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IACjC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC7E,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function isMeaningful(content: string | null | undefined, minimumLength?: number): boolean;
2
+ export declare function getImageUrl(content: string): string | null;
3
+ export declare function normalizeNewlines(text: string | null | undefined): string;
4
+ export declare function truncateString(value: string, maximumLength: number): string;
5
+ export declare function getPromptForLog(prompt: string, snippetLength?: number | null): string;
6
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,aAAa,SAAM,GAAG,OAAO,CAE7F;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE1D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAEzE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAiB3E;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,GAAE,MAAM,GAAG,IAAS,GAAG,MAAM,CAKzF"}
@@ -0,0 +1,33 @@
1
+ const OMITTED_MARKER = '[... omitted ...]';
2
+ const IMAGE_LINK_PATTERN = /!?(?:\[[^\]]*\])\(([^\s)]+\.(?:png|jpe?g|gif|bmp|tiff|webp|svg)(?:\?[^)]*)?)\)/i;
3
+ export function isMeaningful(content, minimumLength = 100) {
4
+ return typeof content === 'string' && content.length >= minimumLength;
5
+ }
6
+ export function getImageUrl(content) {
7
+ return IMAGE_LINK_PATTERN.exec(content)?.[1] ?? null;
8
+ }
9
+ export function normalizeNewlines(text) {
10
+ return text?.replace(/\s*\n\s*/g, '\n').trim() ?? '';
11
+ }
12
+ export function truncateString(value, maximumLength) {
13
+ if (!Number.isInteger(maximumLength) || maximumLength < 0) {
14
+ throw new RangeError('maximumLength must be a non-negative integer');
15
+ }
16
+ if (value.length <= maximumLength) {
17
+ return value;
18
+ }
19
+ if (maximumLength <= OMITTED_MARKER.length) {
20
+ return OMITTED_MARKER.slice(0, maximumLength);
21
+ }
22
+ const available = maximumLength - OMITTED_MARKER.length;
23
+ const prefixLength = Math.ceil(available * 0.8);
24
+ const suffixLength = available - prefixLength;
25
+ return `${value.slice(0, prefixLength)}${OMITTED_MARKER}${suffixLength > 0 ? value.slice(-suffixLength) : ''}`;
26
+ }
27
+ export function getPromptForLog(prompt, snippetLength = 30) {
28
+ if (snippetLength === null || prompt.length <= 2 * snippetLength) {
29
+ return prompt;
30
+ }
31
+ return `${prompt.slice(0, snippetLength)} ... ${prompt.slice(-snippetLength)}`;
32
+ }
33
+ //# sourceMappingURL=content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.js","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,mBAAmB,CAAA;AAC1C,MAAM,kBAAkB,GAAG,iFAAiF,CAAA;AAE5G,MAAM,UAAU,YAAY,CAAC,OAAkC,EAAE,aAAa,GAAG,GAAG;IAClF,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,IAAI,aAAa,CAAA;AACvE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,OAAO,kBAAkB,CAAC,IAAI,CAAC,OAAO,CA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CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,QAAQ,MAAM,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,EAAE,CAAA;AAChF,CAAC"}
package/dist/csv.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export type CsvRow = Record<string, string>;
2
+ export interface CsvParseOptions {
3
+ commentPrefix?: string;
4
+ }
5
+ export interface CsvReadOptions extends CsvParseOptions {
6
+ encoding?: BufferEncoding;
7
+ }
8
+ export declare function parseCsvToDictList(csvText: string, options?: CsvParseOptions): CsvRow[];
9
+ export declare function readCsvToDictList(filePath: string, options?: CsvReadOptions): CsvRow[];
10
+ //# sourceMappingURL=csv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../src/csv.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE3C,MAAM,WAAW,eAAe;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,QAAQ,CAAC,EAAE,cAAc,CAAA;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,MAAM,EAAE,CAkB3F;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,MAAM,EAAE,CAG1F"}
package/dist/csv.js ADDED
@@ -0,0 +1,63 @@
1
+ import { readFileSync } from 'node:fs';
2
+ export function parseCsvToDictList(csvText, options = {}) {
3
+ const commentPrefix = options.commentPrefix ?? '#';
4
+ const records = parseCsvRecords(csvText)
5
+ .filter((record) => record.some((cell) => cell.length > 0))
6
+ .filter((record) => !record[0]?.trimStart().startsWith(commentPrefix));
7
+ const [headers, ...rows] = records;
8
+ if (!headers) {
9
+ return [];
10
+ }
11
+ return rows.map((row) => {
12
+ const item = {};
13
+ headers.forEach((header, index) => {
14
+ item[header] = row[index] ?? '';
15
+ });
16
+ return item;
17
+ });
18
+ }
19
+ export function readCsvToDictList(filePath, options = {}) {
20
+ const { encoding = 'utf-8', ...parseOptions } = options;
21
+ return parseCsvToDictList(readFileSync(filePath, encoding), parseOptions);
22
+ }
23
+ function parseCsvRecords(input) {
24
+ const rows = [];
25
+ let row = [];
26
+ let cell = '';
27
+ let inQuotes = false;
28
+ for (let index = 0; index < input.length; index += 1) {
29
+ const char = input[index];
30
+ const next = input[index + 1];
31
+ if (char === '"') {
32
+ if (inQuotes && next === '"') {
33
+ cell += '"';
34
+ index += 1;
35
+ }
36
+ else {
37
+ inQuotes = !inQuotes;
38
+ }
39
+ }
40
+ else if (char === ',' && !inQuotes) {
41
+ row.push(cell);
42
+ cell = '';
43
+ }
44
+ else if ((char === '\n' || char === '\r') && !inQuotes) {
45
+ if (char === '\r' && next === '\n') {
46
+ index += 1;
47
+ }
48
+ row.push(cell);
49
+ rows.push(row);
50
+ row = [];
51
+ cell = '';
52
+ }
53
+ else {
54
+ cell += char;
55
+ }
56
+ }
57
+ if (cell.length > 0 || row.length > 0) {
58
+ row.push(cell);
59
+ rows.push(row);
60
+ }
61
+ return rows;
62
+ }
63
+ //# sourceMappingURL=csv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csv.js","sourceRoot":"","sources":["../src/csv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAYtC,MAAM,UAAU,kBAAkB,CAAC,OAAe,EAAE,UAA2B,EAAE;IAC/E,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,GAAG,CAAA;IAClD,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC;SACrC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CA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,CAAC,CAAC,CAAA;QAE7B,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,IAAI,QAAQ,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;gBAC7B,IAAI,IAAI,GAAG,CAAA;gBACX,KAAK,IAAI,CAAC,CAAA;YACZ,CAAC;iBAAM,CAAC;gBACN,QAAQ,GAAG,CAAC,QAAQ,CAAA;YACtB,CAAC;QACH,CAAC;aAAM,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACd,IAAI,GAAG,EAAE,CAAA;QACX,CAAC;aAAM,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACzD,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBACnC,KAAK,IAAI,CAAC,CAAA;YACZ,CAAC;YACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACd,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACd,GAAG,GAAG,EAAE,CAAA;YACR,IAAI,GAAG,EAAE,CAAA;QACX,CAAC;aAAM,CAAC;YACN,IAAI,IAAI,IAAI,CAAA;QACd,CAAC;IACH,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAChB,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type DeprecatedFunction<T extends (...args: unknown[]) => unknown> = T & {
2
+ deprecatedReason?: string;
3
+ };
4
+ export declare function deprecated(reason: string): <T extends (...args: unknown[]) => unknown>(fn: T) => DeprecatedFunction<T>;
5
+ //# sourceMappingURL=deprecatied.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecatied.d.ts","sourceRoot":"","sources":["../src/deprecatied.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,IAAI,CAAC,GAAG;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,IACR,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EACtE,IAAI,CAAC,KACJ,kBAAkB,CAAC,CAAC,CAAC,CAkBzB"}
@@ -0,0 +1,18 @@
1
+ export function deprecated(reason) {
2
+ return function wrapDeprecated(fn) {
3
+ const wrapped = function deprecatedWrapper(...args) {
4
+ const message = `${fn.name || 'anonymous'}() is deprecated: ${reason}`;
5
+ if (typeof process !== 'undefined' && typeof process.emitWarning === 'function') {
6
+ process.emitWarning(message, 'DeprecationWarning');
7
+ }
8
+ else {
9
+ console.warn(message);
10
+ }
11
+ return fn.apply(this, args);
12
+ };
13
+ Object.defineProperty(wrapped, 'name', { value: fn.name, configurable: true });
14
+ wrapped.deprecatedReason = reason;
15
+ return wrapped;
16
+ };
17
+ }
18
+ //# sourceMappingURL=deprecatied.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecatied.js","sourceRoot":"","sources":["../src/deprecatied.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO,SAAS,cAAc,CAC5B,EAAK;QAEL,MAAM,OAAO,GAAG,SAAS,iBAAiB,CAExC,GAAG,IAAmB;YAEtB,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,WAAW,qBAAqB,MAAM,EAAE,CAAA;YACtE,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;gBAChF,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAA;YACpD,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YACvB,CAAC;YACD,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAkB,CAAA;QAC9C,CAA0B,CAAA;QAE1B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAA;QAC9E,OAAO,CAAC,gBAAgB,GAAG,MAAM,CAAA;QACjC,OAAO,OAAO,CAAA;IAChB,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,106 @@
1
+ export declare class EdsError extends Error {
2
+ readonly exceptionName: string;
3
+ readonly exceptionMessage: string;
4
+ constructor(message?: string);
5
+ toString(): string;
6
+ }
7
+ export declare class InsufficientBalanceError extends EdsError {
8
+ readonly balance: number;
9
+ constructor(username: string, balance: number);
10
+ }
11
+ export declare class ConfigItemValueError extends EdsError {
12
+ constructor(configItem: string, configValue: string);
13
+ }
14
+ export declare class InvalidConfigError extends EdsError {
15
+ constructor(config: string, reason: string, configLocation?: string | null);
16
+ }
17
+ export declare class UnknownParameterError extends EdsError {
18
+ constructor(parameterName: string);
19
+ }
20
+ export declare class MissingParametersError extends EdsError {
21
+ constructor(missingParameter: string);
22
+ }
23
+ export declare class ParametersValidationError extends EdsError {
24
+ constructor(errorMessages: readonly string[]);
25
+ }
26
+ export declare class InvalidStatusError extends EdsError {
27
+ constructor(entity: string, expected: string, actual: string);
28
+ }
29
+ export declare class InvalidValueError extends EdsError {
30
+ constructor(name: string, expected: string, actual: string);
31
+ }
32
+ export declare class ExpectedFailureError extends EdsError {
33
+ constructor(failureDescription: string);
34
+ }
35
+ export declare class UnexpectedOperationFailureError extends EdsError {
36
+ constructor(operationDescription: string, error: string);
37
+ }
38
+ export declare class GitOperationError extends EdsError {
39
+ readonly action: string;
40
+ readonly code: number;
41
+ readonly stdout: string;
42
+ readonly stderr: string;
43
+ readonly hints: readonly string[];
44
+ constructor(action: string, code: number, stdout: string, stderr: string, hints?: readonly string[]);
45
+ }
46
+ export declare class ModuleLoadingError extends EdsError {
47
+ constructor(modulePath: string, errorMessage?: string);
48
+ }
49
+ export declare class EntityNotFoundError extends EdsError {
50
+ constructor(entityName: string, entityType: string);
51
+ }
52
+ export declare class EntityExistsError extends EdsError {
53
+ constructor(entityName: string, entityType: string);
54
+ }
55
+ export declare class EnvVarMissingError extends EdsError {
56
+ constructor(envVarName: string);
57
+ }
58
+ export declare class UnexpectedIOError extends EdsError {
59
+ constructor(operationDescription: string, error: unknown);
60
+ }
61
+ export declare class UnexpectedCaseError extends EdsError {
62
+ constructor(unexpectedCase: string);
63
+ }
64
+ export declare class UnrecoverableOperationError extends EdsError {
65
+ constructor(operationDescription: string, error: string);
66
+ }
67
+ export declare class EmptySearchResultError extends EdsError {
68
+ constructor(searchQuery: string);
69
+ }
70
+ export declare class UnexpectedNullValueError extends EdsError {
71
+ constructor(operationDescription: string, entity: string);
72
+ }
73
+ export declare class CaseNotSupportedError extends EdsError {
74
+ constructor(operation: string, unsupportedCase: string);
75
+ }
76
+ export declare class FileNotExistsError extends EdsError {
77
+ constructor(filePath: string, fileDescription?: string);
78
+ }
79
+ export declare class PathNotExistsError extends EdsError {
80
+ constructor(path: string);
81
+ }
82
+ export declare class PathTargetExistsError extends EdsError {
83
+ constructor(path: string);
84
+ }
85
+ export declare class CopyFileError extends EdsError {
86
+ constructor(errorMessage: string);
87
+ }
88
+ export declare class SerDeError extends EdsError {
89
+ constructor(errorMessage: string);
90
+ }
91
+ export declare class HttpRequestError extends EdsError {
92
+ constructor(method: string, url: string, params?: unknown, payload?: unknown, message?: string);
93
+ }
94
+ export declare class LoadYamlError extends EdsError {
95
+ constructor(name: string);
96
+ }
97
+ export declare class YamlFileContentError extends EdsError {
98
+ constructor(name: string);
99
+ }
100
+ export declare class JsonSchemaError extends EdsError {
101
+ constructor(errorMessage: string);
102
+ }
103
+ export declare class LlmInferenceResultError extends EdsError {
104
+ constructor(errorMessage: string);
105
+ }
106
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;gBAErB,OAAO,CAAC,EAAE,MAAM;IASnB,QAAQ,IAAI,MAAM;CAG5B;AAED,qBAAa,wBAAyB,SAAQ,QAAQ;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM;gBAA1C,QAAQ,EAAE,MAAM,EAAW,OAAO,EAAE,MAAM;CAGvD;AAED,qBAAa,oBAAqB,SAAQ,QAAQ;gBACpC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;CAGpD;AAED,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;CAI3E;AAED,qBAAa,qBAAsB,SAAQ,QAAQ;gBACrC,aAAa,EAAE,MAAM;CAGlC;AAED,qBAAa,sBAAuB,SAAQ,QAAQ;gBACtC,gBAAgB,EAAE,MAAM;CAGrC;AAED,qBAAa,yBAA0B,SAAQ,QAAQ;gBACzC,aAAa,EAAE,SAAS,MAAM,EAAE;CAG7C;AAED,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAG7D;AAED,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,IAAI,EAAE,MAAM,EAAE,QAAQ,EA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