@revenexx/studio-integrations 0.7.0 → 1.0.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 +416 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/dist/runtime/components/Integrations/CredentialCreateDialog.vue +4 -1
- package/dist/runtime/components/Integrations/CredentialDetailDialog.vue +8 -2
- package/dist/runtime/components/Integrations/ExpressionInput.vue +5 -0
- package/dist/runtime/components/Integrations/NodeConfigDynamicField.d.vue.ts +3 -0
- package/dist/runtime/components/Integrations/NodeConfigDynamicField.vue +16 -3
- package/dist/runtime/components/Integrations/NodeConfigDynamicField.vue.d.ts +3 -0
- package/dist/runtime/components/Integrations/NodeConfigDynamicSchema.vue +1 -0
- package/dist/runtime/components/Integrations/NodeConfigField.d.vue.ts +3 -0
- package/dist/runtime/components/Integrations/NodeConfigField.vue +2 -0
- package/dist/runtime/components/Integrations/NodeConfigField.vue.d.ts +3 -0
- package/dist/runtime/components/Integrations/NodeInspector.d.vue.ts +2 -2
- package/dist/runtime/components/Integrations/NodeInspector.vue +95 -10
- package/dist/runtime/components/Integrations/NodeInspector.vue.d.ts +2 -2
- package/dist/runtime/components/Integrations/NodeOutputSchema.d.vue.ts +2 -1
- package/dist/runtime/components/Integrations/NodeOutputSchema.vue +34 -8
- package/dist/runtime/components/Integrations/NodeOutputSchema.vue.d.ts +2 -1
- package/dist/runtime/components/Integrations/NodePalette.vue +12 -8
- package/dist/runtime/components/Integrations/StickyNoteView.vue +45 -11
- package/dist/runtime/components/Integrations/SurfaceCard.d.vue.ts +50 -0
- package/dist/runtime/components/Integrations/SurfaceCard.vue +55 -0
- package/dist/runtime/components/Integrations/SurfaceCard.vue.d.ts +50 -0
- package/dist/runtime/components/Integrations/TemplateCard.vue +3 -3
- package/dist/runtime/components/Integrations/TemplateFlowPreview.vue +12 -3
- package/dist/runtime/components/Integrations/WorkflowCreateDialog.vue +5 -4
- package/dist/runtime/components/Integrations/WorkflowEditor.d.vue.ts +16 -0
- package/dist/runtime/components/Integrations/WorkflowEditor.vue +52 -11
- package/dist/runtime/components/Integrations/WorkflowEditor.vue.d.ts +16 -0
- package/dist/runtime/components/Integrations/WorkflowHistoryPanel.d.vue.ts +6 -0
- package/dist/runtime/components/Integrations/WorkflowHistoryPanel.vue +4 -2
- package/dist/runtime/components/Integrations/WorkflowHistoryPanel.vue.d.ts +6 -0
- package/dist/runtime/components/Integrations/WorkflowNodeView.vue +59 -28
- package/dist/runtime/components/Integrations/WorkflowRunReplayPanel.vue +3 -4
- package/dist/runtime/components/Integrations/WorkflowSettingsDialog.d.vue.ts +16 -17
- package/dist/runtime/components/Integrations/WorkflowSettingsDialog.vue +37 -26
- package/dist/runtime/components/Integrations/WorkflowSettingsDialog.vue.d.ts +16 -17
- package/dist/runtime/components/Integrations/WorkflowTriggerView.vue +4 -5
- package/dist/runtime/components/Integrations/WorkflowVariablesDialog.vue +53 -14
- package/dist/runtime/composables/useIntegrationsCredentials.d.ts +11 -0
- package/dist/runtime/composables/useIntegrationsCredentials.js +2 -2
- package/dist/runtime/composables/useIntegrationsNodes.js +11 -1
- package/dist/runtime/composables/useIntegrationsSchedules.d.ts +3 -2
- package/dist/runtime/composables/useIntegrationsTriggers.d.ts +23 -3
- package/dist/runtime/composables/useIntegrationsTriggers.js +18 -7
- package/dist/runtime/composables/useIntegrationsWorkflows.d.ts +10 -1
- package/dist/runtime/composables/useIntegrationsWorkflows.js +25 -4
- package/dist/runtime/composables/useNodeConfigResolve.js +2 -1
- package/dist/runtime/data/integrationNodeCatalog.d.ts +22 -1
- package/dist/runtime/data/integrationNodeCatalog.js +8 -4
- package/dist/runtime/data/nodeInputData.d.ts +58 -1
- package/dist/runtime/data/nodeInputData.js +30 -5
- package/dist/runtime/data/triggerGlyphs.d.ts +47 -0
- package/dist/runtime/data/triggerGlyphs.js +11 -0
- package/dist/runtime/i18n/messages/de.json +20 -3
- package/dist/runtime/i18n/messages/en.json +20 -3
- package/dist/runtime/pages/integrations/credentials.vue +4 -1
- package/dist/runtime/pages/integrations/index.vue +16 -17
- package/dist/runtime/pages/integrations/templates/[slug].vue +13 -5
- package/dist/runtime/pages/integrations/workflows/[id].vue +193 -104
- package/dist/runtime/types/integrations.d.ts +25 -1
- package/dist/runtime/utils/cockpitSources.d.ts +22 -3
- package/dist/runtime/utils/credentialState.d.ts +6 -1
- package/dist/runtime/utils/credentialState.js +1 -1
- package/dist/runtime/utils/localize.d.ts +34 -0
- package/dist/runtime/utils/localize.js +22 -7
- package/dist/runtime/utils/pollBudget.d.ts +1 -1
- package/dist/runtime/utils/servedPaths.d.ts +22 -0
- package/dist/runtime/utils/servedPaths.js +3 -0
- package/package.json +1 -1
|
@@ -11,6 +11,40 @@
|
|
|
11
11
|
export declare function setStudioLocale(locale: string | null | undefined): void;
|
|
12
12
|
/** The language the studio is currently rendering in. Reactive when read in an effect. */
|
|
13
13
|
export declare function studioLocale(): string;
|
|
14
|
+
/**
|
|
15
|
+
* The key a read answers from — which is the key a *deletion* has to remove, since
|
|
16
|
+
* what the user is clearing is the text in front of them.
|
|
17
|
+
*
|
|
18
|
+
* All four steps, in the order `resolveLocalized` reads them: the exact tag, the same
|
|
19
|
+
* language in another region, English, and the map's own first entry. `''` when the
|
|
20
|
+
* map holds no string at all.
|
|
21
|
+
*/
|
|
22
|
+
export declare function languageKeyRead(map: unknown, locale?: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* The key an edit is written to.
|
|
25
|
+
*
|
|
26
|
+
* The first two steps of {@link languageKeyRead} and deliberately not its last two:
|
|
27
|
+
* falling back to English or to the first entry answers "what can I show you", and
|
|
28
|
+
* writing there would put the author's text into a language they are not reading —
|
|
29
|
+
* the silent loss this exists to prevent (PO-259). A language the map does not hold
|
|
30
|
+
* yet is written under its base subtag, never the tag the host set, so that reading
|
|
31
|
+
* it back finds it: a `de-CH` studio reading a `de` text through the region step
|
|
32
|
+
* would otherwise write a new `de-CH` key and leave every plain-`de` reader on the
|
|
33
|
+
* old wording.
|
|
34
|
+
*
|
|
35
|
+
* **That guarantee is about the keys this function invents.** The first two steps
|
|
36
|
+
* return a key the map already holds, verbatim — so a map carrying `DE-ch` is written
|
|
37
|
+
* back into `DE-ch`, which the API's `^[a-z]{2,3}(-[A-Z]{2})?$` rejects. Not a case
|
|
38
|
+
* that can arise: such a map could not have been saved in the first place, and the
|
|
39
|
+
* only writer of these keys is this function. Returning an existing key as it stands
|
|
40
|
+
* is what makes the write land where the read came from, which is worth more here than
|
|
41
|
+
* normalising a shape nothing can produce — but it is why the sentence above says
|
|
42
|
+
* *invents* rather than *writes*.
|
|
43
|
+
*
|
|
44
|
+
* Deleting is the other question and has the other answer — see
|
|
45
|
+
* {@link languageKeyRead}.
|
|
46
|
+
*/
|
|
47
|
+
export declare function languageKeyToWrite(map: unknown, locale?: string): string;
|
|
14
48
|
/**
|
|
15
49
|
* Resolve a multilingual value from the Integrations API. The API returns
|
|
16
50
|
* names and descriptions either as a plain string or as an already-parsed
|
|
@@ -7,24 +7,39 @@ export function setStudioLocale(locale) {
|
|
|
7
7
|
export function studioLocale() {
|
|
8
8
|
return uiLocale.value;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
10
|
+
function baseLanguage(locale) {
|
|
11
|
+
const base = locale.toLowerCase().split(/[-_]/)[0] ?? "";
|
|
12
|
+
return /^[a-z]{2,3}$/.test(base) ? base : "en";
|
|
13
|
+
}
|
|
14
|
+
export function languageKeyRead(map, locale = studioLocale()) {
|
|
15
|
+
const obj = map && typeof map === "object" ? map : {};
|
|
16
|
+
const keys = Object.keys(obj);
|
|
12
17
|
if (!keys.length) return "";
|
|
13
18
|
const wanted = locale.toLowerCase();
|
|
14
|
-
const base =
|
|
19
|
+
const base = baseLanguage(locale);
|
|
15
20
|
const candidates = [
|
|
16
21
|
keys.find((k) => k.toLowerCase() === wanted),
|
|
17
|
-
keys.find((k) => k
|
|
18
|
-
keys.find((k) => k
|
|
22
|
+
keys.find((k) => baseLanguage(k) === base),
|
|
23
|
+
keys.find((k) => baseLanguage(k) === "en"),
|
|
19
24
|
keys[0]
|
|
20
25
|
];
|
|
21
26
|
for (const key of candidates) {
|
|
22
27
|
if (key === void 0) continue;
|
|
23
|
-
|
|
24
|
-
if (typeof picked === "string") return picked;
|
|
28
|
+
if (typeof obj[key] === "string") return key;
|
|
25
29
|
}
|
|
26
30
|
return "";
|
|
27
31
|
}
|
|
32
|
+
export function languageKeyToWrite(map, locale = studioLocale()) {
|
|
33
|
+
const keys = map && typeof map === "object" ? Object.keys(map) : [];
|
|
34
|
+
const wanted = locale.toLowerCase();
|
|
35
|
+
const base = baseLanguage(locale);
|
|
36
|
+
return keys.find((k) => k.toLowerCase() === wanted) ?? keys.find((k) => baseLanguage(k) === base) ?? base;
|
|
37
|
+
}
|
|
38
|
+
function pickLanguage(map, locale) {
|
|
39
|
+
const key = languageKeyRead(map, locale);
|
|
40
|
+
const picked = key ? map[key] : void 0;
|
|
41
|
+
return typeof picked === "string" ? picked : "";
|
|
42
|
+
}
|
|
28
43
|
export function resolveLocalized(value, locale = uiLocale.value) {
|
|
29
44
|
if (value === null || value === void 0) return "";
|
|
30
45
|
if (typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* COUNTING TICKS, NOT READING A CLOCK, and that is deliberate twice over. The tick
|
|
18
18
|
* is the only thing that has actually happened — a wall-clock reading would make
|
|
19
19
|
* this disagree with a `setInterval` the browser throttled in a background tab. And
|
|
20
|
-
* `specs/runs.md` AC-
|
|
20
|
+
* `specs/runs.md` AC-8's test installs Playwright's fake clock and fast-forwards
|
|
21
21
|
* it; a `Date.now()` in here would read the fake time, which is the kind of
|
|
22
22
|
* coupling that makes a test pass for the wrong reason.
|
|
23
23
|
*
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/integrations/…` paths a host actually serves, out of the route records its
|
|
3
|
+
* router hands back.
|
|
4
|
+
*
|
|
5
|
+
* The dashboard's four shortcuts into Import & Export, the SFTP server, the event
|
|
6
|
+
* stream and inbound webhooks point at pages this module does not have — they are
|
|
7
|
+
* the host's (PO-223, [`docs/host-surfaces.md`](../../../docs/host-surfaces.md)) —
|
|
8
|
+
* so each card is offered as a way in only where the host has the path.
|
|
9
|
+
*
|
|
10
|
+
* It lives here rather than in the page for the same reason `scanRoutes` lives in
|
|
11
|
+
* `src/pageRoutes.ts`: the trailing-slash strip and the decision to compare exactly
|
|
12
|
+
* are what the doc names as the *misinforming* failure mode, and prose does not
|
|
13
|
+
* fail. `servedPaths.test.ts` pins the three cases that matter.
|
|
14
|
+
*
|
|
15
|
+
* **Exact strings, deliberately.** A parametrised page registers
|
|
16
|
+
* `/integrations/:surface`, and a route-prefixing i18n strategy registers
|
|
17
|
+
* `/en/integrations/io`; neither is one of the four literals, so a host built that
|
|
18
|
+
* way is told its own surfaces live elsewhere. That is the documented limit of the
|
|
19
|
+
* question — narrower than resolving through the matcher, which a host with a
|
|
20
|
+
* catch-all page answers "yes" to everywhere.
|
|
21
|
+
*/
|
|
22
|
+
export declare function servedPaths(routePaths: string[]): Set<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenexx/studio-integrations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Integration Studio (core: workflows, node editor, runs, schedules, credentials, secrets, audit) as a standalone, publishable Nuxt module.",
|
|
6
6
|
"repository": {
|