@xyne/xyne-cli-linux-x64 0.4.3 → 0.4.5
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/node_modules/@opentui/core/index-4kfx7p6q.js +47 -9
- package/package.json +1 -1
- package/xyne-linux-x64 +0 -0
- package/node_modules/@opentui/core/node_modules/diff/CONTRIBUTING.md +0 -28
- package/node_modules/@opentui/core/node_modules/diff/LICENSE +0 -29
- package/node_modules/@opentui/core/node_modules/diff/README.md +0 -378
- package/node_modules/@opentui/core/node_modules/diff/dist/diff.js +0 -1674
- package/node_modules/@opentui/core/node_modules/diff/dist/diff.min.js +0 -1
- package/node_modules/@opentui/core/node_modules/diff/eslint.config.mjs +0 -182
- package/node_modules/@opentui/core/node_modules/diff/libcjs/convert/dmp.d.ts +0 -8
- package/node_modules/@opentui/core/node_modules/diff/libcjs/convert/dmp.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/convert/dmp.js +0 -24
- package/node_modules/@opentui/core/node_modules/diff/libcjs/convert/xml.d.ts +0 -6
- package/node_modules/@opentui/core/node_modules/diff/libcjs/convert/xml.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/convert/xml.js +0 -34
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/array.d.ts +0 -19
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/array.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/array.js +0 -40
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/base.d.ts +0 -20
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/base.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/base.js +0 -265
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/character.d.ts +0 -19
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/character.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/character.js +0 -31
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/css.d.ts +0 -18
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/css.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/css.js +0 -34
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/json.d.ts +0 -24
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/json.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/json.js +0 -105
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/line.d.ts +0 -24
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/line.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/line.js +0 -89
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/sentence.d.ts +0 -21
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/sentence.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/sentence.js +0 -67
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/word.d.ts +0 -35
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/word.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/diff/word.js +0 -307
- package/node_modules/@opentui/core/node_modules/diff/libcjs/index.d.ts +0 -20
- package/node_modules/@opentui/core/node_modules/diff/libcjs/index.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/index.js +0 -61
- package/node_modules/@opentui/core/node_modules/diff/libcjs/package.json +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/apply.d.ts +0 -62
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/apply.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/apply.js +0 -267
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/create.d.ts +0 -100
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/create.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/create.js +0 -223
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/line-endings.d.ts +0 -17
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/line-endings.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/line-endings.js +0 -61
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/parse.d.ts +0 -8
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/parse.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/parse.js +0 -133
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/reverse.d.ts +0 -9
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/reverse.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/patch/reverse.js +0 -37
- package/node_modules/@opentui/core/node_modules/diff/libcjs/types.d.ts +0 -213
- package/node_modules/@opentui/core/node_modules/diff/libcjs/types.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/types.js +0 -2
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/array.d.ts +0 -3
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/array.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/array.js +0 -21
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/distance-iterator.d.ts +0 -2
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/distance-iterator.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/distance-iterator.js +0 -40
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/params.d.ts +0 -4
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/params.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/params.js +0 -17
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/string.d.ts +0 -18
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/string.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libcjs/util/string.js +0 -141
- package/node_modules/@opentui/core/node_modules/diff/libesm/convert/dmp.d.ts +0 -8
- package/node_modules/@opentui/core/node_modules/diff/libesm/convert/dmp.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/convert/dmp.js +0 -21
- package/node_modules/@opentui/core/node_modules/diff/libesm/convert/xml.d.ts +0 -6
- package/node_modules/@opentui/core/node_modules/diff/libesm/convert/xml.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/convert/xml.js +0 -31
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/array.d.ts +0 -19
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/array.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/array.js +0 -16
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/base.d.ts +0 -20
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/base.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/base.js +0 -253
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/character.d.ts +0 -19
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/character.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/character.js +0 -7
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/css.d.ts +0 -18
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/css.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/css.js +0 -10
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/json.d.ts +0 -24
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/json.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/json.js +0 -78
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/line.d.ts +0 -24
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/line.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/line.js +0 -65
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/sentence.d.ts +0 -21
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/sentence.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/sentence.js +0 -43
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/word.d.ts +0 -35
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/word.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/diff/word.js +0 -276
- package/node_modules/@opentui/core/node_modules/diff/libesm/index.d.ts +0 -20
- package/node_modules/@opentui/core/node_modules/diff/libesm/index.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/index.js +0 -30
- package/node_modules/@opentui/core/node_modules/diff/libesm/package.json +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/apply.d.ts +0 -62
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/apply.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/apply.js +0 -257
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/create.d.ts +0 -100
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/create.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/create.js +0 -201
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/line-endings.d.ts +0 -17
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/line-endings.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/line-endings.js +0 -44
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/parse.d.ts +0 -8
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/parse.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/parse.js +0 -130
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/reverse.d.ts +0 -9
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/reverse.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/patch/reverse.js +0 -23
- package/node_modules/@opentui/core/node_modules/diff/libesm/types.d.ts +0 -213
- package/node_modules/@opentui/core/node_modules/diff/libesm/types.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/types.js +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/array.d.ts +0 -3
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/array.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/array.js +0 -17
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/distance-iterator.d.ts +0 -2
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/distance-iterator.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/distance-iterator.js +0 -37
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/params.d.ts +0 -4
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/params.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/params.js +0 -14
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/string.d.ts +0 -18
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/string.d.ts.map +0 -1
- package/node_modules/@opentui/core/node_modules/diff/libesm/util/string.js +0 -128
- package/node_modules/@opentui/core/node_modules/diff/package.json +0 -131
- package/node_modules/@opentui/core/node_modules/diff/release-notes.md +0 -397
- package/node_modules/@opentui/core/node_modules/marked/LICENSE.md +0 -44
- package/node_modules/@opentui/core/node_modules/marked/README.md +0 -107
- package/node_modules/@opentui/core/node_modules/marked/bin/main.js +0 -283
- package/node_modules/@opentui/core/node_modules/marked/bin/marked.js +0 -16
- package/node_modules/@opentui/core/node_modules/marked/lib/marked.d.ts +0 -756
- package/node_modules/@opentui/core/node_modules/marked/lib/marked.esm.js +0 -72
- package/node_modules/@opentui/core/node_modules/marked/lib/marked.esm.js.map +0 -7
- package/node_modules/@opentui/core/node_modules/marked/lib/marked.umd.js +0 -74
- package/node_modules/@opentui/core/node_modules/marked/lib/marked.umd.js.map +0 -7
- package/node_modules/@opentui/core/node_modules/marked/man/marked.1 +0 -113
- package/node_modules/@opentui/core/node_modules/marked/man/marked.1.md +0 -93
- package/node_modules/@opentui/core/node_modules/marked/package.json +0 -103
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import Diff from './base.js';
|
|
2
|
-
import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffSentencesOptionsAbortable, DiffSentencesOptionsNonabortable } from '../types.js';
|
|
3
|
-
declare class SentenceDiff extends Diff<string, string> {
|
|
4
|
-
tokenize(value: string): string[];
|
|
5
|
-
}
|
|
6
|
-
export declare const sentenceDiff: SentenceDiff;
|
|
7
|
-
/**
|
|
8
|
-
* diffs two blocks of text, treating each sentence, and the whitespace between each pair of sentences, as a token.
|
|
9
|
-
* The characters `.`, `!`, and `?`, when followed by whitespace, are treated as marking the end of a sentence; nothing else besides the end of the string is considered to mark a sentence end.
|
|
10
|
-
*
|
|
11
|
-
* (For more sophisticated detection of sentence breaks, including support for non-English punctuation, consider instead tokenizing with an [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) with `granularity: 'sentence'` and passing the result to `diffArrays`.)
|
|
12
|
-
*
|
|
13
|
-
* @returns a list of change objects.
|
|
14
|
-
*/
|
|
15
|
-
export declare function diffSentences(oldStr: string, newStr: string, options: DiffCallbackNonabortable<string>): undefined;
|
|
16
|
-
export declare function diffSentences(oldStr: string, newStr: string, options: DiffSentencesOptionsAbortable & CallbackOptionAbortable<string>): undefined;
|
|
17
|
-
export declare function diffSentences(oldStr: string, newStr: string, options: DiffSentencesOptionsNonabortable & CallbackOptionNonabortable<string>): undefined;
|
|
18
|
-
export declare function diffSentences(oldStr: string, newStr: string, options: DiffSentencesOptionsAbortable): ChangeObject<string>[] | undefined;
|
|
19
|
-
export declare function diffSentences(oldStr: string, newStr: string, options?: DiffSentencesOptionsNonabortable): ChangeObject<string>[];
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=sentence.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sentence.d.ts","sourceRoot":"","sources":["../../src/diff/sentence.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAMrB,cAAM,YAAa,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM;CAoCvB;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,6BAA6B,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACvE,SAAS,CAAA;AACZ,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gCAAgC,GAAG,0BAA0B,CAAC,MAAM,CAAC,GAC7E,SAAS,CAAA;AACZ,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,6BAA6B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,gCAAgC,GACzC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.sentenceDiff = void 0;
|
|
19
|
-
exports.diffSentences = diffSentences;
|
|
20
|
-
var base_js_1 = require("./base.js");
|
|
21
|
-
function isSentenceEndPunct(char) {
|
|
22
|
-
return char == '.' || char == '!' || char == '?';
|
|
23
|
-
}
|
|
24
|
-
var SentenceDiff = /** @class */ (function (_super) {
|
|
25
|
-
__extends(SentenceDiff, _super);
|
|
26
|
-
function SentenceDiff() {
|
|
27
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
-
}
|
|
29
|
-
SentenceDiff.prototype.tokenize = function (value) {
|
|
30
|
-
var _a;
|
|
31
|
-
// If in future we drop support for environments that don't support lookbehinds, we can replace
|
|
32
|
-
// this entire function with:
|
|
33
|
-
// return value.split(/(?<=[.!?])(\s+|$)/);
|
|
34
|
-
// but until then, for similar reasons to the trailingWs function in string.ts, we are forced
|
|
35
|
-
// to do this verbosely "by hand" instead of using a regex.
|
|
36
|
-
var result = [];
|
|
37
|
-
var tokenStartI = 0;
|
|
38
|
-
for (var i = 0; i < value.length; i++) {
|
|
39
|
-
if (i == value.length - 1) {
|
|
40
|
-
result.push(value.slice(tokenStartI));
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
if (isSentenceEndPunct(value[i]) && value[i + 1].match(/\s/)) {
|
|
44
|
-
// We've hit a sentence break - i.e. a punctuation mark followed by whitespace.
|
|
45
|
-
// We now want to push TWO tokens to the result:
|
|
46
|
-
// 1. the sentence
|
|
47
|
-
result.push(value.slice(tokenStartI, i + 1));
|
|
48
|
-
// 2. the whitespace
|
|
49
|
-
i = tokenStartI = i + 1;
|
|
50
|
-
while ((_a = value[i + 1]) === null || _a === void 0 ? void 0 : _a.match(/\s/)) {
|
|
51
|
-
i++;
|
|
52
|
-
}
|
|
53
|
-
result.push(value.slice(tokenStartI, i + 1));
|
|
54
|
-
// Then the next token (a sentence) starts on the character after the whitespace.
|
|
55
|
-
// (It's okay if this is off the end of the string - then the outer loop will terminate
|
|
56
|
-
// here anyway.)
|
|
57
|
-
tokenStartI = i + 1;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return result;
|
|
61
|
-
};
|
|
62
|
-
return SentenceDiff;
|
|
63
|
-
}(base_js_1.default));
|
|
64
|
-
exports.sentenceDiff = new SentenceDiff();
|
|
65
|
-
function diffSentences(oldStr, newStr, options) {
|
|
66
|
-
return exports.sentenceDiff.diff(oldStr, newStr, options);
|
|
67
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import Diff from './base.js';
|
|
2
|
-
import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffWordsOptionsAbortable, DiffWordsOptionsNonabortable } from '../types.js';
|
|
3
|
-
declare class WordDiff extends Diff<string, string> {
|
|
4
|
-
equals(left: string, right: string, options: DiffWordsOptionsAbortable | DiffWordsOptionsNonabortable): boolean;
|
|
5
|
-
tokenize(value: string, options?: DiffWordsOptionsAbortable | DiffWordsOptionsNonabortable): string[];
|
|
6
|
-
join(tokens: string[]): string;
|
|
7
|
-
postProcess(changes: ChangeObject<string>[], options: any): ChangeObject<string>[];
|
|
8
|
-
}
|
|
9
|
-
export declare const wordDiff: WordDiff;
|
|
10
|
-
/**
|
|
11
|
-
* diffs two blocks of text, treating each word and each punctuation mark as a token.
|
|
12
|
-
* Whitespace is ignored when computing the diff (but preserved as far as possible in the final change objects).
|
|
13
|
-
*
|
|
14
|
-
* @returns a list of change objects.
|
|
15
|
-
*/
|
|
16
|
-
export declare function diffWords(oldStr: string, newStr: string, options: DiffCallbackNonabortable<string>): undefined;
|
|
17
|
-
export declare function diffWords(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable & CallbackOptionAbortable<string>): undefined;
|
|
18
|
-
export declare function diffWords(oldStr: string, newStr: string, options: DiffWordsOptionsNonabortable & CallbackOptionNonabortable<string>): undefined;
|
|
19
|
-
export declare function diffWords(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable): ChangeObject<string>[] | undefined;
|
|
20
|
-
export declare function diffWords(oldStr: string, newStr: string, options?: DiffWordsOptionsNonabortable): ChangeObject<string>[];
|
|
21
|
-
declare class WordsWithSpaceDiff extends Diff<string, string> {
|
|
22
|
-
tokenize(value: string): [] | RegExpMatchArray;
|
|
23
|
-
}
|
|
24
|
-
export declare const wordsWithSpaceDiff: WordsWithSpaceDiff;
|
|
25
|
-
/**
|
|
26
|
-
* diffs two blocks of text, treating each word, punctuation mark, newline, or run of (non-newline) whitespace as a token.
|
|
27
|
-
* @returns a list of change objects
|
|
28
|
-
*/
|
|
29
|
-
export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffCallbackNonabortable<string>): undefined;
|
|
30
|
-
export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable & CallbackOptionAbortable<string>): undefined;
|
|
31
|
-
export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffWordsOptionsNonabortable & CallbackOptionNonabortable<string>): undefined;
|
|
32
|
-
export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable): ChangeObject<string>[] | undefined;
|
|
33
|
-
export declare function diffWordsWithSpace(oldStr: string, newStr: string, options?: DiffWordsOptionsNonabortable): ChangeObject<string>[];
|
|
34
|
-
export {};
|
|
35
|
-
//# sourceMappingURL=word.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"word.d.ts","sourceRoot":"","sources":["../../src/diff/word.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,4BAA4B,EAAC,MAAM,aAAa,CAAC;AAmDvL,cAAM,QAAS,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IACzC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,4BAA4B;IASrG,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,yBAAyB,GAAG,4BAAiC;IAmC9F,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE;IAerB,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG;CA6B1D;AAED,eAAO,MAAM,QAAQ,UAAiB,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA;AA8IzB,cAAM,kBAAmB,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE,MAAM;CASvB;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"}
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.wordsWithSpaceDiff = exports.wordDiff = void 0;
|
|
19
|
-
exports.diffWords = diffWords;
|
|
20
|
-
exports.diffWordsWithSpace = diffWordsWithSpace;
|
|
21
|
-
var base_js_1 = require("./base.js");
|
|
22
|
-
var string_js_1 = require("../util/string.js");
|
|
23
|
-
// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode
|
|
24
|
-
//
|
|
25
|
-
// Ranges and exceptions:
|
|
26
|
-
// Latin-1 Supplement, 0080–00FF
|
|
27
|
-
// - U+00D7 × Multiplication sign
|
|
28
|
-
// - U+00F7 ÷ Division sign
|
|
29
|
-
// Latin Extended-A, 0100–017F
|
|
30
|
-
// Latin Extended-B, 0180–024F
|
|
31
|
-
// IPA Extensions, 0250–02AF
|
|
32
|
-
// Spacing Modifier Letters, 02B0–02FF
|
|
33
|
-
// - U+02C7 ˇ ˇ Caron
|
|
34
|
-
// - U+02D8 ˘ ˘ Breve
|
|
35
|
-
// - U+02D9 ˙ ˙ Dot Above
|
|
36
|
-
// - U+02DA ˚ ˚ Ring Above
|
|
37
|
-
// - U+02DB ˛ ˛ Ogonek
|
|
38
|
-
// - U+02DC ˜ ˜ Small Tilde
|
|
39
|
-
// - U+02DD ˝ ˝ Double Acute Accent
|
|
40
|
-
// Latin Extended Additional, 1E00–1EFF
|
|
41
|
-
var extendedWordChars = 'a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}';
|
|
42
|
-
// Each token is one of the following:
|
|
43
|
-
// - A punctuation mark plus the surrounding whitespace
|
|
44
|
-
// - A word plus the surrounding whitespace
|
|
45
|
-
// - Pure whitespace (but only in the special case where this the entire text
|
|
46
|
-
// is just whitespace)
|
|
47
|
-
//
|
|
48
|
-
// We have to include surrounding whitespace in the tokens because the two
|
|
49
|
-
// alternative approaches produce horribly broken results:
|
|
50
|
-
// * If we just discard the whitespace, we can't fully reproduce the original
|
|
51
|
-
// text from the sequence of tokens and any attempt to render the diff will
|
|
52
|
-
// get the whitespace wrong.
|
|
53
|
-
// * If we have separate tokens for whitespace, then in a typical text every
|
|
54
|
-
// second token will be a single space character. But this often results in
|
|
55
|
-
// the optimal diff between two texts being a perverse one that preserves
|
|
56
|
-
// the spaces between words but deletes and reinserts actual common words.
|
|
57
|
-
// See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640
|
|
58
|
-
// for an example.
|
|
59
|
-
//
|
|
60
|
-
// Keeping the surrounding whitespace of course has implications for .equals
|
|
61
|
-
// and .join, not just .tokenize.
|
|
62
|
-
// This regex does NOT fully implement the tokenization rules described above.
|
|
63
|
-
// Instead, it gives runs of whitespace their own "token". The tokenize method
|
|
64
|
-
// then handles stitching whitespace tokens onto adjacent word or punctuation
|
|
65
|
-
// tokens.
|
|
66
|
-
var tokenizeIncludingWhitespace = new RegExp("[".concat(extendedWordChars, "]+|\\s+|[^").concat(extendedWordChars, "]"), 'ug');
|
|
67
|
-
var WordDiff = /** @class */ (function (_super) {
|
|
68
|
-
__extends(WordDiff, _super);
|
|
69
|
-
function WordDiff() {
|
|
70
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
71
|
-
}
|
|
72
|
-
WordDiff.prototype.equals = function (left, right, options) {
|
|
73
|
-
if (options.ignoreCase) {
|
|
74
|
-
left = left.toLowerCase();
|
|
75
|
-
right = right.toLowerCase();
|
|
76
|
-
}
|
|
77
|
-
return left.trim() === right.trim();
|
|
78
|
-
};
|
|
79
|
-
WordDiff.prototype.tokenize = function (value, options) {
|
|
80
|
-
if (options === void 0) { options = {}; }
|
|
81
|
-
var parts;
|
|
82
|
-
if (options.intlSegmenter) {
|
|
83
|
-
var segmenter = options.intlSegmenter;
|
|
84
|
-
if (segmenter.resolvedOptions().granularity != 'word') {
|
|
85
|
-
throw new Error('The segmenter passed must have a granularity of "word"');
|
|
86
|
-
}
|
|
87
|
-
parts = Array.from(segmenter.segment(value), function (segment) { return segment.segment; });
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
parts = value.match(tokenizeIncludingWhitespace) || [];
|
|
91
|
-
}
|
|
92
|
-
var tokens = [];
|
|
93
|
-
var prevPart = null;
|
|
94
|
-
parts.forEach(function (part) {
|
|
95
|
-
if ((/\s/).test(part)) {
|
|
96
|
-
if (prevPart == null) {
|
|
97
|
-
tokens.push(part);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
tokens.push(tokens.pop() + part);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
else if (prevPart != null && (/\s/).test(prevPart)) {
|
|
104
|
-
if (tokens[tokens.length - 1] == prevPart) {
|
|
105
|
-
tokens.push(tokens.pop() + part);
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
tokens.push(prevPart + part);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
tokens.push(part);
|
|
113
|
-
}
|
|
114
|
-
prevPart = part;
|
|
115
|
-
});
|
|
116
|
-
return tokens;
|
|
117
|
-
};
|
|
118
|
-
WordDiff.prototype.join = function (tokens) {
|
|
119
|
-
// Tokens being joined here will always have appeared consecutively in the
|
|
120
|
-
// same text, so we can simply strip off the leading whitespace from all the
|
|
121
|
-
// tokens except the first (and except any whitespace-only tokens - but such
|
|
122
|
-
// a token will always be the first and only token anyway) and then join them
|
|
123
|
-
// and the whitespace around words and punctuation will end up correct.
|
|
124
|
-
return tokens.map(function (token, i) {
|
|
125
|
-
if (i == 0) {
|
|
126
|
-
return token;
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
return token.replace((/^\s+/), '');
|
|
130
|
-
}
|
|
131
|
-
}).join('');
|
|
132
|
-
};
|
|
133
|
-
WordDiff.prototype.postProcess = function (changes, options) {
|
|
134
|
-
if (!changes || options.oneChangePerToken) {
|
|
135
|
-
return changes;
|
|
136
|
-
}
|
|
137
|
-
var lastKeep = null;
|
|
138
|
-
// Change objects representing any insertion or deletion since the last
|
|
139
|
-
// "keep" change object. There can be at most one of each.
|
|
140
|
-
var insertion = null;
|
|
141
|
-
var deletion = null;
|
|
142
|
-
changes.forEach(function (change) {
|
|
143
|
-
if (change.added) {
|
|
144
|
-
insertion = change;
|
|
145
|
-
}
|
|
146
|
-
else if (change.removed) {
|
|
147
|
-
deletion = change;
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
if (insertion || deletion) { // May be false at start of text
|
|
151
|
-
dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change);
|
|
152
|
-
}
|
|
153
|
-
lastKeep = change;
|
|
154
|
-
insertion = null;
|
|
155
|
-
deletion = null;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
if (insertion || deletion) {
|
|
159
|
-
dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null);
|
|
160
|
-
}
|
|
161
|
-
return changes;
|
|
162
|
-
};
|
|
163
|
-
return WordDiff;
|
|
164
|
-
}(base_js_1.default));
|
|
165
|
-
exports.wordDiff = new WordDiff();
|
|
166
|
-
function diffWords(oldStr, newStr, options) {
|
|
167
|
-
// This option has never been documented and never will be (it's clearer to
|
|
168
|
-
// just call `diffWordsWithSpace` directly if you need that behavior), but
|
|
169
|
-
// has existed in jsdiff for a long time, so we retain support for it here
|
|
170
|
-
// for the sake of backwards compatibility.
|
|
171
|
-
if ((options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) {
|
|
172
|
-
return diffWordsWithSpace(oldStr, newStr, options);
|
|
173
|
-
}
|
|
174
|
-
return exports.wordDiff.diff(oldStr, newStr, options);
|
|
175
|
-
}
|
|
176
|
-
function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep) {
|
|
177
|
-
// Before returning, we tidy up the leading and trailing whitespace of the
|
|
178
|
-
// change objects to eliminate cases where trailing whitespace in one object
|
|
179
|
-
// is repeated as leading whitespace in the next.
|
|
180
|
-
// Below are examples of the outcomes we want here to explain the code.
|
|
181
|
-
// I=insert, K=keep, D=delete
|
|
182
|
-
// 1. diffing 'foo bar baz' vs 'foo baz'
|
|
183
|
-
// Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz'
|
|
184
|
-
// After cleanup, we want: K:'foo ' D:'bar ' K:'baz'
|
|
185
|
-
//
|
|
186
|
-
// 2. Diffing 'foo bar baz' vs 'foo qux baz'
|
|
187
|
-
// Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz'
|
|
188
|
-
// After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz'
|
|
189
|
-
//
|
|
190
|
-
// 3. Diffing 'foo\nbar baz' vs 'foo baz'
|
|
191
|
-
// Prior to cleanup, we have K:'foo ' D:'\nbar ' K:' baz'
|
|
192
|
-
// After cleanup, we want K'foo' D:'\nbar' K:' baz'
|
|
193
|
-
//
|
|
194
|
-
// 4. Diffing 'foo baz' vs 'foo\nbar baz'
|
|
195
|
-
// Prior to cleanup, we have K:'foo\n' I:'\nbar ' K:' baz'
|
|
196
|
-
// After cleanup, we ideally want K'foo' I:'\nbar' K:' baz'
|
|
197
|
-
// but don't actually manage this currently (the pre-cleanup change
|
|
198
|
-
// objects don't contain enough information to make it possible).
|
|
199
|
-
//
|
|
200
|
-
// 5. Diffing 'foo bar baz' vs 'foo baz'
|
|
201
|
-
// Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz'
|
|
202
|
-
// After cleanup, we want K:'foo ' D:' bar ' K:'baz'
|
|
203
|
-
//
|
|
204
|
-
// Our handling is unavoidably imperfect in the case where there's a single
|
|
205
|
-
// indel between keeps and the whitespace has changed. For instance, consider
|
|
206
|
-
// diffing 'foo\tbar\nbaz' vs 'foo baz'. Unless we create an extra change
|
|
207
|
-
// object to represent the insertion of the space character (which isn't even
|
|
208
|
-
// a token), we have no way to avoid losing information about the texts'
|
|
209
|
-
// original whitespace in the result we return. Still, we do our best to
|
|
210
|
-
// output something that will look sensible if we e.g. print it with
|
|
211
|
-
// insertions in green and deletions in red.
|
|
212
|
-
// Between two "keep" change objects (or before the first or after the last
|
|
213
|
-
// change object), we can have either:
|
|
214
|
-
// * A "delete" followed by an "insert"
|
|
215
|
-
// * Just an "insert"
|
|
216
|
-
// * Just a "delete"
|
|
217
|
-
// We handle the three cases separately.
|
|
218
|
-
if (deletion && insertion) {
|
|
219
|
-
var oldWsPrefix = (0, string_js_1.leadingWs)(deletion.value);
|
|
220
|
-
var oldWsSuffix = (0, string_js_1.trailingWs)(deletion.value);
|
|
221
|
-
var newWsPrefix = (0, string_js_1.leadingWs)(insertion.value);
|
|
222
|
-
var newWsSuffix = (0, string_js_1.trailingWs)(insertion.value);
|
|
223
|
-
if (startKeep) {
|
|
224
|
-
var commonWsPrefix = (0, string_js_1.longestCommonPrefix)(oldWsPrefix, newWsPrefix);
|
|
225
|
-
startKeep.value = (0, string_js_1.replaceSuffix)(startKeep.value, newWsPrefix, commonWsPrefix);
|
|
226
|
-
deletion.value = (0, string_js_1.removePrefix)(deletion.value, commonWsPrefix);
|
|
227
|
-
insertion.value = (0, string_js_1.removePrefix)(insertion.value, commonWsPrefix);
|
|
228
|
-
}
|
|
229
|
-
if (endKeep) {
|
|
230
|
-
var commonWsSuffix = (0, string_js_1.longestCommonSuffix)(oldWsSuffix, newWsSuffix);
|
|
231
|
-
endKeep.value = (0, string_js_1.replacePrefix)(endKeep.value, newWsSuffix, commonWsSuffix);
|
|
232
|
-
deletion.value = (0, string_js_1.removeSuffix)(deletion.value, commonWsSuffix);
|
|
233
|
-
insertion.value = (0, string_js_1.removeSuffix)(insertion.value, commonWsSuffix);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
else if (insertion) {
|
|
237
|
-
// The whitespaces all reflect what was in the new text rather than
|
|
238
|
-
// the old, so we essentially have no information about whitespace
|
|
239
|
-
// insertion or deletion. We just want to dedupe the whitespace.
|
|
240
|
-
// We do that by having each change object keep its trailing
|
|
241
|
-
// whitespace and deleting duplicate leading whitespace where
|
|
242
|
-
// present.
|
|
243
|
-
if (startKeep) {
|
|
244
|
-
var ws = (0, string_js_1.leadingWs)(insertion.value);
|
|
245
|
-
insertion.value = insertion.value.substring(ws.length);
|
|
246
|
-
}
|
|
247
|
-
if (endKeep) {
|
|
248
|
-
var ws = (0, string_js_1.leadingWs)(endKeep.value);
|
|
249
|
-
endKeep.value = endKeep.value.substring(ws.length);
|
|
250
|
-
}
|
|
251
|
-
// otherwise we've got a deletion and no insertion
|
|
252
|
-
}
|
|
253
|
-
else if (startKeep && endKeep) {
|
|
254
|
-
var newWsFull = (0, string_js_1.leadingWs)(endKeep.value), delWsStart = (0, string_js_1.leadingWs)(deletion.value), delWsEnd = (0, string_js_1.trailingWs)(deletion.value);
|
|
255
|
-
// Any whitespace that comes straight after startKeep in both the old and
|
|
256
|
-
// new texts, assign to startKeep and remove from the deletion.
|
|
257
|
-
var newWsStart = (0, string_js_1.longestCommonPrefix)(newWsFull, delWsStart);
|
|
258
|
-
deletion.value = (0, string_js_1.removePrefix)(deletion.value, newWsStart);
|
|
259
|
-
// Any whitespace that comes straight before endKeep in both the old and
|
|
260
|
-
// new texts, and hasn't already been assigned to startKeep, assign to
|
|
261
|
-
// endKeep and remove from the deletion.
|
|
262
|
-
var newWsEnd = (0, string_js_1.longestCommonSuffix)((0, string_js_1.removePrefix)(newWsFull, newWsStart), delWsEnd);
|
|
263
|
-
deletion.value = (0, string_js_1.removeSuffix)(deletion.value, newWsEnd);
|
|
264
|
-
endKeep.value = (0, string_js_1.replacePrefix)(endKeep.value, newWsFull, newWsEnd);
|
|
265
|
-
// If there's any whitespace from the new text that HASN'T already been
|
|
266
|
-
// assigned, assign it to the start:
|
|
267
|
-
startKeep.value = (0, string_js_1.replaceSuffix)(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length));
|
|
268
|
-
}
|
|
269
|
-
else if (endKeep) {
|
|
270
|
-
// We are at the start of the text. Preserve all the whitespace on
|
|
271
|
-
// endKeep, and just remove whitespace from the end of deletion to the
|
|
272
|
-
// extent that it overlaps with the start of endKeep.
|
|
273
|
-
var endKeepWsPrefix = (0, string_js_1.leadingWs)(endKeep.value);
|
|
274
|
-
var deletionWsSuffix = (0, string_js_1.trailingWs)(deletion.value);
|
|
275
|
-
var overlap = (0, string_js_1.maximumOverlap)(deletionWsSuffix, endKeepWsPrefix);
|
|
276
|
-
deletion.value = (0, string_js_1.removeSuffix)(deletion.value, overlap);
|
|
277
|
-
}
|
|
278
|
-
else if (startKeep) {
|
|
279
|
-
// We are at the END of the text. Preserve all the whitespace on
|
|
280
|
-
// startKeep, and just remove whitespace from the start of deletion to
|
|
281
|
-
// the extent that it overlaps with the end of startKeep.
|
|
282
|
-
var startKeepWsSuffix = (0, string_js_1.trailingWs)(startKeep.value);
|
|
283
|
-
var deletionWsPrefix = (0, string_js_1.leadingWs)(deletion.value);
|
|
284
|
-
var overlap = (0, string_js_1.maximumOverlap)(startKeepWsSuffix, deletionWsPrefix);
|
|
285
|
-
deletion.value = (0, string_js_1.removePrefix)(deletion.value, overlap);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
var WordsWithSpaceDiff = /** @class */ (function (_super) {
|
|
289
|
-
__extends(WordsWithSpaceDiff, _super);
|
|
290
|
-
function WordsWithSpaceDiff() {
|
|
291
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
292
|
-
}
|
|
293
|
-
WordsWithSpaceDiff.prototype.tokenize = function (value) {
|
|
294
|
-
// Slightly different to the tokenizeIncludingWhitespace regex used above in
|
|
295
|
-
// that this one treats each individual newline as a distinct tokens, rather
|
|
296
|
-
// than merging them into other surrounding whitespace. This was requested
|
|
297
|
-
// in https://github.com/kpdecker/jsdiff/issues/180 &
|
|
298
|
-
// https://github.com/kpdecker/jsdiff/issues/211
|
|
299
|
-
var regex = new RegExp("(\\r?\\n)|[".concat(extendedWordChars, "]+|[^\\S\\n\\r]+|[^").concat(extendedWordChars, "]"), 'ug');
|
|
300
|
-
return value.match(regex) || [];
|
|
301
|
-
};
|
|
302
|
-
return WordsWithSpaceDiff;
|
|
303
|
-
}(base_js_1.default));
|
|
304
|
-
exports.wordsWithSpaceDiff = new WordsWithSpaceDiff();
|
|
305
|
-
function diffWordsWithSpace(oldStr, newStr, options) {
|
|
306
|
-
return exports.wordsWithSpaceDiff.diff(oldStr, newStr, options);
|
|
307
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Diff from './diff/base.js';
|
|
2
|
-
import { diffChars, characterDiff } from './diff/character.js';
|
|
3
|
-
import { diffWords, diffWordsWithSpace, wordDiff, wordsWithSpaceDiff } from './diff/word.js';
|
|
4
|
-
import { diffLines, diffTrimmedLines, lineDiff } from './diff/line.js';
|
|
5
|
-
import { diffSentences, sentenceDiff } from './diff/sentence.js';
|
|
6
|
-
import { diffCss, cssDiff } from './diff/css.js';
|
|
7
|
-
import { diffJson, canonicalize, jsonDiff } from './diff/json.js';
|
|
8
|
-
import { diffArrays, arrayDiff } from './diff/array.js';
|
|
9
|
-
import { applyPatch, applyPatches } from './patch/apply.js';
|
|
10
|
-
import type { ApplyPatchOptions, ApplyPatchesOptions } from './patch/apply.js';
|
|
11
|
-
import { parsePatch } from './patch/parse.js';
|
|
12
|
-
import { reversePatch } from './patch/reverse.js';
|
|
13
|
-
import { structuredPatch, createTwoFilesPatch, createPatch, formatPatch } from './patch/create.js';
|
|
14
|
-
import type { StructuredPatchOptionsAbortable, StructuredPatchOptionsNonabortable, CreatePatchOptionsAbortable, CreatePatchOptionsNonabortable } from './patch/create.js';
|
|
15
|
-
import { convertChangesToDMP } from './convert/dmp.js';
|
|
16
|
-
import { convertChangesToXML } from './convert/xml.js';
|
|
17
|
-
import type { ChangeObject, Change, DiffArraysOptionsAbortable, DiffArraysOptionsNonabortable, DiffCharsOptionsAbortable, DiffCharsOptionsNonabortable, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable, DiffWordsOptionsAbortable, DiffWordsOptionsNonabortable, DiffSentencesOptionsAbortable, DiffSentencesOptionsNonabortable, DiffJsonOptionsAbortable, DiffJsonOptionsNonabortable, DiffCssOptionsAbortable, DiffCssOptionsNonabortable, StructuredPatch, StructuredPatchHunk } from './types.js';
|
|
18
|
-
export { Diff, diffChars, characterDiff, diffWords, wordDiff, diffWordsWithSpace, wordsWithSpaceDiff, diffLines, lineDiff, diffTrimmedLines, diffSentences, sentenceDiff, diffCss, cssDiff, diffJson, jsonDiff, diffArrays, arrayDiff, structuredPatch, createTwoFilesPatch, createPatch, formatPatch, applyPatch, applyPatches, parsePatch, reversePatch, convertChangesToDMP, convertChangesToXML, canonicalize };
|
|
19
|
-
export type { ChangeObject, Change, DiffArraysOptionsAbortable, DiffArraysOptionsNonabortable, DiffCharsOptionsAbortable, DiffCharsOptionsNonabortable, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable, DiffWordsOptionsAbortable, DiffWordsOptionsNonabortable, DiffSentencesOptionsAbortable, DiffSentencesOptionsNonabortable, DiffJsonOptionsAbortable, DiffJsonOptionsNonabortable, DiffCssOptionsAbortable, DiffCssOptionsNonabortable, StructuredPatch, StructuredPatchHunk, ApplyPatchOptions, ApplyPatchesOptions, StructuredPatchOptionsAbortable, StructuredPatchOptionsNonabortable, CreatePatchOptionsAbortable, CreatePatchOptionsNonabortable };
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAC,iBAAiB,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,+BAA+B,EAC/B,kCAAkC,EAClC,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EACN,0BAA0B,EAC1B,6BAA6B,EAC7B,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,IAAI,EAEJ,SAAS,EACT,aAAa,EACb,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EAET,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACb,CAAC;AAEF,YAAY,EACV,YAAY,EACZ,MAAM,EACN,0BAA0B,EAC1B,6BAA6B,EAC7B,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EAEnB,iBAAiB,EACjB,mBAAmB,EAEnB,+BAA+B,EAC/B,kCAAkC,EAClC,2BAA2B,EAC3B,8BAA8B,EAC/B,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* See LICENSE file for terms of use */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.canonicalize = exports.convertChangesToXML = exports.convertChangesToDMP = exports.reversePatch = exports.parsePatch = exports.applyPatches = exports.applyPatch = exports.formatPatch = exports.createPatch = exports.createTwoFilesPatch = exports.structuredPatch = exports.arrayDiff = exports.diffArrays = exports.jsonDiff = exports.diffJson = exports.cssDiff = exports.diffCss = exports.sentenceDiff = exports.diffSentences = exports.diffTrimmedLines = exports.lineDiff = exports.diffLines = exports.wordsWithSpaceDiff = exports.diffWordsWithSpace = exports.wordDiff = exports.diffWords = exports.characterDiff = exports.diffChars = exports.Diff = void 0;
|
|
5
|
-
/*
|
|
6
|
-
* Text diff implementation.
|
|
7
|
-
*
|
|
8
|
-
* This library supports the following APIs:
|
|
9
|
-
* Diff.diffChars: Character by character diff
|
|
10
|
-
* Diff.diffWords: Word (as defined by \b regex) diff which ignores whitespace
|
|
11
|
-
* Diff.diffLines: Line based diff
|
|
12
|
-
*
|
|
13
|
-
* Diff.diffCss: Diff targeted at CSS content
|
|
14
|
-
*
|
|
15
|
-
* These methods are based on the implementation proposed in
|
|
16
|
-
* "An O(ND) Difference Algorithm and its Variations" (Myers, 1986).
|
|
17
|
-
* http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927
|
|
18
|
-
*/
|
|
19
|
-
var base_js_1 = require("./diff/base.js");
|
|
20
|
-
exports.Diff = base_js_1.default;
|
|
21
|
-
var character_js_1 = require("./diff/character.js");
|
|
22
|
-
Object.defineProperty(exports, "diffChars", { enumerable: true, get: function () { return character_js_1.diffChars; } });
|
|
23
|
-
Object.defineProperty(exports, "characterDiff", { enumerable: true, get: function () { return character_js_1.characterDiff; } });
|
|
24
|
-
var word_js_1 = require("./diff/word.js");
|
|
25
|
-
Object.defineProperty(exports, "diffWords", { enumerable: true, get: function () { return word_js_1.diffWords; } });
|
|
26
|
-
Object.defineProperty(exports, "diffWordsWithSpace", { enumerable: true, get: function () { return word_js_1.diffWordsWithSpace; } });
|
|
27
|
-
Object.defineProperty(exports, "wordDiff", { enumerable: true, get: function () { return word_js_1.wordDiff; } });
|
|
28
|
-
Object.defineProperty(exports, "wordsWithSpaceDiff", { enumerable: true, get: function () { return word_js_1.wordsWithSpaceDiff; } });
|
|
29
|
-
var line_js_1 = require("./diff/line.js");
|
|
30
|
-
Object.defineProperty(exports, "diffLines", { enumerable: true, get: function () { return line_js_1.diffLines; } });
|
|
31
|
-
Object.defineProperty(exports, "diffTrimmedLines", { enumerable: true, get: function () { return line_js_1.diffTrimmedLines; } });
|
|
32
|
-
Object.defineProperty(exports, "lineDiff", { enumerable: true, get: function () { return line_js_1.lineDiff; } });
|
|
33
|
-
var sentence_js_1 = require("./diff/sentence.js");
|
|
34
|
-
Object.defineProperty(exports, "diffSentences", { enumerable: true, get: function () { return sentence_js_1.diffSentences; } });
|
|
35
|
-
Object.defineProperty(exports, "sentenceDiff", { enumerable: true, get: function () { return sentence_js_1.sentenceDiff; } });
|
|
36
|
-
var css_js_1 = require("./diff/css.js");
|
|
37
|
-
Object.defineProperty(exports, "diffCss", { enumerable: true, get: function () { return css_js_1.diffCss; } });
|
|
38
|
-
Object.defineProperty(exports, "cssDiff", { enumerable: true, get: function () { return css_js_1.cssDiff; } });
|
|
39
|
-
var json_js_1 = require("./diff/json.js");
|
|
40
|
-
Object.defineProperty(exports, "diffJson", { enumerable: true, get: function () { return json_js_1.diffJson; } });
|
|
41
|
-
Object.defineProperty(exports, "canonicalize", { enumerable: true, get: function () { return json_js_1.canonicalize; } });
|
|
42
|
-
Object.defineProperty(exports, "jsonDiff", { enumerable: true, get: function () { return json_js_1.jsonDiff; } });
|
|
43
|
-
var array_js_1 = require("./diff/array.js");
|
|
44
|
-
Object.defineProperty(exports, "diffArrays", { enumerable: true, get: function () { return array_js_1.diffArrays; } });
|
|
45
|
-
Object.defineProperty(exports, "arrayDiff", { enumerable: true, get: function () { return array_js_1.arrayDiff; } });
|
|
46
|
-
var apply_js_1 = require("./patch/apply.js");
|
|
47
|
-
Object.defineProperty(exports, "applyPatch", { enumerable: true, get: function () { return apply_js_1.applyPatch; } });
|
|
48
|
-
Object.defineProperty(exports, "applyPatches", { enumerable: true, get: function () { return apply_js_1.applyPatches; } });
|
|
49
|
-
var parse_js_1 = require("./patch/parse.js");
|
|
50
|
-
Object.defineProperty(exports, "parsePatch", { enumerable: true, get: function () { return parse_js_1.parsePatch; } });
|
|
51
|
-
var reverse_js_1 = require("./patch/reverse.js");
|
|
52
|
-
Object.defineProperty(exports, "reversePatch", { enumerable: true, get: function () { return reverse_js_1.reversePatch; } });
|
|
53
|
-
var create_js_1 = require("./patch/create.js");
|
|
54
|
-
Object.defineProperty(exports, "structuredPatch", { enumerable: true, get: function () { return create_js_1.structuredPatch; } });
|
|
55
|
-
Object.defineProperty(exports, "createTwoFilesPatch", { enumerable: true, get: function () { return create_js_1.createTwoFilesPatch; } });
|
|
56
|
-
Object.defineProperty(exports, "createPatch", { enumerable: true, get: function () { return create_js_1.createPatch; } });
|
|
57
|
-
Object.defineProperty(exports, "formatPatch", { enumerable: true, get: function () { return create_js_1.formatPatch; } });
|
|
58
|
-
var dmp_js_1 = require("./convert/dmp.js");
|
|
59
|
-
Object.defineProperty(exports, "convertChangesToDMP", { enumerable: true, get: function () { return dmp_js_1.convertChangesToDMP; } });
|
|
60
|
-
var xml_js_1 = require("./convert/xml.js");
|
|
61
|
-
Object.defineProperty(exports, "convertChangesToXML", { enumerable: true, get: function () { return xml_js_1.convertChangesToXML; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs","sideEffects":false}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { StructuredPatch } from '../types.js';
|
|
2
|
-
export interface ApplyPatchOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Maximum Levenshtein distance (in lines deleted, added, or subtituted) between the context shown in a patch hunk and the lines found in the file.
|
|
5
|
-
* @default 0
|
|
6
|
-
*/
|
|
7
|
-
fuzzFactor?: number;
|
|
8
|
-
/**
|
|
9
|
-
* If `true`, and if the file to be patched consistently uses different line endings to the patch (i.e. either the file always uses Unix line endings while the patch uses Windows ones, or vice versa), then `applyPatch` will behave as if the line endings in the patch were the same as those in the source file.
|
|
10
|
-
* (If `false`, the patch will usually fail to apply in such circumstances since lines deleted in the patch won't be considered to match those in the source file.)
|
|
11
|
-
* @default true
|
|
12
|
-
*/
|
|
13
|
-
autoConvertLineEndings?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Callback used to compare to given lines to determine if they should be considered equal when patching.
|
|
16
|
-
* Defaults to strict equality but may be overridden to provide fuzzier comparison.
|
|
17
|
-
* Should return false if the lines should be rejected.
|
|
18
|
-
*/
|
|
19
|
-
compareLine?: (lineNumber: number, line: string, operation: string, patchContent: string) => boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* attempts to apply a unified diff patch.
|
|
23
|
-
*
|
|
24
|
-
* Hunks are applied first to last.
|
|
25
|
-
* `applyPatch` first tries to apply the first hunk at the line number specified in the hunk header, and with all context lines matching exactly.
|
|
26
|
-
* If that fails, it tries scanning backwards and forwards, one line at a time, to find a place to apply the hunk where the context lines match exactly.
|
|
27
|
-
* If that still fails, and `fuzzFactor` is greater than zero, it increments the maximum number of mismatches (missing, extra, or changed context lines) that there can be between the hunk context and a region where we are trying to apply the patch such that the hunk will still be considered to match.
|
|
28
|
-
* Regardless of `fuzzFactor`, lines to be deleted in the hunk *must* be present for a hunk to match, and the context lines *immediately* before and after an insertion must match exactly.
|
|
29
|
-
*
|
|
30
|
-
* Once a hunk is successfully fitted, the process begins again with the next hunk.
|
|
31
|
-
* Regardless of `fuzzFactor`, later hunks must be applied later in the file than earlier hunks.
|
|
32
|
-
*
|
|
33
|
-
* If a hunk cannot be successfully fitted *anywhere* with fewer than `fuzzFactor` mismatches, `applyPatch` fails and returns `false`.
|
|
34
|
-
*
|
|
35
|
-
* If a hunk is successfully fitted but not at the line number specified by the hunk header, all subsequent hunks have their target line number adjusted accordingly.
|
|
36
|
-
* (e.g. if the first hunk is applied 10 lines below where the hunk header said it should fit, `applyPatch` will *start* looking for somewhere to apply the second hunk 10 lines below where its hunk header says it goes.)
|
|
37
|
-
*
|
|
38
|
-
* If the patch was applied successfully, returns a string containing the patched text.
|
|
39
|
-
* If the patch could not be applied (because some hunks in the patch couldn't be fitted to the text in `source`), `applyPatch` returns false.
|
|
40
|
-
*
|
|
41
|
-
* @param patch a string diff or the output from the `parsePatch` or `structuredPatch` methods.
|
|
42
|
-
*/
|
|
43
|
-
export declare function applyPatch(source: string, patch: string | StructuredPatch | [StructuredPatch], options?: ApplyPatchOptions): string | false;
|
|
44
|
-
export interface ApplyPatchesOptions extends ApplyPatchOptions {
|
|
45
|
-
loadFile: (index: StructuredPatch, callback: (err: any, data: string) => void) => void;
|
|
46
|
-
patched: (index: StructuredPatch, content: string | false, callback: (err: any) => void) => void;
|
|
47
|
-
complete: (err?: any) => void;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* applies one or more patches.
|
|
51
|
-
*
|
|
52
|
-
* `patch` may be either an array of structured patch objects, or a string representing a patch in unified diff format (which may patch one or more files).
|
|
53
|
-
*
|
|
54
|
-
* This method will iterate over the contents of the patch and apply to data provided through callbacks. The general flow for each patch index is:
|
|
55
|
-
*
|
|
56
|
-
* - `options.loadFile(index, callback)` is called. The caller should then load the contents of the file and then pass that to the `callback(err, data)` callback. Passing an `err` will terminate further patch execution.
|
|
57
|
-
* - `options.patched(index, content, callback)` is called once the patch has been applied. `content` will be the return value from `applyPatch`. When it's ready, the caller should call `callback(err)` callback. Passing an `err` will terminate further patch execution.
|
|
58
|
-
*
|
|
59
|
-
* Once all patches have been applied or an error occurs, the `options.complete(err)` callback is made.
|
|
60
|
-
*/
|
|
61
|
-
export declare function applyPatches(uniDiff: string | StructuredPatch[], options: ApplyPatchesOptions): void;
|
|
62
|
-
//# sourceMappingURL=apply.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/patch/apply.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;CACtG;AAOD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,CAAC,eAAe,CAAC,EACnD,OAAO,GAAE,iBAAsB,GAC9B,MAAM,GAAG,KAAK,CAehB;AAyPD,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;IACvF,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IACjG,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,EAAE,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CA0BpG"}
|