@raisenow/tamaro-cli 1.1.7 → 1.1.9
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/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/runConfigurations/build_watch.xml +13 -0
- package/.idea/runConfigurations/lint_fix.xml +13 -0
- package/.idea/runConfigurations/tscheck.xml +12 -0
- package/.idea/tamaro-cli.iml +12 -0
- package/.idea/vcs.xml +6 -0
- package/.nvmrc +1 -1
- package/README.md +35 -13
- package/bitbucket-pipelines.yml +43 -0
- package/dist/{chunk-NJVU7WR2.js → chunk-KVWFHWZD.js} +4 -5
- package/dist/cli.js +48 -10
- package/dist/webpack.config.js +17 -11
- package/package.json +10 -9
- package/src/cli.ts +0 -178
- package/src/commands/build.ts +0 -131
- package/src/commands/deploy-email-config.ts +0 -159
- package/src/commands/deploy.ts +0 -164
- package/src/commands/dev.ts +0 -88
- package/src/commands/list-deployed.ts +0 -117
- package/src/commands/serve.ts +0 -69
- package/src/lib/InterpolateHtmlPlugin.ts +0 -47
- package/src/lib/aws.ts +0 -138
- package/src/lib/command.ts +0 -27
- package/src/lib/constants.ts +0 -9
- package/src/lib/env.ts +0 -176
- package/src/lib/https.ts +0 -27
- package/src/lib/logging.ts +0 -37
- package/src/lib/notifier.ts +0 -22
- package/src/lib/resolve.ts +0 -143
- package/src/webpack.config.ts +0 -429
- package/tsconfig.json +0 -38
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/tamaro-cli.iml" filepath="$PROJECT_DIR$/.idea/tamaro-cli.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
@@ -0,0 +1,13 @@
|
|
|
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>
|
|
@@ -0,0 +1,13 @@
|
|
|
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>
|
|
@@ -0,0 +1,12 @@
|
|
|
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>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
package/.idea/vcs.xml
ADDED
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v22.11.0
|
package/README.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
It’s a command-line interface for all operations with Tamaro customer configurations and _Tamaro Core_.
|
|
4
4
|
|
|
5
|
-
You don’t need to install it manually. The recommended way to run it is by using the `npx` command, which comes along
|
|
5
|
+
You don’t need to install it manually. The recommended way to run it is by using the `npx` command, which comes along
|
|
6
|
+
with NPM.
|
|
6
7
|
|
|
7
8
|
# Usage
|
|
8
9
|
|
|
@@ -12,7 +13,8 @@ To see an overview of all possible commands just run the following command witho
|
|
|
12
13
|
npx -y @raisenow/tamaro-cli
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
To see the information about some particular command (for example `dev` command), prepend `help` before the command
|
|
16
|
+
To see the information about some particular command (for example `dev` command), prepend `help` before the command
|
|
17
|
+
name:
|
|
16
18
|
|
|
17
19
|
```bash
|
|
18
20
|
npx -y @raisenow/tamaro-cli help dev
|
|
@@ -44,7 +46,8 @@ Runs the local development server for _Tamaro Core_ or a particular customer con
|
|
|
44
46
|
|
|
45
47
|
### Run local server using Tamaro Core from CDN
|
|
46
48
|
|
|
47
|
-
Run the local development server for the _example-02-typical-customisations_ customer configuration. You will be able to
|
|
49
|
+
Run the local development server for the _example-02-typical-customisations_ customer configuration. You will be able to
|
|
50
|
+
access Tamaro on <http://localhost:1234> (port may differ, see console output).
|
|
48
51
|
|
|
49
52
|
```bash
|
|
50
53
|
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
@@ -53,14 +56,17 @@ npx -y @raisenow/tamaro-cli dev
|
|
|
53
56
|
|
|
54
57
|
### Run local server using a locally running Tamaro Core
|
|
55
58
|
|
|
56
|
-
1. Run the local development web server for _Tamaro Core_ in the first terminal tab. You will be able to access a
|
|
59
|
+
1. Run the local development web server for _Tamaro Core_ in the first terminal tab. You will be able to access a
|
|
60
|
+
default configuration of Tamaro on <http://localhost:1234> (port may differ, see console output).
|
|
57
61
|
|
|
58
62
|
```bash
|
|
59
63
|
cd /path/to/tamaro-core
|
|
60
64
|
npx -y @raisenow/tamaro-cli dev
|
|
61
65
|
```
|
|
62
66
|
|
|
63
|
-
2. Run the local development web server for the _example-02-typical-customisations_ customer configuration in the second
|
|
67
|
+
2. Run the local development web server for the _example-02-typical-customisations_ customer configuration in the second
|
|
68
|
+
terminal tab. After running this command, you will able to access the configuration on <http://localhost:1235> (port
|
|
69
|
+
may differ, see console output).
|
|
64
70
|
|
|
65
71
|
```bash
|
|
66
72
|
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
@@ -69,7 +75,10 @@ npx -y @raisenow/tamaro-cli dev
|
|
|
69
75
|
|
|
70
76
|
### Use Transport Level Security (HTTPS)
|
|
71
77
|
|
|
72
|
-
You might want to the local web server to serve Tamaro over HTTPS, for example for testing wallet payments over Google
|
|
78
|
+
You might want to the local web server to serve Tamaro over HTTPS, for example for testing wallet payments over Google
|
|
79
|
+
Pay. For that, you have to install [mkcert](https://mkcert.org/), then generate a local certificate and key file and
|
|
80
|
+
install it into your local trust stores using this command in the root directory of the Tamaro configuration
|
|
81
|
+
repository (or Tamaro Core):
|
|
73
82
|
|
|
74
83
|
Install `mkcert`:
|
|
75
84
|
|
|
@@ -83,9 +92,11 @@ Generate certificate:
|
|
|
83
92
|
mkcert -install -cert-file localhost.crt -key-file localhost.key localhost 127.0.0.1 0.0.0.0 ::1
|
|
84
93
|
```
|
|
85
94
|
|
|
86
|
-
You will see that the certificate and key files are created. Keep them for yourself. Do not share them or commit them. (
|
|
95
|
+
You will see that the certificate and key files are created. Keep them for yourself. Do not share them or commit them. (
|
|
96
|
+
They should be ignored by Git.)
|
|
87
97
|
|
|
88
|
-
You can then use the flag `--https` with the CLI. If you are using the local Tamaro Core, you also have to serve that
|
|
98
|
+
You can then use the flag `--https` with the CLI. If you are using the local Tamaro Core, you also have to serve that
|
|
99
|
+
over HTTPS. Certificate and key files must be copied to Tamaro Core folder as well.
|
|
89
100
|
|
|
90
101
|
## `build`
|
|
91
102
|
|
|
@@ -115,7 +126,8 @@ As a result, the bundle should be deployed to: <https://tamaro.raisenow.com/exam
|
|
|
115
126
|
|
|
116
127
|
### Build and deploy a customer configuration with a specific tag
|
|
117
128
|
|
|
118
|
-
Build and deploy an optimised (minified) bundle of the _example-02-typical-customisations_ customer configuration with
|
|
129
|
+
Build and deploy an optimised (minified) bundle of the _example-02-typical-customisations_ customer configuration with
|
|
130
|
+
the tag _WEB-123_.
|
|
119
131
|
|
|
120
132
|
```bash
|
|
121
133
|
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
@@ -128,7 +140,14 @@ As a result, the bundle should be deployed to: <https://tamaro.raisenow.com/exam
|
|
|
128
140
|
|
|
129
141
|
Build and serve an optimised (minified) bundle of the _example-02-typical-customisations_ customer configuration.
|
|
130
142
|
|
|
131
|
-
After running this command, a local web server should be running on <http://localhost:1234> (port may differ, see
|
|
143
|
+
After running this command, a local web server should be running on <http://localhost:1234> (port may differ, see
|
|
144
|
+
console output).
|
|
145
|
+
|
|
146
|
+
### Build and test locally with a Tamaro configuration
|
|
147
|
+
|
|
148
|
+
1. Build with `pnpm build` (or `pnpm build:watch` for convince).
|
|
149
|
+
2. Navigate to the Tamaro configuration directory you want to use.
|
|
150
|
+
3. Run by specifying the relative path, e.g. `../../tools/tamaro-cli/dist/cli.js dev --https`
|
|
132
151
|
|
|
133
152
|
```bash
|
|
134
153
|
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
@@ -148,7 +167,8 @@ Run a local web server for pre-built bundle.
|
|
|
148
167
|
npx -y @raisenow/tamaro-cli build
|
|
149
168
|
```
|
|
150
169
|
|
|
151
|
-
2. Serve it. After running this command, web-server should be running on <http://localhost:1234> (port may differ, see
|
|
170
|
+
2. Serve it. After running this command, web-server should be running on <http://localhost:1234> (port may differ, see
|
|
171
|
+
console output).
|
|
152
172
|
|
|
153
173
|
```bash
|
|
154
174
|
npx -y @raisenow/tamaro-cli serve
|
|
@@ -162,7 +182,8 @@ Deploy a pre-built _Tamaro Core_ or customer configuration bundle to AWS S3.
|
|
|
162
182
|
|
|
163
183
|
- `--tag <tag>` – Tag which should be used for the deployment of the bundle (default: "latest")
|
|
164
184
|
|
|
165
|
-
Make sure you have built the bundle before deploying it with this command, otherwise you may mistakenly deploy the
|
|
185
|
+
Make sure you have built the bundle before deploying it with this command, otherwise you may mistakenly deploy the
|
|
186
|
+
bundle from a previous build.
|
|
166
187
|
|
|
167
188
|
### Example
|
|
168
189
|
|
|
@@ -232,7 +253,8 @@ Link package source to be able to run its local version:
|
|
|
232
253
|
npm link .
|
|
233
254
|
```
|
|
234
255
|
|
|
235
|
-
Run the `build:watch` script to watch source files and automatically rebuild on changes. It must be running during the
|
|
256
|
+
Run the `build:watch` script to watch source files and automatically rebuild on changes. It must be running during the
|
|
257
|
+
_Tamaro CLI_ development process.
|
|
236
258
|
|
|
237
259
|
```bash
|
|
238
260
|
npm run build:watch
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
image: node:20.18
|
|
2
|
+
|
|
3
|
+
definitions:
|
|
4
|
+
caches:
|
|
5
|
+
node:
|
|
6
|
+
key:
|
|
7
|
+
files:
|
|
8
|
+
- pnpm-lock.yaml
|
|
9
|
+
- package.json
|
|
10
|
+
path: node_modules
|
|
11
|
+
pnpm:
|
|
12
|
+
key:
|
|
13
|
+
files:
|
|
14
|
+
- pnpm-lock.yaml
|
|
15
|
+
- package.json
|
|
16
|
+
path: $BITBUCKET_CLONE_DIR/.pnpm-store
|
|
17
|
+
scripts:
|
|
18
|
+
initialize: &initialize |-
|
|
19
|
+
corepack enable pnpm
|
|
20
|
+
corepack prepare --activate
|
|
21
|
+
steps:
|
|
22
|
+
- step: &install
|
|
23
|
+
name: Install dependencies
|
|
24
|
+
caches:
|
|
25
|
+
- node
|
|
26
|
+
- pnpm
|
|
27
|
+
script:
|
|
28
|
+
- *initialize
|
|
29
|
+
- pnpm install --prefer-offline
|
|
30
|
+
- step: &check
|
|
31
|
+
name: Check
|
|
32
|
+
caches:
|
|
33
|
+
- node
|
|
34
|
+
- pnpm
|
|
35
|
+
script:
|
|
36
|
+
- *initialize
|
|
37
|
+
- pnpm lint
|
|
38
|
+
- pnpm tscheck
|
|
39
|
+
|
|
40
|
+
pipelines:
|
|
41
|
+
default:
|
|
42
|
+
- step: *install
|
|
43
|
+
- step: *check
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/tsup@8.3.5_jiti@1.21.0_postcss@8.4.
|
|
1
|
+
// node_modules/.pnpm/tsup@8.3.5_jiti@1.21.0_postcss@8.4.49_tsx@4.19.1_typescript@5.7.2/node_modules/tsup/assets/esm_shims.js
|
|
2
2
|
import { fileURLToPath } from "url";
|
|
3
3
|
import path from "path";
|
|
4
4
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -151,14 +151,13 @@ var getIfCoreFns = () => {
|
|
|
151
151
|
import { createRequire as createRequire2 } from "module";
|
|
152
152
|
import { basename as basename2 } from "path";
|
|
153
153
|
import { config as dotenvConfig } from "dotenv";
|
|
154
|
-
import { expand as dotenvExpand } from "dotenv-expand";
|
|
155
154
|
import { globSync } from "glob";
|
|
156
155
|
import stripIndent3 from "strip-indent";
|
|
157
156
|
var require3 = createRequire2(import.meta.url);
|
|
158
157
|
var getEnvVars = (files, ifMin, ifCore, ifLocalCore, ifHttps) => {
|
|
159
158
|
const filePath = files.find((file) => basename2(file) === ".env");
|
|
160
159
|
if (filePath) {
|
|
161
|
-
|
|
160
|
+
dotenvConfig({ path: filePath });
|
|
162
161
|
}
|
|
163
162
|
process.env.NODE_ENV ??= ifMin("production", "development");
|
|
164
163
|
process.env.BABEL_ENV ??= ifMin("production", "development");
|
|
@@ -185,7 +184,7 @@ var getEnvVars = (files, ifMin, ifCore, ifLocalCore, ifHttps) => {
|
|
|
185
184
|
} else {
|
|
186
185
|
let version = process.env.CORE_VERSION;
|
|
187
186
|
version = version ? `@${version}` : "";
|
|
188
|
-
process.env.CORE_URL ??= `https://
|
|
187
|
+
process.env.CORE_URL ??= `https://cdn.jsdelivr.net/npm/@raisenow/tamaro-core${version}/dist/index.js`;
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
190
|
const varNames = [
|
|
@@ -263,7 +262,7 @@ var applyEnv = (env) => {
|
|
|
263
262
|
const files = globSync(paths.appEnv);
|
|
264
263
|
const filePath = files.find((file) => basename2(file) === `.env.${env}`);
|
|
265
264
|
if (filePath) {
|
|
266
|
-
|
|
265
|
+
dotenvConfig({ path: filePath });
|
|
267
266
|
}
|
|
268
267
|
};
|
|
269
268
|
|
package/dist/cli.js
CHANGED
|
@@ -22,11 +22,42 @@ import {
|
|
|
22
22
|
resolveBin,
|
|
23
23
|
resolveOwn,
|
|
24
24
|
runCommandSync
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KVWFHWZD.js";
|
|
26
26
|
|
|
27
27
|
// src/cli.ts
|
|
28
28
|
import { createCommand } from "commander";
|
|
29
29
|
|
|
30
|
+
// src/commands/validate.ts
|
|
31
|
+
import { glob } from "glob";
|
|
32
|
+
|
|
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) => {
|
|
38
|
+
const errors = [];
|
|
39
|
+
for (const templateFile of templateFiles) {
|
|
40
|
+
try {
|
|
41
|
+
const compiled = compile(await fs.readFile(templateFile, "utf-8"));
|
|
42
|
+
compiled({});
|
|
43
|
+
console.log(`${templateFile} is a valid email template`);
|
|
44
|
+
} catch (e) {
|
|
45
|
+
errors.push(`${templateFile} is invalid`);
|
|
46
|
+
errors.push(e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return errors;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// src/commands/validate.ts
|
|
53
|
+
var validate = async () => {
|
|
54
|
+
const errors = await validateEmailTemplates(await glob("email-config/templates/**/*.hbs"));
|
|
55
|
+
if (errors.length) {
|
|
56
|
+
halt(errors.map((el) => el.toString()).join("\n"));
|
|
57
|
+
}
|
|
58
|
+
logTitle("Valid. Bye.");
|
|
59
|
+
};
|
|
60
|
+
|
|
30
61
|
// src/lib/aws.ts
|
|
31
62
|
import { execaCommandSync } from "execa";
|
|
32
63
|
import prompts from "prompts";
|
|
@@ -151,6 +182,7 @@ var build = async (options) => {
|
|
|
151
182
|
options.profile = await promptProfile();
|
|
152
183
|
}
|
|
153
184
|
assertOptionsValid(options);
|
|
185
|
+
await validate();
|
|
154
186
|
const flags = prepareFlags2(options);
|
|
155
187
|
const { ifCore } = getIfCoreFns();
|
|
156
188
|
const paths = getPaths(ifCore);
|
|
@@ -228,6 +260,7 @@ var deploy = async (options) => {
|
|
|
228
260
|
options.profile = await promptProfile();
|
|
229
261
|
}
|
|
230
262
|
assertOptionsValid2(options);
|
|
263
|
+
await validate();
|
|
231
264
|
awsAuthenticate(options);
|
|
232
265
|
const flags = prepareFlags(options);
|
|
233
266
|
const { tag } = options;
|
|
@@ -335,6 +368,7 @@ var deployEmailConfig = async (options) => {
|
|
|
335
368
|
options.bucket = options.ci ? AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD : await promptBucketTamaroEmailConfig();
|
|
336
369
|
}
|
|
337
370
|
assertOptionsValid3(options);
|
|
371
|
+
await validate();
|
|
338
372
|
awsAuthenticate(options);
|
|
339
373
|
const flags = prepareFlags(options);
|
|
340
374
|
const configName = getWidgetUuid();
|
|
@@ -577,14 +611,14 @@ var prepareFlags4 = async (options) => {
|
|
|
577
611
|
// package.json
|
|
578
612
|
var package_default = {
|
|
579
613
|
name: "@raisenow/tamaro-cli",
|
|
580
|
-
version: "1.1.
|
|
614
|
+
version: "1.1.9",
|
|
581
615
|
author: {
|
|
582
616
|
name: "RaiseNow",
|
|
583
617
|
email: "development@raisenow.com"
|
|
584
618
|
},
|
|
585
619
|
type: "module",
|
|
586
620
|
bin: "dist/cli.js",
|
|
587
|
-
packageManager: "pnpm@9.
|
|
621
|
+
packageManager: "pnpm@9.14.2",
|
|
588
622
|
engines: {
|
|
589
623
|
node: ">=20",
|
|
590
624
|
pnpm: ">= 9.12",
|
|
@@ -612,10 +646,10 @@ var package_default = {
|
|
|
612
646
|
"@babel/preset-typescript": "^7.26.0",
|
|
613
647
|
"@babel/runtime-corejs3": "^7.26.0",
|
|
614
648
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
|
615
|
-
"@statoscope/webpack-plugin": "^5.28.
|
|
649
|
+
"@statoscope/webpack-plugin": "^5.28.3",
|
|
616
650
|
"@types/columnify": "^1.5.4",
|
|
617
651
|
"@types/lodash": "^4.17.13",
|
|
618
|
-
"@types/node": "^
|
|
652
|
+
"@types/node": "^22.9.3",
|
|
619
653
|
"@types/node-notifier": "^8.0.5",
|
|
620
654
|
"@types/prompts": "^2.4.9",
|
|
621
655
|
"@types/resolve-bin": "^0.4.3",
|
|
@@ -635,7 +669,6 @@ var package_default = {
|
|
|
635
669
|
"css-loader": "^7.1.2",
|
|
636
670
|
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
637
671
|
dotenv: "^16.4.5",
|
|
638
|
-
"dotenv-expand": "^11.0.6",
|
|
639
672
|
"escape-string-regexp": "^5.0.0",
|
|
640
673
|
eslint: "^8.57.1",
|
|
641
674
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -651,6 +684,8 @@ var package_default = {
|
|
|
651
684
|
"file-loader": "^6.2.0",
|
|
652
685
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
653
686
|
glob: "^11.0.0",
|
|
687
|
+
handlebars: "^4.7.8",
|
|
688
|
+
"handlebars-helpers": "^0.10.0",
|
|
654
689
|
"html-loader": "^5.1.0",
|
|
655
690
|
"html-webpack-plugin": "^5.6.3",
|
|
656
691
|
"json-loader": "^0.5.7",
|
|
@@ -658,21 +693,21 @@ var package_default = {
|
|
|
658
693
|
"mini-css-extract-plugin": "^2.9.2",
|
|
659
694
|
"node-notifier": "^10.0.1",
|
|
660
695
|
portfinder: "^1.0.32",
|
|
661
|
-
postcss: "^8.4.
|
|
696
|
+
postcss: "^8.4.49",
|
|
662
697
|
"postcss-custom-properties": "^14.0.4",
|
|
663
698
|
"postcss-loader": "^8.1.1",
|
|
664
699
|
prettier: "^3.3.3",
|
|
665
700
|
prompts: "^2.4.2",
|
|
666
701
|
"react-refresh": "^0.14.2",
|
|
667
702
|
"resolve-url-loader": "^5.0.0",
|
|
668
|
-
sass: "^1.
|
|
703
|
+
sass: "^1.81.0",
|
|
669
704
|
"sass-loader": "^16.0.3",
|
|
670
705
|
"source-map-loader": "^5.0.0",
|
|
671
706
|
"strip-indent": "^4.0.0",
|
|
672
707
|
"style-loader": "^4.0.0",
|
|
673
|
-
"tsconfig-paths-webpack-plugin": "^4.
|
|
708
|
+
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
674
709
|
tsup: "^8.3.5",
|
|
675
|
-
typescript: "^5.
|
|
710
|
+
typescript: "^5.7.2",
|
|
676
711
|
"url-loader": "^4.1.1",
|
|
677
712
|
webpack: "^5.96.1",
|
|
678
713
|
"webpack-cli": "^5.1.4",
|
|
@@ -757,6 +792,9 @@ cli.command("list-deployed").description(
|
|
|
757
792
|
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) => {
|
|
758
793
|
await deployEmailConfig(options);
|
|
759
794
|
});
|
|
795
|
+
cli.command("validate").description("Validate the current Tamaro configuration to avoid common errors").action(async () => {
|
|
796
|
+
await validate();
|
|
797
|
+
});
|
|
760
798
|
(async () => {
|
|
761
799
|
try {
|
|
762
800
|
logTitle(`${package_default.name} ${package_default.version}
|
package/dist/webpack.config.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
logTitle,
|
|
11
11
|
moduleFileExtensions,
|
|
12
12
|
resolveApp
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KVWFHWZD.js";
|
|
14
14
|
|
|
15
15
|
// src/webpack.config.ts
|
|
16
16
|
import { existsSync } from "fs";
|
|
@@ -81,17 +81,20 @@ var getWebpackConfig = (env) => {
|
|
|
81
81
|
logDataTable(getRelativePaths(paths));
|
|
82
82
|
logTitle("Environment variables:");
|
|
83
83
|
logDataTable(envVars.raw);
|
|
84
|
-
const getCssLoaders = (
|
|
84
|
+
const getCssLoaders = ({
|
|
85
|
+
styleLoader = true,
|
|
86
|
+
...cssOptions
|
|
87
|
+
}) => {
|
|
85
88
|
return removeEmpty([
|
|
86
|
-
ifMin({ loader: MiniCssExtractPlugin.loader }),
|
|
87
|
-
ifNotMin({
|
|
89
|
+
styleLoader ? ifMin({ loader: MiniCssExtractPlugin.loader }) : void 0,
|
|
90
|
+
styleLoader ? ifNotMin({
|
|
88
91
|
loader: require2.resolve("style-loader"),
|
|
89
92
|
options: {
|
|
90
93
|
attributes: {
|
|
91
94
|
"data-widget": process.env.ELEMENT_ATTRIBUTE_DATA_WIDGET
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
|
-
}),
|
|
97
|
+
}) : void 0,
|
|
95
98
|
{
|
|
96
99
|
loader: require2.resolve("css-loader"),
|
|
97
100
|
options: {
|
|
@@ -235,19 +238,22 @@ var getWebpackConfig = (env) => {
|
|
|
235
238
|
{
|
|
236
239
|
test: /\.(js|mjs)$/
|
|
237
240
|
},
|
|
238
|
-
// Styles (
|
|
241
|
+
// Styles (extracted)
|
|
239
242
|
{
|
|
240
243
|
test: /\.s?css$/,
|
|
241
|
-
|
|
244
|
+
resourceQuery: { not: [/inline/] },
|
|
242
245
|
use: getCssLoaders({
|
|
243
|
-
|
|
246
|
+
styleLoader: true
|
|
244
247
|
})
|
|
245
248
|
},
|
|
246
|
-
// Styles (
|
|
249
|
+
// Styles (as string)
|
|
247
250
|
{
|
|
248
|
-
test: /\.
|
|
251
|
+
test: /\.s?css$/,
|
|
252
|
+
resourceQuery: /inline/,
|
|
249
253
|
use: getCssLoaders({
|
|
250
|
-
|
|
254
|
+
styleLoader: false,
|
|
255
|
+
exportType: "string",
|
|
256
|
+
sourceMap: false
|
|
251
257
|
})
|
|
252
258
|
},
|
|
253
259
|
// Images and fonts
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raisenow/tamaro-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
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.
|
|
10
|
+
"packageManager": "pnpm@9.14.2",
|
|
11
11
|
"engines": {
|
|
12
12
|
"node": ">=20",
|
|
13
13
|
"pnpm": ">= 9.12",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"@babel/preset-typescript": "^7.26.0",
|
|
36
36
|
"@babel/runtime-corejs3": "^7.26.0",
|
|
37
37
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
|
38
|
-
"@statoscope/webpack-plugin": "^5.28.
|
|
38
|
+
"@statoscope/webpack-plugin": "^5.28.3",
|
|
39
39
|
"@types/columnify": "^1.5.4",
|
|
40
40
|
"@types/lodash": "^4.17.13",
|
|
41
|
-
"@types/node": "^
|
|
41
|
+
"@types/node": "^22.9.3",
|
|
42
42
|
"@types/node-notifier": "^8.0.5",
|
|
43
43
|
"@types/prompts": "^2.4.9",
|
|
44
44
|
"@types/resolve-bin": "^0.4.3",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"css-loader": "^7.1.2",
|
|
59
59
|
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
60
60
|
"dotenv": "^16.4.5",
|
|
61
|
-
"dotenv-expand": "^11.0.6",
|
|
62
61
|
"escape-string-regexp": "^5.0.0",
|
|
63
62
|
"eslint": "^8.57.1",
|
|
64
63
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -74,6 +73,8 @@
|
|
|
74
73
|
"file-loader": "^6.2.0",
|
|
75
74
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
76
75
|
"glob": "^11.0.0",
|
|
76
|
+
"handlebars": "^4.7.8",
|
|
77
|
+
"handlebars-helpers": "^0.10.0",
|
|
77
78
|
"html-loader": "^5.1.0",
|
|
78
79
|
"html-webpack-plugin": "^5.6.3",
|
|
79
80
|
"json-loader": "^0.5.7",
|
|
@@ -81,21 +82,21 @@
|
|
|
81
82
|
"mini-css-extract-plugin": "^2.9.2",
|
|
82
83
|
"node-notifier": "^10.0.1",
|
|
83
84
|
"portfinder": "^1.0.32",
|
|
84
|
-
"postcss": "^8.4.
|
|
85
|
+
"postcss": "^8.4.49",
|
|
85
86
|
"postcss-custom-properties": "^14.0.4",
|
|
86
87
|
"postcss-loader": "^8.1.1",
|
|
87
88
|
"prettier": "^3.3.3",
|
|
88
89
|
"prompts": "^2.4.2",
|
|
89
90
|
"react-refresh": "^0.14.2",
|
|
90
91
|
"resolve-url-loader": "^5.0.0",
|
|
91
|
-
"sass": "^1.
|
|
92
|
+
"sass": "^1.81.0",
|
|
92
93
|
"sass-loader": "^16.0.3",
|
|
93
94
|
"source-map-loader": "^5.0.0",
|
|
94
95
|
"strip-indent": "^4.0.0",
|
|
95
96
|
"style-loader": "^4.0.0",
|
|
96
|
-
"tsconfig-paths-webpack-plugin": "^4.
|
|
97
|
+
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
97
98
|
"tsup": "^8.3.5",
|
|
98
|
-
"typescript": "^5.
|
|
99
|
+
"typescript": "^5.7.2",
|
|
99
100
|
"url-loader": "^4.1.1",
|
|
100
101
|
"webpack": "^5.96.1",
|
|
101
102
|
"webpack-cli": "^5.1.4",
|