fix: removed postinstall from root package.json

This commit is contained in:
John Yeo
2025-06-19 15:59:37 +01:00
parent 964a2c841d
commit 76dcd74e78
9 changed files with 31 additions and 19 deletions

14
.gitattributes vendored Normal file
View File

@@ -0,0 +1,14 @@
# Ensure shell scripts always use LF line endings
*.sh text eol=lf
# Ensure other common files use appropriate line endings
*.js text eol=lf
*.ts text eol=lf
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
# Docker files
Dockerfile* text eol=lf
docker-compose*.yml text eol=lf

View File

@@ -37,13 +37,13 @@ CMD ["pnpm", "run", "dev"]
# Stage 4: /server
FROM base AS server
COPY server/ ./server/
WORKDIR /app/server
COPY server/ ./
EXPOSE 8080
CMD ["pnpm", "run", "dev"]
# Stage 5: Workers
FROM base AS workers
COPY server/ ./server/
WORKDIR /app/server
COPY server/ ./
CMD ["pnpm", "run", "workers"]

View File

@@ -8,7 +8,6 @@
],
"type": "module",
"scripts": {
"postinstall": "pnpm -F shared build",
"vite:build": "pnpm -F shared build && pnpm -F vite build",
"vite:start": "pnpm -F vite start",
"server:build": "pnpm -F shared build && pnpm -F server prod:build",

View File

@@ -6,9 +6,9 @@
"type": "module",
"scripts": {
"email": "email dev -p 3001",
"dev": "NODE_ENV=development nodemon --no-deprecation --exec tsx src/index.ts --ignore scripts --ignore tests",
"start": "tsx src/index.ts",
"workers": "tsx watch src/workers.ts",
"dev": "npx nodemon --no-deprecation --exec npx tsx src/index.ts --ignore scripts --ignore tests",
"start": "npx tsx src/index.ts",
"workers": "npx tsx watch src/workers.ts",
"workers:start": "node --no-deprecation dist/src/workers.js",
"build": "tsc -b tsconfig.build.json",
"prod": "tsc -b tsconfig.build.json && tsc-alias && node dist/src/index.js",

View File

@@ -1,4 +1,3 @@
import { DrizzleCli } from "@/db/initDrizzle.js";
import {
constructBooleanFeature,
constructMeteredFeature,

View File

@@ -14,7 +14,7 @@
"license": "Apache-2.0",
"scripts": {
"build": "tsc",
"dev": "nodemon --watch . --ext ts --ignore dist --exec 'pnpm run build'",
"dev": "npx nodemon --watch . --ext ts --ignore dist --exec 'pnpm run build'",
"db:push": "cross-env NODE_OPTIONS=\"--import tsx\" pnpm exec drizzle-kit push --config drizzle.config.ts",
"db:generate": "cross-env NODE_OPTIONS=\"--import tsx\" pnpm exec drizzle-kit generate --config drizzle.config.ts",
"db:migrate": "cross-env NODE_OPTIONS=\"--import tsx\" pnpm exec drizzle-kit migrate --config drizzle.config.ts"

View File

@@ -140,6 +140,7 @@ export const SignIn = () => {
onChange={(e) => setEmail(e.target.value)}
required
className="text-base"
autoComplete="email"
/>
</div>

View File

@@ -17,6 +17,7 @@ import {
getBackendErrObj,
getRedirectUrl,
navigateTo,
nullish,
} from "@/utils/genUtils";
import { toast } from "sonner";
import { CusService } from "@/services/customers/CusService";
@@ -118,17 +119,16 @@ export const AttachModal = ({
const setLoading = useInvoice ? setInvoiceLoading : setCheckoutLoading;
const cusId = getCusId();
for (const option of options) {
if (nullish(option.quantity)) {
toast.error(`Quantity for ${option.feature_name} is required`);
return;
}
}
try {
setLoading(true);
const isCustom = attachState.itemsChanged;
const customData = attachState.itemsChanged
? {
items: product.items,
free_trial: product.free_trial || undefined,
}
: {};
const redirectUrl = getRedirectUrl(`/customers/${cusId}`, env);
const attachBody = getAttachBody({
@@ -144,8 +144,6 @@ export const AttachModal = ({
const { data } = await CusService.attach(axiosInstance, attachBody);
// 1. If checkout url, open checkout dialog
if (data.checkout_url) {
window.open(data.checkout_url, "_blank");
} else if (data.invoice) {
@@ -155,6 +153,7 @@ export const AttachModal = ({
}
toast.success(data.message || "Successfully attached product");
setOpen(false);
} catch (error) {
console.log("Error creating product: ", error);
const errObj = getBackendErrObj(error);

View File

@@ -49,7 +49,7 @@ export const FreeTrialConfig = ({
})
}
>
<SelectTrigger className="border-none shadow-none my-1">
<SelectTrigger className="border-none shadow-none my-1 bg-transparent">
<SelectValue placeholder="Days">
{freeTrial.duration}
</SelectValue>