rhachet-roles-ehmpathy 1.4.0 → 1.7.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/dist/contract/sdk/index.d.ts +1 -0
- package/dist/contract/sdk/index.js +3 -1
- package/dist/contract/sdk/index.js.map +1 -1
- package/dist/logic/hooks/decodeDocOutputPath.d.ts +21 -0
- package/dist/logic/hooks/decodeDocOutputPath.js +57 -0
- package/dist/logic/hooks/decodeDocOutputPath.js.map +1 -0
- package/dist/logic/hooks/decodeDocOutputPath.test.d.ts +1 -0
- package/dist/logic/hooks/decodeDocOutputPath.test.js +146 -0
- package/dist/logic/hooks/decodeDocOutputPath.test.js.map +1 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.d.ts +20 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.js +80 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.js.map +1 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.test.d.ts +1 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.test.js +528 -0
- package/dist/logic/hooks/execTranslateDocOutputPath.test.js.map +1 -0
- package/dist/logic/hooks/getInvokeHooks.d.ts +2 -0
- package/dist/logic/hooks/getInvokeHooks.js +15 -0
- package/dist/logic/hooks/getInvokeHooks.js.map +1 -0
- package/dist/logic/hooks/relateDocOutputPath.d.ts +11 -0
- package/dist/logic/hooks/relateDocOutputPath.js +58 -0
- package/dist/logic/hooks/relateDocOutputPath.js.map +1 -0
- package/dist/logic/hooks/relateDocOutputPath.test.d.ts +1 -0
- package/dist/logic/hooks/relateDocOutputPath.test.js +111 -0
- package/dist/logic/hooks/relateDocOutputPath.test.js.map +1 -0
- package/dist/logic/roles/bhrain/.briefs/trait.chillnature.md +14 -0
- package/dist/logic/roles/bhrain/getBhrainRole.js +1 -0
- package/dist/logic/roles/bhrain/getBhrainRole.js.map +1 -1
- package/dist/logic/roles/bhrain/khue.instantiate/stepInstantiate.skill.js +1 -4
- package/dist/logic/roles/bhrain/khue.instantiate/stepInstantiate.skill.js.map +1 -1
- package/dist/logic/roles/ecologist/getEcologistRole.js +1 -0
- package/dist/logic/roles/ecologist/getEcologistRole.js.map +1 -1
- package/dist/logic/roles/getRoleRegistry.js +2 -0
- package/dist/logic/roles/getRoleRegistry.js.map +1 -1
- package/dist/logic/roles/mechanic/.briefs/terms/badpractice/script.md +9 -0
- package/dist/logic/roles/mechanic/getMechanicRole.js +1 -0
- package/dist/logic/roles/mechanic/getMechanicRole.js.map +1 -1
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.d.ts +42 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.integration.test.d.ts +1 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.integration.test.js +76 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.integration.test.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.js +126 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.skill.d.ts +12 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.skill.js +69 -0
- package/dist/logic/roles/terminal.commander/command.exec/stepExecCommand.skill.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.d.ts +54 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.integration.test.d.ts +1 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.integration.test.js +97 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.integration.test.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.js +68 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.js.map +1 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.skill.d.ts +28 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.skill.js +124 -0
- package/dist/logic/roles/terminal.commander/command.plan/stepPlanCommand.skill.js.map +1 -0
- package/dist/logic/roles/terminal.commander/getCommanderRole.d.ts +2 -0
- package/dist/logic/roles/terminal.commander/getCommanderRole.js +36 -0
- package/dist/logic/roles/terminal.commander/getCommanderRole.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
4
|
+
const test_fns_1 = require("test-fns");
|
|
5
|
+
const execTranslateDocOutputPath_1 = require("./execTranslateDocOutputPath");
|
|
6
|
+
const context = {
|
|
7
|
+
log: console,
|
|
8
|
+
};
|
|
9
|
+
describe('execTranslateDocOutputPath (integration; hard-coded expectations)', () => {
|
|
10
|
+
(0, test_fns_1.given)('opts.output is not a string', () => {
|
|
11
|
+
const input = { output: undefined };
|
|
12
|
+
(0, test_fns_1.when)('executed', () => {
|
|
13
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
14
|
+
(0, test_fns_1.then)('it returns opts unchanged', () => {
|
|
15
|
+
expect(result).toBe(input);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
(0, test_fns_1.given)('opts.output is a string but not an @translate(...) call', () => {
|
|
20
|
+
const input = { output: 'hello.md', references: 'foo' };
|
|
21
|
+
(0, test_fns_1.when)('executed', () => {
|
|
22
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
23
|
+
(0, test_fns_1.then)('it returns opts unchanged', () => {
|
|
24
|
+
expect(result).toBe(input);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
(0, test_fns_1.given)('opts.output is @translate(...) but not references.0', () => {
|
|
29
|
+
const input = {
|
|
30
|
+
output: '@translate(references.1).as(story)',
|
|
31
|
+
references: 'src/a.[stories].v1.i2.md',
|
|
32
|
+
};
|
|
33
|
+
(0, test_fns_1.when)('executed', () => {
|
|
34
|
+
const err = (0, test_fns_1.getError)(() => (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context));
|
|
35
|
+
(0, test_fns_1.then)('it throws a BadRequestError', () => {
|
|
36
|
+
expect(err).toBeInstanceOf(helpful_errors_1.BadRequestError);
|
|
37
|
+
expect(err.message).toMatch(/unsupported @translation source/i);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
(0, test_fns_1.given)('opts.output is @translate(references.0) but missing .as(doctype)', () => {
|
|
42
|
+
const input = {
|
|
43
|
+
output: '@translate(references.0)',
|
|
44
|
+
references: 'src/a.[stories].v1.i2.md',
|
|
45
|
+
};
|
|
46
|
+
(0, test_fns_1.when)('executed', () => {
|
|
47
|
+
const err = (0, test_fns_1.getError)(() => (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context));
|
|
48
|
+
(0, test_fns_1.then)('it throws an UnexpectedCodePathError', () => {
|
|
49
|
+
expect(err).toBeInstanceOf(helpful_errors_1.UnexpectedCodePathError);
|
|
50
|
+
expect(err.message).toMatch(/\.as\(doctype\) was not part of output/i);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
(0, test_fns_1.given)('opts.references is not a string', () => {
|
|
55
|
+
const input = {
|
|
56
|
+
output: '@translate(references.0).as(story)',
|
|
57
|
+
references: ['not-a-string'],
|
|
58
|
+
};
|
|
59
|
+
(0, test_fns_1.when)('executed', () => {
|
|
60
|
+
const err = (0, test_fns_1.getError)(() => (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context));
|
|
61
|
+
(0, test_fns_1.then)('it throws a BadRequestError', () => {
|
|
62
|
+
expect(err).toBeInstanceOf(helpful_errors_1.BadRequestError);
|
|
63
|
+
expect(err.message).toMatch(/opts\.references is not a string/i);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
(0, test_fns_1.given)('opts.references is an empty string', () => {
|
|
68
|
+
const input = {
|
|
69
|
+
output: '@translate(references.0).as(story)',
|
|
70
|
+
references: '',
|
|
71
|
+
};
|
|
72
|
+
(0, test_fns_1.when)('executed', () => {
|
|
73
|
+
const err = (0, test_fns_1.getError)(() => (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context));
|
|
74
|
+
(0, test_fns_1.then)('it throws a BadRequestError', () => {
|
|
75
|
+
expect(err).toBeInstanceOf(helpful_errors_1.BadRequestError);
|
|
76
|
+
expect(err.message).toMatch(/opts\.references is not a string/i);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
(0, test_fns_1.given)('happy path: both variant and instance after the source [doctype]', () => {
|
|
81
|
+
// note: prefix should drop any trailing dot before composing
|
|
82
|
+
const source = 'src/product/cooltools/tool.hammer/step_5.stories/step_1.translate/' +
|
|
83
|
+
'provider.plumber_pete.customer.scene_6.build.persp_pro.v2i3.[stories].v5.i7.md';
|
|
84
|
+
const input = {
|
|
85
|
+
output: '@translate(references.0).as(story)',
|
|
86
|
+
references: `${source},other/ignored.md`,
|
|
87
|
+
};
|
|
88
|
+
(0, test_fns_1.when)('executed', () => {
|
|
89
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
90
|
+
(0, test_fns_1.then)('it preserves vNiN before new [doctype], sets v1 after, and keeps extension', () => {
|
|
91
|
+
const expectedPrefix = 'src/product/cooltools/tool.hammer/step_5.stories/step_1.translate/' +
|
|
92
|
+
'provider.plumber_pete.customer.scene_6.build.persp_pro.v2i3';
|
|
93
|
+
const expected = `${expectedPrefix}.v5i7.[story].v1.md`;
|
|
94
|
+
expect(result.output).toBe(expected);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
(0, test_fns_1.given)('only variant exists after the source [doctype]', () => {
|
|
99
|
+
const source = 'x/y/z/topic.v9.[notes].v12.md';
|
|
100
|
+
const input = {
|
|
101
|
+
output: '@translate(references.0).as(report)',
|
|
102
|
+
references: source,
|
|
103
|
+
};
|
|
104
|
+
(0, test_fns_1.when)('executed', () => {
|
|
105
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
106
|
+
(0, test_fns_1.then)('it places vN before [doctype], appends .v1.ext', () => {
|
|
107
|
+
const expected = 'x/y/z/topic.v9.v12.[report].v1.md';
|
|
108
|
+
expect(result.output).toBe(expected);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
(0, test_fns_1.given)('only instance exists after the source [doctype]', () => {
|
|
113
|
+
const source = 'x/y/z/topic.[stories].i8.txt';
|
|
114
|
+
const input = {
|
|
115
|
+
output: '@translate(references.0).as(notes)',
|
|
116
|
+
references: source,
|
|
117
|
+
};
|
|
118
|
+
(0, test_fns_1.when)('executed', () => {
|
|
119
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
120
|
+
(0, test_fns_1.then)('it places iN before [doctype], appends .v1.ext', () => {
|
|
121
|
+
const expected = 'x/y/z/topic.i8.[notes].v1.txt';
|
|
122
|
+
expect(result.output).toBe(expected);
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
(0, test_fns_1.given)('no versions exist after the source [doctype]', () => {
|
|
127
|
+
const source = 'dir/file.[story].md';
|
|
128
|
+
const input = {
|
|
129
|
+
output: '@translate(references.0).as(stories)',
|
|
130
|
+
references: source,
|
|
131
|
+
};
|
|
132
|
+
(0, test_fns_1.when)('executed', () => {
|
|
133
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
134
|
+
(0, test_fns_1.then)('it emits prefix.[doctype].v1.ext (no vNiN before [doctype])', () => {
|
|
135
|
+
const expected = 'dir/file.[stories].v1.md';
|
|
136
|
+
expect(result.output).toBe(expected);
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
(0, test_fns_1.given)('no extension present in the source path', () => {
|
|
141
|
+
const source = 'a/b/c/topic.[stories].v3.i2';
|
|
142
|
+
const input = {
|
|
143
|
+
output: '@translate(references.0).as(summary)',
|
|
144
|
+
references: source,
|
|
145
|
+
};
|
|
146
|
+
(0, test_fns_1.when)('executed', () => {
|
|
147
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
148
|
+
(0, test_fns_1.then)('it omits the trailing dot/extension', () => {
|
|
149
|
+
const expected = 'a/b/c/topic.v3i2.[summary].v1';
|
|
150
|
+
expect(result.output).toBe(expected);
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
(0, test_fns_1.given)('a [doctype] earlier in the path should be ignored (must be after last "/")', () => {
|
|
155
|
+
const source = 'a/b.[draft]/c/topic.v1i2.i3.md'; // no [doctype] after last slash
|
|
156
|
+
const input = {
|
|
157
|
+
output: '@translate(references.0).as(story)',
|
|
158
|
+
references: source,
|
|
159
|
+
};
|
|
160
|
+
(0, test_fns_1.when)('executed', () => {
|
|
161
|
+
const err = (0, test_fns_1.getError)(() => (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context));
|
|
162
|
+
(0, test_fns_1.then)('it bubbles up the decoder error', () => {
|
|
163
|
+
expect(err).toBeInstanceOf(helpful_errors_1.BadRequestError);
|
|
164
|
+
expect(err.message).toMatch(/could not find any \[doctype]/i);
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
(0, test_fns_1.given)('happy path with .ext(json): override source extension', () => {
|
|
169
|
+
const source = 'src/product/cooltools/tool.hammer/step_5.stories/step_1.translate/' +
|
|
170
|
+
'provider.plumber_pete.customer.scene_6.build.persp_pro.v2i3.[stories].v5.i7.md';
|
|
171
|
+
const input = {
|
|
172
|
+
output: '@translate(references.0).as(story).ext(json)',
|
|
173
|
+
references: `${source},ignored/also.md`,
|
|
174
|
+
};
|
|
175
|
+
(0, test_fns_1.when)('executed', () => {
|
|
176
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
177
|
+
(0, test_fns_1.then)('it sets the new extension to .json', () => {
|
|
178
|
+
const expectedPrefix = 'src/product/cooltools/tool.hammer/step_5.stories/step_1.translate/' +
|
|
179
|
+
'provider.plumber_pete.customer.scene_6.build.persp_pro.v2i3';
|
|
180
|
+
const expected = `${expectedPrefix}.v5i7.[story].v1.json`;
|
|
181
|
+
expect(result.output).toBe(expected);
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
(0, test_fns_1.given)('source has no extension; .ext(md) supplies one after translation', () => {
|
|
186
|
+
const source = 'a/b/c/topic.[stories].v3.i2';
|
|
187
|
+
const input = {
|
|
188
|
+
output: '@translate(references.0).as(summary).ext(md)',
|
|
189
|
+
references: source,
|
|
190
|
+
};
|
|
191
|
+
(0, test_fns_1.when)('executed', () => {
|
|
192
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
193
|
+
(0, test_fns_1.then)('it appends .md', () => {
|
|
194
|
+
const expected = 'a/b/c/topic.v3i2.[summary].v1.md';
|
|
195
|
+
expect(result.output).toBe(expected);
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
(0, test_fns_1.given)('source has an extension; .ext(md) replaces it with .md consistently', () => {
|
|
200
|
+
const source = 'x/y/z/topic.[stories].i8.txt';
|
|
201
|
+
const input = {
|
|
202
|
+
output: '@translate(references.0).as(notes).ext(md)',
|
|
203
|
+
references: source,
|
|
204
|
+
};
|
|
205
|
+
(0, test_fns_1.when)('executed', () => {
|
|
206
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
207
|
+
(0, test_fns_1.then)('it replaces .txt with .md', () => {
|
|
208
|
+
const expected = 'x/y/z/topic.i8.[notes].v1.md';
|
|
209
|
+
expect(result.output).toBe(expected);
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
(0, test_fns_1.given)('only variant exists after [doctype]; .ext(json) still applies .json', () => {
|
|
214
|
+
const source = 'x/y/z/topic.v9.[notes].v12.md';
|
|
215
|
+
const input = {
|
|
216
|
+
output: '@translate(references.0).as(report).ext(json)',
|
|
217
|
+
references: source,
|
|
218
|
+
};
|
|
219
|
+
(0, test_fns_1.when)('executed', () => {
|
|
220
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
221
|
+
(0, test_fns_1.then)('it outputs ...[report].v1.json', () => {
|
|
222
|
+
const expected = 'x/y/z/topic.v9.v12.[report].v1.json';
|
|
223
|
+
expect(result.output).toBe(expected);
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
describe('execTranslateDocOutputPath .rel(...) (integration; hard-coded expectations)', () => {
|
|
229
|
+
describe('relative to gitroot', () => {
|
|
230
|
+
(0, test_fns_1.given)('@gitroot/ prefix re-roots from git repository root preserving only filename', () => {
|
|
231
|
+
const source = 'src/product/cooltools/tool.hammer/step_1.translate/' +
|
|
232
|
+
'provider.scene_6.build.persp_pro.v2i3.[stories].v5.i7.md';
|
|
233
|
+
const input = {
|
|
234
|
+
output: '@translate(references.0).as(story).rel(@gitroot/output/formatted)',
|
|
235
|
+
references: source,
|
|
236
|
+
};
|
|
237
|
+
(0, test_fns_1.when)('executed', () => {
|
|
238
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
239
|
+
(0, test_fns_1.then)('it re-roots from git root under output/formatted', () => {
|
|
240
|
+
const expected = 'output/formatted/provider.scene_6.build.persp_pro.v2i3.v5i7.[story].v1.md';
|
|
241
|
+
expect(result.output).toBe(expected);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
(0, test_fns_1.given)('@gitroot/ with nested target directories', () => {
|
|
246
|
+
const source = 'pkg/flows/step_3.translate/topic.branch.v9.[notes].v12.md';
|
|
247
|
+
const input = {
|
|
248
|
+
output: '@translate(references.0).as(report).rel(@gitroot/artifacts/reports)',
|
|
249
|
+
references: source,
|
|
250
|
+
};
|
|
251
|
+
(0, test_fns_1.when)('executed', () => {
|
|
252
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
253
|
+
(0, test_fns_1.then)('it places under artifacts/reports/ from git root', () => {
|
|
254
|
+
const expected = 'artifacts/reports/topic.branch.v9.v12.[report].v1.md';
|
|
255
|
+
expect(result.output).toBe(expected);
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
(0, test_fns_1.given)('@gitroot/ with single directory', () => {
|
|
260
|
+
const source = 'deep/nested/path/topic.[stories].i8.txt';
|
|
261
|
+
const input = {
|
|
262
|
+
output: '@translate(references.0).as(notes).rel(@gitroot/dist)',
|
|
263
|
+
references: source,
|
|
264
|
+
};
|
|
265
|
+
(0, test_fns_1.when)('executed', () => {
|
|
266
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
267
|
+
(0, test_fns_1.then)('it places directly under dist/ from git root', () => {
|
|
268
|
+
const expected = 'dist/topic.i8.[notes].v1.txt';
|
|
269
|
+
expect(result.output).toBe(expected);
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
(0, test_fns_1.given)('combine @gitroot/ .rel(...) with .ext(json)', () => {
|
|
274
|
+
const source = 'any/path/item.[story].md';
|
|
275
|
+
const input = {
|
|
276
|
+
output: '@translate(references.0).as(summary).rel(@gitroot/build/json).ext(json)',
|
|
277
|
+
references: source,
|
|
278
|
+
};
|
|
279
|
+
(0, test_fns_1.when)('executed', () => {
|
|
280
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
281
|
+
(0, test_fns_1.then)('it re-roots from git root and applies .json extension', () => {
|
|
282
|
+
const expected = 'build/json/item.[summary].v1.json';
|
|
283
|
+
expect(result.output).toBe(expected);
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
(0, test_fns_1.given)('combine @gitroot/ .rel(...) with .v(n)', () => {
|
|
288
|
+
const source = 'src/flow/step_1.translate/topic.branch.v9.[notes].v12.md';
|
|
289
|
+
const input = {
|
|
290
|
+
output: '@translate(references.0).as(report).v(3).rel(@gitroot/output/v3)',
|
|
291
|
+
references: source,
|
|
292
|
+
};
|
|
293
|
+
(0, test_fns_1.when)('executed', () => {
|
|
294
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
295
|
+
(0, test_fns_1.then)('it re-roots from git root and uses specified variant', () => {
|
|
296
|
+
const expected = 'output/v3/topic.branch.v9.v12.[report].v3.md';
|
|
297
|
+
expect(result.output).toBe(expected);
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
(0, test_fns_1.given)('source without extension + @gitroot/ .rel(...)', () => {
|
|
302
|
+
const source = 'docs/step.translate/topic.v3i2.[stories]';
|
|
303
|
+
const input = {
|
|
304
|
+
output: '@translate(references.0).as(summary).rel(@gitroot/final)',
|
|
305
|
+
references: source,
|
|
306
|
+
};
|
|
307
|
+
(0, test_fns_1.when)('executed', () => {
|
|
308
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
309
|
+
(0, test_fns_1.then)('it re-roots and emits no trailing extension', () => {
|
|
310
|
+
const expected = 'final/topic.v3i2.[summary].v1';
|
|
311
|
+
expect(result.output).toBe(expected);
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
(0, test_fns_1.given)('@gitroot alone (just @gitroot/)', () => {
|
|
316
|
+
const source = 'very/deep/nested/path/file.[draft].v2.md';
|
|
317
|
+
const input = {
|
|
318
|
+
output: '@translate(references.0).as(final).rel(@gitroot/)',
|
|
319
|
+
references: source,
|
|
320
|
+
};
|
|
321
|
+
(0, test_fns_1.when)('executed', () => {
|
|
322
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
323
|
+
(0, test_fns_1.then)('it places file directly at git root', () => {
|
|
324
|
+
const expected = 'file.v2.[final].v1.md';
|
|
325
|
+
expect(result.output).toBe(expected);
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
(0, test_fns_1.given)('complex real-world example with deep path and trailing slash', () => {
|
|
330
|
+
const source = 'src/products/protools/tool.routecal/1.requirements/step_2.draft/' +
|
|
331
|
+
'provider.plumber_pete.customer.scene_6.v2i3.[stories].v5.i7.md';
|
|
332
|
+
const input = {
|
|
333
|
+
output: '@translate(references.0).as(review).ext(json).rel(@gitroot/src/products/protools/tool.routecal/2.architecture/step_1.criteria/.rheview/).v(5)',
|
|
334
|
+
references: source,
|
|
335
|
+
};
|
|
336
|
+
(0, test_fns_1.when)('executed', () => {
|
|
337
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
338
|
+
(0, test_fns_1.then)('it re-roots to the specified gitroot path with all modifiers applied', () => {
|
|
339
|
+
const expected = 'src/products/protools/tool.routecal/2.architecture/step_1.criteria/.rheview/' +
|
|
340
|
+
'provider.plumber_pete.customer.scene_6.v2i3.v5i7.[review].v5.json';
|
|
341
|
+
expect(result.output).toBe(expected);
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
describe('relative to input file', () => {
|
|
347
|
+
(0, test_fns_1.given)('move from step_1.translate → ../step_2.format (sibling up)', () => {
|
|
348
|
+
const source = 'src/product/cooltools/tool.hammer/step_1.translate/' +
|
|
349
|
+
'provider.scene_6.build.persp_pro.v2i3.[stories].v5.i7.md';
|
|
350
|
+
const input = {
|
|
351
|
+
output: '@translate(references.0).as(story).rel(../step_2.format)',
|
|
352
|
+
references: source,
|
|
353
|
+
};
|
|
354
|
+
(0, test_fns_1.when)('executed', () => {
|
|
355
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
356
|
+
(0, test_fns_1.then)('it re-roots under step_2.format and composes new file path', () => {
|
|
357
|
+
const expectedPrefix = 'src/product/cooltools/tool.hammer/step_2.format/' +
|
|
358
|
+
'provider.scene_6.build.persp_pro.v2i3';
|
|
359
|
+
const expected = `${expectedPrefix}.v5i7.[story].v1.md`;
|
|
360
|
+
expect(result.output).toBe(expected);
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
(0, test_fns_1.given)('append a child dir via .rel(./drafts)', () => {
|
|
365
|
+
const source = 'pkg/flows/step_3.translate/topic.branch.v9.[notes].v12.md';
|
|
366
|
+
const input = {
|
|
367
|
+
output: '@translate(references.0).as(report).rel(./drafts)',
|
|
368
|
+
references: source,
|
|
369
|
+
};
|
|
370
|
+
(0, test_fns_1.when)('executed', () => {
|
|
371
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
372
|
+
(0, test_fns_1.then)('it nests under drafts/', () => {
|
|
373
|
+
const expected = 'pkg/flows/step_3.translate/drafts/topic.branch.v9.v12.[report].v1.md';
|
|
374
|
+
expect(result.output).toBe(expected);
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
(0, test_fns_1.given)('pop one directory via .rel(..)', () => {
|
|
379
|
+
const source = 'a/b/topic.[stories].i8.txt';
|
|
380
|
+
const input = {
|
|
381
|
+
output: '@translate(references.0).as(notes).rel(..)',
|
|
382
|
+
references: source,
|
|
383
|
+
};
|
|
384
|
+
(0, test_fns_1.when)('executed', () => {
|
|
385
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
386
|
+
(0, test_fns_1.then)('it moves to a/ and composes there', () => {
|
|
387
|
+
const expected = 'a/topic.i8.[notes].v1.txt';
|
|
388
|
+
expect(result.output).toBe(expected);
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
});
|
|
392
|
+
(0, test_fns_1.given)('combine .rel(...) with .ext(json)', () => {
|
|
393
|
+
const source = 'root/x/item.[story].md';
|
|
394
|
+
const input = {
|
|
395
|
+
output: '@translate(references.0).as(summary).rel(../y).ext(json)',
|
|
396
|
+
references: source,
|
|
397
|
+
};
|
|
398
|
+
(0, test_fns_1.when)('executed', () => {
|
|
399
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
400
|
+
(0, test_fns_1.then)('it re-roots and overrides extension to .json', () => {
|
|
401
|
+
const expected = 'root/y/item.[summary].v1.json';
|
|
402
|
+
expect(result.output).toBe(expected);
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
});
|
|
406
|
+
(0, test_fns_1.given)('source without extension + .rel(...) keeps no trailing dot unless .ext provided', () => {
|
|
407
|
+
const source = 'docs/step.translate/topic.v3i2.[stories]';
|
|
408
|
+
const input = {
|
|
409
|
+
output: '@translate(references.0).as(summary).rel(../step.out)',
|
|
410
|
+
references: source,
|
|
411
|
+
};
|
|
412
|
+
(0, test_fns_1.when)('executed', () => {
|
|
413
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
414
|
+
(0, test_fns_1.then)('it emits no trailing extension', () => {
|
|
415
|
+
const expected = 'docs/step.out/topic.v3i2.[summary].v1';
|
|
416
|
+
expect(result.output).toBe(expected);
|
|
417
|
+
});
|
|
418
|
+
});
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
describe('execTranslateDocOutputPath .v(n) (integration; hard-coded expectations)', () => {
|
|
423
|
+
(0, test_fns_1.given)('happy path: override starting variant to v2', () => {
|
|
424
|
+
const source = 'src/product/cooltools/tool.hammer/step_5.stories/step_1.translate/' +
|
|
425
|
+
'provider.plumber_pete.customer.scene_6.build.persp_pro.v2i3.[stories].v5.i7.md';
|
|
426
|
+
const input = {
|
|
427
|
+
output: '@translate(references.0).as(story).v(2)',
|
|
428
|
+
references: `${source},other/ignored.md`,
|
|
429
|
+
};
|
|
430
|
+
(0, test_fns_1.when)('executed', () => {
|
|
431
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
432
|
+
(0, test_fns_1.then)('it preserves vNiN before [doctype] and sets tail to .v2', () => {
|
|
433
|
+
const expectedPrefix = 'src/product/cooltools/tool.hammer/step_5.stories/step_1.translate/' +
|
|
434
|
+
'provider.plumber_pete.customer.scene_6.build.persp_pro.v2i3';
|
|
435
|
+
const expected = `${expectedPrefix}.v5i7.[story].v2.md`;
|
|
436
|
+
expect(result.output).toBe(expected);
|
|
437
|
+
});
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
(0, test_fns_1.given)('only instance exists after source [doctype]; override to v3', () => {
|
|
441
|
+
const source = 'x/y/z/topic.[stories].i8.txt';
|
|
442
|
+
const input = {
|
|
443
|
+
output: '@translate(references.0).as(notes).v(3)',
|
|
444
|
+
references: source,
|
|
445
|
+
};
|
|
446
|
+
(0, test_fns_1.when)('executed', () => {
|
|
447
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
448
|
+
(0, test_fns_1.then)('it places iN before [doctype] and appends .v3.ext', () => {
|
|
449
|
+
const expected = 'x/y/z/topic.i8.[notes].v3.txt';
|
|
450
|
+
expect(result.output).toBe(expected);
|
|
451
|
+
});
|
|
452
|
+
});
|
|
453
|
+
});
|
|
454
|
+
(0, test_fns_1.given)('no versions exist after source [doctype]; override to v4', () => {
|
|
455
|
+
const source = 'dir/file.[story].md';
|
|
456
|
+
const input = {
|
|
457
|
+
output: '@translate(references.0).as(stories).v(4)',
|
|
458
|
+
references: source,
|
|
459
|
+
};
|
|
460
|
+
(0, test_fns_1.when)('executed', () => {
|
|
461
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
462
|
+
(0, test_fns_1.then)('it emits prefix.[doctype].v4.ext', () => {
|
|
463
|
+
const expected = 'dir/file.[stories].v4.md';
|
|
464
|
+
expect(result.output).toBe(expected);
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
});
|
|
468
|
+
(0, test_fns_1.given)('.v(n) with .ext override and preserved vNiN', () => {
|
|
469
|
+
const source = 'src/product/cooltools/tool.hammer/step_5.stories/step_1.translate/' +
|
|
470
|
+
'provider.scene_6.build.persp_pro.v2i3.[stories].v5.i7.md';
|
|
471
|
+
const input = {
|
|
472
|
+
output: '@translate(references.0).as(story).v(6).ext(json)',
|
|
473
|
+
references: source,
|
|
474
|
+
};
|
|
475
|
+
(0, test_fns_1.when)('executed', () => {
|
|
476
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
477
|
+
(0, test_fns_1.then)('it outputs ...[story].v6.json (and preserves v5i7 before)', () => {
|
|
478
|
+
const expectedPrefix = 'src/product/cooltools/tool.hammer/step_5.stories/step_1.translate/' +
|
|
479
|
+
'provider.scene_6.build.persp_pro.v2i3';
|
|
480
|
+
const expected = `${expectedPrefix}.v5i7.[story].v6.json`;
|
|
481
|
+
expect(result.output).toBe(expected);
|
|
482
|
+
});
|
|
483
|
+
});
|
|
484
|
+
});
|
|
485
|
+
(0, test_fns_1.given)('.v(n) combined with .rel(...)', () => {
|
|
486
|
+
const source = 'src/flow/step_1.translate/topic.branch.v9.[notes].v12.md';
|
|
487
|
+
const input = {
|
|
488
|
+
output: '@translate(references.0).as(report).v(2).rel(../step_2.format)',
|
|
489
|
+
references: source,
|
|
490
|
+
};
|
|
491
|
+
(0, test_fns_1.when)('executed', () => {
|
|
492
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
493
|
+
(0, test_fns_1.then)('it re-roots and uses v2 at the tail', () => {
|
|
494
|
+
const expected = 'src/flow/step_2.format/topic.branch.v9.v12.[report].v2.md';
|
|
495
|
+
expect(result.output).toBe(expected);
|
|
496
|
+
});
|
|
497
|
+
});
|
|
498
|
+
});
|
|
499
|
+
(0, test_fns_1.given)('invalid .v(0) should fail fast', () => {
|
|
500
|
+
const source = 'x/y/z/topic.[stories].i8.txt';
|
|
501
|
+
const input = {
|
|
502
|
+
output: '@translate(references.0).as(notes).v(0)',
|
|
503
|
+
references: source,
|
|
504
|
+
};
|
|
505
|
+
(0, test_fns_1.when)('executed', () => {
|
|
506
|
+
const err = (0, test_fns_1.getError)(() => (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context));
|
|
507
|
+
(0, test_fns_1.then)('it throws a BadRequestError about positive integer', () => {
|
|
508
|
+
expect(err).toBeInstanceOf(helpful_errors_1.BadRequestError);
|
|
509
|
+
expect(err.message).toMatch(/\.v\(n\) must be a positive integer/i);
|
|
510
|
+
});
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
(0, test_fns_1.given)('absence of .v(n) defaults to .v1 (control)', () => {
|
|
514
|
+
const source = 'x/y/z/topic.[stories].i8.txt';
|
|
515
|
+
const input = {
|
|
516
|
+
output: '@translate(references.0).as(notes)',
|
|
517
|
+
references: source,
|
|
518
|
+
};
|
|
519
|
+
(0, test_fns_1.when)('executed', () => {
|
|
520
|
+
const result = (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(input, context);
|
|
521
|
+
(0, test_fns_1.then)('it uses v1 at the tail', () => {
|
|
522
|
+
const expected = 'x/y/z/topic.i8.[notes].v1.txt';
|
|
523
|
+
expect(result.output).toBe(expected);
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
});
|
|
527
|
+
});
|
|
528
|
+
//# sourceMappingURL=execTranslateDocOutputPath.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execTranslateDocOutputPath.test.js","sourceRoot":"","sources":["../../../src/logic/hooks/execTranslateDocOutputPath.test.ts"],"names":[],"mappings":";;AAAA,mDAA0E;AAC1E,uCAAuD;AAEvD,6EAA0E;AAE1E,MAAM,OAAO,GAAG;IACd,GAAG,EAAE,O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,GAAG,EAAE,CAAC,IAAA,uDAA0B,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;YAEvE,IAAA,eAAI,EAAC,oDAAoD,EAAE,GAAG,EAAE;gBAC9D,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,gCAAe,CAAC,CAAC;gBAC5C,MAAM,CAAE,GAAuB,CAAC,OAAO,CAAC,CAAC,OAAO,CAC9C,sCAAsC,CACvC,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,gBAAK,EAAC,4CAA4C,EAAE,GAAG,EAAE;QACvD,MAAM,MAAM,GAAG,8BAA8B,CAAC;QAC9C,MAAM,KAAK,GAAG;YACZ,MAAM,EAAE,oCAAoC;YAC5C,UAAU,EAAE,MAAM;SACZ,CAAC;QAET,IAAA,eAAI,EAAC,UAAU,EAAE,GAAG,EAAE;YACpB,MAAM,MAAM,GAAG,IAAA,uDAA0B,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAE1D,IAAA,eAAI,EAAC,wBAAwB,EAAE,GAAG,EAAE;gBAClC,MAAM,QAAQ,GAAG,+BAA+B,CAAC;gBACjD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInvokeHooks = void 0;
|
|
4
|
+
const execTranslateDocOutputPath_1 = require("./execTranslateDocOutputPath");
|
|
5
|
+
const getInvokeHooks = () => ({
|
|
6
|
+
onInvokeAskInput: [
|
|
7
|
+
(input) => {
|
|
8
|
+
console.log('🪝 hook ran!');
|
|
9
|
+
return input;
|
|
10
|
+
},
|
|
11
|
+
(opts) => (0, execTranslateDocOutputPath_1.execTranslateDocOutputPath)(opts, { log: console }), // todo: forward log context
|
|
12
|
+
],
|
|
13
|
+
});
|
|
14
|
+
exports.getInvokeHooks = getInvokeHooks;
|
|
15
|
+
//# sourceMappingURL=getInvokeHooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInvokeHooks.js","sourceRoot":"","sources":["../../../src/logic/hooks/getInvokeHooks.ts"],"names":[],"mappings":";;;AAEA,6EAA0E;AAEnE,MAAM,cAAc,GAAG,GAAgB,EAAE,CAAC,CAAC;IAChD,gBAAgB,EAAE;QAChB,CAAC,KAAK,EAAE,EAAE;YACR,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,uDAA0B,EAAC,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,4BAA4B;KAC3F;CACF,CAAC,CAAC;AARU,QAAA,cAAc,kBAQxB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .what = computes the relative path, in relation to some relative modifier
|
|
3
|
+
* .how =
|
|
4
|
+
* - path(path/to/file.md) + relation(../) => path/file.md
|
|
5
|
+
* - path(path/to/file.md) + relation(../now) => path/now/file.md
|
|
6
|
+
* - path(path/to/file.md) + relation(@gitroot/dist) => dist/file.md
|
|
7
|
+
*/
|
|
8
|
+
export declare const relateDocOutputPath: (input: {
|
|
9
|
+
path: string;
|
|
10
|
+
relation: string;
|
|
11
|
+
}) => string;
|