@intentius/chant-lexicon-pulumi 0.124.98 → 0.124.99

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.
Files changed (316) hide show
  1. package/dist/adopt.d.ts +0 -1
  2. package/dist/capability-plugin.d.ts +0 -1
  3. package/dist/change-set.d.ts +0 -1
  4. package/dist/changed-units.d.ts +0 -1
  5. package/dist/check-step.d.ts +0 -1
  6. package/dist/ci-setup.d.ts +0 -1
  7. package/dist/codegen/docs-cli.d.ts +0 -1
  8. package/dist/codegen/docs.d.ts +0 -1
  9. package/dist/codegen/package.d.ts +0 -1
  10. package/dist/composites/pulumi-adopt-op.d.ts +0 -1
  11. package/dist/composites/pulumi-watch-op.d.ts +0 -1
  12. package/dist/config.d.ts +0 -1
  13. package/dist/describe-resources.d.ts +0 -1
  14. package/dist/drift-read.d.ts +0 -1
  15. package/dist/drift-record.d.ts +0 -1
  16. package/dist/engine-events.d.ts +0 -1
  17. package/dist/engine-graph.d.ts +0 -1
  18. package/dist/exit-codes.d.ts +0 -1
  19. package/dist/index.d.ts +0 -1
  20. package/dist/init-templates.d.ts +0 -1
  21. package/dist/integrity.json +2 -2
  22. package/dist/lint/audit-catalog.d.ts +0 -1
  23. package/dist/lint/post-synth/index.d.ts +0 -1
  24. package/dist/lint/post-synth/member-read-helpers.d.ts +0 -1
  25. package/dist/lint/post-synth/pul001.d.ts +0 -1
  26. package/dist/lint/post-synth/pul002.d.ts +0 -1
  27. package/dist/lint/post-synth/pul003.d.ts +0 -1
  28. package/dist/lint/post-synth/pul004.d.ts +0 -1
  29. package/dist/lint/post-synth/pul005.d.ts +0 -1
  30. package/dist/lint/post-synth/pul006.d.ts +0 -1
  31. package/dist/lint/post-synth/pul007.d.ts +0 -1
  32. package/dist/lint/post-synth/pul008.d.ts +0 -1
  33. package/dist/lint/post-synth/pul009.d.ts +0 -1
  34. package/dist/lint/post-synth/pul010.d.ts +0 -1
  35. package/dist/lint/post-synth/pul011.d.ts +0 -1
  36. package/dist/lint/post-synth/pul012.d.ts +0 -1
  37. package/dist/lint/post-synth/pul013.d.ts +0 -1
  38. package/dist/lint/post-synth/pul014.d.ts +0 -1
  39. package/dist/lint/post-synth/pul015.d.ts +0 -1
  40. package/dist/lint/rules/index.d.ts +0 -1
  41. package/dist/lint/rules/member-dir-absolute.d.ts +0 -1
  42. package/dist/lock-rows.d.ts +0 -1
  43. package/dist/lsp/completions.d.ts +0 -1
  44. package/dist/lsp/documents.d.ts +0 -1
  45. package/dist/lsp/hover.d.ts +0 -1
  46. package/dist/lsp/keys.d.ts +0 -1
  47. package/dist/lsp/object-path.d.ts +0 -1
  48. package/dist/lsp/yaml-cursor.d.ts +0 -1
  49. package/dist/manifest.json +1 -1
  50. package/dist/member-engine.d.ts +0 -1
  51. package/dist/member-outputs.d.ts +0 -1
  52. package/dist/op/activities/index.d.ts +0 -1
  53. package/dist/op/activities/pulumi-adopt.d.ts +0 -1
  54. package/dist/op/activities/pulumi.d.ts +0 -1
  55. package/dist/op/activity-contracts.d.ts +0 -1
  56. package/dist/op/builders.d.ts +0 -1
  57. package/dist/package-cli.d.ts +0 -1
  58. package/dist/plan-shape.d.ts +0 -1
  59. package/dist/planned-output-changes.d.ts +0 -1
  60. package/dist/plugin.d.ts +0 -1
  61. package/dist/plunge-timings.d.ts +0 -1
  62. package/dist/preview-tips.d.ts +0 -1
  63. package/dist/pulumi-up.d.ts +0 -1
  64. package/dist/release-copy.d.ts +0 -1
  65. package/dist/review-stack.d.ts +0 -1
  66. package/dist/run.d.ts +0 -1
  67. package/dist/serializer.d.ts +0 -1
  68. package/dist/stack-export-snapshot.d.ts +0 -1
  69. package/dist/stack-ops.d.ts +0 -1
  70. package/dist/stack-outputs.d.ts +0 -1
  71. package/dist/stack-references.d.ts +0 -1
  72. package/dist/trace-facts.d.ts +0 -1
  73. package/dist/values.d.ts +0 -1
  74. package/dist/workspace-member.d.ts +0 -1
  75. package/package.json +3 -4
  76. package/dist/adopt.d.ts.map +0 -1
  77. package/dist/capability-plugin.d.ts.map +0 -1
  78. package/dist/change-set.d.ts.map +0 -1
  79. package/dist/changed-units.d.ts.map +0 -1
  80. package/dist/check-step.d.ts.map +0 -1
  81. package/dist/ci-setup.d.ts.map +0 -1
  82. package/dist/codegen/docs-cli.d.ts.map +0 -1
  83. package/dist/codegen/docs.d.ts.map +0 -1
  84. package/dist/codegen/package.d.ts.map +0 -1
  85. package/dist/composites/pulumi-adopt-op.d.ts.map +0 -1
  86. package/dist/composites/pulumi-watch-op.d.ts.map +0 -1
  87. package/dist/config.d.ts.map +0 -1
  88. package/dist/describe-resources.d.ts.map +0 -1
  89. package/dist/drift-read.d.ts.map +0 -1
  90. package/dist/drift-record.d.ts.map +0 -1
  91. package/dist/engine-events.d.ts.map +0 -1
  92. package/dist/engine-graph.d.ts.map +0 -1
  93. package/dist/exit-codes.d.ts.map +0 -1
  94. package/dist/index.d.ts.map +0 -1
  95. package/dist/init-templates.d.ts.map +0 -1
  96. package/dist/lint/audit-catalog.d.ts.map +0 -1
  97. package/dist/lint/post-synth/index.d.ts.map +0 -1
  98. package/dist/lint/post-synth/member-read-helpers.d.ts.map +0 -1
  99. package/dist/lint/post-synth/pul001.d.ts.map +0 -1
  100. package/dist/lint/post-synth/pul002.d.ts.map +0 -1
  101. package/dist/lint/post-synth/pul003.d.ts.map +0 -1
  102. package/dist/lint/post-synth/pul004.d.ts.map +0 -1
  103. package/dist/lint/post-synth/pul005.d.ts.map +0 -1
  104. package/dist/lint/post-synth/pul006.d.ts.map +0 -1
  105. package/dist/lint/post-synth/pul007.d.ts.map +0 -1
  106. package/dist/lint/post-synth/pul008.d.ts.map +0 -1
  107. package/dist/lint/post-synth/pul009.d.ts.map +0 -1
  108. package/dist/lint/post-synth/pul010.d.ts.map +0 -1
  109. package/dist/lint/post-synth/pul011.d.ts.map +0 -1
  110. package/dist/lint/post-synth/pul012.d.ts.map +0 -1
  111. package/dist/lint/post-synth/pul013.d.ts.map +0 -1
  112. package/dist/lint/post-synth/pul014.d.ts.map +0 -1
  113. package/dist/lint/post-synth/pul015.d.ts.map +0 -1
  114. package/dist/lint/rules/index.d.ts.map +0 -1
  115. package/dist/lint/rules/member-dir-absolute.d.ts.map +0 -1
  116. package/dist/lock-rows.d.ts.map +0 -1
  117. package/dist/lsp/completions.d.ts.map +0 -1
  118. package/dist/lsp/documents.d.ts.map +0 -1
  119. package/dist/lsp/hover.d.ts.map +0 -1
  120. package/dist/lsp/keys.d.ts.map +0 -1
  121. package/dist/lsp/object-path.d.ts.map +0 -1
  122. package/dist/lsp/yaml-cursor.d.ts.map +0 -1
  123. package/dist/member-engine.d.ts.map +0 -1
  124. package/dist/member-outputs.d.ts.map +0 -1
  125. package/dist/op/activities/index.d.ts.map +0 -1
  126. package/dist/op/activities/pulumi-adopt.d.ts.map +0 -1
  127. package/dist/op/activities/pulumi.d.ts.map +0 -1
  128. package/dist/op/activity-contracts.d.ts.map +0 -1
  129. package/dist/op/builders.d.ts.map +0 -1
  130. package/dist/package-cli.d.ts.map +0 -1
  131. package/dist/plan-shape.d.ts.map +0 -1
  132. package/dist/planned-output-changes.d.ts.map +0 -1
  133. package/dist/plugin.d.ts.map +0 -1
  134. package/dist/plunge-timings.d.ts.map +0 -1
  135. package/dist/preview-tips.d.ts.map +0 -1
  136. package/dist/pulumi-up.d.ts.map +0 -1
  137. package/dist/release-copy.d.ts.map +0 -1
  138. package/dist/review-stack.d.ts.map +0 -1
  139. package/dist/run.d.ts.map +0 -1
  140. package/dist/serializer.d.ts.map +0 -1
  141. package/dist/stack-export-snapshot.d.ts.map +0 -1
  142. package/dist/stack-ops.d.ts.map +0 -1
  143. package/dist/stack-outputs.d.ts.map +0 -1
  144. package/dist/stack-references.d.ts.map +0 -1
  145. package/dist/trace-facts.d.ts.map +0 -1
  146. package/dist/values.d.ts.map +0 -1
  147. package/dist/workspace-member.d.ts.map +0 -1
  148. package/src/adopt.ts +0 -202
  149. package/src/capability-plugin.ts +0 -34
  150. package/src/change-set.test.ts +0 -245
  151. package/src/change-set.ts +0 -508
  152. package/src/changed-units.test.ts +0 -87
  153. package/src/changed-units.ts +0 -96
  154. package/src/check-step.test.ts +0 -191
  155. package/src/check-step.ts +0 -316
  156. package/src/ci-setup.test.ts +0 -234
  157. package/src/ci-setup.ts +0 -224
  158. package/src/codegen/docs-cli.ts +0 -4
  159. package/src/codegen/docs.ts +0 -58
  160. package/src/codegen/package.ts +0 -63
  161. package/src/composites/pulumi-adopt-op.test.ts +0 -258
  162. package/src/composites/pulumi-adopt-op.ts +0 -193
  163. package/src/composites/pulumi-watch-op.test.ts +0 -42
  164. package/src/composites/pulumi-watch-op.ts +0 -85
  165. package/src/config.ts +0 -43
  166. package/src/describe-resources.test.ts +0 -112
  167. package/src/describe-resources.ts +0 -118
  168. package/src/drift-read.test.ts +0 -178
  169. package/src/drift-read.ts +0 -94
  170. package/src/drift-record.test.ts +0 -197
  171. package/src/drift-record.ts +0 -326
  172. package/src/engine-events.test.ts +0 -160
  173. package/src/engine-events.ts +0 -395
  174. package/src/engine-graph.test.ts +0 -141
  175. package/src/engine-graph.ts +0 -149
  176. package/src/exit-codes.test.ts +0 -21
  177. package/src/exit-codes.ts +0 -71
  178. package/src/index.ts +0 -139
  179. package/src/init-templates.ts +0 -85
  180. package/src/lint/audit-catalog.test.ts +0 -33
  181. package/src/lint/audit-catalog.ts +0 -174
  182. package/src/lint/post-synth/index.ts +0 -35
  183. package/src/lint/post-synth/member-read-helpers.ts +0 -122
  184. package/src/lint/post-synth/post-synth.test.ts +0 -245
  185. package/src/lint/post-synth/pul001.ts +0 -38
  186. package/src/lint/post-synth/pul002.ts +0 -38
  187. package/src/lint/post-synth/pul003.ts +0 -43
  188. package/src/lint/post-synth/pul004.ts +0 -32
  189. package/src/lint/post-synth/pul005.ts +0 -31
  190. package/src/lint/post-synth/pul006.ts +0 -31
  191. package/src/lint/post-synth/pul007.ts +0 -35
  192. package/src/lint/post-synth/pul008.ts +0 -35
  193. package/src/lint/post-synth/pul009.ts +0 -32
  194. package/src/lint/post-synth/pul010.ts +0 -42
  195. package/src/lint/post-synth/pul011.ts +0 -38
  196. package/src/lint/post-synth/pul012.ts +0 -35
  197. package/src/lint/post-synth/pul013.ts +0 -35
  198. package/src/lint/post-synth/pul014.ts +0 -32
  199. package/src/lint/post-synth/pul015.ts +0 -39
  200. package/src/lint/rules/index.ts +0 -7
  201. package/src/lint/rules/member-dir-absolute.test.ts +0 -37
  202. package/src/lint/rules/member-dir-absolute.ts +0 -83
  203. package/src/lock-rows.test.ts +0 -60
  204. package/src/lock-rows.ts +0 -56
  205. package/src/lsp/completions.test.ts +0 -69
  206. package/src/lsp/completions.ts +0 -119
  207. package/src/lsp/documents.ts +0 -48
  208. package/src/lsp/hover.test.ts +0 -56
  209. package/src/lsp/hover.ts +0 -83
  210. package/src/lsp/keys.ts +0 -169
  211. package/src/lsp/object-path.ts +0 -71
  212. package/src/lsp/yaml-cursor.ts +0 -85
  213. package/src/member-engine.test.ts +0 -112
  214. package/src/member-engine.ts +0 -97
  215. package/src/member-outputs.test.ts +0 -339
  216. package/src/member-outputs.ts +0 -157
  217. package/src/op/activities/index.ts +0 -36
  218. package/src/op/activities/pulumi-adopt.ts +0 -345
  219. package/src/op/activities/pulumi.ts +0 -136
  220. package/src/op/activity-contracts.ts +0 -129
  221. package/src/op/builders.ts +0 -67
  222. package/src/package-cli.ts +0 -14
  223. package/src/plan-shape.test.ts +0 -91
  224. package/src/plan-shape.ts +0 -105
  225. package/src/planned-output-changes.test.ts +0 -85
  226. package/src/planned-output-changes.ts +0 -141
  227. package/src/plugin.test.ts +0 -96
  228. package/src/plugin.ts +0 -272
  229. package/src/plunge-timings.test.ts +0 -241
  230. package/src/plunge-timings.ts +0 -115
  231. package/src/plunge-up-failed.test.ts +0 -54
  232. package/src/pr-note.test.ts +0 -87
  233. package/src/preview-generated.test.ts +0 -124
  234. package/src/preview-tips.test.ts +0 -134
  235. package/src/preview-tips.ts +0 -128
  236. package/src/pulumi-up.test.ts +0 -581
  237. package/src/pulumi-up.ts +0 -1102
  238. package/src/pulumi-urn-node.test.ts +0 -94
  239. package/src/release-copy.test.ts +0 -162
  240. package/src/release-copy.ts +0 -223
  241. package/src/review-stack.test.ts +0 -254
  242. package/src/review-stack.ts +0 -266
  243. package/src/run-plan-flags.test.ts +0 -53
  244. package/src/run.test.ts +0 -540
  245. package/src/run.ts +0 -1129
  246. package/src/serializer.test.ts +0 -9
  247. package/src/serializer.ts +0 -15
  248. package/src/skills/chant-pulumi-plunge.md +0 -51
  249. package/src/skills/chant-pulumi-stack-export.md +0 -54
  250. package/src/skills/chant-pulumi.md +0 -83
  251. package/src/stack-export-snapshot.test.ts +0 -192
  252. package/src/stack-export-snapshot.ts +0 -312
  253. package/src/stack-ops.fake-binary.test.ts +0 -323
  254. package/src/stack-ops.test.ts +0 -511
  255. package/src/stack-ops.ts +0 -1082
  256. package/src/stack-outputs.ts +0 -66
  257. package/src/stack-references.test.ts +0 -96
  258. package/src/stack-references.ts +0 -110
  259. package/src/testdata/plunge-drift/README.md +0 -10
  260. package/src/testdata/plunge-drift/assets-drifted.ndjson +0 -3
  261. package/src/testdata/plunge-drift/component-unsupported.ndjson +0 -3
  262. package/src/testdata/plunge-drift/role-in-sync.ndjson +0 -3
  263. package/src/testdata/plunge-drift/settled-empty.ndjson +0 -2
  264. package/src/testdata/plunge-graph/Pulumi.yaml +0 -4
  265. package/src/testdata/plunge-graph/README.md +0 -12
  266. package/src/testdata/plunge-graph/engine-graph.json +0 -158
  267. package/src/testdata/plunge-graph/stack-export.json +0 -49
  268. package/src/testdata/plunge-member/Pulumi.yaml +0 -4
  269. package/src/testdata/plunge-member/README.md +0 -3
  270. package/src/testdata/plunge-member/stack-export.json +0 -480
  271. package/src/testdata/plunge-outputs/Pulumi.yaml +0 -9
  272. package/src/testdata/plunge-outputs/README.md +0 -7
  273. package/src/testdata/plunge-outputs/stack-export.json +0 -2003
  274. package/src/testdata/plunge-outputs/stack-output.json +0 -19
  275. package/src/testdata/pulumi-member/Pulumi.yaml +0 -2
  276. package/src/testdata/pulumi-member/README.md +0 -50
  277. package/src/testdata/pulumi-member/recording/Pulumi.dev.yaml +0 -19
  278. package/src/testdata/pulumi-member/recording/Pulumi.yaml +0 -7
  279. package/src/testdata/pulumi-member/recording/index.js +0 -47
  280. package/src/testdata/pulumi-member/recording/package-lock.json +0 -2707
  281. package/src/testdata/pulumi-member/recording/package.json +0 -9
  282. package/src/testdata/pulumi-member/stack-export.json +0 -746
  283. package/src/testdata/pulumi-outputs/Pulumi.yaml +0 -7
  284. package/src/testdata/pulumi-outputs/README.md +0 -9
  285. package/src/testdata/pulumi-outputs/preview-replaced.json +0 -2894
  286. package/src/testdata/pulumi-outputs/preview-settled.json +0 -2894
  287. package/src/testdata/pulumi-outputs/stack-export.json +0 -1919
  288. package/src/testdata/pulumi-outputs/stack-output.json +0 -19
  289. package/src/testdata/pulumi-preview/Pulumi.yaml +0 -7
  290. package/src/testdata/pulumi-preview/README.md +0 -9
  291. package/src/testdata/pulumi-preview/preview-create.json +0 -992
  292. package/src/testdata/pulumi-preview/preview.json +0 -2894
  293. package/src/testdata/pulumi-preview/stack-export.json +0 -1919
  294. package/src/testdata/pulumi-refresh/Pulumi.yaml +0 -7
  295. package/src/testdata/pulumi-refresh/README.md +0 -14
  296. package/src/testdata/pulumi-refresh/all.json +0 -3742
  297. package/src/testdata/pulumi-refresh/bucket-edited.json +0 -468
  298. package/src/testdata/pulumi-refresh/policy-deleted.json +0 -95
  299. package/src/testdata/pulumi-refresh/queue-edited.json +0 -250
  300. package/src/testdata/pulumi-refresh/role-same.json +0 -242
  301. package/src/testdata/pulumi-refresh/secret-edited.json +0 -247
  302. package/src/testdata/pulumi-refresh/stack-export.json +0 -1907
  303. package/src/testdata/pulumi-stream/README.md +0 -16
  304. package/src/testdata/pulumi-stream/preview-stream.ndjson +0 -42
  305. package/src/testdata/pulumi-stream/up-failed-plunge.ndjson +0 -5
  306. package/src/testdata/pulumi-unexported/Pulumi.yaml +0 -2
  307. package/src/testdata/pulumi-urn-node/Pulumi.yaml +0 -7
  308. package/src/testdata/pulumi-urn-node/README.md +0 -9
  309. package/src/testdata/pulumi-urn-node/preview.json +0 -2894
  310. package/src/testdata/pulumi-urn-node/stack-export.json +0 -1919
  311. package/src/trace-facts.test.ts +0 -38
  312. package/src/trace-facts.ts +0 -83
  313. package/src/values.ts +0 -147
  314. package/src/workspace-kinds.test.ts +0 -47
  315. package/src/workspace-member.test.ts +0 -127
  316. package/src/workspace-member.ts +0 -304
package/src/lsp/keys.ts DELETED
@@ -1,169 +0,0 @@
1
- /**
2
- * The keys the pulumi lexicon's editor support knows (#4468): the project
3
- * file, a stack's config file, the workspace member entry and the
4
- * `pulumi.member` config namespace.
5
- *
6
- * Each entry says what the key is to Pulumi and, where chant reads it, what
7
- * chant does with it. The project-file keys follow Pulumi's own reference
8
- * for `Pulumi.yaml` (www.pulumi.com/docs/iac/concepts/projects/project-file/)
9
- * and the stack keys its reference for `Pulumi.<stack>.yaml`
10
- * (www.pulumi.com/docs/iac/concepts/config/). Neither list is exhaustive;
11
- * a key missing here gets no completion and no hover, and that is all.
12
- */
13
-
14
- export interface KeyDoc {
15
- key: string;
16
- doc: string;
17
- /** Values offered after `key:`, each with its own line of documentation. */
18
- values?: Array<{ value: string; doc: string }>;
19
- }
20
-
21
- const RUNTIMES = [
22
- { value: "nodejs", doc: "TypeScript or JavaScript, run with Node.js" },
23
- { value: "python", doc: "Python" },
24
- { value: "go", doc: "Go" },
25
- { value: "dotnet", doc: ".NET (C#, F#, VB)" },
26
- { value: "java", doc: "Java, built with Maven or Gradle" },
27
- { value: "yaml", doc: "Pulumi YAML: resources, variables and outputs written in this file" },
28
- ];
29
-
30
- /** The `runtime` names a `Pulumi.yaml` takes, for `detectTemplate` (#4510). */
31
- export const PULUMI_RUNTIME_NAMES: readonly string[] = RUNTIMES.map((r) => r.value);
32
-
33
- /** `Pulumi.yaml`, keyed by dotted path from the document root. */
34
- export const PROJECT_KEYS: Record<string, KeyDoc[]> = {
35
- "": [
36
- {
37
- key: "name",
38
- doc:
39
- "The project name (required). It is the second segment of every URN the stack writes " +
40
- "(`urn:pulumi:<stack>::<project>::<type>::<name>`); chant keys a member's graph nodes by the URN after its stack " +
41
- "and project, so renaming the project does not move them.",
42
- },
43
- {
44
- key: "runtime",
45
- doc:
46
- "The language the program is written in (required): a name, or `{ name, options }`. chant never runs the " +
47
- "program; the graph is read from the checked-in `stack-export.json`.",
48
- values: RUNTIMES,
49
- },
50
- { key: "description", doc: "A one-line description of the project." },
51
- { key: "main", doc: "The program's entry point or directory, relative to this file, when it is not this directory." },
52
- { key: "stackConfigDir", doc: "The directory that holds the `Pulumi.<stack>.yaml` files, when it is not this one." },
53
- {
54
- key: "backend",
55
- doc:
56
- "Where the project's stacks keep their state. chant reads `backend.url` from this file, and only from this " +
57
- "file, to decide what runs the member: a URL starting with `plunge` runs it on plunge.",
58
- },
59
- { key: "options", doc: "Project options, such as `refresh: always`." },
60
- { key: "config", doc: "Project-level config: declarations (type, description, default) and values every stack shares." },
61
- { key: "template", doc: "Metadata `pulumi new` reads when this project is used as a template." },
62
- { key: "plugins", doc: "Local provider, analyzer and language plugin binaries, by path." },
63
- { key: "packages", doc: "Pulumi packages the program uses, by name, for parameterized providers." },
64
- { key: "author", doc: "The project's author." },
65
- { key: "website", doc: "The project's website." },
66
- { key: "license", doc: "The project's license." },
67
- { key: "resources", doc: "Pulumi YAML only: the resources the program declares, by logical name." },
68
- { key: "variables", doc: "Pulumi YAML only: values computed once and referenced as `${name}`." },
69
- { key: "outputs", doc: "Pulumi YAML only: the stack outputs. chant reads them into other members' parameters." },
70
- ],
71
- runtime: [
72
- { key: "name", doc: "The runtime's name.", values: RUNTIMES },
73
- { key: "options", doc: "Options for the language host, such as `typescript`, `packagemanager` or `toolchain`." },
74
- ],
75
- "runtime.options": [
76
- { key: "typescript", doc: "nodejs: whether to compile TypeScript with ts-node (default true)." },
77
- { key: "nodeargs", doc: "nodejs: extra arguments passed to `node`." },
78
- {
79
- key: "packagemanager",
80
- doc: "nodejs: the package manager that installs dependencies.",
81
- values: ["npm", "yarn", "pnpm", "bun"].map((value) => ({ value, doc: value })),
82
- },
83
- {
84
- key: "toolchain",
85
- doc: "python: how dependencies are installed.",
86
- values: ["pip", "poetry", "uv"].map((value) => ({ value, doc: value })),
87
- },
88
- { key: "virtualenv", doc: "python: the virtual environment directory." },
89
- { key: "binary", doc: "go, dotnet, java: a prebuilt program binary to run instead of building one." },
90
- ],
91
- backend: [
92
- {
93
- key: "url",
94
- doc:
95
- "The state backend: `file://...`, `s3://...`, `https://api.pulumi.com` and so on. A URL starting with " +
96
- "`plunge` (`plunge+file://...`, `plunge://...`) makes chant run the member's preview and drift under " +
97
- "`plunge`. `PULUMI_BACKEND_URL` and `pulumi login` state are not read.",
98
- },
99
- ],
100
- options: [
101
- {
102
- key: "refresh",
103
- doc: "`always` refreshes before every update and preview.",
104
- values: [{ value: "always", doc: "refresh before every update and preview" }],
105
- },
106
- ],
107
- };
108
-
109
- /** `Pulumi.<stack>.yaml`, keyed by dotted path from the document root. */
110
- export const STACK_KEYS: Record<string, KeyDoc[]> = {
111
- "": [
112
- {
113
- key: "config",
114
- doc:
115
- "The stack's config values, each `<namespace>:<key>`: the project's own under its name, a provider's under " +
116
- "the provider's (`aws:region`). chant's preview and drift run against the member's selected stack and never " +
117
- "change these.",
118
- },
119
- { key: "secretsprovider", doc: "The provider that encrypts this stack's secrets (`passphrase`, `awskms://...`)." },
120
- { key: "encryptionsalt", doc: "The salt for passphrase-encrypted secrets. Written by Pulumi; do not edit." },
121
- { key: "encryptedkey", doc: "The data key for a cloud secrets provider. Written by Pulumi; do not edit." },
122
- { key: "environment", doc: "Pulumi ESC environments this stack imports config from." },
123
- ],
124
- };
125
-
126
- /** Hover-only keys inside a stack's config. */
127
- export const STACK_CONFIG_VALUE_KEYS: Record<string, string> = {
128
- secure:
129
- "An encrypted value. Outputs Pulumi marks secret are left out of the outputs chant reads into another member's " +
130
- "parameters, and chant never decrypts or prints them.",
131
- };
132
-
133
- /** The member kind, for `"kind": "pulumi"` in `chant.workspace.json`. */
134
- export const MEMBER_KIND_DOC =
135
- "**pulumi** member kind (`@intentius/chant-lexicon-pulumi`)\n\n" +
136
- "A Pulumi program, found by its `Pulumi.yaml`.\n\n" +
137
- "- graph: the `pulumi stack export` checked in as `stack-export.json`; the program is not run\n" +
138
- "- change set: `pulumi preview --json`\n" +
139
- "- drift: `pulumi refresh --preview-only --json`, one resource at a time, or `plunge drift --stream` on plunge\n" +
140
- "- outputs: `pulumi stack output --json --show-secrets=false` (applied) and the preview (planned)\n\n" +
141
- "On plunge, `plunge preview`, `plunge stack output` and `plunge drift`. chant runs nothing else (#4476), so it " +
142
- "never changes the stack.";
143
-
144
- /** `pulumi.member` in `chant.config.ts`. */
145
- export const MEMBER_CONFIG_KEYS: KeyDoc[] = [
146
- {
147
- key: "dir",
148
- doc:
149
- "The member's directory, the one holding `Pulumi.yaml` and `stack-export.json`. A relative path resolves " +
150
- "against the project root (PUL101 warns on an absolute one).",
151
- },
152
- { key: "label", doc: "The prefix of the member's entity names (`<label>/<urn tail>`). Defaults to the directory's name." },
153
- {
154
- key: "engine",
155
- doc: "What runs the stack: `pulumi`, or `plunge`. Omit it to take it from `backend.url` in `Pulumi.yaml`.",
156
- values: [
157
- { value: "pulumi", doc: "run `pulumi preview` and `pulumi refresh --preview-only`" },
158
- { value: "plunge", doc: "run the same reads under `plunge`, and drift with `plunge drift --stream`" },
159
- ],
160
- },
161
- {
162
- key: "stack",
163
- doc: "The stack the drift read passes as `--stack`. Omit it to take the stack the checked-in `stack-export.json` names in its URNs.",
164
- },
165
- ];
166
-
167
- export const CONFIG_NAMESPACE_KEYS: KeyDoc[] = [
168
- { key: "member", doc: "One pulumi workspace member read into this build's graph, from its checked-in `stack-export.json`." },
169
- ];
@@ -1,71 +0,0 @@
1
- /**
2
- * The keys of the object literals enclosing a position in TypeScript or JSON
3
- * source (#4468), read by scanning brackets rather than parsing, since the
4
- * document is usually mid-edit.
5
- *
6
- * `{ pulumi: { member: { dir: "|` reads as `["", "pulumi", "member"]`: one
7
- * entry per open `{` or `[`, each the key it is the value of, or `""` when it
8
- * is not a property's value (the outermost object, an array element). Strings
9
- * and comments are skipped, so a brace inside either does not count.
10
- */
11
- export function enclosingKeys(text: string): string[] {
12
- const stack: string[] = [];
13
- let lastKeyLike: string | undefined;
14
- let pendingKey: string | undefined;
15
- let i = 0;
16
- while (i < text.length) {
17
- const c = text[i];
18
- if (c === "/" && text[i + 1] === "/") {
19
- const end = text.indexOf("\n", i);
20
- i = end === -1 ? text.length : end + 1;
21
- continue;
22
- }
23
- if (c === "/" && text[i + 1] === "*") {
24
- const end = text.indexOf("*/", i + 2);
25
- i = end === -1 ? text.length : end + 2;
26
- continue;
27
- }
28
- if (c === '"' || c === "'" || c === "`") {
29
- let j = i + 1;
30
- while (j < text.length && text[j] !== c) j += text[j] === "\\" ? 2 : 1;
31
- lastKeyLike = text.slice(i + 1, j);
32
- i = j + 1;
33
- continue;
34
- }
35
- if (/[A-Za-z_$]/.test(c)) {
36
- let j = i + 1;
37
- while (j < text.length && /[\w$]/.test(text[j])) j++;
38
- lastKeyLike = text.slice(i, j);
39
- i = j;
40
- continue;
41
- }
42
- if (c === ":") {
43
- pendingKey = lastKeyLike;
44
- } else if (c === "{" || c === "[") {
45
- stack.push(pendingKey ?? "");
46
- pendingKey = undefined;
47
- } else if (c === "}" || c === "]") {
48
- stack.pop();
49
- pendingKey = undefined;
50
- } else if (c === ",") {
51
- pendingKey = undefined;
52
- }
53
- lastKeyLike = /\s/.test(c) ? lastKeyLike : undefined;
54
- i++;
55
- }
56
- return stack;
57
- }
58
-
59
- /** The offset of `line`/`character` in `content`. */
60
- export function offsetOf(content: string, line: number, character: number): number {
61
- let offset = 0;
62
- const lines = content.split("\n");
63
- for (let l = 0; l < line && l < lines.length; l++) offset += lines[l].length + 1;
64
- return offset + character;
65
- }
66
-
67
- /** Whether `path` ends with `suffix`. */
68
- export function endsWith(path: string[], suffix: string[]): boolean {
69
- if (suffix.length > path.length) return false;
70
- return suffix.every((k, i) => path[path.length - suffix.length + i] === k);
71
- }
@@ -1,85 +0,0 @@
1
- /**
2
- * Where a cursor sits in a YAML document, read by indentation (#4468).
3
- *
4
- * A document being typed is rarely valid YAML, so this does not parse. It
5
- * reads the cursor's own line and walks up the lines above it, taking each
6
- * less-indented `key:` as a parent, which is how a block mapping nests. Flow
7
- * mappings (`{ a: 1 }`) and multi-line scalars are out of its reach; a
8
- * completion there just gets the keys of the nearest block parent.
9
- */
10
-
11
- export interface YamlCursor {
12
- /** The keys of the mappings enclosing the cursor's line, outermost first. */
13
- parents: string[];
14
- /** The key on the cursor's line when the cursor is after its colon. */
15
- key?: string;
16
- /** Text typed after `key:` up to the cursor, when `key` is set. */
17
- valuePrefix: string;
18
- /** The partial key typed up to the cursor, when the cursor is in key position. */
19
- keyPrefix: string;
20
- }
21
-
22
- /**
23
- * A key: quoted, or plain up to the first colon followed by a space or the
24
- * end of the line. A stack config key carries its own colon
25
- * (`aws:region: us-east-1`), so a colon followed by anything else stays in
26
- * the key.
27
- */
28
- const KEY = `("[^"]*"|'[^']*'|[^\\s#'"](?:[^#]*?[^\\s])?)`;
29
- const KEY_LINE = new RegExp(`^(\\s*)(?:-\\s+)?${KEY}:(?:\\s|$)`);
30
- const VALUE_LINE = new RegExp(`^(\\s*)(?:-\\s+)?${KEY}:(?:\\s+(.*))?$`);
31
-
32
- function unquote(key: string): string {
33
- return /^(["']).*\1$/.test(key) ? key.slice(1, -1) : key;
34
- }
35
-
36
- function indentOf(line: string): number {
37
- return line.length - line.trimStart().length;
38
- }
39
-
40
- /** The parents of line `index` whose own indent is `indent`. */
41
- export function yamlParents(lines: string[], index: number, indent: number): string[] {
42
- const parents: string[] = [];
43
- let level = indent;
44
- for (let i = index - 1; i >= 0 && level > 0; i--) {
45
- const line = lines[i];
46
- const trimmed = line.trim();
47
- if (trimmed === "" || trimmed.startsWith("#")) continue;
48
- const lineIndent = indentOf(line);
49
- if (lineIndent >= level) continue;
50
- const m = KEY_LINE.exec(line);
51
- if (!m) {
52
- // A sequence item (`- name`) at a lower indent still bounds the level.
53
- level = lineIndent;
54
- continue;
55
- }
56
- parents.unshift(unquote(m[2].trim()));
57
- level = lineIndent;
58
- }
59
- return parents;
60
- }
61
-
62
- export function yamlCursor(content: string, line: number, character: number): YamlCursor {
63
- const lines = content.split("\n");
64
- const text = (lines[line] ?? "").slice(0, character);
65
- const indent = indentOf(text);
66
- const parents = yamlParents(lines, line, indent);
67
-
68
- const valueMatch = VALUE_LINE.exec(text);
69
- if (valueMatch) {
70
- return { parents, key: unquote(valueMatch[2].trim()), valuePrefix: valueMatch[3] ?? "", keyPrefix: "" };
71
- }
72
- const keyPrefix = text.trim().replace(/^-\s*/, "");
73
- return { parents, valuePrefix: "", keyPrefix };
74
- }
75
-
76
- /** The key a line declares and its full path, for hover; undefined when the line declares none. */
77
- export function yamlKeyAt(content: string, line: number): { key: string; path: string[]; value: string } | undefined {
78
- const lines = content.split("\n");
79
- const text = lines[line] ?? "";
80
- const m = KEY_LINE.exec(text);
81
- if (!m) return undefined;
82
- const key = unquote(m[2].trim());
83
- const value = text.slice(m[0].length).replace(/\s+#.*$/, "").trim();
84
- return { key, path: [...yamlParents(lines, line, indentOf(text)), key], value };
85
- }
@@ -1,112 +0,0 @@
1
- /**
2
- * Engine detection (chant#4559): the member's config, plywood.yml,
3
- * PULUMI_BACKEND_URL, Pulumi.yaml, in that order.
4
- */
5
- import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
6
- import { tmpdir } from "node:os";
7
- import { join } from "node:path";
8
- import { describe, expect, test } from "vitest";
9
- import { pulumiMemberEngine, readPlywoodEngine } from "./member-engine";
10
-
11
- /** A repo root (with `.git`) holding `infra/`, so the plywood.yml search stops inside the temp dir. */
12
- function repo(files: { plywood?: string; pulumi?: string } = {}): { root: string; dir: string } {
13
- const root = mkdtempSync(join(tmpdir(), "member-engine-"));
14
- mkdirSync(join(root, ".git"));
15
- const dir = join(root, "infra");
16
- mkdirSync(dir);
17
- if (files.plywood !== undefined) writeFileSync(join(root, "plywood.yml"), files.plywood);
18
- if (files.pulumi !== undefined) writeFileSync(join(dir, "Pulumi.yaml"), files.pulumi);
19
- return { root, dir };
20
- }
21
-
22
- const PLUNGE_YAML = "name: site\nruntime: nodejs\nbackend:\n url: plunge+file:///var/lib/plunge/site\n";
23
- const STOCK_YAML = "name: site\nruntime: nodejs\n";
24
-
25
- describe("pulumiMemberEngine", () => {
26
- test("nothing names plunge: pulumi, source default", () => {
27
- const { dir } = repo({ pulumi: STOCK_YAML });
28
- expect(pulumiMemberEngine(dir, undefined, { env: {} })).toEqual({ engine: "pulumi", because: "nothing names plunge", source: "default" });
29
- });
30
-
31
- test("Pulumi.yaml backend.url with a plunge scheme", () => {
32
- const { dir } = repo({ pulumi: PLUNGE_YAML });
33
- const got = pulumiMemberEngine(dir, undefined, { env: {} });
34
- expect(got.engine).toBe("plunge");
35
- expect(got.source).toBe("Pulumi.yaml");
36
- });
37
-
38
- test("PULUMI_BACKEND_URL with a plunge+ URL means plunge when Pulumi.yaml names no backend", () => {
39
- const { dir } = repo({ pulumi: STOCK_YAML });
40
- const got = pulumiMemberEngine(dir, undefined, { env: { PULUMI_BACKEND_URL: "plunge+s3://bucket/state" } });
41
- expect(got).toEqual({
42
- engine: "plunge",
43
- because: "PULUMI_BACKEND_URL names the plunge backend plunge+s3://bucket/state",
44
- source: "PULUMI_BACKEND_URL",
45
- });
46
- });
47
-
48
- test("a stock PULUMI_BACKEND_URL does not mean plunge", () => {
49
- const { dir } = repo({ pulumi: STOCK_YAML });
50
- expect(pulumiMemberEngine(dir, undefined, { env: { PULUMI_BACKEND_URL: "file:///tmp/state" } }).engine).toBe("pulumi");
51
- expect(pulumiMemberEngine(dir, undefined, { env: { PULUMI_BACKEND_URL: "s3://bucket" } }).engine).toBe("pulumi");
52
- });
53
-
54
- test("PULUMI_BACKEND_URL beats Pulumi.yaml", () => {
55
- const { dir } = repo({ pulumi: PLUNGE_YAML });
56
- const got = pulumiMemberEngine(dir, undefined, { env: { PULUMI_BACKEND_URL: "plunge://host/x" } });
57
- expect(got.source).toBe("PULUMI_BACKEND_URL");
58
- });
59
-
60
- test("plywood.yml engine: plunge, found in a parent of the member directory", () => {
61
- const { dir, root } = repo({ plywood: "engine: plunge\nstacks:\n shop/dev: { dir: infra }\n", pulumi: STOCK_YAML });
62
- const got = pulumiMemberEngine(dir, undefined, { env: {} });
63
- expect(got.engine).toBe("plunge");
64
- expect(got.source).toBe("plywood.yml");
65
- expect(got.because).toBe(`${join(root, "plywood.yml")} says engine: plunge`);
66
- });
67
-
68
- test("plywood.yml engine: pulumi beats a plunge PULUMI_BACKEND_URL and Pulumi.yaml", () => {
69
- const { dir } = repo({ plywood: "engine: pulumi\n", pulumi: PLUNGE_YAML });
70
- const got = pulumiMemberEngine(dir, undefined, { env: { PULUMI_BACKEND_URL: "plunge+file:///x" } });
71
- expect(got.engine).toBe("pulumi");
72
- expect(got.source).toBe("plywood.yml");
73
- });
74
-
75
- test("plywood.yml without engine but with a plunge+ backend means plunge", () => {
76
- const { dir } = repo({ plywood: "backend: plunge+s3://bucket/state\n" });
77
- const got = pulumiMemberEngine(dir, undefined, { env: {} });
78
- expect(got.engine).toBe("plunge");
79
- expect(got.source).toBe("plywood.yml");
80
- });
81
-
82
- test("plywood.yml with neither key falls through to the environment", () => {
83
- const { dir } = repo({ plywood: "gate: always\n" });
84
- expect(pulumiMemberEngine(dir, undefined, { env: { PULUMI_BACKEND_URL: "plunge+file:///x" } }).source).toBe("PULUMI_BACKEND_URL");
85
- });
86
-
87
- test("the member's config beats everything", () => {
88
- const { dir } = repo({ plywood: "engine: plunge\n", pulumi: PLUNGE_YAML });
89
- const got = pulumiMemberEngine(dir, "pulumi", { env: { PULUMI_BACKEND_URL: "plunge+file:///x" } });
90
- expect(got).toEqual({ engine: "pulumi", because: "the member's config says engine: pulumi", source: "member-config" });
91
- });
92
-
93
- test("an unreadable plywood.yml names no engine", () => {
94
- const { dir } = repo({ plywood: "engine: [unclosed\n", pulumi: STOCK_YAML });
95
- expect(pulumiMemberEngine(dir, undefined, { env: {} }).engine).toBe("pulumi");
96
- });
97
-
98
- test("the search stops at the repository root", () => {
99
- const outer = mkdtempSync(join(tmpdir(), "member-engine-outer-"));
100
- writeFileSync(join(outer, "plywood.yml"), "engine: plunge\n");
101
- const root = join(outer, "repo");
102
- mkdirSync(join(root, ".git"), { recursive: true });
103
- mkdirSync(join(root, "infra"));
104
- expect(pulumiMemberEngine(join(root, "infra"), undefined, { env: {} }).engine).toBe("pulumi");
105
- });
106
-
107
- test("plywoodRoot bounds the search", () => {
108
- const { dir, root } = repo({ plywood: "engine: plunge\n" });
109
- expect(readPlywoodEngine(dir, dir)).toBeUndefined();
110
- expect(readPlywoodEngine(dir, root)?.engine).toBe("plunge");
111
- });
112
- });
@@ -1,97 +0,0 @@
1
- /**
2
- * Which engine runs a Pulumi member: stock `pulumi` or plunge, its fork
3
- * (#4453). The rule is in `./run.ts`'s module comment, which re-exports
4
- * {@link pulumiMemberEngine}. It lives here, apart from the runner, so the
5
- * graph read (`./workspace-member.ts`, which runs nothing) can ask it too:
6
- * only a member on plunge has a checked-in `engine-graph.json` read (#4529).
7
- */
8
- import { existsSync, readFileSync } from "node:fs";
9
- import { dirname, join, resolve } from "node:path";
10
- import { parseYAML } from "@intentius/chant/yaml";
11
-
12
- /** What runs a Pulumi member's stack. */
13
- export type PulumiMemberEngine = "pulumi" | "plunge";
14
-
15
- /** Where the engine decision came from, first rule that answered. */
16
- export type PulumiMemberEngineSource = "member-config" | "plywood.yml" | "PULUMI_BACKEND_URL" | "Pulumi.yaml" | "default";
17
-
18
- /** Inputs beyond the member directory. All optional. */
19
- export interface PulumiMemberEngineOptions {
20
- /** The job environment; defaults to `process.env`. Only `PULUMI_BACKEND_URL` is read. */
21
- env?: Record<string, string | undefined>;
22
- /** Where the search for `plywood.yml` stops (inclusive). Default: the first directory holding `.git`, else the filesystem root. */
23
- plywoodRoot?: string;
24
- }
25
-
26
- const PLUNGE_URL = /^plunge[+:]/;
27
- const PLYWOOD_FILES = ["plywood.yml", "plywood.yaml"];
28
-
29
- /**
30
- * The `engine` and `backend` keys of the nearest `plywood.yml`, looking in
31
- * `dir` and each parent up to the repository root. plywood passes no
32
- * detection of its own: the file is read here (chant#4559).
33
- */
34
- export function readPlywoodEngine(dir: string, stopAt?: string): { file: string; engine?: PulumiMemberEngine; backend?: string } | undefined {
35
- let cur = resolve(dir);
36
- const stop = stopAt ? resolve(stopAt) : undefined;
37
- for (let depth = 0; depth < 32; depth++) {
38
- for (const name of PLYWOOD_FILES) {
39
- const file = join(cur, name);
40
- if (!existsSync(file)) continue;
41
- try {
42
- const doc = parseYAML(readFileSync(file, "utf-8")) as Record<string, unknown> | undefined;
43
- const engine = doc?.engine === "pulumi" || doc?.engine === "plunge" ? doc.engine : undefined;
44
- const backend = typeof doc?.backend === "string" ? doc.backend : undefined;
45
- return { file, engine, backend };
46
- } catch {
47
- // An unreadable plywood.yml fails plywood's own config check; here it names no engine.
48
- return { file };
49
- }
50
- }
51
- if (cur === stop || (!stop && existsSync(join(cur, ".git")))) return undefined;
52
- const parent = dirname(cur);
53
- if (parent === cur) return undefined;
54
- cur = parent;
55
- }
56
- return undefined;
57
- }
58
-
59
- /**
60
- * Which engine runs the member, the rule that said so, and where it came from
61
- * (see `./run.ts`'s module comment). First rule that answers:
62
- * the member's config, `engine` (then a `plunge+` `backend`) in `plywood.yml`,
63
- * `PULUMI_BACKEND_URL`, `backend.url` in `Pulumi.yaml`, else pulumi.
64
- */
65
- export function pulumiMemberEngine(
66
- dir: string,
67
- configured?: PulumiMemberEngine,
68
- opts: PulumiMemberEngineOptions = {},
69
- ): { engine: PulumiMemberEngine; because: string; source: PulumiMemberEngineSource } {
70
- if (configured) return { engine: configured, because: `the member's config says engine: ${configured}`, source: "member-config" };
71
-
72
- const plywood = readPlywoodEngine(dir, opts.plywoodRoot);
73
- if (plywood?.engine) {
74
- return { engine: plywood.engine, because: `${plywood.file} says engine: ${plywood.engine}`, source: "plywood.yml" };
75
- }
76
- if (plywood?.backend && PLUNGE_URL.test(plywood.backend)) {
77
- return { engine: "plunge", because: `${plywood.file} names the plunge backend ${plywood.backend}`, source: "plywood.yml" };
78
- }
79
-
80
- const envUrl = (opts.env ?? process.env).PULUMI_BACKEND_URL;
81
- if (envUrl && PLUNGE_URL.test(envUrl)) {
82
- return { engine: "plunge", because: `PULUMI_BACKEND_URL names the plunge backend ${envUrl}`, source: "PULUMI_BACKEND_URL" };
83
- }
84
-
85
- const file = join(dir, "Pulumi.yaml");
86
- if (existsSync(file)) {
87
- try {
88
- const doc = parseYAML(readFileSync(file, "utf-8"));
89
- const backend = doc.backend as { url?: unknown } | undefined;
90
- const url = typeof backend?.url === "string" ? backend.url : undefined;
91
- if (url && PLUNGE_URL.test(url)) return { engine: "plunge", because: `Pulumi.yaml names the plunge backend ${url}`, source: "Pulumi.yaml" };
92
- } catch {
93
- // An unreadable Pulumi.yaml fails the member file check; here it just names no backend.
94
- }
95
- }
96
- return { engine: "pulumi", because: "nothing names plunge", source: "default" };
97
- }