@ryanatkn/gro 0.172.0 → 0.173.1
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/invoke.js +0 -2
- package/dist/invoke_task.d.ts +2 -1
- package/dist/invoke_task.d.ts.map +1 -1
- package/dist/invoke_task.js +8 -6
- package/dist/package.js +3 -3
- package/dist/publish.task.d.ts.map +1 -1
- package/dist/publish.task.js +7 -3
- package/dist/run_task.d.ts +2 -1
- package/dist/run_task.d.ts.map +1 -1
- package/dist/run_task.js +2 -5
- package/dist/task_logging.js +1 -1
- package/package.json +2 -2
- package/src/lib/invoke.ts +0 -2
- package/src/lib/invoke_task.ts +8 -4
- package/src/lib/package.ts +3 -3
- package/src/lib/publish.task.ts +8 -3
- package/src/lib/run_task.ts +3 -4
- package/src/lib/task_logging.ts +1 -1
package/dist/invoke.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { attach_process_error_handlers } from '@ryanatkn/belt/process.js';
|
|
2
|
-
import { configure_log_colors } from '@ryanatkn/belt/log.js';
|
|
3
2
|
import { configure_print_colors } from '@ryanatkn/belt/print.js';
|
|
4
3
|
import { invoke_task } from "./invoke_task.js";
|
|
5
4
|
import { to_task_args } from "./args.js";
|
|
@@ -19,7 +18,6 @@ and the rest of the args are forwarded to the task's `run` function.
|
|
|
19
18
|
attach_process_error_handlers((err) => (err.constructor.name === 'Task_Error' ? 'Task_Error' : null), (err) => (err.constructor.name === 'Silent_Error' ? '' : null));
|
|
20
19
|
if (!process.env.NO_COLOR) {
|
|
21
20
|
const { styleText } = await import('node:util');
|
|
22
|
-
configure_log_colors(styleText);
|
|
23
21
|
configure_print_colors(styleText);
|
|
24
22
|
}
|
|
25
23
|
await sveltekit_sync_if_obviously_needed();
|
package/dist/invoke_task.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Timings } from '@ryanatkn/belt/timings.js';
|
|
2
|
+
import { Logger } from '@ryanatkn/belt/log.js';
|
|
2
3
|
import { type Args } from './args.ts';
|
|
3
4
|
import { Raw_Input_Path } from './input_path.ts';
|
|
4
5
|
import type { Gro_Config } from './gro_config.ts';
|
|
@@ -25,5 +26,5 @@ import { Filer } from './filer.ts';
|
|
|
25
26
|
* @param config - The Gro configuration.
|
|
26
27
|
* @param initial_timings - The timings to use for the top-level task, `null` for composed tasks.
|
|
27
28
|
*/
|
|
28
|
-
export declare const invoke_task: (task_name: Raw_Input_Path, args: Args | undefined, config: Gro_Config, initial_filer?: Filer, initial_timings?: Timings | null) => Promise<void>;
|
|
29
|
+
export declare const invoke_task: (task_name: Raw_Input_Path, args: Args | undefined, config: Gro_Config, initial_filer?: Filer, initial_timings?: Timings | null, parent_log?: Logger) => Promise<void>;
|
|
29
30
|
//# sourceMappingURL=invoke_task.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke_task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/invoke_task.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invoke_task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/invoke_task.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,OAAO,EAAC,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAoB,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAgB,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAI9D,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,WAAW,GACvB,WAAW,cAAc,EACzB,MAAM,IAAI,GAAG,SAAS,EACtB,QAAQ,UAAU,EAClB,gBAAgB,KAAK,EACrB,kBAAkB,OAAO,GAAG,IAAI,EAChC,aAAa,MAAM,KACjB,OAAO,CAAC,IAAI,CA8Fd,CAAC"}
|
package/dist/invoke_task.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styleText as st } from 'node:util';
|
|
2
|
-
import { System_Logger } from '@ryanatkn/belt/log.js';
|
|
3
2
|
import { create_stopwatch, Timings } from '@ryanatkn/belt/timings.js';
|
|
4
|
-
import { print_ms, print_timings
|
|
3
|
+
import { print_ms, print_timings } from '@ryanatkn/belt/print.js';
|
|
4
|
+
import { Logger } from '@ryanatkn/belt/log.js';
|
|
5
5
|
import { to_forwarded_args } from "./args.js";
|
|
6
6
|
import { run_task } from "./run_task.js";
|
|
7
7
|
import { to_input_path, Raw_Input_Path } from "./input_path.js";
|
|
@@ -31,12 +31,14 @@ import { Filer } from "./filer.js";
|
|
|
31
31
|
* @param config - The Gro configuration.
|
|
32
32
|
* @param initial_timings - The timings to use for the top-level task, `null` for composed tasks.
|
|
33
33
|
*/
|
|
34
|
-
export const invoke_task = async (task_name, args, config, initial_filer, initial_timings) => {
|
|
35
|
-
|
|
34
|
+
export const invoke_task = async (task_name, args, config, initial_filer, initial_timings, parent_log) => {
|
|
35
|
+
// Create child logger if parent exists, otherwise root logger
|
|
36
|
+
const log_label = task_name || 'gro';
|
|
37
|
+
const log = parent_log ? parent_log.child(log_label) : new Logger(log_label);
|
|
36
38
|
log.info('invoking', task_name ? st('cyan', task_name) : 'gro');
|
|
37
39
|
// track if we created the filer
|
|
38
40
|
const owns_filer = !initial_filer;
|
|
39
|
-
const filer = initial_filer ?? new Filer({ log });
|
|
41
|
+
const filer = initial_filer ?? new Filer({ log: log.child('filer') });
|
|
40
42
|
const owns_timings = !initial_timings;
|
|
41
43
|
const timings = initial_timings ?? new Timings();
|
|
42
44
|
const total_timing = create_stopwatch();
|
|
@@ -90,7 +92,7 @@ export const invoke_task = async (task_name, args, config, initial_filer, initia
|
|
|
90
92
|
const task = loaded_tasks.modules[0];
|
|
91
93
|
log.info(`→ ${st('cyan', task.name)} ${(task.mod.task.summary && st('gray', task.mod.task.summary)) ?? ''}`);
|
|
92
94
|
const timing_to_run_task = timings.start('run task ' + task_name);
|
|
93
|
-
const result = await run_task(task, { ...args, ...to_forwarded_args(`gro ${task.name}`) }, invoke_task, config, filer, timings);
|
|
95
|
+
const result = await run_task(task, { ...args, ...to_forwarded_args(`gro ${task.name}`) }, invoke_task, config, filer, log, timings);
|
|
94
96
|
timing_to_run_task();
|
|
95
97
|
if (!result.ok) {
|
|
96
98
|
log.info(`${st('red', '🞩')} ${st('cyan', task.name)}`);
|
package/dist/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// generated by src/lib/package.gen.ts
|
|
2
2
|
export const package_json = {
|
|
3
3
|
name: '@ryanatkn/gro',
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.173.0',
|
|
5
5
|
description: 'task runner and toolkit extending SvelteKit',
|
|
6
6
|
motto: 'generate, run, optimize',
|
|
7
7
|
glyph: '🌰',
|
|
@@ -51,7 +51,7 @@ export const package_json = {
|
|
|
51
51
|
zod: '^4.1.12',
|
|
52
52
|
},
|
|
53
53
|
peerDependencies: {
|
|
54
|
-
'@ryanatkn/belt': '^0.
|
|
54
|
+
'@ryanatkn/belt': '^0.37.0',
|
|
55
55
|
'@sveltejs/kit': '^2',
|
|
56
56
|
esbuild: '^0.25',
|
|
57
57
|
svelte: '^5',
|
|
@@ -99,7 +99,7 @@ export const package_json = {
|
|
|
99
99
|
};
|
|
100
100
|
export const src_json = {
|
|
101
101
|
name: '@ryanatkn/gro',
|
|
102
|
-
version: '0.
|
|
102
|
+
version: '0.173.0',
|
|
103
103
|
modules: {
|
|
104
104
|
'.': {
|
|
105
105
|
path: 'index.ts',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/publish.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAYtB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAQhD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;kBAgCf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"publish.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/publish.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAYtB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAQhD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;kBAgCf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAgJ3B,CAAC"}
|
package/dist/publish.task.js
CHANGED
|
@@ -69,9 +69,12 @@ export const task = {
|
|
|
69
69
|
}
|
|
70
70
|
await git_pull(origin, branch);
|
|
71
71
|
}
|
|
72
|
-
//
|
|
72
|
+
// Install packages to ensure deps are current.
|
|
73
|
+
// Handles cases like branch switches where package.json changed.
|
|
74
|
+
await invoke_task('sync', { install: true });
|
|
75
|
+
// Check before proceeding, defaults to true.
|
|
73
76
|
if (check) {
|
|
74
|
-
await invoke_task('check', { workspace: true });
|
|
77
|
+
await invoke_task('check', { workspace: true, sync: false });
|
|
75
78
|
}
|
|
76
79
|
let version;
|
|
77
80
|
let optional_and_version_unchanged = false;
|
|
@@ -120,8 +123,9 @@ export const task = {
|
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
// Build after the version is bumped so the new version is in the build as needed.
|
|
126
|
+
// Skip sync and install because we already handled both above.
|
|
123
127
|
if (build) {
|
|
124
|
-
await invoke_task('build');
|
|
128
|
+
await invoke_task('build', { sync: false, install: false });
|
|
125
129
|
}
|
|
126
130
|
// Return early if there are no changes and publishing is optional, but after building,
|
|
127
131
|
// so if callers want to optimize away building
|
package/dist/run_task.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Timings } from '@ryanatkn/belt/timings.js';
|
|
2
|
+
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
2
3
|
import { type Args } from './args.ts';
|
|
3
4
|
import type { invoke_task as base_invoke_task } from './invoke_task.ts';
|
|
4
5
|
import type { Gro_Config } from './gro_config.ts';
|
|
@@ -12,5 +13,5 @@ export type Run_Task_Result = {
|
|
|
12
13
|
reason: string;
|
|
13
14
|
error: Error;
|
|
14
15
|
};
|
|
15
|
-
export declare const run_task: (task_meta: Task_Module_Meta, unparsed_args: Args, invoke_task: typeof base_invoke_task, config: Gro_Config, filer: Filer, timings: Timings) => Promise<Run_Task_Result>;
|
|
16
|
+
export declare const run_task: (task_meta: Task_Module_Meta, unparsed_args: Args, invoke_task: typeof base_invoke_task, config: Gro_Config, filer: Filer, log: Logger, timings: Timings) => Promise<Run_Task_Result>;
|
|
16
17
|
//# sourceMappingURL=run_task.d.ts.map
|
package/dist/run_task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/run_task.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run_task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/run_task.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAC,WAAW,IAAI,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEtE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAa,KAAK,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAE5D,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,eAAe,GACxB;IACA,EAAE,EAAE,IAAI,CAAC;IACT,MAAM,EAAE,OAAO,CAAC;CACf,GACD;IACA,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;CACZ,CAAC;AAEL,eAAO,MAAM,QAAQ,GACpB,WAAW,gBAAgB,EAC3B,eAAe,IAAI,EACnB,aAAa,OAAO,gBAAgB,EACpC,QAAQ,UAAU,EAClB,OAAO,KAAK,EACZ,KAAK,MAAM,EACX,SAAS,OAAO,KACd,OAAO,CAAC,eAAe,CAiDzB,CAAC"}
|
package/dist/run_task.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { styleText as st } from 'node:util';
|
|
2
|
-
import { print_log_label } from '@ryanatkn/belt/print.js';
|
|
3
|
-
import { System_Logger } from '@ryanatkn/belt/log.js';
|
|
4
2
|
import { z } from 'zod';
|
|
5
3
|
import { parse_args } from "./args.js";
|
|
6
4
|
import { log_task_help } from "./task_logging.js";
|
|
7
5
|
import { Task_Error } from "./task.js";
|
|
8
6
|
import { default_svelte_config } from "./svelte_config.js";
|
|
9
|
-
export const run_task = async (task_meta, unparsed_args, invoke_task, config, filer, timings) => {
|
|
7
|
+
export const run_task = async (task_meta, unparsed_args, invoke_task, config, filer, log, timings) => {
|
|
10
8
|
const { task } = task_meta.mod;
|
|
11
|
-
const log = new System_Logger(print_log_label(task_meta.name));
|
|
12
9
|
if (unparsed_args.help) {
|
|
13
10
|
log_task_help(log, task_meta);
|
|
14
11
|
return { ok: true, output: null };
|
|
@@ -32,7 +29,7 @@ export const run_task = async (task_meta, unparsed_args, invoke_task, config, fi
|
|
|
32
29
|
filer,
|
|
33
30
|
log,
|
|
34
31
|
timings,
|
|
35
|
-
invoke_task: (invoked_task_name, invoked_args, invoked_config) => invoke_task(invoked_task_name, invoked_args, invoked_config ?? config, filer, timings),
|
|
32
|
+
invoke_task: (invoked_task_name, invoked_args, invoked_config) => invoke_task(invoked_task_name, invoked_args, invoked_config ?? config, filer, timings, log),
|
|
36
33
|
});
|
|
37
34
|
}
|
|
38
35
|
catch (err) {
|
package/dist/task_logging.js
CHANGED
|
@@ -23,7 +23,7 @@ export const log_tasks = (log, loaded_tasks, log_intro = true) => {
|
|
|
23
23
|
logged.push('\n' + st('cyan', meta.name.padEnd(longest_task_name)), ' ', meta.mod.task.summary ?? '');
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
log[log_intro ? 'info' : '
|
|
26
|
+
log[log_intro ? 'info' : 'raw'](logged.join('') + '\n');
|
|
27
27
|
};
|
|
28
28
|
export const log_error_reasons = (log, reasons) => {
|
|
29
29
|
for (const reason of reasons) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryanatkn/gro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.173.1",
|
|
4
4
|
"description": "task runner and toolkit extending SvelteKit",
|
|
5
5
|
"motto": "generate, run, optimize",
|
|
6
6
|
"glyph": "🌰",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"zod": "^4.1.12"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@ryanatkn/belt": "^0.
|
|
64
|
+
"@ryanatkn/belt": "^0.37.0",
|
|
65
65
|
"@sveltejs/kit": "^2",
|
|
66
66
|
"esbuild": "^0.25",
|
|
67
67
|
"svelte": "^5",
|
package/src/lib/invoke.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {attach_process_error_handlers} from '@ryanatkn/belt/process.js';
|
|
2
|
-
import {configure_log_colors} from '@ryanatkn/belt/log.js';
|
|
3
2
|
import {configure_print_colors} from '@ryanatkn/belt/print.js';
|
|
4
3
|
|
|
5
4
|
import {invoke_task} from './invoke_task.ts';
|
|
@@ -26,7 +25,6 @@ attach_process_error_handlers(
|
|
|
26
25
|
|
|
27
26
|
if (!process.env.NO_COLOR) {
|
|
28
27
|
const {styleText} = await import('node:util');
|
|
29
|
-
configure_log_colors(styleText);
|
|
30
28
|
configure_print_colors(styleText);
|
|
31
29
|
}
|
|
32
30
|
|
package/src/lib/invoke_task.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {styleText as st} from 'node:util';
|
|
2
|
-
import {System_Logger} from '@ryanatkn/belt/log.js';
|
|
3
2
|
import {create_stopwatch, Timings} from '@ryanatkn/belt/timings.js';
|
|
4
|
-
import {print_ms, print_timings
|
|
3
|
+
import {print_ms, print_timings} from '@ryanatkn/belt/print.js';
|
|
4
|
+
import {Logger} from '@ryanatkn/belt/log.js';
|
|
5
5
|
|
|
6
6
|
import {to_forwarded_args, type Args} from './args.ts';
|
|
7
7
|
import {run_task} from './run_task.ts';
|
|
@@ -40,13 +40,16 @@ export const invoke_task = async (
|
|
|
40
40
|
config: Gro_Config,
|
|
41
41
|
initial_filer?: Filer,
|
|
42
42
|
initial_timings?: Timings | null,
|
|
43
|
+
parent_log?: Logger,
|
|
43
44
|
): Promise<void> => {
|
|
44
|
-
|
|
45
|
+
// Create child logger if parent exists, otherwise root logger
|
|
46
|
+
const log_label = task_name || 'gro';
|
|
47
|
+
const log = parent_log ? parent_log.child(log_label) : new Logger(log_label);
|
|
45
48
|
log.info('invoking', task_name ? st('cyan', task_name) : 'gro');
|
|
46
49
|
|
|
47
50
|
// track if we created the filer
|
|
48
51
|
const owns_filer = !initial_filer;
|
|
49
|
-
const filer = initial_filer ?? new Filer({log});
|
|
52
|
+
const filer = initial_filer ?? new Filer({log: log.child('filer')});
|
|
50
53
|
|
|
51
54
|
const owns_timings = !initial_timings;
|
|
52
55
|
const timings = initial_timings ?? new Timings();
|
|
@@ -120,6 +123,7 @@ export const invoke_task = async (
|
|
|
120
123
|
invoke_task,
|
|
121
124
|
config,
|
|
122
125
|
filer,
|
|
126
|
+
log,
|
|
123
127
|
timings,
|
|
124
128
|
);
|
|
125
129
|
timing_to_run_task();
|
package/src/lib/package.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {Src_Json} from '@ryanatkn/belt/src_json.js';
|
|
|
5
5
|
|
|
6
6
|
export const package_json: Package_Json = {
|
|
7
7
|
name: '@ryanatkn/gro',
|
|
8
|
-
version: '0.
|
|
8
|
+
version: '0.173.0',
|
|
9
9
|
description: 'task runner and toolkit extending SvelteKit',
|
|
10
10
|
motto: 'generate, run, optimize',
|
|
11
11
|
glyph: '🌰',
|
|
@@ -56,7 +56,7 @@ export const package_json: Package_Json = {
|
|
|
56
56
|
zod: '^4.1.12',
|
|
57
57
|
},
|
|
58
58
|
peerDependencies: {
|
|
59
|
-
'@ryanatkn/belt': '^0.
|
|
59
|
+
'@ryanatkn/belt': '^0.37.0',
|
|
60
60
|
'@sveltejs/kit': '^2',
|
|
61
61
|
esbuild: '^0.25',
|
|
62
62
|
svelte: '^5',
|
|
@@ -105,7 +105,7 @@ export const package_json: Package_Json = {
|
|
|
105
105
|
|
|
106
106
|
export const src_json: Src_Json = {
|
|
107
107
|
name: '@ryanatkn/gro',
|
|
108
|
-
version: '0.
|
|
108
|
+
version: '0.173.0',
|
|
109
109
|
modules: {
|
|
110
110
|
'.': {
|
|
111
111
|
path: 'index.ts',
|
package/src/lib/publish.task.ts
CHANGED
|
@@ -102,9 +102,13 @@ export const task: Task<Args> = {
|
|
|
102
102
|
await git_pull(origin, branch);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
//
|
|
105
|
+
// Install packages to ensure deps are current.
|
|
106
|
+
// Handles cases like branch switches where package.json changed.
|
|
107
|
+
await invoke_task('sync', {install: true});
|
|
108
|
+
|
|
109
|
+
// Check before proceeding, defaults to true.
|
|
106
110
|
if (check) {
|
|
107
|
-
await invoke_task('check', {workspace: true});
|
|
111
|
+
await invoke_task('check', {workspace: true, sync: false});
|
|
108
112
|
}
|
|
109
113
|
|
|
110
114
|
let version!: string;
|
|
@@ -162,8 +166,9 @@ export const task: Task<Args> = {
|
|
|
162
166
|
}
|
|
163
167
|
|
|
164
168
|
// Build after the version is bumped so the new version is in the build as needed.
|
|
169
|
+
// Skip sync and install because we already handled both above.
|
|
165
170
|
if (build) {
|
|
166
|
-
await invoke_task('build');
|
|
171
|
+
await invoke_task('build', {sync: false, install: false});
|
|
167
172
|
}
|
|
168
173
|
|
|
169
174
|
// Return early if there are no changes and publishing is optional, but after building,
|
package/src/lib/run_task.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {styleText as st} from 'node:util';
|
|
2
|
-
import {print_log_label} from '@ryanatkn/belt/print.js';
|
|
3
|
-
import {System_Logger} from '@ryanatkn/belt/log.js';
|
|
4
2
|
import type {Timings} from '@ryanatkn/belt/timings.js';
|
|
3
|
+
import type {Logger} from '@ryanatkn/belt/log.js';
|
|
5
4
|
import {z} from 'zod';
|
|
6
5
|
|
|
7
6
|
import {parse_args, type Args} from './args.ts';
|
|
@@ -29,10 +28,10 @@ export const run_task = async (
|
|
|
29
28
|
invoke_task: typeof base_invoke_task,
|
|
30
29
|
config: Gro_Config,
|
|
31
30
|
filer: Filer,
|
|
31
|
+
log: Logger,
|
|
32
32
|
timings: Timings,
|
|
33
33
|
): Promise<Run_Task_Result> => {
|
|
34
34
|
const {task} = task_meta.mod;
|
|
35
|
-
const log = new System_Logger(print_log_label(task_meta.name));
|
|
36
35
|
|
|
37
36
|
if (unparsed_args.help) {
|
|
38
37
|
log_task_help(log, task_meta);
|
|
@@ -62,7 +61,7 @@ export const run_task = async (
|
|
|
62
61
|
log,
|
|
63
62
|
timings,
|
|
64
63
|
invoke_task: (invoked_task_name, invoked_args, invoked_config) =>
|
|
65
|
-
invoke_task(invoked_task_name, invoked_args, invoked_config ?? config, filer, timings),
|
|
64
|
+
invoke_task(invoked_task_name, invoked_args, invoked_config ?? config, filer, timings, log),
|
|
66
65
|
});
|
|
67
66
|
} catch (err) {
|
|
68
67
|
return {
|
package/src/lib/task_logging.ts
CHANGED
|
@@ -41,7 +41,7 @@ export const log_tasks = (log: Logger, loaded_tasks: Loaded_Tasks, log_intro = t
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
log[log_intro ? 'info' : '
|
|
44
|
+
log[log_intro ? 'info' : 'raw'](logged.join('') + '\n');
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export const log_error_reasons = (log: Logger, reasons: Array<string>): void => {
|