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
|
@@ -12,6 +12,7 @@ interface ShieldPayload {
|
|
|
12
12
|
expectedHash: number;
|
|
13
13
|
windowKeySymbol?: string;
|
|
14
14
|
expectedDelta?: number;
|
|
15
|
+
stateKeySymbol?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
type UnpeekProfile = 'minimal' | 'recommended' | 'strict';
|
|
@@ -21,8 +22,14 @@ declare function loadUnpeekConfig(cwd?: string, explicitConfig?: UnpeekConfig):
|
|
|
21
22
|
|
|
22
23
|
type UnpeekFramework = 'nextjs' | 'vite' | 'webpack' | 'vanilla';
|
|
23
24
|
type ConfigTarget = 'browser' | 'worker' | 'universal';
|
|
25
|
+
type UnpeekTier = 'Tier 1' | 'Tier 2' | 'Tier 3';
|
|
24
26
|
type PatternInput = RegExp | string;
|
|
25
27
|
|
|
28
|
+
interface CriticalConfig {
|
|
29
|
+
include?: PatternInput[];
|
|
30
|
+
annotation?: string;
|
|
31
|
+
maxFunctionsPerChunk?: number;
|
|
32
|
+
}
|
|
26
33
|
interface FilterConfig {
|
|
27
34
|
include?: string[];
|
|
28
35
|
exclude?: string[];
|
|
@@ -78,12 +85,15 @@ interface UnpeekConfig {
|
|
|
78
85
|
framework?: UnpeekFramework;
|
|
79
86
|
target?: ConfigTarget;
|
|
80
87
|
profile?: UnpeekProfile;
|
|
88
|
+
tier?: UnpeekTier;
|
|
89
|
+
coldFlow?: boolean;
|
|
81
90
|
outDir?: string;
|
|
82
91
|
extensions?: string[];
|
|
83
92
|
publicDirs?: string[];
|
|
84
93
|
scrubPaths?: boolean;
|
|
85
94
|
filter?: FilterConfig;
|
|
86
95
|
hotPath?: HotPathConfig;
|
|
96
|
+
critical?: CriticalConfig;
|
|
87
97
|
vault?: VaultConfig;
|
|
88
98
|
mangler?: ManglerConfig;
|
|
89
99
|
shield?: ShieldOptionsConfig;
|
|
@@ -106,6 +116,10 @@ interface BaseProtectionOptions {
|
|
|
106
116
|
aggressive?: boolean;
|
|
107
117
|
/** Protection preset profile */
|
|
108
118
|
profile?: UnpeekProfile;
|
|
119
|
+
/** Explicit protection tier override */
|
|
120
|
+
tier?: UnpeekTier;
|
|
121
|
+
/** Tier 3 enclave targeting configuration (@unpeek-critical / include patterns) */
|
|
122
|
+
critical?: CriticalConfig;
|
|
109
123
|
/** Optional Unpeek configuration */
|
|
110
124
|
config?: UnpeekConfig;
|
|
111
125
|
}
|
|
@@ -116,4 +130,4 @@ interface UnpeekPluginOptions extends BaseProtectionOptions {
|
|
|
116
130
|
declare function defineConfig<const T extends UnpeekConfig>(config: T): T;
|
|
117
131
|
|
|
118
132
|
export { PRESETS as P, defineConfig as j, loadUnpeekConfig as l };
|
|
119
|
-
export type { BaseProtectionOptions as B, ConfigTarget as C, DeterrentMode as D, FilterConfig as F, HotPathConfig as H, ManglerConfig as M, NextConfigOptions as N, ShieldConfig as S, UnpeekConfig as U, VaultConfig as V, ShieldPayload as a, PatternInput as b, SemanticAnchorsConfig as c, ShieldOptionsConfig as d, SourcemapsConfig as e, UnpeekFramework as f, UnpeekPluginOptions as g, UnpeekProfile as h, ViteConfigOptions as i };
|
|
133
|
+
export type { BaseProtectionOptions as B, ConfigTarget as C, DeterrentMode as D, FilterConfig as F, HotPathConfig as H, ManglerConfig as M, NextConfigOptions as N, ShieldConfig as S, UnpeekConfig as U, VaultConfig as V, ShieldPayload as a, PatternInput as b, SemanticAnchorsConfig as c, ShieldOptionsConfig as d, SourcemapsConfig as e, UnpeekFramework as f, UnpeekPluginOptions as g, UnpeekProfile as h, ViteConfigOptions as i, CriticalConfig as k, UnpeekTier as m };
|
|
@@ -12,6 +12,7 @@ interface ShieldPayload {
|
|
|
12
12
|
expectedHash: number;
|
|
13
13
|
windowKeySymbol?: string;
|
|
14
14
|
expectedDelta?: number;
|
|
15
|
+
stateKeySymbol?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
type UnpeekProfile = 'minimal' | 'recommended' | 'strict';
|
|
@@ -21,8 +22,14 @@ declare function loadUnpeekConfig(cwd?: string, explicitConfig?: UnpeekConfig):
|
|
|
21
22
|
|
|
22
23
|
type UnpeekFramework = 'nextjs' | 'vite' | 'webpack' | 'vanilla';
|
|
23
24
|
type ConfigTarget = 'browser' | 'worker' | 'universal';
|
|
25
|
+
type UnpeekTier = 'Tier 1' | 'Tier 2' | 'Tier 3';
|
|
24
26
|
type PatternInput = RegExp | string;
|
|
25
27
|
|
|
28
|
+
interface CriticalConfig {
|
|
29
|
+
include?: PatternInput[];
|
|
30
|
+
annotation?: string;
|
|
31
|
+
maxFunctionsPerChunk?: number;
|
|
32
|
+
}
|
|
26
33
|
interface FilterConfig {
|
|
27
34
|
include?: string[];
|
|
28
35
|
exclude?: string[];
|
|
@@ -78,12 +85,15 @@ interface UnpeekConfig {
|
|
|
78
85
|
framework?: UnpeekFramework;
|
|
79
86
|
target?: ConfigTarget;
|
|
80
87
|
profile?: UnpeekProfile;
|
|
88
|
+
tier?: UnpeekTier;
|
|
89
|
+
coldFlow?: boolean;
|
|
81
90
|
outDir?: string;
|
|
82
91
|
extensions?: string[];
|
|
83
92
|
publicDirs?: string[];
|
|
84
93
|
scrubPaths?: boolean;
|
|
85
94
|
filter?: FilterConfig;
|
|
86
95
|
hotPath?: HotPathConfig;
|
|
96
|
+
critical?: CriticalConfig;
|
|
87
97
|
vault?: VaultConfig;
|
|
88
98
|
mangler?: ManglerConfig;
|
|
89
99
|
shield?: ShieldOptionsConfig;
|
|
@@ -106,6 +116,10 @@ interface BaseProtectionOptions {
|
|
|
106
116
|
aggressive?: boolean;
|
|
107
117
|
/** Protection preset profile */
|
|
108
118
|
profile?: UnpeekProfile;
|
|
119
|
+
/** Explicit protection tier override */
|
|
120
|
+
tier?: UnpeekTier;
|
|
121
|
+
/** Tier 3 enclave targeting configuration (@unpeek-critical / include patterns) */
|
|
122
|
+
critical?: CriticalConfig;
|
|
109
123
|
/** Optional Unpeek configuration */
|
|
110
124
|
config?: UnpeekConfig;
|
|
111
125
|
}
|
|
@@ -116,4 +130,4 @@ interface UnpeekPluginOptions extends BaseProtectionOptions {
|
|
|
116
130
|
declare function defineConfig<const T extends UnpeekConfig>(config: T): T;
|
|
117
131
|
|
|
118
132
|
export { PRESETS as P, defineConfig as j, loadUnpeekConfig as l };
|
|
119
|
-
export type { BaseProtectionOptions as B, ConfigTarget as C, DeterrentMode as D, FilterConfig as F, HotPathConfig as H, ManglerConfig as M, NextConfigOptions as N, ShieldConfig as S, UnpeekConfig as U, VaultConfig as V, ShieldPayload as a, PatternInput as b, SemanticAnchorsConfig as c, ShieldOptionsConfig as d, SourcemapsConfig as e, UnpeekFramework as f, UnpeekPluginOptions as g, UnpeekProfile as h, ViteConfigOptions as i };
|
|
133
|
+
export type { BaseProtectionOptions as B, ConfigTarget as C, DeterrentMode as D, FilterConfig as F, HotPathConfig as H, ManglerConfig as M, NextConfigOptions as N, ShieldConfig as S, UnpeekConfig as U, VaultConfig as V, ShieldPayload as a, PatternInput as b, SemanticAnchorsConfig as c, ShieldOptionsConfig as d, SourcemapsConfig as e, UnpeekFramework as f, UnpeekPluginOptions as g, UnpeekProfile as h, ViteConfigOptions as i, CriticalConfig as k, UnpeekTier as m };
|
package/dist/config.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkX6EETCO6cjs = require('./chunk-X6EETCO6.cjs');
|
|
5
|
+
require('./chunk-URPPSTHZ.cjs');
|
|
6
6
|
require('./chunk-L6BOM5VS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.defineConfig =
|
|
10
|
+
exports.defineConfig = _chunkX6EETCO6cjs.defineConfig; exports.loadUnpeekConfig = _chunkX6EETCO6cjs.loadUnpeekConfig;
|
package/dist/config.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BaseProtectionOptions, C as ConfigTarget, F as FilterConfig, H as HotPathConfig, M as ManglerConfig, N as NextConfigOptions, b as PatternInput, c as SemanticAnchorsConfig, d as ShieldOptionsConfig, e as SourcemapsConfig, U as UnpeekConfig, f as UnpeekFramework, g as UnpeekPluginOptions, h as UnpeekProfile, V as VaultConfig, i as ViteConfigOptions, j as defineConfig, l as loadUnpeekConfig } from './config-
|
|
1
|
+
export { B as BaseProtectionOptions, C as ConfigTarget, k as CriticalConfig, F as FilterConfig, H as HotPathConfig, M as ManglerConfig, N as NextConfigOptions, b as PatternInput, c as SemanticAnchorsConfig, d as ShieldOptionsConfig, e as SourcemapsConfig, U as UnpeekConfig, f as UnpeekFramework, g as UnpeekPluginOptions, h as UnpeekProfile, m as UnpeekTier, V as VaultConfig, i as ViteConfigOptions, j as defineConfig, l as loadUnpeekConfig } from './config-Y6JwVGwX.cjs';
|
package/dist/config.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BaseProtectionOptions, C as ConfigTarget, F as FilterConfig, H as HotPathConfig, M as ManglerConfig, N as NextConfigOptions, b as PatternInput, c as SemanticAnchorsConfig, d as ShieldOptionsConfig, e as SourcemapsConfig, U as UnpeekConfig, f as UnpeekFramework, g as UnpeekPluginOptions, h as UnpeekProfile, V as VaultConfig, i as ViteConfigOptions, j as defineConfig, l as loadUnpeekConfig } from './config-
|
|
1
|
+
export { B as BaseProtectionOptions, C as ConfigTarget, k as CriticalConfig, F as FilterConfig, H as HotPathConfig, M as ManglerConfig, N as NextConfigOptions, b as PatternInput, c as SemanticAnchorsConfig, d as ShieldOptionsConfig, e as SourcemapsConfig, U as UnpeekConfig, f as UnpeekFramework, g as UnpeekPluginOptions, h as UnpeekProfile, m as UnpeekTier, V as VaultConfig, i as ViteConfigOptions, j as defineConfig, l as loadUnpeekConfig } from './config-Y6JwVGwX.js';
|
package/dist/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BaseProtectionOptions } from './config-
|
|
1
|
+
import { B as BaseProtectionOptions, k as CriticalConfig } from './config-Y6JwVGwX.js';
|
|
2
2
|
|
|
3
3
|
interface HotPathReport {
|
|
4
4
|
totalFunctions: number;
|
|
@@ -13,6 +13,12 @@ interface ScrubberOptions {
|
|
|
13
13
|
}
|
|
14
14
|
interface TransformOptions extends BaseProtectionOptions {
|
|
15
15
|
filename?: string;
|
|
16
|
+
/** Project root directory stripped by the CWE-540 path scrubber */
|
|
17
|
+
rootDir?: string;
|
|
18
|
+
/** Tier 3 critical enclave targeting overrides */
|
|
19
|
+
critical?: CriticalConfig;
|
|
20
|
+
/** Generate an M2 Source Map v3 alongside the transformed output */
|
|
21
|
+
map?: boolean;
|
|
16
22
|
/** Throw UnpeekError on JavaScript parse failures instead of returning input unchanged */
|
|
17
23
|
strict?: boolean;
|
|
18
24
|
/** Scrub local filesystem paths and residual dev metadata (CWE-540) */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BaseProtectionOptions } from './config-
|
|
1
|
+
import { B as BaseProtectionOptions, k as CriticalConfig } from './config-Y6JwVGwX.cjs';
|
|
2
2
|
|
|
3
3
|
interface HotPathReport {
|
|
4
4
|
totalFunctions: number;
|
|
@@ -13,6 +13,12 @@ interface ScrubberOptions {
|
|
|
13
13
|
}
|
|
14
14
|
interface TransformOptions extends BaseProtectionOptions {
|
|
15
15
|
filename?: string;
|
|
16
|
+
/** Project root directory stripped by the CWE-540 path scrubber */
|
|
17
|
+
rootDir?: string;
|
|
18
|
+
/** Tier 3 critical enclave targeting overrides */
|
|
19
|
+
critical?: CriticalConfig;
|
|
20
|
+
/** Generate an M2 Source Map v3 alongside the transformed output */
|
|
21
|
+
map?: boolean;
|
|
16
22
|
/** Throw UnpeekError on JavaScript parse failures instead of returning input unchanged */
|
|
17
23
|
strict?: boolean;
|
|
18
24
|
/** Scrub local filesystem paths and residual dev metadata (CWE-540) */
|