@tolgee/cli
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -52,3 +52,3 @@ "use strict"; | ||
for (const namespace of namespaces) { | ||
if (local[namespace].size) { | ||
if (namespace in local && local[namespace].size) { | ||
for (const [keyName, defaultValue] of local[namespace].entries()) { | ||
@@ -55,0 +55,0 @@ result.added.push({ |
@@ -603,3 +603,5 @@ "use strict"; | ||
defaultValue: ctx.key.defaultValue || evt.data.defaultValue || undefined, | ||
namespace: evt.data.namespace ?? ctx.key.namespace, | ||
namespace: evt.data.namespace === '' | ||
? undefined | ||
: evt.data.namespace ?? ctx.key.namespace, | ||
line: ctx.line, | ||
@@ -606,0 +608,0 @@ }), |
@@ -108,2 +108,10 @@ "use strict"; | ||
on: { | ||
'punctuation.definition.string.end.ts': { | ||
target: 'idle', | ||
actions: ['storeEmptyPropertyValue', 'clearPropertyType'], | ||
}, | ||
'punctuation.definition.string.template.end.ts': { | ||
target: 'idle', | ||
actions: ['storeEmptyPropertyValue', 'clearPropertyType'], | ||
}, | ||
'*': [ | ||
@@ -202,2 +210,9 @@ { | ||
}), | ||
storeEmptyPropertyValue: (0, xstate_1.assign)({ | ||
keyName: (ctx) => ctx.property === 'key' || ctx.property === 'keyName' | ||
? '' | ||
: ctx.keyName, | ||
defaultValue: (ctx) => ctx.property === 'defaultValue' ? '' : ctx.defaultValue, | ||
namespace: (ctx) => (ctx.property === 'ns' ? '' : ctx.namespace), | ||
}), | ||
markPropertyAsDynamic: (0, xstate_1.assign)({ | ||
@@ -204,0 +219,0 @@ keyName: (ctx, _evt) => ctx.property === 'key' || ctx.property === 'keyName' |
{ | ||
"name": "@tolgee/cli", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "description": "A tool to interact with the Tolgee Platform through CLI", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
902769
3088