@ryanatkn/gro 0.164.0 → 0.164.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gro.config.default.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gro.config.default.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gro.config.default.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gro.config.default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAUvD;;;;;;;;GAQG;AACH,QAAA,MAAM,MAAM,EAAE,iBAsBb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
-
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
-
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
-
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
return path;
|
|
8
|
-
};
|
|
9
|
-
import { resolve } from 'node:path';
|
|
10
1
|
import { gro_plugin_sveltekit_library } from "./gro_plugin_sveltekit_library.js";
|
|
11
2
|
import { has_server, gro_plugin_server } from "./gro_plugin_server.js";
|
|
12
3
|
import { gro_plugin_sveltekit_app } from "./gro_plugin_sveltekit_app.js";
|
|
13
4
|
import { has_sveltekit_app, has_sveltekit_library } from "./sveltekit_helpers.js";
|
|
14
5
|
import { gro_plugin_gen } from "./gro_plugin_gen.js";
|
|
15
|
-
import {
|
|
16
|
-
import { find_first_existing_file } from "./search_fs.js";
|
|
6
|
+
import { load_package_json } from "./package_json.js";
|
|
17
7
|
// TODO hacky, maybe extract utils?
|
|
18
8
|
/**
|
|
19
9
|
* This is the default config that's passed to `gro.config.ts`
|
|
@@ -26,25 +16,13 @@ import { find_first_existing_file } from "./search_fs.js";
|
|
|
26
16
|
*/
|
|
27
17
|
const config = async (cfg, svelte_config) => {
|
|
28
18
|
const package_json = load_package_json(); // TODO gets wastefully loaded by some plugins, maybe put in plugin/task context? how does that interact with `map_package_json`?
|
|
29
|
-
const [
|
|
30
|
-
has_dep('@ryanatkn/moss', package_json),
|
|
19
|
+
const [has_server_result, has_sveltekit_library_result, has_sveltekit_app_result] = await Promise.all([
|
|
31
20
|
has_server(),
|
|
32
21
|
has_sveltekit_library(package_json, svelte_config),
|
|
33
22
|
has_sveltekit_app(),
|
|
34
23
|
]);
|
|
35
|
-
const local_moss_plugin_path = find_first_existing_file([
|
|
36
|
-
'./src/lib/gro_plugin_moss.ts',
|
|
37
|
-
'./src/gro_plugin_moss.ts',
|
|
38
|
-
'./src/routes/gro_plugin_moss.ts', // TODO probably remove this
|
|
39
|
-
]);
|
|
40
24
|
// put things that generate files before SvelteKit so it can see them
|
|
41
|
-
cfg.plugins =
|
|
42
|
-
// TODO probably belongs in the gen system
|
|
43
|
-
local_moss_plugin_path
|
|
44
|
-
? (await import(__rewriteRelativeImportExtension(resolve(local_moss_plugin_path), true))).gro_plugin_moss()
|
|
45
|
-
: has_moss_dep
|
|
46
|
-
? (await import('@ryanatkn/moss/gro_plugin_moss.js')).gro_plugin_moss()
|
|
47
|
-
: null, // lazy load to avoid errors if it's not installed
|
|
25
|
+
cfg.plugins = () => [
|
|
48
26
|
gro_plugin_gen(),
|
|
49
27
|
has_server_result.ok ? gro_plugin_server() : null,
|
|
50
28
|
has_sveltekit_library_result.ok ? gro_plugin_sveltekit_library() : null,
|
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.164.
|
|
4
|
+
version: '0.164.1',
|
|
5
5
|
description: 'task runner and toolkit extending SvelteKit',
|
|
6
6
|
motto: 'generate, run, optimize',
|
|
7
7
|
glyph: '🌰',
|
|
@@ -59,13 +59,13 @@ export const package_json = {
|
|
|
59
59
|
vitest: '^3',
|
|
60
60
|
},
|
|
61
61
|
peerDependenciesMeta: { '@sveltejs/kit': { optional: true }, vitest: { optional: true } },
|
|
62
|
-
optionalDependencies: { '@ryanatkn/moss': '>=0.
|
|
62
|
+
optionalDependencies: { '@ryanatkn/moss': '>=0.33.0', vitest: '^3' },
|
|
63
63
|
devDependencies: {
|
|
64
64
|
'@changesets/changelog-git': '^0.2.1',
|
|
65
65
|
'@changesets/types': '^6.1.0',
|
|
66
66
|
'@ryanatkn/eslint-config': '^0.8.0',
|
|
67
67
|
'@ryanatkn/fuz': '^0.145.0',
|
|
68
|
-
'@ryanatkn/moss': '^0.
|
|
68
|
+
'@ryanatkn/moss': '^0.33.0',
|
|
69
69
|
'@sveltejs/adapter-static': '^3.0.9',
|
|
70
70
|
'@sveltejs/kit': '^2.37.1',
|
|
71
71
|
'@sveltejs/package': '^2.5.0',
|
|
@@ -266,7 +266,7 @@ export const package_json = {
|
|
|
266
266
|
};
|
|
267
267
|
export const src_json = {
|
|
268
268
|
name: '@ryanatkn/gro',
|
|
269
|
-
version: '0.164.
|
|
269
|
+
version: '0.164.1',
|
|
270
270
|
modules: {
|
|
271
271
|
'.': {
|
|
272
272
|
path: 'index.ts',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryanatkn/gro",
|
|
3
|
-
"version": "0.164.
|
|
3
|
+
"version": "0.164.1",
|
|
4
4
|
"description": "task runner and toolkit extending SvelteKit",
|
|
5
5
|
"motto": "generate, run, optimize",
|
|
6
6
|
"glyph": "🌰",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"optionalDependencies": {
|
|
80
|
-
"@ryanatkn/moss": ">=0.
|
|
80
|
+
"@ryanatkn/moss": ">=0.33.0",
|
|
81
81
|
"vitest": "^3"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@changesets/types": "^6.1.0",
|
|
86
86
|
"@ryanatkn/eslint-config": "^0.8.0",
|
|
87
87
|
"@ryanatkn/fuz": "^0.145.0",
|
|
88
|
-
"@ryanatkn/moss": "^0.
|
|
88
|
+
"@ryanatkn/moss": "^0.33.0",
|
|
89
89
|
"@sveltejs/adapter-static": "^3.0.9",
|
|
90
90
|
"@sveltejs/kit": "^2.37.1",
|
|
91
91
|
"@sveltejs/package": "^2.5.0",
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {resolve} from 'node:path';
|
|
2
|
-
|
|
3
1
|
import type {Create_Gro_Config} from './gro_config.ts';
|
|
4
2
|
import {gro_plugin_sveltekit_library} from './gro_plugin_sveltekit_library.ts';
|
|
5
3
|
import {has_server, gro_plugin_server} from './gro_plugin_server.ts';
|
|
6
4
|
import {gro_plugin_sveltekit_app} from './gro_plugin_sveltekit_app.ts';
|
|
7
5
|
import {has_sveltekit_app, has_sveltekit_library} from './sveltekit_helpers.ts';
|
|
8
6
|
import {gro_plugin_gen} from './gro_plugin_gen.ts';
|
|
9
|
-
import {
|
|
10
|
-
import {find_first_existing_file} from './search_fs.ts';
|
|
7
|
+
import {load_package_json} from './package_json.ts';
|
|
11
8
|
|
|
12
9
|
// TODO hacky, maybe extract utils?
|
|
13
10
|
|
|
@@ -23,29 +20,16 @@ import {find_first_existing_file} from './search_fs.ts';
|
|
|
23
20
|
const config: Create_Gro_Config = async (cfg, svelte_config) => {
|
|
24
21
|
const package_json = load_package_json(); // TODO gets wastefully loaded by some plugins, maybe put in plugin/task context? how does that interact with `map_package_json`?
|
|
25
22
|
|
|
26
|
-
const [
|
|
23
|
+
const [has_server_result, has_sveltekit_library_result, has_sveltekit_app_result] =
|
|
27
24
|
await Promise.all([
|
|
28
|
-
has_dep('@ryanatkn/moss', package_json),
|
|
29
25
|
has_server(),
|
|
30
26
|
has_sveltekit_library(package_json, svelte_config),
|
|
31
27
|
has_sveltekit_app(),
|
|
32
28
|
]);
|
|
33
29
|
|
|
34
|
-
const local_moss_plugin_path = find_first_existing_file([
|
|
35
|
-
'./src/lib/gro_plugin_moss.ts',
|
|
36
|
-
'./src/gro_plugin_moss.ts',
|
|
37
|
-
'./src/routes/gro_plugin_moss.ts', // TODO probably remove this
|
|
38
|
-
]);
|
|
39
|
-
|
|
40
30
|
// put things that generate files before SvelteKit so it can see them
|
|
41
|
-
cfg.plugins =
|
|
31
|
+
cfg.plugins = () =>
|
|
42
32
|
[
|
|
43
|
-
// TODO probably belongs in the gen system
|
|
44
|
-
local_moss_plugin_path
|
|
45
|
-
? (await import(resolve(local_moss_plugin_path))).gro_plugin_moss()
|
|
46
|
-
: has_moss_dep
|
|
47
|
-
? (await import('@ryanatkn/moss/gro_plugin_moss.js')).gro_plugin_moss()
|
|
48
|
-
: null, // lazy load to avoid errors if it's not installed
|
|
49
33
|
gro_plugin_gen(),
|
|
50
34
|
has_server_result.ok ? gro_plugin_server() : null,
|
|
51
35
|
has_sveltekit_library_result.ok ? gro_plugin_sveltekit_library() : null,
|
package/src/lib/package.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {Src_Json} from '@ryanatkn/belt/src_json.js';
|
|
|
5
5
|
|
|
6
6
|
export const package_json: Package_Json = {
|
|
7
7
|
name: '@ryanatkn/gro',
|
|
8
|
-
version: '0.164.
|
|
8
|
+
version: '0.164.1',
|
|
9
9
|
description: 'task runner and toolkit extending SvelteKit',
|
|
10
10
|
motto: 'generate, run, optimize',
|
|
11
11
|
glyph: '🌰',
|
|
@@ -64,13 +64,13 @@ export const package_json: Package_Json = {
|
|
|
64
64
|
vitest: '^3',
|
|
65
65
|
},
|
|
66
66
|
peerDependenciesMeta: {'@sveltejs/kit': {optional: true}, vitest: {optional: true}},
|
|
67
|
-
optionalDependencies: {'@ryanatkn/moss': '>=0.
|
|
67
|
+
optionalDependencies: {'@ryanatkn/moss': '>=0.33.0', vitest: '^3'},
|
|
68
68
|
devDependencies: {
|
|
69
69
|
'@changesets/changelog-git': '^0.2.1',
|
|
70
70
|
'@changesets/types': '^6.1.0',
|
|
71
71
|
'@ryanatkn/eslint-config': '^0.8.0',
|
|
72
72
|
'@ryanatkn/fuz': '^0.145.0',
|
|
73
|
-
'@ryanatkn/moss': '^0.
|
|
73
|
+
'@ryanatkn/moss': '^0.33.0',
|
|
74
74
|
'@sveltejs/adapter-static': '^3.0.9',
|
|
75
75
|
'@sveltejs/kit': '^2.37.1',
|
|
76
76
|
'@sveltejs/package': '^2.5.0',
|
|
@@ -272,7 +272,7 @@ export const package_json: Package_Json = {
|
|
|
272
272
|
|
|
273
273
|
export const src_json: Src_Json = {
|
|
274
274
|
name: '@ryanatkn/gro',
|
|
275
|
-
version: '0.164.
|
|
275
|
+
version: '0.164.1',
|
|
276
276
|
modules: {
|
|
277
277
|
'.': {
|
|
278
278
|
path: 'index.ts',
|