fix create
This commit is contained in:
parent
d4dc1ffe15
commit
1e34f0d25d
|
|
@ -1,7 +0,0 @@
|
|||
import { createWeb } from "service/pkgs/service-web";
|
||||
|
||||
export const main = createWeb({
|
||||
name: "web",
|
||||
port: 4550,
|
||||
entry: "./src/index.tsx",
|
||||
});
|
||||
|
|
@ -1 +0,0 @@
|
|||
export * from "service-web/module";
|
||||
|
|
@ -6,34 +6,20 @@
|
|||
"maxParallelRequests": 20
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.22.5",
|
||||
"@floating-ui/react": "^0.24.8",
|
||||
"@babel/parser": "^7.23.0",
|
||||
"@floating-ui/react": "^0.26.0",
|
||||
"@minoru/react-dnd-treeview": "^3.4.4",
|
||||
"@monaco-editor/react": "^4.6.0",
|
||||
"@paralleldrive/cuid2": "2.2.2",
|
||||
"@parcel/service-worker": "^2.10.0",
|
||||
"@swc/wasm-web": "^1.3.76",
|
||||
"@types/lodash.concat": "^4.5.7",
|
||||
"@types/lodash.find": "^4.6.7",
|
||||
"@types/lodash.findindex": "^4.6.7",
|
||||
"@types/lodash.indexof": "^4.0.7",
|
||||
"@types/lodash.orderby": "^4.6.7",
|
||||
"@types/lodash.slice": "^4.2.7",
|
||||
"@types/lodash.throttle": "^4.1.7",
|
||||
"@types/lodash.transform": "^4.6.7",
|
||||
"@types/lodash.uniq": "^4.5.7",
|
||||
"@types/lodash.uniqby": "^4.7.7",
|
||||
"@types/react-is": "^18.2.1",
|
||||
"@types/textdiff-create": "^1.0.0",
|
||||
"@types/ua-parser-js": "^0.7.36",
|
||||
"algoliasearch": "^4.19.1",
|
||||
"@swc/wasm-web": "1.3.94-nightly-20231014.1",
|
||||
"algoliasearch": "^4.20.0",
|
||||
"date-fns": "^2.30.0",
|
||||
"downshift": "^8.2.2",
|
||||
"emmet-monaco-es": "^5.3.0",
|
||||
"esbuild-wasm": "^0.18.11",
|
||||
"esbuild-wasm": "^0.19.4",
|
||||
"idb-keyval": "^6.2.1",
|
||||
"js-base64": "^3.7.5",
|
||||
"lexical": "^0.11.1",
|
||||
"lodash.capitalize": "^4.2.1",
|
||||
"lodash.concat": "^4.5.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
|
|
@ -50,10 +36,9 @@
|
|||
"lodash.uniq": "^4.5.0",
|
||||
"lodash.uniqby": "^4.7.0",
|
||||
"lz-string": "1.5.0",
|
||||
"monaco-editor": "^0.39.0",
|
||||
"monaco-jsx-syntax-highlight-v2": "^1.2.2",
|
||||
"polywasm": "^0.1.3",
|
||||
"prettier": "2.8.7",
|
||||
"polywasm": "^0.1.4",
|
||||
"prettier": "3.0.3",
|
||||
"prop-types": "^15.8.1",
|
||||
"quill-delta": "^5.1.0",
|
||||
"react": "18.2.0",
|
||||
|
|
@ -62,48 +47,54 @@
|
|||
"react-dom": "18.2.0",
|
||||
"react-is": "^18.2.0",
|
||||
"react-use-error-boundary": "^3.0.0",
|
||||
"react-virtuoso": "^4.3.8",
|
||||
"react-virtuoso": "^4.6.1",
|
||||
"svgo": "^3.0.2",
|
||||
"textdiff-create": "^1.0.9",
|
||||
"textdiff-create": "^1.1.9",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"ua-parser-js": "^1.0.35",
|
||||
"uuid": "9.0.0",
|
||||
"ua-parser-js": "^1.0.36",
|
||||
"uuid": "9.0.1",
|
||||
"y-pojo": "^0.0.8",
|
||||
"yjs": "^13.6.1",
|
||||
"yjs": "^13.6.8",
|
||||
"yjs-types": "^0.0.1",
|
||||
"web-utils": "workspace:*",
|
||||
"dbgen": "workspace:*"
|
||||
|
||||
},
|
||||
"devDependencies": {
|
||||
"@parcel/config-default": "2.9.3",
|
||||
"@parcel/core": "2.9.3",
|
||||
"@parcel/reporter-bundle-analyzer": "^2.9.3",
|
||||
"@parcel/transformer-raw": "^2.9.3",
|
||||
"@types/lodash.concat": "^4.5.7",
|
||||
"@types/lodash.find": "^4.6.7",
|
||||
"@types/lodash.findindex": "^4.6.7",
|
||||
"@types/lodash.indexof": "^4.0.7",
|
||||
"@types/lodash.orderby": "^4.6.7",
|
||||
"@types/lodash.slice": "^4.2.7",
|
||||
"@types/lodash.throttle": "^4.1.7",
|
||||
"@types/lodash.transform": "^4.6.7",
|
||||
"@types/lodash.uniq": "^4.5.7",
|
||||
"@types/lodash.uniqby": "^4.7.7",
|
||||
"@types/react-is": "^18.2.2",
|
||||
"@types/textdiff-create": "^1.0.0",
|
||||
"@types/ua-parser-js": "^0.7.37",
|
||||
"@parcel/config-default": "2.10.0",
|
||||
"@parcel/core": "2.10.0",
|
||||
"@parcel/reporter-bundle-analyzer": "^2.10.0",
|
||||
"@parcel/transformer-raw": "^2.10.0",
|
||||
"@tinijs/parcel-reporter-copy-public": "0.0.2",
|
||||
"@types/lodash.capitalize": "4.2.7",
|
||||
"@types/lodash.debounce": "^4.0.7",
|
||||
"@types/lodash.get": "^4.4.7",
|
||||
"@types/lodash.set": "^4.3.7",
|
||||
"@types/lodash.trim": "4.5.7",
|
||||
"@types/prettier": "2.7.3",
|
||||
"@types/react": "18.2.9",
|
||||
"@types/react-dom": "18.2.4",
|
||||
"@types/tinycolor2": "^1.4.3",
|
||||
"@types/uuid": "9.0.2",
|
||||
"@types/vscode": "^1.79.0",
|
||||
"parcel": "2.9.3",
|
||||
"@types/prettier": "3.0.0",
|
||||
"@types/react": "18.2.28",
|
||||
"@types/react-dom": "18.2.13",
|
||||
"@types/tinycolor2": "^1.4.4",
|
||||
"@types/uuid": "9.0.5",
|
||||
"@types/vscode": "^1.83.0",
|
||||
"parcel": "2.10.0",
|
||||
"parcel-bundler-splitable": "0.0.4",
|
||||
"postcss": "8.4.24",
|
||||
"tailwindcss": "3.3.2"
|
||||
"postcss": "8.4.31",
|
||||
"tailwindcss": "3.3.3"
|
||||
},
|
||||
"staticFiles": {
|
||||
"staticPath": "public"
|
||||
},
|
||||
"external": [
|
||||
"hyper-express",
|
||||
"@swc/core",
|
||||
"lmdb",
|
||||
"*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const registerServiceWorker = async () => {
|
|||
if ("serviceWorker" in navigator) {
|
||||
try {
|
||||
await navigator.serviceWorker.register(
|
||||
new URL("./sw.js", import.meta.url),
|
||||
new URL("./sworker.js", import.meta.url),
|
||||
{
|
||||
type: "module",
|
||||
scope: "/",
|
||||
|
|
@ -15,3 +15,5 @@ const registerServiceWorker = async () => {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
registerServiceWorker();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
const color = require("tailwindcss/colors");
|
||||
module.exports = {
|
||||
content: ["./src/**/*.{js,jsx,ts,tsx}"],
|
||||
|
||||
safelist: [
|
||||
"lg:items-end",
|
||||
"lg:items-start",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { dir } from "../utils/dir";
|
|||
import { g } from "../utils/global";
|
||||
import { scanApi } from "./api-scan";
|
||||
import { serveAPI } from "./serve-api";
|
||||
import "bun-types";
|
||||
|
||||
export const createServer = async () => {
|
||||
g.router = createRouter({ strictTrailingSlash: true });
|
||||
|
|
@ -17,8 +16,11 @@ export const createServer = async () => {
|
|||
if (req.method === "GET") {
|
||||
try {
|
||||
const file = Bun.file(dir(`app/static${url.pathname}`));
|
||||
return new Response(file);
|
||||
if (file.type !== "application/octet-stream") {
|
||||
return new Response(file as any);
|
||||
}
|
||||
} catch (e) {}
|
||||
return new Response(Bun.file(dir(`app/static/index.html`)) as any);
|
||||
} else {
|
||||
const api = await serveAPI(url, req);
|
||||
if (api) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { dirAsync } from "fs-jetpack";
|
||||
import { dirAsync, removeAsync } from "fs-jetpack";
|
||||
import { dir } from "./dir";
|
||||
import { g } from "./global";
|
||||
import { spawn } from "bun";
|
||||
|
|
@ -15,6 +15,8 @@ export const parcelBuild = async () => {
|
|||
dir(`app/static`),
|
||||
];
|
||||
|
||||
await removeAsync(dir("app/static"));
|
||||
|
||||
g.log.info(`Building web with parcel`);
|
||||
if (g.mode !== "dev") {
|
||||
const parcel = spawn({
|
||||
|
|
|
|||
Loading…
Reference in New Issue