@ryanatkn/gro 0.154.0 → 0.156.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/build.task.d.ts +1 -1
- package/dist/build.task.js +2 -2
- package/dist/changelog.js +1 -1
- package/dist/changeset.task.d.ts +1 -1
- package/dist/changeset.task.js +6 -6
- package/dist/check.task.d.ts +1 -1
- package/dist/check.task.js +3 -3
- package/dist/clean.task.d.ts +1 -1
- package/dist/clean.task.js +2 -2
- package/dist/clean_fs.js +2 -2
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +2 -2
- package/dist/commit.task.d.ts +1 -1
- package/dist/commit.task.js +1 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -1
- package/dist/deploy.task.d.ts +1 -1
- package/dist/deploy.task.js +5 -5
- package/dist/dev.task.d.ts +2 -2
- package/dist/dev.task.js +2 -2
- package/dist/esbuild_helpers.d.ts +1 -1
- package/dist/esbuild_helpers.d.ts.map +1 -1
- package/dist/esbuild_helpers.js +1 -2
- package/dist/esbuild_plugin_external_worker.d.ts +1 -1
- package/dist/esbuild_plugin_external_worker.js +7 -7
- package/dist/esbuild_plugin_svelte.d.ts +1 -1
- package/dist/esbuild_plugin_svelte.js +4 -4
- package/dist/esbuild_plugin_sveltekit_local_imports.js +2 -2
- package/dist/esbuild_plugin_sveltekit_shim_app.d.ts +1 -1
- package/dist/esbuild_plugin_sveltekit_shim_app.js +2 -2
- package/dist/esbuild_plugin_sveltekit_shim_env.js +3 -3
- package/dist/filer.d.ts +3 -3
- package/dist/filer.js +6 -6
- package/dist/format.task.d.ts +1 -1
- package/dist/format.task.js +3 -3
- package/dist/format_directory.d.ts +1 -1
- package/dist/format_directory.js +5 -5
- package/dist/format_file.js +1 -1
- package/dist/gen.d.ts +5 -5
- package/dist/gen.js +4 -4
- package/dist/gen.task.d.ts +1 -1
- package/dist/gen.task.js +8 -8
- package/dist/git.js +1 -1
- package/dist/gro.config.default.d.ts +1 -1
- package/dist/gro.config.default.js +16 -8
- package/dist/gro.d.ts +1 -1
- package/dist/gro.js +3 -2
- package/dist/gro_config.d.ts +4 -4
- package/dist/gro_config.js +12 -4
- package/dist/gro_helpers.d.ts.map +1 -1
- package/dist/gro_helpers.js +5 -2
- package/dist/gro_plugin_gen.d.ts +2 -2
- package/dist/gro_plugin_gen.js +4 -4
- package/dist/gro_plugin_server.d.ts +1 -1
- package/dist/gro_plugin_server.js +11 -11
- package/dist/gro_plugin_sveltekit_app.d.ts +3 -3
- package/dist/gro_plugin_sveltekit_app.js +10 -10
- package/dist/gro_plugin_sveltekit_library.d.ts +2 -2
- package/dist/gro_plugin_sveltekit_library.js +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/input_path.d.ts +1 -1
- package/dist/input_path.js +3 -3
- package/dist/invoke.js +4 -4
- package/dist/invoke_task.d.ts +4 -4
- package/dist/invoke_task.js +7 -7
- package/dist/lint.task.d.ts +1 -1
- package/dist/lint.task.js +3 -3
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +70 -47
- package/dist/module.js +2 -2
- package/dist/modules.d.ts +2 -2
- package/dist/modules.js +10 -2
- package/dist/package.d.ts +1 -0
- package/dist/package.d.ts.map +1 -1
- package/dist/package.gen.d.ts +1 -1
- package/dist/package.gen.js +5 -5
- package/dist/package.js +6 -6
- package/dist/package_json.js +5 -5
- package/dist/package_meta.d.ts +2 -2
- package/dist/package_meta.js +1 -1
- package/dist/parse_imports.d.ts +1 -1
- package/dist/parse_imports.js +2 -2
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +2 -2
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.d.ts.map +1 -1
- package/dist/publish.task.d.ts +1 -1
- package/dist/publish.task.js +8 -8
- package/dist/reinstall.task.d.ts +1 -1
- package/dist/reinstall.task.js +2 -2
- package/dist/release.task.d.ts +1 -1
- package/dist/release.task.js +2 -2
- package/dist/resolve.task.d.ts +1 -1
- package/dist/resolve.task.js +2 -2
- package/dist/resolve_specifier.d.ts +1 -1
- package/dist/resolve_specifier.js +1 -1
- package/dist/run.task.d.ts +1 -1
- package/dist/run.task.js +2 -2
- package/dist/run_gen.d.ts +3 -3
- package/dist/run_gen.js +3 -3
- package/dist/run_task.d.ts +5 -5
- package/dist/run_task.js +4 -4
- package/dist/search_fs.d.ts +1 -1
- package/dist/src_json.d.ts +1 -1
- package/dist/src_json.js +2 -2
- package/dist/svelte_config.js +10 -2
- package/dist/sveltekit_helpers.d.ts +3 -3
- package/dist/sveltekit_helpers.js +6 -6
- package/dist/sveltekit_shim_app.d.ts +1 -1
- package/dist/sveltekit_shim_app_state.js +1 -1
- package/dist/sveltekit_shim_env.js +1 -1
- package/dist/sync.task.d.ts +1 -1
- package/dist/sync.task.js +3 -3
- package/dist/task.d.ts +7 -7
- package/dist/task.js +4 -4
- package/dist/task_logging.d.ts +1 -1
- package/dist/task_logging.js +1 -1
- package/dist/test.task.d.ts +1 -1
- package/dist/test.task.js +3 -3
- package/dist/typecheck.task.d.ts +1 -1
- package/dist/typecheck.task.js +6 -6
- package/dist/upgrade.task.d.ts +1 -1
- package/dist/upgrade.task.js +6 -6
- package/dist/watch_dir.d.ts +1 -1
- package/package.json +5 -4
- package/src/lib/build.task.ts +3 -3
- package/src/lib/changelog.ts +1 -1
- package/src/lib/changeset.task.ts +6 -6
- package/src/lib/check.task.ts +3 -3
- package/src/lib/clean.task.ts +3 -3
- package/src/lib/clean_fs.ts +2 -2
- package/src/lib/cli.ts +3 -3
- package/src/lib/commit.task.ts +2 -2
- package/src/lib/constants.ts +0 -1
- package/src/lib/deploy.task.ts +5 -5
- package/src/lib/dev.task.ts +3 -3
- package/src/lib/esbuild_helpers.ts +2 -3
- package/src/lib/esbuild_plugin_external_worker.ts +9 -9
- package/src/lib/esbuild_plugin_svelte.ts +4 -4
- package/src/lib/esbuild_plugin_sveltekit_local_imports.ts +2 -2
- package/src/lib/esbuild_plugin_sveltekit_shim_app.ts +3 -3
- package/src/lib/esbuild_plugin_sveltekit_shim_env.ts +3 -3
- package/src/lib/filer.ts +8 -8
- package/src/lib/format.task.ts +3 -3
- package/src/lib/format_directory.ts +5 -5
- package/src/lib/format_file.ts +1 -1
- package/src/lib/gen.task.ts +8 -8
- package/src/lib/gen.ts +7 -7
- package/src/lib/git.ts +1 -1
- package/src/lib/gro.config.default.ts +8 -8
- package/src/lib/gro.ts +4 -2
- package/src/lib/gro_config.ts +7 -7
- package/src/lib/gro_helpers.ts +5 -2
- package/src/lib/gro_plugin_gen.ts +6 -6
- package/src/lib/gro_plugin_server.ts +13 -13
- package/src/lib/gro_plugin_sveltekit_app.ts +11 -11
- package/src/lib/gro_plugin_sveltekit_library.ts +4 -4
- package/src/lib/index.ts +4 -4
- package/src/lib/input_path.ts +4 -4
- package/src/lib/invoke.ts +4 -4
- package/src/lib/invoke_task.ts +8 -8
- package/src/lib/lint.task.ts +3 -3
- package/src/lib/loader.ts +75 -64
- package/src/lib/module.ts +2 -2
- package/src/lib/modules.ts +3 -3
- package/src/lib/package.gen.ts +6 -6
- package/src/lib/package.ts +8 -8
- package/src/lib/package_json.ts +5 -5
- package/src/lib/package_meta.ts +3 -3
- package/src/lib/parse_imports.ts +3 -3
- package/src/lib/paths.ts +3 -3
- package/src/lib/plugin.ts +8 -5
- package/src/lib/publish.task.ts +8 -8
- package/src/lib/reinstall.task.ts +2 -2
- package/src/lib/release.task.ts +3 -3
- package/src/lib/resolve.task.ts +2 -2
- package/src/lib/resolve_specifier.ts +2 -2
- package/src/lib/run.task.ts +2 -2
- package/src/lib/run_gen.ts +5 -5
- package/src/lib/run_task.ts +7 -7
- package/src/lib/search_fs.ts +1 -1
- package/src/lib/src_json.ts +2 -2
- package/src/lib/svelte_config.ts +1 -1
- package/src/lib/sveltekit_helpers.ts +6 -6
- package/src/lib/sveltekit_shim_app.ts +1 -1
- package/src/lib/sveltekit_shim_app_state.ts +1 -1
- package/src/lib/sveltekit_shim_env.ts +1 -1
- package/src/lib/sync.task.ts +3 -3
- package/src/lib/task.ts +9 -9
- package/src/lib/task_logging.ts +3 -3
- package/src/lib/test.task.ts +3 -3
- package/src/lib/typecheck.task.ts +6 -6
- package/src/lib/upgrade.task.ts +6 -6
- package/src/lib/watch_dir.ts +1 -1
package/dist/build.task.d.ts
CHANGED
package/dist/build.task.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { Plugins } from
|
|
3
|
-
import { clean_fs } from
|
|
2
|
+
import { Plugins } from "./plugin.js";
|
|
3
|
+
import { clean_fs } from "./clean_fs.js";
|
|
4
4
|
export const Args = z
|
|
5
5
|
.object({
|
|
6
6
|
sync: z.boolean({ description: 'dual of no-sync' }).default(true),
|
package/dist/changelog.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { github_fetch_commit_prs } from
|
|
3
|
+
import { github_fetch_commit_prs } from "./github.js";
|
|
4
4
|
/**
|
|
5
5
|
* Updates a changelog produced by `@changesets/changelog-git` with better links and formatting.
|
|
6
6
|
* It's similar to `@changesets/changelog-github` but doesn't require a token for light usage.
|
package/dist/changeset.task.d.ts
CHANGED
package/dist/changeset.task.js
CHANGED
|
@@ -4,12 +4,12 @@ import { styleText as st } from 'node:util';
|
|
|
4
4
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { existsSync, readdirSync } from 'node:fs';
|
|
7
|
-
import { Task_Error } from
|
|
8
|
-
import { find_cli, spawn_cli } from
|
|
9
|
-
import { Git_Origin, git_check_fully_staged_workspace, git_push_to_create } from
|
|
10
|
-
import { has_sveltekit_library } from
|
|
11
|
-
import { CHANGESET_CLI, CHANGESET_DIR, Changeset_Access, Changeset_Bump, CHANGESET_PUBLIC_ACCESS, CHANGESET_RESTRICTED_ACCESS, } from
|
|
12
|
-
import { load_package_json } from
|
|
7
|
+
import { Task_Error } from "./task.js";
|
|
8
|
+
import { find_cli, spawn_cli } from "./cli.js";
|
|
9
|
+
import { Git_Origin, git_check_fully_staged_workspace, git_push_to_create } from "./git.js";
|
|
10
|
+
import { has_sveltekit_library } from "./sveltekit_helpers.js";
|
|
11
|
+
import { CHANGESET_CLI, CHANGESET_DIR, Changeset_Access, Changeset_Bump, CHANGESET_PUBLIC_ACCESS, CHANGESET_RESTRICTED_ACCESS, } from "./changeset_helpers.js";
|
|
12
|
+
import { load_package_json } from "./package_json.js";
|
|
13
13
|
export const Args = z
|
|
14
14
|
.object({
|
|
15
15
|
/**
|
package/dist/check.task.d.ts
CHANGED
package/dist/check.task.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { spawn } from '@ryanatkn/belt/process.js';
|
|
3
3
|
import { styleText as st } from 'node:util';
|
|
4
|
-
import { Task_Error } from
|
|
5
|
-
import { git_check_clean_workspace } from
|
|
6
|
-
import { sync_package_json } from
|
|
4
|
+
import { Task_Error } from "./task.js";
|
|
5
|
+
import { git_check_clean_workspace } from "./git.js";
|
|
6
|
+
import { sync_package_json } from "./package_json.js";
|
|
7
7
|
export const Args = z
|
|
8
8
|
.object({
|
|
9
9
|
typecheck: z.boolean({ description: 'dual of no-typecheck' }).default(true),
|
package/dist/clean.task.d.ts
CHANGED
package/dist/clean.task.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn } from '@ryanatkn/belt/process.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { clean_fs } from
|
|
4
|
-
import { Git_Origin } from
|
|
3
|
+
import { clean_fs } from "./clean_fs.js";
|
|
4
|
+
import { Git_Origin } from "./git.js";
|
|
5
5
|
export const Args = z
|
|
6
6
|
.object({
|
|
7
7
|
build_dev: z.boolean({ description: 'delete the Gro build dev directory' }).default(false),
|
package/dist/clean_fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { rm } from 'node:fs/promises';
|
|
2
2
|
import { readdirSync } from 'node:fs';
|
|
3
|
-
import { paths } from
|
|
4
|
-
import { NODE_MODULES_DIRNAME, GRO_DIST_PREFIX, SVELTEKIT_DEV_DIRNAME, SVELTEKIT_BUILD_DIRNAME, SVELTEKIT_VITE_CACHE_PATH, SVELTEKIT_DIST_DIRNAME, } from
|
|
3
|
+
import { paths } from "./paths.js";
|
|
4
|
+
import { NODE_MODULES_DIRNAME, GRO_DIST_PREFIX, SVELTEKIT_DEV_DIRNAME, SVELTEKIT_BUILD_DIRNAME, SVELTEKIT_VITE_CACHE_PATH, SVELTEKIT_DIST_DIRNAME, } from "./constants.js";
|
|
5
5
|
export const clean_fs = async ({ build = false, build_dev = false, build_dist = false, sveltekit = false, nodemodules = false, }, rm_options = { force: true, recursive: true }) => {
|
|
6
6
|
const promises = [];
|
|
7
7
|
if (build) {
|
package/dist/cli.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type SpawnOptions } from 'node:child_process';
|
|
|
2
2
|
import { type Spawn_Result, type Spawned_Process } from '@ryanatkn/belt/process.js';
|
|
3
3
|
import { type URL } from 'node:url';
|
|
4
4
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
5
|
-
import type { Path_Id } from './path.
|
|
5
|
+
import type { Path_Id } from './path.ts';
|
|
6
6
|
export type Cli = {
|
|
7
7
|
kind: 'local';
|
|
8
8
|
name: string;
|
package/dist/cli.js
CHANGED
|
@@ -3,8 +3,8 @@ import { spawn, spawn_process, } from '@ryanatkn/belt/process.js';
|
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { existsSync } from 'node:fs';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import { NODE_MODULES_DIRNAME } from
|
|
7
|
-
import { print_command_args } from
|
|
6
|
+
import { NODE_MODULES_DIRNAME } from "./constants.js";
|
|
7
|
+
import { print_command_args } from "./args.js";
|
|
8
8
|
/**
|
|
9
9
|
* Searches the filesystem for the CLI `name`, first local to the cwd and then globally.
|
|
10
10
|
* @returns `null` if not found locally or globally
|
package/dist/commit.task.d.ts
CHANGED
package/dist/commit.task.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from '@ryanatkn/belt/process.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { Git_Origin, git_current_branch_name, git_push } from
|
|
3
|
+
import { Git_Origin, git_current_branch_name, git_push } from "./git.js";
|
|
4
4
|
export const Args = z
|
|
5
5
|
.object({
|
|
6
6
|
_: z
|
package/dist/constants.d.ts
CHANGED
|
@@ -21,7 +21,6 @@ export declare const GIT_DIRNAME = ".git";
|
|
|
21
21
|
export declare const TSCONFIG_FILENAME = "tsconfig.json";
|
|
22
22
|
export declare const TS_MATCHER: RegExp;
|
|
23
23
|
export declare const JS_MATCHER: RegExp;
|
|
24
|
-
export declare const JSON_MATCHER: RegExp;
|
|
25
24
|
/** Extracts the script content from Svelte files. */
|
|
26
25
|
export declare const SVELTE_SCRIPT_MATCHER: RegExp;
|
|
27
26
|
export declare const EVERYTHING_MATCHER: RegExp;
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/constants.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,WAAW,SAAS,CAAC;AAClC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAC9C,eAAO,MAAM,eAAe,QAAuB,CAAC;AACpD,eAAO,MAAM,UAAU,QAAuB,CAAC;AAC/C,eAAO,MAAM,OAAO,QAAoB,CAAC;AACzC,eAAO,MAAM,WAAW,QAAwB,CAAC;AACjD,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAC/C,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AACrD,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AACnD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,uBAAuB,UAAU,CAAC;AAC/C,eAAO,MAAM,sBAAsB,SAAS,CAAC;AAC7C,eAAO,MAAM,yBAAyB,QAAkC,CAAC;AACzE,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,WAAW,SAAS,CAAC;AAClC,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,eAAO,MAAM,UAAU,QAAwB,CAAC;AAChD,eAAO,MAAM,UAAU,QAAwB,CAAC;AAChD,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/constants.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,WAAW,SAAS,CAAC;AAClC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAC9C,eAAO,MAAM,eAAe,QAAuB,CAAC;AACpD,eAAO,MAAM,UAAU,QAAuB,CAAC;AAC/C,eAAO,MAAM,OAAO,QAAoB,CAAC;AACzC,eAAO,MAAM,WAAW,QAAwB,CAAC;AACjD,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAC/C,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AACrD,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AACnD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,uBAAuB,UAAU,CAAC;AAC/C,eAAO,MAAM,sBAAsB,SAAS,CAAC;AAC7C,eAAO,MAAM,yBAAyB,QAAkC,CAAC;AACzE,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,WAAW,SAAS,CAAC;AAClC,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,eAAO,MAAM,UAAU,QAAwB,CAAC;AAChD,eAAO,MAAM,UAAU,QAAwB,CAAC;AAChD,qDAAqD;AACrD,eAAO,MAAM,qBAAqB,QAAiD,CAAC;AACpF,eAAO,MAAM,kBAAkB,QAAO,CAAC;AAEvC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,oBAAoB,aAAa,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -28,7 +28,6 @@ export const GIT_DIRNAME = '.git';
|
|
|
28
28
|
export const TSCONFIG_FILENAME = 'tsconfig.json';
|
|
29
29
|
export const TS_MATCHER = /\.(ts|tsx|mts|cts)$/;
|
|
30
30
|
export const JS_MATCHER = /\.(js|jsx|mjs|cjs)$/;
|
|
31
|
-
export const JSON_MATCHER = /\.json$/;
|
|
32
31
|
/** Extracts the script content from Svelte files. */
|
|
33
32
|
export const SVELTE_SCRIPT_MATCHER = /<script(?:\s+[^>]*)?>([\s\S]*?)<\/script>/gim; // TODO maybe this shouldnt be global? or make a getter?
|
|
34
33
|
export const EVERYTHING_MATCHER = /.*/;
|
package/dist/deploy.task.d.ts
CHANGED
package/dist/deploy.task.js
CHANGED
|
@@ -5,11 +5,11 @@ import { z } from 'zod';
|
|
|
5
5
|
import { cp, mkdir, rm } from 'node:fs/promises';
|
|
6
6
|
import { join, resolve } from 'node:path';
|
|
7
7
|
import { existsSync, readdirSync } from 'node:fs';
|
|
8
|
-
import { Task_Error } from
|
|
9
|
-
import { print_path } from
|
|
10
|
-
import { GRO_DIRNAME, GIT_DIRNAME, SVELTEKIT_BUILD_DIRNAME } from
|
|
11
|
-
import { empty_dir } from
|
|
12
|
-
import { git_check_clean_workspace, git_checkout, git_local_branch_exists, git_remote_branch_exists, Git_Origin, Git_Branch, git_delete_local_branch, git_push_to_create, git_reset_branch_to_first_commit, git_pull, git_fetch, git_check_setting_pull_rebase, git_clone_locally, git_current_branch_name, } from
|
|
8
|
+
import { Task_Error } from "./task.js";
|
|
9
|
+
import { print_path } from "./paths.js";
|
|
10
|
+
import { GRO_DIRNAME, GIT_DIRNAME, SVELTEKIT_BUILD_DIRNAME } from "./constants.js";
|
|
11
|
+
import { empty_dir } from "./fs.js";
|
|
12
|
+
import { git_check_clean_workspace, git_checkout, git_local_branch_exists, git_remote_branch_exists, Git_Origin, Git_Branch, git_delete_local_branch, git_push_to_create, git_reset_branch_to_first_commit, git_pull, git_fetch, git_check_setting_pull_rebase, git_clone_locally, git_current_branch_name, } from "./git.js";
|
|
13
13
|
// docs at ./docs/deploy.md
|
|
14
14
|
// terminal command for testing:
|
|
15
15
|
// npm run bootstrap && rm -rf .gro && clear && gro deploy --source no-git-workspace --no-build --dry
|
package/dist/dev.task.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { Task } from './task.
|
|
3
|
-
import { type Plugin_Context } from './plugin.
|
|
2
|
+
import type { Task } from './task.ts';
|
|
3
|
+
import { type Plugin_Context } from './plugin.ts';
|
|
4
4
|
export declare const Args: z.ZodObject<{
|
|
5
5
|
watch: z.ZodDefault<z.ZodBoolean>;
|
|
6
6
|
'no-watch': z.ZodDefault<z.ZodBoolean>;
|
package/dist/dev.task.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { Plugins } from
|
|
3
|
-
import { clean_fs } from
|
|
2
|
+
import { Plugins } from "./plugin.js";
|
|
3
|
+
import { clean_fs } from "./clean_fs.js";
|
|
4
4
|
export const Args = z
|
|
5
5
|
.object({
|
|
6
6
|
watch: z.boolean({ description: 'dual of no-watch' }).default(true),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
2
2
|
import type * as esbuild from 'esbuild';
|
|
3
|
-
import type { Parsed_Svelte_Config } from './svelte_config.
|
|
3
|
+
import type { Parsed_Svelte_Config } from './svelte_config.ts';
|
|
4
4
|
export declare const print_build_result: (log: Logger, build_result: esbuild.BuildResult) => void;
|
|
5
5
|
/**
|
|
6
6
|
* Creates an esbuild `define` shim for Vite's `import.meta\.env`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esbuild_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/esbuild_helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAE7D,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,EAAE,cAAc,OAAO,CAAC,WAAW,KAAG,IAOnF,CAAC;AAMF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACrC,KAAK,OAAO,EACZ,UAAU,oBAAoB,CAAC,UAAU,CAAC,EAC1C,aAAU,EACV,aAAyC,KACvC,MAAM,CAAC,MAAM,EAAE,MAAM,CAQtB,CAAC;AAEH,eAAO,MAAM,4BAA4B,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"esbuild_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/esbuild_helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAE7D,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,EAAE,cAAc,OAAO,CAAC,WAAW,KAAG,IAOnF,CAAC;AAMF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACrC,KAAK,OAAO,EACZ,UAAU,oBAAoB,CAAC,UAAU,CAAC,EAC1C,aAAU,EACV,aAAyC,KACvC,MAAM,CAAC,MAAM,EAAE,MAAM,CAQtB,CAAC;AAEH,eAAO,MAAM,4BAA4B,EAAE,OAAO,CAAC,gBAKlD,CAAC"}
|
package/dist/esbuild_helpers.js
CHANGED
|
@@ -29,9 +29,8 @@ export const to_define_import_meta_env = (dev, base_url, ssr = true, mode = dev
|
|
|
29
29
|
[import_meta_env + 'BASE_URL']: JSON.stringify(base_url || '/'),
|
|
30
30
|
});
|
|
31
31
|
export const default_ts_transform_options = {
|
|
32
|
-
target: 'esnext',
|
|
32
|
+
target: 'esnext', // TODO load local tsconfig
|
|
33
33
|
format: 'esm',
|
|
34
34
|
loader: 'ts',
|
|
35
35
|
charset: 'utf8',
|
|
36
|
-
// TODO load local tsconfig
|
|
37
36
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
2
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
3
3
|
import type { CompileOptions, ModuleCompileOptions, PreprocessorGroup } from 'svelte/compiler';
|
|
4
|
-
import type { Parsed_Svelte_Config } from './svelte_config.
|
|
4
|
+
import type { Parsed_Svelte_Config } from './svelte_config.ts';
|
|
5
5
|
export interface Esbuild_Plugin_External_Worker_Options {
|
|
6
6
|
dev: boolean;
|
|
7
7
|
build_options: esbuild.BuildOptions;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
2
|
import { basename } from 'node:path';
|
|
3
|
-
import { print_build_result, to_define_import_meta_env } from
|
|
4
|
-
import { resolve_specifier } from
|
|
5
|
-
import { esbuild_plugin_sveltekit_shim_alias } from
|
|
6
|
-
import { esbuild_plugin_sveltekit_shim_env } from
|
|
7
|
-
import { esbuild_plugin_sveltekit_shim_app } from
|
|
8
|
-
import { esbuild_plugin_sveltekit_local_imports } from
|
|
9
|
-
import { esbuild_plugin_svelte } from
|
|
3
|
+
import { print_build_result, to_define_import_meta_env } from "./esbuild_helpers.js";
|
|
4
|
+
import { resolve_specifier } from "./resolve_specifier.js";
|
|
5
|
+
import { esbuild_plugin_sveltekit_shim_alias } from "./esbuild_plugin_sveltekit_shim_alias.js";
|
|
6
|
+
import { esbuild_plugin_sveltekit_shim_env } from "./esbuild_plugin_sveltekit_shim_env.js";
|
|
7
|
+
import { esbuild_plugin_sveltekit_shim_app } from "./esbuild_plugin_sveltekit_shim_app.js";
|
|
8
|
+
import { esbuild_plugin_sveltekit_local_imports } from "./esbuild_plugin_sveltekit_local_imports.js";
|
|
9
|
+
import { esbuild_plugin_svelte } from "./esbuild_plugin_svelte.js";
|
|
10
10
|
export const esbuild_plugin_external_worker = ({ dev, build_options, dir = process.cwd(), svelte_compile_options, svelte_compile_module_options, svelte_preprocessors, alias, base_url, assets_url, public_prefix, private_prefix, env_dir, env_files, ambient_env, log, }) => ({
|
|
11
11
|
name: 'external_worker',
|
|
12
12
|
setup: (build) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
2
|
import { type CompileOptions, type ModuleCompileOptions, type PreprocessorGroup } from 'svelte/compiler';
|
|
3
|
-
import { type Parsed_Svelte_Config } from './svelte_config.
|
|
3
|
+
import { type Parsed_Svelte_Config } from './svelte_config.ts';
|
|
4
4
|
export interface Esbuild_Plugin_Svelte_Options {
|
|
5
5
|
dev: boolean;
|
|
6
6
|
base_url: Parsed_Svelte_Config['base_url'];
|
|
@@ -2,10 +2,10 @@ import * as esbuild from 'esbuild';
|
|
|
2
2
|
import { compile, compileModule, preprocess, } from 'svelte/compiler';
|
|
3
3
|
import { readFile } from 'node:fs/promises';
|
|
4
4
|
import { relative } from 'node:path';
|
|
5
|
-
import { SVELTE_MATCHER, SVELTE_RUNES_MATCHER } from
|
|
6
|
-
import { to_define_import_meta_env, default_ts_transform_options } from
|
|
7
|
-
import { default_svelte_config, to_default_compile_module_options, } from
|
|
8
|
-
import { TS_MATCHER } from
|
|
5
|
+
import { SVELTE_MATCHER, SVELTE_RUNES_MATCHER } from "./svelte_helpers.js";
|
|
6
|
+
import { to_define_import_meta_env, default_ts_transform_options } from "./esbuild_helpers.js";
|
|
7
|
+
import { default_svelte_config, to_default_compile_module_options, } from "./svelte_config.js";
|
|
8
|
+
import { TS_MATCHER } from "./constants.js";
|
|
9
9
|
export const esbuild_plugin_svelte = (options) => {
|
|
10
10
|
const { dev, base_url, dir = process.cwd(), svelte_compile_options = default_svelte_config.svelte_compile_options, svelte_compile_module_options = to_default_compile_module_options(svelte_compile_options), svelte_preprocessors, ts_transform_options = default_ts_transform_options, is_ts = (f) => TS_MATCHER.test(f), } = options;
|
|
11
11
|
const final_ts_transform_options = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { dirname } from 'node:path';
|
|
3
|
-
import { resolve_specifier } from
|
|
4
|
-
import { EVERYTHING_MATCHER } from
|
|
3
|
+
import { resolve_specifier } from "./resolve_specifier.js";
|
|
4
|
+
import { EVERYTHING_MATCHER } from "./constants.js";
|
|
5
5
|
/**
|
|
6
6
|
* Adds support for imports to both `.ts` and `.js`,
|
|
7
7
|
* as well as imports without extensions that resolve to `.js` or `.ts`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as esbuild from 'esbuild';
|
|
2
|
-
import type { Parsed_Svelte_Config } from './svelte_config.
|
|
2
|
+
import type { Parsed_Svelte_Config } from './svelte_config.ts';
|
|
3
3
|
export interface Esbuild_Plugin_Sveltekit_Shim_App_Options {
|
|
4
4
|
dev: boolean;
|
|
5
5
|
base_url: Parsed_Svelte_Config['base_url'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { render_sveltekit_shim_app_environment, render_sveltekit_shim_app_paths, sveltekit_shim_app_specifiers, } from
|
|
2
|
-
import { EVERYTHING_MATCHER } from
|
|
1
|
+
import { render_sveltekit_shim_app_environment, render_sveltekit_shim_app_paths, sveltekit_shim_app_specifiers, } from "./sveltekit_shim_app.js";
|
|
2
|
+
import { EVERYTHING_MATCHER } from "./constants.js";
|
|
3
3
|
export const esbuild_plugin_sveltekit_shim_app = ({ dev, base_url, assets_url, }) => ({
|
|
4
4
|
name: 'sveltekit_shim_app',
|
|
5
5
|
setup: (build) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { render_env_shim_module } from
|
|
2
|
-
import { EVERYTHING_MATCHER } from
|
|
3
|
-
import { SVELTEKIT_ENV_MATCHER } from
|
|
1
|
+
import { render_env_shim_module } from "./sveltekit_shim_env.js";
|
|
2
|
+
import { EVERYTHING_MATCHER } from "./constants.js";
|
|
3
|
+
import { SVELTEKIT_ENV_MATCHER } from "./sveltekit_helpers.js";
|
|
4
4
|
const namespace = 'sveltekit_shim_env';
|
|
5
5
|
export const esbuild_plugin_sveltekit_shim_env = ({ dev, public_prefix, private_prefix, env_dir, env_files, ambient_env, }) => ({
|
|
6
6
|
name: 'sveltekit_shim_env',
|
package/dist/filer.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Omit_Strict } from '@ryanatkn/belt/types.js';
|
|
2
2
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
3
|
-
import type { File_Filter, Path_Id } from './path.
|
|
4
|
-
import { watch_dir, type Watcher_Change, type Watch_Dir_Options } from './watch_dir.
|
|
5
|
-
import type { Package_Json } from './package_json.
|
|
3
|
+
import type { File_Filter, Path_Id } from './path.ts';
|
|
4
|
+
import { watch_dir, type Watcher_Change, type Watch_Dir_Options } from './watch_dir.ts';
|
|
5
|
+
import type { Package_Json } from './package_json.ts';
|
|
6
6
|
export interface Source_File {
|
|
7
7
|
id: Path_Id;
|
|
8
8
|
/**
|
package/dist/filer.js
CHANGED
|
@@ -5,12 +5,12 @@ import { wait } from '@ryanatkn/belt/async.js';
|
|
|
5
5
|
import { isBuiltin } from 'node:module';
|
|
6
6
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
7
7
|
import { Unreachable_Error } from '@ryanatkn/belt/error.js';
|
|
8
|
-
import { watch_dir, } from
|
|
9
|
-
import { paths } from
|
|
10
|
-
import { parse_imports } from
|
|
11
|
-
import { resolve_specifier } from
|
|
12
|
-
import { default_svelte_config } from
|
|
13
|
-
import { map_sveltekit_aliases, SVELTEKIT_GLOBAL_SPECIFIER } from
|
|
8
|
+
import { watch_dir, } from "./watch_dir.js";
|
|
9
|
+
import { paths } from "./paths.js";
|
|
10
|
+
import { parse_imports } from "./parse_imports.js";
|
|
11
|
+
import { resolve_specifier } from "./resolve_specifier.js";
|
|
12
|
+
import { default_svelte_config } from "./svelte_config.js";
|
|
13
|
+
import { map_sveltekit_aliases, SVELTEKIT_GLOBAL_SPECIFIER } from "./sveltekit_helpers.js";
|
|
14
14
|
const aliases = Object.entries(default_svelte_config.alias);
|
|
15
15
|
export class Filer {
|
|
16
16
|
root_dir;
|
package/dist/format.task.d.ts
CHANGED
package/dist/format.task.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { print_spawn_result } from '@ryanatkn/belt/process.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { Task_Error } from
|
|
4
|
-
import { format_directory } from
|
|
5
|
-
import { paths } from
|
|
3
|
+
import { Task_Error } from "./task.js";
|
|
4
|
+
import { format_directory } from "./format_directory.js";
|
|
5
|
+
import { paths } from "./paths.js";
|
|
6
6
|
export const Args = z
|
|
7
7
|
.object({
|
|
8
8
|
check: z
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Spawn_Result } from '@ryanatkn/belt/process.js';
|
|
2
2
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
3
|
-
import { type Cli } from './cli.
|
|
3
|
+
import { type Cli } from './cli.ts';
|
|
4
4
|
/**
|
|
5
5
|
* Formats a directory on the filesystem.
|
|
6
6
|
* If the source directory is given, it also formats all of the root directory files.
|
package/dist/format_directory.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { paths } from
|
|
2
|
-
import { GITHUB_DIRNAME, README_FILENAME, SVELTE_CONFIG_FILENAME, VITE_CONFIG_FILENAME, TSCONFIG_FILENAME, GRO_CONFIG_PATH, PM_CLI_DEFAULT, PRETTIER_CLI_DEFAULT, } from
|
|
3
|
-
import { serialize_args, to_forwarded_args } from
|
|
4
|
-
import { spawn_cli, to_cli_name } from
|
|
1
|
+
import { paths } from "./paths.js";
|
|
2
|
+
import { GITHUB_DIRNAME, README_FILENAME, SVELTE_CONFIG_FILENAME, VITE_CONFIG_FILENAME, TSCONFIG_FILENAME, GRO_CONFIG_PATH, PM_CLI_DEFAULT, PRETTIER_CLI_DEFAULT, } from "./constants.js";
|
|
3
|
+
import { serialize_args, to_forwarded_args } from "./args.js";
|
|
4
|
+
import { spawn_cli, to_cli_name } from "./cli.js";
|
|
5
5
|
const EXTENSIONS_DEFAULT = 'ts,js,json,svelte,html,css,md,yml';
|
|
6
6
|
const ROOT_PATHS_DEFAULT = `${[
|
|
7
7
|
README_FILENAME,
|
|
@@ -27,6 +27,6 @@ export const format_directory = async (log, dir, check = false, extensions = EXT
|
|
|
27
27
|
}
|
|
28
28
|
const spawned = await spawn_cli(prettier_cli, serialized_args, log);
|
|
29
29
|
if (!spawned)
|
|
30
|
-
throw
|
|
30
|
+
throw Error(`failed to find \`${to_cli_name(prettier_cli)}\` CLI locally or globally, do you need to run \`${pm_cli} install\`?`);
|
|
31
31
|
return spawned;
|
|
32
32
|
};
|
package/dist/format_file.js
CHANGED
package/dist/gen.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ 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 { Timings } from '@ryanatkn/belt/timings.js';
|
|
5
|
-
import type { Path_Id } from './path.
|
|
6
|
-
import type { Gro_Config } from './gro_config.
|
|
7
|
-
import type { Parsed_Svelte_Config } from './svelte_config.
|
|
8
|
-
import { type Load_Modules_Failure, type Module_Meta } from './modules.
|
|
9
|
-
import { Input_Path, type Resolved_Input_File, type Resolved_Input_Path } from './input_path.
|
|
5
|
+
import type { Path_Id } from './path.ts';
|
|
6
|
+
import type { Gro_Config } from './gro_config.ts';
|
|
7
|
+
import type { Parsed_Svelte_Config } from './svelte_config.ts';
|
|
8
|
+
import { type Load_Modules_Failure, type Module_Meta } from './modules.ts';
|
|
9
|
+
import { Input_Path, type Resolved_Input_File, type Resolved_Input_Path } from './input_path.ts';
|
|
10
10
|
export declare const GEN_FILE_PATTERN_TEXT = "gen";
|
|
11
11
|
export declare const GEN_FILE_PATTERN: string;
|
|
12
12
|
export declare const is_gen_path: (path: string) => boolean;
|
package/dist/gen.js
CHANGED
|
@@ -3,10 +3,10 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { styleText as st } from 'node:util';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
|
-
import { print_path } from
|
|
7
|
-
import { load_modules } from
|
|
8
|
-
import { Input_Path, resolve_input_files, resolve_input_paths, } from
|
|
9
|
-
import { search_fs } from
|
|
6
|
+
import { print_path } from "./paths.js";
|
|
7
|
+
import { load_modules } from "./modules.js";
|
|
8
|
+
import { Input_Path, resolve_input_files, resolve_input_paths, } from "./input_path.js";
|
|
9
|
+
import { search_fs } from "./search_fs.js";
|
|
10
10
|
export const GEN_FILE_PATTERN_TEXT = 'gen';
|
|
11
11
|
export const GEN_FILE_PATTERN = '.' + GEN_FILE_PATTERN_TEXT + '.';
|
|
12
12
|
export const is_gen_path = (path) => path.includes(GEN_FILE_PATTERN);
|
package/dist/gen.task.d.ts
CHANGED
package/dist/gen.task.js
CHANGED
|
@@ -2,14 +2,14 @@ import { styleText as st } from 'node:util';
|
|
|
2
2
|
import { print_ms, print_error } from '@ryanatkn/belt/print.js';
|
|
3
3
|
import { plural } from '@ryanatkn/belt/string.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { Task_Error } from
|
|
6
|
-
import { run_gen } from
|
|
7
|
-
import { Raw_Input_Path, to_input_paths } from
|
|
8
|
-
import { format_file } from
|
|
9
|
-
import { print_path } from
|
|
10
|
-
import { log_error_reasons } from
|
|
11
|
-
import { write_gen_results, analyze_gen_results, find_genfiles, load_genfiles } from
|
|
12
|
-
import { SOURCE_DIRNAME } from
|
|
5
|
+
import { Task_Error } from "./task.js";
|
|
6
|
+
import { run_gen } from "./run_gen.js";
|
|
7
|
+
import { Raw_Input_Path, to_input_paths } from "./input_path.js";
|
|
8
|
+
import { format_file } from "./format_file.js";
|
|
9
|
+
import { print_path } from "./paths.js";
|
|
10
|
+
import { log_error_reasons } from "./task_logging.js";
|
|
11
|
+
import { write_gen_results, analyze_gen_results, find_genfiles, load_genfiles } from "./gen.js";
|
|
12
|
+
import { SOURCE_DIRNAME } from "./constants.js";
|
|
13
13
|
export const Args = z
|
|
14
14
|
.object({
|
|
15
15
|
_: z.array(Raw_Input_Path, { description: 'input paths to generate' }).default([SOURCE_DIRNAME]),
|
package/dist/git.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn, spawn_out } from '@ryanatkn/belt/process.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
|
-
import { to_file_path } from
|
|
4
|
+
import { to_file_path } from "./path.js";
|
|
5
5
|
// TODO maybe extract to `util-git`
|
|
6
6
|
export const Git_Origin = z.string();
|
|
7
7
|
export const Git_Branch = z.string();
|
|
@@ -1,11 +1,19 @@
|
|
|
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
|
+
};
|
|
1
9
|
import { resolve } from 'node:path';
|
|
2
|
-
import { gro_plugin_sveltekit_library } from
|
|
3
|
-
import { has_server, gro_plugin_server } from
|
|
4
|
-
import { gro_plugin_sveltekit_app } from
|
|
5
|
-
import { has_sveltekit_app, has_sveltekit_library } from
|
|
6
|
-
import { gro_plugin_gen } from
|
|
7
|
-
import { has_dep, load_package_json } from
|
|
8
|
-
import { find_first_existing_file } from
|
|
10
|
+
import { gro_plugin_sveltekit_library } from "./gro_plugin_sveltekit_library.js";
|
|
11
|
+
import { has_server, gro_plugin_server } from "./gro_plugin_server.js";
|
|
12
|
+
import { gro_plugin_sveltekit_app } from "./gro_plugin_sveltekit_app.js";
|
|
13
|
+
import { has_sveltekit_app, has_sveltekit_library } from "./sveltekit_helpers.js";
|
|
14
|
+
import { gro_plugin_gen } from "./gro_plugin_gen.js";
|
|
15
|
+
import { has_dep, load_package_json } from "./package_json.js";
|
|
16
|
+
import { find_first_existing_file } from "./search_fs.js";
|
|
9
17
|
// TODO hacky, maybe extract utils?
|
|
10
18
|
/**
|
|
11
19
|
* This is the default config that's passed to `gro.config.ts`
|
|
@@ -32,7 +40,7 @@ const config = async (cfg, svelte_config) => {
|
|
|
32
40
|
cfg.plugins = async () => [
|
|
33
41
|
// TODO probably belongs in the gen system
|
|
34
42
|
local_moss_plugin_path
|
|
35
|
-
? (await import(resolve(local_moss_plugin_path))).gro_plugin_moss()
|
|
43
|
+
? (await import(__rewriteRelativeImportExtension(resolve(local_moss_plugin_path), true))).gro_plugin_moss()
|
|
36
44
|
: has_moss_dep
|
|
37
45
|
? (await import('@ryanatkn/moss/gro_plugin_moss.js')).gro_plugin_moss()
|
|
38
46
|
: null, // lazy load to avoid errors if it's not installed
|
package/dist/gro.d.ts
CHANGED
package/dist/gro.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env -S node --experimental-import-meta-resolve --experimental-strip-types --disable-warning=ExperimentalWarning
|
|
2
|
+
// @sync Node options to `$lib/gro_helpers.ts`
|
|
2
3
|
import { join } from 'node:path';
|
|
3
|
-
import { resolve_gro_module_path, spawn_with_loader } from
|
|
4
|
+
import { resolve_gro_module_path, spawn_with_loader } from "./gro_helpers.js";
|
|
4
5
|
/*
|
|
5
6
|
|
|
6
7
|
This file is a loader for the Gro CLI.
|
package/dist/gro_config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Create_Config_Plugins } from './plugin.
|
|
2
|
-
import type { Map_Package_Json } from './package_json.
|
|
3
|
-
import type { Path_Filter, Path_Id } from './path.
|
|
4
|
-
import type { Parsed_Svelte_Config } from './svelte_config.
|
|
1
|
+
import type { Create_Config_Plugins } from './plugin.ts';
|
|
2
|
+
import type { Map_Package_Json } from './package_json.ts';
|
|
3
|
+
import type { Path_Filter, Path_Id } from './path.ts';
|
|
4
|
+
import type { Parsed_Svelte_Config } from './svelte_config.ts';
|
|
5
5
|
/**
|
|
6
6
|
* The config that users can extend via `gro.config.ts`.
|
|
7
7
|
* This is exposed to users in places like tasks and genfiles.
|