@raisenow/tamaro-cli 1.4.2 → 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/.eslintrc.cjs +1 -1
- package/.nvmrc +1 -1
- package/README.md +92 -0
- package/bitbucket-pipelines.yml +1 -1
- package/dist/{chunk-XSGUCJWC.js → chunk-MCUAYEGK.js} +20 -3
- package/dist/cli.js +624 -179
- package/dist/webpack.config.js +1 -1
- package/package.json +40 -39
- package/pnpm-workspace.yaml +9 -0
- package/renovate.json +3 -0
- package/.history/.eslintignore_20220609190420 +0 -4
- package/.history/.eslintignore_20230911190227 +0 -6
- package/.history/.eslintignore_20230911211247 +0 -7
- package/.history/.eslintignore_20230911211250 +0 -7
- package/.history/.eslintrc_20230911201601.js +0 -49
- package/.history/.eslintrc_20230911201643.js +0 -49
- package/.history/.eslintrc_20230911201735.js +0 -49
- package/.history/.eslintrc_20230911201913.js +0 -64
- package/.history/.eslintrc_20230911202002.js +0 -62
- package/.history/.eslintrc_20230911202138.js +0 -133
- package/.history/.eslintrc_20230911202140.js +0 -133
- package/.history/.eslintrc_20230911202145.js +0 -133
- package/.history/.eslintrc_20230911202147.js +0 -133
- package/.history/.eslintrc_20230911202406.js +0 -133
- package/.history/.eslintrc_20230911202447.js +0 -133
- package/.history/.eslintrc_20230911202453.js +0 -133
- package/.history/.eslintrc_20230911202511.js +0 -133
- package/.history/.eslintrc_20230911202527.js +0 -133
- package/.history/.eslintrc_20230911202639.js +0 -125
- package/.history/.eslintrc_20230911202721.js +0 -149
- package/.history/.eslintrc_20230911202746.js +0 -149
- package/.history/.eslintrc_20240423125702.cjs +0 -148
- package/.history/.gitignore_20220609190420 +0 -14
- package/.history/.gitignore_20230911185959 +0 -4
- package/.history/.gitignore_20230911190006 +0 -4
- package/.history/.gitignore_20230911190007 +0 -4
- package/.history/.nmprc_20241004144025 +0 -0
- package/.history/.nmprc_20241004144041 +0 -1
- package/.history/.npmrc_20241004144040 +0 -1
- package/.history/.npmrc_20241004144152 +0 -1
- package/.history/.npmrc_20241004145639 +0 -2
- package/.history/.npmrc_20241004145649 +0 -1
- package/.history/.nvmrc_20250729181039 +0 -1
- package/.history/.prettierignore_20220609190420 +0 -5
- package/.history/.prettierignore_20230911190242 +0 -7
- package/.history/.prettierignore_20230911190245 +0 -7
- package/.history/.prettierignore_20230911211301 +0 -8
- package/.history/CHANGELOG_20250729195139.md +0 -28
- package/.history/CHANGELOG_20250729195148.md +0 -29
- package/.history/CHANGELOG_20250729195156.md +0 -28
- package/.history/CHANGELOG_20250729195218.md +0 -29
- package/.history/CHANGELOG_20250729195223.md +0 -27
- package/.history/CHANGELOG_20250729195506.md +0 -29
- package/.history/CHANGELOG_20250729224404.md +0 -30
- package/.history/CHANGELOG_20250729224411.md +0 -30
- package/.history/CHANGELOG_20250730124538.md +0 -41
- package/.history/CHANGELOG_20250730124603.md +0 -38
- package/.history/CHANGELOG_20250730124627.md +0 -36
- package/.history/CHANGELOG_20250730124638.md +0 -36
- package/.history/CHANGELOG_20250730124640.md +0 -36
- package/.history/README_20230911145033.md +0 -245
- package/.history/README_20230911151749.md +0 -245
- package/.history/README_20230911151844.md +0 -245
- package/.history/README_20230911153040.md +0 -245
- package/.history/README_20230911202959.md +0 -245
- package/.history/bitbucket-pipelines_20250729111540.yml +0 -46
- package/.history/bitbucket-pipelines_20250729210338.yml +0 -46
- package/.history/bitbucket-pipelines_20250729210340.yml +0 -46
- package/.history/bitbucket-pipelines_20250729210342.yml +0 -46
- package/.history/bitbucket-pipelines_20250729222234.yml +0 -47
- package/.history/bitbucket-pipelines_20250729222554.yml +0 -47
- package/.history/bitbucket-pipelines_20250729222555.yml +0 -47
- package/.history/bitbucket-pipelines_20250729223022.yml +0 -46
- package/.history/bitbucket-pipelines_20250729223024.yml +0 -46
- package/.history/cli_20241005014539 +0 -3
- package/.history/cli_20241005014542 +0 -3
- package/.history/cli_20241005014848 +0 -3
- package/.history/dist/chunk-FICM3HUI_20230912183408.js +0 -302
- package/.history/dist/chunk-FICM3HUI_20230912201610.js +0 -302
- package/.history/package_20250729182417.json +0 -111
- package/.history/package_20250729182419.json +0 -111
- package/.history/package_20250729182618.json +0 -110
- package/.history/package_20250729182834.json +0 -110
- package/.history/package_20250729183032.json +0 -110
- package/.history/package_20250729183033.json +0 -110
- package/.history/package_20250729185750.json +0 -110
- package/.history/package_20250729185815.json +0 -110
- package/.history/package_20250729185846.json +0 -110
- package/.history/package_20250729185854.json +0 -110
- package/.history/package_20250729185943.json +0 -110
- package/.history/package_20250729190645.json +0 -110
- package/.history/package_20250729195934.json +0 -110
- package/.history/package_20250729200013.json +0 -110
- package/.history/package_20250729200056.json +0 -110
- package/.history/package_20250729200434.json +0 -110
- package/.history/package_20250729200808.json +0 -110
- package/.history/package_20250729200944.json +0 -110
- package/.history/package_20250729214420.json +0 -114
- package/.history/package_20250729223112.json +0 -110
- package/.history/package_20250729223127.json +0 -110
- package/.history/package_20250729223134.json +0 -110
- package/.history/package_20250730124647.json +0 -114
- package/.history/tsconfig_20241005001442.json +0 -34
- package/.history/tsconfig_20241005001500.json +0 -34
- package/.history/tsconfig_20241005001540.json +0 -34
- package/.history/tsconfig_20241005014429.json +0 -42
- package/.history/tsconfig_20241005014436.json +0 -42
- package/.history/tsconfig_20241005014439.json +0 -38
- package/.history/tsconfig_20241005014455.json +0 -38
- package/.history/tsconfig_20241005014521.json +0 -38
- package/.history/vitest.config_20250729214539.ts +0 -0
- package/.history/vitest.config_20250729214659.ts +0 -24
- package/.history/vitest.config_20250729214748.ts +0 -21
- package/.history/vitest.config_20250729214825.ts +0 -21
- package/.history/vitest.config_20250729214902.ts +0 -21
- package/.history/vitest.config_20250729222125.ts +0 -20
- package/.history/vitest.config_20250729222213.ts +0 -20
- package/.idea/codeStyles/Project.xml +0 -131
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -17
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/tamaro-cli.iml +0 -12
- package/.idea/vcs.xml +0 -6
package/.eslintrc.cjs
CHANGED
|
@@ -124,7 +124,7 @@ module.exports = {
|
|
|
124
124
|
extends: ['plugin:yml/standard'],
|
|
125
125
|
rules: {
|
|
126
126
|
// 'yml/no-irregular-whitespace': 0,
|
|
127
|
-
|
|
127
|
+
'yml/quotes': [2, {prefer: 'single', avoidEscape: true}],
|
|
128
128
|
'yml/plain-scalar': 0,
|
|
129
129
|
'yml/no-multiple-empty-lines': [2, {max: 1}],
|
|
130
130
|
},
|
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) }, [
|
|
@@ -202,7 +212,11 @@ var getEnvVars = (files, ifMin, ifCore, ifLocalCore, ifHttps) => {
|
|
|
202
212
|
} else {
|
|
203
213
|
let version = process.env.CORE_VERSION;
|
|
204
214
|
version = version ? `@${version}` : "";
|
|
205
|
-
process.env.
|
|
215
|
+
process.env.CORE_URL_PATTERN ??= "https://cdn.jsdelivr.net/npm/@raisenow/tamaro-core{{version}}/dist/index.js";
|
|
216
|
+
process.env.CORE_URL ??= process.env.CORE_URL_PATTERN.replace(
|
|
217
|
+
"{{version}}",
|
|
218
|
+
version
|
|
219
|
+
);
|
|
206
220
|
}
|
|
207
221
|
}
|
|
208
222
|
const varNames = [
|
|
@@ -220,8 +234,10 @@ var getEnvVars = (files, ifMin, ifCore, ifLocalCore, ifHttps) => {
|
|
|
220
234
|
// config
|
|
221
235
|
"WIDGET_UUID",
|
|
222
236
|
"CORE_URL",
|
|
237
|
+
"CORE_URL_PATTERN",
|
|
223
238
|
"CORE_VERSION",
|
|
224
239
|
// should be explicitly specified in each config
|
|
240
|
+
"DISABLE_URL_VERSION_OVERRIDE",
|
|
225
241
|
// epik (obsolete since Tamaro v2.5.0)
|
|
226
242
|
"EPP_API_KEY_DEFAULT",
|
|
227
243
|
"EPP_API_URL_STAGE",
|
|
@@ -287,6 +303,7 @@ var applyEnv = (env) => {
|
|
|
287
303
|
export {
|
|
288
304
|
logTitle,
|
|
289
305
|
logError,
|
|
306
|
+
logSuccess,
|
|
290
307
|
logCommand,
|
|
291
308
|
logDataTable,
|
|
292
309
|
halt,
|