Skip to content
Merged

Cli #395

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
# production
/build

# Rust build artifacts
**/target/
**/*.rs.bk
*.pdb

# misc
.DS_Store
*.pem
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
1 change: 1 addition & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const nextConfig: NextConfig = {
'@aws-sdk/client-s3',
'@aws-sdk/client-ses',
'@aws-sdk/s3-request-presigner',
'@fasttify/liquid-forge-native',
'dotenv',
'axios',
'node-fetch',
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"template-sync": "node scripts/template-sync.js",
"type-check": "tsc --noEmit",
"type-check:fast": "tsc --noEmit --skipLibCheck",
"clean:rust": "rm -rf packages/liquid-forge-native/target packages/liquid-forge-native/src packages/liquid-forge-native/benches packages/liquid-forge-native/.cargo",
"prebuild": "pnpm run clean:rust",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prebuild script deletes source code instead of artifacts

High Severity

The clean:rust script removes packages/liquid-forge-native/src, benches, and .cargo directories which contain actual Rust source code and configuration, not build artifacts. The src/ directory contains the main library implementation (lib.rs, filters/text.rs, filters/html.rs with hundreds of lines of code). Since prebuild runs clean:rust before every pnpm build, this would delete all source code and break the build. Only target/ (the build output directory) is appropriate to clean.

Fix in Cursor Fix in Web

"build:fast": "next build --turbopack",
"build:full": "pnpm run type-check && pnpm run build:fast",
"workspace:install": "pnpm install --workspaces",
Expand All @@ -50,7 +52,8 @@
"sandbox:logs": "npx ampx logs",
"upload-template": "node scripts/upload-base-template.js",
"license": "node scripts/add-license-header.js",
"license:check": "node scripts/check-license-header.js"
"license:check": "node scripts/check-license-header.js",
"check-build-size": "node scripts/check-build-size.js"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,css,scss,md}": [
Expand Down
3 changes: 2 additions & 1 deletion packages/liquid-forge-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
},
"files": [
"index.js",
"index.d.ts"
"index.d.ts",
"*.node"
]
}

Loading