@raisenow/tamaro-cli 1.1.9 → 1.3.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 (121) hide show
  1. package/.history/.eslintignore_20220609190420 +4 -0
  2. package/.history/.eslintignore_20230911190227 +6 -0
  3. package/.history/.eslintignore_20230911211247 +7 -0
  4. package/.history/.eslintignore_20230911211250 +7 -0
  5. package/.history/.eslintrc_20230911201601.js +49 -0
  6. package/.history/.eslintrc_20230911201643.js +49 -0
  7. package/.history/.eslintrc_20230911201735.js +49 -0
  8. package/.history/.eslintrc_20230911201913.js +64 -0
  9. package/.history/.eslintrc_20230911202002.js +62 -0
  10. package/.history/.eslintrc_20230911202138.js +133 -0
  11. package/.history/.eslintrc_20230911202140.js +133 -0
  12. package/.history/.eslintrc_20230911202145.js +133 -0
  13. package/.history/.eslintrc_20230911202147.js +133 -0
  14. package/.history/.eslintrc_20230911202406.js +133 -0
  15. package/.history/.eslintrc_20230911202447.js +133 -0
  16. package/.history/.eslintrc_20230911202453.js +133 -0
  17. package/.history/.eslintrc_20230911202511.js +133 -0
  18. package/.history/.eslintrc_20230911202527.js +133 -0
  19. package/.history/.eslintrc_20230911202639.js +125 -0
  20. package/.history/.eslintrc_20230911202721.js +149 -0
  21. package/.history/.eslintrc_20230911202746.js +149 -0
  22. package/.history/.eslintrc_20240423125702.cjs +148 -0
  23. package/.history/.gitignore_20220609190420 +14 -0
  24. package/.history/.gitignore_20230911185959 +4 -0
  25. package/.history/.gitignore_20230911190006 +4 -0
  26. package/.history/.gitignore_20230911190007 +4 -0
  27. package/.history/.nmprc_20241004144025 +0 -0
  28. package/.history/.nmprc_20241004144041 +1 -0
  29. package/.history/.npmrc_20241004144040 +1 -0
  30. package/.history/.npmrc_20241004144152 +1 -0
  31. package/.history/.npmrc_20241004145639 +2 -0
  32. package/.history/.npmrc_20241004145649 +1 -0
  33. package/.history/.nvmrc_20250729181039 +1 -0
  34. package/.history/.prettierignore_20220609190420 +5 -0
  35. package/.history/.prettierignore_20230911190242 +7 -0
  36. package/.history/.prettierignore_20230911190245 +7 -0
  37. package/.history/.prettierignore_20230911211301 +8 -0
  38. package/.history/CHANGELOG_20250729195139.md +28 -0
  39. package/.history/CHANGELOG_20250729195148.md +29 -0
  40. package/.history/CHANGELOG_20250729195156.md +28 -0
  41. package/.history/CHANGELOG_20250729195218.md +29 -0
  42. package/.history/CHANGELOG_20250729195223.md +27 -0
  43. package/.history/CHANGELOG_20250729195506.md +29 -0
  44. package/.history/CHANGELOG_20250729224404.md +30 -0
  45. package/.history/CHANGELOG_20250729224411.md +30 -0
  46. package/.history/CHANGELOG_20250730124538.md +41 -0
  47. package/.history/CHANGELOG_20250730124603.md +38 -0
  48. package/.history/CHANGELOG_20250730124627.md +36 -0
  49. package/.history/CHANGELOG_20250730124638.md +36 -0
  50. package/.history/CHANGELOG_20250730124640.md +36 -0
  51. package/.history/README_20230911145033.md +245 -0
  52. package/.history/README_20230911151749.md +245 -0
  53. package/.history/README_20230911151844.md +245 -0
  54. package/.history/README_20230911153040.md +245 -0
  55. package/.history/README_20230911202959.md +245 -0
  56. package/.history/bitbucket-pipelines_20250729111540.yml +46 -0
  57. package/.history/bitbucket-pipelines_20250729210338.yml +46 -0
  58. package/.history/bitbucket-pipelines_20250729210340.yml +46 -0
  59. package/.history/bitbucket-pipelines_20250729210342.yml +46 -0
  60. package/.history/bitbucket-pipelines_20250729222234.yml +47 -0
  61. package/.history/bitbucket-pipelines_20250729222554.yml +47 -0
  62. package/.history/bitbucket-pipelines_20250729222555.yml +47 -0
  63. package/.history/bitbucket-pipelines_20250729223022.yml +46 -0
  64. package/.history/bitbucket-pipelines_20250729223024.yml +46 -0
  65. package/.history/cli_20241005014539 +3 -0
  66. package/.history/cli_20241005014542 +3 -0
  67. package/.history/cli_20241005014848 +3 -0
  68. package/.history/dist/chunk-FICM3HUI_20230912183408.js +302 -0
  69. package/.history/dist/chunk-FICM3HUI_20230912201610.js +302 -0
  70. package/.history/package_20250729182417.json +111 -0
  71. package/.history/package_20250729182419.json +111 -0
  72. package/.history/package_20250729182618.json +110 -0
  73. package/.history/package_20250729182834.json +110 -0
  74. package/.history/package_20250729183032.json +110 -0
  75. package/.history/package_20250729183033.json +110 -0
  76. package/.history/package_20250729185750.json +110 -0
  77. package/.history/package_20250729185815.json +110 -0
  78. package/.history/package_20250729185846.json +110 -0
  79. package/.history/package_20250729185854.json +110 -0
  80. package/.history/package_20250729185943.json +110 -0
  81. package/.history/package_20250729190645.json +110 -0
  82. package/.history/package_20250729195934.json +110 -0
  83. package/.history/package_20250729200013.json +110 -0
  84. package/.history/package_20250729200056.json +110 -0
  85. package/.history/package_20250729200434.json +110 -0
  86. package/.history/package_20250729200808.json +110 -0
  87. package/.history/package_20250729200944.json +110 -0
  88. package/.history/package_20250729214420.json +114 -0
  89. package/.history/package_20250729223112.json +110 -0
  90. package/.history/package_20250729223127.json +110 -0
  91. package/.history/package_20250729223134.json +110 -0
  92. package/.history/package_20250730124647.json +114 -0
  93. package/.history/tsconfig_20241005001442.json +34 -0
  94. package/.history/tsconfig_20241005001500.json +34 -0
  95. package/.history/tsconfig_20241005001540.json +34 -0
  96. package/.history/tsconfig_20241005014429.json +42 -0
  97. package/.history/tsconfig_20241005014436.json +42 -0
  98. package/.history/tsconfig_20241005014439.json +38 -0
  99. package/.history/tsconfig_20241005014455.json +38 -0
  100. package/.history/tsconfig_20241005014521.json +38 -0
  101. package/.history/vitest.config_20250729214539.ts +0 -0
  102. package/.history/vitest.config_20250729214659.ts +24 -0
  103. package/.history/vitest.config_20250729214748.ts +21 -0
  104. package/.history/vitest.config_20250729214825.ts +21 -0
  105. package/.history/vitest.config_20250729214902.ts +21 -0
  106. package/.history/vitest.config_20250729222125.ts +20 -0
  107. package/.history/vitest.config_20250729222213.ts +20 -0
  108. package/.idea/codeStyles/Project.xml +131 -0
  109. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  110. package/.idea/misc.xml +17 -0
  111. package/.idea/prettier.xml +1 -1
  112. package/.nvmrc +1 -1
  113. package/bitbucket-pipelines.yml +6 -2
  114. package/dist/{chunk-KVWFHWZD.js → chunk-H4BMVFM6.js} +2 -2
  115. package/dist/cli.js +158 -59
  116. package/dist/webpack.config.js +44 -13
  117. package/package.json +53 -46
  118. package/vitest.config.ts +20 -0
  119. package/.idea/runConfigurations/build_watch.xml +0 -13
  120. package/.idea/runConfigurations/lint_fix.xml +0 -13
  121. package/.idea/runConfigurations/tscheck.xml +0 -12
package/dist/cli.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  resolveBin,
23
23
  resolveOwn,
24
24
  runCommandSync
25
- } from "./chunk-KVWFHWZD.js";
25
+ } from "./chunk-H4BMVFM6.js";
26
26
 
27
27
  // src/cli.ts
28
28
  import { createCommand } from "commander";
@@ -31,31 +31,121 @@ import { createCommand } from "commander";
31
31
  import { glob } from "glob";
32
32
 
33
33
  // src/lib/validators/validateEmailTemplates.ts
34
- import fs from "node:fs/promises";
35
- import handlebars from "handlebars";
36
- var { compile } = handlebars;
37
- var validateEmailTemplates = async (templateFiles) => {
34
+ import fs from "fs";
35
+ import Handlebars from "handlebars";
36
+ import helpers from "handlebars-helpers";
37
+ helpers.comparison({
38
+ handlebars: Handlebars
39
+ });
40
+ var validateEmailTemplates = (templatePaths) => {
38
41
  const errors = [];
39
- for (const templateFile of templateFiles) {
42
+ for (const templatePath of templatePaths) {
40
43
  try {
41
- const compiled = compile(await fs.readFile(templateFile, "utf-8"));
42
- compiled({});
43
- console.log(`${templateFile} is a valid email template`);
44
+ const template = fs.readFileSync(templatePath, "utf-8");
45
+ assureOnlySupportedHelpers(template);
46
+ compileEmailTemplate(template);
47
+ console.log(`${templatePath} is a valid email template`);
44
48
  } catch (e) {
45
- errors.push(`${templateFile} is invalid`);
49
+ errors.push(`${templatePath} is invalid`);
46
50
  errors.push(e);
47
51
  }
48
52
  }
49
53
  return errors;
50
54
  };
55
+ var assureOnlySupportedHelpers = (template) => {
56
+ const extractHelpers = (ast2) => {
57
+ const usedHelpers2 = /* @__PURE__ */ new Set();
58
+ const extractHelperName = (node) => {
59
+ if (node.path?.type === "PathExpression" && (node.params?.length > 0 || node.hash?.pairs?.length > 0)) {
60
+ return node.path?.original;
61
+ }
62
+ };
63
+ const visit = (node) => {
64
+ if (!node) {
65
+ return;
66
+ }
67
+ switch (node.type) {
68
+ case "MustacheStatement":
69
+ case "BlockStatement": {
70
+ const name = extractHelperName(node);
71
+ if (name) {
72
+ usedHelpers2.add(name);
73
+ }
74
+ break;
75
+ }
76
+ }
77
+ for (const key in node) {
78
+ const value = node[key];
79
+ if (Array.isArray(value)) {
80
+ value.forEach(visit);
81
+ } else if (value && typeof value === "object" && value.type) {
82
+ visit(value);
83
+ }
84
+ }
85
+ };
86
+ visit(ast2);
87
+ return usedHelpers2;
88
+ };
89
+ const ast = Handlebars.parse(template);
90
+ const usedHelpers = extractHelpers(ast);
91
+ const supportedHelpers = /* @__PURE__ */ new Set([
92
+ // Built-in Handlebars helpers
93
+ "if",
94
+ "unless",
95
+ "each",
96
+ "with",
97
+ "log",
98
+ "lookup",
99
+ // Comparison helpers, provided by "handlebars-helpers" lib
100
+ "and",
101
+ "compare",
102
+ "contains",
103
+ "default",
104
+ "eq",
105
+ "gt",
106
+ "gte",
107
+ "has",
108
+ "isFalsey",
109
+ "isTruthy",
110
+ "ifEven",
111
+ "ifNth",
112
+ "ifOdd",
113
+ "is",
114
+ "isnt",
115
+ "lt",
116
+ "lte",
117
+ "neither",
118
+ "not",
119
+ "or",
120
+ "unlessEq",
121
+ "unlessGt",
122
+ "unlessLt",
123
+ "unlessGteq",
124
+ "unlessLteq"
125
+ ]);
126
+ const unsupportedHelpers = Array.from(usedHelpers).filter(
127
+ (h) => !supportedHelpers.has(h)
128
+ );
129
+ if (unsupportedHelpers.length > 0) {
130
+ throw new Error(
131
+ `Email template uses unsupported Handlebars helpers: ${unsupportedHelpers.join(", ")}`
132
+ );
133
+ }
134
+ };
135
+ var compileEmailTemplate = (template) => {
136
+ const compiled = Handlebars.compile(template);
137
+ compiled({});
138
+ };
51
139
 
52
140
  // src/commands/validate.ts
53
141
  var validate = async () => {
54
- const errors = await validateEmailTemplates(await glob("email-config/templates/**/*.hbs"));
142
+ const errors = validateEmailTemplates(
143
+ (await glob("email-config/templates/**/*.hbs")).sort()
144
+ );
55
145
  if (errors.length) {
56
146
  halt(errors.map((el) => el.toString()).join("\n"));
57
147
  }
58
- logTitle("Valid. Bye.");
148
+ logTitle("Validated successfully");
59
149
  };
60
150
 
61
151
  // src/lib/aws.ts
@@ -611,79 +701,83 @@ var prepareFlags4 = async (options) => {
611
701
  // package.json
612
702
  var package_default = {
613
703
  name: "@raisenow/tamaro-cli",
614
- version: "1.1.9",
704
+ version: "1.3.0",
615
705
  author: {
616
706
  name: "RaiseNow",
617
707
  email: "development@raisenow.com"
618
708
  },
619
709
  type: "module",
620
710
  bin: "dist/cli.js",
621
- packageManager: "pnpm@9.14.2",
711
+ packageManager: "pnpm@10.13.1",
622
712
  engines: {
623
- node: ">=20",
624
- pnpm: ">= 9.12",
713
+ node: ">=22",
714
+ pnpm: ">= 10",
625
715
  npm: "please-use-pnpm",
626
716
  yarn: "please-use-pnpm"
627
717
  },
628
718
  scripts: {
629
719
  prepare: "pnpm build",
630
- tscheck: "tsc --noEmit",
720
+ typecheck: "tsc --noEmit",
631
721
  build: "tsup src/cli.ts src/webpack.config.ts --clean --shims --format esm",
632
722
  "build:watch": "pnpm build --watch --ignore-watch .history --ignore-watch .idea",
633
723
  readme: "pnpx http-server . --cors -o /readme.html",
634
724
  lint: "DEBUG=eslint:cli-engine eslint .",
635
725
  "lint:fix": "DEBUG=eslint:cli-engine eslint --fix .",
636
- format: "prettier --write ."
726
+ format: "prettier --write .",
727
+ test: "vitest",
728
+ "test:watch": "vitest --watch",
729
+ "test:coverage": "vitest --coverage"
637
730
  },
638
731
  dependencies: {
639
- "@babel/cli": "^7.25.9",
640
- "@babel/core": "^7.26.0",
641
- "@babel/plugin-proposal-decorators": "^7.25.9",
732
+ "@babel/cli": "^7.28.0",
733
+ "@babel/core": "^7.28.0",
734
+ "@babel/plugin-proposal-decorators": "^7.28.0",
642
735
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
643
- "@babel/plugin-transform-runtime": "^7.25.9",
644
- "@babel/preset-env": "^7.26.0",
645
- "@babel/preset-react": "^7.25.9",
646
- "@babel/preset-typescript": "^7.26.0",
647
- "@babel/runtime-corejs3": "^7.26.0",
648
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
649
- "@statoscope/webpack-plugin": "^5.28.3",
736
+ "@babel/plugin-transform-runtime": "^7.28.0",
737
+ "@babel/preset-env": "^7.28.0",
738
+ "@babel/preset-react": "^7.27.1",
739
+ "@babel/preset-typescript": "^7.27.1",
740
+ "@babel/runtime-corejs3": "^7.28.2",
741
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.6.1",
742
+ "@statoscope/webpack-plugin": "^5.29.0",
650
743
  "@types/columnify": "^1.5.4",
651
- "@types/lodash": "^4.17.13",
652
- "@types/node": "^22.9.3",
744
+ "@types/handlebars-helpers": "^0.5.6",
745
+ "@types/lodash": "^4.17.20",
746
+ "@types/node": "^22.17.0",
653
747
  "@types/node-notifier": "^8.0.5",
654
748
  "@types/prompts": "^2.4.9",
655
749
  "@types/resolve-bin": "^0.4.3",
656
750
  "@types/webpack-config-utils": "^2.3.4",
657
751
  "@typescript-eslint/eslint-plugin": "^7.18.0",
658
752
  "@typescript-eslint/parser": "^7.18.0",
659
- autoprefixer: "^10.4.20",
660
- "babel-loader": "^9.2.1",
753
+ autoprefixer: "^10.4.21",
754
+ "babel-loader": "^10.0.0",
661
755
  "babel-plugin-istanbul": "^7.0.0",
662
756
  "babel-plugin-lodash": "^3.3.4",
663
- chalk: "^5.3.0",
757
+ chalk: "^5.4.1",
664
758
  "clean-webpack-plugin": "^4.0.0",
665
759
  columnify: "^1.6.0",
666
- commander: "^12.1.0",
667
- "copy-webpack-plugin": "^12.0.2",
668
- "core-js": "^3.39.0",
760
+ commander: "^14.0.0",
761
+ "copy-webpack-plugin": "^13.0.0",
762
+ "core-js": "^3.44.0",
669
763
  "css-loader": "^7.1.2",
670
- "css-minimizer-webpack-plugin": "^7.0.0",
671
- dotenv: "^16.4.5",
764
+ "css-minimizer-webpack-plugin": "^7.0.2",
765
+ dotenv: "^17.2.1",
672
766
  "escape-string-regexp": "^5.0.0",
673
767
  eslint: "^8.57.1",
674
- "eslint-config-prettier": "^9.1.0",
768
+ "eslint-config-prettier": "^10.1.8",
675
769
  "eslint-import-resolver-typescript": "^3.6.3",
676
770
  "eslint-plugin-deprecation": "^3.0.0",
677
- "eslint-plugin-import": "^2.31.0",
678
- "eslint-plugin-markdownlint": "^0.6.0",
679
- "eslint-plugin-promise": "^7.1.0",
771
+ "eslint-plugin-import": "^2.32.0",
772
+ "eslint-plugin-markdownlint": "^0.9.0",
773
+ "eslint-plugin-promise": "^7.2.1",
680
774
  "eslint-plugin-unused-imports": "^3.2.0",
681
- "eslint-plugin-yml": "^1.15.0",
775
+ "eslint-plugin-yml": "^1.18.0",
682
776
  "eslint-webpack-plugin": "^4.2.0",
683
- execa: "^9.5.1",
777
+ execa: "^9.6.0",
684
778
  "file-loader": "^6.2.0",
685
- "fork-ts-checker-webpack-plugin": "^9.0.2",
686
- glob: "^11.0.0",
779
+ "fork-ts-checker-webpack-plugin": "^9.1.0",
780
+ glob: "^11.0.3",
687
781
  handlebars: "^4.7.8",
688
782
  "handlebars-helpers": "^0.10.0",
689
783
  "html-loader": "^5.1.0",
@@ -692,27 +786,30 @@ var package_default = {
692
786
  lodash: "^4.17.21",
693
787
  "mini-css-extract-plugin": "^2.9.2",
694
788
  "node-notifier": "^10.0.1",
695
- portfinder: "^1.0.32",
696
- postcss: "^8.4.49",
697
- "postcss-custom-properties": "^14.0.4",
789
+ portfinder: "^1.0.37",
790
+ postcss: "^8.5.6",
791
+ "postcss-custom-properties": "^14.0.6",
792
+ "postcss-import": "^16.1.1",
698
793
  "postcss-loader": "^8.1.1",
699
- prettier: "^3.3.3",
794
+ "postcss-nested": "^7.0.2",
795
+ prettier: "^3.6.2",
700
796
  prompts: "^2.4.2",
701
- "react-refresh": "^0.14.2",
797
+ "react-refresh": "^0.17.0",
702
798
  "resolve-url-loader": "^5.0.0",
703
- sass: "^1.81.0",
704
- "sass-loader": "^16.0.3",
799
+ sass: "^1.89.2",
800
+ "sass-loader": "^16.0.5",
705
801
  "source-map-loader": "^5.0.0",
706
802
  "strip-indent": "^4.0.0",
707
803
  "style-loader": "^4.0.0",
708
804
  "tsconfig-paths-webpack-plugin": "^4.2.0",
709
- tsup: "^8.3.5",
710
- typescript: "^5.7.2",
805
+ tsup: "^8.5.0",
806
+ typescript: "^5.8.3",
711
807
  "url-loader": "^4.1.1",
712
- webpack: "^5.96.1",
713
- "webpack-cli": "^5.1.4",
808
+ vitest: "^3.2.4",
809
+ webpack: "^5.101.0",
810
+ "webpack-cli": "^6.0.1",
714
811
  "webpack-config-utils": "^2.3.1",
715
- "webpack-dev-server": "^5.1.0",
812
+ "webpack-dev-server": "^5.2.2",
716
813
  "yaml-loader": "^0.8.1"
717
814
  }
718
815
  };
@@ -792,7 +889,9 @@ cli.command("list-deployed").description(
792
889
  cli.command("deploy-email-config").description("Deploy a widget's email configuration to AWS S3").option("--profile <profile>", "AWS profile").option("--ci", "CI environment", false).option("--bucket <bucket>", "AWS bucket for email configs").action(async (options) => {
793
890
  await deployEmailConfig(options);
794
891
  });
795
- cli.command("validate").description("Validate the current Tamaro configuration to avoid common errors").action(async () => {
892
+ cli.command("validate").description(
893
+ "Validate the current Tamaro configuration to avoid common errors"
894
+ ).action(async () => {
796
895
  await validate();
797
896
  });
798
897
  (async () => {
@@ -10,7 +10,7 @@ import {
10
10
  logTitle,
11
11
  moduleFileExtensions,
12
12
  resolveApp
13
- } from "./chunk-KVWFHWZD.js";
13
+ } from "./chunk-H4BMVFM6.js";
14
14
 
15
15
  // src/webpack.config.ts
16
16
  import { existsSync } from "fs";
@@ -83,8 +83,10 @@ var getWebpackConfig = (env) => {
83
83
  logDataTable(envVars.raw);
84
84
  const getCssLoaders = ({
85
85
  styleLoader = true,
86
+ sassLoader = true,
86
87
  ...cssOptions
87
88
  }) => {
89
+ const importLoaders = sassLoader ? 3 : 1;
88
90
  return removeEmpty([
89
91
  styleLoader ? ifMin({ loader: MiniCssExtractPlugin.loader }) : void 0,
90
92
  styleLoader ? ifNotMin({
@@ -99,7 +101,7 @@ var getWebpackConfig = (env) => {
99
101
  loader: require2.resolve("css-loader"),
100
102
  options: {
101
103
  sourceMap: ifNotMin(),
102
- importLoaders: 3,
104
+ importLoaders,
103
105
  ...cssOptions
104
106
  }
105
107
  },
@@ -108,26 +110,28 @@ var getWebpackConfig = (env) => {
108
110
  options: {
109
111
  postcssOptions: {
110
112
  plugins: removeEmpty([
113
+ !sassLoader ? require2.resolve("postcss-import") : void 0,
114
+ !sassLoader ? require2.resolve("postcss-nested") : void 0,
111
115
  useTailwind ? [
112
116
  require2.resolve("tailwindcss", {
113
117
  paths: [paths.appNodeModules]
114
118
  }),
115
119
  paths.appTailwindConfig
116
120
  ] : void 0,
117
- require2.resolve("postcss-custom-properties"),
121
+ // require.resolve('postcss-custom-properties'),
118
122
  require2.resolve("autoprefixer")
119
123
  ])
120
124
  }
121
125
  }
122
126
  },
123
- {
127
+ sassLoader ? {
124
128
  loader: require2.resolve("resolve-url-loader"),
125
129
  options: { sourceMap: ifNotMin() }
126
- },
127
- {
130
+ } : void 0,
131
+ sassLoader ? {
128
132
  loader: require2.resolve("sass-loader"),
129
133
  options: { api: "modern-compiler", sourceMap: true }
130
- }
134
+ } : void 0
131
135
  ]);
132
136
  };
133
137
  const config = {
@@ -206,7 +210,12 @@ var getWebpackConfig = (env) => {
206
210
  allowDeclareFields: true
207
211
  }
208
212
  ],
209
- require2.resolve("@babel/preset-react")
213
+ [
214
+ require2.resolve("@babel/preset-react"),
215
+ {
216
+ runtime: "automatic"
217
+ }
218
+ ]
210
219
  ],
211
220
  plugins: removeEmpty([
212
221
  [
@@ -238,20 +247,42 @@ var getWebpackConfig = (env) => {
238
247
  {
239
248
  test: /\.(js|mjs)$/
240
249
  },
241
- // Styles (extracted)
250
+ // SCSS Styles (extracted)
251
+ {
252
+ test: /\.scss$/,
253
+ resourceQuery: { not: [/inline/] },
254
+ use: getCssLoaders({
255
+ styleLoader: true,
256
+ sassLoader: true
257
+ })
258
+ },
259
+ // CSS Styles (extracted)
242
260
  {
243
- test: /\.s?css$/,
261
+ test: /\.css$/,
244
262
  resourceQuery: { not: [/inline/] },
245
263
  use: getCssLoaders({
246
- styleLoader: true
264
+ styleLoader: true,
265
+ sassLoader: false
266
+ })
267
+ },
268
+ // SCSS Styles (as string)
269
+ {
270
+ test: /\.scss$/,
271
+ resourceQuery: /inline/,
272
+ use: getCssLoaders({
273
+ styleLoader: false,
274
+ sassLoader: true,
275
+ exportType: "string",
276
+ sourceMap: false
247
277
  })
248
278
  },
249
- // Styles (as string)
279
+ // CSS Styles (as string)
250
280
  {
251
- test: /\.s?css$/,
281
+ test: /\.css$/,
252
282
  resourceQuery: /inline/,
253
283
  use: getCssLoaders({
254
284
  styleLoader: false,
285
+ sassLoader: false,
255
286
  exportType: "string",
256
287
  sourceMap: false
257
288
  })
package/package.json CHANGED
@@ -1,78 +1,82 @@
1
1
  {
2
2
  "name": "@raisenow/tamaro-cli",
3
- "version": "1.1.9",
3
+ "version": "1.3.0",
4
4
  "author": {
5
5
  "name": "RaiseNow",
6
6
  "email": "development@raisenow.com"
7
7
  },
8
8
  "type": "module",
9
9
  "bin": "dist/cli.js",
10
- "packageManager": "pnpm@9.14.2",
10
+ "packageManager": "pnpm@10.13.1",
11
11
  "engines": {
12
- "node": ">=20",
13
- "pnpm": ">= 9.12",
12
+ "node": ">=22",
13
+ "pnpm": ">= 10",
14
14
  "npm": "please-use-pnpm",
15
15
  "yarn": "please-use-pnpm"
16
16
  },
17
17
  "scripts": {
18
18
  "prepare": "pnpm build",
19
- "tscheck": "tsc --noEmit",
19
+ "typecheck": "tsc --noEmit",
20
20
  "build": "tsup src/cli.ts src/webpack.config.ts --clean --shims --format esm",
21
21
  "build:watch": "pnpm build --watch --ignore-watch .history --ignore-watch .idea",
22
22
  "readme": "pnpx http-server . --cors -o /readme.html",
23
23
  "lint": "DEBUG=eslint:cli-engine eslint .",
24
24
  "lint:fix": "DEBUG=eslint:cli-engine eslint --fix .",
25
- "format": "prettier --write ."
25
+ "format": "prettier --write .",
26
+ "test": "vitest",
27
+ "test:watch": "vitest --watch",
28
+ "test:coverage": "vitest --coverage"
26
29
  },
27
30
  "dependencies": {
28
- "@babel/cli": "^7.25.9",
29
- "@babel/core": "^7.26.0",
30
- "@babel/plugin-proposal-decorators": "^7.25.9",
31
+ "@babel/cli": "^7.28.0",
32
+ "@babel/core": "^7.28.0",
33
+ "@babel/plugin-proposal-decorators": "^7.28.0",
31
34
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
32
- "@babel/plugin-transform-runtime": "^7.25.9",
33
- "@babel/preset-env": "^7.26.0",
34
- "@babel/preset-react": "^7.25.9",
35
- "@babel/preset-typescript": "^7.26.0",
36
- "@babel/runtime-corejs3": "^7.26.0",
37
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
38
- "@statoscope/webpack-plugin": "^5.28.3",
35
+ "@babel/plugin-transform-runtime": "^7.28.0",
36
+ "@babel/preset-env": "^7.28.0",
37
+ "@babel/preset-react": "^7.27.1",
38
+ "@babel/preset-typescript": "^7.27.1",
39
+ "@babel/runtime-corejs3": "^7.28.2",
40
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.6.1",
41
+ "@statoscope/webpack-plugin": "^5.29.0",
39
42
  "@types/columnify": "^1.5.4",
40
- "@types/lodash": "^4.17.13",
41
- "@types/node": "^22.9.3",
43
+ "@types/handlebars-helpers": "^0.5.6",
44
+ "@types/lodash": "^4.17.20",
45
+ "@types/node": "^22.17.0",
42
46
  "@types/node-notifier": "^8.0.5",
43
47
  "@types/prompts": "^2.4.9",
44
48
  "@types/resolve-bin": "^0.4.3",
45
49
  "@types/webpack-config-utils": "^2.3.4",
46
50
  "@typescript-eslint/eslint-plugin": "^7.18.0",
47
51
  "@typescript-eslint/parser": "^7.18.0",
48
- "autoprefixer": "^10.4.20",
49
- "babel-loader": "^9.2.1",
52
+ "autoprefixer": "^10.4.21",
53
+ "babel-loader": "^10.0.0",
50
54
  "babel-plugin-istanbul": "^7.0.0",
51
55
  "babel-plugin-lodash": "^3.3.4",
52
- "chalk": "^5.3.0",
56
+ "chalk": "^5.4.1",
53
57
  "clean-webpack-plugin": "^4.0.0",
54
58
  "columnify": "^1.6.0",
55
- "commander": "^12.1.0",
56
- "copy-webpack-plugin": "^12.0.2",
57
- "core-js": "^3.39.0",
59
+ "commander": "^14.0.0",
60
+ "copy-webpack-plugin": "^13.0.0",
61
+ "core-js": "^3.44.0",
58
62
  "css-loader": "^7.1.2",
59
- "css-minimizer-webpack-plugin": "^7.0.0",
60
- "dotenv": "^16.4.5",
63
+ "css-minimizer-webpack-plugin": "^7.0.2",
64
+ "dotenv": "^17.2.1",
61
65
  "escape-string-regexp": "^5.0.0",
62
66
  "eslint": "^8.57.1",
63
- "eslint-config-prettier": "^9.1.0",
67
+ "eslint-config-prettier": "^10.1.8",
64
68
  "eslint-import-resolver-typescript": "^3.6.3",
65
69
  "eslint-plugin-deprecation": "^3.0.0",
66
- "eslint-plugin-import": "^2.31.0",
67
- "eslint-plugin-markdownlint": "^0.6.0",
68
- "eslint-plugin-promise": "^7.1.0",
70
+ "eslint-plugin-import": "^2.32.0",
71
+ "eslint-plugin-markdownlint": "^0.9.0",
72
+ "eslint-plugin-promise": "^7.2.1",
69
73
  "eslint-plugin-unused-imports": "^3.2.0",
70
- "eslint-plugin-yml": "^1.15.0",
74
+ "eslint-plugin-yml": "^1.18.0",
71
75
  "eslint-webpack-plugin": "^4.2.0",
72
- "execa": "^9.5.1",
76
+ "execa": "^9.6.0",
73
77
  "file-loader": "^6.2.0",
74
- "fork-ts-checker-webpack-plugin": "^9.0.2",
75
- "glob": "^11.0.0",
78
+ "fork-ts-checker-webpack-plugin": "^9.1.0",
79
+ "glob": "^11.0.3",
76
80
  "handlebars": "^4.7.8",
77
81
  "handlebars-helpers": "^0.10.0",
78
82
  "html-loader": "^5.1.0",
@@ -81,27 +85,30 @@
81
85
  "lodash": "^4.17.21",
82
86
  "mini-css-extract-plugin": "^2.9.2",
83
87
  "node-notifier": "^10.0.1",
84
- "portfinder": "^1.0.32",
85
- "postcss": "^8.4.49",
86
- "postcss-custom-properties": "^14.0.4",
88
+ "portfinder": "^1.0.37",
89
+ "postcss": "^8.5.6",
90
+ "postcss-custom-properties": "^14.0.6",
91
+ "postcss-import": "^16.1.1",
87
92
  "postcss-loader": "^8.1.1",
88
- "prettier": "^3.3.3",
93
+ "postcss-nested": "^7.0.2",
94
+ "prettier": "^3.6.2",
89
95
  "prompts": "^2.4.2",
90
- "react-refresh": "^0.14.2",
96
+ "react-refresh": "^0.17.0",
91
97
  "resolve-url-loader": "^5.0.0",
92
- "sass": "^1.81.0",
93
- "sass-loader": "^16.0.3",
98
+ "sass": "^1.89.2",
99
+ "sass-loader": "^16.0.5",
94
100
  "source-map-loader": "^5.0.0",
95
101
  "strip-indent": "^4.0.0",
96
102
  "style-loader": "^4.0.0",
97
103
  "tsconfig-paths-webpack-plugin": "^4.2.0",
98
- "tsup": "^8.3.5",
99
- "typescript": "^5.7.2",
104
+ "tsup": "^8.5.0",
105
+ "typescript": "^5.8.3",
100
106
  "url-loader": "^4.1.1",
101
- "webpack": "^5.96.1",
102
- "webpack-cli": "^5.1.4",
107
+ "vitest": "^3.2.4",
108
+ "webpack": "^5.101.0",
109
+ "webpack-cli": "^6.0.1",
103
110
  "webpack-config-utils": "^2.3.1",
104
- "webpack-dev-server": "^5.1.0",
111
+ "webpack-dev-server": "^5.2.2",
105
112
  "yaml-loader": "^0.8.1"
106
113
  }
107
114
  }
@@ -0,0 +1,20 @@
1
+ import {defineConfig} from 'vitest/config'
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ watch: false,
6
+ globals: true,
7
+ environment: 'node',
8
+ include: ['{src,tests}/**/*.{test,spec}.{ts,tsx}'],
9
+ reporters: ['default'],
10
+ coverage: {
11
+ provider: 'v8',
12
+ exclude: [
13
+ 'dist/**',
14
+ '.eslintrc.cjs',
15
+ '.prettierrc.cjs',
16
+ 'vitest.config.ts',
17
+ ],
18
+ },
19
+ },
20
+ })
@@ -1,13 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="build:watch" type="js.build_tools.npm" nameIsGenerated="true">
3
- <package-json value="$PROJECT_DIR$/package.json" />
4
- <command value="run" />
5
- <scripts>
6
- <script value="build:watch" />
7
- </scripts>
8
- <node-interpreter value="project" />
9
- <package-manager value="pnpm" />
10
- <envs />
11
- <method v="2" />
12
- </configuration>
13
- </component>
@@ -1,13 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="lint:fix" type="js.build_tools.npm" nameIsGenerated="true">
3
- <package-json value="$PROJECT_DIR$/package.json" />
4
- <command value="run" />
5
- <scripts>
6
- <script value="lint:fix" />
7
- </scripts>
8
- <node-interpreter value="project" />
9
- <package-manager value="pnpm" />
10
- <envs />
11
- <method v="2" />
12
- </configuration>
13
- </component>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="tscheck" type="js.build_tools.npm" nameIsGenerated="true">
3
- <package-json value="$PROJECT_DIR$/package.json" />
4
- <command value="run" />
5
- <scripts>
6
- <script value="tscheck" />
7
- </scripts>
8
- <node-interpreter value="project" />
9
- <envs />
10
- <method v="2" />
11
- </configuration>
12
- </component>