@aglyn/plugins-workflows 1.0.0-beta.269 → 1.0.0-beta.270
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": "@aglyn/plugins-workflows",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.270",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://aglyn.com",
|
|
6
6
|
"repository": {
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aglyn/aglyn": "1.0.0-beta.
|
|
29
|
-
"@aglyn/shared-data-mdi": "1.0.0-beta.
|
|
30
|
-
"@aglyn/shared-ui-jsx": "1.0.0-beta.
|
|
31
|
-
"@aglyn/shared-ui-next": "1.0.0-beta.
|
|
32
|
-
"@aglyn/shared-ui-snackstack": "1.0.0-beta.
|
|
33
|
-
"@aglyn/shared-util-email": "1.0.0-beta.
|
|
34
|
-
"@aglyn/shared-util-http": "1.0.0-beta.
|
|
35
|
-
"@aglyn/shared-util-timestamp": "1.0.0-beta.
|
|
36
|
-
"@aglyn/tenant-data-admin": "1.0.0-beta.
|
|
37
|
-
"@aglyn/tenant-feature-instance": "1.0.0-beta.
|
|
38
|
-
"@aglyn/tenant-runtime": "1.0.0-beta.
|
|
28
|
+
"@aglyn/aglyn": "1.0.0-beta.270",
|
|
29
|
+
"@aglyn/shared-data-mdi": "1.0.0-beta.270",
|
|
30
|
+
"@aglyn/shared-ui-jsx": "1.0.0-beta.270",
|
|
31
|
+
"@aglyn/shared-ui-next": "1.0.0-beta.270",
|
|
32
|
+
"@aglyn/shared-ui-snackstack": "1.0.0-beta.270",
|
|
33
|
+
"@aglyn/shared-util-email": "1.0.0-beta.270",
|
|
34
|
+
"@aglyn/shared-util-http": "1.0.0-beta.270",
|
|
35
|
+
"@aglyn/shared-util-timestamp": "1.0.0-beta.270",
|
|
36
|
+
"@aglyn/tenant-data-admin": "1.0.0-beta.270",
|
|
37
|
+
"@aglyn/tenant-feature-instance": "1.0.0-beta.270",
|
|
38
|
+
"@aglyn/tenant-runtime": "1.0.0-beta.270",
|
|
39
39
|
"@swc/helpers": "0.5.23"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -20,6 +20,8 @@ import { registerVariableComputer } from "@aglyn/aglyn/plugin-manager/computed-v
|
|
|
20
20
|
import { registerPluginDependentsSource } from "@aglyn/aglyn/plugin-manager/plugin-dependents";
|
|
21
21
|
import { registerPluginRecordIndex } from "@aglyn/aglyn/plugin-manager/plugin-record-index";
|
|
22
22
|
import { registerPluginTransferResource } from "@aglyn/aglyn/plugin-manager/plugin-transfer-resources";
|
|
23
|
+
import { registerPluginSearchSources } from "@aglyn/aglyn/plugin-manager/plugin-search-sources";
|
|
24
|
+
import { WORKFLOWS_SEARCH_SOURCES } from "./model/workflows-search-sources.js";
|
|
23
25
|
import { BUNDLE_ID } from "./constants/bundle-common.js";
|
|
24
26
|
import { ORG_AUTOMATION_PACKAGE_RULES, ORG_AUTOMATIONS_TRANSFER_KEY, orgAutomationDependencies, rawOrgAutomationContent, remapOrgAutomationIds } from "./transfer/org-automations-package.js";
|
|
25
27
|
/** The org automations package's server half (AGL-3535), loaded when an import or export first asks. */ const automationsPackage = async ()=>(await import("./transfer/org-automations-package.server.js")).createOrgAutomationsPackage();
|
|
@@ -109,6 +111,13 @@ import { ORG_AUTOMATION_PACKAGE_RULES, ORG_AUTOMATIONS_TRANSFER_KEY, orgAutomati
|
|
|
109
111
|
}, {
|
|
110
112
|
pluginId: BUNDLE_ID
|
|
111
113
|
});
|
|
114
|
+
// What the native apps' one box finds in a site's automation (AGL-3943):
|
|
115
|
+
// the palette's own group, under the extension's plan flag. Plain data, so
|
|
116
|
+
// registering it in the tenant process too costs nothing.
|
|
117
|
+
registerPluginSearchSources(WORKFLOWS_SEARCH_SOURCES, {
|
|
118
|
+
pluginId: BUNDLE_ID,
|
|
119
|
+
featureFlag: 'workflows'
|
|
120
|
+
});
|
|
112
121
|
}
|
|
113
122
|
function lazyIndex(name) {
|
|
114
123
|
const load = async ()=>(await import("./server/automation-record-index.js"))[name];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/plugins/workflows/src/lib/declarations.server.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// The registry from its own module, not the runtime barrel: boot needs the\n// registry and nothing else, and the barrel reaches the data layer.\nimport {\n type HostEventListener,\n registerHostEventListener,\n} from '@aglyn/tenant-runtime/host-event-listeners'\nimport { registerVariableComputer } from '@aglyn/aglyn/plugin-manager/computed-variables'\nimport { registerPluginDependentsSource } from '@aglyn/aglyn/plugin-manager/plugin-dependents'\nimport {\n registerPluginRecordIndex,\n type PluginRecordIndex,\n} from '@aglyn/aglyn/plugin-manager/plugin-record-index'\nimport { registerPluginTransferResource } from '@aglyn/aglyn/plugin-manager/plugin-transfer-resources'\nimport { BUNDLE_ID } from './constants/bundle-common'\nimport {\n ORG_AUTOMATION_PACKAGE_RULES,\n ORG_AUTOMATIONS_TRANSFER_KEY,\n orgAutomationDependencies,\n rawOrgAutomationContent,\n remapOrgAutomationIds,\n} from './transfer/org-automations-package'\n\n/** The org automations package's server half (AGL-3535), loaded when an import or export first asks. */\nconst automationsPackage = async () =>\n (await import('./transfer/org-automations-package.server')).createOrgAutomationsPackage()\n\n/**\n * The automation engine, as the runtime hears it.\n *\n * Light by construction: the engine is imported when the first event\n * arrives, not when the process starts, so a process that never sees an\n * event pays for this object and nothing else.\n */\nexport const workflowsHostEventListener: HostEventListener = {\n async onEvent(hostId, event, payload, context) {\n const [{ runEventAutomations }, { withRunTriggerActor }] = await Promise.all([\n import('./engine/run-event-automations'),\n import('./engine/run-trigger-actor'),\n ])\n // Every run this event causes records who caused it (AGL-3376).\n return await withRunTriggerActor(context?.actor, () =>\n runEventAutomations(hostId, event, payload),\n )\n },\n async onDispatch(hostId, automationId, event, payload, context) {\n const [{ runSingleAction }, { withRunTriggerActor }] = await Promise.all([\n import('./engine/run-event-actions'),\n import('./engine/run-trigger-actor'),\n ])\n // A page-fired automation is always a visitor on the published page.\n return await withRunTriggerActor(context?.actor ?? { kind: 'visitor' }, () =>\n runSingleAction(hostId, automationId, event, payload),\n )\n },\n}\n\n/**\n * The plugin's SERVER declarations: what the server must know at boot,\n * before any door of the plugin has been called.\n *\n * The engine's host-event listener, because the doors that raise the events\n * mostly never load this plugin. A form submission and a page view are core\n * routes; a contact captured by a Stripe webhook is a core capture door. Each\n * calls `emitHostEvent`, and the listener has to be registered before the\n * first of them arrives — which is what running this from both apps'\n * `instrumentation.ts` gives.\n *\n * The indexes of the site's workflows, webhooks and actions, so another\n * surface — an AI job — reads them without reaching for this plugin's\n * collections; the workflows that call a function, which the \"Used by\"\n * scan asks this plugin for; and the site variables a workflow computes,\n * which every published page's compose asks for.\n *\n * Also called from the plugin's own API register functions, so a process\n * whose boot did not run it still registers the listener the first time a\n * plugin door loads. Registering twice replaces in place.\n */\nexport function registerWorkflowsServerDeclarations(): void {\n // Org automations in a workspace package (AGL-3535).\n registerPluginTransferResource(\n ORG_AUTOMATIONS_TRANSFER_KEY,\n {\n items: async (ctx) => (await automationsPackage()).items(ctx),\n dependencies: (item) => orgAutomationDependencies(rawOrgAutomationContent(item)),\n remapIds: (item, idMap) => remapOrgAutomationIds(rawOrgAutomationContent(item), idMap),\n readItems: async (ctx, ids) => (await automationsPackage()).readItems(ctx, ids),\n writeItems: async (ctx, items, writer) => (await automationsPackage()).writeItems(ctx, items as never, writer),\n revertItems: async (ctx, steps) => (await automationsPackage()).revertItems(ctx, steps as never),\n problems: async (ctx, write) => (await automationsPackage()).problems(ctx, write as never),\n referenceTargets: async (ctx, kinds) => (await automationsPackage()).referenceTargets(ctx, kinds),\n rules: ORG_AUTOMATION_PACKAGE_RULES,\n },\n { pluginId: BUNDLE_ID },\n )\n registerHostEventListener(BUNDLE_ID, workflowsHostEventListener)\n // The readers and the Admin SDK arrive with the first read, not with the boot.\n registerPluginRecordIndex('workflow', lazyIndex('workflowRecordIndex'), { pluginId: BUNDLE_ID })\n registerPluginRecordIndex('webhook', lazyIndex('webhookRecordIndex'), { pluginId: BUNDLE_ID })\n registerPluginRecordIndex('action', lazyIndex('actionRecordIndex'), { pluginId: BUNDLE_ID })\n registerPluginDependentsSource(\n {\n kinds: ['function'],\n find: async (request) =>\n (await import('./server/workflow-dependents')).findFunctionDependents(request),\n },\n { pluginId: BUNDLE_ID },\n )\n registerVariableComputer(\n {\n prepare: async (hostId) =>\n (await import('./server/workflow-variables')).prepareWorkflowVariables(hostId),\n },\n { pluginId: BUNDLE_ID },\n )\n}\n\ntype IndexName = 'workflowRecordIndex' | 'webhookRecordIndex' | 'actionRecordIndex'\n\nfunction lazyIndex(name: IndexName): PluginRecordIndex {\n const load = async () => (await import('./server/automation-record-index'))[name]\n return {\n list: async (request) => (await load()).list(request),\n get: async (request) => (await load()).get(request),\n }\n}\n"],"names":["registerHostEventListener","registerVariableComputer","registerPluginDependentsSource","registerPluginRecordIndex","registerPluginTransferResource","BUNDLE_ID","ORG_AUTOMATION_PACKAGE_RULES","ORG_AUTOMATIONS_TRANSFER_KEY","orgAutomationDependencies","rawOrgAutomationContent","remapOrgAutomationIds","automationsPackage","createOrgAutomationsPackage","workflowsHostEventListener","onEvent","hostId","event","payload","context","runEventAutomations","withRunTriggerActor","Promise","all","actor","onDispatch","automationId","runSingleAction","kind","registerWorkflowsServerDeclarations","items","ctx","dependencies","item","remapIds","idMap","readItems","ids","writeItems","writer","revertItems","steps","problems","write","referenceTargets","kinds","rules","pluginId","lazyIndex","find","request","findFunctionDependents","prepare","prepareWorkflowVariables","name","load","list","get"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,2EAA2E;AAC3E,oEAAoE;AACpE,SAEEA,yBAAyB,QACpB,6CAA4C;AACnD,SAASC,wBAAwB,QAAQ,iDAAgD;AACzF,SAASC,8BAA8B,QAAQ,gDAA+C;AAC9F,SACEC,yBAAyB,QAEpB,kDAAiD;AACxD,SAASC,8BAA8B,QAAQ,wDAAuD;AACtG,SAASC,SAAS,QAAQ,+BAA2B;AACrD,SACEC,4BAA4B,EAC5BC,4BAA4B,EAC5BC,yBAAyB,EACzBC,uBAAuB,EACvBC,qBAAqB,QAChB,wCAAoC;AAE3C,sGAAsG,GACtG,MAAMC,qBAAqB,UACzB,AAAC,CAAA,MAAM,MAAM,CAAC,+CAA2C,EAAGC,2BAA2B;AAEzF;;;;;;CAMC,GACD,OAAO,MAAMC,6BAAgD;IAC3D,MAAMC,SAAQC,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEC,OAAO;QAC3C,MAAM,CAAC,EAAEC,mBAAmB,EAAE,EAAE,EAAEC,mBAAmB,EAAE,CAAC,GAAG,MAAMC,QAAQC,GAAG,CAAC;YAC3E,MAAM,CAAC;YACP,MAAM,CAAC;SACR;QACD,gEAAgE;QAChE,OAAO,MAAMF,oBAAoBF,2BAAAA,QAASK,KAAK,EAAE,IAC/CJ,oBAAoBJ,QAAQC,OAAOC;IAEvC;IACA,MAAMO,YAAWT,MAAM,EAAEU,YAAY,EAAET,KAAK,EAAEC,OAAO,EAAEC,OAAO;;QAC5D,MAAM,CAAC,EAAEQ,eAAe,EAAE,EAAE,EAAEN,mBAAmB,EAAE,CAAC,GAAG,MAAMC,QAAQC,GAAG,CAAC;YACvE,MAAM,CAAC;Y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nBI,MAAM,OAAOC,UACX,AAAC,CAAA,MAAM,MAAM,CAAC,kCAA8B,EAAGC,sBAAsB,CAACD;IAC1E,GACA;QAAEH,UAAUzC;IAAU;IAExBJ,yBACE;QACEkD,SAAS,OAAOpC,SACd,AAAC,CAAA,MAAM,MAAM,CAAC,iCAA6B,EAAGqC,wBAAwB,CAACrC;IAC3E,GACA;QAAE+B,UAAUzC;IAAU;AAE1B;AAIA,SAAS0C,UAAUM,IAAe;IAChC,MAAMC,OAAO,UAAY,AAAC,CAAA,MAAM,MAAM,CAAC,sCAAkC,CAAE,CAACD,KAAK;IACjF,OAAO;QACLE,MAAM,OAAON,UAAY,AAAC,CAAA,MAAMK,MAAK,EAAGC,IAAI,CAACN;QAC7CO,KAAK,OAAOP,UAAY,AAAC,CAAA,MAAMK,MAAK,EAAGE,GAAG,CAACP;IAC7C;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/workflows/src/lib/declarations.server.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// The registry from its own module, not the runtime barrel: boot needs the\n// registry and nothing else, and the barrel reaches the data layer.\nimport {\n type HostEventListener,\n registerHostEventListener,\n} from '@aglyn/tenant-runtime/host-event-listeners'\nimport { registerVariableComputer } from '@aglyn/aglyn/plugin-manager/computed-variables'\nimport { registerPluginDependentsSource } from '@aglyn/aglyn/plugin-manager/plugin-dependents'\nimport {\n registerPluginRecordIndex,\n type PluginRecordIndex,\n} from '@aglyn/aglyn/plugin-manager/plugin-record-index'\nimport { registerPluginTransferResource } from '@aglyn/aglyn/plugin-manager/plugin-transfer-resources'\nimport { registerPluginSearchSources } from '@aglyn/aglyn/plugin-manager/plugin-search-sources'\nimport { WORKFLOWS_SEARCH_SOURCES } from './model/workflows-search-sources'\nimport { BUNDLE_ID } from './constants/bundle-common'\nimport {\n ORG_AUTOMATION_PACKAGE_RULES,\n ORG_AUTOMATIONS_TRANSFER_KEY,\n orgAutomationDependencies,\n rawOrgAutomationContent,\n remapOrgAutomationIds,\n} from './transfer/org-automations-package'\n\n/** The org automations package's server half (AGL-3535), loaded when an import or export first asks. */\nconst automationsPackage = async () =>\n (await import('./transfer/org-automations-package.server')).createOrgAutomationsPackage()\n\n/**\n * The automation engine, as the runtime hears it.\n *\n * Light by construction: the engine is imported when the first event\n * arrives, not when the process starts, so a process that never sees an\n * event pays for this object and nothing else.\n */\nexport const workflowsHostEventListener: HostEventListener = {\n async onEvent(hostId, event, payload, context) {\n const [{ runEventAutomations }, { withRunTriggerActor }] = await Promise.all([\n import('./engine/run-event-automations'),\n import('./engine/run-trigger-actor'),\n ])\n // Every run this event causes records who caused it (AGL-3376).\n return await withRunTriggerActor(context?.actor, () =>\n runEventAutomations(hostId, event, payload),\n )\n },\n async onDispatch(hostId, automationId, event, payload, context) {\n const [{ runSingleAction }, { withRunTriggerActor }] = await Promise.all([\n import('./engine/run-event-actions'),\n import('./engine/run-trigger-actor'),\n ])\n // A page-fired automation is always a visitor on the published page.\n return await withRunTriggerActor(context?.actor ?? { kind: 'visitor' }, () =>\n runSingleAction(hostId, automationId, event, payload),\n )\n },\n}\n\n/**\n * The plugin's SERVER declarations: what the server must know at boot,\n * before any door of the plugin has been called.\n *\n * The engine's host-event listener, because the doors that raise the events\n * mostly never load this plugin. A form submission and a page view are core\n * routes; a contact captured by a Stripe webhook is a core capture door. Each\n * calls `emitHostEvent`, and the listener has to be registered before the\n * first of them arrives — which is what running this from both apps'\n * `instrumentation.ts` gives.\n *\n * The indexes of the site's workflows, webhooks and actions, so another\n * surface — an AI job — reads them without reaching for this plugin's\n * collections; the workflows that call a function, which the \"Used by\"\n * scan asks this plugin for; and the site variables a workflow computes,\n * which every published page's compose asks for.\n *\n * Also called from the plugin's own API register functions, so a process\n * whose boot did not run it still registers the listener the first time a\n * plugin door loads. Registering twice replaces in place.\n */\nexport function registerWorkflowsServerDeclarations(): void {\n // Org automations in a workspace package (AGL-3535).\n registerPluginTransferResource(\n ORG_AUTOMATIONS_TRANSFER_KEY,\n {\n items: async (ctx) => (await automationsPackage()).items(ctx),\n dependencies: (item) => orgAutomationDependencies(rawOrgAutomationContent(item)),\n remapIds: (item, idMap) => remapOrgAutomationIds(rawOrgAutomationContent(item), idMap),\n readItems: async (ctx, ids) => (await automationsPackage()).readItems(ctx, ids),\n writeItems: async (ctx, items, writer) => (await automationsPackage()).writeItems(ctx, items as never, writer),\n revertItems: async (ctx, steps) => (await automationsPackage()).revertItems(ctx, steps as never),\n problems: async (ctx, write) => (await automationsPackage()).problems(ctx, write as never),\n referenceTargets: async (ctx, kinds) => (await automationsPackage()).referenceTargets(ctx, kinds),\n rules: ORG_AUTOMATION_PACKAGE_RULES,\n },\n { pluginId: BUNDLE_ID },\n )\n registerHostEventListener(BUNDLE_ID, workflowsHostEventListener)\n // The readers and the Admin SDK arrive with the first read, not with the boot.\n registerPluginRecordIndex('workflow', lazyIndex('workflowRecordIndex'), { pluginId: BUNDLE_ID })\n registerPluginRecordIndex('webhook', lazyIndex('webhookRecordIndex'), { pluginId: BUNDLE_ID })\n registerPluginRecordIndex('action', lazyIndex('actionRecordIndex'), { pluginId: BUNDLE_ID })\n registerPluginDependentsSource(\n {\n kinds: ['function'],\n find: async (request) =>\n (await import('./server/workflow-dependents')).findFunctionDependents(request),\n },\n { pluginId: BUNDLE_ID },\n )\n registerVariableComputer(\n {\n prepare: async (hostId) =>\n (await import('./server/workflow-variables')).prepareWorkflowVariables(hostId),\n },\n { pluginId: BUNDLE_ID },\n )\n // What the native apps' one box finds in a site's automation (AGL-3943):\n // the palette's own group, under the extension's plan flag. Plain data, so\n // registering it in the tenant process too costs nothing.\n registerPluginSearchSources(WORKFLOWS_SEARCH_SOURCES, { pluginId: BUNDLE_ID, featureFlag: 'workflows' })\n}\n\ntype IndexName = 'workflowRecordIndex' | 'webhookRecordIndex' | 'actionRecordIndex'\n\nfunction lazyIndex(name: IndexName): PluginRecordIndex {\n const load = async () => (await import('./server/automation-record-index'))[name]\n return {\n list: async (request) => (await load()).list(request),\n get: async (request) => (await load()).get(request),\n }\n}\n"],"names":["registerHostEventListener","registerVariableComputer","registerPluginDependentsSource","registerPluginRecordIndex","registerPluginTransferResource","registerPluginSearchSources","WORKFLOWS_SEARCH_SOURCES","BUNDLE_ID","ORG_AUTOMATION_PACKAGE_RULES","ORG_AUTOMATIONS_TRANSFER_KEY","orgAutomationDependencies","rawOrgAutomationContent","remapOrgAutomationIds","automationsPackage","createOrgAutomationsPackage","workflowsHostEventListener","onEvent","hostId","event","payload","context","runEventAutomations","withRunTriggerActor","Promise","all","actor","onDispatch","automationId","runSingleAction","kind","registerWorkflowsServerDeclarations","items","ctx","dependencies","item","remapIds","idMap","readItems","ids","writeItems","writer","revertItems","steps","problems","write","referenceTargets","kinds","rules","pluginId","lazyIndex","find","request","findFunctionDependents","prepare","prepareWorkflowVariables","featureFlag","name","load","list","get"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,2EAA2E;AAC3E,oEAAoE;AACpE,SAEEA,yBAAyB,QACpB,6CAA4C;AACnD,SAASC,wBAAwB,QAAQ,iDAAgD;AACzF,SAASC,8BAA8B,QAAQ,gDAA+C;AAC9F,SACEC,yBAAyB,QAEpB,kDAAiD;AACxD,SAASC,8BAA8B,QAAQ,wDAAuD;AACtG,SAASC,2BAA2B,QAAQ,oDAAmD;AAC/F,SAASC,wBAAwB,QAAQ,sCAAkC;AAC3E,SAASC,SAAS,QAAQ,+BAA2B;AACrD,SACEC,4BAA4B,EAC5BC,4BAA4B,EAC5BC,yBAAyB,EACzBC,uBAAuB,EACvBC,qBAA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EAAGC,IAAI,CAACP;QAC7CQ,KAAK,OAAOR,UAAY,AAAC,CAAA,MAAMM,MAAK,EAAGE,GAAG,CAACR;IAC7C;AACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { type NativeNavContribution } from '@aglyn/aglyn/app-utils/native-nav';
|
|
18
|
+
/**
|
|
19
|
+
* Automation in the native apps' navigation (AGL-3943): the rows this plugin
|
|
20
|
+
* adds to the manifest the shells draw, placed into the core's lists by
|
|
21
|
+
* `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the
|
|
22
|
+
* console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.
|
|
23
|
+
*
|
|
24
|
+
* Imports only the core's plain nav module, so the native contracts read it.
|
|
25
|
+
*/
|
|
26
|
+
export declare const NATIVE_NAV_ROWS: readonly NativeNavContribution[];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { nativeNavIcon, nativeNavRef } from "@aglyn/aglyn/app-utils/native-nav";
|
|
17
|
+
/**
|
|
18
|
+
* Automation in the native apps' navigation (AGL-3943): the rows this plugin
|
|
19
|
+
* adds to the manifest the shells draw, placed into the core's lists by
|
|
20
|
+
* `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the
|
|
21
|
+
* console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.
|
|
22
|
+
*
|
|
23
|
+
* Imports only the core's plain nav module, so the native contracts read it.
|
|
24
|
+
*/ export const NATIVE_NAV_ROWS = [
|
|
25
|
+
{
|
|
26
|
+
list: 'workspace',
|
|
27
|
+
group: 'workspace',
|
|
28
|
+
row: {
|
|
29
|
+
id: 'automation',
|
|
30
|
+
label: 'Automation',
|
|
31
|
+
icon: nativeNavIcon('bolt', 'bolt'),
|
|
32
|
+
screen: 'workflows.org-automation',
|
|
33
|
+
pluginId: 'workflows',
|
|
34
|
+
order: 60,
|
|
35
|
+
docs: '/marketing-and-automation/workflows-and-actions/overview',
|
|
36
|
+
console: nativeNavRef('orgPluginTab', '/automation')
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
list: 'site',
|
|
41
|
+
group: 'more',
|
|
42
|
+
row: {
|
|
43
|
+
id: 'automation',
|
|
44
|
+
label: 'Automation',
|
|
45
|
+
icon: nativeNavIcon('bolt', 'bolt'),
|
|
46
|
+
screen: 'workflows.automation',
|
|
47
|
+
pluginId: 'workflows',
|
|
48
|
+
order: 10,
|
|
49
|
+
docs: '/marketing-and-automation/workflows-and-actions/overview',
|
|
50
|
+
console: nativeNavRef('hostPluginTab', '/automation')
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=native-nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/workflows/src/lib/native-nav.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n nativeNavIcon,\n nativeNavRef,\n type NativeNavContribution,\n} from '@aglyn/aglyn/app-utils/native-nav'\n\n/**\n * Automation in the native apps' navigation (AGL-3943): the rows this plugin\n * adds to the manifest the shells draw, placed into the core's lists by\n * `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the\n * console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.\n *\n * Imports only the core's plain nav module, so the native contracts read it.\n */\n\nexport const NATIVE_NAV_ROWS: readonly NativeNavContribution[] = [\n {\n list: 'workspace',\n group: 'workspace',\n row: {\n id: 'automation',\n label: 'Automation',\n icon: nativeNavIcon('bolt', 'bolt'),\n screen: 'workflows.org-automation',\n pluginId: 'workflows',\n order: 60,\n docs: '/marketing-and-automation/workflows-and-actions/overview',\n console: nativeNavRef('orgPluginTab', '/automation'),\n },\n },\n {\n list: 'site',\n group: 'more',\n row: {\n id: 'automation',\n label: 'Automation',\n icon: nativeNavIcon('bolt', 'bolt'),\n screen: 'workflows.automation',\n pluginId: 'workflows',\n order: 10,\n docs: '/marketing-and-automation/workflows-and-actions/overview',\n console: nativeNavRef('hostPluginTab', '/automation'),\n },\n },\n]\n"],"names":["nativeNavIcon","nativeNavRef","NATIVE_NAV_ROWS","list","group","row","id","label","icon","screen","pluginId","order","docs","console"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,aAAa,EACbC,YAAY,QAEP,oCAAmC;AAE1C;;;;;;;CAOC,GAED,OAAO,MAAMC,kBAAoD;IAC/D;QACEC,MAAM;QACNC,OAAO;QACPC,KAAK;YACHC,IAAI;YACJC,OAAO;YACPC,MAAMR,cAAc,QAAQ;YAC5BS,QAAQ;YACRC,UAAU;YACVC,OAAO;YACPC,MAAM;YACNC,SAASZ,aAAa,gBAAgB;QACxC;IACF;IACA;QACEE,MAAM;QACNC,OAAO;QACPC,KAAK;YACHC,IAAI;YACJC,OAAO;YACPC,MAAMR,cAAc,QAAQ;YAC5BS,QAAQ;YACRC,UAAU;YACVC,OAAO;YACPC,MAAM;YACNC,SAASZ,aAAa,iBAAiB;QACzC;IACF;CACD,CAAA"}
|