@ryanatkn/gro 0.134.0 → 0.135.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/args.d.ts.map +1 -1
- package/dist/args.js +6 -2
- package/dist/changeset.task.js +3 -3
- package/dist/check.task.js +2 -2
- package/dist/deploy.task.d.ts +2 -2
- package/dist/deploy.task.d.ts.map +1 -1
- package/dist/deploy.task.js +7 -7
- package/dist/esbuild_helpers.js +3 -3
- package/dist/gen.js +3 -3
- package/dist/gen.task.d.ts.map +1 -1
- package/dist/gen.task.js +8 -8
- package/dist/gro_helpers.js +1 -1
- package/dist/invoke.js +3 -0
- package/dist/invoke_task.d.ts.map +1 -1
- package/dist/invoke_task.js +8 -8
- package/dist/package.js +9 -9
- package/dist/package_json.js +3 -3
- package/dist/paths.js +2 -2
- package/dist/publish.task.js +4 -4
- package/dist/resolve.task.js +3 -3
- package/dist/run.task.js +2 -2
- package/dist/run_gen.js +3 -3
- package/dist/run_task.d.ts.map +1 -1
- package/dist/run_task.js +6 -5
- package/dist/task.js +3 -3
- package/dist/task_logging.js +7 -7
- package/dist/test.task.js +2 -2
- package/package.json +8 -8
- package/src/lib/args.ts +6 -2
- package/src/lib/changeset.task.ts +3 -3
- package/src/lib/check.task.ts +2 -2
- package/src/lib/deploy.task.ts +12 -7
- package/src/lib/esbuild_helpers.ts +3 -3
- package/src/lib/gen.task.ts +11 -9
- package/src/lib/gen.ts +3 -3
- package/src/lib/gro_helpers.ts +1 -1
- package/src/lib/invoke.ts +4 -0
- package/src/lib/invoke_task.ts +10 -8
- package/src/lib/package.ts +9 -9
- package/src/lib/package_json.ts +3 -3
- package/src/lib/paths.ts +2 -2
- package/src/lib/publish.task.ts +4 -4
- package/src/lib/resolve.task.ts +3 -3
- package/src/lib/run.task.ts +2 -2
- package/src/lib/run_gen.ts +3 -3
- package/src/lib/run_task.ts +8 -5
- package/src/lib/task.ts +3 -3
- package/src/lib/task_logging.ts +10 -10
- package/src/lib/test.task.ts +2 -2
package/src/lib/task_logging.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {styleText as st} from 'node:util';
|
|
2
2
|
import type {Logger} from '@ryanatkn/belt/log.js';
|
|
3
3
|
import {plural} from '@ryanatkn/belt/string.js';
|
|
4
4
|
import {print_value} from '@ryanatkn/belt/print.js';
|
|
@@ -15,8 +15,8 @@ export const log_tasks = (log: Logger, loaded_tasks: Loaded_Tasks, log_intro = t
|
|
|
15
15
|
const logged: string[] = [];
|
|
16
16
|
if (log_intro) {
|
|
17
17
|
logged.unshift(
|
|
18
|
-
`\n\n${
|
|
19
|
-
`\n${
|
|
18
|
+
`\n\n${st('gray', 'Run a task:')} gro [name]`,
|
|
19
|
+
`\n${st('gray', 'View help:')} gro [name] --help`,
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -35,7 +35,7 @@ export const log_tasks = (log: Logger, loaded_tasks: Loaded_Tasks, log_intro = t
|
|
|
35
35
|
for (const resolved_input_file of resolved_input_files) {
|
|
36
36
|
const meta = modules.find((m) => m.id === resolved_input_file.id)!;
|
|
37
37
|
logged.push(
|
|
38
|
-
'\n' + cyan
|
|
38
|
+
'\n' + st('cyan', meta.name.padEnd(longest_task_name)),
|
|
39
39
|
' ',
|
|
40
40
|
meta.mod.task.summary ?? '',
|
|
41
41
|
);
|
|
@@ -46,7 +46,7 @@ export const log_tasks = (log: Logger, loaded_tasks: Loaded_Tasks, log_intro = t
|
|
|
46
46
|
|
|
47
47
|
export const log_error_reasons = (log: Logger, reasons: string[]): void => {
|
|
48
48
|
for (const reason of reasons) {
|
|
49
|
-
log.error(red
|
|
49
|
+
log.error(st('red', reason));
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
|
|
@@ -59,9 +59,9 @@ export const log_task_help = (log: Logger, meta: Task_Module_Meta): void => {
|
|
|
59
59
|
} = meta;
|
|
60
60
|
const logged: string[] = [];
|
|
61
61
|
logged.push(
|
|
62
|
-
cyan
|
|
62
|
+
st('cyan', name),
|
|
63
63
|
'help',
|
|
64
|
-
cyan
|
|
64
|
+
st('cyan', `\n\ngro ${name}`) + `: ${task.summary ?? '(no summary available)'}\n`,
|
|
65
65
|
);
|
|
66
66
|
if (task.Args) {
|
|
67
67
|
const properties = to_arg_properties(task.Args._def, meta);
|
|
@@ -75,14 +75,14 @@ export const log_task_help = (log: Logger, meta: Task_Module_Meta): void => {
|
|
|
75
75
|
for (const property of properties) {
|
|
76
76
|
const name = property.name === '_' ? ARGS_PROPERTY_NAME : property.name;
|
|
77
77
|
logged.push(
|
|
78
|
-
`\n${green
|
|
79
|
-
gray
|
|
78
|
+
`\n${st('green', name.padEnd(longest_task_name))} `,
|
|
79
|
+
st('gray', property.schema.type.padEnd(longest_type)) + ' ',
|
|
80
80
|
print_value(property.schema.default).padEnd(longest_default) + ' ',
|
|
81
81
|
property.schema.description || '(no description available)',
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
if (!properties.length) {
|
|
85
|
-
logged.push('\n' +
|
|
85
|
+
logged.push('\n' + st('gray', 'this task has no args'));
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
log.info(...logged, '\n');
|
package/src/lib/test.task.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {styleText as st} from 'node:util';
|
|
2
2
|
import {z} from 'zod';
|
|
3
3
|
|
|
4
4
|
import {Task_Error, type Task} from './task.js';
|
|
@@ -26,7 +26,7 @@ export const task: Task<Args> = {
|
|
|
26
26
|
const {_: patterns, bail, cwd, ignore} = args;
|
|
27
27
|
|
|
28
28
|
if (!find_cli('uvu')) {
|
|
29
|
-
log.warn(
|
|
29
|
+
log.warn(st('yellow', 'uvu is not installed, skipping tests'));
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
|