Update dependencies

This commit is contained in:
eight 2019-09-30 15:56:22 +08:00
parent f16ba4c401
commit 61bdb20203
12 changed files with 135 additions and 45 deletions

View File

@ -8,7 +8,7 @@
"devDependencies": {
"archiver": "^3.1.1",
"codemirror": "^5.48.4",
"db-to-cloud": "^0.1.0",
"db-to-cloud": "^0.2.0",
"dropbox": "^4.0.30",
"endent": "^1.3.0",
"eslint": "^6.3.0",

View File

@ -1,3 +1,3 @@
## CodeMirror v5.48.0
## CodeMirror v5.48.4
Only files & folders that exist in the `vendor/codemirror` folder are copied from the `node_modules/codemirror` folder. Except all theme files are copied, in case new themes have been added.

View File

@ -51,8 +51,13 @@
function isFolded(cm, line) {
var marks = cm.findMarks(Pos(line, 0), Pos(line + 1, 0));
for (var i = 0; i < marks.length; ++i)
if (marks[i].__isFold && marks[i].find().from.line == line) return marks[i];
for (var i = 0; i < marks.length; ++i) {
if (marks[i].__isFold) {
var fromPos = marks[i].find(-1);
if (fromPos && fromPos.line === line)
return marks[i];
}
}
}
function marker(spec) {
@ -100,7 +105,7 @@
if (gutter != opts.gutter) return;
var folded = isFolded(cm, line);
if (folded) folded.clear();
else cm.foldCode(Pos(line, 0), opts.rangeFinder);
else cm.foldCode(Pos(line, 0), opts);
}
function onChange(cm) {

View File

@ -4073,7 +4073,7 @@
}
// Unescape \ and / in the replace part, for PCRE mode.
var unescapes = {'\\/': '/', '\\\\': '\\', '\\n': '\n', '\\r': '\r', '\\t': '\t'};
var unescapes = {'\\/': '/', '\\\\': '\\', '\\n': '\n', '\\r': '\r', '\\t': '\t', '\\&':'&'};
function unescapeRegexReplace(str) {
var stream = new CodeMirror.StringStream(str);
var output = [];
@ -4861,6 +4861,9 @@
var global = false; // True to replace all instances on a line, false to replace only 1.
if (tokens.length) {
regexPart = tokens[0];
if (getOption('pcre') && regexPart !== '') {
regexPart = new RegExp(regexPart).source; //normalize not escaped characters
}
replacePart = tokens[1];
if (regexPart && regexPart[regexPart.length - 1] === '$') {
regexPart = regexPart.slice(0, regexPart.length - 1) + '\\n';
@ -4868,7 +4871,7 @@
}
if (replacePart !== undefined) {
if (getOption('pcre')) {
replacePart = unescapeRegexReplace(replacePart);
replacePart = unescapeRegexReplace(replacePart.replace(/([^\\])&/g,"$1$$&"));
} else {
replacePart = translateRegexReplace(replacePart);
}
@ -4899,7 +4902,11 @@
global = true;
flagsPart.replace('g', '');
}
regexPart = regexPart.replace(/\//g, "\\/") + '/' + flagsPart;
if (getOption('pcre')) {
regexPart = regexPart + '/' + flagsPart;
} else {
regexPart = regexPart.replace(/\//g, "\\/") + '/' + flagsPart;
}
}
}
if (regexPart) {

View File

@ -13,7 +13,8 @@
.CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
padding: 0 4px; /* Horizontal padding of content */
}
@ -96,7 +97,7 @@
.CodeMirror-rulers {
position: absolute;
left: 0; right: 0; top: -50px; bottom: -20px;
left: 0; right: 0; top: -50px; bottom: 0;
overflow: hidden;
}
.CodeMirror-ruler {
@ -236,7 +237,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
}
.CodeMirror pre {
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0;
@ -255,7 +257,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
-webkit-font-variant-ligatures: contextual;
font-variant-ligatures: contextual;
}
.CodeMirror-wrap pre {
.CodeMirror-wrap pre.CodeMirror-line,
.CodeMirror-wrap pre.CodeMirror-line-like {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;

View File

@ -2284,7 +2284,7 @@
function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}
function paddingH(display) {
if (display.cachedPaddingH) { return display.cachedPaddingH }
var e = removeChildrenAndAdd(display.measure, elt("pre", "x"));
var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like"));
var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }
@ -2678,7 +2678,7 @@
function PosWithInfo(line, ch, sticky, outside, xRel) {
var pos = Pos(line, ch, sticky);
pos.xRel = xRel;
if (outside) { pos.outside = true; }
if (outside) { pos.outside = outside; }
return pos
}
@ -2687,16 +2687,16 @@
function coordsChar(cm, x, y) {
var doc = cm.doc;
y += cm.display.viewOffset;
if (y < 0) { return PosWithInfo(doc.first, 0, null, true, -1) }
if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }
var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
if (lineN > last)
{ return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, true, 1) }
{ return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }
if (x < 0) { x = 0; }
var lineObj = getLine(doc, lineN);
for (;;) {
var found = coordsCharInner(cm, lineObj, lineN, x, y);
var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 ? 1 : 0));
var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));
if (!collapsed) { return found }
var rangeEnd = collapsed.find(1);
if (rangeEnd.line == lineN) { return rangeEnd }
@ -2784,7 +2784,7 @@
// base X position
var coords = cursorCoords(cm, Pos(lineNo$$1, ch, sticky), "line", lineObj, preparedMeasure);
baseX = coords.left;
outside = y < coords.top || y >= coords.bottom;
outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;
}
ch = skipExtendingChars(lineObj.text, ch, 1);
@ -2853,7 +2853,7 @@
function textHeight(display) {
if (display.cachedTextHeight != null) { return display.cachedTextHeight }
if (measureText == null) {
measureText = elt("pre");
measureText = elt("pre", null, "CodeMirror-line-like");
// Measure a bunch of lines, for browsers that compute
// fractional heights.
for (var i = 0; i < 49; ++i) {
@ -2873,7 +2873,7 @@
function charWidth(display) {
if (display.cachedCharWidth != null) { return display.cachedCharWidth }
var anchor = elt("span", "xxxxxxxxxx");
var pre = elt("pre", [anchor]);
var pre = elt("pre", [anchor], "CodeMirror-line-like");
removeChildrenAndAdd(display.measure, pre);
var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;
if (width > 2) { display.cachedCharWidth = width; }
@ -5403,6 +5403,9 @@
if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }
else { updateDoc(doc, change, spans); }
setSelectionNoUndo(doc, selAfter, sel_dontScroll);
if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))
{ doc.cantEdit = false; }
}
// Handle the interaction of a change to a document with the editor
@ -9755,7 +9758,7 @@
addLegacyProps(CodeMirror);
CodeMirror.version = "5.48.0";
CodeMirror.version = "5.48.4";
return CodeMirror;

View File

@ -67,7 +67,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if (ch == '"' || ch == "'") {
state.tokenize = tokenString(ch);
return state.tokenize(stream, state);
} else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
} else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) {
return ret("number", "number");
} else if (ch == "." && stream.match("..")) {
return ret("spread", "meta");
@ -75,10 +75,10 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
return ret(ch);
} else if (ch == "=" && stream.eat(">")) {
return ret("=>", "operator");
} else if (ch == "0" && stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)) {
} else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {
return ret("number", "number");
} else if (/\d/.test(ch)) {
stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);
stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/);
return ret("number", "number");
} else if (ch == "/") {
if (stream.eat("*")) {
@ -195,8 +195,12 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
++depth;
} else if (wordRE.test(ch)) {
sawSomething = true;
} else if (/["'\/]/.test(ch)) {
return;
} else if (/["'\/`]/.test(ch)) {
for (;; --pos) {
if (pos == 0) return
var next = stream.string.charAt(pos - 1)
if (next == ch && stream.string.charAt(pos - 2) != "\\") { pos--; break }
}
} else if (sawSomething && !depth) {
++pos;
break;
@ -525,7 +529,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
cx.marked = "keyword"
return cont(objprop)
} else if (type == "[") {
return cont(expression, maybetypeOrIn, expect("]"), afterprop);
return cont(expression, maybetype, expect("]"), afterprop);
} else if (type == "spread") {
return cont(expressionNoComma, afterprop);
} else if (value == "*") {
@ -621,7 +625,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
} else if (type == ":") {
return cont(typeexpr)
} else if (type == "[") {
return cont(expect("variable"), maybetype, expect("]"), typeprop)
return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop)
} else if (type == "(") {
return pass(functiondecl, typeprop)
}

View File

@ -24,8 +24,8 @@
.cm-s-yonce .CodeMirror-activeline .CodeMirror-linenumber.CodeMirror-gutter-elt { background: #1C1C1C; color: #fc4384; }
.cm-s-yonce .CodeMirror-linenumber { color: #777; }
.cm-s-yonce .CodeMirror-cursor { border-left: 2px solid #FC4384; }
.cm-s-yonce .cm-searching { background: rgb(243, 155, 53, .3) !important; outline: 1px solid #F39B35; }
.cm-s-yonce .cm-searching.CodeMirror-selectedtext { background: rgb(243, 155, 53, .7) !important; color: white; }
.cm-s-yonce .cm-searching { background: rgba(243, 155, 53, .3) !important; outline: 1px solid #F39B35; }
.cm-s-yonce .cm-searching.CodeMirror-selectedtext { background: rgba(243, 155, 53, .7) !important; color: white; }
.cm-s-yonce .cm-keyword { color: #00A7AA; } /**/
.cm-s-yonce .cm-atom { color: #F39B35; }

View File

@ -1,9 +1,9 @@
## db-to-cloud v0.1.0
## db-to-cloud v0.2.0
Installed via npm - source code:
https://github.com/eight04/db-to-cloud/tree/v0.1.0
https://github.com/eight04/db-to-cloud/tree/v0.2.0
Bundled code:
https://unpkg.com/db-to-cloud@0.1.0/dist/db-to-cloud.min.js
https://unpkg.com/db-to-cloud@0.2.0/dist/db-to-cloud.min.js

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
## Dropbox SDK v4.0.28
## Dropbox SDK v4.0.30
Dropbox SDK JS installed via npm - source repo:
https://github.com/dropbox/dropbox-sdk-js/tree/v4.0.28
https://github.com/dropbox/dropbox-sdk-js/tree/v4.0.30
The source repo **does not** include the `dist` folder with the generated `dropbox-sdk.js`
distribution file. It can only be obtained from the npm `node_modules` folder after installing

View File

@ -236,6 +236,17 @@ routes.filePropertiesTemplatesUpdateForUser = function (arg) {
return this.request('file_properties/templates/update_for_user', arg, 'user', 'api', 'rpc');
};
/**
* Returns the total number of file requests owned by this user. Includes both
* open and closed file requests.
* @function Dropbox#fileRequestsCount
* @arg {void} arg - The request parameters.
* @returns {Promise.<FileRequestsCountFileRequestsResult, Error.<FileRequestsCountFileRequestsError>>}
*/
routes.fileRequestsCount = function (arg) {
return this.request('file_requests/count', arg, 'user', 'api', 'rpc');
};
/**
* Creates a file request for this user.
* @function Dropbox#fileRequestsCreate
@ -246,6 +257,26 @@ routes.fileRequestsCreate = function (arg) {
return this.request('file_requests/create', arg, 'user', 'api', 'rpc');
};
/**
* Delete a batch of closed file requests.
* @function Dropbox#fileRequestsDelete
* @arg {FileRequestsDeleteFileRequestArgs} arg - The request parameters.
* @returns {Promise.<FileRequestsDeleteFileRequestsResult, Error.<FileRequestsDeleteFileRequestError>>}
*/
routes.fileRequestsDelete = function (arg) {
return this.request('file_requests/delete', arg, 'user', 'api', 'rpc');
};
/**
* Delete all closed file requests owned by this user.
* @function Dropbox#fileRequestsDeleteAllClosed
* @arg {void} arg - The request parameters.
* @returns {Promise.<FileRequestsDeleteAllClosedFileRequestsResult, Error.<FileRequestsDeleteAllClosedFileRequestsError>>}
*/
routes.fileRequestsDeleteAllClosed = function (arg) {
return this.request('file_requests/delete_all_closed', arg, 'user', 'api', 'rpc');
};
/**
* Returns the specified file request.
* @function Dropbox#fileRequestsGet
@ -256,6 +287,18 @@ routes.fileRequestsGet = function (arg) {
return this.request('file_requests/get', arg, 'user', 'api', 'rpc');
};
/**
* Returns a list of file requests owned by this user. For apps with the app
* folder permission, this will only return file requests with destinations in
* the app folder.
* @function Dropbox#fileRequestsListV2
* @arg {FileRequestsListFileRequestsArg} arg - The request parameters.
* @returns {Promise.<FileRequestsListFileRequestsV2Result, Error.<FileRequestsListFileRequestsError>>}
*/
routes.fileRequestsListV2 = function (arg) {
return this.request('file_requests/list_v2', arg, 'user', 'api', 'rpc');
};
/**
* Returns a list of file requests owned by this user. For apps with the app
* folder permission, this will only return file requests with destinations in
@ -268,6 +311,18 @@ routes.fileRequestsList = function (arg) {
return this.request('file_requests/list', arg, 'user', 'api', 'rpc');
};
/**
* Once a cursor has been retrieved from list_v2, use this to paginate through
* all file requests. The cursor must come from a previous call to list_v2 or
* list/continue.
* @function Dropbox#fileRequestsListContinue
* @arg {FileRequestsListFileRequestsContinueArg} arg - The request parameters.
* @returns {Promise.<FileRequestsListFileRequestsV2Result, Error.<FileRequestsListFileRequestsContinueError>>}
*/
routes.fileRequestsListContinue = function (arg) {
return this.request('file_requests/list/continue', arg, 'user', 'api', 'rpc');
};
/**
* Update a file request.
* @function Dropbox#fileRequestsUpdate
@ -331,7 +386,7 @@ routes.filesCopy = function (arg) {
/**
* Copy multiple files or folders to different locations at once in the user's
* Dropbox. This route will replace copy_batch. The main difference is this
* route will return stutus for each entry, while copy_batch raises failure if
* route will return status for each entry, while copy_batch raises failure if
* any entry fails. This route will either finish synchronously, or return a job
* ID and do the async copy job in background. Please use copy_batch/check_v2 to
* check the job status.
@ -526,6 +581,18 @@ routes.filesDownloadZip = function (arg) {
return this.request('files/download_zip', arg, 'user', 'content', 'download');
};
/**
* Export a file from a user's Dropbox. This route only supports exporting files
* that cannot be downloaded directly and whose ExportResult.file_metadata has
* ExportInfo.export_as populated.
* @function Dropbox#filesExport
* @arg {FilesExportArg} arg - The request parameters.
* @returns {Promise.<FilesExportResult, Error.<FilesExportError>>}
*/
routes.filesExport = function (arg) {
return this.request('files/export', arg, 'user', 'content', 'download');
};
/**
* Returns the metadata for a file or folder. Note: Metadata for the root folder
* is unsupported.
@ -539,10 +606,11 @@ routes.filesGetMetadata = function (arg) {
/**
* Get a preview for a file. Currently, PDF previews are generated for files
* with the following extensions: .ai, .doc, .docm, .docx, .eps, .odp, .odt,
* .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for
* files with the following extensions: .csv, .ods, .xls, .xlsm, .xlsx. Other
* formats will return an unsupported extension error.
* with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc,
* .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML
* previews are generated for files with the following extensions: .csv, .ods,
* .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported
* extension error.
* @function Dropbox#filesGetPreview
* @arg {FilesPreviewArg} arg - The request parameters.
* @returns {Promise.<FilesFileMetadata, Error.<FilesPreviewError>>}
@ -553,8 +621,8 @@ routes.filesGetPreview = function (arg) {
/**
* Get a temporary link to stream content of a file. This link will expire in
* four hours and afterwards you will get 410 Gone. So this URL should not be
* used to display content directly in the browser. Content-Type of the link is
* four hours and afterwards you will get 410 Gone. This URL should not be used
* to display content directly in the browser. The Content-Type of the link is
* determined automatically by the file's mime type.
* @function Dropbox#filesGetTemporaryLink
* @arg {FilesGetTemporaryLinkArg} arg - The request parameters.
@ -736,8 +804,8 @@ routes.filesMove = function (arg) {
/**
* Move multiple files or folders to different locations at once in the user's
* Dropbox. This route will replace move_batch_v2. The main difference is this
* route will return stutus for each entry, while move_batch raises failure if
* Dropbox. This route will replace move_batch. The main difference is this
* route will return status for each entry, while move_batch raises failure if
* any entry fails. This route will either finish synchronously, or return a job
* ID and do the async move job in background. Please use move_batch/check_v2 to
* check the job status.