@raisenow/tamaro-cli 1.1.7 → 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-NJVU7WR2.js → chunk-KVWFHWZD.js} +4 -5
- package/dist/cli.js +9 -10
- package/dist/webpack.config.js +17 -11
- package/package.json +8 -9
- package/src/lib/env.ts +4 -5
- package/src/webpack.config.ts +24 -16
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v22.11.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/tsup@8.3.5_jiti@1.21.0_postcss@8.4.
|
|
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);
|
|
@@ -151,14 +151,13 @@ var getIfCoreFns = () => {
|
|
|
151
151
|
import { createRequire as createRequire2 } from "module";
|
|
152
152
|
import { basename as basename2 } from "path";
|
|
153
153
|
import { config as dotenvConfig } from "dotenv";
|
|
154
|
-
import { expand as dotenvExpand } from "dotenv-expand";
|
|
155
154
|
import { globSync } from "glob";
|
|
156
155
|
import stripIndent3 from "strip-indent";
|
|
157
156
|
var require3 = createRequire2(import.meta.url);
|
|
158
157
|
var getEnvVars = (files, ifMin, ifCore, ifLocalCore, ifHttps) => {
|
|
159
158
|
const filePath = files.find((file) => basename2(file) === ".env");
|
|
160
159
|
if (filePath) {
|
|
161
|
-
|
|
160
|
+
dotenvConfig({ path: filePath });
|
|
162
161
|
}
|
|
163
162
|
process.env.NODE_ENV ??= ifMin("production", "development");
|
|
164
163
|
process.env.BABEL_ENV ??= ifMin("production", "development");
|
|
@@ -185,7 +184,7 @@ var getEnvVars = (files, ifMin, ifCore, ifLocalCore, ifHttps) => {
|
|
|
185
184
|
} else {
|
|
186
185
|
let version = process.env.CORE_VERSION;
|
|
187
186
|
version = version ? `@${version}` : "";
|
|
188
|
-
process.env.CORE_URL ??= `https://
|
|
187
|
+
process.env.CORE_URL ??= `https://cdn.jsdelivr.net/npm/@raisenow/tamaro-core${version}/dist/index.js`;
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
190
|
const varNames = [
|
|
@@ -263,7 +262,7 @@ var applyEnv = (env) => {
|
|
|
263
262
|
const files = globSync(paths.appEnv);
|
|
264
263
|
const filePath = files.find((file) => basename2(file) === `.env.${env}`);
|
|
265
264
|
if (filePath) {
|
|
266
|
-
|
|
265
|
+
dotenvConfig({ path: filePath });
|
|
267
266
|
}
|
|
268
267
|
};
|
|
269
268
|
|
package/dist/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
resolveBin,
|
|
23
23
|
resolveOwn,
|
|
24
24
|
runCommandSync
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KVWFHWZD.js";
|
|
26
26
|
|
|
27
27
|
// src/cli.ts
|
|
28
28
|
import { createCommand } from "commander";
|
|
@@ -577,14 +577,14 @@ var prepareFlags4 = async (options) => {
|
|
|
577
577
|
// package.json
|
|
578
578
|
var package_default = {
|
|
579
579
|
name: "@raisenow/tamaro-cli",
|
|
580
|
-
version: "1.1.
|
|
580
|
+
version: "1.1.8",
|
|
581
581
|
author: {
|
|
582
582
|
name: "RaiseNow",
|
|
583
583
|
email: "development@raisenow.com"
|
|
584
584
|
},
|
|
585
585
|
type: "module",
|
|
586
586
|
bin: "dist/cli.js",
|
|
587
|
-
packageManager: "pnpm@9.
|
|
587
|
+
packageManager: "pnpm@9.14.2",
|
|
588
588
|
engines: {
|
|
589
589
|
node: ">=20",
|
|
590
590
|
pnpm: ">= 9.12",
|
|
@@ -612,10 +612,10 @@ var package_default = {
|
|
|
612
612
|
"@babel/preset-typescript": "^7.26.0",
|
|
613
613
|
"@babel/runtime-corejs3": "^7.26.0",
|
|
614
614
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
|
615
|
-
"@statoscope/webpack-plugin": "^5.28.
|
|
615
|
+
"@statoscope/webpack-plugin": "^5.28.3",
|
|
616
616
|
"@types/columnify": "^1.5.4",
|
|
617
617
|
"@types/lodash": "^4.17.13",
|
|
618
|
-
"@types/node": "^
|
|
618
|
+
"@types/node": "^22.9.3",
|
|
619
619
|
"@types/node-notifier": "^8.0.5",
|
|
620
620
|
"@types/prompts": "^2.4.9",
|
|
621
621
|
"@types/resolve-bin": "^0.4.3",
|
|
@@ -635,7 +635,6 @@ var package_default = {
|
|
|
635
635
|
"css-loader": "^7.1.2",
|
|
636
636
|
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
637
637
|
dotenv: "^16.4.5",
|
|
638
|
-
"dotenv-expand": "^11.0.6",
|
|
639
638
|
"escape-string-regexp": "^5.0.0",
|
|
640
639
|
eslint: "^8.57.1",
|
|
641
640
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -658,21 +657,21 @@ var package_default = {
|
|
|
658
657
|
"mini-css-extract-plugin": "^2.9.2",
|
|
659
658
|
"node-notifier": "^10.0.1",
|
|
660
659
|
portfinder: "^1.0.32",
|
|
661
|
-
postcss: "^8.4.
|
|
660
|
+
postcss: "^8.4.49",
|
|
662
661
|
"postcss-custom-properties": "^14.0.4",
|
|
663
662
|
"postcss-loader": "^8.1.1",
|
|
664
663
|
prettier: "^3.3.3",
|
|
665
664
|
prompts: "^2.4.2",
|
|
666
665
|
"react-refresh": "^0.14.2",
|
|
667
666
|
"resolve-url-loader": "^5.0.0",
|
|
668
|
-
sass: "^1.
|
|
667
|
+
sass: "^1.81.0",
|
|
669
668
|
"sass-loader": "^16.0.3",
|
|
670
669
|
"source-map-loader": "^5.0.0",
|
|
671
670
|
"strip-indent": "^4.0.0",
|
|
672
671
|
"style-loader": "^4.0.0",
|
|
673
|
-
"tsconfig-paths-webpack-plugin": "^4.
|
|
672
|
+
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
674
673
|
tsup: "^8.3.5",
|
|
675
|
-
typescript: "^5.
|
|
674
|
+
typescript: "^5.7.2",
|
|
676
675
|
"url-loader": "^4.1.1",
|
|
677
676
|
webpack: "^5.96.1",
|
|
678
677
|
"webpack-cli": "^5.1.4",
|
package/dist/webpack.config.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
logTitle,
|
|
11
11
|
moduleFileExtensions,
|
|
12
12
|
resolveApp
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KVWFHWZD.js";
|
|
14
14
|
|
|
15
15
|
// src/webpack.config.ts
|
|
16
16
|
import { existsSync } from "fs";
|
|
@@ -81,17 +81,20 @@ var getWebpackConfig = (env) => {
|
|
|
81
81
|
logDataTable(getRelativePaths(paths));
|
|
82
82
|
logTitle("Environment variables:");
|
|
83
83
|
logDataTable(envVars.raw);
|
|
84
|
-
const getCssLoaders = (
|
|
84
|
+
const getCssLoaders = ({
|
|
85
|
+
styleLoader = true,
|
|
86
|
+
...cssOptions
|
|
87
|
+
}) => {
|
|
85
88
|
return removeEmpty([
|
|
86
|
-
ifMin({ loader: MiniCssExtractPlugin.loader }),
|
|
87
|
-
ifNotMin({
|
|
89
|
+
styleLoader ? ifMin({ loader: MiniCssExtractPlugin.loader }) : void 0,
|
|
90
|
+
styleLoader ? ifNotMin({
|
|
88
91
|
loader: require2.resolve("style-loader"),
|
|
89
92
|
options: {
|
|
90
93
|
attributes: {
|
|
91
94
|
"data-widget": process.env.ELEMENT_ATTRIBUTE_DATA_WIDGET
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
|
-
}),
|
|
97
|
+
}) : void 0,
|
|
95
98
|
{
|
|
96
99
|
loader: require2.resolve("css-loader"),
|
|
97
100
|
options: {
|
|
@@ -235,19 +238,22 @@ var getWebpackConfig = (env) => {
|
|
|
235
238
|
{
|
|
236
239
|
test: /\.(js|mjs)$/
|
|
237
240
|
},
|
|
238
|
-
// Styles (
|
|
241
|
+
// Styles (extracted)
|
|
239
242
|
{
|
|
240
243
|
test: /\.s?css$/,
|
|
241
|
-
|
|
244
|
+
resourceQuery: { not: [/inline/] },
|
|
242
245
|
use: getCssLoaders({
|
|
243
|
-
|
|
246
|
+
styleLoader: true
|
|
244
247
|
})
|
|
245
248
|
},
|
|
246
|
-
// Styles (
|
|
249
|
+
// Styles (as string)
|
|
247
250
|
{
|
|
248
|
-
test: /\.
|
|
251
|
+
test: /\.s?css$/,
|
|
252
|
+
resourceQuery: /inline/,
|
|
249
253
|
use: getCssLoaders({
|
|
250
|
-
|
|
254
|
+
styleLoader: false,
|
|
255
|
+
exportType: "string",
|
|
256
|
+
sourceMap: false
|
|
251
257
|
})
|
|
252
258
|
},
|
|
253
259
|
// Images and fonts
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raisenow/tamaro-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "RaiseNow",
|
|
6
6
|
"email": "development@raisenow.com"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
9
|
"bin": "dist/cli.js",
|
|
10
|
-
"packageManager": "pnpm@9.
|
|
10
|
+
"packageManager": "pnpm@9.14.2",
|
|
11
11
|
"engines": {
|
|
12
12
|
"node": ">=20",
|
|
13
13
|
"pnpm": ">= 9.12",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"@babel/preset-typescript": "^7.26.0",
|
|
36
36
|
"@babel/runtime-corejs3": "^7.26.0",
|
|
37
37
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
|
38
|
-
"@statoscope/webpack-plugin": "^5.28.
|
|
38
|
+
"@statoscope/webpack-plugin": "^5.28.3",
|
|
39
39
|
"@types/columnify": "^1.5.4",
|
|
40
40
|
"@types/lodash": "^4.17.13",
|
|
41
|
-
"@types/node": "^
|
|
41
|
+
"@types/node": "^22.9.3",
|
|
42
42
|
"@types/node-notifier": "^8.0.5",
|
|
43
43
|
"@types/prompts": "^2.4.9",
|
|
44
44
|
"@types/resolve-bin": "^0.4.3",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"css-loader": "^7.1.2",
|
|
59
59
|
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
60
60
|
"dotenv": "^16.4.5",
|
|
61
|
-
"dotenv-expand": "^11.0.6",
|
|
62
61
|
"escape-string-regexp": "^5.0.0",
|
|
63
62
|
"eslint": "^8.57.1",
|
|
64
63
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -81,21 +80,21 @@
|
|
|
81
80
|
"mini-css-extract-plugin": "^2.9.2",
|
|
82
81
|
"node-notifier": "^10.0.1",
|
|
83
82
|
"portfinder": "^1.0.32",
|
|
84
|
-
"postcss": "^8.4.
|
|
83
|
+
"postcss": "^8.4.49",
|
|
85
84
|
"postcss-custom-properties": "^14.0.4",
|
|
86
85
|
"postcss-loader": "^8.1.1",
|
|
87
86
|
"prettier": "^3.3.3",
|
|
88
87
|
"prompts": "^2.4.2",
|
|
89
88
|
"react-refresh": "^0.14.2",
|
|
90
89
|
"resolve-url-loader": "^5.0.0",
|
|
91
|
-
"sass": "^1.
|
|
90
|
+
"sass": "^1.81.0",
|
|
92
91
|
"sass-loader": "^16.0.3",
|
|
93
92
|
"source-map-loader": "^5.0.0",
|
|
94
93
|
"strip-indent": "^4.0.0",
|
|
95
94
|
"style-loader": "^4.0.0",
|
|
96
|
-
"tsconfig-paths-webpack-plugin": "^4.
|
|
95
|
+
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
97
96
|
"tsup": "^8.3.5",
|
|
98
|
-
"typescript": "^5.
|
|
97
|
+
"typescript": "^5.7.2",
|
|
99
98
|
"url-loader": "^4.1.1",
|
|
100
99
|
"webpack": "^5.96.1",
|
|
101
100
|
"webpack-cli": "^5.1.4",
|
package/src/lib/env.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {createRequire} from 'module'
|
|
2
2
|
import {basename} from 'path'
|
|
3
3
|
import {config as dotenvConfig} from 'dotenv'
|
|
4
|
-
import {expand as dotenvExpand} from 'dotenv-expand'
|
|
5
4
|
import {globSync} from 'glob'
|
|
6
5
|
import stripIndent from 'strip-indent'
|
|
7
6
|
import type {IfUtilsFn} from 'webpack-config-utils'
|
|
@@ -28,7 +27,7 @@ export const getEnvVars = (
|
|
|
28
27
|
const filePath = files.find((file) => basename(file) === '.env')
|
|
29
28
|
|
|
30
29
|
if (filePath) {
|
|
31
|
-
|
|
30
|
+
dotenvConfig({path: filePath})
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
process.env.NODE_ENV ??= ifMin('production', 'development')
|
|
@@ -63,8 +62,8 @@ export const getEnvVars = (
|
|
|
63
62
|
let version = process.env.CORE_VERSION
|
|
64
63
|
version = version ? `@${version}` : ''
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
process.env.CORE_URL ??= `https://fastly.jsdelivr.net/npm/@raisenow/tamaro-core${version}/dist/index.js`
|
|
65
|
+
process.env.CORE_URL ??= `https://cdn.jsdelivr.net/npm/@raisenow/tamaro-core${version}/dist/index.js`
|
|
66
|
+
// process.env.CORE_URL ??= `https://fastly.jsdelivr.net/npm/@raisenow/tamaro-core${version}/dist/index.js`
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
|
|
@@ -171,6 +170,6 @@ export const applyEnv = (env?: string) => {
|
|
|
171
170
|
const filePath = files.find((file) => basename(file) === `.env.${env}`)
|
|
172
171
|
|
|
173
172
|
if (filePath) {
|
|
174
|
-
|
|
173
|
+
dotenvConfig({path: filePath})
|
|
175
174
|
}
|
|
176
175
|
}
|
package/src/webpack.config.ts
CHANGED
|
@@ -60,17 +60,22 @@ const getWebpackConfig = (env: any): Configuration => {
|
|
|
60
60
|
logTitle('Environment variables:')
|
|
61
61
|
logDataTable(envVars.raw)
|
|
62
62
|
|
|
63
|
-
const getCssLoaders = (
|
|
63
|
+
const getCssLoaders = ({
|
|
64
|
+
styleLoader = true,
|
|
65
|
+
...cssOptions
|
|
66
|
+
}: {styleLoader?: boolean} & Record<string, any>): RuleSetUseItem[] => {
|
|
64
67
|
return removeEmpty([
|
|
65
|
-
ifMin({loader: MiniCssExtractPlugin.loader}),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
styleLoader ? ifMin({loader: MiniCssExtractPlugin.loader}) : undefined,
|
|
69
|
+
styleLoader
|
|
70
|
+
? ifNotMin({
|
|
71
|
+
loader: require.resolve('style-loader'),
|
|
72
|
+
options: {
|
|
73
|
+
attributes: {
|
|
74
|
+
'data-widget': process.env.ELEMENT_ATTRIBUTE_DATA_WIDGET,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
})
|
|
78
|
+
: undefined,
|
|
74
79
|
{
|
|
75
80
|
loader: require.resolve('css-loader'),
|
|
76
81
|
options: {
|
|
@@ -221,20 +226,23 @@ const getWebpackConfig = (env: any): Configuration => {
|
|
|
221
226
|
test: /\.(js|mjs)$/,
|
|
222
227
|
},
|
|
223
228
|
|
|
224
|
-
// Styles (
|
|
229
|
+
// Styles (extracted)
|
|
225
230
|
{
|
|
226
231
|
test: /\.s?css$/,
|
|
227
|
-
|
|
232
|
+
resourceQuery: {not: [/inline/]},
|
|
228
233
|
use: getCssLoaders({
|
|
229
|
-
|
|
234
|
+
styleLoader: true,
|
|
230
235
|
}),
|
|
231
236
|
},
|
|
232
237
|
|
|
233
|
-
// Styles (
|
|
238
|
+
// Styles (as string)
|
|
234
239
|
{
|
|
235
|
-
test: /\.
|
|
240
|
+
test: /\.s?css$/,
|
|
241
|
+
resourceQuery: /inline/,
|
|
236
242
|
use: getCssLoaders({
|
|
237
|
-
|
|
243
|
+
styleLoader: false,
|
|
244
|
+
exportType: 'string',
|
|
245
|
+
sourceMap: false,
|
|
238
246
|
}),
|
|
239
247
|
},
|
|
240
248
|
|