@raisenow/tamaro-cli 1.7.0-dev.1 → 1.7.0-dev.2

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.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as promptConfirmation, D as logError, E as logDataTable, O as logSuccess, S as halt, T as logCommand, _ as getWidgetUuid, a as AWS_S3_BUCKET_TAMARO, c as CORE_CONFIG_NAME, d as HTTPS_CRT_FILE, f as HTTPS_KEY_FILE, h as getPaths, i as AWS_CLOUDFRONT_DISTRIBUTION_ID, k as logTitle, l as DEFAULT_PORT, m as getIfCoreFns, n as assertEnvValid, o as AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD, s as AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE, t as applyEnv, u as DEFAULT_TAG, w as runCommandSync, x as resolveOwn, y as resolveBin } from "./env-C_Jkayak.js";
2
+ import { C as promptConfirmation, D as logError, E as logDataTable, O as logSuccess, S as halt, T as logCommand, _ as getWidgetUuid, a as AWS_S3_BUCKET_TAMARO, c as CORE_CONFIG_NAME, d as HTTPS_CRT_FILE, f as HTTPS_KEY_FILE, h as getPaths, i as AWS_CLOUDFRONT_DISTRIBUTION_ID, k as logTitle, l as DEFAULT_PORT, m as getIfCoreFns, n as assertEnvValid, o as AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD, s as AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE, t as applyEnv, u as DEFAULT_TAG, w as runCommandSync, x as resolveOwn, y as resolveBin } from "./env-Bx5mwt8E.js";
3
3
  import { createCommand } from "commander";
4
4
  import { existsSync, mkdirSync, renameSync } from "fs";
5
5
  import { basename, dirname, resolve } from "path";
@@ -12,7 +12,6 @@ import fs from "node:fs";
12
12
  import Handlebars from "handlebars";
13
13
  import helpers from "handlebars-helpers";
14
14
  import { getPortPromise } from "portfinder";
15
-
16
15
  //#region src/lib/aws.ts
17
16
  const awsAuthenticate = (options) => {
18
17
  if (options.ci)
@@ -85,7 +84,6 @@ const promptProfile = async () => {
85
84
  }], { onCancel: () => halt() });
86
85
  return profile;
87
86
  };
88
-
89
87
  //#endregion
90
88
  //#region src/lib/notifier.ts
91
89
  const notify = (args) => {
@@ -97,7 +95,6 @@ const notify = (args) => {
97
95
  sound: "Funk"
98
96
  });
99
97
  };
100
-
101
98
  //#endregion
102
99
  //#region src/commands/archive.ts
103
100
  const archive = (options) => {
@@ -136,7 +133,6 @@ const assertIsNotArchived = () => {
136
133
  const assertArchiveTargetDoesNotExist = (archiveTarget) => {
137
134
  if (existsSync(archiveTarget)) halt(`Archive target already exists: ${archiveTarget}. Please remove it first.`);
138
135
  };
139
-
140
136
  //#endregion
141
137
  //#region src/lib/validators/validateEmailTemplates.ts
142
138
  /**
@@ -240,7 +236,6 @@ const assureOnlySupportedHelpers = (template) => {
240
236
  const compileEmailTemplate = (template) => {
241
237
  Handlebars.compile(template)({});
242
238
  };
243
-
244
239
  //#endregion
245
240
  //#region src/commands/validate.ts
246
241
  /**
@@ -255,7 +250,6 @@ const validate = async () => {
255
250
  if (errors.length) halt(errors.map((el) => el.toString()).join("\n"));
256
251
  logTitle("Validated successfully");
257
252
  };
258
-
259
253
  //#endregion
260
254
  //#region src/lib/https.ts
261
255
  const assertCrtExists = () => {
@@ -270,7 +264,6 @@ const assertCrtExists = () => {
270
264
  Check docs: https://unpkg.com/@raisenow/tamaro-cli/readme.html#/?id=use-transport-level-security-https
271
265
  `));
272
266
  };
273
-
274
267
  //#endregion
275
268
  //#region src/commands/build.ts
276
269
  const build = async (options) => {
@@ -324,14 +317,12 @@ const prepareFlags$2 = (options) => {
324
317
  if (debug) flags.push("--env debug");
325
318
  return flags.join(" ");
326
319
  };
327
-
328
320
  //#endregion
329
321
  //#region src/lib/validators/assertTagValid.ts
330
322
  const assertTagValid = (tag) => {
331
323
  const regex = /^[a-zA-Z0-9-_.]+$/;
332
324
  if (!regex.test(tag)) halt(`Flag "--tag" has forbidden format. Allowed format: ${regex.toString()}.`);
333
325
  };
334
-
335
326
  //#endregion
336
327
  //#region src/commands/deploy.ts
337
328
  const deploy = async (options) => {
@@ -433,7 +424,6 @@ const assertDistPathExists = (distPath) => {
433
424
  Make sure you have built the bundle before trying to deploy it.
434
425
  `));
435
426
  };
436
-
437
427
  //#endregion
438
428
  //#region src/commands/deploy-email-config.ts
439
429
  const deployEmailConfig = async (options) => {
@@ -490,7 +480,7 @@ const assertIsNotCore$2 = () => {
490
480
  if (ifCore()) halt("You cannot deploy widget email configuration for Tamaro Core.");
491
481
  };
492
482
  const assertBucketValid$1 = (bucket) => {
493
- if (![AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE, AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD].includes(bucket)) halt("Invalid bucket name.");
483
+ if (!["rnw-stage-email-service", "rnw-email-service"].includes(bucket)) halt("Invalid bucket name.");
494
484
  };
495
485
  const promptBucketTamaroEmailConfig$1 = async () => {
496
486
  const { bucket } = await prompts([{
@@ -507,7 +497,6 @@ const promptBucketTamaroEmailConfig$1 = async () => {
507
497
  }], { onCancel: () => halt() });
508
498
  return bucket;
509
499
  };
510
-
511
500
  //#endregion
512
501
  //#region src/commands/dev.ts
513
502
  const dev = async (options) => {
@@ -545,7 +534,6 @@ const prepareFlags$1 = async (options) => {
545
534
  if (debug) flags.push("--env debug");
546
535
  return flags.join(" ");
547
536
  };
548
-
549
537
  //#endregion
550
538
  //#region src/commands/list-deployed.ts
551
539
  const listDeployed = async (options) => {
@@ -558,7 +546,7 @@ const listDeployed = async (options) => {
558
546
  const flags = prepareFlags$3(options);
559
547
  const { config } = options;
560
548
  const { ifCore } = getIfCoreFns();
561
- const configName = config ?? ifCore(CORE_CONFIG_NAME, getWidgetUuid());
549
+ const configName = config ?? ifCore("tamaro-core", getWidgetUuid());
562
550
  const title = !config && ifCore() ? `Listing deployments of Tamaro Core …` : `Listing deployments of "${configName}" customer configuration …`;
563
551
  const cmd = `aws s3 ls ${`s3://${AWS_S3_BUCKET_TAMARO}/${configName}/`} ${flags}`;
564
552
  let out = "";
@@ -592,7 +580,6 @@ const parseTags = (lines) => {
592
580
  const regex = /^\s*PRE\s*/;
593
581
  return lines.filter((line) => regex.test(line)).map((line) => line.replace(regex, "").replace(/\/$/, ""));
594
582
  };
595
-
596
583
  //#endregion
597
584
  //#region src/commands/serve.ts
598
585
  const serve = async (options) => {
@@ -628,7 +615,6 @@ const prepareFlags = async (options) => {
628
615
  }
629
616
  return flags.join(" ");
630
617
  };
631
-
632
618
  //#endregion
633
619
  //#region src/commands/unarchive.ts
634
620
  const unarchive = (options) => {
@@ -666,7 +652,6 @@ const assertIsNotCore$1 = (ifCore) => {
666
652
  const assertRestoreTargetDoesNotExist = (restoreTarget) => {
667
653
  if (existsSync(restoreTarget)) halt(`Restore target already exists: ${restoreTarget}. Please remove it first.`);
668
654
  };
669
-
670
655
  //#endregion
671
656
  //#region src/commands/undeploy.ts
672
657
  const undeploy = async (options) => {
@@ -726,12 +711,11 @@ const assertOptionsValid$1 = (options) => {
726
711
  const { profile, tag, all } = options;
727
712
  const { ifCore } = getIfCoreFns();
728
713
  if (ifCore() && all) halt("Flag \"--all\" must not be used in Tamaro Core context.");
729
- if (ifCore() && tag === DEFAULT_TAG) halt("You cannot undeploy the default tag for Tamaro Core.");
714
+ if (ifCore() && tag === "latest") halt("You cannot undeploy the default tag for Tamaro Core.");
730
715
  if (profile) assertProfileValid(profile);
731
716
  if (all && tag) halt("Flags \"--tag\" and \"--all\" must not be used together.");
732
717
  if (!all && tag) assertTagValid(tag);
733
718
  };
734
-
735
719
  //#endregion
736
720
  //#region src/commands/undeploy-email-config.ts
737
721
  const undeployEmailConfig = async (options) => {
@@ -785,7 +769,7 @@ const assertIsNotCore = (ifCore) => {
785
769
  if (ifCore()) halt("You cannot undeploy widget email configuration for Tamaro Core.");
786
770
  };
787
771
  const assertBucketValid = (bucket) => {
788
- if (![AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE, AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD].includes(bucket)) halt("Invalid bucket name.");
772
+ if (!["rnw-stage-email-service", "rnw-email-service"].includes(bucket)) halt("Invalid bucket name.");
789
773
  };
790
774
  const promptBucketTamaroEmailConfig = async () => {
791
775
  const { bucket } = await prompts([{
@@ -802,12 +786,10 @@ const promptBucketTamaroEmailConfig = async () => {
802
786
  }], { onCancel: () => halt() });
803
787
  return bucket;
804
788
  };
805
-
806
789
  //#endregion
807
790
  //#region package.json
808
791
  var name = "@raisenow/tamaro-cli";
809
- var version = "1.7.0-dev.1";
810
-
792
+ var version = "1.7.0-dev.2";
811
793
  //#endregion
812
794
  //#region src/cli.ts
813
795
  /**
@@ -869,6 +851,5 @@ cli.command("validate").description("Validate the current Tamaro configuration t
869
851
  }
870
852
  }
871
853
  })();
872
-
873
854
  //#endregion
874
- export { };
855
+ export {};
@@ -11,7 +11,6 @@ import { createRequire } from "module";
11
11
  import { getIfUtils } from "webpack-config-utils";
12
12
  import { globSync } from "glob";
13
13
  import { config } from "dotenv";
14
-
15
14
  //#region src/lib/logging.ts
16
15
  const logTitle = (title) => {
17
16
  console.log(chalk.bold(title));
@@ -29,7 +28,6 @@ const logDataTable = (data) => {
29
28
  console.log(columnify(data, { showHeaders: false }));
30
29
  console.log("");
31
30
  };
32
-
33
31
  //#endregion
34
32
  //#region src/lib/command.ts
35
33
  const halt = (message) => {
@@ -52,13 +50,11 @@ const promptConfirmation = async (message, skipConfirmation) => {
52
50
  }], { onCancel: () => halt() });
53
51
  if (!confirmed) halt("Operation cancelled.");
54
52
  };
55
-
56
53
  //#endregion
57
- //#region node_modules/.pnpm/tsdown@0.20.1_synckit@0.11.11_typescript@5.9.3/node_modules/tsdown/esm-shims.js
54
+ //#region node_modules/.pnpm/tsdown@0.21.4_synckit@0.11.11_typescript@6.0.2/node_modules/tsdown/esm-shims.js
58
55
  const getFilename = () => fileURLToPath(import.meta.url);
59
56
  const getDirname = () => path.dirname(getFilename());
60
57
  const __dirname = /* @__PURE__ */ getDirname();
61
-
62
58
  //#endregion
63
59
  //#region src/lib/resolve.ts
64
60
  const require$1 = createRequire(import.meta.url);
@@ -153,7 +149,6 @@ const getIfCoreFns = ({ allowArchived = false } = {}) => {
153
149
  `));
154
150
  process.exit(1);
155
151
  };
156
-
157
152
  //#endregion
158
153
  //#region src/lib/constants.ts
159
154
  const DEFAULT_TAG = "latest";
@@ -165,7 +160,6 @@ const CORE_CONFIG_NAME = "tamaro-core";
165
160
  const AWS_CLOUDFRONT_DISTRIBUTION_ID = "EHJ1OM458YQ0I";
166
161
  const HTTPS_CRT_FILE = "localhost.crt";
167
162
  const HTTPS_KEY_FILE = "localhost.key";
168
-
169
163
  //#endregion
170
164
  //#region src/lib/env.ts
171
165
  const require = createRequire(import.meta.url);
@@ -256,6 +250,5 @@ const applyEnv = (env) => {
256
250
  const filePath = globSync(getPaths(ifCore).appEnv).find((file) => basename(file) === `.env.${env}`);
257
251
  if (filePath) config({ path: filePath });
258
252
  };
259
-
260
253
  //#endregion
261
- export { promptConfirmation as C, logError as D, logDataTable as E, logSuccess as O, halt as S, logCommand as T, getWidgetUuid as _, AWS_S3_BUCKET_TAMARO as a, resolveEslintPluginConfig as b, CORE_CONFIG_NAME as c, HTTPS_CRT_FILE as d, HTTPS_KEY_FILE as f, getRelativePaths as g, getPaths as h, AWS_CLOUDFRONT_DISTRIBUTION_ID as i, logTitle as k, DEFAULT_PORT as l, getIfCoreFns as m, assertEnvValid as n, AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD as o, extensions as p, getEnvVars as r, AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE as s, applyEnv as t, DEFAULT_TAG as u, resolveApp as v, runCommandSync as w, resolveOwn as x, resolveBin as y };
254
+ export { promptConfirmation as C, logError as D, logDataTable as E, logSuccess as O, halt as S, logCommand as T, getWidgetUuid as _, AWS_S3_BUCKET_TAMARO as a, resolveEslintPluginConfig as b, CORE_CONFIG_NAME as c, HTTPS_CRT_FILE as d, HTTPS_KEY_FILE as f, getRelativePaths as g, getPaths as h, AWS_CLOUDFRONT_DISTRIBUTION_ID as i, logTitle as k, DEFAULT_PORT as l, getIfCoreFns as m, assertEnvValid as n, AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD as o, extensions as p, getEnvVars as r, AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE as s, applyEnv as t, DEFAULT_TAG as u, resolveApp as v, runCommandSync as w, resolveOwn as x, resolveBin as y };
@@ -1,4 +1,4 @@
1
- import { E as logDataTable, b as resolveEslintPluginConfig, d as HTTPS_CRT_FILE, f as HTTPS_KEY_FILE, g as getRelativePaths, h as getPaths, k as logTitle, m as getIfCoreFns, p as extensions, r as getEnvVars, v as resolveApp } from "./env-C_Jkayak.js";
1
+ import { E as logDataTable, b as resolveEslintPluginConfig, d as HTTPS_CRT_FILE, f as HTTPS_KEY_FILE, g as getRelativePaths, h as getPaths, k as logTitle, m as getIfCoreFns, p as extensions, r as getEnvVars, v as resolveApp } from "./env-Bx5mwt8E.js";
2
2
  import { existsSync } from "fs";
3
3
  import { basename, dirname, resolve } from "path";
4
4
  import { createRequire } from "module";
@@ -18,7 +18,6 @@ import { TsconfigPathsPlugin } from "tsconfig-paths-webpack-plugin";
18
18
  import webpack from "webpack";
19
19
  import "webpack-dev-server";
20
20
  import escapeStringRegexp from "escape-string-regexp";
21
-
22
21
  //#region src/lib/InterpolateHtmlPlugin.ts
23
22
  const PLUGIN_NAME = "InterpolateHtmlPlugin";
24
23
  var InterpolateHtmlPlugin = class {
@@ -44,7 +43,6 @@ var InterpolateHtmlPlugin = class {
44
43
  });
45
44
  }
46
45
  };
47
-
48
46
  //#endregion
49
47
  //#region src/webpack.config.ts
50
48
  const require = createRequire(import.meta.url);
@@ -162,7 +160,7 @@ const getWebpackConfig = (env) => {
162
160
  inputSourceMap: ifNotMin(),
163
161
  presets: [
164
162
  [require.resolve("@babel/preset-env"), {
165
- corejs: "3.48.0",
163
+ corejs: "3.49.0",
166
164
  debug: ifDebug(),
167
165
  modules: false,
168
166
  useBuiltIns: "usage"
@@ -323,7 +321,5 @@ const getWebpackConfig = (env) => {
323
321
  }
324
322
  });
325
323
  };
326
- var webpack_config_default = getWebpackConfig;
327
-
328
324
  //#endregion
329
- export { webpack_config_default as default };
325
+ export { getWebpackConfig as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raisenow/tamaro-cli",
3
- "version": "1.7.0-dev.1",
3
+ "version": "1.7.0-dev.2",
4
4
  "author": {
5
5
  "name": "RaiseNow",
6
6
  "email": "development@raisenow.com"
@@ -9,7 +9,7 @@
9
9
  "bin": "dist/cli.js",
10
10
  "engines": {
11
11
  "node": ">=22.22.1",
12
- "pnpm": ">=10.31.0",
12
+ "pnpm": ">=10.32.1",
13
13
  "npm": "please-use-pnpm",
14
14
  "yarn": "please-use-pnpm"
15
15
  },
@@ -17,7 +17,7 @@
17
17
  "@babel/cli": "^7.28.6",
18
18
  "@babel/core": "^7.29.0",
19
19
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
20
- "@babel/preset-env": "^7.29.0",
20
+ "@babel/preset-env": "^7.29.2",
21
21
  "@babel/preset-react": "^7.28.5",
22
22
  "@babel/preset-typescript": "^7.28.5",
23
23
  "@pmmmwh/react-refresh-webpack-plugin": "^0.6.2",
@@ -33,17 +33,17 @@
33
33
  "@typescript-eslint/eslint-plugin": "^7.18.0",
34
34
  "@typescript-eslint/parser": "^7.18.0",
35
35
  "autoprefixer": "^10.4.27",
36
- "babel-loader": "^10.1.0",
36
+ "babel-loader": "^10.1.1",
37
37
  "babel-plugin-istanbul": "^7.0.1",
38
38
  "babel-plugin-lodash": "^3.3.4",
39
39
  "chalk": "^5.6.2",
40
40
  "clean-webpack-plugin": "^4.0.0",
41
41
  "columnify": "^1.6.0",
42
42
  "commander": "^14.0.3",
43
- "copy-webpack-plugin": "^13.0.1",
44
- "core-js": "^3.48.0",
43
+ "copy-webpack-plugin": "^14.0.0",
44
+ "core-js": "^3.49.0",
45
45
  "css-loader": "^7.1.4",
46
- "css-minimizer-webpack-plugin": "^7.0.4",
46
+ "css-minimizer-webpack-plugin": "^8.0.0",
47
47
  "dotenv": "^17.3.1",
48
48
  "escape-string-regexp": "^5.0.0",
49
49
  "eslint": "^8.57.1",
@@ -66,7 +66,7 @@
66
66
  "html-webpack-plugin": "^5.6.6",
67
67
  "json-loader": "^0.5.7",
68
68
  "lodash": "^4.17.23",
69
- "mini-css-extract-plugin": "^2.10.0",
69
+ "mini-css-extract-plugin": "^2.10.1",
70
70
  "node-notifier": "^10.0.1",
71
71
  "portfinder": "^1.0.38",
72
72
  "postcss": "^8.5.8",
@@ -77,18 +77,18 @@
77
77
  "prompts": "^2.4.2",
78
78
  "react-refresh": "^0.18.0",
79
79
  "resolve-url-loader": "^5.0.0",
80
- "sass": "^1.97.3",
80
+ "sass": "^1.98.0",
81
81
  "sass-loader": "^16.0.7",
82
82
  "strip-indent": "^4.1.1",
83
83
  "style-loader": "^4.0.0",
84
- "terser-webpack-plugin": "^5.3.17",
84
+ "terser-webpack-plugin": "^5.4.0",
85
85
  "tsconfig-paths-webpack-plugin": "^4.2.0",
86
- "tsdown": "^0.20.1",
87
- "typescript": "^5.9.3",
86
+ "tsdown": "^0.21.4",
87
+ "typescript": "^6.0.2",
88
88
  "url-loader": "^4.1.1",
89
- "vitest": "^4.0.18",
89
+ "vitest": "^4.1.1",
90
90
  "webpack": "^5.105.4",
91
- "webpack-cli": "^6.0.1",
91
+ "webpack-cli": "^7.0.2",
92
92
  "webpack-config-utils": "^2.3.1",
93
93
  "webpack-dev-server": "^5.2.3",
94
94
  "yaml-loader": "^0.9.0"
package/tsdown.config.ts CHANGED
@@ -7,5 +7,7 @@ export default defineConfig({
7
7
  fixedExtension: false,
8
8
  outDir: './dist',
9
9
  target: 'esnext',
10
- inlineOnly: false,
10
+ deps: {
11
+ onlyBundle: false,
12
+ },
11
13
  })