@zohodesk/svg 1.1.8 → 1.1.9
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/README.md +289 -285
- package/deprecated/june_2022/ErrorUnauthorizedLogin.js +127 -127
- package/es/Loader/__tests__/__snapshots__/Loader.spec.js.snap +54 -54
- package/es/SVG/SVG.module.css +34 -34
- package/es/SVG/__tests__/__snapshots__/SVG.spec.js.snap +328 -328
- package/es/css/EmptyStateVariables.module.css +38 -38
- package/es/emptystate/version1/__tests__/__snapshots__/version1.spec.js.snap +24 -24
- package/es/emptystate/version2/__tests__/__snapshots__/version2.spec.js.snap +208 -208
- package/es/emptystate/version3/EmptyActiveCalls.js +0 -0
- package/es/emptystate/version3/EmptyCallHistory.js +0 -0
- package/es/emptystate/version3/__tests__/__snapshots__/version3.spec.js.snap +5968 -5968
- package/es/errorstate/version1/__tests__/__snapshots__/version1.spec.js.snap +162 -162
- package/es/errorstate/version2/__tests__/__snapshots__/version2.spec.js.snap +63 -63
- package/es/errorstate/version3/__tests__/__snapshots__/version3.spec.js.snap +698 -698
- package/es/v1/emptystate/version3/EmptyActiveCalls.js +0 -0
- package/es/v1/emptystate/version3/EmptyCallHistory.js +0 -0
- package/es/v1/emptystate/version3/EmptySandbox.js +20 -17
- package/images/EmptyBusinessHoliday.svg +50 -50
- package/images/EmptyBusinessHour.svg +42 -42
- package/images/EmptyContactInfo.svg +27 -27
- package/images/EmptyCustomDomain.svg +85 -85
- package/images/EmptyFilter.svg +62 -62
- package/images/EmptyFromAddress.svg +41 -41
- package/images/EmptyImportHistory.svg +43 -43
- package/images/EmptyNetwork.svg +50 -50
- package/images/EmptyRecycleBin.svg +58 -58
- package/images/EmptyRoles.svg +30 -30
- package/images/EmptySkills.svg +83 -83
- package/images/EmptyWebhook.svg +44 -44
- package/images/FailureLog.svg +46 -46
- package/images/Inconvenience.svg +719 -719
- package/images/NoRequestFound.svg +247 -247
- package/images/PageNotFound.svg +405 -405
- package/images/ReguestUrlNotFound.svg +267 -267
- package/images/UnableToProcess.svg +752 -752
- package/images/UnauthorizedLogin.svg +1047 -1047
- package/images/WillBack.svg +633 -633
- package/install.md +11 -11
- package/lib/Loader/__tests__/__snapshots__/Loader.spec.js.snap +54 -54
- package/lib/SVG/SVG.module.css +34 -34
- package/lib/SVG/__tests__/__snapshots__/SVG.spec.js.snap +328 -328
- package/lib/css/EmptyStateVariables.module.css +38 -38
- package/lib/emptystate/version1/__tests__/__snapshots__/version1.spec.js.snap +24 -24
- package/lib/emptystate/version2/__tests__/__snapshots__/version2.spec.js.snap +208 -208
- package/lib/emptystate/version3/EmptyActiveCalls.js +0 -0
- package/lib/emptystate/version3/EmptyCallHistory.js +0 -0
- package/lib/emptystate/version3/__tests__/__snapshots__/version3.spec.js.snap +5968 -5968
- package/lib/errorstate/version1/__tests__/__snapshots__/version1.spec.js.snap +162 -162
- package/lib/errorstate/version2/__tests__/__snapshots__/version2.spec.js.snap +63 -63
- package/lib/errorstate/version3/__tests__/__snapshots__/version3.spec.js.snap +698 -698
- package/lib/v1/emptystate/version3/EmptyActiveCalls.js +0 -0
- package/lib/v1/emptystate/version3/EmptyCallHistory.js +0 -0
- package/lib/v1/emptystate/version3/EmptySandbox.js +20 -17
- package/package.json +60 -60
- package/postPublish.js +8 -8
- package/prePublish.js +70 -70
- package/react-cli.config.js +19 -19
- package/result.json +1 -1
- package/unittest/index.html +1 -1
|
File without changes
|
|
File without changes
|
|
@@ -28,9 +28,9 @@ function EmptySandbox(props) {
|
|
|
28
28
|
viewBox: "0 0 500 500",
|
|
29
29
|
name: "emptySandbox"
|
|
30
30
|
}, props), /*#__PURE__*/_react["default"].createElement("g", {
|
|
31
|
-
clipPath: "url(#
|
|
31
|
+
clipPath: "url(#clip0_24684_2915)"
|
|
32
32
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
33
|
-
opacity: 0.
|
|
33
|
+
opacity: 0.1,
|
|
34
34
|
d: "M200.502 140.5C200.502 140.5 317.252 62.5004 376.252 86.0004C435.252 109.5 475.502 306.75 311.502 395.25C147.502 483.75 73.0016 291.25 72.2516 257.25C71.7516 224 72.2516 145.5 200.502 140.5Z",
|
|
35
35
|
fill: "var(--zd_emptysvg_primary_fill)"
|
|
36
36
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
@@ -52,39 +52,42 @@ function EmptySandbox(props) {
|
|
|
52
52
|
d: "M474.5 324.5C474 324 473.25 324 472.75 324.5L466.75 330L461.5 324C461 323.5 460.25 323.5 459.75 324C459.25 324.5 459.25 325.25 459.75 325.75L465 331.75L459 337.25C458.5 337.75 458.5 338.5 459 339C459.25 339.25 459.5 339.5 460 339.5C460.25 339.5 460.5 339.5 460.75 339.25L466.75 333.75L472 339.75C472.25 340 472.5 340.25 473 340.25C473.25 340.25 473.5 340.25 473.75 340C474.25 339.5 474.25 338.75 473.75 338.25L468.5 332.25L474.5 326.75C475 326 475 325 474.5 324.5Z",
|
|
53
53
|
fill: "var(--zd_emptysvg_tiny_circle)"
|
|
54
54
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
55
|
-
opacity: 0.
|
|
55
|
+
opacity: 0.1,
|
|
56
56
|
d: "M289.502 162.499C289.502 162.499 196.252 100.249 149.002 118.999C101.752 137.749 69.5017 295.499 200.752 366.249C332.002 436.999 391.502 282.999 392.002 255.749C392.502 229.249 392.002 166.249 289.502 162.499Z",
|
|
57
57
|
fill: "var(--zd_emptysvg_primary_fill)"
|
|
58
58
|
})), /*#__PURE__*/_react["default"].createElement("g", {
|
|
59
|
-
"clip-path": "url(#
|
|
59
|
+
"clip-path": "url(#clip0_24684_2915)"
|
|
60
60
|
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
61
|
-
opacity: 0.
|
|
62
|
-
d: "
|
|
61
|
+
opacity: 0.2,
|
|
62
|
+
d: "M371.957 181.043C371.957 181.043 338.743 157.856 336.968 162.235C335.193 166.614 322.585 205.129 327.91 207.526C333.234 209.923 333.419 193.651 348.677 196.693C363.936 199.735 371.957 181.066 371.957 181.066V181.043Z",
|
|
63
63
|
fill: "var(--zd_emptysvg_primary_fill)"
|
|
64
64
|
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
65
|
-
d: "
|
|
66
|
-
fill: "var(--zd_emptysvg_secondary_fill)"
|
|
67
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
68
|
-
d: "M76.2192 240.545C76.2192 240.545 68.1978 301.041 78.1666 315.961C92.2388 337.078 242.304 392.839 242.304 392.839C242.304 392.839 255.518 305.658 242.304 319.442C232.242 329.931 251.577 392.839 251.577 392.839L430.482 304.684L434.91 214.602L243.533 304.521L76.5438 231.472L142.616 187.267C142.616 187.267 124.348 238.944 110.322 239.524C89.9901 240.383 190.327 150.092 206.579 139.464C222.83 128.837 246.616 151.392 257.79 161.648C268.965 171.882 251.554 176.569 261.082 167.519C270.611 158.469 293.168 156.706 293.168 156.706C292.472 142.62 300.818 116.19 300.818 116.19L322.309 122.966L332.533 85.6057C323.445 79.8741 323.376 66.1367 323.376 66.1367L359.704 77.3679C354.928 90.4555 337.054 87.4621 337.054 87.4621L326.204 123.708L350.315 131.435C349.04 140.764 330.006 173.761 330.006 173.761C330.006 173.761 302.325 164.619 306.892 164.943C318.623 165.756 389.633 218.941 390.167 222.561C390.167 222.561 419.795 210.866 417.917 209.288C416.039 207.71 373.475 202.675 373.475 202.675",
|
|
65
|
+
d: "M427.921 237.79L261.988 309.586C261.988 309.586 89.0242 229.745 86.3504 227.717C83.6767 225.689 86.3504 318.322 86.3504 318.322C86.3504 318.322 246.729 391.479 251.431 394.152C256.133 396.826 262.172 327.726 258.139 321.318C254.105 314.911 251.431 394.152 260.812 394.152C270.193 394.152 438.639 316.317 438.639 316.317C438.639 316.317 439.976 243.16 435.274 235.784C433.983 233.756 425.225 229.238 413.193 223.707L382.168 212.666L366.379 233.41C370.344 238.435 372.672 244.381 373.478 251.204C354.048 214.833 335.885 217.345 329.431 215.893C323.461 214.556 358.197 232.166 358.197 232.166C358.197 232.166 389.936 192.43 393.485 180.375L363.198 165.347L384.773 119.688C384.773 119.688 407.776 127.225 416.719 110.906L371.058 88.7793C371.058 88.7793 368.408 106.919 379.264 116.323L358.266 163.573L331.229 150.319C331.229 150.319 314.91 183.51 313.02 202.248C313.02 202.248 291.768 191.761 268.465 192.061C268.465 192.061 277.293 185.953 306.566 191.6L311.291 173.783L276.924 156.773L96.4 223.707",
|
|
69
66
|
stroke: "var(--zd_emptysvg_primary_stroke)",
|
|
70
67
|
strokeWidth: "2.5",
|
|
71
68
|
"stroke-linecap": "round",
|
|
72
69
|
"stroke-linejoin": "round",
|
|
73
70
|
fill: "transparent"
|
|
71
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
72
|
+
opacity: 0.2,
|
|
73
|
+
d: "M135.724 231.105C135.724 231.105 200.17 190.216 245.001 195.748C289.833 201.28 325.076 216.4 355.27 248.622C355.27 248.622 265.147 294.95 259.592 292.922C254.037 290.893 135.724 231.082 135.724 231.082V231.105Z",
|
|
74
|
+
fill: "var(--zd_emptysvg_primary_fill)"
|
|
74
75
|
})), /*#__PURE__*/_react["default"].createElement("defs", null, /*#__PURE__*/_react["default"].createElement("clipPath", {
|
|
75
|
-
|
|
76
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
77
|
+
id: "clip0_24684_2915"
|
|
76
78
|
}, /*#__PURE__*/_react["default"].createElement("rect", {
|
|
77
|
-
width: 450,
|
|
78
|
-
height: 400,
|
|
79
|
+
width: "450",
|
|
80
|
+
height: "400",
|
|
79
81
|
fill: "white",
|
|
80
82
|
transform: "translate(25 50)"
|
|
81
83
|
})), /*#__PURE__*/_react["default"].createElement("clipPath", {
|
|
82
|
-
|
|
84
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
+
id: "clip1_24684_2915"
|
|
83
86
|
}, /*#__PURE__*/_react["default"].createElement("rect", {
|
|
84
|
-
width: "
|
|
85
|
-
height: "
|
|
87
|
+
width: "356",
|
|
88
|
+
height: "307.747",
|
|
86
89
|
fill: "white",
|
|
87
|
-
transform: "translate(
|
|
90
|
+
transform: "translate(84 87.627)"
|
|
88
91
|
}))));
|
|
89
92
|
}
|
|
90
93
|
|
package/package.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@zohodesk/svg",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"main": "lib/index",
|
|
5
|
-
"module": "es/index.js",
|
|
6
|
-
"jsnext:main": "es/index.js",
|
|
7
|
-
"private": false,
|
|
8
|
-
"publishConfig": {
|
|
9
|
-
"access": "public"
|
|
10
|
-
},
|
|
11
|
-
"author": "Z Team",
|
|
12
|
-
"homepage": "https://www.npmjs.com/search?q=@zohodesk",
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"keywords": [
|
|
15
|
-
"DOT",
|
|
16
|
-
"ZOHODESK",
|
|
17
|
-
"ZTEAM",
|
|
18
|
-
"LIBRARY"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"clean": "react-cli clean lib es coverage assets && mkdir assets",
|
|
22
|
-
"build:lib": "react-cli build:component:cmjs",
|
|
23
|
-
"build:es": "react-cli build:library:es",
|
|
24
|
-
"build": "npm run build:lib && npm run build:es",
|
|
25
|
-
"build:local": " npm run build && npm run rtl && npm run cssVariableConvert",
|
|
26
|
-
"build:watch": "npm run clean && npm run build:variables && npm run build && npm run build:es --module:mode=dev -- -w",
|
|
27
|
-
"rtl:watch": "react-cli rtl ./src ./es -w",
|
|
28
|
-
"prepare": "npm run init && npm run build && npm run rtl && npm run cssVariableConvert",
|
|
29
|
-
"init": "npm run clean && npm run build:variables",
|
|
30
|
-
"build:variables": "react-cli clean ./assets && node ./preprocess/index",
|
|
31
|
-
"rtl": "react-cli rtl ./src ./lib && react-cli rtl ./src ./es",
|
|
32
|
-
"lint": "react-cli lint",
|
|
33
|
-
"common_package_build": "cd ../common && npm run build && cd ../svg",
|
|
34
|
-
"docs": "react-cli docs",
|
|
35
|
-
"prepublishOnly": "node prePublish.js && npm run test && npm run download",
|
|
36
|
-
"postpublish": "node postPublish.js",
|
|
37
|
-
"download": "react-cli clean ./node_modules ./package-lock.json && npm install",
|
|
38
|
-
"test": "react-cli test",
|
|
39
|
-
"snap-update": "npm run test -- -u",
|
|
40
|
-
"expublish": "npm publish --tag experimental-version",
|
|
41
|
-
"cssVariableConvert": "react-cli variableConverter ./lib ./lib && react-cli variableConverter ./es ./es",
|
|
42
|
-
"variable:addignore": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableIgnore.js ./src",
|
|
43
|
-
"variable:convert": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/pxParserPostcss.js ./src",
|
|
44
|
-
"variable:check": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableErrorCheck.js ./src ./node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json"
|
|
45
|
-
},
|
|
46
|
-
"dependencies": {},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@zohodesk/variables": "1.0.0",
|
|
49
|
-
"@zohodesk-private/color-variable-preprocessor": "1.1.0",
|
|
50
|
-
"@svgr/cli": "6.2.1",
|
|
51
|
-
"@zohodesk-private/css-variable-migrator": "^1.0.7",
|
|
52
|
-
"@testing-library/jest-dom": "^5.11.9",
|
|
53
|
-
"@testing-library/react": "^11.2.5",
|
|
54
|
-
"@testing-library/react-hooks": "^7.0.2",
|
|
55
|
-
"@testing-library/user-event": "^13.0.10"
|
|
56
|
-
},
|
|
57
|
-
"peerDependencies": {
|
|
58
|
-
"@zohodesk/variables": "1.0.0"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@zohodesk/svg",
|
|
3
|
+
"version": "1.1.9",
|
|
4
|
+
"main": "lib/index",
|
|
5
|
+
"module": "es/index.js",
|
|
6
|
+
"jsnext:main": "es/index.js",
|
|
7
|
+
"private": false,
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"author": "Z Team",
|
|
12
|
+
"homepage": "https://www.npmjs.com/search?q=@zohodesk",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"DOT",
|
|
16
|
+
"ZOHODESK",
|
|
17
|
+
"ZTEAM",
|
|
18
|
+
"LIBRARY"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"clean": "react-cli clean lib es coverage assets && mkdir assets",
|
|
22
|
+
"build:lib": "react-cli build:component:cmjs",
|
|
23
|
+
"build:es": "react-cli build:library:es",
|
|
24
|
+
"build": "npm run build:lib && npm run build:es",
|
|
25
|
+
"build:local": " npm run build && npm run rtl && npm run cssVariableConvert",
|
|
26
|
+
"build:watch": "npm run clean && npm run build:variables && npm run build && npm run build:es --module:mode=dev -- -w",
|
|
27
|
+
"rtl:watch": "react-cli rtl ./src ./es -w",
|
|
28
|
+
"prepare": "npm run init && npm run build && npm run rtl && npm run cssVariableConvert",
|
|
29
|
+
"init": "npm run clean && npm run build:variables",
|
|
30
|
+
"build:variables": "react-cli clean ./assets && node ./preprocess/index",
|
|
31
|
+
"rtl": "react-cli rtl ./src ./lib && react-cli rtl ./src ./es",
|
|
32
|
+
"lint": "react-cli lint",
|
|
33
|
+
"common_package_build": "cd ../common && npm run build && cd ../svg",
|
|
34
|
+
"docs": "react-cli docs",
|
|
35
|
+
"prepublishOnly": "node prePublish.js && npm run test && npm run download",
|
|
36
|
+
"postpublish": "node postPublish.js",
|
|
37
|
+
"download": "react-cli clean ./node_modules ./package-lock.json && npm install",
|
|
38
|
+
"test": "react-cli test",
|
|
39
|
+
"snap-update": "npm run test -- -u",
|
|
40
|
+
"expublish": "npm publish --tag experimental-version",
|
|
41
|
+
"cssVariableConvert": "react-cli variableConverter ./lib ./lib && react-cli variableConverter ./es ./es",
|
|
42
|
+
"variable:addignore": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableIgnore.js ./src",
|
|
43
|
+
"variable:convert": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/pxParserPostcss.js ./src",
|
|
44
|
+
"variable:check": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableErrorCheck.js ./src ./node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@zohodesk/variables": "1.0.0",
|
|
49
|
+
"@zohodesk-private/color-variable-preprocessor": "1.1.0",
|
|
50
|
+
"@svgr/cli": "6.2.1",
|
|
51
|
+
"@zohodesk-private/css-variable-migrator": "^1.0.7",
|
|
52
|
+
"@testing-library/jest-dom": "^5.11.9",
|
|
53
|
+
"@testing-library/react": "^11.2.5",
|
|
54
|
+
"@testing-library/react-hooks": "^7.0.2",
|
|
55
|
+
"@testing-library/user-event": "^13.0.10"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@zohodesk/variables": "1.0.0"
|
|
59
|
+
}
|
|
60
|
+
}
|
package/postPublish.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const { execSync } = require('child_process');
|
|
2
|
-
const { version, name } = require('./package.json');
|
|
3
|
-
const tagName = `${name}@${version}`;
|
|
4
|
-
// const tagName = `${name.replace(/^@/g, "").replace(/\//g, "-")}-v-${version}}@${version}`;
|
|
5
|
-
console.log(`going to add git tag... ${tagName}`);
|
|
6
|
-
|
|
7
|
-
execSync(`git tag -a ${tagName} -m ${tagName}`, { stdio: 'inherit' });
|
|
8
|
-
execSync(`git push origin ${tagName}`, { stdio: 'inherit' });
|
|
1
|
+
const { execSync } = require('child_process');
|
|
2
|
+
const { version, name } = require('./package.json');
|
|
3
|
+
const tagName = `${name}@${version}`;
|
|
4
|
+
// const tagName = `${name.replace(/^@/g, "").replace(/\//g, "-")}-v-${version}}@${version}`;
|
|
5
|
+
console.log(`going to add git tag... ${tagName}`);
|
|
6
|
+
|
|
7
|
+
execSync(`git tag -a ${tagName} -m ${tagName}`, { stdio: 'inherit' });
|
|
8
|
+
execSync(`git push origin ${tagName}`, { stdio: 'inherit' });
|
package/prePublish.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
const readline = require('readline');
|
|
2
|
-
const { exec } = require('child_process');
|
|
3
|
-
|
|
4
|
-
const rl = readline.createInterface({
|
|
5
|
-
input: process.stdin,
|
|
6
|
-
output: process.stdout
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
console.log('\nNode.js version:', process.version);
|
|
10
|
-
|
|
11
|
-
function runConsole(command, callback) {
|
|
12
|
-
exec(command, (error, stdout, stderr) => {
|
|
13
|
-
if (error) {
|
|
14
|
-
console.error('Error:', error.message);
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (stderr) {
|
|
19
|
-
console.error('Error:', stderr);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const npmVersion = stdout.trim();
|
|
24
|
-
console.log('\n' + command, npmVersion);
|
|
25
|
-
callback && callback();
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function askQuestion1() {
|
|
30
|
-
rl.question('\nHave you updated the changelog in README.md? (yes/no): ', (answer) => {
|
|
31
|
-
if (answer.toLowerCase() === 'yes') {
|
|
32
|
-
console.log('\nGreat! Proceeding...');
|
|
33
|
-
askQuestion2();
|
|
34
|
-
// rl.close();
|
|
35
|
-
// Call the function or code to proceed further here.
|
|
36
|
-
} else if (answer.toLowerCase() === 'no') {
|
|
37
|
-
rl.close();
|
|
38
|
-
console.log('\nPlease Update the ChangeLog in README.md, then try again');
|
|
39
|
-
// throw new Error('\nPlease Update the ChangeLog in README.md, then try again');
|
|
40
|
-
process.exitCode = 1; // Exit the Node.js process with a success code.
|
|
41
|
-
} else {
|
|
42
|
-
console.log('\nInvalid answer. Please enter "yes" or "no".');
|
|
43
|
-
askQuestion1(); // Ask the question again if the input is not "yes" or "no".
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function askQuestion2() {
|
|
49
|
-
rl.question('\nHave you verified the test snapshot? (yes/no): ', (answer) => {
|
|
50
|
-
if (answer.toLowerCase() === 'yes') {
|
|
51
|
-
console.log('\nGreat! Proceeding...');
|
|
52
|
-
rl.close();
|
|
53
|
-
// Call the function or code to proceed further here.
|
|
54
|
-
} else if (answer.toLowerCase() === 'no') {
|
|
55
|
-
rl.close();
|
|
56
|
-
//throw new Error('\nPlease Verify the snapshot results, then try again');
|
|
57
|
-
console.log('\nPlease Verify the snapshot results, then try again');
|
|
58
|
-
process.exitCode = 1; // Exit the Node.js process with a success code.
|
|
59
|
-
} else {
|
|
60
|
-
console.log('\nInvalid answer. Please enter "yes" or "no".');
|
|
61
|
-
askQuestion2(); // Ask the question again if the input is not "yes" or "no".
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function getReactCliVersion() {
|
|
67
|
-
runConsole('react-cli --version', askQuestion1);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
runConsole('npm --version', getReactCliVersion);
|
|
1
|
+
const readline = require('readline');
|
|
2
|
+
const { exec } = require('child_process');
|
|
3
|
+
|
|
4
|
+
const rl = readline.createInterface({
|
|
5
|
+
input: process.stdin,
|
|
6
|
+
output: process.stdout
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
console.log('\nNode.js version:', process.version);
|
|
10
|
+
|
|
11
|
+
function runConsole(command, callback) {
|
|
12
|
+
exec(command, (error, stdout, stderr) => {
|
|
13
|
+
if (error) {
|
|
14
|
+
console.error('Error:', error.message);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (stderr) {
|
|
19
|
+
console.error('Error:', stderr);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const npmVersion = stdout.trim();
|
|
24
|
+
console.log('\n' + command, npmVersion);
|
|
25
|
+
callback && callback();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function askQuestion1() {
|
|
30
|
+
rl.question('\nHave you updated the changelog in README.md? (yes/no): ', (answer) => {
|
|
31
|
+
if (answer.toLowerCase() === 'yes') {
|
|
32
|
+
console.log('\nGreat! Proceeding...');
|
|
33
|
+
askQuestion2();
|
|
34
|
+
// rl.close();
|
|
35
|
+
// Call the function or code to proceed further here.
|
|
36
|
+
} else if (answer.toLowerCase() === 'no') {
|
|
37
|
+
rl.close();
|
|
38
|
+
console.log('\nPlease Update the ChangeLog in README.md, then try again');
|
|
39
|
+
// throw new Error('\nPlease Update the ChangeLog in README.md, then try again');
|
|
40
|
+
process.exitCode = 1; // Exit the Node.js process with a success code.
|
|
41
|
+
} else {
|
|
42
|
+
console.log('\nInvalid answer. Please enter "yes" or "no".');
|
|
43
|
+
askQuestion1(); // Ask the question again if the input is not "yes" or "no".
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function askQuestion2() {
|
|
49
|
+
rl.question('\nHave you verified the test snapshot? (yes/no): ', (answer) => {
|
|
50
|
+
if (answer.toLowerCase() === 'yes') {
|
|
51
|
+
console.log('\nGreat! Proceeding...');
|
|
52
|
+
rl.close();
|
|
53
|
+
// Call the function or code to proceed further here.
|
|
54
|
+
} else if (answer.toLowerCase() === 'no') {
|
|
55
|
+
rl.close();
|
|
56
|
+
//throw new Error('\nPlease Verify the snapshot results, then try again');
|
|
57
|
+
console.log('\nPlease Verify the snapshot results, then try again');
|
|
58
|
+
process.exitCode = 1; // Exit the Node.js process with a success code.
|
|
59
|
+
} else {
|
|
60
|
+
console.log('\nInvalid answer. Please enter "yes" or "no".');
|
|
61
|
+
askQuestion2(); // Ask the question again if the input is not "yes" or "no".
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function getReactCliVersion() {
|
|
67
|
+
runConsole('react-cli --version', askQuestion1);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
runConsole('npm --version', getReactCliVersion);
|
package/react-cli.config.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
exports.config= {
|
|
2
|
-
"preprocess": {
|
|
3
|
-
"runner": "./preprocess/index.js"
|
|
4
|
-
},
|
|
5
|
-
"css": {
|
|
6
|
-
"plugins": {
|
|
7
|
-
"hasRTL": true,
|
|
8
|
-
"cssVariableReplacement": true
|
|
9
|
-
},
|
|
10
|
-
"patterns": {
|
|
11
|
-
"cssVariableReplacement": [
|
|
12
|
-
"**/src/**",
|
|
13
|
-
"**/lib/**",
|
|
14
|
-
"**/es/**",
|
|
15
|
-
"!**/node_modules/**"
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
"cssVariableReplacementConfig": "./node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json"
|
|
19
|
-
}
|
|
1
|
+
exports.config= {
|
|
2
|
+
"preprocess": {
|
|
3
|
+
"runner": "./preprocess/index.js"
|
|
4
|
+
},
|
|
5
|
+
"css": {
|
|
6
|
+
"plugins": {
|
|
7
|
+
"hasRTL": true,
|
|
8
|
+
"cssVariableReplacement": true
|
|
9
|
+
},
|
|
10
|
+
"patterns": {
|
|
11
|
+
"cssVariableReplacement": [
|
|
12
|
+
"**/src/**",
|
|
13
|
+
"**/lib/**",
|
|
14
|
+
"**/es/**",
|
|
15
|
+
"!**/node_modules/**"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"cssVariableReplacementConfig": "./node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json"
|
|
19
|
+
}
|
|
20
20
|
}
|