metatroncubeswdev 365e45406a Bundle Offers Shopify app: discount function, admin, storefront, deploy stack
Rust discount function (one automatic discount evaluating all offers in priority
order, parity with the Odoo engine), React Router admin with Polaris, theme app
extension and app proxy pages, webhooks incl. GDPR, managed-pricing limits, and
a Docker Compose stack (Postgres + Caddy HTTPS) for a single VPS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:35:58 -04:00

22 lines
897 B
TOML

# Bundle Offers: ONE automatic app discount per shop runs this function, which evaluates every running offer.
# Rust (not JS): the JS build needed 39M instructions just to read a 200-line cart (limit 11M). See README.
api_version = "2026-07"
[[extensions]]
name = "t:name"
handle = "bundle-discount"
type = "function"
description = "t:description"
[[extensions.targeting]]
target = "cart.lines.discounts.generate.run"
input_query = "src/cart_lines_discounts_generate_run.graphql"
export = "cart_lines_discounts_generate_run"
# Collection ids, exclusion tags and the guard time come from this discount metafield (written by the app).
input_variables = { namespace = "$app", key = "function-vars" }
[extensions.build]
command = "cargo build --target=wasm32-unknown-unknown --release"
path = "target/wasm32-unknown-unknown/release/bundle-discount.wasm"
watch = ["src/**/*.rs"]