@maizzle/framework 6.0.4 → 6.0.6

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 (72) hide show
  1. package/dist/composables/defineConfig.js +2 -1
  2. package/dist/composables/defineConfig.js.map +1 -1
  3. package/dist/plugins/postcss/quoteFontFamilies.js +1 -1
  4. package/dist/plugins/postcss/quoteFontFamilies.js.map +1 -1
  5. package/dist/render/createRenderer.js +15 -11
  6. package/dist/render/createRenderer.js.map +1 -1
  7. package/dist/render/parallel/buildWorker.js +2 -1
  8. package/dist/render/parallel/buildWorker.js.map +1 -1
  9. package/dist/serve.d.ts.map +1 -1
  10. package/dist/serve.js +2 -1
  11. package/dist/serve.js.map +1 -1
  12. package/dist/server/compatibility.js +5 -5
  13. package/dist/server/compatibility.js.map +1 -1
  14. package/dist/server/linter.js +2 -2
  15. package/dist/server/linter.js.map +1 -1
  16. package/dist/server/sfc-utils.js +1 -1
  17. package/dist/server/sfc-utils.js.map +1 -1
  18. package/dist/server/ui/.vite/deps/@lucide_vue.js +7313 -6416
  19. package/dist/server/ui/.vite/deps/@lucide_vue.js.map +1 -1
  20. package/dist/server/ui/.vite/deps/@vueuse_core.js +2 -4
  21. package/dist/server/ui/.vite/deps/@vueuse_core.js.map +1 -1
  22. package/dist/server/ui/.vite/deps/@vueuse_shared.js +1 -3
  23. package/dist/server/ui/.vite/deps/@vueuse_shared.js.map +1 -1
  24. package/dist/server/ui/.vite/deps/_metadata.json +17 -17
  25. package/dist/server/ui/.vite/deps/class-variance-authority.js +0 -2
  26. package/dist/server/ui/.vite/deps/class-variance-authority.js.map +1 -1
  27. package/dist/server/ui/.vite/deps/clsx.js +0 -2
  28. package/dist/server/ui/.vite/deps/culori.js +0 -2
  29. package/dist/server/ui/.vite/deps/culori.js.map +1 -1
  30. package/dist/server/ui/.vite/deps/reka-ui.js +63 -37
  31. package/dist/server/ui/.vite/deps/reka-ui.js.map +1 -1
  32. package/dist/server/ui/.vite/deps/tailwind-merge.js +1 -3
  33. package/dist/server/ui/.vite/deps/tailwind-merge.js.map +1 -1
  34. package/dist/server/ui/.vite/deps/vue-router.js +1 -3
  35. package/dist/server/ui/.vite/deps/vue-router.js.map +1 -1
  36. package/dist/server/ui/.vite/deps/vue.js +1 -1
  37. package/dist/server/ui/.vite/deps/{vue.runtime.esm-bundler-Dz9O_TVp.js → vue.runtime.esm-bundler-DjHXh3xg.js} +9 -6
  38. package/dist/server/ui/.vite/deps/{vue.runtime.esm-bundler-Dz9O_TVp.js.map → vue.runtime.esm-bundler-DjHXh3xg.js.map} +1 -1
  39. package/dist/transformers/addAttributes.js +1 -1
  40. package/dist/transformers/addAttributes.js.map +1 -1
  41. package/dist/transformers/entities.d.ts +21 -6
  42. package/dist/transformers/entities.d.ts.map +1 -1
  43. package/dist/transformers/entities.js +7 -7
  44. package/dist/transformers/entities.js.map +1 -1
  45. package/dist/transformers/index.d.ts +1 -0
  46. package/dist/transformers/index.d.ts.map +1 -1
  47. package/dist/transformers/index.js +10 -0
  48. package/dist/transformers/index.js.map +1 -1
  49. package/dist/transformers/sixHex.js +1 -1
  50. package/dist/transformers/sixHex.js.map +1 -1
  51. package/dist/types/config.d.ts +15 -0
  52. package/dist/types/config.d.ts.map +1 -1
  53. package/dist/utils/ast/serializer.js +1 -1
  54. package/dist/utils/ast/serializer.js.map +1 -1
  55. package/dist/utils/cssBox.js +1 -1
  56. package/dist/utils/cssBox.js.map +1 -1
  57. package/node_modules/maizzle/dist/commands/new.mjs +2 -2
  58. package/node_modules/maizzle/node_modules/commander/Readme.md +11 -15
  59. package/node_modules/maizzle/node_modules/commander/index.js +14 -17
  60. package/node_modules/maizzle/node_modules/commander/lib/argument.js +3 -6
  61. package/node_modules/maizzle/node_modules/commander/lib/command.js +46 -33
  62. package/node_modules/maizzle/node_modules/commander/lib/error.js +2 -5
  63. package/node_modules/maizzle/node_modules/commander/lib/help.js +4 -20
  64. package/node_modules/maizzle/node_modules/commander/lib/option.js +3 -6
  65. package/node_modules/maizzle/node_modules/commander/lib/suggestSimilar.js +2 -4
  66. package/node_modules/maizzle/node_modules/commander/package.json +10 -28
  67. package/node_modules/maizzle/node_modules/commander/typings/index.d.ts +3 -3
  68. package/node_modules/maizzle/package.json +2 -2
  69. package/package.json +2 -2
  70. package/node_modules/maizzle/node_modules/commander/esm.mjs +0 -16
  71. package/node_modules/maizzle/node_modules/commander/typings/esm.d.mts +0 -3
  72. /package/dist/server/ui/.vite/deps/{chunk-EAsCxrDo.js → rolldown-runtime-EAsCxrDo.js} +0 -0
@@ -1,16 +1,17 @@
1
- const EventEmitter = require('node:events').EventEmitter;
2
- const childProcess = require('node:child_process');
3
- const path = require('node:path');
4
- const fs = require('node:fs');
5
- const process = require('node:process');
1
+ import { EventEmitter } from 'node:events';
2
+ import childProcess from 'node:child_process';
3
+ import path from 'node:path';
4
+ import fs from 'node:fs';
5
+ import process from 'node:process';
6
+ import { stripVTControlCharacters } from 'node:util';
6
7
 
7
- const { Argument, humanReadableArgName } = require('./argument.js');
8
- const { CommanderError } = require('./error.js');
9
- const { Help, stripColor } = require('./help.js');
10
- const { Option, DualOptions } = require('./option.js');
11
- const { suggestSimilar } = require('./suggestSimilar');
8
+ import { Argument, humanReadableArgName } from './argument.js';
9
+ import { CommanderError } from './error.js';
10
+ import { Help } from './help.js';
11
+ import { Option, DualOptions } from './option.js';
12
+ import { suggestSimilar } from './suggestSimilar.js';
12
13
 
13
- class Command extends EventEmitter {
14
+ export class Command extends EventEmitter {
14
15
  /**
15
16
  * Initialize a new `Command`.
16
17
  *
@@ -70,7 +71,7 @@ class Command extends EventEmitter {
70
71
  useColor() ?? (process.stdout.isTTY && process.stdout.hasColors?.()),
71
72
  getErrHasColors: () =>
72
73
  useColor() ?? (process.stderr.isTTY && process.stderr.hasColors?.()),
73
- stripColor: (str) => stripColor(str),
74
+ stripColor: (str) => stripVTControlCharacters(str),
74
75
  };
75
76
 
76
77
  this._hidden = false;
@@ -674,17 +675,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
674
675
  const name = option.attributeName();
675
676
 
676
677
  // store default value
677
- if (option.negate) {
678
- // --no-foo is special and defaults foo to true, unless a --foo option is already defined
679
- const positiveLongFlag = option.long.replace(/^--no-/, '--');
680
- if (!this._findOption(positiveLongFlag)) {
681
- this.setOptionValueWithSource(
682
- name,
683
- option.defaultValue === undefined ? true : option.defaultValue,
684
- 'default',
685
- );
686
- }
687
- } else if (option.defaultValue !== undefined) {
678
+ if (option.defaultValue !== undefined) {
688
679
  this.setOptionValueWithSource(name, option.defaultValue, 'default');
689
680
  }
690
681
 
@@ -1125,7 +1116,29 @@ Expecting one of '${allowedValues.join("', '")}'`);
1125
1116
  }
1126
1117
 
1127
1118
  _prepareForParse() {
1119
+ // Save the state the first time, then restore the state before each subsequent parse.
1128
1120
  if (this._savedState === null) {
1121
+ // Do the special default of lone negated option to true, now that we have all the options.
1122
+ // Filter for negated options that have not been processed already.
1123
+ this.options
1124
+ .filter(
1125
+ (option) =>
1126
+ option.negate &&
1127
+ option.defaultValue === undefined &&
1128
+ this.getOptionValue(option.attributeName()) === undefined,
1129
+ )
1130
+ .forEach((option) => {
1131
+ // check for lone negated option: --no-foo without a --foo option
1132
+ const positiveLongFlag = option.long.replace(/^--no-/, '--');
1133
+ if (!this._findOption(positiveLongFlag)) {
1134
+ this.setOptionValueWithSource(
1135
+ option.attributeName(),
1136
+ true,
1137
+ 'default',
1138
+ );
1139
+ }
1140
+ });
1141
+
1129
1142
  this.saveStateBeforeParse();
1130
1143
  } else {
1131
1144
  this.restoreStateBeforeParse();
@@ -1201,7 +1214,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
1201
1214
 
1202
1215
  _executeSubCommand(subcommand, args) {
1203
1216
  args = args.slice();
1204
- let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.
1205
1217
  const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];
1206
1218
 
1207
1219
  function findFile(baseDir, baseName) {
@@ -1262,7 +1274,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1262
1274
  executableFile = localFile || executableFile;
1263
1275
  }
1264
1276
 
1265
- launchWithNode = sourceExt.includes(path.extname(executableFile));
1277
+ const launchWithNode = sourceExt.includes(path.extname(executableFile));
1266
1278
 
1267
1279
  let proc;
1268
1280
  if (process.platform !== 'win32') {
@@ -2148,8 +2160,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
2148
2160
 
2149
2161
  const expected = this.registeredArguments.length;
2150
2162
  const s = expected === 1 ? '' : 's';
2163
+ const received = receivedArgs.length;
2151
2164
  const forSubcommand = this.parent ? ` for '${this.name()}'` : '';
2152
- const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;
2165
+ const details = receivedArgs.join(', ');
2166
+ const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${received}: ${details}.`;
2153
2167
  this.error(message, { code: 'commander.excessArguments' });
2154
2168
  }
2155
2169
 
@@ -2405,12 +2419,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
2405
2419
 
2406
2420
  /**
2407
2421
  * Set the name of the command from script filename, such as process.argv[1],
2408
- * or require.main.filename, or __filename.
2422
+ * or import.meta.filename.
2409
2423
  *
2410
2424
  * (Used internally and public although not documented in README.)
2411
2425
  *
2412
2426
  * @example
2413
- * program.nameFromFilename(require.main.filename);
2427
+ * program.nameFromFilename(import.meta.filename);
2414
2428
  *
2415
2429
  * @param {string} filename
2416
2430
  * @return {Command}
@@ -2426,7 +2440,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2426
2440
  * Get or set the directory for searching for executable subcommands of this command.
2427
2441
  *
2428
2442
  * @example
2429
- * program.executableDir(__dirname);
2443
+ * program.executableDir(import.meta.dirname);
2430
2444
  * // or
2431
2445
  * program.executableDir('subcommands');
2432
2446
  *
@@ -2746,10 +2760,12 @@ function incrementNodeInspectorPort(args) {
2746
2760
  }
2747
2761
 
2748
2762
  /**
2763
+ * Exported for using from tests, not otherwise used outside this file.
2764
+ *
2749
2765
  * @returns {boolean | undefined}
2750
2766
  * @package
2751
2767
  */
2752
- function useColor() {
2768
+ export function useColor() {
2753
2769
  // Test for common conventions.
2754
2770
  // NB: the observed behaviour is in combination with how author adds color! For example:
2755
2771
  // - we do not test NODE_DISABLE_COLORS, but util:styletext does
@@ -2772,6 +2788,3 @@ function useColor() {
2772
2788
  return true;
2773
2789
  return undefined;
2774
2790
  }
2775
-
2776
- exports.Command = Command;
2777
- exports.useColor = useColor; // exporting for tests
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * CommanderError class
3
3
  */
4
- class CommanderError extends Error {
4
+ export class CommanderError extends Error {
5
5
  /**
6
6
  * Constructs the CommanderError class
7
7
  * @param {number} exitCode suggested exit code which could be used with process.exit
@@ -22,7 +22,7 @@ class CommanderError extends Error {
22
22
  /**
23
23
  * InvalidArgumentError class
24
24
  */
25
- class InvalidArgumentError extends CommanderError {
25
+ export class InvalidArgumentError extends CommanderError {
26
26
  /**
27
27
  * Constructs the InvalidArgumentError class
28
28
  * @param {string} [message] explanation of why argument is invalid
@@ -34,6 +34,3 @@ class InvalidArgumentError extends CommanderError {
34
34
  this.name = this.constructor.name;
35
35
  }
36
36
  }
37
-
38
- exports.CommanderError = CommanderError;
39
- exports.InvalidArgumentError = InvalidArgumentError;
@@ -1,4 +1,5 @@
1
- const { humanReadableArgName } = require('./argument.js');
1
+ import { humanReadableArgName } from './argument.js';
2
+ import { stripVTControlCharacters } from 'node:util';
2
3
 
3
4
  /**
4
5
  * TypeScript import types for JSDoc, used by Visual Studio Code IntelliSense and `npm run typescript-checkJS`
@@ -9,7 +10,7 @@ const { humanReadableArgName } = require('./argument.js');
9
10
  */
10
11
 
11
12
  // Although this is a class, methods are static in style to allow override using subclass or just functions.
12
- class Help {
13
+ export class Help {
13
14
  constructor() {
14
15
  this.helpWidth = undefined;
15
16
  this.minWidthToWrap = 40;
@@ -533,7 +534,7 @@ class Help {
533
534
  * @returns {number}
534
535
  */
535
536
  displayWidth(str) {
536
- return stripColor(str).length;
537
+ return stripVTControlCharacters(str).length;
537
538
  }
538
539
 
539
540
  /**
@@ -728,20 +729,3 @@ class Help {
728
729
  return wrappedLines.join('\n');
729
730
  }
730
731
  }
731
-
732
- /**
733
- * Strip style ANSI escape sequences from the string. In particular, SGR (Select Graphic Rendition) codes.
734
- *
735
- * @param {string} str
736
- * @returns {string}
737
- * @package
738
- */
739
-
740
- function stripColor(str) {
741
- // eslint-disable-next-line no-control-regex
742
- const sgrPattern = /\x1b\[\d*(;\d*)*m/g;
743
- return str.replace(sgrPattern, '');
744
- }
745
-
746
- exports.Help = Help;
747
- exports.stripColor = stripColor;
@@ -1,6 +1,6 @@
1
- const { InvalidArgumentError } = require('./error.js');
1
+ import { InvalidArgumentError } from './error.js';
2
2
 
3
- class Option {
3
+ export class Option {
4
4
  /**
5
5
  * Initialize a new `Option` with the given `flags` and `description`.
6
6
  *
@@ -265,7 +265,7 @@ class Option {
265
265
  * use cases, but is tricky for others where we want separate behaviours despite
266
266
  * the single shared option value.
267
267
  */
268
- class DualOptions {
268
+ export class DualOptions {
269
269
  /**
270
270
  * @param {Option[]} options
271
271
  */
@@ -375,6 +375,3 @@ function splitOptionFlags(flags) {
375
375
 
376
376
  return { shortFlag, longFlag };
377
377
  }
378
-
379
- exports.Option = Option;
380
- exports.DualOptions = DualOptions;
@@ -24,7 +24,7 @@ function editDistance(a, b) {
24
24
  // fill matrix
25
25
  for (let j = 1; j <= b.length; j++) {
26
26
  for (let i = 1; i <= a.length; i++) {
27
- let cost = 1;
27
+ let cost;
28
28
  if (a[i - 1] === b[j - 1]) {
29
29
  cost = 0;
30
30
  } else {
@@ -53,7 +53,7 @@ function editDistance(a, b) {
53
53
  * @returns {string}
54
54
  */
55
55
 
56
- function suggestSimilar(word, candidates) {
56
+ export function suggestSimilar(word, candidates) {
57
57
  if (!candidates || candidates.length === 0) return '';
58
58
  // remove possible duplicates
59
59
  candidates = Array.from(new Set(candidates));
@@ -97,5 +97,3 @@ function suggestSimilar(word, candidates) {
97
97
  }
98
98
  return '';
99
99
  }
100
-
101
- exports.suggestSimilar = suggestSimilar;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commander",
3
- "version": "14.0.3",
3
+ "version": "15.0.0",
4
4
  "description": "the complete solution for node.js command-line programs",
5
5
  "keywords": [
6
6
  "commander",
@@ -28,55 +28,37 @@
28
28
  "fix": "npm run fix:lint && npm run fix:format",
29
29
  "fix:format": "prettier --write .",
30
30
  "fix:lint": "eslint --fix .",
31
- "test": "jest && npm run check:type:ts",
32
- "test-all": "jest && npm run test-esm && npm run check",
33
- "test-esm": "node ./tests/esm-imports-test.mjs"
31
+ "test": "node --test && npm run check:type:ts",
32
+ "test-all": "node --test && npm run check"
34
33
  },
35
34
  "files": [
36
35
  "index.js",
37
36
  "lib/*.js",
38
- "esm.mjs",
39
37
  "typings/index.d.ts",
40
- "typings/esm.d.mts",
41
38
  "package-support.json"
42
39
  ],
43
- "type": "commonjs",
40
+ "type": "module",
44
41
  "main": "./index.js",
45
42
  "exports": {
46
43
  ".": {
47
- "require": {
48
- "types": "./typings/index.d.ts",
49
- "default": "./index.js"
50
- },
51
- "import": {
52
- "types": "./typings/esm.d.mts",
53
- "default": "./esm.mjs"
54
- },
44
+ "types": "./typings/index.d.ts",
55
45
  "default": "./index.js"
56
- },
57
- "./esm.mjs": {
58
- "types": "./typings/esm.d.mts",
59
- "import": "./esm.mjs"
60
46
  }
61
47
  },
62
48
  "devDependencies": {
63
- "@eslint/js": "^9.4.0",
64
- "@types/jest": "^30.0.0",
49
+ "@eslint/js": "^10.0.1",
65
50
  "@types/node": "^22.7.4",
66
- "eslint": "^9.17.0",
51
+ "eslint": "^10.0.2",
67
52
  "eslint-config-prettier": "^10.0.1",
68
- "eslint-plugin-jest": "^29.0.1",
69
- "globals": "^16.0.0",
70
- "jest": "^30.0.3",
53
+ "globals": "^17.3.0",
71
54
  "prettier": "^3.2.5",
72
- "ts-jest": "^29.0.3",
73
55
  "tsd": "^0.33.0",
74
- "typescript": "^5.0.4",
56
+ "typescript": "^6.0.2",
75
57
  "typescript-eslint": "^8.12.2"
76
58
  },
77
59
  "types": "typings/index.d.ts",
78
60
  "engines": {
79
- "node": ">=20"
61
+ "node": ">=22.12.0"
80
62
  },
81
63
  "support": true
82
64
  }
@@ -958,13 +958,13 @@ export class Command {
958
958
 
959
959
  /**
960
960
  * Set the name of the command from script filename, such as process.argv[1],
961
- * or require.main.filename, or __filename.
961
+ * or import.meta.filename.
962
962
  *
963
963
  * (Used internally and public although not documented in README.)
964
964
  *
965
965
  * @example
966
966
  * ```ts
967
- * program.nameFromFilename(require.main.filename);
967
+ * program.nameFromFilename(import.meta.filename);
968
968
  * ```
969
969
  *
970
970
  * @returns `this` command for chaining
@@ -976,7 +976,7 @@ export class Command {
976
976
  *
977
977
  * @example
978
978
  * ```ts
979
- * program.executableDir(__dirname);
979
+ * program.executableDir(import.meta.dirname);
980
980
  * // or
981
981
  * program.executableDir('subcommands');
982
982
  * ```
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maizzle",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "CLI tool for the Maizzle Email Framework",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@clack/prompts": "^1.2.0",
30
- "commander": "^14.0.3",
30
+ "commander": "^15.0.0",
31
31
  "giget": "^3.2.0",
32
32
  "nypm": "^0.6.5",
33
33
  "picocolors": "^1.1.1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maizzle/framework",
3
- "version": "6.0.4",
3
+ "version": "6.0.6",
4
4
  "description": "Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -58,7 +58,7 @@
58
58
  "markdown-exit": "^1.1.0-beta.2",
59
59
  "nodemailer": "^9.0.0",
60
60
  "ora": "^9.3.0",
61
- "oxfmt": "^0.55.0",
61
+ "oxfmt": "^0.57.0",
62
62
  "pathe": "^2.0.3",
63
63
  "postcss": "^8.5.6",
64
64
  "postcss-calc": "^10.1.1",
@@ -1,16 +0,0 @@
1
- import commander from './index.js';
2
-
3
- // wrapper to provide named exports for ESM.
4
- export const {
5
- program,
6
- createCommand,
7
- createArgument,
8
- createOption,
9
- CommanderError,
10
- InvalidArgumentError,
11
- InvalidOptionArgumentError, // deprecated old name
12
- Command,
13
- Argument,
14
- Option,
15
- Help,
16
- } = commander;
@@ -1,3 +0,0 @@
1
- // Just reexport the types from cjs
2
- // This is a bit indirect. There is not an index.js, but TypeScript will look for index.d.ts for types.
3
- export * from './index.js';