@afterpack/integration-utils 0.2.3 → 0.2.5
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/dist/index.cjs +2159 -590
- package/dist/index.d.cts +187 -45
- package/dist/index.d.ts +187 -45
- package/dist/index.js +2120 -582
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ProtectionMap } from "@afterpack/protection-map";
|
|
2
2
|
|
|
3
|
+
//#region src/angular-integrity.d.ts
|
|
4
|
+
declare function planAngularIntegrity(outputRoot: string, browserDir: string, label?: string): Map<string, string>;
|
|
5
|
+
declare function recomputeAngularIntegrity(outputRoot: string, browserDir: string, label?: string): void;
|
|
6
|
+
declare function angularServerManifestRefusal(outputRoot: string): string | null;
|
|
7
|
+
//#endregion
|
|
3
8
|
//#region src/paths.d.ts
|
|
4
9
|
type ArtifactMode = "single" | "directory" | "framework";
|
|
5
10
|
interface FindUpwardOptions {
|
|
@@ -244,7 +249,7 @@ declare const CONFIG_KEYS: readonly [{
|
|
|
244
249
|
readonly item: {
|
|
245
250
|
readonly kind: "boolean";
|
|
246
251
|
};
|
|
247
|
-
readonly default: "true in development when an input map exists
|
|
252
|
+
readonly default: "false; true in development mode when an input map exists";
|
|
248
253
|
}, {
|
|
249
254
|
readonly path: "sourceMap.sourcesContent";
|
|
250
255
|
readonly shape: "scalar";
|
|
@@ -254,7 +259,7 @@ declare const CONFIG_KEYS: readonly [{
|
|
|
254
259
|
readonly item: {
|
|
255
260
|
readonly kind: "boolean";
|
|
256
261
|
};
|
|
257
|
-
readonly default: "true in development
|
|
262
|
+
readonly default: "false; true in development mode";
|
|
258
263
|
}, {
|
|
259
264
|
readonly path: "sourceMap.emitUrl";
|
|
260
265
|
readonly shape: "scalar";
|
|
@@ -264,7 +269,7 @@ declare const CONFIG_KEYS: readonly [{
|
|
|
264
269
|
readonly item: {
|
|
265
270
|
readonly kind: "boolean";
|
|
266
271
|
};
|
|
267
|
-
readonly default: "true in development
|
|
272
|
+
readonly default: "false; true in development mode";
|
|
268
273
|
}, {
|
|
269
274
|
readonly path: "protectionMap.enabled";
|
|
270
275
|
readonly shape: "scalar";
|
|
@@ -416,7 +421,7 @@ declare const CONFIG_KEYS: readonly [{
|
|
|
416
421
|
readonly kind: "enum";
|
|
417
422
|
readonly values: readonly ["production", "development"];
|
|
418
423
|
};
|
|
419
|
-
readonly default: "
|
|
424
|
+
readonly default: "production, unless NODE_ENV is development";
|
|
420
425
|
}, {
|
|
421
426
|
readonly path: "directives.enabled";
|
|
422
427
|
readonly shape: "scalar";
|
|
@@ -682,7 +687,7 @@ interface WriteArtifactsInput {
|
|
|
682
687
|
originalSource: string | null;
|
|
683
688
|
policy: ReportPolicy;
|
|
684
689
|
mode?: ArtifactMode;
|
|
685
|
-
afterpackDir
|
|
690
|
+
afterpackDir: string;
|
|
686
691
|
logger?: Logger;
|
|
687
692
|
}
|
|
688
693
|
interface WriteArtifactsResult {
|
|
@@ -695,6 +700,11 @@ interface WriteArtifactsResult {
|
|
|
695
700
|
declare function writeArtifacts(input: WriteArtifactsInput): WriteArtifactsResult;
|
|
696
701
|
declare function ensureAfterpackGitignore(afterpackDir: string): void;
|
|
697
702
|
//#endregion
|
|
703
|
+
//#region src/atomic-write.d.ts
|
|
704
|
+
declare function stagedPath(path: string): string;
|
|
705
|
+
declare function sha256Hex(content: string | Uint8Array): string;
|
|
706
|
+
declare function writeFileAtomic(path: string, content: string | Uint8Array): void;
|
|
707
|
+
//#endregion
|
|
698
708
|
//#region src/notices.d.ts
|
|
699
709
|
interface CloudNotice {
|
|
700
710
|
severity: string;
|
|
@@ -794,6 +804,105 @@ declare class AlreadyObfuscatedError extends Error {
|
|
|
794
804
|
constructor(message: string, files: readonly string[], receiptPath: string, dir: string);
|
|
795
805
|
}
|
|
796
806
|
//#endregion
|
|
807
|
+
//#region src/plugin-config.d.ts
|
|
808
|
+
declare const PLUGIN_LOCAL_KEYS: readonly ["git"];
|
|
809
|
+
type AfterpackPluginOptions = Omit<AfterpackConfig, "key"> & Pick<AfterpackArtifactOptions, (typeof PLUGIN_LOCAL_KEYS)[number]>;
|
|
810
|
+
interface NormalizedPluginOptions {
|
|
811
|
+
config: Record<string, unknown>;
|
|
812
|
+
issues: ConfigIssue[];
|
|
813
|
+
}
|
|
814
|
+
declare function normalizePluginOptions(input: unknown, localKeys: readonly string[], surface: string): NormalizedPluginOptions;
|
|
815
|
+
interface PluginConfigInput {
|
|
816
|
+
label: string;
|
|
817
|
+
options?: unknown;
|
|
818
|
+
argv?: string[];
|
|
819
|
+
cwd?: string;
|
|
820
|
+
env?: Record<string, string | undefined>;
|
|
821
|
+
localKeys?: readonly string[];
|
|
822
|
+
unsupported?: Readonly<Record<string, string>>;
|
|
823
|
+
}
|
|
824
|
+
interface ResolvedPluginConfig {
|
|
825
|
+
config: AfterpackConfig;
|
|
826
|
+
options: PluginOptionsView;
|
|
827
|
+
engineConfig: CoreConfigSubset;
|
|
828
|
+
configFile: string | null;
|
|
829
|
+
positionals: string[];
|
|
830
|
+
help: boolean;
|
|
831
|
+
version: boolean;
|
|
832
|
+
}
|
|
833
|
+
type PassSettings = Pick<ObfuscationPassOptions, "artifactOptions" | "seed" | "preset" | "complexity" | "regions" | "engineConfig" | "diagnostics" | "directivesEnabled" | "directivesEnabledExplicit">;
|
|
834
|
+
declare function passSettings(resolved: Pick<ResolvedPluginConfig, "options" | "engineConfig">): PassSettings;
|
|
835
|
+
declare function applyResolvedKey(config: AfterpackConfig, env?: Record<string, string | undefined>): void;
|
|
836
|
+
declare function resolvePluginConfig(input: PluginConfigInput): ResolvedPluginConfig;
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region src/seed.d.ts
|
|
839
|
+
type SeedOption = number | string | undefined;
|
|
840
|
+
declare const SEED_ENV_VAR = "AFTERPACK_SEED";
|
|
841
|
+
type SeedOrigin = "option" | "git" | "env" | "session" | "fresh";
|
|
842
|
+
interface ResolvedBuildSeed {
|
|
843
|
+
seed: number | string;
|
|
844
|
+
origin: SeedOrigin;
|
|
845
|
+
legs: string[];
|
|
846
|
+
generation: number;
|
|
847
|
+
mismatch: {
|
|
848
|
+
leg: string;
|
|
849
|
+
seed: number | string;
|
|
850
|
+
} | null;
|
|
851
|
+
}
|
|
852
|
+
//#endregion
|
|
853
|
+
//#region src/hash-salt.d.ts
|
|
854
|
+
interface SaltEngine {
|
|
855
|
+
engineVersion: string | null;
|
|
856
|
+
nonce: string | null;
|
|
857
|
+
cloud: boolean;
|
|
858
|
+
probedCloudVersion: string | null;
|
|
859
|
+
probeFailed: boolean;
|
|
860
|
+
}
|
|
861
|
+
declare function saltSettings(settings: PassSettings, extra?: Record<string, unknown>): unknown;
|
|
862
|
+
interface ReportPolicySaltBits {
|
|
863
|
+
sourceMap: boolean;
|
|
864
|
+
emitSourceMappingURL: boolean;
|
|
865
|
+
}
|
|
866
|
+
declare function reportPolicySaltBits(env: Record<string, string | undefined>, artifactOptions: PassSettings["artifactOptions"], hasBundlerSourcemap: boolean): ReportPolicySaltBits;
|
|
867
|
+
interface PreparedHashSalt {
|
|
868
|
+
salt: string;
|
|
869
|
+
resolvedSeed: ResolvedBuildSeed;
|
|
870
|
+
engine: SaltEngine;
|
|
871
|
+
}
|
|
872
|
+
interface PrepareHashSaltInput {
|
|
873
|
+
seed: SeedOption;
|
|
874
|
+
root: string;
|
|
875
|
+
leg: string;
|
|
876
|
+
localEngineVersion: string | null;
|
|
877
|
+
settings: unknown;
|
|
878
|
+
env?: Record<string, string | undefined>;
|
|
879
|
+
warn?: (message: string) => void;
|
|
880
|
+
fetchImpl?: typeof fetch;
|
|
881
|
+
}
|
|
882
|
+
declare function prepareHashSalt(input: PrepareHashSaltInput): Promise<PreparedHashSalt>;
|
|
883
|
+
declare function readEngineVersion(engine: {
|
|
884
|
+
version?(): Promise<string>;
|
|
885
|
+
}): Promise<string | null>;
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region src/hashed-names.d.ts
|
|
888
|
+
type HashTokenOf = (relativePath: string) => string | null;
|
|
889
|
+
interface HashedNamesOptions {
|
|
890
|
+
root: string;
|
|
891
|
+
tokenOf: HashTokenOf;
|
|
892
|
+
skip?: (relativePath: string) => boolean;
|
|
893
|
+
}
|
|
894
|
+
declare function unreferencedHashedFiles(options: HashedNamesOptions, files: readonly string[]): string[];
|
|
895
|
+
interface TokenScanLimits {
|
|
896
|
+
maxDepth: number;
|
|
897
|
+
maxFiles: number;
|
|
898
|
+
maxBytes: number;
|
|
899
|
+
}
|
|
900
|
+
interface TokenScanResult {
|
|
901
|
+
found: string | null;
|
|
902
|
+
truncated: boolean;
|
|
903
|
+
}
|
|
904
|
+
declare function findHashTokenReference(paths: readonly string[], options: HashedNamesOptions, files: readonly string[], limits: TokenScanLimits): TokenScanResult;
|
|
905
|
+
//#endregion
|
|
797
906
|
//#region src/directives.d.ts
|
|
798
907
|
interface CapturedDirective {
|
|
799
908
|
keyword: string;
|
|
@@ -828,8 +937,31 @@ interface CapturedModule {
|
|
|
828
937
|
srcIndex?: number;
|
|
829
938
|
}
|
|
830
939
|
//#endregion
|
|
940
|
+
//#region src/home.d.ts
|
|
941
|
+
declare const AFTERPACK_DIR = ".afterpack";
|
|
942
|
+
declare const DIAG_AFTERPACK_DIR_IN_OUTPUT = "DIAG_AFTERPACK_DIR_IN_OUTPUT";
|
|
943
|
+
declare const DIAG_RECEIPT_UNWRITABLE = "DIAG_RECEIPT_UNWRITABLE";
|
|
944
|
+
declare class AfterpackFilesError extends Error {
|
|
945
|
+
readonly code: string;
|
|
946
|
+
readonly summary: string;
|
|
947
|
+
readonly fix: string;
|
|
948
|
+
constructor(code: string, summary: string, fix: string);
|
|
949
|
+
}
|
|
950
|
+
interface AfterpackHome {
|
|
951
|
+
dir: string;
|
|
952
|
+
projectRoot: string;
|
|
953
|
+
marker: string | null;
|
|
954
|
+
strong: boolean;
|
|
955
|
+
buildDir: string;
|
|
956
|
+
}
|
|
957
|
+
declare function isWithinDir(dir: string, path: string): boolean;
|
|
958
|
+
interface AfterpackHomeOptions {
|
|
959
|
+
fileTarget?: boolean;
|
|
960
|
+
}
|
|
961
|
+
declare function afterpackHome(buildDir: string, options?: AfterpackHomeOptions): AfterpackHome;
|
|
962
|
+
//#endregion
|
|
831
963
|
//#region src/receipt.d.ts
|
|
832
|
-
declare const
|
|
964
|
+
declare const PROTECTION_RECEIPTS_DIR = "receipts";
|
|
833
965
|
interface ProtectionReceiptFile {
|
|
834
966
|
path: string;
|
|
835
967
|
sha256: string;
|
|
@@ -845,11 +977,17 @@ interface ProtectionReceipt {
|
|
|
845
977
|
seedOrigin: string;
|
|
846
978
|
bundler: string;
|
|
847
979
|
buildId: string | null;
|
|
980
|
+
buildDir: string;
|
|
848
981
|
files: ProtectionReceiptFile[];
|
|
849
982
|
}
|
|
850
983
|
declare function sha256Of(path: string): string;
|
|
984
|
+
type HomeTarget = string | AfterpackHome;
|
|
985
|
+
declare function buildDirKey(target: HomeTarget): string;
|
|
986
|
+
declare function protectionReceiptPath(target: HomeTarget): string;
|
|
987
|
+
declare function sweepOutputTree(buildDir: string, walkedDir: string | null, label: string, ownHome?: AfterpackHome | null): void;
|
|
851
988
|
interface WriteProtectionReceiptInput {
|
|
852
989
|
dir: string;
|
|
990
|
+
home?: AfterpackHome;
|
|
853
991
|
tool: string;
|
|
854
992
|
engine: EngineSource | null;
|
|
855
993
|
engineVersion: string | null;
|
|
@@ -859,6 +997,7 @@ interface WriteProtectionReceiptInput {
|
|
|
859
997
|
buildId: string | null;
|
|
860
998
|
files: string[];
|
|
861
999
|
transformed: readonly string[];
|
|
1000
|
+
merge?: boolean;
|
|
862
1001
|
}
|
|
863
1002
|
declare function writeDeferredProtectionReceipt(deferred: WriteProtectionReceiptInput): string | null;
|
|
864
1003
|
declare function writeProtectionReceipt(input: WriteProtectionReceiptInput): string;
|
|
@@ -874,12 +1013,16 @@ declare class UnreadableReceiptError extends Error {
|
|
|
874
1013
|
readonly schema: number;
|
|
875
1014
|
constructor(message: string, receiptPath: string, schema: number);
|
|
876
1015
|
}
|
|
877
|
-
declare function verifyProtectionReceipt(dir: string, expectedBuildId?: string | null): ProtectionVerification;
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
1016
|
+
declare function verifyProtectionReceipt(receiptPath: string, dir: string, expectedBuildId?: string | null): ProtectionVerification;
|
|
1017
|
+
interface LocatedReceipt {
|
|
1018
|
+
receiptPath: string;
|
|
1019
|
+
dir: string;
|
|
1020
|
+
copiedFrom: string | null;
|
|
1021
|
+
}
|
|
1022
|
+
interface LocateReceiptOptions {
|
|
1023
|
+
copies?: boolean;
|
|
1024
|
+
}
|
|
1025
|
+
declare function locateProtectionReceipt(dir: string, options?: LocateReceiptOptions): LocatedReceipt | null;
|
|
883
1026
|
//#endregion
|
|
884
1027
|
//#region src/summary.d.ts
|
|
885
1028
|
type PassSummaryStyle = "cli" | "plugin";
|
|
@@ -957,6 +1100,7 @@ interface EngineFileInput {
|
|
|
957
1100
|
source: string;
|
|
958
1101
|
sourceMap?: string;
|
|
959
1102
|
regions?: RegionConfig[];
|
|
1103
|
+
sourceType?: SourceType;
|
|
960
1104
|
}
|
|
961
1105
|
interface EngineFileResult {
|
|
962
1106
|
path: string;
|
|
@@ -983,7 +1127,8 @@ interface ObfuscationEngine {
|
|
|
983
1127
|
}
|
|
984
1128
|
interface CombinedProtectionMapTarget {
|
|
985
1129
|
buildDir: string;
|
|
986
|
-
|
|
1130
|
+
fileTarget?: boolean;
|
|
1131
|
+
subdir?: string;
|
|
987
1132
|
fileName?: string;
|
|
988
1133
|
}
|
|
989
1134
|
interface InMemoryInput {
|
|
@@ -1003,6 +1148,10 @@ interface PassReceiptIdentity {
|
|
|
1003
1148
|
bundler?: string;
|
|
1004
1149
|
buildId?: string | null;
|
|
1005
1150
|
}
|
|
1151
|
+
interface PassWritePlan {
|
|
1152
|
+
renamed: ReadonlyMap<string, string>;
|
|
1153
|
+
planned: ReadonlyMap<string, readonly (string | null)[]>;
|
|
1154
|
+
}
|
|
1006
1155
|
interface ObfuscationPassOptions {
|
|
1007
1156
|
files: string[];
|
|
1008
1157
|
inputs?: Map<string, InMemoryInput>;
|
|
@@ -1018,6 +1167,7 @@ interface ObfuscationPassOptions {
|
|
|
1018
1167
|
preset?: Preset;
|
|
1019
1168
|
complexity?: number;
|
|
1020
1169
|
sourceType?: SourceType;
|
|
1170
|
+
fileSourceTypes?: ReadonlyMap<string, SourceType>;
|
|
1021
1171
|
regions?: RegionConfig[];
|
|
1022
1172
|
engineConfig?: CoreConfigSubset;
|
|
1023
1173
|
directivesEnabled?: boolean;
|
|
@@ -1027,7 +1177,13 @@ interface ObfuscationPassOptions {
|
|
|
1027
1177
|
env?: EnvLike;
|
|
1028
1178
|
messages?: PassMessages;
|
|
1029
1179
|
receipt?: PassReceiptIdentity;
|
|
1030
|
-
afterWrite?: () => void;
|
|
1180
|
+
afterWrite?: (writtenFiles: string[]) => void;
|
|
1181
|
+
beforeWrite?: (plan: PassWritePlan) => void;
|
|
1182
|
+
resolvedSeed?: ResolvedBuildSeed;
|
|
1183
|
+
hashedNames?: HashedNamesOptions;
|
|
1184
|
+
cloudEngineExpectation?: SaltEngine;
|
|
1185
|
+
sourceMapSweepDir?: string | null;
|
|
1186
|
+
outputSweep?: boolean;
|
|
1031
1187
|
diagnostics?: DiagnosticsVerbosity;
|
|
1032
1188
|
telemetry?: TelemetryReporter;
|
|
1033
1189
|
clientVersion?: string;
|
|
@@ -1036,6 +1192,7 @@ interface ObfuscationPassOptions {
|
|
|
1036
1192
|
startedAt?: number;
|
|
1037
1193
|
summaryStyle?: PassSummaryStyle;
|
|
1038
1194
|
colorGlyph?: (glyph: string) => string;
|
|
1195
|
+
onBatch?: (inputs: readonly EngineFileInput[], batch: EngineBatchResult) => void;
|
|
1039
1196
|
}
|
|
1040
1197
|
interface PassTiming {
|
|
1041
1198
|
totalMs: number;
|
|
@@ -1057,6 +1214,8 @@ interface ObfuscationPassResult {
|
|
|
1057
1214
|
timing: PassTiming;
|
|
1058
1215
|
diagnostics: DiagnosticsSummary;
|
|
1059
1216
|
transformedFiles: string[];
|
|
1217
|
+
renamed: Map<string, string>;
|
|
1218
|
+
hashSalt: string | null;
|
|
1060
1219
|
outputs?: InMemoryOutput[];
|
|
1061
1220
|
}
|
|
1062
1221
|
declare function runObfuscationPass(options: ObfuscationPassOptions): Promise<ObfuscationPassResult>;
|
|
@@ -1081,6 +1240,11 @@ interface BundleJs {
|
|
|
1081
1240
|
}
|
|
1082
1241
|
declare function collectBundleJs(bundle: OutputBundleLike, outDir: string): BundleJs;
|
|
1083
1242
|
declare function sourceTypeForBundle(format: string | null | undefined, entries: Iterable<BundleEntryLike>): SourceType | undefined;
|
|
1243
|
+
declare function regenerateCompressedSiblings(bundle: OutputBundleLike, obfuscated: ReadonlySet<string>, label: string): void;
|
|
1244
|
+
declare function sriPluginRefusal(plugins: readonly {
|
|
1245
|
+
name?: string;
|
|
1246
|
+
}[] | undefined, label: string): string | null;
|
|
1247
|
+
declare function unsaltedAssetsWarning(entries: ReadonlyMap<string, BundleEntryLike>, salted: ReadonlySet<string>): string | null;
|
|
1084
1248
|
declare function applyBundleOutput(bundle: OutputBundleLike, entry: BundleEntryLike, out: InMemoryOutput, policy: ReportPolicy): void;
|
|
1085
1249
|
declare function stripBundleCssSourceMaps(bundle: OutputBundleLike): void;
|
|
1086
1250
|
//#endregion
|
|
@@ -1117,36 +1281,12 @@ interface EnvParseResult {
|
|
|
1117
1281
|
}
|
|
1118
1282
|
declare function parseEnvOptions(env: Record<string, string | undefined>): EnvParseResult;
|
|
1119
1283
|
//#endregion
|
|
1120
|
-
//#region src/
|
|
1121
|
-
declare const
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
}
|
|
1127
|
-
declare function normalizePluginOptions(input: unknown, localKeys: readonly string[], surface: string): NormalizedPluginOptions;
|
|
1128
|
-
interface PluginConfigInput {
|
|
1129
|
-
label: string;
|
|
1130
|
-
options?: unknown;
|
|
1131
|
-
argv?: string[];
|
|
1132
|
-
cwd?: string;
|
|
1133
|
-
env?: Record<string, string | undefined>;
|
|
1134
|
-
localKeys?: readonly string[];
|
|
1135
|
-
unsupported?: Readonly<Record<string, string>>;
|
|
1136
|
-
}
|
|
1137
|
-
interface ResolvedPluginConfig {
|
|
1138
|
-
config: AfterpackConfig;
|
|
1139
|
-
options: PluginOptionsView;
|
|
1140
|
-
engineConfig: CoreConfigSubset;
|
|
1141
|
-
configFile: string | null;
|
|
1142
|
-
positionals: string[];
|
|
1143
|
-
help: boolean;
|
|
1144
|
-
version: boolean;
|
|
1145
|
-
}
|
|
1146
|
-
type PassSettings = Pick<ObfuscationPassOptions, "artifactOptions" | "seed" | "preset" | "complexity" | "regions" | "engineConfig" | "diagnostics" | "directivesEnabled" | "directivesEnabledExplicit">;
|
|
1147
|
-
declare function passSettings(resolved: Pick<ResolvedPluginConfig, "options" | "engineConfig">): PassSettings;
|
|
1148
|
-
declare function applyResolvedKey(config: AfterpackConfig, env?: Record<string, string | undefined>): void;
|
|
1149
|
-
declare function resolvePluginConfig(input: PluginConfigInput): ResolvedPluginConfig;
|
|
1284
|
+
//#region src/hash-tokens.d.ts
|
|
1285
|
+
declare const NEXT_CHUNKS_PREFIX = "static/chunks/";
|
|
1286
|
+
declare function detectNextBundler(distDir: string): string;
|
|
1287
|
+
declare function nextChunkToken(bundler: string, chunksPrefix?: string): HashTokenOf;
|
|
1288
|
+
declare function skipNextInternals(relativePath: string): boolean;
|
|
1289
|
+
declare const angularHashToken: HashTokenOf;
|
|
1150
1290
|
//#endregion
|
|
1151
1291
|
//#region src/source-map.d.ts
|
|
1152
1292
|
declare function withSourceMappingURL(code: string, url: string | null): string;
|
|
@@ -1154,5 +1294,7 @@ declare function withoutCssSourceMappingURL(css: string): string;
|
|
|
1154
1294
|
declare function extractSourceMappingURL(code: string): string | null;
|
|
1155
1295
|
declare function decodeDataUri(url: string): string | null;
|
|
1156
1296
|
declare function discoverInputSourceMap(jsPath: string, code?: string): string | null;
|
|
1297
|
+
declare function removeSourceMaps(paths: Iterable<string>, label: string): number;
|
|
1298
|
+
declare function stripCssSourceMappingURLs(paths: Iterable<string>): number;
|
|
1157
1299
|
//#endregion
|
|
1158
|
-
export { type AfterpackArtifactOptions, type AfterpackConfig, type AfterpackPluginOptions, AlreadyObfuscatedError, type ArtifactMode, type BuildContext, type BuildEngineConfigOptions, type BundleEntryLike, type BundleJs, CLOUD_REFUSAL_SUMMARY, CONFIG_FILE_NAME, CONFIG_KEYS, CORE_FLOOR_SUMMARY, type CapturedDirective, type CapturedModule, type CliParseResult, type ClientIdentity, CloudApiError, type CloudErrorKind, type CloudNotice, type CollectJsOptions, type CombinedProtectionMapTarget, type ConfigIssue, type ConfigKeyDef, type ConfigScope, type ConfigSurface, type ConfigTier, type CoreConfig, type CoreConfigSubset, CoreVersionError, DIAG_ALREADY_OBFUSCATED, DIAG_RECEIPT_UNREADABLE, type DiagnosticsSummary, type DiagnosticsVerbosity, type DirectiveDiagnostic, type DirectiveManifest, type EngineBatchResult, type EngineDiagnostic, type EngineDiagnosticData, type EngineFileInput, type EngineFileResult, type EngineSeverity, type EngineSpan, type EnvLike, type EnvParseResult, type GitBuildContext, type GlobReserved, type InMemoryInput, type InMemoryOutput, type LoadedConfigFile, type Logger, type NormalizedPluginOptions, type NoticeLogger, type NoticeSeverity, type ObfuscationEngine, type ObfuscationPassOptions, type ObfuscationPassResult, type OutputBundleLike,
|
|
1300
|
+
export { AFTERPACK_DIR, type AfterpackArtifactOptions, type AfterpackConfig, AfterpackFilesError, type AfterpackHome, type AfterpackHomeOptions, type AfterpackPluginOptions, AlreadyObfuscatedError, type ArtifactMode, type BuildContext, type BuildEngineConfigOptions, type BundleEntryLike, type BundleJs, CLOUD_REFUSAL_SUMMARY, CONFIG_FILE_NAME, CONFIG_KEYS, CORE_FLOOR_SUMMARY, type CapturedDirective, type CapturedModule, type CliParseResult, type ClientIdentity, CloudApiError, type CloudErrorKind, type CloudNotice, type CollectJsOptions, type CombinedProtectionMapTarget, type ConfigIssue, type ConfigKeyDef, type ConfigScope, type ConfigSurface, type ConfigTier, type CoreConfig, type CoreConfigSubset, CoreVersionError, DIAG_AFTERPACK_DIR_IN_OUTPUT, DIAG_ALREADY_OBFUSCATED, DIAG_RECEIPT_UNREADABLE, DIAG_RECEIPT_UNWRITABLE, type DiagnosticsSummary, type DiagnosticsVerbosity, type DirectiveDiagnostic, type DirectiveManifest, type EngineBatchResult, type EngineDiagnostic, type EngineDiagnosticData, type EngineFileInput, type EngineFileResult, type EngineSeverity, type EngineSpan, type EnvLike, type EnvParseResult, type GitBuildContext, type GlobReserved, type HashTokenOf, type HashedNamesOptions, type HomeTarget, type InMemoryInput, type InMemoryOutput, type LoadedConfigFile, type LocateReceiptOptions, type LocatedReceipt, type Logger, NEXT_CHUNKS_PREFIX, type NormalizedPluginOptions, type NoticeLogger, type NoticeSeverity, type ObfuscationEngine, type ObfuscationPassOptions, type ObfuscationPassResult, type OutputBundleLike, PROTECTION_RECEIPTS_DIR, type PassMessages, type PassReceiptIdentity, type PassSettings, type PassTiming, type PassWritePlan, type PluginConfigInput, type PluginOptionsView, type PrepareHashSaltInput, type PreparedHashSalt, type Preset, type ProtectionReceipt, type ProtectionReceiptFile, type ProtectionVerification, type RegionConfig, type ReportPolicy, type ReportPolicySignals, type ResolvedBuildSeed, type ResolvedPluginConfig, SEED_ENV_VAR, type SafeNotice, type SaltEngine, type SeedOption, type SeedOrigin, type SourceType, type TelemetryContext, type TelemetryDiagnostic, type TelemetryDiagnosticData, type TelemetryFacts, type TelemetryPayload, type TelemetryReporter, type TelemetryReporterDeps, type TelemetrySeverity, type TelemetrySpan, type TokenScanLimits, type TokenScanResult, type TransformKind, UnreadableReceiptError, type ValidationResult, type ValueShape, type ValueType, type WriteArtifactsInput, type WriteArtifactsResult, type WriteProtectionReceiptInput, afterpackHome, angularHashToken, angularServerManifestRefusal, applyBundleOutput, applyResolvedKey, buildDirKey, collectBundleJs, collectJsFiles, collectSourceMaps, collectStylesheets, createTelemetryReporter, decodeDataUri, detectNextBundler, discoverInputSourceMap, ensureAfterpackGitignore, extractSourceMappingURL, findHashTokenReference, findUpward, getPath, installedRequiredLine, isWithinDir, loadConfigFile, locateProtectionReceipt, mergeConfig, nextChunkToken, normalizePluginOptions, npxAlternative, parseCliOptions, parseEnvOptions, passSettings, planAngularIntegrity, prepareHashSalt, protectionReceiptPath, readEngineVersion, recomputeAngularIntegrity, regenerateCompressedSiblings, removeSourceMaps, reportPolicySaltBits, resolveClientIdentity, resolvePluginConfig, resolveReportPolicy, runObfuscationPass, saltSettings, sanitizeNotices, scanDirectives, serverAddsInfo, sha256Hex, sha256Of, skipNextInternals, sourceTypeForBundle, sourceTypeForOutputFormat, sriPluginRefusal, stagedPath, stripBundleCssSourceMaps, stripCssSourceMappingURLs, sweepOutputTree, toEngineConfig, toPluginOptions, unreferencedHashedFiles, unsaltedAssetsWarning, validateConfig, verifyProtectionReceipt, withSourceMappingURL, withoutCssSourceMappingURL, writeArtifacts, writeDeferredProtectionReceipt, writeFileAtomic, writeProtectionReceipt };
|