Merge pull request #281 from webstudio-is/fix/project-imports

fix project package imports
This commit is contained in:
Andras Bacsai authored and GitHub committed 2022-09-15 13:48:06 +02:00
commit 42d9ec82fc
16 files changed
+17 -17

No files matched your search

+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";
import { db } from "@webstudio-is/project/index.server";
import config, { type Config } from "~/config";
import { ensureUserCookie } from "~/shared/session";
import { authenticator } from "~/services/auth.server";
+1 -1
View File
@@ -1,7 +1,7 @@
import { useLoaderData } from "@remix-run/react";
import { LoaderFunction } from "@remix-run/node";
import { Designer, links } from "~/designer";
import { db } from "@webstudio-is/project";
import { db } from "@webstudio-is/project/index.server";
import type { Project } from "@webstudio-is/project";
import config from "~/config";
import env from "~/env.server";
+1 -1
View File
@@ -2,7 +2,7 @@ import { type LoaderFunction, redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { type Data, InstanceRoot, Root } from "@webstudio-is/react-sdk";
import config from "~/config";
import { db } from "@webstudio-is/project";
import { db } from "@webstudio-is/project/index.server";
import env, { Env } from "~/env.server";
// @todo all this subdomain logic is very hacky
@@ -1,6 +1,6 @@
import type { LoaderFunction } from "@remix-run/node";
import { Breakpoint } from "@webstudio-is/react-sdk";
import { db } from "@webstudio-is/project";
import { db } from "@webstudio-is/project/index.server";
export type ErrorData = {
errors: string;
@@ -1,6 +1,6 @@
import type { LoaderFunction } from "@remix-run/node";
import type { Breakpoint } from "@webstudio-is/react-sdk";
import { db } from "@webstudio-is/project";
import { db } from "@webstudio-is/project/index.server";
export type ErrorData = {
errors: string;
+1 -1
View File
@@ -1,5 +1,5 @@
import { type ActionFunction } from "@remix-run/node";
import { db } from "@webstudio-is/project";
import { db } from "@webstudio-is/project/index.server";
import { type SyncItem } from "immerhin";
import { type Tree } from "@webstudio-is/react-sdk";
import { type Project } from "@webstudio-is/prisma-client";
@@ -1,6 +1,7 @@
import { type LoaderFunction, redirect } from "@remix-run/node";
import type { User } from "@webstudio-is/prisma-client";
import { db as projectDb, type Project } from "@webstudio-is/project";
import { db as projectDb } from "@webstudio-is/project/index.server";
import { type Project } from "@webstudio-is/project";
import * as userDb from "~/shared/db";
import { ensureUserCookie } from "~/shared/session";
import config from "~/config";
@@ -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";
import { db } from "@webstudio-is/project/index.server";
type ErrorData = {
errors: string;
};
@@ -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";
import { db } from "@webstudio-is/project/index.server";
export type ErrorData = {
errors: string;
};
+1 -1
View File
@@ -1,5 +1,5 @@
import { type Data } from "@webstudio-is/react-sdk";
import { db } from "@webstudio-is/project";
import { db } from "@webstudio-is/project/index.server";
import type { Project } from "@webstudio-is/project";
export type CanvasData = Data & { project: Project };
+1 -1
View File
@@ -1,4 +1,4 @@
import { db } from "@webstudio-is/project";
import { db } from "@webstudio-is/project/index.server";
/**
* Conceptually publishing is cloning all data that affects user site
+1 -1
View File
@@ -1 +1 @@
export * from "./src/index";
export * from "./src/index.server";
+1 -1
View File
@@ -7,7 +7,7 @@ import {
Prisma,
Project as BaseProject,
} from "@webstudio-is/prisma-client";
import { formatAsset } from "@webstudio-is/asset-uploader";
import { formatAsset } from "@webstudio-is/asset-uploader/index.server";
import * as db from "./index";
import type { Project } from "../index";
const TreeHistorySchema = z.array(z.string());
+1 -1
View File
@@ -1,5 +1,5 @@
import { z } from "zod";
import { Project as BaseProject } from "@webstudio-is/prisma-client";
import { type Project as BaseProject } from "@webstudio-is/prisma-client";
import type { Asset } from "@webstudio-is/asset-uploader";
const TreeHistorySchema = z.array(z.string());
+2
View File
@@ -0,0 +1,2 @@
import * as dbFunctions from "./db";
export const db = dbFunctions;
-3
View File
@@ -1,8 +1,5 @@
import * as dbFunctions from "./db";
import * as breakpointsUtils from "./shared/breakpoints";
import * as treeUtils from "./shared/tree-utils";
export const utils = { breakpoints: breakpointsUtils, tree: treeUtils };
export const db = dbFunctions;
export * from "./db/types";