tailwindcss-patch 9.0.0 → 9.1.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/dist/chunk-8l464Juk.js +28 -0
- package/dist/cli.d.mts +1 -2
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +18 -22
- package/dist/cli.mjs +17 -22
- package/dist/commands/cli-runtime.d.mts +5 -10
- package/dist/commands/cli-runtime.d.ts +5 -10
- package/dist/commands/cli-runtime.js +582 -1217
- package/dist/commands/cli-runtime.mjs +570 -1216
- package/dist/dist-B1VBpHtd.js +21 -0
- package/dist/dist-BjUV1yEM.mjs +19 -0
- package/dist/index.bundle-0Fe7Jx8V.mjs +194 -0
- package/dist/index.bundle-C4Y53Ygf.js +232 -0
- package/dist/index.d.mts +133 -67
- package/dist/index.d.ts +133 -67
- package/dist/index.js +33 -57
- package/dist/index.mjs +3 -57
- package/dist/validate-4FCU-Ql3.mjs +3525 -0
- package/dist/validate-Bu_rkfQF.d.ts +686 -0
- package/dist/validate-BuhhSYBe.js +3700 -0
- package/dist/validate-CIMnzW8O.d.mts +685 -0
- package/package.json +11 -11
- package/src/api/tailwindcss-patcher.ts +33 -6
- package/src/commands/basic-handlers.ts +0 -1
- package/src/config/index.ts +1 -1
- package/src/config/workspace.ts +1 -1
- package/src/extraction/candidate-extractor.ts +14 -69
- package/src/index.bundle.ts +21 -0
- package/src/index.ts +16 -0
- package/src/options/legacy.ts +2 -2
- package/src/options/normalize.ts +10 -5
- package/src/runtime/collector.ts +7 -7
- package/src/runtime/process-tailwindcss.ts +33 -17
- package/src/v4/candidates.ts +224 -0
- package/src/v4/engine.ts +70 -0
- package/src/v4/index.ts +25 -0
- package/src/v4/node-adapter.ts +149 -0
- package/src/v4/source.ts +193 -0
- package/src/v4/types.ts +57 -0
- package/dist/chunk-4RRHMRLJ.js +0 -4378
- package/dist/chunk-AOSPLINO.mjs +0 -4378
- package/dist/chunk-OSH52QWA.mjs +0 -10
- package/dist/chunk-QQXAOMUH.js +0 -25
- package/dist/chunk-YYBY7EM5.mjs +0 -21
- package/dist/chunk-ZPLR2UEW.js +0 -7
- package/dist/dist-22YCNIJW.js +0 -269
- package/dist/dist-7W73GIRD.mjs +0 -269
- package/dist/validate-nbmOI2w8.d.mts +0 -677
- package/dist/validate-nbmOI2w8.d.ts +0 -677
package/dist/index.d.mts
CHANGED
|
@@ -1,84 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import postcss from 'postcss';
|
|
7
|
-
import '@tailwindcss/oxide';
|
|
8
|
-
import 'tailwindcss';
|
|
9
|
-
import 'consola';
|
|
10
|
-
|
|
11
|
-
declare function normalizeOptions(options?: TailwindCssPatchOptions): NormalizedTailwindCssPatchOptions;
|
|
1
|
+
import { $ as TailwindTokenFileKey, A as groupTokensByFile, B as TailwindCssOptions, C as MIGRATION_REPORT_SCHEMA_VERSION, D as extractRawCandidates, E as extractProjectCandidatesWithPositions, F as ExposeContextOptions, G as ExtractResult, H as TailwindV2Options, I as ExtendLengthUnitsOptions, J as PatchName, K as ILengthUnitsPatchOptions, L as ExtractOptions, M as ApplyOptions, N as CacheOptions, O as extractRawCandidatesWithPositions, P as CacheStrategy, Q as TailwindTokenByFileMap, R as NormalizedCacheOptions, S as MIGRATION_REPORT_KIND, T as TailwindcssPatcher, U as TailwindV3Options, V as TailwindCssPatchOptions, W as TailwindV4Options, X as PatchStatusReport, Y as PatchStatusEntry, Z as TailwindPatchRuntime, _ as ConfigFileMigrationEntry, a as ValidateFailureSummary, at as CacheClearResult, b as RestoreConfigFilesOptions, c as TailwindcssPatchCliMountOptions, ct as CacheContextMetadata, d as TailwindcssPatchCommandContext, dt as CacheReadResult, et as TailwindTokenLocation, f as TailwindcssPatchCommandHandler, g as tailwindcssPatchCommands, h as TailwindcssPatchCommandOptions, i as ValidateFailureReason, it as CacheClearOptions, j as normalizeOptions, k as extractValidCandidates, l as TailwindcssPatchCliOptions, lt as CacheIndexFileV2, m as TailwindcssPatchCommandOptionDefinition, n as VALIDATE_FAILURE_REASONS, nt as TailwindcssClassCache, o as ValidateJsonFailurePayload, ot as CacheClearScope, p as TailwindcssPatchCommandHandlerMap, q as PatchCheckStatus, r as ValidateCommandError, rt as TailwindcssRuntimeContext, s as ValidateJsonSuccessPayload, st as CacheContextDescriptor, t as VALIDATE_EXIT_CODES, tt as TailwindTokenReport, u as TailwindcssPatchCommand, ut as CacheReadMeta, v as ConfigFileMigrationReport, w as logger, x as RestoreConfigFilesResult, y as MigrateConfigFilesOptions, z as NormalizedTailwindCssPatchOptions } from "./validate-CIMnzW8O.mjs";
|
|
2
|
+
import { PackageInfo } from "local-pkg";
|
|
3
|
+
import postcss from "postcss";
|
|
4
|
+
import { CAC } from "cac";
|
|
5
|
+
import { TailwindcssMangleConfig } from "@tailwindcss-mangle/config";
|
|
12
6
|
|
|
7
|
+
//#region src/cache/store.d.ts
|
|
13
8
|
declare class CacheStore {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
9
|
+
private readonly options;
|
|
10
|
+
private readonly context?;
|
|
11
|
+
private readonly driver;
|
|
12
|
+
private readonly lockPath;
|
|
13
|
+
private memoryCache;
|
|
14
|
+
private memoryIndex;
|
|
15
|
+
private lastReadMeta;
|
|
16
|
+
constructor(options: NormalizedCacheOptions, context?: CacheContextDescriptor | undefined);
|
|
17
|
+
private isContextAware;
|
|
18
|
+
private createEmptyIndex;
|
|
19
|
+
private ensureDir;
|
|
20
|
+
private ensureDirSync;
|
|
21
|
+
private createTempPath;
|
|
22
|
+
private replaceCacheFile;
|
|
23
|
+
private replaceCacheFileSync;
|
|
24
|
+
private cleanupTempFile;
|
|
25
|
+
private cleanupTempFileSync;
|
|
26
|
+
private delay;
|
|
27
|
+
private acquireLock;
|
|
28
|
+
private releaseLockSyncOrAsync;
|
|
29
|
+
private acquireLockSync;
|
|
30
|
+
private withFileLock;
|
|
31
|
+
private withFileLockSync;
|
|
32
|
+
private normalizeContextEntry;
|
|
33
|
+
private normalizeIndexFile;
|
|
34
|
+
private readParsedCacheFile;
|
|
35
|
+
private readParsedCacheFileSync;
|
|
36
|
+
private findProjectMatch;
|
|
37
|
+
private writeIndexFile;
|
|
38
|
+
private writeIndexFileSync;
|
|
39
|
+
write(data: Set<string>): Promise<string | undefined>;
|
|
40
|
+
writeSync(data: Set<string>): string | undefined;
|
|
41
|
+
readWithMeta(): Promise<CacheReadResult>;
|
|
42
|
+
readWithMetaSync(): CacheReadResult;
|
|
43
|
+
read(): Promise<Set<string>>;
|
|
44
|
+
readSync(): Set<string>;
|
|
45
|
+
getLastReadMeta(): CacheReadMeta;
|
|
46
|
+
private countEntriesFromParsed;
|
|
47
|
+
clear(options?: CacheClearOptions): Promise<CacheClearResult>;
|
|
48
|
+
clearSync(options?: CacheClearOptions): CacheClearResult;
|
|
49
|
+
readIndexSnapshot(): CacheIndexFileV2 | undefined;
|
|
55
50
|
}
|
|
56
|
-
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/commands/migrate-config.d.ts
|
|
57
53
|
declare function migrateConfigFiles(options: MigrateConfigFilesOptions): Promise<ConfigFileMigrationReport>;
|
|
58
54
|
declare function restoreConfigFiles(options: RestoreConfigFilesOptions): Promise<RestoreConfigFilesResult>;
|
|
59
|
-
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/runtime/class-collector.d.ts
|
|
60
57
|
declare function collectClassesFromContexts(contexts: TailwindcssRuntimeContext[], filter: (className: string) => boolean): Set<string>;
|
|
61
58
|
declare function collectClassesFromTailwindV4(options: NormalizedTailwindCssPatchOptions): Promise<Set<string>>;
|
|
62
|
-
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/runtime/context-registry.d.ts
|
|
63
61
|
declare function loadRuntimeContexts(packageInfo: PackageInfo, majorVersion: 2 | 3 | 4, refProperty: string): TailwindcssRuntimeContext[];
|
|
64
|
-
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/runtime/process-tailwindcss.d.ts
|
|
65
64
|
interface TailwindBuildOptions {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
cwd: string;
|
|
66
|
+
config?: string;
|
|
67
|
+
majorVersion: 2 | 3 | 4;
|
|
68
|
+
postcssPlugin?: string;
|
|
70
69
|
}
|
|
71
70
|
declare function runTailwindBuild(options: TailwindBuildOptions): Promise<postcss.Result<postcss.Root>>;
|
|
72
|
-
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/patching/status.d.ts
|
|
73
73
|
interface PatchStatusContext {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
packageInfo: PackageInfo;
|
|
75
|
+
options: NormalizedTailwindCssPatchOptions;
|
|
76
|
+
majorVersion: 2 | 3 | 4;
|
|
77
77
|
}
|
|
78
78
|
declare function getPatchStatusReport(context: PatchStatusContext): PatchStatusReport;
|
|
79
|
-
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/v4/types.d.ts
|
|
81
|
+
interface TailwindV4SourceOptions {
|
|
82
|
+
projectRoot?: string;
|
|
83
|
+
cwd?: string;
|
|
84
|
+
base?: string;
|
|
85
|
+
baseFallbacks?: string[];
|
|
86
|
+
css?: string;
|
|
87
|
+
cssEntries?: string[];
|
|
88
|
+
packageName?: string;
|
|
89
|
+
}
|
|
90
|
+
interface TailwindV4ResolvedSource {
|
|
91
|
+
projectRoot: string;
|
|
92
|
+
base: string;
|
|
93
|
+
baseFallbacks: string[];
|
|
94
|
+
css: string;
|
|
95
|
+
dependencies: string[];
|
|
96
|
+
}
|
|
97
|
+
interface TailwindV4CandidateSource {
|
|
98
|
+
content: string;
|
|
99
|
+
extension?: string;
|
|
100
|
+
}
|
|
101
|
+
interface TailwindV4GenerateOptions {
|
|
102
|
+
candidates?: Iterable<string>;
|
|
103
|
+
sources?: TailwindV4CandidateSource[];
|
|
104
|
+
}
|
|
105
|
+
interface TailwindV4SourcePattern {
|
|
106
|
+
base: string;
|
|
107
|
+
pattern: string;
|
|
108
|
+
negated: boolean;
|
|
109
|
+
}
|
|
110
|
+
interface TailwindV4GenerateResult {
|
|
111
|
+
css: string;
|
|
112
|
+
classSet: Set<string>;
|
|
113
|
+
rawCandidates: Set<string>;
|
|
114
|
+
dependencies: string[];
|
|
115
|
+
sources: TailwindV4SourcePattern[];
|
|
116
|
+
root: null | 'none' | {
|
|
117
|
+
base: string;
|
|
118
|
+
pattern: string;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
interface TailwindV4DesignSystem {
|
|
122
|
+
parseCandidate: (candidate: string) => unknown[];
|
|
123
|
+
candidatesToCss: (candidates: string[]) => Array<string | null | undefined>;
|
|
124
|
+
}
|
|
125
|
+
interface TailwindV4Engine {
|
|
126
|
+
source: TailwindV4ResolvedSource;
|
|
127
|
+
loadDesignSystem: () => Promise<TailwindV4DesignSystem>;
|
|
128
|
+
validateCandidates: (candidates: Iterable<string>) => Promise<Set<string>>;
|
|
129
|
+
generate: (options?: TailwindV4GenerateOptions) => Promise<TailwindV4GenerateResult>;
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/v4/candidates.d.ts
|
|
133
|
+
declare function resolveValidTailwindV4Candidates(designSystem: TailwindV4DesignSystem, candidates: Iterable<string>): Set<string>;
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/v4/engine.d.ts
|
|
136
|
+
declare function createTailwindV4Engine(source: TailwindV4ResolvedSource): TailwindV4Engine;
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/v4/node-adapter.d.ts
|
|
139
|
+
declare function loadTailwindV4DesignSystem(source: TailwindV4ResolvedSource): Promise<TailwindV4DesignSystem>;
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/v4/source.d.ts
|
|
142
|
+
declare function resolveTailwindV4Source(options?: TailwindV4SourceOptions): Promise<TailwindV4ResolvedSource>;
|
|
143
|
+
declare function resolveTailwindV4SourceFromPatchOptions(options: TailwindCssPatchOptions): Promise<TailwindV4ResolvedSource>;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/index.bundle.d.ts
|
|
80
146
|
declare function mountTailwindcssPatchCommands(cli: CAC, options?: TailwindcssPatchCliMountOptions): CAC;
|
|
81
147
|
declare function createTailwindcssPatchCli(options?: TailwindcssPatchCliOptions): CAC;
|
|
82
148
|
declare function defineConfig<T extends TailwindcssMangleConfig>(config: T): T;
|
|
83
|
-
|
|
84
|
-
export { CacheClearOptions, CacheClearResult, CacheReadMeta, CacheStore, ConfigFileMigrationReport, MigrateConfigFilesOptions, NormalizedTailwindCssPatchOptions, PatchStatusReport, RestoreConfigFilesOptions, RestoreConfigFilesResult, TailwindCssPatchOptions, TailwindcssPatchCliMountOptions, TailwindcssPatchCliOptions, TailwindcssRuntimeContext, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindcssPatchCli, defineConfig, getPatchStatusReport, loadRuntimeContexts, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, restoreConfigFiles, runTailwindBuild };
|
|
149
|
+
//#endregion
|
|
150
|
+
export { ApplyOptions, CacheClearOptions, CacheClearResult, CacheClearScope, CacheContextMetadata, CacheOptions, CacheReadMeta, CacheStore, CacheStrategy, type ConfigFileMigrationEntry, type ConfigFileMigrationReport, ExposeContextOptions, ExtendLengthUnitsOptions, ExtractOptions, ExtractResult, ILengthUnitsPatchOptions, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, type MigrateConfigFilesOptions, NormalizedTailwindCssPatchOptions, PatchCheckStatus, PatchName, PatchStatusEntry, PatchStatusReport, type RestoreConfigFilesOptions, type RestoreConfigFilesResult, TailwindCssOptions, type TailwindCssPatchOptions, TailwindPatchRuntime, TailwindTokenByFileMap, TailwindTokenFileKey, TailwindTokenLocation, TailwindTokenReport, TailwindV2Options, TailwindV3Options, type TailwindV4CandidateSource, type TailwindV4DesignSystem, type TailwindV4Engine, type TailwindV4GenerateOptions, type TailwindV4GenerateResult, TailwindV4Options, type TailwindV4ResolvedSource, type TailwindV4SourceOptions, TailwindcssClassCache, type TailwindcssPatchCliMountOptions, type TailwindcssPatchCliOptions, type TailwindcssPatchCommand, type TailwindcssPatchCommandContext, type TailwindcssPatchCommandHandler, type TailwindcssPatchCommandHandlerMap, type TailwindcssPatchCommandOptionDefinition, type TailwindcssPatchCommandOptions, TailwindcssPatcher, TailwindcssRuntimeContext, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, type ValidateFailureReason, type ValidateFailureSummary, type ValidateJsonFailurePayload, type ValidateJsonSuccessPayload, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindV4Engine, createTailwindcssPatchCli, defineConfig, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, getPatchStatusReport, groupTokensByFile, loadRuntimeContexts, loadTailwindV4DesignSystem, logger, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveValidTailwindV4Candidates, restoreConfigFiles, runTailwindBuild, tailwindcssPatchCommands };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,84 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CAC } from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import postcss from 'postcss';
|
|
7
|
-
import '@tailwindcss/oxide';
|
|
8
|
-
import 'tailwindcss';
|
|
9
|
-
import 'consola';
|
|
10
|
-
|
|
11
|
-
declare function normalizeOptions(options?: TailwindCssPatchOptions): NormalizedTailwindCssPatchOptions;
|
|
1
|
+
import { $ as TailwindTokenFileKey, A as groupTokensByFile, B as TailwindCssOptions, C as MIGRATION_REPORT_SCHEMA_VERSION, D as extractRawCandidates, E as extractProjectCandidatesWithPositions, F as ExposeContextOptions, G as ExtractResult, H as TailwindV2Options, I as ExtendLengthUnitsOptions, J as PatchName, K as ILengthUnitsPatchOptions, L as ExtractOptions, M as ApplyOptions, N as CacheOptions, O as extractRawCandidatesWithPositions, P as CacheStrategy, Q as TailwindTokenByFileMap, R as NormalizedCacheOptions, S as MIGRATION_REPORT_KIND, T as TailwindcssPatcher, U as TailwindV3Options, V as TailwindCssPatchOptions, W as TailwindV4Options, X as PatchStatusReport, Y as PatchStatusEntry, Z as TailwindPatchRuntime, _ as ConfigFileMigrationEntry, a as ValidateFailureSummary, at as CacheClearResult, b as RestoreConfigFilesOptions, c as TailwindcssPatchCliMountOptions, ct as CacheContextMetadata, d as TailwindcssPatchCommandContext, dt as CacheReadResult, et as TailwindTokenLocation, f as TailwindcssPatchCommandHandler, g as tailwindcssPatchCommands, h as TailwindcssPatchCommandOptions, i as ValidateFailureReason, it as CacheClearOptions, j as normalizeOptions, k as extractValidCandidates, l as TailwindcssPatchCliOptions, lt as CacheIndexFileV2, m as TailwindcssPatchCommandOptionDefinition, n as VALIDATE_FAILURE_REASONS, nt as TailwindcssClassCache, o as ValidateJsonFailurePayload, ot as CacheClearScope, p as TailwindcssPatchCommandHandlerMap, q as PatchCheckStatus, r as ValidateCommandError, rt as TailwindcssRuntimeContext, s as ValidateJsonSuccessPayload, st as CacheContextDescriptor, t as VALIDATE_EXIT_CODES, tt as TailwindTokenReport, u as TailwindcssPatchCommand, ut as CacheReadMeta, v as ConfigFileMigrationReport, w as logger, x as RestoreConfigFilesResult, y as MigrateConfigFilesOptions, z as NormalizedTailwindCssPatchOptions } from "./validate-Bu_rkfQF.js";
|
|
2
|
+
import { CAC } from "cac";
|
|
3
|
+
import { PackageInfo } from "local-pkg";
|
|
4
|
+
import postcss from "postcss";
|
|
5
|
+
import { TailwindcssMangleConfig } from "@tailwindcss-mangle/config";
|
|
12
6
|
|
|
7
|
+
//#region src/cache/store.d.ts
|
|
13
8
|
declare class CacheStore {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
9
|
+
private readonly options;
|
|
10
|
+
private readonly context?;
|
|
11
|
+
private readonly driver;
|
|
12
|
+
private readonly lockPath;
|
|
13
|
+
private memoryCache;
|
|
14
|
+
private memoryIndex;
|
|
15
|
+
private lastReadMeta;
|
|
16
|
+
constructor(options: NormalizedCacheOptions, context?: CacheContextDescriptor | undefined);
|
|
17
|
+
private isContextAware;
|
|
18
|
+
private createEmptyIndex;
|
|
19
|
+
private ensureDir;
|
|
20
|
+
private ensureDirSync;
|
|
21
|
+
private createTempPath;
|
|
22
|
+
private replaceCacheFile;
|
|
23
|
+
private replaceCacheFileSync;
|
|
24
|
+
private cleanupTempFile;
|
|
25
|
+
private cleanupTempFileSync;
|
|
26
|
+
private delay;
|
|
27
|
+
private acquireLock;
|
|
28
|
+
private releaseLockSyncOrAsync;
|
|
29
|
+
private acquireLockSync;
|
|
30
|
+
private withFileLock;
|
|
31
|
+
private withFileLockSync;
|
|
32
|
+
private normalizeContextEntry;
|
|
33
|
+
private normalizeIndexFile;
|
|
34
|
+
private readParsedCacheFile;
|
|
35
|
+
private readParsedCacheFileSync;
|
|
36
|
+
private findProjectMatch;
|
|
37
|
+
private writeIndexFile;
|
|
38
|
+
private writeIndexFileSync;
|
|
39
|
+
write(data: Set<string>): Promise<string | undefined>;
|
|
40
|
+
writeSync(data: Set<string>): string | undefined;
|
|
41
|
+
readWithMeta(): Promise<CacheReadResult>;
|
|
42
|
+
readWithMetaSync(): CacheReadResult;
|
|
43
|
+
read(): Promise<Set<string>>;
|
|
44
|
+
readSync(): Set<string>;
|
|
45
|
+
getLastReadMeta(): CacheReadMeta;
|
|
46
|
+
private countEntriesFromParsed;
|
|
47
|
+
clear(options?: CacheClearOptions): Promise<CacheClearResult>;
|
|
48
|
+
clearSync(options?: CacheClearOptions): CacheClearResult;
|
|
49
|
+
readIndexSnapshot(): CacheIndexFileV2 | undefined;
|
|
55
50
|
}
|
|
56
|
-
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/commands/migrate-config.d.ts
|
|
57
53
|
declare function migrateConfigFiles(options: MigrateConfigFilesOptions): Promise<ConfigFileMigrationReport>;
|
|
58
54
|
declare function restoreConfigFiles(options: RestoreConfigFilesOptions): Promise<RestoreConfigFilesResult>;
|
|
59
|
-
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/runtime/class-collector.d.ts
|
|
60
57
|
declare function collectClassesFromContexts(contexts: TailwindcssRuntimeContext[], filter: (className: string) => boolean): Set<string>;
|
|
61
58
|
declare function collectClassesFromTailwindV4(options: NormalizedTailwindCssPatchOptions): Promise<Set<string>>;
|
|
62
|
-
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/runtime/context-registry.d.ts
|
|
63
61
|
declare function loadRuntimeContexts(packageInfo: PackageInfo, majorVersion: 2 | 3 | 4, refProperty: string): TailwindcssRuntimeContext[];
|
|
64
|
-
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/runtime/process-tailwindcss.d.ts
|
|
65
64
|
interface TailwindBuildOptions {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
cwd: string;
|
|
66
|
+
config?: string;
|
|
67
|
+
majorVersion: 2 | 3 | 4;
|
|
68
|
+
postcssPlugin?: string;
|
|
70
69
|
}
|
|
71
70
|
declare function runTailwindBuild(options: TailwindBuildOptions): Promise<postcss.Result<postcss.Root>>;
|
|
72
|
-
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/patching/status.d.ts
|
|
73
73
|
interface PatchStatusContext {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
packageInfo: PackageInfo;
|
|
75
|
+
options: NormalizedTailwindCssPatchOptions;
|
|
76
|
+
majorVersion: 2 | 3 | 4;
|
|
77
77
|
}
|
|
78
78
|
declare function getPatchStatusReport(context: PatchStatusContext): PatchStatusReport;
|
|
79
|
-
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/v4/types.d.ts
|
|
81
|
+
interface TailwindV4SourceOptions {
|
|
82
|
+
projectRoot?: string;
|
|
83
|
+
cwd?: string;
|
|
84
|
+
base?: string;
|
|
85
|
+
baseFallbacks?: string[];
|
|
86
|
+
css?: string;
|
|
87
|
+
cssEntries?: string[];
|
|
88
|
+
packageName?: string;
|
|
89
|
+
}
|
|
90
|
+
interface TailwindV4ResolvedSource {
|
|
91
|
+
projectRoot: string;
|
|
92
|
+
base: string;
|
|
93
|
+
baseFallbacks: string[];
|
|
94
|
+
css: string;
|
|
95
|
+
dependencies: string[];
|
|
96
|
+
}
|
|
97
|
+
interface TailwindV4CandidateSource {
|
|
98
|
+
content: string;
|
|
99
|
+
extension?: string;
|
|
100
|
+
}
|
|
101
|
+
interface TailwindV4GenerateOptions {
|
|
102
|
+
candidates?: Iterable<string>;
|
|
103
|
+
sources?: TailwindV4CandidateSource[];
|
|
104
|
+
}
|
|
105
|
+
interface TailwindV4SourcePattern {
|
|
106
|
+
base: string;
|
|
107
|
+
pattern: string;
|
|
108
|
+
negated: boolean;
|
|
109
|
+
}
|
|
110
|
+
interface TailwindV4GenerateResult {
|
|
111
|
+
css: string;
|
|
112
|
+
classSet: Set<string>;
|
|
113
|
+
rawCandidates: Set<string>;
|
|
114
|
+
dependencies: string[];
|
|
115
|
+
sources: TailwindV4SourcePattern[];
|
|
116
|
+
root: null | 'none' | {
|
|
117
|
+
base: string;
|
|
118
|
+
pattern: string;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
interface TailwindV4DesignSystem {
|
|
122
|
+
parseCandidate: (candidate: string) => unknown[];
|
|
123
|
+
candidatesToCss: (candidates: string[]) => Array<string | null | undefined>;
|
|
124
|
+
}
|
|
125
|
+
interface TailwindV4Engine {
|
|
126
|
+
source: TailwindV4ResolvedSource;
|
|
127
|
+
loadDesignSystem: () => Promise<TailwindV4DesignSystem>;
|
|
128
|
+
validateCandidates: (candidates: Iterable<string>) => Promise<Set<string>>;
|
|
129
|
+
generate: (options?: TailwindV4GenerateOptions) => Promise<TailwindV4GenerateResult>;
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/v4/candidates.d.ts
|
|
133
|
+
declare function resolveValidTailwindV4Candidates(designSystem: TailwindV4DesignSystem, candidates: Iterable<string>): Set<string>;
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/v4/engine.d.ts
|
|
136
|
+
declare function createTailwindV4Engine(source: TailwindV4ResolvedSource): TailwindV4Engine;
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/v4/node-adapter.d.ts
|
|
139
|
+
declare function loadTailwindV4DesignSystem(source: TailwindV4ResolvedSource): Promise<TailwindV4DesignSystem>;
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/v4/source.d.ts
|
|
142
|
+
declare function resolveTailwindV4Source(options?: TailwindV4SourceOptions): Promise<TailwindV4ResolvedSource>;
|
|
143
|
+
declare function resolveTailwindV4SourceFromPatchOptions(options: TailwindCssPatchOptions): Promise<TailwindV4ResolvedSource>;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/index.bundle.d.ts
|
|
80
146
|
declare function mountTailwindcssPatchCommands(cli: CAC, options?: TailwindcssPatchCliMountOptions): CAC;
|
|
81
147
|
declare function createTailwindcssPatchCli(options?: TailwindcssPatchCliOptions): CAC;
|
|
82
148
|
declare function defineConfig<T extends TailwindcssMangleConfig>(config: T): T;
|
|
83
|
-
|
|
84
|
-
export { CacheClearOptions, CacheClearResult, CacheReadMeta, CacheStore, ConfigFileMigrationReport, MigrateConfigFilesOptions, NormalizedTailwindCssPatchOptions, PatchStatusReport, RestoreConfigFilesOptions, RestoreConfigFilesResult, TailwindCssPatchOptions, TailwindcssPatchCliMountOptions, TailwindcssPatchCliOptions, TailwindcssRuntimeContext, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindcssPatchCli, defineConfig, getPatchStatusReport, loadRuntimeContexts, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, restoreConfigFiles, runTailwindBuild };
|
|
149
|
+
//#endregion
|
|
150
|
+
export { ApplyOptions, CacheClearOptions, CacheClearResult, CacheClearScope, CacheContextMetadata, CacheOptions, CacheReadMeta, CacheStore, CacheStrategy, type ConfigFileMigrationEntry, type ConfigFileMigrationReport, ExposeContextOptions, ExtendLengthUnitsOptions, ExtractOptions, ExtractResult, ILengthUnitsPatchOptions, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, type MigrateConfigFilesOptions, NormalizedTailwindCssPatchOptions, PatchCheckStatus, PatchName, PatchStatusEntry, PatchStatusReport, type RestoreConfigFilesOptions, type RestoreConfigFilesResult, TailwindCssOptions, type TailwindCssPatchOptions, TailwindPatchRuntime, TailwindTokenByFileMap, TailwindTokenFileKey, TailwindTokenLocation, TailwindTokenReport, TailwindV2Options, TailwindV3Options, type TailwindV4CandidateSource, type TailwindV4DesignSystem, type TailwindV4Engine, type TailwindV4GenerateOptions, type TailwindV4GenerateResult, TailwindV4Options, type TailwindV4ResolvedSource, type TailwindV4SourceOptions, TailwindcssClassCache, type TailwindcssPatchCliMountOptions, type TailwindcssPatchCliOptions, type TailwindcssPatchCommand, type TailwindcssPatchCommandContext, type TailwindcssPatchCommandHandler, type TailwindcssPatchCommandHandlerMap, type TailwindcssPatchCommandOptionDefinition, type TailwindcssPatchCommandOptions, TailwindcssPatcher, TailwindcssRuntimeContext, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, type ValidateFailureReason, type ValidateFailureSummary, type ValidateJsonFailurePayload, type ValidateJsonSuccessPayload, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindV4Engine, createTailwindcssPatchCli, defineConfig, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, getPatchStatusReport, groupTokensByFile, loadRuntimeContexts, loadTailwindV4DesignSystem, logger, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveValidTailwindV4Candidates, restoreConfigFiles, runTailwindBuild, tailwindcssPatchCommands };
|
package/dist/index.js
CHANGED
|
@@ -1,57 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
exports.CacheStore = _chunk4RRHMRLJjs.CacheStore; exports.MIGRATION_REPORT_KIND = _chunk4RRHMRLJjs.MIGRATION_REPORT_KIND; exports.MIGRATION_REPORT_SCHEMA_VERSION = _chunk4RRHMRLJjs.MIGRATION_REPORT_SCHEMA_VERSION; exports.TailwindcssPatcher = _chunk4RRHMRLJjs.TailwindcssPatcher; exports.VALIDATE_EXIT_CODES = _chunk4RRHMRLJjs.VALIDATE_EXIT_CODES; exports.VALIDATE_FAILURE_REASONS = _chunk4RRHMRLJjs.VALIDATE_FAILURE_REASONS; exports.ValidateCommandError = _chunk4RRHMRLJjs.ValidateCommandError; exports.collectClassesFromContexts = _chunk4RRHMRLJjs.collectClassesFromContexts; exports.collectClassesFromTailwindV4 = _chunk4RRHMRLJjs.collectClassesFromTailwindV4; exports.createTailwindcssPatchCli = _chunkQQXAOMUHjs.createTailwindcssPatchCli; exports.defineConfig = _chunkQQXAOMUHjs.defineConfig; exports.extractProjectCandidatesWithPositions = _chunk4RRHMRLJjs.extractProjectCandidatesWithPositions; exports.extractRawCandidates = _chunk4RRHMRLJjs.extractRawCandidates; exports.extractRawCandidatesWithPositions = _chunk4RRHMRLJjs.extractRawCandidatesWithPositions; exports.extractValidCandidates = _chunk4RRHMRLJjs.extractValidCandidates; exports.getPatchStatusReport = _chunk4RRHMRLJjs.getPatchStatusReport; exports.groupTokensByFile = _chunk4RRHMRLJjs.groupTokensByFile; exports.loadRuntimeContexts = _chunk4RRHMRLJjs.loadRuntimeContexts; exports.logger = _chunk4RRHMRLJjs.logger_default; exports.migrateConfigFiles = _chunk4RRHMRLJjs.migrateConfigFiles; exports.mountTailwindcssPatchCommands = _chunkQQXAOMUHjs.mountTailwindcssPatchCommands; exports.normalizeOptions = _chunk4RRHMRLJjs.normalizeOptions; exports.restoreConfigFiles = _chunk4RRHMRLJjs.restoreConfigFiles; exports.runTailwindBuild = _chunk4RRHMRLJjs.runTailwindBuild; exports.tailwindcssPatchCommands = _chunk4RRHMRLJjs.tailwindcssPatchCommands;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_validate = require("./validate-BuhhSYBe.js");
|
|
3
|
+
const require_index_bundle = require("./index.bundle-C4Y53Ygf.js");
|
|
4
|
+
exports.CacheStore = require_validate.CacheStore;
|
|
5
|
+
exports.MIGRATION_REPORT_KIND = require_validate.MIGRATION_REPORT_KIND;
|
|
6
|
+
exports.MIGRATION_REPORT_SCHEMA_VERSION = require_validate.MIGRATION_REPORT_SCHEMA_VERSION;
|
|
7
|
+
exports.TailwindcssPatcher = require_validate.TailwindcssPatcher;
|
|
8
|
+
exports.VALIDATE_EXIT_CODES = require_validate.VALIDATE_EXIT_CODES;
|
|
9
|
+
exports.VALIDATE_FAILURE_REASONS = require_validate.VALIDATE_FAILURE_REASONS;
|
|
10
|
+
exports.ValidateCommandError = require_validate.ValidateCommandError;
|
|
11
|
+
exports.collectClassesFromContexts = require_validate.collectClassesFromContexts;
|
|
12
|
+
exports.collectClassesFromTailwindV4 = require_validate.collectClassesFromTailwindV4;
|
|
13
|
+
exports.createTailwindV4Engine = require_index_bundle.createTailwindV4Engine;
|
|
14
|
+
exports.createTailwindcssPatchCli = require_index_bundle.createTailwindcssPatchCli;
|
|
15
|
+
exports.defineConfig = require_index_bundle.defineConfig;
|
|
16
|
+
exports.extractProjectCandidatesWithPositions = require_validate.extractProjectCandidatesWithPositions;
|
|
17
|
+
exports.extractRawCandidates = require_validate.extractRawCandidates;
|
|
18
|
+
exports.extractRawCandidatesWithPositions = require_validate.extractRawCandidatesWithPositions;
|
|
19
|
+
exports.extractValidCandidates = require_validate.extractValidCandidates;
|
|
20
|
+
exports.getPatchStatusReport = require_validate.getPatchStatusReport;
|
|
21
|
+
exports.groupTokensByFile = require_validate.groupTokensByFile;
|
|
22
|
+
exports.loadRuntimeContexts = require_validate.loadRuntimeContexts;
|
|
23
|
+
exports.loadTailwindV4DesignSystem = require_validate.loadTailwindV4DesignSystem;
|
|
24
|
+
exports.logger = require_validate.logger;
|
|
25
|
+
exports.migrateConfigFiles = require_validate.migrateConfigFiles;
|
|
26
|
+
exports.mountTailwindcssPatchCommands = require_index_bundle.mountTailwindcssPatchCommands;
|
|
27
|
+
exports.normalizeOptions = require_validate.normalizeOptions;
|
|
28
|
+
exports.resolveTailwindV4Source = require_index_bundle.resolveTailwindV4Source;
|
|
29
|
+
exports.resolveTailwindV4SourceFromPatchOptions = require_index_bundle.resolveTailwindV4SourceFromPatchOptions;
|
|
30
|
+
exports.resolveValidTailwindV4Candidates = require_validate.resolveValidTailwindV4Candidates;
|
|
31
|
+
exports.restoreConfigFiles = require_validate.restoreConfigFiles;
|
|
32
|
+
exports.runTailwindBuild = require_validate.runTailwindBuild;
|
|
33
|
+
exports.tailwindcssPatchCommands = require_validate.tailwindcssPatchCommands;
|
package/dist/index.mjs
CHANGED
|
@@ -1,57 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
mountTailwindcssPatchCommands
|
|
5
|
-
} from "./chunk-YYBY7EM5.mjs";
|
|
6
|
-
import {
|
|
7
|
-
CacheStore,
|
|
8
|
-
MIGRATION_REPORT_KIND,
|
|
9
|
-
MIGRATION_REPORT_SCHEMA_VERSION,
|
|
10
|
-
TailwindcssPatcher,
|
|
11
|
-
VALIDATE_EXIT_CODES,
|
|
12
|
-
VALIDATE_FAILURE_REASONS,
|
|
13
|
-
ValidateCommandError,
|
|
14
|
-
collectClassesFromContexts,
|
|
15
|
-
collectClassesFromTailwindV4,
|
|
16
|
-
extractProjectCandidatesWithPositions,
|
|
17
|
-
extractRawCandidates,
|
|
18
|
-
extractRawCandidatesWithPositions,
|
|
19
|
-
extractValidCandidates,
|
|
20
|
-
getPatchStatusReport,
|
|
21
|
-
groupTokensByFile,
|
|
22
|
-
loadRuntimeContexts,
|
|
23
|
-
logger_default,
|
|
24
|
-
migrateConfigFiles,
|
|
25
|
-
normalizeOptions,
|
|
26
|
-
restoreConfigFiles,
|
|
27
|
-
runTailwindBuild,
|
|
28
|
-
tailwindcssPatchCommands
|
|
29
|
-
} from "./chunk-AOSPLINO.mjs";
|
|
30
|
-
import "./chunk-OSH52QWA.mjs";
|
|
31
|
-
export {
|
|
32
|
-
CacheStore,
|
|
33
|
-
MIGRATION_REPORT_KIND,
|
|
34
|
-
MIGRATION_REPORT_SCHEMA_VERSION,
|
|
35
|
-
TailwindcssPatcher,
|
|
36
|
-
VALIDATE_EXIT_CODES,
|
|
37
|
-
VALIDATE_FAILURE_REASONS,
|
|
38
|
-
ValidateCommandError,
|
|
39
|
-
collectClassesFromContexts,
|
|
40
|
-
collectClassesFromTailwindV4,
|
|
41
|
-
createTailwindcssPatchCli,
|
|
42
|
-
defineConfig,
|
|
43
|
-
extractProjectCandidatesWithPositions,
|
|
44
|
-
extractRawCandidates,
|
|
45
|
-
extractRawCandidatesWithPositions,
|
|
46
|
-
extractValidCandidates,
|
|
47
|
-
getPatchStatusReport,
|
|
48
|
-
groupTokensByFile,
|
|
49
|
-
loadRuntimeContexts,
|
|
50
|
-
logger_default as logger,
|
|
51
|
-
migrateConfigFiles,
|
|
52
|
-
mountTailwindcssPatchCommands,
|
|
53
|
-
normalizeOptions,
|
|
54
|
-
restoreConfigFiles,
|
|
55
|
-
runTailwindBuild,
|
|
56
|
-
tailwindcssPatchCommands
|
|
57
|
-
};
|
|
1
|
+
import { D as normalizeOptions, O as CacheStore, S as loadTailwindV4DesignSystem, _ as extractRawCandidates, a as tailwindcssPatchCommands, b as groupTokensByFile, c as MIGRATION_REPORT_KIND, d as getPatchStatusReport, f as runTailwindBuild, g as extractProjectCandidatesWithPositions, h as collectClassesFromTailwindV4, k as logger, l as MIGRATION_REPORT_SCHEMA_VERSION, m as collectClassesFromContexts, n as VALIDATE_FAILURE_REASONS, o as migrateConfigFiles, p as loadRuntimeContexts, r as ValidateCommandError, s as restoreConfigFiles, t as VALIDATE_EXIT_CODES, u as TailwindcssPatcher, v as extractRawCandidatesWithPositions, w as resolveValidTailwindV4Candidates, y as extractValidCandidates } from "./validate-4FCU-Ql3.mjs";
|
|
2
|
+
import { a as resolveTailwindV4SourceFromPatchOptions, i as resolveTailwindV4Source, n as defineConfig, o as createTailwindV4Engine, r as mountTailwindcssPatchCommands, t as createTailwindcssPatchCli } from "./index.bundle-0Fe7Jx8V.mjs";
|
|
3
|
+
export { CacheStore, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, TailwindcssPatcher, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindV4Engine, createTailwindcssPatchCli, defineConfig, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, getPatchStatusReport, groupTokensByFile, loadRuntimeContexts, loadTailwindV4DesignSystem, logger, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveValidTailwindV4Candidates, restoreConfigFiles, runTailwindBuild, tailwindcssPatchCommands };
|