mentie 0.2.24 → 0.2.26
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/modules/environment.js +6 -0
- package/modules/logging.js +2 -2
- package/package.json +1 -1
package/modules/environment.js
CHANGED
|
@@ -108,6 +108,12 @@ export const is_node = env.is_node()
|
|
|
108
108
|
*/
|
|
109
109
|
export const is_emulator = env.is_emulator()
|
|
110
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Checks if the code is running in a development environment.
|
|
113
|
+
* @returns {boolean} Returns true if the code is running in a development environment, otherwise returns false.
|
|
114
|
+
*/
|
|
115
|
+
export const is_github_actions = process.env.GITHUB_ACTIONS == true
|
|
116
|
+
|
|
111
117
|
// ///////////////////////////////
|
|
112
118
|
// Mode and loglevel detection
|
|
113
119
|
// ///////////////////////////////
|
package/modules/logging.js
CHANGED
|
@@ -155,7 +155,7 @@ log.warn = function( ...messages ) {
|
|
|
155
155
|
annotate_messages( messages )
|
|
156
156
|
|
|
157
157
|
// Log the messages
|
|
158
|
-
console.warn( ...messages )
|
|
158
|
+
console.warn( '⚠️ ', ...messages )
|
|
159
159
|
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -176,7 +176,7 @@ log.error = function( ...messages ) {
|
|
|
176
176
|
if( !dev || !should_log ) return
|
|
177
177
|
|
|
178
178
|
// Log the messages if the loglevel matches
|
|
179
|
-
console.error( ...messages )
|
|
179
|
+
console.error( '🚨 ', ...messages )
|
|
180
180
|
console.trace()
|
|
181
181
|
|
|
182
182
|
}
|