export type SwapHandle = { component: string; /** المجلد الحيّ: ‎/core‎. */ target: string; /** الشجرة السابقة بعد إزاحتها: ‎/core.prev-0.20.0‎. */ previous: string; }; /** * AR: يزيح مُدخَلًا أعلى الشجرة (‎core‎، ‎runtime‎، ‎updates‎…) جانبًا ويعيد مقبضًا يتيح التراجع. * * **إعادة التسمية على ويندوز تفشل أحيانًا بلا سبب دائم**: مضادّ فيروسات أو مفهرس يمسك ملفًّا لأجزاء * من الثانية بعد إيقاف الخدمة، فتُعاد المحاولة قليلًا قبل الاستسلام. والتحديث والاستعادة يشتركان فيه * لأن طريق العودة واحد: ‎undoSwap‎ و‎discardPrevious‎ يعملان على المقبض. * EN: Moves a top-level entry (`core`, `runtime`, `updates`…) aside and returns a handle that makes rollback * possible. * * **Renaming on Windows fails intermittently for no lasting reason**: an antivirus or the indexer holds a * file for fractions of a second after the service stops, so it retries briefly before giving up. Update * and restore share it because the way back is one: `undoSwap` and `discardPrevious` act on the handle. */ export declare function swapEntryAside(root: string, entry: string, tag: string, label?: string): Promise; /** * AR: ينقل شجرةً جاهزة إلى موضعها النهائيّ. **نقلٌ لا نسخ**: الشجرة مفكوكةٌ أصلًا على نفس القسم، * فالنقل عمليةٌ واحدة مهما بلغ عدد الملفّات — والنسخ يضاعف زمن التوقّف ومساحة القرص معًا. * EN: Moves a prepared tree into its final place. **A move, not a copy**: the tree is already * extracted on the same volume, so the move is one operation however many files it holds — where * a copy doubles both the downtime and the disk used. */ export declare function moveIntoPlace(from: string, to: string): Promise; /** * AR: يفكّ الحزمة في موضع المكوّن. * * **يرفض أي مدخل يخرج من الوجهة.** أسماء المدخلات داخل الزِب يكتبها من صنعها، و * ‎..\..\runtime\node.exe‎ اسمُ مدخلٍ صالح تمامًا — فبدون هذا الحارس تستطيع حزمةٌ موقَّعة * أن تكتب خارج مجلدها. التوقيع يثبت أن الحزمة منّا، ولا يثبت أن من بناها لم يخطئ. * EN: Unpacks the bundle into the component's place. * * **Refuses any entry that escapes the destination.** Entry names inside a zip are written by * whoever made it, and `..\..\runtime\node.exe` is a perfectly valid one — so without this * guard a signed bundle could write outside its directory. The signature proves the bundle is * ours; it does not prove whoever built it made no mistake. */ export declare function extractInto(archive: string, destination: string, onEntry?: (done: number, total: number) => void): Promise; /** يتراجع: يحذف الجديد ويعيد القديم إلى مكانه. */ export declare function undoSwap(handle: SwapHandle): Promise; /** يثبّت النجاح: تُزال الشجرة السابقة. تُنادى **بعد** فحص الصحة لا قبله. */ export declare function discardPrevious(handle: SwapHandle): void; //# sourceMappingURL=apply.d.ts.map