@raisenow/tamaro-cli 1.0.19 → 1.0.20

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.
@@ -43,7 +43,9 @@ var TAMARO_SELF_SERVICE_PACKAGE_NAMES = ["@raisenow/tamaro-self-service"];
43
43
  var resolveApp = (relativePath) => resolve(realpathSync(process.cwd()), relativePath);
44
44
  var resolveOwn = (relativePath) => resolve(__dirname, "..", relativePath);
45
45
  var resolveModule = (resolveFn, filePath) => {
46
- const extension = moduleFileExtensions.find((extension2) => existsSync(resolveFn(`${filePath}.${extension2}`)));
46
+ const extension = moduleFileExtensions.find(
47
+ (extension2) => existsSync(resolveFn(`${filePath}.${extension2}`))
48
+ );
47
49
  if (extension) {
48
50
  return resolveFn(`${filePath}.${extension}`);
49
51
  }
@@ -58,25 +60,28 @@ var resolveBin = (name) => {
58
60
  };
59
61
  var getWidgetUuid = () => basename(resolveApp("."));
60
62
  var getPaths = (ifCore) => {
61
- return ifCore({
62
- app: resolveApp("."),
63
- appEntry: resolveModule(resolveApp, "src/index"),
64
- appDist: resolveApp("dist"),
65
- appNodeModules: resolveApp("node_modules"),
66
- appTsConfig: resolveApp("tsconfig.json"),
67
- appHtml: resolveApp("src/*.html"),
68
- appEnv: resolveApp(".env*"),
69
- appTailwindConfig: resolveApp("tailwind.config.js")
70
- }, {
71
- app: resolveApp("."),
72
- appEntry: resolveModule(resolveApp, "widget"),
73
- appDist: resolveApp(`../../dist/${getWidgetUuid()}`),
74
- appNodeModules: resolveApp("../../node_modules"),
75
- appTsConfig: resolveApp("tsconfig.json"),
76
- appHtml: resolveApp("*.html"),
77
- appEnv: resolveApp(".env*"),
78
- appTailwindConfig: void 0
79
- });
63
+ return ifCore(
64
+ {
65
+ app: resolveApp("."),
66
+ appEntry: resolveModule(resolveApp, "src/index"),
67
+ appDist: resolveApp("dist"),
68
+ appNodeModules: resolveApp("node_modules"),
69
+ appTsConfig: resolveApp("tsconfig.json"),
70
+ appHtml: resolveApp("src/*.html"),
71
+ appEnv: resolveApp(".env*"),
72
+ appTailwindConfig: resolveApp("tailwind.config.js")
73
+ },
74
+ {
75
+ app: resolveApp("."),
76
+ appEntry: resolveModule(resolveApp, "widget"),
77
+ appDist: resolveApp(`../../dist/${getWidgetUuid()}`),
78
+ appNodeModules: resolveApp("../../node_modules"),
79
+ appTsConfig: resolveApp("tsconfig.json"),
80
+ appHtml: resolveApp("*.html"),
81
+ appEnv: resolveApp(".env*"),
82
+ appTailwindConfig: void 0
83
+ }
84
+ );
80
85
  };
81
86
  var getRelativePaths = (paths) => {
82
87
  const relativePaths = {};
@@ -101,12 +106,18 @@ var getIfCoreFns = () => {
101
106
  "core"
102
107
  ]);
103
108
  }
104
- logError(stripIndent2(` You must run "npx @raisenow/tamaro-cli" commands from:
109
+ logError(
110
+ stripIndent2(` You must run "npx @raisenow/tamaro-cli" commands from:
105
111
  1. Root of "${chalk2.bold(TAMARO_CORE_PACKAGE_NAMES[0])}" package folder.
106
- 2. Root of particular customer configuration folder of "${chalk2.bold(TAMARO_CONFIGURATIONS_PACKAGE_NAMES[0])}" package.
107
- 3. "src/self-service" folder of "${chalk2.bold(TAMARO_SELF_SERVICE_PACKAGE_NAMES[0])}" package.
112
+ 2. Root of particular customer configuration folder of "${chalk2.bold(
113
+ TAMARO_CONFIGURATIONS_PACKAGE_NAMES[0]
114
+ )}" package.
115
+ 3. "src/self-service" folder of "${chalk2.bold(
116
+ TAMARO_SELF_SERVICE_PACKAGE_NAMES[0]
117
+ )}" package.
108
118
  You are currently in "${chalk2.bold(realpathSync(process.cwd()))}".
109
- `));
119
+ `)
120
+ );
110
121
  process.exit(1);
111
122
  };
112
123
 
@@ -140,7 +151,10 @@ var getEnvVars = (files, ifMin, ifCore, ifLocalCore) => {
140
151
  (_a = process.env).NODE_ENV ?? (_a.NODE_ENV = ifMin("production", "development"));
141
152
  (_b = process.env).BABEL_ENV ?? (_b.BABEL_ENV = ifMin("production", "development"));
142
153
  (_c = process.env).EXPOSE_VAR ?? (_c.EXPOSE_VAR = ifCore("rnw.tamaroCore", "rnw.tamaro"));
143
- (_d = process.env).ELEMENT_ATTRIBUTE_DATA_WIDGET ?? (_d.ELEMENT_ATTRIBUTE_DATA_WIDGET = ifCore("rnw-tamaro-core", "rnw-tamaro"));
154
+ (_d = process.env).ELEMENT_ATTRIBUTE_DATA_WIDGET ?? (_d.ELEMENT_ATTRIBUTE_DATA_WIDGET = ifCore(
155
+ "rnw-tamaro-core",
156
+ "rnw-tamaro"
157
+ ));
144
158
  (_e = process.env).WEBPACK_UNIQUE_NAME ?? (_e.WEBPACK_UNIQUE_NAME = ifCore("RnwTamaroCore", "RnwTamaro"));
145
159
  process.env.BUILD_DATE = new Date().toISOString();
146
160
  (_f = process.env).PUBLIC_URL ?? (_f.PUBLIC_URL = "");
@@ -203,10 +217,12 @@ var assertEnvValid = (env) => {
203
217
  halt("Flag \u201C--env\u201D is required.");
204
218
  }
205
219
  if (!envs.includes(env)) {
206
- halt(stripIndent3(`
220
+ halt(
221
+ stripIndent3(`
207
222
  Flag \u201C--env\u201D has wrong value.
208
223
  Available values are: ${envs.map((v) => `\u201C${v}\u201D`).join(", ")}.
209
- `));
224
+ `)
225
+ );
210
226
  }
211
227
  const filePath = files.find((file) => basename2(file) === `.env.${env}`);
212
228
  dotenvExpand(dotenvConfig({ path: filePath }));
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  resolveBin,
13
13
  resolveOwn,
14
14
  runCommandSync
15
- } from "./chunk-6RQVBAWK.js";
15
+ } from "./chunk-CNSEEVDD.js";
16
16
 
17
17
  // src/cli.ts
18
18
  import { createCommand } from "commander";
@@ -20,7 +20,7 @@ import { createCommand } from "commander";
20
20
  // package.json
21
21
  var package_default = {
22
22
  name: "@raisenow/tamaro-cli",
23
- version: "1.0.19",
23
+ version: "1.0.20",
24
24
  author: {
25
25
  name: "RaiseNow",
26
26
  email: "development@raisenow.com"
@@ -40,25 +40,25 @@ var package_default = {
40
40
  npm: ">=8"
41
41
  },
42
42
  dependencies: {
43
- "@babel/cli": "^7.18.6",
44
- "@babel/core": "^7.18.6",
45
- "@babel/plugin-proposal-decorators": "^7.18.6",
43
+ "@babel/cli": "^7.18.9",
44
+ "@babel/core": "^7.18.9",
45
+ "@babel/plugin-proposal-decorators": "^7.18.9",
46
46
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
47
- "@babel/plugin-transform-runtime": "^7.18.6",
48
- "@babel/preset-env": "^7.18.6",
47
+ "@babel/plugin-transform-runtime": "^7.18.9",
48
+ "@babel/preset-env": "^7.18.9",
49
49
  "@babel/preset-react": "^7.18.6",
50
50
  "@babel/preset-typescript": "^7.18.6",
51
- "@babel/runtime-corejs3": "^7.18.6",
51
+ "@babel/runtime-corejs3": "^7.18.9",
52
52
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
53
- "@statoscope/webpack-plugin": "^5.22.0",
53
+ "@statoscope/webpack-plugin": "^5.24.0",
54
54
  "@types/columnify": "^1.5.1",
55
55
  "@types/lodash": "^4.14.182",
56
- "@types/node": "^18.0.1",
56
+ "@types/node": "^18.6.2",
57
57
  "@types/node-notifier": "^8.0.2",
58
58
  "@types/resolve-bin": "^0.4.1",
59
59
  "@types/webpack-config-utils": "^2.3.1",
60
- "@typescript-eslint/eslint-plugin": "^5.30.4",
61
- "@typescript-eslint/parser": "^5.30.4",
60
+ "@typescript-eslint/eslint-plugin": "^5.31.0",
61
+ "@typescript-eslint/parser": "^5.31.0",
62
62
  autoprefixer: "^10.4.7",
63
63
  "babel-loader": "^8.2.5",
64
64
  "babel-plugin-istanbul": "^6.1.1",
@@ -66,24 +66,24 @@ var package_default = {
66
66
  chalk: "^5.0.1",
67
67
  "clean-webpack-plugin": "^4.0.0",
68
68
  columnify: "^1.6.0",
69
- commander: "^9.3.0",
69
+ commander: "^9.4.0",
70
70
  "copy-webpack-plugin": "^11.0.0",
71
- "core-js": "^3.23.3",
71
+ "core-js": "^3.24.0",
72
72
  "css-loader": "^6.7.1",
73
73
  "css-minimizer-webpack-plugin": "^4.0.0",
74
74
  dotenv: "^16.0.1",
75
75
  "dotenv-expand": "^8.0.3",
76
76
  "escape-string-regexp": "^5.0.0",
77
- eslint: "^8.19.0",
77
+ eslint: "^8.20.0",
78
78
  "eslint-config-prettier": "^8.5.0",
79
79
  "eslint-plugin-node": "^11.1.0",
80
80
  "eslint-plugin-promise": "^6.0.0",
81
81
  "eslint-webpack-plugin": "^3.2.0",
82
82
  execa: "^6.1.0",
83
83
  "file-loader": "^6.2.0",
84
- "fork-ts-checker-webpack-plugin": "^7.2.11",
84
+ "fork-ts-checker-webpack-plugin": "^7.2.13",
85
85
  glob: "^8.0.3",
86
- "html-loader": "^3.1.2",
86
+ "html-loader": "^4.1.0",
87
87
  "html-webpack-plugin": "^5.5.0",
88
88
  "json-loader": "^0.5.7",
89
89
  lodash: "^4.17.21",
@@ -92,20 +92,20 @@ var package_default = {
92
92
  portfinder: "^1.0.28",
93
93
  postcss: "^8.4.14",
94
94
  "postcss-custom-properties": "^12.1.7",
95
- "postcss-loader": "^7.0.0",
95
+ "postcss-loader": "^7.0.1",
96
96
  prettier: "^2.7.1",
97
97
  "react-refresh": "^0.14.0",
98
98
  "resolve-url-loader": "^5.0.0",
99
- sass: "^1.53.0",
99
+ sass: "^1.54.0",
100
100
  "sass-loader": "^13.0.2",
101
101
  "source-map-loader": "^4.0.0",
102
102
  "strip-indent": "^4.0.0",
103
103
  "style-loader": "^3.3.1",
104
104
  "tsconfig-paths-webpack-plugin": "^3.5.2",
105
- tsup: "^6.1.3",
105
+ tsup: "^6.2.0",
106
106
  typescript: "^4.7.4",
107
107
  "url-loader": "^4.1.1",
108
- webpack: "^5.73.0",
108
+ webpack: "^5.74.0",
109
109
  "webpack-cli": "^4.10.0",
110
110
  "webpack-config-utils": "^2.3.1",
111
111
  "webpack-dev-server": "^4.9.3",
@@ -128,7 +128,10 @@ var dev = async (options) => {
128
128
  assertOptionsValid(options);
129
129
  const flags = (await prepareFlags([], options)).join(" ");
130
130
  const { ifCore } = getIfCoreFns();
131
- const title = ifCore("Running dev web-server for Tamaro Core \u2026", "Running dev web-server for customer configuration \u2026");
131
+ const title = ifCore(
132
+ "Running dev web-server for Tamaro Core \u2026",
133
+ "Running dev web-server for customer configuration \u2026"
134
+ );
132
135
  const wpBin = resolveBin("webpack");
133
136
  const wpConfig = resolveOwn("dist/webpack.config.js");
134
137
  const cmd = `
@@ -252,7 +255,10 @@ var build = async (options) => {
252
255
  const { ifCore } = getIfCoreFns();
253
256
  const paths = getPaths(ifCore);
254
257
  const configName = ifCore(CORE_CONFIG_NAME, getWidgetUuid());
255
- const title = ifCore("Building optimised (minified) bundle of Tamaro Core \u2026", `Building optimised (minified) bundle of \u201C${configName}\u201D customer configuration \u2026`);
258
+ const title = ifCore(
259
+ "Building optimised (minified) bundle of Tamaro Core \u2026",
260
+ `Building optimised (minified) bundle of \u201C${configName}\u201D customer configuration \u2026`
261
+ );
256
262
  const wpBin = resolveBin("webpack");
257
263
  const wpConfig = resolveOwn("dist/webpack.config.js");
258
264
  const cmd = `
@@ -321,7 +327,10 @@ var deploy = async (options) => {
321
327
  logTitle("Deploying to AWS S3 \u2026");
322
328
  logCommand(cmdSyncAll);
323
329
  try {
324
- withAwsAuthenticate(() => runCommandSync(cmdSyncAll, { stdout: "inherit" }), options);
330
+ withAwsAuthenticate(
331
+ () => runCommandSync(cmdSyncAll, { stdout: "inherit" }),
332
+ options
333
+ );
325
334
  } catch (error) {
326
335
  halt(error.stderr);
327
336
  }
@@ -333,7 +342,10 @@ var deploy = async (options) => {
333
342
  `;
334
343
  logCommand(cmdCpEntry);
335
344
  try {
336
- withAwsAuthenticate(() => runCommandSync(cmdCpEntry, { stdout: "inherit" }), options);
345
+ withAwsAuthenticate(
346
+ () => runCommandSync(cmdCpEntry, { stdout: "inherit" }),
347
+ options
348
+ );
337
349
  } catch (error) {
338
350
  halt(error.stderr);
339
351
  }
@@ -376,16 +388,20 @@ var assertOptionsValid3 = (options) => {
376
388
  };
377
389
  var assertDistPathExists = (distPath) => {
378
390
  if (!existsSync(distPath)) {
379
- halt(stripIndent3(`
391
+ halt(
392
+ stripIndent3(`
380
393
  Dist folder does not exists.
381
394
  Make sure you have built the bundle before trying to deploy it.
382
- `));
395
+ `)
396
+ );
383
397
  }
384
398
  };
385
399
  var assertTagValid = (tag) => {
386
400
  const regex = /^[a-zA-Z0-9-_.]+$/;
387
401
  if (!regex.test(tag)) {
388
- halt(`Flag \u201C--tag\u201D has forbidden format. Allowed format: ${regex.toString()}.`);
402
+ halt(
403
+ `Flag \u201C--tag\u201D has forbidden format. Allowed format: ${regex.toString()}.`
404
+ );
389
405
  }
390
406
  };
391
407
  var prepareFlags4 = (flags, options) => {
@@ -467,7 +483,9 @@ var assertConfigValid = (config) => {
467
483
  }
468
484
  const regex = /^[a-zA-Z0-9-_]+$/;
469
485
  if (!regex.test(config)) {
470
- halt(`Flag \u201C--config\u201D has forbidden format. Allowed format: ${regex.toString()}.`);
486
+ halt(
487
+ `Flag \u201C--config\u201D has forbidden format. Allowed format: ${regex.toString()}.`
488
+ );
471
489
  }
472
490
  };
473
491
  var prepareFlags6 = (flags, options) => {
@@ -497,14 +515,18 @@ var deployEmailConfig = async (options) => {
497
515
  --exact-timestamps
498
516
  ${flags}
499
517
  `;
500
- logTitle(`Deploying email configuration for \u201C${configName}\u201D customer configuration to AWS S3 \u2026`);
518
+ logTitle(
519
+ `Deploying email configuration for \u201C${configName}\u201D customer configuration to AWS S3 \u2026`
520
+ );
501
521
  logCommand(cmd);
502
522
  try {
503
523
  withAwsAuthenticate(() => runCommandSync(cmd, { stdout: "inherit" }), options);
504
524
  } catch (error) {
505
525
  halt(error.stderr);
506
526
  }
507
- logTitle(`Email configuration for \u201C${configName}\u201D customer configuration is deployed.`);
527
+ logTitle(
528
+ `Email configuration for \u201C${configName}\u201D customer configuration is deployed.`
529
+ );
508
530
  logDataTable({ "Deploy URL:": deployUrl });
509
531
  process.on("exit", () => {
510
532
  notify({
@@ -526,7 +548,9 @@ var assertEmailConfigPathExists = (distPath) => {
526
548
  var assertBucketValid = (tag) => {
527
549
  const regex = /^[a-zA-Z0-9-_]+$/;
528
550
  if (!regex.test(tag)) {
529
- halt(`Flag \u201C--bucket\u201D has forbidden format. Allowed format: ${regex.toString()}.`);
551
+ halt(
552
+ `Flag \u201C--bucket\u201D has forbidden format. Allowed format: ${regex.toString()}.`
553
+ );
530
554
  }
531
555
  };
532
556
  var assertIsNotCore = () => {
@@ -547,10 +571,34 @@ process.on("SIGINT", () => {
547
571
  process.exit(1);
548
572
  });
549
573
  var cli = createCommand().name(package_default.name).version(package_default.version, "-v, --version");
550
- cli.command("dev").description("Run the local development server for Tamaro Core or a particular customer configuration").option("--local-core", "Load Tamaro Core from localhost:1234 instead of the CDN", false).option("--port <port>", "Web server port", `${DEFAULT_PORT}`).option("--env <env>", "Environment (dev, stage, prod)").action(async (options) => {
574
+ cli.command("dev").description(
575
+ "Run the local development server for Tamaro Core or a particular customer configuration"
576
+ ).option(
577
+ "--local-core",
578
+ "Load Tamaro Core from localhost:1234 instead of the CDN",
579
+ false
580
+ ).option("--port <port>", "Web server port", `${DEFAULT_PORT}`).option("--env <env>", "Environment (dev, stage, prod)").action(async (options) => {
551
581
  await dev(options);
552
582
  });
553
- cli.command("build").description("Build an optimised (minified) bundle of Tamaro Core or a customer configuration").option("--local-core", "Load Tamaro Core from localhost:1234 instead of the CDN", false).option("--analyze", 'Generate bundle statistics to "reports" folder', false).option("--serve", "Run the generated bundle with a local web server", false).option("--port <port>", "Web server port", `${DEFAULT_PORT}`).option("--env <env>", "Environment (dev, stage, prod)").option("--deploy", "Deploy Tamaro Core or a customer configuration bundle to AWS S3", false).option("--tag <tag>", "Tag which should be used for the deployment of the bundle", DEFAULT_TAG).option("--profile <profile>", "AWS profile which should be used for the deployment of the bundle", DEFAULT_AWS_PROFILE).action(async (options) => {
583
+ cli.command("build").description(
584
+ "Build an optimised (minified) bundle of Tamaro Core or a customer configuration"
585
+ ).option(
586
+ "--local-core",
587
+ "Load Tamaro Core from localhost:1234 instead of the CDN",
588
+ false
589
+ ).option("--analyze", 'Generate bundle statistics to "reports" folder', false).option("--serve", "Run the generated bundle with a local web server", false).option("--port <port>", "Web server port", `${DEFAULT_PORT}`).option("--env <env>", "Environment (dev, stage, prod)").option(
590
+ "--deploy",
591
+ "Deploy Tamaro Core or a customer configuration bundle to AWS S3",
592
+ false
593
+ ).option(
594
+ "--tag <tag>",
595
+ "Tag which should be used for the deployment of the bundle",
596
+ DEFAULT_TAG
597
+ ).option(
598
+ "--profile <profile>",
599
+ "AWS profile which should be used for the deployment of the bundle",
600
+ DEFAULT_AWS_PROFILE
601
+ ).action(async (options) => {
554
602
  await build(options);
555
603
  if (options.serve) {
556
604
  await serve(options);
@@ -562,13 +610,40 @@ cli.command("build").description("Build an optimised (minified) bundle of Tamaro
562
610
  cli.command("serve").description("Run a local web server for pre-built bundle").option("--port <port>", "Web server port", `${DEFAULT_PORT}`).action(async (options) => {
563
611
  await serve(options);
564
612
  });
565
- cli.command("deploy").description("Deploy a pre-built Tamaro Core or customer configuration bundle to AWS S3").option("--tag <tag>", "Tag which should be used for the deployment of the bundle", DEFAULT_TAG).option("--profile <profile>", "AWS profile which should be used for the deployment of the bundle", DEFAULT_AWS_PROFILE).action(async (options) => {
613
+ cli.command("deploy").description(
614
+ "Deploy a pre-built Tamaro Core or customer configuration bundle to AWS S3"
615
+ ).option(
616
+ "--tag <tag>",
617
+ "Tag which should be used for the deployment of the bundle",
618
+ DEFAULT_TAG
619
+ ).option(
620
+ "--profile <profile>",
621
+ "AWS profile which should be used for the deployment of the bundle",
622
+ DEFAULT_AWS_PROFILE
623
+ ).action(async (options) => {
566
624
  await deploy(options);
567
625
  });
568
- cli.command("list-deployed").description("List deployments of Tamaro Core or a particular customer configuration").option("--config <config>", "Configuration name (default: current customer configuration)").option("--profile <profile>", "AWS profile which should be used for fetching deployments", DEFAULT_AWS_PROFILE).action(async (options) => {
626
+ cli.command("list-deployed").description(
627
+ "List deployments of Tamaro Core or a particular customer configuration"
628
+ ).option(
629
+ "--config <config>",
630
+ "Configuration name (default: current customer configuration)"
631
+ ).option(
632
+ "--profile <profile>",
633
+ "AWS profile which should be used for fetching deployments",
634
+ DEFAULT_AWS_PROFILE
635
+ ).action(async (options) => {
569
636
  await listDeployed(options);
570
637
  });
571
- cli.command("deploy-email-config").description("Deploy a widget\u2019s email configuration to AWS S3").option("--bucket <bucket>", "AWS S3 bucket where it should be deployed", DEFAULT_AWS_S3_EMAIL_CONFIG_BUCKET).option("--profile <profile>", "AWS profile which should be used for the deployment of email configuration", DEFAULT_AWS_PROFILE).action(async (options) => {
638
+ cli.command("deploy-email-config").description("Deploy a widget\u2019s email configuration to AWS S3").option(
639
+ "--bucket <bucket>",
640
+ "AWS S3 bucket where it should be deployed",
641
+ DEFAULT_AWS_S3_EMAIL_CONFIG_BUCKET
642
+ ).option(
643
+ "--profile <profile>",
644
+ "AWS profile which should be used for the deployment of email configuration",
645
+ DEFAULT_AWS_PROFILE
646
+ ).action(async (options) => {
572
647
  await deployEmailConfig(options);
573
648
  });
574
649
  (async () => {
@@ -8,7 +8,7 @@ import {
8
8
  logTitle,
9
9
  moduleFileExtensions,
10
10
  resolveApp
11
- } from "./chunk-6RQVBAWK.js";
11
+ } from "./chunk-CNSEEVDD.js";
12
12
 
13
13
  // src/webpack.config.ts
14
14
  import { createRequire } from "module";
@@ -48,7 +48,10 @@ var InterpolateHtmlPlugin = class {
48
48
  });
49
49
  hooks.afterTemplateExecution.tap(PLUGIN_NAME, (data) => {
50
50
  Object.entries(this.replacements).forEach(([key, value]) => {
51
- data.html = data.html.replace(new RegExp(`%${escapeStringRegexp(key)}%`, "g"), value || "");
51
+ data.html = data.html.replace(
52
+ new RegExp(`%${escapeStringRegexp(key)}%`, "g"),
53
+ value || ""
54
+ );
52
55
  });
53
56
  return data;
54
57
  });
@@ -144,16 +147,19 @@ var getWebpackConfig = async (env) => {
144
147
  crossOriginLoading: "anonymous",
145
148
  uniqueName: process.env.WEBPACK_UNIQUE_NAME
146
149
  },
147
- stats: ifAnalyze({
148
- all: void 0
149
- }, {
150
- modules: false,
151
- children: false,
152
- chunks: false,
153
- env: true,
154
- entrypoints: true,
155
- errorDetails: true
156
- }),
150
+ stats: ifAnalyze(
151
+ {
152
+ all: void 0
153
+ },
154
+ {
155
+ modules: false,
156
+ children: false,
157
+ chunks: false,
158
+ env: true,
159
+ entrypoints: true,
160
+ errorDetails: true
161
+ }
162
+ ),
157
163
  module: {
158
164
  rules: removeEmpty([
159
165
  ifNotMin({
@@ -166,11 +172,14 @@ var getWebpackConfig = async (env) => {
166
172
  oneOf: [
167
173
  {
168
174
  test: /\.(js|ts)x?$/,
169
- include: ifCore([
170
- resolveApp("src"),
171
- resolveApp("node_modules/micromark"),
172
- resolveApp("node_modules/decode-named-character-reference")
173
- ], [resolveApp("."), resolveApp("../../src")]),
175
+ include: ifCore(
176
+ [
177
+ resolveApp("src"),
178
+ resolveApp("node_modules/micromark"),
179
+ resolveApp("node_modules/decode-named-character-reference")
180
+ ],
181
+ [resolveApp("."), resolveApp("../../src")]
182
+ ),
174
183
  loader: require2.resolve("babel-loader"),
175
184
  options: {
176
185
  babelrc: false,
@@ -195,7 +204,9 @@ var getWebpackConfig = async (env) => {
195
204
  version: 3,
196
205
  proposals: true
197
206
  },
198
- absoluteRuntime: dirname(require2.resolve("@babel/runtime-corejs3/package.json"))
207
+ absoluteRuntime: dirname(
208
+ require2.resolve("@babel/runtime-corejs3/package.json")
209
+ )
199
210
  }
200
211
  ],
201
212
  [
@@ -271,6 +282,7 @@ var getWebpackConfig = async (env) => {
271
282
  headers: {
272
283
  "Access-Control-Allow-Origin": "*"
273
284
  },
285
+ allowedHosts: "all",
274
286
  client: {
275
287
  overlay: {
276
288
  warnings: false,
@@ -290,13 +302,17 @@ var getWebpackConfig = async (env) => {
290
302
  cwd: paths.app,
291
303
  resolvePluginsRelativeTo: paths.app
292
304
  }),
293
- ifMin(new CleanWebpackPlugin({})),
294
- ...appHtmlFiles.map((file) => new HtmlWebpackPlugin2({
295
- template: file,
296
- filename: basename(file),
297
- inject: false,
298
- minify: false
299
- })),
305
+ ifMin(
306
+ new CleanWebpackPlugin({})
307
+ ),
308
+ ...appHtmlFiles.map(
309
+ (file) => new HtmlWebpackPlugin2({
310
+ template: file,
311
+ filename: basename(file),
312
+ inject: false,
313
+ minify: false
314
+ })
315
+ ),
300
316
  new InterpolateHtmlPlugin(envVars.raw),
301
317
  new webpack.DefinePlugin(envVars.stringified),
302
318
  new ForkTsCheckerWebpackPlugin({
@@ -315,14 +331,16 @@ var getWebpackConfig = async (env) => {
315
331
  }
316
332
  }),
317
333
  ifHmr(new ReactRefreshWebpackPlugin()),
318
- ifMin(new MiniCssExtractPlugin({
319
- filename: "[name]-[contenthash:16].css",
320
- chunkFilename: "[name]-[contenthash:16].css",
321
- ignoreOrder: true,
322
- attributes: {
323
- "data-widget": process.env.ELEMENT_ATTRIBUTE_DATA_WIDGET
324
- }
325
- })),
334
+ ifMin(
335
+ new MiniCssExtractPlugin({
336
+ filename: "[name]-[contenthash:16].css",
337
+ chunkFilename: "[name]-[contenthash:16].css",
338
+ ignoreOrder: true,
339
+ attributes: {
340
+ "data-widget": process.env.ELEMENT_ATTRIBUTE_DATA_WIDGET
341
+ }
342
+ })
343
+ ),
326
344
  new webpack.IgnorePlugin({
327
345
  resourceRegExp: /^\.\/locale$/,
328
346
  contextRegExp: /moment$/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raisenow/tamaro-cli",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "author": {
5
5
  "name": "RaiseNow",
6
6
  "email": "development@raisenow.com"
@@ -20,25 +20,25 @@
20
20
  "npm": ">=8"
21
21
  },
22
22
  "dependencies": {
23
- "@babel/cli": "^7.18.6",
24
- "@babel/core": "^7.18.6",
25
- "@babel/plugin-proposal-decorators": "^7.18.6",
23
+ "@babel/cli": "^7.18.9",
24
+ "@babel/core": "^7.18.9",
25
+ "@babel/plugin-proposal-decorators": "^7.18.9",
26
26
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
27
- "@babel/plugin-transform-runtime": "^7.18.6",
28
- "@babel/preset-env": "^7.18.6",
27
+ "@babel/plugin-transform-runtime": "^7.18.9",
28
+ "@babel/preset-env": "^7.18.9",
29
29
  "@babel/preset-react": "^7.18.6",
30
30
  "@babel/preset-typescript": "^7.18.6",
31
- "@babel/runtime-corejs3": "^7.18.6",
31
+ "@babel/runtime-corejs3": "^7.18.9",
32
32
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
33
- "@statoscope/webpack-plugin": "^5.22.0",
33
+ "@statoscope/webpack-plugin": "^5.24.0",
34
34
  "@types/columnify": "^1.5.1",
35
35
  "@types/lodash": "^4.14.182",
36
- "@types/node": "^18.0.1",
36
+ "@types/node": "^18.6.2",
37
37
  "@types/node-notifier": "^8.0.2",
38
38
  "@types/resolve-bin": "^0.4.1",
39
39
  "@types/webpack-config-utils": "^2.3.1",
40
- "@typescript-eslint/eslint-plugin": "^5.30.4",
41
- "@typescript-eslint/parser": "^5.30.4",
40
+ "@typescript-eslint/eslint-plugin": "^5.31.0",
41
+ "@typescript-eslint/parser": "^5.31.0",
42
42
  "autoprefixer": "^10.4.7",
43
43
  "babel-loader": "^8.2.5",
44
44
  "babel-plugin-istanbul": "^6.1.1",
@@ -46,24 +46,24 @@
46
46
  "chalk": "^5.0.1",
47
47
  "clean-webpack-plugin": "^4.0.0",
48
48
  "columnify": "^1.6.0",
49
- "commander": "^9.3.0",
49
+ "commander": "^9.4.0",
50
50
  "copy-webpack-plugin": "^11.0.0",
51
- "core-js": "^3.23.3",
51
+ "core-js": "^3.24.0",
52
52
  "css-loader": "^6.7.1",
53
53
  "css-minimizer-webpack-plugin": "^4.0.0",
54
54
  "dotenv": "^16.0.1",
55
55
  "dotenv-expand": "^8.0.3",
56
56
  "escape-string-regexp": "^5.0.0",
57
- "eslint": "^8.19.0",
57
+ "eslint": "^8.20.0",
58
58
  "eslint-config-prettier": "^8.5.0",
59
59
  "eslint-plugin-node": "^11.1.0",
60
60
  "eslint-plugin-promise": "^6.0.0",
61
61
  "eslint-webpack-plugin": "^3.2.0",
62
62
  "execa": "^6.1.0",
63
63
  "file-loader": "^6.2.0",
64
- "fork-ts-checker-webpack-plugin": "^7.2.11",
64
+ "fork-ts-checker-webpack-plugin": "^7.2.13",
65
65
  "glob": "^8.0.3",
66
- "html-loader": "^3.1.2",
66
+ "html-loader": "^4.1.0",
67
67
  "html-webpack-plugin": "^5.5.0",
68
68
  "json-loader": "^0.5.7",
69
69
  "lodash": "^4.17.21",
@@ -72,20 +72,20 @@
72
72
  "portfinder": "^1.0.28",
73
73
  "postcss": "^8.4.14",
74
74
  "postcss-custom-properties": "^12.1.7",
75
- "postcss-loader": "^7.0.0",
75
+ "postcss-loader": "^7.0.1",
76
76
  "prettier": "^2.7.1",
77
77
  "react-refresh": "^0.14.0",
78
78
  "resolve-url-loader": "^5.0.0",
79
- "sass": "^1.53.0",
79
+ "sass": "^1.54.0",
80
80
  "sass-loader": "^13.0.2",
81
81
  "source-map-loader": "^4.0.0",
82
82
  "strip-indent": "^4.0.0",
83
83
  "style-loader": "^3.3.1",
84
84
  "tsconfig-paths-webpack-plugin": "^3.5.2",
85
- "tsup": "^6.1.3",
85
+ "tsup": "^6.2.0",
86
86
  "typescript": "^4.7.4",
87
87
  "url-loader": "^4.1.1",
88
- "webpack": "^5.73.0",
88
+ "webpack": "^5.74.0",
89
89
  "webpack-cli": "^4.10.0",
90
90
  "webpack-config-utils": "^2.3.1",
91
91
  "webpack-dev-server": "^4.9.3",
@@ -287,6 +287,7 @@ const getWebpackConfig = async (env: any): Promise<Configuration> => {
287
287
  headers: {
288
288
  'Access-Control-Allow-Origin': '*',
289
289
  },
290
+ allowedHosts: 'all',
290
291
  client: {
291
292
  overlay: {
292
293
  warnings: false,