@lvce-editor/extension-detail-view 4.14.0 → 4.16.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.
|
@@ -662,6 +662,18 @@ const getCommandsVirtualDom = state => {
|
|
|
662
662
|
return getFeatureCommandsVirtualDom(state.commands);
|
|
663
663
|
};
|
|
664
664
|
|
|
665
|
+
const existsJson = async schemaUrl => {
|
|
666
|
+
try {
|
|
667
|
+
// TODO verify that response header is json
|
|
668
|
+
const response = await fetch(schemaUrl, {
|
|
669
|
+
method: 'HEAD'
|
|
670
|
+
});
|
|
671
|
+
return response.ok;
|
|
672
|
+
} catch {
|
|
673
|
+
return false;
|
|
674
|
+
}
|
|
675
|
+
};
|
|
676
|
+
|
|
665
677
|
const isExternalLink$1 = schema => {
|
|
666
678
|
return schema.startsWith('http://') || schema.startsWith('https://');
|
|
667
679
|
};
|
|
@@ -722,17 +734,6 @@ const getSchemaLinkUrl = (schema, extensionUri) => {
|
|
|
722
734
|
}
|
|
723
735
|
};
|
|
724
736
|
|
|
725
|
-
const existsJson = async schemaUrl => {
|
|
726
|
-
try {
|
|
727
|
-
// TODO verify that response header is json
|
|
728
|
-
const response = await fetch(schemaUrl, {
|
|
729
|
-
method: 'HEAD'
|
|
730
|
-
});
|
|
731
|
-
return response.ok;
|
|
732
|
-
} catch {
|
|
733
|
-
return false;
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
737
|
const getJsonValidationInfos = async (extensionUri, validations) => {
|
|
737
738
|
const validationInfos = [];
|
|
738
739
|
for (const validation of validations) {
|
|
@@ -758,6 +759,7 @@ const getJsonValidationInfos = async (extensionUri, validations) => {
|
|
|
758
759
|
fileMatch
|
|
759
760
|
});
|
|
760
761
|
} else if (schemaLinkUrl) {
|
|
762
|
+
// TODO maybe better use filesystem.exists
|
|
761
763
|
if (await existsJson(schemaLinkUrl)) {
|
|
762
764
|
validationInfos.push({
|
|
763
765
|
isValid: true,
|
|
@@ -2084,7 +2086,7 @@ const getRuntimeStatus$2 = async extensionId => {
|
|
|
2084
2086
|
// @ts-ignore
|
|
2085
2087
|
return invoke$4('ExtensionHost.getRuntimeStatus', extensionId);
|
|
2086
2088
|
};
|
|
2087
|
-
const registerMockRpc$
|
|
2089
|
+
const registerMockRpc$3 = commandMap => {
|
|
2088
2090
|
const mockRpc = createMockRpc({
|
|
2089
2091
|
commandMap
|
|
2090
2092
|
});
|
|
@@ -2100,7 +2102,7 @@ const ExtensionHost = {
|
|
|
2100
2102
|
getRuntimeStatus: getRuntimeStatus$2,
|
|
2101
2103
|
invoke: invoke$4,
|
|
2102
2104
|
invokeAndTransfer: invokeAndTransfer$3,
|
|
2103
|
-
registerMockRpc: registerMockRpc$
|
|
2105
|
+
registerMockRpc: registerMockRpc$3,
|
|
2104
2106
|
set: set$9
|
|
2105
2107
|
};
|
|
2106
2108
|
|
|
@@ -2160,6 +2162,13 @@ const appendFile = async (uri, text) => {
|
|
|
2160
2162
|
// @ts-ignore
|
|
2161
2163
|
return invoke$3('FileSystem.appendFile', uri, text);
|
|
2162
2164
|
};
|
|
2165
|
+
const registerMockRpc$2 = commandMap => {
|
|
2166
|
+
const mockRpc = createMockRpc({
|
|
2167
|
+
commandMap
|
|
2168
|
+
});
|
|
2169
|
+
set$8(mockRpc);
|
|
2170
|
+
return mockRpc;
|
|
2171
|
+
};
|
|
2163
2172
|
|
|
2164
2173
|
const FileSystemWorker = {
|
|
2165
2174
|
__proto__: null,
|
|
@@ -2177,6 +2186,7 @@ const FileSystemWorker = {
|
|
|
2177
2186
|
readDirWithFileTypes,
|
|
2178
2187
|
readFile: readFile$3,
|
|
2179
2188
|
readFileAsBlob: readFileAsBlob$1,
|
|
2189
|
+
registerMockRpc: registerMockRpc$2,
|
|
2180
2190
|
remove,
|
|
2181
2191
|
rename,
|
|
2182
2192
|
set: set$8,
|
|
@@ -2198,6 +2208,13 @@ const render$1 = async (markdown, options) => {
|
|
|
2198
2208
|
// @ts-ignore
|
|
2199
2209
|
return invoke$2('Markdown.render', markdown, options);
|
|
2200
2210
|
};
|
|
2211
|
+
const registerMockRpc$1 = commandMap => {
|
|
2212
|
+
const mockRpc = createMockRpc({
|
|
2213
|
+
commandMap
|
|
2214
|
+
});
|
|
2215
|
+
set$7(mockRpc);
|
|
2216
|
+
return mockRpc;
|
|
2217
|
+
};
|
|
2201
2218
|
|
|
2202
2219
|
const MarkdownWorker = {
|
|
2203
2220
|
__proto__: null,
|
|
@@ -2205,6 +2222,7 @@ const MarkdownWorker = {
|
|
|
2205
2222
|
getVirtualDom: getVirtualDom$1,
|
|
2206
2223
|
invoke: invoke$2,
|
|
2207
2224
|
invokeAndTransfer: invokeAndTransfer$1,
|
|
2225
|
+
registerMockRpc: registerMockRpc$1,
|
|
2208
2226
|
render: render$1,
|
|
2209
2227
|
set: set$7
|
|
2210
2228
|
};
|
|
@@ -2796,11 +2814,12 @@ const getScrollToTopVirtualDom = scrollToTopButtonEnabled => {
|
|
|
2796
2814
|
}];
|
|
2797
2815
|
};
|
|
2798
2816
|
|
|
2817
|
+
/* eslint-disable unicorn/prefer-export-from */
|
|
2818
|
+
|
|
2799
2819
|
const {
|
|
2800
2820
|
set: set$4,
|
|
2801
2821
|
getVirtualDom,
|
|
2802
|
-
render
|
|
2803
|
-
} = MarkdownWorker;
|
|
2822
|
+
render} = MarkdownWorker;
|
|
2804
2823
|
|
|
2805
2824
|
const getMarkdownVirtualDom = async (html, options) => {
|
|
2806
2825
|
string(html);
|
|
@@ -3252,6 +3271,8 @@ const terminate = () => {
|
|
|
3252
3271
|
globalThis.close();
|
|
3253
3272
|
};
|
|
3254
3273
|
|
|
3274
|
+
/* eslint-disable unicorn/prefer-export-from */
|
|
3275
|
+
|
|
3255
3276
|
const {
|
|
3256
3277
|
disableExtension: disableExtension$1,
|
|
3257
3278
|
enableExtension: enableExtension$1,
|
|
@@ -3269,8 +3290,7 @@ const {
|
|
|
3269
3290
|
showContextMenu,
|
|
3270
3291
|
uninstallExtension,
|
|
3271
3292
|
writeClipBoardImage,
|
|
3272
|
-
writeClipBoardText
|
|
3273
|
-
} = RendererWorker;
|
|
3293
|
+
writeClipBoardText} = RendererWorker;
|
|
3274
3294
|
|
|
3275
3295
|
const writeClipboardImage = async blob => {
|
|
3276
3296
|
await writeClipBoardImage(blob);
|
|
@@ -3279,12 +3299,13 @@ const writeText = async text => {
|
|
|
3279
3299
|
await writeClipBoardText(text);
|
|
3280
3300
|
};
|
|
3281
3301
|
|
|
3302
|
+
/* eslint-disable unicorn/prefer-export-from */
|
|
3303
|
+
|
|
3282
3304
|
const {
|
|
3283
3305
|
set: set$1,
|
|
3284
3306
|
exists,
|
|
3285
3307
|
readFile: readFile$1,
|
|
3286
|
-
invoke
|
|
3287
|
-
} = FileSystemWorker;
|
|
3308
|
+
invoke} = FileSystemWorker;
|
|
3288
3309
|
const readFileAsBlob = async uri => {
|
|
3289
3310
|
// TODO maybe readAsObjectUrl?
|
|
3290
3311
|
// @ts-ignore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/extension-detail-view",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "Extension Detail View Worker",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"main": "dist/extensionDetailViewWorkerMain.js",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@lvce-editor/constants": "^1.
|
|
14
|
+
"@lvce-editor/constants": "^1.29.0"
|
|
15
15
|
}
|
|
16
16
|
}
|