@digest/scripts 4.9.0-next.1 → 4.9.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.
package/README.md CHANGED
@@ -1,32 +1,32 @@
1
1
  <div align="center">
2
- <img alt="Digest Crane" src="https://gitlab.com/digested/node-digest/raw/master/packages/webpack/share/favicon.png" />
2
+ <img alt="Digest Crane" src="https://gitlab.com/digested/node-digest/raw/master/packages/webpack/share/favicon.png" />
3
3
  </div><br>
4
4
 
5
5
  <div align="center">
6
- <h1>@digest/scripts</h1>
6
+ <h1>@digest/scripts</h1>
7
7
  </div>
8
8
 
9
9
  <div align="center">
10
- <a href="https://commitizen.github.io/cz-cli/"><img alt="Commitizen Friendly" src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?maxAge=2592000" /></a>
11
- <a href="https://github.com/semantic-release/semantic-release"><img alt="Semantic Release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?maxAge=2592000" /></a>
10
+ <a href="https://commitizen.github.io/cz-cli/"><img alt="Commitizen Friendly" src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?maxAge=2592000" /></a>
11
+ <a href="https://github.com/semantic-release/semantic-release"><img alt="Semantic Release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?maxAge=2592000" /></a>
12
12
  </div>
13
13
 
14
14
  <div align="center">
15
- <a href="https://gitlab.com/digested/node-digest/-/commits/master" target="_blank">
16
- <img alt="Status" aria-hidden="" src="https://gitlab.com/digested/node-digest/badges/master/pipeline.svg">
17
- </a>
18
- <a href="https://digested.gitlab.io/node-digest/coverage">
19
- <img alt="Coverage Report" src="https://gitlab.com/digested/node-digest/badges/master/coverage.svg" />
20
- </a>
21
- <a href="https://www.npmjs.org/package/@digest/webpack">
22
- <img alt="NPM Version" src="http://img.shields.io/npm/v/&#64;digest/scripts.svg?maxAge=86400" />
23
- </a>
24
- <a href="https://www.gnu.org/licenses/lgpl-3.0.en.html">
25
- <img alt="License LGPL 3.0 or later" src="https://img.shields.io/npm/l/&#64;digest/scripts.svg?maxAge=2592000" />
26
- </a>
27
- <a href="https://github.com/gajus/eslint-config-canonical">
28
- <img alt="Code Style Canonical" src="https://img.shields.io/badge/code%20style-canonical-blue.svg?maxAge=2592000" />
29
- </a>
15
+ <a href="https://gitlab.com/digested/node-digest/-/commits/master" target="_blank">
16
+ <img alt="Status" aria-hidden="" src="https://gitlab.com/digested/node-digest/badges/master/pipeline.svg">
17
+ </a>
18
+ <a href="https://digested.gitlab.io/node-digest/coverage">
19
+ <img alt="Coverage Report" src="https://gitlab.com/digested/node-digest/badges/master/coverage.svg" />
20
+ </a>
21
+ <a href="https://www.npmjs.org/package/@digest/webpack">
22
+ <img alt="NPM Version" src="http://img.shields.io/npm/v/&#64;digest/scripts.svg?maxAge=86400" />
23
+ </a>
24
+ <a href="https://www.gnu.org/licenses/lgpl-3.0.en.html">
25
+ <img alt="License LGPL 3.0 or later" src="https://img.shields.io/npm/l/&#64;digest/scripts.svg?maxAge=2592000" />
26
+ </a>
27
+ <a href="https://github.com/gajus/eslint-config-canonical">
28
+ <img alt="Code Style Canonical" src="https://img.shields.io/badge/code%20style-canonical-blue.svg?maxAge=2592000" />
29
+ </a>
30
30
  </div>
31
31
  <br />
32
32
  <br />
@@ -6,6 +6,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const getBool_1 = __importDefault(require("./getBool"));
7
7
  const consume = (type, setting) => {
8
8
  switch (type) {
9
+ case 'bool': {
10
+ return (0, getBool_1.default)(setting);
11
+ }
12
+ case 'both': {
13
+ return (0, getBool_1.default)(setting, true);
14
+ }
15
+ case 'false': {
16
+ return (0, getBool_1.default)(setting, false);
17
+ }
18
+ case 'number': {
19
+ const number = Number(setting);
20
+ return Number.isNaN(number) ?
21
+ undefined :
22
+ number;
23
+ }
9
24
  case 'obj': {
10
25
  if (setting &&
11
26
  Object.prototype.toString.call(setting) === '[object String]') {
@@ -15,24 +30,9 @@ const consume = (type, setting) => {
15
30
  return setting || {};
16
31
  }
17
32
  }
18
- case 'number': {
19
- const number = Number(setting);
20
- return Number.isNaN(number) ?
21
- undefined :
22
- number;
23
- }
24
- case 'bool': {
25
- return (0, getBool_1.default)(setting);
26
- }
27
33
  case 'true': {
28
34
  return (0, getBool_1.default)(setting, true);
29
35
  }
30
- case 'false': {
31
- return (0, getBool_1.default)(setting, false);
32
- }
33
- case 'both': {
34
- return (0, getBool_1.default)(setting, true);
35
- }
36
36
  case 'string':
37
37
  default: {
38
38
  return setting;
@@ -64,16 +64,16 @@ const config = settings_1.keys.reduce((prev, key) => {
64
64
  resolveSetting;
65
65
  break;
66
66
  }
67
- case 'shortName': {
68
- prev[key] = (_e = (_b = transformedEnvSetting !== null && transformedEnvSetting !== void 0 ? transformedEnvSetting : transformedConfigSetting) !== null && _b !== void 0 ? _b : (_d = (_c = package_1.default === null || package_1.default === void 0 ? void 0 : package_1.default.name) === null || _c === void 0 ? void 0 : _c.replace('@', '')) === null || _d === void 0 ? void 0 : _d.replace('/', '-')) !== null && _e !== void 0 ? _e : 'nd';
69
- break;
70
- }
71
67
  case 'reports': {
72
68
  prev[key] = resolveSetting === 'reports' ?
73
69
  node_path_1.default.join(cwd, 'reports') :
74
70
  resolveSetting;
75
71
  break;
76
72
  }
73
+ case 'shortName': {
74
+ prev[key] = (_e = (_b = transformedEnvSetting !== null && transformedEnvSetting !== void 0 ? transformedEnvSetting : transformedConfigSetting) !== null && _b !== void 0 ? _b : (_d = (_c = package_1.default === null || package_1.default === void 0 ? void 0 : package_1.default.name) === null || _c === void 0 ? void 0 : _c.replace('@', '')) === null || _d === void 0 ? void 0 : _d.replace('/', '-')) !== null && _e !== void 0 ? _e : 'nd';
75
+ break;
76
+ }
77
77
  default: {
78
78
  prev[key] = resolveSetting;
79
79
  }
@@ -3,7 +3,7 @@ declare const settings: {
3
3
  defaults: boolean | number | string;
4
4
  env: string;
5
5
  ignore?: boolean;
6
- packageName: string | false;
6
+ packageName: false | string;
7
7
  resolve: boolean;
8
8
  type: "bool" | "both" | "false" | "number" | "obj" | "string" | "true";
9
9
  };
@@ -13,7 +13,7 @@ type completeDigest = {
13
13
  angular: boolean;
14
14
  appHost: string;
15
15
  appPort: number;
16
- babel: string | false;
16
+ babel: false | string;
17
17
  babelAngular: boolean;
18
18
  babelEmotion: boolean;
19
19
  babelFlow: boolean;
@@ -24,8 +24,8 @@ type completeDigest = {
24
24
  babelReactNative: boolean;
25
25
  babelTypeScript: boolean;
26
26
  baseHref: string;
27
- baseHrefHtml: string | false;
28
- cache: string | false;
27
+ baseHrefHtml: false | string;
28
+ cache: false | string;
29
29
  compression: boolean;
30
30
  context: string;
31
31
  cssModules: boolean;
@@ -35,7 +35,7 @@ type completeDigest = {
35
35
  env: {
36
36
  [key: string]: number | string;
37
37
  };
38
- eslint: string | false;
38
+ eslint: false | string;
39
39
  eslintAngular: boolean;
40
40
  eslintBabel: boolean;
41
41
  eslintEmotion: boolean;
@@ -45,12 +45,12 @@ type completeDigest = {
45
45
  eslintReact: boolean;
46
46
  eslintReactNative: boolean;
47
47
  eslintTypeScript: boolean;
48
- favicon: string | false;
49
- flow: string | false;
48
+ favicon: false | string;
49
+ flow: false | string;
50
50
  graphql: boolean;
51
51
  graphqlSchema: string;
52
52
  hashLimit: number;
53
- indexHtml: string | false;
53
+ indexHtml: false | string;
54
54
  jest: boolean;
55
55
  jestBabel: boolean;
56
56
  jestEmotion: boolean;
@@ -62,14 +62,14 @@ type completeDigest = {
62
62
  library: boolean;
63
63
  minimize: boolean;
64
64
  parallel: boolean;
65
- polyfills: string | false;
65
+ polyfills: false | string;
66
66
  postcss: string;
67
67
  postcssWhitelist: string;
68
68
  pwa: boolean;
69
69
  react: boolean;
70
70
  reactNative: boolean;
71
71
  reactNativeWeb: boolean;
72
- reports: string | false;
72
+ reports: false | string;
73
73
  seleniumChromeDriver: string;
74
74
  seleniumDriver: string;
75
75
  seleniumGeckoDriver: string;
@@ -81,7 +81,7 @@ type completeDigest = {
81
81
  sourceMaps: boolean;
82
82
  sourcePath: string;
83
83
  staticPath: string;
84
- stylelint: string | false;
84
+ stylelint: false | string;
85
85
  stylelintIgnore: string;
86
86
  typescript: string;
87
87
  webpack: string;
@@ -98,9 +98,9 @@ type completeDigest = {
98
98
  webpackTypeScript: boolean;
99
99
  webpackWorkbox: boolean;
100
100
  };
101
- type digest = Omit<Partial<completeDigest>, 'context'> & {
101
+ type digest = {
102
102
  angular?: false;
103
- babel?: string | false;
103
+ babel?: false | string;
104
104
  babelAngular?: false;
105
105
  babelEmotion?: false;
106
106
  babelFlow?: false;
@@ -110,10 +110,10 @@ type digest = Omit<Partial<completeDigest>, 'context'> & {
110
110
  babelReact?: false;
111
111
  babelReactNative?: false;
112
112
  babelTypeScript?: false;
113
- cache?: string | false;
113
+ cache?: false | string;
114
114
  compression?: false;
115
115
  cssModules?: true;
116
- eslint?: string | false;
116
+ eslint?: false | string;
117
117
  eslintAngular?: false;
118
118
  eslintBabel?: false;
119
119
  eslintEmotion?: false;
@@ -123,8 +123,8 @@ type digest = Omit<Partial<completeDigest>, 'context'> & {
123
123
  eslintReact?: false;
124
124
  eslintReactNative?: false;
125
125
  eslintTypeScript?: false;
126
- favicon?: string | false;
127
- flow?: string | false;
126
+ favicon?: false | string;
127
+ flow?: false | string;
128
128
  graphql?: false;
129
129
  jest?: false;
130
130
  jestBabel?: false;
@@ -136,16 +136,16 @@ type digest = Omit<Partial<completeDigest>, 'context'> & {
136
136
  library?: true;
137
137
  minimize?: false;
138
138
  parallel?: false;
139
- polyfills?: string | false;
140
- postcss?: string | false;
139
+ polyfills?: false | string;
140
+ postcss?: false | string;
141
141
  pwa?: true;
142
142
  react?: false;
143
143
  reactNative?: false;
144
144
  reactNativeWeb?: true;
145
- reports?: string | false;
145
+ reports?: false | string;
146
146
  sourceMaps?: false;
147
- stylelint?: string | false;
148
- typescript?: string | false;
147
+ stylelint?: false | string;
148
+ typescript?: false | string;
149
149
  webpackAngular?: false;
150
150
  webpackBabel?: false;
151
151
  webpackDashboard?: false;
@@ -158,7 +158,7 @@ type digest = Omit<Partial<completeDigest>, 'context'> & {
158
158
  webpackStyleLint?: false;
159
159
  webpackTypeScript?: false;
160
160
  webpackWorkbox?: false;
161
- };
161
+ } & Omit<Partial<completeDigest>, 'context'>;
162
162
  export default settings;
163
163
  export { keys };
164
164
  export type { completeDigest, digest };
package/package.json CHANGED
@@ -1,47 +1,47 @@
1
1
  {
2
- "name": "@digest/scripts",
3
- "title": "Digest Scripts",
4
- "license": "LGPL-3.0-or-later",
5
- "version": "4.9.0-next.1",
6
- "description": "Helper scripts for various digests",
7
- "author": "wallzero @wallzeroblog (http://wallzero.com)",
8
- "contributors": [
9
- {
10
- "name": "Connor Schlesiger",
11
- "email": "connor@schlesiger.ca",
12
- "position": "Initial and Lead Developer"
13
- }
14
- ],
15
- "main": "dist/index.js",
16
- "types": "dist/index.d.ts",
17
- "files": [
18
- "/dist/**/*",
19
- "COPYING.md",
20
- "COPYING.LESSER.md"
21
- ],
22
- "homepage": "https://gitlab.com/digested/node-digest/tree/master/packages/scripts",
23
- "repository": {
24
- "type": "git",
25
- "url": "https://gitlab.com/digested/node-digest.git"
26
- },
27
- "bugs": {
28
- "url": "https://gitlab.com/digested/node-digest/issues"
29
- },
30
- "scripts": {
31
- "build": "tsc",
32
- "lint": "run-p lint:es",
33
- "lint:es": "eslint 'src/**/*.[jt]s?(x)' --ignore-pattern 'src/**/*.(d.ts|json)'",
34
- "clean": "rimraf node_modules dist package-lock.json npm-debug.log"
35
- },
36
- "devDependencies": {
37
- "@types/node": "^22.9.0"
38
- },
39
- "dependencies": {
40
- "find-up": "5.0.0"
41
- },
42
- "keywords": [
43
- "digest",
44
- "scripts"
45
- ],
46
- "gitHead": "b688a4c51cca87f2d45d389717dd3e879fcde057"
2
+ "name": "@digest/scripts",
3
+ "title": "Digest Scripts",
4
+ "license": "LGPL-3.0-or-later",
5
+ "version": "4.9.1",
6
+ "description": "Helper scripts for various digests",
7
+ "author": "wallzero @wallzeroblog (http://wallzero.com)",
8
+ "contributors": [
9
+ {
10
+ "name": "Connor Schlesiger",
11
+ "email": "connor@schlesiger.ca",
12
+ "position": "Initial and Lead Developer"
13
+ }
14
+ ],
15
+ "main": "dist/index.js",
16
+ "types": "dist/index.d.ts",
17
+ "files": [
18
+ "/dist/**/*",
19
+ "COPYING.md",
20
+ "COPYING.LESSER.md"
21
+ ],
22
+ "homepage": "https://gitlab.com/digested/node-digest/tree/master/packages/scripts",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://gitlab.com/digested/node-digest.git"
26
+ },
27
+ "bugs": {
28
+ "url": "https://gitlab.com/digested/node-digest/issues"
29
+ },
30
+ "scripts": {
31
+ "build": "tsc",
32
+ "lint": "run-p lint:es",
33
+ "lint:es": "eslint",
34
+ "clean": "rimraf node_modules dist package-lock.json npm-debug.log"
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^22.9.0"
38
+ },
39
+ "dependencies": {
40
+ "find-up": "5.0.0"
41
+ },
42
+ "keywords": [
43
+ "digest",
44
+ "scripts"
45
+ ],
46
+ "gitHead": "398df78c965747e91231f8ecf6635331b03484af"
47
47
  }