unpeek 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/README.tr.md +2 -2
- package/dist/adapters/esbuild.cjs +5 -5
- package/dist/adapters/esbuild.js +3 -3
- package/dist/adapters/next/adapter.cjs +5 -5
- package/dist/adapters/next/adapter.js +4 -4
- package/dist/adapters/next/index.cjs +5 -5
- package/dist/adapters/next/index.js +4 -4
- package/dist/adapters/rollup.cjs +5 -5
- package/dist/adapters/rollup.js +3 -3
- package/dist/adapters/rspack.cjs +5 -5
- package/dist/adapters/rspack.js +3 -3
- package/dist/adapters/vite.cjs +5 -5
- package/dist/adapters/vite.js +3 -3
- package/dist/adapters/webpack.cjs +5 -5
- package/dist/adapters/webpack.js +3 -3
- package/dist/browser.cjs +2 -2
- package/dist/browser.js +1 -1
- package/dist/{chunk-UUJLTW7O.cjs → chunk-4IRIMLT3.cjs} +16 -16
- package/dist/{chunk-AD6UFBPA.cjs → chunk-4XSFPX2Z.cjs} +367 -8
- package/dist/{chunk-KIAYVIC5.cjs → chunk-7F75S3GQ.cjs} +60 -36
- package/dist/{chunk-K77WRITN.js → chunk-EASD7C2B.js} +3 -3
- package/dist/{chunk-APQOBFRO.js → chunk-GKWTP4Z5.js} +30 -6
- package/dist/{chunk-MSECP2P4.cjs → chunk-OR5M3SN2.cjs} +1199 -428
- package/dist/{chunk-32GLSJAW.js → chunk-RDP4MTHK.js} +359 -0
- package/dist/{chunk-BL2UXZGD.js → chunk-RM3V7KJA.js} +1040 -269
- package/dist/{chunk-SJK45WAU.cjs → chunk-SBRU7GSX.cjs} +8 -8
- package/dist/{chunk-GCWXTWTN.js → chunk-XEYMZUP5.js} +2 -2
- package/dist/cli/index.js +1425 -274
- package/dist/index.cjs +21 -21
- package/dist/index.js +3 -3
- package/dist/plugins/unplugin.cjs +4 -4
- package/dist/plugins/unplugin.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,9 +63,9 @@ flowchart TD
|
|
|
63
63
|
1. **Call-Graph Hot-Path Exemption (`<2%` CPU Budget)**
|
|
64
64
|
Before modifying an AST node, [`detectHotPaths`](packages/unpeek/src/ast/index.ts) traverses the file call graph bidirectionally. Functions containing loops (`for`, `while`, `do-while`, `for-of`), array higher-order callbacks (`.map`, `.filter`, `.reduce`, `.forEach`), `requestAnimationFrame` tickers, React/UI render components (PascalCase components carrying a JSX `createElement`/`_jsx` or `use*` hook/HOC UI signal), and all helper callees invoked from hot loops are flagged as hot paths. `unpeek` exempts hot loops and their callees from both opaque control-flow predicates and string vault rewriting, while protecting cold functions (such as license checks, request signers, and auth validators). Source Map v3 `sourcesContent`/`names` and VLQ mappings (`sourcemap-critical.ts`) preserve `/*! @unpeek-critical */` and `critical.include` targeting even when bundlers strip comments or rename symbols. V8 JIT optimization inside hot loops remains untouched.
|
|
65
65
|
2. **O(1) Const-Array & 64-Bit Salted String Vaults (`<15%` Gzip Budget)**
|
|
66
|
-
Cold string literals (`minStringLength >= 4`), static quasis inside interpolated `TemplateLiteral` nodes (`ToPrimitive("string")` evaluation order preserved; tagged templates, dynamic `import()`, and
|
|
66
|
+
Cold string literals (`minStringLength >= 4`), static quasis inside interpolated `TemplateLiteral` nodes (`ToPrimitive("string")` evaluation order preserved; tagged templates, dynamic `import()`, `new URL(..., import.meta.url)`/`import.meta.resolve`/`require.resolve` asset URLs, and ES2022 string module specifiers exempted), non-computed secret-bearing object keys (`init`-position `isLikelySecretLiteral` only, keeping `"__proto__"` and non-secret keys literal), and secret-bearing `RegExp` literals wrapped as `new RegExp(vault(...), flags)` (outside loops and `RegExp`-shadowed/`with` scopes) are encoded with a seed-shuffled 92-character involutory ASCII permutation (`P[P[c]] = c`) or 64-bit call-site salted decoders (`computeCallSiteSalt64`) backed by a shared singleton `<1.2 KB` host-coupled WASM KDF (`deriveWasmAbiNames` polymorphic 2–3 char import/export ABI + shuffled export order inside `<512 B`, masked `gMask`/`pcMask` host imports, and a bit-identical non-linear Rivest + S-Box JS fallback) and anti-strip cold-latch coupling on cache-miss decode (`Uint32Array`/`Int32Array` `_uAl`/`_uAm` + hoisted `_uLr` when `coldFlow` guards are emitted), alongside a shield-coupled, in-place re-encrypting `Uint8Array` + `TextDecoder` Shader Vault across both Tier 2 (`recommended`) and Tier 3 (`strict` / `--aggressive`). Universal binary/Base64 WASM payloads (`AGFzbQE`), binary `data:` URIs, and large pure Base64 blobs are exempted from vault double-encoding. Async tolerance for `sv === void 0` is narrowed to genuine loading DOM (`document.scripts.length > 0 && document.readyState !== 'complete'`) or Web Worker (`self.importScripts`) contexts without cache poisoning (`d = -1` removed), while bare non-browser VMs (`node:vm`, bare `{}`), already-complete documents without a shield, and active tampering fail closed without caching.
|
|
67
67
|
3. **Order-Independent `globalThis` Shield, Non-Linear MBA & Tier 3 Micro-VM v2**
|
|
68
|
-
Entry chunks inject an order-independent, `WorkerGlobalScope`-safe (`self`/`globalThis`, single-line `<2.3 KB`) integrity IIFE using `Function.prototype.toString()`, `Reflect.apply`, `Error.prepareStackTrace`, and `Error.prototype.stack` descriptor, signature, cross-call, and stack-trace `Proxy` trap checks (`verifyCodeIntegrity`), plus synchronous `detectHeadless` checks (`navigator.webdriver`, `HeadlessChrome`, `__playwright`, `__puppeteer_evaluation_script__`, `__nightmare`, `frida`, `_frida_`) when enabled. Cold paths (`coldFlow: true`) receive type-guarded `>=4`-variable semi-linear MBA + degree-3 Rivest $\mathbb{Z}_{2^{32}}$ QNR predicates across 6 state-, shield-, and domain-coupled predicate forms (including Form 4 unsigned-domain MBA inequalities and Form 5 parameterized affine-inverse MBA identities via `modInverseUint32`) and 4 modular residue families ($\pmod 4, \pmod 8, \pmod{16}$) without fixed `=== R` suffixes,
|
|
68
|
+
Entry chunks (discovered via bundler manifests or bounded HTML `<script>`, relative-import, and `Worker`/`SharedWorker` entry-graph traversal) inject an order-independent, `WorkerGlobalScope`-safe (`self`/`globalThis`, single-line `<2.3 KB`) integrity IIFE using `Function.prototype.toString()`, `Reflect.apply`, `Error.prepareStackTrace`, and `Error.prototype.stack` descriptor, signature, cross-call, and stack-trace `Proxy` trap checks (`verifyCodeIntegrity`), plus synchronous `detectHeadless` checks (`navigator.webdriver`, `HeadlessChrome`, `__playwright`, `__puppeteer_evaluation_script__`, `__nightmare`, `frida`, `_frida_`) when enabled. Cold paths (`coldFlow: true`) receive type-guarded `>=4`-variable semi-linear MBA + degree-3 Rivest $\mathbb{Z}_{2^{32}}$ QNR predicates across 6 state-, shield-, and domain-coupled predicate forms (including Form 4 unsigned-domain MBA inequalities and Form 5 parameterized affine-inverse MBA identities via `modInverseUint32`) and 4 modular residue families ($\pmod 4, \pmod 8, \pmod{16}$) without fixed `=== R` suffixes, cold `if (!<opaqueFalse>)` statement wrapping (`MAX_COLD_GUARDS_PER_CHUNK = 12`), alias perturbation, neutral decoy bridges, and `Math`/direct-`eval`/`with`/duplicate-param mangler scope hardening; Tier 3 / `--aggressive` adds cold-path `^`/`|`/`&` bitwise affine MBA substitution (`applyColdBitwiseMba`, up to 8 sites per chunk, guarded against `BigInt`, `with`, and `Math` shadowing) and priority-scores `@unpeek-critical` and critical submit/validation handlers into a `globalThis`-shared 44-opcode direct-threaded Micro-VM v2 (`OP_TOSTR` template coercion, `$step` trampoline, inter-block `$f.ac` ratchet, non-zero per-opcode semantic handler biases `1..31`, 32-bit `sym_s[1]` verification, `_uVm*` self-hashing, and zero `eval()`). The response on tamper is governed by `deterrentMode`:
|
|
69
69
|
- `passive` (default for both CLI `protect` and `unplugin`): Dispatches a tamper telemetry event (`unpeek:tamper`) to `self`/`globalThis` with zero console muting or audible breakage, enabling covert telemetry.
|
|
70
70
|
- `gradual` (opt-in via `--gradual` or `deterrentMode: 'gradual'`): Progressively corrupts internal runtime lookups and silences `console` output, neutralizing attackers without providing an immediate crash trace to patch.
|
|
71
71
|
4. **Multi-Pass Source Map Vault (`.unpeek-maps/`) & Automatic SHA-256 `debugId`**
|
package/README.tr.md
CHANGED
|
@@ -63,9 +63,9 @@ flowchart TD
|
|
|
63
63
|
1. **Çağrı Grafiği (Call-Graph) Hot-Path Muafiyeti (`<%2` CPU Bütçesi)**
|
|
64
64
|
[`detectHotPaths`](packages/unpeek/src/ast/index.ts), tek bir AST düğümünü değiştirmeden önce dosyanın çağrı grafiğini çift yönlü tarar. Döngü içeren fonksiyonlar (`for`, `while`, `do-while`, `for-of`), dizi yüksek mertebe geri çağrıları (`.map`, `.filter`, `.reduce`, `.forEach`), `requestAnimationFrame` zamanlayıcıları, React/UI bileşenleri (JSX `createElement`/`_jsx` veya `use*` kanca/HOC UI sinyali taşıyan PascalCase bileşenler) ve sıcak döngülerden çağrılan tüm yardımcı fonksiyonlar sıcak yol (hot path) olarak işaretlenir. `unpeek` sıcak döngüleri ve yardımcılarını hem opak kontrol akışı korumalarından hem de metin kasası dönüşümünden muaf tutar; korumayı yalnızca soğuk fonksiyonlara (lisans doğrulama, istek imzalama, yetki kontrolü gibi) uygular. Source Map v3 `sourcesContent`/`names` ve VLQ eşlemeleri (`sourcemap-critical.ts`), paketleyiciler yorumları temizlediğinde veya sembolleri yeniden adlandırdığında bile `/*! @unpeek-critical */` ve `critical.include` hedeflemesini korur. Sıcak döngülerdeki V8 JIT optimizasyonu doğal hızında çalışmayı sürdürür.
|
|
65
65
|
2. **O(1) Sabit-Dizi ve 64-Bit Tuzlu Metin Kasaları (`<%15` Gzip Bütçesi)**
|
|
66
|
-
Soğuk metin sabitleri (`minStringLength >= 4`), enterpolasyonlu `TemplateLiteral` ifadelerindeki statik metin parçaları (`ToPrimitive("string")` sırası korunarak; etiketli şablonlar, dinamik `import()` ve
|
|
66
|
+
Soğuk metin sabitleri (`minStringLength >= 4`), enterpolasyonlu `TemplateLiteral` ifadelerindeki statik metin parçaları (`ToPrimitive("string")` sırası korunarak; etiketli şablonlar, dinamik `import()`, `new URL(..., import.meta.url)`/`import.meta.resolve`/`require.resolve` varlık URL'leri ve ES2022 string modül belirteçleri muaf tutulur), hesaplanmamış sır taşıyan nesne anahtarları (yalnızca `init` konumundaki `isLikelySecretLiteral` anahtarları kasaya alınır; `"__proto__"` ve sıradan anahtarlar literal kalır) ve sır taşıyan `RegExp` değişmezleri `new RegExp(vault(...), flags)` biçiminde (döngüler ve `RegExp`-gölgeli/`with` kapsamları dışında), 92 karakterli kaçışsız involutory ASCII permütasyonu (`P[P[c]] = c`) veya paylaşımlı tekil `<1.2 KB` konak-bağlı WASM KDF (`deriveWasmAbiNames` polimorfik 2–3 karakterli içe/dışa aktarım ABI'si ve `<512 B` içinde karıştırılmış export sırası, maskeli `gMask`/`pcMask` konak içe aktarımları ve bit-özdeş non-lineer Rivest + S-Box JS yedeği ile) destekli 64-bit çağrı-noktası tuzlu çözücülerle (`computeCallSiteSalt64`) ve önbellek-ıskası çözümleme yolunda soyulma-karşıtı soğuk mandal bağlantısıyla (`coldFlow` koruyucuları üretildiğinde `Uint32Array`/`Int32Array` `_uAl`/`_uAm` + hoisted `_uLr`) kodlanır; hem Tier 2 (`recommended`) hem Tier 3 (`strict` / `--aggressive`) modlarında kalkanla eşleşen (shield-coupled) ve yerinde yeniden şifrelenen `Uint8Array` + `TextDecoder` Shader Kasası uygulanır. Evrensel ikili/Base64 WASM yükleri (`AGFzbQE`), ikili `data:` URI'ları ve büyük saf Base64 blokları çift kodlamaya karşı kasalardan muaf tutulur. `sv === void 0` için asenkron tolerans yalnızca yüklenmekte olan gerçek DOM (`document.scripts.length > 0 && document.readyState !== 'complete'`) veya Web Worker (`self.importScripts`) bağlamlarıyla sınırlandırılır ve önbelleği zehirlemeden (`d = -1` kaldırıldı) çözülür; çıplak tarayıcı-dışı VM bağlamları (`node:vm`, boş `{}`), kalkanı eksik tamamlanmış belgeler ve aktif kurcalamalar önbelleğe yazmadan kapalı başarısız olur.
|
|
67
67
|
3. **Sıra-Bağımsız `globalThis` Kalkanı, Non-Lineer MBA ve Tier 3 Micro-VM v2**
|
|
68
|
-
Giriş paketleri, `WorkerGlobalScope` uyumlu (`self`/`globalThis`, tek satır `<2.3 KB`) sıra-bağımsız bir bütünlük IIFE'i enjekte eder; [`verifyCodeIntegrity`](packages/unpeek/src/runtime/index.ts) ile `Function.prototype.toString()`, `Reflect.apply`, `Error.prepareStackTrace` ve `Error.prototype.stack` tanımlayıcı, imza, çapraz çağrı ve yığın izi `Proxy` tuzaklarını yakalar ve `detectHeadless: true` etkinleştirildiğinde `navigator.webdriver`, `HeadlessChrome`, `__playwright`, `__puppeteer_evaluation_script__`, `__nightmare`, `frida` ve `_frida_` işaretçilerini senkron denetler. Soğuk yollar (`coldFlow: true`), tip korumalı `>=4`-değişkenli yarı-lineer MBA + 6 durum-, kalkan- ve alan-bağlı koşul biçimi (Form 4 işaretsiz-alan MBA eşitsizliği ve `modInverseUint32` tabanlı Form 5 parametrik afin ters MBA özdeşliği dahil) ve 4 modüler rezidü ailesi ($\pmod 4, \pmod 8, \pmod{16}$) üzerinde sabit `=== R` soneki barındırmayan derece-3 Rivest $\mathbb{Z}_{2^{32}}$ QNR koşulları, alias tablosu
|
|
68
|
+
Giriş paketleri (paketleyici manifestleri veya sınırlı HTML `<script>`, görece içe aktarım ve `Worker`/`SharedWorker` giriş-grafiği taramasıyla belirlenir), `WorkerGlobalScope` uyumlu (`self`/`globalThis`, tek satır `<2.3 KB`) sıra-bağımsız bir bütünlük IIFE'i enjekte eder; [`verifyCodeIntegrity`](packages/unpeek/src/runtime/index.ts) ile `Function.prototype.toString()`, `Reflect.apply`, `Error.prepareStackTrace` ve `Error.prototype.stack` tanımlayıcı, imza, çapraz çağrı ve yığın izi `Proxy` tuzaklarını yakalar ve `detectHeadless: true` etkinleştirildiğinde `navigator.webdriver`, `HeadlessChrome`, `__playwright`, `__puppeteer_evaluation_script__`, `__nightmare`, `frida` ve `_frida_` işaretçilerini senkron denetler. Soğuk yollar (`coldFlow: true`), tip korumalı `>=4`-değişkenli yarı-lineer MBA + 6 durum-, kalkan- ve alan-bağlı koşul biçimi (Form 4 işaretsiz-alan MBA eşitsizliği ve `modInverseUint32` tabanlı Form 5 parametrik afin ters MBA özdeşliği dahil) ve 4 modüler rezidü ailesi ($\pmod 4, \pmod 8, \pmod{16}$) üzerinde sabit `=== R` soneki barındırmayan derece-3 Rivest $\mathbb{Z}_{2^{32}}$ QNR koşulları, soğuk `if (!<opaqueFalse>)` deyim sarmalama (`MAX_COLD_GUARDS_PER_CHUNK = 12`), alias tablosu karıştırması, nötr tuzak köprüleri ve `Math`/doğrudan `eval`/`with`/yinelenen-parametre mangler kapsam sertleştirmesi alır; Tier 3 / `--aggressive`, soğuk yoldaki `^`/`|`/`&` bit düzeyinde işlemleri parametrik afin MBA ile değiştirir (`applyColdBitwiseMba`, parça başına en fazla 8, `BigInt`/`with`/`Math` gölgeleme korumalı) ve `@unpeek-critical` ile kritik form/doğrulama işleyicilerini öncelik sırasıyla `globalThis` üzerinde paylaşılan 44-komutlu direct-threaded Micro-VM v2 motoruna (`OP_TOSTR` şablon zorlaması, `$step` trambolini, bloklar arası `$f.ac` çarkı, sıfır-olmayan opcode başına semantik handler sapmaları `1..31`, 32-bit `sym_s[1]` doğrulaması, `_uVm*` öz-karması ve sıfır `eval()`) taşır. Verilen tepki `deterrentMode` ile yönetilir:
|
|
69
69
|
- `passive` (hem CLI `protect` hem de `unplugin` varsayılanı): Konsol çıktısını susturmadan veya uygulamayı çökertmeden `self`/`globalThis` üzerine bir telemetri olayı (`unpeek:tamper`) iletir; tersine mühendislik girişimlerinin sessizce izlenmesini sağlar.
|
|
70
70
|
- `gradual` (`--gradual` veya `deterrentMode: 'gradual'` ile seçime bağlı): İç çalışma zamanı çözümlemelerini kademeli olarak bozar ve `console` çıktılarını susturur; saldırganların doğrudan yamayabileceği ani bir hata yığın izi üretmeden kodu işlevsizleştirir.
|
|
71
71
|
4. **Çok Geçişli Source Map Kasası (`.unpeek-maps/`) ve Otomatik SHA-256 `debugId`**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var _chunk4IRIMLT3cjs = require('../chunk-4IRIMLT3.cjs');
|
|
4
|
+
require('../chunk-4XSFPX2Z.cjs');
|
|
5
|
+
require('../chunk-OR5M3SN2.cjs');
|
|
6
6
|
require('../chunk-L6BOM5VS.cjs');
|
|
7
7
|
|
|
8
8
|
// src/adapters/esbuild.ts
|
|
9
|
-
var esbuild_default =
|
|
9
|
+
var esbuild_default = _chunk4IRIMLT3cjs.esbuildPlugin;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.default = esbuild_default; exports.unpeekEsbuild =
|
|
13
|
+
exports.default = esbuild_default; exports.unpeekEsbuild = _chunk4IRIMLT3cjs.esbuildPlugin;
|
package/dist/adapters/esbuild.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
esbuildPlugin
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-XEYMZUP5.js";
|
|
4
|
+
import "../chunk-RDP4MTHK.js";
|
|
5
|
+
import "../chunk-RM3V7KJA.js";
|
|
6
6
|
import "../chunk-LA6J3BT3.js";
|
|
7
7
|
|
|
8
8
|
// src/adapters/esbuild.ts
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSBRU7GSXcjs = require('../../chunk-SBRU7GSX.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7F75S3GQcjs = require('../../chunk-7F75S3GQ.cjs');
|
|
7
7
|
require('../../chunk-BQ2O6HM5.cjs');
|
|
8
8
|
require('../../chunk-URPPSTHZ.cjs');
|
|
9
|
-
require('../../chunk-
|
|
10
|
-
require('../../chunk-
|
|
9
|
+
require('../../chunk-4XSFPX2Z.cjs');
|
|
10
|
+
require('../../chunk-OR5M3SN2.cjs');
|
|
11
11
|
require('../../chunk-L6BOM5VS.cjs');
|
|
12
12
|
|
|
13
13
|
// src/adapters/next/adapter.ts
|
|
14
14
|
var cachedAdapter;
|
|
15
15
|
function getAdapter() {
|
|
16
16
|
if (!cachedAdapter) {
|
|
17
|
-
cachedAdapter =
|
|
17
|
+
cachedAdapter = _chunkSBRU7GSXcjs.createUnpeekNextAdapter.call(void 0, _chunk7F75S3GQcjs.readUnpeekNextOptionsFromEnv.call(void 0, ));
|
|
18
18
|
}
|
|
19
19
|
return cachedAdapter;
|
|
20
20
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createUnpeekNextAdapter
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-EASD7C2B.js";
|
|
4
4
|
import {
|
|
5
5
|
readUnpeekNextOptionsFromEnv
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-GKWTP4Z5.js";
|
|
7
7
|
import "../../chunk-6EWFL4LQ.js";
|
|
8
8
|
import "../../chunk-EN6QVR6P.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-RDP4MTHK.js";
|
|
10
|
+
import "../../chunk-RM3V7KJA.js";
|
|
11
11
|
import "../../chunk-LA6J3BT3.js";
|
|
12
12
|
|
|
13
13
|
// src/adapters/next/adapter.ts
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
5
|
+
var _chunkSBRU7GSXcjs = require('../../chunk-SBRU7GSX.cjs');
|
|
6
|
+
require('../../chunk-7F75S3GQ.cjs');
|
|
7
7
|
require('../../chunk-BQ2O6HM5.cjs');
|
|
8
8
|
require('../../chunk-URPPSTHZ.cjs');
|
|
9
|
-
require('../../chunk-
|
|
10
|
-
require('../../chunk-
|
|
9
|
+
require('../../chunk-4XSFPX2Z.cjs');
|
|
10
|
+
require('../../chunk-OR5M3SN2.cjs');
|
|
11
11
|
require('../../chunk-L6BOM5VS.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.createUnpeekNextAdapter =
|
|
16
|
+
exports.createUnpeekNextAdapter = _chunkSBRU7GSXcjs.createUnpeekNextAdapter; exports.getUnpeekAdapterPath = _chunkSBRU7GSXcjs.getUnpeekAdapterPath; exports.withUnpeek = _chunkSBRU7GSXcjs.withUnpeek;
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
createUnpeekNextAdapter,
|
|
3
3
|
getUnpeekAdapterPath,
|
|
4
4
|
withUnpeek
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-EASD7C2B.js";
|
|
6
|
+
import "../../chunk-GKWTP4Z5.js";
|
|
7
7
|
import "../../chunk-6EWFL4LQ.js";
|
|
8
8
|
import "../../chunk-EN6QVR6P.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-RDP4MTHK.js";
|
|
10
|
+
import "../../chunk-RM3V7KJA.js";
|
|
11
11
|
import "../../chunk-LA6J3BT3.js";
|
|
12
12
|
export {
|
|
13
13
|
createUnpeekNextAdapter,
|
package/dist/adapters/rollup.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var _chunk4IRIMLT3cjs = require('../chunk-4IRIMLT3.cjs');
|
|
4
|
+
require('../chunk-4XSFPX2Z.cjs');
|
|
5
|
+
require('../chunk-OR5M3SN2.cjs');
|
|
6
6
|
require('../chunk-L6BOM5VS.cjs');
|
|
7
7
|
|
|
8
8
|
// src/adapters/rollup.ts
|
|
9
|
-
var rollup_default =
|
|
9
|
+
var rollup_default = _chunk4IRIMLT3cjs.rollupPlugin;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.default = rollup_default; exports.unpeekRollup =
|
|
13
|
+
exports.default = rollup_default; exports.unpeekRollup = _chunk4IRIMLT3cjs.rollupPlugin;
|
package/dist/adapters/rollup.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rollupPlugin
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-XEYMZUP5.js";
|
|
4
|
+
import "../chunk-RDP4MTHK.js";
|
|
5
|
+
import "../chunk-RM3V7KJA.js";
|
|
6
6
|
import "../chunk-LA6J3BT3.js";
|
|
7
7
|
|
|
8
8
|
// src/adapters/rollup.ts
|
package/dist/adapters/rspack.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var _chunk4IRIMLT3cjs = require('../chunk-4IRIMLT3.cjs');
|
|
4
|
+
require('../chunk-4XSFPX2Z.cjs');
|
|
5
|
+
require('../chunk-OR5M3SN2.cjs');
|
|
6
6
|
require('../chunk-L6BOM5VS.cjs');
|
|
7
7
|
|
|
8
8
|
// src/adapters/rspack.ts
|
|
9
|
-
var rspack_default =
|
|
9
|
+
var rspack_default = _chunk4IRIMLT3cjs.rspackPlugin;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.default = rspack_default; exports.unpeekRspack =
|
|
13
|
+
exports.default = rspack_default; exports.unpeekRspack = _chunk4IRIMLT3cjs.rspackPlugin;
|
package/dist/adapters/rspack.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rspackPlugin
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-XEYMZUP5.js";
|
|
4
|
+
import "../chunk-RDP4MTHK.js";
|
|
5
|
+
import "../chunk-RM3V7KJA.js";
|
|
6
6
|
import "../chunk-LA6J3BT3.js";
|
|
7
7
|
|
|
8
8
|
// src/adapters/rspack.ts
|
package/dist/adapters/vite.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var _chunk4IRIMLT3cjs = require('../chunk-4IRIMLT3.cjs');
|
|
4
|
+
require('../chunk-4XSFPX2Z.cjs');
|
|
5
|
+
require('../chunk-OR5M3SN2.cjs');
|
|
6
6
|
require('../chunk-L6BOM5VS.cjs');
|
|
7
7
|
|
|
8
8
|
// src/adapters/vite.ts
|
|
9
|
-
var vite_default =
|
|
9
|
+
var vite_default = _chunk4IRIMLT3cjs.vitePlugin;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.default = vite_default; exports.unpeekVite =
|
|
13
|
+
exports.default = vite_default; exports.unpeekVite = _chunk4IRIMLT3cjs.vitePlugin;
|
package/dist/adapters/vite.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
vitePlugin
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-XEYMZUP5.js";
|
|
4
|
+
import "../chunk-RDP4MTHK.js";
|
|
5
|
+
import "../chunk-RM3V7KJA.js";
|
|
6
6
|
import "../chunk-LA6J3BT3.js";
|
|
7
7
|
|
|
8
8
|
// src/adapters/vite.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var _chunk4IRIMLT3cjs = require('../chunk-4IRIMLT3.cjs');
|
|
4
|
+
require('../chunk-4XSFPX2Z.cjs');
|
|
5
|
+
require('../chunk-OR5M3SN2.cjs');
|
|
6
6
|
require('../chunk-L6BOM5VS.cjs');
|
|
7
7
|
|
|
8
8
|
// src/adapters/webpack.ts
|
|
9
|
-
var webpack_default =
|
|
9
|
+
var webpack_default = _chunk4IRIMLT3cjs.webpackPlugin;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.default = webpack_default; exports.unpeekWebpack =
|
|
13
|
+
exports.default = webpack_default; exports.unpeekWebpack = _chunk4IRIMLT3cjs.webpackPlugin;
|
package/dist/adapters/webpack.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
webpackPlugin
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-XEYMZUP5.js";
|
|
4
|
+
import "../chunk-RDP4MTHK.js";
|
|
5
|
+
import "../chunk-RM3V7KJA.js";
|
|
6
6
|
import "../chunk-LA6J3BT3.js";
|
|
7
7
|
|
|
8
8
|
// src/adapters/webpack.ts
|
package/dist/browser.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var _chunkURPPSTHZcjs = require('./chunk-URPPSTHZ.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkOR5M3SN2cjs = require('./chunk-OR5M3SN2.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -25,4 +25,4 @@ var _chunkL6BOM5VScjs = require('./chunk-L6BOM5VS.cjs');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.PRESETS = _chunkURPPSTHZcjs.PRESETS; exports.UnpeekError = _chunkL6BOM5VScjs.UnpeekError; exports.computeFnv1aHash =
|
|
28
|
+
exports.PRESETS = _chunkURPPSTHZcjs.PRESETS; exports.UnpeekError = _chunkL6BOM5VScjs.UnpeekError; exports.computeFnv1aHash = _chunkOR5M3SN2cjs.computeFnv1aHash; exports.computeIntegrityHash = _chunkOR5M3SN2cjs.computeIntegrityHash; exports.createDeterrentSnippet = _chunkOR5M3SN2cjs.createDeterrentSnippet; exports.detectHotPaths = _chunkOR5M3SN2cjs.detectHotPaths; exports.generateRuntimeShield = _chunkOR5M3SN2cjs.generateRuntimeShield; exports.isUnpeekError = _chunkL6BOM5VScjs.isUnpeekError; exports.transformJavaScript = _chunkOR5M3SN2cjs.transformJavaScript; exports.verifyCodeIntegrity = _chunkOR5M3SN2cjs.verifyCodeIntegrity;
|
package/dist/browser.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk4XSFPX2Zcjs = require('./chunk-4XSFPX2Z.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ var _chunkAD6UFBPAcjs = require('./chunk-AD6UFBPA.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkOR5M3SN2cjs = require('./chunk-OR5M3SN2.cjs');
|
|
18
18
|
|
|
19
19
|
// src/plugins/unplugin.ts
|
|
20
20
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -36,12 +36,12 @@ function isExcludedClientAsset(fileName, config) {
|
|
|
36
36
|
}
|
|
37
37
|
const cleanRel = norm.replace(/^\/+/, "");
|
|
38
38
|
if (_optionalChain([config, 'optionalAccess', _2 => _2.filter, 'optionalAccess', _3 => _3.include]) && config.filter.include.length > 0) {
|
|
39
|
-
if (!config.filter.include.some((pattern) =>
|
|
39
|
+
if (!config.filter.include.some((pattern) => _chunk4XSFPX2Zcjs.matchesGlobPattern.call(void 0, cleanRel, pattern))) {
|
|
40
40
|
return true;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
if (_optionalChain([config, 'optionalAccess', _4 => _4.filter, 'optionalAccess', _5 => _5.exclude]) && config.filter.exclude.length > 0) {
|
|
44
|
-
if (config.filter.exclude.some((pattern) =>
|
|
44
|
+
if (config.filter.exclude.some((pattern) => _chunk4XSFPX2Zcjs.matchesGlobPattern.call(void 0, cleanRel, pattern))) {
|
|
45
45
|
return true;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -70,8 +70,8 @@ var unpeekPlugin = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
70
70
|
const injectRuntimeShield = _nullishCoalesce(options.injectRuntimeShield, () => ( true));
|
|
71
71
|
const minStringLength = _nullishCoalesce(_nullishCoalesce(options.minStringLength, () => ( _optionalChain([config, 'optionalAccess', _11 => _11.vault, 'optionalAccess', _12 => _12.minStringLength]))), () => ( 4));
|
|
72
72
|
const aggressive = _nullishCoalesce(options.aggressive, () => ( false));
|
|
73
|
-
const masterSym =
|
|
74
|
-
const masterShield = injectRuntimeShield ?
|
|
73
|
+
const masterSym = _chunkOR5M3SN2cjs.deriveWindowKeySymbol.call(void 0, baseSeed);
|
|
74
|
+
const masterShield = injectRuntimeShield ? _chunkOR5M3SN2cjs.generateRuntimeShield.call(void 0, {
|
|
75
75
|
seed: baseSeed,
|
|
76
76
|
deterrentMode,
|
|
77
77
|
detectHeadless,
|
|
@@ -82,15 +82,15 @@ var unpeekPlugin = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
82
82
|
if (!isSupportedJsAsset(normalizedFileName) || isExcludedClientAsset(normalizedFileName, config)) {
|
|
83
83
|
return null;
|
|
84
84
|
}
|
|
85
|
-
const fileDebugId =
|
|
85
|
+
const fileDebugId = _chunk4XSFPX2Zcjs.extractDebugId.call(void 0, rawCode);
|
|
86
86
|
const shouldStripComments = _optionalChain([config, 'optionalAccess', _13 => _13.sourcemaps, 'optionalAccess', _14 => _14.stripComments]) !== false;
|
|
87
87
|
let codeToTransform = rawCode;
|
|
88
88
|
if (shouldStripComments && rawCode.includes("sourceMappingURL=")) {
|
|
89
|
-
codeToTransform =
|
|
89
|
+
codeToTransform = _chunk4XSFPX2Zcjs.stripSourceMapComments.call(void 0, rawCode).code;
|
|
90
90
|
}
|
|
91
91
|
const shouldInjectShield = injectRuntimeShield && isEntry;
|
|
92
92
|
const shouldGenerateMap = requestMap || Boolean(inputMap);
|
|
93
|
-
const chunkSeed =
|
|
93
|
+
const chunkSeed = _chunkOR5M3SN2cjs.computeFnv1aHash.call(void 0, fileName, baseSeed);
|
|
94
94
|
const transformOptions = {
|
|
95
95
|
seed: chunkSeed,
|
|
96
96
|
minStringLength,
|
|
@@ -109,7 +109,7 @@ var unpeekPlugin = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
109
109
|
generateMap: shouldGenerateMap,
|
|
110
110
|
rootDir: process.cwd()
|
|
111
111
|
};
|
|
112
|
-
const result =
|
|
112
|
+
const result = _chunkOR5M3SN2cjs.transformJavaScript.call(void 0, codeToTransform, transformOptions);
|
|
113
113
|
let finalCode = result.code;
|
|
114
114
|
let preambleLineOffset = 0;
|
|
115
115
|
const integrityCheckFnName = masterShield && "integrityCheckFnName" in masterShield ? masterShield.integrityCheckFnName : void 0;
|
|
@@ -120,25 +120,25 @@ var unpeekPlugin = _unplugin.createUnplugin.call(void 0, (options = {}) => {
|
|
|
120
120
|
finalCode = `${prefix}${finalCode}`;
|
|
121
121
|
}
|
|
122
122
|
const rawTransformMap = result.sourceMap;
|
|
123
|
-
const shiftedTransformMap = rawTransformMap ?
|
|
123
|
+
const shiftedTransformMap = rawTransformMap ? _chunkOR5M3SN2cjs.shiftSourceMapLines.call(void 0, rawTransformMap, preambleLineOffset) : void 0;
|
|
124
124
|
let composedMap = null;
|
|
125
125
|
if (shiftedTransformMap && inputMap) {
|
|
126
|
-
composedMap =
|
|
126
|
+
composedMap = _chunkOR5M3SN2cjs.chainSourceMaps.call(void 0, shiftedTransformMap, inputMap);
|
|
127
127
|
} else if (shiftedTransformMap) {
|
|
128
128
|
composedMap = shiftedTransformMap;
|
|
129
129
|
} else if (inputMap) {
|
|
130
|
-
composedMap =
|
|
130
|
+
composedMap = _chunkOR5M3SN2cjs.flattenSourceMapSections.call(void 0, inputMap);
|
|
131
131
|
}
|
|
132
132
|
const inputMapDebugId = _nullishCoalesce(_optionalChain([inputMap, 'optionalAccess', _18 => _18.debugId]), () => ( _optionalChain([inputMap, 'optionalAccess', _19 => _19.debug_id])));
|
|
133
133
|
const hadDebugId = Boolean(fileDebugId || inputMapDebugId || result.debugId);
|
|
134
134
|
const shouldMintDebugId = hadDebugId || shouldGenerateMap && !result.skippedReason && Boolean(composedMap || inputMap);
|
|
135
135
|
if (shouldMintDebugId) {
|
|
136
|
-
const codeWithoutDebugId =
|
|
137
|
-
const mintedDebugId =
|
|
136
|
+
const codeWithoutDebugId = _chunk4XSFPX2Zcjs.stripDebugIdComments.call(void 0, finalCode);
|
|
137
|
+
const mintedDebugId = _chunkOR5M3SN2cjs.computeDeterministicDebugId.call(void 0,
|
|
138
138
|
codeWithoutDebugId,
|
|
139
139
|
_nullishCoalesce(_optionalChain([composedMap, 'optionalAccess', _20 => _20.mappings]), () => ( ""))
|
|
140
140
|
);
|
|
141
|
-
finalCode =
|
|
141
|
+
finalCode = _chunk4XSFPX2Zcjs.replaceOrAppendDebugId.call(void 0, codeWithoutDebugId, mintedDebugId);
|
|
142
142
|
if (composedMap) {
|
|
143
143
|
composedMap.debugId = mintedDebugId;
|
|
144
144
|
delete composedMap.debug_id;
|