@ryanatkn/gro 0.154.0 → 0.155.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/build.task.d.ts +1 -1
- package/dist/build.task.js +2 -2
- package/dist/changelog.js +1 -1
- package/dist/changeset.task.d.ts +1 -1
- package/dist/changeset.task.js +6 -6
- package/dist/check.task.d.ts +1 -1
- package/dist/check.task.js +3 -3
- package/dist/clean.task.d.ts +1 -1
- package/dist/clean.task.js +2 -2
- package/dist/clean_fs.js +2 -2
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +2 -2
- package/dist/commit.task.d.ts +1 -1
- package/dist/commit.task.js +1 -1
- package/dist/deploy.task.d.ts +1 -1
- package/dist/deploy.task.js +5 -5
- package/dist/dev.task.d.ts +2 -2
- package/dist/dev.task.js +2 -2
- package/dist/esbuild_helpers.d.ts +1 -1
- package/dist/esbuild_helpers.d.ts.map +1 -1
- package/dist/esbuild_helpers.js +1 -2
- package/dist/esbuild_plugin_external_worker.d.ts +1 -1
- package/dist/esbuild_plugin_external_worker.js +7 -7
- package/dist/esbuild_plugin_svelte.d.ts +1 -1
- package/dist/esbuild_plugin_svelte.js +4 -4
- package/dist/esbuild_plugin_sveltekit_local_imports.js +2 -2
- package/dist/esbuild_plugin_sveltekit_shim_app.d.ts +1 -1
- package/dist/esbuild_plugin_sveltekit_shim_app.js +2 -2
- package/dist/esbuild_plugin_sveltekit_shim_env.js +3 -3
- package/dist/filer.d.ts +3 -3
- package/dist/filer.js +6 -6
- package/dist/format.task.d.ts +1 -1
- package/dist/format.task.js +3 -3
- package/dist/format_directory.d.ts +1 -1
- package/dist/format_directory.js +5 -5
- package/dist/format_file.js +1 -1
- package/dist/gen.d.ts +5 -5
- package/dist/gen.js +4 -4
- package/dist/gen.task.d.ts +1 -1
- package/dist/gen.task.js +8 -8
- package/dist/git.js +1 -1
- package/dist/gro.config.default.d.ts +1 -1
- package/dist/gro.config.default.js +16 -8
- package/dist/gro.d.ts +1 -1
- package/dist/gro.js +3 -2
- package/dist/gro_config.d.ts +4 -4
- package/dist/gro_config.js +12 -4
- package/dist/gro_helpers.d.ts.map +1 -1
- package/dist/gro_helpers.js +5 -2
- package/dist/gro_plugin_gen.d.ts +2 -2
- package/dist/gro_plugin_gen.js +4 -4
- package/dist/gro_plugin_server.d.ts +1 -1
- package/dist/gro_plugin_server.js +11 -11
- package/dist/gro_plugin_sveltekit_app.d.ts +3 -3
- package/dist/gro_plugin_sveltekit_app.js +10 -10
- package/dist/gro_plugin_sveltekit_library.d.ts +2 -2
- package/dist/gro_plugin_sveltekit_library.js +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/input_path.d.ts +1 -1
- package/dist/input_path.js +3 -3
- package/dist/invoke.js +4 -4
- package/dist/invoke_task.d.ts +4 -4
- package/dist/invoke_task.js +7 -7
- package/dist/lint.task.d.ts +1 -1
- package/dist/lint.task.js +3 -3
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +62 -46
- package/dist/module.js +2 -2
- package/dist/modules.d.ts +2 -2
- package/dist/modules.js +10 -2
- package/dist/package.d.ts +1 -0
- package/dist/package.d.ts.map +1 -1
- package/dist/package.gen.d.ts +1 -1
- package/dist/package.gen.js +5 -5
- package/dist/package.js +6 -5
- package/dist/package_json.js +5 -5
- package/dist/package_meta.d.ts +2 -2
- package/dist/package_meta.js +1 -1
- package/dist/parse_imports.d.ts +1 -1
- package/dist/parse_imports.js +2 -2
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +2 -2
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.d.ts.map +1 -1
- package/dist/publish.task.d.ts +1 -1
- package/dist/publish.task.js +8 -8
- package/dist/reinstall.task.d.ts +1 -1
- package/dist/reinstall.task.js +2 -2
- package/dist/release.task.d.ts +1 -1
- package/dist/release.task.js +2 -2
- package/dist/resolve.task.d.ts +1 -1
- package/dist/resolve.task.js +2 -2
- package/dist/resolve_specifier.d.ts +1 -1
- package/dist/resolve_specifier.js +1 -1
- package/dist/run.task.d.ts +1 -1
- package/dist/run.task.js +2 -2
- package/dist/run_gen.d.ts +3 -3
- package/dist/run_gen.js +3 -3
- package/dist/run_task.d.ts +5 -5
- package/dist/run_task.js +4 -4
- package/dist/search_fs.d.ts +1 -1
- package/dist/src_json.d.ts +1 -1
- package/dist/src_json.js +2 -2
- package/dist/svelte_config.js +10 -2
- package/dist/sveltekit_helpers.d.ts +3 -3
- package/dist/sveltekit_helpers.js +6 -6
- package/dist/sveltekit_shim_app.d.ts +1 -1
- package/dist/sveltekit_shim_app_state.js +1 -1
- package/dist/sveltekit_shim_env.js +1 -1
- package/dist/sync.task.d.ts +1 -1
- package/dist/sync.task.js +3 -3
- package/dist/task.d.ts +7 -7
- package/dist/task.js +4 -4
- package/dist/task_logging.d.ts +1 -1
- package/dist/task_logging.js +1 -1
- package/dist/test.task.d.ts +1 -1
- package/dist/test.task.js +3 -3
- package/dist/typecheck.task.d.ts +1 -1
- package/dist/typecheck.task.js +6 -6
- package/dist/upgrade.task.d.ts +1 -1
- package/dist/upgrade.task.js +6 -6
- package/dist/watch_dir.d.ts +1 -1
- package/package.json +5 -4
- package/src/lib/build.task.ts +3 -3
- package/src/lib/changelog.ts +1 -1
- package/src/lib/changeset.task.ts +6 -6
- package/src/lib/check.task.ts +3 -3
- package/src/lib/clean.task.ts +3 -3
- package/src/lib/clean_fs.ts +2 -2
- package/src/lib/cli.ts +3 -3
- package/src/lib/commit.task.ts +2 -2
- package/src/lib/deploy.task.ts +5 -5
- package/src/lib/dev.task.ts +3 -3
- package/src/lib/esbuild_helpers.ts +2 -3
- package/src/lib/esbuild_plugin_external_worker.ts +9 -9
- package/src/lib/esbuild_plugin_svelte.ts +4 -4
- package/src/lib/esbuild_plugin_sveltekit_local_imports.ts +2 -2
- package/src/lib/esbuild_plugin_sveltekit_shim_app.ts +3 -3
- package/src/lib/esbuild_plugin_sveltekit_shim_env.ts +3 -3
- package/src/lib/filer.ts +8 -8
- package/src/lib/format.task.ts +3 -3
- package/src/lib/format_directory.ts +5 -5
- package/src/lib/format_file.ts +1 -1
- package/src/lib/gen.task.ts +8 -8
- package/src/lib/gen.ts +7 -7
- package/src/lib/git.ts +1 -1
- package/src/lib/gro.config.default.ts +8 -8
- package/src/lib/gro.ts +4 -2
- package/src/lib/gro_config.ts +7 -7
- package/src/lib/gro_helpers.ts +5 -2
- package/src/lib/gro_plugin_gen.ts +6 -6
- package/src/lib/gro_plugin_server.ts +13 -13
- package/src/lib/gro_plugin_sveltekit_app.ts +11 -11
- package/src/lib/gro_plugin_sveltekit_library.ts +4 -4
- package/src/lib/index.ts +4 -4
- package/src/lib/input_path.ts +4 -4
- package/src/lib/invoke.ts +4 -4
- package/src/lib/invoke_task.ts +8 -8
- package/src/lib/lint.task.ts +3 -3
- package/src/lib/loader.ts +63 -63
- package/src/lib/module.ts +2 -2
- package/src/lib/modules.ts +3 -3
- package/src/lib/package.gen.ts +6 -6
- package/src/lib/package.ts +8 -7
- package/src/lib/package_json.ts +5 -5
- package/src/lib/package_meta.ts +3 -3
- package/src/lib/parse_imports.ts +3 -3
- package/src/lib/paths.ts +3 -3
- package/src/lib/plugin.ts +8 -5
- package/src/lib/publish.task.ts +8 -8
- package/src/lib/reinstall.task.ts +2 -2
- package/src/lib/release.task.ts +3 -3
- package/src/lib/resolve.task.ts +2 -2
- package/src/lib/resolve_specifier.ts +2 -2
- package/src/lib/run.task.ts +2 -2
- package/src/lib/run_gen.ts +5 -5
- package/src/lib/run_task.ts +7 -7
- package/src/lib/search_fs.ts +1 -1
- package/src/lib/src_json.ts +2 -2
- package/src/lib/svelte_config.ts +1 -1
- package/src/lib/sveltekit_helpers.ts +6 -6
- package/src/lib/sveltekit_shim_app.ts +1 -1
- package/src/lib/sveltekit_shim_app_state.ts +1 -1
- package/src/lib/sveltekit_shim_env.ts +1 -1
- package/src/lib/sync.task.ts +3 -3
- package/src/lib/task.ts +9 -9
- package/src/lib/task_logging.ts +3 -3
- package/src/lib/test.task.ts +3 -3
- package/src/lib/typecheck.task.ts +6 -6
- package/src/lib/upgrade.task.ts +6 -6
- package/src/lib/watch_dir.ts +1 -1
package/dist/package_meta.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Package_Json, Url } from './package_json.
|
|
2
|
-
import type { Src_Json } from './src_json.
|
|
1
|
+
import type { Package_Json, Url } from './package_json.ts';
|
|
2
|
+
import type { Src_Json } from './src_json.ts';
|
|
3
3
|
export interface Package_Meta {
|
|
4
4
|
repo_url: Url;
|
|
5
5
|
package_json: Package_Json;
|
package/dist/package_meta.js
CHANGED
|
@@ -13,7 +13,7 @@ export const parse_package_meta = (package_json, src_json) => {
|
|
|
13
13
|
: package_json.repository.url
|
|
14
14
|
: null);
|
|
15
15
|
if (!repo_url) {
|
|
16
|
-
throw
|
|
16
|
+
throw Error('failed to parse package_meta - `repo_url` is required in package_json');
|
|
17
17
|
}
|
|
18
18
|
const homepage_url = package_json.homepage ?? null;
|
|
19
19
|
const published = !package_json.private && !!package_json.exports && package_json.version !== '0.0.1';
|
package/dist/parse_imports.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Flavored } from '@ryanatkn/belt/types.js';
|
|
2
|
-
import type { Path_Id } from './path.
|
|
2
|
+
import type { Path_Id } from './path.ts';
|
|
3
3
|
export type Import_Specifier = Flavored<string, 'Import_Specifier'>;
|
|
4
4
|
export declare const parse_imports: (id: Path_Id, contents: string, ignore_types?: boolean) => Array<Import_Specifier>;
|
|
5
5
|
//# sourceMappingURL=parse_imports.d.ts.map
|
package/dist/parse_imports.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseSync } from 'oxc-parser';
|
|
2
2
|
import { Unreachable_Error } from '@ryanatkn/belt/error.js';
|
|
3
|
-
import { SVELTE_MATCHER } from
|
|
4
|
-
import { JS_MATCHER, TS_MATCHER, SVELTE_SCRIPT_MATCHER } from
|
|
3
|
+
import { SVELTE_MATCHER } from "./svelte_helpers.js";
|
|
4
|
+
import { JS_MATCHER, TS_MATCHER, SVELTE_SCRIPT_MATCHER } from "./constants.js";
|
|
5
5
|
// TODO this is probably way more complicated that it should be, maybe report the issues upstream unless I made a mistake here
|
|
6
6
|
/**
|
|
7
7
|
* Extracts the string value from a module request, handling different quote styles.
|
package/dist/paths.d.ts
CHANGED
package/dist/paths.js
CHANGED
|
@@ -2,8 +2,8 @@ import { join, extname, relative, basename } from 'node:path';
|
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { strip_end } from '@ryanatkn/belt/string.js';
|
|
4
4
|
import { styleText as st } from 'node:util';
|
|
5
|
-
import { GRO_CONFIG_PATH, GRO_DEV_DIR, GRO_DIR, SOURCE_DIR, SVELTEKIT_DIST_DIRNAME, } from
|
|
6
|
-
import { default_svelte_config } from
|
|
5
|
+
import { GRO_CONFIG_PATH, GRO_DEV_DIR, GRO_DIR, SOURCE_DIR, SVELTEKIT_DIST_DIRNAME, } from "./constants.js";
|
|
6
|
+
import { default_svelte_config } from "./svelte_config.js";
|
|
7
7
|
/*
|
|
8
8
|
|
|
9
9
|
A path `id` is an absolute path to the source/.gro/dist directory.
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Task_Context } from './task.
|
|
1
|
+
import type { Task_Context } from './task.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Gro `Plugin`s enable custom behavior during `gro dev` and `gro build`.
|
|
4
4
|
* In contrast, `Adapter`s use the results of `gro build` to produce final artifacts.
|
|
@@ -16,8 +16,8 @@ export interface Plugin_Context<T_Args = object> extends Task_Context<T_Args> {
|
|
|
16
16
|
}
|
|
17
17
|
/** See `Plugins.create` for a usage example. */
|
|
18
18
|
export declare class Plugins<T_Plugin_Context extends Plugin_Context> {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
readonly ctx: T_Plugin_Context;
|
|
20
|
+
readonly instances: Array<Plugin<T_Plugin_Context>>;
|
|
21
21
|
constructor(ctx: T_Plugin_Context, instances: Array<Plugin>);
|
|
22
22
|
static create<T_Plugin_Context extends Plugin_Context>(ctx: T_Plugin_Context): Promise<Plugins<T_Plugin_Context>>;
|
|
23
23
|
setup(): Promise<void>;
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,MAAM,CAAC,gBAAgB,SAAS,cAAc,GAAG,cAAc;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3D;AAED,MAAM,MAAM,qBAAqB,CAAC,gBAAgB,SAAS,cAAc,GAAG,cAAc,IAAI,CAC7F,GAAG,EAAE,gBAAgB,KACjB,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEhF,MAAM,WAAW,cAAc,CAAC,MAAM,GAAG,MAAM,CAAE,SAAQ,YAAY,CAAC,MAAM,CAAC;IAC5E,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CACf;AAED,gDAAgD;AAChD,qBAAa,OAAO,CAAC,gBAAgB,SAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,MAAM,CAAC,gBAAgB,SAAS,cAAc,GAAG,cAAc;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3D;AAED,MAAM,MAAM,qBAAqB,CAAC,gBAAgB,SAAS,cAAc,GAAG,cAAc,IAAI,CAC7F,GAAG,EAAE,gBAAgB,KACjB,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEhF,MAAM,WAAW,cAAc,CAAC,MAAM,GAAG,MAAM,CAAE,SAAQ,YAAY,CAAC,MAAM,CAAC;IAC5E,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CACf;AAED,gDAAgD;AAChD,qBAAa,OAAO,CAAC,gBAAgB,SAAS,cAAc;IAC3D,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBAExC,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC;WAK9C,MAAM,CAAC,gBAAgB,SAAS,cAAc,EAC1D,GAAG,EAAE,gBAAgB,GACnB,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAS/B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAetB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAatB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAc/B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAC1B,SAAS,KAAK,CAAC,MAAM,CAAC,EACtB,YAAY,MAAM,EAClB,aAAsB,KACpB,KAAK,CAAC,MAAM,CAMd,CAAC"}
|
package/dist/publish.task.d.ts
CHANGED
package/dist/publish.task.js
CHANGED
|
@@ -2,14 +2,14 @@ import { spawn } from '@ryanatkn/belt/process.js';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { styleText as st } from 'node:util';
|
|
4
4
|
import { existsSync } from 'node:fs';
|
|
5
|
-
import { Task_Error } from
|
|
6
|
-
import { load_package_json, parse_repo_url } from
|
|
7
|
-
import { find_cli, spawn_cli } from
|
|
8
|
-
import { has_sveltekit_library } from
|
|
9
|
-
import { update_changelog } from
|
|
10
|
-
import { load_from_env } from
|
|
11
|
-
import { Git_Branch, Git_Origin, git_check_clean_workspace, git_checkout, git_fetch, git_pull, } from
|
|
12
|
-
import { CHANGESET_CLI } from
|
|
5
|
+
import { Task_Error } from "./task.js";
|
|
6
|
+
import { load_package_json, parse_repo_url } from "./package_json.js";
|
|
7
|
+
import { find_cli, spawn_cli } from "./cli.js";
|
|
8
|
+
import { has_sveltekit_library } from "./sveltekit_helpers.js";
|
|
9
|
+
import { update_changelog } from "./changelog.js";
|
|
10
|
+
import { load_from_env } from "./env.js";
|
|
11
|
+
import { Git_Branch, Git_Origin, git_check_clean_workspace, git_checkout, git_fetch, git_pull, } from "./git.js";
|
|
12
|
+
import { CHANGESET_CLI } from "./changeset_helpers.js";
|
|
13
13
|
export const Args = z
|
|
14
14
|
.object({
|
|
15
15
|
branch: Git_Branch.describe('branch to publish from').default('main'),
|
package/dist/reinstall.task.d.ts
CHANGED
package/dist/reinstall.task.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { spawn } from '@ryanatkn/belt/process.js';
|
|
3
3
|
import { rm } from 'node:fs/promises';
|
|
4
|
-
import { Task_Error } from
|
|
5
|
-
import { LOCKFILE_FILENAME, NODE_MODULES_DIRNAME } from
|
|
4
|
+
import { Task_Error } from "./task.js";
|
|
5
|
+
import { LOCKFILE_FILENAME, NODE_MODULES_DIRNAME } from "./constants.js";
|
|
6
6
|
export const Args = z.object({}).strict();
|
|
7
7
|
export const task = {
|
|
8
8
|
summary: `refreshes ${LOCKFILE_FILENAME} with the latest and cleanest deps`,
|
package/dist/release.task.d.ts
CHANGED
package/dist/release.task.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { has_sveltekit_library, has_sveltekit_app } from
|
|
3
|
-
import { load_package_json } from
|
|
2
|
+
import { has_sveltekit_library, has_sveltekit_app } from "./sveltekit_helpers.js";
|
|
3
|
+
import { load_package_json } from "./package_json.js";
|
|
4
4
|
export const Args = z.object({}).strict();
|
|
5
5
|
export const task = {
|
|
6
6
|
summary: 'publish and deploy',
|
package/dist/resolve.task.d.ts
CHANGED
package/dist/resolve.task.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { styleText as st } from 'node:util';
|
|
3
|
-
import { TASK_FILE_SUFFIXES } from
|
|
4
|
-
import { resolve_input_paths, to_input_paths } from
|
|
3
|
+
import { TASK_FILE_SUFFIXES } from "./task.js";
|
|
4
|
+
import { resolve_input_paths, to_input_paths } from "./input_path.js";
|
|
5
5
|
export const Args = z
|
|
6
6
|
.object({
|
|
7
7
|
_: z.array(z.string(), { description: 'the input paths to resolve' }).default(['']),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { extname, isAbsolute, join, relative } from 'node:path';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
|
-
import { replace_extension } from
|
|
3
|
+
import { replace_extension } from "./paths.js";
|
|
4
4
|
/**
|
|
5
5
|
* Maps an import `specifier` relative to `dir`,
|
|
6
6
|
* and infer the correct extension following Vite conventions.
|
package/dist/run.task.d.ts
CHANGED
package/dist/run.task.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { styleText as st } from 'node:util';
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
|
-
import { Task_Error } from
|
|
5
|
-
import { resolve_gro_module_path, spawn_with_loader } from
|
|
4
|
+
import { Task_Error } from "./task.js";
|
|
5
|
+
import { resolve_gro_module_path, spawn_with_loader } from "./gro_helpers.js";
|
|
6
6
|
export const Args = z
|
|
7
7
|
.object({
|
|
8
8
|
_: z
|
package/dist/run_gen.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Timings } from '@ryanatkn/belt/timings.js';
|
|
2
2
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
3
|
-
import { type Gen_Results, type Genfile_Module_Meta } from './gen.
|
|
4
|
-
import type { format_file as base_format_file } from './format_file.
|
|
5
|
-
import type { Gro_Config } from './gro_config.
|
|
3
|
+
import { type Gen_Results, type Genfile_Module_Meta } from './gen.ts';
|
|
4
|
+
import type { format_file as base_format_file } from './format_file.ts';
|
|
5
|
+
import type { Gro_Config } from './gro_config.ts';
|
|
6
6
|
export declare const GEN_NO_PROD_MESSAGE = "gen runs only during development";
|
|
7
7
|
export declare const run_gen: (gen_modules: Array<Genfile_Module_Meta>, config: Gro_Config, log: Logger, timings: Timings, format_file?: typeof base_format_file) => Promise<Gen_Results>;
|
|
8
8
|
//# sourceMappingURL=run_gen.d.ts.map
|
package/dist/run_gen.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { styleText as st } from 'node:util';
|
|
2
2
|
import { print_error } from '@ryanatkn/belt/print.js';
|
|
3
|
-
import { to_gen_result, } from
|
|
4
|
-
import { print_path, to_root_path } from
|
|
5
|
-
import { default_svelte_config } from
|
|
3
|
+
import { to_gen_result, } from "./gen.js";
|
|
4
|
+
import { print_path, to_root_path } from "./paths.js";
|
|
5
|
+
import { default_svelte_config } from "./svelte_config.js";
|
|
6
6
|
export const GEN_NO_PROD_MESSAGE = 'gen runs only during development';
|
|
7
7
|
export const run_gen = async (gen_modules, config, log, timings, format_file) => {
|
|
8
8
|
let input_count = 0;
|
package/dist/run_task.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Timings } from '@ryanatkn/belt/timings.js';
|
|
2
|
-
import { type Args } from './args.
|
|
3
|
-
import type { invoke_task as base_invoke_task } from './invoke_task.
|
|
4
|
-
import type { Gro_Config } from './gro_config.
|
|
5
|
-
import { type Task_Module_Meta } from './task.
|
|
6
|
-
import type { Filer } from './filer.
|
|
2
|
+
import { type Args } from './args.ts';
|
|
3
|
+
import type { invoke_task as base_invoke_task } from './invoke_task.ts';
|
|
4
|
+
import type { Gro_Config } from './gro_config.ts';
|
|
5
|
+
import { type Task_Module_Meta } from './task.ts';
|
|
6
|
+
import type { Filer } from './filer.ts';
|
|
7
7
|
export type Run_Task_Result = {
|
|
8
8
|
ok: true;
|
|
9
9
|
output: unknown;
|
package/dist/run_task.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { styleText as st } from 'node:util';
|
|
2
2
|
import { print_log_label } from '@ryanatkn/belt/print.js';
|
|
3
3
|
import { System_Logger } from '@ryanatkn/belt/log.js';
|
|
4
|
-
import { parse_args } from
|
|
5
|
-
import { log_task_help } from
|
|
6
|
-
import { Task_Error } from
|
|
7
|
-
import { default_svelte_config } from
|
|
4
|
+
import { parse_args } from "./args.js";
|
|
5
|
+
import { log_task_help } from "./task_logging.js";
|
|
6
|
+
import { Task_Error } from "./task.js";
|
|
7
|
+
import { default_svelte_config } from "./svelte_config.js";
|
|
8
8
|
export const run_task = async (task_meta, unparsed_args, invoke_task, config, filer, timings) => {
|
|
9
9
|
const { task } = task_meta.mod;
|
|
10
10
|
const log = new System_Logger(print_log_label(task_meta.name));
|
package/dist/search_fs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { File_Filter, Resolved_Path, Path_Filter } from './path.
|
|
1
|
+
import type { File_Filter, Resolved_Path, Path_Filter } from './path.ts';
|
|
2
2
|
export interface Search_Fs_Options {
|
|
3
3
|
/**
|
|
4
4
|
* One or more filter functions, any of which can short-circuit the search by returning `false`.
|
package/dist/src_json.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type Package_Json, type Package_Json_Exports } from './package_json.
|
|
2
|
+
import { type Package_Json, type Package_Json_Exports } from './package_json.ts';
|
|
3
3
|
export declare const Src_Module_Declaration: z.ZodObject<{
|
|
4
4
|
name: z.ZodString;
|
|
5
5
|
kind: z.ZodNullable<z.ZodEnum<["type", "function", "variable", "class"]>>;
|
package/dist/src_json.js
CHANGED
|
@@ -3,8 +3,8 @@ import { join } from 'node:path';
|
|
|
3
3
|
import { strip_start } from '@ryanatkn/belt/string.js';
|
|
4
4
|
import { Project } from 'ts-morph';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
|
-
import { paths, replace_extension } from
|
|
7
|
-
import { transform_empty_object_to_undefined, } from
|
|
6
|
+
import { paths, replace_extension } from "./paths.js";
|
|
7
|
+
import { transform_empty_object_to_undefined, } from "./package_json.js";
|
|
8
8
|
// TODO @many rename to prefix with `Src_Json_`?
|
|
9
9
|
export const Src_Module_Declaration = z
|
|
10
10
|
.object({
|
package/dist/svelte_config.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
1
9
|
import { join } from 'node:path';
|
|
2
10
|
import { EMPTY_OBJECT } from '@ryanatkn/belt/object.js';
|
|
3
|
-
import { SVELTE_CONFIG_FILENAME } from
|
|
11
|
+
import { SVELTE_CONFIG_FILENAME } from "./constants.js";
|
|
4
12
|
/*
|
|
5
13
|
|
|
6
14
|
This module is intended to have minimal dependencies to avoid over-imports in the CLI.
|
|
@@ -12,7 +20,7 @@ This module is intended to have minimal dependencies to avoid over-imports in th
|
|
|
12
20
|
*/
|
|
13
21
|
export const load_svelte_config = async ({ dir = process.cwd(), config_filename = SVELTE_CONFIG_FILENAME, } = EMPTY_OBJECT) => {
|
|
14
22
|
try {
|
|
15
|
-
return (await import(join(dir, config_filename))).default;
|
|
23
|
+
return (await import(__rewriteRelativeImportExtension(join(dir, config_filename), true))).default;
|
|
16
24
|
}
|
|
17
25
|
catch (_err) {
|
|
18
26
|
return null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Result } from '@ryanatkn/belt/result.js';
|
|
2
2
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
3
|
-
import { Package_Json } from './package_json.
|
|
4
|
-
import { type Parsed_Svelte_Config } from './svelte_config.
|
|
5
|
-
import { type Cli } from './cli.
|
|
3
|
+
import { Package_Json } from './package_json.ts';
|
|
4
|
+
import { type Parsed_Svelte_Config } from './svelte_config.ts';
|
|
5
|
+
import { type Cli } from './cli.ts';
|
|
6
6
|
export declare const SVELTEKIT_CLI = "svelte-kit";
|
|
7
7
|
export declare const SVELTE_CHECK_CLI = "svelte-check";
|
|
8
8
|
export declare const SVELTE_PACKAGE_CLI = "svelte-package";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { Package_Json, has_dep } from
|
|
4
|
-
import { default_svelte_config } from
|
|
5
|
-
import { SVELTE_CONFIG_FILENAME, SVELTEKIT_DEV_DIRNAME, PM_CLI_DEFAULT } from
|
|
6
|
-
import { find_cli, spawn_cli, to_cli_name } from
|
|
7
|
-
import { Task_Error } from
|
|
8
|
-
import { serialize_args, to_forwarded_args } from
|
|
3
|
+
import { Package_Json, has_dep } from "./package_json.js";
|
|
4
|
+
import { default_svelte_config } from "./svelte_config.js";
|
|
5
|
+
import { SVELTE_CONFIG_FILENAME, SVELTEKIT_DEV_DIRNAME, PM_CLI_DEFAULT } from "./constants.js";
|
|
6
|
+
import { find_cli, spawn_cli, to_cli_name } from "./cli.js";
|
|
7
|
+
import { Task_Error } from "./task.js";
|
|
8
|
+
import { serialize_args, to_forwarded_args } from "./args.js";
|
|
9
9
|
export const SVELTEKIT_CLI = 'svelte-kit';
|
|
10
10
|
export const SVELTE_CHECK_CLI = 'svelte-check';
|
|
11
11
|
export const SVELTE_PACKAGE_CLI = 'svelte-package';
|
package/dist/sync.task.d.ts
CHANGED
package/dist/sync.task.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { spawn } from '@ryanatkn/belt/process.js';
|
|
3
|
-
import { Task_Error } from
|
|
4
|
-
import { sync_package_json } from
|
|
5
|
-
import { sveltekit_sync } from
|
|
3
|
+
import { Task_Error } from "./task.js";
|
|
4
|
+
import { sync_package_json } from "./package_json.js";
|
|
5
|
+
import { sveltekit_sync } from "./sveltekit_helpers.js";
|
|
6
6
|
export const Args = z
|
|
7
7
|
.object({
|
|
8
8
|
sveltekit: z.boolean({ description: 'dual of no-sveltekit' }).default(true),
|
package/dist/task.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import type { Logger } from '@ryanatkn/belt/log.js';
|
|
|
2
2
|
import type { z } from 'zod';
|
|
3
3
|
import type { Timings } from '@ryanatkn/belt/timings.js';
|
|
4
4
|
import type { Result } from '@ryanatkn/belt/result.js';
|
|
5
|
-
import type { Args } from './args.
|
|
6
|
-
import type { Path_Id } from './path.
|
|
7
|
-
import type { Gro_Config } from './gro_config.
|
|
8
|
-
import type { Parsed_Svelte_Config } from './svelte_config.
|
|
9
|
-
import { type Input_Path, type Resolved_Input_File, type Resolved_Input_Path } from './input_path.
|
|
10
|
-
import { type Load_Modules_Failure, type Module_Meta } from './modules.
|
|
11
|
-
import type { Filer } from './filer.
|
|
5
|
+
import type { Args } from './args.ts';
|
|
6
|
+
import type { Path_Id } from './path.ts';
|
|
7
|
+
import type { Gro_Config } from './gro_config.ts';
|
|
8
|
+
import type { Parsed_Svelte_Config } from './svelte_config.ts';
|
|
9
|
+
import { type Input_Path, type Resolved_Input_File, type Resolved_Input_Path } from './input_path.ts';
|
|
10
|
+
import { type Load_Modules_Failure, type Module_Meta } from './modules.ts';
|
|
11
|
+
import type { Filer } from './filer.ts';
|
|
12
12
|
export interface Task<T_Args = Args, // same as `z.infer<typeof Args>`
|
|
13
13
|
T_Args_Schema extends z.ZodType = z.ZodType, T_Return = unknown> {
|
|
14
14
|
run: (ctx: Task_Context<T_Args>) => T_Return | Promise<T_Return>;
|
package/dist/task.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ensure_end, strip_end, strip_start } from '@ryanatkn/belt/string.js';
|
|
2
2
|
import { styleText as st } from 'node:util';
|
|
3
3
|
import { isAbsolute, join, relative } from 'node:path';
|
|
4
|
-
import { resolve_input_files, resolve_input_paths, } from
|
|
5
|
-
import { GRO_DIST_DIR, print_path } from
|
|
6
|
-
import { search_fs } from
|
|
7
|
-
import { load_modules } from
|
|
4
|
+
import { resolve_input_files, resolve_input_paths, } from "./input_path.js";
|
|
5
|
+
import { GRO_DIST_DIR, print_path } from "./paths.js";
|
|
6
|
+
import { search_fs } from "./search_fs.js";
|
|
7
|
+
import { load_modules } from "./modules.js";
|
|
8
8
|
export const TASK_FILE_SUFFIX_TS = '.task.ts';
|
|
9
9
|
export const TASK_FILE_SUFFIX_JS = '.task.js';
|
|
10
10
|
export const TASK_FILE_SUFFIXES = [TASK_FILE_SUFFIX_TS, TASK_FILE_SUFFIX_JS]; // TODO from `Gro_Config`, but needs to be used everywhere the constants are
|
package/dist/task_logging.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
2
|
-
import type { Loaded_Tasks, Task_Module_Meta } from './task.
|
|
2
|
+
import type { Loaded_Tasks, Task_Module_Meta } from './task.ts';
|
|
3
3
|
export declare const log_tasks: (log: Logger, loaded_tasks: Loaded_Tasks, log_intro?: boolean) => void;
|
|
4
4
|
export declare const log_error_reasons: (log: Logger, reasons: Array<string>) => void;
|
|
5
5
|
export declare const log_task_help: (log: Logger, meta: Task_Module_Meta) => void;
|
package/dist/task_logging.js
CHANGED
|
@@ -2,7 +2,7 @@ import { styleText as st } from 'node:util';
|
|
|
2
2
|
import { plural } from '@ryanatkn/belt/string.js';
|
|
3
3
|
import { print_value } from '@ryanatkn/belt/print.js';
|
|
4
4
|
import { ZodFirstPartyTypeKind } from 'zod';
|
|
5
|
-
import { print_path } from
|
|
5
|
+
import { print_path } from "./paths.js";
|
|
6
6
|
export const log_tasks = (log, loaded_tasks, log_intro = true) => {
|
|
7
7
|
const { modules, found_tasks } = loaded_tasks;
|
|
8
8
|
const { resolved_input_files_by_root_dir } = found_tasks;
|
package/dist/test.task.d.ts
CHANGED
package/dist/test.task.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { styleText as st } from 'node:util';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { Task_Error } from
|
|
4
|
-
import { paths } from
|
|
5
|
-
import { find_cli } from
|
|
3
|
+
import { Task_Error } from "./task.js";
|
|
4
|
+
import { paths } from "./paths.js";
|
|
5
|
+
import { find_cli } from "./cli.js";
|
|
6
6
|
export const Args = z
|
|
7
7
|
.object({
|
|
8
8
|
_: z.array(z.string(), { description: 'file patterns to test' }).default([`\\.test\\.ts$`]), // TODO maybe use uvu's default instead of being restrictive?
|
package/dist/typecheck.task.d.ts
CHANGED
package/dist/typecheck.task.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { print_spawn_result } from '@ryanatkn/belt/process.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { Task_Error } from
|
|
4
|
-
import { serialize_args, to_forwarded_args } from
|
|
5
|
-
import { find_cli, spawn_cli, spawn_cli_process } from
|
|
6
|
-
import { SVELTE_CHECK_CLI, sveltekit_sync_if_available } from
|
|
7
|
-
import { configure_colored_output_with_path_replacement } from
|
|
8
|
-
import { paths } from
|
|
3
|
+
import { Task_Error } from "./task.js";
|
|
4
|
+
import { serialize_args, to_forwarded_args } from "./args.js";
|
|
5
|
+
import { find_cli, spawn_cli, spawn_cli_process } from "./cli.js";
|
|
6
|
+
import { SVELTE_CHECK_CLI, sveltekit_sync_if_available } from "./sveltekit_helpers.js";
|
|
7
|
+
import { configure_colored_output_with_path_replacement } from "./child_process_logging.js";
|
|
8
|
+
import { paths } from "./paths.js";
|
|
9
9
|
export const Args = z
|
|
10
10
|
.object({
|
|
11
11
|
svelte_check_cli: z
|
package/dist/upgrade.task.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type Task } from './task.
|
|
2
|
+
import { type Task } from './task.ts';
|
|
3
3
|
export declare const Args: z.ZodObject<{
|
|
4
4
|
_: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
5
5
|
only: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>, string[], string | string[] | undefined>;
|
package/dist/upgrade.task.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { spawn } from '@ryanatkn/belt/process.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { rmSync } from 'node:fs';
|
|
4
|
-
import { Task_Error } from
|
|
5
|
-
import { extract_deps, load_package_json } from
|
|
6
|
-
import { Git_Origin, git_pull } from
|
|
7
|
-
import { spawn_cli } from
|
|
8
|
-
import { serialize_args, to_forwarded_args } from
|
|
9
|
-
import { NODE_MODULES_DIRNAME } from
|
|
4
|
+
import { Task_Error } from "./task.js";
|
|
5
|
+
import { extract_deps, load_package_json } from "./package_json.js";
|
|
6
|
+
import { Git_Origin, git_pull } from "./git.js";
|
|
7
|
+
import { spawn_cli } from "./cli.js";
|
|
8
|
+
import { serialize_args, to_forwarded_args } from "./args.js";
|
|
9
|
+
import { NODE_MODULES_DIRNAME } from "./constants.js";
|
|
10
10
|
export const Args = z
|
|
11
11
|
.object({
|
|
12
12
|
_: z.array(z.string(), { description: 'names of deps to exclude from the upgrade' }).default([]),
|
package/dist/watch_dir.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryanatkn/gro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.155.0",
|
|
4
4
|
"description": "task runner and toolkit extending SvelteKit",
|
|
5
5
|
"motto": "generate, run, optimize",
|
|
6
6
|
"glyph": "🌰",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"type": "module",
|
|
34
34
|
"engines": {
|
|
35
|
-
"node": ">=22.
|
|
35
|
+
"node": ">=22.15"
|
|
36
36
|
},
|
|
37
37
|
"bin": {
|
|
38
38
|
"gro": "dist/gro.js"
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"oxc-parser": "^0.67.0",
|
|
58
58
|
"prettier": "^3.5.3",
|
|
59
59
|
"prettier-plugin-svelte": "^3.3.3",
|
|
60
|
+
"ts-blank-space": "^0.6.1",
|
|
60
61
|
"ts-morph": "^25.0.1",
|
|
61
62
|
"tslib": "^2.8.1",
|
|
62
63
|
"zod": "^3.24.3"
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
"@changesets/changelog-git": "^0.2.1",
|
|
70
71
|
"@changesets/types": "^6.1.0",
|
|
71
72
|
"@ryanatkn/eslint-config": "^0.8.0",
|
|
72
|
-
"@ryanatkn/fuz": "^0.
|
|
73
|
+
"@ryanatkn/fuz": "^0.141.1",
|
|
73
74
|
"@ryanatkn/moss": "^0.28.0",
|
|
74
75
|
"@sveltejs/adapter-static": "^3.0.8",
|
|
75
76
|
"@sveltejs/kit": "^2.20.8",
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
"uvu": "^0.5.6"
|
|
87
88
|
},
|
|
88
89
|
"optionalDependencies": {
|
|
89
|
-
"@ryanatkn/moss": "
|
|
90
|
+
"@ryanatkn/moss": ">=0.27.0 <0.29.0"
|
|
90
91
|
},
|
|
91
92
|
"prettier": {
|
|
92
93
|
"plugins": [
|
package/src/lib/build.task.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {z} from 'zod';
|
|
2
2
|
|
|
3
|
-
import type {Task} from './task.
|
|
4
|
-
import {Plugins} from './plugin.
|
|
5
|
-
import {clean_fs} from './clean_fs.
|
|
3
|
+
import type {Task} from './task.ts';
|
|
4
|
+
import {Plugins} from './plugin.ts';
|
|
5
|
+
import {clean_fs} from './clean_fs.ts';
|
|
6
6
|
|
|
7
7
|
export const Args = z
|
|
8
8
|
.object({
|