Parcel upgrade and global dependency update
This commit is contained in:
@@ -17,7 +17,10 @@ import { NodeCronHook } from "@plugos/plugos/hooks/node_cron";
|
||||
import { markdownSyscalls } from "@silverbulletmd/common/syscalls/markdown";
|
||||
import { EventedSpacePrimitives } from "@silverbulletmd/common/spaces/evented_space_primitives";
|
||||
import { Space } from "@silverbulletmd/common/spaces/space";
|
||||
import { createSandbox } from "@plugos/plugos/environments/node_sandbox";
|
||||
import {
|
||||
createSandbox,
|
||||
nodeModulesDir,
|
||||
} from "@plugos/plugos/environments/node_sandbox";
|
||||
import { jwtSyscalls } from "@plugos/plugos/syscalls/jwt";
|
||||
import buildMarkdown from "@silverbulletmd/common/parser";
|
||||
import { loadMarkdownExtensions } from "@silverbulletmd/common/markdown_ext";
|
||||
@@ -29,7 +32,14 @@ import { plugPrefix } from "@silverbulletmd/common/spaces/constants";
|
||||
import { Authenticator } from "./auth";
|
||||
import sandboxSyscalls from "@plugos/plugos/syscalls/sandbox";
|
||||
|
||||
import globalModules from "../common/dist/global.plug.json";
|
||||
// import globalModules from "../common/dist/global.plug.json";
|
||||
|
||||
const globalModules: any = JSON.parse(
|
||||
readFileSync(
|
||||
nodeModulesDir + "/node_modules/@silverbulletmd/web/dist/global.plug.json",
|
||||
"utf-8"
|
||||
)
|
||||
);
|
||||
|
||||
import { safeRun } from "./util";
|
||||
import {
|
||||
@@ -38,6 +48,7 @@ import {
|
||||
} from "@plugos/plugos/syscalls/fulltext.knex_sqlite";
|
||||
import { PlugSpacePrimitives } from "./hooks/plug_space_primitives";
|
||||
import { PageNamespaceHook } from "./hooks/page_namespace";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
const safeFilename = /^[a-zA-Z0-9_\-\.]+$/;
|
||||
|
||||
@@ -114,7 +125,7 @@ export class ExpressServer {
|
||||
for (let [modName, code] of Object.entries(
|
||||
globalModules.dependencies
|
||||
)) {
|
||||
await plug.sandbox.loadDependency(modName, code);
|
||||
await plug.sandbox.loadDependency(modName, code as string);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -66,12 +66,12 @@
|
||||
"yargs": "^17.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@parcel/packager-raw-url": "2.3.2",
|
||||
"@parcel/service-worker": "2.3.2",
|
||||
"@parcel/transformer-inline-string": "2.3.2",
|
||||
"@parcel/transformer-sass": "2.3.2",
|
||||
"@parcel/transformer-webmanifest": "2.3.2",
|
||||
"@parcel/validator-typescript": "2.3.2",
|
||||
"@parcel/packager-raw-url": "2.6.0",
|
||||
"@parcel/service-worker": "2.6.0",
|
||||
"@parcel/transformer-inline-string": "2.6.0",
|
||||
"@parcel/transformer-sass": "2.6.0",
|
||||
"@parcel/transformer-webmanifest": "2.6.0",
|
||||
"@parcel/validator-typescript": "2.6.0",
|
||||
"@types/cors": "^2.8.12",
|
||||
"@types/events": "^3.0.0",
|
||||
"@types/express": "^4.17.13",
|
||||
@@ -79,7 +79,7 @@
|
||||
"@types/node": "^17.0.21",
|
||||
"@vscode/sqlite3": "^5.0.7",
|
||||
"assert": "^2.0.0",
|
||||
"parcel": "2.3.2",
|
||||
"parcel": "2.6.0",
|
||||
"typescript": "^4.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user