jcinfo-utils 1.0.52 → 1.0.54
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/.env +1 -1
- package/package.json +1 -1
- package/src/updateDotEnv.js +3 -2
- package/test/testar.js +2 -2
package/.env
CHANGED
package/package.json
CHANGED
package/src/updateDotEnv.js
CHANGED
|
@@ -65,6 +65,7 @@ export function _updateDotEnv(fs, incrementBuild = false, filename = '.env') {
|
|
|
65
65
|
const envProd = '.env'
|
|
66
66
|
const envLocal = '.env.local'
|
|
67
67
|
const envKey = 'VITE_VERSION'
|
|
68
|
+
const envKeyVDATE = 'VITE_VDATE'
|
|
68
69
|
|
|
69
70
|
export function updateDotEnvKey(
|
|
70
71
|
fs,
|
|
@@ -98,7 +99,7 @@ export function updateDotEnvKey(
|
|
|
98
99
|
if (vkey == key) {
|
|
99
100
|
let version = generateValue(vvalue)
|
|
100
101
|
line = `${key}=${version}`
|
|
101
|
-
console.log('>
|
|
102
|
+
console.log('> update version:', key, '=', version, '=>', filename)
|
|
102
103
|
console.log()
|
|
103
104
|
}
|
|
104
105
|
return line
|
|
@@ -112,5 +113,5 @@ export function updateDotEnvKey(
|
|
|
112
113
|
|
|
113
114
|
export function updateDotEnv(fs, autoInc = false, command = 'build') {
|
|
114
115
|
command == 'build' && updateDotEnvKey(fs, autoInc, envKey, envProd, false)
|
|
115
|
-
command == 'serve' && updateDotEnvKey(fs, false,
|
|
116
|
+
command == 'serve' && updateDotEnvKey(fs, false, envKeyVDATE, envLocal, true)
|
|
116
117
|
}
|
package/test/testar.js
CHANGED
|
@@ -126,5 +126,5 @@ console.log(`Cpf : ${cpf}`, validarCPF(cpf))
|
|
|
126
126
|
console.log(`Cnpj: ${cnpj}`, validarCNPJ(cnpj))
|
|
127
127
|
console.log()
|
|
128
128
|
|
|
129
|
-
update.updateDotEnv(fs, true, 'build')
|
|
130
|
-
update.updateDotEnv(fs,
|
|
129
|
+
//update.updateDotEnv(fs, true, 'build')
|
|
130
|
+
update.updateDotEnv(fs, false, 'serve')
|