@storm-software/cloudflare-tools 0.71.89 → 0.71.91

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 (41) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-P42MQNVF.mjs → chunk-536H3WK5.mjs} +18 -1
  4. package/dist/{chunk-IH7USDLX.js → chunk-COUZEHRU.js} +18 -18
  5. package/dist/{chunk-52X4GPEN.mjs → chunk-EXZP5MWY.mjs} +28 -7
  6. package/dist/{chunk-QWSTQIUA.js → chunk-GBAVURC4.js} +51 -34
  7. package/dist/{chunk-K4WFZ4BY.js → chunk-GG5WUYIL.js} +39 -39
  8. package/dist/{chunk-6JVDTXHT.js → chunk-JCQYTCUM.js} +5 -5
  9. package/dist/{chunk-3IB2OBMA.mjs → chunk-KM2LU3WU.mjs} +39 -39
  10. package/dist/{chunk-SYYVQEM6.js → chunk-LZPNL75H.js} +13 -13
  11. package/dist/{chunk-APKXAMXO.mjs → chunk-P53OIJC5.mjs} +10 -10
  12. package/dist/{chunk-2KWRE5Y5.js → chunk-PVCPJUY2.js} +28 -7
  13. package/dist/{chunk-E7SXH3BE.js → chunk-QY2K3DFK.js} +168 -168
  14. package/dist/{chunk-3G3KRE5C.mjs → chunk-RQTOQ3CF.mjs} +3 -3
  15. package/dist/chunk-UTKIVUDT.js +266 -0
  16. package/dist/{chunk-C26E7UHD.js → chunk-WDNXEDWS.js} +20 -20
  17. package/dist/chunk-XFZ2V7ZD.mjs +269 -0
  18. package/dist/{chunk-3SX7VAO7.mjs → chunk-XVKPJL76.mjs} +3 -3
  19. package/dist/{chunk-C6CPSE5U.mjs → chunk-YQSDJFL7.mjs} +3 -3
  20. package/dist/{chunk-OPXJUL5V.mjs → chunk-Z7TZ4UY6.mjs} +1 -1
  21. package/dist/executors.js +5 -5
  22. package/dist/executors.mjs +5 -5
  23. package/dist/generators.js +5 -5
  24. package/dist/generators.mjs +4 -4
  25. package/dist/index.js +8 -8
  26. package/dist/index.mjs +7 -7
  27. package/dist/src/executors/cloudflare-publish/executor.js +3 -3
  28. package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
  29. package/dist/src/executors/r2-upload-publish/executor.js +5 -5
  30. package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
  31. package/dist/src/executors/serve/executor.js +4 -4
  32. package/dist/src/executors/serve/executor.mjs +3 -3
  33. package/dist/src/generators/init/generator.js +2 -2
  34. package/dist/src/generators/init/generator.mjs +1 -1
  35. package/dist/src/generators/worker/generator.js +5 -5
  36. package/dist/src/generators/worker/generator.mjs +4 -4
  37. package/dist/src/utils/index.js +3 -3
  38. package/dist/src/utils/index.mjs +2 -2
  39. package/dist/src/utils/r2-bucket-helpers.js +3 -3
  40. package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
  41. package/package.json +41 -41
@@ -7,24 +7,31 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
7
7
  "package.json"(exports, module) {
8
8
  module.exports = {
9
9
  name: "@storm-software/cloudflare-tools",
10
- version: "0.71.88",
10
+ version: "0.71.90",
11
+ private: false,
11
12
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
13
+ keywords: [
14
+ "monorepo",
15
+ "open-system",
16
+ "storm",
17
+ "storm-ops",
18
+ "storm-stack",
19
+ "stormstack",
20
+ "sullivanpj"
21
+ ],
22
+ homepage: "https://stormsoftware.com",
23
+ bugs: "https://github.com/storm-software/storm-ops/issues",
12
24
  repository: {
13
25
  type: "github",
14
26
  url: "https://github.com/storm-software/storm-ops",
15
27
  directory: "packages/cloudflare-tools"
16
28
  },
17
- homepage: "https://stormsoftware.com",
18
- bugs: "https://github.com/storm-software/storm-ops/issues",
29
+ license: "Apache-2.0",
19
30
  author: {
20
31
  name: "Storm Software",
21
32
  email: "contact@stormsoftware.com",
22
33
  url: "https://stormsoftware.com"
23
34
  },
24
- license: "Apache-2.0",
25
- private: false,
26
- main: "dist/index.js",
27
- module: "dist/index.mjs",
28
35
  exports: {
29
36
  "./package.json": "./package.json",
30
37
  "./docs/*": "./docs/*",
@@ -121,24 +128,37 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
121
128
  "./generators/*/generator.js": "./dist/src/generators/*/generator.js",
122
129
  "./plugin": "./dist/src/plugins/index.js"
123
130
  },
131
+ main: "dist/index.js",
132
+ module: "dist/index.mjs",
124
133
  typings: "dist/index.d.ts",
125
- keywords: [
126
- "monorepo",
127
- "open-system",
128
- "storm",
129
- "storm-ops",
130
- "storm-stack",
131
- "stormstack",
132
- "sullivanpj"
133
- ],
134
+ dependencies: {
135
+ "@aws-sdk/client-s3": "^3.1012.0",
136
+ "@aws-sdk/lib-storage": "^3.1012.0",
137
+ "@smithy/node-http-handler": "^4.5.0",
138
+ defu: "catalog:",
139
+ glob: "catalog:",
140
+ "mime-types": "^3.0.2",
141
+ "pretty-bytes": "^7.1.0"
142
+ },
143
+ devDependencies: {
144
+ "@nx/devkit": "catalog:",
145
+ "@nx/node": "catalog:",
146
+ "@nx/web": "catalog:",
147
+ "@nx/webpack": "catalog:",
148
+ "@smithy/protocol-http": "^5.3.12",
149
+ nx: "catalog:",
150
+ tsup: "catalog:",
151
+ untyped: "catalog:",
152
+ wrangler: "^4.75.0"
153
+ },
134
154
  peerDependencies: {
135
155
  "@nx/devkit": "catalog:",
136
156
  "@nx/js": "catalog:",
137
157
  "@nx/node": "catalog:",
138
158
  "@nx/web": "catalog:",
139
- "@storm-software/config": "1.135.39",
140
- "@storm-software/config-tools": "1.189.38",
141
- "@storm-software/workspace-tools": "1.295.14",
159
+ "@storm-software/config": "1.135.41",
160
+ "@storm-software/config-tools": "1.189.40",
161
+ "@storm-software/workspace-tools": "1.295.16",
142
162
  nx: "catalog:",
143
163
  tsup: "catalog:",
144
164
  wrangler: ">=3.58.0"
@@ -163,26 +183,6 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
163
183
  optional: false
164
184
  }
165
185
  },
166
- dependencies: {
167
- "@aws-sdk/client-s3": "^3.1010.0",
168
- "@aws-sdk/lib-storage": "^3.1010.0",
169
- "@smithy/node-http-handler": "^4.5.0",
170
- defu: "catalog:",
171
- glob: "catalog:",
172
- "mime-types": "^3.0.2",
173
- "pretty-bytes": "^7.1.0"
174
- },
175
- devDependencies: {
176
- "@nx/devkit": "catalog:",
177
- "@nx/node": "catalog:",
178
- "@nx/web": "catalog:",
179
- "@nx/webpack": "catalog:",
180
- "@smithy/protocol-http": "^5.3.12",
181
- nx: "catalog:",
182
- tsup: "catalog:",
183
- untyped: "catalog:",
184
- wrangler: "^4.74.0"
185
- },
186
186
  publishConfig: {
187
187
  access: "public"
188
188
  },
@@ -3,15 +3,15 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk2KWRE5Y5js = require('./chunk-2KWRE5Y5.js');
6
+ var _chunkPVCPJUY2js = require('./chunk-PVCPJUY2.js');
7
7
 
8
8
  // src/utils/r2-bucket-helpers.ts
9
9
  var _libstorage = require('@aws-sdk/lib-storage');
10
10
  var _crypto = require('crypto');
11
11
  var _prettybytes = require('pretty-bytes'); var _prettybytes2 = _interopRequireDefault(_prettybytes);
12
12
  async function uploadFile(client, bucketName, bucketPath, fileName, version, fileContent, contentType = "application/octet-stream", isDryRun = false) {
13
- const key = _optionalChain([(!_optionalChain([bucketPath, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]) || _optionalChain([bucketPath, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) === "/" ? fileName : _chunk2KWRE5Y5js.joinPaths.call(void 0, bucketPath.trim(), fileName)), 'optionalAccess', _5 => _5.replace, 'call', _6 => _6(/^\/+/g, "")]) || "";
14
- _chunk2KWRE5Y5js.writeDebug.call(void 0,
13
+ const key = _optionalChain([(!_optionalChain([bucketPath, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]) || _optionalChain([bucketPath, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) === "/" ? fileName : _chunkPVCPJUY2js.joinPaths.call(void 0, bucketPath.trim(), fileName)), 'optionalAccess', _5 => _5.replace, 'call', _6 => _6(/^\/+/g, "")]) || "";
14
+ _chunkPVCPJUY2js.writeDebug.call(void 0,
15
15
  `Uploading ${key} (content-type: ${contentType}, size: ${_prettybytes2.default.call(void 0,
16
16
  Buffer.byteLength(fileContent, getEncoding(contentType))
17
17
  )}) to the ${bucketName} R2 bucket`
@@ -33,10 +33,10 @@ async function uploadFile(client, bucketName, bucketPath, fileName, version, fil
33
33
  });
34
34
  await upload.done();
35
35
  } else {
36
- _chunk2KWRE5Y5js.writeWarning.call(void 0, "[Dry run]: Skipping upload to the R2 bucket.");
36
+ _chunkPVCPJUY2js.writeWarning.call(void 0, "[Dry run]: Skipping upload to the R2 bucket.");
37
37
  }
38
38
  } catch (error) {
39
- _chunk2KWRE5Y5js.writeError.call(void 0, `Failed to upload ${key} to the ${bucketName} R2 bucket.`);
39
+ _chunkPVCPJUY2js.writeError.call(void 0, `Failed to upload ${key} to the ${bucketName} R2 bucket.`);
40
40
  throw error;
41
41
  }
42
42
  }
@@ -7,24 +7,31 @@ var require_package = __commonJS({
7
7
  "package.json"(exports, module) {
8
8
  module.exports = {
9
9
  name: "@storm-software/cloudflare-tools",
10
- version: "0.71.88",
10
+ version: "0.71.90",
11
+ private: false,
11
12
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
13
+ keywords: [
14
+ "monorepo",
15
+ "open-system",
16
+ "storm",
17
+ "storm-ops",
18
+ "storm-stack",
19
+ "stormstack",
20
+ "sullivanpj"
21
+ ],
22
+ homepage: "https://stormsoftware.com",
23
+ bugs: "https://github.com/storm-software/storm-ops/issues",
12
24
  repository: {
13
25
  type: "github",
14
26
  url: "https://github.com/storm-software/storm-ops",
15
27
  directory: "packages/cloudflare-tools"
16
28
  },
17
- homepage: "https://stormsoftware.com",
18
- bugs: "https://github.com/storm-software/storm-ops/issues",
29
+ license: "Apache-2.0",
19
30
  author: {
20
31
  name: "Storm Software",
21
32
  email: "contact@stormsoftware.com",
22
33
  url: "https://stormsoftware.com"
23
34
  },
24
- license: "Apache-2.0",
25
- private: false,
26
- main: "dist/index.js",
27
- module: "dist/index.mjs",
28
35
  exports: {
29
36
  "./package.json": "./package.json",
30
37
  "./docs/*": "./docs/*",
@@ -121,24 +128,37 @@ var require_package = __commonJS({
121
128
  "./generators/*/generator.js": "./dist/src/generators/*/generator.js",
122
129
  "./plugin": "./dist/src/plugins/index.js"
123
130
  },
131
+ main: "dist/index.js",
132
+ module: "dist/index.mjs",
124
133
  typings: "dist/index.d.ts",
125
- keywords: [
126
- "monorepo",
127
- "open-system",
128
- "storm",
129
- "storm-ops",
130
- "storm-stack",
131
- "stormstack",
132
- "sullivanpj"
133
- ],
134
+ dependencies: {
135
+ "@aws-sdk/client-s3": "^3.1012.0",
136
+ "@aws-sdk/lib-storage": "^3.1012.0",
137
+ "@smithy/node-http-handler": "^4.5.0",
138
+ defu: "catalog:",
139
+ glob: "catalog:",
140
+ "mime-types": "^3.0.2",
141
+ "pretty-bytes": "^7.1.0"
142
+ },
143
+ devDependencies: {
144
+ "@nx/devkit": "catalog:",
145
+ "@nx/node": "catalog:",
146
+ "@nx/web": "catalog:",
147
+ "@nx/webpack": "catalog:",
148
+ "@smithy/protocol-http": "^5.3.12",
149
+ nx: "catalog:",
150
+ tsup: "catalog:",
151
+ untyped: "catalog:",
152
+ wrangler: "^4.75.0"
153
+ },
134
154
  peerDependencies: {
135
155
  "@nx/devkit": "catalog:",
136
156
  "@nx/js": "catalog:",
137
157
  "@nx/node": "catalog:",
138
158
  "@nx/web": "catalog:",
139
- "@storm-software/config": "1.135.39",
140
- "@storm-software/config-tools": "1.189.38",
141
- "@storm-software/workspace-tools": "1.295.14",
159
+ "@storm-software/config": "1.135.41",
160
+ "@storm-software/config-tools": "1.189.40",
161
+ "@storm-software/workspace-tools": "1.295.16",
142
162
  nx: "catalog:",
143
163
  tsup: "catalog:",
144
164
  wrangler: ">=3.58.0"
@@ -163,26 +183,6 @@ var require_package = __commonJS({
163
183
  optional: false
164
184
  }
165
185
  },
166
- dependencies: {
167
- "@aws-sdk/client-s3": "^3.1010.0",
168
- "@aws-sdk/lib-storage": "^3.1010.0",
169
- "@smithy/node-http-handler": "^4.5.0",
170
- defu: "catalog:",
171
- glob: "catalog:",
172
- "mime-types": "^3.0.2",
173
- "pretty-bytes": "^7.1.0"
174
- },
175
- devDependencies: {
176
- "@nx/devkit": "catalog:",
177
- "@nx/node": "catalog:",
178
- "@nx/web": "catalog:",
179
- "@nx/webpack": "catalog:",
180
- "@smithy/protocol-http": "^5.3.12",
181
- nx: "catalog:",
182
- tsup: "catalog:",
183
- untyped: "catalog:",
184
- wrangler: "^4.74.0"
185
- },
186
186
  publishConfig: {
187
187
  access: "public"
188
188
  },
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkK4WFZ4BYjs = require('./chunk-K4WFZ4BY.js');
3
+ var _chunkGG5WUYILjs = require('./chunk-GG5WUYIL.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkQWSTQIUAjs = require('./chunk-QWSTQIUA.js');
7
+ var _chunkGBAVURC4js = require('./chunk-GBAVURC4.js');
8
8
 
9
9
 
10
10
 
@@ -13,7 +13,7 @@ var _chunkQWSTQIUAjs = require('./chunk-QWSTQIUA.js');
13
13
 
14
14
 
15
15
 
16
- var _chunk2KWRE5Y5js = require('./chunk-2KWRE5Y5.js');
16
+ var _chunkPVCPJUY2js = require('./chunk-PVCPJUY2.js');
17
17
 
18
18
  // src/generators/worker/generator.ts
19
19
 
@@ -46,23 +46,23 @@ var vitestScript = `"test": "vitest run"`;
46
46
 
47
47
  // src/generators/worker/generator.ts
48
48
  async function applicationGenerator(tree, schema) {
49
- const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, "Storm Worker generator");
49
+ const stopwatch = _chunkPVCPJUY2js.getStopwatch.call(void 0, "Storm Worker generator");
50
50
  let config;
51
51
  try {
52
- const workspaceRoot = _chunkQWSTQIUAjs.findWorkspaceRoot.call(void 0, );
53
- config = await _chunkQWSTQIUAjs.getConfig.call(void 0, workspaceRoot);
54
- _chunk2KWRE5Y5js.writeInfo.call(void 0,
55
- `${_chunk2KWRE5Y5js.brandIcon.call(void 0, config)} Running the Storm Worker generator...
52
+ const workspaceRoot = _chunkGBAVURC4js.findWorkspaceRoot.call(void 0, );
53
+ config = await _chunkGBAVURC4js.getConfig.call(void 0, workspaceRoot);
54
+ _chunkPVCPJUY2js.writeInfo.call(void 0,
55
+ `${_chunkPVCPJUY2js.brandIcon.call(void 0, config)} Running the Storm Worker generator...
56
56
 
57
57
  `,
58
58
  config
59
59
  );
60
- _chunk2KWRE5Y5js.writeDebug.call(void 0,
60
+ _chunkPVCPJUY2js.writeDebug.call(void 0,
61
61
  `Loading the Storm Config from environment variables and storm.json file...
62
62
  - workspaceRoot: ${workspaceRoot}`,
63
63
  config
64
64
  );
65
- _chunk2KWRE5Y5js.writeTrace.call(void 0,
65
+ _chunkPVCPJUY2js.writeTrace.call(void 0,
66
66
  `Loaded Storm config into env:
67
67
  ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
68
68
  config
@@ -70,7 +70,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
70
70
  const options = await normalizeOptions(tree, schema, config);
71
71
  const tasks = [];
72
72
  tasks.push(
73
- await _chunkK4WFZ4BYjs.generator_default.call(void 0, tree, {
73
+ await _chunkGG5WUYILjs.generator_default.call(void 0, tree, {
74
74
  ...options,
75
75
  skipFormat: true
76
76
  })
@@ -138,11 +138,11 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
138
138
  return _devkit.runTasksInSerial.call(void 0, ...tasks);
139
139
  } catch (error) {
140
140
  return () => {
141
- _chunk2KWRE5Y5js.writeFatal.call(void 0,
141
+ _chunkPVCPJUY2js.writeFatal.call(void 0,
142
142
  "A fatal error occurred while running the generator - the process was forced to terminate",
143
143
  config
144
144
  );
145
- _chunk2KWRE5Y5js.writeError.call(void 0,
145
+ _chunkPVCPJUY2js.writeError.call(void 0,
146
146
  `An exception was thrown in the generator's process
147
147
  - Details: ${error.message}
148
148
  - Stacktrace: ${error.stack}`,
@@ -1,8 +1,3 @@
1
- import {
2
- getEncoding,
3
- getInternalDependencies,
4
- uploadFile
5
- } from "./chunk-OPXJUL5V.mjs";
6
1
  import {
7
2
  createCliOptions,
8
3
  getPackageInfo
@@ -10,7 +5,15 @@ import {
10
5
  import {
11
6
  findWorkspaceRoot,
12
7
  getConfig
13
- } from "./chunk-P42MQNVF.mjs";
8
+ } from "./chunk-536H3WK5.mjs";
9
+ import {
10
+ createHttpHandler
11
+ } from "./chunk-SWYYMID7.mjs";
12
+ import {
13
+ getEncoding,
14
+ getInternalDependencies,
15
+ uploadFile
16
+ } from "./chunk-Z7TZ4UY6.mjs";
14
17
  import {
15
18
  correctPaths,
16
19
  joinPaths,
@@ -18,10 +21,7 @@ import {
18
21
  writeSuccess,
19
22
  writeTrace,
20
23
  writeWarning
21
- } from "./chunk-52X4GPEN.mjs";
22
- import {
23
- createHttpHandler
24
- } from "./chunk-SWYYMID7.mjs";
24
+ } from "./chunk-EXZP5MWY.mjs";
25
25
 
26
26
  // src/executors/r2-upload-publish/executor.ts
27
27
  import {
@@ -9,6 +9,7 @@ var LogLevel = {
9
9
  WARN: 30,
10
10
  SUCCESS: 35,
11
11
  INFO: 40,
12
+ PERFORMANCE: 50,
12
13
  DEBUG: 60,
13
14
  TRACE: 70,
14
15
  ALL: 100
@@ -20,6 +21,7 @@ var LogLevelLabel = {
20
21
  WARN: "warn",
21
22
  SUCCESS: "success",
22
23
  INFO: "info",
24
+ PERFORMANCE: "performance",
23
25
  DEBUG: "debug",
24
26
  TRACE: "trace",
25
27
  ALL: "all"
@@ -39,6 +41,7 @@ var DEFAULT_COLOR_CONFIG = {
39
41
  warning: "#e3b341",
40
42
  danger: "#D8314A",
41
43
  fatal: "#51070f",
44
+ performance: "#83ff83",
42
45
  link: "#3fa6ff",
43
46
  positive: "#22c55e",
44
47
  negative: "#dc2626",
@@ -56,6 +59,7 @@ var DEFAULT_COLOR_CONFIG = {
56
59
  warning: "#f3d371",
57
60
  danger: "#D8314A",
58
61
  fatal: "#a40e26",
62
+ performance: "#00ff00",
59
63
  link: "#3fa6ff",
60
64
  positive: "#22c55e",
61
65
  negative: "#dc2626",
@@ -143,6 +147,7 @@ var CONSOLE_ICONS = {
143
147
  [LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
144
148
  [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
145
149
  [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
150
+ [LogLevelLabel.PERFORMANCE]: useIcon("\u23F1", "\u23F1"),
146
151
  [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
147
152
  [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
148
153
  [LogLevelLabel.TRACE]: useIcon("\u2699", "T"),
@@ -163,6 +168,8 @@ var getLogLevel = (label) => {
163
168
  return LogLevel.TRACE;
164
169
  case "debug":
165
170
  return LogLevel.DEBUG;
171
+ case "performance":
172
+ return LogLevel.PERFORMANCE;
166
173
  case "info":
167
174
  return LogLevel.INFO;
168
175
  case "warn":
@@ -187,6 +194,9 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
187
194
  if (logLevel >= LogLevel.DEBUG) {
188
195
  return LogLevelLabel.DEBUG;
189
196
  }
197
+ if (logLevel >= LogLevel.PERFORMANCE) {
198
+ return LogLevelLabel.PERFORMANCE;
199
+ }
190
200
  if (logLevel >= LogLevel.INFO) {
191
201
  return LogLevelLabel.INFO;
192
202
  }
@@ -274,6 +284,19 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
274
284
  )(
275
285
  `[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `
276
286
  )}${_chalk.bold.whiteBright(formatLogMessage(message))}
287
+ `
288
+ );
289
+ };
290
+ }
291
+ if (typeof logLevel === "number" && LogLevel.PERFORMANCE >= logLevel) {
292
+ return (message) => {
293
+ console.debug(
294
+ `
295
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
296
+ _nullishCoalesce(colors.performance, () => ( DEFAULT_COLOR_CONFIG.dark.performance))
297
+ )(
298
+ `[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `
299
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
277
300
  `
278
301
  );
279
302
  };
@@ -319,18 +342,16 @@ var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
319
342
  var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
320
343
  var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
321
344
  var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
345
+ var writePerformance = (message, config) => getLogFn(LogLevel.PERFORMANCE, config)(message);
322
346
  var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
323
347
  var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
324
348
  var getStopwatch = (name) => {
325
349
  const start = /* @__PURE__ */ new Date();
326
350
  return () => {
327
- console.info(
328
- `> \u23F1 The${name ? ` ${name}` : ""} process took ${_formatDistanceToNow.formatDistanceToNow.call(void 0,
329
- start,
330
- {
331
- includeSeconds: true
332
- }
333
- )} to complete`
351
+ writePerformance(
352
+ `The${name ? ` ${name}` : ""} process took ${_formatDistanceToNow.formatDistanceToNow.call(void 0, start, {
353
+ includeSeconds: true
354
+ })} to complete`
334
355
  );
335
356
  };
336
357
  };