@ryanatkn/gro 0.190.1 → 0.192.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/README.md +4 -278
- package/package.json +5 -142
- package/LICENSE +0 -21
- package/dist/args.d.ts +0 -37
- package/dist/args.d.ts.map +0 -1
- package/dist/args.js +0 -102
- package/dist/build.task.d.ts +0 -20
- package/dist/build.task.d.ts.map +0 -1
- package/dist/build.task.js +0 -119
- package/dist/build_cache.d.ts +0 -100
- package/dist/build_cache.d.ts.map +0 -1
- package/dist/build_cache.js +0 -299
- package/dist/changelog.d.ts +0 -11
- package/dist/changelog.d.ts.map +0 -1
- package/dist/changelog.js +0 -47
- package/dist/changeset.task.d.ts +0 -35
- package/dist/changeset.task.d.ts.map +0 -1
- package/dist/changeset.task.js +0 -151
- package/dist/changeset_helpers.d.ts +0 -17
- package/dist/changeset_helpers.d.ts.map +0 -1
- package/dist/changeset_helpers.js +0 -7
- package/dist/check.task.d.ts +0 -28
- package/dist/check.task.d.ts.map +0 -1
- package/dist/check.task.js +0 -95
- package/dist/child_process_logging.d.ts +0 -10
- package/dist/child_process_logging.d.ts.map +0 -1
- package/dist/child_process_logging.js +0 -26
- package/dist/clean.task.d.ts +0 -15
- package/dist/clean.task.d.ts.map +0 -1
- package/dist/clean.task.js +0 -40
- package/dist/clean_fs.d.ts +0 -9
- package/dist/clean_fs.d.ts.map +0 -1
- package/dist/clean_fs.js +0 -28
- package/dist/cli.d.ts +0 -34
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -61
- package/dist/commit.task.d.ts +0 -11
- package/dist/commit.task.d.ts.map +0 -1
- package/dist/commit.task.js +0 -24
- package/dist/constants.d.ts +0 -46
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -52
- package/dist/deploy.task.d.ts +0 -29
- package/dist/deploy.task.d.ts.map +0 -1
- package/dist/deploy.task.js +0 -217
- package/dist/dev.task.d.ts +0 -16
- package/dist/dev.task.d.ts.map +0 -1
- package/dist/dev.task.js +0 -44
- package/dist/disknode.d.ts +0 -23
- package/dist/disknode.d.ts.map +0 -1
- package/dist/disknode.js +0 -1
- package/dist/env.d.ts +0 -11
- package/dist/env.d.ts.map +0 -1
- package/dist/env.js +0 -49
- package/dist/esbuild_helpers.d.ts +0 -16
- package/dist/esbuild_helpers.d.ts.map +0 -1
- package/dist/esbuild_helpers.js +0 -36
- package/dist/esbuild_plugin_external_worker.d.ts +0 -23
- package/dist/esbuild_plugin_external_worker.d.ts.map +0 -1
- package/dist/esbuild_plugin_external_worker.js +0 -55
- package/dist/esbuild_plugin_svelte.d.ts +0 -15
- package/dist/esbuild_plugin_svelte.d.ts.map +0 -1
- package/dist/esbuild_plugin_svelte.js +0 -83
- package/dist/esbuild_plugin_sveltekit_local_imports.d.ts +0 -8
- package/dist/esbuild_plugin_sveltekit_local_imports.d.ts.map +0 -1
- package/dist/esbuild_plugin_sveltekit_local_imports.js +0 -30
- package/dist/esbuild_plugin_sveltekit_shim_alias.d.ts +0 -7
- package/dist/esbuild_plugin_sveltekit_shim_alias.d.ts.map +0 -1
- package/dist/esbuild_plugin_sveltekit_shim_alias.js +0 -18
- package/dist/esbuild_plugin_sveltekit_shim_app.d.ts +0 -9
- package/dist/esbuild_plugin_sveltekit_shim_app.d.ts.map +0 -1
- package/dist/esbuild_plugin_sveltekit_shim_app.js +0 -22
- package/dist/esbuild_plugin_sveltekit_shim_env.d.ts +0 -11
- package/dist/esbuild_plugin_sveltekit_shim_env.d.ts.map +0 -1
- package/dist/esbuild_plugin_sveltekit_shim_env.js +0 -18
- package/dist/filer.d.ts +0 -33
- package/dist/filer.d.ts.map +0 -1
- package/dist/filer.js +0 -385
- package/dist/format.task.d.ts +0 -11
- package/dist/format.task.d.ts.map +0 -1
- package/dist/format.task.js +0 -27
- package/dist/format_directory.d.ts +0 -13
- package/dist/format_directory.d.ts.map +0 -1
- package/dist/format_directory.js +0 -40
- package/dist/format_file.d.ts +0 -9
- package/dist/format_file.d.ts.map +0 -1
- package/dist/format_file.js +0 -42
- package/dist/gen.d.ts +0 -142
- package/dist/gen.d.ts.map +0 -1
- package/dist/gen.js +0 -199
- package/dist/gen.task.d.ts +0 -12
- package/dist/gen.task.d.ts.map +0 -1
- package/dist/gen.task.js +0 -149
- package/dist/gen_helpers.d.ts +0 -11
- package/dist/gen_helpers.d.ts.map +0 -1
- package/dist/gen_helpers.js +0 -76
- package/dist/github.d.ts +0 -19
- package/dist/github.d.ts.map +0 -1
- package/dist/github.js +0 -33
- package/dist/gro.config.default.d.ts +0 -13
- package/dist/gro.config.default.d.ts.map +0 -1
- package/dist/gro.config.default.js +0 -33
- package/dist/gro.d.ts +0 -3
- package/dist/gro.d.ts.map +0 -1
- package/dist/gro.js +0 -21
- package/dist/gro_config.d.ts +0 -115
- package/dist/gro_config.d.ts.map +0 -1
- package/dist/gro_config.js +0 -114
- package/dist/gro_helpers.d.ts +0 -49
- package/dist/gro_helpers.d.ts.map +0 -1
- package/dist/gro_helpers.js +0 -97
- package/dist/gro_plugin_gen.d.ts +0 -12
- package/dist/gro_plugin_gen.d.ts.map +0 -1
- package/dist/gro_plugin_gen.js +0 -101
- package/dist/gro_plugin_server.d.ts +0 -80
- package/dist/gro_plugin_server.d.ts.map +0 -1
- package/dist/gro_plugin_server.js +0 -167
- package/dist/gro_plugin_sveltekit_app.d.ts +0 -9
- package/dist/gro_plugin_sveltekit_app.d.ts.map +0 -1
- package/dist/gro_plugin_sveltekit_app.js +0 -42
- package/dist/gro_plugin_sveltekit_library.d.ts +0 -16
- package/dist/gro_plugin_sveltekit_library.d.ts.map +0 -1
- package/dist/gro_plugin_sveltekit_library.js +0 -34
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -4
- package/dist/input_path.d.ts +0 -64
- package/dist/input_path.d.ts.map +0 -1
- package/dist/input_path.js +0 -199
- package/dist/invoke.d.ts +0 -2
- package/dist/invoke.d.ts.map +0 -1
- package/dist/invoke.js +0 -28
- package/dist/invoke_task.d.ts +0 -30
- package/dist/invoke_task.d.ts.map +0 -1
- package/dist/invoke_task.js +0 -104
- package/dist/lint.task.d.ts +0 -11
- package/dist/lint.task.d.ts.map +0 -1
- package/dist/lint.task.js +0 -32
- package/dist/loader.d.ts +0 -6
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -192
- package/dist/module.d.ts +0 -4
- package/dist/module.d.ts.map +0 -1
- package/dist/module.js +0 -6
- package/dist/modules.d.ts +0 -36
- package/dist/modules.d.ts.map +0 -1
- package/dist/modules.js +0 -71
- package/dist/package_json.d.ts +0 -32
- package/dist/package_json.d.ts.map +0 -1
- package/dist/package_json.js +0 -178
- package/dist/parse_exports.d.ts +0 -20
- package/dist/parse_exports.d.ts.map +0 -1
- package/dist/parse_exports.js +0 -65
- package/dist/parse_exports_context.d.ts +0 -21
- package/dist/parse_exports_context.d.ts.map +0 -1
- package/dist/parse_exports_context.js +0 -332
- package/dist/parse_imports.d.ts +0 -5
- package/dist/parse_imports.d.ts.map +0 -1
- package/dist/parse_imports.js +0 -140
- package/dist/paths.d.ts +0 -41
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js +0 -69
- package/dist/plugin.d.ts +0 -36
- package/dist/plugin.d.ts.map +0 -1
- package/dist/plugin.js +0 -78
- package/dist/publish.task.d.ts +0 -26
- package/dist/publish.task.d.ts.map +0 -1
- package/dist/publish.task.js +0 -176
- package/dist/register.d.ts +0 -2
- package/dist/register.d.ts.map +0 -1
- package/dist/register.js +0 -2
- package/dist/reinstall.task.d.ts +0 -8
- package/dist/reinstall.task.d.ts.map +0 -1
- package/dist/reinstall.task.js +0 -35
- package/dist/release.task.d.ts +0 -8
- package/dist/release.task.d.ts.map +0 -1
- package/dist/release.task.js +0 -20
- package/dist/resolve.task.d.ts +0 -11
- package/dist/resolve.task.d.ts.map +0 -1
- package/dist/resolve.task.js +0 -38
- package/dist/resolve_specifier.d.ts +0 -22
- package/dist/resolve_specifier.d.ts.map +0 -1
- package/dist/resolve_specifier.js +0 -57
- package/dist/run.task.d.ts +0 -16
- package/dist/run.task.d.ts.map +0 -1
- package/dist/run.task.js +0 -52
- package/dist/run_gen.d.ts +0 -10
- package/dist/run_gen.d.ts.map +0 -1
- package/dist/run_gen.js +0 -73
- package/dist/run_task.d.ts +0 -17
- package/dist/run_task.d.ts.map +0 -1
- package/dist/run_task.js +0 -45
- package/dist/source_json.d.ts +0 -7
- package/dist/source_json.d.ts.map +0 -1
- package/dist/source_json.js +0 -145
- package/dist/svelte_config.d.ts +0 -57
- package/dist/svelte_config.d.ts.map +0 -1
- package/dist/svelte_config.js +0 -81
- package/dist/sveltekit_helpers.d.ts +0 -75
- package/dist/sveltekit_helpers.d.ts.map +0 -1
- package/dist/sveltekit_helpers.js +0 -94
- package/dist/sveltekit_shim_app.d.ts +0 -11
- package/dist/sveltekit_shim_app.d.ts.map +0 -1
- package/dist/sveltekit_shim_app.js +0 -31
- package/dist/sveltekit_shim_app_environment.d.ts +0 -13
- package/dist/sveltekit_shim_app_environment.d.ts.map +0 -1
- package/dist/sveltekit_shim_app_environment.js +0 -14
- package/dist/sveltekit_shim_app_forms.d.ts +0 -5
- package/dist/sveltekit_shim_app_forms.d.ts.map +0 -1
- package/dist/sveltekit_shim_app_forms.js +0 -6
- package/dist/sveltekit_shim_app_navigation.d.ts +0 -10
- package/dist/sveltekit_shim_app_navigation.d.ts.map +0 -1
- package/dist/sveltekit_shim_app_navigation.js +0 -11
- package/dist/sveltekit_shim_app_paths.d.ts +0 -17
- package/dist/sveltekit_shim_app_paths.d.ts.map +0 -1
- package/dist/sveltekit_shim_app_paths.js +0 -10
- package/dist/sveltekit_shim_app_state.d.ts +0 -5
- package/dist/sveltekit_shim_app_state.d.ts.map +0 -1
- package/dist/sveltekit_shim_app_state.js +0 -26
- package/dist/sveltekit_shim_env.d.ts +0 -5
- package/dist/sveltekit_shim_env.d.ts.map +0 -1
- package/dist/sveltekit_shim_env.js +0 -23
- package/dist/sync.task.d.ts +0 -16
- package/dist/sync.task.d.ts.map +0 -1
- package/dist/sync.task.js +0 -39
- package/dist/task.d.ts +0 -98
- package/dist/task.d.ts.map +0 -1
- package/dist/task.js +0 -109
- package/dist/task_logging.d.ts +0 -6
- package/dist/task_logging.d.ts.map +0 -1
- package/dist/task_logging.js +0 -201
- package/dist/test.task.d.ts +0 -13
- package/dist/test.task.d.ts.map +0 -1
- package/dist/test.task.js +0 -53
- package/dist/typecheck.task.d.ts +0 -13
- package/dist/typecheck.task.d.ts.map +0 -1
- package/dist/typecheck.task.js +0 -68
- package/dist/upgrade.task.d.ts +0 -20
- package/dist/upgrade.task.d.ts.map +0 -1
- package/dist/upgrade.task.js +0 -111
- package/dist/watch_dir.d.ts +0 -36
- package/dist/watch_dir.d.ts.map +0 -1
- package/dist/watch_dir.js +0 -69
- package/src/lib/args.ts +0 -115
- package/src/lib/build.task.ts +0 -151
- package/src/lib/build_cache.ts +0 -378
- package/src/lib/changelog.ts +0 -69
- package/src/lib/changeset.task.ts +0 -228
- package/src/lib/changeset_helpers.ts +0 -14
- package/src/lib/check.task.ts +0 -120
- package/src/lib/child_process_logging.ts +0 -38
- package/src/lib/clean.task.ts +0 -48
- package/src/lib/clean_fs.ts +0 -54
- package/src/lib/cli.ts +0 -98
- package/src/lib/commit.task.ts +0 -34
- package/src/lib/constants.ts +0 -56
- package/src/lib/deploy.task.ts +0 -287
- package/src/lib/dev.task.ts +0 -52
- package/src/lib/disknode.ts +0 -26
- package/src/lib/env.ts +0 -78
- package/src/lib/esbuild_helpers.ts +0 -49
- package/src/lib/esbuild_plugin_external_worker.ts +0 -94
- package/src/lib/esbuild_plugin_svelte.ts +0 -134
- package/src/lib/esbuild_plugin_sveltekit_local_imports.ts +0 -38
- package/src/lib/esbuild_plugin_sveltekit_shim_alias.ts +0 -27
- package/src/lib/esbuild_plugin_sveltekit_shim_app.ts +0 -42
- package/src/lib/esbuild_plugin_sveltekit_shim_env.ts +0 -47
- package/src/lib/filer.ts +0 -458
- package/src/lib/format.task.ts +0 -44
- package/src/lib/format_directory.ts +0 -65
- package/src/lib/format_file.ts +0 -49
- package/src/lib/gen.task.ts +0 -206
- package/src/lib/gen.ts +0 -406
- package/src/lib/gen_helpers.ts +0 -131
- package/src/lib/github.ts +0 -46
- package/src/lib/gro.config.default.ts +0 -42
- package/src/lib/gro.ts +0 -29
- package/src/lib/gro_config.ts +0 -254
- package/src/lib/gro_helpers.ts +0 -108
- package/src/lib/gro_plugin_gen.ts +0 -149
- package/src/lib/gro_plugin_server.ts +0 -288
- package/src/lib/gro_plugin_sveltekit_app.ts +0 -58
- package/src/lib/gro_plugin_sveltekit_library.ts +0 -63
- package/src/lib/index.ts +0 -8
- package/src/lib/input_path.ts +0 -254
- package/src/lib/invoke.ts +0 -34
- package/src/lib/invoke_task.ts +0 -139
- package/src/lib/lint.task.ts +0 -39
- package/src/lib/loader.ts +0 -229
- package/src/lib/module.ts +0 -13
- package/src/lib/modules.ts +0 -117
- package/src/lib/package_json.ts +0 -255
- package/src/lib/parse_exports.ts +0 -100
- package/src/lib/parse_exports_context.ts +0 -395
- package/src/lib/parse_imports.ts +0 -180
- package/src/lib/paths.ts +0 -111
- package/src/lib/plugin.ts +0 -106
- package/src/lib/publish.task.ts +0 -228
- package/src/lib/register.ts +0 -3
- package/src/lib/reinstall.task.ts +0 -45
- package/src/lib/release.task.ts +0 -26
- package/src/lib/resolve.task.ts +0 -43
- package/src/lib/resolve_specifier.ts +0 -81
- package/src/lib/run.task.ts +0 -65
- package/src/lib/run_gen.ts +0 -110
- package/src/lib/run_task.ts +0 -82
- package/src/lib/source_json.ts +0 -183
- package/src/lib/svelte_config.ts +0 -140
- package/src/lib/sveltekit_helpers.ts +0 -193
- package/src/lib/sveltekit_shim_app.ts +0 -41
- package/src/lib/sveltekit_shim_app_environment.ts +0 -16
- package/src/lib/sveltekit_shim_app_forms.ts +0 -13
- package/src/lib/sveltekit_shim_app_navigation.ts +0 -23
- package/src/lib/sveltekit_shim_app_paths.ts +0 -26
- package/src/lib/sveltekit_shim_app_state.ts +0 -35
- package/src/lib/sveltekit_shim_env.ts +0 -45
- package/src/lib/sync.task.ts +0 -47
- package/src/lib/task.ts +0 -245
- package/src/lib/task_logging.ts +0 -255
- package/src/lib/test.task.ts +0 -63
- package/src/lib/typecheck.task.ts +0 -81
- package/src/lib/upgrade.task.ts +0 -148
- package/src/lib/watch_dir.ts +0 -115
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export const SVELTEKIT_SHIM_APP_PATHS_MATCHER = /\/util\/sveltekit_shim_app_paths\.js$/;
|
|
2
|
-
export const SVELTEKIT_SHIM_APP_ENVIRONMENT_MATCHER = /\/util\/sveltekit_shim_app_environment\.js$/;
|
|
3
|
-
/**
|
|
4
|
-
* Maps SvelteKit `$app` specifiers to their Gro shims.
|
|
5
|
-
* @see https://kit.svelte.dev/docs/modules
|
|
6
|
-
*/
|
|
7
|
-
export const sveltekit_shim_app_specifiers = new Map([
|
|
8
|
-
['$app/environment', '@ryanatkn/gro/sveltekit_shim_app_environment.js'],
|
|
9
|
-
['$app/forms', '@ryanatkn/gro/sveltekit_shim_app_forms.js'],
|
|
10
|
-
['$app/navigation', '@ryanatkn/gro/sveltekit_shim_app_navigation.js'],
|
|
11
|
-
['$app/paths', '@ryanatkn/gro/sveltekit_shim_app_paths.js'],
|
|
12
|
-
['$app/state', '@ryanatkn/gro/sveltekit_shim_app_state.js'],
|
|
13
|
-
]);
|
|
14
|
-
export const render_sveltekit_shim_app_paths = (base_url = '', assets_url = '') => `// shim for $app/paths
|
|
15
|
-
// @see https://github.com/sveltejs/kit/issues/1485
|
|
16
|
-
|
|
17
|
-
export const assets = ${JSON.stringify(assets_url)};
|
|
18
|
-
export const base = ${JSON.stringify(base_url)};
|
|
19
|
-
`;
|
|
20
|
-
// TODO improve support
|
|
21
|
-
// `dev` is not guaranteed to be the same as `MODE` - https://kit.svelte.dev/docs/modules#$app-environment-dev
|
|
22
|
-
// `version` is `config.kit.version.name` but I couldn't see how to load a SvelteKit `ValidatedConfig`
|
|
23
|
-
// `building` is just being hardcoded, might be better (but still not correct) to be `!dev`
|
|
24
|
-
export const render_sveltekit_shim_app_environment = (dev) => `// shim for $app/environment
|
|
25
|
-
// @see https://github.com/sveltejs/kit/issues/1485
|
|
26
|
-
|
|
27
|
-
export const browser = false;
|
|
28
|
-
export const building = false;
|
|
29
|
-
export const dev = ${JSON.stringify(dev)};
|
|
30
|
-
export const version = 'TODO';
|
|
31
|
-
`;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is created dynamically by `render_sveltekit_shim_app_environment`
|
|
3
|
-
* but exists here for the sake of the Node loader.
|
|
4
|
-
* There may be a cleaner workaround but I couldn't find it.
|
|
5
|
-
* @see https://github.com/nodejs/loaders for details about the forthcoming virtual file support
|
|
6
|
-
*
|
|
7
|
-
* @module
|
|
8
|
-
*/
|
|
9
|
-
export declare const browser = false;
|
|
10
|
-
export declare const building = false;
|
|
11
|
-
export declare const dev = true;
|
|
12
|
-
export declare const version = "TODO";
|
|
13
|
-
//# sourceMappingURL=sveltekit_shim_app_environment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sveltekit_shim_app_environment.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/sveltekit_shim_app_environment.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,eAAO,MAAM,OAAO,QAAQ,CAAC;AAC7B,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAC9B,eAAO,MAAM,GAAG,OAAO,CAAC;AACxB,eAAO,MAAM,OAAO,SAAS,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// shim for $app/environment
|
|
2
|
-
// @see https://github.com/sveltejs/kit/issues/1485
|
|
3
|
-
/**
|
|
4
|
-
* This file is created dynamically by `render_sveltekit_shim_app_environment`
|
|
5
|
-
* but exists here for the sake of the Node loader.
|
|
6
|
-
* There may be a cleaner workaround but I couldn't find it.
|
|
7
|
-
* @see https://github.com/nodejs/loaders for details about the forthcoming virtual file support
|
|
8
|
-
*
|
|
9
|
-
* @module
|
|
10
|
-
*/
|
|
11
|
-
export const browser = false;
|
|
12
|
-
export const building = false;
|
|
13
|
-
export const dev = true;
|
|
14
|
-
export const version = 'TODO';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { applyAction as base_applyAction, deserialize as base_deserialize, enhance as base_enhance } from '$app/forms';
|
|
2
|
-
export declare const applyAction: typeof base_applyAction;
|
|
3
|
-
export declare const deserialize: typeof base_deserialize;
|
|
4
|
-
export declare const enhance: typeof base_enhance;
|
|
5
|
-
//# sourceMappingURL=sveltekit_shim_app_forms.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sveltekit_shim_app_forms.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/sveltekit_shim_app_forms.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACX,WAAW,IAAI,gBAAgB,EAC/B,WAAW,IAAI,gBAAgB,EAC/B,OAAO,IAAI,YAAY,EACvB,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,WAAW,EAAE,OAAO,gBAA6B,CAAC;AAC/D,eAAO,MAAM,WAAW,EAAE,OAAO,gBAAoC,CAAC;AACtE,eAAO,MAAM,OAAO,EAAE,OAAO,YAAsC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// shim for $app/forms
|
|
2
|
-
// @see https://github.com/sveltejs/kit/issues/1485
|
|
3
|
-
import { noop, noop_async } from '@fuzdev/fuz_util/function.js';
|
|
4
|
-
export const applyAction = noop_async;
|
|
5
|
-
export const deserialize = () => ({});
|
|
6
|
-
export const enhance = () => ({ destroy: noop });
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { afterNavigate as base_afterNavigate, beforeNavigate as base_beforeNavigate, disableScrollHandling as base_disableScrollHandling, goto as base_goto, invalidate as base_invalidate, invalidateAll as base_invalidateAll, preloadCode as base_preloadCode, preloadData as base_preloadData } from '$app/navigation';
|
|
2
|
-
export declare const afterNavigate: typeof base_afterNavigate;
|
|
3
|
-
export declare const beforeNavigate: typeof base_beforeNavigate;
|
|
4
|
-
export declare const disableScrollHandling: typeof base_disableScrollHandling;
|
|
5
|
-
export declare const goto: typeof base_goto;
|
|
6
|
-
export declare const invalidate: typeof base_invalidate;
|
|
7
|
-
export declare const invalidateAll: typeof base_invalidateAll;
|
|
8
|
-
export declare const preloadCode: typeof base_preloadCode;
|
|
9
|
-
export declare const preloadData: typeof base_preloadData;
|
|
10
|
-
//# sourceMappingURL=sveltekit_shim_app_navigation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sveltekit_shim_app_navigation.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/sveltekit_shim_app_navigation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACX,aAAa,IAAI,kBAAkB,EACnC,cAAc,IAAI,mBAAmB,EACrC,qBAAqB,IAAI,0BAA0B,EACnD,IAAI,IAAI,SAAS,EACjB,UAAU,IAAI,eAAe,EAC7B,aAAa,IAAI,kBAAkB,EACnC,WAAW,IAAI,gBAAgB,EAC/B,WAAW,IAAI,gBAAgB,EAC/B,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,aAAa,EAAE,OAAO,kBAAyB,CAAC;AAC7D,eAAO,MAAM,cAAc,EAAE,OAAO,mBAA0B,CAAC;AAC/D,eAAO,MAAM,qBAAqB,EAAE,OAAO,0BAAiC,CAAC;AAC7E,eAAO,MAAM,IAAI,EAAE,OAAO,SAAsB,CAAC;AACjD,eAAO,MAAM,UAAU,EAAE,OAAO,eAA4B,CAAC;AAC7D,eAAO,MAAM,aAAa,EAAE,OAAO,kBAA+B,CAAC;AACnE,eAAO,MAAM,WAAW,EAAE,OAAO,gBAA6B,CAAC;AAC/D,eAAO,MAAM,WAAW,EAAE,OAAO,gBAA6B,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// shim for $app/navigation
|
|
2
|
-
// @see https://github.com/sveltejs/kit/issues/1485
|
|
3
|
-
import { noop, noop_async } from '@fuzdev/fuz_util/function.js';
|
|
4
|
-
export const afterNavigate = noop;
|
|
5
|
-
export const beforeNavigate = noop;
|
|
6
|
-
export const disableScrollHandling = noop;
|
|
7
|
-
export const goto = noop_async;
|
|
8
|
-
export const invalidate = noop_async;
|
|
9
|
-
export const invalidateAll = noop_async;
|
|
10
|
-
export const preloadCode = noop_async;
|
|
11
|
-
export const preloadData = noop_async;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is created dynamically by `render_sveltekit_shim_app_paths`
|
|
3
|
-
* but exists here for the sake of the Node loader.
|
|
4
|
-
* There may be a cleaner workaround but I couldn't find it.
|
|
5
|
-
* @see https://github.com/nodejs/loaders for details about the forthcoming virtual file support
|
|
6
|
-
*
|
|
7
|
-
* @module
|
|
8
|
-
*/
|
|
9
|
-
import type { resolve as base_resolve, asset as base_asset, resolveRoute as base_resolveRoute } from '$app/paths';
|
|
10
|
-
export declare const assets = "";
|
|
11
|
-
/** @deprecated */
|
|
12
|
-
export declare const base = "";
|
|
13
|
-
export declare const resolve: typeof base_resolve;
|
|
14
|
-
/** @deprecated */
|
|
15
|
-
export declare const resolveRoute: typeof base_resolveRoute;
|
|
16
|
-
export declare const asset: typeof base_asset;
|
|
17
|
-
//# sourceMappingURL=sveltekit_shim_app_paths.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sveltekit_shim_app_paths.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/sveltekit_shim_app_paths.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACX,OAAO,IAAI,YAAY,EACvB,KAAK,IAAI,UAAU,EACnB,YAAY,IAAI,iBAAiB,EACjC,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,MAAM,KAAK,CAAC;AACzB,kBAAkB;AAClB,eAAO,MAAM,IAAI,KAAK,CAAC;AACvB,eAAO,MAAM,OAAO,EAAE,OAAO,YAAmE,CAAC;AACjG,kBAAkB;AAClB,eAAO,MAAM,YAAY,EAAE,OAAO,iBAAwB,CAAC;AAC3D,eAAO,MAAM,KAAK,EAAE,OAAO,UAAuD,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// shim for $app/paths
|
|
2
|
-
// @see https://github.com/sveltejs/kit/issues/1485
|
|
3
|
-
import { noop } from '@fuzdev/fuz_util/function.js';
|
|
4
|
-
export const assets = '';
|
|
5
|
-
/** @deprecated */
|
|
6
|
-
export const base = '';
|
|
7
|
-
export const resolve = (v, ..._rest) => ('/' + v.replace(/^\//, '')); // TODO needs to use SvelteKit config base
|
|
8
|
-
/** @deprecated */
|
|
9
|
-
export const resolveRoute = noop; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
10
|
-
export const asset = (v) => ('/' + v.replace(/^\//, '')); // TODO needs to use SvelteKit config base
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { navigating as base_navigating, page as base_page, updated as base_updated } from '$app/state';
|
|
2
|
-
export declare const navigating: typeof base_navigating;
|
|
3
|
-
export declare const page: typeof base_page;
|
|
4
|
-
export declare const updated: typeof base_updated;
|
|
5
|
-
//# sourceMappingURL=sveltekit_shim_app_state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sveltekit_shim_app_state.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/sveltekit_shim_app_state.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACX,UAAU,IAAI,eAAe,EAC7B,IAAI,IAAI,SAAS,EACjB,OAAO,IAAI,YAAY,EACvB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,UAAU,EAAE,OAAO,eAO/B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,OAAO,SASzB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,OAAO,YAK5B,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// shim for $app/state
|
|
2
|
-
// @see https://github.com/sveltejs/kit/issues/1485
|
|
3
|
-
export const navigating = {
|
|
4
|
-
from: null,
|
|
5
|
-
to: null,
|
|
6
|
-
type: null,
|
|
7
|
-
willUnload: null,
|
|
8
|
-
delta: null,
|
|
9
|
-
complete: null,
|
|
10
|
-
};
|
|
11
|
-
export const page = {
|
|
12
|
-
data: {},
|
|
13
|
-
form: null,
|
|
14
|
-
error: null,
|
|
15
|
-
params: {},
|
|
16
|
-
route: { id: null },
|
|
17
|
-
state: {},
|
|
18
|
-
status: -1,
|
|
19
|
-
url: new URL('https://github.com/ryanatkn/gro'), // TODO maybe use package.json?
|
|
20
|
-
};
|
|
21
|
-
export const updated = {
|
|
22
|
-
current: false,
|
|
23
|
-
check: () => {
|
|
24
|
-
throw Error('Can only call updated.check() in the browser');
|
|
25
|
-
},
|
|
26
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generates a module shim for SvelteKit's `$env` imports.
|
|
3
|
-
*/
|
|
4
|
-
export declare const render_env_shim_module: (dev: boolean, mode: "static" | "dynamic", visibility: "public" | "private", public_prefix?: string, private_prefix?: string, env_dir?: string, env_files?: Array<string>, ambient_env?: Record<string, string | undefined>) => string;
|
|
5
|
-
//# sourceMappingURL=sveltekit_shim_env.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sveltekit_shim_env.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/sveltekit_shim_env.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAClC,KAAK,OAAO,EACZ,MAAM,QAAQ,GAAG,SAAS,EAC1B,YAAY,QAAQ,GAAG,SAAS,EAChC,sBAAyB,EACzB,uBAAmB,EACnB,UAAU,MAAM,EAChB,YAAY,KAAK,CAAC,MAAM,CAAC,EACzB,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,KAC9C,MA4BF,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { load_env } from "./env.js";
|
|
2
|
-
// TODO might want to do more escaping and validation
|
|
3
|
-
/**
|
|
4
|
-
* Generates a module shim for SvelteKit's `$env` imports.
|
|
5
|
-
*/
|
|
6
|
-
export const render_env_shim_module = (dev, mode, visibility, public_prefix = 'PUBLIC_', private_prefix = '', env_dir, env_files, ambient_env) => {
|
|
7
|
-
const env = load_env(dev, visibility, public_prefix, private_prefix, env_dir, env_files, ambient_env);
|
|
8
|
-
if (mode === 'static') {
|
|
9
|
-
return `// shim for $env/static/${visibility}
|
|
10
|
-
// @see https://github.com/sveltejs/kit/issues/1485
|
|
11
|
-
${Object.entries(env)
|
|
12
|
-
.map(([k, v]) => `export let ${k} = ${JSON.stringify(v)};`)
|
|
13
|
-
.join('\n')}
|
|
14
|
-
`;
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return `// shim for $env/dynamic/${visibility}
|
|
18
|
-
// @see https://github.com/sveltejs/kit/issues/1485
|
|
19
|
-
import {load_env} from './env.js';
|
|
20
|
-
export const env = load_env(${dev}, ${JSON.stringify(visibility)}, ${JSON.stringify(public_prefix)}, ${JSON.stringify(private_prefix)}, ${JSON.stringify(env_dir)}, ${JSON.stringify(env_files)}, ${JSON.stringify(ambient_env)});
|
|
21
|
-
`;
|
|
22
|
-
}
|
|
23
|
-
};
|
package/dist/sync.task.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type Task } from './task.ts';
|
|
3
|
-
/** @nodocs */
|
|
4
|
-
export declare const Args: z.ZodObject<{
|
|
5
|
-
sveltekit: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
-
'no-sveltekit': z.ZodDefault<z.ZodBoolean>;
|
|
7
|
-
package_json: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
-
'no-package_json': z.ZodDefault<z.ZodBoolean>;
|
|
9
|
-
gen: z.ZodDefault<z.ZodBoolean>;
|
|
10
|
-
'no-gen': z.ZodDefault<z.ZodBoolean>;
|
|
11
|
-
install: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
-
}, z.core.$strict>;
|
|
13
|
-
export type Args = z.infer<typeof Args>;
|
|
14
|
-
/** @nodocs */
|
|
15
|
-
export declare const task: Task<Args>;
|
|
16
|
-
//# sourceMappingURL=sync.task.d.ts.map
|
package/dist/sync.task.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sync.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/sync.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,OAAO,EAAY,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAI/C,cAAc;AACd,eAAO,MAAM,IAAI;;;;;;;;kBAQf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,cAAc;AACd,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CA0B3B,CAAC"}
|
package/dist/sync.task.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { spawn } from '@fuzdev/fuz_util/process.js';
|
|
3
|
-
import { TaskError } from "./task.js";
|
|
4
|
-
import { package_json_sync } from "./package_json.js";
|
|
5
|
-
import { sveltekit_sync } from "./sveltekit_helpers.js";
|
|
6
|
-
/** @nodocs */
|
|
7
|
-
export const Args = z.strictObject({
|
|
8
|
-
sveltekit: z.boolean().meta({ description: 'dual of no-sveltekit' }).default(true),
|
|
9
|
-
'no-sveltekit': z.boolean().meta({ description: 'opt out of svelte-kit sync' }).default(false),
|
|
10
|
-
package_json: z.boolean().meta({ description: 'dual of no-package_json' }).default(true),
|
|
11
|
-
'no-package_json': z.boolean().meta({ description: 'opt out of package.json sync' }).default(false),
|
|
12
|
-
gen: z.boolean().meta({ description: 'dual of no-gen' }).default(true),
|
|
13
|
-
'no-gen': z.boolean().meta({ description: 'opt out of running gen' }).default(false),
|
|
14
|
-
install: z.boolean().meta({ description: 'opt into installing packages' }).default(false),
|
|
15
|
-
});
|
|
16
|
-
/** @nodocs */
|
|
17
|
-
export const task = {
|
|
18
|
-
summary: 'run `gro gen`, update `package.json`, and optionally install packages to sync up',
|
|
19
|
-
Args,
|
|
20
|
-
run: async ({ args, invoke_task, config, log }) => {
|
|
21
|
-
const { sveltekit, package_json, gen, install } = args;
|
|
22
|
-
if (install) {
|
|
23
|
-
const result = await spawn(config.pm_cli, ['install']);
|
|
24
|
-
if (!result.ok) {
|
|
25
|
-
throw new TaskError(`Failed \`${config.pm_cli} install\``);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (sveltekit) {
|
|
29
|
-
await sveltekit_sync(undefined, config.pm_cli);
|
|
30
|
-
log.info('synced SvelteKit');
|
|
31
|
-
}
|
|
32
|
-
if (package_json && config.map_package_json) {
|
|
33
|
-
await package_json_sync(config.map_package_json, log);
|
|
34
|
-
}
|
|
35
|
-
if (gen) {
|
|
36
|
-
await invoke_task('gen');
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
};
|
package/dist/task.d.ts
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import type { Args } from '@fuzdev/fuz_util/args.js';
|
|
2
|
-
import type { Logger } from '@fuzdev/fuz_util/log.js';
|
|
3
|
-
import type { PathId } from '@fuzdev/fuz_util/path.js';
|
|
4
|
-
import type { Result } from '@fuzdev/fuz_util/result.js';
|
|
5
|
-
import type { Timings } from '@fuzdev/fuz_util/timings.js';
|
|
6
|
-
import type { z } from 'zod';
|
|
7
|
-
import type { GroConfig } from './gro_config.ts';
|
|
8
|
-
import type { ParsedSvelteConfig } from './svelte_config.ts';
|
|
9
|
-
import { type InputPath, type ResolvedInputFile, type ResolvedInputPath } from './input_path.ts';
|
|
10
|
-
import { type LoadModulesFailure, type ModuleMeta } from './modules.ts';
|
|
11
|
-
import type { Filer } from './filer.ts';
|
|
12
|
-
export interface Task<TArgs = Args, TArgsSchema extends z.ZodType<Args, Args> = z.ZodType<Args, Args>, // TODO improve type? separate input/output?
|
|
13
|
-
TReturn = unknown> {
|
|
14
|
-
run: (ctx: TaskContext<TArgs>) => TReturn | Promise<TReturn>;
|
|
15
|
-
summary?: string;
|
|
16
|
-
Args?: TArgsSchema;
|
|
17
|
-
}
|
|
18
|
-
export interface TaskContext<TArgs = object> {
|
|
19
|
-
args: TArgs;
|
|
20
|
-
config: GroConfig;
|
|
21
|
-
svelte_config: ParsedSvelteConfig;
|
|
22
|
-
filer: Filer;
|
|
23
|
-
log: Logger;
|
|
24
|
-
timings: Timings;
|
|
25
|
-
invoke_task: InvokeTask;
|
|
26
|
-
}
|
|
27
|
-
export type InvokeTask = (task_name: string, args?: Args, config?: GroConfig) => Promise<void>;
|
|
28
|
-
export declare const TASK_FILE_SUFFIX_TS = ".task.ts";
|
|
29
|
-
export declare const TASK_FILE_SUFFIX_JS = ".task.js";
|
|
30
|
-
export declare const TASK_FILE_SUFFIXES: string[];
|
|
31
|
-
export declare const is_task_path: (path: string) => boolean;
|
|
32
|
-
export declare const to_task_name: (id: PathId, task_root_dir: PathId, input_path: InputPath, root_path: PathId) => string;
|
|
33
|
-
/**
|
|
34
|
-
* This is used by tasks to signal a known failure.
|
|
35
|
-
* It's useful for cleaning up logging because
|
|
36
|
-
* we usually don't need their stack trace.
|
|
37
|
-
*/
|
|
38
|
-
export declare class TaskError extends Error {
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* This is used to tell Gro to exit silently, usually still with with a non-zero exit code.
|
|
42
|
-
* Using it means error logging is handled by the code that threw it.
|
|
43
|
-
*/
|
|
44
|
-
export declare class SilentError extends Error {
|
|
45
|
-
}
|
|
46
|
-
export interface FoundTask {
|
|
47
|
-
input_path: InputPath;
|
|
48
|
-
id: PathId;
|
|
49
|
-
task_root_dir: PathId;
|
|
50
|
-
}
|
|
51
|
-
export interface FoundTasks {
|
|
52
|
-
resolved_input_files: Array<ResolvedInputFile>;
|
|
53
|
-
resolved_input_files_by_root_dir: Map<PathId, Array<ResolvedInputFile>>;
|
|
54
|
-
resolved_input_paths: Array<ResolvedInputPath>;
|
|
55
|
-
input_paths: Array<InputPath>;
|
|
56
|
-
task_root_dirs: Array<PathId>;
|
|
57
|
-
}
|
|
58
|
-
export type FindTasksResult = Result<{
|
|
59
|
-
value: FoundTasks;
|
|
60
|
-
}, FindModulesFailure>;
|
|
61
|
-
export type FindModulesFailure = {
|
|
62
|
-
type: 'unmapped_input_paths';
|
|
63
|
-
unmapped_input_paths: Array<InputPath>;
|
|
64
|
-
resolved_input_paths: Array<ResolvedInputPath>;
|
|
65
|
-
input_paths: Array<InputPath>;
|
|
66
|
-
task_root_dirs: Array<PathId>;
|
|
67
|
-
reasons: Array<string>;
|
|
68
|
-
} | {
|
|
69
|
-
type: 'input_directories_with_no_files';
|
|
70
|
-
input_directories_with_no_files: Array<InputPath>;
|
|
71
|
-
resolved_input_files: Array<ResolvedInputFile>;
|
|
72
|
-
resolved_input_files_by_root_dir: Map<PathId, Array<ResolvedInputFile>>;
|
|
73
|
-
resolved_input_paths: Array<ResolvedInputPath>;
|
|
74
|
-
input_paths: Array<InputPath>;
|
|
75
|
-
task_root_dirs: Array<PathId>;
|
|
76
|
-
reasons: Array<string>;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Finds modules from input paths. (see `src/lib/input_path.ts` for more)
|
|
80
|
-
*/
|
|
81
|
-
export declare const find_tasks: (input_paths: Array<InputPath>, task_root_dirs: Array<PathId>, config: GroConfig, timings?: Timings) => Promise<FindTasksResult>;
|
|
82
|
-
export interface LoadedTasks {
|
|
83
|
-
modules: Array<TaskModuleMeta>;
|
|
84
|
-
found_tasks: FoundTasks;
|
|
85
|
-
}
|
|
86
|
-
export interface TaskModule {
|
|
87
|
-
task: Task;
|
|
88
|
-
}
|
|
89
|
-
export interface TaskModuleMeta extends ModuleMeta<TaskModule> {
|
|
90
|
-
name: string;
|
|
91
|
-
}
|
|
92
|
-
export type LoadTasksResult = Result<{
|
|
93
|
-
value: LoadedTasks;
|
|
94
|
-
}, LoadTasksFailure>;
|
|
95
|
-
export type LoadTasksFailure = LoadModulesFailure<TaskModuleMeta>;
|
|
96
|
-
export declare const load_tasks: (found_tasks: FoundTasks, root_path?: PathId) => Promise<LoadTasksResult>;
|
|
97
|
-
export declare const validate_task_module: (mod: Record<string, any>) => mod is TaskModule;
|
|
98
|
-
//# sourceMappingURL=task.d.ts.map
|
package/dist/task.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/task.ts"],"names":[],"mappings":"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"}
|
package/dist/task.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { fs_search } from '@fuzdev/fuz_util/fs.js';
|
|
2
|
-
import { ensure_end, strip_end, strip_start } from '@fuzdev/fuz_util/string.js';
|
|
3
|
-
import { isAbsolute, join, relative } from 'node:path';
|
|
4
|
-
import { styleText as st } from 'node:util';
|
|
5
|
-
import { resolve_input_files, resolve_input_paths, } from "./input_path.js";
|
|
6
|
-
import { GRO_DIST_DIR, print_path } from "./paths.js";
|
|
7
|
-
import { load_modules } from "./modules.js";
|
|
8
|
-
export const TASK_FILE_SUFFIX_TS = '.task.ts';
|
|
9
|
-
export const TASK_FILE_SUFFIX_JS = '.task.js';
|
|
10
|
-
export const TASK_FILE_SUFFIXES = [TASK_FILE_SUFFIX_TS, TASK_FILE_SUFFIX_JS]; // TODO from `GroConfig`, but needs to be used everywhere the constants are
|
|
11
|
-
export const is_task_path = (path) => path.endsWith(TASK_FILE_SUFFIX_TS) || path.endsWith(TASK_FILE_SUFFIX_JS);
|
|
12
|
-
export const to_task_name = (id, task_root_dir, input_path, root_path) => {
|
|
13
|
-
let task_name = id.startsWith(task_root_dir)
|
|
14
|
-
? strip_start(strip_start(id, task_root_dir), '/')
|
|
15
|
-
: id;
|
|
16
|
-
for (const suffix of TASK_FILE_SUFFIXES) {
|
|
17
|
-
task_name = strip_end(task_name, suffix);
|
|
18
|
-
}
|
|
19
|
-
if (ensure_end(task_root_dir, '/') === GRO_DIST_DIR) {
|
|
20
|
-
// TODO ideally it would display this in some contexts like the task progress logs,
|
|
21
|
-
// but not all, like printing the task list, UNLESS there's a local override
|
|
22
|
-
// return 'gro/' + task_name;
|
|
23
|
-
return task_name;
|
|
24
|
-
}
|
|
25
|
-
if (isAbsolute(input_path)) {
|
|
26
|
-
return relative(root_path, join(task_root_dir, task_name));
|
|
27
|
-
}
|
|
28
|
-
return task_name;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* This is used by tasks to signal a known failure.
|
|
32
|
-
* It's useful for cleaning up logging because
|
|
33
|
-
* we usually don't need their stack trace.
|
|
34
|
-
*/
|
|
35
|
-
export class TaskError extends Error {
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* This is used to tell Gro to exit silently, usually still with with a non-zero exit code.
|
|
39
|
-
* Using it means error logging is handled by the code that threw it.
|
|
40
|
-
*/
|
|
41
|
-
export class SilentError extends Error {
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Finds modules from input paths. (see `src/lib/input_path.ts` for more)
|
|
45
|
-
*/
|
|
46
|
-
export const find_tasks = async (input_paths, task_root_dirs, config, timings) => {
|
|
47
|
-
// Check which extension variation works - if it's a directory, prefer others first!
|
|
48
|
-
const timing_to_resolve_input_paths = timings?.start('resolve input paths');
|
|
49
|
-
const { resolved_input_paths, unmapped_input_paths } = await resolve_input_paths(input_paths, task_root_dirs, TASK_FILE_SUFFIXES);
|
|
50
|
-
timing_to_resolve_input_paths?.();
|
|
51
|
-
// Error if any input path could not be mapped.
|
|
52
|
-
if (unmapped_input_paths.length) {
|
|
53
|
-
return {
|
|
54
|
-
ok: false,
|
|
55
|
-
type: 'unmapped_input_paths',
|
|
56
|
-
unmapped_input_paths,
|
|
57
|
-
resolved_input_paths,
|
|
58
|
-
input_paths,
|
|
59
|
-
task_root_dirs,
|
|
60
|
-
reasons: unmapped_input_paths.map((input_path) => st('red', `Input path ${print_path(input_path)} cannot be mapped to a file or directory.`)),
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
// Find all of the files for any directories.
|
|
64
|
-
const timing_to_resolve_input_files = timings?.start('resolve input files');
|
|
65
|
-
const { resolved_input_files, resolved_input_files_by_root_dir, input_directories_with_no_files } = await resolve_input_files(resolved_input_paths, async (id) => await fs_search(id, {
|
|
66
|
-
filter: config.search_filters,
|
|
67
|
-
file_filter: (p) => TASK_FILE_SUFFIXES.some((s) => p.endsWith(s)),
|
|
68
|
-
}));
|
|
69
|
-
timing_to_resolve_input_files?.();
|
|
70
|
-
// Error if any input path has no files. (means we have an empty directory)
|
|
71
|
-
if (input_directories_with_no_files.length) {
|
|
72
|
-
return {
|
|
73
|
-
ok: false,
|
|
74
|
-
type: 'input_directories_with_no_files',
|
|
75
|
-
input_directories_with_no_files,
|
|
76
|
-
resolved_input_files,
|
|
77
|
-
resolved_input_files_by_root_dir,
|
|
78
|
-
resolved_input_paths,
|
|
79
|
-
input_paths,
|
|
80
|
-
task_root_dirs,
|
|
81
|
-
reasons: input_directories_with_no_files.map((input_path) => st('red', `Input directory contains no matching files: ${print_path(input_path)}`)),
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
ok: true,
|
|
86
|
-
value: {
|
|
87
|
-
resolved_input_files,
|
|
88
|
-
resolved_input_files_by_root_dir,
|
|
89
|
-
resolved_input_paths,
|
|
90
|
-
input_paths,
|
|
91
|
-
task_root_dirs,
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
export const load_tasks = async (found_tasks, root_path = process.cwd()) => {
|
|
96
|
-
const loaded_modules = await load_modules(found_tasks.resolved_input_files, validate_task_module, (resolved_input_file, mod) => ({
|
|
97
|
-
id: resolved_input_file.id,
|
|
98
|
-
mod,
|
|
99
|
-
name: to_task_name(resolved_input_file.id, resolved_input_file.resolved_input_path.root_dir, resolved_input_file.resolved_input_path.input_path, root_path),
|
|
100
|
-
}));
|
|
101
|
-
if (!loaded_modules.ok) {
|
|
102
|
-
return loaded_modules;
|
|
103
|
-
}
|
|
104
|
-
return {
|
|
105
|
-
ok: true,
|
|
106
|
-
value: { modules: loaded_modules.modules, found_tasks },
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
export const validate_task_module = (mod) => !!mod.task && typeof mod.task.run === 'function';
|
package/dist/task_logging.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Logger } from '@fuzdev/fuz_util/log.js';
|
|
2
|
-
import type { LoadedTasks, TaskModuleMeta } from './task.ts';
|
|
3
|
-
export declare const log_tasks: (log: Logger, loaded_tasks: LoadedTasks, log_intro?: boolean) => void;
|
|
4
|
-
export declare const log_error_reasons: (log: Logger, reasons: Array<string>) => void;
|
|
5
|
-
export declare const log_task_help: (log: Logger, meta: TaskModuleMeta) => void;
|
|
6
|
-
//# sourceMappingURL=task_logging.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task_logging.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/task_logging.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAKpD,OAAO,KAAK,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,WAAW,CAAC;AAG3D,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,EAAE,cAAc,WAAW,EAAE,mBAAgB,KAAG,IAkCpF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,EAAE,SAAS,KAAK,CAAC,MAAM,CAAC,KAAG,IAIvE,CAAC;AAIF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,MAAM,cAAc,KAAG,IAkCjE,CAAC"}
|