mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(core): remove ses lockdown (#5350)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import '../polyfill/ses-lockdown';
|
||||
import '../polyfill/intl-segmenter';
|
||||
|
||||
import { assertExists } from '@blocksuite/global/utils';
|
||||
@@ -19,7 +18,7 @@ async function main() {
|
||||
const { setup } = await import('../bootstrap/setup');
|
||||
const rootStore = getCurrentStore();
|
||||
setup();
|
||||
const { _pluginNestedImportsMap } = createSetup(rootStore);
|
||||
createSetup(rootStore);
|
||||
const pluginRegisterPromise = bootstrapPluginSystem(rootStore);
|
||||
const root = document.getElementById('app');
|
||||
assertExists(root);
|
||||
@@ -27,11 +26,6 @@ async function main() {
|
||||
const App = () => {
|
||||
use(pluginRegisterPromise);
|
||||
const plugins = useAtomValue(loadedPluginNameAtom);
|
||||
_pluginNestedImportsMap.forEach(value => {
|
||||
const exports = value.get('index.js');
|
||||
assertExists(exports);
|
||||
assertExists(exports?.get('entry'));
|
||||
});
|
||||
return (
|
||||
<div>
|
||||
<div data-plugins-load-status="success">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import './polyfill/ses-lockdown';
|
||||
import 'ses';
|
||||
import './polyfill/intl-segmenter';
|
||||
import './polyfill/request-idle-callback';
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import 'ses';
|
||||
|
||||
if (!process.env.COVERAGE) {
|
||||
lockdown({
|
||||
evalTaming: 'unsafeEval',
|
||||
overrideTaming: 'severe',
|
||||
consoleTaming: 'unsafe',
|
||||
errorTaming: 'unsafe',
|
||||
errorTrapping: 'platform',
|
||||
unhandledRejectionTrapping: 'report',
|
||||
});
|
||||
|
||||
console.log('SES lockdown complete');
|
||||
} else {
|
||||
Object.defineProperty(globalThis, 'harden', {
|
||||
value: (x: any) => Object.freeze(x),
|
||||
writable: false,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user