@raisenow/tamaro-cli 1.1.6 → 1.1.8
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/dist/{chunk-OLKERSRR.js → chunk-KVWFHWZD.js} +23 -26
- package/dist/cli.js +151 -111
- package/dist/webpack.config.js +25 -15
- package/package.json +26 -27
- package/src/cli.ts +15 -5
- package/src/commands/build.ts +13 -7
- package/src/commands/deploy-email-config.ts +76 -12
- package/src/commands/deploy.ts +28 -30
- package/src/commands/dev.ts +5 -7
- package/src/commands/list-deployed.ts +16 -10
- package/src/commands/serve.ts +4 -6
- package/src/lib/aws.ts +34 -55
- package/src/lib/command.ts +2 -2
- package/src/lib/constants.ts +3 -4
- package/src/lib/env.ts +5 -7
- package/src/webpack.config.ts +32 -20
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v22.11.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/tsup@8.3.
|
|
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);
|
|
@@ -27,12 +27,25 @@ var logDataTable = (data) => {
|
|
|
27
27
|
console.log("");
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
// src/lib/command.ts
|
|
31
|
+
import { execaCommandSync } from "execa";
|
|
32
|
+
var halt = (message) => {
|
|
33
|
+
logError(message);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
};
|
|
36
|
+
var prepareCommand = (cmd) => {
|
|
37
|
+
return cmd.replace(/\n/gm, " ").replace(/[ \t]{2,}/gm, " ").trim();
|
|
38
|
+
};
|
|
39
|
+
var runCommandSync = (cmd, options) => {
|
|
40
|
+
return execaCommandSync(prepareCommand(cmd), options);
|
|
41
|
+
};
|
|
42
|
+
|
|
30
43
|
// src/lib/constants.ts
|
|
31
44
|
var DEFAULT_TAG = "latest";
|
|
32
45
|
var DEFAULT_PORT = 1234;
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
46
|
+
var AWS_S3_BUCKET_TAMARO = "tamaro.raisenow.com";
|
|
47
|
+
var AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE = "rnw-stage-email-service";
|
|
48
|
+
var AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD = "rnw-email-service";
|
|
36
49
|
var CORE_CONFIG_NAME = "tamaro-core";
|
|
37
50
|
var AWS_CLOUDFRONT_DISTRIBUTION_ID = "EHJ1OM458YQ0I";
|
|
38
51
|
var HTTPS_CRT_FILE = "localhost.crt";
|
|
@@ -138,29 +151,13 @@ var getIfCoreFns = () => {
|
|
|
138
151
|
import { createRequire as createRequire2 } from "module";
|
|
139
152
|
import { basename as basename2 } from "path";
|
|
140
153
|
import { config as dotenvConfig } from "dotenv";
|
|
141
|
-
import { expand as dotenvExpand } from "dotenv-expand";
|
|
142
154
|
import { globSync } from "glob";
|
|
143
155
|
import stripIndent3 from "strip-indent";
|
|
144
|
-
|
|
145
|
-
// src/lib/command.ts
|
|
146
|
-
import { execaCommandSync } from "execa";
|
|
147
|
-
var halt = (message, exitCode = 1) => {
|
|
148
|
-
logError(message);
|
|
149
|
-
process.exit(exitCode);
|
|
150
|
-
};
|
|
151
|
-
var prepareCommand = (cmd) => {
|
|
152
|
-
return cmd.replace(/\n/gm, " ").replace(/[ \t]{2,}/gm, " ").trim();
|
|
153
|
-
};
|
|
154
|
-
var runCommandSync = (cmd, options) => {
|
|
155
|
-
return execaCommandSync(prepareCommand(cmd), options);
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
// src/lib/env.ts
|
|
159
156
|
var require3 = createRequire2(import.meta.url);
|
|
160
157
|
var getEnvVars = (files, ifMin, ifCore, ifLocalCore, ifHttps) => {
|
|
161
158
|
const filePath = files.find((file) => basename2(file) === ".env");
|
|
162
159
|
if (filePath) {
|
|
163
|
-
|
|
160
|
+
dotenvConfig({ path: filePath });
|
|
164
161
|
}
|
|
165
162
|
process.env.NODE_ENV ??= ifMin("production", "development");
|
|
166
163
|
process.env.BABEL_ENV ??= ifMin("production", "development");
|
|
@@ -187,7 +184,7 @@ var getEnvVars = (files, ifMin, ifCore, ifLocalCore, ifHttps) => {
|
|
|
187
184
|
} else {
|
|
188
185
|
let version = process.env.CORE_VERSION;
|
|
189
186
|
version = version ? `@${version}` : "";
|
|
190
|
-
process.env.CORE_URL ??= `https://
|
|
187
|
+
process.env.CORE_URL ??= `https://cdn.jsdelivr.net/npm/@raisenow/tamaro-core${version}/dist/index.js`;
|
|
191
188
|
}
|
|
192
189
|
}
|
|
193
190
|
const varNames = [
|
|
@@ -265,7 +262,7 @@ var applyEnv = (env) => {
|
|
|
265
262
|
const files = globSync(paths.appEnv);
|
|
266
263
|
const filePath = files.find((file) => basename2(file) === `.env.${env}`);
|
|
267
264
|
if (filePath) {
|
|
268
|
-
|
|
265
|
+
dotenvConfig({ path: filePath });
|
|
269
266
|
}
|
|
270
267
|
};
|
|
271
268
|
|
|
@@ -278,9 +275,9 @@ export {
|
|
|
278
275
|
runCommandSync,
|
|
279
276
|
DEFAULT_TAG,
|
|
280
277
|
DEFAULT_PORT,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
278
|
+
AWS_S3_BUCKET_TAMARO,
|
|
279
|
+
AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE,
|
|
280
|
+
AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD,
|
|
284
281
|
CORE_CONFIG_NAME,
|
|
285
282
|
AWS_CLOUDFRONT_DISTRIBUTION_ID,
|
|
286
283
|
HTTPS_CRT_FILE,
|