-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
267 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//npm.pkg.github.com/:_authToken=${GIT_CREDENTIALS} | ||
@karrio:registry=https://npm.pkg.github.com/ | ||
always-auth=true | ||
legacy-peer-deps=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,76 @@ | ||
import { withSentryConfig } from "@sentry/nextjs"; | ||
import path from "path"; | ||
import { fileURLToPath } from 'url'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
transpilePackages: [ | ||
"@karrio/core", | ||
"@karrio/hooks", | ||
"@karrio/ui", | ||
"@karrio/lib", | ||
"@karrio/types", | ||
"@karrio/insiders", | ||
"@karrio/console", | ||
], | ||
sentry: { | ||
disableServerWebpackPlugin: true, | ||
disableClientWebpackPlugin: true, | ||
}, | ||
sassOptions: { | ||
includePaths: [path.join("src", "app", "styles")], | ||
}, | ||
reactStrictMode: true, | ||
transpilePackages: [ | ||
"@karrio/core", | ||
"@karrio/hooks", | ||
"@karrio/ui", | ||
"@karrio/lib", | ||
"@karrio/types", | ||
"@karrio/insiders", | ||
"@karrio/console" | ||
], | ||
sentry: { | ||
disableServerWebpackPlugin: true, | ||
disableClientWebpackPlugin: true, | ||
}, | ||
sassOptions: { | ||
includePaths: [path.join("src", "app", "styles")], | ||
}, | ||
webpack: (config, { isServer }) => { | ||
config.resolve.fallback = { fs: false, net: false, tls: false }; | ||
config.externals.push("pino-pretty", "encoding"); | ||
|
||
// Add module resolution aliases | ||
// config.resolve.alias = { | ||
// ...config.resolve.alias, | ||
// "@karrio/console": path.resolve(__dirname, "../../platform/packages/console/src") | ||
// }; | ||
|
||
// // Add module directories | ||
// config.resolve.modules = [ | ||
// path.resolve(__dirname, "../../platform/packages"), | ||
// "node_modules", | ||
// ...config.resolve.modules || [] | ||
// ]; | ||
|
||
return config; | ||
}, | ||
experimental: { | ||
swcMinify: false, | ||
esmExternals: true | ||
}, | ||
images: { | ||
unoptimized: true | ||
}, | ||
pageExtensions: ['js', 'jsx', 'ts', 'tsx'], | ||
typescript: { | ||
ignoreBuildErrors: true | ||
}, | ||
eslint: { | ||
ignoreDuringBuilds: true | ||
}, | ||
distDir: '.next', | ||
cleanDistDir: true | ||
}; | ||
|
||
const sentryWebpackPluginOptions = { | ||
// Additional config options for the Sentry Webpack plugin. Keep in mind that | ||
// the following options are set automatically, and overriding them is not | ||
// recommended: | ||
// release, url, org, project, authToken, configFile, stripPrefix, | ||
// urlPrefix, include, ignore | ||
|
||
silent: true, // Suppresses all logs | ||
// For all available options, see: | ||
// https://github.com/getsentry/sentry-webpack-plugin#options. | ||
// Additional config options for the Sentry Webpack plugin. Keep in mind that | ||
// the following options are set automatically, and overriding them is not | ||
// recommended: | ||
// release, url, org, project, authToken, configFile, stripPrefix, | ||
// urlPrefix, include, ignore | ||
|
||
silent: true, // Suppresses all logs | ||
// For all available options, see: | ||
// https://github.com/getsentry/sentry-webpack-plugin#options. | ||
}; | ||
|
||
export default withSentryConfig(nextConfig, sentryWebpackPluginOptions); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ | |
"eslint-config-next": "14.2.8", | ||
"tsconfig": "*" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
set -e # Exit on error | ||
set -x # Print commands for debugging | ||
|
||
# Configure git to use HTTPS instead of SSH | ||
git config --global url."https://${GIT_CREDENTIALS}@github.com/".insteadOf "[email protected]:" | ||
git config --global url."https://${GIT_CREDENTIALS}@github.com/karrioapi/".insteadOf "[email protected]:karrioapi/" | ||
|
||
# Configure npm for GitHub packages | ||
echo "//npm.pkg.github.com/:_authToken=${GIT_CREDENTIALS}" >~/.npmrc | ||
echo "@karrio:registry=https://npm.pkg.github.com/" >>~/.npmrc | ||
echo "always-auth=true" >>~/.npmrc | ||
echo "legacy-peer-deps=true" >>~/.npmrc | ||
|
||
# Navigate to root and clean submodules | ||
cd ../../../ | ||
rm -rf ee/insiders ee/platform | ||
git clean -ffdx | ||
git reset --hard HEAD | ||
git submodule deinit -f . | ||
git submodule sync --recursive | ||
git submodule update --init --recursive --force | ||
|
||
# Debug: Print directory structure | ||
echo "Current directory structure:" | ||
ls -la | ||
ls -la ee/platform/packages/console/src/modules/Organizations | ||
|
||
# Install dependencies using workspace resolution | ||
npm install -w @karrio/platform | ||
|
||
# Generate Prisma client | ||
cd ee/platform/packages/console | ||
npx prisma generate | ||
|
||
# Build the platform app using Turbo | ||
cd ../../../apps/platform | ||
export NEXT_TELEMETRY_DISABLED=1 | ||
npm run build --no-cache |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use client'; | ||
|
||
import dynamic from 'next/dynamic'; | ||
import { Suspense } from 'react'; | ||
|
||
const LandingLayout = dynamic(() => import("@karrio/console/layouts/root-layout"), { | ||
ssr: false, | ||
loading: () => <div>Loading...</div> | ||
}); | ||
|
||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<Suspense fallback={<div>Loading...</div>}> | ||
<LandingLayout>{children}</LandingLayout> | ||
</Suspense> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
export { default } from "@karrio/console/modules/Landing"; | ||
'use client'; | ||
|
||
import dynamic from 'next/dynamic'; | ||
import { Suspense } from 'react'; | ||
|
||
const LandingPage = dynamic(() => import("@karrio/console/modules/Landing"), { | ||
ssr: false, | ||
loading: () => <div>Loading...</div> | ||
}); | ||
|
||
export default function Page() { | ||
return ( | ||
<Suspense fallback={<div>Loading...</div>}> | ||
<LandingPage /> | ||
</Suspense> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
"use client"; | ||
export { default } from "@karrio/core/components/error"; | ||
"use client"; | ||
|
||
import dynamic from 'next/dynamic'; | ||
import { Suspense } from 'react'; | ||
|
||
const ErrorPage = dynamic(() => import("@karrio/console/modules/Error/500"), { | ||
ssr: false, | ||
loading: () => <div>Loading...</div> | ||
}); | ||
|
||
export default function Error() { | ||
return ( | ||
<Suspense fallback={<div>Loading...</div>}> | ||
<ErrorPage /> | ||
</Suspense> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
import "../styles/globals.css"; | ||
export { default } from "@karrio/console/layouts/root-layout"; | ||
import { Metadata } from "next"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Karrio Platform", | ||
description: "Karrio Platform", | ||
}; | ||
|
||
export default function RootLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<html lang="en"> | ||
<body> | ||
{children} | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
export { default } from "@karrio/console/modules/Maintainance"; | ||
'use client'; | ||
|
||
import dynamic from 'next/dynamic'; | ||
import { Suspense } from 'react'; | ||
|
||
const NotFound = dynamic(() => import("@karrio/console/modules/Error/404"), { | ||
ssr: false, | ||
loading: () => <div>Loading...</div> | ||
}); | ||
|
||
export default function Page() { | ||
return ( | ||
<Suspense fallback={<div>Loading...</div>}> | ||
<NotFound /> | ||
</Suspense> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
export { default } from "@karrio/console/modules/Landing"; | ||
import { lazy } from 'react'; | ||
|
||
const LandingPage = lazy(() => import("@karrio/console/modules/Landing")); | ||
|
||
export const dynamic = 'force-dynamic'; | ||
export const revalidate = 0; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<LandingPage /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"buildCommand": "chmod +x scripts/build.sh && ./scripts/build.sh", | ||
"outputDirectory": ".next", | ||
"framework": "nextjs", | ||
"git": { | ||
"submodules": true, | ||
"deploymentEnabled": { | ||
"paas-foundation": true | ||
} | ||
}, | ||
"installCommand": "npm install", | ||
"regions": [ | ||
"iad1" | ||
] | ||
} |
Submodule platform
updated
from 498cfb to d8d27f
Oops, something went wrong.