@ryanatkn/gro 0.159.0 → 0.161.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.
Files changed (137) hide show
  1. package/README.md +4 -3
  2. package/dist/args.d.ts +1 -1
  3. package/dist/args.d.ts.map +1 -1
  4. package/dist/build.task.d.ts +1 -11
  5. package/dist/build.task.d.ts.map +1 -1
  6. package/dist/build.task.js +7 -8
  7. package/dist/changeset.task.d.ts +6 -25
  8. package/dist/changeset.task.d.ts.map +1 -1
  9. package/dist/changeset.task.js +13 -12
  10. package/dist/changeset_helpers.d.ts +10 -2
  11. package/dist/changeset_helpers.d.ts.map +1 -1
  12. package/dist/check.task.d.ts +1 -37
  13. package/dist/check.task.d.ts.map +1 -1
  14. package/dist/check.task.js +24 -21
  15. package/dist/clean.task.d.ts +1 -15
  16. package/dist/clean.task.d.ts.map +1 -1
  17. package/dist/clean.task.js +9 -9
  18. package/dist/commit.task.d.ts +2 -8
  19. package/dist/commit.task.d.ts.map +1 -1
  20. package/dist/commit.task.js +4 -5
  21. package/dist/deploy.task.d.ts +1 -25
  22. package/dist/deploy.task.d.ts.map +1 -1
  23. package/dist/deploy.task.js +15 -12
  24. package/dist/dev.task.d.ts +1 -15
  25. package/dist/dev.task.d.ts.map +1 -1
  26. package/dist/dev.task.js +10 -10
  27. package/dist/filer.d.ts +1 -1
  28. package/dist/filer.d.ts.map +1 -1
  29. package/dist/format.task.d.ts +1 -5
  30. package/dist/format.task.d.ts.map +1 -1
  31. package/dist/format.task.js +4 -5
  32. package/dist/gen.d.ts +0 -9
  33. package/dist/gen.d.ts.map +1 -1
  34. package/dist/gen.js +0 -4
  35. package/dist/gen.task.d.ts +3 -11
  36. package/dist/gen.task.d.ts.map +1 -1
  37. package/dist/gen.task.js +11 -8
  38. package/dist/github.d.ts +2 -22
  39. package/dist/github.d.ts.map +1 -1
  40. package/dist/github.js +2 -2
  41. package/dist/gro.js +0 -0
  42. package/dist/lint.task.d.ts +2 -8
  43. package/dist/lint.task.d.ts.map +1 -1
  44. package/dist/lint.task.js +4 -6
  45. package/dist/package.d.ts +4 -1212
  46. package/dist/package.d.ts.map +1 -1
  47. package/dist/package.gen.d.ts.map +1 -1
  48. package/dist/package.gen.js +5 -5
  49. package/dist/package.js +21 -46
  50. package/dist/package_json.d.ts +1 -361
  51. package/dist/package_json.d.ts.map +1 -1
  52. package/dist/package_json.js +2 -114
  53. package/dist/parse_exports.d.ts +2 -2
  54. package/dist/parse_exports.d.ts.map +1 -1
  55. package/dist/parse_exports_context.d.ts.map +1 -1
  56. package/dist/publish.task.d.ts +1 -29
  57. package/dist/publish.task.d.ts.map +1 -1
  58. package/dist/publish.task.js +22 -15
  59. package/dist/reinstall.task.d.ts +1 -1
  60. package/dist/reinstall.task.d.ts.map +1 -1
  61. package/dist/reinstall.task.js +2 -1
  62. package/dist/release.task.d.ts +1 -1
  63. package/dist/release.task.d.ts.map +1 -1
  64. package/dist/release.task.js +1 -1
  65. package/dist/resolve.task.d.ts +2 -8
  66. package/dist/resolve.task.d.ts.map +1 -1
  67. package/dist/resolve.task.js +4 -6
  68. package/dist/run.task.d.ts +2 -6
  69. package/dist/run.task.d.ts.map +1 -1
  70. package/dist/run.task.js +7 -5
  71. package/dist/run_task.d.ts.map +1 -1
  72. package/dist/run_task.js +2 -2
  73. package/dist/src_json.d.ts +2 -288
  74. package/dist/src_json.d.ts.map +1 -1
  75. package/dist/src_json.js +2 -45
  76. package/dist/sveltekit_helpers.d.ts +1 -1
  77. package/dist/sveltekit_helpers.d.ts.map +1 -1
  78. package/dist/sveltekit_helpers.js +1 -1
  79. package/dist/sveltekit_shim_app_paths.d.ts +4 -1
  80. package/dist/sveltekit_shim_app_paths.d.ts.map +1 -1
  81. package/dist/sveltekit_shim_app_paths.js +4 -1
  82. package/dist/sync.task.d.ts +1 -19
  83. package/dist/sync.task.d.ts.map +1 -1
  84. package/dist/sync.task.js +10 -12
  85. package/dist/task.d.ts +2 -2
  86. package/dist/task.d.ts.map +1 -1
  87. package/dist/task_logging.js +114 -47
  88. package/dist/test.task.d.ts +3 -13
  89. package/dist/test.task.d.ts.map +1 -1
  90. package/dist/test.task.js +8 -8
  91. package/dist/typecheck.task.d.ts +1 -11
  92. package/dist/typecheck.task.d.ts.map +1 -1
  93. package/dist/typecheck.task.js +10 -9
  94. package/dist/upgrade.task.d.ts +3 -27
  95. package/dist/upgrade.task.d.ts.map +1 -1
  96. package/dist/upgrade.task.js +20 -14
  97. package/package.json +21 -25
  98. package/src/lib/args.ts +5 -5
  99. package/src/lib/build.task.ts +9 -10
  100. package/src/lib/changeset.task.ts +27 -26
  101. package/src/lib/changeset_helpers.ts +1 -0
  102. package/src/lib/check.task.ts +28 -25
  103. package/src/lib/clean.task.ts +17 -17
  104. package/src/lib/commit.task.ts +9 -10
  105. package/src/lib/deploy.task.ts +32 -31
  106. package/src/lib/dev.task.ts +16 -17
  107. package/src/lib/filer.ts +1 -1
  108. package/src/lib/format.task.ts +6 -7
  109. package/src/lib/gen.task.ts +19 -12
  110. package/src/lib/gen.ts +0 -6
  111. package/src/lib/github.ts +2 -2
  112. package/src/lib/lint.task.ts +4 -6
  113. package/src/lib/package.gen.ts +7 -6
  114. package/src/lib/package.ts +27 -52
  115. package/src/lib/package_json.ts +3 -140
  116. package/src/lib/parse_exports.ts +2 -10
  117. package/src/lib/parse_exports_context.ts +9 -5
  118. package/src/lib/publish.task.ts +33 -26
  119. package/src/lib/reinstall.task.ts +2 -1
  120. package/src/lib/release.task.ts +1 -1
  121. package/src/lib/resolve.task.ts +4 -6
  122. package/src/lib/run.task.ts +10 -7
  123. package/src/lib/run_task.ts +4 -2
  124. package/src/lib/src_json.ts +3 -59
  125. package/src/lib/sveltekit_helpers.ts +2 -1
  126. package/src/lib/sveltekit_shim_app_paths.ts +5 -2
  127. package/src/lib/sveltekit_shim_app_state.ts +1 -1
  128. package/src/lib/sync.task.ts +10 -12
  129. package/src/lib/task.ts +2 -2
  130. package/src/lib/task_logging.ts +127 -49
  131. package/src/lib/test.task.ts +12 -12
  132. package/src/lib/typecheck.task.ts +16 -15
  133. package/src/lib/upgrade.task.ts +34 -28
  134. package/dist/package_meta.d.ts +0 -23
  135. package/dist/package_meta.d.ts.map +0 -1
  136. package/dist/package_meta.js +0 -56
  137. package/src/lib/package_meta.ts +0 -97
@@ -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
- .object({
11
- typecheck: z.boolean({description: 'dual of no-typecheck'}).default(true),
12
- 'no-typecheck': z.boolean({description: 'opt out of typechecking'}).default(false),
13
- test: z.boolean({description: 'dual of no-test'}).default(true),
14
- 'no-test': z.boolean({description: 'opt out of running tests'}).default(false),
15
- gen: z.boolean({description: 'dual of no-gen'}).default(true),
16
- 'no-gen': z.boolean({description: 'opt out of gen check'}).default(false),
17
- format: z.boolean({description: 'dual of no-format'}).default(true),
18
- 'no-format': z.boolean({description: 'opt out of format check'}).default(false),
19
- package_json: z.boolean({description: 'dual of no-package_json'}).default(true),
20
- 'no-package_json': z.boolean({description: 'opt out of package.json check'}).default(false),
21
- lint: z.boolean({description: 'dual of no-lint'}).default(true),
22
- 'no-lint': z.boolean({description: 'opt out of linting'}).default(false),
23
- sync: z.boolean({description: 'dual of no-sync'}).default(true),
24
- 'no-sync': z.boolean({description: 'opt out of syncing'}).default(false),
25
- install: z.boolean({description: 'dual of no-install'}).default(true),
26
- 'no-install': z
27
- .boolean({description: 'opt out of installing packages when syncing'})
28
- .default(false), // convenience, same as `gro check -- gro sync --no-install` but the latter takes precedence
29
- workspace: z
30
- .boolean({description: 'ensure a clean git workspace, useful for CI, also implies --no-sync'})
31
- .default(false),
32
- })
33
- .strict();
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> = {
@@ -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
- .object({
10
- build_dev: z.boolean({description: 'delete the Gro build dev directory'}).default(false),
11
- build_dist: z.boolean({description: 'delete the Gro build dist directory'}).default(false),
12
- sveltekit: z
13
- .boolean({description: 'delete the SvelteKit directory and Vite cache'})
14
- .default(false),
15
- nodemodules: z.boolean({description: 'delete the node_modules directory'}).default(false),
16
- git: z
17
- .boolean({
18
- description:
19
- 'run "git remote prune" to delete local branches referencing nonexistent remote branches',
20
- })
21
- .default(false),
22
- git_origin: Git_Origin.describe('the origin to "git remote prune"').default('origin'),
23
- })
24
- .strict();
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> = {
@@ -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
- .object({
9
- _: z
10
- .array(z.string(), {
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
- })
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> = {
@@ -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
- .object({
45
- source: Git_Branch.describe('git source branch to build and deploy from').default(
46
- SOURCE_BRANCH,
47
- ),
48
- target: Git_Branch.describe('git target branch to deploy to').default(TARGET_BRANCH),
49
- origin: Git_Origin.describe('git origin to deploy to').default('origin'),
50
- deploy_dir: z.string({description: 'the deploy output directory'}).default(DEPLOY_DIR),
51
- build_dir: z
52
- .string({description: 'the SvelteKit build directory'})
53
- .default(SVELTEKIT_BUILD_DIRNAME),
54
- dry: z
55
- .boolean({
56
- description: 'build and prepare to deploy without actually deploying',
57
- })
58
- .default(false),
59
- force: z
60
- .boolean({description: 'caution!! destroys the target branch both locally and remotely'})
61
- .default(false),
62
- dangerous: z
63
- .boolean({description: 'caution!! enables destruction of branches like main and master'})
64
- .default(false),
65
- reset: z
66
- .boolean({
67
- description: 'if true, resets the target branch back to the first commit before deploying',
68
- })
69
- .default(false),
70
- build: z.boolean({description: 'dual of no-build'}).default(true),
71
- 'no-build': z.boolean({description: 'opt out of building'}).default(false),
72
- })
73
- .strict();
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> = {
@@ -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
- .object({
9
- watch: z.boolean({description: 'dual of no-watch'}).default(true),
10
- 'no-watch': z
11
- .boolean({
12
- description:
13
- 'opt out of running a long-lived process to watch files and rebuild on changes',
14
- })
15
- .default(false),
16
- sync: z.boolean({description: 'dual of no-sync'}).default(true),
17
- 'no-sync': z.boolean({description: 'opt out of gro sync'}).default(false),
18
- install: z.boolean({description: 'dual of no-install'}).default(true),
19
- 'no-install': z // convenience, same as `gro dev -- gro sync --no-install` but the latter takes precedence
20
- .boolean({description: 'opt out of installing packages before starting the dev server'})
21
- .default(false),
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
 
@@ -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
- .object({
10
- check: z
11
- .boolean({description: 'exit with a nonzero code if any files are unformatted'})
12
- .default(false),
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> = {
@@ -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
- .object({
17
- _: z.array(Raw_Input_Path, {description: 'input paths to generate'}).default([SOURCE_DIRNAME]),
18
- root_dirs: z
19
- .array(z.string(), {description: 'root directories to resolve input paths against'}) // TODO `Path_Id` schema
20
- .default([process.cwd()]),
21
- check: z
22
- .boolean({description: 'exit with a nonzero code if any files need to be generated'})
23
- .default(false),
24
- })
25
- .strict();
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
@@ -114,7 +117,11 @@ export const task: Task<Args> = {
114
117
  for (const result of gen_results.results) {
115
118
  log_result += `\n\t${result.ok ? st('green', '✓') : st('red', '🞩')} ${
116
119
  result.ok ? result.files.length : 0
117
- } ${st('gray', 'in')} ${print_ms(result.elapsed)} ${st('gray', '←')} ${print_path(result.id)}`;
120
+ } ${st('gray', 'in')} ${print_ms(result.elapsed)} ${st('gray', '←')} ${print_path(
121
+ result.id,
122
+ )} ${st('gray', '→')} ${
123
+ result.ok ? result.files.map((f) => print_path(f.id)).join(', ') : print_error(result.error)
124
+ }`;
118
125
  }
119
126
  log.info(log_result);
120
127
  log.info(
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.object({
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.object({
16
+ user: z.looseObject({
17
17
  login: z.string(),
18
18
  }),
19
19
  });
@@ -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
- .object({
12
- _: z.array(z.string(), {description: 'paths to serve'}).default([]),
13
- eslint_cli: z.string({description: 'the ESLint CLI to use'}).default(ESLINT_CLI),
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> = {
@@ -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
- IS_THIS_GRO ? './package_json.ts' : '@ryanatkn/gro/package_json.js'
24
+ is_this_belt ? './package_json.js' : '@ryanatkn/belt/package_json.js'
24
25
  }';
25
- import type {Src_Json} from '${IS_THIS_GRO ? './src_json.ts' : '@ryanatkn/gro/src_json.js'}';
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)} satisfies 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)} satisfies 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
  `;
@@ -1,11 +1,11 @@
1
1
  // generated by src/lib/package.gen.ts
2
2
 
3
- import type {Package_Json} from './package_json.ts';
4
- import type {Src_Json} from './src_json.ts';
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.159.0',
8
+ version: '0.160.0',
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.30.2',
47
+ '@ryanatkn/belt': '^0.33.0',
48
48
  chokidar: '^4.0.3',
49
- dotenv: '^16.5.0',
49
+ dotenv: '^17.0.1',
50
50
  'esm-env': '^1.2.2',
51
51
  mri: '^1.2.0',
52
- 'oxc-parser': '^0.68.1',
53
- prettier: '^3.5.3',
54
- 'prettier-plugin-svelte': '^3.3.3',
52
+ 'oxc-parser': '^0.75.1',
53
+ prettier: '^3.6.2',
54
+ 'prettier-plugin-svelte': '^3.4.0',
55
55
  'ts-blank-space': '^0.6.1',
56
56
  tslib: '^2.8.1',
57
- zod: '^3.24.4',
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.144.0',
65
+ '@ryanatkn/fuz': '^0.144.5',
65
66
  '@ryanatkn/moss': '^0.31.0',
66
67
  '@sveltejs/adapter-static': '^3.0.8',
67
- '@sveltejs/kit': '^2.20.8',
68
- '@sveltejs/package': '^2.3.11',
69
- '@sveltejs/vite-plugin-svelte': '^5.0.3',
70
- '@types/node': '^22.15.3',
71
- esbuild: '^0.25.3',
72
- eslint: '9.25.1',
73
- 'eslint-plugin-svelte': '^3.5.1',
74
- svelte: '^5.28.2',
75
- 'svelte-check': '^4.1.7',
68
+ '@sveltejs/kit': '^2.27.0',
69
+ '@sveltejs/package': '^2.3.12',
70
+ '@sveltejs/vite-plugin-svelte': '^5.1.0',
71
+ '@types/node': '^24.0.10',
72
+ esbuild: '^0.25.5',
73
+ eslint: '^9.30.1',
74
+ 'eslint-plugin-svelte': '^3.10.1',
75
+ svelte: '^5.37.2',
76
+ 'svelte-check': '^4.2.2',
76
77
  typescript: '^5.8.3',
77
- 'typescript-eslint': '^8.32.0',
78
+ 'typescript-eslint': '^8.35.1',
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
- } satisfies Package_Json;
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.159.0',
267
+ version: '0.160.0',
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
- } satisfies Src_Json;
1036
+ } as any;
1062
1037
 
1063
1038
  // generated by src/lib/package.gen.ts