unpeek 2.0.0 → 3.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.
- package/README.md +30 -8
- package/README.tr.md +30 -8
- package/dist/adapters/esbuild.cjs +13 -0
- package/dist/{esbuild.d.cts → adapters/esbuild.d.cts} +2 -2
- package/dist/{esbuild.d.ts → adapters/esbuild.d.ts} +2 -2
- package/dist/adapters/esbuild.js +11 -0
- package/dist/adapters/next/adapter.cjs +42 -0
- package/dist/{next → adapters/next}/adapter.d.cts +4 -4
- package/dist/{next → adapters/next}/adapter.d.ts +4 -4
- package/dist/adapters/next/adapter.js +42 -0
- package/dist/adapters/next/index.cjs +15 -0
- package/dist/adapters/next/index.d.cts +53 -0
- package/dist/adapters/next/index.d.ts +53 -0
- package/dist/adapters/next/index.js +15 -0
- package/dist/adapters/rollup.cjs +13 -0
- package/dist/{rollup.d.cts → adapters/rollup.d.cts} +2 -2
- package/dist/{rollup.d.ts → adapters/rollup.d.ts} +2 -2
- package/dist/adapters/rollup.js +11 -0
- package/dist/adapters/rspack.cjs +12 -0
- package/dist/adapters/rspack.d.cts +13 -0
- package/dist/adapters/rspack.d.ts +11 -0
- package/dist/adapters/rspack.js +12 -0
- package/dist/adapters/vite.cjs +13 -0
- package/dist/{vite.d.cts → adapters/vite.d.cts} +2 -2
- package/dist/{vite.d.ts → adapters/vite.d.ts} +2 -2
- package/dist/adapters/vite.js +11 -0
- package/dist/adapters/webpack.cjs +13 -0
- package/dist/{webpack.d.cts → adapters/webpack.d.cts} +2 -2
- package/dist/{webpack.d.ts → adapters/webpack.d.ts} +2 -2
- package/dist/adapters/webpack.js +11 -0
- package/dist/browser.cjs +8 -5
- package/dist/browser.d.cts +41 -3
- package/dist/browser.d.ts +41 -3
- package/dist/browser.js +10 -7
- package/dist/{chunk-GAVI2C44.cjs → chunk-6TDCSIRZ.cjs} +76 -47
- package/dist/{chunk-5LCMI2TL.js → chunk-APWMNVAZ.js} +221 -32
- package/dist/{chunk-5QD6FZPB.js → chunk-BPRSCRUZ.js} +71 -42
- package/dist/{chunk-X5MKMFMX.js → chunk-DUK2SECY.js} +7 -7
- package/dist/chunk-FCF2EGPM.js +80 -0
- package/dist/{chunk-7YVEHJVM.cjs → chunk-I6GXEHFR.cjs} +241 -52
- package/dist/{chunk-LXP73HJC.cjs → chunk-IAD5DV3D.cjs} +1048 -213
- package/dist/chunk-IEBVL5BT.cjs +80 -0
- package/dist/{chunk-GZB7PFLY.js → chunk-IICVBTR2.js} +25 -62
- package/dist/{chunk-UMPUYLLZ.js → chunk-IZIWDJRF.js} +936 -101
- package/dist/chunk-L6BOM5VS.cjs +40 -0
- package/dist/{chunk-OOXSZTRV.js → chunk-LA6J3BT3.js} +26 -1
- package/dist/{chunk-24K5NDXH.cjs → chunk-ONM2CSTU.cjs} +45 -82
- package/dist/{chunk-5M6Z7ZFT.cjs → chunk-RXUY3MPH.cjs} +10 -10
- package/dist/cli/index.js +7309 -32
- package/dist/{types-BBSRUEab.d.cts → config-CfXY_iDD.d.cts} +44 -86
- package/dist/{types-BBSRUEab.d.ts → config-CfXY_iDD.d.ts} +44 -86
- package/dist/config.cjs +4 -16
- package/dist/config.d.cts +1 -12
- package/dist/config.d.ts +1 -12
- package/dist/config.js +5 -17
- package/dist/index-CjRTNPlj.d.cts +46 -0
- package/dist/index-Cm1IloVm.d.ts +46 -0
- package/dist/index.cjs +636 -9
- package/dist/index.d.cts +9 -17
- package/dist/index.d.ts +9 -17
- package/dist/index.js +638 -11
- package/dist/plugins/unplugin.cjs +20 -0
- package/dist/plugins/unplugin.d.cts +17 -0
- package/dist/plugins/unplugin.d.ts +15 -0
- package/dist/{bundler → plugins}/unplugin.js +5 -5
- package/dist/types-DYQIzGf6.d.cts +112 -0
- package/dist/types-ZHAFdOd3.d.ts +112 -0
- package/package.json +48 -52
- package/dist/ast/index.cjs +0 -17
- package/dist/ast/index.d.cts +0 -18
- package/dist/ast/index.d.ts +0 -18
- package/dist/ast/index.js +0 -17
- package/dist/bundler/unplugin.cjs +0 -20
- package/dist/bundler/unplugin.d.cts +0 -16
- package/dist/bundler/unplugin.d.ts +0 -14
- package/dist/chunk-27HR647Q.js +0 -190
- package/dist/chunk-4TDLLEEU.cjs +0 -15
- package/dist/chunk-6N6S6WTQ.cjs +0 -423
- package/dist/chunk-J5CGNZDM.cjs +0 -190
- package/dist/chunk-KQWNFKT2.js +0 -423
- package/dist/chunk-R6EBIR3T.cjs +0 -14
- package/dist/chunk-S4S2WXGC.js +0 -14
- package/dist/cli/index.cjs +0 -324
- package/dist/cli/index.d.cts +0 -22
- package/dist/cli/index.d.ts +0 -22
- package/dist/esbuild.cjs +0 -15
- package/dist/esbuild.js +0 -13
- package/dist/next/adapter.cjs +0 -31
- package/dist/next/adapter.js +0 -31
- package/dist/next/index.cjs +0 -18
- package/dist/next/index.d.cts +0 -42
- package/dist/next/index.d.ts +0 -42
- package/dist/next/index.js +0 -18
- package/dist/rollup.cjs +0 -15
- package/dist/rollup.js +0 -13
- package/dist/runtime/index.cjs +0 -17
- package/dist/runtime/index.d.cts +0 -36
- package/dist/runtime/index.d.ts +0 -36
- package/dist/runtime/index.js +0 -17
- package/dist/vite.cjs +0 -15
- package/dist/vite.js +0 -13
- package/dist/webpack.cjs +0 -15
- package/dist/webpack.js +0 -13
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkRXUY3MPHcjs = require('../chunk-RXUY3MPH.cjs');
|
|
10
|
+
require('../chunk-IAD5DV3D.cjs');
|
|
11
|
+
require('../chunk-L6BOM5VS.cjs');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.default = _chunkRXUY3MPHcjs.unplugin_default; exports.esbuildPlugin = _chunkRXUY3MPHcjs.esbuildPlugin; exports.rollupPlugin = _chunkRXUY3MPHcjs.rollupPlugin; exports.rspackPlugin = _chunkRXUY3MPHcjs.rspackPlugin; exports.unpeekPlugin = _chunkRXUY3MPHcjs.unpeekPlugin; exports.vitePlugin = _chunkRXUY3MPHcjs.vitePlugin; exports.webpackPlugin = _chunkRXUY3MPHcjs.webpackPlugin;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild';
|
|
2
|
+
import * as rollup from 'rollup';
|
|
3
|
+
import * as webpack from 'webpack';
|
|
4
|
+
import * as vite from 'vite';
|
|
5
|
+
import * as unplugin from 'unplugin';
|
|
6
|
+
import { UnpeekPluginOptions } from '../browser.cjs';
|
|
7
|
+
|
|
8
|
+
declare const unpeekPlugin: unplugin.UnpluginInstance<UnpeekPluginOptions | undefined, boolean>;
|
|
9
|
+
declare const vitePlugin: (options?: UnpeekPluginOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
10
|
+
declare const webpackPlugin: (options?: UnpeekPluginOptions | undefined) => webpack.WebpackPluginInstance;
|
|
11
|
+
declare const rollupPlugin: (options?: UnpeekPluginOptions | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
|
|
12
|
+
declare const esbuildPlugin: (options?: UnpeekPluginOptions | undefined) => esbuild.Plugin;
|
|
13
|
+
declare const rspackPlugin: (options?: UnpeekPluginOptions | undefined) => unplugin.RspackPluginInstance;
|
|
14
|
+
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
export = unpeekPlugin;
|
|
17
|
+
export { esbuildPlugin, rollupPlugin, rspackPlugin, unpeekPlugin, vitePlugin, webpackPlugin };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild';
|
|
2
|
+
import * as rollup from 'rollup';
|
|
3
|
+
import * as webpack from 'webpack';
|
|
4
|
+
import * as vite from 'vite';
|
|
5
|
+
import * as unplugin from 'unplugin';
|
|
6
|
+
import { UnpeekPluginOptions } from '../browser.js';
|
|
7
|
+
|
|
8
|
+
declare const unpeekPlugin: unplugin.UnpluginInstance<UnpeekPluginOptions | undefined, boolean>;
|
|
9
|
+
declare const vitePlugin: (options?: UnpeekPluginOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
10
|
+
declare const webpackPlugin: (options?: UnpeekPluginOptions | undefined) => webpack.WebpackPluginInstance;
|
|
11
|
+
declare const rollupPlugin: (options?: UnpeekPluginOptions | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
|
|
12
|
+
declare const esbuildPlugin: (options?: UnpeekPluginOptions | undefined) => esbuild.Plugin;
|
|
13
|
+
declare const rspackPlugin: (options?: UnpeekPluginOptions | undefined) => unplugin.RspackPluginInstance;
|
|
14
|
+
|
|
15
|
+
export { unpeekPlugin as default, esbuildPlugin, rollupPlugin, rspackPlugin, unpeekPlugin, vitePlugin, webpackPlugin };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
esbuildPlugin,
|
|
3
3
|
rollupPlugin,
|
|
4
|
+
rspackPlugin,
|
|
4
5
|
unpeekPlugin,
|
|
5
6
|
unplugin_default,
|
|
6
7
|
vitePlugin,
|
|
7
8
|
webpackPlugin
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-S4S2WXGC.js";
|
|
12
|
-
import "../chunk-OOXSZTRV.js";
|
|
9
|
+
} from "../chunk-DUK2SECY.js";
|
|
10
|
+
import "../chunk-IZIWDJRF.js";
|
|
11
|
+
import "../chunk-LA6J3BT3.js";
|
|
13
12
|
export {
|
|
14
13
|
unplugin_default as default,
|
|
15
14
|
esbuildPlugin,
|
|
16
15
|
rollupPlugin,
|
|
16
|
+
rspackPlugin,
|
|
17
17
|
unpeekPlugin,
|
|
18
18
|
vitePlugin,
|
|
19
19
|
webpackPlugin
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { f as UnpeekFramework, h as UnpeekProfile, B as BaseProtectionOptions } from './config-CfXY_iDD.cjs';
|
|
2
|
+
|
|
3
|
+
interface ProtectOptions extends BaseProtectionOptions {
|
|
4
|
+
/** Target project root directory (defaults to process.cwd()) */
|
|
5
|
+
cwd?: string;
|
|
6
|
+
/** Explicit client output directory override */
|
|
7
|
+
outDir?: string;
|
|
8
|
+
/** Move .map files to .unpeek-maps/ instead of permanently deleting (default: true) */
|
|
9
|
+
keepPrivateMaps?: boolean;
|
|
10
|
+
/** Private directory to store extracted source maps (default: '.unpeek-maps') */
|
|
11
|
+
privateMapsDir?: string;
|
|
12
|
+
/** Compute summary and Gzip delta in memory without writing files */
|
|
13
|
+
dryRun?: boolean;
|
|
14
|
+
/** Fail with ERR_BUDGET_EXCEEDED if gzipDeltaPercent exceeds this percentage */
|
|
15
|
+
maxGzipDelta?: number;
|
|
16
|
+
/** Scrub local filesystem paths and residual dev metadata (CWE-540) */
|
|
17
|
+
scrubPaths?: boolean;
|
|
18
|
+
}
|
|
19
|
+
type UnpeekDiagnosticSeverity = 'info' | 'warning';
|
|
20
|
+
interface UnpeekDiagnostic {
|
|
21
|
+
code: 'DOCKERIGNORE_MISSING' | 'PARSE_FALLBACK' | 'ALREADY_PROTECTED' | 'EMPTY_INPUT';
|
|
22
|
+
severity: UnpeekDiagnosticSeverity;
|
|
23
|
+
message: string;
|
|
24
|
+
file?: string;
|
|
25
|
+
}
|
|
26
|
+
interface SourceMapVaultResult {
|
|
27
|
+
movedMapsCount: number;
|
|
28
|
+
strippedFilesCount: number;
|
|
29
|
+
vaultDir: string;
|
|
30
|
+
movedFiles: string[];
|
|
31
|
+
dockerIgnoreMissing?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface ProtectSummary {
|
|
34
|
+
framework: UnpeekFramework;
|
|
35
|
+
outDir: string;
|
|
36
|
+
processedFiles: number;
|
|
37
|
+
movedSourceMaps: number;
|
|
38
|
+
originalBytes: number;
|
|
39
|
+
protectedBytes: number;
|
|
40
|
+
originalGzipBytes: number;
|
|
41
|
+
protectedGzipBytes: number;
|
|
42
|
+
gzipDeltaPercent: number;
|
|
43
|
+
totalHotFunctionsSkipped: number;
|
|
44
|
+
totalColdFunctionsProtected: number;
|
|
45
|
+
totalEncryptedStrings: number;
|
|
46
|
+
totalMangledSymbols: number;
|
|
47
|
+
elapsedMs: number;
|
|
48
|
+
seed?: number;
|
|
49
|
+
tier?: 'Tier 1' | 'Tier 2';
|
|
50
|
+
aggressive?: boolean;
|
|
51
|
+
dockerIgnoreMissing?: boolean;
|
|
52
|
+
dryRun?: boolean;
|
|
53
|
+
profile?: UnpeekProfile;
|
|
54
|
+
budgetExceeded?: boolean;
|
|
55
|
+
debugIdsPreserved?: number;
|
|
56
|
+
diagnostics?: readonly UnpeekDiagnostic[];
|
|
57
|
+
}
|
|
58
|
+
interface InitOptions {
|
|
59
|
+
dryRun?: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface InitResult {
|
|
62
|
+
updatedPackageJson: boolean;
|
|
63
|
+
updatedGitignore: boolean;
|
|
64
|
+
updatedNextConfig?: boolean;
|
|
65
|
+
framework?: UnpeekFramework;
|
|
66
|
+
isNext162Plus?: boolean;
|
|
67
|
+
message: string;
|
|
68
|
+
}
|
|
69
|
+
interface CheckOptions {
|
|
70
|
+
cwd?: string;
|
|
71
|
+
outDir?: string;
|
|
72
|
+
privateMapsDir?: string;
|
|
73
|
+
maxGzipDelta?: number;
|
|
74
|
+
requireZeroEval?: boolean;
|
|
75
|
+
strictCsp?: boolean;
|
|
76
|
+
}
|
|
77
|
+
interface CheckViolation {
|
|
78
|
+
rule: 'public-map' | 'sourcemap-comment' | 'ignore-missing' | 'gzip-budget' | 'eval-csp';
|
|
79
|
+
severity: 'error' | 'warning';
|
|
80
|
+
message: string;
|
|
81
|
+
file?: string;
|
|
82
|
+
}
|
|
83
|
+
interface CheckResult {
|
|
84
|
+
passed: boolean;
|
|
85
|
+
outDir: string;
|
|
86
|
+
checkedFiles: number;
|
|
87
|
+
violations: CheckViolation[];
|
|
88
|
+
warnings: CheckViolation[];
|
|
89
|
+
}
|
|
90
|
+
interface SymbolicateOptions {
|
|
91
|
+
stackTrace: string;
|
|
92
|
+
mapsDir?: string;
|
|
93
|
+
cwd?: string;
|
|
94
|
+
}
|
|
95
|
+
interface SymbolicateFrame {
|
|
96
|
+
raw: string;
|
|
97
|
+
file?: string;
|
|
98
|
+
line?: number;
|
|
99
|
+
column?: number;
|
|
100
|
+
originalSource?: string;
|
|
101
|
+
originalLine?: number;
|
|
102
|
+
originalColumn?: number;
|
|
103
|
+
originalName?: string;
|
|
104
|
+
resolved: boolean;
|
|
105
|
+
}
|
|
106
|
+
interface SymbolicateResult {
|
|
107
|
+
stackTrace: string;
|
|
108
|
+
frames: SymbolicateFrame[];
|
|
109
|
+
warnings: string[];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type { CheckOptions as C, InitOptions as I, ProtectSummary as P, SymbolicateOptions as S, UnpeekDiagnostic as U, ProtectOptions as a, InitResult as b, CheckResult as c, SymbolicateResult as d, CheckViolation as e, SourceMapVaultResult as f, SymbolicateFrame as g, UnpeekDiagnosticSeverity as h };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { f as UnpeekFramework, h as UnpeekProfile, B as BaseProtectionOptions } from './config-CfXY_iDD.js';
|
|
2
|
+
|
|
3
|
+
interface ProtectOptions extends BaseProtectionOptions {
|
|
4
|
+
/** Target project root directory (defaults to process.cwd()) */
|
|
5
|
+
cwd?: string;
|
|
6
|
+
/** Explicit client output directory override */
|
|
7
|
+
outDir?: string;
|
|
8
|
+
/** Move .map files to .unpeek-maps/ instead of permanently deleting (default: true) */
|
|
9
|
+
keepPrivateMaps?: boolean;
|
|
10
|
+
/** Private directory to store extracted source maps (default: '.unpeek-maps') */
|
|
11
|
+
privateMapsDir?: string;
|
|
12
|
+
/** Compute summary and Gzip delta in memory without writing files */
|
|
13
|
+
dryRun?: boolean;
|
|
14
|
+
/** Fail with ERR_BUDGET_EXCEEDED if gzipDeltaPercent exceeds this percentage */
|
|
15
|
+
maxGzipDelta?: number;
|
|
16
|
+
/** Scrub local filesystem paths and residual dev metadata (CWE-540) */
|
|
17
|
+
scrubPaths?: boolean;
|
|
18
|
+
}
|
|
19
|
+
type UnpeekDiagnosticSeverity = 'info' | 'warning';
|
|
20
|
+
interface UnpeekDiagnostic {
|
|
21
|
+
code: 'DOCKERIGNORE_MISSING' | 'PARSE_FALLBACK' | 'ALREADY_PROTECTED' | 'EMPTY_INPUT';
|
|
22
|
+
severity: UnpeekDiagnosticSeverity;
|
|
23
|
+
message: string;
|
|
24
|
+
file?: string;
|
|
25
|
+
}
|
|
26
|
+
interface SourceMapVaultResult {
|
|
27
|
+
movedMapsCount: number;
|
|
28
|
+
strippedFilesCount: number;
|
|
29
|
+
vaultDir: string;
|
|
30
|
+
movedFiles: string[];
|
|
31
|
+
dockerIgnoreMissing?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface ProtectSummary {
|
|
34
|
+
framework: UnpeekFramework;
|
|
35
|
+
outDir: string;
|
|
36
|
+
processedFiles: number;
|
|
37
|
+
movedSourceMaps: number;
|
|
38
|
+
originalBytes: number;
|
|
39
|
+
protectedBytes: number;
|
|
40
|
+
originalGzipBytes: number;
|
|
41
|
+
protectedGzipBytes: number;
|
|
42
|
+
gzipDeltaPercent: number;
|
|
43
|
+
totalHotFunctionsSkipped: number;
|
|
44
|
+
totalColdFunctionsProtected: number;
|
|
45
|
+
totalEncryptedStrings: number;
|
|
46
|
+
totalMangledSymbols: number;
|
|
47
|
+
elapsedMs: number;
|
|
48
|
+
seed?: number;
|
|
49
|
+
tier?: 'Tier 1' | 'Tier 2';
|
|
50
|
+
aggressive?: boolean;
|
|
51
|
+
dockerIgnoreMissing?: boolean;
|
|
52
|
+
dryRun?: boolean;
|
|
53
|
+
profile?: UnpeekProfile;
|
|
54
|
+
budgetExceeded?: boolean;
|
|
55
|
+
debugIdsPreserved?: number;
|
|
56
|
+
diagnostics?: readonly UnpeekDiagnostic[];
|
|
57
|
+
}
|
|
58
|
+
interface InitOptions {
|
|
59
|
+
dryRun?: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface InitResult {
|
|
62
|
+
updatedPackageJson: boolean;
|
|
63
|
+
updatedGitignore: boolean;
|
|
64
|
+
updatedNextConfig?: boolean;
|
|
65
|
+
framework?: UnpeekFramework;
|
|
66
|
+
isNext162Plus?: boolean;
|
|
67
|
+
message: string;
|
|
68
|
+
}
|
|
69
|
+
interface CheckOptions {
|
|
70
|
+
cwd?: string;
|
|
71
|
+
outDir?: string;
|
|
72
|
+
privateMapsDir?: string;
|
|
73
|
+
maxGzipDelta?: number;
|
|
74
|
+
requireZeroEval?: boolean;
|
|
75
|
+
strictCsp?: boolean;
|
|
76
|
+
}
|
|
77
|
+
interface CheckViolation {
|
|
78
|
+
rule: 'public-map' | 'sourcemap-comment' | 'ignore-missing' | 'gzip-budget' | 'eval-csp';
|
|
79
|
+
severity: 'error' | 'warning';
|
|
80
|
+
message: string;
|
|
81
|
+
file?: string;
|
|
82
|
+
}
|
|
83
|
+
interface CheckResult {
|
|
84
|
+
passed: boolean;
|
|
85
|
+
outDir: string;
|
|
86
|
+
checkedFiles: number;
|
|
87
|
+
violations: CheckViolation[];
|
|
88
|
+
warnings: CheckViolation[];
|
|
89
|
+
}
|
|
90
|
+
interface SymbolicateOptions {
|
|
91
|
+
stackTrace: string;
|
|
92
|
+
mapsDir?: string;
|
|
93
|
+
cwd?: string;
|
|
94
|
+
}
|
|
95
|
+
interface SymbolicateFrame {
|
|
96
|
+
raw: string;
|
|
97
|
+
file?: string;
|
|
98
|
+
line?: number;
|
|
99
|
+
column?: number;
|
|
100
|
+
originalSource?: string;
|
|
101
|
+
originalLine?: number;
|
|
102
|
+
originalColumn?: number;
|
|
103
|
+
originalName?: string;
|
|
104
|
+
resolved: boolean;
|
|
105
|
+
}
|
|
106
|
+
interface SymbolicateResult {
|
|
107
|
+
stackTrace: string;
|
|
108
|
+
frames: SymbolicateFrame[];
|
|
109
|
+
warnings: string[];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type { CheckOptions as C, InitOptions as I, ProtectSummary as P, SymbolicateOptions as S, UnpeekDiagnostic as U, ProtectOptions as a, InitResult as b, CheckResult as c, SymbolicateResult as d, CheckViolation as e, SourceMapVaultResult as f, SymbolicateFrame as g, UnpeekDiagnosticSeverity as h };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unpeek",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Zero-config, call-graph-aware polymorphic AST obfuscation and passive runtime anti-tamper with <2% CPU overhead.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -76,85 +76,77 @@
|
|
|
76
76
|
},
|
|
77
77
|
"./unplugin": {
|
|
78
78
|
"types": {
|
|
79
|
-
"import": "./dist/
|
|
80
|
-
"require": "./dist/
|
|
79
|
+
"import": "./dist/plugins/unplugin.d.ts",
|
|
80
|
+
"require": "./dist/plugins/unplugin.d.cts"
|
|
81
81
|
},
|
|
82
|
-
"import": "./dist/
|
|
83
|
-
"require": "./dist/
|
|
84
|
-
"default": "./dist/
|
|
82
|
+
"import": "./dist/plugins/unplugin.js",
|
|
83
|
+
"require": "./dist/plugins/unplugin.cjs",
|
|
84
|
+
"default": "./dist/plugins/unplugin.js"
|
|
85
85
|
},
|
|
86
86
|
"./vite": {
|
|
87
87
|
"types": {
|
|
88
|
-
"import": "./dist/vite.d.ts",
|
|
89
|
-
"require": "./dist/vite.d.cts"
|
|
88
|
+
"import": "./dist/adapters/vite.d.ts",
|
|
89
|
+
"require": "./dist/adapters/vite.d.cts"
|
|
90
90
|
},
|
|
91
|
-
"import": "./dist/vite.js",
|
|
92
|
-
"require": "./dist/vite.cjs",
|
|
93
|
-
"default": "./dist/vite.js"
|
|
91
|
+
"import": "./dist/adapters/vite.js",
|
|
92
|
+
"require": "./dist/adapters/vite.cjs",
|
|
93
|
+
"default": "./dist/adapters/vite.js"
|
|
94
94
|
},
|
|
95
95
|
"./webpack": {
|
|
96
96
|
"types": {
|
|
97
|
-
"import": "./dist/webpack.d.ts",
|
|
98
|
-
"require": "./dist/webpack.d.cts"
|
|
97
|
+
"import": "./dist/adapters/webpack.d.ts",
|
|
98
|
+
"require": "./dist/adapters/webpack.d.cts"
|
|
99
99
|
},
|
|
100
|
-
"import": "./dist/webpack.js",
|
|
101
|
-
"require": "./dist/webpack.cjs",
|
|
102
|
-
"default": "./dist/webpack.js"
|
|
100
|
+
"import": "./dist/adapters/webpack.js",
|
|
101
|
+
"require": "./dist/adapters/webpack.cjs",
|
|
102
|
+
"default": "./dist/adapters/webpack.js"
|
|
103
103
|
},
|
|
104
104
|
"./rollup": {
|
|
105
105
|
"types": {
|
|
106
|
-
"import": "./dist/rollup.d.ts",
|
|
107
|
-
"require": "./dist/rollup.d.cts"
|
|
106
|
+
"import": "./dist/adapters/rollup.d.ts",
|
|
107
|
+
"require": "./dist/adapters/rollup.d.cts"
|
|
108
108
|
},
|
|
109
|
-
"import": "./dist/rollup.js",
|
|
110
|
-
"require": "./dist/rollup.cjs",
|
|
111
|
-
"default": "./dist/rollup.js"
|
|
109
|
+
"import": "./dist/adapters/rollup.js",
|
|
110
|
+
"require": "./dist/adapters/rollup.cjs",
|
|
111
|
+
"default": "./dist/adapters/rollup.js"
|
|
112
112
|
},
|
|
113
113
|
"./esbuild": {
|
|
114
114
|
"types": {
|
|
115
|
-
"import": "./dist/esbuild.d.ts",
|
|
116
|
-
"require": "./dist/esbuild.d.cts"
|
|
115
|
+
"import": "./dist/adapters/esbuild.d.ts",
|
|
116
|
+
"require": "./dist/adapters/esbuild.d.cts"
|
|
117
117
|
},
|
|
118
|
-
"import": "./dist/esbuild.js",
|
|
119
|
-
"require": "./dist/esbuild.cjs",
|
|
120
|
-
"default": "./dist/esbuild.js"
|
|
118
|
+
"import": "./dist/adapters/esbuild.js",
|
|
119
|
+
"require": "./dist/adapters/esbuild.cjs",
|
|
120
|
+
"default": "./dist/adapters/esbuild.js"
|
|
121
121
|
},
|
|
122
|
-
"./
|
|
122
|
+
"./rspack": {
|
|
123
123
|
"types": {
|
|
124
|
-
"import": "./dist/
|
|
125
|
-
"require": "./dist/
|
|
124
|
+
"import": "./dist/adapters/rspack.d.ts",
|
|
125
|
+
"require": "./dist/adapters/rspack.d.cts"
|
|
126
126
|
},
|
|
127
|
-
"import": "./dist/
|
|
128
|
-
"require": "./dist/
|
|
129
|
-
"default": "./dist/
|
|
130
|
-
},
|
|
131
|
-
"./runtime": {
|
|
132
|
-
"types": {
|
|
133
|
-
"import": "./dist/runtime/index.d.ts",
|
|
134
|
-
"require": "./dist/runtime/index.d.cts"
|
|
135
|
-
},
|
|
136
|
-
"import": "./dist/runtime/index.js",
|
|
137
|
-
"require": "./dist/runtime/index.cjs",
|
|
138
|
-
"default": "./dist/runtime/index.js"
|
|
127
|
+
"import": "./dist/adapters/rspack.js",
|
|
128
|
+
"require": "./dist/adapters/rspack.cjs",
|
|
129
|
+
"default": "./dist/adapters/rspack.js"
|
|
139
130
|
},
|
|
140
131
|
"./next": {
|
|
141
132
|
"types": {
|
|
142
|
-
"import": "./dist/next/index.d.ts",
|
|
143
|
-
"require": "./dist/next/index.d.cts"
|
|
133
|
+
"import": "./dist/adapters/next/index.d.ts",
|
|
134
|
+
"require": "./dist/adapters/next/index.d.cts"
|
|
144
135
|
},
|
|
145
|
-
"import": "./dist/next/index.js",
|
|
146
|
-
"require": "./dist/next/index.cjs",
|
|
147
|
-
"default": "./dist/next/index.js"
|
|
136
|
+
"import": "./dist/adapters/next/index.js",
|
|
137
|
+
"require": "./dist/adapters/next/index.cjs",
|
|
138
|
+
"default": "./dist/adapters/next/index.js"
|
|
148
139
|
},
|
|
149
140
|
"./next/adapter": {
|
|
150
141
|
"types": {
|
|
151
|
-
"import": "./dist/next/adapter.d.ts",
|
|
152
|
-
"require": "./dist/next/adapter.d.cts"
|
|
142
|
+
"import": "./dist/adapters/next/adapter.d.ts",
|
|
143
|
+
"require": "./dist/adapters/next/adapter.d.cts"
|
|
153
144
|
},
|
|
154
|
-
"import": "./dist/next/adapter.js",
|
|
155
|
-
"require": "./dist/next/adapter.cjs",
|
|
156
|
-
"default": "./dist/next/adapter.js"
|
|
157
|
-
}
|
|
145
|
+
"import": "./dist/adapters/next/adapter.js",
|
|
146
|
+
"require": "./dist/adapters/next/adapter.cjs",
|
|
147
|
+
"default": "./dist/adapters/next/adapter.js"
|
|
148
|
+
},
|
|
149
|
+
"./package.json": "./package.json"
|
|
158
150
|
},
|
|
159
151
|
"files": [
|
|
160
152
|
"bin",
|
|
@@ -180,6 +172,7 @@
|
|
|
180
172
|
"unplugin": "^2.2.2"
|
|
181
173
|
},
|
|
182
174
|
"peerDependencies": {
|
|
175
|
+
"@rspack/core": ">=1.0.0 <2.0.0",
|
|
183
176
|
"esbuild": ">=0.18.0 <1.0.0",
|
|
184
177
|
"next": ">=15.0.0 <17.0.0",
|
|
185
178
|
"rollup": ">=3.0.0 <5.0.0",
|
|
@@ -187,6 +180,9 @@
|
|
|
187
180
|
"webpack": ">=5.0.0 <6.0.0"
|
|
188
181
|
},
|
|
189
182
|
"peerDependenciesMeta": {
|
|
183
|
+
"@rspack/core": {
|
|
184
|
+
"optional": true
|
|
185
|
+
},
|
|
190
186
|
"esbuild": {
|
|
191
187
|
"optional": true
|
|
192
188
|
},
|
package/dist/ast/index.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkLXP73HJCcjs = require('../chunk-LXP73HJC.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunk6N6S6WTQcjs = require('../chunk-6N6S6WTQ.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunkR6EBIR3Tcjs = require('../chunk-R6EBIR3T.cjs');
|
|
11
|
-
require('../chunk-4TDLLEEU.cjs');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exports.UnpeekError = _chunkR6EBIR3Tcjs.UnpeekError; exports.computeFnv1aHash = _chunk6N6S6WTQcjs.computeFnv1aHash; exports.detectHotPaths = _chunkLXP73HJCcjs.detectHotPaths; exports.transformJavaScript = _chunkLXP73HJCcjs.transformJavaScript;
|
package/dist/ast/index.d.cts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { UnpeekConfig, HotPathReport, TransformOptions, TransformResult } from '../browser.cjs';
|
|
2
|
-
|
|
3
|
-
type UnpeekErrorCode = 'ERR_CONFIG_INVALID' | 'ERR_CONFIG_LOAD' | 'ERR_INIT_INVALID_PACKAGE_JSON' | 'ERR_SECURITY_PATH_TRAVERSAL' | 'ERR_CLI_INVALID_ARGS' | 'ERR_PARSE_FAILED' | 'ERR_NEXT_ADAPTER';
|
|
4
|
-
declare class UnpeekError extends Error {
|
|
5
|
-
readonly code: UnpeekErrorCode;
|
|
6
|
-
constructor(code: UnpeekErrorCode, message: string, options?: {
|
|
7
|
-
cause?: unknown;
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare function computeFnv1aHash(input: string, seed?: number): number;
|
|
12
|
-
|
|
13
|
-
declare function detectHotPaths(code: string, config?: UnpeekConfig): HotPathReport;
|
|
14
|
-
|
|
15
|
-
declare function transformJavaScript(code: string, options?: TransformOptions): TransformResult;
|
|
16
|
-
|
|
17
|
-
export { UnpeekError, computeFnv1aHash, detectHotPaths, transformJavaScript };
|
|
18
|
-
export type { UnpeekErrorCode };
|
package/dist/ast/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { UnpeekConfig, HotPathReport, TransformOptions, TransformResult } from '../browser.js';
|
|
2
|
-
|
|
3
|
-
type UnpeekErrorCode = 'ERR_CONFIG_INVALID' | 'ERR_CONFIG_LOAD' | 'ERR_INIT_INVALID_PACKAGE_JSON' | 'ERR_SECURITY_PATH_TRAVERSAL' | 'ERR_CLI_INVALID_ARGS' | 'ERR_PARSE_FAILED' | 'ERR_NEXT_ADAPTER';
|
|
4
|
-
declare class UnpeekError extends Error {
|
|
5
|
-
readonly code: UnpeekErrorCode;
|
|
6
|
-
constructor(code: UnpeekErrorCode, message: string, options?: {
|
|
7
|
-
cause?: unknown;
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare function computeFnv1aHash(input: string, seed?: number): number;
|
|
12
|
-
|
|
13
|
-
declare function detectHotPaths(code: string, config?: UnpeekConfig): HotPathReport;
|
|
14
|
-
|
|
15
|
-
declare function transformJavaScript(code: string, options?: TransformOptions): TransformResult;
|
|
16
|
-
|
|
17
|
-
export { UnpeekError, computeFnv1aHash, detectHotPaths, transformJavaScript };
|
|
18
|
-
export type { UnpeekErrorCode };
|
package/dist/ast/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
detectHotPaths,
|
|
3
|
-
transformJavaScript
|
|
4
|
-
} from "../chunk-UMPUYLLZ.js";
|
|
5
|
-
import {
|
|
6
|
-
computeFnv1aHash
|
|
7
|
-
} from "../chunk-KQWNFKT2.js";
|
|
8
|
-
import {
|
|
9
|
-
UnpeekError
|
|
10
|
-
} from "../chunk-S4S2WXGC.js";
|
|
11
|
-
import "../chunk-OOXSZTRV.js";
|
|
12
|
-
export {
|
|
13
|
-
UnpeekError,
|
|
14
|
-
computeFnv1aHash,
|
|
15
|
-
detectHotPaths,
|
|
16
|
-
transformJavaScript
|
|
17
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _chunk5M6Z7ZFTcjs = require('../chunk-5M6Z7ZFT.cjs');
|
|
9
|
-
require('../chunk-LXP73HJC.cjs');
|
|
10
|
-
require('../chunk-6N6S6WTQ.cjs');
|
|
11
|
-
require('../chunk-R6EBIR3T.cjs');
|
|
12
|
-
require('../chunk-4TDLLEEU.cjs');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.default = _chunk5M6Z7ZFTcjs.unplugin_default; exports.esbuildPlugin = _chunk5M6Z7ZFTcjs.esbuildPlugin; exports.rollupPlugin = _chunk5M6Z7ZFTcjs.rollupPlugin; exports.unpeekPlugin = _chunk5M6Z7ZFTcjs.unpeekPlugin; exports.vitePlugin = _chunk5M6Z7ZFTcjs.vitePlugin; exports.webpackPlugin = _chunk5M6Z7ZFTcjs.webpackPlugin;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as esbuild from 'esbuild';
|
|
2
|
-
import * as rollup from 'rollup';
|
|
3
|
-
import * as webpack from 'webpack';
|
|
4
|
-
import * as vite from 'vite';
|
|
5
|
-
import * as unplugin from 'unplugin';
|
|
6
|
-
import { ProtectOptions } from '../index.cjs';
|
|
7
|
-
|
|
8
|
-
declare const unpeekPlugin: unplugin.UnpluginInstance<ProtectOptions | undefined, boolean>;
|
|
9
|
-
declare const vitePlugin: (options?: ProtectOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
10
|
-
declare const webpackPlugin: (options?: ProtectOptions | undefined) => webpack.WebpackPluginInstance;
|
|
11
|
-
declare const rollupPlugin: (options?: ProtectOptions | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
|
|
12
|
-
declare const esbuildPlugin: (options?: ProtectOptions | undefined) => esbuild.Plugin;
|
|
13
|
-
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
export = unpeekPlugin;
|
|
16
|
-
export { esbuildPlugin, rollupPlugin, unpeekPlugin, vitePlugin, webpackPlugin };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as esbuild from 'esbuild';
|
|
2
|
-
import * as rollup from 'rollup';
|
|
3
|
-
import * as webpack from 'webpack';
|
|
4
|
-
import * as vite from 'vite';
|
|
5
|
-
import * as unplugin from 'unplugin';
|
|
6
|
-
import { ProtectOptions } from '../index.js';
|
|
7
|
-
|
|
8
|
-
declare const unpeekPlugin: unplugin.UnpluginInstance<ProtectOptions | undefined, boolean>;
|
|
9
|
-
declare const vitePlugin: (options?: ProtectOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
10
|
-
declare const webpackPlugin: (options?: ProtectOptions | undefined) => webpack.WebpackPluginInstance;
|
|
11
|
-
declare const rollupPlugin: (options?: ProtectOptions | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
|
|
12
|
-
declare const esbuildPlugin: (options?: ProtectOptions | undefined) => esbuild.Plugin;
|
|
13
|
-
|
|
14
|
-
export { unpeekPlugin as default, esbuildPlugin, rollupPlugin, unpeekPlugin, vitePlugin, webpackPlugin };
|