@treeseed/sdk 0.6.9 → 0.6.11
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/index.d.ts +1 -1
- package/dist/index.js +2 -0
- package/dist/managed-dependencies.d.ts +23 -0
- package/dist/managed-dependencies.js +133 -12
- package/dist/operations/providers/default.js +35 -0
- package/dist/operations/services/config-runtime.js +16 -3
- package/dist/operations/services/deploy.js +14 -1
- package/dist/operations/services/export-runtime.js +4 -0
- package/dist/operations/services/git-workflow.d.ts +2 -0
- package/dist/operations/services/git-workflow.js +39 -4
- package/dist/operations/services/github-api.d.ts +10 -0
- package/dist/operations/services/github-api.js +20 -1
- package/dist/operations/services/github-automation.d.ts +3 -0
- package/dist/operations/services/repository-save-orchestrator.js +10 -4
- package/dist/operations/services/workspace-dependency-mode.js +10 -18
- package/dist/operations-registry.js +1 -0
- package/dist/scripts/patch-starlight-content-path.js +2 -1
- package/dist/workflow/operations.d.ts +259 -429
- package/dist/workflow/operations.js +687 -78
- package/dist/workflow/runs.d.ts +38 -0
- package/dist/workflow/runs.js +182 -15
- package/dist/workflow/worktrees.d.ts +39 -0
- package/dist/workflow/worktrees.js +224 -0
- package/dist/workflow-state.d.ts +13 -0
- package/dist/workflow-state.js +35 -2
- package/dist/workflow-support.d.ts +1 -1
- package/dist/workflow-support.js +2 -0
- package/dist/workflow.d.ts +14 -1
- package/package.json +1 -1
- package/templates/github/deploy.workflow.yml +100 -5
|
@@ -7,7 +7,7 @@ export { configuredRailwayServices, deployRailwayService, validateRailwayDeployP
|
|
|
7
7
|
export { ensureRailwayEnvironment, ensureRailwayProject, ensureRailwayService, getRailwayAuthProfile, listRailwayEnvironments, listRailwayProjects, listRailwayServices, listRailwayVariables, railwayGraphqlRequest, resolveRailwayApiToken, resolveRailwayApiUrl, resolveRailwayWorkspace, resolveRailwayWorkspaceContext, upsertRailwayVariables, } from './operations/services/railway-api.ts';
|
|
8
8
|
export { runTenantDeployPreflight, runWorkspaceSavePreflight, } from './operations/services/save-deploy-preflight.ts';
|
|
9
9
|
export { collectCliPreflight } from './operations/services/workspace-preflight.ts';
|
|
10
|
-
export { collectTreeseedDependencyStatus, createTreeseedManagedToolEnv, formatTreeseedDependencyFailureDetails, formatTreeseedDependencyReport, installTreeseedDependencies, resolveTreeseedToolBinary, resolveTreeseedToolCommand, } from './managed-dependencies.ts';
|
|
10
|
+
export { collectTreeseedDependencyStatus, collectTreeseedToolStatus, createTreeseedManagedToolEnv, formatTreeseedDependencyFailureDetails, formatTreeseedDependencyReport, installTreeseedDependencies, resolveTreeseedToolBinary, resolveTreeseedToolCommand, type TreeseedToolStatusResult, } from './managed-dependencies.ts';
|
|
11
11
|
export { runTreeseedCopilotTask, type TreeseedCopilotTaskInput, type TreeseedCopilotTaskResult, } from './copilot.ts';
|
|
12
12
|
export { applyWorkspaceVersionChanges, collectMergeConflictReport, currentBranch, formatMergeConflictReport, gitStatusPorcelain, hasMeaningfulChanges, incrementVersion, originRemoteUrl, planWorkspaceReleaseBump, repoRoot, } from './operations/services/workspace-save.ts';
|
|
13
13
|
export { assertNoWorkspaceLinksInDeploymentLockfiles, collectDeploymentLockfileWorkspaceIssues, discoverWorkspaceLinks, ensureLocalWorkspaceLinks, inspectWorkspaceDependencyMode, unlinkLocalWorkspaceLinks, type DependencyResolutionMode, type DeploymentLockfileWorkspaceIssue, type WorkspaceLinksMode, } from './operations/services/workspace-dependency-mode.ts';
|
package/dist/workflow-support.js
CHANGED
|
@@ -113,6 +113,7 @@ import {
|
|
|
113
113
|
import { collectCliPreflight } from "./operations/services/workspace-preflight.js";
|
|
114
114
|
import {
|
|
115
115
|
collectTreeseedDependencyStatus,
|
|
116
|
+
collectTreeseedToolStatus,
|
|
116
117
|
createTreeseedManagedToolEnv,
|
|
117
118
|
formatTreeseedDependencyFailureDetails,
|
|
118
119
|
formatTreeseedDependencyReport,
|
|
@@ -185,6 +186,7 @@ export {
|
|
|
185
186
|
collectTreeseedDependencyStatus,
|
|
186
187
|
collectTreeseedPrintEnvReport,
|
|
187
188
|
collectTreeseedReconcileStatus,
|
|
189
|
+
collectTreeseedToolStatus,
|
|
188
190
|
configuredRailwayServices,
|
|
189
191
|
createBranchPreviewDeployTarget,
|
|
190
192
|
createDefaultTreeseedMachineConfig,
|
package/dist/workflow.d.ts
CHANGED
|
@@ -26,6 +26,9 @@ export type TreeseedWorkflowRecovery = {
|
|
|
26
26
|
lock?: Record<string, unknown> | null;
|
|
27
27
|
};
|
|
28
28
|
export type TreeseedWorkflowExecutionMode = 'execute' | 'plan';
|
|
29
|
+
export type TreeseedWorkflowWorktreeMode = 'auto' | 'on' | 'off';
|
|
30
|
+
export type TreeseedWorkflowCiMode = 'auto' | 'hosted' | 'off';
|
|
31
|
+
export type TreeseedWorkflowVerifyMode = 'fast' | 'local' | 'hosted' | 'both' | 'skip';
|
|
29
32
|
export type TreeseedWorkflowContext = {
|
|
30
33
|
cwd?: string;
|
|
31
34
|
env?: NodeJS.ProcessEnv;
|
|
@@ -101,7 +104,9 @@ export type TreeseedSaveInput = {
|
|
|
101
104
|
devDependencyReferenceMode?: 'git-tag' | 'registry-prerelease';
|
|
102
105
|
gitDependencyProtocol?: 'preserve-origin' | 'https' | 'ssh';
|
|
103
106
|
gitRemoteWriteMode?: 'ssh-pushurl' | 'off';
|
|
104
|
-
verifyMode?: 'action-first' | 'local-only' | 'skip';
|
|
107
|
+
verifyMode?: 'action-first' | 'local-only' | 'skip' | TreeseedWorkflowVerifyMode;
|
|
108
|
+
ciMode?: TreeseedWorkflowCiMode;
|
|
109
|
+
worktreeMode?: TreeseedWorkflowWorktreeMode;
|
|
105
110
|
commitMessageMode?: 'auto' | 'cloudflare' | 'generated' | 'fallback';
|
|
106
111
|
workspaceLinks?: 'auto' | 'off';
|
|
107
112
|
plan?: boolean;
|
|
@@ -112,6 +117,7 @@ export type TreeseedCloseInput = {
|
|
|
112
117
|
deletePreview?: boolean;
|
|
113
118
|
deleteBranch?: boolean;
|
|
114
119
|
autoSave?: boolean;
|
|
120
|
+
worktreeMode?: TreeseedWorkflowWorktreeMode;
|
|
115
121
|
workspaceLinks?: 'auto' | 'off';
|
|
116
122
|
plan?: boolean;
|
|
117
123
|
dryRun?: boolean;
|
|
@@ -122,6 +128,8 @@ export type TreeseedStageInput = {
|
|
|
122
128
|
deletePreview?: boolean;
|
|
123
129
|
deleteBranch?: boolean;
|
|
124
130
|
autoSave?: boolean;
|
|
131
|
+
ciMode?: TreeseedWorkflowCiMode;
|
|
132
|
+
worktreeMode?: TreeseedWorkflowWorktreeMode;
|
|
125
133
|
workspaceLinks?: 'auto' | 'off';
|
|
126
134
|
plan?: boolean;
|
|
127
135
|
dryRun?: boolean;
|
|
@@ -132,6 +140,7 @@ export type TreeseedSwitchInput = {
|
|
|
132
140
|
preview?: boolean;
|
|
133
141
|
createIfMissing?: boolean;
|
|
134
142
|
baseBranch?: string;
|
|
143
|
+
worktreeMode?: TreeseedWorkflowWorktreeMode;
|
|
135
144
|
workspaceLinks?: 'auto' | 'off';
|
|
136
145
|
plan?: boolean;
|
|
137
146
|
dryRun?: boolean;
|
|
@@ -174,12 +183,15 @@ export type TreeseedConfigInput = {
|
|
|
174
183
|
};
|
|
175
184
|
export type TreeseedExportInput = {
|
|
176
185
|
directory?: string;
|
|
186
|
+
worktreeMode?: TreeseedWorkflowWorktreeMode;
|
|
177
187
|
};
|
|
178
188
|
export type TreeseedReleaseInput = {
|
|
179
189
|
bump: 'major' | 'minor' | 'patch';
|
|
180
190
|
devTagCleanup?: 'safe-after-release' | 'off';
|
|
181
191
|
gitDependencyProtocol?: 'preserve-origin' | 'https' | 'ssh';
|
|
182
192
|
gitRemoteWriteMode?: 'ssh-pushurl' | 'off';
|
|
193
|
+
ciMode?: TreeseedWorkflowCiMode;
|
|
194
|
+
worktreeMode?: TreeseedWorkflowWorktreeMode;
|
|
183
195
|
workspaceLinks?: 'auto' | 'off';
|
|
184
196
|
plan?: boolean;
|
|
185
197
|
dryRun?: boolean;
|
|
@@ -189,6 +201,7 @@ export type TreeseedResumeInput = {
|
|
|
189
201
|
};
|
|
190
202
|
export type TreeseedRecoverInput = {
|
|
191
203
|
runId?: string;
|
|
204
|
+
pruneStale?: boolean;
|
|
192
205
|
};
|
|
193
206
|
export type TreeseedDestroyInput = {
|
|
194
207
|
target?: 'local' | 'staging' | 'prod';
|
package/package.json
CHANGED
|
@@ -152,13 +152,32 @@ jobs:
|
|
|
152
152
|
- name: Install dependencies
|
|
153
153
|
run: |
|
|
154
154
|
node -e "const fs = require('fs'); for (const file of ['packages/sdk/package.json', 'packages/core/package.json', 'packages/cli/package.json']) { if (!fs.existsSync(file)) continue; const p = JSON.parse(fs.readFileSync(file, 'utf8')); if (p.scripts) delete p.scripts.prepare; fs.writeFileSync(file, JSON.stringify(p, null, '\t') + '\n'); }"
|
|
155
|
-
|
|
155
|
+
for attempt in 1 2 3; do
|
|
156
|
+
if npm ci --ignore-scripts; then
|
|
157
|
+
break
|
|
158
|
+
fi
|
|
159
|
+
if test "${attempt}" = "3"; then
|
|
160
|
+
exit 1
|
|
161
|
+
fi
|
|
162
|
+
echo "npm ci failed; retrying (${attempt}/3)."
|
|
163
|
+
sleep $((attempt * 10))
|
|
164
|
+
done
|
|
156
165
|
for dir in packages/sdk packages/core packages/cli; do
|
|
157
166
|
if test -d "${dir}/.git" || git -C "${dir}" rev-parse --git-dir >/dev/null 2>&1; then
|
|
158
167
|
git -C "${dir}" checkout -- package.json
|
|
159
168
|
fi
|
|
160
169
|
done
|
|
161
170
|
|
|
171
|
+
- name: Build workspace package artifacts
|
|
172
|
+
shell: bash
|
|
173
|
+
run: |
|
|
174
|
+
set -euo pipefail
|
|
175
|
+
for dir in packages/sdk packages/core packages/cli; do
|
|
176
|
+
if test -f "${dir}/package.json"; then
|
|
177
|
+
npm --prefix "${dir}" run build:dist
|
|
178
|
+
fi
|
|
179
|
+
done
|
|
180
|
+
|
|
162
181
|
- name: Verify workspace
|
|
163
182
|
shell: bash
|
|
164
183
|
run: |
|
|
@@ -272,13 +291,32 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
272
291
|
- name: Install dependencies
|
|
273
292
|
run: |
|
|
274
293
|
node -e "const fs = require('fs'); for (const file of ['packages/sdk/package.json', 'packages/core/package.json', 'packages/cli/package.json']) { if (!fs.existsSync(file)) continue; const p = JSON.parse(fs.readFileSync(file, 'utf8')); if (p.scripts) delete p.scripts.prepare; fs.writeFileSync(file, JSON.stringify(p, null, '\t') + '\n'); }"
|
|
275
|
-
|
|
294
|
+
for attempt in 1 2 3; do
|
|
295
|
+
if npm ci --ignore-scripts; then
|
|
296
|
+
break
|
|
297
|
+
fi
|
|
298
|
+
if test "${attempt}" = "3"; then
|
|
299
|
+
exit 1
|
|
300
|
+
fi
|
|
301
|
+
echo "npm ci failed; retrying (${attempt}/3)."
|
|
302
|
+
sleep $((attempt * 10))
|
|
303
|
+
done
|
|
276
304
|
for dir in packages/sdk packages/core packages/cli; do
|
|
277
305
|
if test -d "${dir}/.git" || git -C "${dir}" rev-parse --git-dir >/dev/null 2>&1; then
|
|
278
306
|
git -C "${dir}" checkout -- package.json
|
|
279
307
|
fi
|
|
280
308
|
done
|
|
281
309
|
|
|
310
|
+
- name: Build workspace package artifacts
|
|
311
|
+
shell: bash
|
|
312
|
+
run: |
|
|
313
|
+
set -euo pipefail
|
|
314
|
+
for dir in packages/sdk packages/core packages/cli; do
|
|
315
|
+
if test -f "${dir}/package.json"; then
|
|
316
|
+
npm --prefix "${dir}" run build:dist
|
|
317
|
+
fi
|
|
318
|
+
done
|
|
319
|
+
|
|
282
320
|
- name: Install Railway CLI
|
|
283
321
|
run: npm install -g @railway/cli
|
|
284
322
|
|
|
@@ -400,13 +438,32 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
400
438
|
- name: Install dependencies
|
|
401
439
|
run: |
|
|
402
440
|
node -e "const fs = require('fs'); for (const file of ['packages/sdk/package.json', 'packages/core/package.json', 'packages/cli/package.json']) { if (!fs.existsSync(file)) continue; const p = JSON.parse(fs.readFileSync(file, 'utf8')); if (p.scripts) delete p.scripts.prepare; fs.writeFileSync(file, JSON.stringify(p, null, '\t') + '\n'); }"
|
|
403
|
-
|
|
441
|
+
for attempt in 1 2 3; do
|
|
442
|
+
if npm ci --ignore-scripts; then
|
|
443
|
+
break
|
|
444
|
+
fi
|
|
445
|
+
if test "${attempt}" = "3"; then
|
|
446
|
+
exit 1
|
|
447
|
+
fi
|
|
448
|
+
echo "npm ci failed; retrying (${attempt}/3)."
|
|
449
|
+
sleep $((attempt * 10))
|
|
450
|
+
done
|
|
404
451
|
for dir in packages/sdk packages/core packages/cli; do
|
|
405
452
|
if test -d "${dir}/.git" || git -C "${dir}" rev-parse --git-dir >/dev/null 2>&1; then
|
|
406
453
|
git -C "${dir}" checkout -- package.json
|
|
407
454
|
fi
|
|
408
455
|
done
|
|
409
456
|
|
|
457
|
+
- name: Build workspace package artifacts
|
|
458
|
+
shell: bash
|
|
459
|
+
run: |
|
|
460
|
+
set -euo pipefail
|
|
461
|
+
for dir in packages/sdk packages/core packages/cli; do
|
|
462
|
+
if test -f "${dir}/package.json"; then
|
|
463
|
+
npm --prefix "${dir}" run build:dist
|
|
464
|
+
fi
|
|
465
|
+
done
|
|
466
|
+
|
|
410
467
|
- name: Install Railway CLI
|
|
411
468
|
run: npm install -g @railway/cli
|
|
412
469
|
|
|
@@ -520,13 +577,32 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
520
577
|
- name: Install dependencies
|
|
521
578
|
run: |
|
|
522
579
|
node -e "const fs = require('fs'); for (const file of ['packages/sdk/package.json', 'packages/core/package.json', 'packages/cli/package.json']) { if (!fs.existsSync(file)) continue; const p = JSON.parse(fs.readFileSync(file, 'utf8')); if (p.scripts) delete p.scripts.prepare; fs.writeFileSync(file, JSON.stringify(p, null, '\t') + '\n'); }"
|
|
523
|
-
|
|
580
|
+
for attempt in 1 2 3; do
|
|
581
|
+
if npm ci --ignore-scripts; then
|
|
582
|
+
break
|
|
583
|
+
fi
|
|
584
|
+
if test "${attempt}" = "3"; then
|
|
585
|
+
exit 1
|
|
586
|
+
fi
|
|
587
|
+
echo "npm ci failed; retrying (${attempt}/3)."
|
|
588
|
+
sleep $((attempt * 10))
|
|
589
|
+
done
|
|
524
590
|
for dir in packages/sdk packages/core packages/cli; do
|
|
525
591
|
if test -d "${dir}/.git" || git -C "${dir}" rev-parse --git-dir >/dev/null 2>&1; then
|
|
526
592
|
git -C "${dir}" checkout -- package.json
|
|
527
593
|
fi
|
|
528
594
|
done
|
|
529
595
|
|
|
596
|
+
- name: Build workspace package artifacts
|
|
597
|
+
shell: bash
|
|
598
|
+
run: |
|
|
599
|
+
set -euo pipefail
|
|
600
|
+
for dir in packages/sdk packages/core packages/cli; do
|
|
601
|
+
if test -f "${dir}/package.json"; then
|
|
602
|
+
npm --prefix "${dir}" run build:dist
|
|
603
|
+
fi
|
|
604
|
+
done
|
|
605
|
+
|
|
530
606
|
- name: Install Railway CLI
|
|
531
607
|
run: npm install -g @railway/cli
|
|
532
608
|
|
|
@@ -620,13 +696,32 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
620
696
|
- name: Install dependencies
|
|
621
697
|
run: |
|
|
622
698
|
node -e "const fs = require('fs'); for (const file of ['packages/sdk/package.json', 'packages/core/package.json', 'packages/cli/package.json']) { if (!fs.existsSync(file)) continue; const p = JSON.parse(fs.readFileSync(file, 'utf8')); if (p.scripts) delete p.scripts.prepare; fs.writeFileSync(file, JSON.stringify(p, null, '\t') + '\n'); }"
|
|
623
|
-
|
|
699
|
+
for attempt in 1 2 3; do
|
|
700
|
+
if npm ci --ignore-scripts; then
|
|
701
|
+
break
|
|
702
|
+
fi
|
|
703
|
+
if test "${attempt}" = "3"; then
|
|
704
|
+
exit 1
|
|
705
|
+
fi
|
|
706
|
+
echo "npm ci failed; retrying (${attempt}/3)."
|
|
707
|
+
sleep $((attempt * 10))
|
|
708
|
+
done
|
|
624
709
|
for dir in packages/sdk packages/core packages/cli; do
|
|
625
710
|
if test -d "${dir}/.git" || git -C "${dir}" rev-parse --git-dir >/dev/null 2>&1; then
|
|
626
711
|
git -C "${dir}" checkout -- package.json
|
|
627
712
|
fi
|
|
628
713
|
done
|
|
629
714
|
|
|
715
|
+
- name: Build workspace package artifacts
|
|
716
|
+
shell: bash
|
|
717
|
+
run: |
|
|
718
|
+
set -euo pipefail
|
|
719
|
+
for dir in packages/sdk packages/core packages/cli; do
|
|
720
|
+
if test -f "${dir}/package.json"; then
|
|
721
|
+
npm --prefix "${dir}" run build:dist
|
|
722
|
+
fi
|
|
723
|
+
done
|
|
724
|
+
|
|
630
725
|
- name: Download Treeseed deployment state
|
|
631
726
|
uses: actions/download-artifact@v4
|
|
632
727
|
with:
|