remove use of package.json name field

This commit is contained in:
Sidney Alcantara
2022-02-10 16:58:46 +11:00
parent 0c14baba13
commit d2bf972a54
14 changed files with 27 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
{ {
"name": "Rowy", "name": "rowy",
"version": "2.3.1", "version": "2.3.1",
"homepage": "https://rowy.io", "homepage": "https://rowy.io",
"repository": { "repository": {

View File

@@ -7,7 +7,7 @@ import TwitterIcon from "@mui/icons-material/Twitter";
import Logo from "@src/assets/Logo"; import Logo from "@src/assets/Logo";
import InlineOpenInNewIcon from "@src/components/InlineOpenInNewIcon"; import InlineOpenInNewIcon from "@src/components/InlineOpenInNewIcon";
import { name, version } from "@root/package.json"; import { version } from "@root/package.json";
import { useAppContext } from "@src/contexts/AppContext"; import { useAppContext } from "@src/contexts/AppContext";
import useUpdateCheck from "@src/hooks/useUpdateCheck"; import useUpdateCheck from "@src/hooks/useUpdateCheck";
import { EXTERNAL_LINKS, WIKI_LINKS } from "@src/constants/externalLinks"; import { EXTERNAL_LINKS, WIKI_LINKS } from "@src/constants/externalLinks";
@@ -100,7 +100,7 @@ export default function About() {
)} )}
<Typography display="block" color="textSecondary"> <Typography display="block" color="textSecondary">
{name} v{version} Rowy v{version}
</Typography> </Typography>
</Grid> </Grid>

View File

@@ -9,7 +9,6 @@ import InlineOpenInNewIcon from "@src/components/InlineOpenInNewIcon";
import SetupItem from "./SetupItem"; import SetupItem from "./SetupItem";
import { name } from "@root/package.json";
import { rowyRun } from "@src/utils/rowyRun"; import { rowyRun } from "@src/utils/rowyRun";
import { runRoutes } from "@src/constants/runRoutes"; import { runRoutes } from "@src/constants/runRoutes";
import { EXTERNAL_LINKS, WIKI_LINKS } from "@src/constants/externalLinks"; import { EXTERNAL_LINKS, WIKI_LINKS } from "@src/constants/externalLinks";
@@ -88,7 +87,7 @@ export default function Step1RowyRun({
return ( return (
<> <>
<Typography variant="inherit"> <Typography variant="inherit">
{name} Run is a Google Cloud Run instance that provides backend Rowy Run is a Google Cloud Run instance that provides backend
functionality, such as table action scripts, user management, and easy functionality, such as table action scripts, user management, and easy
Cloud Function deployment. Cloud Function deployment.
</Typography> </Typography>

View File

@@ -16,9 +16,7 @@ import InlineOpenInNewIcon from "@src/components/InlineOpenInNewIcon";
import SetupItem from "./SetupItem"; import SetupItem from "./SetupItem";
import DiffEditor from "@src/components/CodeEditor/DiffEditor"; import DiffEditor from "@src/components/CodeEditor/DiffEditor";
import CodeEditor from "@src/components/CodeEditor";
import { name } from "@root/package.json";
import { useAppContext } from "@src/contexts/AppContext"; import { useAppContext } from "@src/contexts/AppContext";
import { CONFIG } from "@src/config/dbPaths"; import { CONFIG } from "@src/config/dbPaths";
import { import {
@@ -165,8 +163,8 @@ export default function Step3Rules({
return ( return (
<> <>
<Typography variant="inherit"> <Typography variant="inherit">
{name} configuration is stored in the <code>{CONFIG}</code> collection Rowy configuration is stored in the <code>{CONFIG}</code> collection on
on Firestore. Your users will need read access to this collection and Firestore. Your users will need read access to this collection and
admins will need write access. admins will need write access.
</Typography> </Typography>

View File

@@ -1,12 +1,11 @@
import { useState, useEffect } from "react"; import { useState } from "react";
import { ISetupStepBodyProps } from "@src/pages/Setup"; import { ISetupStepBodyProps } from "@src/pages/Setup";
import { Typography, Button } from "@mui/material"; import { Typography } from "@mui/material";
import LoadingButton from "@mui/lab/LoadingButton"; import LoadingButton from "@mui/lab/LoadingButton";
import SetupItem from "./SetupItem"; import SetupItem from "./SetupItem";
import { name } from "@root/package.json";
import { useAppContext } from "@src/contexts/AppContext"; import { useAppContext } from "@src/contexts/AppContext";
import { CONFIG } from "@src/config/dbPaths"; import { CONFIG } from "@src/config/dbPaths";
import { rowyRun } from "@src/utils/rowyRun"; import { rowyRun } from "@src/utils/rowyRun";
@@ -51,7 +50,7 @@ export default function Step4Migrate({
<Typography variant="inherit"> <Typography variant="inherit">
It looks like youve previously configured your Firestore database for It looks like youve previously configured your Firestore database for
Firetable. You can migrate this configuration, including your tables to{" "} Firetable. You can migrate this configuration, including your tables to{" "}
{name}. Rowy.
</Typography> </Typography>
<SetupItem <SetupItem

View File

@@ -7,7 +7,6 @@ import ThumbUpOffIcon from "@mui/icons-material/ThumbUpOffAlt";
import ThumbDownIcon from "@mui/icons-material/ThumbDownAlt"; import ThumbDownIcon from "@mui/icons-material/ThumbDownAlt";
import ThumbDownOffIcon from "@mui/icons-material/ThumbDownOffAlt"; import ThumbDownOffIcon from "@mui/icons-material/ThumbDownOffAlt";
import { name } from "@root/package.json";
import { analytics } from "analytics"; import { analytics } from "analytics";
import { db } from "@src/firebase"; import { db } from "@src/firebase";
@@ -28,7 +27,7 @@ export default function Step6Finish() {
return ( return (
<> <>
<Typography variant="body1" gutterBottom> <Typography variant="body1" gutterBottom>
You can now continue to {name} and create a table from your Firestore You can now continue to Rowy and create a table from your Firestore
collections. collections.
</Typography> </Typography>

View File

@@ -12,7 +12,6 @@ import CodeEditorHelper from "@src/components/CodeEditor/CodeEditorHelper";
import FormAutosave from "./FormAutosave"; import FormAutosave from "./FormAutosave";
import { FieldType } from "@src/constants/fields"; import { FieldType } from "@src/constants/fields";
import { WIKI_LINKS } from "@src/constants/externalLinks"; import { WIKI_LINKS } from "@src/constants/externalLinks";
import { name } from "@root/package.json";
const CodeEditor = lazy( const CodeEditor = lazy(
() => () =>
@@ -81,8 +80,8 @@ export default function DefaultValueInput({
</MenuItem> </MenuItem>
<MenuItem value="dynamic"> <MenuItem value="dynamic">
<ListItemText <ListItemText
primary={`Dynamic (Requires ${name} Cloud Functions)`} primary={`Dynamic (Requires Rowy Cloud Functions)`}
secondary={`Write code to set the default value using this tables ${name} Cloud Function. Setup is required.`} secondary={`Write code to set the default value using this tables Rowy Cloud Function. Setup is required.`}
/> />
</MenuItem> </MenuItem>
</TextField> </TextField>

View File

@@ -9,7 +9,6 @@ import Confirmation from "@src/components/Confirmation";
import { Table } from "@src/contexts/ProjectContext"; import { Table } from "@src/contexts/ProjectContext";
import { routes } from "@src/constants/routes"; import { routes } from "@src/constants/routes";
import { db } from "@src/firebase"; import { db } from "@src/firebase";
import { name } from "@root/package.json";
import { import {
SETTINGS, SETTINGS,
TABLE_SCHEMAS, TABLE_SCHEMAS,
@@ -106,7 +105,7 @@ export default function DeleteMenu({ clearDialog, data }: IDeleteMenuProps) {
body: ( body: (
<> <>
<DialogContentText paragraph> <DialogContentText paragraph>
This will only delete the {name} configuration data. This will only delete the Rowy configuration data.
</DialogContentText> </DialogContentText>
<DialogContentText> <DialogContentText>
You will not lose any data in your Firestore collection{" "} You will not lose any data in your Firestore collection{" "}

View File

@@ -1,12 +1,12 @@
import { useEffect } from "react"; import { useEffect } from "react";
import { name } from "@root/package.json";
export default function useDocumentTitle(projectId: string, title?: string) { export default function useDocumentTitle(projectId: string, title?: string) {
useEffect(() => { useEffect(() => {
document.title = [ document.title = [
title, title,
projectId, projectId,
name + (window.location.hostname === "localhost" ? " (localhost)" : ""), "Rowy",
window.location.hostname === "localhost" ? "localhost" : "",
] ]
.filter((x) => x) .filter((x) => x)
.join(" • "); .join(" • ");
@@ -14,7 +14,8 @@ export default function useDocumentTitle(projectId: string, title?: string) {
return () => { return () => {
document.title = [ document.title = [
projectId, projectId,
name + (window.location.hostname === "localhost" ? " (localhost)" : ""), "Rowy",
window.location.hostname === "localhost" ? "localhost" : "",
] ]
.filter((x) => x) .filter((x) => x)
.join(" • "); .join(" • ");

View File

@@ -10,7 +10,6 @@ import { signOut } from "@src/utils/auth";
import { auth } from "../../firebase"; import { auth } from "../../firebase";
import { useProjectContext } from "@src/contexts/ProjectContext"; import { useProjectContext } from "@src/contexts/ProjectContext";
import { runRoutes } from "@src/constants/runRoutes"; import { runRoutes } from "@src/constants/runRoutes";
import { name } from "@root/package.json";
export default function ImpersonatorAuthPage() { export default function ImpersonatorAuthPage() {
const { enqueueSnackbar } = useSnackbar(); const { enqueueSnackbar } = useSnackbar();
@@ -58,7 +57,7 @@ export default function ImpersonatorAuthPage() {
test permissions and access controls. test permissions and access controls.
</Typography> </Typography>
<Typography variant="inherit" component="span"> <Typography variant="inherit" component="span">
Make sure the {name} Run service account has the{" "} Make sure the Rowy Run service account has the{" "}
<b>Service Account Token Creator</b> IAM role. <b>Service Account Token Creator</b> IAM role.
</Typography> </Typography>
</> </>

View File

@@ -4,7 +4,6 @@ import InlineOpenInNewIcon from "@src/components/InlineOpenInNewIcon";
import AuthLayout from "@src/components/Auth/AuthLayout"; import AuthLayout from "@src/components/Auth/AuthLayout";
import { WIKI_LINKS } from "@src/constants/externalLinks"; import { WIKI_LINKS } from "@src/constants/externalLinks";
import { name } from "@root/package.json";
export default function AuthSetupGuide() { export default function AuthSetupGuide() {
return ( return (
@@ -12,7 +11,7 @@ export default function AuthSetupGuide() {
title="Set up Firebase Authentication" title="Set up Firebase Authentication"
description={ description={
<> <>
To sign in to {name}, first set up Firebase Authentication in the To sign in to Rowy, first set up Firebase Authentication in the
Firebase Console. Firebase Console.
</> </>
} }

View File

@@ -22,7 +22,6 @@ import MarketingBanner from "@src/components/Auth/MarketingBanner";
import AuthLayout from "@src/components/Auth/AuthLayout"; import AuthLayout from "@src/components/Auth/AuthLayout";
import { EXTERNAL_LINKS, WIKI_LINKS } from "@src/constants/externalLinks"; import { EXTERNAL_LINKS, WIKI_LINKS } from "@src/constants/externalLinks";
import { name } from "@root/package.json";
export default function DeployPage() { export default function DeployPage() {
const { search } = useLocation(); const { search } = useLocation();
@@ -51,7 +50,7 @@ export default function DeployPage() {
title="Get started" title="Get started"
description={ description={
<> <>
Set up {name} on your Google Cloud or Firebase project with a Set up Rowy on your Google Cloud or Firebase project with a
one-click deploy button. one-click deploy button.
<br /> <br />
<br /> <br />
@@ -148,7 +147,7 @@ export default function DeployPage() {
</div> </div>
<Typography variant="caption" color="text.secondary"> <Typography variant="caption" color="text.secondary">
By setting up {name}, you agree to our{" "} By setting up Rowy, you agree to our{" "}
<Link <Link
href={EXTERNAL_LINKS.terms} href={EXTERNAL_LINKS.terms}
target="_blank" target="_blank"

View File

@@ -14,7 +14,6 @@ import Customization from "@src/components/Settings/ProjectSettings/Customizatio
import { SETTINGS, PUBLIC_SETTINGS } from "@src/config/dbPaths"; import { SETTINGS, PUBLIC_SETTINGS } from "@src/config/dbPaths";
import useDoc from "@src/hooks/useDoc"; import useDoc from "@src/hooks/useDoc";
import { db } from "@src/firebase"; import { db } from "@src/firebase";
import { name } from "@root/package.json";
export interface IProjectSettingsChildProps { export interface IProjectSettingsChildProps {
settings: Record<string, any>; settings: Record<string, any>;
@@ -68,7 +67,7 @@ export default function ProjectSettingsPage() {
const sections = [ const sections = [
{ title: "About", Component: About }, { title: "About", Component: About },
{ title: `${name} Run`, Component: RowyRun, props: childProps }, { title: `Rowy Run`, Component: RowyRun, props: childProps },
{ title: "Authentication", Component: Authentication, props: childProps }, { title: "Authentication", Component: Authentication, props: childProps },
{ title: "Customization", Component: Customization, props: childProps }, { title: "Customization", Component: Customization, props: childProps },
]; ];

View File

@@ -31,13 +31,11 @@ import { SlideTransition } from "@src/components/Modal/SlideTransition";
import Step0Welcome from "@src/components/Setup/Step0Welcome"; import Step0Welcome from "@src/components/Setup/Step0Welcome";
import Step1RowyRun, { checkRowyRun } from "@src/components/Setup/Step1RowyRun"; import Step1RowyRun, { checkRowyRun } from "@src/components/Setup/Step1RowyRun";
// prettier-ignore // prettier-ignore
// prettier-ignore
import Step2ProjectOwner, { checkProjectOwner } from "@src/components/Setup/Step2ProjectOwner"; import Step2ProjectOwner, { checkProjectOwner } from "@src/components/Setup/Step2ProjectOwner";
import Step3Rules, { checkRules } from "@src/components/Setup/Step3Rules"; import Step3Rules, { checkRules } from "@src/components/Setup/Step3Rules";
import Step4Migrate, { checkMigrate } from "@src/components/Setup/Step4Migrate"; import Step4Migrate, { checkMigrate } from "@src/components/Setup/Step4Migrate";
import Step5Finish from "@src/components/Setup/Step6Finish"; import Step5Finish from "@src/components/Setup/Step6Finish";
import { name } from "@root/package.json";
import routes from "@src/constants/routes"; import routes from "@src/constants/routes";
import { useAppContext } from "@src/contexts/AppContext"; import { useAppContext } from "@src/contexts/AppContext";
import { analytics } from "analytics"; import { analytics } from "analytics";
@@ -146,7 +144,7 @@ export default function SetupPage() {
id: "welcome", id: "welcome",
layout: "centered" as "centered", layout: "centered" as "centered",
shortTitle: "Welcome", shortTitle: "Welcome",
title: `Welcome to ${name}`, title: `Welcome to Rowy`,
body: <Step0Welcome {...stepProps} />, body: <Step0Welcome {...stepProps} />,
actions: completion.welcome ? ( actions: completion.welcome ? (
<LoadingButton <LoadingButton
@@ -174,8 +172,8 @@ export default function SetupPage() {
}, },
{ {
id: "rowyRun", id: "rowyRun",
shortTitle: `${name} Run`, shortTitle: `Rowy Run`,
title: `Set up ${name} Run`, title: `Set up Rowy Run`,
body: <Step1RowyRun {...stepProps} />, body: <Step1RowyRun {...stepProps} />,
}, },
{ {
@@ -194,7 +192,7 @@ export default function SetupPage() {
? { ? {
id: "migrate", id: "migrate",
shortTitle: `Migrate`, shortTitle: `Migrate`,
title: `Migrate to ${name} (optional)`, title: `Migrate to Rowy (optional)`,
body: <Step4Migrate {...stepProps} />, body: <Step4Migrate {...stepProps} />,
} }
: ({} as ISetupStep), : ({} as ISetupStep),
@@ -212,7 +210,7 @@ export default function SetupPage() {
to={routes.home} to={routes.home}
sx={{ ml: 1 }} sx={{ ml: 1 }}
> >
Continue to {name} Continue to Rowy
</Button> </Button>
), ),
}, },