@asteby/metacore-runtime-react 53.18.0 → 53.19.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @asteby/metacore-runtime-react
2
2
 
3
+ ## 53.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 305fcf1: AddonConfigSurface: la clave que muestra «Rotar» (credencial `auto`) ahora se presenta como valor copiable con botón Copiar y un aviso de «se muestra una sola vez», en lugar de texto plano.
8
+
3
9
  ## 53.18.0
4
10
 
5
11
  ### Minor Changes
@@ -24,7 +24,7 @@ import { useApi } from '../api-context';
24
24
  import { evaluateVisibleWhen, getVisibleWhen } from '../dynamic-form-schema';
25
25
  import { useSetupT } from './messages';
26
26
  import { StepStatusBadge } from './step-status-badge';
27
- import { ConnectorBlocks, HelpText } from './connector-blocks';
27
+ import { ConnectorBlocks, CopyValue, HelpText } from './connector-blocks';
28
28
  import { buildWizardSteps, errorMessage, hasExplicitTest, normalizeBlockResult, stepStatus, } from './connector-blocks-model';
29
29
  import { isSecretCredential, missingRequired, applicableFields, visibleSections, parseSaveError, shapeMismatch, textOrFallback, } from './connector-form-model';
30
30
  // Empty write_only value (typed then erased) must not overwrite the stored secret.
@@ -862,7 +862,7 @@ export function AddonConfigSurface({ addon, connector, open, onOpenChange, onSav
862
862
  ? st('auto.needs_action')
863
863
  : state === 'manual'
864
864
  ? st('auto.manual')
865
- : st('auto.connected') }), _jsx(HelpText, { text: st('auto.help') })] }), _jsxs(Button, { type: 'button', variant: 'outline', size: 'sm', disabled: rotating === f.key || !canManageIssuer, onClick: () => void rotateAuto(f.key), children: [rotating === f.key ? (_jsx(Loader2, { className: 'h-4 w-4 animate-spin' })) : (_jsx(RefreshCw, { className: 'h-4 w-4' })), state === 'missing' ? st('auto.generate') : st('auto.rotate')] })] }), once && (_jsxs("div", { className: 'flex flex-col gap-1', children: [_jsx("code", { className: 'break-all rounded bg-muted px-2 py-1 text-xs', children: once }), _jsx(HelpText, { text: st('auto.show_once') })] }))] }, f.key));
865
+ : st('auto.connected') }), _jsx(HelpText, { text: st('auto.help') })] }), _jsxs(Button, { type: 'button', variant: 'outline', size: 'sm', disabled: rotating === f.key || !canManageIssuer, onClick: () => void rotateAuto(f.key), children: [rotating === f.key ? (_jsx(Loader2, { className: 'h-4 w-4 animate-spin' })) : (_jsx(RefreshCw, { className: 'h-4 w-4' })), state === 'missing' ? st('auto.generate') : st('auto.rotate')] })] }), once && (_jsxs("div", { className: 'flex flex-col gap-2 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-3', "data-testid": 'auto-once', children: [_jsx(CopyValue, { value: once, label: st('auto.once_label') }), _jsx(HelpText, { text: st('auto.show_once') })] }))] }, f.key));
866
866
  };
867
867
  const dirty = credDirty || touched.size > 0 || cleared.size > 0;
868
868
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/setup/messages.ts"],"names":[],"mappings":"AAMA,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAElC,eAAO,MAAM,iBAAiB,EAAE,IAmK/B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,IAgK/B,CAAA;AAED,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAA;AAOzE,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAGjE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,GAAG,CAa/B"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/setup/messages.ts"],"names":[],"mappings":"AAMA,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAElC,eAAO,MAAM,iBAAiB,EAAE,IAoK/B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,IAiK/B,CAAA;AAED,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAA;AAOzE,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAGjE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,GAAG,CAa/B"}
@@ -111,6 +111,7 @@ export const SETUP_MESSAGES_ES = {
111
111
  'auto.needs_action': 'Requiere acción',
112
112
  'auto.help': 'La clave la genera y guarda el sistema, cifrada. No hay nada que inventar ni pegar.',
113
113
  'auto.rotate': 'Rotar',
114
+ 'auto.once_label': 'Clave nueva',
114
115
  'auto.generate': 'Generar',
115
116
  'auto.show_once': 'Cópiala ahora: no se vuelve a mostrar. La anterior ya no funciona.',
116
117
  'auto.rotate_failed': 'No se pudo rotar la clave',
@@ -277,6 +278,7 @@ export const SETUP_MESSAGES_EN = {
277
278
  'auto.needs_action': 'Action required',
278
279
  'auto.help': 'The system generates and stores the key, encrypted. Nothing to invent or paste.',
279
280
  'auto.rotate': 'Rotate',
281
+ 'auto.once_label': 'New key',
280
282
  'auto.generate': 'Generate',
281
283
  'auto.show_once': 'Copy it now: it is not shown again. The previous one no longer works.',
282
284
  'auto.rotate_failed': 'Could not rotate the key',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteby/metacore-runtime-react",
3
- "version": "53.18.0",
3
+ "version": "53.19.0",
4
4
  "description": "React runtime for metacore hosts — renders addon contributions dynamically",
5
5
  "repository": {
6
6
  "type": "git",
@@ -344,6 +344,7 @@ describe('host-generated (auto) credentials', () => {
344
344
  expect(screen.queryByLabelText(/Token/)).toBeNull()
345
345
  fireEvent.click(screen.getByText('Rotar'))
346
346
  await waitFor(() => expect(screen.getByText('mcs_NEWSECRET')).toBeTruthy())
347
+ expect(screen.getByTestId('auto-once').querySelector('button')).toBeTruthy()
347
348
  expect(calls.some((c) => c.m === 'POST' && c.url === '/integrations/local_reviews/auto/api_key/rotate')).toBe(true)
348
349
  })
349
350
 
@@ -41,7 +41,7 @@ import { evaluateVisibleWhen, getVisibleWhen } from '../dynamic-form-schema'
41
41
  import type { VisibleWhen } from '../types'
42
42
  import { useSetupT } from './messages'
43
43
  import { StepStatusBadge } from './step-status-badge'
44
- import { ConnectorBlocks, HelpText } from './connector-blocks'
44
+ import { ConnectorBlocks, CopyValue, HelpText } from './connector-blocks'
45
45
  import {
46
46
  buildWizardSteps,
47
47
  errorMessage,
@@ -1464,8 +1464,8 @@ export function AddonConfigSurface({
1464
1464
  </Button>
1465
1465
  </div>
1466
1466
  {once && (
1467
- <div className='flex flex-col gap-1'>
1468
- <code className='break-all rounded bg-muted px-2 py-1 text-xs'>{once}</code>
1467
+ <div className='flex flex-col gap-2 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-3' data-testid='auto-once'>
1468
+ <CopyValue value={once} label={st('auto.once_label')} />
1469
1469
  <HelpText text={st('auto.show_once')} />
1470
1470
  </div>
1471
1471
  )}
@@ -114,6 +114,7 @@ export const SETUP_MESSAGES_ES: Dict = {
114
114
  'auto.needs_action': 'Requiere acción',
115
115
  'auto.help': 'La clave la genera y guarda el sistema, cifrada. No hay nada que inventar ni pegar.',
116
116
  'auto.rotate': 'Rotar',
117
+ 'auto.once_label': 'Clave nueva',
117
118
  'auto.generate': 'Generar',
118
119
  'auto.show_once': 'Cópiala ahora: no se vuelve a mostrar. La anterior ya no funciona.',
119
120
  'auto.rotate_failed': 'No se pudo rotar la clave',
@@ -283,6 +284,7 @@ export const SETUP_MESSAGES_EN: Dict = {
283
284
  'auto.needs_action': 'Action required',
284
285
  'auto.help': 'The system generates and stores the key, encrypted. Nothing to invent or paste.',
285
286
  'auto.rotate': 'Rotate',
287
+ 'auto.once_label': 'New key',
286
288
  'auto.generate': 'Generate',
287
289
  'auto.show_once': 'Copy it now: it is not shown again. The previous one no longer works.',
288
290
  'auto.rotate_failed': 'Could not rotate the key',