@zaip-ai/cli 5.0.0 → 5.2.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/services/adapters.d.ts +1 -1
- package/dist/services/adapters.js +1 -1
- package/dist/services/codex-native-tool-authority-template.d.ts.map +1 -1
- package/dist/services/codex-native-tool-authority-template.js +19 -12
- package/dist/services/codex-native-tool-authority-template.js.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.js +6 -6
- package/dist/services/codex-pre-tool-host-context-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-host-context-template.js +34 -3
- package/dist/services/codex-pre-tool-host-context-template.js.map +1 -1
- package/dist/services/codex-pre-tool-support-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-support-template.js +24 -0
- package/dist/services/codex-pre-tool-support-template.js.map +1 -1
- package/dist/services/codex-windows-hook-command.d.ts.map +1 -1
- package/dist/services/codex-windows-hook-command.js +21 -2
- package/dist/services/codex-windows-hook-command.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/README-ENG.md +19 -0
- package/templates/.agents/README.md +20 -0
- package/templates/.agents/config/agents/discovery.json +1 -1
- package/templates/.agents/dashboard/.zaip-managed.json +98 -58
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-w6pjt4OM.js → CostCalculationGuidePage-uR-asJv_.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-DhlntQcR.js → DashboardHelpDialog-CDUKVlrH.js} +23 -3
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-BHoZT2an.js → PricingSettingsDialog-Czs55K79.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-IcncIZ9Y.js → ProjectSettingsPage-DhpaKwjC.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-C6rORjpr.js → TraceabilityWorkspace-DPxfH469.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{cost-monitor-uPnOBShc.js → cost-monitor-B0Jwz_rk.js} +4 -4
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{dashboard-localization-DWXjEIgc.js → dashboard-localization-BE_Zqtym.js} +19 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-Hc9fp_gs.js → icons-vendor-CjGGux6h.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-D5HmMZ27.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-C9ta_O10.js → react-vendor-B9jZSAKf.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-IcefoTOv.js → traceability-DFpwb0TN.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +5 -5
- package/templates/.agents/dashboard/apps/frontend/package.json +2 -2
- package/templates/.agents/dashboard/apps/frontend/src/AppDashboardContent.tsx +3 -0
- package/templates/.agents/dashboard/apps/frontend/src/AppOverlays.tsx +16 -7
- package/templates/.agents/dashboard/apps/frontend/src/__tests__/app-composition-support.ts +1 -0
- package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/operations-period-render.test.ts +2 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-trace-documents.navigation.test.tsx +125 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-trace-documents.ts +67 -9
- package/templates/.agents/dashboard/apps/frontend/src/use-dashboard-app-model.tsx +15 -15
- package/templates/.agents/dashboard/apps/frontend/src/use-dashboard-locale.ts +18 -0
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +4 -39
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewTopPanel.navigation.test.tsx +150 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewTopPanel.tsx +7 -3
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +4 -7
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageOverview.tsx +3 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-contract.ts +51 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +5 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-page-contract.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/src/react/use-operations-default-range.ts +16 -0
- package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/package.json +1 -1
- package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
- package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/dashboard-build-fingerprint.mjs +87 -0
- package/templates/.agents/dashboard/packages/local-runtime/dashboard-build-fingerprint.test.mjs +48 -0
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +160 -160
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +110 -110
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-frontend.mjs +29 -0
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs +5 -0
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +163 -163
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-build.mjs +12 -5
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-paths.mjs +8 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +1 -1
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/qualify-top-five-trace.mjs +53 -0
- package/templates/.agents/dashboard/tests/e2e/verify-top-five-served.mjs +78 -0
- package/templates/.agents/design/.zaip-managed.json +14 -6
- package/templates/.agents/design/apps/catalog/dist/assets/index-BGxXxXTo.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/index.html +1 -1
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/apps/catalog/src/components/TopEntitiesSpecimen.tsx +45 -0
- package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +3 -1
- package/templates/.agents/design/apps/catalog/src/stories/Components.stories.tsx +2 -0
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/requirements/autonomous-assurance.md +1 -1
- package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
- package/templates/.agents/requirements/comparative-audit.md +1 -1
- package/templates/.agents/requirements/context-engine.md +1 -1
- package/templates/.agents/requirements/cost-observability.md +1 -1
- package/templates/.agents/requirements/dashboard-launch.md +1 -1
- package/templates/.agents/requirements/data-export.md +1 -1
- package/templates/.agents/requirements/design-system.md +1 -1
- package/templates/.agents/requirements/execution-engine.md +1 -1
- package/templates/.agents/requirements/kanban-dashboard.md +1 -1
- package/templates/.agents/requirements/model-orchestration.md +1 -1
- package/templates/.agents/requirements/public-distribution.md +1 -1
- package/templates/.agents/requirements/software-architecture.md +1 -1
- package/templates/.agents/requirements/strategic-improvements.md +1 -1
- package/templates/.agents/requirements/work-lifecycle.md +1 -1
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +118 -56
- package/templates/.agents/runtime/checksums.sha256 +6 -6
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/pnpm-lock.sha256 +1 -1
- package/templates/.agents/runtime/provenance.json +5 -5
- package/templates/.agents/runtime/sbom.cdx.json +1 -1
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract-cli.test.mjs +53 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.test.mjs +1 -32
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/10-seguranca.md +2 -2
- package/templates/template-manifest.json +149 -97
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-BqeOEZW5.js +0 -2
|
@@ -25,6 +25,7 @@ export function OperationsPageOverview({
|
|
|
25
25
|
locale,
|
|
26
26
|
onOpenTask,
|
|
27
27
|
onOpenDocument,
|
|
28
|
+
onOpenMacro,
|
|
28
29
|
onLoadStatus,
|
|
29
30
|
statusPage,
|
|
30
31
|
onLoadStatusPage,
|
|
@@ -55,6 +56,7 @@ export function OperationsPageOverview({
|
|
|
55
56
|
locale: OperationsLocale;
|
|
56
57
|
onOpenTask: OverviewProps["onOpenTask"];
|
|
57
58
|
onOpenDocument: OverviewProps["onOpenDocument"];
|
|
59
|
+
onOpenMacro: OverviewProps["onOpenMacro"];
|
|
58
60
|
onLoadStatus: OverviewProps["onLoadStatus"];
|
|
59
61
|
statusPage: OverviewProps["statusPage"];
|
|
60
62
|
onLoadStatusPage: OverviewProps["onLoadStatusPage"];
|
|
@@ -96,6 +98,7 @@ export function OperationsPageOverview({
|
|
|
96
98
|
}}
|
|
97
99
|
onOpenTask={onOpenTask}
|
|
98
100
|
onOpenDocument={onOpenDocument}
|
|
101
|
+
onOpenMacro={onOpenMacro}
|
|
99
102
|
onLoadStatus={onLoadStatus}
|
|
100
103
|
statusPage={statusPage}
|
|
101
104
|
onLoadStatusPage={onLoadStatusPage}
|
package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-contract.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { OperationsProjection } from "../contracts.js";
|
|
2
|
+
import type { OperationDatePreset, OperationDateRange } from "./operation-date-range.js";
|
|
3
|
+
import type {
|
|
4
|
+
FactualCostFact,
|
|
5
|
+
OverviewClassification,
|
|
6
|
+
OverviewClassificationPage,
|
|
7
|
+
OverviewStatusKind,
|
|
8
|
+
OverviewStatusPage,
|
|
9
|
+
} from "./operations-page-contract.js";
|
|
10
|
+
import type { OperationsLocale } from "./status-labels.js";
|
|
11
|
+
import type { WorkStage } from "./work-board-model.js";
|
|
12
|
+
export interface OperationsOverviewProps {
|
|
13
|
+
currency: "BRL" | "USD";
|
|
14
|
+
data: OperationsProjection;
|
|
15
|
+
/** App-controlled range paired with datePreset; retained by Page while loading. */
|
|
16
|
+
dateRange?: OperationDateRange;
|
|
17
|
+
datePreset: OperationDatePreset;
|
|
18
|
+
locale: OperationsLocale;
|
|
19
|
+
onDatePresetChange: (preset: OperationDatePreset) => void;
|
|
20
|
+
onOpenTask: (taskId: string) => Promise<boolean>;
|
|
21
|
+
onOpenDocument: (kind: "prd" | "spec", id: string) => void;
|
|
22
|
+
onOpenMacro: (kind: "prd" | "spec", id: string) => void;
|
|
23
|
+
onLoadStatus?: ((stage: WorkStage, kind: OverviewStatusKind, offset: number) => void) | undefined;
|
|
24
|
+
statusPage?:
|
|
25
|
+
| ((stage: WorkStage, kind: OverviewStatusKind) => OverviewStatusPage | undefined)
|
|
26
|
+
| undefined;
|
|
27
|
+
onLoadStatusPage?:
|
|
28
|
+
| ((stage: WorkStage, kind: OverviewStatusKind, offset: number) => void)
|
|
29
|
+
| undefined;
|
|
30
|
+
classificationPage?:
|
|
31
|
+
| ((
|
|
32
|
+
kind: OverviewStatusKind,
|
|
33
|
+
classification: OverviewClassification,
|
|
34
|
+
) => OverviewClassificationPage | undefined)
|
|
35
|
+
| undefined;
|
|
36
|
+
onLoadClassificationPage?:
|
|
37
|
+
| ((kind: OverviewStatusKind, classification: OverviewClassification, offset: number) => void)
|
|
38
|
+
| undefined;
|
|
39
|
+
onLoadMacroMetrics?: (() => void) | undefined;
|
|
40
|
+
prds?: OperationsProjection["prds"];
|
|
41
|
+
runs?: OperationsProjection["runs"];
|
|
42
|
+
specs?: OperationsProjection["specs"];
|
|
43
|
+
tasks?: OperationsProjection["tasks"];
|
|
44
|
+
/** Factual Cost Monitor snapshot total for the selected locale/currency. */
|
|
45
|
+
factualCostTotal?: number | null | undefined;
|
|
46
|
+
/** Measurement completeness for the matching Cost Monitor snapshot. */
|
|
47
|
+
factualCostFact?: FactualCostFact | undefined;
|
|
48
|
+
costLoading?: boolean | undefined;
|
|
49
|
+
resolveRunCost?: ((runId: string) => number | null) | undefined;
|
|
50
|
+
includeLegacyEffort?: boolean;
|
|
51
|
+
}
|
|
@@ -118,7 +118,11 @@ describe("overview period filter", () => {
|
|
|
118
118
|
const periods = readFileSync(new URL("PeriodSummaryTable.tsx", import.meta.url), "utf8");
|
|
119
119
|
const costCard = readFileSync(new URL("OverviewCostKpi.tsx", import.meta.url), "utf8");
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
const contract = readFileSync(
|
|
122
|
+
new URL("operations-overview-contract.ts", import.meta.url),
|
|
123
|
+
"utf8",
|
|
124
|
+
);
|
|
125
|
+
expect(contract).toContain('currency: "BRL" | "USD"');
|
|
122
126
|
expect(source).toContain("const selectedCurrencyCost =");
|
|
123
127
|
expect(source).toContain("formatCurrency(value, currency, locale)");
|
|
124
128
|
expect(source).toContain("<OverviewCostKpi");
|
package/templates/.agents/dashboard/modules/operations/src/react/operations-page-contract.ts
CHANGED
|
@@ -103,6 +103,7 @@ export interface OperationsPageProps {
|
|
|
103
103
|
locale: OperationsLocale;
|
|
104
104
|
onLocaleChange: (locale: OperationsLocale) => void;
|
|
105
105
|
onOpenDocument: (kind: "prd" | "spec", id: string) => void;
|
|
106
|
+
onOpenMacro: (kind: "prd" | "spec", id: string) => void;
|
|
106
107
|
onOpenTask: (taskId: string) => Promise<boolean>;
|
|
107
108
|
onPriorityChange: (itemIds: readonly string[]) => Promise<void>;
|
|
108
109
|
onDetailDataRequest?: (view: OperationsView) => void;
|
package/templates/.agents/dashboard/modules/operations/src/react/use-operations-default-range.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { factualCostDateRange, initialOperationsDateRange } from "./operation-date-range.js";
|
|
3
|
+
import type { OperationsPageProps } from "./operations-page-contract.js";
|
|
4
|
+
export function useOperationsDefaultRange(
|
|
5
|
+
data: OperationsPageProps["data"],
|
|
6
|
+
factualCostPeriods: OperationsPageProps["factualCostPeriods"],
|
|
7
|
+
) {
|
|
8
|
+
const defaultDateRange = useMemo(() => {
|
|
9
|
+
const operationsRange = initialOperationsDateRange(
|
|
10
|
+
data.tasks,
|
|
11
|
+
Object.keys(data.summary.periods?.daily ?? {}),
|
|
12
|
+
);
|
|
13
|
+
return factualCostDateRange(factualCostPeriods?.day, operationsRange);
|
|
14
|
+
}, [data.summary.periods, data.tasks, factualCostPeriods?.day]);
|
|
15
|
+
return defaultDateRange;
|
|
16
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { mkdir, readdir, readFile, rename, stat, writeFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, join, relative, resolve } from "node:path";
|
|
4
|
+
import { dashboardBuildTargets, workspaceRoot } from "./start-dashboard-paths.mjs";
|
|
5
|
+
|
|
6
|
+
export async function contentFingerprint(paths, excluded = [], root = workspaceRoot) {
|
|
7
|
+
const entries = new Map();
|
|
8
|
+
async function visit(path) {
|
|
9
|
+
const key = relative(root, path).replaceAll("\\", "/");
|
|
10
|
+
const name = path.replaceAll("\\", "/").split("/").at(-1);
|
|
11
|
+
if (
|
|
12
|
+
["node_modules", ".turbo"].includes(name) ||
|
|
13
|
+
/\.(test|spec)\./.test(name) ||
|
|
14
|
+
excluded.some((part) => `/${key}/`.includes(part))
|
|
15
|
+
)
|
|
16
|
+
return;
|
|
17
|
+
const details = await stat(path).catch((error) => {
|
|
18
|
+
if (error.code === "ENOENT") return null;
|
|
19
|
+
throw error;
|
|
20
|
+
});
|
|
21
|
+
if (!details) {
|
|
22
|
+
entries.set(key, "missing");
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (details.isDirectory()) {
|
|
26
|
+
entries.set(`${key}/`, "directory");
|
|
27
|
+
for (const entry of await readdir(path)) await visit(join(path, entry));
|
|
28
|
+
} else
|
|
29
|
+
entries.set(
|
|
30
|
+
key,
|
|
31
|
+
createHash("sha256")
|
|
32
|
+
.update(await readFile(path))
|
|
33
|
+
.digest("hex"),
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
for (const path of paths) await visit(path);
|
|
37
|
+
return createHash("sha256")
|
|
38
|
+
.update(JSON.stringify([...entries].sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))))
|
|
39
|
+
.digest("hex");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const receiptPath = (name, root) => resolve(root, ".local/dashboard-build", `${name}.json`);
|
|
43
|
+
export const sourceFingerprint = (target, root = workspaceRoot) =>
|
|
44
|
+
contentFingerprint(target.sourceRoots, ["/dist/", ...target.excludedSourcePaths], root);
|
|
45
|
+
const outputFingerprint = (target, root) =>
|
|
46
|
+
contentFingerprint(target.outputRoots ?? target.artifacts, [], root);
|
|
47
|
+
|
|
48
|
+
export async function inspectBuildFingerprint(name, target, root = workspaceRoot) {
|
|
49
|
+
const receipt = await readFile(receiptPath(name, root), "utf8")
|
|
50
|
+
.then(JSON.parse)
|
|
51
|
+
.catch(() => null);
|
|
52
|
+
if (receipt?.version !== 1) return false;
|
|
53
|
+
return (
|
|
54
|
+
receipt.source === (await sourceFingerprint(target, root)) &&
|
|
55
|
+
receipt.output === (await outputFingerprint(target, root))
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export async function recordDashboardBuild(
|
|
60
|
+
name,
|
|
61
|
+
before,
|
|
62
|
+
target = dashboardBuildTargets[name],
|
|
63
|
+
root = workspaceRoot,
|
|
64
|
+
) {
|
|
65
|
+
const source = await sourceFingerprint(target, root);
|
|
66
|
+
if (source !== before)
|
|
67
|
+
throw new Error(
|
|
68
|
+
`Dashboard ${name} inputs changed during build; no reusable receipt was recorded`,
|
|
69
|
+
);
|
|
70
|
+
for (const path of target.artifacts) await stat(path);
|
|
71
|
+
const receipt = { version: 1, source, output: await outputFingerprint(target, root) };
|
|
72
|
+
const path = receiptPath(name, root);
|
|
73
|
+
await mkdir(dirname(path), { recursive: true });
|
|
74
|
+
const temporary = `${path}.${process.pid}.tmp`;
|
|
75
|
+
await writeFile(temporary, `${JSON.stringify(receipt)}\n`);
|
|
76
|
+
await rename(temporary, path);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export async function dashboardReleaseFrozen(root = workspaceRoot) {
|
|
80
|
+
const text = await readFile(resolve(root, ".agents/config/release-cycle.json"), "utf8").catch(
|
|
81
|
+
(error) => {
|
|
82
|
+
if (error.code === "ENOENT") return null;
|
|
83
|
+
throw error;
|
|
84
|
+
},
|
|
85
|
+
);
|
|
86
|
+
return text !== null && JSON.parse(text).state === "frozen";
|
|
87
|
+
}
|
package/templates/.agents/dashboard/packages/local-runtime/dashboard-build-fingerprint.test.mjs
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { mkdir, mkdtemp, rm, utimes, writeFile } from "node:fs/promises";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { test } from "vitest";
|
|
6
|
+
import {
|
|
7
|
+
inspectBuildFingerprint,
|
|
8
|
+
recordDashboardBuild,
|
|
9
|
+
sourceFingerprint,
|
|
10
|
+
} from "./dashboard-build-fingerprint.mjs";
|
|
11
|
+
import { refreshDashboardBuildTargets } from "./start-dashboard-build.mjs";
|
|
12
|
+
|
|
13
|
+
test("build reuse follows bytes, includes missing/deleted inputs, and freezes without mutation", async (context) => {
|
|
14
|
+
const root = await mkdtemp(join(tmpdir(), "zaip-build-fingerprint-"));
|
|
15
|
+
context.onTestFinished(() => rm(root, { recursive: true, force: true }));
|
|
16
|
+
await mkdir(join(root, "src"));
|
|
17
|
+
const source = join(root, "src/readme.md"),
|
|
18
|
+
output = join(root, "bundle.js");
|
|
19
|
+
await writeFile(source, "help");
|
|
20
|
+
await writeFile(output, "bundle");
|
|
21
|
+
const target = { sourceRoots: [join(root, "src")], excludedSourcePaths: [], artifacts: [output] };
|
|
22
|
+
await recordDashboardBuild("fixture", await sourceFingerprint(target, root), target, root);
|
|
23
|
+
await utimes(source, new Date(), new Date(Date.now() + 60_000));
|
|
24
|
+
assert.equal(await inspectBuildFingerprint("fixture", target, root), true);
|
|
25
|
+
await writeFile(source, "new help");
|
|
26
|
+
assert.equal(await inspectBuildFingerprint("fixture", target, root), false);
|
|
27
|
+
const before = await sourceFingerprint(target, root);
|
|
28
|
+
await rm(source);
|
|
29
|
+
await assert.rejects(
|
|
30
|
+
recordDashboardBuild("fixture", before, target, root),
|
|
31
|
+
/changed during build/,
|
|
32
|
+
);
|
|
33
|
+
let builds = 0;
|
|
34
|
+
await assert.rejects(
|
|
35
|
+
refreshDashboardBuildTargets({
|
|
36
|
+
targets: { fixture: target },
|
|
37
|
+
frozen: true,
|
|
38
|
+
inspectTarget: async () => ({
|
|
39
|
+
missingArtifacts: [],
|
|
40
|
+
artifactsModifiedAt: 1,
|
|
41
|
+
sourcesModifiedAt: 2,
|
|
42
|
+
}),
|
|
43
|
+
runBuild: async () => builds++,
|
|
44
|
+
}),
|
|
45
|
+
/release is frozen/,
|
|
46
|
+
);
|
|
47
|
+
assert.equal(builds, 0);
|
|
48
|
+
});
|