@csszyx/unplugin 0.15.0 → 0.15.2
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 +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -4
- package/dist/next-prebuild.cjs +4 -4
- package/dist/next-prebuild.d.cts +2 -2
- package/dist/next-prebuild.d.mts +2 -2
- package/dist/next-prebuild.mjs +4 -4
- package/dist/next-turbo-loader.cjs +5 -5
- package/dist/next-turbo-loader.d.cts +1 -1
- package/dist/next-turbo-loader.d.mts +1 -1
- package/dist/next-turbo-loader.mjs +5 -5
- package/dist/next-watcher.cjs +2 -2
- package/dist/next-watcher.d.cts +2 -2
- package/dist/next-watcher.d.mts +2 -2
- package/dist/next-watcher.mjs +2 -2
- package/dist/shared/{unplugin.C2ilavL1.d.cts → unplugin.BGog1Bib.d.cts} +7 -6
- package/dist/shared/{unplugin.C2ilavL1.d.mts → unplugin.BGog1Bib.d.mts} +7 -6
- package/dist/shared/{unplugin.DmCOQc-b.mjs → unplugin.BLptVbUe.mjs} +1 -46
- package/dist/shared/{unplugin.BHfqCocB.d.cts → unplugin.BT7PqYuK.d.cts} +1 -1
- package/dist/shared/{unplugin.BHfqCocB.d.mts → unplugin.BT7PqYuK.d.mts} +1 -1
- package/dist/shared/{unplugin.Dai5wlZ3.cjs → unplugin.BWnmKv07.cjs} +7 -52
- package/dist/shared/{unplugin.AGR7mihU.mjs → unplugin.Bk9o8_RZ.mjs} +1 -1
- package/dist/shared/{unplugin.BGufkSFT.mjs → unplugin.BxsTa17g.mjs} +67 -15
- package/dist/shared/{unplugin.DX3rYT4P.cjs → unplugin.BzF0V2kw.cjs} +1 -1
- package/dist/shared/{unplugin.CXCaQ3-s.d.cts → unplugin.COlI0dJs.d.mts} +1 -1
- package/dist/shared/{unplugin.Dbc26ty6.mjs → unplugin.DAzgbtuZ.mjs} +2 -2
- package/dist/shared/{unplugin.KnDCM-sr.cjs → unplugin.DDSWQJYX.cjs} +48 -0
- package/dist/shared/{unplugin.CqJS0BbD.mjs → unplugin.DH_ij6cf.mjs} +48 -1
- package/dist/shared/{unplugin.BourSpnZ.mjs → unplugin.DK0b4fr7.mjs} +1 -1
- package/dist/shared/{unplugin.C7i0agiO.cjs → unplugin.J6ue_lRJ.cjs} +1 -1
- package/dist/shared/{unplugin.BLbrShMZ.cjs → unplugin.dz3AdzsO.cjs} +68 -16
- package/dist/shared/{unplugin.BbBYWFGT.cjs → unplugin.gksolKh2.cjs} +2 -2
- package/dist/shared/{unplugin.CbNydVwv.d.mts → unplugin.rWOMecQs.d.cts} +1 -1
- package/dist/vite.cjs +4 -4
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +4 -4
- package/dist/webpack.cjs +4 -4
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +4 -4
- package/package.json +16 -16
package/dist/index.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const cssMangler = require('./css-mangler.cjs');
|
|
6
|
-
const unplugin = require('./shared/unplugin.
|
|
7
|
-
const themeGroupsFile = require('./shared/unplugin.
|
|
6
|
+
const unplugin = require('./shared/unplugin.dz3AdzsO.cjs');
|
|
7
|
+
const themeGroupsFile = require('./shared/unplugin.J6ue_lRJ.cjs');
|
|
8
8
|
const types = require('@csszyx/types');
|
|
9
|
-
const safelistSource = require('./shared/unplugin.
|
|
9
|
+
const safelistSource = require('./shared/unplugin.DDSWQJYX.cjs');
|
|
10
10
|
require('postcss');
|
|
11
11
|
require('postcss-selector-parser');
|
|
12
12
|
require('node:crypto');
|
|
@@ -21,7 +21,7 @@ require('@csszyx/core/native');
|
|
|
21
21
|
require('@csszyx/svelte-adapter');
|
|
22
22
|
require('@csszyx/vue-adapter');
|
|
23
23
|
require('unplugin');
|
|
24
|
-
require('./shared/unplugin.
|
|
24
|
+
require('./shared/unplugin.BzF0V2kw.cjs');
|
|
25
25
|
require('node:zlib');
|
|
26
26
|
require('postcss-value-parser');
|
|
27
27
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { CSSManglerOptions, CSSManglerResult, MangleMap, createPostCSSPlugin, escapeCSSClassName, mangleCSS, mangleCSSSync, unescapeTailwindClass } from './css-mangler.cjs';
|
|
2
2
|
export { CSSZYX_GLOBAL_ALIAS_PREFIX, TAILWIND_RESERVED_PREFIXES } from '@csszyx/types';
|
|
3
|
-
import { G as GlobalVarScanCacheKeyInput, C as CssVarScanResult, S as ScanGlobalVarCssOptions, P as PlanGlobalVarAliasesInput, a as GlobalVarAliasPlan, R as RewriteGlobalVarCssAliasesOptions, b as GlobalVarCssAliasRewriteResult, c as CreateGlobalVarAliasValidationOptionsInput, V as ValidateGlobalVarAliasInputsOptions, d as GlobalVarAliasValidationResult } from './shared/unplugin.
|
|
3
|
+
import { G as GlobalVarScanCacheKeyInput, C as CssVarScanResult, S as ScanGlobalVarCssOptions, P as PlanGlobalVarAliasesInput, a as GlobalVarAliasPlan, R as RewriteGlobalVarCssAliasesOptions, b as GlobalVarCssAliasRewriteResult, c as CreateGlobalVarAliasValidationOptionsInput, V as ValidateGlobalVarAliasInputsOptions, d as GlobalVarAliasValidationResult } from './shared/unplugin.BT7PqYuK.cjs';
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
export = undefined;
|
|
6
|
-
export { e as CssVarDefinition, f as CssVarLocation, g as CssVarReference, h as GlobalVarAliasDiagnostic, i as GlobalVarAliasDiagnosticSeverity, j as GlobalVarAliasEntry, k as GlobalVarCodeSource, l as GlobalVarCssAssetSource, m as GlobalVarCssSource, n as GlobalVarScanCacheEntry, M as MangleHybridHazards, o as ParsedTheme, p as ParsedUtilities, Q as QuietMode, q as RSCBoundaryViolation, r as RSCModuleRecord, s as allocateMangleTokens, t as assertNoRSCBoundaryViolation, u as assertNoRSCGraphViolation, v as collectMangleHybridHazards, w as createGlobalVarMapAssetSource, x as createRSCModuleRecord, y as cssHasContentScope, A as deleteRSCModuleRecord, B as emitMissingCssFallback, D as esbuildPlugin, E as extractGlobalVarAliasesForManifest, F as fileMayContainSafelistableSz, H as findLocalImportSources, I as findRSCBoundaryViolation, J as findRSCGraphViolation, K as hasInjectableTailwindCandidate, L as hasTokens, N as hasUseClientDirective, O as hasUseServerDirective, T as isAdvisoryDiagnostic, U as isCompileSourceOptedIn, W as isHardIgnoredPath, X as isMangleableCssId, Y as isMonorepoPackage, Z as isPackagesSkippedSource, _ as isRSCServerModule, $ as lateMangleCensusMessage, a0 as mangleCodeClassesSync, a1 as mangleEligibleClasses, a2 as mangleHybridHazardMessage, a3 as mergeThemes, a4 as missingTailwindEntryMessage, a5 as normalizeGlobalVarAliasesForCache, a6 as parseThemeBlocks, a7 as parseUtilityBlocks, a8 as realContentHashDisabledMessage, a9 as recordGlobalVarSourceFile, aa as resolveCompileSourceDirs, ab as resolveNativeCacheIdentity, ac as resolveQuietMode, ad as rollupPlugin, ae as scanCustomPropertyNames, af as shouldEmitMissingCssFallback, ag as shouldEmitWarning, ah as shouldTrackGlobalVarSources, ai as shouldWarnMissingTailwindEntry, aj as shouldWarnUnscopedMonorepo, ak as skippedSzFilesMessage, al as suppressedAdvisoryMessage, z as unplugin, am as unscopedMonorepoMessage, an as vitePlugin, ao as watchModeMangleMessage, ap as webpackPlugin } from './shared/unplugin.
|
|
6
|
+
export { e as CssVarDefinition, f as CssVarLocation, g as CssVarReference, h as GlobalVarAliasDiagnostic, i as GlobalVarAliasDiagnosticSeverity, j as GlobalVarAliasEntry, k as GlobalVarCodeSource, l as GlobalVarCssAssetSource, m as GlobalVarCssSource, n as GlobalVarScanCacheEntry, M as MangleHybridHazards, o as ParsedTheme, p as ParsedUtilities, Q as QuietMode, q as RSCBoundaryViolation, r as RSCModuleRecord, s as allocateMangleTokens, t as assertNoRSCBoundaryViolation, u as assertNoRSCGraphViolation, v as collectMangleHybridHazards, w as createGlobalVarMapAssetSource, x as createRSCModuleRecord, y as cssHasContentScope, A as deleteRSCModuleRecord, B as emitMissingCssFallback, D as esbuildPlugin, E as extractGlobalVarAliasesForManifest, F as fileMayContainSafelistableSz, H as findLocalImportSources, I as findRSCBoundaryViolation, J as findRSCGraphViolation, K as hasInjectableTailwindCandidate, L as hasTokens, N as hasUseClientDirective, O as hasUseServerDirective, T as isAdvisoryDiagnostic, U as isCompileSourceOptedIn, W as isHardIgnoredPath, X as isMangleableCssId, Y as isMonorepoPackage, Z as isPackagesSkippedSource, _ as isRSCServerModule, $ as lateMangleCensusMessage, a0 as mangleCodeClassesSync, a1 as mangleEligibleClasses, a2 as mangleHybridHazardMessage, a3 as mergeThemes, a4 as missingTailwindEntryMessage, a5 as normalizeGlobalVarAliasesForCache, a6 as parseThemeBlocks, a7 as parseUtilityBlocks, a8 as realContentHashDisabledMessage, a9 as recordGlobalVarSourceFile, aa as resolveCompileSourceDirs, ab as resolveNativeCacheIdentity, ac as resolveQuietMode, ad as rollupPlugin, ae as scanCustomPropertyNames, af as shouldEmitMissingCssFallback, ag as shouldEmitWarning, ah as shouldTrackGlobalVarSources, ai as shouldWarnMissingTailwindEntry, aj as shouldWarnUnscopedMonorepo, ak as skippedSzFilesMessage, al as suppressedAdvisoryMessage, z as unplugin, am as unscopedMonorepoMessage, an as vitePlugin, ao as watchModeMangleMessage, ap as webpackPlugin } from './shared/unplugin.BT7PqYuK.cjs';
|
|
7
7
|
import 'postcss';
|
|
8
8
|
import '@csszyx/compiler';
|
|
9
9
|
import 'esbuild';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CSSManglerOptions, CSSManglerResult, MangleMap, createPostCSSPlugin, escapeCSSClassName, mangleCSS, mangleCSSSync, unescapeTailwindClass } from './css-mangler.mjs';
|
|
2
2
|
export { CSSZYX_GLOBAL_ALIAS_PREFIX, TAILWIND_RESERVED_PREFIXES } from '@csszyx/types';
|
|
3
|
-
import { G as GlobalVarScanCacheKeyInput, C as CssVarScanResult, S as ScanGlobalVarCssOptions, P as PlanGlobalVarAliasesInput, a as GlobalVarAliasPlan, R as RewriteGlobalVarCssAliasesOptions, b as GlobalVarCssAliasRewriteResult, c as CreateGlobalVarAliasValidationOptionsInput, V as ValidateGlobalVarAliasInputsOptions, d as GlobalVarAliasValidationResult } from './shared/unplugin.
|
|
4
|
-
export { e as CssVarDefinition, f as CssVarLocation, g as CssVarReference, h as GlobalVarAliasDiagnostic, i as GlobalVarAliasDiagnosticSeverity, j as GlobalVarAliasEntry, k as GlobalVarCodeSource, l as GlobalVarCssAssetSource, m as GlobalVarCssSource, n as GlobalVarScanCacheEntry, M as MangleHybridHazards, o as ParsedTheme, p as ParsedUtilities, Q as QuietMode, q as RSCBoundaryViolation, r as RSCModuleRecord, s as allocateMangleTokens, t as assertNoRSCBoundaryViolation, u as assertNoRSCGraphViolation, v as collectMangleHybridHazards, w as createGlobalVarMapAssetSource, x as createRSCModuleRecord, y as cssHasContentScope, z as default, A as deleteRSCModuleRecord, B as emitMissingCssFallback, D as esbuildPlugin, E as extractGlobalVarAliasesForManifest, F as fileMayContainSafelistableSz, H as findLocalImportSources, I as findRSCBoundaryViolation, J as findRSCGraphViolation, K as hasInjectableTailwindCandidate, L as hasTokens, N as hasUseClientDirective, O as hasUseServerDirective, T as isAdvisoryDiagnostic, U as isCompileSourceOptedIn, W as isHardIgnoredPath, X as isMangleableCssId, Y as isMonorepoPackage, Z as isPackagesSkippedSource, _ as isRSCServerModule, $ as lateMangleCensusMessage, a0 as mangleCodeClassesSync, a1 as mangleEligibleClasses, a2 as mangleHybridHazardMessage, a3 as mergeThemes, a4 as missingTailwindEntryMessage, a5 as normalizeGlobalVarAliasesForCache, a6 as parseThemeBlocks, a7 as parseUtilityBlocks, a8 as realContentHashDisabledMessage, a9 as recordGlobalVarSourceFile, aa as resolveCompileSourceDirs, ab as resolveNativeCacheIdentity, ac as resolveQuietMode, ad as rollupPlugin, ae as scanCustomPropertyNames, af as shouldEmitMissingCssFallback, ag as shouldEmitWarning, ah as shouldTrackGlobalVarSources, ai as shouldWarnMissingTailwindEntry, aj as shouldWarnUnscopedMonorepo, ak as skippedSzFilesMessage, al as suppressedAdvisoryMessage, z as unplugin, am as unscopedMonorepoMessage, an as vitePlugin, ao as watchModeMangleMessage, ap as webpackPlugin } from './shared/unplugin.
|
|
3
|
+
import { G as GlobalVarScanCacheKeyInput, C as CssVarScanResult, S as ScanGlobalVarCssOptions, P as PlanGlobalVarAliasesInput, a as GlobalVarAliasPlan, R as RewriteGlobalVarCssAliasesOptions, b as GlobalVarCssAliasRewriteResult, c as CreateGlobalVarAliasValidationOptionsInput, V as ValidateGlobalVarAliasInputsOptions, d as GlobalVarAliasValidationResult } from './shared/unplugin.BT7PqYuK.mjs';
|
|
4
|
+
export { e as CssVarDefinition, f as CssVarLocation, g as CssVarReference, h as GlobalVarAliasDiagnostic, i as GlobalVarAliasDiagnosticSeverity, j as GlobalVarAliasEntry, k as GlobalVarCodeSource, l as GlobalVarCssAssetSource, m as GlobalVarCssSource, n as GlobalVarScanCacheEntry, M as MangleHybridHazards, o as ParsedTheme, p as ParsedUtilities, Q as QuietMode, q as RSCBoundaryViolation, r as RSCModuleRecord, s as allocateMangleTokens, t as assertNoRSCBoundaryViolation, u as assertNoRSCGraphViolation, v as collectMangleHybridHazards, w as createGlobalVarMapAssetSource, x as createRSCModuleRecord, y as cssHasContentScope, z as default, A as deleteRSCModuleRecord, B as emitMissingCssFallback, D as esbuildPlugin, E as extractGlobalVarAliasesForManifest, F as fileMayContainSafelistableSz, H as findLocalImportSources, I as findRSCBoundaryViolation, J as findRSCGraphViolation, K as hasInjectableTailwindCandidate, L as hasTokens, N as hasUseClientDirective, O as hasUseServerDirective, T as isAdvisoryDiagnostic, U as isCompileSourceOptedIn, W as isHardIgnoredPath, X as isMangleableCssId, Y as isMonorepoPackage, Z as isPackagesSkippedSource, _ as isRSCServerModule, $ as lateMangleCensusMessage, a0 as mangleCodeClassesSync, a1 as mangleEligibleClasses, a2 as mangleHybridHazardMessage, a3 as mergeThemes, a4 as missingTailwindEntryMessage, a5 as normalizeGlobalVarAliasesForCache, a6 as parseThemeBlocks, a7 as parseUtilityBlocks, a8 as realContentHashDisabledMessage, a9 as recordGlobalVarSourceFile, aa as resolveCompileSourceDirs, ab as resolveNativeCacheIdentity, ac as resolveQuietMode, ad as rollupPlugin, ae as scanCustomPropertyNames, af as shouldEmitMissingCssFallback, ag as shouldEmitWarning, ah as shouldTrackGlobalVarSources, ai as shouldWarnMissingTailwindEntry, aj as shouldWarnUnscopedMonorepo, ak as skippedSzFilesMessage, al as suppressedAdvisoryMessage, z as unplugin, am as unscopedMonorepoMessage, an as vitePlugin, ao as watchModeMangleMessage, ap as webpackPlugin } from './shared/unplugin.BT7PqYuK.mjs';
|
|
5
5
|
import 'postcss';
|
|
6
6
|
import '@csszyx/compiler';
|
|
7
7
|
import 'esbuild';
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { createPostCSSPlugin, escapeCSSClassName, mangleCSS, mangleCSSSync, unescapeTailwindClass } from './css-mangler.mjs';
|
|
2
|
-
export { a as allocateMangleTokens, b as assertNoRSCBoundaryViolation, c as assertNoRSCGraphViolation, d as collectMangleHybridHazards, e as createGlobalVarAliasValidationOptions, f as createGlobalVarMapAssetSource, g as createGlobalVarScanCacheKey, h as createRSCModuleRecord, i as cssHasContentScope, u as default, j as deleteRSCModuleRecord, k as emitMissingCssFallback, l as esbuildPlugin, m as extractGlobalVarAliasesForManifest, n as fileMayContainSafelistableSz, o as findLocalImportSources, p as findRSCBoundaryViolation, q as findRSCGraphViolation, r as hasInjectableTailwindCandidate, s as hasUseClientDirective, t as hasUseServerDirective, v as isAdvisoryDiagnostic, w as isCompileSourceOptedIn, x as isHardIgnoredPath, y as isMangleableCssId, z as isMonorepoPackage, A as isPackagesSkippedSource, B as isRSCServerModule, C as isTailwindReservedGlobalVar, D as lateMangleCensusMessage, E as mangleCodeClassesSync, F as mangleEligibleClasses, G as mangleHybridHazardMessage, H as missingTailwindEntryMessage, I as normalizeGlobalVarAliasesForCache, J as planGlobalVarAliases, K as readGlobalVarScanCache, L as realContentHashDisabledMessage, M as recordGlobalVarSourceFile, N as resolveCompileSourceDirs, O as resolveGlobalVarScanCacheDir, P as resolveNativeCacheIdentity, Q as resolveQuietMode, R as rewriteGlobalVarCssAliases, S as rollupPlugin, T as scanGlobalVarCss, U as shouldEmitMissingCssFallback, V as shouldEmitWarning, W as shouldTrackGlobalVarSources, X as shouldWarnMissingTailwindEntry, Y as shouldWarnUnscopedMonorepo, Z as skippedSzFilesMessage, _ as suppressedAdvisoryMessage, u as unplugin, $ as unscopedMonorepoMessage, a0 as validateGlobalVarAliasInputs, a1 as vitePlugin, a2 as watchModeMangleMessage, a3 as webpackPlugin, a4 as writeGlobalVarScanCache } from './shared/unplugin.
|
|
3
|
-
export { h as hasTokens, m as mergeThemes, p as parseThemeBlocks, a as parseUtilityBlocks, s as scanCustomPropertyNames } from './shared/unplugin.
|
|
2
|
+
export { a as allocateMangleTokens, b as assertNoRSCBoundaryViolation, c as assertNoRSCGraphViolation, d as collectMangleHybridHazards, e as createGlobalVarAliasValidationOptions, f as createGlobalVarMapAssetSource, g as createGlobalVarScanCacheKey, h as createRSCModuleRecord, i as cssHasContentScope, u as default, j as deleteRSCModuleRecord, k as emitMissingCssFallback, l as esbuildPlugin, m as extractGlobalVarAliasesForManifest, n as fileMayContainSafelistableSz, o as findLocalImportSources, p as findRSCBoundaryViolation, q as findRSCGraphViolation, r as hasInjectableTailwindCandidate, s as hasUseClientDirective, t as hasUseServerDirective, v as isAdvisoryDiagnostic, w as isCompileSourceOptedIn, x as isHardIgnoredPath, y as isMangleableCssId, z as isMonorepoPackage, A as isPackagesSkippedSource, B as isRSCServerModule, C as isTailwindReservedGlobalVar, D as lateMangleCensusMessage, E as mangleCodeClassesSync, F as mangleEligibleClasses, G as mangleHybridHazardMessage, H as missingTailwindEntryMessage, I as normalizeGlobalVarAliasesForCache, J as planGlobalVarAliases, K as readGlobalVarScanCache, L as realContentHashDisabledMessage, M as recordGlobalVarSourceFile, N as resolveCompileSourceDirs, O as resolveGlobalVarScanCacheDir, P as resolveNativeCacheIdentity, Q as resolveQuietMode, R as rewriteGlobalVarCssAliases, S as rollupPlugin, T as scanGlobalVarCss, U as shouldEmitMissingCssFallback, V as shouldEmitWarning, W as shouldTrackGlobalVarSources, X as shouldWarnMissingTailwindEntry, Y as shouldWarnUnscopedMonorepo, Z as skippedSzFilesMessage, _ as suppressedAdvisoryMessage, u as unplugin, $ as unscopedMonorepoMessage, a0 as validateGlobalVarAliasInputs, a1 as vitePlugin, a2 as watchModeMangleMessage, a3 as webpackPlugin, a4 as writeGlobalVarScanCache } from './shared/unplugin.BxsTa17g.mjs';
|
|
3
|
+
export { h as hasTokens, m as mergeThemes, p as parseThemeBlocks, a as parseUtilityBlocks, s as scanCustomPropertyNames } from './shared/unplugin.DK0b4fr7.mjs';
|
|
4
4
|
export { CSSZYX_GLOBAL_ALIAS_PREFIX, TAILWIND_RESERVED_PREFIXES } from '@csszyx/types';
|
|
5
|
-
export { S as SAFELIST_FILE, a as appendTailwindSourceDirective, c as computeSafelistRelPath, b as cssImportsTailwind } from './shared/unplugin.
|
|
5
|
+
export { S as SAFELIST_FILE, a as appendTailwindSourceDirective, c as computeSafelistRelPath, b as cssImportsTailwind } from './shared/unplugin.DH_ij6cf.mjs';
|
|
6
6
|
import 'postcss';
|
|
7
7
|
import 'postcss-selector-parser';
|
|
8
8
|
import 'node:crypto';
|
|
@@ -17,6 +17,6 @@ import '@csszyx/core/native';
|
|
|
17
17
|
import '@csszyx/svelte-adapter';
|
|
18
18
|
import '@csszyx/vue-adapter';
|
|
19
19
|
import 'unplugin';
|
|
20
|
-
import './shared/unplugin.
|
|
20
|
+
import './shared/unplugin.Bk9o8_RZ.mjs';
|
|
21
21
|
import 'node:zlib';
|
|
22
22
|
import 'postcss-value-parser';
|
package/dist/next-prebuild.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
const node_crypto = require('node:crypto');
|
|
4
4
|
const fs = require('node:fs');
|
|
5
5
|
const path = require('node:path');
|
|
6
|
-
const nextTransformMetadata = require('./shared/unplugin.
|
|
7
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
8
|
-
const safelistSource = require('./shared/unplugin.
|
|
9
|
-
const transformCache = require('./shared/unplugin.
|
|
6
|
+
const nextTransformMetadata = require('./shared/unplugin.gksolKh2.cjs');
|
|
7
|
+
const nextWatcherCycle = require('./shared/unplugin.BWnmKv07.cjs');
|
|
8
|
+
const safelistSource = require('./shared/unplugin.DDSWQJYX.cjs');
|
|
9
|
+
const transformCache = require('./shared/unplugin.BzF0V2kw.cjs');
|
|
10
10
|
require('@csszyx/compiler');
|
|
11
11
|
require('@csszyx/types');
|
|
12
12
|
require('node:os');
|
package/dist/next-prebuild.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
|
-
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.
|
|
2
|
+
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.BGog1Bib.cjs';
|
|
3
3
|
import { N as NextSourceTransformOutput, a as NextSourceParserMode } from './shared/unplugin.B32Exn-K.cjs';
|
|
4
|
-
import { N as NextWatcherCycleResult } from './shared/unplugin.
|
|
4
|
+
import { N as NextWatcherCycleResult } from './shared/unplugin.rWOMecQs.cjs';
|
|
5
5
|
|
|
6
6
|
/** Serializable options accepted by the Next Turbopack csszyx prebuild core. */
|
|
7
7
|
interface NextPrebuildOptions {
|
package/dist/next-prebuild.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
|
-
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.
|
|
2
|
+
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.BGog1Bib.mjs';
|
|
3
3
|
import { N as NextSourceTransformOutput, a as NextSourceParserMode } from './shared/unplugin.B32Exn-K.mjs';
|
|
4
|
-
import { N as NextWatcherCycleResult } from './shared/unplugin.
|
|
4
|
+
import { N as NextWatcherCycleResult } from './shared/unplugin.COlI0dJs.mjs';
|
|
5
5
|
|
|
6
6
|
/** Serializable options accepted by the Next Turbopack csszyx prebuild core. */
|
|
7
7
|
interface NextPrebuildOptions {
|
package/dist/next-prebuild.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
|
-
import { r as readPackageVersion, c as configWithImportedStaticSz, a as resolveNextCrossModule, t as transformNextSource, w as withCrossModuleStatics, b as collectNextTransformMetadata, d as createNextSafelistShardFromMetadata } from './shared/unplugin.
|
|
5
|
-
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.
|
|
6
|
-
import { f as findPostcssConfigWithoutCsszyx, m as missingPostcssPluginMessage, n as normalizePathSeparators } from './shared/unplugin.
|
|
7
|
-
import { r as resolveTransformCacheDir } from './shared/unplugin.
|
|
4
|
+
import { r as readPackageVersion, c as configWithImportedStaticSz, a as resolveNextCrossModule, t as transformNextSource, w as withCrossModuleStatics, b as collectNextTransformMetadata, d as createNextSafelistShardFromMetadata } from './shared/unplugin.DAzgbtuZ.mjs';
|
|
5
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle } from './shared/unplugin.BLptVbUe.mjs';
|
|
6
|
+
import { f as findPostcssConfigWithoutCsszyx, m as missingPostcssPluginMessage, n as normalizePathSeparators } from './shared/unplugin.DH_ij6cf.mjs';
|
|
7
|
+
import { r as resolveTransformCacheDir } from './shared/unplugin.Bk9o8_RZ.mjs';
|
|
8
8
|
import '@csszyx/compiler';
|
|
9
9
|
import '@csszyx/types';
|
|
10
10
|
import 'node:os';
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const node_crypto = require('node:crypto');
|
|
6
6
|
const path = require('node:path');
|
|
7
|
-
const themeGroupsFile = require('./shared/unplugin.
|
|
8
|
-
const nextTransformMetadata = require('./shared/unplugin.
|
|
9
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
10
|
-
const safelistSource = require('./shared/unplugin.
|
|
11
|
-
const transformCache = require('./shared/unplugin.
|
|
7
|
+
const themeGroupsFile = require('./shared/unplugin.J6ue_lRJ.cjs');
|
|
8
|
+
const nextTransformMetadata = require('./shared/unplugin.gksolKh2.cjs');
|
|
9
|
+
const nextWatcherCycle = require('./shared/unplugin.BWnmKv07.cjs');
|
|
10
|
+
const safelistSource = require('./shared/unplugin.DDSWQJYX.cjs');
|
|
11
|
+
const transformCache = require('./shared/unplugin.BzF0V2kw.cjs');
|
|
12
12
|
require('node:fs');
|
|
13
13
|
require('@csszyx/compiler');
|
|
14
14
|
require('@csszyx/types');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
|
-
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.
|
|
2
|
+
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.BGog1Bib.cjs';
|
|
3
3
|
import { a as NextSourceParserMode, N as NextSourceTransformOutput } from './shared/unplugin.B32Exn-K.cjs';
|
|
4
4
|
|
|
5
5
|
/** Serializable options accepted by the Next Turbopack csszyx loader. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransformSourceCodeOptions } from '@csszyx/compiler';
|
|
2
|
-
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.
|
|
2
|
+
import { J as JsonLike, A as AtomicWriteOptions, N as NextStateContext } from './shared/unplugin.BGog1Bib.mjs';
|
|
3
3
|
import { a as NextSourceParserMode, N as NextSourceTransformOutput } from './shared/unplugin.B32Exn-K.mjs';
|
|
4
4
|
|
|
5
5
|
/** Serializable options accepted by the Next Turbopack csszyx loader. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
|
-
import { i as injectNextRuntimeImports, e as ensureThemeGroupsFile, b as insertAfterUseDirective, t as themeGroupsSpecifier } from './shared/unplugin.
|
|
4
|
-
import { r as readPackageVersion, c as configWithImportedStaticSz, a as resolveNextCrossModule, t as transformNextSource, w as withCrossModuleStatics, n as normalizeProviderPaths, b as collectNextTransformMetadata, d as createNextSafelistShardFromMetadata } from './shared/unplugin.
|
|
5
|
-
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle, N as NextSafelistStateLockedError, a as NEXT_WATCH_LOCK_COMMAND, v as validateNextGenerationManifest, b as readNextGenerationManifest } from './shared/unplugin.
|
|
6
|
-
import { n as normalizePathSeparators } from './shared/unplugin.
|
|
7
|
-
import { r as resolveTransformCacheDir } from './shared/unplugin.
|
|
3
|
+
import { i as injectNextRuntimeImports, e as ensureThemeGroupsFile, b as insertAfterUseDirective, t as themeGroupsSpecifier } from './shared/unplugin.DK0b4fr7.mjs';
|
|
4
|
+
import { r as readPackageVersion, c as configWithImportedStaticSz, a as resolveNextCrossModule, t as transformNextSource, w as withCrossModuleStatics, n as normalizeProviderPaths, b as collectNextTransformMetadata, d as createNextSafelistShardFromMetadata } from './shared/unplugin.DAzgbtuZ.mjs';
|
|
5
|
+
import { c as createNextStateContext, w as writeNextSafelistShard, r as runNextWatcherCycle, N as NextSafelistStateLockedError, a as NEXT_WATCH_LOCK_COMMAND, v as validateNextGenerationManifest, b as readNextGenerationManifest } from './shared/unplugin.BLptVbUe.mjs';
|
|
6
|
+
import { n as normalizePathSeparators } from './shared/unplugin.DH_ij6cf.mjs';
|
|
7
|
+
import { r as resolveTransformCacheDir } from './shared/unplugin.Bk9o8_RZ.mjs';
|
|
8
8
|
import 'node:fs';
|
|
9
9
|
import '@csszyx/compiler';
|
|
10
10
|
import '@csszyx/types';
|
package/dist/next-watcher.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const path = require('node:path');
|
|
4
|
-
const nextWatcherCycle = require('./shared/unplugin.
|
|
4
|
+
const nextWatcherCycle = require('./shared/unplugin.BWnmKv07.cjs');
|
|
5
5
|
require('node:fs');
|
|
6
|
+
require('./shared/unplugin.DDSWQJYX.cjs');
|
|
6
7
|
require('node:crypto');
|
|
7
8
|
require('node:os');
|
|
8
9
|
require('proper-lockfile');
|
|
9
|
-
require('./shared/unplugin.KnDCM-sr.cjs');
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceCompat(e) {
|
|
12
12
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
package/dist/next-watcher.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NextStateContext } from './shared/unplugin.
|
|
2
|
-
import { a as NextWatcherCycleOptions, N as NextWatcherCycleResult } from './shared/unplugin.
|
|
1
|
+
import { N as NextStateContext } from './shared/unplugin.BGog1Bib.cjs';
|
|
2
|
+
import { a as NextWatcherCycleOptions, N as NextWatcherCycleResult } from './shared/unplugin.rWOMecQs.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
package/dist/next-watcher.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NextStateContext } from './shared/unplugin.
|
|
2
|
-
import { a as NextWatcherCycleOptions, N as NextWatcherCycleResult } from './shared/unplugin.
|
|
1
|
+
import { N as NextStateContext } from './shared/unplugin.BGog1Bib.mjs';
|
|
2
|
+
import { a as NextWatcherCycleOptions, N as NextWatcherCycleResult } from './shared/unplugin.COlI0dJs.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
package/dist/next-watcher.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
|
-
import { r as runNextWatcherCycle } from './shared/unplugin.
|
|
2
|
+
import { r as runNextWatcherCycle } from './shared/unplugin.BLptVbUe.mjs';
|
|
3
3
|
import 'node:fs';
|
|
4
|
+
import './shared/unplugin.DH_ij6cf.mjs';
|
|
4
5
|
import 'node:crypto';
|
|
5
6
|
import 'node:os';
|
|
6
7
|
import 'proper-lockfile';
|
|
7
|
-
import './shared/unplugin.CqJS0BbD.mjs';
|
|
8
8
|
|
|
9
9
|
class NextWatcherLoop {
|
|
10
10
|
context;
|
|
@@ -9,6 +9,13 @@ interface NextCacheIdentity {
|
|
|
9
9
|
generation: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
/** Options for atomic file writes that need to survive Windows file scanners. */
|
|
13
|
+
interface AtomicWriteOptions {
|
|
14
|
+
maxRetries?: number;
|
|
15
|
+
retryDelayMs?: number;
|
|
16
|
+
renameSync?: (from: string, to: string) => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
12
19
|
/** Files used by the Next Turbopack safelist state machine. */
|
|
13
20
|
interface NextSafelistStatePaths {
|
|
14
21
|
/** Project root the safelist and cache live under. */
|
|
@@ -25,12 +32,6 @@ interface NextSafelistMaterializeResult {
|
|
|
25
32
|
tombstonedSourceCount: number;
|
|
26
33
|
shardCount: number;
|
|
27
34
|
}
|
|
28
|
-
/** Options for atomic file writes that need to survive Windows file scanners. */
|
|
29
|
-
interface AtomicWriteOptions {
|
|
30
|
-
maxRetries?: number;
|
|
31
|
-
retryDelayMs?: number;
|
|
32
|
-
renameSync?: (from: string, to: string) => void;
|
|
33
|
-
}
|
|
34
35
|
/** Options used when acquiring a state lock. */
|
|
35
36
|
interface NextSafelistStateLockOptions {
|
|
36
37
|
pid?: number;
|
|
@@ -9,6 +9,13 @@ interface NextCacheIdentity {
|
|
|
9
9
|
generation: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
/** Options for atomic file writes that need to survive Windows file scanners. */
|
|
13
|
+
interface AtomicWriteOptions {
|
|
14
|
+
maxRetries?: number;
|
|
15
|
+
retryDelayMs?: number;
|
|
16
|
+
renameSync?: (from: string, to: string) => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
12
19
|
/** Files used by the Next Turbopack safelist state machine. */
|
|
13
20
|
interface NextSafelistStatePaths {
|
|
14
21
|
/** Project root the safelist and cache live under. */
|
|
@@ -25,12 +32,6 @@ interface NextSafelistMaterializeResult {
|
|
|
25
32
|
tombstonedSourceCount: number;
|
|
26
33
|
shardCount: number;
|
|
27
34
|
}
|
|
28
|
-
/** Options for atomic file writes that need to survive Windows file scanners. */
|
|
29
|
-
interface AtomicWriteOptions {
|
|
30
|
-
maxRetries?: number;
|
|
31
|
-
retryDelayMs?: number;
|
|
32
|
-
renameSync?: (from: string, to: string) => void;
|
|
33
|
-
}
|
|
34
35
|
/** Options used when acquiring a state lock. */
|
|
35
36
|
interface NextSafelistStateLockOptions {
|
|
36
37
|
pid?: number;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
|
+
import { S as SAFELIST_FILE, d as atomicWriteFileSync, s as sortStrings, r as renderSafelistFile, e as removeLegacySafelists, g as assertNoLegacySourceStylesheet } from './unplugin.DH_ij6cf.mjs';
|
|
3
4
|
import { createHash, randomUUID } from 'node:crypto';
|
|
4
5
|
import { hostname } from 'node:os';
|
|
5
6
|
import lockfile from 'proper-lockfile';
|
|
6
|
-
import { S as SAFELIST_FILE, s as sortStrings, r as renderSafelistFile, d as removeLegacySafelists, e as assertNoLegacySourceStylesheet } from './unplugin.CqJS0BbD.mjs';
|
|
7
7
|
|
|
8
|
-
const DEFAULT_RENAME_RETRIES = 5;
|
|
9
|
-
const DEFAULT_RENAME_RETRY_DELAY_MS = 10;
|
|
10
8
|
const DEFAULT_STALE_LOCK_MS = 3e4;
|
|
11
9
|
const STALE_RECOVERY_DISABLED_MS = 2147483647;
|
|
12
10
|
function resolveNextSafelistStatePaths(rootDir, cacheDir = ".csszyx/cache", outputFile = SAFELIST_FILE) {
|
|
@@ -130,40 +128,6 @@ function acquireNextSafelistStateLock(lockPath, pidOrOptions = {}) {
|
|
|
130
128
|
}
|
|
131
129
|
};
|
|
132
130
|
}
|
|
133
|
-
function atomicWriteFileSync(file, content, options = {}) {
|
|
134
|
-
const dir = path.dirname(file);
|
|
135
|
-
const tmp = path.join(
|
|
136
|
-
dir,
|
|
137
|
-
`.tmp-${path.basename(file)}-${process.pid}-${Date.now()}-${randomUUID()}`
|
|
138
|
-
);
|
|
139
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
140
|
-
fs.writeFileSync(tmp, content, "utf8");
|
|
141
|
-
try {
|
|
142
|
-
atomicRenameWithRetry(tmp, file, options);
|
|
143
|
-
} catch (error) {
|
|
144
|
-
try {
|
|
145
|
-
fs.rmSync(tmp, { force: true });
|
|
146
|
-
} catch {
|
|
147
|
-
}
|
|
148
|
-
throw error;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
function atomicRenameWithRetry(from, to, options = {}) {
|
|
152
|
-
const maxRetries = options.maxRetries ?? DEFAULT_RENAME_RETRIES;
|
|
153
|
-
const retryDelayMs = options.retryDelayMs ?? DEFAULT_RENAME_RETRY_DELAY_MS;
|
|
154
|
-
const renameSync = options.renameSync ?? fs.renameSync;
|
|
155
|
-
for (let attempt = 0; ; attempt++) {
|
|
156
|
-
try {
|
|
157
|
-
renameSync(from, to);
|
|
158
|
-
return;
|
|
159
|
-
} catch (error) {
|
|
160
|
-
if (!isRetryableRenameError(error) || attempt >= maxRetries) {
|
|
161
|
-
throw error;
|
|
162
|
-
}
|
|
163
|
-
sleepSync(retryDelayMs);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
131
|
function isExistingShardEquivalent(filePath, shard) {
|
|
168
132
|
try {
|
|
169
133
|
const parsed = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
@@ -351,15 +315,6 @@ function formatLiveLockError(metadata) {
|
|
|
351
315
|
`updatedAt=${metadata.updatedAt}`
|
|
352
316
|
].join(" ");
|
|
353
317
|
}
|
|
354
|
-
function isRetryableRenameError(error) {
|
|
355
|
-
return typeof error === "object" && error !== null && "code" in error && (error.code === "EBUSY" || error.code === "EPERM" || error.code === "EACCES");
|
|
356
|
-
}
|
|
357
|
-
function sleepSync(ms) {
|
|
358
|
-
if (ms <= 0) {
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
362
|
-
}
|
|
363
318
|
|
|
364
319
|
function createNextCacheIdentity(input) {
|
|
365
320
|
const configHash = hashString(stableStringify(input.config));
|
|
@@ -497,7 +497,7 @@ interface PluginState {
|
|
|
497
497
|
* Absolute paths of every CSS file seen importing `tailwindcss`, without
|
|
498
498
|
* their query. These are the modules whose generated CSS changes when the
|
|
499
499
|
* safelist does, which is what lets a dev server hot-update instead of
|
|
500
|
-
* reloading — see the `
|
|
500
|
+
* reloading — see the `hotUpdate` safelist branch.
|
|
501
501
|
*/
|
|
502
502
|
tailwindEntryFiles: Set<string>;
|
|
503
503
|
/**
|
|
@@ -497,7 +497,7 @@ interface PluginState {
|
|
|
497
497
|
* Absolute paths of every CSS file seen importing `tailwindcss`, without
|
|
498
498
|
* their query. These are the modules whose generated CSS changes when the
|
|
499
499
|
* safelist does, which is what lets a dev server hot-update instead of
|
|
500
|
-
* reloading — see the `
|
|
500
|
+
* reloading — see the `hotUpdate` safelist branch.
|
|
501
501
|
*/
|
|
502
502
|
tailwindEntryFiles: Set<string>;
|
|
503
503
|
/**
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
const path = require('node:path');
|
|
4
4
|
const fs = require('node:fs');
|
|
5
|
+
const safelistSource = require('./unplugin.DDSWQJYX.cjs');
|
|
5
6
|
const node_crypto = require('node:crypto');
|
|
6
7
|
const node_os = require('node:os');
|
|
7
8
|
const lockfile = require('proper-lockfile');
|
|
8
|
-
const safelistSource = require('./unplugin.KnDCM-sr.cjs');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
11
11
|
|
|
@@ -25,8 +25,6 @@ const path__namespace = /*#__PURE__*/_interopNamespaceCompat(path);
|
|
|
25
25
|
const fs__namespace = /*#__PURE__*/_interopNamespaceCompat(fs);
|
|
26
26
|
const lockfile__default = /*#__PURE__*/_interopDefaultCompat(lockfile);
|
|
27
27
|
|
|
28
|
-
const DEFAULT_RENAME_RETRIES = 5;
|
|
29
|
-
const DEFAULT_RENAME_RETRY_DELAY_MS = 10;
|
|
30
28
|
const DEFAULT_STALE_LOCK_MS = 3e4;
|
|
31
29
|
const STALE_RECOVERY_DISABLED_MS = 2147483647;
|
|
32
30
|
function resolveNextSafelistStatePaths(rootDir, cacheDir = ".csszyx/cache", outputFile = safelistSource.SAFELIST_FILE) {
|
|
@@ -45,7 +43,7 @@ function writeNextSafelistShard(shardsDir, input, options = {}) {
|
|
|
45
43
|
if (isExistingShardEquivalent(filePath, shard)) {
|
|
46
44
|
return { filePath, changed: false };
|
|
47
45
|
}
|
|
48
|
-
atomicWriteFileSync(filePath, `${JSON.stringify(shard, null, 2)}
|
|
46
|
+
safelistSource.atomicWriteFileSync(filePath, `${JSON.stringify(shard, null, 2)}
|
|
49
47
|
`, options);
|
|
50
48
|
return { filePath, changed: true };
|
|
51
49
|
}
|
|
@@ -69,9 +67,9 @@ function materializeNextSafelist(paths, options = {}) {
|
|
|
69
67
|
version: 1,
|
|
70
68
|
sources: sortedSources.map(([sourcePath, classSet]) => [sourcePath, classSet])
|
|
71
69
|
};
|
|
72
|
-
atomicWriteFileSync(paths.outputPath, safelistSource.renderSafelistFile(classNames), options);
|
|
70
|
+
safelistSource.atomicWriteFileSync(paths.outputPath, safelistSource.renderSafelistFile(classNames), options);
|
|
73
71
|
safelistSource.removeLegacySafelists(paths.rootDir, console.warn);
|
|
74
|
-
atomicWriteFileSync(paths.snapshotPath, `${JSON.stringify(snapshot, null, 2)}
|
|
72
|
+
safelistSource.atomicWriteFileSync(paths.snapshotPath, `${JSON.stringify(snapshot, null, 2)}
|
|
75
73
|
`, options);
|
|
76
74
|
return {
|
|
77
75
|
classCount: classNames.length,
|
|
@@ -112,7 +110,7 @@ function acquireNextSafelistStateLock(lockPath, pidOrOptions = {}) {
|
|
|
112
110
|
throw new NextSafelistStateLockedError(existing);
|
|
113
111
|
}
|
|
114
112
|
try {
|
|
115
|
-
atomicWriteFileSync(lockPath, `${JSON.stringify(metadata, null, 2)}
|
|
113
|
+
safelistSource.atomicWriteFileSync(lockPath, `${JSON.stringify(metadata, null, 2)}
|
|
116
114
|
`);
|
|
117
115
|
} catch (error) {
|
|
118
116
|
releaseAdvisory();
|
|
@@ -120,7 +118,7 @@ function acquireNextSafelistStateLock(lockPath, pidOrOptions = {}) {
|
|
|
120
118
|
}
|
|
121
119
|
let released = false;
|
|
122
120
|
const writeCurrentMetadata = (updatedAt) => {
|
|
123
|
-
atomicWriteFileSync(lockPath, `${JSON.stringify({ ...metadata, updatedAt }, null, 2)}
|
|
121
|
+
safelistSource.atomicWriteFileSync(lockPath, `${JSON.stringify({ ...metadata, updatedAt }, null, 2)}
|
|
124
122
|
`);
|
|
125
123
|
};
|
|
126
124
|
return {
|
|
@@ -150,40 +148,6 @@ function acquireNextSafelistStateLock(lockPath, pidOrOptions = {}) {
|
|
|
150
148
|
}
|
|
151
149
|
};
|
|
152
150
|
}
|
|
153
|
-
function atomicWriteFileSync(file, content, options = {}) {
|
|
154
|
-
const dir = path__namespace.dirname(file);
|
|
155
|
-
const tmp = path__namespace.join(
|
|
156
|
-
dir,
|
|
157
|
-
`.tmp-${path__namespace.basename(file)}-${process.pid}-${Date.now()}-${node_crypto.randomUUID()}`
|
|
158
|
-
);
|
|
159
|
-
fs__namespace.mkdirSync(dir, { recursive: true });
|
|
160
|
-
fs__namespace.writeFileSync(tmp, content, "utf8");
|
|
161
|
-
try {
|
|
162
|
-
atomicRenameWithRetry(tmp, file, options);
|
|
163
|
-
} catch (error) {
|
|
164
|
-
try {
|
|
165
|
-
fs__namespace.rmSync(tmp, { force: true });
|
|
166
|
-
} catch {
|
|
167
|
-
}
|
|
168
|
-
throw error;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
function atomicRenameWithRetry(from, to, options = {}) {
|
|
172
|
-
const maxRetries = options.maxRetries ?? DEFAULT_RENAME_RETRIES;
|
|
173
|
-
const retryDelayMs = options.retryDelayMs ?? DEFAULT_RENAME_RETRY_DELAY_MS;
|
|
174
|
-
const renameSync = options.renameSync ?? fs__namespace.renameSync;
|
|
175
|
-
for (let attempt = 0; ; attempt++) {
|
|
176
|
-
try {
|
|
177
|
-
renameSync(from, to);
|
|
178
|
-
return;
|
|
179
|
-
} catch (error) {
|
|
180
|
-
if (!isRetryableRenameError(error) || attempt >= maxRetries) {
|
|
181
|
-
throw error;
|
|
182
|
-
}
|
|
183
|
-
sleepSync(retryDelayMs);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
151
|
function isExistingShardEquivalent(filePath, shard) {
|
|
188
152
|
try {
|
|
189
153
|
const parsed = JSON.parse(fs__namespace.readFileSync(filePath, "utf8"));
|
|
@@ -371,15 +335,6 @@ function formatLiveLockError(metadata) {
|
|
|
371
335
|
`updatedAt=${metadata.updatedAt}`
|
|
372
336
|
].join(" ");
|
|
373
337
|
}
|
|
374
|
-
function isRetryableRenameError(error) {
|
|
375
|
-
return typeof error === "object" && error !== null && "code" in error && (error.code === "EBUSY" || error.code === "EPERM" || error.code === "EACCES");
|
|
376
|
-
}
|
|
377
|
-
function sleepSync(ms) {
|
|
378
|
-
if (ms <= 0) {
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
382
|
-
}
|
|
383
338
|
|
|
384
339
|
function createNextCacheIdentity(input) {
|
|
385
340
|
const configHash = hashString(stableStringify(input.config));
|
|
@@ -431,7 +386,7 @@ function resolveNextGenerationManifestPath(rootDir, cacheDir = ".csszyx/cache")
|
|
|
431
386
|
return path__namespace.resolve(rootDir, cacheDir, "generation-manifest.json");
|
|
432
387
|
}
|
|
433
388
|
function writeNextGenerationManifest(manifestPath, manifest, options = {}) {
|
|
434
|
-
atomicWriteFileSync(
|
|
389
|
+
safelistSource.atomicWriteFileSync(
|
|
435
390
|
manifestPath,
|
|
436
391
|
`${JSON.stringify(normalizeManifest(manifest), null, 2)}
|
|
437
392
|
`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
2
|
import { extractCrossModuleRegistryEntries, extractCrossModuleForwards } from '@csszyx/compiler';
|
|
3
|
-
import { n as normalizePathSeparators } from './unplugin.
|
|
3
|
+
import { n as normalizePathSeparators } from './unplugin.DH_ij6cf.mjs';
|
|
4
4
|
import * as fs from 'node:fs';
|
|
5
5
|
import { existsSync, statSync } from 'node:fs';
|
|
6
6
|
import { createHash, randomUUID } from 'node:crypto';
|