@contentful/experience-design-system-cli 2.12.2-dev-build-e72ea10.0 → 2.12.3-dev-build-4a6b002.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json
CHANGED
|
@@ -49,7 +49,7 @@ import { checkAgentAuth } from '../../generate/agent-runner.js';
|
|
|
49
49
|
import { normalizePath } from '../path-utils.js';
|
|
50
50
|
import { DEFAULT_CONFIGURED_HOST, toConfiguredHost } from '../../host-utils.js';
|
|
51
51
|
import { writeExperiencesCredentials } from '../../credentials-store.js';
|
|
52
|
-
import { nextStepAfterScopeGate, nextStepAfterCredentialsValidated, shouldBypassPreview, buildSkippedPreviewTransition, shouldRefusePush, buildSkippedPushTransition, resolveNoCacheForGenerate, } from './wizard-state-transitions.js';
|
|
52
|
+
import { nextStepAfterScopeGate, nextStepAfterCredentialsValidated, shouldBypassPreview, buildSkippedPreviewTransition, shouldRefusePush, buildSkippedPushTransition, shouldSkipFinalReviewAfterCredentials, resolveNoCacheForGenerate, } from './wizard-state-transitions.js';
|
|
53
53
|
function findCliPath() {
|
|
54
54
|
return join(fileURLToPath(import.meta.url), '..', '..', '..', '..', '..', 'bin', 'cli.js');
|
|
55
55
|
}
|
|
@@ -197,11 +197,6 @@ export function WizardApp({ initialSpaceId = '', initialEnvironmentId = 'master'
|
|
|
197
197
|
// `generating-tokens` step which already drives the token-classification
|
|
198
198
|
// subprocess off `state.rawTokensPath`. Modify-entry wins if both are set.
|
|
199
199
|
const rawTokensEntryReady = !modifyEntryReady && !pushFromPickerReady && !!initialRawTokensPath;
|
|
200
|
-
// Fresh session = the wizard is going to create its own extract session via
|
|
201
|
-
// `analyze extract` rather than pick one up from `--modify` / `--push-from-run`.
|
|
202
|
-
// For fresh sessions we force `--no-cache` on the spawned `generate components`
|
|
203
|
-
// so operators aren't silently served classifications cached from a prior
|
|
204
|
-
// session (the generation_cache table is project-wide, not session-scoped).
|
|
205
200
|
const isFreshSession = !seedExtractSessionId;
|
|
206
201
|
const effectiveNoCache = resolveNoCacheForGenerate({ isFreshSession, cliNoCache: noCache });
|
|
207
202
|
const initialStepResolved = modifyEntryReady
|
|
@@ -270,6 +265,7 @@ export function WizardApp({ initialSpaceId = '', initialEnvironmentId = 'master'
|
|
|
270
265
|
credentialsSkipped: false,
|
|
271
266
|
lastRunId: null,
|
|
272
267
|
finalizeErrorBanner: null,
|
|
268
|
+
finalReviewPassed: modifyEntryReady || pushFromPickerReady,
|
|
273
269
|
});
|
|
274
270
|
useEffect(() => {
|
|
275
271
|
sessionRef.current = {
|
|
@@ -813,10 +809,7 @@ export function WizardApp({ initialSpaceId = '', initialEnvironmentId = 'master'
|
|
|
813
809
|
// accepted components) or jumps straight to push-decision-gate (if scope
|
|
814
810
|
// rejected everything but tokens/removals still need to be pushed).
|
|
815
811
|
const advanceAfterCredentialsValidated = async () => {
|
|
816
|
-
|
|
817
|
-
// 401/403 raised by runPreview), skip back to push-decision-gate rather
|
|
818
|
-
// than re-running the LLM.
|
|
819
|
-
if (state.generateSessionId) {
|
|
812
|
+
if (shouldSkipFinalReviewAfterCredentials(state)) {
|
|
820
813
|
update({ step: 'push-decision-gate' });
|
|
821
814
|
return;
|
|
822
815
|
}
|
|
@@ -1511,6 +1504,7 @@ export function WizardApp({ initialSpaceId = '', initialEnvironmentId = 'master'
|
|
|
1511
1504
|
case 'final-review': {
|
|
1512
1505
|
return (_jsx(FinalReviewHost, { extractSessionId: state.extractSessionId, generatedCount: state.generatedCount, autoAccept: autoAcceptScope, livePreview: livePreview, spaceId: state.spaceId, environmentId: state.environmentId, cmaToken: state.cmaToken, host: state.host, tokensPath: state.tokensPath, initialFinalizeError: state.finalizeErrorBanner, onFinalize: (accepted, rejected, unresolved) => {
|
|
1513
1506
|
process.stderr.write(`Accepted: ${accepted} Rejected: ${rejected} Unresolved: ${unresolved}\n`);
|
|
1507
|
+
update({ finalReviewPassed: true });
|
|
1514
1508
|
// INTEG-4411 refined: no `accepted === 0` up-front block here.
|
|
1515
1509
|
// A zero-accepted finalize can still be a valid push when the
|
|
1516
1510
|
// operator explicitly rejected component(s) that exist server-
|
|
@@ -43,21 +43,10 @@ export declare function nextStepAfterScopeGate(opts: {
|
|
|
43
43
|
export declare function nextStepAfterCredentialsValidated(opts: {
|
|
44
44
|
acceptedCount: number;
|
|
45
45
|
}): WizardStepAfterCredentials;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
* fresh new session on an unchanged codebase always hits the cache and
|
|
51
|
-
* silently skips the LLM. That's the intended behavior for continued sessions
|
|
52
|
-
* (modify / push-from-run) but is surprising for a fresh `experiences import`
|
|
53
|
-
* run: the operator expects a re-classify pass, not cached output from a
|
|
54
|
-
* prior session.
|
|
55
|
-
*
|
|
56
|
-
* Resolution: for a fresh session (no `seedExtractSessionId`), force
|
|
57
|
-
* `--no-cache` on the spawned `generate components` subprocess. For a
|
|
58
|
-
* continued session (modify / push-from-run / picker-seeded), honor the
|
|
59
|
-
* operator's `--no-cache` flag as before.
|
|
60
|
-
*/
|
|
46
|
+
export declare function shouldSkipFinalReviewAfterCredentials(state: {
|
|
47
|
+
generateSessionId: string | null;
|
|
48
|
+
finalReviewPassed: boolean;
|
|
49
|
+
}): boolean;
|
|
61
50
|
export declare function resolveNoCacheForGenerate(opts: {
|
|
62
51
|
isFreshSession: boolean;
|
|
63
52
|
cliNoCache: boolean;
|
|
@@ -43,21 +43,9 @@ export function nextStepAfterScopeGate(opts) {
|
|
|
43
43
|
export function nextStepAfterCredentialsValidated(opts) {
|
|
44
44
|
return opts.acceptedCount > 0 ? 'generating' : 'push-decision-gate';
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* scoping. `component_id` is a deterministic hash of `(name, source)`, so a
|
|
50
|
-
* fresh new session on an unchanged codebase always hits the cache and
|
|
51
|
-
* silently skips the LLM. That's the intended behavior for continued sessions
|
|
52
|
-
* (modify / push-from-run) but is surprising for a fresh `experiences import`
|
|
53
|
-
* run: the operator expects a re-classify pass, not cached output from a
|
|
54
|
-
* prior session.
|
|
55
|
-
*
|
|
56
|
-
* Resolution: for a fresh session (no `seedExtractSessionId`), force
|
|
57
|
-
* `--no-cache` on the spawned `generate components` subprocess. For a
|
|
58
|
-
* continued session (modify / push-from-run / picker-seeded), honor the
|
|
59
|
-
* operator's `--no-cache` flag as before.
|
|
60
|
-
*/
|
|
46
|
+
export function shouldSkipFinalReviewAfterCredentials(state) {
|
|
47
|
+
return state.finalReviewPassed && state.generateSessionId != null;
|
|
48
|
+
}
|
|
61
49
|
export function resolveNoCacheForGenerate(opts) {
|
|
62
50
|
if (opts.isFreshSession)
|
|
63
51
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.3-dev-build-4a6b002.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"svelte": "^5.56.4",
|
|
38
38
|
"ts-morph": "^27.0.2",
|
|
39
39
|
"typescript": "^5.9.3",
|
|
40
|
-
"@contentful/experience-design-system-types": "2.12.
|
|
40
|
+
"@contentful/experience-design-system-types": "2.12.3-dev-build-4a6b002.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@tsconfig/node24": "^24.0.3",
|