@cbnventures/nova 0.11.0

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 (134) hide show
  1. package/build/eslint.config.d.ts +3 -0
  2. package/build/eslint.config.d.ts.map +1 -0
  3. package/build/eslint.config.js +8 -0
  4. package/build/eslint.config.js.map +1 -0
  5. package/build/package.json +131 -0
  6. package/build/src/cli/index.d.ts +3 -0
  7. package/build/src/cli/index.d.ts.map +1 -0
  8. package/build/src/cli/index.js +258 -0
  9. package/build/src/cli/index.js.map +1 -0
  10. package/build/src/cli/recipe/sync-metadata.d.ts +5 -0
  11. package/build/src/cli/recipe/sync-metadata.d.ts.map +1 -0
  12. package/build/src/cli/recipe/sync-metadata.js +6 -0
  13. package/build/src/cli/recipe/sync-metadata.js.map +1 -0
  14. package/build/src/cli/recipe/sync-versions.d.ts +5 -0
  15. package/build/src/cli/recipe/sync-versions.d.ts.map +1 -0
  16. package/build/src/cli/recipe/sync-versions.js +6 -0
  17. package/build/src/cli/recipe/sync-versions.js.map +1 -0
  18. package/build/src/cli/utility/initialize.d.ts +19 -0
  19. package/build/src/cli/utility/initialize.d.ts.map +1 -0
  20. package/build/src/cli/utility/initialize.js +962 -0
  21. package/build/src/cli/utility/initialize.js.map +1 -0
  22. package/build/src/cli/utility/version.d.ts +11 -0
  23. package/build/src/cli/utility/version.d.ts.map +1 -0
  24. package/build/src/cli/utility/version.js +324 -0
  25. package/build/src/cli/utility/version.js.map +1 -0
  26. package/build/src/lib/item.d.ts +7 -0
  27. package/build/src/lib/item.d.ts.map +1 -0
  28. package/build/src/lib/item.js +55 -0
  29. package/build/src/lib/item.js.map +1 -0
  30. package/build/src/lib/nova-config.d.ts +21 -0
  31. package/build/src/lib/nova-config.d.ts.map +1 -0
  32. package/build/src/lib/nova-config.js +327 -0
  33. package/build/src/lib/nova-config.js.map +1 -0
  34. package/build/src/lib/regex.d.ts +19 -0
  35. package/build/src/lib/regex.d.ts.map +1 -0
  36. package/build/src/lib/regex.js +19 -0
  37. package/build/src/lib/regex.js.map +1 -0
  38. package/build/src/lib/utility.d.ts +11 -0
  39. package/build/src/lib/utility.d.ts.map +1 -0
  40. package/build/src/lib/utility.js +278 -0
  41. package/build/src/lib/utility.js.map +1 -0
  42. package/build/src/presets/eslint/dx-code-style.d.mts +4 -0
  43. package/build/src/presets/eslint/dx-code-style.d.mts.map +1 -0
  44. package/build/src/presets/eslint/dx-code-style.mjs +231 -0
  45. package/build/src/presets/eslint/dx-code-style.mjs.map +1 -0
  46. package/build/src/presets/eslint/dx-ignore.d.mts +4 -0
  47. package/build/src/presets/eslint/dx-ignore.d.mts.map +1 -0
  48. package/build/src/presets/eslint/dx-ignore.mjs +21 -0
  49. package/build/src/presets/eslint/dx-ignore.mjs.map +1 -0
  50. package/build/src/presets/eslint/env-browser.d.mts +4 -0
  51. package/build/src/presets/eslint/env-browser.d.mts.map +1 -0
  52. package/build/src/presets/eslint/env-browser.mjs +3 -0
  53. package/build/src/presets/eslint/env-browser.mjs.map +1 -0
  54. package/build/src/presets/eslint/env-edge.d.mts +4 -0
  55. package/build/src/presets/eslint/env-edge.d.mts.map +1 -0
  56. package/build/src/presets/eslint/env-edge.mjs +3 -0
  57. package/build/src/presets/eslint/env-edge.mjs.map +1 -0
  58. package/build/src/presets/eslint/env-node.d.mts +4 -0
  59. package/build/src/presets/eslint/env-node.d.mts.map +1 -0
  60. package/build/src/presets/eslint/env-node.mjs +68 -0
  61. package/build/src/presets/eslint/env-node.mjs.map +1 -0
  62. package/build/src/presets/eslint/env-service-worker.d.mts +4 -0
  63. package/build/src/presets/eslint/env-service-worker.d.mts.map +1 -0
  64. package/build/src/presets/eslint/env-service-worker.mjs +3 -0
  65. package/build/src/presets/eslint/env-service-worker.mjs.map +1 -0
  66. package/build/src/presets/eslint/env-web-worker.d.mts +4 -0
  67. package/build/src/presets/eslint/env-web-worker.d.mts.map +1 -0
  68. package/build/src/presets/eslint/env-web-worker.mjs +3 -0
  69. package/build/src/presets/eslint/env-web-worker.mjs.map +1 -0
  70. package/build/src/presets/eslint/fw-docusaurus.d.mts +4 -0
  71. package/build/src/presets/eslint/fw-docusaurus.d.mts.map +1 -0
  72. package/build/src/presets/eslint/fw-docusaurus.mjs +10 -0
  73. package/build/src/presets/eslint/fw-docusaurus.mjs.map +1 -0
  74. package/build/src/presets/eslint/fw-expressjs.d.mts +4 -0
  75. package/build/src/presets/eslint/fw-expressjs.d.mts.map +1 -0
  76. package/build/src/presets/eslint/fw-expressjs.mjs +8 -0
  77. package/build/src/presets/eslint/fw-expressjs.mjs.map +1 -0
  78. package/build/src/presets/eslint/fw-nextjs.d.mts +4 -0
  79. package/build/src/presets/eslint/fw-nextjs.d.mts.map +1 -0
  80. package/build/src/presets/eslint/fw-nextjs.mjs +8 -0
  81. package/build/src/presets/eslint/fw-nextjs.mjs.map +1 -0
  82. package/build/src/presets/eslint/index.d.mts +16 -0
  83. package/build/src/presets/eslint/index.d.mts.map +1 -0
  84. package/build/src/presets/eslint/index.mjs +16 -0
  85. package/build/src/presets/eslint/index.mjs.map +1 -0
  86. package/build/src/presets/eslint/lang-javascript.d.mts +4 -0
  87. package/build/src/presets/eslint/lang-javascript.d.mts.map +1 -0
  88. package/build/src/presets/eslint/lang-javascript.mjs +3 -0
  89. package/build/src/presets/eslint/lang-javascript.mjs.map +1 -0
  90. package/build/src/presets/eslint/lang-mdx.d.mts +4 -0
  91. package/build/src/presets/eslint/lang-mdx.d.mts.map +1 -0
  92. package/build/src/presets/eslint/lang-mdx.mjs +45 -0
  93. package/build/src/presets/eslint/lang-mdx.mjs.map +1 -0
  94. package/build/src/presets/eslint/lang-typescript.d.mts +4 -0
  95. package/build/src/presets/eslint/lang-typescript.d.mts.map +1 -0
  96. package/build/src/presets/eslint/lang-typescript.mjs +88 -0
  97. package/build/src/presets/eslint/lang-typescript.mjs.map +1 -0
  98. package/build/src/presets/eslint/platform-cloudflare-workers.d.mts +4 -0
  99. package/build/src/presets/eslint/platform-cloudflare-workers.d.mts.map +1 -0
  100. package/build/src/presets/eslint/platform-cloudflare-workers.mjs +8 -0
  101. package/build/src/presets/eslint/platform-cloudflare-workers.mjs.map +1 -0
  102. package/build/src/presets/eslint/tool-vite.d.mts +4 -0
  103. package/build/src/presets/eslint/tool-vite.d.mts.map +1 -0
  104. package/build/src/presets/eslint/tool-vite.mjs +8 -0
  105. package/build/src/presets/eslint/tool-vite.mjs.map +1 -0
  106. package/build/src/presets/tsconfig/dx-essentials.json +24 -0
  107. package/build/src/presets/tsconfig/dx-strict.json +33 -0
  108. package/build/src/presets/tsconfig/env-browser.json +12 -0
  109. package/build/src/presets/tsconfig/env-edge.json +12 -0
  110. package/build/src/presets/tsconfig/env-node.json +10 -0
  111. package/build/src/presets/tsconfig/env-service-worker.json +12 -0
  112. package/build/src/presets/tsconfig/env-web-worker.json +12 -0
  113. package/build/src/presets/tsconfig/fw-docusaurus.json +15 -0
  114. package/build/src/presets/tsconfig/fw-expressjs.json +10 -0
  115. package/build/src/presets/tsconfig/fw-nextjs.json +14 -0
  116. package/build/src/presets/tsconfig/platform-cloudflare-workers.json +14 -0
  117. package/build/src/presets/tsconfig/tool-vite.json +14 -0
  118. package/build/src/toolkit/cli-header.d.ts +10 -0
  119. package/build/src/toolkit/cli-header.d.ts.map +1 -0
  120. package/build/src/toolkit/cli-header.js +164 -0
  121. package/build/src/toolkit/cli-header.js.map +1 -0
  122. package/build/src/toolkit/index.d.ts +4 -0
  123. package/build/src/toolkit/index.d.ts.map +1 -0
  124. package/build/src/toolkit/index.js +4 -0
  125. package/build/src/toolkit/index.js.map +1 -0
  126. package/build/src/toolkit/logger.d.ts +13 -0
  127. package/build/src/toolkit/logger.d.ts.map +1 -0
  128. package/build/src/toolkit/logger.js +99 -0
  129. package/build/src/toolkit/logger.js.map +1 -0
  130. package/build/src/toolkit/markdown-table.d.ts +14 -0
  131. package/build/src/toolkit/markdown-table.d.ts.map +1 -0
  132. package/build/src/toolkit/markdown-table.js +69 -0
  133. package/build/src/toolkit/markdown-table.js.map +1 -0
  134. package/package.json +131 -0
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "isolatedModules": true,
5
+ "lib": [
6
+ "ESNext",
7
+ "WebWorker",
8
+ "WebWorker.Iterable"
9
+ ],
10
+ "module": "ESNext",
11
+ "moduleResolution": "Bundler",
12
+ "noEmit": true
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "isolatedModules": true,
5
+ "lib": [
6
+ "DOM",
7
+ "DOM.Iterable",
8
+ "ESNext"
9
+ ],
10
+ "module": "ESNext",
11
+ "moduleResolution": "Bundler",
12
+ "noEmit": true
13
+ }
14
+ }
@@ -0,0 +1,10 @@
1
+ import type { CLIHeaderRenderOptions, CLIHeaderRenderReturns, CLIHeaderRenderTexts } from '@/types/toolkit/cli-header.d.ts';
2
+ export default class CLIHeader {
3
+ static render(texts: CLIHeaderRenderTexts, options?: CLIHeaderRenderOptions): CLIHeaderRenderReturns;
4
+ private static borderChars;
5
+ private static truncate;
6
+ private static align;
7
+ private static visibleLength;
8
+ private static padToWidth;
9
+ }
10
+ //# sourceMappingURL=cli-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-header.d.ts","sourceRoot":"","sources":["../../../src/toolkit/cli-header.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAUV,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EAMrB,MAAM,iCAAiC,CAAC;AAOzC,MAAM,CAAC,OAAO,OAAO,SAAS;WAWd,MAAM,CAAC,KAAK,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,sBAAsB;IA+D3G,OAAO,CAAC,MAAM,CAAC,WAAW;IA6C1B,OAAO,CAAC,MAAM,CAAC,QAAQ;IA0HvB,OAAO,CAAC,MAAM,CAAC,KAAK;IA+BpB,OAAO,CAAC,MAAM,CAAC,aAAa;IAgB5B,OAAO,CAAC,MAAM,CAAC,UAAU;CAK1B"}
@@ -0,0 +1,164 @@
1
+ import { PATTERN_ANSI, PATTERN_ANSI_START } from '../lib/regex.js';
2
+ import { Logger } from '../toolkit/index.js';
3
+ export default class CLIHeader {
4
+ static render(texts, options) {
5
+ const align = options?.align ?? 'center';
6
+ const marginTop = Math.max(0, options?.marginTop ?? 0);
7
+ const marginBottom = Math.max(0, options?.marginBottom ?? 0);
8
+ const paddingX = Math.max(0, options?.paddingX ?? 0);
9
+ const paddingY = Math.max(0, options?.paddingY ?? 0);
10
+ const style = options?.style ?? 'box';
11
+ const width = Math.max(0, options?.width ?? process.stdout.columns);
12
+ const topMargin = '\n'.repeat(marginTop);
13
+ const bottomMargin = '\n'.repeat(marginBottom);
14
+ const borderChars = CLIHeader.borderChars(style);
15
+ const borderlessWidth = Math.max((2 * paddingX), width - 2);
16
+ const topBorder = `${borderChars.topLeft}${'─'.repeat(borderlessWidth)}${borderChars.topRight}`;
17
+ const bottomBorder = `${borderChars.bottomLeft}${'─'.repeat(borderlessWidth)}${borderChars.bottomRight}`;
18
+ const contentWidth = Math.max(0, borderlessWidth - (2 * paddingX));
19
+ const contentStrings = [];
20
+ const displayStrings = [];
21
+ for (let i = 0; i < paddingY; i += 1) {
22
+ contentStrings.push(CLIHeader.align('', contentWidth, align));
23
+ }
24
+ for (const text of texts) {
25
+ const truncatedText = CLIHeader.truncate(text, contentWidth);
26
+ contentStrings.push(CLIHeader.align(truncatedText, contentWidth, align));
27
+ }
28
+ for (let i = 0; i < paddingY; i += 1) {
29
+ contentStrings.push(CLIHeader.align('', contentWidth, align));
30
+ }
31
+ for (const contentString of contentStrings) {
32
+ const padded = `${' '.repeat(paddingX)}${contentString}${' '.repeat(paddingX)}`;
33
+ displayStrings.push(`${borderChars.vertical}${CLIHeader.padToWidth(padded, borderlessWidth)}${borderChars.vertical}`);
34
+ }
35
+ return [
36
+ ...(topMargin.length !== 0) ? [`${topMargin}${topBorder}`] : [topBorder],
37
+ ...displayStrings,
38
+ ...(bottomMargin.length !== 0) ? [`${bottomBorder}${bottomMargin}`] : [bottomBorder],
39
+ ].join('\n');
40
+ }
41
+ static borderChars(style) {
42
+ switch (style) {
43
+ case 'round':
44
+ return {
45
+ topLeft: '╭',
46
+ topRight: '╮',
47
+ bottomLeft: '╰',
48
+ bottomRight: '╯',
49
+ horizontal: '─',
50
+ vertical: '│',
51
+ };
52
+ case 'thick':
53
+ return {
54
+ topLeft: '╔',
55
+ topRight: '╗',
56
+ bottomLeft: '╚',
57
+ bottomRight: '╝',
58
+ horizontal: '═',
59
+ vertical: '║',
60
+ };
61
+ case 'box':
62
+ default:
63
+ return {
64
+ topLeft: '┌',
65
+ topRight: '┐',
66
+ bottomLeft: '└',
67
+ bottomRight: '┘',
68
+ horizontal: '─',
69
+ vertical: '│',
70
+ };
71
+ }
72
+ }
73
+ static truncate(string, max) {
74
+ if (max <= 0 || string === '') {
75
+ return '';
76
+ }
77
+ Logger.customize({ name: 'CLIHeader.truncate::begin' }).debug(JSON.stringify(string));
78
+ let rawIndex = 0;
79
+ let plain = '';
80
+ while (rawIndex < string.length) {
81
+ const slice = string.slice(rawIndex);
82
+ const matches = slice.match(PATTERN_ANSI_START);
83
+ if (matches) {
84
+ const code = matches[0];
85
+ Logger.customize({ name: 'CLIHeader.truncate::strip' }).debug([
86
+ `ANSI at rawIndex=${rawIndex}: ${JSON.stringify(code)}`,
87
+ ].join(', '));
88
+ rawIndex += code.length;
89
+ continue;
90
+ }
91
+ const character = string[rawIndex];
92
+ plain += character;
93
+ Logger.customize({ name: 'CLIHeader.truncate::strip' }).debug([
94
+ `Visible at rawIndex=${rawIndex}: ${JSON.stringify(character)}`,
95
+ `plain so far: ${JSON.stringify(plain)}`,
96
+ ].join(', '));
97
+ rawIndex += 1;
98
+ }
99
+ Logger.customize({ name: 'CLIHeader.truncate::first-pass' }).debug(JSON.stringify(plain));
100
+ const plainLength = plain.length;
101
+ const needsEllipsis = plainLength > max;
102
+ const visibleWidth = (needsEllipsis) ? Math.max(0, max - 1) : Math.min(max, plainLength);
103
+ Logger.customize({ name: 'CLIHeader.truncate::width' }).debug(JSON.stringify({
104
+ plainLength,
105
+ needsEllipsis,
106
+ visibleWidth,
107
+ }));
108
+ let visibleIndex = 0;
109
+ let output = '';
110
+ rawIndex = 0;
111
+ while (rawIndex < string.length && visibleIndex < visibleWidth) {
112
+ const slice = string.slice(rawIndex);
113
+ const matches = slice.match(PATTERN_ANSI_START);
114
+ if (matches) {
115
+ const code = matches[0];
116
+ output += code;
117
+ Logger.customize({ name: 'CLIHeader.truncate::rebuild' }).debug([
118
+ `ANSI at rawIndex=${rawIndex}: ${JSON.stringify(code)}`,
119
+ ].join(', '));
120
+ rawIndex += code.length;
121
+ continue;
122
+ }
123
+ const character = string[rawIndex];
124
+ output += character;
125
+ visibleIndex += 1;
126
+ Logger.customize({ name: 'CLIHeader.truncate::rebuild' }).debug([
127
+ `Visible at rawIndex=${rawIndex}: ${JSON.stringify(character)}`,
128
+ `visible count: ${JSON.stringify(visibleIndex)}`,
129
+ ].join(', '));
130
+ rawIndex += 1;
131
+ }
132
+ Logger.customize({ name: 'CLIHeader.truncate::second-pass' }).debug(JSON.stringify(output));
133
+ if (needsEllipsis) {
134
+ output += '…';
135
+ Logger.customize({ name: 'CLIHeader.truncate::ellipsis' }).debug(JSON.stringify(output));
136
+ }
137
+ if (output.includes('\x1b[')) {
138
+ output += '\x1b[0m';
139
+ }
140
+ Logger.customize({ name: 'CLIHeader.truncate::end' }).debug(JSON.stringify(output));
141
+ return output;
142
+ }
143
+ static align(string, width, align) {
144
+ const stringLength = CLIHeader.visibleLength(string);
145
+ const availableSpace = width - stringLength;
146
+ const leftPadding = Math.floor(availableSpace / 2);
147
+ const rightPadding = availableSpace - leftPadding;
148
+ if (align === 'left') {
149
+ return `${string}${' '.repeat(availableSpace)}`;
150
+ }
151
+ if (align === 'right') {
152
+ return `${' '.repeat(availableSpace)}${string}`;
153
+ }
154
+ return `${' '.repeat(leftPadding)}${string}${' '.repeat(rightPadding)}`;
155
+ }
156
+ static visibleLength(string) {
157
+ return string.replace(new RegExp(PATTERN_ANSI, 'g'), '').length;
158
+ }
159
+ static padToWidth(string, width) {
160
+ const visibleLength = CLIHeader.visibleLength(string);
161
+ return `${string}${' '.repeat(Math.max(0, width - visibleLength))}`;
162
+ }
163
+ }
164
+ //# sourceMappingURL=cli-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-header.js","sourceRoot":"","sources":["../../../src/toolkit/cli-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AA0B5C,MAAM,CAAC,OAAO,OAAO,SAAS;IAWrB,MAAM,CAAC,MAAM,CAAC,KAA2B,EAAE,OAAgC;QAChF,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,QAAQ,CAAC;QACzC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,CAAC,CAAC,CAAC;QACvD,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,IAAI,CAAC,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,IAAI,CAAC,CAAC,CAAC;QACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,IAAI,CAAC,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,KAAK,CAAC;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,OAAO,CAAC,MAAM,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,CAAC;IAcO,MAAM,CAAC,UAAU,CAAC,MAAiC,EAAE,KAA+B;QAC1F,MAAM,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAEtD,OAAO,GAAG,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC;IACtE,CAAC;CACF"}
@@ -0,0 +1,4 @@
1
+ export { default as CLIHeader } from './cli-header.js';
2
+ export { default as MarkdownTable } from './markdown-table.js';
3
+ export { default as Logger } from './logger.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolkit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as CLIHeader } from './cli-header.js';
2
+ export { default as MarkdownTable } from './markdown-table.js';
3
+ export { default as Logger } from './logger.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/toolkit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { LoggerCustomizeOptions, LoggerCustomizeReturns, LoggerDebugMessage, LoggerDebugReturns, LoggerErrorMessage, LoggerErrorReturns, LoggerInfoMessage, LoggerInfoReturns, LoggerWarnMessage, LoggerWarnReturns } from '@/types/toolkit/logger.d.ts';
2
+ export default class Logger {
3
+ static info(...message: LoggerInfoMessage): LoggerInfoReturns;
4
+ static warn(...message: LoggerWarnMessage): LoggerWarnReturns;
5
+ static error(...message: LoggerErrorMessage): LoggerErrorReturns;
6
+ static debug(...message: LoggerDebugMessage): LoggerDebugReturns;
7
+ static customize(options: LoggerCustomizeOptions): LoggerCustomizeReturns;
8
+ private static emit;
9
+ private static shouldLog;
10
+ private static prefix;
11
+ private static stripAnsiColors;
12
+ }
13
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/toolkit/logger.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAKlB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EAUjB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AAOrC,MAAM,CAAC,OAAO,OAAO,MAAM;WAUX,IAAI,CAAC,GAAG,OAAO,EAAE,iBAAiB,GAAG,iBAAiB;WAatD,IAAI,CAAC,GAAG,OAAO,EAAE,iBAAiB,GAAG,iBAAiB;WAatD,KAAK,CAAC,GAAG,OAAO,EAAE,kBAAkB,GAAG,kBAAkB;WAazD,KAAK,CAAC,GAAG,OAAO,EAAE,kBAAkB,GAAG,kBAAkB;WAazD,SAAS,CAAC,OAAO,EAAE,sBAAsB,GAAG,sBAAsB;IA8BhF,OAAO,CAAC,MAAM,CAAC,IAAI;IAwCnB,OAAO,CAAC,MAAM,CAAC,SAAS;IA8BxB,OAAO,CAAC,MAAM,CAAC,MAAM;IA2CrB,OAAO,CAAC,MAAM,CAAC,eAAe;CAG/B"}
@@ -0,0 +1,99 @@
1
+ import * as util from 'node:util';
2
+ import chalk from 'chalk';
3
+ import { LINEBREAK_CRLF_OR_LF, PATTERN_ANSI } from '../lib/regex.js';
4
+ import { currentTimestamp } from '../lib/utility.js';
5
+ export default class Logger {
6
+ static info(...message) {
7
+ Logger.emit('info', {}, ...message);
8
+ }
9
+ static warn(...message) {
10
+ Logger.emit('warn', {}, ...message);
11
+ }
12
+ static error(...message) {
13
+ Logger.emit('error', {}, ...message);
14
+ }
15
+ static debug(...message) {
16
+ Logger.emit('debug', {}, ...message);
17
+ }
18
+ static customize(options) {
19
+ return {
20
+ debug(...message) {
21
+ Logger.emit('debug', options, ...message);
22
+ },
23
+ info(...message) {
24
+ Logger.emit('info', options, ...message);
25
+ },
26
+ warn(...message) {
27
+ Logger.emit('warn', options, ...message);
28
+ },
29
+ error(...message) {
30
+ Logger.emit('error', options, ...message);
31
+ },
32
+ };
33
+ }
34
+ static emit(level, options, ...message) {
35
+ if (!Logger.shouldLog(level)) {
36
+ return;
37
+ }
38
+ const padTop = '\n'.repeat(Math.max(0, options.padTop ?? 0));
39
+ const padBottom = '\n'.repeat(Math.max(0, options.padBottom ?? 0));
40
+ const stream = (level === 'warn' || level === 'error') ? process.stderr : process.stdout;
41
+ const formattedMessage = (message.length > 0) ? util.format(...message) : '';
42
+ if (padTop.length > 0) {
43
+ stream.write(padTop);
44
+ }
45
+ const prefix = Logger.prefix(level, options);
46
+ const prefixVisibleLength = Logger.stripAnsiColors(prefix).length;
47
+ const indent = ' '.repeat(prefixVisibleLength + 1);
48
+ const alignedMessage = formattedMessage.replace(new RegExp(LINEBREAK_CRLF_OR_LF, 'g'), `$&${indent}`);
49
+ const payload = (formattedMessage.length > 0) ? `${prefix} ${alignedMessage}` : prefix;
50
+ stream.write(`${payload}\n`);
51
+ if (padBottom.length > 0) {
52
+ stream.write(padBottom);
53
+ }
54
+ }
55
+ static shouldLog(level) {
56
+ const weights = {
57
+ debug: 10,
58
+ info: 20,
59
+ warn: 30,
60
+ error: 40,
61
+ };
62
+ const isBrowser = typeof globalThis === 'object' && Reflect.has(globalThis, 'window');
63
+ const nodeEnv = process.env['NODE_ENV'] ?? 'production';
64
+ const currentLogLevel = (process.env['LOG_LEVEL'] ?? '').toLowerCase();
65
+ const defaultLogLevel = (isBrowser && nodeEnv === 'production') ? 'warn' : (nodeEnv === 'development') ? 'debug' : 'info';
66
+ const preferredLogLevel = Object.keys(weights).includes(currentLogLevel) ? currentLogLevel : defaultLogLevel;
67
+ return weights[level] >= weights[preferredLogLevel];
68
+ }
69
+ static prefix(level, options) {
70
+ const levelLabelUpper = level.toUpperCase();
71
+ const nameLabel = (options.name) ? ` ${chalk.dim(`[${options.name}]`)}` : '';
72
+ let coloredLevelLabel;
73
+ switch (level) {
74
+ case 'debug':
75
+ coloredLevelLabel = chalk.grey(levelLabelUpper);
76
+ break;
77
+ case 'info':
78
+ coloredLevelLabel = chalk.blue(levelLabelUpper);
79
+ break;
80
+ case 'warn':
81
+ coloredLevelLabel = chalk.yellow(levelLabelUpper);
82
+ break;
83
+ case 'error':
84
+ coloredLevelLabel = chalk.red(levelLabelUpper);
85
+ break;
86
+ default:
87
+ coloredLevelLabel = chalk.white(levelLabelUpper);
88
+ break;
89
+ }
90
+ if (process.env['LOG_TIME'] && process.env['LOG_TIME'] === 'true') {
91
+ return `${chalk.dim(currentTimestamp())} ${coloredLevelLabel}${nameLabel}`;
92
+ }
93
+ return `${coloredLevelLabel}${nameLabel}`;
94
+ }
95
+ static stripAnsiColors(value) {
96
+ return value.replace(new RegExp(PATTERN_ANSI, 'g'), '');
97
+ }
98
+ }
99
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/toolkit/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAgCp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aders, MarkdownTableConstructorOptions, MarkdownTableRenderReturns } from '@/types/toolkit/markdown-table.d.ts';
2
+ export default class MarkdownTable {
3
+ #private;
4
+ constructor(headers: MarkdownTableConstructorHeaders, options?: MarkdownTableConstructorOptions);
5
+ addRow(row: MarkdownTableAddRowRow): MarkdownTableAddRowReturns;
6
+ render(): MarkdownTableRenderReturns;
7
+ private escapeCell;
8
+ private computeColumnWidths;
9
+ private padCell;
10
+ private formatRow;
11
+ private formatDelimiter;
12
+ private stripAnsiColors;
13
+ }
14
+ //# sourceMappingURL=markdown-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-table.d.ts","sourceRoot":"","sources":["../../../src/toolkit/markdown-table.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,0BAA0B,EAC1B,sBAAsB,EAEtB,+BAA+B,EAC/B,+BAA+B,EAc/B,0BAA0B,EAI3B,MAAM,qCAAqC,CAAC;AAO7C,MAAM,CAAC,OAAO,OAAO,aAAa;;gBAqCb,OAAO,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,+BAA+B;IAqB/F,MAAM,CAAC,GAAG,EAAE,sBAAsB,GAAG,0BAA0B;IAkB/D,MAAM,IAAI,0BAA0B;IAqB3C,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,mBAAmB;IA6B3B,OAAO,CAAC,OAAO;IAgBf,OAAO,CAAC,SAAS;IAmBjB,OAAO,CAAC,eAAe;IAyBvB,OAAO,CAAC,eAAe;CAGxB"}
@@ -0,0 +1,69 @@
1
+ import { CHARACTER_PIPE, LINEBREAK_CRLF_OR_LF, PATTERN_ANSI } from '../lib/regex.js';
2
+ export default class MarkdownTable {
3
+ #headers;
4
+ #minimumColumnWidth;
5
+ #padDelimiterRow;
6
+ #rows;
7
+ constructor(headers, options) {
8
+ if (!Array.isArray(headers) || headers.length === 0) {
9
+ throw new Error('"headers" must be a non-empty array');
10
+ }
11
+ this.#headers = headers.map((header) => String(header));
12
+ this.#minimumColumnWidth = Math.max(3, options?.minimumColumnWidth ?? 3);
13
+ this.#padDelimiterRow = options?.padDelimiterRow ?? false;
14
+ this.#rows = [];
15
+ }
16
+ addRow(row) {
17
+ if (this.#headers.length !== row.length) {
18
+ throw new Error('Length of "rows" must equal length of "headers"');
19
+ }
20
+ this.#rows.push(row);
21
+ return this;
22
+ }
23
+ render() {
24
+ const columnWidths = this.computeColumnWidths();
25
+ const header = this.formatRow(this.#headers, columnWidths);
26
+ const delimiter = this.formatDelimiter(columnWidths);
27
+ const body = this.#rows.map((row) => this.formatRow(row, columnWidths)).join('\n');
28
+ return [header, delimiter, body].join('\n');
29
+ }
30
+ escapeCell(value) {
31
+ return value
32
+ .replace(new RegExp(CHARACTER_PIPE, 'g'), '\\|')
33
+ .replace(new RegExp(LINEBREAK_CRLF_OR_LF, 'g'), ' ');
34
+ }
35
+ computeColumnWidths() {
36
+ const columnsLength = this.#headers.length;
37
+ const rows = [this.#headers, ...this.#rows];
38
+ return Array.from({
39
+ length: columnsLength,
40
+ }, (_, columnIndex) => {
41
+ return Math.max(this.#minimumColumnWidth, ...rows.map((row) => {
42
+ return this.escapeCell(this.stripAnsiColors(row[columnIndex] ?? '')).length;
43
+ }));
44
+ });
45
+ }
46
+ padCell(string, width) {
47
+ return `${string}${' '.repeat(Math.max(0, width - this.stripAnsiColors(string).length))}`;
48
+ }
49
+ formatRow(cells, widths) {
50
+ const escapedCells = cells.map((cell, cellIndex) => {
51
+ return this.padCell(this.escapeCell(cell), widths[cellIndex] ?? 0);
52
+ });
53
+ return `| ${escapedCells.join(' | ')} |`;
54
+ }
55
+ formatDelimiter(columnWidths) {
56
+ const minimumWidth = this.#minimumColumnWidth;
57
+ const usePaddedDelimiter = this.#padDelimiterRow;
58
+ const columnCells = columnWidths.map((columnWidth) => {
59
+ return '-'.repeat(columnWidth > minimumWidth ? columnWidth : minimumWidth);
60
+ });
61
+ const delimiter = (usePaddedDelimiter) ? ' | ' : '-|-';
62
+ const rowBody = columnCells.join(delimiter);
63
+ return (usePaddedDelimiter) ? `| ${rowBody} |` : `|-${rowBody}-|`;
64
+ }
65
+ stripAnsiColors(string) {
66
+ return string.replace(new RegExp(PATTERN_ANSI, 'g'), '');
67
+ }
68
+ }
69
+ //# sourceMappingURL=markdown-table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-table.js","sourceRoot":"","sources":["../../../src/toolkit/markdown-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA+BpF,MAAM,CAAC,OAAO,OAAO,aAAa;IAMvB,QAAQ,CAAuB;IAO/B,mBAAmB,CAAkC;IAOrD,gBAAgB,CAA+B;IAO/C,KAAK,CAAoB;IAUlC,YAAmB,OAAwC,EAAE,OAAyC;QACpG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;QAGD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QACxD,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,kBAAkB,IAAI,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,gBAAgB,GAAG,OAAO,EAAE,eAAe,IAAI,KAAK,CAAC;QAC1D,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;IAWM,MAAM,CAAC,GAA2B;QACvC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,IAAI,C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QAE5C,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,IAAI,CAAC;IACpE,CAAC;IAaO,eAAe,CAAC,MAA0C;QAChE,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3D,CAAC;CACF"}
package/package.json ADDED
@@ -0,0 +1,131 @@
1
+ {
2
+ "name": "@cbnventures/nova",
3
+ "version": "0.11.0",
4
+ "description": "Scripts, templates, and project configuration for the common JavaScript and TypeScript developer",
5
+ "main": "",
6
+ "bin": {
7
+ "nova": "build/src/cli/index.js"
8
+ },
9
+ "exports": {
10
+ "./eslint": "./build/src/presets/eslint/index.mjs",
11
+ "./eslint/*": "./build/src/presets/eslint/*.mjs",
12
+ "./toolkit": "./build/src/presets/toolkit/index.js",
13
+ "./toolkit/*": "./build/src/presets/toolkit/*.js",
14
+ "./tsconfig/dx-essentials.json": "./build/src/presets/tsconfig/dx-essentials.json",
15
+ "./tsconfig/dx-strict.json": "./build/src/presets/tsconfig/dx-strict.json",
16
+ "./tsconfig/env-browser.json": "./build/src/presets/tsconfig/env-browser.json",
17
+ "./tsconfig/env-edge.json": "./build/src/presets/tsconfig/env-edge.json",
18
+ "./tsconfig/env-node.json": "./build/src/presets/tsconfig/env-node.json",
19
+ "./tsconfig/env-service-worker.json": "./build/src/presets/tsconfig/env-service-worker.json",
20
+ "./tsconfig/env-web-worker.json": "./build/src/presets/tsconfig/env-web-worker.json",
21
+ "./tsconfig/fw-docusaurus.json": "./build/src/presets/tsconfig/fw-docusaurus.json",
22
+ "./tsconfig/fw-expressjs.json": "./build/src/presets/tsconfig/fw-expressjs.json",
23
+ "./tsconfig/fw-nextjs.json": "./build/src/presets/tsconfig/fw-nextjs.json",
24
+ "./tsconfig/platform-cloudflare-workers.json": "./build/src/presets/tsconfig/platform-cloudflare-workers.json",
25
+ "./tsconfig/tool-vite.json": "./build/src/presets/tsconfig/tool-vite.json"
26
+ },
27
+ "type": "module",
28
+ "private": false,
29
+ "scripts": {
30
+ "dev": "npm-run-all --parallel dev:*",
31
+ "dev:watch": "tsc --project tsconfig.json --watch",
32
+ "dev:fix-alias": "tsc-alias -p tsconfig.json -w",
33
+ "build": "npm-run-all --sequential build:*",
34
+ "build:clean": "npm run clean",
35
+ "build:build": "tsc --project tsconfig.json --outDir ./build",
36
+ "build:fix-alias": "tsc-alias -p tsconfig.json",
37
+ "build:fix-perms": "shx chmod +x ./build/src/cli/index.js",
38
+ "build:copy-tsconfig": "shx cp -r \"./src/presets/tsconfig\" \"./build/src/presets/tsconfig\"",
39
+ "check": "npm-run-all --sequential check:*",
40
+ "check:lint": "eslint ./",
41
+ "check:types": "tsc --noEmit",
42
+ "clean": "npm-run-all --parallel clean:*",
43
+ "clean:clear": "shx rm -rf ./build"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git://github.com/cbnventures/nova.git"
48
+ },
49
+ "funding": [
50
+ {
51
+ "type": "github",
52
+ "url": "https://github.com/sponsors/cbnventures"
53
+ },
54
+ {
55
+ "type": "custom",
56
+ "url": "https://www.cbnventures.io/paypal/"
57
+ }
58
+ ],
59
+ "keywords": [
60
+ "eslint",
61
+ "eslint-config",
62
+ "eslint-flat-config",
63
+ "typescript",
64
+ "tsconfig",
65
+ "tsconfig-presets",
66
+ "linting",
67
+ "code-style",
68
+ "scripts",
69
+ "templates",
70
+ "react",
71
+ "nextjs",
72
+ "node",
73
+ "monorepo"
74
+ ],
75
+ "author": {
76
+ "name": "Jacky Liang",
77
+ "email": "hello@mrjackyliang.com",
78
+ "url": "https://www.mrjackyliang.com"
79
+ },
80
+ "license": "MIT",
81
+ "bugs": {
82
+ "url": "https://github.com/cbnventures/nova/issues"
83
+ },
84
+ "files": [
85
+ "./build"
86
+ ],
87
+ "homepage": "https://cbnventures.github.io/nova/",
88
+ "engines": {
89
+ "node": "^22"
90
+ },
91
+ "dependencies": {
92
+ "@eslint/js": "9.38.0",
93
+ "@stylistic/eslint-plugin": "5.5.0",
94
+ "chalk": "5.6.2",
95
+ "commander": "14.0.1",
96
+ "eslint-mdx": "3.6.2",
97
+ "eslint-plugin-import": "2.32.0",
98
+ "eslint-plugin-jsx-a11y": "6.10.2",
99
+ "eslint-plugin-mdx": "3.6.2",
100
+ "eslint-plugin-n": "17.23.1",
101
+ "eslint-plugin-react": "7.37.5",
102
+ "eslint-plugin-react-hooks": "7.0.0",
103
+ "globals": "16.4.0",
104
+ "prompts": "2.4.2",
105
+ "typescript-eslint": "8.46.2"
106
+ },
107
+ "devDependencies": {
108
+ "@commander-js/extra-typings": "14.0.0",
109
+ "@types/eslint-plugin-jsx-a11y": "6.10.1",
110
+ "@types/node": "24.9.1",
111
+ "@types/prompts": "2.4.9",
112
+ "eslint": "9.38.0",
113
+ "eslint-import-resolver-typescript": "4.4.4",
114
+ "npm-run-all": "4.1.5",
115
+ "shx": "0.4.0",
116
+ "tsc-alias": "1.8.16",
117
+ "typescript": "5.9.3"
118
+ },
119
+ "peerDependencies": {
120
+ "eslint": "^9",
121
+ "typescript": "^5"
122
+ },
123
+ "peerDependenciesMeta": {
124
+ "eslint": {
125
+ "optional": true
126
+ },
127
+ "typescript": {
128
+ "optional": true
129
+ }
130
+ }
131
+ }