@opensumi/ide-core-common 2.17.8 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/application-error.d.ts.map +1 -1
- package/lib/application-error.js +6 -0
- package/lib/application-error.js.map +1 -1
- package/lib/command.d.ts +1 -2
- package/lib/command.d.ts.map +1 -1
- package/lib/command.js +4 -4
- package/lib/command.js.map +1 -1
- package/lib/{utils/comparers.d.ts → comparers.d.ts} +1 -1
- package/lib/comparers.d.ts.map +1 -0
- package/lib/{utils/comparers.js → comparers.js} +5 -5
- package/lib/comparers.js.map +1 -0
- package/lib/const/application.d.ts +1 -0
- package/lib/const/application.d.ts.map +1 -1
- package/lib/const/application.js +3 -1
- package/lib/const/application.js.map +1 -1
- package/lib/const/index.d.ts +1 -1
- package/lib/const/index.d.ts.map +1 -1
- package/lib/const/index.js +1 -1
- package/lib/const/index.js.map +1 -1
- package/lib/crypto.d.ts +7 -0
- package/lib/{cryptr.d.ts.map → crypto.d.ts.map} +1 -1
- package/lib/crypto.js +6 -0
- package/lib/crypto.js.map +1 -0
- package/lib/electron.d.ts +2 -2
- package/lib/electron.d.ts.map +1 -1
- package/lib/electron.js.map +1 -1
- package/lib/event-bus/event-bus-types.d.ts +3 -4
- package/lib/event-bus/event-bus-types.d.ts.map +1 -1
- package/lib/event-bus/event-bus.d.ts +3 -3
- package/lib/event-bus/event-bus.d.ts.map +1 -1
- package/lib/event-bus/event-bus.js +3 -3
- package/lib/event-bus/event-bus.js.map +1 -1
- package/lib/event-bus/event-decorator.d.ts +1 -1
- package/lib/event-bus/event-decorator.d.ts.map +1 -1
- package/lib/event-bus/event-decorator.js +2 -2
- package/lib/event-bus/event-decorator.js.map +1 -1
- package/lib/hash-calculate/hash-calculate.d.ts.map +1 -1
- package/lib/hash-calculate/hash-calculate.js +2 -2
- package/lib/hash-calculate/hash-calculate.js.map +1 -1
- package/lib/index.d.ts +4 -18
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -18
- package/lib/index.js.map +1 -1
- package/lib/keyboard/keyboard-layout-provider.d.ts +1 -1
- package/lib/keyboard/keyboard-layout-provider.d.ts.map +1 -1
- package/lib/keyboard/keymap.js +4 -4
- package/lib/keyboard/keymap.js.map +1 -1
- package/lib/localize.d.ts.map +1 -1
- package/lib/localize.js +7 -7
- package/lib/localize.js.map +1 -1
- package/lib/log.d.ts +1 -1
- package/lib/log.d.ts.map +1 -1
- package/lib/{utils/markdown.d.ts → markdown.d.ts} +1 -1
- package/lib/markdown.d.ts.map +1 -0
- package/lib/{utils/markdown.js → markdown.js} +0 -0
- package/lib/markdown.js.map +1 -0
- package/lib/menu.d.ts +1 -1
- package/lib/menu.d.ts.map +1 -1
- package/lib/menu.js.map +1 -1
- package/lib/network.d.ts +2 -1
- package/lib/network.d.ts.map +1 -1
- package/lib/network.js +19 -18
- package/lib/network.js.map +1 -1
- package/lib/problem-matcher.d.ts +1 -3
- package/lib/problem-matcher.d.ts.map +1 -1
- package/lib/problem-matcher.js +5 -6
- package/lib/problem-matcher.js.map +1 -1
- package/lib/problem-pattern.d.ts +1 -2
- package/lib/problem-pattern.d.ts.map +1 -1
- package/lib/problem-pattern.js +9 -10
- package/lib/problem-pattern.js.map +1 -1
- package/lib/reference.d.ts +1 -3
- package/lib/reference.d.ts.map +1 -1
- package/lib/reference.js +4 -5
- package/lib/reference.js.map +1 -1
- package/lib/reporter.d.ts +1 -1
- package/lib/reporter.d.ts.map +1 -1
- package/lib/storage.d.ts +1 -4
- package/lib/storage.d.ts.map +1 -1
- package/lib/storage.js +11 -11
- package/lib/storage.js.map +1 -1
- package/lib/task-definition.d.ts +1 -1
- package/lib/task-definition.d.ts.map +1 -1
- package/lib/task-definition.js +6 -6
- package/lib/task-definition.js.map +1 -1
- package/lib/types/application.d.ts +4 -4
- package/lib/types/application.d.ts.map +1 -1
- package/lib/types/authentication.d.ts +1 -2
- package/lib/types/authentication.d.ts.map +1 -1
- package/lib/types/authentication.js.map +1 -1
- package/lib/types/common.d.ts +2 -2
- package/lib/types/common.d.ts.map +1 -1
- package/lib/types/extension.d.ts +1 -1
- package/lib/types/extension.d.ts.map +1 -1
- package/lib/types/extension.js.map +1 -1
- package/lib/types/file-watch.d.ts +1 -1
- package/lib/types/file-watch.d.ts.map +1 -1
- package/lib/types/file-watch.js +2 -2
- package/lib/types/file-watch.js.map +1 -1
- package/lib/types/file.d.ts +1 -1
- package/lib/types/file.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/markdown.d.ts +2 -1
- package/lib/types/markdown.d.ts.map +1 -1
- package/lib/types/markers/markers-manager.d.ts +2 -2
- package/lib/types/markers/markers-manager.d.ts.map +1 -1
- package/lib/types/markers/markers-manager.js +25 -23
- package/lib/types/markers/markers-manager.js.map +1 -1
- package/lib/types/markers/markers.js +2 -2
- package/lib/types/markers/markers.js.map +1 -1
- package/lib/utils/ipc.d.ts.map +1 -1
- package/lib/utils/ipc.js +7 -8
- package/lib/utils/ipc.js.map +1 -1
- package/package.json +4 -7
- package/lib/arrays.d.ts +0 -134
- package/lib/arrays.d.ts.map +0 -1
- package/lib/arrays.js +0 -545
- package/lib/arrays.js.map +0 -1
- package/lib/async.d.ts +0 -185
- package/lib/async.d.ts.map +0 -1
- package/lib/async.js +0 -469
- package/lib/async.js.map +0 -1
- package/lib/cache.d.ts +0 -12
- package/lib/cache.d.ts.map +0 -1
- package/lib/cache.js +0 -37
- package/lib/cache.js.map +0 -1
- package/lib/cancellation.d.ts +0 -23
- package/lib/cancellation.d.ts.map +0 -1
- package/lib/cancellation.js +0 -120
- package/lib/cancellation.js.map +0 -1
- package/lib/charCode.d.ts +0 -406
- package/lib/charCode.d.ts.map +0 -1
- package/lib/charCode.js +0 -8
- package/lib/charCode.js.map +0 -1
- package/lib/character-classifier.d.ts +0 -25
- package/lib/character-classifier.d.ts.map +0 -1
- package/lib/character-classifier.js +0 -59
- package/lib/character-classifier.js.map +0 -1
- package/lib/const/encodings.d.ts +0 -10
- package/lib/const/encodings.d.ts.map +0 -1
- package/lib/const/encodings.js +0 -244
- package/lib/const/encodings.js.map +0 -1
- package/lib/cryptr.d.ts +0 -7
- package/lib/cryptr.js +0 -6
- package/lib/cryptr.js.map +0 -1
- package/lib/date.d.ts +0 -2
- package/lib/date.d.ts.map +0 -1
- package/lib/date.js +0 -22
- package/lib/date.js.map +0 -1
- package/lib/disposable.d.ts +0 -88
- package/lib/disposable.d.ts.map +0 -1
- package/lib/disposable.js +0 -316
- package/lib/disposable.js.map +0 -1
- package/lib/encoding/index.d.ts +0 -34
- package/lib/encoding/index.d.ts.map +0 -1
- package/lib/encoding/index.js +0 -219
- package/lib/encoding/index.js.map +0 -1
- package/lib/errors.d.ts +0 -56
- package/lib/errors.d.ts.map +0 -1
- package/lib/errors.js +0 -148
- package/lib/errors.js.map +0 -1
- package/lib/event.d.ts +0 -268
- package/lib/event.d.ts.map +0 -1
- package/lib/event.js +0 -816
- package/lib/event.js.map +0 -1
- package/lib/filters.d.ts +0 -47
- package/lib/filters.d.ts.map +0 -1
- package/lib/filters.js +0 -699
- package/lib/filters.js.map +0 -1
- package/lib/functional.d.ts +0 -4
- package/lib/functional.d.ts.map +0 -1
- package/lib/functional.js +0 -45
- package/lib/functional.js.map +0 -1
- package/lib/iterator.d.ts +0 -17
- package/lib/iterator.d.ts.map +0 -1
- package/lib/iterator.js +0 -24
- package/lib/iterator.js.map +0 -1
- package/lib/lifecycle.d.ts +0 -17
- package/lib/lifecycle.d.ts.map +0 -1
- package/lib/lifecycle.js +0 -39
- package/lib/lifecycle.js.map +0 -1
- package/lib/linked-list.d.ts +0 -18
- package/lib/linked-list.d.ts.map +0 -1
- package/lib/linked-list.js +0 -138
- package/lib/linked-list.js.map +0 -1
- package/lib/linkedText.d.ts +0 -13
- package/lib/linkedText.d.ts.map +0 -1
- package/lib/linkedText.js +0 -50
- package/lib/linkedText.js.map +0 -1
- package/lib/map.d.ts +0 -124
- package/lib/map.d.ts.map +0 -1
- package/lib/map.js +0 -819
- package/lib/map.js.map +0 -1
- package/lib/path.d.ts +0 -92
- package/lib/path.d.ts.map +0 -1
- package/lib/path.js +0 -1695
- package/lib/path.js.map +0 -1
- package/lib/platform.d.ts +0 -48
- package/lib/platform.d.ts.map +0 -1
- package/lib/platform.js +0 -153
- package/lib/platform.js.map +0 -1
- package/lib/process.d.ts +0 -5
- package/lib/process.d.ts.map +0 -1
- package/lib/process.js +0 -23
- package/lib/process.js.map +0 -1
- package/lib/progress.d.ts +0 -56
- package/lib/progress.d.ts.map +0 -1
- package/lib/progress.js +0 -27
- package/lib/progress.js.map +0 -1
- package/lib/sequence.d.ts +0 -20
- package/lib/sequence.d.ts.map +0 -1
- package/lib/sequence.js +0 -17
- package/lib/sequence.js.map +0 -1
- package/lib/uint.d.ts +0 -32
- package/lib/uint.d.ts.map +0 -1
- package/lib/uint.js +0 -28
- package/lib/uint.js.map +0 -1
- package/lib/uri.d.ts +0 -94
- package/lib/uri.d.ts.map +0 -1
- package/lib/uri.js +0 -231
- package/lib/uri.js.map +0 -1
- package/lib/utils/ansi.d.ts +0 -5
- package/lib/utils/ansi.d.ts.map +0 -1
- package/lib/utils/ansi.js +0 -14
- package/lib/utils/ansi.js.map +0 -1
- package/lib/utils/arrays.d.ts +0 -66
- package/lib/utils/arrays.d.ts.map +0 -1
- package/lib/utils/arrays.js +0 -260
- package/lib/utils/arrays.js.map +0 -1
- package/lib/utils/buffer.d.ts +0 -35
- package/lib/utils/buffer.d.ts.map +0 -1
- package/lib/utils/buffer.js +0 -174
- package/lib/utils/buffer.js.map +0 -1
- package/lib/utils/comparers.d.ts.map +0 -1
- package/lib/utils/comparers.js.map +0 -1
- package/lib/utils/decorators.d.ts +0 -11
- package/lib/utils/decorators.d.ts.map +0 -1
- package/lib/utils/decorators.js +0 -151
- package/lib/utils/decorators.js.map +0 -1
- package/lib/utils/file-uri.d.ts +0 -15
- package/lib/utils/file-uri.d.ts.map +0 -1
- package/lib/utils/file-uri.js +0 -46
- package/lib/utils/file-uri.js.map +0 -1
- package/lib/utils/glob.d.ts +0 -46
- package/lib/utils/glob.d.ts.map +0 -1
- package/lib/utils/glob.js +0 -556
- package/lib/utils/glob.js.map +0 -1
- package/lib/utils/hash.d.ts +0 -38
- package/lib/utils/hash.d.ts.map +0 -1
- package/lib/utils/hash.js +0 -294
- package/lib/utils/hash.js.map +0 -1
- package/lib/utils/index.d.ts +0 -15
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -18
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/json.d.ts +0 -76
- package/lib/utils/json.d.ts.map +0 -1
- package/lib/utils/json.js +0 -188
- package/lib/utils/json.js.map +0 -1
- package/lib/utils/markdown.d.ts.map +0 -1
- package/lib/utils/markdown.js.map +0 -1
- package/lib/utils/marshalling.d.ts +0 -7
- package/lib/utils/marshalling.d.ts.map +0 -1
- package/lib/utils/marshalling.js +0 -59
- package/lib/utils/marshalling.js.map +0 -1
- package/lib/utils/objects.d.ts +0 -6
- package/lib/utils/objects.d.ts.map +0 -1
- package/lib/utils/objects.js +0 -103
- package/lib/utils/objects.js.map +0 -1
- package/lib/utils/os.d.ts +0 -49
- package/lib/utils/os.d.ts.map +0 -1
- package/lib/utils/os.js +0 -98
- package/lib/utils/os.js.map +0 -1
- package/lib/utils/paths.d.ts +0 -35
- package/lib/utils/paths.d.ts.map +0 -1
- package/lib/utils/paths.js +0 -313
- package/lib/utils/paths.js.map +0 -1
- package/lib/utils/promise-util.d.ts +0 -10
- package/lib/utils/promise-util.d.ts.map +0 -1
- package/lib/utils/promise-util.js +0 -17
- package/lib/utils/promise-util.js.map +0 -1
- package/lib/utils/strings.d.ts +0 -181
- package/lib/utils/strings.d.ts.map +0 -1
- package/lib/utils/strings.js +0 -858
- package/lib/utils/strings.js.map +0 -1
- package/lib/utils/types.d.ts +0 -69
- package/lib/utils/types.d.ts.map +0 -1
- package/lib/utils/types.js +0 -201
- package/lib/utils/types.js.map +0 -1
- package/lib/uuid.d.ts +0 -2
- package/lib/uuid.d.ts.map +0 -1
- package/lib/uuid.js +0 -10
- package/lib/uuid.js.map +0 -1
package/lib/utils/marshalling.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* ---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.revive = exports.parse = exports.stringify = void 0;
|
|
8
|
-
const uri_1 = require("../uri");
|
|
9
|
-
const strings_1 = require("./strings");
|
|
10
|
-
function stringify(obj) {
|
|
11
|
-
return JSON.stringify(obj, replacer);
|
|
12
|
-
}
|
|
13
|
-
exports.stringify = stringify;
|
|
14
|
-
function parse(text) {
|
|
15
|
-
let data = JSON.parse(text);
|
|
16
|
-
data = revive(data, 0);
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
exports.parse = parse;
|
|
20
|
-
function replacer(key, value) {
|
|
21
|
-
// URI is done via toJSON-member
|
|
22
|
-
if (value instanceof RegExp) {
|
|
23
|
-
return {
|
|
24
|
-
$mid: 2,
|
|
25
|
-
source: value.source,
|
|
26
|
-
flags: (0, strings_1.regExpFlags)(value),
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
31
|
-
function revive(obj, depth = 0) {
|
|
32
|
-
if (!obj || depth > 200) {
|
|
33
|
-
return obj;
|
|
34
|
-
}
|
|
35
|
-
if (typeof obj === 'object') {
|
|
36
|
-
switch (obj.$mid) {
|
|
37
|
-
case 1:
|
|
38
|
-
return uri_1.URI.revive(obj);
|
|
39
|
-
case 2:
|
|
40
|
-
return new RegExp(obj.source, obj.flags);
|
|
41
|
-
}
|
|
42
|
-
if (Array.isArray(obj)) {
|
|
43
|
-
for (let i = 0; i < obj.length; ++i) {
|
|
44
|
-
obj[i] = revive(obj[i], depth + 1);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
// walk object
|
|
49
|
-
for (const key in obj) {
|
|
50
|
-
if (Object.hasOwnProperty.call(obj, key)) {
|
|
51
|
-
obj[key] = revive(obj[key], depth + 1);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return obj;
|
|
57
|
-
}
|
|
58
|
-
exports.revive = revive;
|
|
59
|
-
//# sourceMappingURL=marshalling.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marshalling.js","sourceRoot":"","sources":["../../src/utils/marshalling.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,gCAA6B;AAE7B,uCAAwC;AAExC,SAAgB,SAAS,CAAC,GAAQ;IAChC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AACvC,CAAC;AAFD,8BAEC;AAED,SAAgB,KAAK,CAAC,IAAY;IAChC,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACvB,OAAO,IAAI,CAAC;AACd,CAAC;AAJD,sBAIC;AAMD,SAAS,QAAQ,CAAC,GAAW,EAAE,KAAU;IACvC,gCAAgC;IAChC,IAAI,KAAK,YAAY,MAAM,EAAE;QAC3B,OAAO;YACL,IAAI,EAAE,CAAC;YACP,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,IAAA,qBAAW,EAAC,KAAK,CAAC;SAC1B,CAAC;KACH;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,MAAM,CAAC,GAAQ,EAAE,KAAK,GAAG,CAAC;IACxC,IAAI,CAAC,GAAG,IAAI,KAAK,GAAG,GAAG,EAAE;QACvB,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC3B,QAAS,GAAwB,CAAC,IAAI,EAAE;YACtC,KAAK,CAAC;gBACJ,OAAO,SAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACzB,KAAK,CAAC;gBACJ,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;SAC5C;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;gBACnC,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;aACpC;SACF;aAAM;YACL,cAAc;YACd,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;gBACrB,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;oBACxC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;iBACxC;aACF;SACF;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AA5BD,wBA4BC"}
|
package/lib/utils/objects.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function deepFreeze<T>(obj: T): T;
|
|
2
|
-
export declare function cloneAndChange(obj: any, changer: (orig: any) => any): any;
|
|
3
|
-
export declare function deepClone<T>(obj: T): T;
|
|
4
|
-
export declare function isPlainObject(obj: object): boolean;
|
|
5
|
-
export declare function removeUndefined<T extends object = any>(obj: T): T;
|
|
6
|
-
//# sourceMappingURL=objects.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/utils/objects.ts"],"names":[],"mappings":"AAUA,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAkBvC;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,CAEzE;AAsCD,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAiBtC;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,WAExC;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAWjE"}
|
package/lib/utils/objects.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* ---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
// Some code copied and modified from https://github.com/microsoft/vscode/blob/1.44.0/src/vs/base/common/objects.ts
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.removeUndefined = exports.isPlainObject = exports.deepClone = exports.cloneAndChange = exports.deepFreeze = void 0;
|
|
9
|
-
const types_1 = require("./types");
|
|
10
|
-
const _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
11
|
-
function deepFreeze(obj) {
|
|
12
|
-
if (!obj || typeof obj !== 'object') {
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
const stack = [obj];
|
|
16
|
-
while (stack.length > 0) {
|
|
17
|
-
const objectToFreeze = stack.shift();
|
|
18
|
-
Object.freeze(objectToFreeze);
|
|
19
|
-
for (const key in objectToFreeze) {
|
|
20
|
-
if (_hasOwnProperty.call(objectToFreeze, key)) {
|
|
21
|
-
const prop = objectToFreeze[key];
|
|
22
|
-
if (typeof prop === 'object' && !Object.isFrozen(prop)) {
|
|
23
|
-
stack.push(prop);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return obj;
|
|
29
|
-
}
|
|
30
|
-
exports.deepFreeze = deepFreeze;
|
|
31
|
-
function cloneAndChange(obj, changer) {
|
|
32
|
-
return _cloneAndChange(obj, changer, new Set());
|
|
33
|
-
}
|
|
34
|
-
exports.cloneAndChange = cloneAndChange;
|
|
35
|
-
function _cloneAndChange(obj, changer, seen) {
|
|
36
|
-
if ((0, types_1.isUndefinedOrNull)(obj)) {
|
|
37
|
-
return obj;
|
|
38
|
-
}
|
|
39
|
-
const changed = changer(obj);
|
|
40
|
-
if (typeof changed !== 'undefined') {
|
|
41
|
-
return changed;
|
|
42
|
-
}
|
|
43
|
-
if ((0, types_1.isArray)(obj)) {
|
|
44
|
-
const r1 = [];
|
|
45
|
-
for (const e of obj) {
|
|
46
|
-
r1.push(_cloneAndChange(e, changer, seen));
|
|
47
|
-
}
|
|
48
|
-
return r1;
|
|
49
|
-
}
|
|
50
|
-
if ((0, types_1.isObject)(obj)) {
|
|
51
|
-
if (seen.has(obj)) {
|
|
52
|
-
throw new Error('Cannot clone recursive data-structure');
|
|
53
|
-
}
|
|
54
|
-
seen.add(obj);
|
|
55
|
-
const r2 = {};
|
|
56
|
-
for (const i2 in obj) {
|
|
57
|
-
if (_hasOwnProperty.call(obj, i2)) {
|
|
58
|
-
r2[i2] = _cloneAndChange(obj[i2], changer, seen);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
seen.delete(obj);
|
|
62
|
-
return r2;
|
|
63
|
-
}
|
|
64
|
-
return obj;
|
|
65
|
-
}
|
|
66
|
-
function deepClone(obj) {
|
|
67
|
-
if (!obj || typeof obj !== 'object') {
|
|
68
|
-
return obj;
|
|
69
|
-
}
|
|
70
|
-
if (obj instanceof RegExp) {
|
|
71
|
-
return obj;
|
|
72
|
-
}
|
|
73
|
-
const result = Array.isArray(obj) ? [] : {};
|
|
74
|
-
Object.keys(obj).forEach((key) => {
|
|
75
|
-
const prop = obj[key];
|
|
76
|
-
if (prop && typeof prop === 'object') {
|
|
77
|
-
result[key] = deepClone(prop);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
result[key] = prop;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
exports.deepClone = deepClone;
|
|
86
|
-
function isPlainObject(obj) {
|
|
87
|
-
return typeof obj === 'object' && obj.constructor === Object;
|
|
88
|
-
}
|
|
89
|
-
exports.isPlainObject = isPlainObject;
|
|
90
|
-
function removeUndefined(obj) {
|
|
91
|
-
if (!isPlainObject(obj)) {
|
|
92
|
-
return obj;
|
|
93
|
-
}
|
|
94
|
-
const keys = Object.keys(obj);
|
|
95
|
-
keys.forEach((key) => {
|
|
96
|
-
if (obj[key] === undefined) {
|
|
97
|
-
delete obj[key];
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
return obj;
|
|
101
|
-
}
|
|
102
|
-
exports.removeUndefined = removeUndefined;
|
|
103
|
-
//# sourceMappingURL=objects.js.map
|
package/lib/utils/objects.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../../src/utils/objects.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,mHAAmH;;;AAEnH,mCAA+D;AAE/D,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAExD,SAAgB,UAAU,CAAI,GAAM;IAClC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QACnC,OAAO,GAAG,CAAC;KACZ;IACD,MAAM,KAAK,GAAU,CAAC,G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C;AAChB,CAAC;AAjBD,8BAiBC;AAED,SAAgB,aAAa,CAAC,GAAW;IACvC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,WAAW,KAAK,MAAM,CAAC;AAC/D,CAAC;AAFD,sCAEC;AAED,SAAgB,eAAe,CAAyB,GAAM;IAC5D,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE;QACvB,OAAO,GAAG,CAAC;KACZ;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YAC1B,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACjB;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AAXD,0CAWC"}
|
package/lib/utils/os.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/** ******************************************************************************
|
|
2
|
-
* Copyright (C) 2017 TypeFox and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
export declare const isWindows: boolean;
|
|
17
|
-
export declare const isOSX: boolean;
|
|
18
|
-
export declare const isLinux: boolean;
|
|
19
|
-
export declare type CMD = [string, string[]];
|
|
20
|
-
export declare function cmd(command: string, ...args: string[]): CMD;
|
|
21
|
-
export declare namespace OS {
|
|
22
|
-
/**
|
|
23
|
-
* Enumeration of the supported operating systems.
|
|
24
|
-
*/
|
|
25
|
-
enum Type {
|
|
26
|
-
Windows = "Windows",
|
|
27
|
-
Linux = "Linux",
|
|
28
|
-
OSX = "OSX"
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Returns with the type of the operating system. If it is neither [Windows](isWindows) nor [OS X](isOSX), then
|
|
32
|
-
* it always return with the `Linux` OS type.
|
|
33
|
-
*/
|
|
34
|
-
function type(): OS.Type;
|
|
35
|
-
}
|
|
36
|
-
export declare function isNodeIntegrated(): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated isElectronEnv is deprecated, please use appConfig#isElectronRenderer instead.
|
|
39
|
-
* 框架目前使用 isElectronEnv 的场景基本都与 isElectronRenderer 重复,所以直接废弃 isElectronEnv
|
|
40
|
-
*/
|
|
41
|
-
export declare function isElectronEnv(): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated isElectronRenderer will deprecate, please use appConfig#isElectronRenderer instead.
|
|
44
|
-
*/
|
|
45
|
-
export declare function isElectronRenderer(): any;
|
|
46
|
-
export declare function isElectronNode(): boolean;
|
|
47
|
-
export declare function isDevelopment(): any;
|
|
48
|
-
export declare function getNodeRequire(): any;
|
|
49
|
-
//# sourceMappingURL=os.d.ts.map
|
package/lib/utils/os.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../../src/utils/os.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAiBlF,eAAO,MAAM,SAAS,SAAyB,CAAC;AAChD,eAAO,MAAM,KAAK,SAAsB,CAAC;AACzC,eAAO,MAAM,OAAO,SAAuB,CAAC;AAE5C,oBAAY,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AACrC,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,GAAG,CAE3D;AAED,yBAAiB,EAAE,CAAC;IAClB;;OAEG;IACH,KAAY,IAAI;QACd,OAAO,YAAY;QACnB,KAAK,UAAU;QACf,GAAG,QAAQ;KACZ;IAED;;;OAGG;IACH,SAAgB,IAAI,IAAI,EAAE,CAAC,IAAI,CAQ9B;CACF;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,QAEjC;AAED,wBAAgB,cAAc,YAE7B;AAED,wBAAgB,aAAa,QAE5B;AASD,wBAAgB,cAAc,QAE7B"}
|
package/lib/utils/os.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** ******************************************************************************
|
|
3
|
-
* Copyright (C) 2017 TypeFox and others.
|
|
4
|
-
*
|
|
5
|
-
* This program and the accompanying materials are made available under the
|
|
6
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
*
|
|
9
|
-
* This Source Code may also be made available under the following Secondary
|
|
10
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
* with the GNU Classpath Exception which is available at
|
|
13
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
*
|
|
15
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
-
********************************************************************************/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.getNodeRequire = exports.isDevelopment = exports.isElectronNode = exports.isElectronRenderer = exports.isElectronEnv = exports.isNodeIntegrated = exports.OS = exports.cmd = exports.isLinux = exports.isOSX = exports.isWindows = void 0;
|
|
19
|
-
function is(userAgent, platform) {
|
|
20
|
-
if (global.hasOwnProperty('platform')) {
|
|
21
|
-
return global.platform === platform;
|
|
22
|
-
}
|
|
23
|
-
if (typeof process !== 'undefined' && process.platform !== 'browser') {
|
|
24
|
-
return process.platform === platform;
|
|
25
|
-
}
|
|
26
|
-
if (typeof navigator !== 'undefined') {
|
|
27
|
-
if (navigator.userAgent && navigator.userAgent.indexOf(userAgent) >= 0) {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
exports.isWindows = is('Windows', 'win32');
|
|
34
|
-
exports.isOSX = is('Mac', 'darwin');
|
|
35
|
-
exports.isLinux = is('Linux', 'linux');
|
|
36
|
-
function cmd(command, ...args) {
|
|
37
|
-
return [exports.isWindows ? 'cmd' : command, exports.isWindows ? ['/c', command, ...args] : args];
|
|
38
|
-
}
|
|
39
|
-
exports.cmd = cmd;
|
|
40
|
-
var OS;
|
|
41
|
-
(function (OS) {
|
|
42
|
-
/**
|
|
43
|
-
* Enumeration of the supported operating systems.
|
|
44
|
-
*/
|
|
45
|
-
let Type;
|
|
46
|
-
(function (Type) {
|
|
47
|
-
Type["Windows"] = "Windows";
|
|
48
|
-
Type["Linux"] = "Linux";
|
|
49
|
-
Type["OSX"] = "OSX";
|
|
50
|
-
})(Type = OS.Type || (OS.Type = {}));
|
|
51
|
-
/**
|
|
52
|
-
* Returns with the type of the operating system. If it is neither [Windows](isWindows) nor [OS X](isOSX), then
|
|
53
|
-
* it always return with the `Linux` OS type.
|
|
54
|
-
*/
|
|
55
|
-
function type() {
|
|
56
|
-
if (exports.isWindows) {
|
|
57
|
-
return Type.Windows;
|
|
58
|
-
}
|
|
59
|
-
if (exports.isOSX) {
|
|
60
|
-
return Type.OSX;
|
|
61
|
-
}
|
|
62
|
-
return Type.Linux;
|
|
63
|
-
}
|
|
64
|
-
OS.type = type;
|
|
65
|
-
})(OS = exports.OS || (exports.OS = {}));
|
|
66
|
-
function isNodeIntegrated() {
|
|
67
|
-
return typeof module !== 'undefined' && !!module.exports;
|
|
68
|
-
}
|
|
69
|
-
exports.isNodeIntegrated = isNodeIntegrated;
|
|
70
|
-
/**
|
|
71
|
-
* @deprecated isElectronEnv is deprecated, please use appConfig#isElectronRenderer instead.
|
|
72
|
-
* 框架目前使用 isElectronEnv 的场景基本都与 isElectronRenderer 重复,所以直接废弃 isElectronEnv
|
|
73
|
-
*/
|
|
74
|
-
function isElectronEnv() {
|
|
75
|
-
return isElectronRenderer() || isElectronNode();
|
|
76
|
-
}
|
|
77
|
-
exports.isElectronEnv = isElectronEnv;
|
|
78
|
-
/**
|
|
79
|
-
* @deprecated isElectronRenderer will deprecate, please use appConfig#isElectronRenderer instead.
|
|
80
|
-
*/
|
|
81
|
-
function isElectronRenderer() {
|
|
82
|
-
return global.isElectronRenderer;
|
|
83
|
-
}
|
|
84
|
-
exports.isElectronRenderer = isElectronRenderer;
|
|
85
|
-
function isElectronNode() {
|
|
86
|
-
return process && process.env && !!process.env.ELECTRON_RUN_AS_NODE;
|
|
87
|
-
}
|
|
88
|
-
exports.isElectronNode = isElectronNode;
|
|
89
|
-
function isDevelopment() {
|
|
90
|
-
return global.isDev || (process && process.env.IS_DEV);
|
|
91
|
-
}
|
|
92
|
-
exports.isDevelopment = isDevelopment;
|
|
93
|
-
// https://github.com/webpack/webpack/issues/4175#issuecomment-342931035
|
|
94
|
-
function getNodeRequire() {
|
|
95
|
-
return typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require;
|
|
96
|
-
}
|
|
97
|
-
exports.getNodeRequire = getNodeRequire;
|
|
98
|
-
//# sourceMappingURL=os.js.map
|
package/lib/utils/os.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"os.js","sourceRoot":"","sources":["../../src/utils/os.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,SA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AAO,IAAI,CAAC,OAAO,CAAC;SACrB;QACD,IAAI,aAAK,EAAE;YACT,OAAO,IAAI,CAAC,GAAG,CAAC;SACjB;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IARe,OAAI,OAQnB,CAAA;AACH,CAAC,EAvBgB,EAAE,GAAF,UAAE,KAAF,UAAE,QAuBlB;AAED,SAAgB,gBAAgB;IAC9B,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AAC3D,CAAC;AAFD,4CAEC;AAED;;;GAGG;AACH,SAAgB,aAAa;IAC3B,OAAO,kBAAkB,EAAE,IAAI,cAAc,EAAE,CAAC;AAClD,CAAC;AAFD,sCAEC;AAED;;GAEG;AACH,SAAgB,kBAAkB;IAChC,OAAQ,MAAc,CAAC,kBAAkB,CAAC;AAC5C,CAAC;AAFD,gDAEC;AAED,SAAgB,cAAc;IAC5B,OAAO,OAAO,IAAI,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;AACtE,CAAC;AAFD,wCAEC;AAED,SAAgB,aAAa;IAC3B,OAAQ,MAAc,CAAC,KAAK,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAClE,CAAC;AAFD,sCAEC;AAQD,wEAAwE;AACxE,SAAgB,cAAc;IAC5B,OAAO,OAAO,mBAAmB,KAAK,UAAU,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,OAAO,CAAC;AACvF,CAAC;AAFD,wCAEC"}
|
package/lib/utils/paths.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The forward slash path separator.
|
|
3
|
-
*/
|
|
4
|
-
export declare const sep = "/";
|
|
5
|
-
/**
|
|
6
|
-
* The native path separator depending on the OS.
|
|
7
|
-
*/
|
|
8
|
-
export declare const nativeSep: string;
|
|
9
|
-
/**
|
|
10
|
-
* Takes a Windows OS path and changes backward slashes to forward slashes.
|
|
11
|
-
* This should only be done for OS paths from Windows (or user provided paths potentially from Windows).
|
|
12
|
-
* Using it on a Linux or MaxOS path might change it.
|
|
13
|
-
*/
|
|
14
|
-
export declare function toSlashes(osPath: string): string;
|
|
15
|
-
/**
|
|
16
|
-
* @returns the base name of a path.
|
|
17
|
-
*/
|
|
18
|
-
export declare function basename(path: string): string;
|
|
19
|
-
/**
|
|
20
|
-
* @returns `.far` from `boo.far` or the empty string.
|
|
21
|
-
*/
|
|
22
|
-
export declare function extname(path: string): string;
|
|
23
|
-
export declare function normalize(path: string, toOSPath?: boolean): string;
|
|
24
|
-
/**
|
|
25
|
-
* Computes the _root_ this path, like `getRoot('c:\files') === c:\`,
|
|
26
|
-
* `getRoot('files:///files/path') === files:///`,
|
|
27
|
-
* or `getRoot('\\server\shares\path') === \\server\shares\`
|
|
28
|
-
*/
|
|
29
|
-
export declare function getRoot(path: string, sep?: string): string;
|
|
30
|
-
export declare function isEqualOrParent(path: string, candidate: string, ignoreCase?: boolean): boolean;
|
|
31
|
-
export declare function resolve(...paths: string[]): string;
|
|
32
|
-
export declare function relative(from: string, to: string): string;
|
|
33
|
-
export declare function replaceAsarInPath(pathMayInAsar: string): string;
|
|
34
|
-
export declare function isValidBasename(name: string | null | undefined, isWindowsOS?: boolean): boolean;
|
|
35
|
-
//# sourceMappingURL=paths.d.ts.map
|
package/lib/utils/paths.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,eAAO,MAAM,GAAG,MAAM,CAAC;AAEvB;;GAEG;AACH,eAAO,MAAM,SAAS,QAAyB,CAAC;AAKhD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,UAEvC;AAMD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAS7C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI5C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAoDlE;AAMD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAM,GAAG,MAAM,CAwEvD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAoC9F;AAED,wBAAgB,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAmBlD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CA4CzD;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,UAQtD;AAMD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,WAAW,GAAE,OAAmB,GAAG,OAAO,CAiC1G"}
|