fix: removed postinstall from root package.json
This commit is contained in:
14
.gitattributes
vendored
Normal file
14
.gitattributes
vendored
Normal 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
|
||||
@@ -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"]
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { DrizzleCli } from "@/db/initDrizzle.js";
|
||||
import {
|
||||
constructBooleanFeature,
|
||||
constructMeteredFeature,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -140,6 +140,7 @@ export const SignIn = () => {
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
required
|
||||
className="text-base"
|
||||
autoComplete="email"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user