@ryanatkn/gro 0.119.1 → 0.120.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 +3 -2
- package/dist/changelog.d.ts +1 -0
- package/dist/changeset.task.js +4 -5
- package/dist/clean_fs.d.ts +1 -2
- package/dist/clean_fs.js +3 -2
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +2 -2
- package/dist/config.d.ts +14 -1
- package/dist/config.js +17 -5
- package/dist/config.test.js +50 -1
- package/dist/deploy.task.js +8 -7
- package/dist/docs/README.gen.md.js +3 -3
- package/dist/docs/config.md +22 -6
- package/dist/docs/gen.md +2 -1
- package/dist/docs/task.md +4 -3
- package/dist/docs/tasks.gen.md.js +17 -10
- package/dist/docs/tasks.md +1 -0
- package/dist/env.d.ts +2 -3
- package/dist/env.js +2 -2
- package/dist/esbuild_helpers.d.ts +2 -1
- package/dist/esbuild_plugin_external_worker.d.ts +0 -1
- package/dist/esbuild_plugin_external_worker.js +7 -7
- package/dist/esbuild_plugin_svelte.d.ts +0 -1
- package/dist/esbuild_plugin_sveltekit_local_imports.js +2 -2
- package/dist/format_directory.d.ts +1 -0
- package/dist/fs.d.ts +1 -3
- package/dist/fs.js +3 -13
- package/dist/fs.test.js +5 -5
- package/dist/gen.d.ts +66 -13
- package/dist/gen.js +78 -9
- package/dist/gen.task.d.ts +3 -0
- package/dist/gen.task.js +24 -19
- package/dist/gen.test.js +48 -35
- package/dist/git.d.ts +0 -1
- package/dist/git.js +3 -3
- package/dist/gro_helpers.js +4 -4
- package/dist/gro_plugin_gen.js +7 -7
- package/dist/gro_plugin_server.d.ts +2 -2
- package/dist/gro_plugin_server.js +5 -5
- package/dist/gro_plugin_sveltekit_app.js +8 -8
- package/dist/hash.d.ts +1 -2
- package/dist/input_path.d.ts +34 -16
- package/dist/input_path.js +119 -67
- package/dist/input_path.test.js +150 -46
- package/dist/invoke_task.d.ts +2 -1
- package/dist/invoke_task.js +33 -79
- package/dist/loader.d.ts +0 -1
- package/dist/loader.js +4 -4
- package/dist/modules.d.ts +17 -36
- package/dist/modules.js +29 -68
- package/dist/modules.test.js +19 -143
- package/dist/package.d.ts +11 -20
- package/dist/package.js +61 -64
- package/dist/package_json.d.ts +1 -0
- package/dist/package_json.js +1 -1
- package/dist/package_meta.d.ts +1 -1
- package/dist/path.d.ts +12 -8
- package/dist/path.js +0 -6
- package/dist/paths.d.ts +7 -12
- package/dist/paths.js +11 -34
- package/dist/paths.test.js +17 -15
- package/dist/plugin.d.ts +1 -1
- package/dist/publish.task.js +3 -3
- package/dist/resolve.task.d.ts +11 -0
- package/dist/resolve.task.js +24 -0
- package/dist/resolve_node_specifier.d.ts +2 -2
- package/dist/resolve_node_specifier.js +3 -3
- package/dist/resolve_specifier.d.ts +2 -1
- package/dist/resolve_specifier.js +16 -16
- package/dist/resolve_specifier.test.js +9 -9
- package/dist/run.task.js +2 -2
- package/dist/run_gen.d.ts +4 -4
- package/dist/run_gen.js +9 -16
- package/dist/run_gen.test.js +10 -15
- package/dist/run_task.d.ts +2 -1
- package/dist/run_task.js +2 -0
- package/dist/search_fs.d.ts +20 -7
- package/dist/search_fs.js +40 -18
- package/dist/search_fs.test.js +9 -11
- package/dist/src_json.js +2 -2
- package/dist/sveltekit_config.d.ts +0 -1
- package/dist/sveltekit_helpers.js +4 -4
- package/dist/sveltekit_shim_app.d.ts +1 -1
- package/dist/sveltekit_shim_app_forms.d.ts +0 -1
- package/dist/sveltekit_shim_app_navigation.d.ts +0 -1
- package/dist/sveltekit_shim_app_paths.d.ts +0 -1
- package/dist/sveltekit_shim_app_stores.d.ts +0 -1
- package/dist/sveltekit_shim_env.d.ts +1 -1
- package/dist/task.d.ts +65 -1
- package/dist/task.js +86 -13
- package/dist/task.test.js +25 -11
- package/dist/task_logging.d.ts +3 -6
- package/dist/task_logging.js +18 -36
- package/dist/watch_dir.d.ts +2 -2
- package/dist/watch_dir.js +14 -16
- package/package.json +18 -23
- package/dist/gen_module.d.ts +0 -34
- package/dist/gen_module.js +0 -32
- package/dist/gen_module.test.d.ts +0 -1
- package/dist/gen_module.test.js +0 -30
- package/dist/task_module.d.ts +0 -15
- package/dist/task_module.js +0 -18
- package/dist/task_module.test.d.ts +0 -1
- package/dist/task_module.test.js +0 -67
package/dist/modules.test.js
CHANGED
|
@@ -1,36 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { test } from 'uvu';
|
|
2
2
|
import * as assert from 'uvu/assert';
|
|
3
|
-
import { resolve
|
|
4
|
-
import {
|
|
5
|
-
import { get_possible_source_ids } from './input_path.js';
|
|
6
|
-
import { search_fs } from './search_fs.js';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { load_module } from './modules.js';
|
|
7
5
|
// TODO if we import directly, svelte-package generates types in `src/fixtures`
|
|
8
6
|
/* eslint-disable no-useless-concat */
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const modTestBaz2 = await import('../fixtures/' + 'baz2/test2.baz.js');
|
|
12
|
-
/* test__load_module */
|
|
13
|
-
const test__load_module = suite('load_module');
|
|
14
|
-
test__load_module('basic behavior', async () => {
|
|
7
|
+
const mod_test1 = await import('../fixtures/' + 'test1.foo.js');
|
|
8
|
+
test('load_module basic behavior', async () => {
|
|
15
9
|
const id = resolve('src/fixtures/test1.foo.js');
|
|
16
10
|
let validated_mod;
|
|
17
|
-
const result = await load_module(id, (
|
|
11
|
+
const result = await load_module(id, (mod) => {
|
|
18
12
|
validated_mod = mod;
|
|
19
13
|
return true;
|
|
20
|
-
})
|
|
14
|
+
});
|
|
21
15
|
assert.ok(result.ok);
|
|
22
|
-
assert.is(result.
|
|
23
|
-
assert.is(result.mod
|
|
24
|
-
assert.is(result.mod
|
|
16
|
+
assert.is(result.id, id);
|
|
17
|
+
assert.is(result.mod, validated_mod);
|
|
18
|
+
assert.is(result.mod, mod_test1);
|
|
25
19
|
});
|
|
26
|
-
|
|
20
|
+
test('load_module without validation', async () => {
|
|
27
21
|
const id = resolve('src/fixtures/test1.foo.js');
|
|
28
22
|
const result = await load_module(id);
|
|
29
23
|
assert.ok(result.ok);
|
|
30
|
-
assert.is(result.
|
|
31
|
-
assert.is(result.mod
|
|
24
|
+
assert.is(result.id, id);
|
|
25
|
+
assert.is(result.mod, mod_test1);
|
|
32
26
|
});
|
|
33
|
-
|
|
27
|
+
test('load_module fails validation', async () => {
|
|
34
28
|
const id = resolve('src/fixtures/test1.foo.js');
|
|
35
29
|
let validated_mod;
|
|
36
30
|
const test_validation = (mod) => {
|
|
@@ -39,21 +33,21 @@ test__load_module('fails validation', async () => {
|
|
|
39
33
|
};
|
|
40
34
|
const result = await load_module(id, test_validation);
|
|
41
35
|
assert.ok(!result.ok);
|
|
42
|
-
if (result.type === '
|
|
36
|
+
if (result.type === 'failed_validation') {
|
|
43
37
|
assert.is(result.validation, test_validation.name);
|
|
44
38
|
assert.is(result.id, id);
|
|
45
39
|
assert.is(result.mod, validated_mod);
|
|
46
|
-
assert.is(result.mod,
|
|
40
|
+
assert.is(result.mod, mod_test1);
|
|
47
41
|
}
|
|
48
42
|
else {
|
|
49
43
|
throw Error('Should be invalid');
|
|
50
44
|
}
|
|
51
45
|
});
|
|
52
|
-
|
|
46
|
+
test('load_module fails to import', async () => {
|
|
53
47
|
const id = resolve('foo/test/failure');
|
|
54
48
|
const result = await load_module(id);
|
|
55
49
|
assert.ok(!result.ok);
|
|
56
|
-
if (result.type === '
|
|
50
|
+
if (result.type === 'failed_import') {
|
|
57
51
|
assert.is(result.id, id);
|
|
58
52
|
assert.ok(result.error instanceof Error);
|
|
59
53
|
}
|
|
@@ -61,122 +55,4 @@ test__load_module('fails to import', async () => {
|
|
|
61
55
|
throw Error('Should fail to import');
|
|
62
56
|
}
|
|
63
57
|
});
|
|
64
|
-
|
|
65
|
-
/* test__load_module */
|
|
66
|
-
/* test__find_modules */
|
|
67
|
-
const test__find_modules = suite('find_modules');
|
|
68
|
-
test__find_modules('with and without extension', async () => {
|
|
69
|
-
const path1 = resolve('src/fixtures/test1');
|
|
70
|
-
const id1 = resolve('src/fixtures/test1.foo.ts');
|
|
71
|
-
const id2 = resolve('src/fixtures/test2.foo.ts');
|
|
72
|
-
const result = await find_modules([path1, id2], (id) => search_fs(id, { files_only: false }), (input_path) => get_possible_source_ids(input_path, ['.foo.ts'], []));
|
|
73
|
-
assert.ok(result.ok);
|
|
74
|
-
assert.equal(result.source_ids_by_input_path, new Map([
|
|
75
|
-
[path1, [id1]],
|
|
76
|
-
[id2, [id2]],
|
|
77
|
-
]));
|
|
78
|
-
assert.equal(result.source_id_path_data_by_input_path, new Map([
|
|
79
|
-
[path1, { id: id1, isDirectory: false }],
|
|
80
|
-
[id2, { id: id2, isDirectory: false }],
|
|
81
|
-
]));
|
|
82
|
-
});
|
|
83
|
-
test__find_modules('directory', async () => {
|
|
84
|
-
const id = resolve('src/fixtures/');
|
|
85
|
-
const result = await find_modules([id], (id) => search_fs(id, { filter: (path) => path.includes('.foo.') }));
|
|
86
|
-
assert.ok(result.ok);
|
|
87
|
-
assert.equal(result.source_ids_by_input_path, new Map([[id, [join(id, 'test1.foo.ts'), join(id, 'test2.foo.ts')]]]));
|
|
88
|
-
assert.equal(result.source_id_path_data_by_input_path, new Map([[id, { id, isDirectory: true }]]));
|
|
89
|
-
});
|
|
90
|
-
test__find_modules('fail with unmapped_input_paths', async () => {
|
|
91
|
-
const result = await find_modules([
|
|
92
|
-
resolve('src/fixtures/bar1'),
|
|
93
|
-
resolve('src/fixtures/failme1'),
|
|
94
|
-
resolve('src/fixtures/bar2'),
|
|
95
|
-
resolve('src/fixtures/failme2'),
|
|
96
|
-
], (id) => search_fs(id, { files_only: false }), (input_path) => get_possible_source_ids(input_path, ['.foo.ts'], []));
|
|
97
|
-
assert.ok(!result.ok);
|
|
98
|
-
assert.ok(result.reasons.length);
|
|
99
|
-
if (result.type === 'unmapped_input_paths') {
|
|
100
|
-
assert.equal(result.unmapped_input_paths, [
|
|
101
|
-
resolve('src/fixtures/failme1'),
|
|
102
|
-
resolve('src/fixtures/failme2'),
|
|
103
|
-
]);
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
throw Error('Expected to fail with unmapped_input_paths');
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
test__find_modules('fail with input_directories_with_no_files', async () => {
|
|
110
|
-
const result = await find_modules([
|
|
111
|
-
resolve('src/fixtures/baz1'),
|
|
112
|
-
resolve('src/fixtures/bar1'),
|
|
113
|
-
resolve('src/fixtures/bar2'),
|
|
114
|
-
resolve('src/fixtures/baz2'),
|
|
115
|
-
], (id) => search_fs(id, { filter: (path) => !path.includes('.bar.'), files_only: false }));
|
|
116
|
-
assert.ok(!result.ok);
|
|
117
|
-
assert.ok(result.reasons.length);
|
|
118
|
-
if (result.type === 'input_directories_with_no_files') {
|
|
119
|
-
assert.equal(result.input_directories_with_no_files, [
|
|
120
|
-
resolve('src/fixtures/bar1'),
|
|
121
|
-
resolve('src/fixtures/bar2'),
|
|
122
|
-
]);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
throw Error('Expected to fail with input_directories_with_no_files');
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
test__find_modules.run();
|
|
129
|
-
/* test__find_modules */
|
|
130
|
-
/* test__load_modules */
|
|
131
|
-
const test__load_modules = suite('load_modules');
|
|
132
|
-
test__load_modules('fail with load_module_failures', async () => {
|
|
133
|
-
const path_bar1 = resolve('src/fixtures/bar1');
|
|
134
|
-
const path_bar2 = resolve('src/fixtures/bar2');
|
|
135
|
-
const path_baz1 = resolve('src/fixtures/baz1');
|
|
136
|
-
const path_baz2 = resolve('src/fixtures/baz2');
|
|
137
|
-
const id_bar1 = join(path_bar1, 'test1.bar.ts');
|
|
138
|
-
const id_bar2 = join(path_bar2, 'test2.bar.ts');
|
|
139
|
-
const id_baz1 = join(path_baz1, 'test1.baz.ts');
|
|
140
|
-
const id_baz2 = join(path_baz2, 'test2.baz.ts');
|
|
141
|
-
const test_validation = ((mod) => mod.bar !== 1);
|
|
142
|
-
let error;
|
|
143
|
-
const result = await load_modules(new Map([
|
|
144
|
-
[path_bar1, [id_bar1, id_bar2]],
|
|
145
|
-
[path_baz1, [id_baz1, id_baz2]],
|
|
146
|
-
]), async (id) => {
|
|
147
|
-
if (id === id_bar2) {
|
|
148
|
-
return {
|
|
149
|
-
ok: false,
|
|
150
|
-
type: 'importFailed',
|
|
151
|
-
id,
|
|
152
|
-
error: (error = new Error('Test failed import')),
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
return load_module(id, test_validation);
|
|
156
|
-
});
|
|
157
|
-
assert.ok(!result.ok);
|
|
158
|
-
assert.ok(result.reasons.length);
|
|
159
|
-
if (result.type !== 'load_module_failures') {
|
|
160
|
-
throw Error('Expected to fail with load_module_failures');
|
|
161
|
-
}
|
|
162
|
-
assert.is(result.load_module_failures.length, 2);
|
|
163
|
-
const [failure1, failure2] = result.load_module_failures;
|
|
164
|
-
if (failure1.type !== 'invalid') {
|
|
165
|
-
throw Error('Expected to fail with invalid');
|
|
166
|
-
}
|
|
167
|
-
assert.is(failure1.id, id_bar1);
|
|
168
|
-
assert.ok(failure1.mod);
|
|
169
|
-
assert.is(failure1.validation, test_validation.name);
|
|
170
|
-
if (failure2.type !== 'importFailed') {
|
|
171
|
-
throw Error('Expected to fail with importFailed');
|
|
172
|
-
}
|
|
173
|
-
assert.is(failure2.id, id_bar2);
|
|
174
|
-
assert.is(failure2.error, error);
|
|
175
|
-
assert.is(result.modules.length, 2);
|
|
176
|
-
assert.is(result.modules[0].id, id_baz1);
|
|
177
|
-
assert.is(result.modules[0].mod, modTestBaz1);
|
|
178
|
-
assert.is(result.modules[1].id, id_baz2);
|
|
179
|
-
assert.is(result.modules[1].mod, modTestBaz2);
|
|
180
|
-
});
|
|
181
|
-
test__load_modules.run();
|
|
182
|
-
/* test__load_modules */
|
|
58
|
+
test.run();
|
package/dist/package.d.ts
CHANGED
|
@@ -41,7 +41,6 @@ export declare const package_json: {
|
|
|
41
41
|
mri: string;
|
|
42
42
|
prettier: string;
|
|
43
43
|
'prettier-plugin-svelte': string;
|
|
44
|
-
'tiny-glob': string;
|
|
45
44
|
'ts-morph': string;
|
|
46
45
|
tslib: string;
|
|
47
46
|
zod: string;
|
|
@@ -194,10 +193,6 @@ export declare const package_json: {
|
|
|
194
193
|
default: string;
|
|
195
194
|
types: string;
|
|
196
195
|
};
|
|
197
|
-
'./gen_module.js': {
|
|
198
|
-
default: string;
|
|
199
|
-
types: string;
|
|
200
|
-
};
|
|
201
196
|
'./gen.task.js': {
|
|
202
197
|
default: string;
|
|
203
198
|
types: string;
|
|
@@ -330,6 +325,10 @@ export declare const package_json: {
|
|
|
330
325
|
default: string;
|
|
331
326
|
types: string;
|
|
332
327
|
};
|
|
328
|
+
'./resolve.task.js': {
|
|
329
|
+
default: string;
|
|
330
|
+
types: string;
|
|
331
|
+
};
|
|
333
332
|
'./run_gen.js': {
|
|
334
333
|
default: string;
|
|
335
334
|
types: string;
|
|
@@ -402,10 +401,6 @@ export declare const package_json: {
|
|
|
402
401
|
default: string;
|
|
403
402
|
types: string;
|
|
404
403
|
};
|
|
405
|
-
'./task_module.js': {
|
|
406
|
-
default: string;
|
|
407
|
-
types: string;
|
|
408
|
-
};
|
|
409
404
|
'./task.js': {
|
|
410
405
|
default: string;
|
|
411
406
|
types: string;
|
|
@@ -615,13 +610,6 @@ export declare const src_json: {
|
|
|
615
610
|
kind: string;
|
|
616
611
|
}[];
|
|
617
612
|
};
|
|
618
|
-
'./gen_module.js': {
|
|
619
|
-
path: string;
|
|
620
|
-
declarations: {
|
|
621
|
-
name: string;
|
|
622
|
-
kind: string;
|
|
623
|
-
}[];
|
|
624
|
-
};
|
|
625
613
|
'./gen.task.js': {
|
|
626
614
|
path: string;
|
|
627
615
|
declarations: {
|
|
@@ -841,6 +829,13 @@ export declare const src_json: {
|
|
|
841
829
|
kind: string;
|
|
842
830
|
}[];
|
|
843
831
|
};
|
|
832
|
+
'./resolve.task.js': {
|
|
833
|
+
path: string;
|
|
834
|
+
declarations: {
|
|
835
|
+
name: string;
|
|
836
|
+
kind: string;
|
|
837
|
+
}[];
|
|
838
|
+
};
|
|
844
839
|
'./run_gen.js': {
|
|
845
840
|
path: string;
|
|
846
841
|
declarations: {
|
|
@@ -967,10 +962,6 @@ export declare const src_json: {
|
|
|
967
962
|
kind: string;
|
|
968
963
|
}[];
|
|
969
964
|
};
|
|
970
|
-
'./task_module.js': {
|
|
971
|
-
path: string;
|
|
972
|
-
declarations: never[];
|
|
973
|
-
};
|
|
974
965
|
'./task.js': {
|
|
975
966
|
path: string;
|
|
976
967
|
declarations: {
|
package/dist/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// generated by src/lib/package.gen.ts
|
|
2
2
|
export const package_json = {
|
|
3
3
|
name: '@ryanatkn/gro',
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.120.1',
|
|
5
5
|
description: 'task runner and toolkit extending SvelteKit',
|
|
6
6
|
motto: 'generate, run, optimize',
|
|
7
7
|
icon: '🌰',
|
|
@@ -14,7 +14,7 @@ export const package_json = {
|
|
|
14
14
|
bugs: 'https://github.com/ryanatkn/gro/issues',
|
|
15
15
|
funding: 'https://www.ryanatkn.com/funding',
|
|
16
16
|
type: 'module',
|
|
17
|
-
engines: { node: '>=
|
|
17
|
+
engines: { node: '>=22.3' },
|
|
18
18
|
scripts: {
|
|
19
19
|
build: 'rm -rf .gro dist && svelte-kit sync && svelte-package && chmod +x ./dist/gro.js && npm link -f',
|
|
20
20
|
start: 'gro dev',
|
|
@@ -40,9 +40,8 @@ export const package_json = {
|
|
|
40
40
|
kleur: '^4.1.5',
|
|
41
41
|
mri: '^1.2.0',
|
|
42
42
|
prettier: '^3.3.2',
|
|
43
|
-
'prettier-plugin-svelte': '^3.2.
|
|
44
|
-
'
|
|
45
|
-
'ts-morph': '^22.0.0',
|
|
43
|
+
'prettier-plugin-svelte': '^3.2.5',
|
|
44
|
+
'ts-morph': '^23.0.0',
|
|
46
45
|
tslib: '^2.6.3',
|
|
47
46
|
zod: '^3.23.8',
|
|
48
47
|
},
|
|
@@ -50,23 +49,23 @@ export const package_json = {
|
|
|
50
49
|
devDependencies: {
|
|
51
50
|
'@changesets/changelog-git': '^0.2.0',
|
|
52
51
|
'@changesets/types': '^6.0.0',
|
|
53
|
-
'@ryanatkn/eslint-config': '^0.1.
|
|
54
|
-
'@ryanatkn/fuz': '^0.
|
|
52
|
+
'@ryanatkn/eslint-config': '^0.1.3',
|
|
53
|
+
'@ryanatkn/fuz': '^0.103.0',
|
|
55
54
|
'@ryanatkn/moss': '^0.4.0',
|
|
56
55
|
'@sveltejs/adapter-static': '^3.0.2',
|
|
57
|
-
'@sveltejs/kit': '^2.5.
|
|
56
|
+
'@sveltejs/kit': '^2.5.17',
|
|
58
57
|
'@sveltejs/package': '^2.3.2',
|
|
59
58
|
'@sveltejs/vite-plugin-svelte': '^3.1.1',
|
|
60
59
|
'@types/fs-extra': '^11.0.4',
|
|
61
|
-
'@types/node': '^20.14.
|
|
62
|
-
'@typescript-eslint/eslint-plugin': '^7.13.
|
|
63
|
-
'@typescript-eslint/parser': '^7.13.
|
|
60
|
+
'@types/node': '^20.14.8',
|
|
61
|
+
'@typescript-eslint/eslint-plugin': '^7.13.1',
|
|
62
|
+
'@typescript-eslint/parser': '^7.13.1',
|
|
64
63
|
esbuild: '^0.20.2',
|
|
65
64
|
eslint: '^8.57.0',
|
|
66
|
-
'eslint-plugin-svelte': '^2.
|
|
67
|
-
svelte: '^5.0.0-next.
|
|
68
|
-
'svelte-check': '^3.8.
|
|
69
|
-
typescript: '^5.
|
|
65
|
+
'eslint-plugin-svelte': '^2.40.0',
|
|
66
|
+
svelte: '^5.0.0-next.164',
|
|
67
|
+
'svelte-check': '^3.8.1',
|
|
68
|
+
typescript: '^5.5.2',
|
|
70
69
|
uvu: '^0.5.6',
|
|
71
70
|
},
|
|
72
71
|
eslintConfig: { root: true, extends: '@ryanatkn', rules: { 'no-console': 1 } },
|
|
@@ -132,7 +131,6 @@ export const package_json = {
|
|
|
132
131
|
'./format_file.js': { default: './dist/format_file.js', types: './dist/format_file.d.ts' },
|
|
133
132
|
'./format.task.js': { default: './dist/format.task.js', types: './dist/format.task.d.ts' },
|
|
134
133
|
'./fs.js': { default: './dist/fs.js', types: './dist/fs.d.ts' },
|
|
135
|
-
'./gen_module.js': { default: './dist/gen_module.js', types: './dist/gen_module.d.ts' },
|
|
136
134
|
'./gen.task.js': { default: './dist/gen.task.js', types: './dist/gen.task.d.ts' },
|
|
137
135
|
'./gen.js': { default: './dist/gen.js', types: './dist/gen.d.ts' },
|
|
138
136
|
'./git.js': { default: './dist/git.js', types: './dist/git.d.ts' },
|
|
@@ -193,6 +191,7 @@ export const package_json = {
|
|
|
193
191
|
default: './dist/resolve_specifier.js',
|
|
194
192
|
types: './dist/resolve_specifier.d.ts',
|
|
195
193
|
},
|
|
194
|
+
'./resolve.task.js': { default: './dist/resolve.task.js', types: './dist/resolve.task.d.ts' },
|
|
196
195
|
'./run_gen.js': { default: './dist/run_gen.js', types: './dist/run_gen.d.ts' },
|
|
197
196
|
'./run_task.js': { default: './dist/run_task.js', types: './dist/run_task.d.ts' },
|
|
198
197
|
'./run.task.js': { default: './dist/run.task.js', types: './dist/run.task.d.ts' },
|
|
@@ -244,7 +243,6 @@ export const package_json = {
|
|
|
244
243
|
},
|
|
245
244
|
'./sync.task.js': { default: './dist/sync.task.js', types: './dist/sync.task.d.ts' },
|
|
246
245
|
'./task_logging.js': { default: './dist/task_logging.js', types: './dist/task_logging.d.ts' },
|
|
247
|
-
'./task_module.js': { default: './dist/task_module.js', types: './dist/task_module.d.ts' },
|
|
248
246
|
'./task.js': { default: './dist/task.js', types: './dist/task.d.ts' },
|
|
249
247
|
'./test.task.js': { default: './dist/test.task.js', types: './dist/test.task.d.ts' },
|
|
250
248
|
'./throttle.js': { default: './dist/throttle.js', types: './dist/throttle.d.ts' },
|
|
@@ -258,7 +256,7 @@ export const package_json = {
|
|
|
258
256
|
};
|
|
259
257
|
export const src_json = {
|
|
260
258
|
name: '@ryanatkn/gro',
|
|
261
|
-
version: '0.
|
|
259
|
+
version: '0.120.1',
|
|
262
260
|
modules: {
|
|
263
261
|
'.': {
|
|
264
262
|
path: 'index.ts',
|
|
@@ -344,6 +342,7 @@ export const src_json = {
|
|
|
344
342
|
{ name: 'Gro_Config', kind: 'type' },
|
|
345
343
|
{ name: 'Create_Gro_Config', kind: 'type' },
|
|
346
344
|
{ name: 'create_empty_config', kind: 'function' },
|
|
345
|
+
{ name: 'DEFAULT_SEARCH_EXCLUDER', kind: 'variable' },
|
|
347
346
|
{ name: 'DEFAULT_EXPORTS_EXCLUDER', kind: 'variable' },
|
|
348
347
|
{ name: 'Gro_Config_Module', kind: 'type' },
|
|
349
348
|
{ name: 'load_config', kind: 'function' },
|
|
@@ -438,29 +437,6 @@ export const src_json = {
|
|
|
438
437
|
],
|
|
439
438
|
},
|
|
440
439
|
'./fs.js': { path: 'fs.ts', declarations: [{ name: 'clean_fs', kind: 'function' }] },
|
|
441
|
-
'./gen_module.js': {
|
|
442
|
-
path: 'gen_module.ts',
|
|
443
|
-
declarations: [
|
|
444
|
-
{ name: 'GEN_FILE_PATTERN_TEXT', kind: 'variable' },
|
|
445
|
-
{ name: 'GEN_FILE_PATTERN', kind: 'variable' },
|
|
446
|
-
{ name: 'is_gen_path', kind: 'function' },
|
|
447
|
-
{ name: 'GEN_SCHEMA_FILE_PATTERN_TEXT', kind: 'variable' },
|
|
448
|
-
{ name: 'GEN_SCHEMA_FILE_PATTERN', kind: 'variable' },
|
|
449
|
-
{ name: 'GEN_SCHEMA_PATH_SUFFIX', kind: 'variable' },
|
|
450
|
-
{ name: 'GEN_SCHEMA_IDENTIFIER_SUFFIX', kind: 'variable' },
|
|
451
|
-
{ name: 'Gen_Module_Type', kind: 'type' },
|
|
452
|
-
{ name: 'Gen_Module', kind: 'type' },
|
|
453
|
-
{ name: 'Basic_Gen_Module', kind: 'type' },
|
|
454
|
-
{ name: 'Schema_Gen_Module', kind: 'type' },
|
|
455
|
-
{ name: 'to_gen_module_type', kind: 'function' },
|
|
456
|
-
{ name: 'gen_module_meta', kind: 'variable' },
|
|
457
|
-
{ name: 'validate_gen_module', kind: 'variable' },
|
|
458
|
-
{ name: 'Gen_Module_Meta', kind: 'type' },
|
|
459
|
-
{ name: 'Basic_Gen_Module_Meta', kind: 'type' },
|
|
460
|
-
{ name: 'load_gen_module', kind: 'function' },
|
|
461
|
-
{ name: 'find_gen_modules', kind: 'function' },
|
|
462
|
-
],
|
|
463
|
-
},
|
|
464
440
|
'./gen.task.js': {
|
|
465
441
|
path: 'gen.task.ts',
|
|
466
442
|
declarations: [
|
|
@@ -471,6 +447,9 @@ export const src_json = {
|
|
|
471
447
|
'./gen.js': {
|
|
472
448
|
path: 'gen.ts',
|
|
473
449
|
declarations: [
|
|
450
|
+
{ name: 'GEN_FILE_PATTERN_TEXT', kind: 'variable' },
|
|
451
|
+
{ name: 'GEN_FILE_PATTERN', kind: 'variable' },
|
|
452
|
+
{ name: 'is_gen_path', kind: 'function' },
|
|
474
453
|
{ name: 'Gen_Result', kind: 'type' },
|
|
475
454
|
{ name: 'Gen_File', kind: 'type' },
|
|
476
455
|
{ name: 'Gen', kind: 'type' },
|
|
@@ -479,15 +458,26 @@ export const src_json = {
|
|
|
479
458
|
{ name: 'Raw_Gen_File', kind: 'type' },
|
|
480
459
|
{ name: 'Gen_Config', kind: 'variable' },
|
|
481
460
|
{ name: 'Gen_Results', kind: 'type' },
|
|
482
|
-
{ name: '
|
|
483
|
-
{ name: '
|
|
484
|
-
{ name: '
|
|
461
|
+
{ name: 'Genfile_Module_Result', kind: 'type' },
|
|
462
|
+
{ name: 'Genfile_Module_Result_Success', kind: 'type' },
|
|
463
|
+
{ name: 'Genfile_Module_Result_Failure', kind: 'type' },
|
|
485
464
|
{ name: 'to_gen_result', kind: 'function' },
|
|
486
465
|
{ name: 'to_output_file_name', kind: 'function' },
|
|
487
466
|
{ name: 'Analyzed_Gen_Result', kind: 'type' },
|
|
488
467
|
{ name: 'analyze_gen_results', kind: 'function' },
|
|
489
468
|
{ name: 'analyze_gen_result', kind: 'function' },
|
|
490
469
|
{ name: 'write_gen_results', kind: 'function' },
|
|
470
|
+
{ name: 'Found_Genfiles', kind: 'type' },
|
|
471
|
+
{ name: 'Find_Genfiles_Result', kind: 'type' },
|
|
472
|
+
{ name: 'Find_Genfiles_Failure', kind: 'type' },
|
|
473
|
+
{ name: 'find_genfiles', kind: 'function' },
|
|
474
|
+
{ name: 'Genfile_Module', kind: 'type' },
|
|
475
|
+
{ name: 'Genfile_Module_Meta', kind: 'type' },
|
|
476
|
+
{ name: 'Loaded_Genfiles', kind: 'type' },
|
|
477
|
+
{ name: 'Load_Genfiles_Result', kind: 'type' },
|
|
478
|
+
{ name: 'Load_Genfiles_Failure', kind: 'type' },
|
|
479
|
+
{ name: 'load_genfiles', kind: 'function' },
|
|
480
|
+
{ name: 'validate_gen_module', kind: 'function' },
|
|
491
481
|
],
|
|
492
482
|
},
|
|
493
483
|
'./git.js': {
|
|
@@ -572,10 +562,14 @@ export const src_json = {
|
|
|
572
562
|
{ name: 'Raw_Input_Path', kind: 'variable' },
|
|
573
563
|
{ name: 'to_input_path', kind: 'function' },
|
|
574
564
|
{ name: 'to_input_paths', kind: 'function' },
|
|
575
|
-
{ name: '
|
|
576
|
-
{ name: '
|
|
577
|
-
{ name: '
|
|
578
|
-
{ name: '
|
|
565
|
+
{ name: 'Possible_Path', kind: 'type' },
|
|
566
|
+
{ name: 'get_possible_paths', kind: 'function' },
|
|
567
|
+
{ name: 'Resolved_Input_Path', kind: 'type' },
|
|
568
|
+
{ name: 'Resolved_Input_File', kind: 'type' },
|
|
569
|
+
{ name: 'Resolved_Input_Paths', kind: 'type' },
|
|
570
|
+
{ name: 'resolve_input_paths', kind: 'function' },
|
|
571
|
+
{ name: 'Resolved_Input_Files', kind: 'type' },
|
|
572
|
+
{ name: 'resolve_input_files', kind: 'function' },
|
|
579
573
|
],
|
|
580
574
|
},
|
|
581
575
|
'./invoke_task.js': {
|
|
@@ -605,10 +599,8 @@ export const src_json = {
|
|
|
605
599
|
{ name: 'Load_Module_Result', kind: 'type' },
|
|
606
600
|
{ name: 'Load_Module_Failure', kind: 'type' },
|
|
607
601
|
{ name: 'load_module', kind: 'function' },
|
|
608
|
-
{ name: '
|
|
609
|
-
{ name: 'Find_Modules_Failure', kind: 'type' },
|
|
602
|
+
{ name: 'Load_Modules_Failure', kind: 'type' },
|
|
610
603
|
{ name: 'Load_Modules_Result', kind: 'type' },
|
|
611
|
-
{ name: 'find_modules', kind: 'function' },
|
|
612
604
|
{ name: 'load_modules', kind: 'function' },
|
|
613
605
|
],
|
|
614
606
|
},
|
|
@@ -685,10 +677,14 @@ export const src_json = {
|
|
|
685
677
|
{ name: 'Raw_Input_Path', kind: 'variable' },
|
|
686
678
|
{ name: 'to_input_path', kind: 'function' },
|
|
687
679
|
{ name: 'to_input_paths', kind: 'function' },
|
|
688
|
-
{ name: '
|
|
689
|
-
{ name: '
|
|
690
|
-
{ name: '
|
|
691
|
-
{ name: '
|
|
680
|
+
{ name: 'Possible_Path', kind: 'type' },
|
|
681
|
+
{ name: 'get_possible_paths', kind: 'function' },
|
|
682
|
+
{ name: 'Resolved_Input_Path', kind: 'type' },
|
|
683
|
+
{ name: 'Resolved_Input_File', kind: 'type' },
|
|
684
|
+
{ name: 'Resolved_Input_Paths', kind: 'type' },
|
|
685
|
+
{ name: 'resolve_input_paths', kind: 'function' },
|
|
686
|
+
{ name: 'Resolved_Input_Files', kind: 'type' },
|
|
687
|
+
{ name: 'resolve_input_files', kind: 'function' },
|
|
692
688
|
],
|
|
693
689
|
},
|
|
694
690
|
'./paths.js': {
|
|
@@ -699,16 +695,13 @@ export const src_json = {
|
|
|
699
695
|
{ name: 'LIB_DIR', kind: 'variable' },
|
|
700
696
|
{ name: 'ROUTES_DIRNAME', kind: 'variable' },
|
|
701
697
|
{ name: 'Paths', kind: 'type' },
|
|
702
|
-
{ name: 'Source_Id', kind: 'variable' },
|
|
703
698
|
{ name: 'create_paths', kind: 'function' },
|
|
704
|
-
{ name: '
|
|
699
|
+
{ name: 'infer_paths', kind: 'function' },
|
|
705
700
|
{ name: 'is_gro_id', kind: 'function' },
|
|
706
701
|
{ name: 'to_root_path', kind: 'function' },
|
|
707
|
-
{ name: '
|
|
708
|
-
{ name: '
|
|
709
|
-
{ name: 'import_id_to_lib_path', kind: 'function' },
|
|
702
|
+
{ name: 'path_id_to_base_path', kind: 'function' },
|
|
703
|
+
{ name: 'base_path_to_path_id', kind: 'function' },
|
|
710
704
|
{ name: 'print_path', kind: 'function' },
|
|
711
|
-
{ name: 'print_path_or_gro_path', kind: 'function' },
|
|
712
705
|
{ name: 'replace_extension', kind: 'function' },
|
|
713
706
|
{ name: 'paths', kind: 'variable' },
|
|
714
707
|
{ name: 'GRO_PACKAGE_DIR', kind: 'variable' },
|
|
@@ -764,12 +757,18 @@ export const src_json = {
|
|
|
764
757
|
{ name: 'resolve_specifier', kind: 'function' },
|
|
765
758
|
],
|
|
766
759
|
},
|
|
760
|
+
'./resolve.task.js': {
|
|
761
|
+
path: 'resolve.task.ts',
|
|
762
|
+
declarations: [
|
|
763
|
+
{ name: 'Args', kind: 'variable' },
|
|
764
|
+
{ name: 'task', kind: 'variable' },
|
|
765
|
+
],
|
|
766
|
+
},
|
|
767
767
|
'./run_gen.js': {
|
|
768
768
|
path: 'run_gen.ts',
|
|
769
769
|
declarations: [
|
|
770
770
|
{ name: 'GEN_NO_PROD_MESSAGE', kind: 'variable' },
|
|
771
771
|
{ name: 'run_gen', kind: 'function' },
|
|
772
|
-
{ name: 'to_gen_import_path', kind: 'function' },
|
|
773
772
|
],
|
|
774
773
|
},
|
|
775
774
|
'./run_task.js': {
|
|
@@ -909,12 +908,10 @@ export const src_json = {
|
|
|
909
908
|
path: 'task_logging.ts',
|
|
910
909
|
declarations: [
|
|
911
910
|
{ name: 'log_tasks', kind: 'function' },
|
|
912
|
-
{ name: 'log_gro_package_tasks', kind: 'function' },
|
|
913
911
|
{ name: 'log_error_reasons', kind: 'function' },
|
|
914
912
|
{ name: 'log_task_help', kind: 'function' },
|
|
915
913
|
],
|
|
916
914
|
},
|
|
917
|
-
'./task_module.js': { path: 'task_module.ts', declarations: [] },
|
|
918
915
|
'./task.js': {
|
|
919
916
|
path: 'task.ts',
|
|
920
917
|
declarations: [
|
package/dist/package_json.d.ts
CHANGED
package/dist/package_json.js
CHANGED
|
@@ -110,7 +110,7 @@ export const load_package_json = async (dir = IS_THIS_GRO ? gro_paths.root : pat
|
|
|
110
110
|
};
|
|
111
111
|
export const sync_package_json = async (map_package_json, log, check = false, dir = paths.root, exports_dir = paths.lib) => {
|
|
112
112
|
const exported_files = await search_fs(exports_dir);
|
|
113
|
-
const exported_paths =
|
|
113
|
+
const exported_paths = exported_files.map((f) => f.path);
|
|
114
114
|
const updated = await update_package_json(dir, async (package_json) => {
|
|
115
115
|
if ((await has_sveltekit_library(package_json)).ok) {
|
|
116
116
|
const exports = to_package_exports(exported_paths);
|
package/dist/package_meta.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ export interface Package_Meta {
|
|
|
16
16
|
changelog_url: Url | null;
|
|
17
17
|
published: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare const parse_package_meta: (url:
|
|
19
|
+
export declare const parse_package_meta: (url: Url, package_json: Package_Json, src_json: Src_Json) => Package_Meta;
|
|
20
20
|
export declare const parse_repo_name: (name: string) => string;
|
|
21
21
|
export declare const parse_org_url: (pkg: Package_Meta) => string | null;
|
package/dist/path.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { Flavored } from '@ryanatkn/belt/types.js';
|
|
2
|
+
export type Path_Id = Flavored<string, 'Path_Id'>;
|
|
3
|
+
export interface Path_Info {
|
|
4
|
+
id: Path_Id;
|
|
5
|
+
is_directory: boolean;
|
|
5
6
|
}
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
isDirectory: () => boolean;
|
|
7
|
+
export interface Resolved_Path extends Path_Info {
|
|
8
|
+
path: string;
|
|
9
9
|
}
|
|
10
10
|
export interface Path_Filter {
|
|
11
|
-
(path: string,
|
|
11
|
+
(path: string, is_directory: boolean): boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface File_Filter {
|
|
14
|
+
(path: string): boolean;
|
|
12
15
|
}
|
|
16
|
+
export declare const to_file_path: (path_or_url: string | URL) => string;
|
package/dist/path.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
2
|
export const to_file_path = (path_or_url) => typeof path_or_url === 'string' ? path_or_url : fileURLToPath(path_or_url.href);
|
|
3
|
-
export const to_path_data = (id, stats) => {
|
|
4
|
-
return {
|
|
5
|
-
id,
|
|
6
|
-
isDirectory: stats.isDirectory(),
|
|
7
|
-
};
|
|
8
|
-
};
|
package/dist/paths.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { z } from 'zod';
|
|
1
|
+
import type { Path_Id } from './path.js';
|
|
3
2
|
export declare const LIB_DIRNAME: string;
|
|
4
3
|
export declare const LIB_PATH: string;
|
|
5
4
|
export declare const LIB_DIR: string;
|
|
@@ -12,17 +11,13 @@ export interface Paths {
|
|
|
12
11
|
build_dev: string;
|
|
13
12
|
config: string;
|
|
14
13
|
}
|
|
15
|
-
export declare const Source_Id: z.ZodString;
|
|
16
|
-
export type Source_Id = Flavored<z.infer<typeof Source_Id>, 'Source_Id'>;
|
|
17
14
|
export declare const create_paths: (root_dir: string) => Paths;
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const is_gro_id: (id:
|
|
20
|
-
export declare const to_root_path: (id:
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const print_path: (path: string, p?: Paths, prefix?: string) => string;
|
|
25
|
-
export declare const print_path_or_gro_path: (path: string, from_paths?: Paths) => string;
|
|
15
|
+
export declare const infer_paths: (id: Path_Id) => Paths;
|
|
16
|
+
export declare const is_gro_id: (id: Path_Id) => boolean;
|
|
17
|
+
export declare const to_root_path: (id: Path_Id, p?: Paths) => string;
|
|
18
|
+
export declare const path_id_to_base_path: (path_id: Path_Id, p?: Paths) => string;
|
|
19
|
+
export declare const base_path_to_path_id: (base_path: string, p?: Paths) => Path_Id;
|
|
20
|
+
export declare const print_path: (path: string, p?: Paths) => string;
|
|
26
21
|
export declare const replace_extension: (path: string, new_extension: string) => string;
|
|
27
22
|
/**
|
|
28
23
|
* Paths for the user repo.
|