tailwindcss-patch 8.7.2 → 8.7.4-alpha.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-5CWNAWKP.js +7 -0
- package/dist/{chunk-PL4WB2UD.mjs → chunk-6ZDYMYHE.mjs} +1716 -1403
- package/dist/chunk-A67ABH3M.mjs +10 -0
- package/dist/{chunk-7WRLTAPZ.js → chunk-ZXW4S356.js} +1695 -1386
- package/dist/cli.js +5 -4
- package/dist/cli.mjs +2 -1
- package/dist/dist-7O2232CU.js +269 -0
- package/dist/dist-7UDSGIWH.mjs +269 -0
- package/dist/index.d.mts +65 -44
- package/dist/index.d.ts +65 -44
- package/dist/index.js +3 -2
- package/dist/index.mjs +2 -1
- package/package.json +6 -5
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { SourceEntry } from '@tailwindcss/oxide';
|
|
|
2
2
|
import postcss, { Rule, Node } from 'postcss';
|
|
3
3
|
import { Config } from 'tailwindcss';
|
|
4
4
|
import { PackageResolvingOptions, PackageInfo } from 'local-pkg';
|
|
5
|
-
import { TailwindLocatorOptions, TailwindNextOptions
|
|
5
|
+
import { TailwindLocatorOptions, TailwindNextOptions } from '@tailwindcss-mangle/config';
|
|
6
6
|
export { defineConfig } from '@tailwindcss-mangle/config';
|
|
7
7
|
import { Command, CAC } from 'cac';
|
|
8
8
|
import * as consola from 'consola';
|
|
@@ -486,6 +486,20 @@ interface LegacyTailwindcssPatcherOptions {
|
|
|
486
486
|
patch?: LegacyPatchOptions;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
+
declare function normalizeOptions(options?: TailwindcssPatchOptions): NormalizedTailwindcssPatchOptions;
|
|
490
|
+
|
|
491
|
+
interface TailwindcssConfigModule {
|
|
492
|
+
CONFIG_NAME: string;
|
|
493
|
+
getConfig: (cwd?: string) => Promise<{
|
|
494
|
+
config?: {
|
|
495
|
+
registry?: unknown;
|
|
496
|
+
patch?: LegacyTailwindcssPatcherOptions['patch'];
|
|
497
|
+
};
|
|
498
|
+
}>;
|
|
499
|
+
initConfig: (cwd: string) => Promise<unknown>;
|
|
500
|
+
}
|
|
501
|
+
type TailwindcssConfigResult = Awaited<ReturnType<TailwindcssConfigModule['getConfig']>>;
|
|
502
|
+
|
|
489
503
|
interface ExtractValidCandidatesOption {
|
|
490
504
|
sources?: SourceEntry[];
|
|
491
505
|
base?: string;
|
|
@@ -518,15 +532,19 @@ declare class TailwindcssPatcher {
|
|
|
518
532
|
readonly majorVersion: TailwindMajorVersion;
|
|
519
533
|
private readonly cacheContext;
|
|
520
534
|
private readonly cacheStore;
|
|
535
|
+
private patchMemo;
|
|
536
|
+
private inFlightBuild;
|
|
521
537
|
constructor(options?: TailwindcssPatcherInitOptions);
|
|
522
538
|
patch(): Promise<PatchRunnerResult>;
|
|
523
539
|
getPatchStatus(): Promise<PatchStatusReport>;
|
|
524
540
|
getContexts(): TailwindcssRuntimeContext[];
|
|
525
541
|
private runTailwindBuildIfNeeded;
|
|
542
|
+
private createPatchSnapshot;
|
|
526
543
|
private collectClassSet;
|
|
527
544
|
private debugCacheRead;
|
|
528
545
|
private mergeWithCache;
|
|
529
546
|
private mergeWithCacheSync;
|
|
547
|
+
private areSetsEqual;
|
|
530
548
|
getClassSet(): Promise<Set<string>>;
|
|
531
549
|
getClassSetSync(): Set<string> | undefined;
|
|
532
550
|
extract(options?: {
|
|
@@ -590,8 +608,11 @@ declare class CacheStore {
|
|
|
590
608
|
readIndexSnapshot(): CacheIndexFileV2 | undefined;
|
|
591
609
|
}
|
|
592
610
|
|
|
611
|
+
declare const logger: consola.ConsolaInstance;
|
|
612
|
+
|
|
593
613
|
declare const MIGRATION_REPORT_KIND = "tw-patch-migrate-report";
|
|
594
614
|
declare const MIGRATION_REPORT_SCHEMA_VERSION = 1;
|
|
615
|
+
|
|
595
616
|
interface ConfigFileMigrationEntry {
|
|
596
617
|
file: string;
|
|
597
618
|
changed: boolean;
|
|
@@ -651,43 +672,12 @@ interface RestoreConfigFilesResult {
|
|
|
651
672
|
skippedEntries: number;
|
|
652
673
|
restored: string[];
|
|
653
674
|
}
|
|
654
|
-
declare function migrateConfigFiles(options: MigrateConfigFilesOptions): Promise<ConfigFileMigrationReport>;
|
|
655
|
-
declare function restoreConfigFiles(options: RestoreConfigFilesOptions): Promise<RestoreConfigFilesResult>;
|
|
656
675
|
|
|
657
|
-
|
|
676
|
+
type TokenOutputFormat = 'json' | 'lines' | 'grouped-json';
|
|
677
|
+
type TokenGroupKey = 'relative' | 'absolute';
|
|
658
678
|
|
|
659
679
|
type TailwindcssPatchCommand = 'install' | 'extract' | 'tokens' | 'init' | 'migrate' | 'restore' | 'validate' | 'status';
|
|
660
680
|
declare const tailwindcssPatchCommands: TailwindcssPatchCommand[];
|
|
661
|
-
declare const VALIDATE_EXIT_CODES: {
|
|
662
|
-
readonly OK: 0;
|
|
663
|
-
readonly REPORT_INCOMPATIBLE: 21;
|
|
664
|
-
readonly MISSING_BACKUPS: 22;
|
|
665
|
-
readonly IO_ERROR: 23;
|
|
666
|
-
readonly UNKNOWN_ERROR: 24;
|
|
667
|
-
};
|
|
668
|
-
declare const VALIDATE_FAILURE_REASONS: readonly ["report-incompatible", "missing-backups", "io-error", "unknown-error"];
|
|
669
|
-
type ValidateFailureReason = (typeof VALIDATE_FAILURE_REASONS)[number];
|
|
670
|
-
interface ValidateFailureSummary {
|
|
671
|
-
reason: ValidateFailureReason;
|
|
672
|
-
exitCode: number;
|
|
673
|
-
message: string;
|
|
674
|
-
}
|
|
675
|
-
interface ValidateJsonSuccessPayload extends RestoreConfigFilesResult {
|
|
676
|
-
ok: true;
|
|
677
|
-
}
|
|
678
|
-
interface ValidateJsonFailurePayload {
|
|
679
|
-
ok: false;
|
|
680
|
-
reason: ValidateFailureReason;
|
|
681
|
-
exitCode: number;
|
|
682
|
-
message: string;
|
|
683
|
-
}
|
|
684
|
-
declare class ValidateCommandError extends Error {
|
|
685
|
-
reason: ValidateFailureReason;
|
|
686
|
-
exitCode: number;
|
|
687
|
-
constructor(summary: ValidateFailureSummary, options?: ErrorOptions);
|
|
688
|
-
}
|
|
689
|
-
type TokenOutputFormat = 'json' | 'lines' | 'grouped-json';
|
|
690
|
-
type TokenGroupKey = 'relative' | 'absolute';
|
|
691
681
|
type CacOptionConfig = Parameters<Command['option']>[2];
|
|
692
682
|
interface TailwindcssPatchCommandOptionDefinition {
|
|
693
683
|
flags: string;
|
|
@@ -773,7 +763,7 @@ interface TailwindcssPatchCommandContext<TCommand extends TailwindcssPatchComman
|
|
|
773
763
|
args: TailwindcssPatchCommandArgMap[TCommand];
|
|
774
764
|
cwd: string;
|
|
775
765
|
logger: typeof logger;
|
|
776
|
-
loadConfig: () =>
|
|
766
|
+
loadConfig: () => Promise<TailwindcssConfigResult>;
|
|
777
767
|
loadPatchOptions: (overrides?: TailwindcssPatchOptions) => Promise<TailwindcssPatchOptions>;
|
|
778
768
|
createPatcher: (overrides?: TailwindcssPatchOptions) => Promise<TailwindcssPatcher>;
|
|
779
769
|
}
|
|
@@ -791,17 +781,41 @@ interface TailwindcssPatchCliOptions {
|
|
|
791
781
|
name?: string;
|
|
792
782
|
mountOptions?: TailwindcssPatchCliMountOptions;
|
|
793
783
|
}
|
|
784
|
+
|
|
785
|
+
declare const VALIDATE_EXIT_CODES: {
|
|
786
|
+
readonly OK: 0;
|
|
787
|
+
readonly REPORT_INCOMPATIBLE: 21;
|
|
788
|
+
readonly MISSING_BACKUPS: 22;
|
|
789
|
+
readonly IO_ERROR: 23;
|
|
790
|
+
readonly UNKNOWN_ERROR: 24;
|
|
791
|
+
};
|
|
792
|
+
declare const VALIDATE_FAILURE_REASONS: readonly ["report-incompatible", "missing-backups", "io-error", "unknown-error"];
|
|
793
|
+
type ValidateFailureReason = (typeof VALIDATE_FAILURE_REASONS)[number];
|
|
794
|
+
interface ValidateFailureSummary {
|
|
795
|
+
reason: ValidateFailureReason;
|
|
796
|
+
exitCode: number;
|
|
797
|
+
message: string;
|
|
798
|
+
}
|
|
799
|
+
interface ValidateJsonSuccessPayload extends RestoreConfigFilesResult {
|
|
800
|
+
ok: true;
|
|
801
|
+
}
|
|
802
|
+
interface ValidateJsonFailurePayload {
|
|
803
|
+
ok: false;
|
|
804
|
+
reason: ValidateFailureReason;
|
|
805
|
+
exitCode: number;
|
|
806
|
+
message: string;
|
|
807
|
+
}
|
|
808
|
+
declare class ValidateCommandError extends Error {
|
|
809
|
+
reason: ValidateFailureReason;
|
|
810
|
+
exitCode: number;
|
|
811
|
+
constructor(summary: ValidateFailureSummary, options?: ErrorOptions);
|
|
812
|
+
}
|
|
813
|
+
|
|
794
814
|
declare function mountTailwindcssPatchCommands(cli: CAC, options?: TailwindcssPatchCliMountOptions): CAC;
|
|
795
815
|
declare function createTailwindcssPatchCli(options?: TailwindcssPatchCliOptions): CAC;
|
|
796
816
|
|
|
797
|
-
declare function
|
|
798
|
-
|
|
799
|
-
interface PatchStatusContext {
|
|
800
|
-
packageInfo: PackageInfo;
|
|
801
|
-
options: NormalizedTailwindcssPatchOptions;
|
|
802
|
-
majorVersion: 2 | 3 | 4;
|
|
803
|
-
}
|
|
804
|
-
declare function getPatchStatusReport(context: PatchStatusContext): PatchStatusReport;
|
|
817
|
+
declare function migrateConfigFiles(options: MigrateConfigFilesOptions): Promise<ConfigFileMigrationReport>;
|
|
818
|
+
declare function restoreConfigFiles(options: RestoreConfigFilesOptions): Promise<RestoreConfigFilesResult>;
|
|
805
819
|
|
|
806
820
|
declare function collectClassesFromContexts(contexts: TailwindcssRuntimeContext[], filter: (className: string) => boolean): Set<string>;
|
|
807
821
|
declare function collectClassesFromTailwindV4(options: NormalizedTailwindcssPatchOptions): Promise<Set<string>>;
|
|
@@ -816,4 +830,11 @@ interface TailwindBuildOptions {
|
|
|
816
830
|
}
|
|
817
831
|
declare function runTailwindBuild(options: TailwindBuildOptions): Promise<postcss.Result<postcss.Root>>;
|
|
818
832
|
|
|
819
|
-
|
|
833
|
+
interface PatchStatusContext {
|
|
834
|
+
packageInfo: PackageInfo;
|
|
835
|
+
options: NormalizedTailwindcssPatchOptions;
|
|
836
|
+
majorVersion: 2 | 3 | 4;
|
|
837
|
+
}
|
|
838
|
+
declare function getPatchStatusReport(context: PatchStatusContext): PatchStatusReport;
|
|
839
|
+
|
|
840
|
+
export { type CacheClearOptions, type CacheClearResult, type CacheClearScope, type CacheContextMetadata, type CacheReadMeta, CacheStore, type CacheStrategy, type ConfigFileMigrationEntry, type ConfigFileMigrationReport, type ExtractResult, type ILengthUnitsPatchOptions, type LegacyTailwindcssPatcherOptions, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, type MigrateConfigFilesOptions, type NormalizedTailwindcssPatchOptions, type PatchCheckStatus, type PatchName, type PatchStatusEntry, type PatchStatusReport, type RestoreConfigFilesOptions, type RestoreConfigFilesResult, type TailwindPatchRuntime, type TailwindTokenByFileMap, type TailwindTokenFileKey, type TailwindTokenLocation, type TailwindTokenReport, type TailwindcssClassCache, type TailwindcssPatchCliMountOptions, type TailwindcssPatchCliOptions, type TailwindcssPatchCommand, type TailwindcssPatchCommandContext, type TailwindcssPatchCommandHandler, type TailwindcssPatchCommandHandlerMap, type TailwindcssPatchCommandOptionDefinition, type TailwindcssPatchCommandOptions, type TailwindcssPatchOptions, TailwindcssPatcher, type TailwindcssRuntimeContext, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, type ValidateFailureReason, type ValidateFailureSummary, type ValidateJsonFailurePayload, type ValidateJsonSuccessPayload, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindcssPatchCli, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, getPatchStatusReport, groupTokensByFile, loadRuntimeContexts, logger, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, restoreConfigFiles, runTailwindBuild, tailwindcssPatchCommands };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { SourceEntry } from '@tailwindcss/oxide';
|
|
|
2
2
|
import postcss, { Rule, Node } from 'postcss';
|
|
3
3
|
import { Config } from 'tailwindcss';
|
|
4
4
|
import { PackageResolvingOptions, PackageInfo } from 'local-pkg';
|
|
5
|
-
import { TailwindLocatorOptions, TailwindNextOptions
|
|
5
|
+
import { TailwindLocatorOptions, TailwindNextOptions } from '@tailwindcss-mangle/config';
|
|
6
6
|
export { defineConfig } from '@tailwindcss-mangle/config';
|
|
7
7
|
import { Command, CAC } from 'cac';
|
|
8
8
|
import * as consola from 'consola';
|
|
@@ -486,6 +486,20 @@ interface LegacyTailwindcssPatcherOptions {
|
|
|
486
486
|
patch?: LegacyPatchOptions;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
+
declare function normalizeOptions(options?: TailwindcssPatchOptions): NormalizedTailwindcssPatchOptions;
|
|
490
|
+
|
|
491
|
+
interface TailwindcssConfigModule {
|
|
492
|
+
CONFIG_NAME: string;
|
|
493
|
+
getConfig: (cwd?: string) => Promise<{
|
|
494
|
+
config?: {
|
|
495
|
+
registry?: unknown;
|
|
496
|
+
patch?: LegacyTailwindcssPatcherOptions['patch'];
|
|
497
|
+
};
|
|
498
|
+
}>;
|
|
499
|
+
initConfig: (cwd: string) => Promise<unknown>;
|
|
500
|
+
}
|
|
501
|
+
type TailwindcssConfigResult = Awaited<ReturnType<TailwindcssConfigModule['getConfig']>>;
|
|
502
|
+
|
|
489
503
|
interface ExtractValidCandidatesOption {
|
|
490
504
|
sources?: SourceEntry[];
|
|
491
505
|
base?: string;
|
|
@@ -518,15 +532,19 @@ declare class TailwindcssPatcher {
|
|
|
518
532
|
readonly majorVersion: TailwindMajorVersion;
|
|
519
533
|
private readonly cacheContext;
|
|
520
534
|
private readonly cacheStore;
|
|
535
|
+
private patchMemo;
|
|
536
|
+
private inFlightBuild;
|
|
521
537
|
constructor(options?: TailwindcssPatcherInitOptions);
|
|
522
538
|
patch(): Promise<PatchRunnerResult>;
|
|
523
539
|
getPatchStatus(): Promise<PatchStatusReport>;
|
|
524
540
|
getContexts(): TailwindcssRuntimeContext[];
|
|
525
541
|
private runTailwindBuildIfNeeded;
|
|
542
|
+
private createPatchSnapshot;
|
|
526
543
|
private collectClassSet;
|
|
527
544
|
private debugCacheRead;
|
|
528
545
|
private mergeWithCache;
|
|
529
546
|
private mergeWithCacheSync;
|
|
547
|
+
private areSetsEqual;
|
|
530
548
|
getClassSet(): Promise<Set<string>>;
|
|
531
549
|
getClassSetSync(): Set<string> | undefined;
|
|
532
550
|
extract(options?: {
|
|
@@ -590,8 +608,11 @@ declare class CacheStore {
|
|
|
590
608
|
readIndexSnapshot(): CacheIndexFileV2 | undefined;
|
|
591
609
|
}
|
|
592
610
|
|
|
611
|
+
declare const logger: consola.ConsolaInstance;
|
|
612
|
+
|
|
593
613
|
declare const MIGRATION_REPORT_KIND = "tw-patch-migrate-report";
|
|
594
614
|
declare const MIGRATION_REPORT_SCHEMA_VERSION = 1;
|
|
615
|
+
|
|
595
616
|
interface ConfigFileMigrationEntry {
|
|
596
617
|
file: string;
|
|
597
618
|
changed: boolean;
|
|
@@ -651,43 +672,12 @@ interface RestoreConfigFilesResult {
|
|
|
651
672
|
skippedEntries: number;
|
|
652
673
|
restored: string[];
|
|
653
674
|
}
|
|
654
|
-
declare function migrateConfigFiles(options: MigrateConfigFilesOptions): Promise<ConfigFileMigrationReport>;
|
|
655
|
-
declare function restoreConfigFiles(options: RestoreConfigFilesOptions): Promise<RestoreConfigFilesResult>;
|
|
656
675
|
|
|
657
|
-
|
|
676
|
+
type TokenOutputFormat = 'json' | 'lines' | 'grouped-json';
|
|
677
|
+
type TokenGroupKey = 'relative' | 'absolute';
|
|
658
678
|
|
|
659
679
|
type TailwindcssPatchCommand = 'install' | 'extract' | 'tokens' | 'init' | 'migrate' | 'restore' | 'validate' | 'status';
|
|
660
680
|
declare const tailwindcssPatchCommands: TailwindcssPatchCommand[];
|
|
661
|
-
declare const VALIDATE_EXIT_CODES: {
|
|
662
|
-
readonly OK: 0;
|
|
663
|
-
readonly REPORT_INCOMPATIBLE: 21;
|
|
664
|
-
readonly MISSING_BACKUPS: 22;
|
|
665
|
-
readonly IO_ERROR: 23;
|
|
666
|
-
readonly UNKNOWN_ERROR: 24;
|
|
667
|
-
};
|
|
668
|
-
declare const VALIDATE_FAILURE_REASONS: readonly ["report-incompatible", "missing-backups", "io-error", "unknown-error"];
|
|
669
|
-
type ValidateFailureReason = (typeof VALIDATE_FAILURE_REASONS)[number];
|
|
670
|
-
interface ValidateFailureSummary {
|
|
671
|
-
reason: ValidateFailureReason;
|
|
672
|
-
exitCode: number;
|
|
673
|
-
message: string;
|
|
674
|
-
}
|
|
675
|
-
interface ValidateJsonSuccessPayload extends RestoreConfigFilesResult {
|
|
676
|
-
ok: true;
|
|
677
|
-
}
|
|
678
|
-
interface ValidateJsonFailurePayload {
|
|
679
|
-
ok: false;
|
|
680
|
-
reason: ValidateFailureReason;
|
|
681
|
-
exitCode: number;
|
|
682
|
-
message: string;
|
|
683
|
-
}
|
|
684
|
-
declare class ValidateCommandError extends Error {
|
|
685
|
-
reason: ValidateFailureReason;
|
|
686
|
-
exitCode: number;
|
|
687
|
-
constructor(summary: ValidateFailureSummary, options?: ErrorOptions);
|
|
688
|
-
}
|
|
689
|
-
type TokenOutputFormat = 'json' | 'lines' | 'grouped-json';
|
|
690
|
-
type TokenGroupKey = 'relative' | 'absolute';
|
|
691
681
|
type CacOptionConfig = Parameters<Command['option']>[2];
|
|
692
682
|
interface TailwindcssPatchCommandOptionDefinition {
|
|
693
683
|
flags: string;
|
|
@@ -773,7 +763,7 @@ interface TailwindcssPatchCommandContext<TCommand extends TailwindcssPatchComman
|
|
|
773
763
|
args: TailwindcssPatchCommandArgMap[TCommand];
|
|
774
764
|
cwd: string;
|
|
775
765
|
logger: typeof logger;
|
|
776
|
-
loadConfig: () =>
|
|
766
|
+
loadConfig: () => Promise<TailwindcssConfigResult>;
|
|
777
767
|
loadPatchOptions: (overrides?: TailwindcssPatchOptions) => Promise<TailwindcssPatchOptions>;
|
|
778
768
|
createPatcher: (overrides?: TailwindcssPatchOptions) => Promise<TailwindcssPatcher>;
|
|
779
769
|
}
|
|
@@ -791,17 +781,41 @@ interface TailwindcssPatchCliOptions {
|
|
|
791
781
|
name?: string;
|
|
792
782
|
mountOptions?: TailwindcssPatchCliMountOptions;
|
|
793
783
|
}
|
|
784
|
+
|
|
785
|
+
declare const VALIDATE_EXIT_CODES: {
|
|
786
|
+
readonly OK: 0;
|
|
787
|
+
readonly REPORT_INCOMPATIBLE: 21;
|
|
788
|
+
readonly MISSING_BACKUPS: 22;
|
|
789
|
+
readonly IO_ERROR: 23;
|
|
790
|
+
readonly UNKNOWN_ERROR: 24;
|
|
791
|
+
};
|
|
792
|
+
declare const VALIDATE_FAILURE_REASONS: readonly ["report-incompatible", "missing-backups", "io-error", "unknown-error"];
|
|
793
|
+
type ValidateFailureReason = (typeof VALIDATE_FAILURE_REASONS)[number];
|
|
794
|
+
interface ValidateFailureSummary {
|
|
795
|
+
reason: ValidateFailureReason;
|
|
796
|
+
exitCode: number;
|
|
797
|
+
message: string;
|
|
798
|
+
}
|
|
799
|
+
interface ValidateJsonSuccessPayload extends RestoreConfigFilesResult {
|
|
800
|
+
ok: true;
|
|
801
|
+
}
|
|
802
|
+
interface ValidateJsonFailurePayload {
|
|
803
|
+
ok: false;
|
|
804
|
+
reason: ValidateFailureReason;
|
|
805
|
+
exitCode: number;
|
|
806
|
+
message: string;
|
|
807
|
+
}
|
|
808
|
+
declare class ValidateCommandError extends Error {
|
|
809
|
+
reason: ValidateFailureReason;
|
|
810
|
+
exitCode: number;
|
|
811
|
+
constructor(summary: ValidateFailureSummary, options?: ErrorOptions);
|
|
812
|
+
}
|
|
813
|
+
|
|
794
814
|
declare function mountTailwindcssPatchCommands(cli: CAC, options?: TailwindcssPatchCliMountOptions): CAC;
|
|
795
815
|
declare function createTailwindcssPatchCli(options?: TailwindcssPatchCliOptions): CAC;
|
|
796
816
|
|
|
797
|
-
declare function
|
|
798
|
-
|
|
799
|
-
interface PatchStatusContext {
|
|
800
|
-
packageInfo: PackageInfo;
|
|
801
|
-
options: NormalizedTailwindcssPatchOptions;
|
|
802
|
-
majorVersion: 2 | 3 | 4;
|
|
803
|
-
}
|
|
804
|
-
declare function getPatchStatusReport(context: PatchStatusContext): PatchStatusReport;
|
|
817
|
+
declare function migrateConfigFiles(options: MigrateConfigFilesOptions): Promise<ConfigFileMigrationReport>;
|
|
818
|
+
declare function restoreConfigFiles(options: RestoreConfigFilesOptions): Promise<RestoreConfigFilesResult>;
|
|
805
819
|
|
|
806
820
|
declare function collectClassesFromContexts(contexts: TailwindcssRuntimeContext[], filter: (className: string) => boolean): Set<string>;
|
|
807
821
|
declare function collectClassesFromTailwindV4(options: NormalizedTailwindcssPatchOptions): Promise<Set<string>>;
|
|
@@ -816,4 +830,11 @@ interface TailwindBuildOptions {
|
|
|
816
830
|
}
|
|
817
831
|
declare function runTailwindBuild(options: TailwindBuildOptions): Promise<postcss.Result<postcss.Root>>;
|
|
818
832
|
|
|
819
|
-
|
|
833
|
+
interface PatchStatusContext {
|
|
834
|
+
packageInfo: PackageInfo;
|
|
835
|
+
options: NormalizedTailwindcssPatchOptions;
|
|
836
|
+
majorVersion: 2 | 3 | 4;
|
|
837
|
+
}
|
|
838
|
+
declare function getPatchStatusReport(context: PatchStatusContext): PatchStatusReport;
|
|
839
|
+
|
|
840
|
+
export { type CacheClearOptions, type CacheClearResult, type CacheClearScope, type CacheContextMetadata, type CacheReadMeta, CacheStore, type CacheStrategy, type ConfigFileMigrationEntry, type ConfigFileMigrationReport, type ExtractResult, type ILengthUnitsPatchOptions, type LegacyTailwindcssPatcherOptions, MIGRATION_REPORT_KIND, MIGRATION_REPORT_SCHEMA_VERSION, type MigrateConfigFilesOptions, type NormalizedTailwindcssPatchOptions, type PatchCheckStatus, type PatchName, type PatchStatusEntry, type PatchStatusReport, type RestoreConfigFilesOptions, type RestoreConfigFilesResult, type TailwindPatchRuntime, type TailwindTokenByFileMap, type TailwindTokenFileKey, type TailwindTokenLocation, type TailwindTokenReport, type TailwindcssClassCache, type TailwindcssPatchCliMountOptions, type TailwindcssPatchCliOptions, type TailwindcssPatchCommand, type TailwindcssPatchCommandContext, type TailwindcssPatchCommandHandler, type TailwindcssPatchCommandHandlerMap, type TailwindcssPatchCommandOptionDefinition, type TailwindcssPatchCommandOptions, type TailwindcssPatchOptions, TailwindcssPatcher, type TailwindcssRuntimeContext, VALIDATE_EXIT_CODES, VALIDATE_FAILURE_REASONS, ValidateCommandError, type ValidateFailureReason, type ValidateFailureSummary, type ValidateJsonFailurePayload, type ValidateJsonSuccessPayload, collectClassesFromContexts, collectClassesFromTailwindV4, createTailwindcssPatchCli, extractProjectCandidatesWithPositions, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, getPatchStatusReport, groupTokensByFile, loadRuntimeContexts, logger, migrateConfigFiles, mountTailwindcssPatchCommands, normalizeOptions, restoreConfigFiles, runTailwindBuild, tailwindcssPatchCommands };
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkZXW4S356js = require('./chunk-ZXW4S356.js');
|
|
27
|
+
require('./chunk-5CWNAWKP.js');
|
|
27
28
|
|
|
28
29
|
// src/index.ts
|
|
29
30
|
var _config = require('@tailwindcss-mangle/config');
|
|
@@ -53,4 +54,4 @@ var _config = require('@tailwindcss-mangle/config');
|
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
|
|
56
|
-
exports.CacheStore =
|
|
57
|
+
exports.CacheStore = _chunkZXW4S356js.CacheStore; exports.MIGRATION_REPORT_KIND = _chunkZXW4S356js.MIGRATION_REPORT_KIND; exports.MIGRATION_REPORT_SCHEMA_VERSION = _chunkZXW4S356js.MIGRATION_REPORT_SCHEMA_VERSION; exports.TailwindcssPatcher = _chunkZXW4S356js.TailwindcssPatcher; exports.VALIDATE_EXIT_CODES = _chunkZXW4S356js.VALIDATE_EXIT_CODES; exports.VALIDATE_FAILURE_REASONS = _chunkZXW4S356js.VALIDATE_FAILURE_REASONS; exports.ValidateCommandError = _chunkZXW4S356js.ValidateCommandError; exports.collectClassesFromContexts = _chunkZXW4S356js.collectClassesFromContexts; exports.collectClassesFromTailwindV4 = _chunkZXW4S356js.collectClassesFromTailwindV4; exports.createTailwindcssPatchCli = _chunkZXW4S356js.createTailwindcssPatchCli; exports.defineConfig = _config.defineConfig; exports.extractProjectCandidatesWithPositions = _chunkZXW4S356js.extractProjectCandidatesWithPositions; exports.extractRawCandidates = _chunkZXW4S356js.extractRawCandidates; exports.extractRawCandidatesWithPositions = _chunkZXW4S356js.extractRawCandidatesWithPositions; exports.extractValidCandidates = _chunkZXW4S356js.extractValidCandidates; exports.getPatchStatusReport = _chunkZXW4S356js.getPatchStatusReport; exports.groupTokensByFile = _chunkZXW4S356js.groupTokensByFile; exports.loadRuntimeContexts = _chunkZXW4S356js.loadRuntimeContexts; exports.logger = _chunkZXW4S356js.logger_default; exports.migrateConfigFiles = _chunkZXW4S356js.migrateConfigFiles; exports.mountTailwindcssPatchCommands = _chunkZXW4S356js.mountTailwindcssPatchCommands; exports.normalizeOptions = _chunkZXW4S356js.normalizeOptions; exports.restoreConfigFiles = _chunkZXW4S356js.restoreConfigFiles; exports.runTailwindBuild = _chunkZXW4S356js.runTailwindBuild; exports.tailwindcssPatchCommands = _chunkZXW4S356js.tailwindcssPatchCommands;
|
package/dist/index.mjs
CHANGED
|
@@ -23,7 +23,8 @@ import {
|
|
|
23
23
|
restoreConfigFiles,
|
|
24
24
|
runTailwindBuild,
|
|
25
25
|
tailwindcssPatchCommands
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6ZDYMYHE.mjs";
|
|
27
|
+
import "./chunk-A67ABH3M.mjs";
|
|
27
28
|
|
|
28
29
|
// src/index.ts
|
|
29
30
|
import { defineConfig } from "@tailwindcss-mangle/config";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-patch",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.4-alpha.0",
|
|
4
4
|
"description": "patch tailwindcss for exposing context and extract classes",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
"@babel/traverse": "^7.29.0",
|
|
60
60
|
"@babel/types": "^7.29.0",
|
|
61
61
|
"@tailwindcss/node": "^4.2.1",
|
|
62
|
-
"cac": "^
|
|
62
|
+
"cac": "^7.0.0",
|
|
63
63
|
"consola": "^3.4.2",
|
|
64
|
-
"fs-extra": "^11.3.
|
|
64
|
+
"fs-extra": "^11.3.4",
|
|
65
65
|
"local-pkg": "^1.1.2",
|
|
66
66
|
"pathe": "^2.0.3",
|
|
67
|
-
"postcss": "^8.5.
|
|
67
|
+
"postcss": "^8.5.8",
|
|
68
68
|
"semver": "^7.7.4",
|
|
69
69
|
"tailwindcss-config": "^1.1.4",
|
|
70
|
-
"@tailwindcss-mangle/config": "6.1.
|
|
70
|
+
"@tailwindcss-mangle/config": "6.1.4-alpha.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@tailwindcss/oxide": "^4.2.1",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"build": "tsup",
|
|
83
83
|
"test": "vitest run",
|
|
84
84
|
"test:dev": "vitest",
|
|
85
|
+
"bench:cold-start": "node --import tsx bench/cold-start.ts",
|
|
85
86
|
"patch": "tsx dev/bin.ts install",
|
|
86
87
|
"r0": "tsx dev/bin.ts extract",
|
|
87
88
|
"r1": "tsx dev/bin.ts extract --css index.css"
|