nucleus-core-ts 0.10.147 → 0.10.151

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.
Files changed (204) hide show
  1. package/LICENSE +48 -48
  2. package/dist/.build-ok +1 -1
  3. package/dist/fe/components/AuthorizationPage/labels.js +13 -13
  4. package/dist/fe/components/Captcha/labels.js +17 -17
  5. package/dist/fe/components/ChatPanel/helpers.js +17 -17
  6. package/dist/fe/components/ChatPanel/labels.js +16 -16
  7. package/dist/fe/components/DataTable/labels.js +16 -16
  8. package/dist/fe/components/DevicesPage/components/DeviceCard.js +15 -15
  9. package/dist/fe/components/DevicesPage/components/DevicesPage.js +9 -9
  10. package/dist/fe/components/DevicesPage/labels.js +12 -12
  11. package/dist/fe/components/ForgotPasswordPage/labels.js +8 -8
  12. package/dist/fe/components/FormBuilder/components/FormField.js +5 -5
  13. package/dist/fe/components/FormBuilder/utils/fieldMapping.js +9 -9
  14. package/dist/fe/components/IntegrationsPage/components/ConnectionAuthFields.js +8 -8
  15. package/dist/fe/components/IntegrationsPage/components/ConnectionBasicFields.js +3 -3
  16. package/dist/fe/components/IntegrationsPage/components/ConnectionExport.js +23 -23
  17. package/dist/fe/components/IntegrationsPage/components/ConnectionForm.js +22 -22
  18. package/dist/fe/components/IntegrationsPage/components/ConnectionList.js +7 -7
  19. package/dist/fe/components/IntegrationsPage/components/ConnectionOauthFields.js +6 -6
  20. package/dist/fe/components/IntegrationsPage/components/ConnectionSettingsTab.js +24 -24
  21. package/dist/fe/components/IntegrationsPage/components/ConnectionSwitcher.js +19 -19
  22. package/dist/fe/components/IntegrationsPage/components/ConnectionTabs.js +15 -15
  23. package/dist/fe/components/IntegrationsPage/components/ConnectionTest.js +21 -21
  24. package/dist/fe/components/IntegrationsPage/components/ConnectionTransfer.js +18 -18
  25. package/dist/fe/components/IntegrationsPage/components/CredentialFields.js +19 -19
  26. package/dist/fe/components/IntegrationsPage/components/CredentialSlotRow.js +8 -8
  27. package/dist/fe/components/IntegrationsPage/components/EndpointForm.js +7 -7
  28. package/dist/fe/components/IntegrationsPage/components/EndpointFormFields.js +12 -12
  29. package/dist/fe/components/IntegrationsPage/components/EndpointList.js +7 -7
  30. package/dist/fe/components/IntegrationsPage/components/EndpointSample.js +36 -36
  31. package/dist/fe/components/IntegrationsPage/components/EndpointsTab.js +29 -29
  32. package/dist/fe/components/IntegrationsPage/components/FieldMappingRow.js +7 -7
  33. package/dist/fe/components/IntegrationsPage/components/FieldMappingRows.js +6 -6
  34. package/dist/fe/components/IntegrationsPage/components/IntegrationsPage.js +60 -60
  35. package/dist/fe/components/IntegrationsPage/components/MappingAccountFields.js +15 -15
  36. package/dist/fe/components/IntegrationsPage/components/MappingEditor.js +9 -9
  37. package/dist/fe/components/IntegrationsPage/components/MappingList.js +23 -23
  38. package/dist/fe/components/IntegrationsPage/components/MappingPasswordField.js +12 -12
  39. package/dist/fe/components/IntegrationsPage/components/MappingScheduleFields.js +23 -23
  40. package/dist/fe/components/IntegrationsPage/components/MappingWriteModeFields.js +31 -31
  41. package/dist/fe/components/IntegrationsPage/components/MappingsTab.js +56 -56
  42. package/dist/fe/components/IntegrationsPage/components/PaginationFields.js +11 -11
  43. package/dist/fe/components/IntegrationsPage/components/ParamBindingRows.js +15 -15
  44. package/dist/fe/components/IntegrationsPage/components/Primitives.js +28 -28
  45. package/dist/fe/components/IntegrationsPage/components/ReferenceCheckRows.js +9 -9
  46. package/dist/fe/components/IntegrationsPage/components/RunConfirmStep.js +6 -6
  47. package/dist/fe/components/IntegrationsPage/components/RunHistory.js +6 -6
  48. package/dist/fe/components/IntegrationsPage/components/RunHistoryRow.js +9 -9
  49. package/dist/fe/components/IntegrationsPage/components/RunPanel.js +40 -40
  50. package/dist/fe/components/IntegrationsPage/components/RunPasswordField.js +18 -18
  51. package/dist/fe/components/IntegrationsPage/components/RunPlanIssues.js +6 -6
  52. package/dist/fe/components/IntegrationsPage/components/RunPlanReferences.js +12 -12
  53. package/dist/fe/components/IntegrationsPage/components/RunPlanSuggestions.js +11 -11
  54. package/dist/fe/components/IntegrationsPage/components/RunPlanSummary.js +6 -6
  55. package/dist/fe/components/IntegrationsPage/components/RunProgressBar.js +6 -6
  56. package/dist/fe/components/IntegrationsPage/components/RunRevertConflicts.js +6 -6
  57. package/dist/fe/components/IntegrationsPage/components/Skeletons.js +7 -7
  58. package/dist/fe/components/IntegrationsPage/components/authOptions.js +4 -4
  59. package/dist/fe/components/IntegrationsPage/components/connectionDraft.js +27 -27
  60. package/dist/fe/components/IntegrationsPage/components/credentialSlots.js +25 -25
  61. package/dist/fe/components/IntegrationsPage/components/deleteIsConfirmed.js +9 -9
  62. package/dist/fe/components/IntegrationsPage/components/fieldMappingOptions.js +4 -4
  63. package/dist/fe/components/IntegrationsPage/components/formSupport.js +34 -34
  64. package/dist/fe/components/IntegrationsPage/components/jsonArray.js +14 -14
  65. package/dist/fe/components/IntegrationsPage/components/jsonObjectField.js +15 -15
  66. package/dist/fe/components/IntegrationsPage/components/mappingDraft.js +10 -10
  67. package/dist/fe/components/IntegrationsPage/components/mappingStaleness.js +22 -22
  68. package/dist/fe/components/IntegrationsPage/components/nextRuns.js +8 -8
  69. package/dist/fe/components/IntegrationsPage/components/passwordIsNeeded.js +13 -13
  70. package/dist/fe/components/IntegrationsPage/components/pathParams.js +6 -6
  71. package/dist/fe/components/IntegrationsPage/components/runFormat.js +18 -18
  72. package/dist/fe/components/IntegrationsPage/components/settleOwnership.js +18 -18
  73. package/dist/fe/components/IntegrationsPage/components/useInfiniteList.js +8 -8
  74. package/dist/fe/components/IntegrationsPage/store/index.js +20 -20
  75. package/dist/fe/components/IntegrationsPage/store/upsertInto.js +12 -12
  76. package/dist/fe/components/IntegrationsPage/text/context.js +6 -6
  77. package/dist/fe/components/IntegrationsPage/text/index.js +18 -18
  78. package/dist/fe/components/IntegrationsPage/theme/index.js +29 -29
  79. package/dist/fe/components/IntegrationsPage/types/records.js +10 -10
  80. package/dist/fe/components/IntegrationsPage/types/results.js +3 -3
  81. package/dist/fe/components/NotificationCenter/labels.js +17 -17
  82. package/dist/fe/components/ProfilePage/labels.js +10 -10
  83. package/dist/fe/components/ResetPasswordPage/labels.js +4 -4
  84. package/dist/fe/components/SetPasswordPage/labels.js +11 -11
  85. package/dist/fe/components/UsersPage/labels.js +14 -14
  86. package/dist/fe/utils/columnUtils.js +24 -24
  87. package/dist/fe/utils/searchFold.js +36 -36
  88. package/dist/index.js +6 -6
  89. package/dist/server.js +6 -6
  90. package/dist/src/Client/Proxy/authz.js +4 -4
  91. package/dist/src/Client/Proxy/httpProxy.js +136 -136
  92. package/dist/src/Client/Proxy/largeBody.js +29 -29
  93. package/dist/src/Client/Proxy/utils.js +32 -32
  94. package/dist/src/Client/Proxy/wsProxy.js +59 -59
  95. package/dist/src/Managers/Redis/index.d.ts +14 -0
  96. package/dist/src/Nucleus/routes/auth/admin/impersonationStore.d.ts +3 -4
  97. package/dist/src/Nucleus/routes/auth/refresh/issuedPair.d.ts +67 -0
  98. package/dist/src/Nucleus/routes/auth/refresh/recordIssued.d.ts +15 -6
  99. package/dist/src/Nucleus/routes/auth/refresh/refreshChain.d.ts +56 -0
  100. package/dist/src/Services/Auth/SessionStore/utils.d.ts +2 -0
  101. package/dist/src/Shared/cron.js +71 -71
  102. package/dist/src/Shared/redactSecrets.js +156 -156
  103. package/dist/src/Shared/redaction/bare.js +61 -61
  104. package/dist/src/Shared/redaction/floor.js +48 -48
  105. package/dist/src/Shared/redaction/freeText.js +70 -70
  106. package/dist/src/Shared/redaction/json.js +30 -30
  107. package/dist/src/Shared/redaction/lists.js +23 -23
  108. package/dist/src/Shared/redaction/markers.js +28 -28
  109. package/dist/src/Shared/redaction/names.js +49 -49
  110. package/dist/src/Shared/redaction/pairs.js +54 -54
  111. package/dist/src/Shared/redaction/secretString.js +29 -29
  112. package/dist/src/Shared/redaction/structured.js +52 -52
  113. package/dist/src/Shared/redaction/walk.js +25 -25
  114. package/infra/scripts/generate-project.ts +766 -766
  115. package/infra/templates/README.md +57 -57
  116. package/infra/templates/backend/.dockerignore +9 -9
  117. package/infra/templates/backend/.env.example +15 -15
  118. package/infra/templates/backend/README.md +28 -28
  119. package/infra/templates/backend/azure-pipelines.yml +135 -135
  120. package/infra/templates/backend/k8s/Dockerfile +31 -31
  121. package/infra/templates/backend/k8s/configmap.yaml +26 -26
  122. package/infra/templates/backend/k8s/deployment.yaml +85 -85
  123. package/infra/templates/backend/k8s/pvc.yaml +12 -12
  124. package/infra/templates/backend/k8s/service.yaml +13 -13
  125. package/infra/templates/backend/tsconfig.json +22 -22
  126. package/infra/templates/frontend/.dockerignore +10 -10
  127. package/infra/templates/frontend/.env.example +8 -8
  128. package/infra/templates/frontend/.env.local.example +10 -10
  129. package/infra/templates/frontend/README.md +69 -69
  130. package/infra/templates/frontend/app/[tablename]/page.tsx +37 -37
  131. package/infra/templates/frontend/app/_components/AuthWrapper/index.tsx +63 -63
  132. package/infra/templates/frontend/app/authorization/page.tsx +43 -43
  133. package/infra/templates/frontend/app/change-password/page.tsx +23 -23
  134. package/infra/templates/frontend/app/devices/page.tsx +127 -127
  135. package/infra/templates/frontend/app/forgot-password/page.tsx +20 -20
  136. package/infra/templates/frontend/app/globals.css +28 -28
  137. package/infra/templates/frontend/app/layout.tsx +35 -35
  138. package/infra/templates/frontend/app/login/page.tsx +33 -33
  139. package/infra/templates/frontend/app/page.tsx +565 -565
  140. package/infra/templates/frontend/app/profile/page.tsx +92 -92
  141. package/infra/templates/frontend/app/register/page.tsx +27 -27
  142. package/infra/templates/frontend/app/reset-password/page.tsx +60 -60
  143. package/infra/templates/frontend/app/set-password/page.tsx +43 -43
  144. package/infra/templates/frontend/app/ui-docs/page.tsx +52 -52
  145. package/infra/templates/frontend/app/users/page.tsx +52 -52
  146. package/infra/templates/frontend/app/verify-email/page.tsx +41 -41
  147. package/infra/templates/frontend/app/verify-magic-link/page.tsx +46 -46
  148. package/infra/templates/frontend/azure-pipelines.yml +137 -137
  149. package/infra/templates/frontend/code-and-design-principles.md +438 -438
  150. package/infra/templates/frontend/k8s/Dockerfile +50 -50
  151. package/infra/templates/frontend/k8s/configmap.yaml +18 -18
  152. package/infra/templates/frontend/k8s/deployment.yaml +72 -72
  153. package/infra/templates/frontend/k8s/ingress.yaml +36 -36
  154. package/infra/templates/frontend/k8s/service.yaml +14 -14
  155. package/infra/templates/frontend/lib/api/endpoints.ts +37 -37
  156. package/infra/templates/frontend/lib/api/factory.ts +44 -44
  157. package/infra/templates/frontend/lib/api/hook.ts +10 -10
  158. package/infra/templates/frontend/next.config.ts +19 -19
  159. package/infra/templates/frontend/package.json +34 -34
  160. package/infra/templates/frontend/postcss.config.mjs +5 -5
  161. package/infra/templates/frontend/server.ts +114 -114
  162. package/infra/templates/frontend/tsconfig.json +23 -23
  163. package/package.json +1 -1
  164. package/public/components/CTA.tsx +25 -25
  165. package/public/components/Capabilities.tsx +67 -67
  166. package/public/components/Features.tsx +107 -107
  167. package/public/components/Footer.tsx +58 -58
  168. package/public/components/Hero.tsx +51 -51
  169. package/public/components/Managers.tsx +55 -55
  170. package/public/components/Nav.tsx +91 -91
  171. package/public/components/Stack.tsx +36 -36
  172. package/public/components/docs/Docs.tsx +60 -60
  173. package/public/components/docs/DocsContent.tsx +176 -176
  174. package/public/components/docs/DocsRightSidebar.tsx +53 -53
  175. package/public/components/docs/DocsSidebar.tsx +54 -54
  176. package/public/components/docs/content/authentication.ts +836 -836
  177. package/public/components/docs/content/authorization.ts +268 -268
  178. package/public/components/docs/content/backupRestore.ts +173 -173
  179. package/public/components/docs/content/clientModule.ts +287 -287
  180. package/public/components/docs/content/entityCrud.ts +682 -682
  181. package/public/components/docs/content/monitoring.ts +313 -313
  182. package/public/components/docs/content/multiTenant.ts +269 -269
  183. package/public/components/docs/content/oauthApiKeys.ts +325 -325
  184. package/public/components/docs/content/pubsub.ts +131 -131
  185. package/public/components/docs/content/storageCdn.ts +171 -171
  186. package/public/components/docs/content/verification.ts +289 -289
  187. package/public/components/docs/docsData.ts +113 -113
  188. package/public/components/docs/index.ts +6 -6
  189. package/public/components/index.ts +9 -9
  190. package/public/docs.css +629 -629
  191. package/public/index.html +81 -81
  192. package/public/index.tsx +42 -42
  193. package/public/store.ts +76 -76
  194. package/public/styles.css +858 -858
  195. package/schemas/config.nucleus.json +2651 -2651
  196. package/scripts/audit-purge-noise.ts +120 -120
  197. package/scripts/build.ts +582 -582
  198. package/scripts/generate-system-tables-types.ts +18 -18
  199. package/scripts/generate-types-schema.test.ts +73 -73
  200. package/scripts/generate-types-schema.ts +1284 -1284
  201. package/scripts/packagedScripts.test.ts +87 -87
  202. package/scripts/publish.ts +276 -276
  203. package/scripts/skillCitations.test.ts +107 -107
  204. package/scripts/verify-publishable.ts +40 -40
@@ -3,12 +3,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useLabels } from '../text/context';
4
4
  import { integrationsPageTheme } from '../theme';
5
5
  import { Field, Notice } from './Primitives';
6
- /**
7
- * How the panel walks a list endpoint to its end.
8
- *
9
- * Nothing here is detected. The profile is a statement about the API being read,
10
- * and the warning above the picker is why it has to be one: the wrong choice
11
- * does not fail — it succeeds on page one and reports a total that looks fine.
6
+ /**
7
+ * How the panel walks a list endpoint to its end.
8
+ *
9
+ * Nothing here is detected. The profile is a statement about the API being read,
10
+ * and the warning above the picker is why it has to be one: the wrong choice
11
+ * does not fail — it succeeds on page one and reports a total that looks fine.
12
12
  */ const theme = integrationsPageTheme;
13
13
  /** Validating a stored value needs the kinds, not their words. */ const KIND_VALUES = [
14
14
  'none',
@@ -39,11 +39,11 @@ const kindsOf = (t)=>[
39
39
  label: t.kindLinkHeader
40
40
  }
41
41
  ];
42
- /**
43
- * Only the parameters the chosen style actually sends.
44
- *
45
- * Built from the labels rather than held as a module constant: the placeholders
46
- * are what goes on the wire and stay put, the labels beside them are read.
42
+ /**
43
+ * Only the parameters the chosen style actually sends.
44
+ *
45
+ * Built from the labels rather than held as a module constant: the placeholders
46
+ * are what goes on the wire and stay put, the labels beside them are read.
47
47
  */ const fieldsOf = (t)=>({
48
48
  none: [],
49
49
  page_number: [
@@ -5,21 +5,21 @@ import { useLabels } from '../text/context';
5
5
  import { integrationsPageTheme as theme } from '../theme';
6
6
  import { ParamBindingRow } from './ParamBindingRow';
7
7
  import { Notice } from './Primitives';
8
- /**
9
- * Where each parameter of an endpoint gets its value.
10
- *
11
- * This is what makes an endpoint that is only reachable per item — `/thing/{id}`,
12
- * with no endpoint that lists everything — importable at all. Without it such an
13
- * endpoint could be TESTED from the panel (the sample screen asks for a value by
14
- * hand) but never imported, because a run had nothing to supply the parameter
15
- * from. That gap is exactly why this screen exists.
16
- *
17
- * Three sources, and the difference matters:
18
- * - a fixed value, the same on every call;
19
- * - a field of another endpoint's records — one call per record, which is the
20
- * fan-out;
21
- * - a column of one of our own tables, for "fetch the detail of everything I
22
- * already have".
8
+ /**
9
+ * Where each parameter of an endpoint gets its value.
10
+ *
11
+ * This is what makes an endpoint that is only reachable per item — `/thing/{id}`,
12
+ * with no endpoint that lists everything — importable at all. Without it such an
13
+ * endpoint could be TESTED from the panel (the sample screen asks for a value by
14
+ * hand) but never imported, because a run had nothing to supply the parameter
15
+ * from. That gap is exactly why this screen exists.
16
+ *
17
+ * Three sources, and the difference matters:
18
+ * - a fixed value, the same on every call;
19
+ * - a field of another endpoint's records — one call per record, which is the
20
+ * fan-out;
21
+ * - a column of one of our own tables, for "fetch the detail of everything I
22
+ * already have".
23
23
  */ export function ParamBindingRows({ required, value, onChange, siblings, entities, disabled = false }) {
24
24
  const labels = useLabels();
25
25
  const groupId = useId();
@@ -9,11 +9,11 @@ const theme = integrationsPageTheme;
9
9
  children: children
10
10
  });
11
11
  }
12
- /**
13
- * One number with its name under it.
14
- *
15
- * The tone tints the whole cell rather than the digits alone: an operator scans
16
- * a row of counts, and a red *cell* is findable where red text is not.
12
+ /**
13
+ * One number with its name under it.
14
+ *
15
+ * The tone tints the whole cell rather than the digits alone: an operator scans
16
+ * a row of counts, and a red *cell* is findable where red text is not.
17
17
  */ export function Stat({ label, value, tone }) {
18
18
  return /*#__PURE__*/ _jsxs("div", {
19
19
  className: cn(theme.stat.cell, tone ? theme.badge[tone] : undefined),
@@ -29,11 +29,11 @@ const theme = integrationsPageTheme;
29
29
  ]
30
30
  });
31
31
  }
32
- /**
33
- * Something the operator has to read before acting.
34
- *
35
- * A danger notice is announced immediately because it is the one that reports a
36
- * write that failed or is about to delete rows; the calmer tones wait their turn.
32
+ /**
33
+ * Something the operator has to read before acting.
34
+ *
35
+ * A danger notice is announced immediately because it is the one that reports a
36
+ * write that failed or is about to delete rows; the calmer tones wait their turn.
37
37
  */ export function Notice({ tone, title, children }) {
38
38
  return /*#__PURE__*/ _jsxs("section", {
39
39
  className: theme.notice[tone],
@@ -50,12 +50,12 @@ const theme = integrationsPageTheme;
50
50
  ]
51
51
  });
52
52
  }
53
- /**
54
- * A labelled control.
55
- *
56
- * The hint and the error carry ids derived from the control's own id so the
57
- * caller can point `aria-describedby` at them; the label is not optional,
58
- * because a form of unlabelled boxes is unusable with a screen reader.
53
+ /**
54
+ * A labelled control.
55
+ *
56
+ * The hint and the error carry ids derived from the control's own id so the
57
+ * caller can point `aria-describedby` at them; the label is not optional,
58
+ * because a form of unlabelled boxes is unusable with a screen reader.
59
59
  */ export function Field({ label, htmlFor, hint, error, children }) {
60
60
  return /*#__PURE__*/ _jsxs("div", {
61
61
  className: theme.field.wrapper,
@@ -79,11 +79,11 @@ const theme = integrationsPageTheme;
79
79
  ]
80
80
  });
81
81
  }
82
- /**
83
- * One line of verbatim text — a URL, a JSON path, a header name.
84
- *
85
- * It scrolls sideways instead of wrapping: a wrapped path invites the reader to
86
- * copy a line break into a field where it will silently break the request.
82
+ /**
83
+ * One line of verbatim text — a URL, a JSON path, a header name.
84
+ *
85
+ * It scrolls sideways instead of wrapping: a wrapped path invites the reader to
86
+ * copy a line break into a field where it will silently break the request.
87
87
  */ export function CodeBlock({ children }) {
88
88
  return /*#__PURE__*/ _jsx("pre", {
89
89
  className: cn(theme.code, 'whitespace-pre'),
@@ -92,13 +92,13 @@ const theme = integrationsPageTheme;
92
92
  })
93
93
  });
94
94
  }
95
- /**
96
- * A titled block inside a long form.
97
- *
98
- * The mapping screen asks five separate questions and used to put them in one
99
- * unbroken column of inputs and paragraphs. Named blocks let the eye skip the
100
- * questions it does not need, which is the whole difference between a form and
101
- * a wall.
95
+ /**
96
+ * A titled block inside a long form.
97
+ *
98
+ * The mapping screen asks five separate questions and used to put them in one
99
+ * unbroken column of inputs and paragraphs. Named blocks let the eye skip the
100
+ * questions it does not need, which is the whole difference between a form and
101
+ * a wall.
102
102
  */ export function Section({ title, purpose, action, children }) {
103
103
  return /*#__PURE__*/ _jsxs("section", {
104
104
  className: theme.section.wrapper,
@@ -4,15 +4,15 @@ import { useId } from 'react';
4
4
  import { useLabels } from '../text/context';
5
5
  import { integrationsPageTheme } from '../theme';
6
6
  import { Notice, Section } from './Primitives';
7
- /**
8
- * Columns whose value has to already exist somewhere else.
9
- *
10
- * An employee belongs to a department, a location and a title. Importing one
11
- * whose department is not in the table produces a row that points at nothing —
12
- * found much later by somebody wondering why a filter came back empty. Declaring
13
- * the reference makes the PREVIEW say so, before anything is written, and offers
14
- * the only two honest answers: create what is missing, or leave those records
15
- * out.
7
+ /**
8
+ * Columns whose value has to already exist somewhere else.
9
+ *
10
+ * An employee belongs to a department, a location and a title. Importing one
11
+ * whose department is not in the table produces a row that points at nothing —
12
+ * found much later by somebody wondering why a filter came back empty. Declaring
13
+ * the reference makes the PREVIEW say so, before anything is written, and offers
14
+ * the only two honest answers: create what is missing, or leave those records
15
+ * out.
16
16
  */ const theme = integrationsPageTheme;
17
17
  const onMissingChoices = (t)=>[
18
18
  {
@@ -3,12 +3,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useLabels } from '../text/context';
4
4
  import { integrationsPageTheme } from '../theme';
5
5
  import { Notice } from './Primitives';
6
- /**
7
- * The step between "Run import" and a destroyed table.
8
- *
9
- * It appears only when the server says the run needs confirming, and it says what
10
- * goes away with a NUMBER in front of it. A confirmation that reads "are you
11
- * sure?" transfers no information, so this one refuses to be that.
6
+ /**
7
+ * The step between "Run import" and a destroyed table.
8
+ *
9
+ * It appears only when the server says the run needs confirming, and it says what
10
+ * goes away with a NUMBER in front of it. A confirmation that reads "are you
11
+ * sure?" transfers no information, so this one refuses to be that.
12
12
  */ const theme = integrationsPageTheme;
13
13
  export function RunConfirmStep({ lines, counted, working, onConfirm, onDismiss }) {
14
14
  const labels = useLabels();
@@ -8,12 +8,12 @@ import { Notice } from './Primitives';
8
8
  import { RunHistoryRow } from './RunHistoryRow';
9
9
  import { ListSkeleton } from './Skeletons';
10
10
  import { useInfiniteList } from './useInfiniteList';
11
- /**
12
- * Every run, newest first, one page at a time.
13
- *
14
- * The server pages, sorts and scopes it — nothing is filtered here, so a table
15
- * with a hundred thousand runs behaves exactly like a table with ten. The
16
- * sentinel at the bottom is what asks for the next page.
11
+ /**
12
+ * Every run, newest first, one page at a time.
13
+ *
14
+ * The server pages, sorts and scopes it — nothing is filtered here, so a table
15
+ * with a hundred thousand runs behaves exactly like a table with ten. The
16
+ * sentinel at the bottom is what asks for the next page.
17
17
  */ const theme = integrationsPageTheme;
18
18
  const PAGE_SIZE = 20;
19
19
  export function RunHistory({ actions, mappingId, refreshKey, onRefresh }) {
@@ -8,12 +8,12 @@ import { integrationsPageTheme } from '../theme';
8
8
  import { Badge } from './Primitives';
9
9
  import { RunRevertConflicts } from './RunRevertConflicts';
10
10
  import { countersLine, errorText, formatDuration, formatMoment, RUN_STATUS_TONE, toEpochMs } from './runFormat';
11
- /**
12
- * One past run, and the one thing an operator can still do to it.
13
- *
14
- * Undo is offered only while the pre-images behind it still exist; once they are
15
- * gone the button stays visible but disabled, with the reason spelled out, because
16
- * a button that quietly disappears reads as a bug rather than as an expiry.
11
+ /**
12
+ * One past run, and the one thing an operator can still do to it.
13
+ *
14
+ * Undo is offered only while the pre-images behind it still exist; once they are
15
+ * gone the button stays visible but disabled, with the reason spelled out, because
16
+ * a button that quietly disappears reads as a bug rather than as an expiry.
17
17
  */ const theme = integrationsPageTheme;
18
18
  export function RunHistoryRow({ run, actions, onReverted }) {
19
19
  const labels = useLabels();
@@ -28,9 +28,9 @@ export function RunHistoryRow({ run, actions, onReverted }) {
28
28
  const readClock = useEffectEvent(()=>{
29
29
  setNowMs(Date.now());
30
30
  });
31
- /*
32
- * De-duplicated: a run that fails on every record of a page records the same
33
- * sentence many times, and forty identical lines say no more than one.
31
+ /*
32
+ * De-duplicated: a run that fails on every record of a page records the same
33
+ * sentence many times, and forty identical lines say no more than one.
34
34
  */ const failureReasons = [
35
35
  ...new Set((run.errors ?? []).map((e)=>String(e).trim()).filter(Boolean))
36
36
  ];
@@ -14,13 +14,13 @@ import { RunPlanSummary } from './RunPlanSummary';
14
14
  import { RunProgressBar } from './RunProgressBar';
15
15
  import { describeLosses, errorText } from './runFormat';
16
16
  import { StatGridSkeleton } from './Skeletons';
17
- /**
18
- * Preview, then run.
19
- *
20
- * The two are separate on purpose: a preview writes nothing and can be repeated,
21
- * and the counts it reports are what the confirmation step later quotes back. The
22
- * panel owns no data of its own — the plan, the progress and the active run all
23
- * live in the store, so a tab switch cannot lose a running import.
17
+ /**
18
+ * Preview, then run.
19
+ *
20
+ * The two are separate on purpose: a preview writes nothing and can be repeated,
21
+ * and the counts it reports are what the confirmation step later quotes back. The
22
+ * panel owns no data of its own — the plan, the progress and the active run all
23
+ * live in the store, so a tab switch cannot lose a running import.
24
24
  */ const theme = integrationsPageTheme;
25
25
  export function RunPanel({ mapping, actions, onSubscribeProgress, onRunSettled }) {
26
26
  const store = useIntegrationsStore();
@@ -30,10 +30,10 @@ export function RunPanel({ mapping, actions, onSubscribeProgress, onRunSettled }
30
30
  const [cancelling, setCancelling] = useState(false);
31
31
  // Held only while this panel is open. Never put in the store, never saved:
32
32
  // the point of asking per run is that it does not live anywhere afterwards.
33
- /*
34
- * Pre-filled with the change-me default, so pressing Run does not first
35
- * require somebody to think of a password. It is visible and editable; what
36
- * it must not be is a blocker in front of an import that is otherwise ready.
33
+ /*
34
+ * Pre-filled with the change-me default, so pressing Run does not first
35
+ * require somebody to think of a password. It is visible and editable; what
36
+ * it must not be is a blocker in front of an import that is otherwise ready.
37
37
  */ const [sharedPassword, setSharedPassword] = useState(DEFAULT_SHARED_PASSWORD);
38
38
  // Two ways an import can need a password: it writes one into the record's own
39
39
  // table, or it creates a login alongside each record. Either way it is typed
@@ -48,13 +48,13 @@ export function RunPanel({ mapping, actions, onSubscribeProgress, onRunSettled }
48
48
  const needsPassword = passwordIsNeeded(mapping);
49
49
  const passwordReady = !needsPassword || sharedPassword.length >= MIN_SHARED_PASSWORD;
50
50
  const activeRunId = store.activeRunId;
51
- /**
52
- * Only a plan computed for THIS mapping.
53
- *
54
- * A preview reads a whole source, so it can land long after the operator has
55
- * moved on — and it used to land under whatever was selected by then. The
56
- * counts an operator reads before pressing Run must describe the mapping they
57
- * are looking at.
51
+ /**
52
+ * Only a plan computed for THIS mapping.
53
+ *
54
+ * A preview reads a whole source, so it can land long after the operator has
55
+ * moved on — and it used to land under whatever was selected by then. The
56
+ * counts an operator reads before pressing Run must describe the mapping they
57
+ * are looking at.
58
58
  */ const plan = store.planMappingId === mapping.id ? store.plan : null;
59
59
  const preview = ()=>{
60
60
  const requestedFor = mapping.id;
@@ -115,16 +115,16 @@ export function RunPanel({ mapping, actions, onSubscribeProgress, onRunSettled }
115
115
  };
116
116
  // Progress for SOMEONE ELSE'S run is dropped: the topic is shared, and a
117
117
  // second operator's import must not drive this panel's bar.
118
- /**
119
- * A plan describes a database that no longer exists once it has been run.
120
- *
121
- * The plan is what the buttons act on and what the destructive confirmation
122
- * quotes. Left standing after the import, it went on saying "880 to create"
123
- * next to a history entry reporting 880 created — and the buttons came back
124
- * enabled, so a second press started a second full import against numbers
125
- * that were no longer true, with the confirmation showing those same stale
126
- * numbers. Cleared here, the operator has to preview again, which is the only
127
- * honest answer to "what would this do now".
118
+ /**
119
+ * A plan describes a database that no longer exists once it has been run.
120
+ *
121
+ * The plan is what the buttons act on and what the destructive confirmation
122
+ * quotes. Left standing after the import, it went on saying "880 to create"
123
+ * next to a history entry reporting 880 created — and the buttons came back
124
+ * enabled, so a second press started a second full import against numbers
125
+ * that were no longer true, with the confirmation showing those same stale
126
+ * numbers. Cleared here, the operator has to preview again, which is the only
127
+ * honest answer to "what would this do now".
128
128
  */ const forgetPlan = ()=>store.setPlan(null, null);
129
129
  const applyProgress = useEffectEvent((progress)=>{
130
130
  if (store.activeRunId !== progress.runId) return;
@@ -135,18 +135,18 @@ export function RunPanel({ mapping, actions, onSubscribeProgress, onRunSettled }
135
135
  onRunSettled?.();
136
136
  }
137
137
  });
138
- /**
139
- * Ask the server whether the run has finished.
140
- *
141
- * Progress frames are PUSHED — over whatever realtime channel the app wires
142
- * up — and an app that wires none, or a socket that drops, leaves this panel
143
- * saying "waiting for the first update" over an import that finished minutes
144
- * ago, with a Cancel button for a run that is not running. The bar was the
145
- * only thing on screen and it was lying.
146
- *
147
- * So the run's own row is the authority: it is polled while one is active, it
148
- * settles the panel when the status is terminal, and it says what happened.
149
- * Realtime stays the fast path and is no longer the only one.
138
+ /**
139
+ * Ask the server whether the run has finished.
140
+ *
141
+ * Progress frames are PUSHED — over whatever realtime channel the app wires
142
+ * up — and an app that wires none, or a socket that drops, leaves this panel
143
+ * saying "waiting for the first update" over an import that finished minutes
144
+ * ago, with a Cancel button for a run that is not running. The bar was the
145
+ * only thing on screen and it was lying.
146
+ *
147
+ * So the run's own row is the authority: it is polled while one is active, it
148
+ * settles the panel when the status is terminal, and it says what happened.
149
+ * Realtime stays the fast path and is no longer the only one.
150
150
  */ const pollActiveRun = useEffectEvent(()=>{
151
151
  const runId = store.activeRunId;
152
152
  if (!runId) return;
@@ -4,26 +4,26 @@ import { useId, useState } from 'react';
4
4
  import { useLabels } from '../text/context';
5
5
  import { integrationsPageTheme } from '../theme';
6
6
  import { Field } from './Primitives';
7
- /**
8
- * The opening password every account this run creates is given.
9
- *
10
- * Asked here rather than saved on the mapping, because a stored password is a
11
- * password that outlives the reason for it. It is sent with the run, hashed on
12
- * arrival and kept nowhere.
13
- *
14
- * One password for everyone is the point: eight hundred generated passwords is
15
- * eight hundred things somebody has to deliver by hand, so in practice the
16
- * import never happens. One opening password, changed by each person
17
- * afterwards, is the version that gets done.
7
+ /**
8
+ * The opening password every account this run creates is given.
9
+ *
10
+ * Asked here rather than saved on the mapping, because a stored password is a
11
+ * password that outlives the reason for it. It is sent with the run, hashed on
12
+ * arrival and kept nowhere.
13
+ *
14
+ * One password for everyone is the point: eight hundred generated passwords is
15
+ * eight hundred things somebody has to deliver by hand, so in practice the
16
+ * import never happens. One opening password, changed by each person
17
+ * afterwards, is the version that gets done.
18
18
  */ const theme = integrationsPageTheme;
19
19
  /** Matches the server's floor; the message says the same thing the server would. */ export const MIN_SHARED_PASSWORD = 8;
20
- /**
21
- * What the box starts with, so an import is not blocked on inventing one.
22
- *
23
- * Deliberately a CHANGE-ME rather than anything that looks chosen: it is handed
24
- * to every account the run creates, it is the first thing each of those people
25
- * is asked to replace, and a default that looks like a real password is one
26
- * somebody leaves in place. Editable — an install with a policy types its own.
20
+ /**
21
+ * What the box starts with, so an import is not blocked on inventing one.
22
+ *
23
+ * Deliberately a CHANGE-ME rather than anything that looks chosen: it is handed
24
+ * to every account the run creates, it is the first thing each of those people
25
+ * is asked to replace, and a default that looks like a real password is one
26
+ * somebody leaves in place. Editable — an install with a policy types its own.
27
27
  */ export const DEFAULT_SHARED_PASSWORD = 'ChanGeME2026!';
28
28
  export function RunPasswordField({ column, value, disabled, onChange }) {
29
29
  const labels = useLabels();
@@ -3,12 +3,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { cn } from '../../../utils/cn';
4
4
  import { useLabels } from '../text/context';
5
5
  import { integrationsPageTheme } from '../theme';
6
- /**
7
- * The records the planner could not use, folded away.
8
- *
9
- * Folded because a healthy plan has none and an unhealthy one can have hundreds;
10
- * open because the source index is the only way back to the offending record.
11
- * Messages wrap rather than truncate — a clipped reason is a reason nobody acts on.
6
+ /**
7
+ * The records the planner could not use, folded away.
8
+ *
9
+ * Folded because a healthy plan has none and an unhealthy one can have hundreds;
10
+ * open because the source index is the only way back to the offending record.
11
+ * Messages wrap rather than truncate — a clipped reason is a reason nobody acts on.
12
12
  */ const theme = integrationsPageTheme;
13
13
  /** Long enough to compare two rows at a glance, short enough to stay one line. */ const MAX_VALUE_LENGTH = 60;
14
14
  /** `name: ÜRETİM PLANLAMA, slug: TAT-110` — the mapped values, in column order. */ export function describeRow(row) {
@@ -3,18 +3,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useLabels } from '../text/context';
4
4
  import { integrationsPageTheme } from '../theme';
5
5
  import { Notice } from './Primitives';
6
- /**
7
- * The values this import points at that do not exist here yet.
8
- *
9
- * This is the question the preview exists to ask. An employee arrives carrying a
10
- * department, a location and a title; if any of those is not in our tables the
11
- * record either points at nothing or has to be left out — and both of those are
12
- * decisions somebody should make BEFORE eight hundred rows are written, not
13
- * discover afterwards from an empty filter.
14
- *
15
- * So the answer is given here, on the run, not buried in the mapping: create the
16
- * missing values and import everyone, or import without those records. The
17
- * mapping only says which columns are worth checking.
6
+ /**
7
+ * The values this import points at that do not exist here yet.
8
+ *
9
+ * This is the question the preview exists to ask. An employee arrives carrying a
10
+ * department, a location and a title; if any of those is not in our tables the
11
+ * record either points at nothing or has to be left out — and both of those are
12
+ * decisions somebody should make BEFORE eight hundred rows are written, not
13
+ * discover afterwards from an empty filter.
14
+ *
15
+ * So the answer is given here, on the run, not buried in the mapping: create the
16
+ * missing values and import everyone, or import without those records. The
17
+ * mapping only says which columns are worth checking.
18
18
  */ const theme = integrationsPageTheme;
19
19
  /** Grouped, because "MUHASEBE is missing" said 214 times is not 214 problems. */ export function missingReferenceValues(plan) {
20
20
  const byKey = new Map();
@@ -3,17 +3,17 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { useLabels } from '../text/context';
4
4
  import { integrationsPageTheme } from '../theme';
5
5
  import { Notice } from './Primitives';
6
- /**
7
- * What to DO about the records this import would leave out.
8
- *
9
- * A preview that says "561 records are missing e-mail" has told the truth and
10
- * stopped one step short of being useful: the answer is nearly always to build
11
- * the value from the fields that ARE there, and the panel knows which those are.
12
- * Leaving the operator to work that out — and to guess that Fallback takes
13
- * `{braces}` at all — is how a capability that exists goes unused.
14
- *
15
- * So the suggestion is written out, with the record's own field names in it,
16
- * ready to be copied into the mapping.
6
+ /**
7
+ * What to DO about the records this import would leave out.
8
+ *
9
+ * A preview that says "561 records are missing e-mail" has told the truth and
10
+ * stopped one step short of being useful: the answer is nearly always to build
11
+ * the value from the fields that ARE there, and the panel knows which those are.
12
+ * Leaving the operator to work that out — and to guess that Fallback takes
13
+ * `{braces}` at all — is how a capability that exists goes unused.
14
+ *
15
+ * So the suggestion is written out, with the record's own field names in it,
16
+ * ready to be copied into the mapping.
17
17
  */ const theme = integrationsPageTheme;
18
18
  /** Column names that plausibly hold an address, so the advice can be specific. */ const EMAIL_LIKE = /mail/i;
19
19
  /** Source fields that plausibly name a person, in the order they read best. */ const GIVEN_NAME = /^(name|first|firstname|given|ad)$/i;
@@ -4,12 +4,12 @@ import { useLabels } from '../text/context';
4
4
  import { integrationsPageTheme } from '../theme';
5
5
  import { Badge, Notice, Stat } from './Primitives';
6
6
  import { RunPlanIssues } from './RunPlanIssues';
7
- /**
8
- * What the run WOULD do, before it does any of it.
9
- *
10
- * The counts come first because they are what gets approved; the server's own
11
- * warnings are reproduced word for word underneath, never shortened — a warning
12
- * an operator has to expand to read is a warning they run past.
7
+ /**
8
+ * What the run WOULD do, before it does any of it.
9
+ *
10
+ * The counts come first because they are what gets approved; the server's own
11
+ * warnings are reproduced word for word underneath, never shortened — a warning
12
+ * an operator has to expand to read is a warning they run past.
13
13
  */ const theme = integrationsPageTheme;
14
14
  /** Missing rows are only alarming when the policy actually does something to them. */ function missingTone(plan) {
15
15
  if (plan.missing === 0) return undefined;
@@ -3,12 +3,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { cn } from '../../../utils/cn';
4
4
  import { useLabels } from '../text/context';
5
5
  import { integrationsPageTheme } from '../theme';
6
- /**
7
- * How far the run this panel started has got.
8
- *
9
- * A run that reports no total still gets a bar — an indeterminate one — because
10
- * the alternative is a screen that looks frozen while the source is being paged.
11
- * Cancel lives here, next to the thing it stops, and nowhere else.
6
+ /**
7
+ * How far the run this panel started has got.
8
+ *
9
+ * A run that reports no total still gets a bar — an indeterminate one — because
10
+ * the alternative is a screen that looks frozen while the source is being paged.
11
+ * Cancel lives here, next to the thing it stops, and nowhere else.
12
12
  */ const theme = integrationsPageTheme;
13
13
  const phaseLabelOf = (t)=>({
14
14
  fetching: t.stageReading,
@@ -2,12 +2,12 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useLabels } from '../text/context';
4
4
  import { integrationsPageTheme } from '../theme';
5
- /**
6
- * The rows somebody edited by hand after the import wrote them.
7
- *
8
- * Undoing the run would restore the pre-image over that person's work, so the
9
- * first Undo stops here and names every row it would trample. Overwriting is a
10
- * SECOND, separate decision — it never rides along on the first click.
5
+ /**
6
+ * The rows somebody edited by hand after the import wrote them.
7
+ *
8
+ * Undoing the run would restore the pre-image over that person's work, so the
9
+ * first Undo stops here and names every row it would trample. Overwriting is a
10
+ * SECOND, separate decision — it never rides along on the first click.
11
11
  */ const theme = integrationsPageTheme;
12
12
  export function RunRevertConflicts({ conflicts, message, working, onOverwrite, onDismiss }) {
13
13
  const labels = useLabels();
@@ -3,13 +3,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { cn } from '../../../utils/cn';
4
4
  import { useLabels } from '../text/context';
5
5
  import { integrationsPageTheme } from '../theme';
6
- /**
7
- * The loading shapes.
8
- *
9
- * Each one wears the SAME layout classes as the thing it stands in for, and the
10
- * grey bars sit inside boxes the height of the text they replace. That is the
11
- * whole point: the list must not grow taller the moment the rows arrive, or the
12
- * button the operator was reaching for moves out from under the finger.
6
+ /**
7
+ * The loading shapes.
8
+ *
9
+ * Each one wears the SAME layout classes as the thing it stands in for, and the
10
+ * grey bars sit inside boxes the height of the text they replace. That is the
11
+ * whole point: the list must not grow taller the moment the rows arrive, or the
12
+ * button the operator was reaching for moves out from under the finger.
13
13
  */ const theme = integrationsPageTheme;
14
14
  /** Cycled so the placeholder reads as a list of different names, not a barcode. */ const TITLE_WIDTHS = [
15
15
  'w-2/5',
@@ -5,10 +5,10 @@
5
5
  'basic',
6
6
  'oauth2'
7
7
  ];
8
- /**
9
- * The scheme names are protocol words — `Bearer token`, `Basic`, `OAuth 2` are
10
- * what the specifications call them and what the service's own documentation
11
- * will say — so they are not label material. The sentence under each one is.
8
+ /**
9
+ * The scheme names are protocol words — `Bearer token`, `Basic`, `OAuth 2` are
10
+ * what the specifications call them and what the service's own documentation
11
+ * will say — so they are not label material. The sentence under each one is.
12
12
  */ export const authTypeOptions = (t)=>[
13
13
  {
14
14
  value: 'none',