doc2vec 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/doc2vec.js +1 -1
- package/doc2vec.ts +1 -1
- package/package.json +1 -1
- package/Dockerfile.old +0 -19
- package/config copy.yaml +0 -182
- package/config-github.yaml +0 -15
- package/config.yaml.new +0 -253
- package/config.yaml.ok +0 -164
- package/config.yaml.solo +0 -251
- package/dist/solo-reference-architectures/Gloo_Edge/ALB_Last_Mile_Encryption/data/acm-waf-cdk/lib/acm-cdk-stack.js +0 -20
- package/dist/solo-reference-architectures/Gloo_Edge/ALB_Last_Mile_Encryption/data/acm-waf-cdk/lib/route53-cdk-stack.js +0 -33
- package/dist/solo-reference-architectures/Gloo_Edge/ALB_Last_Mile_Encryption/data/acm-waf-cdk/lib/waf-cdk-stack.js +0 -66
- package/dist/solo-reference-architectures/Gloo_Edge/ALB_Last_Mile_Encryption/data/acm-waf-cdk/test/s3-cloudfront-cdk.test.js +0 -16
- package/dist/solo-reference-architectures/Gloo_Edge/Cloudfront_NLB/data/s3-cloudfront-cdk/lib/acm-cdk-stack.js +0 -21
- package/dist/solo-reference-architectures/Gloo_Edge/Cloudfront_NLB/data/s3-cloudfront-cdk/lib/s3-cloudfront-cdk-stack.js +0 -95
- package/dist/solo-reference-architectures/Gloo_Edge/Cloudfront_NLB/data/s3-cloudfront-cdk/test/s3-cloudfront-cdk.test.js +0 -16
- package/dist/solo-reference-architectures/Gloo_Gateway/aws-nlb-tls-offloading/data/acm-cdk/bin/acm-cdk.js +0 -55
- package/dist/solo-reference-architectures/Gloo_Gateway/aws-nlb-tls-offloading/data/acm-cdk/lib/acm-cdk-stack.js +0 -20
- package/dist/solo-reference-architectures/Gloo_Gateway/aws-nlb-tls-offloading/data/acm-cdk/lib/route53-cdk-stack.js +0 -33
- package/dist/solo-reference-architectures/Gloo_Gateway/aws-nlb-tls-offloading/data/acm-cdk/test/s3-cloudfront-cdk.test.js +0 -16
- package/doc2vec.js +0 -1805
- package/doc2vec.ts.new +0 -1583
- package/doc2vec.ts.ok +0 -1730
- package/istio-issues.db +0 -0
- package/logger.js +0 -260
- package/tmp/README.md.old +0 -1
- package/tmp.db +0 -0
package/istio-issues.db
DELETED
|
Binary file
|
package/logger.js
DELETED
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Enhanced Logger for structured and consistent logging
|
|
4
|
-
* Compatible with CommonJS and ESM environments
|
|
5
|
-
*/
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.defaultLogger = exports.LogLevel = exports.Logger = void 0;
|
|
19
|
-
/**
|
|
20
|
-
* Logger levels with their corresponding numeric values
|
|
21
|
-
*/
|
|
22
|
-
var LogLevel;
|
|
23
|
-
(function (LogLevel) {
|
|
24
|
-
LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG";
|
|
25
|
-
LogLevel[LogLevel["INFO"] = 1] = "INFO";
|
|
26
|
-
LogLevel[LogLevel["WARN"] = 2] = "WARN";
|
|
27
|
-
LogLevel[LogLevel["ERROR"] = 3] = "ERROR";
|
|
28
|
-
LogLevel[LogLevel["NONE"] = 100] = "NONE";
|
|
29
|
-
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
30
|
-
/**
|
|
31
|
-
* Basic color functions that don't rely on external packages
|
|
32
|
-
*/
|
|
33
|
-
var colors = {
|
|
34
|
-
gray: function (text) { return "\u001B[90m".concat(text, "\u001B[0m"); },
|
|
35
|
-
blue: function (text) { return "\u001B[34m".concat(text, "\u001B[0m"); },
|
|
36
|
-
yellow: function (text) { return "\u001B[33m".concat(text, "\u001B[0m"); },
|
|
37
|
-
red: function (text) { return "\u001B[31m".concat(text, "\u001B[0m"); },
|
|
38
|
-
green: function (text) { return "\u001B[32m".concat(text, "\u001B[0m"); },
|
|
39
|
-
reset: function (text) { return "\u001B[0m".concat(text, "\u001B[0m"); }
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Enhanced Logger class with color-coding, timestamp, and formatting
|
|
43
|
-
*/
|
|
44
|
-
var Logger = /** @class */ (function () {
|
|
45
|
-
/**
|
|
46
|
-
* Create a new Logger instance
|
|
47
|
-
*
|
|
48
|
-
* @param moduleName Name of the module using this logger
|
|
49
|
-
* @param config Logger configuration options
|
|
50
|
-
*/
|
|
51
|
-
function Logger(moduleName, config) {
|
|
52
|
-
this.moduleName = moduleName;
|
|
53
|
-
this.config = __assign({ level: LogLevel.INFO, useTimestamp: true, useColor: true, prettyPrint: true }, config);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Format a log message with timestamp, level, and module information
|
|
57
|
-
*
|
|
58
|
-
* @param level Log level for this message
|
|
59
|
-
* @param message The message to log
|
|
60
|
-
* @param args Additional arguments to include
|
|
61
|
-
* @returns Formatted log message
|
|
62
|
-
*/
|
|
63
|
-
Logger.prototype.formatMessage = function (level, message, args) {
|
|
64
|
-
if (args === void 0) { args = []; }
|
|
65
|
-
var timestamp = this.config.useTimestamp ?
|
|
66
|
-
"[".concat(new Date().toISOString(), "] ") : '';
|
|
67
|
-
var modulePrefix = this.moduleName ?
|
|
68
|
-
"[".concat(this.moduleName, "] ") : '';
|
|
69
|
-
var levelFormatted = "[".concat(level.padEnd(5), "]");
|
|
70
|
-
var formattedMessage = "".concat(timestamp).concat(levelFormatted, " ").concat(modulePrefix).concat(message);
|
|
71
|
-
if (args.length > 0) {
|
|
72
|
-
if (this.config.prettyPrint) {
|
|
73
|
-
return "".concat(formattedMessage, "\n").concat(args.map(function (arg) {
|
|
74
|
-
return typeof arg === 'object' ? JSON.stringify(arg, null, 2) : arg;
|
|
75
|
-
}).join('\n'));
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
return "".concat(formattedMessage, " ").concat(args.map(function (arg) {
|
|
79
|
-
return typeof arg === 'object' ? JSON.stringify(arg) : arg;
|
|
80
|
-
}).join(' '));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return formattedMessage;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Apply color to a message based on log level
|
|
87
|
-
*
|
|
88
|
-
* @param level Log level
|
|
89
|
-
* @param message Message to color
|
|
90
|
-
* @returns Colored message
|
|
91
|
-
*/
|
|
92
|
-
Logger.prototype.colorize = function (level, message) {
|
|
93
|
-
if (!this.config.useColor)
|
|
94
|
-
return message;
|
|
95
|
-
switch (level) {
|
|
96
|
-
case LogLevel.DEBUG:
|
|
97
|
-
return colors.gray(message);
|
|
98
|
-
case LogLevel.INFO:
|
|
99
|
-
return colors.blue(message);
|
|
100
|
-
case LogLevel.WARN:
|
|
101
|
-
return colors.yellow(message);
|
|
102
|
-
case LogLevel.ERROR:
|
|
103
|
-
return colors.red(message);
|
|
104
|
-
default:
|
|
105
|
-
return message;
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* Log a debug message
|
|
110
|
-
*
|
|
111
|
-
* @param message Message to log
|
|
112
|
-
* @param args Additional arguments
|
|
113
|
-
*/
|
|
114
|
-
Logger.prototype.debug = function (message) {
|
|
115
|
-
var args = [];
|
|
116
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
117
|
-
args[_i - 1] = arguments[_i];
|
|
118
|
-
}
|
|
119
|
-
if (this.config.level <= LogLevel.DEBUG) {
|
|
120
|
-
var formattedMessage = this.formatMessage('DEBUG', message, args);
|
|
121
|
-
console.log(this.colorize(LogLevel.DEBUG, formattedMessage));
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Log an info message
|
|
126
|
-
*
|
|
127
|
-
* @param message Message to log
|
|
128
|
-
* @param args Additional arguments
|
|
129
|
-
*/
|
|
130
|
-
Logger.prototype.info = function (message) {
|
|
131
|
-
var args = [];
|
|
132
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
133
|
-
args[_i - 1] = arguments[_i];
|
|
134
|
-
}
|
|
135
|
-
if (this.config.level <= LogLevel.INFO) {
|
|
136
|
-
var formattedMessage = this.formatMessage('INFO', message, args);
|
|
137
|
-
console.log(this.colorize(LogLevel.INFO, formattedMessage));
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
/**
|
|
141
|
-
* Log a warning message
|
|
142
|
-
*
|
|
143
|
-
* @param message Message to log
|
|
144
|
-
* @param args Additional arguments
|
|
145
|
-
*/
|
|
146
|
-
Logger.prototype.warn = function (message) {
|
|
147
|
-
var args = [];
|
|
148
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
149
|
-
args[_i - 1] = arguments[_i];
|
|
150
|
-
}
|
|
151
|
-
if (this.config.level <= LogLevel.WARN) {
|
|
152
|
-
var formattedMessage = this.formatMessage('WARN', message, args);
|
|
153
|
-
console.warn(this.colorize(LogLevel.WARN, formattedMessage));
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* Log an error message
|
|
158
|
-
*
|
|
159
|
-
* @param message Message to log
|
|
160
|
-
* @param args Additional arguments
|
|
161
|
-
*/
|
|
162
|
-
Logger.prototype.error = function (message) {
|
|
163
|
-
var args = [];
|
|
164
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
165
|
-
args[_i - 1] = arguments[_i];
|
|
166
|
-
}
|
|
167
|
-
if (this.config.level <= LogLevel.ERROR) {
|
|
168
|
-
var formattedMessage = this.formatMessage('ERROR', message, args);
|
|
169
|
-
console.error(this.colorize(LogLevel.ERROR, formattedMessage));
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
/**
|
|
173
|
-
* Create a child logger with a more specific module name
|
|
174
|
-
*
|
|
175
|
-
* @param subModule Name of the sub-module
|
|
176
|
-
* @returns New logger instance
|
|
177
|
-
*/
|
|
178
|
-
Logger.prototype.child = function (subModule) {
|
|
179
|
-
return new Logger("".concat(this.moduleName, ":").concat(subModule), this.config);
|
|
180
|
-
};
|
|
181
|
-
/**
|
|
182
|
-
* Format a section header to clearly separate logical parts of execution
|
|
183
|
-
*
|
|
184
|
-
* @param title Section title
|
|
185
|
-
* @returns Logger instance for chaining
|
|
186
|
-
*/
|
|
187
|
-
Logger.prototype.section = function (title) {
|
|
188
|
-
if (this.config.level <= LogLevel.INFO) {
|
|
189
|
-
var separator = '='.repeat(Math.max(80 - title.length - 4, 10));
|
|
190
|
-
var message = "".concat(separator, " ").concat(title, " ").concat(separator);
|
|
191
|
-
console.log(this.colorize(LogLevel.INFO, message));
|
|
192
|
-
}
|
|
193
|
-
return this;
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* Create a progress indicator
|
|
197
|
-
*
|
|
198
|
-
* @param title Title of the operation
|
|
199
|
-
* @param total Total number of items to process
|
|
200
|
-
* @returns Object with update and complete methods
|
|
201
|
-
*/
|
|
202
|
-
Logger.prototype.progress = function (title, total) {
|
|
203
|
-
var _this = this;
|
|
204
|
-
var current = 0;
|
|
205
|
-
var startTime = Date.now();
|
|
206
|
-
var update = function (increment, message) {
|
|
207
|
-
if (increment === void 0) { increment = 1; }
|
|
208
|
-
if (_this.config.level > LogLevel.INFO)
|
|
209
|
-
return;
|
|
210
|
-
current += increment;
|
|
211
|
-
var percentage = Math.min(Math.floor((current / total) * 100), 100);
|
|
212
|
-
var elapsed = (Date.now() - startTime) / 1000;
|
|
213
|
-
var rate = current / elapsed;
|
|
214
|
-
var timeRemaining = '';
|
|
215
|
-
if (rate > 0 && current < total) {
|
|
216
|
-
var remainingSecs = (total - current) / rate;
|
|
217
|
-
timeRemaining = ", ETA: ".concat(Math.floor(remainingSecs / 60), "m ").concat(Math.floor(remainingSecs % 60), "s");
|
|
218
|
-
}
|
|
219
|
-
var progressBar = _this.createProgressBar(percentage);
|
|
220
|
-
var statusMsg = message ? " - ".concat(message) : '';
|
|
221
|
-
console.log(_this.colorize(LogLevel.INFO, _this.formatMessage('INFO', "".concat(title, ": ").concat(progressBar, " ").concat(percentage, "% (").concat(current, "/").concat(total).concat(timeRemaining, ")").concat(statusMsg))));
|
|
222
|
-
};
|
|
223
|
-
var complete = function (message) {
|
|
224
|
-
if (message === void 0) { message = 'Completed'; }
|
|
225
|
-
if (_this.config.level > LogLevel.INFO)
|
|
226
|
-
return;
|
|
227
|
-
var elapsed = (Date.now() - startTime) / 1000;
|
|
228
|
-
var rate = total / elapsed;
|
|
229
|
-
console.log(_this.colorize(LogLevel.INFO, _this.formatMessage('INFO', "".concat(title, ": ").concat(_this.createProgressBar(100), " 100% (").concat(total, "/").concat(total, ") - ").concat(message, " in ").concat(elapsed.toFixed(2), "s (").concat(rate.toFixed(2), " items/sec)"))));
|
|
230
|
-
};
|
|
231
|
-
return { update: update, complete: complete };
|
|
232
|
-
};
|
|
233
|
-
/**
|
|
234
|
-
* Create a visual progress bar
|
|
235
|
-
*
|
|
236
|
-
* @param percentage Completion percentage
|
|
237
|
-
* @returns Visual progress bar
|
|
238
|
-
*/
|
|
239
|
-
Logger.prototype.createProgressBar = function (percentage) {
|
|
240
|
-
var width = 20;
|
|
241
|
-
var completeChars = Math.floor((percentage / 100) * width);
|
|
242
|
-
var incompleteChars = width - completeChars;
|
|
243
|
-
var bar = '[';
|
|
244
|
-
if (this.config.useColor) {
|
|
245
|
-
bar += colors.green('='.repeat(completeChars));
|
|
246
|
-
bar += ' '.repeat(incompleteChars);
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
bar += '='.repeat(completeChars);
|
|
250
|
-
bar += ' '.repeat(incompleteChars);
|
|
251
|
-
}
|
|
252
|
-
bar += ']';
|
|
253
|
-
return bar;
|
|
254
|
-
};
|
|
255
|
-
return Logger;
|
|
256
|
-
}());
|
|
257
|
-
exports.Logger = Logger;
|
|
258
|
-
// Create a default logger instance
|
|
259
|
-
var defaultLogger = new Logger('app');
|
|
260
|
-
exports.defaultLogger = defaultLogger;
|
package/tmp/README.md.old
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
test
|
package/tmp.db
DELETED
|
Binary file
|