@ever-works/everworks-playbooks-plugin 1.0.10 → 1.0.13
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 +23 -20
- package/dist/index.js +23 -20
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -116,6 +116,9 @@ var RECORD_VISIBILITIES = ["private", "team", "organization"];
|
|
|
116
116
|
new Set(RECORD_VISIBILITIES);
|
|
117
117
|
var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
|
|
118
118
|
new Set(RECORD_LIST_VIEWS);
|
|
119
|
+
new Set(
|
|
120
|
+
"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(" ")
|
|
121
|
+
);
|
|
119
122
|
var VERSION = "1.0.0";
|
|
120
123
|
var GTM_SKILLS = [
|
|
121
124
|
// ── research ────────────────────────────────────────────────────────
|
|
@@ -1900,54 +1903,54 @@ function acceptPlaybookEntry(value) {
|
|
|
1900
1903
|
return violation ? { entry: null, violation } : { entry: sanitized, violation: null };
|
|
1901
1904
|
}
|
|
1902
1905
|
function sanitizePlaybookEntry(entry) {
|
|
1903
|
-
const
|
|
1904
|
-
const optionalText = (value) => value === void 0 ? void 0 :
|
|
1906
|
+
const text2 = (value, max = PLAYBOOK_TEXT_LIMITS.shortText) => sanitizePlaybookText(value ?? "", max);
|
|
1907
|
+
const optionalText = (value) => value === void 0 ? void 0 : text2(value);
|
|
1905
1908
|
const trigger = {
|
|
1906
1909
|
kind: entry.trigger.kind,
|
|
1907
|
-
description:
|
|
1910
|
+
description: text2(entry.trigger.description)
|
|
1908
1911
|
};
|
|
1909
|
-
if (entry.trigger.cadence !== void 0) Object.assign(trigger, { cadence:
|
|
1912
|
+
if (entry.trigger.cadence !== void 0) Object.assign(trigger, { cadence: text2(entry.trigger.cadence, 64) });
|
|
1910
1913
|
if (entry.trigger.defaultLocalTime !== void 0) {
|
|
1911
|
-
Object.assign(trigger, { defaultLocalTime:
|
|
1914
|
+
Object.assign(trigger, { defaultLocalTime: text2(entry.trigger.defaultLocalTime, 5) });
|
|
1912
1915
|
}
|
|
1913
1916
|
return {
|
|
1914
1917
|
...entry,
|
|
1915
|
-
title:
|
|
1916
|
-
outcome:
|
|
1917
|
-
summary:
|
|
1918
|
-
icon:
|
|
1918
|
+
title: text2(entry.title, PLAYBOOK_TEXT_LIMITS.title),
|
|
1919
|
+
outcome: text2(entry.outcome, PLAYBOOK_TEXT_LIMITS.outcome),
|
|
1920
|
+
summary: text2(entry.summary, PLAYBOOK_TEXT_LIMITS.summary),
|
|
1921
|
+
icon: text2(entry.icon, 32),
|
|
1919
1922
|
trigger,
|
|
1920
1923
|
steps: entry.steps.map((step) => ({
|
|
1921
1924
|
...step,
|
|
1922
|
-
title:
|
|
1923
|
-
produces:
|
|
1925
|
+
title: text2(step.title, PLAYBOOK_TEXT_LIMITS.stepTitle),
|
|
1926
|
+
produces: text2(step.produces, PLAYBOOK_TEXT_LIMITS.stepProduces)
|
|
1924
1927
|
})),
|
|
1925
1928
|
connections: entry.connections.map((need) => {
|
|
1926
1929
|
const sanitized = {
|
|
1927
|
-
capability:
|
|
1930
|
+
capability: text2(need.capability, 64),
|
|
1928
1931
|
required: need.required,
|
|
1929
|
-
reason:
|
|
1932
|
+
reason: text2(need.reason, PLAYBOOK_TEXT_LIMITS.reason)
|
|
1930
1933
|
};
|
|
1931
1934
|
const degraded = optionalText(need.degradedWithout);
|
|
1932
1935
|
return degraded === void 0 ? sanitized : { ...sanitized, degradedWithout: degraded };
|
|
1933
1936
|
}),
|
|
1934
1937
|
artefacts: entry.artefacts.map((artefact) => ({
|
|
1935
1938
|
kind: artefact.kind,
|
|
1936
|
-
title:
|
|
1937
|
-
where:
|
|
1939
|
+
title: text2(artefact.title),
|
|
1940
|
+
where: text2(artefact.where)
|
|
1938
1941
|
})),
|
|
1939
1942
|
escalations: entry.escalations.map((point) => ({
|
|
1940
|
-
when:
|
|
1943
|
+
when: text2(point.when),
|
|
1941
1944
|
becomes: point.becomes,
|
|
1942
1945
|
carriesRecommendation: point.carriesRecommendation
|
|
1943
1946
|
})),
|
|
1944
|
-
tags: entry.tags.map((tag) =>
|
|
1947
|
+
tags: entry.tags.map((tag) => text2(tag, 40)).filter((tag) => tag.length > 0),
|
|
1945
1948
|
provision: {
|
|
1946
1949
|
...entry.provision,
|
|
1947
|
-
agentName:
|
|
1950
|
+
agentName: text2(entry.provision.agentName),
|
|
1948
1951
|
taskTemplate: {
|
|
1949
|
-
name:
|
|
1950
|
-
slug:
|
|
1952
|
+
name: text2(entry.provision.taskTemplate.name, PLAYBOOK_TEXT_LIMITS.title),
|
|
1953
|
+
slug: text2(entry.provision.taskTemplate.slug, 64)
|
|
1951
1954
|
}
|
|
1952
1955
|
}
|
|
1953
1956
|
};
|
package/dist/index.js
CHANGED
|
@@ -112,6 +112,9 @@ var RECORD_VISIBILITIES = ["private", "team", "organization"];
|
|
|
112
112
|
new Set(RECORD_VISIBILITIES);
|
|
113
113
|
var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
|
|
114
114
|
new Set(RECORD_LIST_VIEWS);
|
|
115
|
+
new Set(
|
|
116
|
+
"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(" ")
|
|
117
|
+
);
|
|
115
118
|
var VERSION = "1.0.0";
|
|
116
119
|
var GTM_SKILLS = [
|
|
117
120
|
// ── research ────────────────────────────────────────────────────────
|
|
@@ -1896,54 +1899,54 @@ function acceptPlaybookEntry(value) {
|
|
|
1896
1899
|
return violation ? { entry: null, violation } : { entry: sanitized, violation: null };
|
|
1897
1900
|
}
|
|
1898
1901
|
function sanitizePlaybookEntry(entry) {
|
|
1899
|
-
const
|
|
1900
|
-
const optionalText = (value) => value === void 0 ? void 0 :
|
|
1902
|
+
const text2 = (value, max = PLAYBOOK_TEXT_LIMITS.shortText) => sanitizePlaybookText(value ?? "", max);
|
|
1903
|
+
const optionalText = (value) => value === void 0 ? void 0 : text2(value);
|
|
1901
1904
|
const trigger = {
|
|
1902
1905
|
kind: entry.trigger.kind,
|
|
1903
|
-
description:
|
|
1906
|
+
description: text2(entry.trigger.description)
|
|
1904
1907
|
};
|
|
1905
|
-
if (entry.trigger.cadence !== void 0) Object.assign(trigger, { cadence:
|
|
1908
|
+
if (entry.trigger.cadence !== void 0) Object.assign(trigger, { cadence: text2(entry.trigger.cadence, 64) });
|
|
1906
1909
|
if (entry.trigger.defaultLocalTime !== void 0) {
|
|
1907
|
-
Object.assign(trigger, { defaultLocalTime:
|
|
1910
|
+
Object.assign(trigger, { defaultLocalTime: text2(entry.trigger.defaultLocalTime, 5) });
|
|
1908
1911
|
}
|
|
1909
1912
|
return {
|
|
1910
1913
|
...entry,
|
|
1911
|
-
title:
|
|
1912
|
-
outcome:
|
|
1913
|
-
summary:
|
|
1914
|
-
icon:
|
|
1914
|
+
title: text2(entry.title, PLAYBOOK_TEXT_LIMITS.title),
|
|
1915
|
+
outcome: text2(entry.outcome, PLAYBOOK_TEXT_LIMITS.outcome),
|
|
1916
|
+
summary: text2(entry.summary, PLAYBOOK_TEXT_LIMITS.summary),
|
|
1917
|
+
icon: text2(entry.icon, 32),
|
|
1915
1918
|
trigger,
|
|
1916
1919
|
steps: entry.steps.map((step) => ({
|
|
1917
1920
|
...step,
|
|
1918
|
-
title:
|
|
1919
|
-
produces:
|
|
1921
|
+
title: text2(step.title, PLAYBOOK_TEXT_LIMITS.stepTitle),
|
|
1922
|
+
produces: text2(step.produces, PLAYBOOK_TEXT_LIMITS.stepProduces)
|
|
1920
1923
|
})),
|
|
1921
1924
|
connections: entry.connections.map((need) => {
|
|
1922
1925
|
const sanitized = {
|
|
1923
|
-
capability:
|
|
1926
|
+
capability: text2(need.capability, 64),
|
|
1924
1927
|
required: need.required,
|
|
1925
|
-
reason:
|
|
1928
|
+
reason: text2(need.reason, PLAYBOOK_TEXT_LIMITS.reason)
|
|
1926
1929
|
};
|
|
1927
1930
|
const degraded = optionalText(need.degradedWithout);
|
|
1928
1931
|
return degraded === void 0 ? sanitized : { ...sanitized, degradedWithout: degraded };
|
|
1929
1932
|
}),
|
|
1930
1933
|
artefacts: entry.artefacts.map((artefact) => ({
|
|
1931
1934
|
kind: artefact.kind,
|
|
1932
|
-
title:
|
|
1933
|
-
where:
|
|
1935
|
+
title: text2(artefact.title),
|
|
1936
|
+
where: text2(artefact.where)
|
|
1934
1937
|
})),
|
|
1935
1938
|
escalations: entry.escalations.map((point) => ({
|
|
1936
|
-
when:
|
|
1939
|
+
when: text2(point.when),
|
|
1937
1940
|
becomes: point.becomes,
|
|
1938
1941
|
carriesRecommendation: point.carriesRecommendation
|
|
1939
1942
|
})),
|
|
1940
|
-
tags: entry.tags.map((tag) =>
|
|
1943
|
+
tags: entry.tags.map((tag) => text2(tag, 40)).filter((tag) => tag.length > 0),
|
|
1941
1944
|
provision: {
|
|
1942
1945
|
...entry.provision,
|
|
1943
|
-
agentName:
|
|
1946
|
+
agentName: text2(entry.provision.agentName),
|
|
1944
1947
|
taskTemplate: {
|
|
1945
|
-
name:
|
|
1946
|
-
slug:
|
|
1948
|
+
name: text2(entry.provision.taskTemplate.name, PLAYBOOK_TEXT_LIMITS.title),
|
|
1949
|
+
slug: text2(entry.provision.taskTemplate.slug, 64)
|
|
1947
1950
|
}
|
|
1948
1951
|
}
|
|
1949
1952
|
};
|
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.13",
|
|
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.1",
|
|
37
|
+
"@ever-works/plugin": "^1.2.28"
|
|
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:519941e2376fff2217049f3f6a0eeb6c9668dc90452b74f80b51b280d6c83874",
|
|
71
|
+
"commit": "2288ff7e91562b0f079c365348ba08ab3a16f1dd",
|
|
72
|
+
"source": "https://github.com/ever-co/ever-works/tree/2288ff7e91562b0f079c365348ba08ab3a16f1dd/packages/plugins/everworks-playbooks"
|
|
73
73
|
}
|
|
74
74
|
}
|