@intentius/chant-lexicon-pulumi 0.124.97 → 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
@@ -1,43 +0,0 @@
1
- /**
2
- * PUL003: the stack export holds secrets in plaintext.
3
- *
4
- * `pulumi stack export` writes each secret as an envelope holding its
5
- * `ciphertext`, encrypted with the stack's secrets provider. With
6
- * `--show-secrets` it writes the same envelope with `plaintext` instead. The
7
- * export chant reads is checked in, so an export taken with `--show-secrets`
8
- * puts every secret value of the stack into the repository's history.
9
- *
10
- * An error: the leak is in the repository whether or not chant reads it, and
11
- * re-exporting without `--show-secrets` (and rotating what leaked) is the
12
- * fix. chant never copies inputs or outputs into the graph, so the graph
13
- * itself carries none of them.
14
- */
15
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
16
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
17
- import { entityOf, finding, listed, memberExport, plaintextSecretPaths } from "./member-read-helpers";
18
-
19
- export const pul003: PostSynthCheck = {
20
- id: "PUL003",
21
- description: "The pulumi member's stack export holds secret values in plaintext (exported with --show-secrets)",
22
-
23
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
24
- const exp = memberExport();
25
- if (!exp) return [];
26
- const out: PostSynthDiagnostic[] = [];
27
- for (const r of exp.resources) {
28
- const paths = plaintextSecretPaths(r);
29
- if (paths.length === 0) continue;
30
- out.push(
31
- finding(
32
- "PUL003",
33
- "error",
34
- `${PULUMI_EXPORT_FILE} holds ${paths.length} secret value(s) of ${r.urn} in plaintext (${listed(paths)}): ` +
35
- `it was exported with --show-secrets. Export again with \`pulumi stack export --file ${PULUMI_EXPORT_FILE}\` ` +
36
- `(no --show-secrets), and rotate the secrets the committed file exposed.`,
37
- entityOf(exp.read, r.urn),
38
- ),
39
- );
40
- }
41
- return out;
42
- },
43
- };
@@ -1,32 +0,0 @@
1
- /**
2
- * PUL004: the stack export holds resources pending deletion.
3
- *
4
- * A create-before-delete replacement creates the new resource, then deletes
5
- * the old one. When the delete fails, Pulumi keeps the old resource in the
6
- * state with `delete: true` under the same URN, and the next `pulumi up`
7
- * tries the delete again. Until then the stack owns two cloud objects for
8
- * one URN. The graph has one node per URN, so the old object has no node of
9
- * its own, and drift for that URN reads the live resource only.
10
- */
11
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
12
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
13
- import { entityOf, finding, flagged, memberExport } from "./member-read-helpers";
14
-
15
- export const pul004: PostSynthCheck = {
16
- id: "PUL004",
17
- description: "The pulumi member's stack export holds replaced resources whose delete failed (delete: true)",
18
-
19
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
20
- const exp = memberExport();
21
- if (!exp) return [];
22
- return flagged(exp.resources, "delete").map((r) =>
23
- finding(
24
- "PUL004",
25
- "warning",
26
- `${PULUMI_EXPORT_FILE} holds ${r.urn} marked delete: true, the old object of a replacement whose delete failed. ` +
27
- `The stack owns two objects for this URN and the graph shows one. Run \`pulumi up\` to retry the delete, then export again.`,
28
- entityOf(exp.read, r.urn),
29
- ),
30
- );
31
- },
32
- };
@@ -1,31 +0,0 @@
1
- /**
2
- * PUL005: the stack export holds resources pending replacement.
3
- *
4
- * A delete-before-create replacement deletes the old resource first and
5
- * marks it `pendingReplacement: true` until the new one is created. An
6
- * export that still carries the mark was taken after an update stopped
7
- * between the two steps, so the cloud object behind the node may be gone.
8
- * Its drift reads as missing until the next `pulumi up` creates it.
9
- */
10
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
11
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
12
- import { entityOf, finding, flagged, memberExport } from "./member-read-helpers";
13
-
14
- export const pul005: PostSynthCheck = {
15
- id: "PUL005",
16
- description: "The pulumi member's stack export holds resources deleted ahead of a replacement that never finished (pendingReplacement: true)",
17
-
18
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
19
- const exp = memberExport();
20
- if (!exp) return [];
21
- return flagged(exp.resources, "pendingReplacement").map((r) =>
22
- finding(
23
- "PUL005",
24
- "warning",
25
- `${PULUMI_EXPORT_FILE} holds ${r.urn} marked pendingReplacement: true: it was deleted for a replacement that was never created, ` +
26
- `so its node may stand for nothing in the cloud. Run \`pulumi up\` to finish the replacement, then export again.`,
27
- entityOf(exp.read, r.urn),
28
- ),
29
- );
30
- },
31
- };
@@ -1,31 +0,0 @@
1
- /**
2
- * PUL006: the stack export holds tainted resources.
3
- *
4
- * `pulumi state taint` marks a resource `taint: true`, and the next
5
- * `pulumi up` replaces it whatever its inputs say. The member's preview
6
- * already shows the replacement, so this is information: the change set's
7
- * `replace` entry for the URN comes from the taint, not from a program
8
- * change, which a reviewer reading the diff alone cannot see.
9
- */
10
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
11
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
12
- import { entityOf, finding, flagged, memberExport } from "./member-read-helpers";
13
-
14
- export const pul006: PostSynthCheck = {
15
- id: "PUL006",
16
- description: "The pulumi member's stack export holds tainted resources the next update replaces (taint: true)",
17
-
18
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
19
- const exp = memberExport();
20
- if (!exp) return [];
21
- return flagged(exp.resources, "taint").map((r) =>
22
- finding(
23
- "PUL006",
24
- "info",
25
- `${PULUMI_EXPORT_FILE} holds ${r.urn} marked taint: true, so the next \`pulumi up\` replaces it ` +
26
- `and the member's preview shows a replace that no program change explains. \`pulumi state untaint\` clears the mark.`,
27
- entityOf(exp.read, r.urn),
28
- ),
29
- );
30
- },
31
- };
@@ -1,35 +0,0 @@
1
- /**
2
- * PUL007: the configured stack is not the stack the export was taken from.
3
- *
4
- * `pulumi.member.stack` is the stack the drift read passes as `--stack`
5
- * (#4496). The graph comes from the checked-in export, whose URNs name the
6
- * stack it was taken from. When the two differ, the nodes are one stack's
7
- * resources and the drift records are another's: a URN only one of them
8
- * holds reads as not-observed, and every other record lands on a node it
9
- * does not describe.
10
- */
11
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
12
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
13
- import { finding, memberExport, urnScopes } from "./member-read-helpers";
14
-
15
- export const pul007: PostSynthCheck = {
16
- id: "PUL007",
17
- description: "pulumi.member.stack names a stack other than the one the checked-in stack export was taken from",
18
-
19
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
20
- const exp = memberExport();
21
- const configured = exp?.read.stack;
22
- if (!exp || !configured) return [];
23
- const { stacks } = urnScopes(exp.resources);
24
- if (stacks.length !== 1 || stacks[0] === configured) return [];
25
- return [
26
- finding(
27
- "PUL007",
28
- "warning",
29
- `pulumi.member.stack is "${configured}", but ${PULUMI_EXPORT_FILE} was taken from stack "${stacks[0]}": ` +
30
- `the graph shows one stack and drift reads the other. Export "${configured}" ` +
31
- `(\`pulumi stack export --stack ${configured} --file ${PULUMI_EXPORT_FILE}\`) or set the stack the export names.`,
32
- ),
33
- ];
34
- },
35
- };
@@ -1,35 +0,0 @@
1
- /**
2
- * PUL008: the export's URNs name more than one stack or project.
3
- *
4
- * Pulumi writes one stack's resources to an export, all under one
5
- * `urn:pulumi:<stack>::<project>::` prefix. A node key drops that prefix
6
- * (`@intentius/chant/pulumi-urn`), so two stacks' copies of a resource fall
7
- * on one node, and the drift read cannot tell which stack to pass as
8
- * `--stack`. An export like this was merged or edited by hand.
9
- */
10
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
11
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
12
- import { finding, memberExport, urnScopes } from "./member-read-helpers";
13
-
14
- export const pul008: PostSynthCheck = {
15
- id: "PUL008",
16
- description: "The pulumi member's stack export names more than one stack or project in its URNs",
17
-
18
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
19
- const exp = memberExport();
20
- if (!exp) return [];
21
- const { stacks, projects } = urnScopes(exp.resources);
22
- const parts: string[] = [];
23
- if (stacks.length > 1) parts.push(`stacks ${stacks.join(", ")}`);
24
- if (projects.length > 1) parts.push(`projects ${projects.join(", ")}`);
25
- if (parts.length === 0) return [];
26
- return [
27
- finding(
28
- "PUL008",
29
- "warning",
30
- `${PULUMI_EXPORT_FILE} names ${parts.join(" and ")} in its URNs. Node ids drop the stack and project, ` +
31
- `so resources of different stacks share nodes. Replace the file with one \`pulumi stack export\`.`,
32
- ),
33
- ];
34
- },
35
- };
@@ -1,32 +0,0 @@
1
- /**
2
- * PUL009: the export was taken from another project.
3
- *
4
- * Every URN in an export names the project it belongs to, and `Pulumi.yaml`'s
5
- * `name` is the member's project. When they differ, the checked-in export is
6
- * some other program's (copied in, or left from before a rename), and the
7
- * graph shows resources this member's preview and refresh never touch.
8
- */
9
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
10
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
11
- import { finding, memberExport, pulumiYamlName, urnScopes } from "./member-read-helpers";
12
-
13
- export const pul009: PostSynthCheck = {
14
- id: "PUL009",
15
- description: "The pulumi member's stack export belongs to a project other than the one Pulumi.yaml names",
16
-
17
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
18
- const exp = memberExport();
19
- if (!exp) return [];
20
- const name = pulumiYamlName(exp.read.dir);
21
- const { projects } = urnScopes(exp.resources);
22
- if (!name || projects.length !== 1 || projects[0] === name) return [];
23
- return [
24
- finding(
25
- "PUL009",
26
- "warning",
27
- `${PULUMI_EXPORT_FILE} was taken from project "${projects[0]}", but Pulumi.yaml names "${name}": ` +
28
- `the graph shows another program's resources. Export this member's own stack again.`,
29
- ),
30
- ];
31
- },
32
- };
@@ -1,42 +0,0 @@
1
- /**
2
- * PUL010: a resource's parent or dependency is not in the export.
3
- *
4
- * Edges come from each resource's `parent` and `dependencies`
5
- * (`../../workspace-member.ts`), and an edge to a URN the export does not
6
- * hold is dropped without a word. Pulumi's own integrity check refuses a
7
- * deployment whose resources name a parent or dependency it does not hold,
8
- * so an export like this was edited by hand or cut short, and the graph is
9
- * missing the edges it names.
10
- */
11
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
12
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
13
- import { entityOf, finding, listed, memberExport } from "./member-read-helpers";
14
-
15
- export const pul010: PostSynthCheck = {
16
- id: "PUL010",
17
- description: "A resource in the pulumi member's stack export names a parent or dependency the export does not hold",
18
-
19
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
20
- const exp = memberExport();
21
- if (!exp) return [];
22
- const held = new Set(exp.resources.map((r) => r.urn));
23
- const out: PostSynthDiagnostic[] = [];
24
- for (const r of exp.resources) {
25
- const named = [r.parent, ...(Array.isArray(r.dependencies) ? r.dependencies : [])].filter(
26
- (u): u is string => typeof u === "string" && u.length > 0,
27
- );
28
- const dangling = [...new Set(named.filter((u) => !held.has(u)))];
29
- if (dangling.length === 0) continue;
30
- out.push(
31
- finding(
32
- "PUL010",
33
- "warning",
34
- `${r.urn} names ${dangling.length} parent or dependency URN(s) ${PULUMI_EXPORT_FILE} does not hold (${listed(dangling)}), ` +
35
- `so the graph has no edge for them. Replace the file with a fresh \`pulumi stack export\`.`,
36
- entityOf(exp.read, r.urn),
37
- ),
38
- );
39
- }
40
- return out;
41
- },
42
- };
@@ -1,38 +0,0 @@
1
- /**
2
- * PUL011: two live resources in the export share a URN.
3
- *
4
- * A URN names one resource. The only state that holds two entries for one
5
- * URN is a replacement in flight, where the old entry is marked
6
- * `delete: true` (PUL004 reports those). Two entries with neither mark come
7
- * from a hand-merged export, which `pulumi stack import` refuses. The graph
8
- * keeps the last one, so the other has no node.
9
- */
10
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
11
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
12
- import { entityOf, finding, memberExport } from "./member-read-helpers";
13
-
14
- export const pul011: PostSynthCheck = {
15
- id: "PUL011",
16
- description: "Two resources in the pulumi member's stack export share a URN and neither is pending deletion",
17
-
18
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
19
- const exp = memberExport();
20
- if (!exp) return [];
21
- const count = new Map<string, number>();
22
- for (const r of exp.resources) {
23
- if (r.delete === true) continue;
24
- count.set(r.urn, (count.get(r.urn) ?? 0) + 1);
25
- }
26
- return [...count]
27
- .filter(([, n]) => n > 1)
28
- .map(([urn, n]) =>
29
- finding(
30
- "PUL011",
31
- "warning",
32
- `${PULUMI_EXPORT_FILE} holds ${n} live entries for ${urn}; the graph keeps one. ` +
33
- `Replace the file with a fresh \`pulumi stack export\`.`,
34
- entityOf(exp.read, urn),
35
- ),
36
- );
37
- },
38
- };
@@ -1,35 +0,0 @@
1
- /**
2
- * PUL012: the export holds resources the stack reads but does not manage.
3
- *
4
- * A resource a program reads with a `get` function (`aws.s3.Bucket.get`) is
5
- * in the state with `external: true`. It is a node like any other, but the
6
- * stack never creates, updates or deletes it, so a drift record on it shows
7
- * a change some other owner made, and the member's preview never plans a fix
8
- * for it. Information, so a reader of the graph knows which nodes this
9
- * member only looks at.
10
- */
11
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
12
- import { isPulumiNodeless } from "@intentius/chant/pulumi-urn";
13
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
14
- import { finding, flagged, listed, memberExport } from "./member-read-helpers";
15
-
16
- export const pul012: PostSynthCheck = {
17
- id: "PUL012",
18
- description: "The pulumi member's stack export holds resources the stack reads and does not manage (external: true)",
19
-
20
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
21
- const exp = memberExport();
22
- if (!exp) return [];
23
- const external = flagged(exp.resources, "external").filter((r) => !isPulumiNodeless(r.type));
24
- if (external.length === 0) return [];
25
- return [
26
- finding(
27
- "PUL012",
28
- "info",
29
- `${PULUMI_EXPORT_FILE} holds ${external.length} resource(s) the program reads with a get function and does not manage ` +
30
- `(${listed(external.map((r) => r.urn))}). They are nodes, but this member's preview never changes them, ` +
31
- `so drift on them is another owner's.`,
32
- ),
33
- ];
34
- },
35
- };
@@ -1,35 +0,0 @@
1
- /**
2
- * PUL013: the export's deployment version is not the one chant reads.
3
- *
4
- * `pulumi stack export` writes `{ "version": 3, "deployment": ... }`, and
5
- * every reader in this lexicon (the graph, the change set's prior state, the
6
- * drift read's URN list) is written and recorded against version 3
7
- * (`../../testdata/`). An export with another version, or none, may lay its
8
- * resources out differently, and what chant reads from it is not checked.
9
- */
10
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
11
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
12
- import { finding, memberExport } from "./member-read-helpers";
13
-
14
- /** The deployment schema version the readers are written against. */
15
- export const PULUMI_EXPORT_VERSION = 3;
16
-
17
- export const pul013: PostSynthCheck = {
18
- id: "PUL013",
19
- description: "The pulumi member's stack export has a deployment version other than 3, the one chant reads",
20
-
21
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
22
- const exp = memberExport();
23
- if (!exp) return [];
24
- const version = exp.doc.version;
25
- if (version === PULUMI_EXPORT_VERSION) return [];
26
- return [
27
- finding(
28
- "PUL013",
29
- "warning",
30
- `${PULUMI_EXPORT_FILE} has ${version === undefined ? "no version" : `version ${JSON.stringify(version)}`}; ` +
31
- `chant reads version ${PULUMI_EXPORT_VERSION}, what \`pulumi stack export\` writes, so the graph read from it is unchecked.`,
32
- ),
33
- ];
34
- },
35
- };
@@ -1,32 +0,0 @@
1
- /**
2
- * PUL014: the export holds no resources.
3
- *
4
- * PUL001 covers a member with no export. An export that reads but holds
5
- * nothing besides the root stack and its providers gives the same empty
6
- * member, quietly: the stack was never deployed, was destroyed, or the file
7
- * was exported from a fresh stack. Information, since an empty stack can be
8
- * what the owner meant.
9
- */
10
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
11
- import { isPulumiNodeless } from "@intentius/chant/pulumi-urn";
12
- import { PULUMI_EXPORT_FILE } from "../../workspace-member";
13
- import { finding, memberExport } from "./member-read-helpers";
14
-
15
- export const pul014: PostSynthCheck = {
16
- id: "PUL014",
17
- description: "The pulumi member's stack export reads but holds no resources besides the stack and its providers",
18
-
19
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
20
- const exp = memberExport();
21
- if (!exp) return [];
22
- if (exp.resources.some((r) => !isPulumiNodeless(r.type))) return [];
23
- return [
24
- finding(
25
- "PUL014",
26
- "info",
27
- `${PULUMI_EXPORT_FILE} holds no resources besides the stack and its providers, so the member has no nodes. ` +
28
- `If the stack has been deployed since, export it again after \`pulumi up\`.`,
29
- ),
30
- ];
31
- },
32
- };
@@ -1,39 +0,0 @@
1
- /**
2
- * PUL015: the config says stock pulumi for a member on a plunge backend.
3
- *
4
- * `pulumi.member.engine` decides which binary runs the member's preview,
5
- * outputs and drift; with none set, `plywood.yml`'s engine, a `plunge`
6
- * `PULUMI_BACKEND_URL`, or a `backend.url` in `Pulumi.yaml` that
7
- * starts with `plunge` means plunge (`../../run.ts`, `pulumiMemberEngine`).
8
- * The config wins, so `engine: "pulumi"` on a program whose backend is
9
- * `plunge+file://...` or `plunge://...` runs stock `pulumi` against a
10
- * backend scheme only plunge opens, and every read fails.
11
- *
12
- * One direction only, by maintainer ruling (#4559): `engine: "plunge"` with a
13
- * stock backend is not reported, because plunge opens stock backends and the
14
- * config may mean it.
15
- */
16
- import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
17
- import { pulumiMemberEngine } from "../../run";
18
- import { lastMemberRead } from "../../workspace-member";
19
- import { finding } from "./member-read-helpers";
20
-
21
- export const pul015: PostSynthCheck = {
22
- id: "PUL015",
23
- description: "pulumi.member.engine says pulumi, but the resolved engine is plunge",
24
-
25
- check(_ctx: PostSynthContext): PostSynthDiagnostic[] {
26
- const read = lastMemberRead();
27
- if (read?.engine !== "pulumi") return [];
28
- const implied = pulumiMemberEngine(read.dir);
29
- if (implied.engine !== "plunge") return [];
30
- return [
31
- finding(
32
- "PUL015",
33
- "warning",
34
- `pulumi.member.engine is "pulumi", but ${implied.because}. chant runs the configured engine, so the member's ` +
35
- `preview, outputs and drift run stock pulumi against a backend only plunge opens. Drop \`engine\` or set it to "plunge".`,
36
- ),
37
- ];
38
- },
39
- };
@@ -1,7 +0,0 @@
1
- import type { LintRule } from "@intentius/chant/lint/rule";
2
- import { memberDirAbsoluteRule } from "./member-dir-absolute";
3
-
4
- export { memberDirAbsoluteRule } from "./member-dir-absolute";
5
-
6
- /** All lint rules provided by this lexicon (imported by plugin.ts's lintRules()). */
7
- export const rules: LintRule[] = [memberDirAbsoluteRule];
@@ -1,37 +0,0 @@
1
- import { describe, expect, test } from "vitest";
2
- import * as ts from "typescript";
3
- import type { LintContext } from "@intentius/chant/lint/rule";
4
- import { isAbsolutePath, memberDirAbsoluteRule } from "./member-dir-absolute";
5
-
6
- function createContext(code: string, fileName = "chant.config.ts"): LintContext {
7
- const sourceFile = ts.createSourceFile(fileName, code, ts.ScriptTarget.Latest, true);
8
- return { sourceFile, entities: [], filePath: fileName };
9
- }
10
-
11
- describe("PUL101: pulumi.member.dir is absolute", () => {
12
- test("flags an absolute dir in the config namespace", () => {
13
- const diags = memberDirAbsoluteRule.check(
14
- createContext(`export default { lexicons: ["pulumi"], pulumi: { member: { dir: "/home/me/infra", label: "infra" } } };`),
15
- );
16
- expect(diags).toHaveLength(1);
17
- expect(diags[0].ruleId).toBe("PUL101");
18
- expect(diags[0].severity).toBe("warning");
19
- expect(diags[0].message).toContain("/home/me/infra");
20
- expect(diags[0].line).toBe(1);
21
- });
22
-
23
- test("passes a relative dir", () => {
24
- expect(memberDirAbsoluteRule.check(createContext(`export default { pulumi: { member: { dir: "./infra" } } };`))).toEqual([]);
25
- expect(memberDirAbsoluteRule.check(createContext(`export default { pulumi: { member: { dir: "infra" } } };`))).toEqual([]);
26
- });
27
-
28
- test("stays silent on a computed dir and on a dir outside pulumi.member", () => {
29
- expect(memberDirAbsoluteRule.check(createContext(`export default { pulumi: { member: { dir: join(root, "infra") } } };`))).toEqual([]);
30
- expect(memberDirAbsoluteRule.check(createContext(`export default { terraform: { roots: { app: { dir: "/abs" } } } };`))).toEqual([]);
31
- });
32
-
33
- test("reads POSIX, home-relative and Windows absolute forms", () => {
34
- for (const p of ["/x", "~/x", "C:\\x", "C:/x", "\\\\server\\share"]) expect(isAbsolutePath(p)).toBe(true);
35
- for (const p of ["x", "./x", "../x"]) expect(isAbsolutePath(p)).toBe(false);
36
- });
37
- });
@@ -1,83 +0,0 @@
1
- import { ts } from "@intentius/chant/lint/typescript";
2
- import type { LintContext, LintDiagnostic, LintRule } from "@intentius/chant/lint/rule";
3
-
4
- /**
5
- * PUL101: `pulumi.member.dir` is an absolute path written in source.
6
- *
7
- * `chant workspace graph` writes `pulumi.member` into the reader project it
8
- * makes for a member of kind `pulumi`, with `dir` absolute, because that
9
- * project lives in a scratch directory and is thrown away. A project that
10
- * writes the namespace itself (to read a member's graph into its own build,
11
- * as `examples/workspace-member` does) commits the path, and an absolute one
12
- * names a directory on the author's machine: on a CI runner or a second
13
- * checkout the member is not found, and the build reads no graph (PUL001).
14
- * A relative `dir` resolves against the project root, the directory that
15
- * holds `chant.config.ts`, so it travels with the repository.
16
- *
17
- * Matches the literal shape only: a `pulumi: { member: { dir: "<literal>" } }`
18
- * object, at any depth. A computed `dir` (`join(...)`, a template with
19
- * substitutions, an identifier) is out of reach and stays silent.
20
- */
21
- export const memberDirAbsoluteRule: LintRule = {
22
- id: "PUL101",
23
- severity: "warning",
24
- category: "correctness",
25
- description: "pulumi.member.dir is an absolute path; a relative dir resolves against the project root and travels with the repository",
26
-
27
- check(context: LintContext): LintDiagnostic[] {
28
- const diagnostics: LintDiagnostic[] = [];
29
- const source = context.sourceFile;
30
-
31
- const propName = (prop: ts.ObjectLiteralElementLike): string | undefined => {
32
- if (!ts.isPropertyAssignment(prop)) return undefined;
33
- if (ts.isIdentifier(prop.name) || ts.isStringLiteral(prop.name)) return prop.name.text;
34
- return undefined;
35
- };
36
-
37
- const objectProp = (obj: ts.ObjectLiteralExpression, name: string): ts.ObjectLiteralExpression | undefined => {
38
- for (const prop of obj.properties) {
39
- if (propName(prop) !== name) continue;
40
- const value = (prop as ts.PropertyAssignment).initializer;
41
- if (ts.isObjectLiteralExpression(value)) return value;
42
- }
43
- return undefined;
44
- };
45
-
46
- const checkMember = (member: ts.ObjectLiteralExpression) => {
47
- for (const prop of member.properties) {
48
- if (propName(prop) !== "dir") continue;
49
- const value = (prop as ts.PropertyAssignment).initializer;
50
- if (!ts.isStringLiteral(value) && !ts.isNoSubstitutionTemplateLiteral(value)) continue;
51
- if (!isAbsolutePath(value.text)) continue;
52
- const { line, character } = source.getLineAndCharacterOfPosition(value.getStart(source));
53
- diagnostics.push({
54
- ruleId: "PUL101",
55
- severity: "warning",
56
- message:
57
- `pulumi.member.dir "${value.text}" is an absolute path, which names a directory on this machine only. ` +
58
- "Write it relative to the project root (the directory holding chant.config.ts), such as \"./infra\".",
59
- file: context.filePath,
60
- line: line + 1,
61
- column: character + 1,
62
- });
63
- }
64
- };
65
-
66
- const visit = (node: ts.Node) => {
67
- if (ts.isObjectLiteralExpression(node)) {
68
- const pulumi = objectProp(node, "pulumi");
69
- const member = pulumi ? objectProp(pulumi, "member") : undefined;
70
- if (member) checkMember(member);
71
- }
72
- ts.forEachChild(node, visit);
73
- };
74
-
75
- visit(source);
76
- return diagnostics;
77
- },
78
- };
79
-
80
- /** POSIX `/x`, `~/x`, and Windows `C:\x` / `C:/x` or `\\server\share`. */
81
- export function isAbsolutePath(p: string): boolean {
82
- return p.startsWith("/") || p.startsWith("~/") || /^[A-Za-z]:[\\/]/.test(p) || p.startsWith("\\\\");
83
- }