@cedarjs/cli 0.12.0 → 0.12.1-next.14

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.
Files changed (2) hide show
  1. package/dist/commands/lint.js +10 -7
  2. package/package.json +12 -12
@@ -1,5 +1,5 @@
1
+ import fs from "node:fs";
1
2
  import execa from "execa";
2
- import fs from "fs-extra";
3
3
  import { terminalLink } from "termi-link";
4
4
  import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
5
5
  import { getPaths } from "../lib/index.js";
@@ -13,6 +13,10 @@ const builder = (yargs) => {
13
13
  default: false,
14
14
  description: "Try to fix errors",
15
15
  type: "boolean"
16
+ }).option("format", {
17
+ default: "stylish",
18
+ description: "Use a specific output format",
19
+ type: "string"
16
20
  }).epilogue(
17
21
  `Also see the ${terminalLink(
18
22
  "CedarJS CLI Reference",
@@ -20,20 +24,19 @@ const builder = (yargs) => {
20
24
  )}`
21
25
  );
22
26
  };
23
- const handler = async ({ path, fix }) => {
24
- recordTelemetryAttributes({
25
- command: "lint",
26
- fix
27
- });
27
+ const handler = async ({ path, fix, format }) => {
28
+ recordTelemetryAttributes({ command: "lint", fix, format });
28
29
  try {
29
30
  const pathString = path?.join(" ");
31
+ const sbPath = getPaths().web.storybook;
30
32
  const result = await execa(
31
33
  "yarn eslint",
32
34
  [
33
35
  fix && "--fix",
36
+ `--format ${format}`,
34
37
  !pathString && fs.existsSync(getPaths().web.src) && "web/src",
35
38
  !pathString && fs.existsSync(getPaths().web.config) && "web/config",
36
- !pathString && fs.existsSync(getPaths().web.storybook) && "web/.storybook",
39
+ !pathString && fs.existsSync(sbPath) && "web/.storybook",
37
40
  !pathString && fs.existsSync(getPaths().scripts) && "scripts",
38
41
  !pathString && fs.existsSync(getPaths().api.src) && "api/src",
39
42
  pathString
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "0.12.0",
3
+ "version": "0.12.1-next.14+052b025b5",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,15 +32,15 @@
32
32
  "dependencies": {
33
33
  "@babel/preset-typescript": "7.27.1",
34
34
  "@babel/runtime-corejs3": "7.27.6",
35
- "@cedarjs/api-server": "0.12.0",
36
- "@cedarjs/cli-helpers": "0.12.0",
37
- "@cedarjs/fastify-web": "0.12.0",
38
- "@cedarjs/internal": "0.12.0",
39
- "@cedarjs/prerender": "0.12.0",
40
- "@cedarjs/project-config": "0.12.0",
41
- "@cedarjs/structure": "0.12.0",
42
- "@cedarjs/telemetry": "0.12.0",
43
- "@cedarjs/web-server": "0.12.0",
35
+ "@cedarjs/api-server": "0.12.1-next.14+052b025b5",
36
+ "@cedarjs/cli-helpers": "0.12.1-next.14+052b025b5",
37
+ "@cedarjs/fastify-web": "0.12.1-next.14+052b025b5",
38
+ "@cedarjs/internal": "0.12.1-next.14+052b025b5",
39
+ "@cedarjs/prerender": "0.12.1-next.14+052b025b5",
40
+ "@cedarjs/project-config": "0.12.1-next.14+052b025b5",
41
+ "@cedarjs/structure": "0.12.1-next.14+052b025b5",
42
+ "@cedarjs/telemetry": "0.12.1-next.14+052b025b5",
43
+ "@cedarjs/web-server": "0.12.1-next.14+052b025b5",
44
44
  "@listr2/prompt-adapter-enquirer": "2.0.16",
45
45
  "@opentelemetry/api": "1.8.0",
46
46
  "@opentelemetry/core": "1.22.0",
@@ -74,7 +74,7 @@
74
74
  "pascalcase": "1.0.0",
75
75
  "pluralize": "8.0.0",
76
76
  "portfinder": "1.0.37",
77
- "prettier": "3.5.3",
77
+ "prettier": "3.6.2",
78
78
  "prisma": "5.20.0",
79
79
  "prompts": "2.4.2",
80
80
  "rimraf": "6.0.1",
@@ -102,5 +102,5 @@
102
102
  "publishConfig": {
103
103
  "access": "public"
104
104
  },
105
- "gitHead": "4fc564a1d863dd3a57fce72cb084b9b3fc6d4529"
105
+ "gitHead": "052b025b5337e7edd05e6a350d713332ae0281ec"
106
106
  }