Generate actual /server entries in packages

This commit is contained in:
Mateusz Burzyński committed 2022-11-04 09:21:48 +01:00
1 parent c98fdd0499
commit 1b84fd65ef
37 files changed
+112 -41

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ import { useLoaderData } from "@remix-run/react";
import { InstanceRoot, Root } from "@webstudio-is/react-sdk";
import { loadCanvasData, type CanvasData } from "~/shared/db";
import config from "~/config";
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
import env, { Env } from "~/env.server";
import { sentryException } from "~/shared/sentry";
import { Canvas } from "~/canvas";
+1 -1
View File
@@ -6,7 +6,7 @@ import {
redirect,
} from "@remix-run/node";
import { Dashboard, links } from "~/dashboard";
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
import config, { type Config } from "~/config";
import { ensureUserCookie } from "~/shared/session";
import { authenticator } from "~/services/auth.server";
@@ -1,7 +1,7 @@
import { useLoaderData } from "@remix-run/react";
import { LoaderFunction } from "@remix-run/node";
import { type DesignerProps, Designer, links } from "~/designer";
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
import config from "~/config";
import { ErrorMessage } from "~/shared/error";
import { sentryException } from "~/shared/sentry";
@@ -3,7 +3,7 @@ import { useActionData } from "@remix-run/react";
import {
deleteAssets,
uploadAssets,
} from "@webstudio-is/asset-uploader/index.server";
} from "@webstudio-is/asset-uploader/server";
import { toast } from "@webstudio-is/design-system";
import { useEffect } from "react";
import { zfd } from "zod-form-data";
@@ -1,6 +1,6 @@
import type { LoaderFunction } from "@remix-run/node";
import { Breakpoint } from "@webstudio-is/react-sdk";
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
export type ErrorData = {
errors: string;
@@ -1,5 +1,5 @@
import { LoaderFunction, ActionFunction } from "@remix-run/node";
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
import { type Pages, utils } from "@webstudio-is/project";
import { zfd } from "zod-form-data";
import { z } from "zod";
+1 -1
View File
@@ -1,6 +1,6 @@
import { type ActionFunction } from "@remix-run/node";
import { type Build } from "@webstudio-is/project";
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
import { type SyncItem } from "immerhin";
import { type Tree } from "@webstudio-is/react-sdk";
@@ -1,6 +1,6 @@
import { type LoaderFunction, redirect } from "@remix-run/node";
import type { User } from "@webstudio-is/prisma-client";
import { db as projectDb } from "@webstudio-is/project/index.server";
import { db as projectDb } from "@webstudio-is/project/server";
import { type Project } from "@webstudio-is/project";
import * as userDb from "~/shared/db";
import { ensureUserCookie } from "~/shared/session";
@@ -1,6 +1,6 @@
import { type LoaderFunction } from "@remix-run/node";
import { type InstanceProps } from "@webstudio-is/react-sdk";
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
import { utils } from "@webstudio-is/project";
type ErrorData = {
@@ -1,6 +1,6 @@
import { type LoaderFunction } from "@remix-run/node";
import type { Tree } from "@webstudio-is/react-sdk";
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
import { utils } from "@webstudio-is/project";
export type ErrorData = {
+1 -1
View File
@@ -1,6 +1,6 @@
import { type Data } from "@webstudio-is/react-sdk";
import type { Project, Build, Page } from "@webstudio-is/project";
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
import { utils } from "@webstudio-is/project";
export type CanvasData = Data & { buildId: Build["id"]; page: Page };
+1 -1
View File
@@ -1,4 +1,4 @@
import { db } from "@webstudio-is/project/index.server";
import { db } from "@webstudio-is/project/server";
/**
* Conceptually publishing is cloning all data that affects user site
-4
View File
@@ -1,4 +0,0 @@
export * from "./src/db";
export * from "./src/upload";
export * from "./src/delete";
export * from "./src/utils/format-asset";
+10 -2
View File
@@ -8,7 +8,7 @@
"typecheck": "tsc --noEmit",
"test": "jest",
"checks": "yarn typecheck && yarn lint && yarn test",
"dev": "tsup src/index.ts --format esm,cjs --watch --out-dir=lib",
"dev": "tsup --watch",
"build": "rm -fr lib tsconfig.tsbuildinfo && tsc",
"lint": "eslint ./src --ext .ts,.tsx --max-warnings 0"
},
@@ -37,5 +37,13 @@
"!*.test.*"
],
"license": "MIT",
"private": false
"private": false,
"tsup": {
"entry": [
"src/index.ts",
"src/index.server.ts"
],
"format": "cjs",
"outDir": "lib"
}
}
+1
View File
@@ -0,0 +1 @@
export * from "./lib/index.server";
+1
View File
@@ -0,0 +1 @@
module.exports = require("./lib/index.server");
+1 -1
View File
@@ -1,4 +1,4 @@
import { type FontMeta } from "@webstudio-is/fonts/index.server";
import { type FontMeta } from "@webstudio-is/fonts/server";
import {
prisma,
type Location,
@@ -0,0 +1,4 @@
export * from "./db";
export * from "./upload";
export * from "./delete";
export * from "./utils/format-asset";
+1 -1
View File
@@ -1,5 +1,5 @@
import type { FontFormat } from "@webstudio-is/fonts";
import type { FontMeta } from "@webstudio-is/fonts/index.server";
import type { FontMeta } from "@webstudio-is/fonts/server";
import { Asset as DbAsset } from "@webstudio-is/prisma-client";
import type { ImageMeta } from "./utils/format-asset";
@@ -1,7 +1,7 @@
import { z } from "zod";
import { Asset as DbAsset } from "@webstudio-is/prisma-client";
import { type FontFormat, FONT_FORMATS } from "@webstudio-is/fonts";
import { FontMeta } from "@webstudio-is/fonts/index.server";
import { FontMeta } from "@webstudio-is/fonts/server";
import { Asset } from "../types";
import { getAssetPath } from "./get-asset-path";
@@ -1,7 +1,7 @@
import { Location } from "@webstudio-is/prisma-client";
import sharp from "sharp";
import { ImageMeta } from "./format-asset";
import { type FontMeta, getFontData } from "@webstudio-is/fonts/index.server";
import { type FontMeta, getFontData } from "@webstudio-is/fonts/server";
type BaseData = {
name: string;
+9 -2
View File
@@ -7,7 +7,7 @@
"scripts": {
"typecheck": "tsc --noEmit",
"checks": "yarn typecheck && yarn lint",
"dev": "tsup src/index.ts --format esm,cjs --watch --out-dir=lib",
"dev": "tsup --watch",
"build": "rm -fr lib tsconfig.tsbuildinfo && tsc",
"lint": "eslint ./src --ext .ts,.tsx --max-warnings 0"
},
@@ -25,5 +25,12 @@
"!*.test.*"
],
"license": "MIT",
"private": false
"private": false,
"tsup": {
"entry": [
"src/index.ts"
],
"format": "cjs",
"outDir": "lib"
}
}
+9 -2
View File
@@ -5,7 +5,7 @@
"author": "Webstudio <github@webstudio.is>",
"homepage": "https://webstudio.is",
"scripts": {
"dev": "tsup src/index.ts --format esm,cjs --watch --out-dir=lib",
"dev": "tsup --watch",
"build": "rm -fr lib tsconfig.tsbuildinfo && tsc",
"typecheck": "tsc --noEmit",
"lint": "eslint ./src --ext .ts,.tsx --max-warnings 0",
@@ -76,5 +76,12 @@
"!*.test.*"
],
"license": "MIT",
"private": false
"private": false,
"tsup": {
"entry": [
"src/index.ts"
],
"format": "cjs",
"outDir": "lib"
}
}
-2
View File
@@ -1,2 +0,0 @@
export { getFontData } from "./src/get-font-data";
export * from "./src/schema";
+10 -2
View File
@@ -8,7 +8,7 @@
"typecheck": "tsc --noEmit",
"test": "jest",
"checks": "yarn typecheck && yarn lint && yarn test",
"dev": "tsup src/index.ts --format esm,cjs --watch --out-dir=lib",
"dev": "tsup --watch",
"build": "rm -fr lib tsconfig.tsbuildinfo && tsc",
"lint": "eslint ./src --ext .ts,.tsx --max-warnings 0"
},
@@ -31,5 +31,13 @@
"!*.test.*"
],
"license": "MIT",
"private": false
"private": false,
"tsup": {
"entry": [
"src/index.ts",
"src/index.server.ts"
],
"format": "cjs",
"outDir": "lib"
}
}
+1
View File
@@ -0,0 +1 @@
export * from "./lib/index.server";
+1
View File
@@ -0,0 +1 @@
module.exports = require("./lib/index.server");
+2
View File
@@ -0,0 +1,2 @@
export { getFontData } from "./get-font-data";
export * from "./schema";
+9 -2
View File
@@ -5,7 +5,7 @@
"author": "Webstudio <github@webstudio.is>",
"homepage": "https://webstudio.is",
"scripts": {
"dev": "tsup src/index.ts --format esm,cjs --watch --out-dir=lib",
"dev": "tsup --watch",
"test": "jest",
"build": "rm -fr lib tsconfig.tsbuildinfo && tsc",
"typecheck": "tsc --noEmit",
@@ -32,5 +32,12 @@
"!*.test.*"
],
"license": "MIT",
"private": false
"private": false,
"tsup": {
"entry": [
"src/index.ts"
],
"format": "cjs",
"outDir": "lib"
}
}
+9 -2
View File
@@ -5,7 +5,7 @@
"author": "Webstudio <github@webstudio.is>",
"homepage": "https://webstudio.is",
"scripts": {
"dev": "tsup src/index.ts --format esm,cjs --watch --out-dir=lib",
"dev": "tsup --watch",
"build": "rm -fr lib tsconfig.tsbuildinfo && tsc",
"typecheck": "tsc --noEmit",
"lint": "eslint ./src --ext .ts,.tsx --max-warnings 0",
@@ -31,5 +31,12 @@
"!*.test.*"
],
"license": "MIT",
"private": false
"private": false,
"tsup": {
"entry": [
"src/index.ts"
],
"format": "cjs",
"outDir": "lib"
}
}
+8 -1
View File
@@ -8,7 +8,7 @@
"typecheck": "tsc --noEmit",
"lint": "eslint ./src --ext .ts,.tsx --max-warnings 0",
"checks": "yarn typecheck && yarn lint",
"dev": "prisma generate --watch && tsup src/index.ts --format esm,cjs --watch --out-dir=lib",
"dev": "prisma generate --watch && tsup --watch",
"build": "prisma format && prisma generate && rm -fr lib tsconfig.tsbuildinfo && tsc"
},
"bin": {
@@ -35,5 +35,12 @@
"umzug": "^3.2.1",
"uuid": "^9.0.0",
"zod": "^3.19.0"
},
"tsup": {
"entry": [
"src/index.ts"
],
"format": "cjs",
"outDir": "lib"
}
}
-1
View File
@@ -1 +0,0 @@
export * from "./src/index.server";
+10 -2
View File
@@ -8,7 +8,7 @@
"typecheck": "tsc --noEmit",
"test": "jest",
"checks": "yarn typecheck && yarn lint && yarn test",
"dev": "tsup src/index.ts --format esm,cjs --watch --out-dir=lib",
"dev": "tsup --watch",
"build": "rm -fr lib tsconfig.tsbuildinfo && tsc",
"lint": "eslint ./src --ext .ts,.tsx --max-warnings 0"
},
@@ -35,5 +35,13 @@
"!*.test.*"
],
"license": "MIT",
"private": false
"private": false,
"tsup": {
"entry": [
"src/index.ts",
"src/index.server.ts"
],
"format": "cjs",
"outDir": "lib"
}
}
+1
View File
@@ -0,0 +1 @@
export * from "./lib/index.server";
+1
View File
@@ -0,0 +1 @@
module.exports = require("./lib/index.server");
+1 -1
View File
@@ -7,7 +7,7 @@ import {
Project as BaseProject,
} from "@webstudio-is/prisma-client";
import type { Asset } from "@webstudio-is/asset-uploader";
import { formatAsset } from "@webstudio-is/asset-uploader/index.server";
import { formatAsset } from "@webstudio-is/asset-uploader/server";
import * as db from "./index";
const nanoid = customAlphabet("1234567890abcdefghijklmnopqrstuvwxyz");
+9 -2
View File
@@ -5,7 +5,7 @@
"author": "Webstudio <github@webstudio.is>",
"homepage": "https://webstudio.is",
"scripts": {
"dev": "tsup src/index.ts --format esm,cjs --watch --out-dir=lib",
"dev": "tsup --watch",
"build": "yarn build:lib",
"build:mdn-data": "tsx ./bin/mdn-data.ts ./src/css",
"build:args": "tsx ./bin/generate-arg-types.ts './src/components/*.tsx !./src/**/*.stories.tsx !./src/**/*.ws.tsx'",
@@ -75,5 +75,12 @@
"!*.test.*"
],
"license": "MIT",
"private": false
"private": false,
"tsup": {
"entry": [
"src/index.ts"
],
"format": "cjs",
"outDir": "lib"
}
}