unpeek 2.0.0 → 4.0.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.
Files changed (120) hide show
  1. package/README.md +57 -21
  2. package/README.tr.md +65 -29
  3. package/dist/adapters/esbuild.cjs +13 -0
  4. package/dist/adapters/esbuild.d.cts +13 -0
  5. package/dist/adapters/esbuild.d.ts +11 -0
  6. package/dist/adapters/esbuild.js +13 -0
  7. package/dist/adapters/next/adapter.cjs +43 -0
  8. package/dist/{next → adapters/next}/adapter.d.cts +4 -4
  9. package/dist/{next → adapters/next}/adapter.d.ts +4 -4
  10. package/dist/adapters/next/adapter.js +43 -0
  11. package/dist/adapters/next/index.cjs +16 -0
  12. package/dist/adapters/next/index.d.cts +53 -0
  13. package/dist/adapters/next/index.d.ts +53 -0
  14. package/dist/adapters/next/index.js +16 -0
  15. package/dist/adapters/rollup.cjs +13 -0
  16. package/dist/adapters/rollup.d.cts +13 -0
  17. package/dist/adapters/rollup.d.ts +11 -0
  18. package/dist/adapters/rollup.js +13 -0
  19. package/dist/adapters/rspack.cjs +13 -0
  20. package/dist/adapters/rspack.d.cts +13 -0
  21. package/dist/adapters/rspack.d.ts +11 -0
  22. package/dist/adapters/rspack.js +13 -0
  23. package/dist/adapters/vite.cjs +13 -0
  24. package/dist/adapters/vite.d.cts +13 -0
  25. package/dist/adapters/vite.d.ts +11 -0
  26. package/dist/adapters/vite.js +13 -0
  27. package/dist/adapters/webpack.cjs +13 -0
  28. package/dist/adapters/webpack.d.cts +13 -0
  29. package/dist/adapters/webpack.d.ts +11 -0
  30. package/dist/adapters/webpack.js +13 -0
  31. package/dist/browser.cjs +8 -5
  32. package/dist/browser.d.cts +44 -3
  33. package/dist/browser.d.ts +44 -3
  34. package/dist/browser.js +10 -7
  35. package/dist/{chunk-5QD6FZPB.js → chunk-2JU3V7HW.js} +75 -43
  36. package/dist/chunk-3LWXEJU6.cjs +1054 -0
  37. package/dist/chunk-4FNZNIBW.js +7391 -0
  38. package/dist/chunk-7HXLHLLQ.cjs +503 -0
  39. package/dist/chunk-ADKRENAP.js +1054 -0
  40. package/dist/chunk-EN6QVR6P.js +89 -0
  41. package/dist/chunk-HHC7BUCK.js +503 -0
  42. package/dist/chunk-KLYFNMKS.cjs +7391 -0
  43. package/dist/chunk-L6BOM5VS.cjs +40 -0
  44. package/dist/{chunk-OOXSZTRV.js → chunk-LA6J3BT3.js} +26 -1
  45. package/dist/chunk-URPPSTHZ.cjs +89 -0
  46. package/dist/chunk-VG4Y26ZN.cjs +429 -0
  47. package/dist/{chunk-GZB7PFLY.js → chunk-W77DAC3H.js} +46 -64
  48. package/dist/chunk-X6EETCO6.cjs +352 -0
  49. package/dist/chunk-YCRMTXOE.js +429 -0
  50. package/dist/{chunk-GAVI2C44.cjs → chunk-ZG7BIAUI.cjs} +80 -48
  51. package/dist/cli/index.js +9861 -32
  52. package/dist/{types-BBSRUEab.d.cts → config-Y6JwVGwX.d.cts} +58 -86
  53. package/dist/{types-BBSRUEab.d.ts → config-Y6JwVGwX.d.ts} +58 -86
  54. package/dist/config.cjs +4 -16
  55. package/dist/config.d.cts +1 -12
  56. package/dist/config.d.ts +1 -12
  57. package/dist/config.js +5 -17
  58. package/dist/index-0O1WSfVP.d.ts +52 -0
  59. package/dist/index-COVHErnx.d.cts +52 -0
  60. package/dist/index.cjs +437 -9
  61. package/dist/index.d.cts +9 -17
  62. package/dist/index.d.ts +9 -17
  63. package/dist/index.js +438 -10
  64. package/dist/plugins/unplugin.cjs +21 -0
  65. package/dist/plugins/unplugin.d.cts +17 -0
  66. package/dist/plugins/unplugin.d.ts +15 -0
  67. package/dist/{bundler → plugins}/unplugin.js +6 -5
  68. package/dist/types-CMtZnV8C.d.ts +112 -0
  69. package/dist/types-D93PuOOl.d.cts +112 -0
  70. package/package.json +48 -52
  71. package/dist/ast/index.cjs +0 -17
  72. package/dist/ast/index.d.cts +0 -18
  73. package/dist/ast/index.d.ts +0 -18
  74. package/dist/ast/index.js +0 -17
  75. package/dist/bundler/unplugin.cjs +0 -20
  76. package/dist/bundler/unplugin.d.cts +0 -16
  77. package/dist/bundler/unplugin.d.ts +0 -14
  78. package/dist/chunk-24K5NDXH.cjs +0 -370
  79. package/dist/chunk-27HR647Q.js +0 -190
  80. package/dist/chunk-4TDLLEEU.cjs +0 -15
  81. package/dist/chunk-5LCMI2TL.js +0 -575
  82. package/dist/chunk-5M6Z7ZFT.cjs +0 -83
  83. package/dist/chunk-6N6S6WTQ.cjs +0 -423
  84. package/dist/chunk-7YVEHJVM.cjs +0 -575
  85. package/dist/chunk-J5CGNZDM.cjs +0 -190
  86. package/dist/chunk-KQWNFKT2.js +0 -423
  87. package/dist/chunk-LXP73HJC.cjs +0 -4532
  88. package/dist/chunk-R6EBIR3T.cjs +0 -14
  89. package/dist/chunk-S4S2WXGC.js +0 -14
  90. package/dist/chunk-UMPUYLLZ.js +0 -4532
  91. package/dist/chunk-X5MKMFMX.js +0 -83
  92. package/dist/cli/index.cjs +0 -324
  93. package/dist/cli/index.d.cts +0 -22
  94. package/dist/cli/index.d.ts +0 -22
  95. package/dist/esbuild.cjs +0 -15
  96. package/dist/esbuild.d.cts +0 -11
  97. package/dist/esbuild.d.ts +0 -11
  98. package/dist/esbuild.js +0 -13
  99. package/dist/next/adapter.cjs +0 -31
  100. package/dist/next/adapter.js +0 -31
  101. package/dist/next/index.cjs +0 -18
  102. package/dist/next/index.d.cts +0 -42
  103. package/dist/next/index.d.ts +0 -42
  104. package/dist/next/index.js +0 -18
  105. package/dist/rollup.cjs +0 -15
  106. package/dist/rollup.d.cts +0 -11
  107. package/dist/rollup.d.ts +0 -11
  108. package/dist/rollup.js +0 -13
  109. package/dist/runtime/index.cjs +0 -17
  110. package/dist/runtime/index.d.cts +0 -36
  111. package/dist/runtime/index.d.ts +0 -36
  112. package/dist/runtime/index.js +0 -17
  113. package/dist/vite.cjs +0 -15
  114. package/dist/vite.d.cts +0 -11
  115. package/dist/vite.d.ts +0 -11
  116. package/dist/vite.js +0 -13
  117. package/dist/webpack.cjs +0 -15
  118. package/dist/webpack.d.cts +0 -11
  119. package/dist/webpack.d.ts +0 -11
  120. package/dist/webpack.js +0 -13
@@ -1,18 +0,0 @@
1
- import {
2
- createUnpeekNextAdapter,
3
- getUnpeekAdapterPath,
4
- readUnpeekNextOptionsFromEnv,
5
- withUnpeek
6
- } from "../chunk-5QD6FZPB.js";
7
- import "../chunk-5LCMI2TL.js";
8
- import "../chunk-GZB7PFLY.js";
9
- import "../chunk-UMPUYLLZ.js";
10
- import "../chunk-KQWNFKT2.js";
11
- import "../chunk-S4S2WXGC.js";
12
- import "../chunk-OOXSZTRV.js";
13
- export {
14
- createUnpeekNextAdapter,
15
- getUnpeekAdapterPath,
16
- readUnpeekNextOptionsFromEnv,
17
- withUnpeek
18
- };
package/dist/rollup.cjs DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunk5M6Z7ZFTcjs = require('./chunk-5M6Z7ZFT.cjs');
4
- require('./chunk-LXP73HJC.cjs');
5
- require('./chunk-6N6S6WTQ.cjs');
6
- require('./chunk-R6EBIR3T.cjs');
7
- require('./chunk-4TDLLEEU.cjs');
8
-
9
- // src/rollup.ts
10
- var rollup_default = _chunk5M6Z7ZFTcjs.rollupPlugin;
11
-
12
-
13
- exports.default = rollup_default;
14
-
15
- module.exports = exports.default;
package/dist/rollup.d.cts DELETED
@@ -1,11 +0,0 @@
1
- import { rollupPlugin } from './bundler/unplugin.cjs';
2
- import 'esbuild';
3
- import 'rollup';
4
- import 'webpack';
5
- import 'vite';
6
- import 'unplugin';
7
- import './types-BBSRUEab.cjs';
8
-
9
-
10
-
11
- export = rollupPlugin;
package/dist/rollup.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import { rollupPlugin } from './bundler/unplugin.js';
2
- import 'esbuild';
3
- import 'rollup';
4
- import 'webpack';
5
- import 'vite';
6
- import 'unplugin';
7
- import './types-BBSRUEab.js';
8
-
9
-
10
-
11
- export { rollupPlugin as default };
package/dist/rollup.js DELETED
@@ -1,13 +0,0 @@
1
- import {
2
- rollupPlugin
3
- } from "./chunk-X5MKMFMX.js";
4
- import "./chunk-UMPUYLLZ.js";
5
- import "./chunk-KQWNFKT2.js";
6
- import "./chunk-S4S2WXGC.js";
7
- import "./chunk-OOXSZTRV.js";
8
-
9
- // src/rollup.ts
10
- var rollup_default = rollupPlugin;
11
- export {
12
- rollup_default as default
13
- };
@@ -1,17 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
-
7
-
8
- var _chunk6N6S6WTQcjs = require('../chunk-6N6S6WTQ.cjs');
9
- require('../chunk-4TDLLEEU.cjs');
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
- exports.computeIntegrityHash = _chunk6N6S6WTQcjs.computeIntegrityHash; exports.createDeterrentSnippet = _chunk6N6S6WTQcjs.createDeterrentSnippet; exports.deriveIntegrityFnName = _chunk6N6S6WTQcjs.deriveIntegrityFnName; exports.deriveWindowKeySymbol = _chunk6N6S6WTQcjs.deriveWindowKeySymbol; exports.generateRuntimeShield = _chunk6N6S6WTQcjs.generateRuntimeShield; exports.verifyCodeIntegrity = _chunk6N6S6WTQcjs.verifyCodeIntegrity;
@@ -1,36 +0,0 @@
1
- import { ShieldConfig, ShieldPayload } from '../browser.cjs';
2
-
3
- /**
4
- * Computes a 32-bit unsigned FNV-1a hash over the un-normalized source string.
5
- * Any formatting change (such as DevTools Pretty-Print adding newlines or spaces)
6
- * or monkeypatching alters the resulting hash.
7
- */
8
- declare function computeIntegrityHash(source: string, seed?: number): number;
9
- /**
10
- * Verifies that a function or source string has not been pretty-printed or modified
11
- * by comparing its un-normalized Function.prototype.toString() FNV-1a hash.
12
- */
13
- declare function verifyCodeIntegrity(fnOrSource: ((...args: unknown[]) => unknown) | string, expectedHash: number, seed?: number): boolean;
14
-
15
- declare function deriveIntegrityFnName(seed: number): string;
16
- declare function deriveWindowKeySymbol(seed: number): string;
17
- /**
18
- * Generates a single-line, self-executing (IIFE), polymorphic, synchronous, SSR-safe (<1.5 KB)
19
- * anti-tamper deterrent snippet that calculates a synchronous 32-bit FNV-1a hash of its own
20
- * Function.prototype.toString() representation and writes the 16-bit key component (expectedDelta)
21
- * to window[windowKeySymbol].
22
- *
23
- * Freedom To Operate (FTO) Compliance:
24
- * Strictly avoids timer / setInterval active debugging checks, timing differential loops,
25
- * and periodic debugger polling covered by third-party patents (e.g. Jscrambler US9979726B2).
26
- * Operates purely via synchronous cryptographic state coupling via FNV-1a hash and tamper flags.
27
- *
28
- * When tampering is detected (formatting, pretty-print, webdriver, toString spoofing):
29
- * window.__unpeek_tampered is set to true, String.prototype._u is poisoned to 14,
30
- * window[sym] is poisoned to expectedDelta ^ 0x5a5b, and CustomEvent('unpeek:tamper') is dispatched.
31
- */
32
- declare function createDeterrentSnippet(config: ShieldConfig): string;
33
-
34
- declare function generateRuntimeShield(config: ShieldConfig): ShieldPayload;
35
-
36
- export { computeIntegrityHash, createDeterrentSnippet, deriveIntegrityFnName, deriveWindowKeySymbol, generateRuntimeShield, verifyCodeIntegrity };
@@ -1,36 +0,0 @@
1
- import { ShieldConfig, ShieldPayload } from '../browser.js';
2
-
3
- /**
4
- * Computes a 32-bit unsigned FNV-1a hash over the un-normalized source string.
5
- * Any formatting change (such as DevTools Pretty-Print adding newlines or spaces)
6
- * or monkeypatching alters the resulting hash.
7
- */
8
- declare function computeIntegrityHash(source: string, seed?: number): number;
9
- /**
10
- * Verifies that a function or source string has not been pretty-printed or modified
11
- * by comparing its un-normalized Function.prototype.toString() FNV-1a hash.
12
- */
13
- declare function verifyCodeIntegrity(fnOrSource: ((...args: unknown[]) => unknown) | string, expectedHash: number, seed?: number): boolean;
14
-
15
- declare function deriveIntegrityFnName(seed: number): string;
16
- declare function deriveWindowKeySymbol(seed: number): string;
17
- /**
18
- * Generates a single-line, self-executing (IIFE), polymorphic, synchronous, SSR-safe (<1.5 KB)
19
- * anti-tamper deterrent snippet that calculates a synchronous 32-bit FNV-1a hash of its own
20
- * Function.prototype.toString() representation and writes the 16-bit key component (expectedDelta)
21
- * to window[windowKeySymbol].
22
- *
23
- * Freedom To Operate (FTO) Compliance:
24
- * Strictly avoids timer / setInterval active debugging checks, timing differential loops,
25
- * and periodic debugger polling covered by third-party patents (e.g. Jscrambler US9979726B2).
26
- * Operates purely via synchronous cryptographic state coupling via FNV-1a hash and tamper flags.
27
- *
28
- * When tampering is detected (formatting, pretty-print, webdriver, toString spoofing):
29
- * window.__unpeek_tampered is set to true, String.prototype._u is poisoned to 14,
30
- * window[sym] is poisoned to expectedDelta ^ 0x5a5b, and CustomEvent('unpeek:tamper') is dispatched.
31
- */
32
- declare function createDeterrentSnippet(config: ShieldConfig): string;
33
-
34
- declare function generateRuntimeShield(config: ShieldConfig): ShieldPayload;
35
-
36
- export { computeIntegrityHash, createDeterrentSnippet, deriveIntegrityFnName, deriveWindowKeySymbol, generateRuntimeShield, verifyCodeIntegrity };
@@ -1,17 +0,0 @@
1
- import {
2
- computeIntegrityHash,
3
- createDeterrentSnippet,
4
- deriveIntegrityFnName,
5
- deriveWindowKeySymbol,
6
- generateRuntimeShield,
7
- verifyCodeIntegrity
8
- } from "../chunk-KQWNFKT2.js";
9
- import "../chunk-OOXSZTRV.js";
10
- export {
11
- computeIntegrityHash,
12
- createDeterrentSnippet,
13
- deriveIntegrityFnName,
14
- deriveWindowKeySymbol,
15
- generateRuntimeShield,
16
- verifyCodeIntegrity
17
- };
package/dist/vite.cjs DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunk5M6Z7ZFTcjs = require('./chunk-5M6Z7ZFT.cjs');
4
- require('./chunk-LXP73HJC.cjs');
5
- require('./chunk-6N6S6WTQ.cjs');
6
- require('./chunk-R6EBIR3T.cjs');
7
- require('./chunk-4TDLLEEU.cjs');
8
-
9
- // src/vite.ts
10
- var vite_default = _chunk5M6Z7ZFTcjs.vitePlugin;
11
-
12
-
13
- exports.default = vite_default;
14
-
15
- module.exports = exports.default;
package/dist/vite.d.cts DELETED
@@ -1,11 +0,0 @@
1
- import { vitePlugin } from './bundler/unplugin.cjs';
2
- import 'esbuild';
3
- import 'rollup';
4
- import 'webpack';
5
- import 'vite';
6
- import 'unplugin';
7
- import './types-BBSRUEab.cjs';
8
-
9
-
10
-
11
- export = vitePlugin;
package/dist/vite.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import { vitePlugin } from './bundler/unplugin.js';
2
- import 'esbuild';
3
- import 'rollup';
4
- import 'webpack';
5
- import 'vite';
6
- import 'unplugin';
7
- import './types-BBSRUEab.js';
8
-
9
-
10
-
11
- export { vitePlugin as default };
package/dist/vite.js DELETED
@@ -1,13 +0,0 @@
1
- import {
2
- vitePlugin
3
- } from "./chunk-X5MKMFMX.js";
4
- import "./chunk-UMPUYLLZ.js";
5
- import "./chunk-KQWNFKT2.js";
6
- import "./chunk-S4S2WXGC.js";
7
- import "./chunk-OOXSZTRV.js";
8
-
9
- // src/vite.ts
10
- var vite_default = vitePlugin;
11
- export {
12
- vite_default as default
13
- };
package/dist/webpack.cjs DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunk5M6Z7ZFTcjs = require('./chunk-5M6Z7ZFT.cjs');
4
- require('./chunk-LXP73HJC.cjs');
5
- require('./chunk-6N6S6WTQ.cjs');
6
- require('./chunk-R6EBIR3T.cjs');
7
- require('./chunk-4TDLLEEU.cjs');
8
-
9
- // src/webpack.ts
10
- var webpack_default = _chunk5M6Z7ZFTcjs.webpackPlugin;
11
-
12
-
13
- exports.default = webpack_default;
14
-
15
- module.exports = exports.default;
@@ -1,11 +0,0 @@
1
- import { webpackPlugin } from './bundler/unplugin.cjs';
2
- import 'esbuild';
3
- import 'rollup';
4
- import 'webpack';
5
- import 'vite';
6
- import 'unplugin';
7
- import './types-BBSRUEab.cjs';
8
-
9
-
10
-
11
- export = webpackPlugin;
package/dist/webpack.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import { webpackPlugin } from './bundler/unplugin.js';
2
- import 'esbuild';
3
- import 'rollup';
4
- import 'webpack';
5
- import 'vite';
6
- import 'unplugin';
7
- import './types-BBSRUEab.js';
8
-
9
-
10
-
11
- export { webpackPlugin as default };
package/dist/webpack.js DELETED
@@ -1,13 +0,0 @@
1
- import {
2
- webpackPlugin
3
- } from "./chunk-X5MKMFMX.js";
4
- import "./chunk-UMPUYLLZ.js";
5
- import "./chunk-KQWNFKT2.js";
6
- import "./chunk-S4S2WXGC.js";
7
- import "./chunk-OOXSZTRV.js";
8
-
9
- // src/webpack.ts
10
- var webpack_default = webpackPlugin;
11
- export {
12
- webpack_default as default
13
- };