@teambit/code.ui.queries.get-file-content 0.0.503 → 0.0.504
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/dist/get-file-content.js +4 -4
- package/dist/get-file-content.js.map +1 -1
- package/dist/{preview-1670210914694.js → preview-1670470092710.js} +0 -0
- package/get-file-content.ts +1 -1
- package/package-tar/teambit-code.ui.queries.get-file-content-0.0.504.tgz +0 -0
- package/package.json +2 -2
- package/package-tar/teambit-code.ui.queries.get-file-content-0.0.503.tgz +0 -0
package/dist/get-file-content.js
CHANGED
|
@@ -31,13 +31,13 @@ const getFile = (0, client_1.gql) `
|
|
|
31
31
|
}
|
|
32
32
|
`;
|
|
33
33
|
function useFileContent(componentId, filePath, skip) {
|
|
34
|
-
var _a;
|
|
34
|
+
var _a, _b;
|
|
35
35
|
const id = componentId === null || componentId === void 0 ? void 0 : componentId.toString();
|
|
36
|
-
const
|
|
36
|
+
const _c = (0, ui_foundation_ui_hooks_use_data_query_1.useDataQuery)(getFile, {
|
|
37
37
|
variables: { id, path: filePath },
|
|
38
38
|
skip: skip || !componentId || filePath === undefined,
|
|
39
|
-
}), { data } =
|
|
40
|
-
const fileContent = (_a = data === null || data === void 0 ? void 0 : data.getHost) === null || _a === void 0 ? void 0 : _a.get.getFile;
|
|
39
|
+
}), { data } = _c, rest = __rest(_c, ["data"]);
|
|
40
|
+
const fileContent = (_b = (_a = data === null || data === void 0 ? void 0 : data.getHost) === null || _a === void 0 ? void 0 : _a.get) === null || _b === void 0 ? void 0 : _b.getFile;
|
|
41
41
|
return Object.assign({ fileContent }, rest);
|
|
42
42
|
}
|
|
43
43
|
exports.useFileContent = useFileContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-file-content.js","sourceRoot":"","sources":["../get-file-content.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAAqC;AACrC,0GAA8E;AAG9E,MAAM,OAAO,GAAG,IAAA,YAAG,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BAAS,WAAW,IAAK,IAAI,EAAG;AAClC,CAAC;AAVD,wCAUC"}
|
|
File without changes
|
package/get-file-content.ts
CHANGED
|
@@ -40,7 +40,7 @@ export function useFileContent(componentId?: ComponentID, filePath?: string, ski
|
|
|
40
40
|
skip: skip || !componentId || filePath === undefined,
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
const fileContent = data?.getHost?.get
|
|
43
|
+
const fileContent = data?.getHost?.get?.getFile;
|
|
44
44
|
|
|
45
45
|
return { fileContent, ...rest };
|
|
46
46
|
}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/code.ui.queries.get-file-content",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.504",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/code/ui/queries/get-file-content",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.code",
|
|
8
8
|
"name": "ui/queries/get-file-content",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.504"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"core-js": "^3.0.0",
|
|
Binary file
|