@treeseed/sdk 0.6.5 → 0.6.7
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.
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
ensureGeneratedWranglerConfig,
|
|
23
23
|
finalizeDeploymentState,
|
|
24
24
|
loadDeployState,
|
|
25
|
+
markDeploymentInitialized,
|
|
25
26
|
purgePublishedContentCaches,
|
|
26
27
|
resolveConfiguredCloudflareAccountId,
|
|
27
28
|
resolveConfiguredSurfaceBaseUrl,
|
|
@@ -974,6 +975,7 @@ async function provisionProjectPlatform(options) {
|
|
|
974
975
|
});
|
|
975
976
|
}
|
|
976
977
|
writeDeployState(options.tenantRoot, state, { target });
|
|
978
|
+
markDeploymentInitialized(options.tenantRoot, { target });
|
|
977
979
|
await reportDeployment(reporter, {
|
|
978
980
|
environment: options.scope,
|
|
979
981
|
deploymentKind: "provision",
|
package/package.json
CHANGED
|
@@ -265,6 +265,21 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
265
265
|
shell: bash
|
|
266
266
|
run: |
|
|
267
267
|
__TENANT_WORKFLOW_ACTION_COMMAND_BLOCK__
|
|
268
|
+
|
|
269
|
+
- name: Ensure Treeseed deployment state
|
|
270
|
+
shell: bash
|
|
271
|
+
run: |
|
|
272
|
+
node --input-type=module -e "import { dirname } from 'node:path'; import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'; const scope = process.env.TREESEED_WORKFLOW_ENVIRONMENT || 'staging'; const filePath = '.treeseed/state/' + scope + '/deploy.json'; const now = new Date().toISOString(); let state = {}; if (existsSync(filePath)) { state = JSON.parse(readFileSync(filePath, 'utf8')); } state.target = state.target || { kind: 'persistent', scope }; state.readiness = { ...(state.readiness || {}), initialized: true, configured: true, phase: state.readiness?.phase || 'config_complete', initializedAt: state.readiness?.initializedAt || now, lastValidatedAt: now, blockers: state.readiness?.blockers || [], warnings: state.readiness?.warnings || [] }; mkdirSync(dirname(filePath), { recursive: true }); writeFileSync(filePath, JSON.stringify(state, null, 2) + '\n');"
|
|
273
|
+
|
|
274
|
+
- name: Upload Treeseed deployment state
|
|
275
|
+
if: always()
|
|
276
|
+
uses: actions/upload-artifact@v4
|
|
277
|
+
with:
|
|
278
|
+
name: treeseed-deploy-state-${{ needs.classify.outputs.scope }}
|
|
279
|
+
path: .treeseed/state
|
|
280
|
+
if-no-files-found: error
|
|
281
|
+
retention-days: 1
|
|
282
|
+
include-hidden-files: true
|
|
268
283
|
__WORKING_DIRECTORY_BLOCK__
|
|
269
284
|
|
|
270
285
|
deploy-code:
|
|
@@ -371,6 +386,12 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
371
386
|
- name: Install dependencies
|
|
372
387
|
run: npm ci
|
|
373
388
|
|
|
389
|
+
- name: Download Treeseed deployment state
|
|
390
|
+
uses: actions/download-artifact@v4
|
|
391
|
+
with:
|
|
392
|
+
name: treeseed-deploy-state-${{ needs.classify.outputs.scope }}
|
|
393
|
+
path: .treeseed/state
|
|
394
|
+
|
|
374
395
|
- name: Deploy Treeseed platform
|
|
375
396
|
shell: bash
|
|
376
397
|
run: |
|
|
@@ -473,6 +494,12 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
473
494
|
- name: Install dependencies
|
|
474
495
|
run: npm ci
|
|
475
496
|
|
|
497
|
+
- name: Download Treeseed deployment state
|
|
498
|
+
uses: actions/download-artifact@v4
|
|
499
|
+
with:
|
|
500
|
+
name: treeseed-deploy-state-${{ needs.classify.outputs.scope }}
|
|
501
|
+
path: .treeseed/state
|
|
502
|
+
|
|
476
503
|
- name: Publish Treeseed content
|
|
477
504
|
shell: bash
|
|
478
505
|
run: |
|
|
@@ -555,6 +582,12 @@ __WORKING_DIRECTORY_BLOCK__
|
|
|
555
582
|
- name: Install dependencies
|
|
556
583
|
run: npm ci
|
|
557
584
|
|
|
585
|
+
- name: Download Treeseed deployment state
|
|
586
|
+
uses: actions/download-artifact@v4
|
|
587
|
+
with:
|
|
588
|
+
name: treeseed-deploy-state-${{ needs.classify.outputs.scope }}
|
|
589
|
+
path: .treeseed/state
|
|
590
|
+
|
|
558
591
|
- name: Report Treeseed deployment state
|
|
559
592
|
shell: bash
|
|
560
593
|
run: |
|