@raisenow/tamaro-cli 1.0.4 → 1.0.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/.gitignore +2 -1
- package/.nvmrc +1 -1
- package/dist/cli.js +82 -82
- package/dist/webpack.config.js +163 -144
- package/package.json +53 -54
- package/readme.html +55 -0
- package/readme.md +201 -0
- package/src/assets/rnw-logo.png +0 -0
- package/src/cli.ts +18 -12
- package/src/commands/build/index.ts +3 -2
- package/src/commands/deploy/index.ts +1 -2
- package/src/commands/serve/index.ts +1 -1
- package/src/lib/helpers.ts +5 -6
- package/src/webpack.config.ts +142 -119
- package/src/assets/rnw-logo.jpg +0 -0
package/.gitignore
CHANGED
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
16.13.2
|
package/dist/cli.js
CHANGED
|
@@ -6,24 +6,24 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
9
|
-
var __reExport = (target, module2, desc) => {
|
|
9
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
10
10
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
11
11
|
for (let key of __getOwnPropNames(module2))
|
|
12
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
12
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
13
13
|
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
14
14
|
}
|
|
15
15
|
return target;
|
|
16
16
|
};
|
|
17
|
-
var
|
|
18
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default",
|
|
17
|
+
var __toESM = (module2, isNodeMode) => {
|
|
18
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
// src/cli.ts
|
|
22
|
-
var import_commander =
|
|
22
|
+
var import_commander = require("commander");
|
|
23
23
|
|
|
24
24
|
// package.json
|
|
25
25
|
var name = "@raisenow/tamaro-cli";
|
|
26
|
-
var version = "1.0.
|
|
26
|
+
var version = "1.0.8";
|
|
27
27
|
var author = {
|
|
28
28
|
name: "RaiseNow",
|
|
29
29
|
email: "development@raisenow.com"
|
|
@@ -34,94 +34,93 @@ var scripts = {
|
|
|
34
34
|
start: "npm run dev",
|
|
35
35
|
dev: "npm run build -- --watch --ignore-watch .idea",
|
|
36
36
|
build: "tsup src/cli.ts src/webpack.config.ts --format cjs",
|
|
37
|
+
docs: "npx -y http-server . --cors -o /readme.html",
|
|
37
38
|
lint: "eslint .",
|
|
38
39
|
"lint:fix": "eslint . --fix"
|
|
39
40
|
};
|
|
40
41
|
var bin = "dist/cli.js";
|
|
41
42
|
var engines = {
|
|
42
|
-
node: ">=
|
|
43
|
+
node: ">=16",
|
|
44
|
+
npm: ">=8"
|
|
43
45
|
};
|
|
44
46
|
var dependencies = {
|
|
45
|
-
"@babel/cli": "^7.
|
|
46
|
-
"@babel/core": "^7.
|
|
47
|
-
"@babel/plugin-proposal-decorators": "^7.
|
|
47
|
+
"@babel/cli": "^7.16.8",
|
|
48
|
+
"@babel/core": "^7.16.12",
|
|
49
|
+
"@babel/plugin-proposal-decorators": "^7.16.7",
|
|
48
50
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
49
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
50
|
-
"@babel/preset-env": "^7.
|
|
51
|
-
"@babel/preset-react": "^7.
|
|
52
|
-
"@babel/preset-typescript": "^7.
|
|
53
|
-
"@babel/runtime-corejs3": "^7.
|
|
54
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.
|
|
55
|
-
"@statoscope/webpack-plugin": "^5.
|
|
56
|
-
"@svgr/webpack": "^
|
|
51
|
+
"@babel/plugin-transform-runtime": "^7.16.10",
|
|
52
|
+
"@babel/preset-env": "^7.16.11",
|
|
53
|
+
"@babel/preset-react": "^7.16.7",
|
|
54
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
55
|
+
"@babel/runtime-corejs3": "^7.16.8",
|
|
56
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.4",
|
|
57
|
+
"@statoscope/webpack-plugin": "^5.20.0",
|
|
58
|
+
"@svgr/webpack": "^6.2.0",
|
|
57
59
|
"@types/columnify": "^1.5.1",
|
|
58
|
-
"@types/
|
|
59
|
-
"@types/css-
|
|
60
|
-
"@types/
|
|
61
|
-
"@types/
|
|
62
|
-
"@types/node": "^16.11.1",
|
|
63
|
-
"@types/node-notifier": "^8.0.1",
|
|
60
|
+
"@types/lodash": "^4.14.178",
|
|
61
|
+
"@types/mini-css-extract-plugin": "^2.5.1",
|
|
62
|
+
"@types/node": "^17.0.12",
|
|
63
|
+
"@types/node-notifier": "^8.0.2",
|
|
64
64
|
"@types/resolve-bin": "^0.4.1",
|
|
65
65
|
"@types/webpack-config-utils": "^2.3.1",
|
|
66
|
-
"@
|
|
67
|
-
"@typescript-eslint/
|
|
68
|
-
|
|
69
|
-
autoprefixer: "^10.3.7",
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
|
67
|
+
"@typescript-eslint/parser": "^5.10.1",
|
|
68
|
+
autoprefixer: "^10.4.2",
|
|
70
69
|
"babel-loader": "^8.2.3",
|
|
71
70
|
"babel-plugin-lodash": "^3.3.4",
|
|
72
71
|
boxen: "^5.1.2",
|
|
73
72
|
chalk: "^4.1.2",
|
|
74
73
|
"clean-webpack-plugin": "^4.0.0",
|
|
75
74
|
columnify: "^1.5.4",
|
|
76
|
-
commander: "^8.
|
|
77
|
-
"copy-webpack-plugin": "^
|
|
78
|
-
"core-js": "^3.
|
|
79
|
-
"css-loader": "^6.
|
|
80
|
-
"css-minimizer-webpack-plugin": "^3.
|
|
75
|
+
commander: "^8.3.0",
|
|
76
|
+
"copy-webpack-plugin": "^10.2.1",
|
|
77
|
+
"core-js": "^3.20.3",
|
|
78
|
+
"css-loader": "^6.5.1",
|
|
79
|
+
"css-minimizer-webpack-plugin": "^3.4.1",
|
|
81
80
|
"current-script-polyfill": "^1.0.0",
|
|
82
|
-
dotenv: "^
|
|
83
|
-
"dotenv-expand": "^
|
|
81
|
+
dotenv: "^14.3.2",
|
|
82
|
+
"dotenv-expand": "^6.0.1",
|
|
84
83
|
"element-closest": "^3.0.2",
|
|
85
84
|
"escape-string-regexp": "^4.0.0",
|
|
86
|
-
eslint: "^8.0
|
|
85
|
+
eslint: "^8.7.0",
|
|
87
86
|
"eslint-config-prettier": "^8.3.0",
|
|
88
87
|
"eslint-plugin-node": "^11.1.0",
|
|
89
88
|
"eslint-plugin-prettier": "^4.0.0",
|
|
90
|
-
"eslint-plugin-promise": "^
|
|
91
|
-
"eslint-webpack-plugin": "^3.0
|
|
89
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
90
|
+
"eslint-webpack-plugin": "^3.1.0",
|
|
92
91
|
execa: "^5.1.1",
|
|
93
92
|
"file-loader": "^6.2.0",
|
|
94
|
-
"fork-ts-checker-webpack-plugin": "^6.
|
|
93
|
+
"fork-ts-checker-webpack-plugin": "^6.5.0",
|
|
95
94
|
glob: "^7.2.0",
|
|
96
|
-
"html-loader": "^
|
|
97
|
-
"html-webpack-plugin": "^5.
|
|
95
|
+
"html-loader": "^3.1.0",
|
|
96
|
+
"html-webpack-plugin": "^5.5.0",
|
|
98
97
|
"json-loader": "^0.5.7",
|
|
99
98
|
lodash: "^4.17.21",
|
|
100
|
-
"mini-css-extract-plugin": "^2.
|
|
99
|
+
"mini-css-extract-plugin": "^2.5.3",
|
|
101
100
|
"node-notifier": "^10.0.0",
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"postcss-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
portfinder: "^1.0.28",
|
|
102
|
+
postcss: "^8.4.5",
|
|
103
|
+
"postcss-custom-properties": "^12.1.3",
|
|
104
|
+
"postcss-loader": "^6.2.1",
|
|
105
|
+
prettier: "^2.5.1",
|
|
106
|
+
"react-refresh": "^0.11.0",
|
|
107
107
|
"resolve-bin": "^1.0.0",
|
|
108
|
-
"resolve-url-loader": "^
|
|
109
|
-
sass: "^1.
|
|
110
|
-
"sass-loader": "^12.
|
|
111
|
-
"source-map-loader": "^3.0.
|
|
108
|
+
"resolve-url-loader": "^5.0.0",
|
|
109
|
+
sass: "^1.49.0",
|
|
110
|
+
"sass-loader": "^12.4.0",
|
|
111
|
+
"source-map-loader": "^3.0.1",
|
|
112
112
|
"strip-indent": "^3.0.0",
|
|
113
|
-
"style-loader": "^3.3.
|
|
113
|
+
"style-loader": "^3.3.1",
|
|
114
114
|
tailwindcss: "^0.7.4",
|
|
115
|
-
"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
typescript: "^4.4.4",
|
|
115
|
+
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
|
116
|
+
tsup: "^5.11.11",
|
|
117
|
+
typescript: "^4.5.5",
|
|
119
118
|
unfetch: "^4.2.0",
|
|
120
119
|
"url-loader": "^4.1.1",
|
|
121
|
-
webpack: "^5.
|
|
122
|
-
"webpack-cli": "^4.9.
|
|
120
|
+
webpack: "^5.67.0",
|
|
121
|
+
"webpack-cli": "^4.9.2",
|
|
123
122
|
"webpack-config-utils": "^2.3.1",
|
|
124
|
-
"webpack-dev-server": "^4.3
|
|
123
|
+
"webpack-dev-server": "^4.7.3",
|
|
125
124
|
"yaml-loader": "^0.6.0"
|
|
126
125
|
};
|
|
127
126
|
var package_default = {
|
|
@@ -136,19 +135,19 @@ var package_default = {
|
|
|
136
135
|
};
|
|
137
136
|
|
|
138
137
|
// src/commands/dev/index.ts
|
|
139
|
-
var import_execa =
|
|
138
|
+
var import_execa = require("execa");
|
|
140
139
|
|
|
141
140
|
// src/lib/helpers.ts
|
|
142
|
-
var import_path =
|
|
143
|
-
var import_fs =
|
|
144
|
-
var import_chalk =
|
|
145
|
-
var import_node_notifier =
|
|
146
|
-
var import_webpack_config_utils =
|
|
147
|
-
var import_columnify =
|
|
148
|
-
var import_boxen =
|
|
149
|
-
var import_dotenv_expand =
|
|
150
|
-
var import_dotenv =
|
|
151
|
-
var import_strip_indent =
|
|
141
|
+
var import_path = require("path");
|
|
142
|
+
var import_fs = require("fs");
|
|
143
|
+
var import_chalk = __toESM(require("chalk"));
|
|
144
|
+
var import_node_notifier = require("node-notifier");
|
|
145
|
+
var import_webpack_config_utils = require("webpack-config-utils");
|
|
146
|
+
var import_columnify = __toESM(require("columnify"));
|
|
147
|
+
var import_boxen = __toESM(require("boxen"));
|
|
148
|
+
var import_dotenv_expand = require("dotenv-expand");
|
|
149
|
+
var import_dotenv = require("dotenv");
|
|
150
|
+
var import_strip_indent = __toESM(require("strip-indent"));
|
|
152
151
|
var TAMARO_CORE_PACKAGE_NAMES = ["@raisenow/tamaro-core", "demo-tamaro-core"];
|
|
153
152
|
var TAMARO_CONFIGURATIONS_PACKAGE_NAMES = [
|
|
154
153
|
"@raisenow/tamaro-configurations",
|
|
@@ -217,13 +216,13 @@ var notify = (args) => {
|
|
|
217
216
|
(0, import_node_notifier.notify)({
|
|
218
217
|
title,
|
|
219
218
|
message,
|
|
220
|
-
contentImage: resolveOwn("src/assets/rnw-logo.
|
|
219
|
+
contentImage: resolveOwn("src/assets/rnw-logo.png"),
|
|
221
220
|
sound: "Funk"
|
|
222
221
|
});
|
|
223
222
|
};
|
|
224
223
|
|
|
225
224
|
// src/commands/dev/index.ts
|
|
226
|
-
var import_resolve_bin =
|
|
225
|
+
var import_resolve_bin = __toESM(require("resolve-bin"));
|
|
227
226
|
var prepareDevFlags = (options) => {
|
|
228
227
|
const { localCore } = options;
|
|
229
228
|
let flags = [];
|
|
@@ -240,11 +239,12 @@ var dev = async (options) => {
|
|
|
240
239
|
};
|
|
241
240
|
|
|
242
241
|
// src/commands/build/index.ts
|
|
243
|
-
var import_execa2 =
|
|
244
|
-
var import_resolve_bin2 =
|
|
242
|
+
var import_execa2 = require("execa");
|
|
243
|
+
var import_resolve_bin2 = __toESM(require("resolve-bin"));
|
|
245
244
|
var prepareBuildFlags = (options) => {
|
|
246
|
-
const { analyze } = options;
|
|
245
|
+
const { localCore, analyze } = options;
|
|
247
246
|
let flags = [];
|
|
247
|
+
flags = localCore ? [...flags, "--env localCore"] : flags;
|
|
248
248
|
flags = analyze ? [...flags, "--env analyze"] : flags;
|
|
249
249
|
return flags.join(" ");
|
|
250
250
|
};
|
|
@@ -262,7 +262,7 @@ var build = async (options) => {
|
|
|
262
262
|
};
|
|
263
263
|
|
|
264
264
|
// src/commands/deploy/index.ts
|
|
265
|
-
var import_execa3 =
|
|
265
|
+
var import_execa3 = require("execa");
|
|
266
266
|
var deploy = async (options) => {
|
|
267
267
|
const { ifCore } = getIfCoreFns();
|
|
268
268
|
const paths = getPaths(ifCore);
|
|
@@ -272,11 +272,11 @@ var deploy = async (options) => {
|
|
|
272
272
|
};
|
|
273
273
|
|
|
274
274
|
// src/commands/serve/index.ts
|
|
275
|
-
var import_execa4 =
|
|
275
|
+
var import_execa4 = require("execa");
|
|
276
276
|
var serve = async () => {
|
|
277
277
|
const { ifCore } = getIfCoreFns();
|
|
278
278
|
const paths = getPaths(ifCore);
|
|
279
|
-
const cmd = `npx http-server ${paths.appDist} --cors`;
|
|
279
|
+
const cmd = `npx -y http-server ${paths.appDist} --cors --port 1234`;
|
|
280
280
|
logCommand(cmd);
|
|
281
281
|
(0, import_execa4.commandSync)(cmd, { stdio: "inherit" });
|
|
282
282
|
};
|
|
@@ -289,10 +289,10 @@ process.on("SIGINT", () => {
|
|
|
289
289
|
process.exit(0);
|
|
290
290
|
});
|
|
291
291
|
var cli = (0, import_commander.createCommand)().name(package_default.name).version(package_default.version, "-v, --version");
|
|
292
|
-
cli.command("dev").description("Run dev server for Tamaro
|
|
292
|
+
cli.command("dev").description("Run dev web-server for Tamaro Core or customer configuration").option("--local-core", "Load Tamaro Core from localhost instead of CDN").action(async (options) => {
|
|
293
293
|
await dev(options);
|
|
294
294
|
});
|
|
295
|
-
cli.command("build").description("Build Tamaro
|
|
295
|
+
cli.command("build").description("Build optimised (minified) bundle of Tamaro Core or customer configuration for production").option("--local-core", "Load Tamaro Core from localhost instead of CDN").option("--analyze", 'Generate bundle statistics to "reports" folder').option("--deploy", "Deploy Tamaro Core or customer configuration bundle to AWS").option("--serve", "Run web-server for the bundle").option("--tag <tag>", "Tag which will be used for deployment of the bundle").action(async (options) => {
|
|
296
296
|
await build(options);
|
|
297
297
|
if (options.deploy) {
|
|
298
298
|
await deploy(options);
|
|
@@ -301,10 +301,10 @@ cli.command("build").description("Build Tamaro core or customer configuration fo
|
|
|
301
301
|
await serve();
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
|
-
cli.command("deploy").description("Deploy Tamaro
|
|
304
|
+
cli.command("deploy").description("Deploy prebuilt Tamaro Core or customer configuration bundle to AWS").option("--tag <tag>", "Tag which will be used for deployment of the bundle").action(async (options) => {
|
|
305
305
|
await deploy(options);
|
|
306
306
|
});
|
|
307
|
-
cli.command("serve").description("Run web-server for
|
|
307
|
+
cli.command("serve").description("Run web-server for prebuilt bundle").action(async () => {
|
|
308
308
|
await serve();
|
|
309
309
|
});
|
|
310
310
|
(async () => {
|