# AfterPack Pro

Free आपके पूरे bundle को एक समान protect करता है। Pro आपको सबसे भारी protection केवल वहीं लगाने देता है जहाँ वह मायने रखती है: किसी एक function या फ़ाइल पर, directive के ज़रिए। यह हर build का रिकॉर्ड भी रखता है।

Source: https://www.afterpack.dev/hi/docs/pro

Free आधार है: पूरा transform catalog, आपके पूरे bundle पर एक समान लागू, आपकी machine पर, बिना किसी क़ीमत के। Pro ऐसे bundle के लिए है जो एक समान नहीं है, जब एक license check, एक pricing routine या एक embedded credential अपने आसपास के बाकी code से कहीं ज़्यादा क़ीमती हो।

Pro यह बदलता है कि protection कहाँ और कितनी सटीकता से लगती है। यह किसी भी अकेले transform की ताक़त नहीं बदलता। दोनों tiers [`complexity`](https://www.afterpack.dev/hi/docs/config#complexity) को उतना ऊँचा ले जा सकते हैं जितना आपका size budget अनुमति देता है।

## Free आपको पहले से क्या देता है

कोई सीमित trial नहीं। Free पूरी pipeline चलाता है: [`complexity`](https://www.afterpack.dev/hi/docs/config#complexity) असीमित है और [सीढ़ी](https://www.afterpack.dev/hi/docs/presets) का हर preset उपलब्ध है।

- **हर preset**: `minify` (target 0), `light` (5), `medium` (7), `hard` (12), `extreme` (25), और साथ में आपका सेट किया कोई भी raw numeric target। डिफ़ॉल्ट `light` है।
- **हर transform।** Literal lowering, control-flow flattening, opaque predicates, mixed boolean arithmetic, integer-expression bytecode, constant materialization, scope deepening, cross-dependency entanglement।
- **हर build पर नई संरचना।** हर build पर नई संरचना के लिए [seed](https://www.afterpack.dev/hi/docs/config#seed) छोड़ दें; जब आपको reproducible output चाहिए तो उसे pin करें।
- **बाकी सब जिसकी आप उम्मीद करते हैं**: [Protection Map](https://www.afterpack.dev/hi/docs/protection-map), [source maps](https://www.afterpack.dev/hi/docs/config#sourceMap-enabled), [framework plugins](https://www.afterpack.dev/hi/docs/frameworks), [framework detection](https://www.afterpack.dev/hi/docs/config#reflection-allow)। Obfuscation के लिए न account, न key, न कोई network call।
- **डिफ़ॉल्ट रूप से debug-friendly।** Devtools, breakpoints, `console.log` और watch expressions काम करते रहते हैं। जब build कुछ report करे, तो [Diagnostics](https://www.afterpack.dev/hi/docs/diagnostics) देखें।

Output size preset के साथ बढ़ता है; मापे गए sizes [Performance](https://www.afterpack.dev/hi/docs/performance#output-size) पर हैं। Pro आपको पूरे bundle के लिए preset बढ़ाने के बजाय उस size को केवल वहीं ख़र्च करने देता है जहाँ उसका फ़ायदा हो।

*(build targets diagram — see the web page)*

## Pro से क्या मिलता है

### Protection जिसे आप निशाने पर लगा सकते हैं

Free पर आपकी configuration bundle के हर node पर बराबर लागू होती है। Pro पर एक [marked region](https://www.afterpack.dev/hi/docs/directives#what-you-can-set) आपकी global settings को override करता है।

व्यवहार में इसका मतलब है कि आप तेज़ builds और छोटे output के लिए bundle को [`light`](https://www.afterpack.dev/hi/docs/presets) पर छोड़ सकते हैं, और फिर भी उन बीस पंक्तियों पर `extreme` लगा सकते हैं जो वास्तव में मायने रखती हैं:

```js
/* @afterpack preset=hard */
function verifyLicense(token) {
  // raised to complexity target 12, string floor forced on
}
/* @afterpack end */

/* @afterpack skip */
function debugPanel() {
  // target 0, floor off — left alone
}
/* @afterpack end */
```

Regions `@afterpack` [block comments](https://www.afterpack.dev/hi/docs/directives#writing-one) से आते हैं। Directives को plugin आपके source से पढ़ता है।

[Directive क्या सेट कर सकता है](https://www.afterpack.dev/hi/docs/directives#what-you-can-set): हर वह option जो region के हिसाब से लागू होता है।

> **Directives engine तक कैसे पहुँचते हैं**
>
> पढ़ने का काम करने वाला plugin [`@afterpack/next`](https://www.afterpack.dev/hi/docs/frameworks/nextjs), [`@afterpack/vite`](https://www.afterpack.dev/hi/docs/frameworks/vite), [`@afterpack/webpack`](https://www.afterpack.dev/hi/docs/frameworks/webpack) या [बाकी में से कोई](https://www.afterpack.dev/hi/docs/frameworks) है। [`npx afterpack@latest <path>`](https://www.afterpack.dev/hi/docs/cli#usage) से चलाई गई Pro build को पूरे bundle पर Pro protection मिलती है, [regions](https://www.afterpack.dev/hi/docs/directives) के बिना: CLI built output पर चलता है, जहाँ comments हट चुके होते हैं, इसलिए वह कोई directives नहीं पढ़ता और [`directives.enabled`](https://www.afterpack.dev/hi/docs/config#directives-enabled) को अस्वीकार करता है।

### License और payment paths के लिए hardening

दो protections जिन्हें आप चालू कर सकते हैं और जिन्हें Free builds लागू नहीं करतीं:

| Setting | यह आपके लिए क्या करती है |
|---|---|
| [`transforms.selfIntegrity.enabled`](https://www.afterpack.dev/hi/docs/config#transforms-kind-enabled) | अपनी ही check table पर एक check जोड़ता है और केवल उस table में किए गए बदलाव को पकड़ता है। आपके code में कहीं और किया गया बदलाव नहीं पकड़ा जाता। बिना छेड़छाड़ के, यह कुछ नहीं बदलता। |
| [`transforms.comparisonHardening.enabled`](https://www.afterpack.dev/hi/docs/config#transforms-kind-enabled) | String equality gate एक one-way digest check बन जाता है, इसलिए जिस literal से आप तुलना करते हैं वह artifact में पूरी तरह अनुपस्थित रहता है। |

दोनों डिफ़ॉल्ट रूप से बंद हैं। Flag किए गए reflection pattern को स्वीकार करना दोनों tiers पर एक जैसा काम करता है: आपकी configuration में [`reflection.allow`](https://www.afterpack.dev/hi/docs/config#reflection-allow)। इसे directive से सेट नहीं किया जा सकता।

### Builds AfterPack के infrastructure पर चलती हैं

एक [`key`](https://www.afterpack.dev/hi/docs/config#key) आपकी build की फ़ाइलों को [AfterPack के cloud](https://www.afterpack.dev/hi/docs/deployment-modes) पर भेजती है, जो हर फ़ाइल पूरी होते ही protected output लौटाता है। Install करने को कुछ अतिरिक्त नहीं, और update रखने को कुछ नहीं।

Source memory में process होता है और persist नहीं किया जाता। Engine की जगह बदलने पर क्या बदलता है, इसके लिए [Deployment modes](https://www.afterpack.dev/hi/docs/deployment-modes) देखें।

### हर build का रिकॉर्ड

Cloud build एक recorded build है। AfterPack उस build का [Protection Map](https://www.afterpack.dev/hi/docs/protection-map) और summary metrics की एक row store करता है, ताकि [dashboard](https://www.afterpack.dev/hi/docs/dashboard/builds) किसी भी हाल की build का map, [diagnostics](https://www.afterpack.dev/hi/docs/diagnostics) और timings दिखा सके। इससे "क्या वह release वाक़ई protected थी?" का जवाब कुछ भी दोबारा चलाए बिना मिल जाता है। [Storage project के हिसाब से है और बंद की जा सकती है](https://www.afterpack.dev/hi/docs/protection-map#turning-it-off)। Retention एक साल **और** हर project की आख़िरी 500 builds है, जो भी पहले ख़त्म हो। Usage megabyte के हिसाब से मापा जाता है। देखें [Pro की क़ीमत](https://www.afterpack.dev/hi/docs/pro#what-pro-costs)।

Tier दर tier पूरी capability matrix [Plans & tiers](https://www.afterpack.dev/hi/docs/tiers) में है।

## Pro की क़ीमत

Pro seats के बजाय usage मापता है। आप जो ख़रीदते हैं वह है **[cloud engine](https://www.afterpack.dev/hi/docs/deployment-modes) द्वारा process किए गए JavaScript के MB**: builds नहीं, फ़ाइलें नहीं, requests नहीं। Free समेत हर tier में workspace members असीमित हैं।

Pro key आपके पूरे client bundle को cloud engine से होकर भेजती है, और वह जो भी byte process करता है वह मापा जाता है, आपके marked regions के बाहर का code भी। 1.5 MB का Next.js client bundle हर build पर मासिक allowance का 1.5 MB इस्तेमाल करता है।

Pro capacity पाने के तीन तरीके हैं:

- **Free, registered: हर महीने 10 MB, बिना card।** किसी असली bundle पर surgical features लगाने और output की तुलना करने के लिए काफ़ी। देखें [Accounts](https://www.afterpack.dev/hi/docs/accounts)।
- **Extra MB: 20 MB के लिए $5, एक बार।** कभी expire नहीं होता, कभी अपने आप renew नहीं होता, और इसे ख़रीदने से कोई subscription शुरू नहीं होती। हर कुछ हफ़्तों में release ship करने वाला project केवल top-ups पर चल सकता है।
- **एक plan, $49/mo से, जब volume इसे सस्ता बना दे।** Indie में हर महीने 500 MB शामिल है, Team में 3 GB, Studio में 8 GB, हर एक में अपने आप per-MB overage के साथ ताकि व्यस्त sprint में CI fail न हो। Indie और Team में 14 दिन का trial शामिल है।

एक build **पहले plan allowance, फिर Extra MB, फिर overage** इसी क्रम में इस्तेमाल करती है, इसलिए top-up पहले ख़र्च होने के बजाय आपके मासिक allowance के पीछे रहता है। क़ीमतें, project की सीमाएँ, overage दरें और spend cap [Plans & tiers](https://www.afterpack.dev/hi/docs/tiers) में हैं।

अंदाज़े के लिए, एक सामान्य production SPA bundle कुछ सौ KB से लेकर एक-दो MB तक का होता है। मुफ़्त 10 MB कई असली builds कवर करता है, और Indie का 500 MB कुछ सौ।

## जल्द आ रहा है

आज उपलब्ध नहीं। ये [public roadmap](https://www.afterpack.dev/hi/roadmap) पर Pro के items हैं, जहाँ AfterPack बताता है कि क्या आने वाला है, और वहाँ कोई तारीख़ नहीं दी जाती।

| Capability | यह क्या जोड़ेगी |
|---|---|
| **Cross-module obfuscation** | एक फ़ाइल के भीतर के बजाय module की सीमाओं के पार entanglement। |
| **Network transport cloaking** | Wire पर आपके API requests और responses के लिए per-build codec। |
| **Managed source maps** | Production stack traces जिन्हें authenticated lookup से symbolicate किया जाता है, बिना कभी map ship किए। |

## Free build पर Pro-only setting क्या करती है

Free build protection बढ़ाने वाले [per-region directive](https://www.afterpack.dev/hi/docs/directives#free-builds) पर रुक जाती है, बजाय इसके कि source की माँग से कम protection लागू करे, और कोई भी दूसरा directive ignore कर देती है। ऊपर की दो hardening settings बस लागू नहीं होतीं। जो Pro build cloud तक नहीं पहुँच पाती, वह [fail closed होती है](https://www.afterpack.dev/hi/docs/diagnostics#fail-closed-no-exceptions)।

## आगे

- [Deployment modes](https://www.afterpack.dev/hi/docs/deployment-modes): हर tier कहाँ चलता है, और व्यवहार में fail-closed का क्या मतलब है।
- [Cloud API reference](https://www.afterpack.dev/hi/docs/cloud-api): हर Pro build के पीछे का wire contract।
- [Tiers](https://www.afterpack.dev/hi/docs/tiers): क़ीमतें, MB allowances, और हर plan कब सही बैठता है।
- [Protection Map](https://www.afterpack.dev/hi/docs/protection-map): build का map क्या दिखाता है, और वह कहाँ store होता है। [लाइव demo खोलें](https://www.afterpack.dev/protection-map-demo)।
- [Directives](https://www.afterpack.dev/hi/docs/directives): ऊपर के region markers की पूरी grammar।
- [Configuration](https://www.afterpack.dev/hi/docs/config): हर key, flag, variable और directive एक जगह।
- [Dashboard में builds](https://www.afterpack.dev/hi/docs/dashboard/builds): recorded cloud build बाद में कैसी दिखती है।
