unpeek 3.0.0 → 4.0.1
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 +31 -16
- package/README.tr.md +41 -26
- package/dist/adapters/esbuild.cjs +5 -5
- package/dist/adapters/esbuild.d.cts +3 -1
- package/dist/adapters/esbuild.d.ts +2 -2
- package/dist/adapters/esbuild.js +5 -3
- package/dist/adapters/next/adapter.cjs +7 -6
- package/dist/adapters/next/adapter.d.cts +1 -1
- package/dist/adapters/next/adapter.d.ts +1 -1
- package/dist/adapters/next/adapter.js +6 -5
- package/dist/adapters/next/index.cjs +7 -6
- package/dist/adapters/next/index.js +6 -5
- package/dist/adapters/rollup.cjs +5 -5
- package/dist/adapters/rollup.d.cts +3 -1
- package/dist/adapters/rollup.d.ts +2 -2
- package/dist/adapters/rollup.js +5 -3
- package/dist/adapters/rspack.cjs +5 -4
- package/dist/adapters/rspack.d.cts +1 -1
- package/dist/adapters/rspack.d.ts +1 -1
- package/dist/adapters/rspack.js +3 -2
- package/dist/adapters/vite.cjs +5 -5
- package/dist/adapters/vite.d.cts +3 -1
- package/dist/adapters/vite.d.ts +2 -2
- package/dist/adapters/vite.js +5 -3
- package/dist/adapters/webpack.cjs +5 -5
- package/dist/adapters/webpack.d.cts +3 -1
- package/dist/adapters/webpack.d.ts +2 -2
- package/dist/adapters/webpack.js +5 -3
- package/dist/browser.cjs +3 -3
- package/dist/browser.d.cts +20 -17
- package/dist/browser.d.ts +20 -17
- package/dist/browser.js +2 -2
- package/dist/chunk-3GDHYBVH.cjs +1092 -0
- package/dist/chunk-4G2HCME5.js +429 -0
- package/dist/{chunk-BPRSCRUZ.js → chunk-4SOS3LRV.js} +53 -9
- package/dist/chunk-7ZEVJ4OR.cjs +595 -0
- package/dist/{chunk-FCF2EGPM.js → chunk-EN6QVR6P.js} +12 -3
- package/dist/{chunk-IZIWDJRF.js → chunk-LGTXAAZH.js} +3338 -972
- package/dist/chunk-M46SFJE7.cjs +7733 -0
- package/dist/{chunk-6TDCSIRZ.cjs → chunk-NNAAPDUS.cjs} +60 -16
- package/dist/chunk-OTA75YI6.cjs +429 -0
- package/dist/chunk-TYL32LUK.js +1092 -0
- package/dist/{chunk-IEBVL5BT.cjs → chunk-URPPSTHZ.cjs} +12 -3
- package/dist/{chunk-IICVBTR2.js → chunk-W77DAC3H.js} +22 -3
- package/dist/{chunk-ONM2CSTU.cjs → chunk-X6EETCO6.cjs} +64 -45
- package/dist/chunk-XYN5NYSD.js +595 -0
- package/dist/cli/index.js +4543 -1442
- package/dist/{config-CfXY_iDD.d.ts → config-Y6JwVGwX.d.cts} +15 -1
- package/dist/{config-CfXY_iDD.d.cts → config-Y6JwVGwX.d.ts} +15 -1
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +2 -2
- package/dist/{index-CjRTNPlj.d.cts → index-0O1WSfVP.d.ts} +7 -1
- package/dist/{index-Cm1IloVm.d.ts → index-COVHErnx.d.cts} +7 -1
- package/dist/index.cjs +231 -291
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +225 -285
- package/dist/plugins/unplugin.cjs +4 -3
- package/dist/plugins/unplugin.js +3 -2
- package/dist/{types-DYQIzGf6.d.cts → types-CMtZnV8C.d.ts} +3 -3
- package/dist/{types-ZHAFdOd3.d.ts → types-D93PuOOl.d.cts} +3 -3
- package/package.json +1 -1
- package/dist/chunk-APWMNVAZ.js +0 -764
- package/dist/chunk-DUK2SECY.js +0 -83
- package/dist/chunk-I6GXEHFR.cjs +0 -764
- package/dist/chunk-IAD5DV3D.cjs +0 -5367
- package/dist/chunk-RXUY3MPH.cjs +0 -83
package/dist/adapters/vite.d.cts
CHANGED
package/dist/adapters/vite.d.ts
CHANGED
package/dist/adapters/vite.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
vitePlugin
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-4G2HCME5.js";
|
|
4
|
+
import "../chunk-TYL32LUK.js";
|
|
5
|
+
import "../chunk-LGTXAAZH.js";
|
|
5
6
|
import "../chunk-LA6J3BT3.js";
|
|
6
7
|
|
|
7
8
|
// src/adapters/vite.ts
|
|
8
9
|
var vite_default = vitePlugin;
|
|
9
10
|
export {
|
|
10
|
-
vite_default as default
|
|
11
|
+
vite_default as default,
|
|
12
|
+
vitePlugin as unpeekVite
|
|
11
13
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkOTA75YI6cjs = require('../chunk-OTA75YI6.cjs');
|
|
4
|
+
require('../chunk-3GDHYBVH.cjs');
|
|
5
|
+
require('../chunk-M46SFJE7.cjs');
|
|
5
6
|
require('../chunk-L6BOM5VS.cjs');
|
|
6
7
|
|
|
7
8
|
// src/adapters/webpack.ts
|
|
8
|
-
var webpack_default =
|
|
9
|
+
var webpack_default = _chunkOTA75YI6cjs.webpackPlugin;
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
exports.default = webpack_default;
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
exports.default = webpack_default; exports.unpeekWebpack = _chunkOTA75YI6cjs.webpackPlugin;
|
package/dist/adapters/webpack.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
webpackPlugin
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-4G2HCME5.js";
|
|
4
|
+
import "../chunk-TYL32LUK.js";
|
|
5
|
+
import "../chunk-LGTXAAZH.js";
|
|
5
6
|
import "../chunk-LA6J3BT3.js";
|
|
6
7
|
|
|
7
8
|
// src/adapters/webpack.ts
|
|
8
9
|
var webpack_default = webpackPlugin;
|
|
9
10
|
export {
|
|
10
|
-
webpack_default as default
|
|
11
|
+
webpack_default as default,
|
|
12
|
+
webpackPlugin as unpeekWebpack
|
|
11
13
|
};
|
package/dist/browser.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkURPPSTHZcjs = require('./chunk-URPPSTHZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ var _chunkIEBVL5BTcjs = require('./chunk-IEBVL5BT.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkM46SFJE7cjs = require('./chunk-M46SFJE7.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 =
|
|
28
|
+
exports.PRESETS = _chunkURPPSTHZcjs.PRESETS; exports.UnpeekError = _chunkL6BOM5VScjs.UnpeekError; exports.computeFnv1aHash = _chunkM46SFJE7cjs.computeFnv1aHash; exports.computeIntegrityHash = _chunkM46SFJE7cjs.computeIntegrityHash; exports.createDeterrentSnippet = _chunkM46SFJE7cjs.createDeterrentSnippet; exports.detectHotPaths = _chunkM46SFJE7cjs.detectHotPaths; exports.generateRuntimeShield = _chunkM46SFJE7cjs.generateRuntimeShield; exports.isUnpeekError = _chunkL6BOM5VScjs.isUnpeekError; exports.transformJavaScript = _chunkM46SFJE7cjs.transformJavaScript; exports.verifyCodeIntegrity = _chunkM46SFJE7cjs.verifyCodeIntegrity;
|
package/dist/browser.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { U as UnpeekConfig, S as ShieldConfig, a as ShieldPayload } from './config-
|
|
2
|
-
export { B as BaseProtectionOptions, C as ConfigTarget, D as DeterrentMode, F as FilterConfig, H as HotPathConfig, M as ManglerConfig, N as NextConfigOptions, P as PRESETS, b as PatternInput, c as SemanticAnchorsConfig, d as ShieldOptionsConfig, e as SourcemapsConfig, f as UnpeekFramework, g as UnpeekPluginOptions, h as UnpeekProfile, V as VaultConfig, i as ViteConfigOptions } from './config-
|
|
3
|
-
import { H as HotPathReport } from './index-
|
|
4
|
-
export { S as ScrubberOptions, T as TransformOptions, a as TransformResult, b as TransformSkippedReason, U as UnpeekError, c as UnpeekErrorCode, i as isUnpeekError, t as transformJavaScript } from './index-
|
|
1
|
+
import { U as UnpeekConfig, S as ShieldConfig, a as ShieldPayload } from './config-Y6JwVGwX.cjs';
|
|
2
|
+
export { B as BaseProtectionOptions, C as ConfigTarget, D as DeterrentMode, F as FilterConfig, H as HotPathConfig, M as ManglerConfig, N as NextConfigOptions, P as PRESETS, b as PatternInput, c as SemanticAnchorsConfig, d as ShieldOptionsConfig, e as SourcemapsConfig, f as UnpeekFramework, g as UnpeekPluginOptions, h as UnpeekProfile, V as VaultConfig, i as ViteConfigOptions } from './config-Y6JwVGwX.cjs';
|
|
3
|
+
import { H as HotPathReport } from './index-COVHErnx.cjs';
|
|
4
|
+
export { S as ScrubberOptions, T as TransformOptions, a as TransformResult, b as TransformSkippedReason, U as UnpeekError, c as UnpeekErrorCode, i as isUnpeekError, t as transformJavaScript } from './index-COVHErnx.cjs';
|
|
5
5
|
|
|
6
6
|
declare function computeFnv1aHash(input: string, seed?: number): number;
|
|
7
7
|
|
|
@@ -14,25 +14,28 @@ declare function detectHotPaths(code: string, config?: UnpeekConfig): HotPathRep
|
|
|
14
14
|
*/
|
|
15
15
|
declare function computeIntegrityHash(source: string, seed?: number): number;
|
|
16
16
|
/**
|
|
17
|
-
* Verifies that a function or source string has not been pretty-printed
|
|
18
|
-
* by comparing its
|
|
17
|
+
* Verifies that a function or source string has not been pretty-printed,
|
|
18
|
+
* spoofed (`{ toString() {} }`), or modified by comparing its FNV-1a hash
|
|
19
|
+
* after validating native `Reflect.apply` invariants.
|
|
19
20
|
*/
|
|
20
|
-
declare function verifyCodeIntegrity(fnOrSource: ((...args: unknown[]) => unknown) | string, expectedHash: number, seed?: number): boolean;
|
|
21
|
+
declare function verifyCodeIntegrity(fnOrSource: ((...args: unknown[]) => unknown) | string, expectedHash: number, seed?: number, normalized?: boolean): boolean;
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
* Generates a single-line, self-executing (IIFE), polymorphic, synchronous, SSR-safe (<1.5 KB)
|
|
24
|
-
* anti-tamper deterrent snippet that calculates a synchronous 32-bit FNV-1a hash of its own
|
|
25
|
-
* Function.prototype.toString() representation
|
|
26
|
-
*
|
|
24
|
+
* Generates a single-line, self-executing (IIFE), polymorphic, synchronous, SSR- & Worker-safe (<1.5 KB)
|
|
25
|
+
* anti-tamper deterrent snippet that calculates a normalized synchronous 32-bit FNV-1a hash of its own
|
|
26
|
+
* Function.prototype.toString() representation, writes the 16-bit key component (expectedDelta) to
|
|
27
|
+
* globalThis[windowKeySymbol], and records the v4 non-poisoning state tuple
|
|
28
|
+
* globalThis[windowKeySymbol + '_s'] = [status, k0, k1, epoch, nonce] (status: 1=VERIFIED, 2=TAMPERED).
|
|
27
29
|
*
|
|
28
30
|
* Freedom To Operate (FTO) Compliance:
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
31
|
+
* US9979726B2 covers server-mediated intervention combined with a DOM sweeping loop, while
|
|
32
|
+
* US10380382B2 covers periodic debugger console polling. unpeek strictly avoids both mechanisms
|
|
33
|
+
* and operates purely client-side and build-time synchronously within the expired US7757097B2
|
|
34
|
+
* (Expired - Lifetime) public prior-art domain.
|
|
32
35
|
*
|
|
33
|
-
* When tampering is detected (
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
+
* When tampering is detected (webdriver when enabled, toString/Reflect/descriptor spoofing, or code alteration):
|
|
37
|
+
* globalThis.__unpeek_tampered is set to true, state status is pinned to 2, String.prototype._u is poisoned to 14,
|
|
38
|
+
* globalThis[sym] is poisoned to expectedDelta ^ mask, and CustomEvent('unpeek:tamper') is dispatched.
|
|
36
39
|
*/
|
|
37
40
|
declare function createDeterrentSnippet(config: ShieldConfig): string;
|
|
38
41
|
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { U as UnpeekConfig, S as ShieldConfig, a as ShieldPayload } from './config-
|
|
2
|
-
export { B as BaseProtectionOptions, C as ConfigTarget, D as DeterrentMode, F as FilterConfig, H as HotPathConfig, M as ManglerConfig, N as NextConfigOptions, P as PRESETS, b as PatternInput, c as SemanticAnchorsConfig, d as ShieldOptionsConfig, e as SourcemapsConfig, f as UnpeekFramework, g as UnpeekPluginOptions, h as UnpeekProfile, V as VaultConfig, i as ViteConfigOptions } from './config-
|
|
3
|
-
import { H as HotPathReport } from './index-
|
|
4
|
-
export { S as ScrubberOptions, T as TransformOptions, a as TransformResult, b as TransformSkippedReason, U as UnpeekError, c as UnpeekErrorCode, i as isUnpeekError, t as transformJavaScript } from './index-
|
|
1
|
+
import { U as UnpeekConfig, S as ShieldConfig, a as ShieldPayload } from './config-Y6JwVGwX.js';
|
|
2
|
+
export { B as BaseProtectionOptions, C as ConfigTarget, D as DeterrentMode, F as FilterConfig, H as HotPathConfig, M as ManglerConfig, N as NextConfigOptions, P as PRESETS, b as PatternInput, c as SemanticAnchorsConfig, d as ShieldOptionsConfig, e as SourcemapsConfig, f as UnpeekFramework, g as UnpeekPluginOptions, h as UnpeekProfile, V as VaultConfig, i as ViteConfigOptions } from './config-Y6JwVGwX.js';
|
|
3
|
+
import { H as HotPathReport } from './index-0O1WSfVP.js';
|
|
4
|
+
export { S as ScrubberOptions, T as TransformOptions, a as TransformResult, b as TransformSkippedReason, U as UnpeekError, c as UnpeekErrorCode, i as isUnpeekError, t as transformJavaScript } from './index-0O1WSfVP.js';
|
|
5
5
|
|
|
6
6
|
declare function computeFnv1aHash(input: string, seed?: number): number;
|
|
7
7
|
|
|
@@ -14,25 +14,28 @@ declare function detectHotPaths(code: string, config?: UnpeekConfig): HotPathRep
|
|
|
14
14
|
*/
|
|
15
15
|
declare function computeIntegrityHash(source: string, seed?: number): number;
|
|
16
16
|
/**
|
|
17
|
-
* Verifies that a function or source string has not been pretty-printed
|
|
18
|
-
* by comparing its
|
|
17
|
+
* Verifies that a function or source string has not been pretty-printed,
|
|
18
|
+
* spoofed (`{ toString() {} }`), or modified by comparing its FNV-1a hash
|
|
19
|
+
* after validating native `Reflect.apply` invariants.
|
|
19
20
|
*/
|
|
20
|
-
declare function verifyCodeIntegrity(fnOrSource: ((...args: unknown[]) => unknown) | string, expectedHash: number, seed?: number): boolean;
|
|
21
|
+
declare function verifyCodeIntegrity(fnOrSource: ((...args: unknown[]) => unknown) | string, expectedHash: number, seed?: number, normalized?: boolean): boolean;
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
* Generates a single-line, self-executing (IIFE), polymorphic, synchronous, SSR-safe (<1.5 KB)
|
|
24
|
-
* anti-tamper deterrent snippet that calculates a synchronous 32-bit FNV-1a hash of its own
|
|
25
|
-
* Function.prototype.toString() representation
|
|
26
|
-
*
|
|
24
|
+
* Generates a single-line, self-executing (IIFE), polymorphic, synchronous, SSR- & Worker-safe (<1.5 KB)
|
|
25
|
+
* anti-tamper deterrent snippet that calculates a normalized synchronous 32-bit FNV-1a hash of its own
|
|
26
|
+
* Function.prototype.toString() representation, writes the 16-bit key component (expectedDelta) to
|
|
27
|
+
* globalThis[windowKeySymbol], and records the v4 non-poisoning state tuple
|
|
28
|
+
* globalThis[windowKeySymbol + '_s'] = [status, k0, k1, epoch, nonce] (status: 1=VERIFIED, 2=TAMPERED).
|
|
27
29
|
*
|
|
28
30
|
* Freedom To Operate (FTO) Compliance:
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
31
|
+
* US9979726B2 covers server-mediated intervention combined with a DOM sweeping loop, while
|
|
32
|
+
* US10380382B2 covers periodic debugger console polling. unpeek strictly avoids both mechanisms
|
|
33
|
+
* and operates purely client-side and build-time synchronously within the expired US7757097B2
|
|
34
|
+
* (Expired - Lifetime) public prior-art domain.
|
|
32
35
|
*
|
|
33
|
-
* When tampering is detected (
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
+
* When tampering is detected (webdriver when enabled, toString/Reflect/descriptor spoofing, or code alteration):
|
|
37
|
+
* globalThis.__unpeek_tampered is set to true, state status is pinned to 2, String.prototype._u is poisoned to 14,
|
|
38
|
+
* globalThis[sym] is poisoned to expectedDelta ^ mask, and CustomEvent('unpeek:tamper') is dispatched.
|
|
36
39
|
*/
|
|
37
40
|
declare function createDeterrentSnippet(config: ShieldConfig): string;
|
|
38
41
|
|
package/dist/browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PRESETS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EN6QVR6P.js";
|
|
4
4
|
import {
|
|
5
5
|
computeFnv1aHash,
|
|
6
6
|
computeIntegrityHash,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
generateRuntimeShield,
|
|
10
10
|
transformJavaScript,
|
|
11
11
|
verifyCodeIntegrity
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LGTXAAZH.js";
|
|
13
13
|
import {
|
|
14
14
|
UnpeekError,
|
|
15
15
|
isUnpeekError
|