@joshuafolkken/kit 1.887.0 → 1.929.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/.claude/skills/workflow-commands/backlogrun-progress.md +13 -12
- package/.claude/skills/workflow-commands/backlogrun-steps.md +2 -1
- package/.claude/skills/workflow-commands/fullrun-steps.md +4 -2
- package/.claude/skills/workflow-commands/halfrun.md +3 -1
- package/.claude/skills/workflow-commands/kickoff.md +5 -3
- package/.claude/skills/workflow-commands/observation-filing.md +3 -1
- package/.claude/skills/workflow-commands/prerequisite.md +3 -1
- package/.claude/skills/workflow-commands/target-repository.md +1 -1
- package/.github/pull_request_template.md +12 -0
- package/.github/release.yml +3 -0
- package/.github/workflows/ci.yml +8 -0
- package/.github/workflows/production.yml +10 -1
- package/.github/workflows/publish.yml +72 -2
- package/CLAUDE.md +2 -0
- package/README.md +2 -1
- package/dist/CLAUDE.md +2 -0
- package/dist/CLAUDE.static.md +8 -0
- package/dist/hooks/batch-guard.js +6 -6
- package/dist/hooks/{chunk-264QY6KS.js → chunk-2PGRQ62K.js} +25 -10
- package/dist/hooks/chunk-3V37IID6.js +82 -0
- package/dist/hooks/{chunk-36UE53LS.js → chunk-7XQ6TK3R.js} +2 -2
- package/dist/hooks/{chunk-PRDCNGA6.js → chunk-BNFG2IFK.js} +4 -4
- package/dist/hooks/{chunk-VGYSA2NT.js → chunk-GQ3EVWHY.js} +22 -3
- package/dist/hooks/{chunk-Y5OYCU2F.js → chunk-I3JP3D4A.js} +3 -3
- package/dist/hooks/{chunk-6MQCXEEA.js → chunk-LCJZE42I.js} +25 -88
- package/dist/hooks/{chunk-ZBK4XRAS.js → chunk-NJZSO7BK.js} +3 -3
- package/dist/hooks/{chunk-SSX23SJ2.js → chunk-RKUAD3I6.js} +1 -0
- package/dist/hooks/{chunk-FRJKVSK3.js → chunk-ROULPSQC.js} +2 -2
- package/dist/hooks/{chunk-FNFOLFFV.js → chunk-SXPTRFPG.js} +2 -2
- package/dist/hooks/{chunk-FXAKJKTB.js → chunk-WPALEIRX.js} +1 -1
- package/dist/hooks/{chunk-4OXFU3MK.js → chunk-YO43HEPY.js} +634 -156
- package/dist/hooks/codex-hook-adapter.js +13 -12
- package/dist/hooks/duplicate-read-guard.js +7 -7
- package/dist/hooks/format-edited.js +4 -3
- package/dist/hooks/investigation-guard.js +7 -7
- package/dist/hooks/pretool-guard.js +12 -11
- package/dist/hooks/session-lang.js +2 -2
- package/dist/hooks/stop-guard.js +5 -5
- package/dist/josh.js +156 -20
- package/eslint/base.js +4 -1
- package/package.json +72 -18
- package/playwright.config.ts +9 -17
- package/ports/index.d.ts +1 -0
- package/ports/index.js +1 -0
- package/ports/web-server.d.ts +5 -0
- package/ports/web-server.js +73 -0
- package/prettier/index.js +3 -8
- package/prettier/static.d.ts +3 -0
- package/prettier/static.js +10 -0
- package/prompts/collaboration-workflow/issue-template.md +11 -4
- package/prompts/collaboration-workflow/upstream-interrupt.md +1 -1
- package/prompts/collaboration-workflow/wip-cap.md +2 -2
- package/prompts/review.md +2 -2
- package/prompts/testing-guide.md +1 -0
- package/scripts/agent/agent-role-profile.ts +11 -0
- package/scripts/build/build-claude-md.ts +6 -1
- package/scripts/ci/pr-classification.ts +114 -0
- package/scripts/document/document-byte-budget.ts +3 -2
- package/scripts/gate/gate-report.ts +2 -0
- package/scripts/gate/gate-steps.ts +50 -0
- package/scripts/gate/project-checks.ts +145 -0
- package/scripts/gate/verification-gate.ts +14 -43
- package/scripts/git/git-common-directory.ts +9 -1
- package/scripts/git/git-gh-pr-rollup.ts +29 -1
- package/scripts/git/git-gh-pr.ts +61 -1
- package/scripts/git/git-pr.ts +62 -13
- package/scripts/git/issue-labels.ts +9 -0
- package/scripts/init/distributed-paths.ts +9 -5
- package/scripts/init/hook-command-bootstrap.ts +40 -8
- package/scripts/init/hook-command-rewrite.ts +7 -3
- package/scripts/init/init-actions.ts +94 -7
- package/scripts/init/init-ai-copy.ts +107 -19
- package/scripts/init/init-logic-workspace.ts +38 -5
- package/scripts/init/init-logic.ts +1 -0
- package/scripts/init/init-static.ts +55 -0
- package/scripts/init/init.ts +97 -30
- package/scripts/init/project-profile-cli.ts +14 -0
- package/scripts/init/project-profile.ts +158 -0
- package/scripts/init/start.ts +30 -0
- package/scripts/issue/issue-bug-label.ts +13 -0
- package/scripts/issue/issue-classification.ts +74 -0
- package/scripts/issue/issue-lint-cli.ts +10 -3
- package/scripts/issue/markdown-section.ts +38 -4
- package/scripts/josh/__snapshots__/josh-command-map.test.ts.snap +27 -1
- package/scripts/josh/josh-command-map.ts +3 -0
- package/scripts/josh/josh-commands-development.ts +8 -15
- package/scripts/josh/josh-commands-project.ts +14 -1
- package/scripts/josh/josh-logic.ts +13 -0
- package/scripts/josh/run-github-prerequisite.ts +32 -0
- package/scripts/lane/lane-await.ts +8 -1
- package/scripts/lane/openai-lane-ship.ts +30 -0
- package/scripts/lane/openai-lane-supervisor.ts +35 -8
- package/scripts/lane/openai-review-broker.ts +260 -0
- package/scripts/lint/cspell-cached.ts +21 -0
- package/scripts/lint/format.ts +68 -0
- package/scripts/lint/lint-parallel.ts +30 -1
- package/scripts/observations/observations-flush.ts +1 -1
- package/scripts/package/production-dependency-graph.ts +68 -0
- package/scripts/package/verify-optional-eslint-install.ts +62 -0
- package/scripts/release/github-release-cli.ts +11 -0
- package/scripts/release/github-release.ts +220 -0
- package/scripts/release/publish-tag-cli.ts +8 -0
- package/scripts/release/publish-tag.ts +11 -0
- package/scripts/release/release-publish.ts +7 -2
- package/scripts/rules/delivered-rules.ts +2 -0
- package/scripts/rules/issue-bug-label.ts +85 -0
- package/scripts/rules/issue-filing-args.ts +50 -0
- package/scripts/run/run-merge-cli.ts +19 -0
- package/scripts/run/run-merge.ts +9 -1
- package/scripts/run/run-ship-cli.ts +20 -0
- package/scripts/run/run-ship-detach.ts +180 -14
- package/scripts/run/run-ship-review-steps.ts +45 -25
- package/scripts/run/run-step-cli.ts +11 -1
- package/scripts/run/run-step.ts +36 -8
- package/scripts/run/run-wake-session.ts +3 -1
- package/scripts/test/pilot-files.ts +0 -2
- package/scripts/test/skip-marker.ts +3 -0
- package/scripts/test/test-declared-changed.ts +2 -1
- package/scripts/test/test-declared-logic.ts +15 -10
- package/scripts/test/test-declared.ts +20 -8
- package/scripts/test/test-red-logic.ts +3 -3
- package/scripts/test/test-unit-guard.ts +24 -12
- package/templates/CLAUDE.static.md +8 -0
- package/templates/cursorrules.static +1 -0
- package/templates/pnpm-workspace.static.yaml +4 -0
- package/templates/prettierignore.static +12 -0
- package/templates/workflows/ci.yml +5 -0
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env tsx
|
|
2
2
|
import {
|
|
3
3
|
pretool_guard
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-YO43HEPY.js";
|
|
5
|
+
import "./chunk-GQ3EVWHY.js";
|
|
6
6
|
import {
|
|
7
7
|
build_envelope,
|
|
8
8
|
compose_context,
|
|
9
9
|
format_edited_payload
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-LCJZE42I.js";
|
|
11
|
+
import "./chunk-3V37IID6.js";
|
|
12
|
+
import "./chunk-ROULPSQC.js";
|
|
13
|
+
import "./chunk-NJZSO7BK.js";
|
|
14
|
+
import "./chunk-BNFG2IFK.js";
|
|
15
|
+
import "./chunk-I3JP3D4A.js";
|
|
16
|
+
import "./chunk-7XQ6TK3R.js";
|
|
16
17
|
import {
|
|
17
18
|
hook_decision
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SXPTRFPG.js";
|
|
19
20
|
import {
|
|
20
21
|
time_density_hook
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-2PGRQ62K.js";
|
|
23
|
+
import "./chunk-WPALEIRX.js";
|
|
24
|
+
import "./chunk-RKUAD3I6.js";
|
|
24
25
|
|
|
25
26
|
// scripts/hooks/codex-hook-adapter.ts
|
|
26
27
|
import { text } from "node:stream/consumers";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
is_enabled,
|
|
10
10
|
notice_refusal_path,
|
|
11
11
|
refusal_path
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-BNFG2IFK.js";
|
|
13
|
+
import "./chunk-I3JP3D4A.js";
|
|
14
|
+
import "./chunk-7XQ6TK3R.js";
|
|
15
|
+
import "./chunk-SXPTRFPG.js";
|
|
16
|
+
import "./chunk-2PGRQ62K.js";
|
|
17
|
+
import "./chunk-WPALEIRX.js";
|
|
18
|
+
import "./chunk-RKUAD3I6.js";
|
|
19
19
|
export {
|
|
20
20
|
DISABLED_VALUES,
|
|
21
21
|
SWITCH_ENV_KEY,
|
|
@@ -15,9 +15,10 @@ import {
|
|
|
15
15
|
relative_to_root,
|
|
16
16
|
resolve_invocations,
|
|
17
17
|
select_invocation
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-LCJZE42I.js";
|
|
19
|
+
import "./chunk-3V37IID6.js";
|
|
20
|
+
import "./chunk-2PGRQ62K.js";
|
|
21
|
+
import "./chunk-RKUAD3I6.js";
|
|
21
22
|
export {
|
|
22
23
|
ESLINT_DAEMON,
|
|
23
24
|
MAX_DIAGNOSTIC_CHARS,
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
is_enabled,
|
|
11
11
|
load_environment_file,
|
|
12
12
|
refusal_path
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-NJZSO7BK.js";
|
|
14
|
+
import "./chunk-I3JP3D4A.js";
|
|
15
|
+
import "./chunk-7XQ6TK3R.js";
|
|
16
|
+
import "./chunk-SXPTRFPG.js";
|
|
17
|
+
import "./chunk-2PGRQ62K.js";
|
|
18
|
+
import "./chunk-WPALEIRX.js";
|
|
19
|
+
import "./chunk-RKUAD3I6.js";
|
|
20
20
|
export {
|
|
21
21
|
DISABLED_VALUES,
|
|
22
22
|
NOTICE,
|
|
@@ -3,17 +3,18 @@ import {
|
|
|
3
3
|
pretool_guard,
|
|
4
4
|
pretool_outcome,
|
|
5
5
|
pretool_outcome_async
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-YO43HEPY.js";
|
|
7
|
+
import "./chunk-GQ3EVWHY.js";
|
|
8
|
+
import "./chunk-3V37IID6.js";
|
|
9
|
+
import "./chunk-ROULPSQC.js";
|
|
10
|
+
import "./chunk-NJZSO7BK.js";
|
|
11
|
+
import "./chunk-BNFG2IFK.js";
|
|
12
|
+
import "./chunk-I3JP3D4A.js";
|
|
13
|
+
import "./chunk-7XQ6TK3R.js";
|
|
14
|
+
import "./chunk-SXPTRFPG.js";
|
|
15
|
+
import "./chunk-2PGRQ62K.js";
|
|
16
|
+
import "./chunk-WPALEIRX.js";
|
|
17
|
+
import "./chunk-RKUAD3I6.js";
|
|
17
18
|
export {
|
|
18
19
|
pretool_guard,
|
|
19
20
|
pretool_outcome,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "./chunk-6V5OPIUU.js";
|
|
5
5
|
import {
|
|
6
6
|
josh_environment_file
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-WPALEIRX.js";
|
|
8
|
+
import "./chunk-RKUAD3I6.js";
|
|
9
9
|
|
|
10
10
|
// scripts/josh/session-language-cli.ts
|
|
11
11
|
import { fileURLToPath } from "node:url";
|
package/dist/hooks/stop-guard.js
CHANGED
|
@@ -15,22 +15,22 @@ import {
|
|
|
15
15
|
run_hold,
|
|
16
16
|
run_invocation,
|
|
17
17
|
run_watcher_guard
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GQ3EVWHY.js";
|
|
19
19
|
import {
|
|
20
20
|
session_language
|
|
21
21
|
} from "./chunk-6V5OPIUU.js";
|
|
22
22
|
import {
|
|
23
23
|
hook_decision,
|
|
24
24
|
lane_child_marker
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SXPTRFPG.js";
|
|
26
26
|
import {
|
|
27
27
|
PROJECT_ROOT,
|
|
28
28
|
stamp_file,
|
|
29
29
|
time_density_hook,
|
|
30
30
|
time_hook_transcript
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-2PGRQ62K.js";
|
|
32
|
+
import "./chunk-WPALEIRX.js";
|
|
33
|
+
import "./chunk-RKUAD3I6.js";
|
|
34
34
|
|
|
35
35
|
// scripts/hooks/stop-guard.ts
|
|
36
36
|
import { text } from "node:stream/consumers";
|
package/dist/josh.js
CHANGED
|
@@ -155,8 +155,8 @@ var doctor_consumer = {
|
|
|
155
155
|
};
|
|
156
156
|
|
|
157
157
|
// scripts/josh/josh-logic.ts
|
|
158
|
-
import { existsSync as
|
|
159
|
-
import
|
|
158
|
+
import { existsSync as existsSync4, readFileSync as readFileSync3 } from "node:fs";
|
|
159
|
+
import path4 from "node:path";
|
|
160
160
|
import { fileURLToPath } from "node:url";
|
|
161
161
|
|
|
162
162
|
// scripts/build/local-bin.ts
|
|
@@ -225,7 +225,7 @@ function resolve_package_bin(base_directory, package_name, bin_name) {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
// scripts/josh/josh-logic.ts
|
|
228
|
-
import { execaSync as
|
|
228
|
+
import { execaSync as execaSync3 } from "execa";
|
|
229
229
|
|
|
230
230
|
// scripts/josh/command-suggest.ts
|
|
231
231
|
var MAX_SUGGESTION_DISTANCE = 3;
|
|
@@ -841,6 +841,12 @@ var FILTER_ARGUMENTS = "[filters...]";
|
|
|
841
841
|
var MATCH_ARGUMENTS = "[--match]";
|
|
842
842
|
var PATH_ARGUMENTS = "<path...>";
|
|
843
843
|
var DEV_COMMANDS = {
|
|
844
|
+
"pr:classification": {
|
|
845
|
+
script: "scripts/ci/pr-classification.ts",
|
|
846
|
+
description: "Require one release classification on a pull request",
|
|
847
|
+
category: "Development",
|
|
848
|
+
reference: ["", "automation", ["none"]]
|
|
849
|
+
},
|
|
844
850
|
[GATE_COMMAND]: {
|
|
845
851
|
script: "scripts/gate/verification-gate.ts",
|
|
846
852
|
description: "Run lint, type check, spell check and unit tests concurrently",
|
|
@@ -884,14 +890,7 @@ var DEV_COMMANDS = {
|
|
|
884
890
|
reference: ["", "developer", ["none"]]
|
|
885
891
|
},
|
|
886
892
|
format: {
|
|
887
|
-
|
|
888
|
-
// whenever a non-autofixable error remains, so putting it first behind `&&` would mean one
|
|
889
|
-
// unused variable anywhere in the tree stops prettier from running at all.
|
|
890
|
-
shell: [
|
|
891
|
-
"sh",
|
|
892
|
-
"-c",
|
|
893
|
-
`pnpm exec prettier --write . && pnpm exec eslint . --fix ${ESLINT_CACHE_FLAGS.join(" ")}`
|
|
894
|
-
],
|
|
893
|
+
script: "scripts/lint/format.ts",
|
|
895
894
|
description: "Format code with prettier and eslint",
|
|
896
895
|
category: "Development",
|
|
897
896
|
reference: ["", "developer", ["files", "processes"]]
|
|
@@ -1160,12 +1159,25 @@ var MAINTENANCE_COMMANDS = {
|
|
|
1160
1159
|
};
|
|
1161
1160
|
|
|
1162
1161
|
// scripts/josh/josh-commands-project.ts
|
|
1162
|
+
var PROFILE_ARGUMENTS = "[--profile static|node]";
|
|
1163
1163
|
var PROJECT_COMMANDS = {
|
|
1164
|
+
profile: {
|
|
1165
|
+
script: "scripts/init/project-profile-cli.ts",
|
|
1166
|
+
description: "Show the project profile and the reason for it",
|
|
1167
|
+
category: "Project",
|
|
1168
|
+
reference: [PROFILE_ARGUMENTS, "developer", ["files"]]
|
|
1169
|
+
},
|
|
1170
|
+
start: {
|
|
1171
|
+
script: "scripts/init/start.ts",
|
|
1172
|
+
description: "Initialize a project for the GitHub Issue workflow",
|
|
1173
|
+
category: "Project",
|
|
1174
|
+
reference: [PROFILE_ARGUMENTS, "developer", ["files", "git", "network"]]
|
|
1175
|
+
},
|
|
1164
1176
|
init: {
|
|
1165
1177
|
script: "scripts/init/init.ts",
|
|
1166
1178
|
description: "Initialize config in a new project",
|
|
1167
1179
|
category: "Project",
|
|
1168
|
-
reference: [
|
|
1180
|
+
reference: [PROFILE_ARGUMENTS, "developer", ["files", "processes"]]
|
|
1169
1181
|
},
|
|
1170
1182
|
sync: {
|
|
1171
1183
|
script: "scripts/sync/sync.ts",
|
|
@@ -1408,11 +1420,14 @@ var ALIASES = {
|
|
|
1408
1420
|
c: "check",
|
|
1409
1421
|
pt: "port",
|
|
1410
1422
|
i: "init",
|
|
1423
|
+
pf: "profile",
|
|
1424
|
+
st: "start",
|
|
1411
1425
|
sy: "sync",
|
|
1412
1426
|
rmi: "registry:migrate",
|
|
1413
1427
|
sys: "sync:scope",
|
|
1414
1428
|
g: "git",
|
|
1415
1429
|
gp: "pr",
|
|
1430
|
+
prc: "pr:classification",
|
|
1416
1431
|
fu: "followup",
|
|
1417
1432
|
nf: "notify",
|
|
1418
1433
|
obf: "observations:flush",
|
|
@@ -1608,6 +1623,118 @@ var kit_only = {
|
|
|
1608
1623
|
notice: kit_only_notice
|
|
1609
1624
|
};
|
|
1610
1625
|
|
|
1626
|
+
// scripts/josh/run-github-prerequisite.ts
|
|
1627
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
1628
|
+
import path3 from "node:path";
|
|
1629
|
+
|
|
1630
|
+
// scripts/discovery/repo-origin.ts
|
|
1631
|
+
var GITHUB_HOST = "github.com";
|
|
1632
|
+
var SSH_ALIAS_PATTERN = /^github(?:-\w+)*$/u;
|
|
1633
|
+
var GIT_SUFFIX = ".git";
|
|
1634
|
+
var PATH_SEPARATOR2 = "/";
|
|
1635
|
+
var USER_SEPARATOR = "@";
|
|
1636
|
+
var HOST_SEPARATOR = ":";
|
|
1637
|
+
var OWNER_INDEX = 0;
|
|
1638
|
+
var REPO_INDEX = 1;
|
|
1639
|
+
var REPO_PATH_SEGMENTS = 2;
|
|
1640
|
+
var NOT_FOUND = -1;
|
|
1641
|
+
var SECTION_PREFIX = "[";
|
|
1642
|
+
var ORIGIN_SECTION = /^\[remote\s+"origin"\]$/u;
|
|
1643
|
+
var URL_KEY = "url";
|
|
1644
|
+
function is_github_hostname(host) {
|
|
1645
|
+
return host.toLowerCase() === GITHUB_HOST;
|
|
1646
|
+
}
|
|
1647
|
+
function is_github_ssh_host(host) {
|
|
1648
|
+
const normalized = host.toLowerCase();
|
|
1649
|
+
return is_github_hostname(normalized) || SSH_ALIAS_PATTERN.test(normalized);
|
|
1650
|
+
}
|
|
1651
|
+
function strip_git_suffix(name) {
|
|
1652
|
+
return name.endsWith(GIT_SUFFIX) ? name.slice(0, -GIT_SUFFIX.length) : name;
|
|
1653
|
+
}
|
|
1654
|
+
function to_identity(repository_path) {
|
|
1655
|
+
const segments = repository_path.split(PATH_SEPARATOR2).filter((segment) => segment !== "");
|
|
1656
|
+
if (segments.length !== REPO_PATH_SEGMENTS) return void 0;
|
|
1657
|
+
const owner = segments[OWNER_INDEX] ?? "";
|
|
1658
|
+
const repo = strip_git_suffix(segments[REPO_INDEX] ?? "");
|
|
1659
|
+
return repo === "" ? void 0 : { owner, repo };
|
|
1660
|
+
}
|
|
1661
|
+
function parse_scp_like(url) {
|
|
1662
|
+
const user_end = url.indexOf(USER_SEPARATOR);
|
|
1663
|
+
const authority = user_end === NOT_FOUND ? url : url.slice(user_end + 1);
|
|
1664
|
+
const host_end = authority.indexOf(HOST_SEPARATOR);
|
|
1665
|
+
if (host_end === NOT_FOUND) return void 0;
|
|
1666
|
+
if (!is_github_ssh_host(authority.slice(0, host_end))) return void 0;
|
|
1667
|
+
return to_identity(authority.slice(host_end + 1));
|
|
1668
|
+
}
|
|
1669
|
+
function parse_url_like(url) {
|
|
1670
|
+
try {
|
|
1671
|
+
const parsed = new URL(url);
|
|
1672
|
+
return is_github_hostname(parsed.hostname) ? to_identity(parsed.pathname) : void 0;
|
|
1673
|
+
} catch {
|
|
1674
|
+
return void 0;
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
function parse_origin_url(url) {
|
|
1678
|
+
const trimmed = url.trim();
|
|
1679
|
+
if (trimmed === "") return void 0;
|
|
1680
|
+
return parse_url_like(trimmed) ?? parse_scp_like(trimmed);
|
|
1681
|
+
}
|
|
1682
|
+
function is_section_header(line) {
|
|
1683
|
+
return line.startsWith(SECTION_PREFIX);
|
|
1684
|
+
}
|
|
1685
|
+
function origin_section_lines(lines) {
|
|
1686
|
+
const start = lines.findIndex((line) => ORIGIN_SECTION.test(line));
|
|
1687
|
+
if (start === NOT_FOUND) return [];
|
|
1688
|
+
const rest = lines.slice(start + 1);
|
|
1689
|
+
const end = rest.findIndex((line) => is_section_header(line));
|
|
1690
|
+
return end === NOT_FOUND ? rest : rest.slice(0, end);
|
|
1691
|
+
}
|
|
1692
|
+
function entry_value(line, key) {
|
|
1693
|
+
const separator = line.indexOf("=");
|
|
1694
|
+
if (separator === NOT_FOUND) return void 0;
|
|
1695
|
+
if (line.slice(0, separator).trim() !== key) return void 0;
|
|
1696
|
+
return line.slice(separator + 1).trim();
|
|
1697
|
+
}
|
|
1698
|
+
function parse_origin_from_config(content) {
|
|
1699
|
+
const lines = content.split("\n").map((line) => line.trim());
|
|
1700
|
+
return origin_section_lines(lines).map((line) => entry_value(line, URL_KEY)).find((url) => url !== void 0);
|
|
1701
|
+
}
|
|
1702
|
+
function format_identity(identity) {
|
|
1703
|
+
return `${identity.owner}${PATH_SEPARATOR2}${identity.repo}`.toLowerCase();
|
|
1704
|
+
}
|
|
1705
|
+
var repo_origin = {
|
|
1706
|
+
GITHUB_HOST,
|
|
1707
|
+
is_github_hostname,
|
|
1708
|
+
is_github_ssh_host,
|
|
1709
|
+
parse_origin_from_config,
|
|
1710
|
+
parse_origin_url,
|
|
1711
|
+
format_identity
|
|
1712
|
+
};
|
|
1713
|
+
|
|
1714
|
+
// scripts/josh/run-github-prerequisite.ts
|
|
1715
|
+
import { execaSync as execaSync2 } from "execa";
|
|
1716
|
+
var GITHUB_RUN_COMMANDS = /* @__PURE__ */ new Set([
|
|
1717
|
+
"run:entry",
|
|
1718
|
+
"run:prep",
|
|
1719
|
+
"run:next",
|
|
1720
|
+
"run:step",
|
|
1721
|
+
"run:merge",
|
|
1722
|
+
"run:tail"
|
|
1723
|
+
]);
|
|
1724
|
+
function explanation(root, command) {
|
|
1725
|
+
if (!GITHUB_RUN_COMMANDS.has(command)) return void 0;
|
|
1726
|
+
if (!existsSync3(path3.join(root, ".git"))) {
|
|
1727
|
+
return `${command} requires Git and a GitHub origin. Run git init and add a GitHub origin first.`;
|
|
1728
|
+
}
|
|
1729
|
+
const result = execaSync2("git", ["config", "--get", "remote.origin.url"], {
|
|
1730
|
+
cwd: root,
|
|
1731
|
+
reject: false
|
|
1732
|
+
});
|
|
1733
|
+
if (result.exitCode === 0 && repo_origin.parse_origin_url(result.stdout)) return void 0;
|
|
1734
|
+
return `${command} requires a GitHub origin. Add an origin pointing to GitHub first.`;
|
|
1735
|
+
}
|
|
1736
|
+
var run_github_prerequisite = { explanation };
|
|
1737
|
+
|
|
1611
1738
|
// scripts/josh/josh-logic.ts
|
|
1612
1739
|
var COLUMN_WIDTH = 26;
|
|
1613
1740
|
var ALIAS_PAD_WIDTH = 2;
|
|
@@ -1617,20 +1744,20 @@ var PACKAGE_JSON2 = "package.json";
|
|
|
1617
1744
|
var UNKNOWN_COMMAND_EXIT_CODE = -1;
|
|
1618
1745
|
function find_package_directory(start_directory) {
|
|
1619
1746
|
let current = start_directory;
|
|
1620
|
-
while (!
|
|
1621
|
-
const parent =
|
|
1747
|
+
while (!existsSync4(path4.join(current, PACKAGE_JSON2))) {
|
|
1748
|
+
const parent = path4.dirname(current);
|
|
1622
1749
|
if (parent === current) return start_directory;
|
|
1623
1750
|
current = parent;
|
|
1624
1751
|
}
|
|
1625
1752
|
return current;
|
|
1626
1753
|
}
|
|
1627
|
-
var PACKAGE_DIR = find_package_directory(
|
|
1754
|
+
var PACKAGE_DIR = find_package_directory(path4.dirname(fileURLToPath(import.meta.url)));
|
|
1628
1755
|
function resolve_tsx_executable() {
|
|
1629
1756
|
const candidates = [
|
|
1630
1757
|
resolve_local_bin(PACKAGE_DIR, TSX_BIN),
|
|
1631
1758
|
resolve_local_bin(process.cwd(), TSX_BIN)
|
|
1632
1759
|
];
|
|
1633
|
-
return candidates.find(
|
|
1760
|
+
return candidates.find(existsSync4) ?? TSX_BIN;
|
|
1634
1761
|
}
|
|
1635
1762
|
function resolve_tsx_cli_entry() {
|
|
1636
1763
|
for (const base_directory of [PACKAGE_DIR, process.cwd()]) {
|
|
@@ -1647,7 +1774,7 @@ function resolve_tsx_runner() {
|
|
|
1647
1774
|
return { executable: resolve_tsx_executable(), leading_arguments: [] };
|
|
1648
1775
|
}
|
|
1649
1776
|
function read_package_version() {
|
|
1650
|
-
const raw = readFileSync3(
|
|
1777
|
+
const raw = readFileSync3(path4.join(PACKAGE_DIR, PACKAGE_JSON2), "utf8");
|
|
1651
1778
|
return package_version_schema.parse(JSON.parse(raw)).version;
|
|
1652
1779
|
}
|
|
1653
1780
|
var HEADER = `josh v${read_package_version()} \u2014 Joshua Folkken's dev toolkit`;
|
|
@@ -1706,7 +1833,7 @@ function should_use_shell(executable) {
|
|
|
1706
1833
|
return process.platform === "win32" && executable !== process.execPath;
|
|
1707
1834
|
}
|
|
1708
1835
|
function spawn_script(tsx_executable, script_arguments) {
|
|
1709
|
-
const result =
|
|
1836
|
+
const result = execaSync3(tsx_executable, script_arguments, {
|
|
1710
1837
|
stdio: "inherit",
|
|
1711
1838
|
shell: should_use_shell(tsx_executable),
|
|
1712
1839
|
reject: false
|
|
@@ -1715,7 +1842,7 @@ function spawn_script(tsx_executable, script_arguments) {
|
|
|
1715
1842
|
}
|
|
1716
1843
|
function run_shell_command(shell, extra) {
|
|
1717
1844
|
const [executable = "", ...rest_arguments] = shell;
|
|
1718
|
-
const result =
|
|
1845
|
+
const result = execaSync3(executable, [...rest_arguments, ...extra], {
|
|
1719
1846
|
stdio: "inherit",
|
|
1720
1847
|
reject: false
|
|
1721
1848
|
});
|
|
@@ -1731,18 +1858,27 @@ function spawn_script_entry(entry, script_path, script_arguments) {
|
|
|
1731
1858
|
]);
|
|
1732
1859
|
}
|
|
1733
1860
|
async function run_script_entry(entry, subcommand_arguments) {
|
|
1734
|
-
const script_path =
|
|
1861
|
+
const script_path = path4.join(PACKAGE_DIR, entry.script ?? "");
|
|
1735
1862
|
const script_arguments = [...entry.default_script_arguments ?? [], ...subcommand_arguments];
|
|
1736
1863
|
if (josh_in_process.can_run_in_process(entry, import.meta.url)) {
|
|
1737
1864
|
return await josh_in_process.run_in_process(script_path, script_arguments);
|
|
1738
1865
|
}
|
|
1739
1866
|
return spawn_script_entry(entry, script_path, script_arguments);
|
|
1740
1867
|
}
|
|
1868
|
+
function github_prerequisite_exit(resolved, is_consumer) {
|
|
1869
|
+
if (!is_consumer) return void 0;
|
|
1870
|
+
const prerequisite = run_github_prerequisite.explanation(process.cwd(), resolved);
|
|
1871
|
+
if (prerequisite === void 0) return void 0;
|
|
1872
|
+
console.error(prerequisite);
|
|
1873
|
+
return USAGE_ERROR_EXIT_CODE;
|
|
1874
|
+
}
|
|
1741
1875
|
function pre_dispatch_exit(resolved, entry, subcommand_arguments, is_consumer) {
|
|
1742
1876
|
if (is_consumer && kit_only.is_kit_only(entry)) {
|
|
1743
1877
|
console.error(kit_only.notice(resolved));
|
|
1744
1878
|
return USAGE_ERROR_EXIT_CODE;
|
|
1745
1879
|
}
|
|
1880
|
+
const prerequisite_exit = github_prerequisite_exit(resolved, is_consumer);
|
|
1881
|
+
if (prerequisite_exit !== void 0) return prerequisite_exit;
|
|
1746
1882
|
const rejection = composite_arguments.reject_extra_arguments(
|
|
1747
1883
|
resolved,
|
|
1748
1884
|
entry,
|
package/eslint/base.js
CHANGED
|
@@ -203,7 +203,10 @@ export function create_base_config({ gitignore_path, tsconfig_root_dir }) {
|
|
|
203
203
|
},
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
|
-
|
|
206
|
+
// `.mjs` / `.cjs` too (joshuafolkken/kit#2693): the typed parser options above reach only
|
|
207
|
+
// TypeScript files, so a hand-authored module in either extension crashed the whole run on
|
|
208
|
+
// the first type-aware rule instead of being linted as JavaScript.
|
|
209
|
+
files: ['**/*.{js,mjs,cjs}'],
|
|
207
210
|
...ts.configs.disableTypeChecked,
|
|
208
211
|
rules: {
|
|
209
212
|
...ts.configs.disableTypeChecked.rules,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.929.0",
|
|
3
3
|
"name": "@joshuafolkken/kit",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
@@ -78,10 +78,18 @@
|
|
|
78
78
|
"types": "./ports/index.d.ts",
|
|
79
79
|
"default": "./ports/index.js"
|
|
80
80
|
},
|
|
81
|
+
"./web-server": {
|
|
82
|
+
"types": "./ports/web-server.d.ts",
|
|
83
|
+
"default": "./ports/web-server.js"
|
|
84
|
+
},
|
|
81
85
|
"./prettier": {
|
|
82
86
|
"types": "./prettier/index.d.ts",
|
|
83
87
|
"default": "./prettier/index.js"
|
|
84
88
|
},
|
|
89
|
+
"./prettier/static": {
|
|
90
|
+
"types": "./prettier/static.d.ts",
|
|
91
|
+
"default": "./prettier/static.js"
|
|
92
|
+
},
|
|
85
93
|
"./tsconfig/base": {
|
|
86
94
|
"types": "./tsconfig/base.json",
|
|
87
95
|
"default": "./tsconfig/base.json"
|
|
@@ -105,27 +113,85 @@
|
|
|
105
113
|
}
|
|
106
114
|
},
|
|
107
115
|
"peerDependencies": {
|
|
116
|
+
"@eslint/compat": "^2.1.1",
|
|
117
|
+
"@eslint/js": "^10.0.1",
|
|
108
118
|
"@playwright/test": ">=1.0.0",
|
|
109
|
-
"eslint": "
|
|
110
|
-
"
|
|
119
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
120
|
+
"eslint": "^10.0.0",
|
|
121
|
+
"eslint-config-prettier": "^10.1.8",
|
|
122
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
123
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
124
|
+
"eslint-plugin-promise": "^7.3.0",
|
|
125
|
+
"eslint-plugin-sonarjs": "^4.2.1",
|
|
126
|
+
"eslint-plugin-unicorn": "^76.0.0",
|
|
127
|
+
"globals": "^17.12.0",
|
|
128
|
+
"typescript": "^6.0.3",
|
|
129
|
+
"typescript-eslint": "^8.70.1"
|
|
111
130
|
},
|
|
112
131
|
"peerDependenciesMeta": {
|
|
113
132
|
"@playwright/test": {
|
|
114
133
|
"optional": true
|
|
115
134
|
},
|
|
116
|
-
"
|
|
135
|
+
"@eslint/compat": {
|
|
136
|
+
"optional": true
|
|
137
|
+
},
|
|
138
|
+
"@eslint/js": {
|
|
139
|
+
"optional": true
|
|
140
|
+
},
|
|
141
|
+
"@stylistic/eslint-plugin": {
|
|
142
|
+
"optional": true
|
|
143
|
+
},
|
|
144
|
+
"eslint": {
|
|
145
|
+
"optional": true
|
|
146
|
+
},
|
|
147
|
+
"eslint-config-prettier": {
|
|
148
|
+
"optional": true
|
|
149
|
+
},
|
|
150
|
+
"eslint-import-resolver-typescript": {
|
|
151
|
+
"optional": true
|
|
152
|
+
},
|
|
153
|
+
"eslint-plugin-import-x": {
|
|
154
|
+
"optional": true
|
|
155
|
+
},
|
|
156
|
+
"eslint-plugin-promise": {
|
|
157
|
+
"optional": true
|
|
158
|
+
},
|
|
159
|
+
"eslint-plugin-sonarjs": {
|
|
160
|
+
"optional": true
|
|
161
|
+
},
|
|
162
|
+
"eslint-plugin-unicorn": {
|
|
163
|
+
"optional": true
|
|
164
|
+
},
|
|
165
|
+
"globals": {
|
|
166
|
+
"optional": true
|
|
167
|
+
},
|
|
168
|
+
"typescript": {
|
|
169
|
+
"optional": true
|
|
170
|
+
},
|
|
171
|
+
"typescript-eslint": {
|
|
117
172
|
"optional": true
|
|
118
173
|
}
|
|
119
174
|
},
|
|
120
175
|
"devDependencies": {
|
|
121
176
|
"@actions/expressions": "^0.3.61",
|
|
177
|
+
"@eslint/compat": "^2.1.1",
|
|
178
|
+
"@eslint/js": "^10.0.1",
|
|
122
179
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
123
180
|
"@secretlint/secretlint-rule-preset-recommend": "^13.0.6",
|
|
181
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
124
182
|
"@types/node": "^26.6.3",
|
|
125
183
|
"@types/semver": "^7.8.0",
|
|
126
|
-
"cspell": "^10.3.
|
|
184
|
+
"cspell": "^10.3.5",
|
|
127
185
|
"esbuild": "^0.28.2",
|
|
128
186
|
"eslint": "^10.11.0",
|
|
187
|
+
"eslint-config-prettier": "^10.1.8",
|
|
188
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
189
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
190
|
+
"eslint-plugin-promise": "^7.3.0",
|
|
191
|
+
"eslint-plugin-sonarjs": "^4.2.1",
|
|
192
|
+
"eslint-plugin-unicorn": "^76.0.0",
|
|
193
|
+
"eslint_d": "^15.0.3",
|
|
194
|
+
"globals": "^17.12.0",
|
|
129
195
|
"lefthook": "^2.1.14",
|
|
130
196
|
"prettier": "^3.9.9",
|
|
131
197
|
"prettier-plugin-svelte": "^4.1.1",
|
|
@@ -134,28 +200,17 @@
|
|
|
134
200
|
"rollup-plugin-dts": "^6.5.1",
|
|
135
201
|
"secretlint": "^13.0.6",
|
|
136
202
|
"typescript": "^6.0.3",
|
|
203
|
+
"typescript-eslint": "^8.70.1",
|
|
137
204
|
"vitest": "^5.0.2"
|
|
138
205
|
},
|
|
139
206
|
"dependencies": {
|
|
140
|
-
"@eslint/compat": "^2.1.1",
|
|
141
|
-
"@eslint/js": "^10.0.1",
|
|
142
|
-
"@stylistic/eslint-plugin": "^5.10.0",
|
|
143
|
-
"eslint-config-prettier": "^10.1.8",
|
|
144
|
-
"eslint-import-resolver-typescript": "^4.4.5",
|
|
145
|
-
"eslint-plugin-import-x": "^4.17.1",
|
|
146
|
-
"eslint-plugin-promise": "^7.3.0",
|
|
147
|
-
"eslint-plugin-sonarjs": "^4.2.1",
|
|
148
|
-
"eslint-plugin-unicorn": "^76.0.0",
|
|
149
|
-
"eslint_d": "^15.0.3",
|
|
150
207
|
"execa": "^10.0.1",
|
|
151
|
-
"globals": "^17.12.0",
|
|
152
208
|
"js-yaml": "^5.4.2",
|
|
153
209
|
"jsonc-parser": "^3.3.1",
|
|
154
210
|
"ora": "^9.4.1",
|
|
155
211
|
"semver": "^7.8.5",
|
|
156
212
|
"strip-json-comments": "^5.0.3",
|
|
157
213
|
"tsx": "^4.23.15",
|
|
158
|
-
"typescript-eslint": "^8.70.1",
|
|
159
214
|
"zod": "^4.6.5"
|
|
160
215
|
},
|
|
161
216
|
"devEngines": {
|
|
@@ -166,7 +221,6 @@
|
|
|
166
221
|
}
|
|
167
222
|
},
|
|
168
223
|
"scripts": {
|
|
169
|
-
"preinstall": "pnpm dlx @aikidosec/safe-chain@1.5.20 setup-ci",
|
|
170
224
|
"build": "tsx scripts/build/build-bin.ts && tsx scripts/build/build-hooks.ts && tsx scripts/build/build-version.ts && tsx scripts/build/build-config-merge.ts && tsx scripts/build/build-managed-marker.ts && tsx scripts/build/build-self-sync-guard.ts && tsx scripts/build/build-claude-md.ts",
|
|
171
225
|
"josh": "tsx scripts/josh/josh.ts"
|
|
172
226
|
}
|