pasika 0.10.129 → 0.10.130

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.
@@ -9932,10 +9932,12 @@ var colorRoleUsageRule = {
9932
9932
  };
9933
9933
 
9934
9934
  // eslint/rules/tailwind/css-entry-point.ts
9935
- import { statSync as statSync4 } from "fs";
9935
+ import { existsSync as existsSync9, statSync as statSync4 } from "fs";
9936
9936
  import path67 from "path";
9937
9937
  var APP_STYLES_DIR = path67.join("app", "styles");
9938
9938
  var GLOBAL_STYLESHEET_PATH = path67.join(APP_STYLES_DIR, "globals.css");
9939
+ var FEATURE_STYLESHEET_NAME = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*\.css$/u;
9940
+ var FEATURE_STYLESHEET_ERROR = "Only globals.css and <feature>.css matching an existing src/features/<feature>/ directory are allowed in src/app/styles/.";
9939
9941
  var cssEntryPointRule = {
9940
9942
  meta: {
9941
9943
  schema: [],
@@ -10016,6 +10018,13 @@ var cssEntryPointRule = {
10016
10018
  });
10017
10019
  return;
10018
10020
  }
10021
+ const basename = path67.basename(current);
10022
+ const featureName = basename.slice(0, -".css".length);
10023
+ const featureDir = path67.join(sourceRoot, "features", featureName);
10024
+ const isFeatureStylesheet = path67.dirname(current) === path67.join(sourceRoot, APP_STYLES_DIR) && FEATURE_STYLESHEET_NAME.test(basename) && existsSync9(featureDir) && statSync4(featureDir).isDirectory();
10025
+ if (!isFeatureStylesheet) {
10026
+ context.report({ node, message: FEATURE_STYLESHEET_ERROR });
10027
+ }
10019
10028
  if (!directChildren.has(current)) {
10020
10029
  context.report({
10021
10030
  node,
@@ -10070,7 +10079,7 @@ var customUtilityApplyRule = {
10070
10079
  };
10071
10080
 
10072
10081
  // eslint/rules/tailwind/feature-css-placement.ts
10073
- import { existsSync as existsSync9 } from "fs";
10082
+ import { existsSync as existsSync10 } from "fs";
10074
10083
  import path70 from "path";
10075
10084
 
10076
10085
  // eslint/rules/tailwind/css-dependency-graph.ts
@@ -10519,7 +10528,7 @@ var featureCssPlacementRule = {
10519
10528
  if (!relative.startsWith(`${STYLES_DIR}${path70.sep}`)) return {};
10520
10529
  const basename = path70.basename(current);
10521
10530
  const featureName = basename.slice(0, -".css".length);
10522
- const isFeatureFile = path70.dirname(current) === styles && FEATURE_CSS.test(basename) && existsSync9(path70.join(sourceRoot, "features", featureName));
10531
+ const isFeatureFile = path70.dirname(current) === styles && FEATURE_CSS.test(basename) && existsSync10(path70.join(sourceRoot, "features", featureName));
10523
10532
  const read = cachedTextReader();
10524
10533
  const css2 = findFiles(sourceRoot, CSS_EXTENSIONS).map((file) => ({ path: file, content: read(file) }));
10525
10534
  const modules = findFiles(sourceRoot, MODULE_EXTENSIONS4).map((file) => ({ path: file, content: read(file) }));
@@ -10532,7 +10541,7 @@ var featureCssPlacementRule = {
10532
10541
  const owner = owners.get(symbolId(definition));
10533
10542
  if (!owner) continue;
10534
10543
  const expected = owner === GLOBALS ? GLOBALS : `${owner}.css`;
10535
- if (owner !== GLOBALS && (basename === GLOBALS || !isFeatureFile) && !existsSync9(path70.join(styles, expected))) {
10544
+ if (owner !== GLOBALS && (basename === GLOBALS || !isFeatureFile) && !existsSync10(path70.join(styles, expected))) {
10536
10545
  continue;
10537
10546
  }
10538
10547
  if (basename === expected) continue;
@@ -10552,7 +10561,7 @@ var featureCssPlacementRule = {
10552
10561
  };
10553
10562
 
10554
10563
  // eslint/rules/tailwind/global-stylesheet.ts
10555
- import { existsSync as existsSync10 } from "fs";
10564
+ import { existsSync as existsSync11 } from "fs";
10556
10565
  import path71 from "path";
10557
10566
  var MISSING_REGISTRATION = 'Global stylesheet must register Tailwind with @import "tailwindcss".';
10558
10567
  var MISSING_ENTRYPOINT = "Project CSS must have a canonical global stylesheet at src/app/styles/globals.css.";
@@ -10570,7 +10579,7 @@ var globalStylesheetRule = {
10570
10579
  const entryPoint = path71.normalize(path71.join(sourceRoot, "app", "styles", "globals.css"));
10571
10580
  const current = path71.normalize(path71.resolve(context.filename));
10572
10581
  const isEntryPoint = current === entryPoint;
10573
- const hasEntryPoint = existsSync10(entryPoint);
10582
+ const hasEntryPoint = existsSync11(entryPoint);
10574
10583
  const isFirstStylesheet = !hasEntryPoint && [current, ...findFiles(sourceRoot, CSS_EXTENSIONS).map((file) => path71.normalize(file))].sort()[0] === current;
10575
10584
  if (!isEntryPoint && !isFirstStylesheet) return {};
10576
10585
  return {
@@ -10944,7 +10953,7 @@ var stylesheetOrderingRule = {
10944
10953
  };
10945
10954
 
10946
10955
  // eslint/rules/tailwind/theme-reset.ts
10947
- import { existsSync as existsSync11 } from "fs";
10956
+ import { existsSync as existsSync12 } from "fs";
10948
10957
  import path74 from "path";
10949
10958
  import { generate as generate4, parse as parse7, toPlainObject as toPlainObject2 } from "@eslint/css-tree";
10950
10959
  function isThemeReset(node) {
@@ -10989,7 +10998,7 @@ var themeResetRule = {
10989
10998
  const target = resolveSpecifier2(from.file, specifier, sourceRoot);
10990
10999
  if (!target || path74.extname(target) !== ".css") continue;
10991
11000
  const filename = path74.normalize(target);
10992
- if (seen.has(filename) || !existsSync11(filename)) continue;
11001
+ if (seen.has(filename) || !existsSync12(filename)) continue;
10993
11002
  seen.add(filename);
10994
11003
  const source = textOf(filename);
10995
11004
  const parsed = toPlainObject2(parse7(source, { parseAtrulePrelude: false }));
@@ -11212,7 +11221,7 @@ var unusedUtilityRule = {
11212
11221
 
11213
11222
  // eslint/rules/tailwind/utility-mapping.ts
11214
11223
  import { spawnSync } from "child_process";
11215
- import { existsSync as existsSync12 } from "fs";
11224
+ import { existsSync as existsSync13 } from "fs";
11216
11225
  import path78 from "path";
11217
11226
  function applyOperationCount(utility, textOf) {
11218
11227
  let count = 0;
@@ -11695,7 +11704,7 @@ var utilityMappingRule = {
11695
11704
  (utility) => themeCandidate(preludeIdentifiers(utility)[0] ?? "unknown", context.sourceCode.getText(utility))
11696
11705
  ).filter((candidate) => Boolean(candidate && requiresGeneratorProbe(candidate)));
11697
11706
  const physicalDir = path78.dirname(context.physicalFilename);
11698
- const tailwindCwd = path78.isAbsolute(physicalDir) && existsSync12(physicalDir) ? physicalDir : context.cwd;
11707
+ const tailwindCwd = path78.isAbsolute(physicalDir) && existsSync13(physicalDir) ? physicalDir : context.cwd;
11699
11708
  const themeGenerators = themeSupportedGenerators(generatorCandidates, tailwindCwd);
11700
11709
  for (const utility of utilities) {
11701
11710
  const name = preludeIdentifiers(utility)[0] ?? "unknown";
@@ -11805,7 +11814,7 @@ var utilityMappingRule = {
11805
11814
  // eslint/rules/tailwind/utility-name-parity.ts
11806
11815
  import { spawnSync as spawnSync2 } from "child_process";
11807
11816
  import { createHash } from "crypto";
11808
- import { existsSync as existsSync13 } from "fs";
11817
+ import { existsSync as existsSync14 } from "fs";
11809
11818
  import path79 from "path";
11810
11819
  import { generate as generate5, parse as parse8, toPlainObject as toPlainObject3 } from "@eslint/css-tree";
11811
11820
  function numericPart(value) {
@@ -11957,7 +11966,7 @@ var utilityNameParityRule = {
11957
11966
  });
11958
11967
  if (candidates.length === 0) return;
11959
11968
  const physicalDir = path79.dirname(context.physicalFilename);
11960
- const cwd = path79.isAbsolute(physicalDir) && existsSync13(physicalDir) ? physicalDir : context.cwd;
11969
+ const cwd = path79.isAbsolute(physicalDir) && existsSync14(physicalDir) ? physicalDir : context.cwd;
11961
11970
  const compiled = compileApplies(
11962
11971
  candidates.map((candidate) => candidate.apply),
11963
11972
  cwd
@@ -12155,7 +12164,7 @@ var uiStateRule = {
12155
12164
  };
12156
12165
 
12157
12166
  // eslint/rules/unknown-utility.ts
12158
- import { existsSync as existsSync14, readdirSync as readdirSync6, readFileSync as readFileSync15, statSync as statSync6 } from "fs";
12167
+ import { existsSync as existsSync15, readdirSync as readdirSync6, readFileSync as readFileSync15, statSync as statSync6 } from "fs";
12159
12168
  import { createRequire } from "module";
12160
12169
  import path81 from "path";
12161
12170
  var PREFIX_NAMESPACES = {
@@ -12466,7 +12475,7 @@ function resolvePackageStylesheet(fromFile, specifier) {
12466
12475
  while (directory !== path81.dirname(directory)) {
12467
12476
  const packageRoot = path81.join(directory, "node_modules", packageName);
12468
12477
  const manifestPath = path81.join(packageRoot, "package.json");
12469
- if (existsSync14(manifestPath)) {
12478
+ if (existsSync15(manifestPath)) {
12470
12479
  try {
12471
12480
  const manifest = readFileSync15(manifestPath, "utf8");
12472
12481
  const stylesheet = /"style"\s*:\s*"(?<file>[^"]+\.css)"/.exec(manifest)?.groups?.file;
@@ -12474,7 +12483,7 @@ function resolvePackageStylesheet(fromFile, specifier) {
12474
12483
  const target = stylesheet ?? main;
12475
12484
  if (!target) return void 0;
12476
12485
  const resolved = path81.resolve(packageRoot, target);
12477
- return existsSync14(resolved) ? resolved : void 0;
12486
+ return existsSync15(resolved) ? resolved : void 0;
12478
12487
  } catch {
12479
12488
  return void 0;
12480
12489
  }
@@ -12824,7 +12833,7 @@ var valueExtractionRule = {
12824
12833
  };
12825
12834
 
12826
12835
  // eslint/rules/vulyk/tracked-docs.ts
12827
- import { existsSync as existsSync15, readFileSync as readFileSync16 } from "fs";
12836
+ import { existsSync as existsSync16, readFileSync as readFileSync16 } from "fs";
12828
12837
  import path84 from "path";
12829
12838
  var PASIKA_REPO = "Bredansky/pasika";
12830
12839
  var BASE_REQUIRED_TRACKED_DOCS = [
@@ -12860,7 +12869,7 @@ var trackedDocsRule = {
12860
12869
  if (root.type !== "Object") return;
12861
12870
  const projectRoot = path84.dirname(path84.resolve(context.filename));
12862
12871
  const configPath = path84.join(projectRoot, "vulyk.config.ts");
12863
- if (!existsSync15(configPath)) {
12872
+ if (!existsSync16(configPath)) {
12864
12873
  context.report({
12865
12874
  node,
12866
12875
  message: "No vulyk.config.ts found. Run npx vulyk init to create one that tracks the framework's required tracked docs."
@@ -12885,7 +12894,7 @@ var trackedDocsRule = {
12885
12894
  }
12886
12895
  }
12887
12896
  const agentsPath = path84.join(projectRoot, "AGENTS.md");
12888
- if (!existsSync15(agentsPath)) {
12897
+ if (!existsSync16(agentsPath)) {
12889
12898
  context.report({
12890
12899
  node,
12891
12900
  message: "No AGENTS.md found. Run npx vulyk agents to generate the agent file that routes to the tracked docs."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pasika",
3
- "version": "0.10.129",
3
+ "version": "0.10.130",
4
4
  "description": "Reusable agent setup package",
5
5
  "repository": {
6
6
  "type": "git",