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.
- package/README.md +57 -21
- package/README.tr.md +65 -29
- package/dist/adapters/esbuild.cjs +13 -0
- package/dist/adapters/esbuild.d.cts +13 -0
- package/dist/adapters/esbuild.d.ts +11 -0
- package/dist/adapters/esbuild.js +13 -0
- package/dist/adapters/next/adapter.cjs +43 -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 +43 -0
- package/dist/adapters/next/index.cjs +16 -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 +16 -0
- package/dist/adapters/rollup.cjs +13 -0
- package/dist/adapters/rollup.d.cts +13 -0
- package/dist/adapters/rollup.d.ts +11 -0
- package/dist/adapters/rollup.js +13 -0
- package/dist/adapters/rspack.cjs +13 -0
- package/dist/adapters/rspack.d.cts +13 -0
- package/dist/adapters/rspack.d.ts +11 -0
- package/dist/adapters/rspack.js +13 -0
- package/dist/adapters/vite.cjs +13 -0
- package/dist/adapters/vite.d.cts +13 -0
- package/dist/adapters/vite.d.ts +11 -0
- package/dist/adapters/vite.js +13 -0
- package/dist/adapters/webpack.cjs +13 -0
- package/dist/adapters/webpack.d.cts +13 -0
- package/dist/adapters/webpack.d.ts +11 -0
- package/dist/adapters/webpack.js +13 -0
- package/dist/browser.cjs +8 -5
- package/dist/browser.d.cts +44 -3
- package/dist/browser.d.ts +44 -3
- package/dist/browser.js +10 -7
- package/dist/{chunk-5QD6FZPB.js → chunk-2JU3V7HW.js} +75 -43
- package/dist/chunk-3LWXEJU6.cjs +1054 -0
- package/dist/chunk-4FNZNIBW.js +7391 -0
- package/dist/chunk-7HXLHLLQ.cjs +503 -0
- package/dist/chunk-ADKRENAP.js +1054 -0
- package/dist/chunk-EN6QVR6P.js +89 -0
- package/dist/chunk-HHC7BUCK.js +503 -0
- package/dist/chunk-KLYFNMKS.cjs +7391 -0
- package/dist/chunk-L6BOM5VS.cjs +40 -0
- package/dist/{chunk-OOXSZTRV.js → chunk-LA6J3BT3.js} +26 -1
- package/dist/chunk-URPPSTHZ.cjs +89 -0
- package/dist/chunk-VG4Y26ZN.cjs +429 -0
- package/dist/{chunk-GZB7PFLY.js → chunk-W77DAC3H.js} +46 -64
- package/dist/chunk-X6EETCO6.cjs +352 -0
- package/dist/chunk-YCRMTXOE.js +429 -0
- package/dist/{chunk-GAVI2C44.cjs → chunk-ZG7BIAUI.cjs} +80 -48
- package/dist/cli/index.js +9861 -32
- package/dist/{types-BBSRUEab.d.cts → config-Y6JwVGwX.d.cts} +58 -86
- package/dist/{types-BBSRUEab.d.ts → config-Y6JwVGwX.d.ts} +58 -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-0O1WSfVP.d.ts +52 -0
- package/dist/index-COVHErnx.d.cts +52 -0
- package/dist/index.cjs +437 -9
- package/dist/index.d.cts +9 -17
- package/dist/index.d.ts +9 -17
- package/dist/index.js +438 -10
- package/dist/plugins/unplugin.cjs +21 -0
- package/dist/plugins/unplugin.d.cts +17 -0
- package/dist/plugins/unplugin.d.ts +15 -0
- package/dist/{bundler → plugins}/unplugin.js +6 -5
- package/dist/types-CMtZnV8C.d.ts +112 -0
- package/dist/types-D93PuOOl.d.cts +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-24K5NDXH.cjs +0 -370
- package/dist/chunk-27HR647Q.js +0 -190
- package/dist/chunk-4TDLLEEU.cjs +0 -15
- package/dist/chunk-5LCMI2TL.js +0 -575
- package/dist/chunk-5M6Z7ZFT.cjs +0 -83
- package/dist/chunk-6N6S6WTQ.cjs +0 -423
- package/dist/chunk-7YVEHJVM.cjs +0 -575
- package/dist/chunk-J5CGNZDM.cjs +0 -190
- package/dist/chunk-KQWNFKT2.js +0 -423
- package/dist/chunk-LXP73HJC.cjs +0 -4532
- package/dist/chunk-R6EBIR3T.cjs +0 -14
- package/dist/chunk-S4S2WXGC.js +0 -14
- package/dist/chunk-UMPUYLLZ.js +0 -4532
- package/dist/chunk-X5MKMFMX.js +0 -83
- 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.d.cts +0 -11
- package/dist/esbuild.d.ts +0 -11
- 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.d.cts +0 -11
- package/dist/rollup.d.ts +0 -11
- 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.d.cts +0 -11
- package/dist/vite.d.ts +0 -11
- package/dist/vite.js +0 -13
- package/dist/webpack.cjs +0 -15
- package/dist/webpack.d.cts +0 -11
- package/dist/webpack.d.ts +0 -11
- package/dist/webpack.js +0 -13
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ProtectSummary, ProtectOptions } from '../../index.cjs';
|
|
2
|
+
import { UnpeekConfig } from '../../browser.cjs';
|
|
3
|
+
|
|
4
|
+
interface NextStaticFileOutput {
|
|
5
|
+
filePath?: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
immutableHash?: string;
|
|
8
|
+
size?: number;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
interface NextConfigObject {
|
|
12
|
+
adapterPath?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
type NextConfigFunction<TArgs extends readonly unknown[] = readonly [
|
|
16
|
+
phase: string,
|
|
17
|
+
ctx?: {
|
|
18
|
+
defaultConfig: NextConfigObject;
|
|
19
|
+
}
|
|
20
|
+
], TResult extends NextConfigObject = NextConfigObject> = (...args: TArgs) => TResult | Promise<TResult>;
|
|
21
|
+
type NextConfigLike = NextConfigObject | NextConfigFunction<never[], NextConfigObject>;
|
|
22
|
+
interface NextAdapterContext {
|
|
23
|
+
distDir: string;
|
|
24
|
+
buildId?: string;
|
|
25
|
+
phase?: string;
|
|
26
|
+
config?: Record<string, unknown>;
|
|
27
|
+
routing?: Record<string, unknown>;
|
|
28
|
+
outputs?: {
|
|
29
|
+
staticFiles?: NextStaticFileOutput[] | Map<string, NextStaticFileOutput> | Record<string, NextStaticFileOutput>;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
interface UnpeekNextAdapterOptions extends ProtectOptions {
|
|
35
|
+
upstreamAdapterPath?: string;
|
|
36
|
+
config?: UnpeekConfig;
|
|
37
|
+
}
|
|
38
|
+
interface UnpeekNextAdapter {
|
|
39
|
+
name: string;
|
|
40
|
+
modifyConfig?: (config: NextConfigObject, context?: Record<string, unknown>) => Promise<NextConfigObject> | NextConfigObject;
|
|
41
|
+
onBuildComplete: (context: NextAdapterContext) => Promise<ProtectSummary>;
|
|
42
|
+
}
|
|
43
|
+
declare function createUnpeekNextAdapter(options?: UnpeekNextAdapterOptions): UnpeekNextAdapter;
|
|
44
|
+
declare function getUnpeekAdapterPath(): string;
|
|
45
|
+
declare function withUnpeek<T extends NextConfigObject = NextConfigObject>(nextConfig?: T, options?: UnpeekNextAdapterOptions): T & {
|
|
46
|
+
adapterPath: string;
|
|
47
|
+
};
|
|
48
|
+
declare function withUnpeek<TArgs extends readonly unknown[], TResult extends NextConfigObject>(nextConfig: (...args: TArgs) => TResult | Promise<TResult>, options?: UnpeekNextAdapterOptions): (...args: TArgs) => Promise<TResult & {
|
|
49
|
+
adapterPath: string;
|
|
50
|
+
}>;
|
|
51
|
+
|
|
52
|
+
export { createUnpeekNextAdapter, getUnpeekAdapterPath, withUnpeek };
|
|
53
|
+
export type { NextAdapterContext, NextConfigFunction, NextConfigLike, NextConfigObject, NextStaticFileOutput, UnpeekNextAdapter, UnpeekNextAdapterOptions };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ProtectSummary, ProtectOptions } from '../../index.js';
|
|
2
|
+
import { UnpeekConfig } from '../../browser.js';
|
|
3
|
+
|
|
4
|
+
interface NextStaticFileOutput {
|
|
5
|
+
filePath?: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
immutableHash?: string;
|
|
8
|
+
size?: number;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
interface NextConfigObject {
|
|
12
|
+
adapterPath?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
type NextConfigFunction<TArgs extends readonly unknown[] = readonly [
|
|
16
|
+
phase: string,
|
|
17
|
+
ctx?: {
|
|
18
|
+
defaultConfig: NextConfigObject;
|
|
19
|
+
}
|
|
20
|
+
], TResult extends NextConfigObject = NextConfigObject> = (...args: TArgs) => TResult | Promise<TResult>;
|
|
21
|
+
type NextConfigLike = NextConfigObject | NextConfigFunction<never[], NextConfigObject>;
|
|
22
|
+
interface NextAdapterContext {
|
|
23
|
+
distDir: string;
|
|
24
|
+
buildId?: string;
|
|
25
|
+
phase?: string;
|
|
26
|
+
config?: Record<string, unknown>;
|
|
27
|
+
routing?: Record<string, unknown>;
|
|
28
|
+
outputs?: {
|
|
29
|
+
staticFiles?: NextStaticFileOutput[] | Map<string, NextStaticFileOutput> | Record<string, NextStaticFileOutput>;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
interface UnpeekNextAdapterOptions extends ProtectOptions {
|
|
35
|
+
upstreamAdapterPath?: string;
|
|
36
|
+
config?: UnpeekConfig;
|
|
37
|
+
}
|
|
38
|
+
interface UnpeekNextAdapter {
|
|
39
|
+
name: string;
|
|
40
|
+
modifyConfig?: (config: NextConfigObject, context?: Record<string, unknown>) => Promise<NextConfigObject> | NextConfigObject;
|
|
41
|
+
onBuildComplete: (context: NextAdapterContext) => Promise<ProtectSummary>;
|
|
42
|
+
}
|
|
43
|
+
declare function createUnpeekNextAdapter(options?: UnpeekNextAdapterOptions): UnpeekNextAdapter;
|
|
44
|
+
declare function getUnpeekAdapterPath(): string;
|
|
45
|
+
declare function withUnpeek<T extends NextConfigObject = NextConfigObject>(nextConfig?: T, options?: UnpeekNextAdapterOptions): T & {
|
|
46
|
+
adapterPath: string;
|
|
47
|
+
};
|
|
48
|
+
declare function withUnpeek<TArgs extends readonly unknown[], TResult extends NextConfigObject>(nextConfig: (...args: TArgs) => TResult | Promise<TResult>, options?: UnpeekNextAdapterOptions): (...args: TArgs) => Promise<TResult & {
|
|
49
|
+
adapterPath: string;
|
|
50
|
+
}>;
|
|
51
|
+
|
|
52
|
+
export { createUnpeekNextAdapter, getUnpeekAdapterPath, withUnpeek };
|
|
53
|
+
export type { NextAdapterContext, NextConfigFunction, NextConfigLike, NextConfigObject, NextStaticFileOutput, UnpeekNextAdapter, UnpeekNextAdapterOptions };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createUnpeekNextAdapter,
|
|
3
|
+
getUnpeekAdapterPath,
|
|
4
|
+
withUnpeek
|
|
5
|
+
} from "../../chunk-2JU3V7HW.js";
|
|
6
|
+
import "../../chunk-HHC7BUCK.js";
|
|
7
|
+
import "../../chunk-W77DAC3H.js";
|
|
8
|
+
import "../../chunk-EN6QVR6P.js";
|
|
9
|
+
import "../../chunk-ADKRENAP.js";
|
|
10
|
+
import "../../chunk-4FNZNIBW.js";
|
|
11
|
+
import "../../chunk-LA6J3BT3.js";
|
|
12
|
+
export {
|
|
13
|
+
createUnpeekNextAdapter,
|
|
14
|
+
getUnpeekAdapterPath,
|
|
15
|
+
withUnpeek
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkVG4Y26ZNcjs = require('../chunk-VG4Y26ZN.cjs');
|
|
4
|
+
require('../chunk-3LWXEJU6.cjs');
|
|
5
|
+
require('../chunk-KLYFNMKS.cjs');
|
|
6
|
+
require('../chunk-L6BOM5VS.cjs');
|
|
7
|
+
|
|
8
|
+
// src/adapters/rollup.ts
|
|
9
|
+
var rollup_default = _chunkVG4Y26ZNcjs.rollupPlugin;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.default = rollup_default; exports.unpeekRollup = _chunkVG4Y26ZNcjs.rollupPlugin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { rollupPlugin } from '../plugins/unplugin.cjs';
|
|
2
|
+
import 'esbuild';
|
|
3
|
+
import 'rollup';
|
|
4
|
+
import 'webpack';
|
|
5
|
+
import 'vite';
|
|
6
|
+
import 'unplugin';
|
|
7
|
+
import '../config-Y6JwVGwX.cjs';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
export = rollupPlugin;
|
|
13
|
+
export { rollupPlugin as unpeekRollup };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { rollupPlugin } from '../plugins/unplugin.js';
|
|
2
|
+
import 'esbuild';
|
|
3
|
+
import 'rollup';
|
|
4
|
+
import 'webpack';
|
|
5
|
+
import 'vite';
|
|
6
|
+
import 'unplugin';
|
|
7
|
+
import '../config-Y6JwVGwX.js';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export { rollupPlugin as default, rollupPlugin as unpeekRollup };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
rollupPlugin
|
|
3
|
+
} from "../chunk-YCRMTXOE.js";
|
|
4
|
+
import "../chunk-ADKRENAP.js";
|
|
5
|
+
import "../chunk-4FNZNIBW.js";
|
|
6
|
+
import "../chunk-LA6J3BT3.js";
|
|
7
|
+
|
|
8
|
+
// src/adapters/rollup.ts
|
|
9
|
+
var rollup_default = rollupPlugin;
|
|
10
|
+
export {
|
|
11
|
+
rollup_default as default,
|
|
12
|
+
rollupPlugin as unpeekRollup
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkVG4Y26ZNcjs = require('../chunk-VG4Y26ZN.cjs');
|
|
4
|
+
require('../chunk-3LWXEJU6.cjs');
|
|
5
|
+
require('../chunk-KLYFNMKS.cjs');
|
|
6
|
+
require('../chunk-L6BOM5VS.cjs');
|
|
7
|
+
|
|
8
|
+
// src/adapters/rspack.ts
|
|
9
|
+
var rspack_default = _chunkVG4Y26ZNcjs.rspackPlugin;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.default = rspack_default; exports.unpeekRspack = _chunkVG4Y26ZNcjs.rspackPlugin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { rspackPlugin } from '../plugins/unplugin.cjs';
|
|
2
|
+
import 'esbuild';
|
|
3
|
+
import 'rollup';
|
|
4
|
+
import 'webpack';
|
|
5
|
+
import 'vite';
|
|
6
|
+
import 'unplugin';
|
|
7
|
+
import '../config-Y6JwVGwX.cjs';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
export = rspackPlugin;
|
|
13
|
+
export { rspackPlugin as unpeekRspack };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { rspackPlugin } from '../plugins/unplugin.js';
|
|
2
|
+
import 'esbuild';
|
|
3
|
+
import 'rollup';
|
|
4
|
+
import 'webpack';
|
|
5
|
+
import 'vite';
|
|
6
|
+
import 'unplugin';
|
|
7
|
+
import '../config-Y6JwVGwX.js';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export { rspackPlugin as default, rspackPlugin as unpeekRspack };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
rspackPlugin
|
|
3
|
+
} from "../chunk-YCRMTXOE.js";
|
|
4
|
+
import "../chunk-ADKRENAP.js";
|
|
5
|
+
import "../chunk-4FNZNIBW.js";
|
|
6
|
+
import "../chunk-LA6J3BT3.js";
|
|
7
|
+
|
|
8
|
+
// src/adapters/rspack.ts
|
|
9
|
+
var rspack_default = rspackPlugin;
|
|
10
|
+
export {
|
|
11
|
+
rspack_default as default,
|
|
12
|
+
rspackPlugin as unpeekRspack
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkVG4Y26ZNcjs = require('../chunk-VG4Y26ZN.cjs');
|
|
4
|
+
require('../chunk-3LWXEJU6.cjs');
|
|
5
|
+
require('../chunk-KLYFNMKS.cjs');
|
|
6
|
+
require('../chunk-L6BOM5VS.cjs');
|
|
7
|
+
|
|
8
|
+
// src/adapters/vite.ts
|
|
9
|
+
var vite_default = _chunkVG4Y26ZNcjs.vitePlugin;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.default = vite_default; exports.unpeekVite = _chunkVG4Y26ZNcjs.vitePlugin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { vitePlugin } from '../plugins/unplugin.cjs';
|
|
2
|
+
import 'esbuild';
|
|
3
|
+
import 'rollup';
|
|
4
|
+
import 'webpack';
|
|
5
|
+
import 'vite';
|
|
6
|
+
import 'unplugin';
|
|
7
|
+
import '../config-Y6JwVGwX.cjs';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
export = vitePlugin;
|
|
13
|
+
export { vitePlugin as unpeekVite };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
vitePlugin
|
|
3
|
+
} from "../chunk-YCRMTXOE.js";
|
|
4
|
+
import "../chunk-ADKRENAP.js";
|
|
5
|
+
import "../chunk-4FNZNIBW.js";
|
|
6
|
+
import "../chunk-LA6J3BT3.js";
|
|
7
|
+
|
|
8
|
+
// src/adapters/vite.ts
|
|
9
|
+
var vite_default = vitePlugin;
|
|
10
|
+
export {
|
|
11
|
+
vite_default as default,
|
|
12
|
+
vitePlugin as unpeekVite
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkVG4Y26ZNcjs = require('../chunk-VG4Y26ZN.cjs');
|
|
4
|
+
require('../chunk-3LWXEJU6.cjs');
|
|
5
|
+
require('../chunk-KLYFNMKS.cjs');
|
|
6
|
+
require('../chunk-L6BOM5VS.cjs');
|
|
7
|
+
|
|
8
|
+
// src/adapters/webpack.ts
|
|
9
|
+
var webpack_default = _chunkVG4Y26ZNcjs.webpackPlugin;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.default = webpack_default; exports.unpeekWebpack = _chunkVG4Y26ZNcjs.webpackPlugin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { webpackPlugin } from '../plugins/unplugin.cjs';
|
|
2
|
+
import 'esbuild';
|
|
3
|
+
import 'rollup';
|
|
4
|
+
import 'webpack';
|
|
5
|
+
import 'vite';
|
|
6
|
+
import 'unplugin';
|
|
7
|
+
import '../config-Y6JwVGwX.cjs';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
export = webpackPlugin;
|
|
13
|
+
export { webpackPlugin as unpeekWebpack };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { webpackPlugin } from '../plugins/unplugin.js';
|
|
2
|
+
import 'esbuild';
|
|
3
|
+
import 'rollup';
|
|
4
|
+
import 'webpack';
|
|
5
|
+
import 'vite';
|
|
6
|
+
import 'unplugin';
|
|
7
|
+
import '../config-Y6JwVGwX.js';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export { webpackPlugin as default, webpackPlugin as unpeekWebpack };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
webpackPlugin
|
|
3
|
+
} from "../chunk-YCRMTXOE.js";
|
|
4
|
+
import "../chunk-ADKRENAP.js";
|
|
5
|
+
import "../chunk-4FNZNIBW.js";
|
|
6
|
+
import "../chunk-LA6J3BT3.js";
|
|
7
|
+
|
|
8
|
+
// src/adapters/webpack.ts
|
|
9
|
+
var webpack_default = webpackPlugin;
|
|
10
|
+
export {
|
|
11
|
+
webpack_default as default,
|
|
12
|
+
webpackPlugin as unpeekWebpack
|
|
13
|
+
};
|
package/dist/browser.cjs
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkURPPSTHZcjs = require('./chunk-URPPSTHZ.cjs');
|
|
3
4
|
|
|
4
|
-
var _chunkLXP73HJCcjs = require('./chunk-LXP73HJC.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var _chunk6N6S6WTQcjs = require('./chunk-6N6S6WTQ.cjs');
|
|
12
11
|
|
|
12
|
+
var _chunkKLYFNMKScjs = require('./chunk-KLYFNMKS.cjs');
|
|
13
13
|
|
|
14
|
-
var _chunkR6EBIR3Tcjs = require('./chunk-R6EBIR3T.cjs');
|
|
15
|
-
require('./chunk-4TDLLEEU.cjs');
|
|
16
14
|
|
|
17
15
|
|
|
16
|
+
var _chunkL6BOM5VScjs = require('./chunk-L6BOM5VS.cjs');
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
|
|
@@ -22,4 +21,8 @@ require('./chunk-4TDLLEEU.cjs');
|
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
exports.PRESETS = _chunkURPPSTHZcjs.PRESETS; exports.UnpeekError = _chunkL6BOM5VScjs.UnpeekError; exports.computeFnv1aHash = _chunkKLYFNMKScjs.computeFnv1aHash; exports.computeIntegrityHash = _chunkKLYFNMKScjs.computeIntegrityHash; exports.createDeterrentSnippet = _chunkKLYFNMKScjs.createDeterrentSnippet; exports.detectHotPaths = _chunkKLYFNMKScjs.detectHotPaths; exports.generateRuntimeShield = _chunkKLYFNMKScjs.generateRuntimeShield; exports.isUnpeekError = _chunkL6BOM5VScjs.isUnpeekError; exports.transformJavaScript = _chunkKLYFNMKScjs.transformJavaScript; exports.verifyCodeIntegrity = _chunkKLYFNMKScjs.verifyCodeIntegrity;
|
package/dist/browser.d.cts
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
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
|
+
|
|
6
|
+
declare function computeFnv1aHash(input: string, seed?: number): number;
|
|
7
|
+
|
|
8
|
+
declare function detectHotPaths(code: string, config?: UnpeekConfig): HotPathReport;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Computes a 32-bit unsigned FNV-1a hash over the un-normalized source string.
|
|
12
|
+
* Any formatting change (such as DevTools Pretty-Print adding newlines or spaces)
|
|
13
|
+
* or monkeypatching alters the resulting hash.
|
|
14
|
+
*/
|
|
15
|
+
declare function computeIntegrityHash(source: string, seed?: number): number;
|
|
16
|
+
/**
|
|
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.
|
|
20
|
+
*/
|
|
21
|
+
declare function verifyCodeIntegrity(fnOrSource: ((...args: unknown[]) => unknown) | string, expectedHash: number, seed?: number, normalized?: boolean): boolean;
|
|
22
|
+
|
|
23
|
+
/**
|
|
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).
|
|
29
|
+
*
|
|
30
|
+
* Freedom To Operate (FTO) Compliance:
|
|
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.
|
|
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.
|
|
39
|
+
*/
|
|
40
|
+
declare function createDeterrentSnippet(config: ShieldConfig): string;
|
|
41
|
+
|
|
42
|
+
declare function generateRuntimeShield(config: ShieldConfig): ShieldPayload;
|
|
43
|
+
|
|
44
|
+
export { HotPathReport, ShieldConfig, ShieldPayload, UnpeekConfig, computeFnv1aHash, computeIntegrityHash, createDeterrentSnippet, detectHotPaths, generateRuntimeShield, verifyCodeIntegrity };
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
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
|
+
|
|
6
|
+
declare function computeFnv1aHash(input: string, seed?: number): number;
|
|
7
|
+
|
|
8
|
+
declare function detectHotPaths(code: string, config?: UnpeekConfig): HotPathReport;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Computes a 32-bit unsigned FNV-1a hash over the un-normalized source string.
|
|
12
|
+
* Any formatting change (such as DevTools Pretty-Print adding newlines or spaces)
|
|
13
|
+
* or monkeypatching alters the resulting hash.
|
|
14
|
+
*/
|
|
15
|
+
declare function computeIntegrityHash(source: string, seed?: number): number;
|
|
16
|
+
/**
|
|
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.
|
|
20
|
+
*/
|
|
21
|
+
declare function verifyCodeIntegrity(fnOrSource: ((...args: unknown[]) => unknown) | string, expectedHash: number, seed?: number, normalized?: boolean): boolean;
|
|
22
|
+
|
|
23
|
+
/**
|
|
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).
|
|
29
|
+
*
|
|
30
|
+
* Freedom To Operate (FTO) Compliance:
|
|
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.
|
|
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.
|
|
39
|
+
*/
|
|
40
|
+
declare function createDeterrentSnippet(config: ShieldConfig): string;
|
|
41
|
+
|
|
42
|
+
declare function generateRuntimeShield(config: ShieldConfig): ShieldPayload;
|
|
43
|
+
|
|
44
|
+
export { HotPathReport, ShieldConfig, ShieldPayload, UnpeekConfig, computeFnv1aHash, computeIntegrityHash, createDeterrentSnippet, detectHotPaths, generateRuntimeShield, verifyCodeIntegrity };
|
package/dist/browser.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-UMPUYLLZ.js";
|
|
2
|
+
PRESETS
|
|
3
|
+
} from "./chunk-EN6QVR6P.js";
|
|
5
4
|
import {
|
|
6
5
|
computeFnv1aHash,
|
|
7
6
|
computeIntegrityHash,
|
|
8
7
|
createDeterrentSnippet,
|
|
8
|
+
detectHotPaths,
|
|
9
9
|
generateRuntimeShield,
|
|
10
|
+
transformJavaScript,
|
|
10
11
|
verifyCodeIntegrity
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4FNZNIBW.js";
|
|
12
13
|
import {
|
|
13
|
-
UnpeekError
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
UnpeekError,
|
|
15
|
+
isUnpeekError
|
|
16
|
+
} from "./chunk-LA6J3BT3.js";
|
|
16
17
|
export {
|
|
18
|
+
PRESETS,
|
|
17
19
|
UnpeekError,
|
|
18
20
|
computeFnv1aHash,
|
|
19
21
|
computeIntegrityHash,
|
|
20
22
|
createDeterrentSnippet,
|
|
21
23
|
detectHotPaths,
|
|
22
24
|
generateRuntimeShield,
|
|
25
|
+
isUnpeekError,
|
|
23
26
|
transformJavaScript,
|
|
24
27
|
verifyCodeIntegrity
|
|
25
28
|
};
|