Skip to content

Commit 7462a09

Browse files
committed
Update typings url
1 parent 02c4c7a commit 7462a09

File tree

1 file changed

+19
-13
lines changed
  • packages/app/src/app/store/providers

1 file changed

+19
-13
lines changed

packages/app/src/app/store/providers/FSSync.ts

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,25 @@ import { Provider } from 'cerebral';
22
import { getAbsoluteDependencies } from 'common/lib/utils/dependencies';
33
import { protocolAndHost } from 'common/lib/utils/url-generator';
44

5-
import { getGlobal } from 'common/lib/utils/global'
5+
import { getGlobal } from 'common/lib/utils/global';
66

77
const global = getGlobal() as Window & { BrowserFS: any };
88

99
const fs = global.BrowserFS.BFSRequire('fs');
10-
const SERVICE_URL = 'https://ata-fetcher.cloud/api/v4/typings';
10+
const SERVICE_URL = 'https://ata-fetcher.cloud/api/v5/typings';
1111

1212
let fileInterval;
1313
let lastMTime = new Date(0);
1414

1515
function sendTypes() {
16-
global.postMessage({
17-
$broadcast: true,
18-
$type: 'typings-sync',
19-
$data: types,
20-
}, protocolAndHost());
16+
global.postMessage(
17+
{
18+
$broadcast: true,
19+
$type: 'typings-sync',
20+
$data: types,
21+
},
22+
protocolAndHost()
23+
);
2124
}
2225

2326
let typeInfoPromise;
@@ -103,11 +106,14 @@ export default Provider({
103106
if (this.context.controller.getState().editor.currentId) {
104107
const { modulesByPath } = this.context.controller.getState().editor;
105108

106-
global.postMessage({
107-
$broadcast: true,
108-
$type: 'file-sync',
109-
$data: modulesByPath,
110-
}, protocolAndHost());
109+
global.postMessage(
110+
{
111+
$broadcast: true,
112+
$type: 'file-sync',
113+
$data: modulesByPath,
114+
},
115+
protocolAndHost()
116+
);
111117
}
112118
};
113119

@@ -136,7 +142,7 @@ export default Provider({
136142
});
137143
}
138144
});
139-
} catch (e) { }
145+
} catch (e) {}
140146
}, 1000);
141147

142148
self.addEventListener('message', evt => {

0 commit comments

Comments
 (0)