@raisenow/tamaro-cli 1.5.0 → 1.6.0-beta.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.
- package/.nvmrc +1 -1
- package/README.md +92 -0
- package/bitbucket-pipelines.yml +1 -1
- package/dist/{chunk-HGPQTHLY.js → chunk-MCUAYEGK.js} +13 -2
- package/dist/cli.js +624 -179
- package/dist/webpack.config.js +1 -1
- package/package.json +40 -39
- package/pnpm-workspace.yaml +4 -0
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
22.22.0
|
package/README.md
CHANGED
|
@@ -32,6 +32,10 @@ Available commands:
|
|
|
32
32
|
- [`deploy`](#deploy)
|
|
33
33
|
- [`list-deployed`](#list-deployed)
|
|
34
34
|
- [`deploy-email-config`](#deploy-email-config)
|
|
35
|
+
- [`undeploy`](#undeploy)
|
|
36
|
+
- [`undeploy-email-config`](#undeploy-email-config)
|
|
37
|
+
- [`archive`](#archive)
|
|
38
|
+
- [`unarchive`](#unarchive)
|
|
35
39
|
|
|
36
40
|
## `dev`
|
|
37
41
|
|
|
@@ -233,6 +237,94 @@ cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
|
233
237
|
npx -y @raisenow/tamaro-cli deploy-email-config
|
|
234
238
|
```
|
|
235
239
|
|
|
240
|
+
## `undeploy`
|
|
241
|
+
|
|
242
|
+
Undeploy a _Tamaro Core_ or customer configuration bundle from AWS S3. Removes the specified tag from S3 and invalidates
|
|
243
|
+
the CloudFront cache. Always asks for confirmation unless `-y` is passed.
|
|
244
|
+
|
|
245
|
+
**NOTE**: _Tamaro Core_ cannot be undeployed with the `latest` or no tag.
|
|
246
|
+
|
|
247
|
+
### Options
|
|
248
|
+
|
|
249
|
+
- `--tag <tag>` – Tag which should be undeployed (default: "latest")
|
|
250
|
+
- `--all` – Undeploy all tags
|
|
251
|
+
- `--dryrun` – Displays the operations that would be performed without actually running them
|
|
252
|
+
- `-y, --yes` – Skip confirmation prompt
|
|
253
|
+
|
|
254
|
+
### Undeploy the "latest" tag
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
258
|
+
npx -y @raisenow/tamaro-cli undeploy
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Undeploy a specific tag
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
265
|
+
npx -y @raisenow/tamaro-cli undeploy --tag WEB-123
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Undeploy all tags
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
272
|
+
npx -y @raisenow/tamaro-cli undeploy --all
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## `undeploy-email-config`
|
|
276
|
+
|
|
277
|
+
Undeploy a widget's email configuration from AWS S3. Always asks for confirmation unless `-y` is passed.
|
|
278
|
+
|
|
279
|
+
### Options
|
|
280
|
+
|
|
281
|
+
- `--bucket <bucket>` – AWS bucket for email configs
|
|
282
|
+
- `--dryrun` – Displays the operations that would be performed without actually running them
|
|
283
|
+
- `-y, --yes` – Skip confirmation prompt
|
|
284
|
+
|
|
285
|
+
### Example
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
289
|
+
npx -y @raisenow/tamaro-cli undeploy-email-config
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## `archive`
|
|
293
|
+
|
|
294
|
+
Archive a customer configuration. This moves the configuration folder into the `_archived` folder, undeploys all tags
|
|
295
|
+
from S3, and undeploys the email configuration from both stage and prod. Archived widgets cannot be archived again.
|
|
296
|
+
Always asks for confirmation unless `-y` is passed.
|
|
297
|
+
|
|
298
|
+
### Options
|
|
299
|
+
|
|
300
|
+
- `--dryrun` – Displays the operations that would be performed without actually running them
|
|
301
|
+
- `-y, --yes` – Skip confirmation prompt
|
|
302
|
+
|
|
303
|
+
### Example
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
cd /path/to/tamaro-configurations/configs/example-02-typical-customisations
|
|
307
|
+
npx -y @raisenow/tamaro-cli archive
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## `unarchive`
|
|
311
|
+
|
|
312
|
+
Unarchive a previously archived customer configuration. This moves the configuration out of the `_archived` folder,
|
|
313
|
+
builds the bundle, deploys it to the "latest" tag, and deploys the email configuration. Only archived widgets can be
|
|
314
|
+
unarchived. Always asks for confirmation unless `-y` is passed.
|
|
315
|
+
|
|
316
|
+
### Options
|
|
317
|
+
|
|
318
|
+
- `--dryrun` – Displays the operations that would be performed without actually running them
|
|
319
|
+
- `-y, --yes` – Skip confirmation prompt
|
|
320
|
+
|
|
321
|
+
### Example
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
cd /path/to/tamaro-configurations/configs/_archived/example-02-typical-customisations
|
|
325
|
+
npx -y @raisenow/tamaro-cli unarchive
|
|
326
|
+
```
|
|
327
|
+
|
|
236
328
|
# Development
|
|
237
329
|
|
|
238
330
|
Make sure you have installed and activated the proper `node` and `npm` versions.
|
package/bitbucket-pipelines.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/tsup@8.5.
|
|
1
|
+
// node_modules/.pnpm/tsup@8.5.1_jiti@2.6.0_postcss@8.5.6_tsx@4.19.1_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
4
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -17,6 +17,11 @@ var logError = (message) => {
|
|
|
17
17
|
console.log(chalk.red(message));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
+
var logSuccess = (message) => {
|
|
21
|
+
if (message) {
|
|
22
|
+
console.log(chalk.green(message));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
20
25
|
var logCommand = (cmd) => {
|
|
21
26
|
console.log(`
|
|
22
27
|
${chalk.dim(stripIndent(cmd).trim())}
|
|
@@ -136,14 +141,19 @@ var getRelativePaths = (paths) => {
|
|
|
136
141
|
}
|
|
137
142
|
return relativePaths;
|
|
138
143
|
};
|
|
139
|
-
var getIfCoreFns = (
|
|
144
|
+
var getIfCoreFns = ({
|
|
145
|
+
allowArchived = false
|
|
146
|
+
} = {}) => {
|
|
140
147
|
const corePkgPath = resolveApp("package.json");
|
|
141
148
|
const configsPkgPath = resolveApp("../../package.json");
|
|
149
|
+
const archivedConfigsPkgPath = resolveApp("../../../package.json");
|
|
142
150
|
let packageName;
|
|
143
151
|
if (existsSync(corePkgPath)) {
|
|
144
152
|
packageName = require2(corePkgPath).name;
|
|
145
153
|
} else if (existsSync(configsPkgPath)) {
|
|
146
154
|
packageName = require2(configsPkgPath).name;
|
|
155
|
+
} else if (allowArchived && existsSync(archivedConfigsPkgPath)) {
|
|
156
|
+
packageName = require2(archivedConfigsPkgPath).name;
|
|
147
157
|
}
|
|
148
158
|
if (packageName) {
|
|
149
159
|
return getIfUtils({ core: TAMARO_CORE_PACKAGE_NAMES.includes(packageName) }, [
|
|
@@ -293,6 +303,7 @@ var applyEnv = (env) => {
|
|
|
293
303
|
export {
|
|
294
304
|
logTitle,
|
|
295
305
|
logError,
|
|
306
|
+
logSuccess,
|
|
296
307
|
logCommand,
|
|
297
308
|
logDataTable,
|
|
298
309
|
halt,
|