@elliemae/pui-cli 7.20.0 → 7.20.1

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.
@@ -31,11 +31,10 @@ var import_node_path = __toESM(require("node:path"), 1);
31
31
  var import_yargs = __toESM(require("yargs"), 1);
32
32
  var import_utils = require("./utils.js");
33
33
  var import_utils2 = require("../utils.cjs");
34
- const { CI = false } = process.env;
35
34
  const lintCSS = async (fix = false) => {
36
35
  const fixIssues = fix ? "--fix" : "";
37
36
  await (0, import_utils.exec)(
38
- `stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} ${fixIssues} ${!CI ? "--color" : ""} --allow-empty-input --config ${import_node_path.default.join(
37
+ `stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} ${fixIssues} ${!(0, import_utils.getCIEnv)() ? "--color" : ""} --allow-empty-input --config ${import_node_path.default.join(
39
38
  process.cwd(),
40
39
  "stylelint.config.cjs"
41
40
  )}`
@@ -43,7 +42,7 @@ const lintCSS = async (fix = false) => {
43
42
  };
44
43
  const lintJS = async (fix = false) => {
45
44
  const fixIssues = fix ? "--fix" : "";
46
- await (0, import_utils.exec)(`eslint ${!CI ? "--color" : ""} ${fixIssues} .`);
45
+ await (0, import_utils.exec)(`eslint ${!(0, import_utils.getCIEnv)() ? "--color" : ""} ${fixIssues} .`);
47
46
  };
48
47
  const lintCmd = {
49
48
  handler: async (argv) => {
@@ -29,7 +29,6 @@ __export(test_exports, {
29
29
  module.exports = __toCommonJS(test_exports);
30
30
  var import_yargs = __toESM(require("yargs"), 1);
31
31
  var import_utils = require("./utils.js");
32
- const { CI = false } = process.env;
33
32
  const test = async (commandOptions) => {
34
33
  await (0, import_utils.exec)(`cross-env NODE_ENV=test jest ${commandOptions}`);
35
34
  };
@@ -45,7 +44,7 @@ const testCmd = {
45
44
  commandOptions = "-u";
46
45
  else if (argv.watch)
47
46
  commandOptions = "--watchAll";
48
- if (CI)
47
+ if ((0, import_utils.getCIEnv)())
49
48
  commandOptions += " --ci --no-colors";
50
49
  if (argv.p)
51
50
  commandOptions += " --passWithNoTests";
@@ -54,7 +53,7 @@ const testCmd = {
54
53
  if (argv.s)
55
54
  commandOptions += " --silent";
56
55
  try {
57
- if (CI) {
56
+ if ((0, import_utils.getCIEnv)()) {
58
57
  await (0, import_utils.exec)("rimraf ./reports");
59
58
  }
60
59
  if (argv.debug) {
@@ -26,6 +26,7 @@ var utils_exports = {};
26
26
  __export(utils_exports, {
27
27
  copyBuildAssetsToVersionedFolder: () => copyBuildAssetsToVersionedFolder,
28
28
  exec: () => exec,
29
+ getCIEnv: () => getCIEnv,
29
30
  isApp: () => isApp,
30
31
  isPathExist: () => isPathExist,
31
32
  logError: () => logError,
@@ -155,3 +156,4 @@ const isPathExist = async (pathToCheck) => {
155
156
  }
156
157
  };
157
158
  const isApp = async () => isPathExist(import_node_path.default.join(process.cwd(), "app"));
159
+ const getCIEnv = () => process.env.CI === "true";
@@ -29,7 +29,6 @@ __export(vitest_exports, {
29
29
  module.exports = __toCommonJS(vitest_exports);
30
30
  var import_yargs = __toESM(require("yargs"), 1);
31
31
  var import_utils = require("./utils.js");
32
- const { CI = false } = process.env;
33
32
  const test = async (commandOptions) => {
34
33
  await (0, import_utils.exec)(`cross-env FORCE_COLOR=true vitest ${commandOptions}`);
35
34
  };
@@ -47,7 +46,7 @@ const vitestCmd = {
47
46
  if (argv.s)
48
47
  commandOptions += " --silent";
49
48
  try {
50
- if (CI) {
49
+ if ((0, import_utils.getCIEnv)()) {
51
50
  await (0, import_utils.exec)("rimraf ./reports");
52
51
  }
53
52
  await test(commandOptions);
@@ -1,12 +1,11 @@
1
1
  import path from "node:path";
2
2
  import yargs from "yargs";
3
- import { exec, logError, logSuccess } from "./utils.js";
3
+ import { exec, logError, logSuccess, getCIEnv } from "./utils.js";
4
4
  import { isTypeScriptEnabled } from "../utils.cjs";
5
- const { CI = false } = process.env;
6
5
  const lintCSS = async (fix = false) => {
7
6
  const fixIssues = fix ? "--fix" : "";
8
7
  await exec(
9
- `stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} ${fixIssues} ${!CI ? "--color" : ""} --allow-empty-input --config ${path.join(
8
+ `stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} ${fixIssues} ${!getCIEnv() ? "--color" : ""} --allow-empty-input --config ${path.join(
10
9
  process.cwd(),
11
10
  "stylelint.config.cjs"
12
11
  )}`
@@ -14,7 +13,7 @@ const lintCSS = async (fix = false) => {
14
13
  };
15
14
  const lintJS = async (fix = false) => {
16
15
  const fixIssues = fix ? "--fix" : "";
17
- await exec(`eslint ${!CI ? "--color" : ""} ${fixIssues} .`);
16
+ await exec(`eslint ${!getCIEnv() ? "--color" : ""} ${fixIssues} .`);
18
17
  };
19
18
  const lintCmd = {
20
19
  handler: async (argv) => {
@@ -1,6 +1,5 @@
1
1
  import yargs from "yargs";
2
- import { exec, logError, logSuccess } from "./utils.js";
3
- const { CI = false } = process.env;
2
+ import { exec, logError, logSuccess, getCIEnv } from "./utils.js";
4
3
  const test = async (commandOptions) => {
5
4
  await exec(`cross-env NODE_ENV=test jest ${commandOptions}`);
6
5
  };
@@ -16,7 +15,7 @@ const testCmd = {
16
15
  commandOptions = "-u";
17
16
  else if (argv.watch)
18
17
  commandOptions = "--watchAll";
19
- if (CI)
18
+ if (getCIEnv())
20
19
  commandOptions += " --ci --no-colors";
21
20
  if (argv.p)
22
21
  commandOptions += " --passWithNoTests";
@@ -25,7 +24,7 @@ const testCmd = {
25
24
  if (argv.s)
26
25
  commandOptions += " --silent";
27
26
  try {
28
- if (CI) {
27
+ if (getCIEnv()) {
29
28
  await exec("rimraf ./reports");
30
29
  }
31
30
  if (argv.debug) {
@@ -131,9 +131,11 @@ const isPathExist = async (pathToCheck) => {
131
131
  }
132
132
  };
133
133
  const isApp = async () => isPathExist(path.join(process.cwd(), "app"));
134
+ const getCIEnv = () => process.env.CI === "true";
134
135
  export {
135
136
  copyBuildAssetsToVersionedFolder,
136
137
  exec,
138
+ getCIEnv,
137
139
  isApp,
138
140
  isPathExist,
139
141
  logError,
@@ -1,6 +1,5 @@
1
1
  import yargs from "yargs";
2
- import { exec, logError, logSuccess } from "./utils.js";
3
- const { CI = false } = process.env;
2
+ import { exec, logError, logSuccess, getCIEnv } from "./utils.js";
4
3
  const test = async (commandOptions) => {
5
4
  await exec(`cross-env FORCE_COLOR=true vitest ${commandOptions}`);
6
5
  };
@@ -18,7 +17,7 @@ const vitestCmd = {
18
17
  if (argv.s)
19
18
  commandOptions += " --silent";
20
19
  try {
21
- if (CI) {
20
+ if (getCIEnv()) {
22
21
  await exec("rimraf ./reports");
23
22
  }
24
23
  await test(commandOptions);
@@ -14,3 +14,4 @@ export function writeAppInfo(): Promise<void>;
14
14
  export function copyBuildAssetsToVersionedFolder(): Promise<void>;
15
15
  export function isPathExist(pathToCheck: any): Promise<boolean>;
16
16
  export function isApp(): Promise<boolean>;
17
+ export function getCIEnv(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "7.20.0",
3
+ "version": "7.20.1",
4
4
  "description": "ICE MT UI Platform CLI",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -83,9 +83,9 @@
83
83
  "@commitlint/config-conventional": "~17.3.0",
84
84
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.6.0",
85
85
  "@faker-js/faker": "7.6.0",
86
- "@nrwl/cli": "15.2.4",
87
- "@nrwl/tao": "15.2.4",
88
- "@nrwl/workspace": "15.2.4",
86
+ "@nrwl/cli": "15.3.0",
87
+ "@nrwl/tao": "15.3.0",
88
+ "@nrwl/workspace": "15.3.0",
89
89
  "@pmmmwh/react-refresh-webpack-plugin": "~0.5.10",
90
90
  "@semantic-release/changelog": "~6.0.2",
91
91
  "@semantic-release/exec": "~6.0.3",
@@ -112,15 +112,15 @@
112
112
  "@testing-library/user-event": "~14.4.3",
113
113
  "@types/jest": "~29.2.4",
114
114
  "@types/jest-axe": "~3.5.5",
115
- "@types/node": "~18.11.10",
115
+ "@types/node": "~18.11.11",
116
116
  "@types/rimraf": "~3.0.2",
117
117
  "@types/supertest": "~2.0.12",
118
118
  "@types/uuid": "~9.0.0",
119
119
  "@types/testing-library__jest-dom": "~5.14.5",
120
- "@typescript-eslint/eslint-plugin": "~5.45.0",
121
- "@typescript-eslint/parser": "~5.45.0",
120
+ "@typescript-eslint/eslint-plugin": "~5.45.1",
121
+ "@typescript-eslint/parser": "~5.45.1",
122
122
  "@vitejs/plugin-react": "~2.2.0",
123
- "@vitest/coverage-c8": "~0.25.3",
123
+ "@vitest/coverage-c8": "~0.25.5",
124
124
  "autoprefixer": "~10.4.13",
125
125
  "axe-core": "~4.5.2",
126
126
  "babel-plugin-date-fns": "~2.0.0",
@@ -205,7 +205,7 @@
205
205
  "jsdoc": "~4.0.0",
206
206
  "lerna": "~6.1.0",
207
207
  "lint-staged": "~13.1.0",
208
- "mini-css-extract-plugin": "~2.7.1",
208
+ "mini-css-extract-plugin": "~2.7.2",
209
209
  "minimist": "~1.2.7",
210
210
  "moment": "~2.29.4",
211
211
  "moment-locales-webpack-plugin": "~1.2.0",
@@ -255,11 +255,11 @@
255
255
  "url-loader": "~4.1.1",
256
256
  "uuid": "~9.0.0",
257
257
  "vite": "~3.2.5",
258
- "vitest": "~0.25.3",
259
- "vite-tsconfig-paths": "~3.6.0",
258
+ "vitest": "~0.25.5",
259
+ "vite-tsconfig-paths": "~4.0.0",
260
260
  "webpack": "~5.75.0",
261
261
  "webpack-bundle-analyzer": "~4.7.0",
262
- "webpack-cli": "~5.0.0",
262
+ "webpack-cli": "~5.0.1",
263
263
  "webpack-dev-server": "~4.11.1",
264
264
  "webpack-manifest-plugin": "~5.0.0",
265
265
  "webpack-merge": "~5.8.0",