@raisenow/tamaro-cli 1.0.13 → 1.0.14

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.
@@ -150,7 +150,7 @@ var runCommandSync = (cmd, options) => {
150
150
  // src/lib/env.ts
151
151
  var require3 = createRequire2(import.meta.url);
152
152
  var getEnvVars = (files, ifMin, ifCore, ifLocalCore) => {
153
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
153
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
154
154
  const filePath = files.find((file) => basename2(file) === ".env");
155
155
  dotenvExpand(dotenvConfig({ path: filePath }));
156
156
  (_b = (_a = process.env).NODE_ENV) != null ? _b : _a.NODE_ENV = ifMin("production", "development");
@@ -159,7 +159,8 @@ var getEnvVars = (files, ifMin, ifCore, ifLocalCore) => {
159
159
  (_h = (_g = process.env).ELEMENT_ATTRIBUTE_DATA_WIDGET) != null ? _h : _g.ELEMENT_ATTRIBUTE_DATA_WIDGET = ifCore("rnw-tamaro-core", "rnw-tamaro");
160
160
  (_j = (_i = process.env).WEBPACK_UNIQUE_NAME) != null ? _j : _i.WEBPACK_UNIQUE_NAME = ifCore("RnwTamaroCore", "RnwTamaro");
161
161
  process.env.BUILD_DATE = new Date().toISOString();
162
- (_l = (_k = process.env).HMR_ENABLED) != null ? _l : _k.HMR_ENABLED = ifMin("false", "true");
162
+ (_l = (_k = process.env).PUBLIC_URL) != null ? _l : _k.PUBLIC_URL = "";
163
+ (_n = (_m = process.env).HMR_ENABLED) != null ? _n : _m.HMR_ENABLED = ifMin("false", "true");
163
164
  if (ifCore()) {
164
165
  process.env.PRODUCT_NAME = "tamaro";
165
166
  const corePkgPath = resolveApp("package.json");
@@ -173,7 +174,7 @@ var getEnvVars = (files, ifMin, ifCore, ifLocalCore) => {
173
174
  } else {
174
175
  let version = process.env.CORE_VERSION;
175
176
  version = version ? `@${version}` : "";
176
- (_n = (_m = process.env).CORE_URL) != null ? _n : _m.CORE_URL = `https://cdn.jsdelivr.net/npm/@raisenow/tamaro-core${version}/dist/index.js`;
177
+ (_p = (_o = process.env).CORE_URL) != null ? _p : _o.CORE_URL = `https://cdn.jsdelivr.net/npm/@raisenow/tamaro-core${version}/dist/index.js`;
177
178
  }
178
179
  }
179
180
  const varNames = [
@@ -183,6 +184,7 @@ var getEnvVars = (files, ifMin, ifCore, ifLocalCore) => {
183
184
  "ELEMENT_ATTRIBUTE_DATA_WIDGET",
184
185
  "WEBPACK_UNIQUE_NAME",
185
186
  "BUILD_DATE",
187
+ "PUBLIC_URL",
186
188
  "PRODUCT_NAME",
187
189
  "PRODUCT_VERSION",
188
190
  "WIDGET_UUID",
package/dist/cli.js CHANGED
@@ -12,14 +12,14 @@ import {
12
12
  resolveBin,
13
13
  resolveOwn,
14
14
  runCommandSync
15
- } from "./chunk-OXDXJ5B5.js";
15
+ } from "./chunk-IBQ4UW3S.js";
16
16
 
17
17
  // src/cli.ts
18
18
  import { createCommand } from "commander";
19
19
 
20
20
  // package.json
21
21
  var name = "@raisenow/tamaro-cli";
22
- var version = "1.0.13";
22
+ var version = "1.0.14";
23
23
  var author = {
24
24
  name: "RaiseNow",
25
25
  email: "development@raisenow.com"
@@ -40,15 +40,15 @@ var engines = {
40
40
  };
41
41
  var dependencies = {
42
42
  "@babel/cli": "^7.17.6",
43
- "@babel/core": "^7.17.8",
44
- "@babel/plugin-proposal-decorators": "^7.17.8",
43
+ "@babel/core": "^7.17.9",
44
+ "@babel/plugin-proposal-decorators": "^7.17.9",
45
45
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
46
46
  "@babel/plugin-transform-runtime": "^7.17.0",
47
47
  "@babel/preset-env": "^7.16.11",
48
48
  "@babel/preset-react": "^7.16.7",
49
49
  "@babel/preset-typescript": "^7.16.7",
50
- "@babel/runtime-corejs3": "^7.17.8",
51
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4",
50
+ "@babel/runtime-corejs3": "^7.17.9",
51
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
52
52
  "@statoscope/webpack-plugin": "^5.20.1",
53
53
  "@types/columnify": "^1.5.1",
54
54
  "@types/lodash": "^4.14.181",
@@ -56,8 +56,8 @@ var dependencies = {
56
56
  "@types/node-notifier": "^8.0.2",
57
57
  "@types/resolve-bin": "^0.4.1",
58
58
  "@types/webpack-config-utils": "^2.3.1",
59
- "@typescript-eslint/eslint-plugin": "^5.17.0",
60
- "@typescript-eslint/parser": "^5.17.0",
59
+ "@typescript-eslint/eslint-plugin": "^5.19.0",
60
+ "@typescript-eslint/parser": "^5.19.0",
61
61
  autoprefixer: "^10.4.4",
62
62
  "babel-loader": "^8.2.4",
63
63
  "babel-plugin-lodash": "^3.3.4",
@@ -72,15 +72,15 @@ var dependencies = {
72
72
  dotenv: "^16.0.0",
73
73
  "dotenv-expand": "^8.0.3",
74
74
  "escape-string-regexp": "^5.0.0",
75
- eslint: "^8.12.0",
75
+ eslint: "^8.13.0",
76
76
  "eslint-config-prettier": "^8.5.0",
77
77
  "eslint-plugin-node": "^11.1.0",
78
78
  "eslint-plugin-promise": "^6.0.0",
79
79
  "eslint-webpack-plugin": "^3.1.1",
80
80
  execa: "^6.1.0",
81
81
  "file-loader": "^6.2.0",
82
- "fork-ts-checker-webpack-plugin": "^7.2.1",
83
- glob: "^7.2.0",
82
+ "fork-ts-checker-webpack-plugin": "^7.2.4",
83
+ glob: "^8.0.1",
84
84
  "html-loader": "^3.1.0",
85
85
  "html-webpack-plugin": "^5.5.0",
86
86
  "json-loader": "^0.5.7",
@@ -89,25 +89,25 @@ var dependencies = {
89
89
  "node-notifier": "^10.0.1",
90
90
  portfinder: "^1.0.28",
91
91
  postcss: "^8.4.12",
92
- "postcss-custom-properties": "^12.1.5",
92
+ "postcss-custom-properties": "^12.1.7",
93
93
  "postcss-loader": "^6.2.1",
94
- prettier: "^2.6.1",
95
- "react-refresh": "^0.11.0",
94
+ prettier: "^2.6.2",
95
+ "react-refresh": "^0.12.0",
96
96
  "resolve-url-loader": "^5.0.0",
97
- sass: "^1.49.10",
97
+ sass: "^1.50.0",
98
98
  "sass-loader": "^12.6.0",
99
99
  "source-map-loader": "^3.0.1",
100
100
  "strip-indent": "^4.0.0",
101
101
  "style-loader": "^3.3.1",
102
102
  "tsconfig-paths-webpack-plugin": "^3.5.2",
103
- tsup: "^5.12.1",
103
+ tsup: "^5.12.5",
104
104
  typescript: "^4.6.3",
105
105
  "url-loader": "^4.1.1",
106
- webpack: "^5.70.0",
106
+ webpack: "^5.72.0",
107
107
  "webpack-cli": "^4.9.2",
108
108
  "webpack-config-utils": "^2.3.1",
109
- "webpack-dev-server": "^4.7.4",
110
- "yaml-loader": "^0.6.0"
109
+ "webpack-dev-server": "^4.8.1",
110
+ "yaml-loader": "^0.7.0"
111
111
  };
112
112
  var package_default = {
113
113
  name,
@@ -9,7 +9,7 @@ import {
9
9
  logTitle,
10
10
  moduleFileExtensions,
11
11
  resolveApp
12
- } from "./chunk-OXDXJ5B5.js";
12
+ } from "./chunk-IBQ4UW3S.js";
13
13
 
14
14
  // src/webpack.config.ts
15
15
  import { createRequire } from "module";
@@ -42,7 +42,10 @@ var InterpolateHtmlPlugin = class {
42
42
  compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
43
43
  const hooks = HtmlWebpackPlugin.getHooks(compilation);
44
44
  hooks.alterAssetTagGroups.tap(PLUGIN_NAME, (assets) => {
45
- this.replacements["ENTRY"] = assets.headTags[0].attributes["src"];
45
+ var _a;
46
+ const publicUrl = (_a = this.replacements["PUBLIC_URL"]) != null ? _a : "";
47
+ const entry = assets.headTags[0].attributes["src"];
48
+ this.replacements["ENTRY"] = `${publicUrl}${entry}`;
46
49
  return assets;
47
50
  });
48
51
  hooks.afterTemplateExecution.tap(PLUGIN_NAME, (data) => {
@@ -237,7 +240,10 @@ var getWebpackConfig = async (env) => {
237
240
  test: /\.ya?ml$/,
238
241
  use: [
239
242
  { loader: require2.resolve("json-loader") },
240
- { loader: require2.resolve("yaml-loader") }
243
+ {
244
+ loader: require2.resolve("yaml-loader"),
245
+ options: { asJSON: true }
246
+ }
241
247
  ]
242
248
  },
243
249
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raisenow/tamaro-cli",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "author": {
5
5
  "name": "RaiseNow",
6
6
  "email": "development@raisenow.com"
@@ -21,15 +21,15 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/cli": "^7.17.6",
24
- "@babel/core": "^7.17.8",
25
- "@babel/plugin-proposal-decorators": "^7.17.8",
24
+ "@babel/core": "^7.17.9",
25
+ "@babel/plugin-proposal-decorators": "^7.17.9",
26
26
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
27
27
  "@babel/plugin-transform-runtime": "^7.17.0",
28
28
  "@babel/preset-env": "^7.16.11",
29
29
  "@babel/preset-react": "^7.16.7",
30
30
  "@babel/preset-typescript": "^7.16.7",
31
- "@babel/runtime-corejs3": "^7.17.8",
32
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4",
31
+ "@babel/runtime-corejs3": "^7.17.9",
32
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
33
33
  "@statoscope/webpack-plugin": "^5.20.1",
34
34
  "@types/columnify": "^1.5.1",
35
35
  "@types/lodash": "^4.14.181",
@@ -37,8 +37,8 @@
37
37
  "@types/node-notifier": "^8.0.2",
38
38
  "@types/resolve-bin": "^0.4.1",
39
39
  "@types/webpack-config-utils": "^2.3.1",
40
- "@typescript-eslint/eslint-plugin": "^5.17.0",
41
- "@typescript-eslint/parser": "^5.17.0",
40
+ "@typescript-eslint/eslint-plugin": "^5.19.0",
41
+ "@typescript-eslint/parser": "^5.19.0",
42
42
  "autoprefixer": "^10.4.4",
43
43
  "babel-loader": "^8.2.4",
44
44
  "babel-plugin-lodash": "^3.3.4",
@@ -53,15 +53,15 @@
53
53
  "dotenv": "^16.0.0",
54
54
  "dotenv-expand": "^8.0.3",
55
55
  "escape-string-regexp": "^5.0.0",
56
- "eslint": "^8.12.0",
56
+ "eslint": "^8.13.0",
57
57
  "eslint-config-prettier": "^8.5.0",
58
58
  "eslint-plugin-node": "^11.1.0",
59
59
  "eslint-plugin-promise": "^6.0.0",
60
60
  "eslint-webpack-plugin": "^3.1.1",
61
61
  "execa": "^6.1.0",
62
62
  "file-loader": "^6.2.0",
63
- "fork-ts-checker-webpack-plugin": "^7.2.1",
64
- "glob": "^7.2.0",
63
+ "fork-ts-checker-webpack-plugin": "^7.2.4",
64
+ "glob": "^8.0.1",
65
65
  "html-loader": "^3.1.0",
66
66
  "html-webpack-plugin": "^5.5.0",
67
67
  "json-loader": "^0.5.7",
@@ -70,24 +70,24 @@
70
70
  "node-notifier": "^10.0.1",
71
71
  "portfinder": "^1.0.28",
72
72
  "postcss": "^8.4.12",
73
- "postcss-custom-properties": "^12.1.5",
73
+ "postcss-custom-properties": "^12.1.7",
74
74
  "postcss-loader": "^6.2.1",
75
- "prettier": "^2.6.1",
76
- "react-refresh": "^0.11.0",
75
+ "prettier": "^2.6.2",
76
+ "react-refresh": "^0.12.0",
77
77
  "resolve-url-loader": "^5.0.0",
78
- "sass": "^1.49.10",
78
+ "sass": "^1.50.0",
79
79
  "sass-loader": "^12.6.0",
80
80
  "source-map-loader": "^3.0.1",
81
81
  "strip-indent": "^4.0.0",
82
82
  "style-loader": "^3.3.1",
83
83
  "tsconfig-paths-webpack-plugin": "^3.5.2",
84
- "tsup": "^5.12.1",
84
+ "tsup": "^5.12.5",
85
85
  "typescript": "^4.6.3",
86
86
  "url-loader": "^4.1.1",
87
- "webpack": "^5.70.0",
87
+ "webpack": "^5.72.0",
88
88
  "webpack-cli": "^4.9.2",
89
89
  "webpack-config-utils": "^2.3.1",
90
- "webpack-dev-server": "^4.7.4",
91
- "yaml-loader": "^0.6.0"
90
+ "webpack-dev-server": "^4.8.1",
91
+ "yaml-loader": "^0.7.0"
92
92
  }
93
93
  }
@@ -24,7 +24,9 @@ export class InterpolateHtmlPlugin {
24
24
  const hooks = HtmlWebpackPlugin.getHooks(compilation)
25
25
 
26
26
  hooks.alterAssetTagGroups.tap(PLUGIN_NAME, (assets) => {
27
- this.replacements['ENTRY'] = assets.headTags[0].attributes['src']
27
+ const publicUrl = this.replacements['PUBLIC_URL'] ?? ''
28
+ const entry = assets.headTags[0].attributes['src']
29
+ this.replacements['ENTRY'] = `${publicUrl}${entry}`
28
30
 
29
31
  return assets
30
32
  })
package/src/lib/env.ts CHANGED
@@ -39,6 +39,7 @@ export const getEnvVars = (
39
39
  )
40
40
  process.env.WEBPACK_UNIQUE_NAME ??= ifCore('RnwTamaroCore', 'RnwTamaro')
41
41
  process.env.BUILD_DATE = new Date().toISOString()
42
+ process.env.PUBLIC_URL ??= ''
42
43
 
43
44
  // HMR doesn't work in ie11, it breaks everything.
44
45
  // If you want to run dev-server and test in ie11, set HMR_ENABLED to 'false'
@@ -76,6 +77,7 @@ export const getEnvVars = (
76
77
  'ELEMENT_ATTRIBUTE_DATA_WIDGET',
77
78
  'WEBPACK_UNIQUE_NAME',
78
79
  'BUILD_DATE',
80
+ 'PUBLIC_URL',
79
81
 
80
82
  // core
81
83
  'PRODUCT_NAME',
@@ -248,7 +248,10 @@ const getWebpackConfig = async (env: any): Promise<Configuration> => {
248
248
  test: /\.ya?ml$/,
249
249
  use: [
250
250
  {loader: require.resolve('json-loader')},
251
- {loader: require.resolve('yaml-loader')},
251
+ {
252
+ loader: require.resolve('yaml-loader'),
253
+ options: {asJSON: true},
254
+ },
252
255
  ],
253
256
  },
254
257