@ryanatkn/gro 0.180.0 → 0.182.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/LICENSE +1 -1
- package/README.md +7 -2
- package/dist/build.task.js +2 -2
- package/dist/build_cache.d.ts +1 -1
- package/dist/build_cache.d.ts.map +1 -1
- package/dist/build_cache.js +3 -3
- package/dist/changelog.d.ts +2 -2
- package/dist/changelog.d.ts.map +1 -1
- package/dist/changeset.task.js +3 -3
- package/dist/check.task.js +2 -2
- package/dist/child_process_logging.js +1 -1
- package/dist/clean.task.js +2 -2
- package/dist/cli.d.ts +5 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -4
- package/dist/commit.task.js +2 -2
- package/dist/deploy.task.js +4 -4
- package/dist/disknode.d.ts +1 -1
- package/dist/disknode.d.ts.map +1 -1
- package/dist/esbuild_helpers.d.ts +1 -1
- package/dist/esbuild_helpers.d.ts.map +1 -1
- package/dist/esbuild_plugin_external_worker.d.ts +1 -1
- package/dist/esbuild_plugin_external_worker.d.ts.map +1 -1
- package/dist/esbuild_plugin_sveltekit_shim_alias.js +1 -1
- package/dist/filer.d.ts +4 -4
- package/dist/filer.d.ts.map +1 -1
- package/dist/filer.js +2 -2
- package/dist/format.task.js +1 -1
- package/dist/format_directory.d.ts +2 -2
- package/dist/format_directory.d.ts.map +1 -1
- package/dist/gen.d.ts +4 -4
- package/dist/gen.d.ts.map +1 -1
- package/dist/gen.js +2 -2
- package/dist/gen.task.js +2 -2
- package/dist/gen_helpers.d.ts +3 -3
- package/dist/gen_helpers.d.ts.map +1 -1
- package/dist/github.d.ts +2 -2
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +1 -1
- package/dist/gro.config.default.d.ts.map +1 -1
- package/dist/gro.config.default.js +1 -3
- package/dist/gro_config.d.ts +1 -1
- package/dist/gro_config.d.ts.map +1 -1
- package/dist/gro_config.js +3 -3
- package/dist/gro_helpers.d.ts +1 -1
- package/dist/gro_helpers.d.ts.map +1 -1
- package/dist/gro_helpers.js +1 -1
- package/dist/gro_plugin_gen.js +3 -3
- package/dist/gro_plugin_server.d.ts +2 -2
- package/dist/gro_plugin_server.d.ts.map +1 -1
- package/dist/gro_plugin_server.js +5 -5
- package/dist/gro_plugin_sveltekit_app.d.ts +7 -5
- package/dist/gro_plugin_sveltekit_app.d.ts.map +1 -1
- package/dist/gro_plugin_sveltekit_app.js +7 -12
- package/dist/gro_plugin_sveltekit_library.js +1 -1
- package/dist/input_path.d.ts +2 -2
- package/dist/input_path.d.ts.map +1 -1
- package/dist/input_path.js +2 -2
- package/dist/invoke.js +2 -2
- package/dist/invoke_task.d.ts +2 -2
- package/dist/invoke_task.d.ts.map +1 -1
- package/dist/invoke_task.js +3 -3
- package/dist/lint.task.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/modules.d.ts +3 -3
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +2 -2
- package/dist/package_json.d.ts +2 -2
- package/dist/package_json.d.ts.map +1 -1
- package/dist/package_json.js +3 -3
- package/dist/parse_exports.d.ts +4 -4
- package/dist/parse_exports.d.ts.map +1 -1
- package/dist/parse_exports_context.d.ts +1 -1
- package/dist/parse_exports_context.d.ts.map +1 -1
- package/dist/parse_imports.d.ts +2 -2
- package/dist/parse_imports.d.ts.map +1 -1
- package/dist/parse_imports.js +1 -1
- package/dist/paths.d.ts +1 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +1 -1
- package/dist/publish.task.js +3 -3
- package/dist/reinstall.task.js +1 -1
- package/dist/resolve_specifier.d.ts +1 -1
- package/dist/resolve_specifier.d.ts.map +1 -1
- package/dist/resolve_specifier.js +1 -1
- package/dist/run.task.js +1 -1
- package/dist/run_gen.d.ts +2 -2
- package/dist/run_gen.d.ts.map +1 -1
- package/dist/run_gen.js +2 -2
- package/dist/run_task.d.ts +2 -2
- package/dist/run_task.d.ts.map +1 -1
- package/dist/source_json.d.ts +3 -3
- package/dist/source_json.d.ts.map +1 -1
- package/dist/source_json.js +3 -3
- package/dist/svelte_config.js +1 -1
- package/dist/sveltekit_helpers.d.ts +3 -3
- package/dist/sveltekit_helpers.d.ts.map +1 -1
- package/dist/sveltekit_helpers.js +1 -1
- package/dist/sveltekit_shim_app_forms.js +1 -1
- package/dist/sveltekit_shim_app_navigation.js +1 -1
- package/dist/sveltekit_shim_app_paths.js +1 -1
- package/dist/sync.task.js +1 -1
- package/dist/task.d.ts +4 -4
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js +2 -2
- package/dist/task_logging.d.ts +1 -1
- package/dist/task_logging.d.ts.map +1 -1
- package/dist/task_logging.js +2 -2
- package/dist/typecheck.task.js +1 -1
- package/dist/upgrade.task.js +2 -2
- package/dist/watch_dir.d.ts +1 -1
- package/dist/watch_dir.d.ts.map +1 -1
- package/dist/watch_dir.js +2 -2
- package/package.json +13 -13
- package/src/lib/build.task.ts +2 -2
- package/src/lib/build_cache.ts +4 -4
- package/src/lib/changelog.ts +2 -2
- package/src/lib/changeset.task.ts +3 -3
- package/src/lib/check.task.ts +2 -2
- package/src/lib/child_process_logging.ts +1 -1
- package/src/lib/clean.task.ts +2 -2
- package/src/lib/cli.ts +7 -7
- package/src/lib/commit.task.ts +2 -2
- package/src/lib/deploy.task.ts +4 -4
- package/src/lib/disknode.ts +1 -1
- package/src/lib/esbuild_helpers.ts +1 -1
- package/src/lib/esbuild_plugin_external_worker.ts +2 -2
- package/src/lib/esbuild_plugin_sveltekit_shim_alias.ts +1 -1
- package/src/lib/filer.ts +6 -6
- package/src/lib/format.task.ts +1 -1
- package/src/lib/format_directory.ts +2 -2
- package/src/lib/gen.task.ts +2 -2
- package/src/lib/gen.ts +6 -6
- package/src/lib/gen_helpers.ts +3 -3
- package/src/lib/github.ts +2 -2
- package/src/lib/gro.config.default.ts +1 -3
- package/src/lib/gro_config.ts +4 -4
- package/src/lib/gro_helpers.ts +1 -1
- package/src/lib/gro_plugin_gen.ts +3 -3
- package/src/lib/gro_plugin_server.ts +7 -7
- package/src/lib/gro_plugin_sveltekit_app.ts +17 -18
- package/src/lib/gro_plugin_sveltekit_library.ts +1 -1
- package/src/lib/input_path.ts +4 -4
- package/src/lib/invoke.ts +2 -2
- package/src/lib/invoke_task.ts +3 -3
- package/src/lib/lint.task.ts +1 -1
- package/src/lib/loader.ts +1 -1
- package/src/lib/modules.ts +5 -5
- package/src/lib/package_json.ts +4 -4
- package/src/lib/parse_exports.ts +4 -4
- package/src/lib/parse_exports_context.ts +2 -2
- package/src/lib/parse_imports.ts +3 -3
- package/src/lib/paths.ts +2 -2
- package/src/lib/publish.task.ts +3 -3
- package/src/lib/reinstall.task.ts +1 -1
- package/src/lib/resolve_specifier.ts +2 -2
- package/src/lib/run.task.ts +1 -1
- package/src/lib/run_gen.ts +4 -4
- package/src/lib/run_task.ts +2 -2
- package/src/lib/source_json.ts +5 -5
- package/src/lib/svelte_config.ts +1 -1
- package/src/lib/sveltekit_helpers.ts +4 -4
- package/src/lib/sveltekit_shim_app_forms.ts +1 -1
- package/src/lib/sveltekit_shim_app_navigation.ts +1 -1
- package/src/lib/sveltekit_shim_app_paths.ts +1 -1
- package/src/lib/sync.task.ts +1 -1
- package/src/lib/task.ts +6 -6
- package/src/lib/task_logging.ts +3 -3
- package/src/lib/typecheck.task.ts +1 -1
- package/src/lib/upgrade.task.ts +2 -2
- package/src/lib/watch_dir.ts +3 -3
package/dist/task.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ensure_end, strip_end, strip_start } from '@
|
|
1
|
+
import { ensure_end, strip_end, strip_start } from '@fuzdev/fuz_util/string.js';
|
|
2
2
|
import { styleText as st } from 'node:util';
|
|
3
3
|
import { isAbsolute, join, relative } from 'node:path';
|
|
4
|
-
import { fs_search } from '@
|
|
4
|
+
import { fs_search } from '@fuzdev/fuz_util/fs.js';
|
|
5
5
|
import { resolve_input_files, resolve_input_paths, } from "./input_path.js";
|
|
6
6
|
import { GRO_DIST_DIR, print_path } from "./paths.js";
|
|
7
7
|
import { load_modules } from "./modules.js";
|
package/dist/task_logging.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Logger } from '@
|
|
1
|
+
import type { Logger } from '@fuzdev/fuz_util/log.js';
|
|
2
2
|
import type { LoadedTasks, TaskModuleMeta } from './task.ts';
|
|
3
3
|
export declare const log_tasks: (log: Logger, loaded_tasks: LoadedTasks, log_intro?: boolean) => void;
|
|
4
4
|
export declare const log_error_reasons: (log: Logger, reasons: Array<string>) => void;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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;AAMpD,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"}
|
package/dist/task_logging.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styleText as st } from 'node:util';
|
|
2
|
-
import { plural } from '@
|
|
3
|
-
import { print_value } from '@
|
|
2
|
+
import { plural } from '@fuzdev/fuz_util/string.js';
|
|
3
|
+
import { print_value } from '@fuzdev/fuz_util/print.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { print_path } from "./paths.js";
|
|
6
6
|
export const log_tasks = (log, loaded_tasks, log_intro = true) => {
|
package/dist/typecheck.task.js
CHANGED
package/dist/upgrade.task.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { spawn } from '@
|
|
1
|
+
import { spawn } from '@fuzdev/fuz_util/process.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { rm } from 'node:fs/promises';
|
|
4
|
-
import { GitOrigin, git_pull } from '@
|
|
4
|
+
import { GitOrigin, git_pull } from '@fuzdev/fuz_util/git.js';
|
|
5
5
|
import { TaskError } from "./task.js";
|
|
6
6
|
import { extract_deps, load_package_json } from "./package_json.js";
|
|
7
7
|
import { spawn_cli } from "./cli.js";
|
package/dist/watch_dir.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ChokidarOptions, type Matcher } from 'chokidar';
|
|
2
|
-
import type { PathFilter } from '@
|
|
2
|
+
import type { PathFilter } from '@fuzdev/fuz_util/path.js';
|
|
3
3
|
export interface WatchNodeFs {
|
|
4
4
|
init: () => Promise<void>;
|
|
5
5
|
close: () => Promise<void>;
|
package/dist/watch_dir.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch_dir.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/watch_dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,eAAe,EAAkB,KAAK,OAAO,EAAC,MAAM,UAAU,CAAC;AAInF,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"watch_dir.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/watch_dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,eAAe,EAAkB,KAAK,OAAO,EAAC,MAAM,UAAU,CAAC;AAInF,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAOzD,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACtB;AACD,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC5D,MAAM,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,qBAAqB,CAAC;IACjC,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,0DAOvB,eAAe,KAAG,WA+CpB,CAAC"}
|
package/dist/watch_dir.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { watch } from 'chokidar';
|
|
2
2
|
import { relative } from 'node:path';
|
|
3
3
|
import { statSync } from 'node:fs';
|
|
4
|
-
import { create_deferred } from '@
|
|
5
|
-
import { EMPTY_OBJECT } from '@
|
|
4
|
+
import { create_deferred } from '@fuzdev/fuz_util/async.js';
|
|
5
|
+
import { EMPTY_OBJECT } from '@fuzdev/fuz_util/object.js';
|
|
6
6
|
const TMP_FILE_PATTERN = /\.tmp\./;
|
|
7
7
|
/**
|
|
8
8
|
* Watch for changes on the filesystem using chokidar.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryanatkn/gro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.182.0",
|
|
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.13"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@
|
|
64
|
+
"@fuzdev/fuz_util": ">=0.42.0",
|
|
65
65
|
"@sveltejs/kit": "^2",
|
|
66
66
|
"esbuild": "^0.27.0",
|
|
67
67
|
"svelte": "^5",
|
|
@@ -82,24 +82,24 @@
|
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@changesets/changelog-git": "^0.2.1",
|
|
84
84
|
"@changesets/types": "^6.1.0",
|
|
85
|
-
"@
|
|
85
|
+
"@fuzdev/fuz_code": "^0.38.0",
|
|
86
|
+
"@fuzdev/fuz_css": "^0.42.1",
|
|
87
|
+
"@fuzdev/fuz_ui": "^0.172.0",
|
|
88
|
+
"@fuzdev/fuz_util": "^0.43.0",
|
|
86
89
|
"@ryanatkn/eslint-config": "^0.9.0",
|
|
87
|
-
"@ryanatkn/fuz": "^0.167.0",
|
|
88
|
-
"@ryanatkn/fuz_code": "^0.36.0",
|
|
89
|
-
"@ryanatkn/moss": "^0.39.0",
|
|
90
90
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
91
|
-
"@sveltejs/kit": "^2.49.
|
|
92
|
-
"@sveltejs/package": "^2.5.
|
|
91
|
+
"@sveltejs/kit": "^2.49.1",
|
|
92
|
+
"@sveltejs/package": "^2.5.7",
|
|
93
93
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
94
94
|
"@types/node": "^24.10.1",
|
|
95
|
-
"esbuild": "^0.27.
|
|
95
|
+
"esbuild": "^0.27.1",
|
|
96
96
|
"eslint": "^9.39.1",
|
|
97
|
-
"eslint-plugin-svelte": "^3.13.
|
|
98
|
-
"svelte": "^5.
|
|
97
|
+
"eslint-plugin-svelte": "^3.13.1",
|
|
98
|
+
"svelte": "^5.45.6",
|
|
99
99
|
"svelte-check": "^4.3.4",
|
|
100
100
|
"typescript": "^5.9.3",
|
|
101
|
-
"typescript-eslint": "^8.48.
|
|
102
|
-
"vitest": "^4.0.
|
|
101
|
+
"typescript-eslint": "^8.48.1",
|
|
102
|
+
"vitest": "^4.0.15"
|
|
103
103
|
},
|
|
104
104
|
"prettier": {
|
|
105
105
|
"plugins": [
|
package/src/lib/build.task.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {z} from 'zod';
|
|
2
2
|
import {styleText as st} from 'node:util';
|
|
3
|
-
import {git_check_clean_workspace, git_current_commit_hash} from '@
|
|
3
|
+
import {git_check_clean_workspace, git_current_commit_hash} from '@fuzdev/fuz_util/git.js';
|
|
4
4
|
import {rm} from 'node:fs/promises';
|
|
5
5
|
import {join} from 'node:path';
|
|
6
|
-
import {fs_exists} from '@
|
|
6
|
+
import {fs_exists} from '@fuzdev/fuz_util/fs.js';
|
|
7
7
|
|
|
8
8
|
import {TaskError, type Task} from './task.ts';
|
|
9
9
|
import {Plugins} from './plugin.ts';
|
package/src/lib/build_cache.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {mkdir, readdir, readFile, rm, stat, writeFile} from 'node:fs/promises';
|
|
2
2
|
import {join} from 'node:path';
|
|
3
|
-
import type {Logger} from '@
|
|
3
|
+
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
4
4
|
import {styleText as st} from 'node:util';
|
|
5
|
-
import {git_current_commit_hash} from '@
|
|
6
|
-
import {fs_exists} from '@
|
|
7
|
-
import {map_concurrent} from '@
|
|
5
|
+
import {git_current_commit_hash} from '@fuzdev/fuz_util/git.js';
|
|
6
|
+
import {fs_exists} from '@fuzdev/fuz_util/fs.js';
|
|
7
|
+
import {map_concurrent} from '@fuzdev/fuz_util/async.js';
|
|
8
8
|
import {z} from 'zod';
|
|
9
9
|
|
|
10
10
|
import {to_hash} from './hash.ts';
|
package/src/lib/changelog.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {readFile, writeFile} from 'node:fs/promises';
|
|
2
2
|
import {z} from 'zod';
|
|
3
|
-
import type {Logger} from '@
|
|
4
|
-
import type {FetchValueCache} from '@
|
|
3
|
+
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
4
|
+
import type {FetchValueCache} from '@fuzdev/fuz_util/fetch.js';
|
|
5
5
|
|
|
6
6
|
import {github_fetch_commit_prs} from './github.ts';
|
|
7
7
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {z} from 'zod';
|
|
2
|
-
import {spawn} from '@
|
|
2
|
+
import {spawn} from '@fuzdev/fuz_util/process.js';
|
|
3
3
|
import {styleText as st} from 'node:util';
|
|
4
4
|
import type {WrittenConfig} from '@changesets/types';
|
|
5
5
|
import {readdir, readFile, writeFile} from 'node:fs/promises';
|
|
6
6
|
import {join} from 'node:path';
|
|
7
|
-
import {fs_exists} from '@
|
|
7
|
+
import {fs_exists} from '@fuzdev/fuz_util/fs.js';
|
|
8
8
|
import {
|
|
9
9
|
GitOrigin,
|
|
10
10
|
git_check_fully_staged_workspace,
|
|
11
11
|
git_push_to_create,
|
|
12
|
-
} from '@
|
|
12
|
+
} from '@fuzdev/fuz_util/git.js';
|
|
13
13
|
|
|
14
14
|
import {TaskError, type Task} from './task.ts';
|
|
15
15
|
import {find_cli, spawn_cli} from './cli.ts';
|
package/src/lib/check.task.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {z} from 'zod';
|
|
2
|
-
import {spawn} from '@
|
|
2
|
+
import {spawn} from '@fuzdev/fuz_util/process.js';
|
|
3
3
|
import {styleText as st} from 'node:util';
|
|
4
|
-
import {git_check_clean_workspace} from '@
|
|
4
|
+
import {git_check_clean_workspace} from '@fuzdev/fuz_util/git.js';
|
|
5
5
|
|
|
6
6
|
import {TaskError, type Task} from './task.ts';
|
|
7
7
|
import {sync_package_json} from './package_json.ts';
|
package/src/lib/clean.task.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {spawn} from '@
|
|
1
|
+
import {spawn} from '@fuzdev/fuz_util/process.js';
|
|
2
2
|
import {z} from 'zod';
|
|
3
|
-
import {GitOrigin} from '@
|
|
3
|
+
import {GitOrigin} from '@fuzdev/fuz_util/git.js';
|
|
4
4
|
|
|
5
5
|
import type {Task} from './task.ts';
|
|
6
6
|
import {clean_fs} from './clean_fs.ts';
|
package/src/lib/cli.ts
CHANGED
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
spawn_process,
|
|
6
6
|
type SpawnResult,
|
|
7
7
|
type SpawnedProcess,
|
|
8
|
-
} from '@
|
|
8
|
+
} from '@fuzdev/fuz_util/process.js';
|
|
9
9
|
import {join} from 'node:path';
|
|
10
|
-
import {fs_exists} from '@
|
|
10
|
+
import {fs_exists} from '@fuzdev/fuz_util/fs.js';
|
|
11
11
|
import {fileURLToPath, type URL} from 'node:url';
|
|
12
|
-
import type {Logger} from '@
|
|
13
|
-
import type {PathId} from '@
|
|
12
|
+
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
13
|
+
import type {PathId} from '@fuzdev/fuz_util/path.js';
|
|
14
14
|
|
|
15
15
|
import {NODE_MODULES_DIRNAME} from './constants.ts';
|
|
16
16
|
import {print_command_args} from './args.ts';
|
|
17
17
|
|
|
18
|
-
// TODO maybe upstream to
|
|
18
|
+
// TODO maybe upstream to fuz_util?
|
|
19
19
|
|
|
20
20
|
export type Cli =
|
|
21
21
|
| {kind: 'local'; name: string; id: PathId}
|
|
@@ -42,7 +42,7 @@ export const find_cli = async (
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Spawns a CLI if available using
|
|
45
|
+
* Spawns a CLI if available using fuz_util's `spawn`.
|
|
46
46
|
* If a string is provided for `name_or_cli`, it checks first local to the cwd and then globally.
|
|
47
47
|
* @returns `undefined` if no CLI is found, or the spawn result
|
|
48
48
|
*/
|
|
@@ -58,7 +58,7 @@ export const spawn_cli = async (
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* Spawns a CLI if available using
|
|
61
|
+
* Spawns a CLI if available using fuz_util's `spawn_process`.
|
|
62
62
|
* If a string is provided for `name_or_cli`, it checks first local to the cwd and then globally.
|
|
63
63
|
* @returns `undefined` if no CLI is found, or the spawn result
|
|
64
64
|
*/
|
package/src/lib/commit.task.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {spawn} from '@
|
|
1
|
+
import {spawn} from '@fuzdev/fuz_util/process.js';
|
|
2
2
|
import {z} from 'zod';
|
|
3
|
-
import {GitOrigin, git_current_branch_name, git_push} from '@
|
|
3
|
+
import {GitOrigin, git_current_branch_name, git_push} from '@fuzdev/fuz_util/git.js';
|
|
4
4
|
|
|
5
5
|
import type {Task} from './task.ts';
|
|
6
6
|
|
package/src/lib/deploy.task.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {spawn} from '@
|
|
2
|
-
import {print_error} from '@
|
|
1
|
+
import {spawn} from '@fuzdev/fuz_util/process.js';
|
|
2
|
+
import {print_error} from '@fuzdev/fuz_util/print.js';
|
|
3
3
|
import {styleText as st} from 'node:util';
|
|
4
4
|
import {z} from 'zod';
|
|
5
5
|
import {cp, mkdir, readdir, rm} from 'node:fs/promises';
|
|
6
6
|
import {join, resolve} from 'node:path';
|
|
7
|
-
import {fs_exists, fs_empty_dir} from '@
|
|
7
|
+
import {fs_exists, fs_empty_dir} from '@fuzdev/fuz_util/fs.js';
|
|
8
8
|
import {
|
|
9
9
|
git_check_clean_workspace,
|
|
10
10
|
git_checkout,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
git_check_setting_pull_rebase,
|
|
21
21
|
git_clone_locally,
|
|
22
22
|
git_current_branch_name,
|
|
23
|
-
} from '@
|
|
23
|
+
} from '@fuzdev/fuz_util/git.js';
|
|
24
24
|
|
|
25
25
|
import {TaskError, type Task} from './task.ts';
|
|
26
26
|
import {print_path} from './paths.ts';
|
package/src/lib/disknode.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
|
-
import type {Logger} from '@
|
|
2
|
+
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
3
3
|
import {basename} from 'node:path';
|
|
4
4
|
import type {CompileOptions, ModuleCompileOptions, PreprocessorGroup} from 'svelte/compiler';
|
|
5
|
-
import type {PathId} from '@
|
|
5
|
+
import type {PathId} from '@fuzdev/fuz_util/path.js';
|
|
6
6
|
|
|
7
7
|
import {print_build_result, to_define_import_meta_env} from './esbuild_helpers.ts';
|
|
8
8
|
import {resolve_specifier} from './resolve_specifier.ts';
|
package/src/lib/filer.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {EMPTY_OBJECT} from '@
|
|
1
|
+
import {EMPTY_OBJECT} from '@fuzdev/fuz_util/object.js';
|
|
2
2
|
import {readFile, stat} from 'node:fs/promises';
|
|
3
3
|
import {dirname, resolve} from 'node:path';
|
|
4
|
-
import type {OmitStrict} from '@
|
|
4
|
+
import type {OmitStrict} from '@fuzdev/fuz_util/types.js';
|
|
5
5
|
import {isBuiltin} from 'node:module';
|
|
6
6
|
import {fileURLToPath, pathToFileURL} from 'node:url';
|
|
7
|
-
import {UnreachableError} from '@
|
|
8
|
-
import type {Logger} from '@
|
|
9
|
-
import type {PackageJson} from '@
|
|
10
|
-
import type {FileFilter, PathId} from '@
|
|
7
|
+
import {UnreachableError} from '@fuzdev/fuz_util/error.js';
|
|
8
|
+
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
9
|
+
import type {PackageJson} from '@fuzdev/fuz_util/package_json.js';
|
|
10
|
+
import type {FileFilter, PathId} from '@fuzdev/fuz_util/path.js';
|
|
11
11
|
|
|
12
12
|
import {
|
|
13
13
|
watch_dir,
|
package/src/lib/format.task.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {SpawnResult} from '@
|
|
2
|
-
import type {Logger} from '@
|
|
1
|
+
import type {SpawnResult} from '@fuzdev/fuz_util/process.js';
|
|
2
|
+
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
3
3
|
|
|
4
4
|
import {paths} from './paths.ts';
|
|
5
5
|
import {
|
package/src/lib/gen.task.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {styleText as st} from 'node:util';
|
|
2
|
-
import {print_ms, print_error} from '@
|
|
3
|
-
import {plural} from '@
|
|
2
|
+
import {print_ms, print_error} from '@fuzdev/fuz_util/print.js';
|
|
3
|
+
import {plural} from '@fuzdev/fuz_util/string.js';
|
|
4
4
|
import {z} from 'zod';
|
|
5
5
|
|
|
6
6
|
import {TaskError, type Task} from './task.ts';
|
package/src/lib/gen.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {Logger} from '@
|
|
1
|
+
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
2
2
|
import {join, basename, dirname, isAbsolute} from 'node:path';
|
|
3
3
|
import {mkdir, readFile, writeFile} from 'node:fs/promises';
|
|
4
|
-
import type {Result} from '@
|
|
5
|
-
import type {Timings} from '@
|
|
4
|
+
import type {Result} from '@fuzdev/fuz_util/result.js';
|
|
5
|
+
import type {Timings} from '@fuzdev/fuz_util/timings.js';
|
|
6
6
|
import {styleText as st} from 'node:util';
|
|
7
|
-
import type {PathId} from '@
|
|
8
|
-
import {map_concurrent} from '@
|
|
9
|
-
import {fs_search} from '@
|
|
7
|
+
import type {PathId} from '@fuzdev/fuz_util/path.js';
|
|
8
|
+
import {map_concurrent} from '@fuzdev/fuz_util/async.js';
|
|
9
|
+
import {fs_search} from '@fuzdev/fuz_util/fs.js';
|
|
10
10
|
|
|
11
11
|
import {print_path} from './paths.ts';
|
|
12
12
|
import type {GroConfig} from './gro_config.ts';
|
package/src/lib/gen_helpers.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {resolve} from 'node:path';
|
|
2
|
-
import type {Logger} from '@
|
|
3
|
-
import type {Timings} from '@
|
|
4
|
-
import type {PathId} from '@
|
|
2
|
+
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
3
|
+
import type {Timings} from '@fuzdev/fuz_util/timings.js';
|
|
4
|
+
import type {PathId} from '@fuzdev/fuz_util/path.js';
|
|
5
5
|
|
|
6
6
|
import type {GroConfig} from './gro_config.ts';
|
|
7
7
|
import {filter_dependents, type Filer} from './filer.ts';
|
package/src/lib/github.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// for now it's just calling a single endpoint so we do it manually
|
|
3
3
|
// and we specify just the types we need
|
|
4
4
|
|
|
5
|
-
import {FetchValueCache, fetch_value} from '@
|
|
6
|
-
import type {Logger} from '@
|
|
5
|
+
import {FetchValueCache, fetch_value} from '@fuzdev/fuz_util/fetch.js';
|
|
6
|
+
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
7
7
|
import {z} from 'zod';
|
|
8
8
|
|
|
9
9
|
export const GITHUB_REPO_MATCHER = /.+github.com\/(.+)\/(.+)/;
|
|
@@ -33,9 +33,7 @@ const config: CreateGroConfig = async (cfg, svelte_config) => {
|
|
|
33
33
|
gro_plugin_gen(),
|
|
34
34
|
has_server_result.ok ? gro_plugin_server() : null,
|
|
35
35
|
has_sveltekit_library_result.ok ? gro_plugin_sveltekit_library() : null,
|
|
36
|
-
has_sveltekit_app_result.ok
|
|
37
|
-
? gro_plugin_sveltekit_app({host_target: has_server_result.ok ? 'node' : 'github_pages'})
|
|
38
|
-
: null,
|
|
36
|
+
has_sveltekit_app_result.ok ? gro_plugin_sveltekit_app() : null,
|
|
39
37
|
].filter((v) => v !== null);
|
|
40
38
|
|
|
41
39
|
return cfg;
|
package/src/lib/gro_config.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {join, resolve} from 'node:path';
|
|
2
|
-
import {fs_exists} from '@
|
|
3
|
-
import {identity} from '@
|
|
4
|
-
import type {PathFilter, PathId} from '@
|
|
5
|
-
import {json_stringify_deterministic} from '@
|
|
2
|
+
import {fs_exists} from '@fuzdev/fuz_util/fs.js';
|
|
3
|
+
import {identity} from '@fuzdev/fuz_util/function.js';
|
|
4
|
+
import type {PathFilter, PathId} from '@fuzdev/fuz_util/path.js';
|
|
5
|
+
import {json_stringify_deterministic} from '@fuzdev/fuz_util/json.js';
|
|
6
6
|
|
|
7
7
|
import {GRO_DIST_DIR, IS_THIS_GRO, paths} from './paths.ts';
|
|
8
8
|
import {
|
package/src/lib/gro_helpers.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {realpathSync, existsSync} from 'node:fs';
|
|
2
2
|
import {join, resolve} from 'node:path';
|
|
3
3
|
import {fileURLToPath} from 'node:url';
|
|
4
|
-
import {spawn, type SpawnResult} from '@
|
|
4
|
+
import {spawn, type SpawnResult} from '@fuzdev/fuz_util/process.js';
|
|
5
5
|
|
|
6
6
|
import {JS_CLI_DEFAULT, NODE_MODULES_DIRNAME, SVELTEKIT_DIST_DIRNAME} from './constants.ts';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {EMPTY_OBJECT} from '@
|
|
2
|
-
import {throttle} from '@
|
|
3
|
-
import {UnreachableError} from '@
|
|
1
|
+
import {EMPTY_OBJECT} from '@fuzdev/fuz_util/object.js';
|
|
2
|
+
import {throttle} from '@fuzdev/fuz_util/throttle.js';
|
|
3
|
+
import {UnreachableError} from '@fuzdev/fuz_util/error.js';
|
|
4
4
|
|
|
5
5
|
import type {Plugin} from './plugin.ts';
|
|
6
6
|
import type {Args} from './args.ts';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {spawn_restartable_process, type RestartableProcess} from '@
|
|
1
|
+
import {spawn_restartable_process, type RestartableProcess} from '@fuzdev/fuz_util/process.js';
|
|
2
2
|
import * as esbuild from 'esbuild';
|
|
3
3
|
import type {Config as SvelteConfig} from '@sveltejs/kit';
|
|
4
4
|
import {join, resolve} from 'node:path';
|
|
5
|
-
import {identity} from '@
|
|
6
|
-
import {strip_before, strip_end} from '@
|
|
7
|
-
import type {Result} from '@
|
|
8
|
-
import {fs_exists} from '@
|
|
9
|
-
import {throttle} from '@
|
|
10
|
-
import type {PathId} from '@
|
|
5
|
+
import {identity} from '@fuzdev/fuz_util/function.js';
|
|
6
|
+
import {strip_before, strip_end} from '@fuzdev/fuz_util/string.js';
|
|
7
|
+
import type {Result} from '@fuzdev/fuz_util/result.js';
|
|
8
|
+
import {fs_exists} from '@fuzdev/fuz_util/fs.js';
|
|
9
|
+
import {throttle} from '@fuzdev/fuz_util/throttle.js';
|
|
10
|
+
import type {PathId} from '@fuzdev/fuz_util/path.js';
|
|
11
11
|
|
|
12
12
|
import type {Plugin} from './plugin.ts';
|
|
13
13
|
import {base_path_to_path_id, LIB_DIRNAME, paths} from './paths.ts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {SpawnedProcess} from '@
|
|
1
|
+
import type {SpawnedProcess} from '@fuzdev/fuz_util/process.js';
|
|
2
2
|
import {cp, mkdir, rm, writeFile} from 'node:fs/promises';
|
|
3
3
|
import {dirname, join} from 'node:path';
|
|
4
|
-
import {fs_exists} from '@
|
|
4
|
+
import {fs_exists} from '@fuzdev/fuz_util/fs.js';
|
|
5
5
|
|
|
6
6
|
import type {Plugin} from './plugin.ts';
|
|
7
7
|
import {serialize_args, to_forwarded_args} from './args.ts';
|
|
@@ -15,10 +15,13 @@ import {SOURCE_DIRNAME, VITE_CLI} from './constants.ts';
|
|
|
15
15
|
|
|
16
16
|
export interface GroPluginSveltekitAppOptions {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Whether to include a `.nojekyll` file in the build output.
|
|
19
|
+
* GitHub Pages processes files with Jekyll by default, breaking files/dirs prefixed with `_`.
|
|
20
|
+
* The `.nojekyll` file tells GitHub Pages to skip Jekyll processing.
|
|
21
|
+
*
|
|
22
|
+
* @default `true` if the SvelteKit adapter name contains 'static'
|
|
20
23
|
*/
|
|
21
|
-
|
|
24
|
+
include_nojekyll?: boolean;
|
|
22
25
|
|
|
23
26
|
/**
|
|
24
27
|
* If truthy, adds `/.well-known/package.json` to the static output.
|
|
@@ -43,12 +46,10 @@ export interface GroPluginSveltekitAppOptions {
|
|
|
43
46
|
vite_cli?: string;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
|
-
export type HostTarget = 'github_pages' | 'static' | 'node';
|
|
47
|
-
|
|
48
49
|
export type CopyFileFilter = (file_path: string) => boolean;
|
|
49
50
|
|
|
50
51
|
export const gro_plugin_sveltekit_app = ({
|
|
51
|
-
|
|
52
|
+
include_nojekyll,
|
|
52
53
|
well_known_package_json,
|
|
53
54
|
well_known_source_json,
|
|
54
55
|
well_known_src_files,
|
|
@@ -57,7 +58,7 @@ export const gro_plugin_sveltekit_app = ({
|
|
|
57
58
|
let sveltekit_process: SpawnedProcess | undefined = undefined;
|
|
58
59
|
return {
|
|
59
60
|
name: 'gro_plugin_sveltekit_app',
|
|
60
|
-
setup: async ({dev, watch, log, config}) => {
|
|
61
|
+
setup: async ({dev, watch, log, config, svelte_config}) => {
|
|
61
62
|
const found_vite_cli = await find_cli(vite_cli);
|
|
62
63
|
if (!found_vite_cli)
|
|
63
64
|
throw Error(
|
|
@@ -110,6 +111,12 @@ export const gro_plugin_sveltekit_app = ({
|
|
|
110
111
|
// copy files to `static` before building, in such a way
|
|
111
112
|
// that's non-destructive to existing files and dirs and easy to clean up
|
|
112
113
|
const {assets_path} = default_svelte_config;
|
|
114
|
+
|
|
115
|
+
// detect whether to include .nojekyll based on adapter if not explicitly set
|
|
116
|
+
const adapter_name = svelte_config.svelte_config?.kit?.adapter?.name;
|
|
117
|
+
const should_include_nojekyll =
|
|
118
|
+
include_nojekyll ?? (adapter_name ? adapter_name.includes('static') : false);
|
|
119
|
+
|
|
113
120
|
const cleanup_promises = [
|
|
114
121
|
serialized_package_json
|
|
115
122
|
? create_temporarily(
|
|
@@ -133,15 +140,7 @@ export const gro_plugin_sveltekit_app = ({
|
|
|
133
140
|
: well_known_src_files,
|
|
134
141
|
)
|
|
135
142
|
: null,
|
|
136
|
-
|
|
137
|
-
* GitHub pages processes everything with Jekyll by default,
|
|
138
|
-
* breaking things like files and dirs prefixed with an underscore.
|
|
139
|
-
* This adds a `.nojekyll` file to the root of the output
|
|
140
|
-
* to tell GitHub Pages to treat the outputs as plain static files.
|
|
141
|
-
*/
|
|
142
|
-
host_target === 'github_pages'
|
|
143
|
-
? create_temporarily(join(assets_path, '.nojekyll'), '')
|
|
144
|
-
: null,
|
|
143
|
+
should_include_nojekyll ? create_temporarily(join(assets_path, '.nojekyll'), '') : null,
|
|
145
144
|
].filter((v): v is Promise<AsyncCleanup> => v != null);
|
|
146
145
|
const cleanups = await Promise.all(cleanup_promises);
|
|
147
146
|
const cleanup = async () => {
|
package/src/lib/input_path.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {dirname, isAbsolute, join, resolve} from 'node:path';
|
|
2
2
|
import {stat} from 'node:fs/promises';
|
|
3
|
-
import {fs_exists, fs_search} from '@
|
|
4
|
-
import {strip_start} from '@
|
|
3
|
+
import {fs_exists, fs_search} from '@fuzdev/fuz_util/fs.js';
|
|
4
|
+
import {strip_start} from '@fuzdev/fuz_util/string.js';
|
|
5
5
|
import {z} from 'zod';
|
|
6
|
-
import type {Flavored} from '@
|
|
7
|
-
import type {PathInfo, PathId, ResolvedPath} from '@
|
|
6
|
+
import type {Flavored} from '@fuzdev/fuz_util/types.js';
|
|
7
|
+
import type {PathInfo, PathId, ResolvedPath} from '@fuzdev/fuz_util/path.js';
|
|
8
8
|
|
|
9
9
|
import {GRO_PACKAGE_DIR, GRO_DIST_DIR} from './paths.ts';
|
|
10
10
|
import {TASK_FILE_SUFFIX_JS} from './task.ts';
|
package/src/lib/invoke.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {attach_process_error_handlers} from '@
|
|
2
|
-
import {configure_print_colors} from '@
|
|
1
|
+
import {attach_process_error_handlers} from '@fuzdev/fuz_util/process.js';
|
|
2
|
+
import {configure_print_colors} from '@fuzdev/fuz_util/print.js';
|
|
3
3
|
|
|
4
4
|
import {invoke_task} from './invoke_task.ts';
|
|
5
5
|
import {to_task_args} from './args.ts';
|