plug-code 1.1.1 → 1.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plug-code",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "",
5
5
  "main": "src/plug-code.tsx",
6
6
  "types": "types/plug-code.d.ts",
@@ -37,7 +37,7 @@ export class PlcAPI<S extends ObjectType> {
37
37
 
38
38
  createFeature(name: string, setupFn: (api: PlcAPI<S>) => void): PlcAPI<S> {
39
39
  if (this.installedFeatures.has(name)) {
40
- console.warn(`[PlcFramework] La feature '${name}' ya fue registrada. Se omitirá para evitar conflictos.`);
40
+ console.warn(`[PlcFramework] Feature '${name}' is already registered. It will be skipped to avoid conflicts.`);
41
41
  return this;
42
42
  }
43
43
 
@@ -45,7 +45,7 @@ export class PlcAPI<S extends ObjectType> {
45
45
  setupFn(this);
46
46
  this.installedFeatures.add(name);
47
47
  } catch (error) {
48
- console.error(`[PlcFramework] 💥 Error crítico inicializando la feature '${name}':`, error);
48
+ console.error(`[PlcFramework] 💥 Critical error initializing feature '${name}':`, error);
49
49
  }
50
50
 
51
51
  return this;
@@ -187,7 +187,7 @@ export class PlcAPI<S extends ObjectType> {
187
187
  try {
188
188
  currentData = transformer.fn(currentData, context);
189
189
  } catch (error) {
190
- console.error(`[PlcAPI] Error en transform '${channel as string}/${transformer.id}':`, error);
190
+ console.error(`[PlcAPI] Error in transform '${channel as string}/${transformer.id}':`, error);
191
191
  }
192
192
  }
193
193
 
@@ -199,7 +199,7 @@ export class PlcAPI<S extends ObjectType> {
199
199
  fn: CommandFn<CommandPayload<K>, CommandResult<K>>
200
200
  ) {
201
201
  if (this.commands.has(id as string)) {
202
- console.warn(`[PlcAPI] Sobrescribiendo comando '${id as string}'`);
202
+ console.warn(`[PlcAPI] Overwriting command '${id as string}'`);
203
203
  }
204
204
  this.commands.set(id as string, fn as any);
205
205
  }
@@ -210,7 +210,7 @@ export class PlcAPI<S extends ObjectType> {
210
210
  ) {
211
211
  const currentFn = this.commands.get(id as string);
212
212
  if (!currentFn) {
213
- console.error(`[PlcAPI] No se puede envolver '${id as string}', comando no existe.`);
213
+ console.error(`[PlcAPI] Cannot wrap '${id as string}', command does not exist.`);
214
214
  return;
215
215
  }
216
216
  this.commands.set(id as string, wrapper(currentFn) as any);
@@ -222,13 +222,13 @@ export class PlcAPI<S extends ObjectType> {
222
222
  ): Promise<CommandResult<K>> {
223
223
  const fn = this.commands.get(id as string);
224
224
  if (!fn) {
225
- throw new Error(`[PlcAPI] Comando '${id as string}' no encontrado.`);
225
+ throw new Error(`[PlcAPI] Command '${id as string}' not found.`);
226
226
  }
227
227
 
228
228
  try {
229
229
  return await fn(payload);
230
230
  } catch (error) {
231
- console.error(`[PlcAPI] Error ejecutando '${id as string}':`, error);
231
+ console.error(`[PlcAPI] Error executing '${id as string}':`, error);
232
232
  throw error;
233
233
  }
234
234
  }