@ever-works/everworks-playbooks-plugin 1.0.10 → 1.0.14
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/dist/index.cjs +26 -21
- package/dist/index.js +26 -21
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -106,7 +106,9 @@ var USER_SELECTABLE_WORK_KINDS = [
|
|
|
106
106
|
"directory",
|
|
107
107
|
"awesome-repo",
|
|
108
108
|
"repo",
|
|
109
|
-
"app"
|
|
109
|
+
"app",
|
|
110
|
+
"knowledge-base",
|
|
111
|
+
"store"
|
|
110
112
|
];
|
|
111
113
|
var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
|
|
112
114
|
new Set(WORK_KINDS);
|
|
@@ -116,6 +118,9 @@ var RECORD_VISIBILITIES = ["private", "team", "organization"];
|
|
|
116
118
|
new Set(RECORD_VISIBILITIES);
|
|
117
119
|
var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
|
|
118
120
|
new Set(RECORD_LIST_VIEWS);
|
|
121
|
+
new Set(
|
|
122
|
+
"a abbr address applet area article aside audio b base bdi bdo big blockquote body br button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl dt em embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe image img input ins kbd label legend li link main map mark marquee math menu meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script search section select slot small source span strike strong style sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr xmp".split(" ")
|
|
123
|
+
);
|
|
119
124
|
var VERSION = "1.0.0";
|
|
120
125
|
var GTM_SKILLS = [
|
|
121
126
|
// ── research ────────────────────────────────────────────────────────
|
|
@@ -1900,54 +1905,54 @@ function acceptPlaybookEntry(value) {
|
|
|
1900
1905
|
return violation ? { entry: null, violation } : { entry: sanitized, violation: null };
|
|
1901
1906
|
}
|
|
1902
1907
|
function sanitizePlaybookEntry(entry) {
|
|
1903
|
-
const
|
|
1904
|
-
const optionalText = (value) => value === void 0 ? void 0 :
|
|
1908
|
+
const text2 = (value, max = PLAYBOOK_TEXT_LIMITS.shortText) => sanitizePlaybookText(value ?? "", max);
|
|
1909
|
+
const optionalText = (value) => value === void 0 ? void 0 : text2(value);
|
|
1905
1910
|
const trigger = {
|
|
1906
1911
|
kind: entry.trigger.kind,
|
|
1907
|
-
description:
|
|
1912
|
+
description: text2(entry.trigger.description)
|
|
1908
1913
|
};
|
|
1909
|
-
if (entry.trigger.cadence !== void 0) Object.assign(trigger, { cadence:
|
|
1914
|
+
if (entry.trigger.cadence !== void 0) Object.assign(trigger, { cadence: text2(entry.trigger.cadence, 64) });
|
|
1910
1915
|
if (entry.trigger.defaultLocalTime !== void 0) {
|
|
1911
|
-
Object.assign(trigger, { defaultLocalTime:
|
|
1916
|
+
Object.assign(trigger, { defaultLocalTime: text2(entry.trigger.defaultLocalTime, 5) });
|
|
1912
1917
|
}
|
|
1913
1918
|
return {
|
|
1914
1919
|
...entry,
|
|
1915
|
-
title:
|
|
1916
|
-
outcome:
|
|
1917
|
-
summary:
|
|
1918
|
-
icon:
|
|
1920
|
+
title: text2(entry.title, PLAYBOOK_TEXT_LIMITS.title),
|
|
1921
|
+
outcome: text2(entry.outcome, PLAYBOOK_TEXT_LIMITS.outcome),
|
|
1922
|
+
summary: text2(entry.summary, PLAYBOOK_TEXT_LIMITS.summary),
|
|
1923
|
+
icon: text2(entry.icon, 32),
|
|
1919
1924
|
trigger,
|
|
1920
1925
|
steps: entry.steps.map((step) => ({
|
|
1921
1926
|
...step,
|
|
1922
|
-
title:
|
|
1923
|
-
produces:
|
|
1927
|
+
title: text2(step.title, PLAYBOOK_TEXT_LIMITS.stepTitle),
|
|
1928
|
+
produces: text2(step.produces, PLAYBOOK_TEXT_LIMITS.stepProduces)
|
|
1924
1929
|
})),
|
|
1925
1930
|
connections: entry.connections.map((need) => {
|
|
1926
1931
|
const sanitized = {
|
|
1927
|
-
capability:
|
|
1932
|
+
capability: text2(need.capability, 64),
|
|
1928
1933
|
required: need.required,
|
|
1929
|
-
reason:
|
|
1934
|
+
reason: text2(need.reason, PLAYBOOK_TEXT_LIMITS.reason)
|
|
1930
1935
|
};
|
|
1931
1936
|
const degraded = optionalText(need.degradedWithout);
|
|
1932
1937
|
return degraded === void 0 ? sanitized : { ...sanitized, degradedWithout: degraded };
|
|
1933
1938
|
}),
|
|
1934
1939
|
artefacts: entry.artefacts.map((artefact) => ({
|
|
1935
1940
|
kind: artefact.kind,
|
|
1936
|
-
title:
|
|
1937
|
-
where:
|
|
1941
|
+
title: text2(artefact.title),
|
|
1942
|
+
where: text2(artefact.where)
|
|
1938
1943
|
})),
|
|
1939
1944
|
escalations: entry.escalations.map((point) => ({
|
|
1940
|
-
when:
|
|
1945
|
+
when: text2(point.when),
|
|
1941
1946
|
becomes: point.becomes,
|
|
1942
1947
|
carriesRecommendation: point.carriesRecommendation
|
|
1943
1948
|
})),
|
|
1944
|
-
tags: entry.tags.map((tag) =>
|
|
1949
|
+
tags: entry.tags.map((tag) => text2(tag, 40)).filter((tag) => tag.length > 0),
|
|
1945
1950
|
provision: {
|
|
1946
1951
|
...entry.provision,
|
|
1947
|
-
agentName:
|
|
1952
|
+
agentName: text2(entry.provision.agentName),
|
|
1948
1953
|
taskTemplate: {
|
|
1949
|
-
name:
|
|
1950
|
-
slug:
|
|
1954
|
+
name: text2(entry.provision.taskTemplate.name, PLAYBOOK_TEXT_LIMITS.title),
|
|
1955
|
+
slug: text2(entry.provision.taskTemplate.slug, 64)
|
|
1951
1956
|
}
|
|
1952
1957
|
}
|
|
1953
1958
|
};
|
package/dist/index.js
CHANGED
|
@@ -102,7 +102,9 @@ var USER_SELECTABLE_WORK_KINDS = [
|
|
|
102
102
|
"directory",
|
|
103
103
|
"awesome-repo",
|
|
104
104
|
"repo",
|
|
105
|
-
"app"
|
|
105
|
+
"app",
|
|
106
|
+
"knowledge-base",
|
|
107
|
+
"store"
|
|
106
108
|
];
|
|
107
109
|
var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
|
|
108
110
|
new Set(WORK_KINDS);
|
|
@@ -112,6 +114,9 @@ var RECORD_VISIBILITIES = ["private", "team", "organization"];
|
|
|
112
114
|
new Set(RECORD_VISIBILITIES);
|
|
113
115
|
var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
|
|
114
116
|
new Set(RECORD_LIST_VIEWS);
|
|
117
|
+
new Set(
|
|
118
|
+
"a abbr address applet area article aside audio b base bdi bdo big blockquote body br button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl dt em embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe image img input ins kbd label legend li link main map mark marquee math menu meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script search section select slot small source span strike strong style sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr xmp".split(" ")
|
|
119
|
+
);
|
|
115
120
|
var VERSION = "1.0.0";
|
|
116
121
|
var GTM_SKILLS = [
|
|
117
122
|
// ── research ────────────────────────────────────────────────────────
|
|
@@ -1896,54 +1901,54 @@ function acceptPlaybookEntry(value) {
|
|
|
1896
1901
|
return violation ? { entry: null, violation } : { entry: sanitized, violation: null };
|
|
1897
1902
|
}
|
|
1898
1903
|
function sanitizePlaybookEntry(entry) {
|
|
1899
|
-
const
|
|
1900
|
-
const optionalText = (value) => value === void 0 ? void 0 :
|
|
1904
|
+
const text2 = (value, max = PLAYBOOK_TEXT_LIMITS.shortText) => sanitizePlaybookText(value ?? "", max);
|
|
1905
|
+
const optionalText = (value) => value === void 0 ? void 0 : text2(value);
|
|
1901
1906
|
const trigger = {
|
|
1902
1907
|
kind: entry.trigger.kind,
|
|
1903
|
-
description:
|
|
1908
|
+
description: text2(entry.trigger.description)
|
|
1904
1909
|
};
|
|
1905
|
-
if (entry.trigger.cadence !== void 0) Object.assign(trigger, { cadence:
|
|
1910
|
+
if (entry.trigger.cadence !== void 0) Object.assign(trigger, { cadence: text2(entry.trigger.cadence, 64) });
|
|
1906
1911
|
if (entry.trigger.defaultLocalTime !== void 0) {
|
|
1907
|
-
Object.assign(trigger, { defaultLocalTime:
|
|
1912
|
+
Object.assign(trigger, { defaultLocalTime: text2(entry.trigger.defaultLocalTime, 5) });
|
|
1908
1913
|
}
|
|
1909
1914
|
return {
|
|
1910
1915
|
...entry,
|
|
1911
|
-
title:
|
|
1912
|
-
outcome:
|
|
1913
|
-
summary:
|
|
1914
|
-
icon:
|
|
1916
|
+
title: text2(entry.title, PLAYBOOK_TEXT_LIMITS.title),
|
|
1917
|
+
outcome: text2(entry.outcome, PLAYBOOK_TEXT_LIMITS.outcome),
|
|
1918
|
+
summary: text2(entry.summary, PLAYBOOK_TEXT_LIMITS.summary),
|
|
1919
|
+
icon: text2(entry.icon, 32),
|
|
1915
1920
|
trigger,
|
|
1916
1921
|
steps: entry.steps.map((step) => ({
|
|
1917
1922
|
...step,
|
|
1918
|
-
title:
|
|
1919
|
-
produces:
|
|
1923
|
+
title: text2(step.title, PLAYBOOK_TEXT_LIMITS.stepTitle),
|
|
1924
|
+
produces: text2(step.produces, PLAYBOOK_TEXT_LIMITS.stepProduces)
|
|
1920
1925
|
})),
|
|
1921
1926
|
connections: entry.connections.map((need) => {
|
|
1922
1927
|
const sanitized = {
|
|
1923
|
-
capability:
|
|
1928
|
+
capability: text2(need.capability, 64),
|
|
1924
1929
|
required: need.required,
|
|
1925
|
-
reason:
|
|
1930
|
+
reason: text2(need.reason, PLAYBOOK_TEXT_LIMITS.reason)
|
|
1926
1931
|
};
|
|
1927
1932
|
const degraded = optionalText(need.degradedWithout);
|
|
1928
1933
|
return degraded === void 0 ? sanitized : { ...sanitized, degradedWithout: degraded };
|
|
1929
1934
|
}),
|
|
1930
1935
|
artefacts: entry.artefacts.map((artefact) => ({
|
|
1931
1936
|
kind: artefact.kind,
|
|
1932
|
-
title:
|
|
1933
|
-
where:
|
|
1937
|
+
title: text2(artefact.title),
|
|
1938
|
+
where: text2(artefact.where)
|
|
1934
1939
|
})),
|
|
1935
1940
|
escalations: entry.escalations.map((point) => ({
|
|
1936
|
-
when:
|
|
1941
|
+
when: text2(point.when),
|
|
1937
1942
|
becomes: point.becomes,
|
|
1938
1943
|
carriesRecommendation: point.carriesRecommendation
|
|
1939
1944
|
})),
|
|
1940
|
-
tags: entry.tags.map((tag) =>
|
|
1945
|
+
tags: entry.tags.map((tag) => text2(tag, 40)).filter((tag) => tag.length > 0),
|
|
1941
1946
|
provision: {
|
|
1942
1947
|
...entry.provision,
|
|
1943
|
-
agentName:
|
|
1948
|
+
agentName: text2(entry.provision.agentName),
|
|
1944
1949
|
taskTemplate: {
|
|
1945
|
-
name:
|
|
1946
|
-
slug:
|
|
1950
|
+
name: text2(entry.provision.taskTemplate.name, PLAYBOOK_TEXT_LIMITS.title),
|
|
1951
|
+
slug: text2(entry.provision.taskTemplate.slug, 64)
|
|
1947
1952
|
}
|
|
1948
1953
|
}
|
|
1949
1954
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ever-works/everworks-playbooks-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Ever Works Playbooks — first-party playbook-provider plugin supplying the built-in Playbook catalogue: packaged outcomes with their trigger, steps, required capabilities, artefacts and escalation points.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ever Co. LTD",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"test:coverage": "vitest run --coverage"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@ever-works/contracts": "^1.
|
|
37
|
-
"@ever-works/plugin": "^1.2.
|
|
36
|
+
"@ever-works/contracts": "^1.1.4",
|
|
37
|
+
"@ever-works/plugin": "^1.2.33"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"tsup": "^8.3.0",
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
},
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|
|
62
|
-
"url": "git+https://github.com/ever-
|
|
62
|
+
"url": "git+https://github.com/ever-co/ever-works.git",
|
|
63
63
|
"directory": "packages/plugins/everworks-playbooks"
|
|
64
64
|
},
|
|
65
|
-
"homepage": "https://github.com/ever-
|
|
65
|
+
"homepage": "https://github.com/ever-co/ever-works/tree/main/packages/plugins/everworks-playbooks#readme",
|
|
66
66
|
"bugs": {
|
|
67
|
-
"url": "https://github.com/ever-
|
|
67
|
+
"url": "https://github.com/ever-co/ever-works/issues"
|
|
68
68
|
},
|
|
69
69
|
"everworksRelease": {
|
|
70
|
-
"contentHash": "sha256:
|
|
71
|
-
"commit": "
|
|
72
|
-
"source": "https://github.com/ever-
|
|
70
|
+
"contentHash": "sha256:60e94746655dcbab2322946aeb3a0591ceef3fd2c2cbe2d055797e552a0ad2e9",
|
|
71
|
+
"commit": "c6b8fd57745689ed9be529bed3fe4bd3d4f85b67",
|
|
72
|
+
"source": "https://github.com/ever-co/ever-works/tree/c6b8fd57745689ed9be529bed3fe4bd3d4f85b67/packages/plugins/everworks-playbooks"
|
|
73
73
|
}
|
|
74
74
|
}
|