Skip to content

Commit

Permalink
Rename app directory from "next" to "portal"
Browse files Browse the repository at this point in the history
  • Loading branch information
yenbekbay committed Nov 1, 2022
1 parent 2590f6d commit 34db641
Show file tree
Hide file tree
Showing 40 changed files with 29 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*.snap

# next.js
/apps/next/.next/
/apps/next/out/
/apps/portal/.next/
/apps/portal/out/

# vim: set filetype=ignore:
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"root": true,
"settings": {
"next": {
"rootDir": "apps/next/"
"rootDir": "apps/portal/"
},
"react": {
"version": "17.0.2"
},
"tailwindcss": {
"callees": ["twMerge"],
"config": "apps/next/tailwind.config.js"
"config": "apps/portal/tailwind.config.js"
}
},
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: POSTGRES_OR_WEBHOOK_URL=noop node --loader tsx ./bin/venice health

- name: Generate assets required for lint
run: pnpm --dir ./apps/next/ run generate:css
run: pnpm --dir ./apps/portal/ run generate:css

- name: Run lint
run: pnpm run lint
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
/coverage

# next.js
/apps/next/.next/
/apps/next/out/
/apps/portal/.next/
/apps/portal/out/

# production
/apps/next/build
/apps/portal/build

# misc
.DS_Store
Expand Down Expand Up @@ -42,4 +42,4 @@ yarn-error.log*
.eslintcache

# tailwind
/apps/next/__generated__/tailwind.css
/apps/portal/__generated__/tailwind.css
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*.snap

# next.js
/apps/next/.next/
/apps/next/out/
/apps/portal/.next/
/apps/portal/out/

# pnpm
pnpm-lock.yaml
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"search.exclude": {
"**/*.generated": true
},
"tailwindCSS.experimental.configFile": "apps/next/tailwind.config.js",
"tailwindCSS.experimental.configFile": "apps/portal/tailwind.config.js",
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
"typescript.tsdk": "./node_modules/typescript/lib"
}
2 changes: 1 addition & 1 deletion apps/app-config/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## Deploy
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?env=POSTGRES_OR_WEBHOOK_URL%2Cint_plaid__clientId%2Cint_plaid__secrets__sandbox%2CJWT_SECRET_OR_PUBLIC_KEY&envDescription=After%20deploy%2C%20you%20can%20add%20other%20optional%20environment%20variables%20to%20configure%20for%20production%20and%20customize%20the%20default%20behavior.%20See%20the%20full%20list%20in%20README&envLink=https%3A%2F%2Fgithub.com%2Fusevenice%2Fvenice%23environment-variables&install-command=npm%20i%20pnpm%407.14.0%20-g%20%26%26%20pnpm%20install&project-name=my-venice&repository-url=https%3A%2F%2Fgithub.com%2FuseVenice%2Fvenice&root-directory=apps%2Fnext)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?env=POSTGRES_OR_WEBHOOK_URL%2Cint_plaid__clientId%2Cint_plaid__secrets__sandbox%2CJWT_SECRET_OR_PUBLIC_KEY&envDescription=After%20deploy%2C%20you%20can%20add%20other%20optional%20environment%20variables%20to%20configure%20for%20production%20and%20customize%20the%20default%20behavior.%20See%20the%20full%20list%20in%20README&envLink=https%3A%2F%2Fgithub.com%2Fusevenice%2Fvenice%23environment-variables&install-command=npm%20i%20pnpm%407.14.0%20-g%20%26%26%20pnpm%20install&project-name=my-venice&repository-url=https%3A%2F%2Fgithub.com%2FuseVenice%2Fvenice&root-directory=apps%2Fportal)

## Environment variables

Expand Down
2 changes: 1 addition & 1 deletion apps/app-config/_generateDocs.bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function makeVercelDeployButton(params: {

const deployButton = makeVercelDeployButton({
'repository-url': 'https://github.com/useVenice/venice',
'root-directory': 'apps/next',
'root-directory': 'apps/portal',
'project-name': 'my-venice',
env: [
'POSTGRES_OR_WEBHOOK_URL',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from '@usevenice/ui'
import {Container} from '@usevenice/ui/components/Container'

import {Container} from '../../../packages/ui/components/Container'
import {developerModeAtom} from '../contexts/atoms'
import {ActiveLink} from './ActiveLink'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/next/next-env.d.ts → apps/portal/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://portaljs.org/docs/basic-features/typescript for more information.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/next/package.json → apps/portal/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@usevenice/next",
"name": "@usevenice/portal",
"version": "0.0.0",
"private": true,
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions apps/next/pages/_app.tsx → apps/portal/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import '../__generated__/tailwind.css'

import {useAtomValue} from 'jotai'
import {NextAdapter} from 'next-query-params'
import {useRouterQuery} from 'next-router-query'
Expand All @@ -16,6 +14,7 @@ import type {Id} from '@usevenice/cdk-core'
import {VeniceProvider} from '@usevenice/engine-frontend'
import {UIProvider} from '@usevenice/ui'

import '../__generated__/tailwind.css'
import {accessTokenAtom, developerModeAtom} from '../contexts/atoms'

const queryClient = new QueryClient({
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import '@usevenice/app-config/register.node'

import * as trpcNext from '@trpc/server/adapters/next'
import {getCookie} from 'cookies-next'
import type {NextApiHandler, NextApiRequest} from 'next'

import {syncEngine, veniceRouter} from '@usevenice/app-config/backendConfig'
import '@usevenice/app-config/register.node'
import type {Id} from '@usevenice/cdk-core'
import {parseWebhookRequest} from '@usevenice/engine-backend'
import {kXLedgerId} from '@usevenice/engine-backend/auth-utils'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import type {GetServerSideProps} from 'next'

const Noop = () => null

// Test for https://stackoverflow.com/questions/64936872/next-js-is-there-any-way-to-render-an-xml-file
// Test for https://stackoverflow.com/questions/64936872/portal-js-is-there-any-way-to-render-an-xml-file
// Can use this to render conditional javascript imports
// Note that this does not work with getStaticProps because
// res is not accessible within getStaticProps.
// Would have to hack into next.js internals to figure out the pipeline
// Or alternatively use external CDN with either this or perhaps even api routes.
// Related note, https://next-code-elimination.vercel.app/ and https://github.com/vercel/next.js/issues/16153
// Related note, https://portal-code-elimination.vercel.app/ and https://github.com/vercel/portal.js/issues/16153
// eslint-disable-next-line @typescript-eslint/require-await
export const getServerSideProps: GetServerSideProps = async ({res}) => {
if (res) {
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module.exports = {
setupFiles: ['jest-date-mock'],
testEnvironment: 'node',
testPathIgnorePatterns: ['/node_modules/', '/apps/next/.next/'],
testPathIgnorePatterns: ['/node_modules/', '/apps/portal/.next/'],
watchPathIgnorePatterns: [
'\\.gen\\.d\\.ts',
'\\.gen\\.ts',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"repository": "[email protected]:usevenice/venice.git",
"license": "UNLICENSED",
"scripts": {
"dev": "pnpm run --filter next dev",
"docs": " --filter app-config dev",
"portal": "pnpm run --filter portal dev",
"docs": "pnpm run --filter app-config dev",
"lint": "eslint --ext .js,.ts,.tsx --cache .",
"mitm": "mitmweb --listen-port 3010 --web-port 3011 --mode reverse:http://localhost:3000",
"preinstall": "npx only-allow pnpm",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 34db641

Please sign in to comment.