@ryanatkn/gro 0.160.0 → 0.161.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/args.d.ts +1 -1
- package/dist/args.d.ts.map +1 -1
- package/dist/build.task.d.ts +1 -11
- package/dist/build.task.d.ts.map +1 -1
- package/dist/build.task.js +7 -8
- package/dist/changeset.task.d.ts +6 -25
- package/dist/changeset.task.d.ts.map +1 -1
- package/dist/changeset.task.js +13 -12
- package/dist/changeset_helpers.d.ts +10 -2
- package/dist/changeset_helpers.d.ts.map +1 -1
- package/dist/check.task.d.ts +1 -37
- package/dist/check.task.d.ts.map +1 -1
- package/dist/check.task.js +24 -21
- package/dist/clean.task.d.ts +1 -15
- package/dist/clean.task.d.ts.map +1 -1
- package/dist/clean.task.js +9 -9
- package/dist/commit.task.d.ts +2 -8
- package/dist/commit.task.d.ts.map +1 -1
- package/dist/commit.task.js +4 -5
- package/dist/deploy.task.d.ts +1 -25
- package/dist/deploy.task.d.ts.map +1 -1
- package/dist/deploy.task.js +15 -12
- package/dist/dev.task.d.ts +1 -15
- package/dist/dev.task.d.ts.map +1 -1
- package/dist/dev.task.js +10 -10
- package/dist/filer.d.ts +1 -1
- package/dist/filer.d.ts.map +1 -1
- package/dist/format.task.d.ts +1 -5
- package/dist/format.task.d.ts.map +1 -1
- package/dist/format.task.js +4 -5
- package/dist/gen.d.ts +0 -9
- package/dist/gen.d.ts.map +1 -1
- package/dist/gen.js +0 -4
- package/dist/gen.task.d.ts +3 -11
- package/dist/gen.task.d.ts.map +1 -1
- package/dist/gen.task.js +10 -7
- package/dist/github.d.ts +2 -22
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +2 -2
- package/dist/lint.task.d.ts +2 -8
- package/dist/lint.task.d.ts.map +1 -1
- package/dist/lint.task.js +4 -6
- package/dist/package.d.ts +4 -1212
- package/dist/package.d.ts.map +1 -1
- package/dist/package.gen.d.ts.map +1 -1
- package/dist/package.gen.js +5 -5
- package/dist/package.js +19 -44
- package/dist/package_json.d.ts +1 -361
- package/dist/package_json.d.ts.map +1 -1
- package/dist/package_json.js +2 -114
- package/dist/parse_exports.d.ts +2 -2
- package/dist/parse_exports.d.ts.map +1 -1
- package/dist/parse_exports_context.d.ts.map +1 -1
- package/dist/publish.task.d.ts +1 -29
- package/dist/publish.task.d.ts.map +1 -1
- package/dist/publish.task.js +22 -15
- package/dist/reinstall.task.d.ts +1 -1
- package/dist/reinstall.task.d.ts.map +1 -1
- package/dist/reinstall.task.js +2 -1
- package/dist/release.task.d.ts +1 -1
- package/dist/release.task.d.ts.map +1 -1
- package/dist/release.task.js +1 -1
- package/dist/resolve.task.d.ts +2 -8
- package/dist/resolve.task.d.ts.map +1 -1
- package/dist/resolve.task.js +4 -6
- package/dist/run.task.d.ts +2 -6
- package/dist/run.task.d.ts.map +1 -1
- package/dist/run.task.js +7 -5
- package/dist/run_task.d.ts.map +1 -1
- package/dist/run_task.js +2 -2
- package/dist/src_json.d.ts +2 -288
- package/dist/src_json.d.ts.map +1 -1
- package/dist/src_json.js +2 -45
- package/dist/sveltekit_helpers.d.ts +1 -1
- package/dist/sveltekit_helpers.d.ts.map +1 -1
- package/dist/sveltekit_helpers.js +1 -1
- package/dist/sveltekit_shim_app_paths.d.ts +4 -1
- package/dist/sveltekit_shim_app_paths.d.ts.map +1 -1
- package/dist/sveltekit_shim_app_paths.js +4 -1
- package/dist/sync.task.d.ts +1 -19
- package/dist/sync.task.d.ts.map +1 -1
- package/dist/sync.task.js +10 -12
- package/dist/task.d.ts +2 -2
- package/dist/task.d.ts.map +1 -1
- package/dist/task_logging.js +114 -47
- package/dist/test.task.d.ts +3 -13
- package/dist/test.task.d.ts.map +1 -1
- package/dist/test.task.js +8 -8
- package/dist/typecheck.task.d.ts +1 -11
- package/dist/typecheck.task.d.ts.map +1 -1
- package/dist/typecheck.task.js +10 -9
- package/dist/upgrade.task.d.ts +3 -27
- package/dist/upgrade.task.d.ts.map +1 -1
- package/dist/upgrade.task.js +20 -14
- package/package.json +19 -23
- package/src/lib/args.ts +5 -5
- package/src/lib/build.task.ts +9 -10
- package/src/lib/changeset.task.ts +27 -26
- package/src/lib/changeset_helpers.ts +1 -0
- package/src/lib/check.task.ts +28 -25
- package/src/lib/clean.task.ts +17 -17
- package/src/lib/commit.task.ts +9 -10
- package/src/lib/deploy.task.ts +32 -31
- package/src/lib/dev.task.ts +16 -17
- package/src/lib/filer.ts +1 -1
- package/src/lib/format.task.ts +6 -7
- package/src/lib/gen.task.ts +14 -11
- package/src/lib/gen.ts +0 -6
- package/src/lib/github.ts +2 -2
- package/src/lib/lint.task.ts +4 -6
- package/src/lib/package.gen.ts +7 -6
- package/src/lib/package.ts +25 -50
- package/src/lib/package_json.ts +3 -140
- package/src/lib/parse_exports.ts +2 -10
- package/src/lib/parse_exports_context.ts +9 -5
- package/src/lib/publish.task.ts +33 -26
- package/src/lib/reinstall.task.ts +2 -1
- package/src/lib/release.task.ts +1 -1
- package/src/lib/resolve.task.ts +4 -6
- package/src/lib/run.task.ts +10 -7
- package/src/lib/run_task.ts +4 -2
- package/src/lib/src_json.ts +3 -59
- package/src/lib/sveltekit_helpers.ts +2 -1
- package/src/lib/sveltekit_shim_app_paths.ts +5 -2
- package/src/lib/sveltekit_shim_app_state.ts +1 -1
- package/src/lib/sync.task.ts +10 -12
- package/src/lib/task.ts +2 -2
- package/src/lib/task_logging.ts +127 -49
- package/src/lib/test.task.ts +12 -12
- package/src/lib/typecheck.task.ts +16 -15
- package/src/lib/upgrade.task.ts +34 -28
- package/dist/package_meta.d.ts +0 -23
- package/dist/package_meta.d.ts.map +0 -1
- package/dist/package_meta.js +0 -56
- package/src/lib/package_meta.ts +0 -97
package/src/lib/check.task.ts
CHANGED
|
@@ -6,31 +6,34 @@ import {Task_Error, type Task} from './task.ts';
|
|
|
6
6
|
import {git_check_clean_workspace} from './git.ts';
|
|
7
7
|
import {sync_package_json} from './package_json.ts';
|
|
8
8
|
|
|
9
|
-
export const Args = z
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
9
|
+
export const Args = z.strictObject({
|
|
10
|
+
typecheck: z.boolean().meta({description: 'dual of no-typecheck'}).default(true),
|
|
11
|
+
'no-typecheck': z.boolean().meta({description: 'opt out of typechecking'}).default(false),
|
|
12
|
+
test: z.boolean().meta({description: 'dual of no-test'}).default(true),
|
|
13
|
+
'no-test': z.boolean().meta({description: 'opt out of running tests'}).default(false),
|
|
14
|
+
gen: z.boolean().meta({description: 'dual of no-gen'}).default(true),
|
|
15
|
+
'no-gen': z.boolean().meta({description: 'opt out of gen check'}).default(false),
|
|
16
|
+
format: z.boolean().meta({description: 'dual of no-format'}).default(true),
|
|
17
|
+
'no-format': z.boolean().meta({description: 'opt out of format check'}).default(false),
|
|
18
|
+
package_json: z.boolean().meta({description: 'dual of no-package_json'}).default(true),
|
|
19
|
+
'no-package_json': z
|
|
20
|
+
.boolean()
|
|
21
|
+
.meta({description: 'opt out of package.json check'})
|
|
22
|
+
.default(false),
|
|
23
|
+
lint: z.boolean().meta({description: 'dual of no-lint'}).default(true),
|
|
24
|
+
'no-lint': z.boolean().meta({description: 'opt out of linting'}).default(false),
|
|
25
|
+
sync: z.boolean().meta({description: 'dual of no-sync'}).default(true),
|
|
26
|
+
'no-sync': z.boolean().meta({description: 'opt out of syncing'}).default(false),
|
|
27
|
+
install: z.boolean().meta({description: 'dual of no-install'}).default(true),
|
|
28
|
+
'no-install': z
|
|
29
|
+
.boolean()
|
|
30
|
+
.meta({description: 'opt out of installing packages when syncing'})
|
|
31
|
+
.default(false), // convenience, same as `gro check -- gro sync --no-install` but the latter takes precedence
|
|
32
|
+
workspace: z
|
|
33
|
+
.boolean()
|
|
34
|
+
.meta({description: 'ensure a clean git workspace, useful for CI, also implies --no-sync'})
|
|
35
|
+
.default(false),
|
|
36
|
+
});
|
|
34
37
|
export type Args = z.infer<typeof Args>;
|
|
35
38
|
|
|
36
39
|
export const task: Task<Args> = {
|
package/src/lib/clean.task.ts
CHANGED
|
@@ -5,23 +5,23 @@ import type {Task} from './task.ts';
|
|
|
5
5
|
import {clean_fs} from './clean_fs.ts';
|
|
6
6
|
import {Git_Origin} from './git.ts';
|
|
7
7
|
|
|
8
|
-
export const Args = z
|
|
9
|
-
.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
export const Args = z.strictObject({
|
|
9
|
+
build_dev: z.boolean().meta({description: 'delete the Gro build dev directory'}).default(false),
|
|
10
|
+
build_dist: z.boolean().meta({description: 'delete the Gro build dist directory'}).default(false),
|
|
11
|
+
sveltekit: z
|
|
12
|
+
.boolean()
|
|
13
|
+
.meta({description: 'delete the SvelteKit directory and Vite cache'})
|
|
14
|
+
.default(false),
|
|
15
|
+
nodemodules: z.boolean().meta({description: 'delete the node_modules directory'}).default(false),
|
|
16
|
+
git: z
|
|
17
|
+
.boolean()
|
|
18
|
+
.meta({
|
|
19
|
+
description:
|
|
20
|
+
'run "git remote prune" to delete local branches referencing nonexistent remote branches',
|
|
21
|
+
})
|
|
22
|
+
.default(false),
|
|
23
|
+
git_origin: Git_Origin.describe('the origin to "git remote prune"').default('origin'),
|
|
24
|
+
});
|
|
25
25
|
export type Args = z.infer<typeof Args>;
|
|
26
26
|
|
|
27
27
|
export const task: Task<Args> = {
|
package/src/lib/commit.task.ts
CHANGED
|
@@ -4,16 +4,15 @@ import {z} from 'zod';
|
|
|
4
4
|
import type {Task} from './task.ts';
|
|
5
5
|
import {Git_Origin, git_current_branch_name, git_push} from './git.ts';
|
|
6
6
|
|
|
7
|
-
export const Args = z
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.strict();
|
|
7
|
+
export const Args = z.strictObject({
|
|
8
|
+
_: z
|
|
9
|
+
.array(z.string())
|
|
10
|
+
.meta({
|
|
11
|
+
description: 'the git commit message, the same as git commit -m or --message',
|
|
12
|
+
})
|
|
13
|
+
.default([]),
|
|
14
|
+
origin: Git_Origin.describe('git origin to commit to').default('origin'),
|
|
15
|
+
});
|
|
17
16
|
export type Args = z.infer<typeof Args>;
|
|
18
17
|
|
|
19
18
|
export const task: Task<Args> = {
|
package/src/lib/deploy.task.ts
CHANGED
|
@@ -40,37 +40,38 @@ const SOURCE_BRANCH = 'main';
|
|
|
40
40
|
const TARGET_BRANCH = 'deploy';
|
|
41
41
|
const DANGEROUS_BRANCHES = [SOURCE_BRANCH, 'master'];
|
|
42
42
|
|
|
43
|
-
export const Args = z
|
|
44
|
-
.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
-
.
|
|
43
|
+
export const Args = z.strictObject({
|
|
44
|
+
source: Git_Branch.describe('git source branch to build and deploy from').default(SOURCE_BRANCH),
|
|
45
|
+
target: Git_Branch.describe('git target branch to deploy to').default(TARGET_BRANCH),
|
|
46
|
+
origin: Git_Origin.describe('git origin to deploy to').default('origin'),
|
|
47
|
+
deploy_dir: z.string().meta({description: 'the deploy output directory'}).default(DEPLOY_DIR),
|
|
48
|
+
build_dir: z
|
|
49
|
+
.string()
|
|
50
|
+
.meta({description: 'the SvelteKit build directory'})
|
|
51
|
+
.default(SVELTEKIT_BUILD_DIRNAME),
|
|
52
|
+
dry: z
|
|
53
|
+
.boolean()
|
|
54
|
+
.meta({
|
|
55
|
+
description: 'build and prepare to deploy without actually deploying',
|
|
56
|
+
})
|
|
57
|
+
.default(false),
|
|
58
|
+
force: z
|
|
59
|
+
.boolean()
|
|
60
|
+
.meta({description: 'caution!! destroys the target branch both locally and remotely'})
|
|
61
|
+
.default(false),
|
|
62
|
+
dangerous: z
|
|
63
|
+
.boolean()
|
|
64
|
+
.meta({description: 'caution!! enables destruction of branches like main and master'})
|
|
65
|
+
.default(false),
|
|
66
|
+
reset: z
|
|
67
|
+
.boolean()
|
|
68
|
+
.meta({
|
|
69
|
+
description: 'if true, resets the target branch back to the first commit before deploying',
|
|
70
|
+
})
|
|
71
|
+
.default(false),
|
|
72
|
+
build: z.boolean().meta({description: 'dual of no-build'}).default(true),
|
|
73
|
+
'no-build': z.boolean().meta({description: 'opt out of building'}).default(false),
|
|
74
|
+
});
|
|
74
75
|
export type Args = z.infer<typeof Args>;
|
|
75
76
|
|
|
76
77
|
export const task: Task<Args> = {
|
package/src/lib/dev.task.ts
CHANGED
|
@@ -4,23 +4,22 @@ import type {Task} from './task.ts';
|
|
|
4
4
|
import {Plugins, type Plugin_Context} from './plugin.ts';
|
|
5
5
|
import {clean_fs} from './clean_fs.ts';
|
|
6
6
|
|
|
7
|
-
export const Args = z
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.strict();
|
|
7
|
+
export const Args = z.strictObject({
|
|
8
|
+
watch: z.boolean().meta({description: 'dual of no-watch'}).default(true),
|
|
9
|
+
'no-watch': z
|
|
10
|
+
.boolean()
|
|
11
|
+
.meta({
|
|
12
|
+
description: 'opt out of running a long-lived process to watch files and rebuild on changes',
|
|
13
|
+
})
|
|
14
|
+
.default(false),
|
|
15
|
+
sync: z.boolean().meta({description: 'dual of no-sync'}).default(true),
|
|
16
|
+
'no-sync': z.boolean().meta({description: 'opt out of gro sync'}).default(false),
|
|
17
|
+
install: z.boolean().meta({description: 'dual of no-install'}).default(true),
|
|
18
|
+
'no-install': z // convenience, same as `gro dev -- gro sync --no-install` but the latter takes precedence
|
|
19
|
+
.boolean()
|
|
20
|
+
.meta({description: 'opt out of installing packages before starting the dev server'})
|
|
21
|
+
.default(false),
|
|
22
|
+
});
|
|
24
23
|
export type Args = z.infer<typeof Args>;
|
|
25
24
|
|
|
26
25
|
export type DevTask_Context = Plugin_Context<Args>;
|
package/src/lib/filer.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {isBuiltin} from 'node:module';
|
|
|
7
7
|
import {fileURLToPath, pathToFileURL} from 'node:url';
|
|
8
8
|
import {Unreachable_Error} from '@ryanatkn/belt/error.js';
|
|
9
9
|
import type {Logger} from '@ryanatkn/belt/log.js';
|
|
10
|
+
import type {Package_Json} from '@ryanatkn/belt/package_json.js';
|
|
10
11
|
|
|
11
12
|
import type {File_Filter, Path_Id} from './path.ts';
|
|
12
13
|
import {
|
|
@@ -21,7 +22,6 @@ import {parse_imports} from './parse_imports.ts';
|
|
|
21
22
|
import {resolve_specifier} from './resolve_specifier.ts';
|
|
22
23
|
import {default_svelte_config} from './svelte_config.ts';
|
|
23
24
|
import {map_sveltekit_aliases, SVELTEKIT_GLOBAL_SPECIFIER} from './sveltekit_helpers.ts';
|
|
24
|
-
import type {Package_Json} from './package_json.ts';
|
|
25
25
|
|
|
26
26
|
const aliases = Object.entries(default_svelte_config.alias);
|
|
27
27
|
|
package/src/lib/format.task.ts
CHANGED
|
@@ -5,13 +5,12 @@ import {Task_Error, type Task} from './task.ts';
|
|
|
5
5
|
import {format_directory} from './format_directory.ts';
|
|
6
6
|
import {paths} from './paths.ts';
|
|
7
7
|
|
|
8
|
-
export const Args = z
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.strict();
|
|
8
|
+
export const Args = z.strictObject({
|
|
9
|
+
check: z
|
|
10
|
+
.boolean()
|
|
11
|
+
.meta({description: 'exit with a nonzero code if any files are unformatted'})
|
|
12
|
+
.default(false),
|
|
13
|
+
});
|
|
15
14
|
export type Args = z.infer<typeof Args>;
|
|
16
15
|
|
|
17
16
|
export const task: Task<Args> = {
|
package/src/lib/gen.task.ts
CHANGED
|
@@ -12,17 +12,20 @@ import {log_error_reasons} from './task_logging.ts';
|
|
|
12
12
|
import {write_gen_results, analyze_gen_results, find_genfiles, load_genfiles} from './gen.ts';
|
|
13
13
|
import {SOURCE_DIRNAME} from './constants.ts';
|
|
14
14
|
|
|
15
|
-
export const Args = z
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
export const Args = z.strictObject({
|
|
16
|
+
_: z
|
|
17
|
+
.array(Raw_Input_Path)
|
|
18
|
+
.meta({description: 'input paths to generate'})
|
|
19
|
+
.default([SOURCE_DIRNAME]),
|
|
20
|
+
root_dirs: z
|
|
21
|
+
.array(z.string())
|
|
22
|
+
.meta({description: 'root directories to resolve input paths against'}) // TODO `Path_Id` schema
|
|
23
|
+
.default([process.cwd()]),
|
|
24
|
+
check: z
|
|
25
|
+
.boolean()
|
|
26
|
+
.meta({description: 'exit with a nonzero code if any files need to be generated'})
|
|
27
|
+
.default(false),
|
|
28
|
+
});
|
|
26
29
|
export type Args = z.infer<typeof Args>;
|
|
27
30
|
|
|
28
31
|
// TODO test - especially making sure nothing gets genned
|
package/src/lib/gen.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type {Logger} from '@ryanatkn/belt/log.js';
|
|
2
2
|
import {join, basename, dirname, isAbsolute} from 'node:path';
|
|
3
3
|
import {mkdir, readFile, writeFile} from 'node:fs/promises';
|
|
4
|
-
import {z} from 'zod';
|
|
5
4
|
import type {Result} from '@ryanatkn/belt/result.js';
|
|
6
5
|
import type {Timings} from '@ryanatkn/belt/timings.js';
|
|
7
6
|
import {styleText as st} from 'node:util';
|
|
@@ -61,11 +60,6 @@ export interface Raw_Gen_File {
|
|
|
61
60
|
format?: boolean; // defaults to `true`
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
export const Gen_Config = z.object({
|
|
65
|
-
imports: z.record(z.string(), z.string()).default({}),
|
|
66
|
-
});
|
|
67
|
-
export type Gen_Config = z.infer<typeof Gen_Config>;
|
|
68
|
-
|
|
69
63
|
export interface Gen_Results {
|
|
70
64
|
results: Array<Genfile_Module_Result>;
|
|
71
65
|
successes: Array<Genfile_Module_Result_Success>;
|
package/src/lib/github.ts
CHANGED
|
@@ -8,12 +8,12 @@ import {z} from 'zod';
|
|
|
8
8
|
|
|
9
9
|
export const GITHUB_REPO_MATCHER = /.+github.com\/(.+)\/(.+)/;
|
|
10
10
|
|
|
11
|
-
export const Github_Pull_Request = z.
|
|
11
|
+
export const Github_Pull_Request = z.looseObject({
|
|
12
12
|
url: z.string(),
|
|
13
13
|
id: z.number(),
|
|
14
14
|
html_url: z.string(),
|
|
15
15
|
number: z.number(),
|
|
16
|
-
user: z.
|
|
16
|
+
user: z.looseObject({
|
|
17
17
|
login: z.string(),
|
|
18
18
|
}),
|
|
19
19
|
});
|
package/src/lib/lint.task.ts
CHANGED
|
@@ -7,12 +7,10 @@ import {find_cli, spawn_cli} from './cli.ts';
|
|
|
7
7
|
|
|
8
8
|
const ESLINT_CLI = 'eslint';
|
|
9
9
|
|
|
10
|
-
export const Args = z
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
15
|
-
.strict();
|
|
10
|
+
export const Args = z.strictObject({
|
|
11
|
+
_: z.array(z.string()).meta({description: 'paths to serve'}).default([]),
|
|
12
|
+
eslint_cli: z.string().meta({description: 'the ESLint CLI to use'}).default(ESLINT_CLI),
|
|
13
|
+
});
|
|
16
14
|
export type Args = z.infer<typeof Args>;
|
|
17
15
|
|
|
18
16
|
export const task: Task<Args> = {
|
package/src/lib/package.gen.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {Gen} from './gen.ts';
|
|
2
1
|
import {load_package_json} from './package_json.ts';
|
|
3
|
-
import {IS_THIS_GRO} from './paths.ts';
|
|
4
2
|
import {create_src_json} from './src_json.ts';
|
|
3
|
+
import type {Gen} from './gen.ts';
|
|
5
4
|
|
|
6
5
|
// TODO rename? `Package_Json + Src_Json = package.ts` currently, idk
|
|
7
6
|
|
|
@@ -16,17 +15,19 @@ export const gen: Gen = ({origin_path}) => {
|
|
|
16
15
|
const package_json = load_package_json();
|
|
17
16
|
const src_json = create_src_json(package_json, undefined);
|
|
18
17
|
|
|
18
|
+
const is_this_belt = package_json.name === '@ryanatkn/belt'; // TODO more robust?
|
|
19
|
+
|
|
19
20
|
return `
|
|
20
21
|
// generated by ${origin_path}
|
|
21
22
|
|
|
22
23
|
import type {Package_Json} from '${
|
|
23
|
-
|
|
24
|
+
is_this_belt ? '$lib/package_json.js' : '@ryanatkn/belt/package_json.js'
|
|
24
25
|
}';
|
|
25
|
-
import type {Src_Json} from '${
|
|
26
|
+
import type {Src_Json} from '${is_this_belt ? './src_json.js' : '@ryanatkn/belt/src_json.js'}';
|
|
26
27
|
|
|
27
|
-
export const package_json = ${JSON.stringify(package_json)}
|
|
28
|
+
export const package_json: Package_Json = ${JSON.stringify(package_json)} as any;
|
|
28
29
|
|
|
29
|
-
export const src_json = ${JSON.stringify(src_json)}
|
|
30
|
+
export const src_json: Src_Json = ${JSON.stringify(src_json)} as any;
|
|
30
31
|
|
|
31
32
|
// generated by ${origin_path}
|
|
32
33
|
`;
|
package/src/lib/package.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// generated by src/lib/package.gen.ts
|
|
2
2
|
|
|
3
|
-
import type {Package_Json} from '
|
|
4
|
-
import type {Src_Json} from '
|
|
3
|
+
import type {Package_Json} from '@ryanatkn/belt/package_json.js';
|
|
4
|
+
import type {Src_Json} from '@ryanatkn/belt/src_json.js';
|
|
5
5
|
|
|
6
|
-
export const package_json = {
|
|
6
|
+
export const package_json: Package_Json = {
|
|
7
7
|
name: '@ryanatkn/gro',
|
|
8
|
-
version: '0.
|
|
8
|
+
version: '0.161.1',
|
|
9
9
|
description: 'task runner and toolkit extending SvelteKit',
|
|
10
10
|
motto: 'generate, run, optimize',
|
|
11
11
|
glyph: '🌰',
|
|
@@ -44,40 +44,40 @@ export const package_json = {
|
|
|
44
44
|
'typescript',
|
|
45
45
|
],
|
|
46
46
|
dependencies: {
|
|
47
|
-
'@ryanatkn/belt': '^0.
|
|
47
|
+
'@ryanatkn/belt': '^0.33.0',
|
|
48
48
|
chokidar: '^4.0.3',
|
|
49
|
-
dotenv: '^17.
|
|
49
|
+
dotenv: '^17.2.1',
|
|
50
50
|
'esm-env': '^1.2.2',
|
|
51
51
|
mri: '^1.2.0',
|
|
52
|
-
'oxc-parser': '^0.
|
|
52
|
+
'oxc-parser': '^0.79.1',
|
|
53
53
|
prettier: '^3.6.2',
|
|
54
54
|
'prettier-plugin-svelte': '^3.4.0',
|
|
55
55
|
'ts-blank-space': '^0.6.1',
|
|
56
56
|
tslib: '^2.8.1',
|
|
57
|
-
zod: '^
|
|
57
|
+
zod: '^4.0.14',
|
|
58
58
|
},
|
|
59
59
|
peerDependencies: {esbuild: '^0.25', svelte: '^5', typescript: '^5'},
|
|
60
|
+
optionalDependencies: {'@ryanatkn/moss': '>=0.31.0'},
|
|
60
61
|
devDependencies: {
|
|
61
62
|
'@changesets/changelog-git': '^0.2.1',
|
|
62
63
|
'@changesets/types': '^6.1.0',
|
|
63
64
|
'@ryanatkn/eslint-config': '^0.8.0',
|
|
64
|
-
'@ryanatkn/fuz': '^0.
|
|
65
|
-
'@ryanatkn/moss': '^0.
|
|
65
|
+
'@ryanatkn/fuz': '^0.145.0',
|
|
66
|
+
'@ryanatkn/moss': '^0.32.0',
|
|
66
67
|
'@sveltejs/adapter-static': '^3.0.8',
|
|
67
|
-
'@sveltejs/kit': '^2.
|
|
68
|
-
'@sveltejs/package': '^2.
|
|
69
|
-
'@sveltejs/vite-plugin-svelte': '^
|
|
70
|
-
'@types/node': '^24.0
|
|
68
|
+
'@sveltejs/kit': '^2.27.0',
|
|
69
|
+
'@sveltejs/package': '^2.4.0',
|
|
70
|
+
'@sveltejs/vite-plugin-svelte': '^6.1.0',
|
|
71
|
+
'@types/node': '^24.1.0',
|
|
71
72
|
esbuild: '^0.25.5',
|
|
72
|
-
eslint: '^9.
|
|
73
|
-
'eslint-plugin-svelte': '^3.
|
|
74
|
-
svelte: '^5.
|
|
75
|
-
'svelte-check': '^4.
|
|
73
|
+
eslint: '^9.32.0',
|
|
74
|
+
'eslint-plugin-svelte': '^3.11.0',
|
|
75
|
+
svelte: '^5.37.2',
|
|
76
|
+
'svelte-check': '^4.3.0',
|
|
76
77
|
typescript: '^5.8.3',
|
|
77
|
-
'typescript-eslint': '^8.
|
|
78
|
+
'typescript-eslint': '^8.38.0',
|
|
78
79
|
uvu: '^0.5.6',
|
|
79
80
|
},
|
|
80
|
-
optionalDependencies: {'@ryanatkn/moss': '>=0.27.0'},
|
|
81
81
|
prettier: {
|
|
82
82
|
plugins: ['prettier-plugin-svelte'],
|
|
83
83
|
useTabs: true,
|
|
@@ -187,7 +187,6 @@ export const package_json = {
|
|
|
187
187
|
'./module.js': {types: './dist/module.d.ts', default: './dist/module.js'},
|
|
188
188
|
'./modules.js': {types: './dist/modules.d.ts', default: './dist/modules.js'},
|
|
189
189
|
'./package_json.js': {types: './dist/package_json.d.ts', default: './dist/package_json.js'},
|
|
190
|
-
'./package_meta.js': {types: './dist/package_meta.d.ts', default: './dist/package_meta.js'},
|
|
191
190
|
'./package.gen.js': {types: './dist/package.gen.d.ts', default: './dist/package.gen.js'},
|
|
192
191
|
'./package.js': {types: './dist/package.d.ts', default: './dist/package.js'},
|
|
193
192
|
'./parse_exports_context.js': {
|
|
@@ -261,11 +260,11 @@ export const package_json = {
|
|
|
261
260
|
'./upgrade.task.js': {types: './dist/upgrade.task.d.ts', default: './dist/upgrade.task.js'},
|
|
262
261
|
'./watch_dir.js': {types: './dist/watch_dir.d.ts', default: './dist/watch_dir.js'},
|
|
263
262
|
},
|
|
264
|
-
}
|
|
263
|
+
} as any;
|
|
265
264
|
|
|
266
|
-
export const src_json = {
|
|
265
|
+
export const src_json: Src_Json = {
|
|
267
266
|
name: '@ryanatkn/gro',
|
|
268
|
-
version: '0.
|
|
267
|
+
version: '0.161.1',
|
|
269
268
|
modules: {
|
|
270
269
|
'.': {
|
|
271
270
|
path: 'index.ts',
|
|
@@ -521,7 +520,6 @@ export const src_json = {
|
|
|
521
520
|
{name: 'Gen_Context', kind: 'type'},
|
|
522
521
|
{name: 'Raw_Gen_Result', kind: 'type'},
|
|
523
522
|
{name: 'Raw_Gen_File', kind: 'type'},
|
|
524
|
-
{name: 'Gen_Config', kind: 'variable'},
|
|
525
523
|
{name: 'Gen_Results', kind: 'type'},
|
|
526
524
|
{name: 'Genfile_Module_Result', kind: 'type'},
|
|
527
525
|
{name: 'Genfile_Module_Result_Success', kind: 'type'},
|
|
@@ -699,15 +697,6 @@ export const src_json = {
|
|
|
699
697
|
'./package_json.js': {
|
|
700
698
|
path: 'package_json.ts',
|
|
701
699
|
declarations: [
|
|
702
|
-
{name: 'Url', kind: 'variable'},
|
|
703
|
-
{name: 'Email', kind: 'variable'},
|
|
704
|
-
{name: 'transform_empty_object_to_undefined', kind: 'function'},
|
|
705
|
-
{name: 'Package_Json_Repository', kind: 'variable'},
|
|
706
|
-
{name: 'Package_Json_Author', kind: 'variable'},
|
|
707
|
-
{name: 'Package_Json_Funding', kind: 'variable'},
|
|
708
|
-
{name: 'Export_Value', kind: 'variable'},
|
|
709
|
-
{name: 'Package_Json_Exports', kind: 'variable'},
|
|
710
|
-
{name: 'Package_Json', kind: 'variable'},
|
|
711
700
|
{name: 'Map_Package_Json', kind: 'type'},
|
|
712
701
|
{name: 'EMPTY_PACKAGE_JSON', kind: 'variable'},
|
|
713
702
|
{name: 'load_package_json', kind: 'function'},
|
|
@@ -723,15 +712,6 @@ export const src_json = {
|
|
|
723
712
|
{name: 'extract_deps', kind: 'function'},
|
|
724
713
|
],
|
|
725
714
|
},
|
|
726
|
-
'./package_meta.js': {
|
|
727
|
-
path: 'package_meta.ts',
|
|
728
|
-
declarations: [
|
|
729
|
-
{name: 'Package_Meta', kind: 'type'},
|
|
730
|
-
{name: 'parse_package_meta', kind: 'function'},
|
|
731
|
-
{name: 'parse_repo_name', kind: 'function'},
|
|
732
|
-
{name: 'parse_org_url', kind: 'function'},
|
|
733
|
-
],
|
|
734
|
-
},
|
|
735
715
|
'./package.gen.js': {path: 'package.gen.ts', declarations: [{name: 'gen', kind: 'function'}]},
|
|
736
716
|
'./package.js': {
|
|
737
717
|
path: 'package.ts',
|
|
@@ -747,7 +727,6 @@ export const src_json = {
|
|
|
747
727
|
'./parse_exports.js': {
|
|
748
728
|
path: 'parse_exports.ts',
|
|
749
729
|
declarations: [
|
|
750
|
-
{name: 'Declaration_Kind', kind: 'type'},
|
|
751
730
|
{name: 'Declaration', kind: 'type'},
|
|
752
731
|
{name: 'Export_Declaration', kind: 'type'},
|
|
753
732
|
{name: 'parse_exports', kind: 'function'},
|
|
@@ -874,11 +853,6 @@ export const src_json = {
|
|
|
874
853
|
'./src_json.js': {
|
|
875
854
|
path: 'src_json.ts',
|
|
876
855
|
declarations: [
|
|
877
|
-
{name: 'Src_Module_Declaration_Kind', kind: 'variable'},
|
|
878
|
-
{name: 'Src_Module_Declaration', kind: 'variable'},
|
|
879
|
-
{name: 'Src_Module', kind: 'variable'},
|
|
880
|
-
{name: 'Src_Modules', kind: 'variable'},
|
|
881
|
-
{name: 'Src_Json', kind: 'variable'},
|
|
882
856
|
{name: 'Map_Src_Json', kind: 'type'},
|
|
883
857
|
{name: 'create_src_json', kind: 'function'},
|
|
884
858
|
{name: 'serialize_src_json', kind: 'function'},
|
|
@@ -950,6 +924,7 @@ export const src_json = {
|
|
|
950
924
|
declarations: [
|
|
951
925
|
{name: 'assets', kind: 'variable'},
|
|
952
926
|
{name: 'base', kind: 'variable'},
|
|
927
|
+
{name: 'resolve', kind: 'function'},
|
|
953
928
|
{name: 'resolveRoute', kind: 'function'},
|
|
954
929
|
],
|
|
955
930
|
},
|
|
@@ -1058,6 +1033,6 @@ export const src_json = {
|
|
|
1058
1033
|
],
|
|
1059
1034
|
},
|
|
1060
1035
|
},
|
|
1061
|
-
}
|
|
1036
|
+
} as any;
|
|
1062
1037
|
|
|
1063
1038
|
// generated by src/lib/package.gen.ts
|