@intentius/chant-lexicon-pulumi 0.124.101 → 0.124.103
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/change-set.d.ts +5 -0
- package/dist/change-set.js +4 -0
- package/dist/chant-floors.d.ts +36 -0
- package/dist/chant-floors.js +36 -0
- package/dist/cost-hold.d.ts +45 -0
- package/dist/cost-hold.js +49 -0
- package/dist/describe-resources.d.ts +10 -0
- package/dist/describe-resources.js +79 -3
- package/dist/disruption.d.ts +50 -0
- package/dist/disruption.js +104 -0
- package/dist/engine-graph.d.ts +1 -1
- package/dist/engine-graph.js +40 -1
- package/dist/health-targets.d.ts +25 -0
- package/dist/health-targets.js +57 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/integrity.json +18 -18
- package/dist/lint/post-synth/member-read-helpers.d.ts +1 -1
- package/dist/lint/post-synth/member-read-helpers.js +1 -1
- package/dist/lint/post-synth/pul001.js +1 -1
- package/dist/lint/post-synth/pul002.js +1 -1
- package/dist/lint/post-synth/pul003.js +1 -1
- package/dist/lint/post-synth/pul004.js +1 -1
- package/dist/lint/post-synth/pul005.js +1 -1
- package/dist/lint/post-synth/pul006.js +1 -1
- package/dist/lint/post-synth/pul007.js +1 -1
- package/dist/lint/post-synth/pul008.js +1 -1
- package/dist/lint/post-synth/pul009.js +1 -1
- package/dist/lint/post-synth/pul010.js +1 -1
- package/dist/lint/post-synth/pul011.js +1 -1
- package/dist/lint/post-synth/pul012.js +1 -1
- package/dist/lint/post-synth/pul013.js +1 -1
- package/dist/lint/post-synth/pul014.js +1 -1
- package/dist/lint/post-synth/pul015.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/member-outputs.js +1 -1
- package/dist/member-report.d.ts +32 -0
- package/dist/member-report.js +23 -0
- package/dist/plugin.js +35 -2
- package/dist/preview-observation.d.ts +97 -0
- package/dist/preview-observation.js +218 -0
- package/dist/pulumi-up.d.ts +44 -3
- package/dist/pulumi-up.js +71 -11
- package/dist/reference-catalog.d.ts +84 -0
- package/dist/reference-catalog.js +383 -0
- package/dist/reference-props.d.ts +19 -0
- package/dist/reference-props.js +93 -0
- package/dist/rules/member-read-helpers.ts +1 -1
- package/dist/rules/pul001.ts +1 -1
- package/dist/rules/pul002.ts +1 -1
- package/dist/rules/pul003.ts +1 -1
- package/dist/rules/pul004.ts +1 -1
- package/dist/rules/pul005.ts +1 -1
- package/dist/rules/pul006.ts +1 -1
- package/dist/rules/pul007.ts +1 -1
- package/dist/rules/pul008.ts +1 -1
- package/dist/rules/pul009.ts +1 -1
- package/dist/rules/pul010.ts +1 -1
- package/dist/rules/pul011.ts +1 -1
- package/dist/rules/pul012.ts +1 -1
- package/dist/rules/pul013.ts +1 -1
- package/dist/rules/pul014.ts +1 -1
- package/dist/rules/pul015.ts +1 -1
- package/dist/run.js +1 -1
- package/dist/stack-export-snapshot.js +1 -1
- package/dist/stack-references.js +6 -1
- package/dist/workspace-member.d.ts +1 -26
- package/dist/workspace-member.js +11 -21
- package/dist/workspace-stack-reads.d.ts +12 -0
- package/dist/workspace-stack-reads.js +60 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { pulumiPlugin } from "./plugin.js";
|
|
2
|
+
export { PULUMI_REFERENCE_CATALOG, CATALOGUED_KINDS, REFERENCES_NOTHING, isUnresolvedKind } from "./reference-catalog.js";
|
|
3
|
+
export { PULUMI_REFERENCE_CATALOG_FLOOR, PULUMI_COST_HOLD_FLOOR, PULUMI_PREVIEW_OBSERVATION_FLOOR, PULUMI_STACK_REFERENCE_GRAPH_FLOOR } from "./chant-floors.js";
|
|
4
|
+
export { pulumiCostHold, type PulumiCostHold } from "./cost-hold.js";
|
|
5
|
+
export { observePreview, PLANNED_STATUS, PREVIEW_ATTRIBUTE_NAMES, PREVIEW_READ_REASONS, PREVIEW_SOURCE, previewReadReason, PULUMI_OBSERVE_ENV, type PulumiObserveDepth, type PreviewReadReason } from "./preview-observation.js";
|
|
2
6
|
export { pulumiSerializer } from "./serializer.js";
|
|
3
7
|
export { pulumiConfigSchema, pulumiMemberConfigSchema, type PulumiConfig } from "./config.js";
|
|
4
8
|
export { readPulumiMember, PULUMI_EXPORT_FILE, type PulumiMemberConfig, type PulumiMemberReport } from "./workspace-member.js";
|
|
@@ -24,3 +28,6 @@ export { parsePlungeAdoptView, pulumiAdoptDigest, adoptBucketTarget, type Plunge
|
|
|
24
28
|
export { pulumiPreview as pulumiPreviewStep, pulumiDrift as pulumiDriftStep } from "./op/builders.js";
|
|
25
29
|
export { pulumiExitOf, pulumiPlanMoved, PULUMI_EXIT, PLUNGE_PLAN_MOVED_EXIT } from "./exit-codes.js";
|
|
26
30
|
export { pulumiPlannedOutputChanges, type PulumiOutputChange, type PulumiPlannedOutputChanges } from "./planned-output-changes.js";
|
|
31
|
+
export { classifyPulumiDisruption, pulumiDisruptionQueries, pulumiStepsVerdict } from "./disruption.js";
|
|
32
|
+
export { PULUMI_HEALTH_TYPES, pulumiHealthTargets, exportIds as pulumiExportIds } from "./health-targets.js";
|
|
33
|
+
export { PULUMI_HEALTH_DISRUPTION_FLOOR, PULUMI_PREVIEW_DISRUPTION_FLOOR, PULUMI_OWNERSHIP_ROWS_FLOOR, PULUMI_COMPONENT_GROUPS_FLOOR } from "./chant-floors.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { pulumiPlugin } from "./plugin.js";
|
|
2
|
+
export { PULUMI_REFERENCE_CATALOG, CATALOGUED_KINDS, REFERENCES_NOTHING, isUnresolvedKind } from "./reference-catalog.js";
|
|
3
|
+
export { PULUMI_REFERENCE_CATALOG_FLOOR, PULUMI_COST_HOLD_FLOOR, PULUMI_PREVIEW_OBSERVATION_FLOOR, PULUMI_STACK_REFERENCE_GRAPH_FLOOR } from "./chant-floors.js";
|
|
4
|
+
export { pulumiCostHold } from "./cost-hold.js";
|
|
5
|
+
export { observePreview, PLANNED_STATUS, PREVIEW_ATTRIBUTE_NAMES, PREVIEW_READ_REASONS, PREVIEW_SOURCE, previewReadReason, PULUMI_OBSERVE_ENV } from "./preview-observation.js";
|
|
2
6
|
export { pulumiSerializer } from "./serializer.js";
|
|
3
7
|
export { pulumiConfigSchema, pulumiMemberConfigSchema } from "./config.js";
|
|
4
8
|
export { readPulumiMember, PULUMI_EXPORT_FILE } from "./workspace-member.js";
|
|
@@ -29,3 +33,7 @@ export { pulumiPreview as pulumiPreviewStep, pulumiDrift as pulumiDriftStep } fr
|
|
|
29
33
|
export { pulumiExitOf, pulumiPlanMoved, PULUMI_EXIT, PLUNGE_PLAN_MOVED_EXIT } from "./exit-codes.js";
|
|
30
34
|
// Which stack outputs a preview changes, traced through the export (#4635).
|
|
31
35
|
export { pulumiPlannedOutputChanges } from "./planned-output-changes.js";
|
|
36
|
+
// Disruption from a preview's steps and health through the provider lexicons (#5338).
|
|
37
|
+
export { classifyPulumiDisruption, pulumiDisruptionQueries, pulumiStepsVerdict } from "./disruption.js";
|
|
38
|
+
export { PULUMI_HEALTH_TYPES, pulumiHealthTargets, exportIds as pulumiExportIds } from "./health-targets.js";
|
|
39
|
+
export { PULUMI_HEALTH_DISRUPTION_FLOOR, PULUMI_PREVIEW_DISRUPTION_FLOOR, PULUMI_OWNERSHIP_ROWS_FLOOR, PULUMI_COMPONENT_GROUPS_FLOOR } from "./chant-floors.js";
|
package/dist/integrity.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "5993f160389d0b2040bb6791d7f242bd818a3c7e7496c681b23e0c9c213e446f",
|
|
5
5
|
"meta.json": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
|
|
6
6
|
"types/index.d.ts": "883bcdf6a960e21360e79df010ca2087719fffec60fc39541c5ecd32d661e328",
|
|
7
7
|
"rules/member-dir-absolute.ts": "4805d5e247ad544f942e1b2c36fc15a5087ca0aacaf804183a269021bd60e276",
|
|
8
|
-
"rules/member-read-helpers.ts": "
|
|
9
|
-
"rules/pul001.ts": "
|
|
10
|
-
"rules/pul002.ts": "
|
|
11
|
-
"rules/pul003.ts": "
|
|
12
|
-
"rules/pul004.ts": "
|
|
13
|
-
"rules/pul005.ts": "
|
|
14
|
-
"rules/pul006.ts": "
|
|
15
|
-
"rules/pul007.ts": "
|
|
16
|
-
"rules/pul008.ts": "
|
|
17
|
-
"rules/pul009.ts": "
|
|
18
|
-
"rules/pul010.ts": "
|
|
19
|
-
"rules/pul011.ts": "
|
|
20
|
-
"rules/pul012.ts": "
|
|
21
|
-
"rules/pul013.ts": "
|
|
22
|
-
"rules/pul014.ts": "
|
|
23
|
-
"rules/pul015.ts": "
|
|
8
|
+
"rules/member-read-helpers.ts": "72fbfa153b1bb315eeeff918d5981920bcd5fd5b378146aec15e460151c55121",
|
|
9
|
+
"rules/pul001.ts": "adfbd372791ba9ec8107e8d0c96822f7bbe04df897c11ff744ccf4afde8b7ef0",
|
|
10
|
+
"rules/pul002.ts": "d5c4f88ffbd53a42018bb3d4759ba8a6f00a5c4265e135038d574d5dc876d2c3",
|
|
11
|
+
"rules/pul003.ts": "9d4bc6ed94aa58217ea2ae517937582b5a5270014de464af3cd5f8a86695e815",
|
|
12
|
+
"rules/pul004.ts": "d714dc3e069283ac046fa1da0bd5323a129f76dc9dbc9650f446defba87b6e69",
|
|
13
|
+
"rules/pul005.ts": "a43a6159119bd98ad217d4479005f91ea4fbdcdb8ceddd0185bd4f83d213697a",
|
|
14
|
+
"rules/pul006.ts": "1ac89b90423ac70c49bf3c62a1198ba80c9ed346868ca74021d143de6de980a7",
|
|
15
|
+
"rules/pul007.ts": "1957222671a244719ef1511d21cab51910294e3fd56ec7f233163e9f4e6477f2",
|
|
16
|
+
"rules/pul008.ts": "181bc3e0b193698d1addc71b7aec2ddbd80c4396dfc88861dac1ad28be72bc7f",
|
|
17
|
+
"rules/pul009.ts": "c9da52ef15280d4aee0187d296c1ad5e769dbbb5ed4b5863294bb1d0cf7811e5",
|
|
18
|
+
"rules/pul010.ts": "eccddc5f918fc33ca365bb2e1cc9f33170529390b3954ba4ed9f78be53856061",
|
|
19
|
+
"rules/pul011.ts": "5665fe14da45be1410bb2509ff5b89017c213f2aeea31c8bf9a8335fae37b2af",
|
|
20
|
+
"rules/pul012.ts": "d73364649ce0640cfd840d90facbf994cf83329667e9c45f6b4123c6d594c91a",
|
|
21
|
+
"rules/pul013.ts": "d017482bd59fd4d8e4017cf11752d74cb10163e9e4427eaccfd5e3b5e87c1efe",
|
|
22
|
+
"rules/pul014.ts": "5237889d1c63f8079ea68be1711f55714281ed7cdbe904ede027a4805ad74d4e",
|
|
23
|
+
"rules/pul015.ts": "545bd3b8e1c8185c4bd5647de7373679021a0cecf81b7fafa1b644909300c6fb",
|
|
24
24
|
"skills/chant-pulumi.md": "aef93407423daf6d0acc492a4d5bbf002fbae67b4f993ad36f86725686b98d61",
|
|
25
25
|
"skills/chant-pulumi-stack-export.md": "aadd67f5e067de61dfda43d57492bca08bd22429e4baf314d6856a810dc0e8dc",
|
|
26
26
|
"skills/chant-pulumi-plunge.md": "8a7f2f9f1124744dee9645905f141057ca01f5a88e34e1bc3858d69406d7ff3a"
|
|
27
27
|
},
|
|
28
|
-
"composite": "
|
|
28
|
+
"composite": "8d3af26b2805cb963b00b1156bfe7bcb26a5b3c31318a3c04c5bdfe43004fd80"
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
|
|
2
2
|
import type { Severity } from "@intentius/chant/lint/rule";
|
|
3
|
-
import { type PulumiMemberRead } from "../../
|
|
3
|
+
import { type PulumiMemberRead } from "../../member-report.js";
|
|
4
4
|
/** One resource of the export, with the fields the checks read. */
|
|
5
5
|
export interface ExportResource {
|
|
6
6
|
urn: string;
|
|
@@ -19,7 +19,7 @@ import { join } from "node:path";
|
|
|
19
19
|
import { parsePulumiUrn, pulumiNodeKey } from "@intentius/chant/pulumi-urn";
|
|
20
20
|
import { parseYAML } from "@intentius/chant/yaml";
|
|
21
21
|
import { isObject, PULUMI_SECRET_SIG, PULUMI_SIG_KEY } from "../../values.js";
|
|
22
|
-
import { lastMemberRead } from "../../
|
|
22
|
+
import { lastMemberRead } from "../../member-report.js";
|
|
23
23
|
/** The member read and its export's resources, or undefined when no member was read or its export did not read. */
|
|
24
24
|
export function memberExport() {
|
|
25
25
|
const read = lastMemberRead();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { lastMemberReport, PULUMI_EXPORT_FILE } from "../../
|
|
1
|
+
import { lastMemberReport, PULUMI_EXPORT_FILE } from "../../member-report.js";
|
|
2
2
|
export const pul001 = {
|
|
3
3
|
id: "PUL001",
|
|
4
4
|
description: "A pulumi member with no readable stack-export.json has no nodes in the graph",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { lastMemberReport, PULUMI_EXPORT_FILE } from "../../
|
|
1
|
+
import { lastMemberReport, PULUMI_EXPORT_FILE } from "../../member-report.js";
|
|
2
2
|
export const pul002 = {
|
|
3
3
|
id: "PUL002",
|
|
4
4
|
description: "The pulumi member's stack export records operations an interrupted update left pending",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PULUMI_EXPORT_FILE } from "../../
|
|
1
|
+
import { PULUMI_EXPORT_FILE } from "../../member-report.js";
|
|
2
2
|
import { entityOf, finding, listed, memberExport, plaintextSecretPaths } from "./member-read-helpers.js";
|
|
3
3
|
export const pul003 = {
|
|
4
4
|
id: "PUL003",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isPulumiNodeless } from "@intentius/chant/pulumi-urn";
|
|
2
|
-
import { PULUMI_EXPORT_FILE } from "../../
|
|
2
|
+
import { PULUMI_EXPORT_FILE } from "../../member-report.js";
|
|
3
3
|
import { finding, flagged, listed, memberExport } from "./member-read-helpers.js";
|
|
4
4
|
export const pul012 = {
|
|
5
5
|
id: "PUL012",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PULUMI_EXPORT_FILE } from "../../
|
|
1
|
+
import { PULUMI_EXPORT_FILE } from "../../member-report.js";
|
|
2
2
|
import { finding, memberExport } from "./member-read-helpers.js";
|
|
3
3
|
/** The deployment schema version the readers are written against. */
|
|
4
4
|
export const PULUMI_EXPORT_VERSION = 3;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isPulumiNodeless } from "@intentius/chant/pulumi-urn";
|
|
2
|
-
import { PULUMI_EXPORT_FILE } from "../../
|
|
2
|
+
import { PULUMI_EXPORT_FILE } from "../../member-report.js";
|
|
3
3
|
import { finding, memberExport } from "./member-read-helpers.js";
|
|
4
4
|
export const pul014 = {
|
|
5
5
|
id: "PUL014",
|
package/dist/manifest.json
CHANGED
package/dist/member-outputs.js
CHANGED
|
@@ -2,7 +2,7 @@ import { pulumiPlannedOutputChanges } from "./planned-output-changes.js";
|
|
|
2
2
|
import { pulumiPlannedStackOutputs, pulumiExportedStackOutputs } from "./stack-outputs.js";
|
|
3
3
|
import { memberExportOf, previewPulumiMemberRead, pulumiMemberStackOutputs } from "./run.js";
|
|
4
4
|
import { isSecret } from "./values.js";
|
|
5
|
-
import { PULUMI_EXPORT_FILE } from "./
|
|
5
|
+
import { PULUMI_EXPORT_FILE } from "./member-report.js";
|
|
6
6
|
/** The environment variable that makes the source read applied outputs from the checked-in export. */
|
|
7
7
|
export const PULUMI_APPLIED_OUTPUTS_ENV = "CHANT_PULUMI_APPLIED_OUTPUTS";
|
|
8
8
|
/** The known values of a stack's outputs: unknown and secret ones left out. */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pulumi member's constants and last-read state (#3179). The plugin and
|
|
3
|
+
* the post-synth rules read these without loading the member reader in
|
|
4
|
+
* ./workspace-member.ts, which a project with no member never needs (#5219).
|
|
5
|
+
*/
|
|
6
|
+
import type { PulumiMemberReport } from "./workspace-member.js";
|
|
7
|
+
/** The conventional place of the export, in the member's directory. */
|
|
8
|
+
export declare const PULUMI_EXPORT_FILE = "stack-export.json";
|
|
9
|
+
/**
|
|
10
|
+
* What the last member read in this process saw, for the post-synth checks
|
|
11
|
+
* PUL003 to PUL015 (`./lint/post-synth/`). It holds the parsed export, so it
|
|
12
|
+
* stays in the process and never reaches the graph's `meta`, which carries
|
|
13
|
+
* only {@link PulumiMemberReport}.
|
|
14
|
+
*/
|
|
15
|
+
export interface PulumiMemberRead {
|
|
16
|
+
/** The member's directory, absolute. */
|
|
17
|
+
dir: string;
|
|
18
|
+
/** The label the entities are keyed by. */
|
|
19
|
+
label: string;
|
|
20
|
+
/** `pulumi.member.engine`, when the config sets it. */
|
|
21
|
+
engine?: "pulumi" | "plunge";
|
|
22
|
+
/** `pulumi.member.stack`, when the config sets it. */
|
|
23
|
+
stack?: string;
|
|
24
|
+
/** The parsed export, the index store's or the checked-in `stack-export.json`; undefined when there is none or it is not JSON. */
|
|
25
|
+
doc?: unknown;
|
|
26
|
+
}
|
|
27
|
+
/** Left by the plugin's `buildRoots` beside the report; see {@link PulumiMemberRead}. */
|
|
28
|
+
export declare function setLastMemberRead(read: PulumiMemberRead | undefined): void;
|
|
29
|
+
export declare function lastMemberRead(): PulumiMemberRead | undefined;
|
|
30
|
+
/** The report of the read in this process, left for `graphMeta` (see the aws member reader). */
|
|
31
|
+
export declare function setLastMemberReport(report: PulumiMemberReport | undefined): void;
|
|
32
|
+
export declare function lastMemberReport(): PulumiMemberReport | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pulumi member's constants and last-read state (#3179). The plugin and
|
|
3
|
+
* the post-synth rules read these without loading the member reader in
|
|
4
|
+
* ./workspace-member.ts, which a project with no member never needs (#5219).
|
|
5
|
+
*/
|
|
6
|
+
/** The conventional place of the export, in the member's directory. */
|
|
7
|
+
export const PULUMI_EXPORT_FILE = "stack-export.json";
|
|
8
|
+
let lastRead;
|
|
9
|
+
/** Left by the plugin's `buildRoots` beside the report; see {@link PulumiMemberRead}. */
|
|
10
|
+
export function setLastMemberRead(read) {
|
|
11
|
+
lastRead = read;
|
|
12
|
+
}
|
|
13
|
+
export function lastMemberRead() {
|
|
14
|
+
return lastRead;
|
|
15
|
+
}
|
|
16
|
+
let lastReport;
|
|
17
|
+
/** The report of the read in this process, left for `graphMeta` (see the aws member reader). */
|
|
18
|
+
export function setLastMemberReport(report) {
|
|
19
|
+
lastReport = report;
|
|
20
|
+
}
|
|
21
|
+
export function lastMemberReport() {
|
|
22
|
+
return lastReport;
|
|
23
|
+
}
|
package/dist/plugin.js
CHANGED
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
* - `describeResources`, engine facts for a member on plunge from `plunge
|
|
22
22
|
* graph --json` (`./describe-resources.ts`, #4529), and a plunge member's
|
|
23
23
|
* checked-in `engine-graph.json` in the member read (`./engine-graph.ts`);
|
|
24
|
+
* - a `referenceCatalog` (`./reference-catalog.ts`, #5330): ARN, id and name
|
|
25
|
+
* references among the aws, gcp, azure and kubernetes providers' resources,
|
|
26
|
+
* read by `chant workspace graph`'s catalog pass;
|
|
24
27
|
* - the checks a pulumi surface admits (#4468): PUL101 over `pulumi.member`
|
|
25
28
|
* in source, PUL001 and PUL002 over the member read (`./lint/`);
|
|
26
29
|
* - completion and hover over `Pulumi.yaml`, a stack's `Pulumi.<stack>.yaml`,
|
|
@@ -35,7 +38,10 @@
|
|
|
35
38
|
* a `Pulumi.yaml`, and three `chant init` templates (`./init-templates.ts`);
|
|
36
39
|
* - review stacks in a pull request's environment (#4609): `prEnvTemplate`
|
|
37
40
|
* takes a `<project>/<stack>` template, and `prEnvTeardown` removes the
|
|
38
|
-
* environment's `pr-<n>` stacks (`./review-stack.ts`)
|
|
41
|
+
* environment's `pr-<n>` stacks (`./review-stack.ts`);
|
|
42
|
+
* - `classifyDisruption` from a preview's steps (`./disruption.ts`) and
|
|
43
|
+
* `healthTargets`, health through the provider lexicons with ids from the
|
|
44
|
+
* stack's export (`./health-targets.ts`), #5338.
|
|
39
45
|
*/
|
|
40
46
|
import { pulumiCheckSteps } from "./check-step.js";
|
|
41
47
|
import { pulumiCiSetup } from "./ci-setup.js";
|
|
@@ -43,7 +49,7 @@ import { basename, isAbsolute, resolve } from "node:path";
|
|
|
43
49
|
import { createSkillsLoader } from "@intentius/chant/lexicon-plugin-helpers";
|
|
44
50
|
import { pulumiConfigSchema } from "./config.js";
|
|
45
51
|
import { pulumiSerializer } from "./serializer.js";
|
|
46
|
-
import { lastMemberReport,
|
|
52
|
+
import { lastMemberReport, setLastMemberRead, setLastMemberReport } from "./member-report.js";
|
|
47
53
|
import { rules } from "./lint/rules/index.js";
|
|
48
54
|
import { postSynthChecks } from "./lint/post-synth/index.js";
|
|
49
55
|
import { pulumiAuditCatalog } from "./lint/audit-catalog.js";
|
|
@@ -52,6 +58,7 @@ import { hover } from "./lsp/hover.js";
|
|
|
52
58
|
import { PULUMI_RUNTIME_NAMES } from "./lsp/keys.js";
|
|
53
59
|
import { pulumiInitTemplates } from "./init-templates.js";
|
|
54
60
|
import { pulumiTemplateStack, reviewStackTeardown } from "./review-stack.js";
|
|
61
|
+
import { PULUMI_REFERENCE_CATALOG } from "./reference-catalog.js";
|
|
55
62
|
const loadSkills = createSkillsLoader(import.meta.url, [
|
|
56
63
|
{
|
|
57
64
|
file: "chant-pulumi.md",
|
|
@@ -71,6 +78,8 @@ const loadSkills = createSkillsLoader(import.meta.url, [
|
|
|
71
78
|
]);
|
|
72
79
|
export const pulumiPlugin = {
|
|
73
80
|
name: "pulumi",
|
|
81
|
+
// How a stack's resources name each other, for chant's catalog pass over a declared graph (#5330); see its module doc.
|
|
82
|
+
referenceCatalog: PULUMI_REFERENCE_CATALOG,
|
|
74
83
|
serializer: pulumiSerializer,
|
|
75
84
|
configSchema: pulumiConfigSchema,
|
|
76
85
|
// #4550: the engine install lines for the pull request pipeline's default image.
|
|
@@ -97,6 +106,11 @@ export const pulumiPlugin = {
|
|
|
97
106
|
const words = activeProductWords();
|
|
98
107
|
return pulumiTipsDetail({ member: input.member, changeSet: input.changeSet, words: { product: words.product, noun: words.noun } });
|
|
99
108
|
},
|
|
109
|
+
// StackReference reads between pulumi members, for `chant workspace graph` (#5331); see ./workspace-stack-reads.ts.
|
|
110
|
+
async workspaceStackReads(ctx) {
|
|
111
|
+
const { pulumiWorkspaceStackReads } = await import("./workspace-stack-reads.js");
|
|
112
|
+
return pulumiWorkspaceStackReads(ctx);
|
|
113
|
+
},
|
|
100
114
|
// A pulumi workspace member's reader project (#3179): its stack export from
|
|
101
115
|
// the index store, else the checked-in one, never the program. See ./workspace-member.ts. `chant workspace
|
|
102
116
|
// graph` writes `dir` absolute; a project that writes the namespace itself
|
|
@@ -112,6 +126,7 @@ export const pulumiPlugin = {
|
|
|
112
126
|
// (#4546), else the checked-in stack-export.json.
|
|
113
127
|
const { readStoredPulumiExport } = await import("./stack-export-snapshot.js");
|
|
114
128
|
const fromStore = await readStoredPulumiExport({ dir: member.dir, ...(member.stack ? { stack: member.stack } : {}) });
|
|
129
|
+
const { readPulumiMember } = await import("./workspace-member.js");
|
|
115
130
|
const read = readPulumiMember({ member, ...(fromStore ? { stored: { doc: fromStore.doc, where: fromStore.where, key: fromStore.key } } : {}) });
|
|
116
131
|
setLastMemberReport(read.report);
|
|
117
132
|
setLastMemberRead({
|
|
@@ -154,6 +169,24 @@ export const pulumiPlugin = {
|
|
|
154
169
|
* refresh --preview-only --target` per resource, or `plunge drift
|
|
155
170
|
* --resource --stream` for a member on plunge. See `./drift-read.ts`.
|
|
156
171
|
*/
|
|
172
|
+
/**
|
|
173
|
+
* What applying a planned update costs, from a preview's steps (#5338). A
|
|
174
|
+
* query carries the steps as `previewSteps` or a preview node's `planActions`; `pulumiDisruptionQueries`
|
|
175
|
+
* builds them from `pulumi preview --json`. See `./disruption.ts`.
|
|
176
|
+
*/
|
|
177
|
+
async classifyDisruption(options) {
|
|
178
|
+
const { classifyPulumiDisruption } = await import("./disruption.js");
|
|
179
|
+
return classifyPulumiDisruption(options);
|
|
180
|
+
},
|
|
181
|
+
/**
|
|
182
|
+
* Health for a stack's resources through the provider lexicons (#5338):
|
|
183
|
+
* each covered type mapped to its provider's health type, with the id from
|
|
184
|
+
* the stack's export. See `./health-targets.ts`.
|
|
185
|
+
*/
|
|
186
|
+
async healthTargets(options) {
|
|
187
|
+
const { pulumiHealthTargets } = await import("./health-targets.js");
|
|
188
|
+
return pulumiHealthTargets(options);
|
|
189
|
+
},
|
|
157
190
|
async readDrift(options) {
|
|
158
191
|
const { readPulumiDrift } = await import("./drift-read.js");
|
|
159
192
|
return readPulumiDrift(options);
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The preview depth (#5332): `pulumi preview --json`, or `plunge preview`
|
|
3
|
+
* for a member on plunge, read as an observation of the member. It is the
|
|
4
|
+
* pulumi counterpart of the terraform lexicon's plan depth
|
|
5
|
+
* (`CHANT_TERRAFORM_OBSERVE=plan`, `plan-observation.ts`), and carries the
|
|
6
|
+
* same attribute names so one reader serves both.
|
|
7
|
+
*
|
|
8
|
+
* The steps are parsed by `./change-set.ts` (`pulumiSteps`,
|
|
9
|
+
* `pulumiStepsAction`, `pulumiStepStates`); this module only projects them.
|
|
10
|
+
*
|
|
11
|
+
* | preview | node attribute |
|
|
12
|
+
* |---|---|
|
|
13
|
+
* | the URN's steps, as one action | `planAction` (`create`, `update`, `replace`, `delete`, `no-op`, `read`, `forget`) |
|
|
14
|
+
* | the ops of each step | `planActions`, by URN |
|
|
15
|
+
* | a replace that deletes first, an import | `planActionReason` |
|
|
16
|
+
* | `replaceReasons` | `planReplacePaths` |
|
|
17
|
+
* | inputs that hold the unknown sentinel | `planAfterUnknown` |
|
|
18
|
+
* | inputs that differ on an update or replace | `planChanges`, one entry per leaf |
|
|
19
|
+
* | the step state's `parent`, when the graph holds that node | `ResourceMetadata.component`, the node's `IRNode.component` (#5403) |
|
|
20
|
+
*
|
|
21
|
+
* A resource the member's graph already has (declared by the export) gets
|
|
22
|
+
* these on its node. A resource it does not have, which is every resource
|
|
23
|
+
* when the stack has no export, becomes a node of its own with status
|
|
24
|
+
* `planned`, carrying the same inputs a node read from an export carries
|
|
25
|
+
* (`./reference-props.ts`) beside the plan attributes. A declared resource
|
|
26
|
+
* the preview lists no step for is not observed (`not-reached`).
|
|
27
|
+
*
|
|
28
|
+
* ## What never reaches a node
|
|
29
|
+
*
|
|
30
|
+
* The filter is `./reference-props.ts`'s: a secret (the envelope or the
|
|
31
|
+
* blinded `"[secret]"`), a value under a key that reads as a credential, the
|
|
32
|
+
* `data`, `stringData` and `binaryData` of a Kubernetes Secret or ConfigMap,
|
|
33
|
+
* and a string longer than a name are left out of `planChanges`, of
|
|
34
|
+
* `planReplacePaths` and of the inputs. A change under such a key is not
|
|
35
|
+
* listed at all, so it can't show a secret's before or after. Only leaves
|
|
36
|
+
* are emitted. An unknown after value reads {@link KNOWN_AFTER_APPLY}.
|
|
37
|
+
*
|
|
38
|
+
* ## Why a read did not answer
|
|
39
|
+
*
|
|
40
|
+
* {@link previewReadReason} turns the engine's error into one of
|
|
41
|
+
* {@link PREVIEW_READ_REASONS}, written on the member's `rootReads` entry
|
|
42
|
+
* (`pulumi.members.<member>`) with `depth: "preview"`.
|
|
43
|
+
*/
|
|
44
|
+
import type { ResourceMetadata } from "@intentius/chant/lexicon";
|
|
45
|
+
import type { UnobservedEntity } from "@intentius/chant/observation";
|
|
46
|
+
/** The environment variable that sets how deep a pulumi member is read (#5332). */
|
|
47
|
+
export declare const PULUMI_OBSERVE_ENV = "CHANT_PULUMI_OBSERVE";
|
|
48
|
+
/** `state` is the default read (the export and plunge's records); `preview` adds the engine's preview. */
|
|
49
|
+
export type PulumiObserveDepth = "state" | "preview";
|
|
50
|
+
/** The `sources` value on each resource the preview answered. */
|
|
51
|
+
export declare const PREVIEW_SOURCE = "preview";
|
|
52
|
+
/** What stands in for a value the preview can't know yet, as in the terraform plan observation. */
|
|
53
|
+
export declare const KNOWN_AFTER_APPLY = "(known after apply)";
|
|
54
|
+
/** The status of a node that exists only in the preview. */
|
|
55
|
+
export declare const PLANNED_STATUS = "planned";
|
|
56
|
+
/** Every attribute the preview depth adds to a node, named as the terraform plan depth names them. */
|
|
57
|
+
export declare const PREVIEW_ATTRIBUTE_NAMES: readonly ["planAction", "planActions", "planActionReason", "planReplacePaths", "planAfterUnknown", "planChanges"];
|
|
58
|
+
/** Why a preview read did not answer, on `rootReads[...].reason`. */
|
|
59
|
+
export declare const PREVIEW_READ_REASONS: {
|
|
60
|
+
readonly "no-credentials": "the cloud provider or the backend refused the engine's credentials, or none were found";
|
|
61
|
+
readonly "needs-install": "the program's dependencies or a provider plugin are not installed; chant never runs `pulumi install` on a read";
|
|
62
|
+
readonly "no-stack": "the member names no stack and the engine has none selected, or the stack does not exist";
|
|
63
|
+
readonly "no-binary": "the engine binary is not on PATH";
|
|
64
|
+
readonly "preview-failed": "the preview failed for another reason; the engine's first error line is in the note";
|
|
65
|
+
};
|
|
66
|
+
export type PreviewReadReason = keyof typeof PREVIEW_READ_REASONS;
|
|
67
|
+
/** The reason an engine error maps to. First match wins, in the order of {@link PREVIEW_READ_REASONS} less `preview-failed`. */
|
|
68
|
+
export declare function previewReadReason(error: string): PreviewReadReason;
|
|
69
|
+
/** One leaf that differs between the two sides of a planned change. Same fields as the terraform plan depth's. */
|
|
70
|
+
export interface PreviewValueChange {
|
|
71
|
+
path: string;
|
|
72
|
+
before: unknown;
|
|
73
|
+
after: unknown;
|
|
74
|
+
}
|
|
75
|
+
/** Render one path as one string: keys joined with `.`, indexes and non-identifier keys in brackets. */
|
|
76
|
+
export declare function renderPath(segments: ReadonlyArray<string | number>): string;
|
|
77
|
+
/** What the preview says about a member, in the shape `describeResources` returns. */
|
|
78
|
+
export interface PreviewObserved {
|
|
79
|
+
resources: Record<string, ResourceMetadata>;
|
|
80
|
+
unobserved: Record<string, UnobservedEntity>;
|
|
81
|
+
queried: Record<string, string>;
|
|
82
|
+
sources: Record<string, string>;
|
|
83
|
+
/** Steps whose op the change set has no action for; their `planAction` lists the ops. */
|
|
84
|
+
unmapped: number;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The member's preview as resources keyed `<label>/<urn tail>`, the key the
|
|
88
|
+
* graph read uses. `declared` are the entities the graph already holds.
|
|
89
|
+
* Returns undefined when the document has no steps.
|
|
90
|
+
*/
|
|
91
|
+
export declare function observePreview(opts: {
|
|
92
|
+
label: string;
|
|
93
|
+
preview: unknown;
|
|
94
|
+
declared: ReadonlyMap<string, {
|
|
95
|
+
entityType: string;
|
|
96
|
+
}>;
|
|
97
|
+
}): PreviewObserved | undefined;
|