dbgate-tools
Advanced tools
Comparing version 5.5.4-alpha.8 to 5.5.4
@@ -34,1 +34,2 @@ import { DataEditorTypesBehaviour } from 'dbgate-types'; | ||
}; | ||
export declare function safeFormatDate(date: any): any; |
@@ -6,5 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.extractErrorLogData = exports.extractErrorStackTrace = exports.extractErrorMessage = exports.getConvertValueMenu = exports.detectTypeIcon = exports.detectCellDataType = exports.parseSqlDefaultValue = exports.getAsImageSrc = exports.arrayBufferToBase64 = exports.isWktGeometry = exports.getIconForRedisType = exports.isJsonLikeLongString = exports.shouldOpenMultilineDialog = exports.safeJsonParse = exports.stringifyCellValue = exports.parseCellValue = exports.hexStringToArray = exports.arrayToHexString = void 0; | ||
exports.safeFormatDate = exports.extractErrorLogData = exports.extractErrorStackTrace = exports.extractErrorMessage = exports.getConvertValueMenu = exports.detectTypeIcon = exports.detectCellDataType = exports.parseSqlDefaultValue = exports.getAsImageSrc = exports.arrayBufferToBase64 = exports.isWktGeometry = exports.getIconForRedisType = exports.isJsonLikeLongString = exports.shouldOpenMultilineDialog = exports.safeJsonParse = exports.stringifyCellValue = exports.parseCellValue = exports.hexStringToArray = exports.arrayToHexString = void 0; | ||
const isString_1 = __importDefault(require("lodash/isString")); | ||
const isArray_1 = __importDefault(require("lodash/isArray")); | ||
const isDate_1 = __importDefault(require("lodash/isDate")); | ||
const isNumber_1 = __importDefault(require("lodash/isNumber")); | ||
@@ -183,8 +184,9 @@ const isPlainObject_1 = __importDefault(require("lodash/isPlainObject")); | ||
if (value === null || value === void 0 ? void 0 : value.$date) { | ||
const dateString = (0, isDate_1.default)(value.$date) ? value.$date.toISOString() : value.$date.toString(); | ||
switch (intent) { | ||
case 'exportIntent': | ||
case 'stringConversionIntent': | ||
return { value: value.$date }; | ||
return { value: dateString }; | ||
default: | ||
const m = value.$date.match(dateTimeStorageRegex); | ||
const m = dateString.match(dateTimeStorageRegex); | ||
if (m) { | ||
@@ -194,3 +196,3 @@ return { value: `${m[1]}-${m[2]}-${m[3]} ${m[4]}:${m[5]}:${m[6]}`, gridStyle: 'valueCellStyle' }; | ||
else { | ||
return { value: value.$date.replaCE('T', ' '), gridStyle: 'valueCellStyle' }; | ||
return { value: dateString.replace('T', ' '), gridStyle: 'valueCellStyle' }; | ||
} | ||
@@ -483,1 +485,11 @@ } | ||
exports.extractErrorLogData = extractErrorLogData; | ||
function safeFormatDate(date) { | ||
try { | ||
const v = new Date(date); | ||
return v.toISOString().substring(0, 10); | ||
} | ||
catch (e) { | ||
return date === null || date === void 0 ? void 0 : date.toString(); | ||
} | ||
} | ||
exports.safeFormatDate = safeFormatDate; |
{ | ||
"version": "5.5.4-alpha.8", | ||
"version": "5.5.4", | ||
"name": "dbgate-tools", | ||
@@ -28,3 +28,3 @@ "main": "lib/index.js", | ||
"@types/node": "^13.7.0", | ||
"dbgate-types": "^5.5.4-alpha.8", | ||
"dbgate-types": "^5.5.4", | ||
"jest": "^24.9.0", | ||
@@ -36,3 +36,3 @@ "ts-jest": "^25.2.1", | ||
"dbgate-query-splitter": "^4.10.5", | ||
"dbgate-sqltree": "^5.5.4-alpha.8", | ||
"dbgate-sqltree": "^5.5.4", | ||
"debug": "^4.3.4", | ||
@@ -39,0 +39,0 @@ "json-stable-stringify": "^1.0.1", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
232013
5409
0
Updateddbgate-sqltree@^5.5.4