spell 0.8.7 → 0.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-epics.md +149 -49
- package/app/package.json +25 -1
- package/app/spaces/@spell/guides/SpellUI/SpellUI.spellml +486 -486
- package/app/spaces/@spell/sites/SpellApp/SpellApp.spellml +50 -124
- package/dist/app/app/pages/SiteBoardView.css +5 -5
- package/dist/app/app/pages/SiteBoardView.js +1 -1
- package/dist/app/app/pages/SiteEditorPage.js +6 -3
- package/dist/app/app/pages/SiteEdits.js +27 -10
- package/dist/app/app/pages/SiteWrites.js +11 -0
- package/dist/app/app/runner/spellRuntime.js +1 -0
- package/dist/cli/publish/PublishedPackage.d.ts +2 -1
- package/dist/cli/publish/PublishedPackage.js +6 -3
- package/dist/cli/publish/ScratchInstall.d.ts +14 -3
- package/dist/cli/publish/ScratchInstall.js +69 -8
- package/dist/epic/cli/EpicProgram.js +20 -5
- package/dist/epic/cli/epicGroups.js +7 -1
- package/dist/epic/command/BaseBranch.d.ts +35 -0
- package/dist/epic/command/BaseBranch.js +58 -0
- package/dist/epic/command/EpicCheckout.d.ts +1 -1
- package/dist/epic/command/EpicCheckout.js +4 -4
- package/dist/epic/command/EpicGuide.js +3 -2
- package/dist/epic/command/EpicTools.d.ts +5 -0
- package/dist/epic/command/EpicTools.js +14 -3
- package/dist/epic/command/MainMerge.d.ts +26 -15
- package/dist/epic/command/MainMerge.js +60 -16
- package/dist/epic/command/PullRequest.d.ts +45 -0
- package/dist/epic/command/PullRequest.js +100 -0
- package/dist/epic/command/RepoInit.d.ts +196 -39
- package/dist/epic/command/RepoInit.js +481 -60
- package/dist/epic/command/Requests.d.ts +1 -0
- package/dist/epic/command/Requests.js +7 -1
- package/dist/epic/command/SessionMoves.js +2 -1
- package/dist/epic/command/SkillsCheck.js +3 -2
- package/dist/epic/command/Stock.js +3 -1
- package/dist/epic/command/TurnEnd.d.ts +1 -1
- package/dist/epic/command/TurnEnd.js +4 -3
- package/dist/epic/command/Worktrees.d.ts +20 -3
- package/dist/epic/command/Worktrees.js +39 -7
- package/dist/epic/command/command.types.d.ts +3 -0
- package/dist/epic/components/__pack/epics.entry.js +43 -43
- package/dist/epic/components/__pack/epics.pack.js +36 -12794
- package/dist/epic/config/CodeHost.d.ts +96 -0
- package/dist/epic/config/CodeHost.js +89 -0
- package/dist/epic/config/EngineFiles.mjs +60 -0
- package/dist/epic/config/EpicConfig.d.ts +20 -3
- package/dist/epic/config/EpicConfig.js +25 -1
- package/dist/epic/config/EpicRepo.js +1 -1
- package/dist/epic/config/GitHub.d.ts +75 -3
- package/dist/epic/config/GitHub.js +106 -5
- package/dist/epic/config/GitLab.d.ts +138 -0
- package/dist/epic/config/GitLab.js +297 -0
- package/dist/epic/config/LayeredSettings.js +3 -2
- package/dist/epic/server/EpicServer.d.ts +1 -1
- package/dist/epic/server/EpicServer.js +26 -12
- package/dist/epic/tool/InboxPoller.mjs +2 -1
- package/dist/epic/tool/MigrateCommands.js +6 -8
- package/dist/epic/tool/PlanCommits.d.ts +7 -4
- package/dist/epic/tool/PlanCommits.js +7 -5
- package/dist/epic/tool/PlanDocCommands.js +3 -4
- package/dist/epic/tool/PlanDocFiles.d.ts +3 -1
- package/dist/epic/tool/PlanDocFiles.js +13 -5
- package/dist/epic/tool/ServedFolders.d.ts +1 -1
- package/dist/epic/tool/ServedFolders.js +4 -4
- package/dist/epic/tools/PageInboxes.js +3 -3
- package/dist/epic/tools/_assets/commands.entry.js +149 -68
- package/dist/epic/tools/_assets/commands.js +20 -2073
- package/dist/epic/tools/_assets/core-reference.entry.js +244 -124
- package/dist/epic/tools/_assets/core-reference.js +20 -2142
- package/dist/epic/tools/_assets/emoji/cldr/0.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/a.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/b.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/c.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/d.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/e.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/f.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/g.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/h.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/i.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/j.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/k.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/l.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/m.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/n.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/o.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/p.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/r.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/s.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/t.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/u.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/v.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/w.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/x.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/y.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/z.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/0.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/a.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/b.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/c.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/d.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/e.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/f.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/g.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/h.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/i.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/j.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/k.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/l.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/m.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/n.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/o.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/p.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/q.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/r.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/s.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/t.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/u.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/v.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/w.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/x.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/y.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/z.js +2 -2
- package/dist/epic/tools/_assets/goals-live.js +318 -210
- package/dist/epic/tools/_assets/highlight.min.js +5764 -5269
- package/dist/epic/tools/_assets/lazy/code-engine.js +5 -1270
- package/dist/epic/tools/_assets/lazy/markdown-engine.js +67 -1513
- package/dist/epic/tools/_assets/lazy/markdown-sanitizer.js +3 -753
- package/dist/epic/tools/_assets/spell-comments.entry.js +282 -159
- package/dist/epic/tools/_assets/spell-comments.js +24 -3716
- package/dist/epic/tools/_assets/spell-doc-comments.js +1243 -816
- package/dist/epic/tools/_assets/spell-doc-helpers.js +298 -165
- package/dist/epic/tools/_assets/spell-doc-runtime.js +2760 -1415
- package/dist/epic/tools/_assets/spell-doc-toolbar.js +396 -227
- package/dist/epic/tools/_assets/spell-syntax.entry.js +505 -285
- package/dist/epic/tools/_assets/spell-syntax.js +22 -2916
- package/dist/epic/tools/_assets/spell-ui-sources.js +102 -60
- package/dist/epic/tools/_assets/spell-ui.entry.js +108 -40
- package/dist/epic/tools/_assets/spell-ui.js +3131 -46465
- package/dist/epic/tools/pages.d.ts +5 -6
- package/dist/epic/tools/pages.js +7 -6
- package/dist/epic/window.mjs +2 -3
- package/dist/parser/core/classes/View.d.ts +20 -0
- package/dist/parser/core/classes/View.js +91 -17
- package/dist/parser/core/core.declarations.json5 +18 -0
- package/dist/parser/core/core.scopes.js +5 -0
- package/dist/parser/core/sites.d.ts +10 -0
- package/dist/parser/core/sites.js +12 -0
- package/dist/parser/parser/tokenizer/Tokenizer.d.ts +9 -1
- package/dist/parser/parser/tokenizer/Tokenizer.js +43 -5
- package/dist/parser/parser/tokenizer/Tokens.d.ts +4 -0
- package/dist/parser/parser/tokenizer/Tokens.js +4 -0
- package/dist/parser/parser/tokenizer/tokenizer.types.d.ts +5 -0
- package/dist/parser/parser/tokenizer/tokenizer.types.js +2 -0
- package/dist/parser/py/core/spell_core/apps.py +2 -0
- package/dist/parser/spell/PARSING.md +21 -0
- package/dist/parser/spell/SpellParser.d.ts +2 -0
- package/dist/parser/spell/SpellParser.js +58 -3
- package/dist/parser/spell/SpellxTokenizer.js +2 -1
- package/dist/parser/spell/SpellxTwin.d.ts +4 -1
- package/dist/parser/spell/SpellxTwin.js +10 -3
- package/dist/parser/spell/builtinTypes.js +24 -1
- package/dist/parser/spell/ingest/PlaceIngest.js +3 -1
- package/dist/parser/spell/languages/Language.d.ts +11 -2
- package/dist/parser/spell/languages/en/words.js +3 -2
- package/dist/parser/spell/languages/es/words.js +7 -4
- package/dist/parser/spell/rules/Statement.js +1 -1
- package/dist/parser/spell/rules/classes/DrawSlot.js +6 -1
- package/dist/parser/spell/rules/sites/SitePage.d.ts +3 -3
- package/dist/parser/spell/rules/sites/SitePage.js +2 -2
- package/dist/parser/spell/rules/sites/sites.en.js +1 -1
- package/dist/parser/spell/rules/sites/sites.es.js +1 -1
- package/dist/parser/spell/rules/sites/sites.shared.d.ts +2 -2
- package/dist/parser/spell/spell.types.d.ts +7 -0
- package/dist/parser/spell/spellSyntax.es.json +6 -6
- package/dist/parser/spell/spellSyntax.json +6 -6
- package/dist/parser/spellx/SpellxView.js +2 -1
- package/dist/ui/components/ui-accordion/UIAccordion.d.ts +1 -0
- package/dist/ui/components/ui-ad/UIAd.d.ts +1 -0
- package/dist/ui/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
- package/dist/ui/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
- package/dist/ui/components/ui-button/UIButton.d.ts +8 -3
- package/dist/ui/components/ui-button/UIButton.fallback.d.ts +8 -3
- package/dist/ui/components/ui-button/UIButtons.d.ts +1 -0
- package/dist/ui/components/ui-button/UIOr.d.ts +1 -0
- package/dist/ui/components/ui-calendar/UICalendar.d.ts +6 -0
- package/dist/ui/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
- package/dist/ui/components/ui-card/UICards.d.ts +31 -0
- package/dist/ui/components/ui-checkbox/UICheckbox.d.ts +7 -0
- package/dist/ui/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
- package/dist/ui/components/ui-comment/UIComment.d.ts +1 -0
- package/dist/ui/components/ui-comment/UIComments.d.ts +1 -0
- package/dist/ui/components/ui-components/UIComponents.d.ts +1 -0
- package/dist/ui/components/ui-dimmer/UIDimmer.d.ts +1 -0
- package/dist/ui/components/ui-divider/UIDivider.d.ts +2 -0
- package/dist/ui/components/ui-dropdown/UIDropdown.d.ts +6 -0
- package/dist/ui/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
- package/dist/ui/components/ui-embed/UIEmbed.d.ts +1 -0
- package/dist/ui/components/ui-emoji/UIEmoji.d.ts +1 -0
- package/dist/ui/components/ui-feed/UIFeed.d.ts +1 -0
- package/dist/ui/components/ui-feed/UIFeedEvent.d.ts +1 -0
- package/dist/ui/components/ui-flag/UIFlag.d.ts +1 -0
- package/dist/ui/components/ui-flyout/UIFlyout.d.ts +1 -0
- package/dist/ui/components/ui-form/UIFields.d.ts +1 -0
- package/dist/ui/components/ui-form/UIRepeat.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIColumn.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIGrid.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIRow.d.ts +1 -0
- package/dist/ui/components/ui-icon/UIIcon.d.ts +3 -2
- package/dist/ui/components/ui-icon/UIIcons.d.ts +1 -0
- package/dist/ui/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
- package/dist/ui/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
- package/dist/ui/components/ui-image/UIImages.d.ts +1 -0
- package/dist/ui/components/ui-include/UIInclude.d.ts +1 -0
- package/dist/ui/components/ui-input/UIInput.fallback.d.ts +9 -2
- package/dist/ui/components/ui-items/UIItems.d.ts +1 -0
- package/dist/ui/components/ui-keys/UIKeys.d.ts +1 -0
- package/dist/ui/components/ui-label/UILabel.d.ts +2 -0
- package/dist/ui/components/ui-label/UILabels.d.ts +1 -0
- package/dist/ui/components/ui-list/UIList.d.ts +2 -0
- package/dist/ui/components/ui-loader/UILoader.d.ts +1 -0
- package/dist/ui/components/ui-message/UIMessage.d.ts +2 -0
- package/dist/ui/components/ui-modal/UIModal.d.ts +1 -0
- package/dist/ui/components/ui-nag/UINag.d.ts +1 -0
- package/dist/ui/components/ui-page/UIPage.d.ts +15 -0
- package/dist/ui/components/ui-page/UIPage.es.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIActions.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIAuthor.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIAvatar.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIContent.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDate.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDescription.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDetail.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIExtra.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIHeader.d.ts +15 -3
- package/dist/ui/components/ui-parts/UIHeader.en.d.ts +5 -2
- package/dist/ui/components/ui-parts/UIHeader.en.js +6 -3
- package/dist/ui/components/ui-parts/UIHeader.js +45 -5
- package/dist/ui/components/ui-parts/UIMeta.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIParts.css +18 -0
- package/dist/ui/components/ui-parts/UIParts.css.inline.js +1 -1
- package/dist/ui/components/ui-parts/UIParts.types.d.ts +15 -1
- package/dist/ui/components/ui-parts/UISummary.d.ts +1 -0
- package/dist/ui/components/ui-parts/UITitle.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIValue.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
- package/dist/ui/components/ui-progress/UIProgress.d.ts +2 -0
- package/dist/ui/components/ui-quote/UIQuote.d.ts +1 -0
- package/dist/ui/components/ui-rail/UIRail.d.ts +1 -0
- package/dist/ui/components/ui-rating/UIRating.d.ts +6 -0
- package/dist/ui/components/ui-rating/UIRating.fallback.d.ts +6 -0
- package/dist/ui/components/ui-reveal/UIReveal.d.ts +1 -0
- package/dist/ui/components/ui-search/UISearch.fallback.d.ts +13 -1
- package/dist/ui/components/ui-section/UISections.d.ts +1 -0
- package/dist/ui/components/ui-segment/UISegment.d.ts +2 -0
- package/dist/ui/components/ui-segment/UISegments.d.ts +1 -0
- package/dist/ui/components/ui-select/UISelect.d.ts +6 -0
- package/dist/ui/components/ui-select/UISelect.fallback.d.ts +6 -0
- package/dist/ui/components/ui-shape/UISide.d.ts +4 -0
- package/dist/ui/components/ui-sidebar/UIPushable.d.ts +1 -0
- package/dist/ui/components/ui-sidebar/UIPusher.d.ts +1 -0
- package/dist/ui/components/ui-sidebar/UISidebar.d.ts +1 -0
- package/dist/ui/components/ui-sides/UISides.d.ts +6 -0
- package/dist/ui/components/ui-sides/UISides.fallback.d.ts +6 -0
- package/dist/ui/components/ui-slider/UISlider.d.ts +7 -0
- package/dist/ui/components/ui-slider/UISlider.fallback.d.ts +7 -0
- package/dist/ui/components/ui-space/UISpace.d.ts +1 -0
- package/dist/ui/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/ui/components/ui-statistic/UIStatistics.d.ts +1 -0
- package/dist/ui/components/ui-step/UIStep.d.ts +1 -0
- package/dist/ui/components/ui-step/UISteps.d.ts +1 -0
- package/dist/ui/components/ui-table/UICell.d.ts +1 -0
- package/dist/ui/components/ui-terms/UITerm.d.ts +1 -0
- package/dist/ui/components/ui-terms/UITerms.d.ts +1 -0
- package/dist/ui/components/ui-theme-editor/UIColorChip.d.ts +1 -0
- package/dist/ui/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
- package/dist/ui/components/ui-toast/UIToast.d.ts +1 -0
- package/dist/ui/components/ui-toc/UIToc.d.ts +1 -0
- package/dist/ui/components/ui-transition/UITransition.d.ts +1 -0
- package/dist/ui/components/ui-video/UIAudio.d.ts +1 -0
- package/dist/ui/components/ui-video/UIVideo.d.ts +1 -0
- package/dist/ui/components/ui-visibility/UIVisibility.d.ts +1 -0
- package/dist/ui/components/ui-zoom/UIZoom.d.ts +1 -0
- package/dist/ui/jsx.d.ts +4 -4
- package/dist/ui/vocabulary/defaults.generated.js +1 -1
- package/dist/util/spell/constants.js +1 -1
- package/epic/.claude-plugin/plugin.json +1 -1
- package/epic/.codex-plugin/plugin.json +1 -1
- package/epic/hooks/handoff.mjs +4 -3
- package/epic/hooks/worktree.mjs +22 -3
- package/epic/package.json +41 -2
- package/epic/skills/details/SKILL.md +2 -1
- package/epic/skills/epic/SKILL.md +7 -1
- package/epic/skills/epic/guide.md +3 -0
- package/epic/skills/isolate/SKILL.md +53 -20
- package/epic/src/AGENTS.md +11 -2
- package/epic/templates/durable.html +1 -1
- package/epic/vscode/package.json +1 -1
- package/epic/vscode/spell-epic.vsix +0 -0
- package/package.json +1 -1
- package/parser/package.json +1 -1
- package/ui/package.json +15 -2
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type EpicSettings } from "spell/epic/config/EpicConfig";
|
|
2
|
-
import { type
|
|
2
|
+
import { type CodeHostClient, type CodeHostKind } from "spell/epic/config/CodeHost";
|
|
3
|
+
import { type CodeHostWords, type RepoVisibility } from "spell/epic/config/GitHub";
|
|
3
4
|
import { Hub } from "./Hub";
|
|
4
5
|
import { PluginInstall } from "./PluginInstall";
|
|
5
6
|
import { Shared } from "./Shared";
|
|
6
7
|
/****************
|
|
7
8
|
* ### `RepoInit`
|
|
8
9
|
* `epic init [--name <name>] [--color <colour>] [--content-repo <name> | --remote <address> | --no-remote] [--public]
|
|
9
|
-
* [--no-plugin] [--no-server] [--dry-run] [--json]`:
|
|
10
|
+
* [--host github|gitlab] [--protected-base] [--no-plugin] [--no-server] [--dry-run] [--json]`:
|
|
10
11
|
* set a repo up for epics (epic `epic-eject` P9), from any folder of its main checkout or a worktree of it; the ONE
|
|
11
12
|
* command a new repo, and each teammate joining it, runs (epic `epic-friend` P13: `npx spell@next epic init`).
|
|
12
13
|
*
|
|
@@ -19,7 +20,9 @@ import { Shared } from "./Shared";
|
|
|
19
20
|
* - worktrees in `../<repo>.worktrees`
|
|
20
21
|
* - the install command its lock file names (none without one)
|
|
21
22
|
* - window names from the repo's name; the window files in the epic folder's `windows/` (git-ignored there)
|
|
22
|
-
* -
|
|
23
|
+
* - where the code is hosted (`codeHost`): `--host`, the config's, the `origin` remote's address, or asked in a
|
|
24
|
+
* terminal when that address doesn't say (`codeHostChoice()`)
|
|
25
|
+
* - a file already there is kept as it is; `--host`, or that question, writes its `codeHost`
|
|
23
26
|
* 2. makes the epic folder, a git repo of its own, with a folder for each of `sharedFolders`
|
|
24
27
|
* (`Shared.init()`): `epics`, `sagas`, `guides`, `pages`
|
|
25
28
|
* - a LATER person (the config names its `contentRemote`, the folder is missing): clones it instead
|
|
@@ -27,11 +30,12 @@ import { Shared } from "./Shared";
|
|
|
27
30
|
* 2b. gives the epic repo its REMOTE, so a team shares the plans (`remoteStep()`, epic `epic-friend` P4, Q1):
|
|
28
31
|
* - the FIRST person: asks what to call it (`CLI.ask()`, suggesting `<repo>.epics`; `--content-repo`
|
|
29
32
|
* answers), and whether it's private or public (private suggested; `--public` answers; epic `epic-friend`
|
|
30
|
-
* T19), makes it on
|
|
33
|
+
* T19), makes it on the code host (`CodeHost.of()`: GitHub or GitLab), pushes, and writes its address into the config
|
|
31
34
|
* (`contentRemote`)
|
|
32
35
|
* - no terminal to ask in: private, unless `--public`; public says, in one line, that the plans will be too
|
|
33
|
-
* - its owner: the code repo's when that's an organization, else the person's own
|
|
34
|
-
* -
|
|
36
|
+
* - its owner: the code repo's when that's an organization (a GitLab group), else the person's own account
|
|
37
|
+
* - without the host's command (`gh`, `glab`), or logged out, it says how to get it, and carries on without
|
|
38
|
+
* - GitLab protects a new project's default branch: opened up at once (`letTeamPush()`), or says what to do
|
|
35
39
|
* - `--remote <address>`: a repo made already; `--no-remote`: none, the plans stay on this machine
|
|
36
40
|
* - an epic repo with a remote already: its address written into the config, when it isn't there
|
|
37
41
|
* 3. links those folders in at the checkout's root (`Shared.link()`)
|
|
@@ -57,6 +61,11 @@ import { Shared } from "./Shared";
|
|
|
57
61
|
* - it commits the files it wrote in the repo (the config and `.gitignore`) on the base branch, asking first in a
|
|
58
62
|
* terminal (`commitStep()`; `--no-commit`): every new worktree branches from there, and needs the `.gitignore` to
|
|
59
63
|
* leave the links alone; on another branch it says so, and commits nothing
|
|
64
|
+
* - a base branch that takes only pull requests (`baseBranchProtected`): it NEVER commits there
|
|
65
|
+
* (`commitViaPullRequest()`): the two files go on a new branch, `epic-setup`, pushed, with a pull request opened
|
|
66
|
+
* (`gh` or `glab`), else what to run printed; the base branch's checkout is left as it was, and epics start once
|
|
67
|
+
* it's merged; on GitLab it's a merge request
|
|
68
|
+
* - on when `--protected-base` says so, or the code host does (`protectionStep()`), in one line
|
|
60
69
|
* - it starts with "Initializing Epic for repo <main>" and ends with "Epics initialized!", in colour; the settings it
|
|
61
70
|
* wrote are in the file, not printed (Owen, 2026-10-29)
|
|
62
71
|
****************/
|
|
@@ -77,18 +86,19 @@ export declare class RepoInit {
|
|
|
77
86
|
/**
|
|
78
87
|
* `epic init`'s questions, ALL asked before anything is done (Owen, 2026-10-29): the answers, and what they come to.
|
|
79
88
|
* - their name, every time (`askName()`); `name` (`--name`) answers it
|
|
89
|
+
* - where the code is hosted, only when the `origin` address doesn't say and nothing else does (`codeHostChoice()`)
|
|
80
90
|
* - their colour, from the names nobody has (`askColor()`), unless they have one already; `color` answers it
|
|
81
91
|
* - a teammate joining, the team's plans not here yet: cloned FIRST, quietly, so the taken colours are known
|
|
82
92
|
* (`cloned`; `init()` reports it)
|
|
83
|
-
* - the epic repo's name and private or public, only when `init()` will make it on
|
|
93
|
+
* - the epic repo's name and private or public, only when `init()` will make it on the code host (`willMakeRepo()`)
|
|
84
94
|
* - no terminal (`ask` off): nothing asked; the plan says what the flags and the suggestions come to
|
|
85
95
|
* - SIDE EFFECT: the clone, for a teammate joining (not `dryRun`)
|
|
86
96
|
*/
|
|
87
|
-
questions({ ask, dryRun, name, color, remote, contentRepo, visibility, noRemote, say }: QuestionOptions): Promise<Answers>;
|
|
97
|
+
questions({ ask, dryRun, name, color, remote, contentRepo, visibility, noRemote, host, say }: QuestionOptions): Promise<Answers>;
|
|
88
98
|
/**
|
|
89
|
-
* Whether `init()` will make the epic repo on
|
|
99
|
+
* Whether `init()` will make the epic repo on the code host: its owner when it will, else `undefined`.
|
|
90
100
|
* - not when the epic repo has a remote, the config names one, or `remote` / `noRemote` was given
|
|
91
|
-
* - only with
|
|
101
|
+
* - only with the host's command installed and logged in (`status()`, a few seconds), as `remoteStep()` asks
|
|
92
102
|
*/
|
|
93
103
|
willMakeRepo({ settings, content, remote, noRemote }: {
|
|
94
104
|
settings: EpicSettings;
|
|
@@ -104,9 +114,9 @@ export declare class RepoInit {
|
|
|
104
114
|
* Set the repo up (the class's steps); what it did, or would do with `dryRun`.
|
|
105
115
|
* - the options: `InitOptions`
|
|
106
116
|
* - SIDE EFFECT (not `dryRun`): writes the config and `.gitignore`, makes (or clones) the epic repo and the
|
|
107
|
-
* links, may make the epic repo on
|
|
117
|
+
* links, may make the epic repo on the code host and push to it, keeps the person's name in the epic home
|
|
108
118
|
*/
|
|
109
|
-
init({ dryRun, name, remote, contentRepo, visibility, noRemote, ask, color, plugin, server, commit, cloned, say }?: InitOptions): Promise<InitReport>;
|
|
119
|
+
init({ dryRun, name, remote, contentRepo, visibility, noRemote, ask, color, plugin, server, commit, cloned, protectedBase, codeHost, say }?: InitOptions): Promise<InitReport>;
|
|
110
120
|
/**
|
|
111
121
|
* The files `epic init` wrote in the repo (the config, `.gitignore`) committed on its base branch, and pushed;
|
|
112
122
|
* what it did.
|
|
@@ -114,6 +124,7 @@ export declare class RepoInit {
|
|
|
114
124
|
* - only those files, whatever else is staged (`git commit -- <files>`); none changed: `none`
|
|
115
125
|
* - on another branch: `other branch`, nothing committed (a worktree branches from the base branch)
|
|
116
126
|
* - pushed (`pushBranch()`): to the branch's upstream, else `origin`; neither: committed, nothing to push to
|
|
127
|
+
* - a base branch that takes only pull requests: `commitViaPullRequest()` instead, NEVER a commit on it
|
|
117
128
|
* - NEVER throws: a failed commit is `failed`, a failed push `push: "failed"`, with git's words
|
|
118
129
|
* - SIDE EFFECT (not `dryRun`): a commit in the repo, a push
|
|
119
130
|
*/
|
|
@@ -122,8 +133,107 @@ export declare class RepoInit {
|
|
|
122
133
|
ask: boolean;
|
|
123
134
|
say?: (text: string) => void;
|
|
124
135
|
}): Promise<CommitReport>;
|
|
125
|
-
/**
|
|
126
|
-
|
|
136
|
+
/**
|
|
137
|
+
* The files `epic init` wrote, for a base branch that takes only pull requests: committed on a new branch
|
|
138
|
+
* (`SETUP_BRANCH`) WITHOUT touching the base branch, pushed, a pull request opened; what it did.
|
|
139
|
+
* - asks first in a terminal, `y` suggested; with no terminal, yes
|
|
140
|
+
* - on another branch: `other branch`, nothing done
|
|
141
|
+
* - a commit of `epic init`'s own on the base branch, not pushed (a run before this setting was on, its push refused):
|
|
142
|
+
* taken back first, keeping its files (`undoOwnCommit()`)
|
|
143
|
+
* - the branch is made without checking it out (`commitOnSetupBranch()`), then the base branch's checkout put back as
|
|
144
|
+
* it was (`restoreBase()`): so "safe to run again", whatever else is staged or changed
|
|
145
|
+
* - the pull or merge request: opened when the host's command is logged in; else `pullRequestError` says why, and the
|
|
146
|
+
* lines say what to run
|
|
147
|
+
* - NEVER throws
|
|
148
|
+
* - SIDE EFFECT (not `dryRun`): a branch, a push, a pull request, the two files out of the checkout
|
|
149
|
+
*/
|
|
150
|
+
static commitViaPullRequest({ report, ask, say }: {
|
|
151
|
+
report: InitReport;
|
|
152
|
+
ask: boolean;
|
|
153
|
+
say?: (text: string) => void;
|
|
154
|
+
}): Promise<CommitReport>;
|
|
155
|
+
/**
|
|
156
|
+
* Take back `epic init`'s own commit from base branch `base`, when it's its last commit and the only one `origin`'s
|
|
157
|
+
* lacks: an earlier run's, its push refused. Its files stay, uncommitted.
|
|
158
|
+
* - anything else on the branch that `origin`'s lacks: left alone
|
|
159
|
+
* - SIDE EFFECT: `git reset --mixed HEAD~1`
|
|
160
|
+
*/
|
|
161
|
+
private static undoOwnCommit;
|
|
162
|
+
/**
|
|
163
|
+
* `files`, as they are on disk, committed on `SETUP_BRANCH`: with a temporary index, so HEAD, the checkout's own
|
|
164
|
+
* index and any other change there are never touched.
|
|
165
|
+
* - from `base`, or on top of the branch when it holds work `base` doesn't (a run before, its pull request open)
|
|
166
|
+
* - nothing new to commit: the branch stays
|
|
167
|
+
* - throws a `GitError` when git can't
|
|
168
|
+
* - SIDE EFFECT: a commit, and the branch made or moved
|
|
169
|
+
*/
|
|
170
|
+
private static commitOnSetupBranch;
|
|
171
|
+
/**
|
|
172
|
+
* Put the base branch's checkout back: `files` as HEAD has them, or gone when it hasn't any, so `git status` is clean.
|
|
173
|
+
* - the links `init()` made (`links`) are listed in `.git/info/exclude`: the `.gitignore` that names them is on the
|
|
174
|
+
* setup branch until it's merged
|
|
175
|
+
* - throws a `GitError` when git can't
|
|
176
|
+
* - SIDE EFFECT: the two files, the exclude file
|
|
177
|
+
*/
|
|
178
|
+
private static restoreBase;
|
|
179
|
+
/**
|
|
180
|
+
* The pull or merge request for `SETUP_BRANCH`, opened by `host`: its address, or why not.
|
|
181
|
+
* - NEVER throws
|
|
182
|
+
* - SIDE EFFECT: a pull or merge request on the code host
|
|
183
|
+
*/
|
|
184
|
+
private static pullRequestStep;
|
|
185
|
+
/**
|
|
186
|
+
* Whether the base branch takes only pull requests, and how that's known; what `init()` puts in the config.
|
|
187
|
+
* - already on in the config, or in the setup branch's (run again, its pull request not merged yet): `config`
|
|
188
|
+
* - `protectedBase` (`--protected-base`): `flag`
|
|
189
|
+
* - else the code host's word (`hostRequiresPullRequest()`): `detected`; no such rule: `off`
|
|
190
|
+
* - a config that says `false` in so many words stays so (a file already there is kept): `says off`, and a note
|
|
191
|
+
* - NEVER throws: failing to find out is `off`, never a failed init
|
|
192
|
+
*/
|
|
193
|
+
static protectionStep({ main, configFile, hadConfig, settings, protectedBase }: {
|
|
194
|
+
main: string;
|
|
195
|
+
configFile: string;
|
|
196
|
+
hadConfig: boolean;
|
|
197
|
+
settings: EpicSettings;
|
|
198
|
+
protectedBase: boolean;
|
|
199
|
+
}): ProtectionReport;
|
|
200
|
+
/** Whether `SETUP_BRANCH`, when there is one, holds a config with `baseBranchProtected` on. */
|
|
201
|
+
private static setupBranchSaysProtected;
|
|
202
|
+
/** Whether the code host, as its command can see it, requires a request into the base branch of checkout `main`. */
|
|
203
|
+
private static hostRequiresPullRequest;
|
|
204
|
+
/**
|
|
205
|
+
* Where the code is hosted, and how that's known (`init()`'s `codeHost`, `epic init`'s question).
|
|
206
|
+
* - `--host` (`host`): `flag`; the config names one: `config`
|
|
207
|
+
* - else the `origin` address's: `address`; it doesn't say (`git.acme.com`): `asked` in a terminal, else `assumed`
|
|
208
|
+
* GitHub, which `noteLines()` says in one line; no remote: `default`, GitHub
|
|
209
|
+
* - NEVER throws
|
|
210
|
+
*/
|
|
211
|
+
static codeHostChoice({ main, host, ask }: {
|
|
212
|
+
main: string;
|
|
213
|
+
host?: CodeHostKind;
|
|
214
|
+
ask: boolean;
|
|
215
|
+
}): Promise<CodeHostReport>;
|
|
216
|
+
/**
|
|
217
|
+
* Write `kind` into config file `file` as its `codeHost`, keeping the rest as written.
|
|
218
|
+
* - a line that's there is changed in place; else the key goes in through `DataFile`, its comments kept
|
|
219
|
+
* - SIDE EFFECT: writes the file
|
|
220
|
+
*/
|
|
221
|
+
static keepCodeHost(file: string, kind: CodeHostKind): void;
|
|
222
|
+
/**
|
|
223
|
+
* Turn `baseBranchProtected` on in config file `file`, keeping the rest as written.
|
|
224
|
+
* - the line `epic init` writes is changed in place; a file without one gets the key through `DataFile`
|
|
225
|
+
* - SIDE EFFECT: writes the file
|
|
226
|
+
*/
|
|
227
|
+
static keepProtected(file: string): void;
|
|
228
|
+
/** What the commit section says first: why `epic init` asks to commit, or to open a pull or merge request. */
|
|
229
|
+
static commitHeader(report: Pick<InitReport, "config"> & Partial<Pick<InitReport, "codeHost">>): string;
|
|
230
|
+
/** What a person reads about `report`'s code host: "merge request" on GitLab, GitHub's by default. */
|
|
231
|
+
static wordsOf({ config, codeHost }: Pick<InitReport, "config"> & Partial<Pick<InitReport, "codeHost">>): CodeHostWords;
|
|
232
|
+
/**
|
|
233
|
+
* The files `epic init` changed in the repo, still to commit: the config, `.gitignore`.
|
|
234
|
+
* - a dry run wrote nothing: the ones it would have count too
|
|
235
|
+
*/
|
|
236
|
+
static changedFiles({ main, dryRun, config, gitignore }: ChangedFilesInput): string[];
|
|
127
237
|
/** Where `branch` of checkout `main` pushes: its upstream (`git push`), else `origin`; none: `undefined`. */
|
|
128
238
|
static pushTarget(main: string, branch: string): string[] | undefined;
|
|
129
239
|
/**
|
|
@@ -162,12 +272,13 @@ export declare class RepoInit {
|
|
|
162
272
|
* - `remote` naming another: throws `EpicCommandError`, saying how to change it
|
|
163
273
|
* - `noRemote`: `skipped`
|
|
164
274
|
* - `remote`, else the config's `contentRemote`: made the remote, pushed (`added`)
|
|
165
|
-
* - else made on
|
|
166
|
-
* words when
|
|
275
|
+
* - else made on the code host (`made`), when its command is there and logged in (`no gh` for either's, `logged out`);
|
|
276
|
+
* `failed` with its words when it said no
|
|
167
277
|
* - its name: `contentRepo`, else asked when `ask` (in a terminal), else `<repo>.epics`
|
|
168
278
|
* - private or public: `visibility`, else asked when `ask` (`askVisibility()`), else private
|
|
169
279
|
* - a push that failed is in `error`: the repo and its address stand
|
|
170
|
-
* -
|
|
280
|
+
* - GitLab: after the first push, its default branch opened up to teammates (`warning`, when it couldn't be)
|
|
281
|
+
* - SIDE EFFECT (not `dryRun`): the repo on the code host, the remote, the push, `contentRemote` in the config
|
|
171
282
|
*/
|
|
172
283
|
remoteStep({ shared, settings, dryRun, remote, contentRepo, visibility, noRemote, ask, say }: RemoteStepOptions): Promise<RemoteReport>;
|
|
173
284
|
/**
|
|
@@ -176,12 +287,13 @@ export declare class RepoInit {
|
|
|
176
287
|
*/
|
|
177
288
|
static mainHere(cwd?: string): string;
|
|
178
289
|
/**
|
|
179
|
-
* Whose
|
|
180
|
-
* an ORGANIZATION (
|
|
290
|
+
* Whose account a new epic repo goes in, for the code repo at `main`: the code repo's owner when that's
|
|
291
|
+
* an ORGANIZATION (a GitHub org, a GitLab group or subgroup), else the person's own login; `undefined` when the
|
|
292
|
+
* host's command knows no login.
|
|
181
293
|
* - why not always the code repo's owner: a person can't make a repo in someone else's own account
|
|
182
|
-
* - runs
|
|
294
|
+
* - runs its command (the login, `CodeHost.loginOn()`; the owner's kind)
|
|
183
295
|
*/
|
|
184
|
-
static ownerFor(main: string): string | undefined;
|
|
296
|
+
static ownerFor(main: string, host: CodeHostClient): string | undefined;
|
|
185
297
|
/**
|
|
186
298
|
* Write `address` into config file `file` as its `contentRemote`, keeping the rest as written.
|
|
187
299
|
* - the line `epic init` writes is changed in place; a file without one (written before epic `epic-friend` P4)
|
|
@@ -205,13 +317,13 @@ export declare class RepoInit {
|
|
|
205
317
|
static askVisibility(): Promise<RepoVisibility>;
|
|
206
318
|
/**
|
|
207
319
|
* The name to keep, asked in a terminal EVERY time (Owen, 2026-10-29: "never asked for my user name"):
|
|
208
|
-
* "What do you want to be called?", suggesting the name kept already, else their
|
|
209
|
-
* `user.name`; Enter keeps it.
|
|
210
|
-
* - the login looked up first (`
|
|
320
|
+
* "What do you want to be called?", suggesting the name kept already, else their login on the code host, else
|
|
321
|
+
* git's `user.name`; Enter keeps it.
|
|
322
|
+
* - the login looked up first (`CodeHost.loginOn()`; GitHub's is kept, so pages never run `gh`)
|
|
211
323
|
* - `undefined` when nothing was said and nobody knows a name
|
|
212
324
|
* - no terminal: the suggestion, asking nothing (`CLI.ask()`)
|
|
213
325
|
*/
|
|
214
|
-
static askName(): Promise<string | undefined>;
|
|
326
|
+
static askName(host?: CodeHostClient): Promise<string | undefined>;
|
|
215
327
|
/**
|
|
216
328
|
* Their colour (the class's step 6): kept, there already, or why not.
|
|
217
329
|
* - `person`: their short name; none, no colour
|
|
@@ -275,8 +387,8 @@ export declare class RepoInit {
|
|
|
275
387
|
}): string[];
|
|
276
388
|
/** What needs a word of its own, under the files: the epic repo's problems, the colour's, no name. */
|
|
277
389
|
static noteLines(report: InitReport): string[];
|
|
278
|
-
/** What the commit came to (`commitStep()`), under its question. */
|
|
279
|
-
static commitResultLines(
|
|
390
|
+
/** What the commit came to (`commitStep()`), under its question; `words`: the code host's. */
|
|
391
|
+
static commitResultLines(commit: CommitReport, words?: CodeHostWords): string[];
|
|
280
392
|
/** The last lines: done, and where to see the epics (a browser's link, the editor's view); a dry run's word. */
|
|
281
393
|
static doneLines(report: InitReport): string[];
|
|
282
394
|
}
|
|
@@ -308,6 +420,10 @@ export type InitReport = {
|
|
|
308
420
|
file: string;
|
|
309
421
|
action: "ok" | "updated" | "written";
|
|
310
422
|
};
|
|
423
|
+
/** whether the base branch takes only pull requests, and how that's known (`protectionStep()`) */
|
|
424
|
+
protection: ProtectionReport;
|
|
425
|
+
/** where the code is hosted, and how that's known (`codeHostChoice()`) */
|
|
426
|
+
codeHost: CodeHostReport;
|
|
311
427
|
/** the name this machine's person goes by: `kept` now, kept `already`, `would keep` (a dry run), or `none` */
|
|
312
428
|
person: {
|
|
313
429
|
name: string | undefined;
|
|
@@ -325,14 +441,23 @@ export type InitReport = {
|
|
|
325
441
|
/**
|
|
326
442
|
* What `epic init` did about committing the files it wrote in the repo (`RepoInit.commitStep()`):
|
|
327
443
|
* `committed`, `would commit`, `declined` (asked, and no), `other branch` (not the base branch), `failed`,
|
|
328
|
-
* `none` (nothing to commit)
|
|
444
|
+
* `none` (nothing to commit); for a base branch that takes only pull requests, `on branch` (`SETUP_BRANCH`) and
|
|
445
|
+
* `would branch` in place of the commits
|
|
329
446
|
*/
|
|
330
447
|
export type CommitReport = {
|
|
331
|
-
action: "committed" | "would commit" | "declined" | "other branch" | "failed" | "none";
|
|
448
|
+
action: "committed" | "would commit" | "on branch" | "would branch" | "declined" | "other branch" | "failed" | "none";
|
|
332
449
|
/** the files, from the repo's root: the config, `.gitignore` */
|
|
333
450
|
files: string[];
|
|
334
|
-
/** the branch the repo is on (the base branch, unless `other branch`) */
|
|
451
|
+
/** the branch the repo is on (the base branch, unless `other branch`), or the setup branch */
|
|
335
452
|
branch: string;
|
|
453
|
+
/** the base branch takes only pull requests: `commitViaPullRequest()` did this */
|
|
454
|
+
viaPullRequest?: boolean;
|
|
455
|
+
/** the base branch, with `viaPullRequest` */
|
|
456
|
+
base?: string;
|
|
457
|
+
/** the pull request's address */
|
|
458
|
+
pullRequest?: string;
|
|
459
|
+
/** why there's none yet: no command, logged out, or its words */
|
|
460
|
+
pullRequestError?: string;
|
|
336
461
|
/** why it failed */
|
|
337
462
|
error?: string;
|
|
338
463
|
/** after the commit: `pushed`, `nowhere` (no upstream, no `origin`), or `failed` (`pushError`, git's words) */
|
|
@@ -340,8 +465,32 @@ export type CommitReport = {
|
|
|
340
465
|
/** why the push failed */
|
|
341
466
|
pushError?: string;
|
|
342
467
|
};
|
|
468
|
+
/**
|
|
469
|
+
* Whether the base branch takes only pull requests (`RepoInit.protectionStep()`): `on`, and how that's known:
|
|
470
|
+
* `config` (it says so), `flag` (`--protected-base`), `detected` (GitHub says so), `off`, or `says off` (GitHub requires
|
|
471
|
+
* one, but the config says `false`, and stays so)
|
|
472
|
+
*/
|
|
473
|
+
export type ProtectionReport = {
|
|
474
|
+
action: "config" | "flag" | "detected" | "off" | "says off";
|
|
475
|
+
on: boolean;
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* Where the code is hosted (`RepoInit.codeHostChoice()`): `kind`, and how that's known:
|
|
479
|
+
* `flag` (`--host`), `config`, `address` (`origin`'s), `asked`, `assumed` (unknown host, no terminal: GitHub), `default`
|
|
480
|
+
* (no remote)
|
|
481
|
+
*/
|
|
482
|
+
export type CodeHostReport = {
|
|
483
|
+
kind: CodeHostKind;
|
|
484
|
+
source: "flag" | "config" | "address" | "asked" | "assumed" | "default";
|
|
485
|
+
/** the `origin` remote's host */
|
|
486
|
+
host?: string;
|
|
487
|
+
/** the `origin` remote's address */
|
|
488
|
+
address?: string;
|
|
489
|
+
};
|
|
490
|
+
/** What `RepoInit.changedFiles()` reads off the report. */
|
|
491
|
+
export type ChangedFilesInput = Pick<InitReport, "main"> & Partial<Pick<InitReport, "dryRun" | "config" | "gitignore">>;
|
|
343
492
|
/** What `epic init`'s questions came to (`RepoInit.questions()`): `init()`'s answers, and the summary. */
|
|
344
|
-
export type Answers = Pick<InitOptions, "name" | "color" | "contentRepo" | "visibility" | "cloned"> & {
|
|
493
|
+
export type Answers = Pick<InitOptions, "name" | "color" | "contentRepo" | "visibility" | "cloned" | "codeHost"> & {
|
|
345
494
|
/** what the summary under the questions says */
|
|
346
495
|
plan: Plan;
|
|
347
496
|
};
|
|
@@ -360,6 +509,8 @@ export type QuestionOptions = Pick<InitOptions, "name" | "color" | "remote" | "c
|
|
|
360
509
|
ask: boolean;
|
|
361
510
|
/** only say what it would do: nothing cloned */
|
|
362
511
|
dryRun: boolean;
|
|
512
|
+
/** where the code is hosted (`--host`) */
|
|
513
|
+
host?: CodeHostKind;
|
|
363
514
|
};
|
|
364
515
|
/** What `epic init` did about the epic plugin: `installed` (and how many `changes`), `already`, ... */
|
|
365
516
|
export type PluginReport = {
|
|
@@ -423,12 +574,12 @@ export type ColorStepOptions = {
|
|
|
423
574
|
* What `epic init` did about the epic repo's remote, the Epic repo (`RepoInit.remoteStep()`):
|
|
424
575
|
* - `action`:
|
|
425
576
|
* - `cloned`: a later person's epic folder, cloned from `address`; `clone failed`, git's words in `error`
|
|
426
|
-
* - `made`: `repo` made on
|
|
577
|
+
* - `made`: `repo` made on the code host, pushed to, its `address` written in the config
|
|
427
578
|
* - `added`: `address` (`--remote`, or the config's) made the remote, pushed to
|
|
428
579
|
* - `recorded`: the remote the epic repo had, written in the config; `already`: there already
|
|
429
580
|
* - `skipped`: `--no-remote`
|
|
430
|
-
* - `no gh`, `logged out`:
|
|
431
|
-
* - `failed`:
|
|
581
|
+
* - `no gh`, `logged out`: the code host's command (`gh` or `glab`) missing, or not logged in: nothing made
|
|
582
|
+
* - `failed`: the code host said no (`error`: its words)
|
|
432
583
|
* - `would ...`: a dry run's
|
|
433
584
|
* - `error`: also a push that failed (`made`, `added`): the remote stands, the push is left to do by hand
|
|
434
585
|
*/
|
|
@@ -436,12 +587,14 @@ export type RemoteReport = {
|
|
|
436
587
|
action: RemoteAction;
|
|
437
588
|
/** the epic repo's address, as git takes it */
|
|
438
589
|
address?: string;
|
|
439
|
-
/** the
|
|
590
|
+
/** the repo made on the code host, or that would be: `owner/name` */
|
|
440
591
|
repo?: string;
|
|
441
592
|
/** who can see that repo: `private` or `public` (`made`, `would make`, `failed`) */
|
|
442
593
|
visibility?: RepoVisibility;
|
|
443
|
-
/** git's or
|
|
594
|
+
/** git's or the code host's words, when something failed */
|
|
444
595
|
error?: string;
|
|
596
|
+
/** one line about what the team must do by hand: GitLab's default branch left protected */
|
|
597
|
+
warning?: string;
|
|
445
598
|
};
|
|
446
599
|
/** What `epic init` did about the epic repo: `RemoteReport`. */
|
|
447
600
|
export type RemoteAction = "cloned" | "clone failed" | "made" | "added" | "recorded" | "already" | "skipped" | "no gh" | "logged out" | "failed" | "would clone" | "would make" | "would add" | "would record";
|
|
@@ -453,9 +606,9 @@ export type InitOptions = {
|
|
|
453
606
|
name?: string;
|
|
454
607
|
/** the epic repo's address, made already (`--remote`): made the epic repo's remote, and pushed to */
|
|
455
608
|
remote?: string;
|
|
456
|
-
/** the name to give the epic repo on
|
|
609
|
+
/** the name to give the epic repo on the code host (`--content-repo`); none: asked, else `<repo>.epics` */
|
|
457
610
|
contentRepo?: string;
|
|
458
|
-
/** whether the epic repo made on
|
|
611
|
+
/** whether the epic repo made on the code host is private or public (`--public`); none: asked, else private */
|
|
459
612
|
visibility?: RepoVisibility;
|
|
460
613
|
/** no remote, no epic repo (`--no-remote`): the plans stay on this machine; default `false` */
|
|
461
614
|
noRemote?: boolean;
|
|
@@ -474,6 +627,10 @@ export type InitOptions = {
|
|
|
474
627
|
commit?: boolean;
|
|
475
628
|
/** the team's plans cloned already (`questions()`, for the colours they hold): reported as `cloned` */
|
|
476
629
|
cloned?: boolean;
|
|
630
|
+
/** the base branch takes only pull requests (`--protected-base`); default `false`: the host's word, else off */
|
|
631
|
+
protectedBase?: boolean;
|
|
632
|
+
/** where the code is hosted, settled already (`questions()`); none: worked out, asking nothing */
|
|
633
|
+
codeHost?: CodeHostReport;
|
|
477
634
|
/** a progress line, before each slow step (a clone, GitHub, a push, the server); default: nothing said */
|
|
478
635
|
say?: (text: string) => void;
|
|
479
636
|
};
|
|
@@ -484,6 +641,6 @@ export type RemoteStepOptions = Pick<InitOptions, "remote" | "contentRepo" | "vi
|
|
|
484
641
|
dryRun: boolean;
|
|
485
642
|
noRemote: boolean;
|
|
486
643
|
ask: boolean;
|
|
487
|
-
/** a progress line, before
|
|
644
|
+
/** a progress line, before the code host makes the repo */
|
|
488
645
|
say?: (text: string) => void;
|
|
489
646
|
};
|