@ryanatkn/gro 0.130.2 → 0.132.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gen.d.ts +1 -1
- package/dist/gen.d.ts.map +1 -1
- package/dist/gro.config.default.d.ts +1 -1
- package/dist/gro.config.default.d.ts.map +1 -1
- package/dist/{config.d.ts → gro_config.d.ts} +5 -5
- package/dist/gro_config.d.ts.map +1 -0
- package/dist/{config.js → gro_config.js} +8 -8
- package/dist/gro_plugin_sveltekit_app.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/invoke.js +2 -2
- package/dist/invoke_task.d.ts +1 -1
- package/dist/invoke_task.d.ts.map +1 -1
- package/dist/package.d.ts +11 -11
- package/dist/package.js +19 -19
- package/dist/run_gen.d.ts +1 -1
- package/dist/run_gen.d.ts.map +1 -1
- package/dist/run_task.d.ts +1 -1
- package/dist/run_task.d.ts.map +1 -1
- package/dist/task.d.ts +1 -1
- package/dist/task.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/lib/gen.ts +1 -1
- package/src/lib/gro.config.default.ts +1 -1
- package/src/lib/{config.ts → gro_config.ts} +10 -8
- package/src/lib/gro_plugin_sveltekit_app.ts +1 -1
- package/src/lib/index.ts +1 -1
- package/src/lib/invoke.ts +2 -2
- package/src/lib/invoke_task.ts +1 -1
- package/src/lib/package.ts +19 -19
- package/src/lib/run_gen.ts +1 -1
- package/src/lib/run_task.ts +1 -1
- package/src/lib/task.ts +1 -1
- package/dist/config.d.ts.map +0 -1
package/dist/gen.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Logger } from '@ryanatkn/belt/log.js';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import type { Result } from '@ryanatkn/belt/result.js';
|
|
4
4
|
import type { Path_Id } from './path.js';
|
|
5
|
-
import type { Gro_Config } from './
|
|
5
|
+
import type { Gro_Config } from './gro_config.js';
|
|
6
6
|
import type { Parsed_Sveltekit_Config } from './sveltekit_config.js';
|
|
7
7
|
import { type Load_Modules_Failure, type Module_Meta } from './modules.js';
|
|
8
8
|
import { Input_Path, type Resolved_Input_File, type Resolved_Input_Path } from './input_path.js';
|
package/dist/gen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gen.d.ts","sourceRoot":"../src/lib/","sources":["gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAMrD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"gen.d.ts","sourceRoot":"../src/lib/","sources":["gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAMrD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAe,KAAK,oBAAoB,EAAE,KAAK,WAAW,EAAC,MAAM,cAAc,CAAC;AACvF,OAAO,EACN,UAAU,EAGV,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAC3C,eAAO,MAAM,gBAAgB,QAAoC,CAAC;AAElE,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,O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"version":3,"file":"gro.config.default.d.ts","sourceRoot":"../src/lib/","sources":["gro.config.default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"gro.config.default.d.ts","sourceRoot":"../src/lib/","sources":["gro.config.default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAMvD;;;;;;;;GAQG;AACH,QAAA,MAAM,MAAM,EAAE,iBAgBb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -40,7 +40,7 @@ export interface Raw_Gro_Config {
|
|
|
40
40
|
search_filters?: Path_Filter | Path_Filter[] | null;
|
|
41
41
|
}
|
|
42
42
|
export type Create_Gro_Config = (base_config: Gro_Config) => Raw_Gro_Config | Promise<Raw_Gro_Config>;
|
|
43
|
-
export declare const
|
|
43
|
+
export declare const create_empty_gro_config: () => Gro_Config;
|
|
44
44
|
/**
|
|
45
45
|
* The regexp used by default to exclude directories and files
|
|
46
46
|
* when searching the filesystem for tasks and genfiles.
|
|
@@ -53,10 +53,10 @@ export declare const DEFAULT_EXPORTS_EXCLUDER: RegExp;
|
|
|
53
53
|
* Transforms a `Raw_Gro_Config` to the more strict `Gro_Config`.
|
|
54
54
|
* This allows users to provide a more relaxed config.
|
|
55
55
|
*/
|
|
56
|
-
export declare const
|
|
56
|
+
export declare const normalize_gro_config: (raw_config: Raw_Gro_Config) => Gro_Config;
|
|
57
57
|
export interface Gro_Config_Module {
|
|
58
58
|
readonly default: Raw_Gro_Config | Create_Gro_Config;
|
|
59
59
|
}
|
|
60
|
-
export declare const
|
|
61
|
-
export declare const
|
|
62
|
-
//# sourceMappingURL=
|
|
60
|
+
export declare const load_gro_config: (dir?: string) => Promise<Gro_Config>;
|
|
61
|
+
export declare const validate_gro_config_module: (config_module: any, config_path: string) => asserts config_module is Gro_Config_Module;
|
|
62
|
+
//# sourceMappingURL=gro_config.d.ts.map
|
|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AAO,CAAC,UAAU,CAiB1E,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,CACxC,aAAa,EAAE,GAAG,EAClB,WAAW,EAAE,MAAM,KACf,OAAO,CAAC,aAAa,IAAI,iBAS7B,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { existsSync } from 'node:fs';
|
|
|
3
3
|
import { GRO_DIST_DIR, IS_THIS_GRO, paths } from './paths.js';
|
|
4
4
|
import { GRO_CONFIG_PATH, NODE_MODULES_DIRNAME, SERVER_DIST_PATH, SVELTEKIT_BUILD_DIRNAME, SVELTEKIT_DIST_DIRNAME, } from './path_constants.js';
|
|
5
5
|
import create_default_config from './gro.config.default.js';
|
|
6
|
-
export const
|
|
6
|
+
export const create_empty_gro_config = () => ({
|
|
7
7
|
plugins: () => [],
|
|
8
8
|
map_package_json: default_map_package_json,
|
|
9
9
|
task_root_dirs: [
|
|
@@ -38,8 +38,8 @@ export const DEFAULT_EXPORTS_EXCLUDER = /(\.md|\.(test|ignore)\.|\/(test|fixture
|
|
|
38
38
|
* Transforms a `Raw_Gro_Config` to the more strict `Gro_Config`.
|
|
39
39
|
* This allows users to provide a more relaxed config.
|
|
40
40
|
*/
|
|
41
|
-
export const
|
|
42
|
-
const empty_config =
|
|
41
|
+
export const normalize_gro_config = (raw_config) => {
|
|
42
|
+
const empty_config = create_empty_gro_config();
|
|
43
43
|
// All of the raw config properties are optional,
|
|
44
44
|
// so fall back to the empty values when `undefined`.
|
|
45
45
|
const { plugins = empty_config.plugins, map_package_json = empty_config.map_package_json, task_root_dirs = empty_config.task_root_dirs, search_filters = empty_config.search_filters, } = raw_config;
|
|
@@ -54,8 +54,8 @@ export const normalize_config = (raw_config) => {
|
|
|
54
54
|
: [],
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
export const
|
|
58
|
-
const default_config =
|
|
57
|
+
export const load_gro_config = async (dir = paths.root) => {
|
|
58
|
+
const default_config = normalize_gro_config(await create_default_config(create_empty_gro_config()));
|
|
59
59
|
const config_path = join(dir, GRO_CONFIG_PATH);
|
|
60
60
|
if (!existsSync(config_path)) {
|
|
61
61
|
// No user config file found, so return the default.
|
|
@@ -63,12 +63,12 @@ export const load_config = async (dir = paths.root) => {
|
|
|
63
63
|
}
|
|
64
64
|
// Import the user's `gro.config.ts`.
|
|
65
65
|
const config_module = await import(config_path);
|
|
66
|
-
|
|
67
|
-
return
|
|
66
|
+
validate_gro_config_module(config_module, config_path);
|
|
67
|
+
return normalize_gro_config(typeof config_module.default === 'function'
|
|
68
68
|
? await config_module.default(default_config)
|
|
69
69
|
: config_module.default);
|
|
70
70
|
};
|
|
71
|
-
export const
|
|
71
|
+
export const validate_gro_config_module = (config_module, config_path) => {
|
|
72
72
|
const config = config_module.default;
|
|
73
73
|
if (!config) {
|
|
74
74
|
throw Error(`Invalid Gro config module at ${config_path}: expected a default export`);
|
|
@@ -5,7 +5,7 @@ import { serialize_package_json, load_package_json } from './package_json.js';
|
|
|
5
5
|
import { Task_Error } from './task.js';
|
|
6
6
|
import { find_cli, spawn_cli, spawn_cli_process } from './cli.js';
|
|
7
7
|
import { serialize_src_json, create_src_json } from './src_json.js';
|
|
8
|
-
import { DEFAULT_EXPORTS_EXCLUDER } from './
|
|
8
|
+
import { DEFAULT_EXPORTS_EXCLUDER } from './gro_config.js';
|
|
9
9
|
import { sveltekit_config_global } from './sveltekit_config_global.js';
|
|
10
10
|
import { SOURCE_DIRNAME } from './path_constants.js';
|
|
11
11
|
import { VITE_CLI } from './sveltekit_helpers.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Gro_Config, Create_Gro_Config, Raw_Gro_Config } from './
|
|
1
|
+
export type { Gro_Config, Create_Gro_Config, Raw_Gro_Config } from './gro_config.js';
|
|
2
2
|
export { type Plugin, replace_plugin } from './plugin.js';
|
|
3
3
|
export type { Gen, Gen_Context } from './gen.js';
|
|
4
4
|
export { type Task, type Task_Context, Task_Error } from './task.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../src/lib/","sources":["index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../src/lib/","sources":["index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAC,KAAK,MAAM,EAAE,cAAc,EAAC,MAAM,aAAa,CAAC;AACxD,YAAY,EAAC,GAAG,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAC,KAAK,IAAI,EAAE,KAAK,YAAY,EAAE,UAAU,EAAC,MAAM,WAAW,CAAC"}
|
package/dist/invoke.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { attach_process_error_handlers } from '@ryanatkn/belt/process.js';
|
|
2
2
|
import { invoke_task } from './invoke_task.js';
|
|
3
3
|
import { to_task_args } from './args.js';
|
|
4
|
-
import {
|
|
4
|
+
import { load_gro_config } from './gro_config.js';
|
|
5
5
|
import { sveltekit_sync_if_obviously_needed } from './sveltekit_helpers.js';
|
|
6
6
|
/*
|
|
7
7
|
|
|
@@ -17,4 +17,4 @@ and the rest of the args are forwarded to the task's `run` function.
|
|
|
17
17
|
attach_process_error_handlers((err) => err?.constructor?.name === 'Task_Error' ? 'Task_Error' : null);
|
|
18
18
|
await sveltekit_sync_if_obviously_needed();
|
|
19
19
|
const { task_name, args } = to_task_args();
|
|
20
|
-
await invoke_task(task_name, args, await
|
|
20
|
+
await invoke_task(task_name, args, await load_gro_config());
|
package/dist/invoke_task.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Timings } from '@ryanatkn/belt/timings.js';
|
|
2
2
|
import { type Args } from './args.js';
|
|
3
3
|
import { Raw_Input_Path } from './input_path.js';
|
|
4
|
-
import type { Gro_Config } from './
|
|
4
|
+
import type { Gro_Config } from './gro_config.js';
|
|
5
5
|
/**
|
|
6
6
|
* Invokes Gro tasks by name using the filesystem as the source.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke_task.d.ts","sourceRoot":"../src/lib/","sources":["invoke_task.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,OAAO,EAAC,MAAM,2BAA2B,CAAC;AAGpE,OAAO,EAAoB,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAgB,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAI9D,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"invoke_task.d.ts","sourceRoot":"../src/lib/","sources":["invoke_task.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,OAAO,EAAC,MAAM,2BAA2B,CAAC;AAGpE,OAAO,EAAoB,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAgB,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAI9D,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,WAAW,cACZ,cAAc,QACnB,IAAI,GAAG,SAAS,UACd,UAAU,oBACD,OAAO,GAAG,IAAI,KAC7B,OAAO,CAAC,IAAI,CA2Ed,CAAC"}
|
package/dist/package.d.ts
CHANGED
|
@@ -137,10 +137,6 @@ export declare const package_json: {
|
|
|
137
137
|
types: string;
|
|
138
138
|
default: string;
|
|
139
139
|
};
|
|
140
|
-
'./config.js': {
|
|
141
|
-
types: string;
|
|
142
|
-
default: string;
|
|
143
|
-
};
|
|
144
140
|
'./deploy.task.js': {
|
|
145
141
|
types: string;
|
|
146
142
|
default: string;
|
|
@@ -213,6 +209,10 @@ export declare const package_json: {
|
|
|
213
209
|
types: string;
|
|
214
210
|
default: string;
|
|
215
211
|
};
|
|
212
|
+
'./gro_config.js': {
|
|
213
|
+
types: string;
|
|
214
|
+
default: string;
|
|
215
|
+
};
|
|
216
216
|
'./gro_helpers.js': {
|
|
217
217
|
types: string;
|
|
218
218
|
default: string;
|
|
@@ -516,13 +516,6 @@ export declare const src_json: {
|
|
|
516
516
|
kind: string;
|
|
517
517
|
}[];
|
|
518
518
|
};
|
|
519
|
-
'./config.js': {
|
|
520
|
-
path: string;
|
|
521
|
-
declarations: {
|
|
522
|
-
name: string;
|
|
523
|
-
kind: string;
|
|
524
|
-
}[];
|
|
525
|
-
};
|
|
526
519
|
'./deploy.task.js': {
|
|
527
520
|
path: string;
|
|
528
521
|
declarations: {
|
|
@@ -649,6 +642,13 @@ export declare const src_json: {
|
|
|
649
642
|
kind: string;
|
|
650
643
|
}[];
|
|
651
644
|
};
|
|
645
|
+
'./gro_config.js': {
|
|
646
|
+
path: string;
|
|
647
|
+
declarations: {
|
|
648
|
+
name: string;
|
|
649
|
+
kind: string;
|
|
650
|
+
}[];
|
|
651
|
+
};
|
|
652
652
|
'./gro_helpers.js': {
|
|
653
653
|
path: string;
|
|
654
654
|
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.132.0',
|
|
5
5
|
description: 'task runner and toolkit extending SvelteKit',
|
|
6
6
|
motto: 'generate, run, optimize',
|
|
7
7
|
glyph: '🌰',
|
|
@@ -56,7 +56,7 @@ export const package_json = {
|
|
|
56
56
|
'@changesets/changelog-git': '^0.2.0',
|
|
57
57
|
'@changesets/types': '^6.0.0',
|
|
58
58
|
'@ryanatkn/eslint-config': '^0.4.2',
|
|
59
|
-
'@ryanatkn/fuz': '^0.
|
|
59
|
+
'@ryanatkn/fuz': '^0.111.0',
|
|
60
60
|
'@ryanatkn/moss': '^0.8.0',
|
|
61
61
|
'@sveltejs/adapter-static': '^3.0.2',
|
|
62
62
|
'@sveltejs/kit': '^2.5.18',
|
|
@@ -102,7 +102,6 @@ export const package_json = {
|
|
|
102
102
|
'./clean.task.js': { types: './dist/clean.task.d.ts', default: './dist/clean.task.js' },
|
|
103
103
|
'./cli.js': { types: './dist/cli.d.ts', default: './dist/cli.js' },
|
|
104
104
|
'./commit.task.js': { types: './dist/commit.task.d.ts', default: './dist/commit.task.js' },
|
|
105
|
-
'./config.js': { types: './dist/config.d.ts', default: './dist/config.js' },
|
|
106
105
|
'./deploy.task.js': { types: './dist/deploy.task.d.ts', default: './dist/deploy.task.js' },
|
|
107
106
|
'./dev.task.js': { types: './dist/dev.task.d.ts', default: './dist/dev.task.js' },
|
|
108
107
|
'./env.js': { types: './dist/env.d.ts', default: './dist/env.js' },
|
|
@@ -145,6 +144,7 @@ export const package_json = {
|
|
|
145
144
|
'./gen.js': { types: './dist/gen.d.ts', default: './dist/gen.js' },
|
|
146
145
|
'./git.js': { types: './dist/git.d.ts', default: './dist/git.js' },
|
|
147
146
|
'./github.js': { types: './dist/github.d.ts', default: './dist/github.js' },
|
|
147
|
+
'./gro_config.js': { types: './dist/gro_config.d.ts', default: './dist/gro_config.js' },
|
|
148
148
|
'./gro_helpers.js': { types: './dist/gro_helpers.d.ts', default: './dist/gro_helpers.js' },
|
|
149
149
|
'./gro_plugin_gen.js': {
|
|
150
150
|
types: './dist/gro_plugin_gen.d.ts',
|
|
@@ -266,7 +266,7 @@ export const package_json = {
|
|
|
266
266
|
};
|
|
267
267
|
export const src_json = {
|
|
268
268
|
name: '@ryanatkn/gro',
|
|
269
|
-
version: '0.
|
|
269
|
+
version: '0.132.0',
|
|
270
270
|
modules: {
|
|
271
271
|
'.': {
|
|
272
272
|
path: 'index.ts',
|
|
@@ -361,21 +361,6 @@ export const src_json = {
|
|
|
361
361
|
{ name: 'task', kind: 'variable' },
|
|
362
362
|
],
|
|
363
363
|
},
|
|
364
|
-
'./config.js': {
|
|
365
|
-
path: 'config.ts',
|
|
366
|
-
declarations: [
|
|
367
|
-
{ name: 'Gro_Config', kind: 'type' },
|
|
368
|
-
{ name: 'Raw_Gro_Config', kind: 'type' },
|
|
369
|
-
{ name: 'Create_Gro_Config', kind: 'type' },
|
|
370
|
-
{ name: 'create_empty_config', kind: 'function' },
|
|
371
|
-
{ name: 'DEFAULT_SEARCH_EXCLUDER', kind: 'variable' },
|
|
372
|
-
{ name: 'DEFAULT_EXPORTS_EXCLUDER', kind: 'variable' },
|
|
373
|
-
{ name: 'normalize_config', kind: 'function' },
|
|
374
|
-
{ name: 'Gro_Config_Module', kind: 'type' },
|
|
375
|
-
{ name: 'load_config', kind: 'function' },
|
|
376
|
-
{ name: 'validate_config_module', kind: 'function' },
|
|
377
|
-
],
|
|
378
|
-
},
|
|
379
364
|
'./deploy.task.js': {
|
|
380
365
|
path: 'deploy.task.ts',
|
|
381
366
|
declarations: [
|
|
@@ -539,6 +524,21 @@ export const src_json = {
|
|
|
539
524
|
{ name: 'github_fetch_commit_prs', kind: 'function' },
|
|
540
525
|
],
|
|
541
526
|
},
|
|
527
|
+
'./gro_config.js': {
|
|
528
|
+
path: 'gro_config.ts',
|
|
529
|
+
declarations: [
|
|
530
|
+
{ name: 'Gro_Config', kind: 'type' },
|
|
531
|
+
{ name: 'Raw_Gro_Config', kind: 'type' },
|
|
532
|
+
{ name: 'Create_Gro_Config', kind: 'type' },
|
|
533
|
+
{ name: 'create_empty_gro_config', kind: 'function' },
|
|
534
|
+
{ name: 'DEFAULT_SEARCH_EXCLUDER', kind: 'variable' },
|
|
535
|
+
{ name: 'DEFAULT_EXPORTS_EXCLUDER', kind: 'variable' },
|
|
536
|
+
{ name: 'normalize_gro_config', kind: 'function' },
|
|
537
|
+
{ name: 'Gro_Config_Module', kind: 'type' },
|
|
538
|
+
{ name: 'load_gro_config', kind: 'function' },
|
|
539
|
+
{ name: 'validate_gro_config_module', kind: 'function' },
|
|
540
|
+
],
|
|
541
|
+
},
|
|
542
542
|
'./gro_helpers.js': {
|
|
543
543
|
path: 'gro_helpers.ts',
|
|
544
544
|
declarations: [
|
package/dist/run_gen.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Timings } from '@ryanatkn/belt/timings.js';
|
|
|
2
2
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
3
3
|
import { type Gen_Results, type Genfile_Module_Meta } from './gen.js';
|
|
4
4
|
import type { format_file as base_format_file } from './format_file.js';
|
|
5
|
-
import type { Gro_Config } from './
|
|
5
|
+
import type { Gro_Config } from './gro_config.js';
|
|
6
6
|
export declare const GEN_NO_PROD_MESSAGE = "gen runs only during development";
|
|
7
7
|
export declare const run_gen: (gen_modules: Genfile_Module_Meta[], config: Gro_Config, log: Logger, timings: Timings, format_file?: typeof base_format_file) => Promise<Gen_Results>;
|
|
8
8
|
//# sourceMappingURL=run_gen.d.ts.map
|
package/dist/run_gen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_gen.d.ts","sourceRoot":"../src/lib/","sources":["run_gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,EACN,KAAK,WAAW,EAGhB,KAAK,mBAAmB,EAGxB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAC,WAAW,IAAI,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"run_gen.d.ts","sourceRoot":"../src/lib/","sources":["run_gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,EACN,KAAK,WAAW,EAGhB,KAAK,mBAAmB,EAGxB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAC,WAAW,IAAI,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,mBAAmB,qCAAqC,CAAC;AAEtE,eAAO,MAAM,OAAO,gBACN,mBAAmB,EAAE,UAC1B,UAAU,OACb,MAAM,WACF,OAAO,gBACF,OAAO,gBAAgB,KACnC,OAAO,CAAC,WAAW,CAoErB,CAAC"}
|
package/dist/run_task.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Timings } from '@ryanatkn/belt/timings.js';
|
|
2
2
|
import { type Args } from './args.js';
|
|
3
3
|
import type { invoke_task as base_invoke_task } from './invoke_task.js';
|
|
4
|
-
import type { Gro_Config } from './
|
|
4
|
+
import type { Gro_Config } from './gro_config.js';
|
|
5
5
|
import { type Task_Module_Meta } from './task.js';
|
|
6
6
|
export type Run_Task_Result = {
|
|
7
7
|
ok: true;
|
package/dist/run_task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_task.d.ts","sourceRoot":"../src/lib/","sources":["run_task.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAC,WAAW,IAAI,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEtE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"run_task.d.ts","sourceRoot":"../src/lib/","sources":["run_task.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAC,WAAW,IAAI,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEtE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAa,KAAK,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAG5D,MAAM,MAAM,eAAe,GACxB;IACA,EAAE,EAAE,IAAI,CAAC;IACT,MAAM,EAAE,OAAO,CAAC;CACf,GACD;IACA,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;CACZ,CAAC;AAEL,eAAO,MAAM,QAAQ,cACT,gBAAgB,iBACZ,IAAI,eACN,OAAO,gBAAgB,UAC5B,UAAU,WACT,OAAO,KACd,OAAO,CAAC,eAAe,CA8CzB,CAAC"}
|
package/dist/task.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Timings } from '@ryanatkn/belt/timings.js';
|
|
|
4
4
|
import type { Result } from '@ryanatkn/belt/result.js';
|
|
5
5
|
import type { Args } from './args.js';
|
|
6
6
|
import type { Path_Id } from './path.js';
|
|
7
|
-
import type { Gro_Config } from './
|
|
7
|
+
import type { Gro_Config } from './gro_config.js';
|
|
8
8
|
import type { Parsed_Sveltekit_Config } from './sveltekit_config.js';
|
|
9
9
|
import { type Input_Path, type Resolved_Input_File, type Resolved_Input_Path } from './input_path.js';
|
|
10
10
|
import { type Load_Modules_Failure, type Module_Meta } from './modules.js';
|
package/dist/task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"../src/lib/","sources":["task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,KAAK,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;AAEvD,OAAO,K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G,GAAG,IAAI,WACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryanatkn/gro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.132.0",
|
|
4
4
|
"description": "task runner and toolkit extending SvelteKit",
|
|
5
5
|
"motto": "generate, run, optimize",
|
|
6
6
|
"glyph": "🌰",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@changesets/changelog-git": "^0.2.0",
|
|
70
70
|
"@changesets/types": "^6.0.0",
|
|
71
71
|
"@ryanatkn/eslint-config": "^0.4.2",
|
|
72
|
-
"@ryanatkn/fuz": "^0.
|
|
72
|
+
"@ryanatkn/fuz": "^0.111.0",
|
|
73
73
|
"@ryanatkn/moss": "^0.8.0",
|
|
74
74
|
"@sveltejs/adapter-static": "^3.0.2",
|
|
75
75
|
"@sveltejs/kit": "^2.5.18",
|
|
@@ -158,10 +158,6 @@
|
|
|
158
158
|
"types": "./dist/commit.task.d.ts",
|
|
159
159
|
"default": "./dist/commit.task.js"
|
|
160
160
|
},
|
|
161
|
-
"./config.js": {
|
|
162
|
-
"types": "./dist/config.d.ts",
|
|
163
|
-
"default": "./dist/config.js"
|
|
164
|
-
},
|
|
165
161
|
"./deploy.task.js": {
|
|
166
162
|
"types": "./dist/deploy.task.d.ts",
|
|
167
163
|
"default": "./dist/deploy.task.js"
|
|
@@ -234,6 +230,10 @@
|
|
|
234
230
|
"types": "./dist/github.d.ts",
|
|
235
231
|
"default": "./dist/github.js"
|
|
236
232
|
},
|
|
233
|
+
"./gro_config.js": {
|
|
234
|
+
"types": "./dist/gro_config.d.ts",
|
|
235
|
+
"default": "./dist/gro_config.js"
|
|
236
|
+
},
|
|
237
237
|
"./gro_helpers.js": {
|
|
238
238
|
"types": "./dist/gro_helpers.d.ts",
|
|
239
239
|
"default": "./dist/gro_helpers.js"
|
package/src/lib/gen.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {existsSync} from 'node:fs';
|
|
|
9
9
|
|
|
10
10
|
import {print_path} from './paths.js';
|
|
11
11
|
import type {Path_Id} from './path.js';
|
|
12
|
-
import type {Gro_Config} from './
|
|
12
|
+
import type {Gro_Config} from './gro_config.js';
|
|
13
13
|
import type {Parsed_Sveltekit_Config} from './sveltekit_config.js';
|
|
14
14
|
import {load_modules, type Load_Modules_Failure, type Module_Meta} from './modules.js';
|
|
15
15
|
import {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {Create_Gro_Config} from './
|
|
1
|
+
import type {Create_Gro_Config} from './gro_config.js';
|
|
2
2
|
import {gro_plugin_sveltekit_library} from './gro_plugin_sveltekit_library.js';
|
|
3
3
|
import {has_server, gro_plugin_server} from './gro_plugin_server.js';
|
|
4
4
|
import {gro_plugin_sveltekit_app} from './gro_plugin_sveltekit_app.js';
|
|
@@ -58,7 +58,7 @@ export type Create_Gro_Config = (
|
|
|
58
58
|
base_config: Gro_Config,
|
|
59
59
|
) => Raw_Gro_Config | Promise<Raw_Gro_Config>;
|
|
60
60
|
|
|
61
|
-
export const
|
|
61
|
+
export const create_empty_gro_config = (): Gro_Config => ({
|
|
62
62
|
plugins: () => [],
|
|
63
63
|
map_package_json: default_map_package_json,
|
|
64
64
|
task_root_dirs: [
|
|
@@ -103,8 +103,8 @@ export const DEFAULT_EXPORTS_EXCLUDER = /(\.md|\.(test|ignore)\.|\/(test|fixture
|
|
|
103
103
|
* Transforms a `Raw_Gro_Config` to the more strict `Gro_Config`.
|
|
104
104
|
* This allows users to provide a more relaxed config.
|
|
105
105
|
*/
|
|
106
|
-
export const
|
|
107
|
-
const empty_config =
|
|
106
|
+
export const normalize_gro_config = (raw_config: Raw_Gro_Config): Gro_Config => {
|
|
107
|
+
const empty_config = create_empty_gro_config();
|
|
108
108
|
// All of the raw config properties are optional,
|
|
109
109
|
// so fall back to the empty values when `undefined`.
|
|
110
110
|
const {
|
|
@@ -129,8 +129,10 @@ export interface Gro_Config_Module {
|
|
|
129
129
|
readonly default: Raw_Gro_Config | Create_Gro_Config;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
export const
|
|
133
|
-
const default_config =
|
|
132
|
+
export const load_gro_config = async (dir = paths.root): Promise<Gro_Config> => {
|
|
133
|
+
const default_config = normalize_gro_config(
|
|
134
|
+
await create_default_config(create_empty_gro_config()),
|
|
135
|
+
);
|
|
134
136
|
const config_path = join(dir, GRO_CONFIG_PATH);
|
|
135
137
|
if (!existsSync(config_path)) {
|
|
136
138
|
// No user config file found, so return the default.
|
|
@@ -138,15 +140,15 @@ export const load_config = async (dir = paths.root): Promise<Gro_Config> => {
|
|
|
138
140
|
}
|
|
139
141
|
// Import the user's `gro.config.ts`.
|
|
140
142
|
const config_module = await import(config_path);
|
|
141
|
-
|
|
142
|
-
return
|
|
143
|
+
validate_gro_config_module(config_module, config_path);
|
|
144
|
+
return normalize_gro_config(
|
|
143
145
|
typeof config_module.default === 'function'
|
|
144
146
|
? await config_module.default(default_config)
|
|
145
147
|
: config_module.default,
|
|
146
148
|
);
|
|
147
149
|
};
|
|
148
150
|
|
|
149
|
-
export const
|
|
151
|
+
export const validate_gro_config_module: (
|
|
150
152
|
config_module: any,
|
|
151
153
|
config_path: string,
|
|
152
154
|
) => asserts config_module is Gro_Config_Module = (config_module, config_path) => {
|
|
@@ -8,7 +8,7 @@ import {serialize_package_json, type Map_Package_Json, load_package_json} from '
|
|
|
8
8
|
import {Task_Error} from './task.js';
|
|
9
9
|
import {find_cli, spawn_cli, spawn_cli_process} from './cli.js';
|
|
10
10
|
import {type Map_Src_Json, serialize_src_json, create_src_json} from './src_json.js';
|
|
11
|
-
import {DEFAULT_EXPORTS_EXCLUDER} from './
|
|
11
|
+
import {DEFAULT_EXPORTS_EXCLUDER} from './gro_config.js';
|
|
12
12
|
import {sveltekit_config_global} from './sveltekit_config_global.js';
|
|
13
13
|
import {SOURCE_DIRNAME} from './path_constants.js';
|
|
14
14
|
import {VITE_CLI} from './sveltekit_helpers.js';
|
package/src/lib/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type {Gro_Config, Create_Gro_Config, Raw_Gro_Config} from './
|
|
1
|
+
export type {Gro_Config, Create_Gro_Config, Raw_Gro_Config} from './gro_config.js';
|
|
2
2
|
export {type Plugin, replace_plugin} from './plugin.js';
|
|
3
3
|
export type {Gen, Gen_Context} from './gen.js';
|
|
4
4
|
export {type Task, type Task_Context, Task_Error} from './task.js';
|
package/src/lib/invoke.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {attach_process_error_handlers} from '@ryanatkn/belt/process.js';
|
|
|
2
2
|
|
|
3
3
|
import {invoke_task} from './invoke_task.js';
|
|
4
4
|
import {to_task_args} from './args.js';
|
|
5
|
-
import {
|
|
5
|
+
import {load_gro_config} from './gro_config.js';
|
|
6
6
|
import {sveltekit_sync_if_obviously_needed} from './sveltekit_helpers.js';
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -24,4 +24,4 @@ attach_process_error_handlers((err) =>
|
|
|
24
24
|
await sveltekit_sync_if_obviously_needed();
|
|
25
25
|
|
|
26
26
|
const {task_name, args} = to_task_args();
|
|
27
|
-
await invoke_task(task_name, args, await
|
|
27
|
+
await invoke_task(task_name, args, await load_gro_config());
|
package/src/lib/invoke_task.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {to_input_path, Raw_Input_Path} from './input_path.js';
|
|
|
9
9
|
import {find_tasks, load_tasks} from './task.js';
|
|
10
10
|
import {load_gro_package_json} from './package_json.js';
|
|
11
11
|
import {log_tasks, log_error_reasons} from './task_logging.js';
|
|
12
|
-
import type {Gro_Config} from './
|
|
12
|
+
import type {Gro_Config} from './gro_config.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Invokes Gro tasks by name using the filesystem as the source.
|
package/src/lib/package.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {Src_Json} from './src_json.js';
|
|
|
5
5
|
|
|
6
6
|
export const package_json = {
|
|
7
7
|
name: '@ryanatkn/gro',
|
|
8
|
-
version: '0.
|
|
8
|
+
version: '0.132.0',
|
|
9
9
|
description: 'task runner and toolkit extending SvelteKit',
|
|
10
10
|
motto: 'generate, run, optimize',
|
|
11
11
|
glyph: '🌰',
|
|
@@ -61,7 +61,7 @@ export const package_json = {
|
|
|
61
61
|
'@changesets/changelog-git': '^0.2.0',
|
|
62
62
|
'@changesets/types': '^6.0.0',
|
|
63
63
|
'@ryanatkn/eslint-config': '^0.4.2',
|
|
64
|
-
'@ryanatkn/fuz': '^0.
|
|
64
|
+
'@ryanatkn/fuz': '^0.111.0',
|
|
65
65
|
'@ryanatkn/moss': '^0.8.0',
|
|
66
66
|
'@sveltejs/adapter-static': '^3.0.2',
|
|
67
67
|
'@sveltejs/kit': '^2.5.18',
|
|
@@ -107,7 +107,6 @@ export const package_json = {
|
|
|
107
107
|
'./clean.task.js': {types: './dist/clean.task.d.ts', default: './dist/clean.task.js'},
|
|
108
108
|
'./cli.js': {types: './dist/cli.d.ts', default: './dist/cli.js'},
|
|
109
109
|
'./commit.task.js': {types: './dist/commit.task.d.ts', default: './dist/commit.task.js'},
|
|
110
|
-
'./config.js': {types: './dist/config.d.ts', default: './dist/config.js'},
|
|
111
110
|
'./deploy.task.js': {types: './dist/deploy.task.d.ts', default: './dist/deploy.task.js'},
|
|
112
111
|
'./dev.task.js': {types: './dist/dev.task.d.ts', default: './dist/dev.task.js'},
|
|
113
112
|
'./env.js': {types: './dist/env.d.ts', default: './dist/env.js'},
|
|
@@ -150,6 +149,7 @@ export const package_json = {
|
|
|
150
149
|
'./gen.js': {types: './dist/gen.d.ts', default: './dist/gen.js'},
|
|
151
150
|
'./git.js': {types: './dist/git.d.ts', default: './dist/git.js'},
|
|
152
151
|
'./github.js': {types: './dist/github.d.ts', default: './dist/github.js'},
|
|
152
|
+
'./gro_config.js': {types: './dist/gro_config.d.ts', default: './dist/gro_config.js'},
|
|
153
153
|
'./gro_helpers.js': {types: './dist/gro_helpers.d.ts', default: './dist/gro_helpers.js'},
|
|
154
154
|
'./gro_plugin_gen.js': {
|
|
155
155
|
types: './dist/gro_plugin_gen.d.ts',
|
|
@@ -272,7 +272,7 @@ export const package_json = {
|
|
|
272
272
|
|
|
273
273
|
export const src_json = {
|
|
274
274
|
name: '@ryanatkn/gro',
|
|
275
|
-
version: '0.
|
|
275
|
+
version: '0.132.0',
|
|
276
276
|
modules: {
|
|
277
277
|
'.': {
|
|
278
278
|
path: 'index.ts',
|
|
@@ -367,21 +367,6 @@ export const src_json = {
|
|
|
367
367
|
{name: 'task', kind: 'variable'},
|
|
368
368
|
],
|
|
369
369
|
},
|
|
370
|
-
'./config.js': {
|
|
371
|
-
path: 'config.ts',
|
|
372
|
-
declarations: [
|
|
373
|
-
{name: 'Gro_Config', kind: 'type'},
|
|
374
|
-
{name: 'Raw_Gro_Config', kind: 'type'},
|
|
375
|
-
{name: 'Create_Gro_Config', kind: 'type'},
|
|
376
|
-
{name: 'create_empty_config', kind: 'function'},
|
|
377
|
-
{name: 'DEFAULT_SEARCH_EXCLUDER', kind: 'variable'},
|
|
378
|
-
{name: 'DEFAULT_EXPORTS_EXCLUDER', kind: 'variable'},
|
|
379
|
-
{name: 'normalize_config', kind: 'function'},
|
|
380
|
-
{name: 'Gro_Config_Module', kind: 'type'},
|
|
381
|
-
{name: 'load_config', kind: 'function'},
|
|
382
|
-
{name: 'validate_config_module', kind: 'function'},
|
|
383
|
-
],
|
|
384
|
-
},
|
|
385
370
|
'./deploy.task.js': {
|
|
386
371
|
path: 'deploy.task.ts',
|
|
387
372
|
declarations: [
|
|
@@ -545,6 +530,21 @@ export const src_json = {
|
|
|
545
530
|
{name: 'github_fetch_commit_prs', kind: 'function'},
|
|
546
531
|
],
|
|
547
532
|
},
|
|
533
|
+
'./gro_config.js': {
|
|
534
|
+
path: 'gro_config.ts',
|
|
535
|
+
declarations: [
|
|
536
|
+
{name: 'Gro_Config', kind: 'type'},
|
|
537
|
+
{name: 'Raw_Gro_Config', kind: 'type'},
|
|
538
|
+
{name: 'Create_Gro_Config', kind: 'type'},
|
|
539
|
+
{name: 'create_empty_gro_config', kind: 'function'},
|
|
540
|
+
{name: 'DEFAULT_SEARCH_EXCLUDER', kind: 'variable'},
|
|
541
|
+
{name: 'DEFAULT_EXPORTS_EXCLUDER', kind: 'variable'},
|
|
542
|
+
{name: 'normalize_gro_config', kind: 'function'},
|
|
543
|
+
{name: 'Gro_Config_Module', kind: 'type'},
|
|
544
|
+
{name: 'load_gro_config', kind: 'function'},
|
|
545
|
+
{name: 'validate_gro_config_module', kind: 'function'},
|
|
546
|
+
],
|
|
547
|
+
},
|
|
548
548
|
'./gro_helpers.js': {
|
|
549
549
|
path: 'gro_helpers.ts',
|
|
550
550
|
declarations: [
|
package/src/lib/run_gen.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from './gen.js';
|
|
14
14
|
import {print_path} from './paths.js';
|
|
15
15
|
import type {format_file as base_format_file} from './format_file.js';
|
|
16
|
-
import type {Gro_Config} from './
|
|
16
|
+
import type {Gro_Config} from './gro_config.js';
|
|
17
17
|
import {sveltekit_config_global} from './sveltekit_config_global.js';
|
|
18
18
|
|
|
19
19
|
export const GEN_NO_PROD_MESSAGE = 'gen runs only during development';
|
package/src/lib/run_task.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {Timings} from '@ryanatkn/belt/timings.js';
|
|
|
5
5
|
import {parse_args, type Args} from './args.js';
|
|
6
6
|
import type {invoke_task as base_invoke_task} from './invoke_task.js';
|
|
7
7
|
import {log_task_help} from './task_logging.js';
|
|
8
|
-
import type {Gro_Config} from './
|
|
8
|
+
import type {Gro_Config} from './gro_config.js';
|
|
9
9
|
import {Task_Error, type Task_Module_Meta} from './task.js';
|
|
10
10
|
import {sveltekit_config_global} from './sveltekit_config_global.js';
|
|
11
11
|
|
package/src/lib/task.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {isAbsolute, join, relative} from 'node:path';
|
|
|
8
8
|
|
|
9
9
|
import type {Args} from './args.js';
|
|
10
10
|
import type {Path_Id} from './path.js';
|
|
11
|
-
import type {Gro_Config} from './
|
|
11
|
+
import type {Gro_Config} from './gro_config.js';
|
|
12
12
|
import type {Parsed_Sveltekit_Config} from './sveltekit_config.js';
|
|
13
13
|
import {
|
|
14
14
|
resolve_input_files,
|
package/dist/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"../src/lib/","sources":["config.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,WAAW,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,OAAO,EAAE,qBAAqB,CAAC;IAC/B;;;;OAIG;IACH,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC1C;;;OAGG;IACH,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B;;;OAGG;IACH,cAAc,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,WAAW,GAAG,WAAW,EAAE,GAAG,IAAI,CAAC;CACpD;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC/B,WAAW,EAAE,UAAU,KACnB,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAE9C,eAAO,MAAM,mBAAmB,QAAO,UAUrC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAUnC,CAAC;AAWF,eAAO,MAAM,wBAAwB,QA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