Move shared code into own directory for use in new frontend.
This commit is contained in:
parent
0ad1d4bcc9
commit
6f8240ac84
13 changed files with 11 additions and 11 deletions
1
frontend/src/shared
Symbolic link
1
frontend/src/shared
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../server/shared
|
|
@ -1,4 +1,4 @@
|
|||
export * from "./shared";
|
||||
export * from "../shared/types";
|
||||
|
||||
export enum ButtonSize {
|
||||
SMALL = "small",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../../server/types/shared.ts
|
|
@ -1,4 +1,4 @@
|
|||
import CONSTRAINTS from "../validation/constraints";
|
||||
import CONSTRAINTS from "../shared/validation/constraints";
|
||||
import ErrorTypes from "../utils/errorTypes";
|
||||
import * as MailService from "../services/mailService";
|
||||
import * as Resources from "../utils/resources";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import CONSTRAINTS from "../validation/constraints";
|
||||
import CONSTRAINTS from "../shared/validation/constraints";
|
||||
import ErrorTypes from "../utils/errorTypes";
|
||||
import * as MonitoringService from "../services/monitoringService";
|
||||
import * as Resources from "../utils/resources";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Constraints from "../validation/constraints";
|
||||
import Constraints from "../shared/validation/constraints";
|
||||
import ErrorTypes from "../utils/errorTypes";
|
||||
import * as MonitoringService from "../services/monitoringService";
|
||||
import * as NodeService from "../services/nodeService";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import CONSTRAINTS from "../validation/constraints";
|
||||
import CONSTRAINTS from "../shared/validation/constraints";
|
||||
import ErrorTypes from "../utils/errorTypes";
|
||||
import * as Resources from "../utils/resources";
|
||||
import {handleJSONWithData, RequestData} from "../utils/resources";
|
||||
|
|
|
@ -13,7 +13,7 @@ import * as Resources from "../utils/resources";
|
|||
import {RestParams} from "../utils/resources";
|
||||
import {normalizeMac, parseInteger} from "../utils/strings";
|
||||
import {monitoringDisableUrl} from "../utils/urlBuilder";
|
||||
import CONSTRAINTS from "../validation/constraints";
|
||||
import CONSTRAINTS from "../shared/validation/constraints";
|
||||
import {forConstraint} from "../validation/validator";
|
||||
import {
|
||||
Domain,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {ArrayField, Field, RawJsonField} from "sparkson"
|
||||
import {ClientConfig, DurationMilliseconds, isString, toIsNewtype, Url} from "./shared";
|
||||
import {ClientConfig, DurationMilliseconds, isString, toIsNewtype, Url} from "../shared/types";
|
||||
|
||||
export type Username = string & { readonly __tag: unique symbol };
|
||||
export const isUsername = toIsNewtype(isString, "" as Username);
|
||||
|
|
|
@ -15,12 +15,12 @@ import {
|
|||
StoredNode,
|
||||
toIsEnum,
|
||||
toIsNewtype,
|
||||
} from "./shared";
|
||||
} from "../shared/types";
|
||||
|
||||
export * from "./config";
|
||||
export * from "./database";
|
||||
export * from "./logger";
|
||||
export * from "./shared";
|
||||
export * from "../shared/types";
|
||||
|
||||
export type NodeStateData = {
|
||||
site?: Site,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import _ from "lodash";
|
||||
|
||||
import CONSTRAINTS from "../validation/constraints";
|
||||
import CONSTRAINTS from "../shared/validation/constraints";
|
||||
import ErrorTypes from "../utils/errorTypes";
|
||||
import Logger from "../logger";
|
||||
import {Constraints, forConstraints, isConstraints} from "../validation/validator";
|
||||
|
|
Loading…
Reference in a new issue