@lesliechan721/aw 0.1.0-beta.31 → 0.1.0-beta.33
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/authoring/scripts/lib/plugin-version-check.mjs +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +5 -2
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +2 -0
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/tui/catalog-sources/session.d.ts +5 -1
- package/dist/src/tui/catalog-sources/session.js +6 -1
- package/dist/src/tui/catalog-sources/session.js.map +1 -1
- package/dist/src/tui/catalog-sources/types.d.ts +1 -0
- package/dist/src/tui/clipboard.d.ts +13 -0
- package/dist/src/tui/clipboard.js +95 -0
- package/dist/src/tui/clipboard.js.map +1 -0
- package/dist/src/tui/components.d.ts +21 -11
- package/dist/src/tui/components.js +69 -56
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/config-value-presentation.d.ts +19 -0
- package/dist/src/tui/config-value-presentation.js +77 -0
- package/dist/src/tui/config-value-presentation.js.map +1 -0
- package/dist/src/tui/console-app-v4.d.ts +1 -1
- package/dist/src/tui/console-app-v4.js +1205 -1377
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +5 -0
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +12 -1
- package/dist/src/tui/controller.js +171 -46
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/diagnostics.d.ts +2 -1
- package/dist/src/tui/diagnostics.js +8 -1
- package/dist/src/tui/diagnostics.js.map +1 -1
- package/dist/src/tui/input-display.d.ts +1 -0
- package/dist/src/tui/input-display.js +13 -0
- package/dist/src/tui/input-display.js.map +1 -1
- package/dist/src/tui/model.d.ts +5 -3
- package/dist/src/tui/model.js +17 -33
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +6 -3
- package/dist/src/tui/operation-diagnostic-screens.js +31 -9
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -1
- package/dist/src/tui/operation-history.js +5 -4
- package/dist/src/tui/operation-history.js.map +1 -1
- package/dist/src/tui/router.d.ts +5 -7
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/screen-registry.d.ts +13 -22
- package/dist/src/tui/screen-registry.js +3 -4
- package/dist/src/tui/screen-registry.js.map +1 -1
- package/dist/src/tui/viewport.d.ts +1 -0
- package/dist/src/tui/viewport.js +23 -0
- package/dist/src/tui/viewport.js.map +1 -1
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@ export interface DiagnosticImpactEntryViewModel {
|
|
|
3
3
|
state: DiagnosticImpactState;
|
|
4
4
|
message: string;
|
|
5
5
|
}
|
|
6
|
-
export type DiagnosticContextKey = 'platform' | 'scope' | 'pluginId' | 'dependencyPluginId' | 'field' | 'storeEntry' | 'compatibility';
|
|
6
|
+
export type DiagnosticContextKey = 'platform' | 'scope' | 'pluginId' | 'dependencyPluginId' | 'field' | 'storeEntry' | 'compatibility' | 'sourcePolicy' | 'freshness' | 'candidate';
|
|
7
7
|
export interface DiagnosticTechnicalViewModel {
|
|
8
8
|
code: string;
|
|
9
9
|
stage?: string;
|
|
@@ -27,4 +27,5 @@ export interface DiagnosticSummaryViewModel {
|
|
|
27
27
|
}
|
|
28
28
|
export declare function safeDiagnosticCode(value: unknown, fallback: string): string;
|
|
29
29
|
export declare function sanitizeDiagnosticText(value: string, sensitiveRoots?: readonly string[], sensitiveValues?: readonly string[]): string;
|
|
30
|
+
export declare function sanitizeDiagnosticDetailText(value: string, sensitiveRoots?: readonly string[], sensitiveValues?: readonly string[]): string;
|
|
30
31
|
export declare function sanitizeDiagnosticCause(value: string | undefined): string | undefined;
|
|
@@ -28,7 +28,7 @@ function replaceRoot(value, root) {
|
|
|
28
28
|
export function safeDiagnosticCode(value, fallback) {
|
|
29
29
|
return typeof value === 'string' && SAFE_CODE.test(value) ? value : fallback;
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
function sanitizeDiagnosticValue(value, sensitiveRoots = [], sensitiveValues = []) {
|
|
32
32
|
let output = value;
|
|
33
33
|
for (const representation of collectSensitiveTokenRepresentations(sensitiveValues)) {
|
|
34
34
|
output = output.replace(new RegExp(escapeRegExp(representation), 'gu'), '[REDACTED]');
|
|
@@ -61,10 +61,17 @@ export function sanitizeDiagnosticText(value, sensitiveRoots = [], sensitiveValu
|
|
|
61
61
|
.replace(/(^|[\s("'=])[A-Za-z]:\\(?:[^\\\s]+\\)+[^\s,;)]*/gu, '$1[private-path]')
|
|
62
62
|
.replace(/\s{2,}/gu, ' ')
|
|
63
63
|
.trim();
|
|
64
|
+
return output;
|
|
65
|
+
}
|
|
66
|
+
export function sanitizeDiagnosticText(value, sensitiveRoots = [], sensitiveValues = []) {
|
|
67
|
+
const output = sanitizeDiagnosticValue(value, sensitiveRoots, sensitiveValues);
|
|
64
68
|
return output.length <= MAX_DIAGNOSTIC_TEXT_LENGTH
|
|
65
69
|
? output
|
|
66
70
|
: `${output.slice(0, MAX_DIAGNOSTIC_TEXT_LENGTH - 1)}…`;
|
|
67
71
|
}
|
|
72
|
+
export function sanitizeDiagnosticDetailText(value, sensitiveRoots = [], sensitiveValues = []) {
|
|
73
|
+
return sanitizeDiagnosticValue(value, sensitiveRoots, sensitiveValues);
|
|
74
|
+
}
|
|
68
75
|
export function sanitizeDiagnosticCause(value) {
|
|
69
76
|
if (!value || NATIVE_CAUSE.test(value))
|
|
70
77
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../../src/tui/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAq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AM,UAAU,uBAAuB,CAAC,KAAyB;IAC/D,IAAI,CAAC,KAAK,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACzD,MAAM,SAAS,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,SAAS,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAC5F,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC"}
|
|
@@ -30,6 +30,19 @@ export function renderInputTail(value, columns) {
|
|
|
30
30
|
}
|
|
31
31
|
export function InputDisplay(props) {
|
|
32
32
|
const value = props.sensitive ? '•'.repeat(graphemes(props.value).length) : props.value;
|
|
33
|
+
if (props.cursor !== undefined && value) {
|
|
34
|
+
const parts = graphemes(value);
|
|
35
|
+
const cursor = Math.min(parts.length, Math.max(0, props.cursor));
|
|
36
|
+
const before = renderInputTail(parts.slice(0, cursor).join(''), props.columns);
|
|
37
|
+
const remaining = Math.max(0, props.columns - stringWidth(before) - 1);
|
|
38
|
+
let after = '';
|
|
39
|
+
for (const part of parts.slice(cursor)) {
|
|
40
|
+
if (stringWidth(after + part) > remaining)
|
|
41
|
+
break;
|
|
42
|
+
after += part;
|
|
43
|
+
}
|
|
44
|
+
return _jsxs(Text, { children: [before, _jsx(Text, { color: tuiTheme.colors.accent, children: "\u258C" }), after] });
|
|
45
|
+
}
|
|
33
46
|
const visible = renderInputTail(value || props.placeholder || '', props.columns);
|
|
34
47
|
return _jsxs(Text, { children: [visible, _jsx(Text, { color: tuiTheme.colors.accent, children: "\u258C" })] });
|
|
35
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-display.js","sourceRoot":"","sources":["../../../src/tui/input-display.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3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,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QACvE,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YACvC,IAAI,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,SAAS;gBAAE,MAAM;YACjD,KAAK,IAAI,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,MAAC,IAAI,eAAE,MAAM,EAAC,KAAC,IAAI,IAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,uBAAU,EAAC,KAAK,IAAQ,CAAC;IACnF,CAAC;IACD,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,IAAI,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACjF,OAAO,MAAC,IAAI,eAAE,OAAO,EAAC,KAAC,IAAI,IAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,uBAAU,IAAO,CAAC;AAC7E,CAAC"}
|
package/dist/src/tui/model.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
export { configObjectHasSensitiveChild } from './config-value-presentation.js';
|
|
2
|
+
import type { PlatformName, PluginConfigFieldType, PluginConfigPreset, PluginConfigSchemaField, PluginConfigJoinSummary, PluginConfigSchema, PluginConfigValue, Scope } from '../types.js';
|
|
2
3
|
import type { StatusActivationProjection, StatusExtensionProjection, StatusIntentProjection, StatusSharedNativeProjection, StatusV8Payload, StatusV8PluginSummary, StatusScopedTarget, StatusV8Component, StatusTargetRevision, TargetRevisionState } from '../commands/status-v6.js';
|
|
3
4
|
import type { PluginContentOverview } from './plugin-content.js';
|
|
4
|
-
import type { DependencyAssignmentSource } from '../commands/dependency-operation-plan.js';
|
|
5
|
+
import type { DependencyAssignmentSource, DependencyPlacementRootInput } from '../commands/dependency-operation-plan.js';
|
|
5
6
|
import type { ReconcileOperationPlan } from '../commands/reconcile-operation-plan.js';
|
|
6
7
|
import type { DependencyScopeOverride } from '../types.js';
|
|
7
8
|
import type { ResolvedConfigRead } from '../utils/plugin-config.js';
|
|
@@ -217,6 +218,7 @@ export interface DependencyPlacementTargetViewModel {
|
|
|
217
218
|
export interface InstallPlacementDraftViewModel {
|
|
218
219
|
pluginId: string;
|
|
219
220
|
rootScope: Scope;
|
|
221
|
+
exactRootTargets?: DependencyPlacementRootInput[];
|
|
220
222
|
platforms: PlatformName[];
|
|
221
223
|
dependencyScopeOverrides: DependencyScopeOverride[];
|
|
222
224
|
state: 'selecting' | 'loading' | 'ready' | 'blocked';
|
|
@@ -271,6 +273,7 @@ export interface ConfigFieldViewModel {
|
|
|
271
273
|
description?: string;
|
|
272
274
|
type: PluginConfigFieldType;
|
|
273
275
|
definition: PluginConfigSchemaField;
|
|
276
|
+
summary?: PluginConfigJoinSummary;
|
|
274
277
|
displayValue: string;
|
|
275
278
|
required: boolean;
|
|
276
279
|
sensitive: boolean;
|
|
@@ -330,7 +333,6 @@ export interface ConfigPageViewModel {
|
|
|
330
333
|
presets: ConfigPresetViewModel[];
|
|
331
334
|
storedCount: number;
|
|
332
335
|
}
|
|
333
|
-
export declare function configObjectHasSensitiveChild(field: PluginConfigSchemaField): boolean;
|
|
334
336
|
export type UserIssueCategory = 'incompleteInstallation' | 'artifactCollision' | 'sourceUnavailable' | 'sourceMissing' | 'sourceIdentityChanged' | 'requiredConfigMissing' | 'configLayerUnsupported' | 'scopeConflict' | 'dependencyMissing' | 'dependencyNotReady' | 'dependencyTargetUnsupported' | 'dependencyStillRequired' | 'dependencyGraphInvalid' | 'legacyState' | 'diagnostic';
|
|
335
337
|
export type UserIssueGroup = 'sourceRemoved' | 'artifactCollision' | 'sourceUnavailable' | 'dependency' | 'scope' | 'config' | 'installation' | 'diagnostic';
|
|
336
338
|
export type UserIssueActionId = 'install' | 'sync' | 'refreshAndSync' | 'reinstall' | 'cleanup' | 'remove' | 'refreshSource' | 'editSource' | 'retryLater' | 'reAddSource' | 'viewSourceChange' | 'openConfig' | 'keepUserScope' | 'keepProjectScope' | 'viewTechnical' | 'manualMigration' | 'installDependency' | 'reinstallDependency' | 'viewDependencyIssue' | 'viewDependencies';
|
package/dist/src/tui/model.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { configObjectHasSensitiveChild, presentConfigValue } from './config-value-presentation.js';
|
|
2
|
+
export { configObjectHasSensitiveChild } from './config-value-presentation.js';
|
|
1
3
|
import { matchPluginConfigPreset, stablePluginConfigStringify, } from '@lesliechan721/aw-plugin-core/manifest';
|
|
2
4
|
import { flattenStatusTargets, statusTargetActivation, statusTargetExtensions, statusTargetIntent, statusTargetOwnershipState, statusTargetSharedNative, } from '../commands/status-v6.js';
|
|
3
5
|
import { buildAllowedLifecycleActions } from '../commands/operation-planner.js';
|
|
@@ -126,12 +128,6 @@ export function buildPluginUpdateSummary(options) {
|
|
|
126
128
|
targets,
|
|
127
129
|
};
|
|
128
130
|
}
|
|
129
|
-
export function configObjectHasSensitiveChild(field) {
|
|
130
|
-
if (field.type !== 'object')
|
|
131
|
-
return false;
|
|
132
|
-
return Object.values(field.properties ?? {}).some((property) => property.sensitive === true)
|
|
133
|
-
|| (field.additionalProperties !== false && field.additionalProperties?.sensitive === true);
|
|
134
|
-
}
|
|
135
131
|
function compareText(left, right) {
|
|
136
132
|
return left.localeCompare(right, 'en');
|
|
137
133
|
}
|
|
@@ -1681,31 +1677,13 @@ export function buildTuiViewModel(options) {
|
|
|
1681
1677
|
};
|
|
1682
1678
|
}
|
|
1683
1679
|
function displayConfigValue(options) {
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
&& !Array.isArray(options.value)) {
|
|
1692
|
-
const object = options.value;
|
|
1693
|
-
if (configObjectHasSensitiveChild(options.field)) {
|
|
1694
|
-
const count = Object.keys(object).length;
|
|
1695
|
-
return `已设置 · ${count === 0 ? '空对象' : `${count} 项`}`;
|
|
1696
|
-
}
|
|
1697
|
-
const preset = matchPluginConfigPreset(options.field, object);
|
|
1698
|
-
const keys = Object.keys(object).sort((left, right) => left.localeCompare(right, 'en'));
|
|
1699
|
-
const keySummary = keys.length === 0
|
|
1700
|
-
? '空对象'
|
|
1701
|
-
: `${keys.length} 项${keys.length > 0 ? `(${keys.slice(0, 2).join('、')}${keys.length > 2 ? '…' : ''})` : ''}`;
|
|
1702
|
-
return preset ? `方案“${preset.title}” · ${keySummary}` : `自定义 · ${keySummary}`;
|
|
1703
|
-
}
|
|
1704
|
-
if (typeof options.value === 'string')
|
|
1705
|
-
return options.value;
|
|
1706
|
-
if (options.value === undefined || options.value === null)
|
|
1707
|
-
return '已设置';
|
|
1708
|
-
return String(options.value);
|
|
1680
|
+
return presentConfigValue({
|
|
1681
|
+
definition: options.field,
|
|
1682
|
+
summary: options.summary,
|
|
1683
|
+
value: options.value,
|
|
1684
|
+
configured: options.configured,
|
|
1685
|
+
privateValue: options.privateValue,
|
|
1686
|
+
}).text;
|
|
1709
1687
|
}
|
|
1710
1688
|
function configSourceLabel(source) {
|
|
1711
1689
|
if (!source)
|
|
@@ -1780,6 +1758,8 @@ export function buildConfigGroups(options) {
|
|
|
1780
1758
|
&& entry.effectiveValue !== null
|
|
1781
1759
|
&& (entry.valueState === 'configured' || entry.valueState === 'default')
|
|
1782
1760
|
: entry?.storedSourceLayer !== undefined;
|
|
1761
|
+
const summaryName = options.schema.presentation?.fieldViews?.[key]?.summary;
|
|
1762
|
+
const summary = summaryName === undefined ? undefined : options.schema.presentation?.summaries?.[summaryName];
|
|
1783
1763
|
const privateValue = schema.sensitive === true;
|
|
1784
1764
|
const choices = schema.choices;
|
|
1785
1765
|
const selectedValue = effectivePage ? entry?.effectiveValue : entry?.storedValue;
|
|
@@ -1844,8 +1824,10 @@ export function buildConfigGroups(options) {
|
|
|
1844
1824
|
...(schema.description ? { description: schema.description } : {}),
|
|
1845
1825
|
type: schema.type,
|
|
1846
1826
|
definition: configEditorDefinition(schema),
|
|
1847
|
-
|
|
1827
|
+
...(summary ? { summary } : {}),
|
|
1828
|
+
displayValue: selectedStoredInvalid ? '需修正' : displayConfigValue({
|
|
1848
1829
|
field: schema,
|
|
1830
|
+
summary,
|
|
1849
1831
|
privateValue,
|
|
1850
1832
|
inherited,
|
|
1851
1833
|
configured,
|
|
@@ -1864,8 +1846,9 @@ export function buildConfigGroups(options) {
|
|
|
1864
1846
|
sourceLabel: effectivePage
|
|
1865
1847
|
? configSourceLabel(entry?.sourceLayer ?? null)
|
|
1866
1848
|
: configured ? '本层已设置' : '继承',
|
|
1867
|
-
effectiveDisplayValue: displayConfigValue({
|
|
1849
|
+
effectiveDisplayValue: effectiveEntry?.invalidOverride ? '需修正' : displayConfigValue({
|
|
1868
1850
|
field: schema,
|
|
1851
|
+
summary,
|
|
1869
1852
|
privateValue,
|
|
1870
1853
|
inherited: false,
|
|
1871
1854
|
configured: effectiveConfigured,
|
|
@@ -1887,6 +1870,7 @@ export function buildConfigGroups(options) {
|
|
|
1887
1870
|
? '值无效;保存可成功,但应用会被阻止'
|
|
1888
1871
|
: displayConfigValue({
|
|
1889
1872
|
field: schema,
|
|
1873
|
+
summary,
|
|
1890
1874
|
privateValue,
|
|
1891
1875
|
inherited: false,
|
|
1892
1876
|
configured: fallbackConfigured,
|