uilint 0.2.16 → 0.2.17

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.js CHANGED
@@ -2805,7 +2805,7 @@ program.command("update").description("Update existing style guide with new styl
2805
2805
  });
2806
2806
  });
2807
2807
  program.command("install").description("Install UILint integration").option("--force", "Overwrite existing configuration files").action(async (options) => {
2808
- const { installUI } = await import("./install-ui-BBIO2E5O.js");
2808
+ const { installUI } = await import("./install-ui-VNIKF2YT.js");
2809
2809
  await installUI({ force: options.force });
2810
2810
  });
2811
2811
  program.command("serve").description("Start WebSocket server for real-time UI linting").option("-p, --port <number>", "Port to listen on", "9234").action(async (options) => {
@@ -3956,8 +3956,17 @@ function hasUseClientDirective(filePath) {
3956
3956
  const mod = parseModule5(content);
3957
3957
  const program = mod.$ast;
3958
3958
  if (!program || program.type !== "Program") return false;
3959
+ const directives = program.directives ?? [];
3960
+ for (const directive of directives) {
3961
+ if (directive?.type === "Directive" && directive.value?.type === "DirectiveLiteral" && directive.value.value === "use client") {
3962
+ return true;
3963
+ }
3964
+ }
3959
3965
  const firstStmt = program.body?.[0];
3960
- return firstStmt?.type === "ExpressionStatement" && firstStmt.expression?.type === "StringLiteral" && (firstStmt.expression.value === "use client" || firstStmt.expression.value === "use client");
3966
+ if (firstStmt?.type === "ExpressionStatement" && (firstStmt.expression?.type === "StringLiteral" || firstStmt.expression?.type === "Literal") && firstStmt.expression.value === "use client") {
3967
+ return true;
3968
+ }
3969
+ return false;
3961
3970
  } catch {
3962
3971
  return false;
3963
3972
  }
@@ -4361,7 +4370,10 @@ function selectionsToUserChoices(selections, project, eslintRules) {
4361
4370
  if (appInfo) {
4362
4371
  choices.next = {
4363
4372
  projectPath: appInfo.projectPath,
4364
- detection: appInfo.detection
4373
+ detection: appInfo.detection,
4374
+ // Pass through targetFile and createProviders from the selected target
4375
+ targetFile: target?.targetFile,
4376
+ createProviders: target?.createProviders
4365
4377
  };
4366
4378
  }
4367
4379
  } else if (installer.id === "vite") {
@@ -4403,7 +4415,7 @@ async function installUI(options = {}, executeOptions = {}) {
4403
4415
  console.log("\nNo items selected for installation");
4404
4416
  process.exit(0);
4405
4417
  }
4406
- const { createPlan } = await import("./plan-VPDTICSY.js");
4418
+ const { createPlan } = await import("./plan-2YRYL4YC.js");
4407
4419
  const plan = createPlan(project, choices, { force: options.force });
4408
4420
  const result = await execute(plan, {
4409
4421
  ...executeOptions,
@@ -4428,4 +4440,4 @@ async function installUI(options = {}, executeOptions = {}) {
4428
4440
  export {
4429
4441
  installUI
4430
4442
  };
4431
- //# sourceMappingURL=install-ui-BBIO2E5O.js.map
4443
+ //# sourceMappingURL=install-ui-VNIKF2YT.js.map