mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-16 19:57:49 +01:00
get project name from package.json
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
const CracoAlias = require("craco-alias");
|
||||
const CracoSwcPlugin = require("craco-swc");
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
{
|
||||
plugin: CracoAlias,
|
||||
options: {
|
||||
source: "tsconfig",
|
||||
baseUrl: "./src",
|
||||
tsConfigPath: "./tsconfig.extend.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
plugin: CracoSwcPlugin,
|
||||
options: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "rowy",
|
||||
"name": "Rowy",
|
||||
"version": "2.0.0",
|
||||
"homepage": "https://rowy.io/",
|
||||
"repository": {
|
||||
@@ -106,6 +106,7 @@
|
||||
"@types/react-dom": "^17.0.8",
|
||||
"@types/react-router-dom": "^5.1.7",
|
||||
"@types/use-persisted-state": "^0.3.0",
|
||||
"craco-alias": "^3.0.1",
|
||||
"firebase-tools": "^8.12.1",
|
||||
"husky": "^4.2.5",
|
||||
"monaco-editor": "^0.21.2",
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import useDoc from "hooks/useDoc";
|
||||
import Modal from "components/Modal";
|
||||
import { Box, Button, CircularProgress, Typography } from "@material-ui/core";
|
||||
import { Box, CircularProgress, Typography } from "@material-ui/core";
|
||||
import { IFormDialogProps } from "./Table/ColumnMenu/NewColumn";
|
||||
import OpenInNewIcon from "@material-ui/icons/OpenInNew";
|
||||
import CheckCircleIcon from "@material-ui/icons/CheckCircle";
|
||||
|
||||
export interface IProjectSettings
|
||||
@@ -29,7 +28,7 @@ export default function BuilderInstaller({ handleClose }: IProjectSettings) {
|
||||
children={
|
||||
<Box display="flex" flexDirection="column">
|
||||
<Typography variant="body2">
|
||||
You will be redirected to Google Cloud Shell to deploy Rowy Function
|
||||
You will be redirected to Google Cloud Shell to deploy Function
|
||||
Builder to Cloud Run.
|
||||
</Typography>
|
||||
<br />
|
||||
|
||||
@@ -22,8 +22,8 @@ import ArrowRightIcon from "@material-ui/icons/ArrowRight";
|
||||
import UpdateChecker, { useLatestUpdateState } from "./UpdateChecker";
|
||||
import { useAppContext } from "contexts/AppContext";
|
||||
import routes from "constants/routes";
|
||||
import { projectId } from "../../firebase";
|
||||
import meta from "../../../package.json";
|
||||
import { projectId } from "@src/firebase";
|
||||
import meta from "@root/package.json";
|
||||
|
||||
const useStyles = makeStyles((theme) =>
|
||||
createStyles({
|
||||
|
||||
@@ -12,6 +12,9 @@ import NavDrawer from "./NavDrawer";
|
||||
import { useRowyContext } from "contexts/RowyContext";
|
||||
import UserMenu from "./UserMenu";
|
||||
|
||||
import { name } from "@root/package.json";
|
||||
import { projectId } from "@src/firebase";
|
||||
|
||||
export const APP_BAR_HEIGHT = 56;
|
||||
|
||||
const useStyles = makeStyles((theme) =>
|
||||
@@ -56,12 +59,12 @@ export default function Navigation({
|
||||
const currentTable = tableCollection?.split("/")[0];
|
||||
|
||||
useEffect(() => {
|
||||
const name =
|
||||
const tableName =
|
||||
_find(tables, ["collection", currentTable])?.name || currentTable;
|
||||
document.title = `${name} | Rowy`;
|
||||
document.title = `${tableName} | ${projectId} | ${name}`;
|
||||
|
||||
return () => {
|
||||
document.title = "Rowy";
|
||||
document.title = `${projectId} | ${name}`;
|
||||
};
|
||||
}, [currentTable]);
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { authOptions } from "firebase/firebaseui";
|
||||
import { Link } from "@material-ui/core";
|
||||
import OpenInNewIcon from "@material-ui/icons/OpenInNew";
|
||||
import WIKI_LINKS from "constants/wikiLinks";
|
||||
import { name } from "@root/package.json";
|
||||
|
||||
export const projectSettingsForm = [
|
||||
{
|
||||
@@ -54,7 +55,7 @@ export const projectSettingsForm = [
|
||||
format: "url",
|
||||
assistiveText: (
|
||||
<>
|
||||
A Cloud Run instance is required to build and deploy Rowy Cloud
|
||||
A Cloud Run instance is required to build and deploy {name} Cloud
|
||||
Functions.
|
||||
<Link href={WIKI_LINKS.functions} target="_blank" rel="noopener">
|
||||
Learn more
|
||||
|
||||
@@ -19,6 +19,7 @@ import CodeEditor from "components/Table/editors/CodeEditor";
|
||||
import FormAutosave from "./FormAutosave";
|
||||
import { FieldType } from "constants/fields";
|
||||
import WIKI_LINKS from "constants/wikiLinks";
|
||||
import { name } from "@root/package.json";
|
||||
|
||||
const useStyles = makeStyles((theme) =>
|
||||
createStyles({
|
||||
@@ -104,8 +105,8 @@ export default function DefaultValueInput({
|
||||
</MenuItem>
|
||||
<MenuItem value="dynamic">
|
||||
<ListItemText
|
||||
primary="Dynamic (Requires Rowy Cloud Functions)"
|
||||
secondary="Write code to set the default value using this table’s Rowy Cloud Function. Setup is required."
|
||||
primary={`Dynamic (Requires ${name} Cloud Functions)`}
|
||||
secondary={`Write code to set the default value using this table’s ${name} Cloud Function. Setup is required.`}
|
||||
className={classes.typeSelectItem}
|
||||
/>
|
||||
</MenuItem>
|
||||
|
||||
@@ -134,7 +134,7 @@ export default function FieldSettings(props: IMenuModalProps) {
|
||||
const buildUrl = settingsDoc.get("buildUrl");
|
||||
if (!buildUrl) {
|
||||
snack.open({
|
||||
message: `Rowy functions builder is not yet setup`,
|
||||
message: `Functions Builder is not yet setup`,
|
||||
variant: "error",
|
||||
action: (
|
||||
<Button
|
||||
|
||||
@@ -48,7 +48,7 @@ const additionalVariables = [
|
||||
{
|
||||
key: "fieldTypes",
|
||||
description:
|
||||
"fieldTypes is a map of all fields and its corresponding Rowy column type",
|
||||
"fieldTypes is a map of all fields and its corresponding field type",
|
||||
},
|
||||
{
|
||||
key: "extensionConfig",
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Link, Typography } from "@material-ui/core";
|
||||
import OpenInNewIcon from "@material-ui/icons/OpenInNew";
|
||||
import { projectId } from "../../firebase";
|
||||
import WIKI_LINKS from "constants/wikiLinks";
|
||||
import { name } from "@root/package.json";
|
||||
|
||||
export const tableSettings = (
|
||||
mode: TableSettingsDialogModes | null,
|
||||
@@ -143,7 +144,7 @@ export const tableSettings = (
|
||||
displayCondition: "return values.tableType === 'collectionGroup'",
|
||||
assistiveText: (
|
||||
<>
|
||||
Rowy Cloud Functions that rely on{" "}
|
||||
{name} Cloud Functions that rely on{" "}
|
||||
<Link
|
||||
href="https://firebase.google.com/docs/functions/firestore-events#function_triggers"
|
||||
target="_blank"
|
||||
|
||||
@@ -13,6 +13,7 @@ import { tableSettings } from "./form";
|
||||
import { useRowyContext } from "contexts/RowyContext";
|
||||
import useRouter from "../../hooks/useRouter";
|
||||
import { db } from "../../firebase";
|
||||
import { name } from "@root/package.json";
|
||||
|
||||
export enum TableSettingsDialogModes {
|
||||
create,
|
||||
@@ -243,7 +244,7 @@ export default function TableSettingsDialog({
|
||||
body: (
|
||||
<>
|
||||
<DialogContentText>
|
||||
This will only delete the Rowy configuration data.
|
||||
This will only delete the {name} configuration data.
|
||||
</DialogContentText>
|
||||
<DialogContentText>
|
||||
You will not lose any data in your Firestore collection
|
||||
|
||||
@@ -175,7 +175,7 @@ export default function Step1Columns({
|
||||
)}
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Typography variant="overline" gutterBottom component="h2">
|
||||
Rowy Columns
|
||||
Table Columns
|
||||
</Typography>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -61,7 +61,7 @@ export default function Step2NewColumns({
|
||||
<Grid container spacing={2} className={classes.typeSelectRow}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Typography variant="overline" gutterBottom component="h2">
|
||||
New Rowy Columns
|
||||
New Table Columns
|
||||
</Typography>
|
||||
<Divider />
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ export default function Step1Columns({ config, setConfig }: IStepProps) {
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Typography variant="overline" gutterBottom component="h2">
|
||||
Sort Rowy Columns
|
||||
Sort Table Columns
|
||||
</Typography>
|
||||
<Divider />
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export default function Step3Types({ config, updateConfig, isXs }: IStepProps) {
|
||||
<Grid container spacing={2} className={classes.typeSelectRow}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<Typography variant="overline" gutterBottom component="h2">
|
||||
Rowy Columns
|
||||
Table Columns
|
||||
</Typography>
|
||||
<Divider />
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ export default function ImportWizard() {
|
||||
{
|
||||
title: "Rename Columns",
|
||||
description:
|
||||
"Rename your Rowy columns with user-friendly names. These changes will not update the field names in your database.",
|
||||
"Rename your table columns with user-friendly names. These changes will not update the field names in your database.",
|
||||
content: (
|
||||
<Step2Rename
|
||||
config={config}
|
||||
|
||||
@@ -18,7 +18,7 @@ export const config: IFieldConfig = {
|
||||
initialValue: "",
|
||||
initializable: true,
|
||||
icon: <EmailIcon />,
|
||||
description: "Email address. Rowy does not validate emails.",
|
||||
description: "Email address.",
|
||||
TableCell: withBasicCell(BasicCell),
|
||||
TableEditor: TextEditor,
|
||||
SideDrawerField,
|
||||
|
||||
@@ -18,8 +18,7 @@ export const config: IFieldConfig = {
|
||||
initialValue: "",
|
||||
initializable: true,
|
||||
icon: <PhoneIcon />,
|
||||
description:
|
||||
"Phone numbers stored as text. Rowy does not validate phone numbers.",
|
||||
description: "Phone numbers stored as text.",
|
||||
TableCell: withBasicCell(BasicCell),
|
||||
TableEditor: TextEditor,
|
||||
SideDrawerField,
|
||||
|
||||
@@ -18,7 +18,7 @@ export const config: IFieldConfig = {
|
||||
initialValue: "",
|
||||
initializable: true,
|
||||
icon: <UrlIcon />,
|
||||
description: "Web address. Rowy does not validate URLs.",
|
||||
description: "Web address.",
|
||||
TableCell: withBasicCell(BasicCell),
|
||||
TableEditor: TextEditor,
|
||||
SideDrawerField,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Define field type strings used in Rowy column config
|
||||
// Define field type strings used in column config
|
||||
export enum FieldType {
|
||||
// TEXT
|
||||
shortText = "SIMPLE_TEXT",
|
||||
|
||||
8
tsconfig.extend.json
Normal file
8
tsconfig.extend.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"@root/*": ["../*"],
|
||||
"@src/*": ["./*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,14 @@
|
||||
{
|
||||
"extends": "./tsconfig.extend.json",
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"lib": ["es5", "es6", "dom", "dom.iterable", "esnext"],
|
||||
"lib": [
|
||||
"es5",
|
||||
"es6",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
@@ -18,5 +25,8 @@
|
||||
"baseUrl": "src",
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["src", "types"]
|
||||
"include": [
|
||||
"src",
|
||||
"types"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5660,6 +5660,11 @@ cosmiconfig@^7.0.0:
|
||||
path-type "^4.0.0"
|
||||
yaml "^1.10.0"
|
||||
|
||||
craco-alias@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/craco-alias/-/craco-alias-3.0.1.tgz#45e5cb338b222a7f62d17e398b54aff7cf1572af"
|
||||
integrity sha512-N+Qaf/Gr/f3o5ZH2TQjMu5NhR9PnT1ZYsfejpNvZPpB0ujdrhsSr4Ct6GVjnV5ostCVquhTKJpIVBKyL9qDQYA==
|
||||
|
||||
craco-swc@^0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/craco-swc/-/craco-swc-0.1.3.tgz#520e199bcb48fd29a047eae9b7d2f27154b3bdba"
|
||||
|
||||
Reference in New Issue
Block a user