@ykdz/template 0.1.0-experimental.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (817) hide show
  1. package/dist/application.d.ts +18 -48
  2. package/dist/application.js +164 -111
  3. package/dist/input-schemas.d.ts +0 -14
  4. package/dist/input-schemas.js +0 -11
  5. package/dist/input-validation.js +3 -30
  6. package/dist/main.js +79 -180
  7. package/dist/preset-catalog.d.ts +410 -29
  8. package/dist/preset-catalog.js +4 -30
  9. package/dist/result-schemas.d.ts +64 -65
  10. package/dist/result-schemas.js +8 -8
  11. package/node_modules/@ykdz/default-content-authoring/dist/contracts.d.ts +240 -0
  12. package/node_modules/@ykdz/default-content-authoring/dist/environment-needs.d.ts +16 -0
  13. package/node_modules/@ykdz/default-content-authoring/dist/preset-root-contribution.d.ts +36 -0
  14. package/node_modules/@ykdz/default-content-authoring/dist/preset-root-contribution.js +1 -0
  15. package/node_modules/@ykdz/default-content-authoring/dist/reference-package.d.ts +65 -0
  16. package/node_modules/@ykdz/default-content-authoring/dist/reference-package.js +742 -0
  17. package/node_modules/@ykdz/default-content-authoring/package.json +59 -0
  18. package/node_modules/@ykdz/preset-rust-bin/native/package.json +2 -0
  19. package/node_modules/@ykdz/preset-rust-bin/native/template-dist/definition.d.ts +2 -40
  20. package/node_modules/@ykdz/preset-rust-bin/native/template-dist/definition.d.ts.map +1 -1
  21. package/node_modules/@ykdz/preset-rust-bin/native/template-dist/definition.js +3 -2
  22. package/node_modules/@ykdz/preset-ts-cli/native/package.json +4 -0
  23. package/node_modules/@ykdz/preset-ts-cli/native/template-dist/definition.d.ts +2 -15
  24. package/node_modules/@ykdz/preset-ts-cli/native/template-dist/definition.d.ts.map +1 -1
  25. package/node_modules/@ykdz/preset-ts-lib/native/package.json +3 -0
  26. package/node_modules/@ykdz/preset-ts-lib/native/template-dist/definition.d.ts +2 -15
  27. package/node_modules/@ykdz/preset-ts-lib/native/template-dist/definition.d.ts.map +1 -1
  28. package/node_modules/@ykdz/preset-vike-app/native/package.json +3 -0
  29. package/node_modules/@ykdz/preset-vike-app/native/template-dist/definition.d.ts +40 -23
  30. package/node_modules/@ykdz/preset-vike-app/native/template-dist/definition.d.ts.map +1 -1
  31. package/node_modules/@ykdz/preset-vike-app/native/template-dist/definition.js +19 -36
  32. package/node_modules/@ykdz/preset-vike-app/native/template-dist/deployment.d.ts +54 -17
  33. package/node_modules/@ykdz/preset-vike-app/native/template-dist/deployment.d.ts.map +1 -1
  34. package/node_modules/@ykdz/preset-vike-app/native/template-dist/deployment.js +393 -207
  35. package/node_modules/@ykdz/preset-vike-app/package.json +2 -1
  36. package/node_modules/@ykdz/preset-vue-app/native/package.json +2 -0
  37. package/node_modules/@ykdz/preset-vue-app/native/template-dist/definition.d.ts +2 -15
  38. package/node_modules/@ykdz/preset-vue-app/native/template-dist/definition.d.ts.map +1 -1
  39. package/node_modules/@ykdz/preset-vue-hono-app/native/package.json +4 -0
  40. package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/definition.d.ts +49 -23
  41. package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/definition.d.ts.map +1 -1
  42. package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/definition.js +31 -102
  43. package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/joint-e2e.d.ts +42 -0
  44. package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/joint-e2e.d.ts.map +1 -0
  45. package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/joint-e2e.js +173 -0
  46. package/node_modules/@ykdz/reference-hono-api/native/package.json +3 -1
  47. package/node_modules/@ykdz/reference-hono-api/native/template-dist/definition.d.ts +1 -1
  48. package/node_modules/@ykdz/reference-hono-api/native/template-dist/definition.js +51 -18
  49. package/node_modules/@ykdz/reference-hono-api/native/tsconfig.json +1 -1
  50. package/node_modules/@ykdz/reference-hono-api/native/turbo.json +2 -2
  51. package/node_modules/@ykdz/reference-hono-api/package.json +3 -2
  52. package/node_modules/@ykdz/reference-npm-publication/native/README.md +14 -6
  53. package/node_modules/@ykdz/reference-npm-publication/native/package.json +2 -2
  54. package/node_modules/@ykdz/reference-npm-publication/native/resources/release.yml +4 -1
  55. package/node_modules/@ykdz/reference-npm-publication/native/template-dist/definition.d.ts +8 -4
  56. package/node_modules/@ykdz/reference-npm-publication/native/template-dist/definition.d.ts.map +1 -1
  57. package/node_modules/@ykdz/reference-npm-publication/native/template-dist/definition.js +68 -21
  58. package/node_modules/@ykdz/reference-npm-publication/package.json +1 -2
  59. package/node_modules/@ykdz/reference-rust-bin/native/package.json +13 -3
  60. package/node_modules/@ykdz/reference-rust-bin/native/resources/gitignore +5 -0
  61. package/node_modules/@ykdz/reference-rust-bin/native/resources/npmignore +1 -0
  62. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/definition.d.ts +86 -12
  63. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/definition.d.ts.map +1 -1
  64. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/definition.js +227 -106
  65. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/environment.d.ts +6 -0
  66. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/environment.d.ts.map +1 -0
  67. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/environment.js +44 -0
  68. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/rust-package-projection.d.ts +19 -0
  69. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/rust-package-projection.d.ts.map +1 -0
  70. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/rust-package-projection.js +65 -0
  71. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/rust-toolchain-projection.d.ts +15 -0
  72. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/rust-toolchain-projection.d.ts.map +1 -0
  73. package/node_modules/@ykdz/reference-rust-bin/native/template-dist/rust-toolchain-projection.js +44 -0
  74. package/node_modules/@ykdz/reference-rust-bin/native/turbo.json +3 -1
  75. package/node_modules/@ykdz/reference-rust-bin/package.json +6 -1
  76. package/node_modules/@ykdz/reference-tooling-config/native/package.json +4 -5
  77. package/node_modules/@ykdz/reference-tooling-config/native/template/workspace/oxfmt.config.ts +1 -0
  78. package/node_modules/@ykdz/{template-workspace/resources → reference-tooling-config/native/template/workspace}/oxlint.config.ts +1 -1
  79. package/node_modules/@ykdz/reference-tooling-config/native/template-dist/definition.d.ts +1 -27
  80. package/node_modules/@ykdz/reference-tooling-config/native/template-dist/definition.js +53 -11
  81. package/node_modules/@ykdz/reference-tooling-config/native/tsconfig.json +1 -1
  82. package/node_modules/@ykdz/reference-tooling-config/native/turbo.json +5 -4
  83. package/node_modules/@ykdz/reference-tooling-config/package.json +5 -1
  84. package/node_modules/@ykdz/reference-ts-cli/native/package.json +7 -6
  85. package/node_modules/@ykdz/reference-ts-cli/native/resources/gitignore +5 -0
  86. package/node_modules/@ykdz/reference-ts-cli/native/resources/npmignore +1 -0
  87. package/node_modules/@ykdz/reference-ts-cli/native/src/cli-command-identity.ts +18 -0
  88. package/node_modules/@ykdz/reference-ts-cli/native/src/cli.ts +1 -1
  89. package/node_modules/@ykdz/reference-ts-cli/native/src/main.ts +1 -1
  90. package/node_modules/@ykdz/reference-ts-cli/native/template-dist/definition.d.ts +8 -6
  91. package/node_modules/@ykdz/reference-ts-cli/native/template-dist/definition.d.ts.map +1 -1
  92. package/node_modules/@ykdz/reference-ts-cli/native/template-dist/definition.js +119 -59
  93. package/node_modules/@ykdz/reference-ts-cli/native/template-dist/package-manifest.d.ts +7 -0
  94. package/node_modules/@ykdz/reference-ts-cli/native/template-dist/package-manifest.d.ts.map +1 -0
  95. package/node_modules/@ykdz/reference-ts-cli/native/template-dist/package-manifest.js +28 -0
  96. package/node_modules/@ykdz/reference-ts-cli/native/test/e2e/journeys/lookup.journey.ts +1 -1
  97. package/node_modules/@ykdz/reference-ts-cli/native/test/integration/command.test.ts +1 -1
  98. package/node_modules/@ykdz/reference-ts-cli/native/test/unit/cli-command-identity.test.ts +7 -55
  99. package/node_modules/@ykdz/reference-ts-cli/native/tsconfig.build.json +1 -1
  100. package/node_modules/@ykdz/reference-ts-cli/native/tsconfig.node.json +8 -2
  101. package/node_modules/@ykdz/reference-ts-cli/native/turbo.json +11 -3
  102. package/node_modules/@ykdz/reference-ts-cli/package.json +3 -2
  103. package/node_modules/@ykdz/reference-ts-lib/native/package.json +6 -1
  104. package/node_modules/@ykdz/reference-ts-lib/native/resources/gitignore +3 -0
  105. package/node_modules/@ykdz/reference-ts-lib/native/resources/npmignore +1 -0
  106. package/node_modules/@ykdz/reference-ts-lib/native/template-dist/definition.d.ts +1 -1
  107. package/node_modules/@ykdz/reference-ts-lib/native/template-dist/definition.js +70 -26
  108. package/node_modules/@ykdz/reference-ts-lib/native/tsconfig.node.json +1 -1
  109. package/node_modules/@ykdz/reference-ts-lib/native/turbo.json +3 -1
  110. package/node_modules/@ykdz/reference-ts-lib/package.json +3 -2
  111. package/node_modules/@ykdz/reference-vike-db/native/package.json +3 -1
  112. package/node_modules/@ykdz/reference-vike-db/native/template-dist/definition.d.ts +1 -1
  113. package/node_modules/@ykdz/reference-vike-db/native/template-dist/definition.js +70 -23
  114. package/node_modules/@ykdz/reference-vike-db/native/tsconfig.node.json +1 -1
  115. package/node_modules/@ykdz/reference-vike-db/native/turbo.json +3 -3
  116. package/node_modules/@ykdz/reference-vike-db/package.json +4 -2
  117. package/node_modules/@ykdz/reference-vike-migrations/native/package.json +3 -1
  118. package/node_modules/@ykdz/reference-vike-migrations/native/template-dist/definition.d.ts +2 -1
  119. package/node_modules/@ykdz/reference-vike-migrations/native/template-dist/definition.js +78 -23
  120. package/node_modules/@ykdz/reference-vike-migrations/native/tsconfig.json +1 -1
  121. package/node_modules/@ykdz/reference-vike-migrations/native/turbo.json +3 -3
  122. package/node_modules/@ykdz/reference-vike-migrations/package.json +4 -2
  123. package/node_modules/@ykdz/reference-vike-web/native/package.json +3 -1
  124. package/node_modules/@ykdz/reference-vike-web/native/template-dist/definition.d.ts +2 -1
  125. package/node_modules/@ykdz/reference-vike-web/native/template-dist/definition.js +137 -38
  126. package/node_modules/@ykdz/reference-vike-web/native/tsconfig.app.json +1 -1
  127. package/node_modules/@ykdz/reference-vike-web/native/tsconfig.node.json +1 -1
  128. package/node_modules/@ykdz/reference-vike-web/native/turbo.json +8 -4
  129. package/node_modules/@ykdz/reference-vike-web/package.json +4 -3
  130. package/node_modules/@ykdz/reference-vue-app/native/package.json +3 -1
  131. package/node_modules/@ykdz/reference-vue-app/native/template-dist/definition.d.ts +1 -1
  132. package/node_modules/@ykdz/reference-vue-app/native/template-dist/definition.js +72 -32
  133. package/node_modules/@ykdz/reference-vue-app/native/tsconfig.app.json +1 -1
  134. package/node_modules/@ykdz/reference-vue-app/native/tsconfig.node.json +1 -1
  135. package/node_modules/@ykdz/reference-vue-app/native/turbo.json +2 -2
  136. package/node_modules/@ykdz/reference-vue-app/package.json +3 -3
  137. package/node_modules/@ykdz/reference-vue-hono-web/native/package.json +3 -1
  138. package/node_modules/@ykdz/reference-vue-hono-web/native/template-dist/definition.d.ts +3 -1
  139. package/node_modules/@ykdz/reference-vue-hono-web/native/template-dist/definition.js +78 -28
  140. package/node_modules/@ykdz/reference-vue-hono-web/native/tsconfig.app.json +1 -1
  141. package/node_modules/@ykdz/reference-vue-hono-web/native/tsconfig.node.json +1 -1
  142. package/node_modules/@ykdz/reference-vue-hono-web/native/turbo.json +2 -2
  143. package/node_modules/@ykdz/reference-vue-hono-web/package.json +4 -3
  144. package/node_modules/@ykdz/reference-workspace-root/native/package.json +59 -0
  145. package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/template/files}/turbo.json +0 -24
  146. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/definition.d.ts +10 -0
  147. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/definition.d.ts.map +1 -0
  148. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/definition.js +140 -0
  149. package/node_modules/@ykdz/{template-workspace/dist → reference-workspace-root/native/template-dist}/editor-customization.d.ts +2 -1
  150. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/editor-customization.d.ts.map +1 -0
  151. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/environment-sources.d.ts +6 -0
  152. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/environment-sources.d.ts.map +1 -0
  153. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/environment-sources.js +10 -0
  154. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/environment.d.ts +36 -0
  155. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/environment.d.ts.map +1 -0
  156. package/node_modules/@ykdz/{template-workspace/dist/development-environment.js → reference-workspace-root/native/template-dist/environment.js} +20 -51
  157. package/node_modules/@ykdz/{template-workspace/dist → reference-workspace-root/native/template-dist}/project-github.d.ts +15 -8
  158. package/node_modules/@ykdz/reference-workspace-root/native/template-dist/project-github.d.ts.map +1 -0
  159. package/node_modules/@ykdz/{template-workspace/dist → reference-workspace-root/native/template-dist}/project-github.js +15 -19
  160. package/node_modules/@ykdz/reference-workspace-root/native/tsconfig.config.json +10 -0
  161. package/node_modules/@ykdz/reference-workspace-root/native/tsconfig.json +7 -0
  162. package/node_modules/@ykdz/reference-workspace-root/native/tsconfig.scripts.json +8 -0
  163. package/node_modules/@ykdz/reference-workspace-root/package.json +33 -0
  164. package/node_modules/@ykdz/template-content/dist/index.d.ts +10 -10
  165. package/node_modules/@ykdz/template-content/dist/index.js +3 -3
  166. package/node_modules/@ykdz/template-content/package.json +2 -1
  167. package/node_modules/@ykdz/template-content-provider-51cfac9642dc43a4/dist/index.d.ts +3 -45
  168. package/node_modules/@ykdz/template-content-provider-51cfac9642dc43a4/dist/index.js +18 -23
  169. package/node_modules/@ykdz/template-content-provider-51cfac9642dc43a4/package.json +2 -2
  170. package/node_modules/@ykdz/template-core/dist/composition.d.ts +49 -0
  171. package/node_modules/@ykdz/template-core/dist/composition.js +1 -0
  172. package/node_modules/@ykdz/template-core/dist/content-identity.d.ts +10 -0
  173. package/node_modules/@ykdz/template-core/dist/content-identity.js +21 -2
  174. package/node_modules/@ykdz/template-core/dist/generation-record.d.ts +46 -15
  175. package/node_modules/@ykdz/template-core/dist/generation-record.js +98 -29
  176. package/node_modules/@ykdz/template-core/dist/json.d.ts +8 -0
  177. package/node_modules/@ykdz/template-core/dist/json.js +62 -0
  178. package/node_modules/@ykdz/template-core/dist/package-contribution.d.ts +29 -12
  179. package/node_modules/@ykdz/template-core/dist/package-contribution.js +164 -33
  180. package/node_modules/@ykdz/template-core/dist/preset-definition.d.ts +6 -33
  181. package/node_modules/@ykdz/template-core/dist/preset-definition.js +23 -6
  182. package/node_modules/@ykdz/template-core/dist/project-blueprint.d.ts +37 -27
  183. package/node_modules/@ykdz/template-core/dist/project-blueprint.js +126 -125
  184. package/node_modules/@ykdz/template-core/dist/project-projection.d.ts +91 -33
  185. package/node_modules/@ykdz/template-core/dist/project-projection.js +639 -323
  186. package/node_modules/@ykdz/template-core/dist/reference-package.d.ts +101 -0
  187. package/node_modules/@ykdz/template-core/dist/reference-package.js +14 -0
  188. package/node_modules/@ykdz/template-core/dist/template-source.d.ts +10 -0
  189. package/node_modules/@ykdz/template-core/dist/template-source.js +31 -0
  190. package/node_modules/@ykdz/template-core/package.json +2 -3
  191. package/node_modules/@ykdz/template-environment/dist/development-container-tool-layer.d.ts +2 -3
  192. package/node_modules/@ykdz/template-environment/dist/development-container-tool-layer.js +2 -6
  193. package/node_modules/@ykdz/template-environment/package.json +1 -1
  194. package/node_modules/@ykdz/template-generator/dist/content-source.d.ts +25 -3
  195. package/node_modules/@ykdz/template-generator/dist/content-source.js +28 -27
  196. package/node_modules/@ykdz/template-generator/dist/index.d.ts +191 -60
  197. package/node_modules/@ykdz/template-generator/dist/index.js +1868 -1000
  198. package/node_modules/@ykdz/template-generator/dist/owner-local-reference.d.ts +8 -0
  199. package/node_modules/@ykdz/template-generator/dist/owner-local-reference.js +80 -0
  200. package/node_modules/@ykdz/template-workspace/dist/application-requirements.d.ts +13 -3
  201. package/node_modules/@ykdz/template-workspace/dist/application-requirements.js +34 -0
  202. package/node_modules/@ykdz/template-workspace/dist/ci-diagnostic-artifact.d.ts +1 -6
  203. package/node_modules/@ykdz/template-workspace/dist/default-composition.d.ts +109 -0
  204. package/node_modules/@ykdz/template-workspace/dist/default-composition.js +1353 -0
  205. package/node_modules/@ykdz/template-workspace/dist/default-generation.d.ts +618 -0
  206. package/node_modules/@ykdz/template-workspace/dist/default-generation.js +638 -0
  207. package/node_modules/@ykdz/template-workspace/dist/default-package-identity.js +23 -19
  208. package/node_modules/@ykdz/template-workspace/dist/project-requirements.d.ts +23 -9
  209. package/node_modules/@ykdz/template-workspace/dist/project-requirements.js +16 -1
  210. package/node_modules/@ykdz/template-workspace/dist/rust-toolchain-facts.d.ts +13 -7
  211. package/node_modules/@ykdz/template-workspace/dist/rust-toolchain-facts.js +35 -21
  212. package/node_modules/@ykdz/template-workspace/dist/shared-root-files.d.ts +7 -67
  213. package/node_modules/@ykdz/template-workspace/dist/shared-root-files.js +18 -50
  214. package/node_modules/@ykdz/template-workspace/dist/workspace-policy-snapshot.d.ts +0 -1
  215. package/node_modules/@ykdz/template-workspace/dist/workspace-policy-snapshot.js +0 -10
  216. package/node_modules/@ykdz/template-workspace/package.json +14 -55
  217. package/node_modules/@ykdz/template-workspace-authoring/dist/content-artifact.d.ts +38 -2
  218. package/node_modules/@ykdz/template-workspace-authoring/dist/content-artifact.js +95 -44
  219. package/node_modules/@ykdz/template-workspace-authoring/package.json +2 -1
  220. package/node_modules/@ykdz/tooling-config/base.json +15 -0
  221. package/node_modules/@ykdz/tooling-config/node.json +13 -0
  222. package/node_modules/@ykdz/tooling-config/oxfmt.config.ts +3 -0
  223. package/node_modules/@ykdz/tooling-config/oxlint.config.ts +8 -0
  224. package/node_modules/@ykdz/tooling-config/package.json +36 -0
  225. package/package.json +14 -6
  226. package/node_modules/@typescript/typescript-linux-x64/LICENSE +0 -55
  227. package/node_modules/@typescript/typescript-linux-x64/NOTICE.txt +0 -436
  228. package/node_modules/@typescript/typescript-linux-x64/README.md +0 -3
  229. package/node_modules/@typescript/typescript-linux-x64/lib/lib.d.ts +0 -20
  230. package/node_modules/@typescript/typescript-linux-x64/lib/lib.decorators.d.ts +0 -382
  231. package/node_modules/@typescript/typescript-linux-x64/lib/lib.decorators.legacy.d.ts +0 -20
  232. package/node_modules/@typescript/typescript-linux-x64/lib/lib.dom.asynciterable.d.ts +0 -18
  233. package/node_modules/@typescript/typescript-linux-x64/lib/lib.dom.d.ts +0 -45125
  234. package/node_modules/@typescript/typescript-linux-x64/lib/lib.dom.iterable.d.ts +0 -18
  235. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.collection.d.ts +0 -159
  236. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.core.d.ts +0 -595
  237. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.d.ts +0 -26
  238. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.generator.d.ts +0 -75
  239. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.iterable.d.ts +0 -603
  240. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.promise.d.ts +0 -79
  241. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.proxy.d.ts +0 -126
  242. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.reflect.d.ts +0 -142
  243. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.d.ts +0 -44
  244. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.wellknown.d.ts +0 -324
  245. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.array.include.d.ts +0 -114
  246. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.d.ts +0 -19
  247. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.full.d.ts +0 -21
  248. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.intl.d.ts +0 -29
  249. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.arraybuffer.d.ts +0 -19
  250. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.d.ts +0 -24
  251. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.date.d.ts +0 -29
  252. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.full.d.ts +0 -21
  253. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.intl.d.ts +0 -42
  254. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.object.d.ts +0 -47
  255. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.sharedmemory.d.ts +0 -133
  256. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.string.d.ts +0 -47
  257. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.typedarrays.d.ts +0 -51
  258. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.asyncgenerator.d.ts +0 -75
  259. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.asynciterable.d.ts +0 -51
  260. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.d.ts +0 -22
  261. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.full.d.ts +0 -22
  262. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.intl.d.ts +0 -81
  263. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.promise.d.ts +0 -28
  264. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.regexp.d.ts +0 -35
  265. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.array.d.ts +0 -77
  266. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.d.ts +0 -22
  267. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.full.d.ts +0 -22
  268. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.intl.d.ts +0 -21
  269. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.object.d.ts +0 -31
  270. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.string.d.ts +0 -35
  271. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.symbol.d.ts +0 -22
  272. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.bigint.d.ts +0 -763
  273. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.d.ts +0 -25
  274. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.date.d.ts +0 -40
  275. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.full.d.ts +0 -22
  276. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.intl.d.ts +0 -472
  277. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.number.d.ts +0 -26
  278. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.promise.d.ts +0 -45
  279. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.sharedmemory.d.ts +0 -97
  280. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.string.d.ts +0 -42
  281. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.symbol.wellknown.d.ts +0 -39
  282. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.d.ts +0 -21
  283. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.full.d.ts +0 -22
  284. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.intl.d.ts +0 -164
  285. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.promise.d.ts +0 -46
  286. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.string.d.ts +0 -31
  287. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.weakref.d.ts +0 -76
  288. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.array.d.ts +0 -119
  289. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.d.ts +0 -23
  290. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.error.d.ts +0 -73
  291. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.full.d.ts +0 -22
  292. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.intl.d.ts +0 -143
  293. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.object.d.ts +0 -24
  294. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.regexp.d.ts +0 -37
  295. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.string.d.ts +0 -23
  296. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.array.d.ts +0 -922
  297. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.collection.d.ts +0 -19
  298. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.d.ts +0 -20
  299. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.full.d.ts +0 -22
  300. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.intl.d.ts +0 -62
  301. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.arraybuffer.d.ts +0 -63
  302. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.collection.d.ts +0 -27
  303. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.d.ts +0 -24
  304. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.full.d.ts +0 -22
  305. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.object.d.ts +0 -27
  306. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.promise.d.ts +0 -33
  307. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.regexp.d.ts +0 -23
  308. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.sharedmemory.d.ts +0 -66
  309. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.string.d.ts +0 -27
  310. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.collection.d.ts +0 -94
  311. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.d.ts +0 -23
  312. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.float16.d.ts +0 -443
  313. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.full.d.ts +0 -22
  314. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.intl.d.ts +0 -200
  315. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.iterator.d.ts +0 -146
  316. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.promise.d.ts +0 -32
  317. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.regexp.d.ts +0 -30
  318. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es5.d.ts +0 -4599
  319. package/node_modules/@typescript/typescript-linux-x64/lib/lib.es6.d.ts +0 -21
  320. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.array.d.ts +0 -33
  321. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.collection.d.ts +0 -47
  322. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.d.ts +0 -27
  323. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.date.d.ts +0 -21
  324. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.decorators.d.ts +0 -26
  325. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.disposable.d.ts +0 -191
  326. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.error.d.ts +0 -22
  327. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.full.d.ts +0 -22
  328. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.intl.d.ts +0 -107
  329. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.sharedmemory.d.ts +0 -23
  330. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.temporal.d.ts +0 -485
  331. package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.typedarrays.d.ts +0 -90
  332. package/node_modules/@typescript/typescript-linux-x64/lib/lib.scripthost.d.ts +0 -320
  333. package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.asynciterable.d.ts +0 -18
  334. package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.d.ts +0 -15606
  335. package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.importscripts.d.ts +0 -21
  336. package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.iterable.d.ts +0 -18
  337. package/node_modules/@typescript/typescript-linux-x64/lib/tsc +0 -0
  338. package/node_modules/@typescript/typescript-linux-x64/lib/tsc.sig +0 -11
  339. package/node_modules/@typescript/typescript-linux-x64/package.json +0 -45
  340. package/node_modules/@ykdz/reference-npm-publication/native/template-dist/target.d.ts +0 -13
  341. package/node_modules/@ykdz/reference-npm-publication/native/template-dist/target.d.ts.map +0 -1
  342. package/node_modules/@ykdz/reference-npm-publication/native/template-dist/target.js +0 -30
  343. package/node_modules/@ykdz/reference-npm-publication/native/template-dist/workspace.d.ts +0 -11
  344. package/node_modules/@ykdz/reference-npm-publication/native/template-dist/workspace.d.ts.map +0 -1
  345. package/node_modules/@ykdz/reference-npm-publication/native/template-dist/workspace.js +0 -51
  346. package/node_modules/@ykdz/reference-rust-bin/native/tsconfig.json +0 -8
  347. package/node_modules/@ykdz/reference-ts-cli/native/src/publication/cli-command-identity.ts +0 -88
  348. package/node_modules/@ykdz/template-content/dist/template-members.d.ts +0 -9
  349. package/node_modules/@ykdz/template-content/dist/template-members.js +0 -16
  350. package/node_modules/@ykdz/template-core/dist/renderer-policy-snapshot.d.ts +0 -1
  351. package/node_modules/@ykdz/template-core/dist/renderer-policy-snapshot.js +0 -2
  352. package/node_modules/@ykdz/template-core/dist/renderer.d.ts +0 -101
  353. package/node_modules/@ykdz/template-core/dist/renderer.js +0 -386
  354. package/node_modules/@ykdz/template-core/dist/workspace-strategy.d.ts +0 -188
  355. package/node_modules/@ykdz/template-core/dist/workspace-strategy.js +0 -1
  356. package/node_modules/@ykdz/template-workspace/assets/tsconfig.config.json +0 -6
  357. package/node_modules/@ykdz/template-workspace/assets/tsconfig.json +0 -7
  358. package/node_modules/@ykdz/template-workspace/dist/default-environment-sources.d.ts +0 -5
  359. package/node_modules/@ykdz/template-workspace/dist/default-environment-sources.js +0 -8
  360. package/node_modules/@ykdz/template-workspace/dist/default-environment.d.ts +0 -9
  361. package/node_modules/@ykdz/template-workspace/dist/default-environment.js +0 -5
  362. package/node_modules/@ykdz/template-workspace/dist/default-workspace-strategy.d.ts +0 -89
  363. package/node_modules/@ykdz/template-workspace/dist/default-workspace-strategy.js +0 -967
  364. package/node_modules/@ykdz/template-workspace/dist/development-container.d.ts +0 -3
  365. package/node_modules/@ykdz/template-workspace/dist/development-container.js +0 -36
  366. package/node_modules/@ykdz/template-workspace/dist/development-environment.d.ts +0 -36
  367. package/node_modules/@ykdz/template-workspace/dist/environment-needs.d.ts +0 -51
  368. package/node_modules/@ykdz/template-workspace/dist/generation-context.d.ts +0 -14
  369. package/node_modules/@ykdz/template-workspace/dist/package-addition-facts.d.ts +0 -21
  370. package/node_modules/@ykdz/template-workspace/dist/package-addition-facts.js +0 -90
  371. package/node_modules/@ykdz/template-workspace/dist/package-contribution.d.ts +0 -64
  372. package/node_modules/@ykdz/template-workspace/dist/package-contribution.js +0 -65
  373. package/node_modules/@ykdz/template-workspace/dist/project-linking.d.ts +0 -48
  374. package/node_modules/@ykdz/template-workspace/dist/project-linking.js +0 -218
  375. package/node_modules/@ykdz/template-workspace/dist/reference-package.d.ts +0 -146
  376. package/node_modules/@ykdz/template-workspace/dist/reference-package.js +0 -521
  377. package/node_modules/@ykdz/template-workspace/dist/root-projection.d.ts +0 -29
  378. package/node_modules/@ykdz/template-workspace/dist/root-projection.js +0 -144
  379. package/node_modules/@ykdz/template-workspace/dist/rust-target-projection.d.ts +0 -35
  380. package/node_modules/@ykdz/template-workspace/dist/rust-target-projection.js +0 -74
  381. package/node_modules/@ykdz/template-workspace/dist/workspace-resources.d.ts +0 -23
  382. package/node_modules/@ykdz/template-workspace/dist/workspace-resources.js +0 -83
  383. package/node_modules/@ykdz/template-workspace/resources/oxfmt.config.ts +0 -1
  384. package/node_modules/typescript-7/LICENSE +0 -55
  385. package/node_modules/typescript-7/NOTICE.txt +0 -436
  386. package/node_modules/typescript-7/README.md +0 -49
  387. package/node_modules/typescript-7/bin/tsc +0 -2
  388. package/node_modules/typescript-7/dist/api/async/api.d.ts +0 -529
  389. package/node_modules/typescript-7/dist/api/async/api.d.ts.map +0 -1
  390. package/node_modules/typescript-7/dist/api/async/api.js +0 -1657
  391. package/node_modules/typescript-7/dist/api/async/api.js.map +0 -1
  392. package/node_modules/typescript-7/dist/api/async/client.d.ts +0 -39
  393. package/node_modules/typescript-7/dist/api/async/client.d.ts.map +0 -1
  394. package/node_modules/typescript-7/dist/api/async/client.js +0 -211
  395. package/node_modules/typescript-7/dist/api/async/client.js.map +0 -1
  396. package/node_modules/typescript-7/dist/api/async/types.d.ts +0 -310
  397. package/node_modules/typescript-7/dist/api/async/types.d.ts.map +0 -1
  398. package/node_modules/typescript-7/dist/api/async/types.js +0 -2
  399. package/node_modules/typescript-7/dist/api/async/types.js.map +0 -1
  400. package/node_modules/typescript-7/dist/api/compilerOptions.d.ts +0 -109
  401. package/node_modules/typescript-7/dist/api/compilerOptions.d.ts.map +0 -1
  402. package/node_modules/typescript-7/dist/api/compilerOptions.js +0 -2
  403. package/node_modules/typescript-7/dist/api/compilerOptions.js.map +0 -1
  404. package/node_modules/typescript-7/dist/api/fs.d.ts +0 -23
  405. package/node_modules/typescript-7/dist/api/fs.d.ts.map +0 -1
  406. package/node_modules/typescript-7/dist/api/fs.js +0 -109
  407. package/node_modules/typescript-7/dist/api/fs.js.map +0 -1
  408. package/node_modules/typescript-7/dist/api/node/encoder.d.ts +0 -15
  409. package/node_modules/typescript-7/dist/api/node/encoder.d.ts.map +0 -1
  410. package/node_modules/typescript-7/dist/api/node/encoder.generated.d.ts +0 -5
  411. package/node_modules/typescript-7/dist/api/node/encoder.generated.d.ts.map +0 -1
  412. package/node_modules/typescript-7/dist/api/node/encoder.generated.js +0 -74
  413. package/node_modules/typescript-7/dist/api/node/encoder.generated.js.map +0 -1
  414. package/node_modules/typescript-7/dist/api/node/encoder.js +0 -287
  415. package/node_modules/typescript-7/dist/api/node/encoder.js.map +0 -1
  416. package/node_modules/typescript-7/dist/api/node/msgpack.d.ts +0 -32
  417. package/node_modules/typescript-7/dist/api/node/msgpack.d.ts.map +0 -1
  418. package/node_modules/typescript-7/dist/api/node/msgpack.js +0 -213
  419. package/node_modules/typescript-7/dist/api/node/msgpack.js.map +0 -1
  420. package/node_modules/typescript-7/dist/api/node/node.d.ts +0 -76
  421. package/node_modules/typescript-7/dist/api/node/node.d.ts.map +0 -1
  422. package/node_modules/typescript-7/dist/api/node/node.generated.d.ts +0 -182
  423. package/node_modules/typescript-7/dist/api/node/node.generated.d.ts.map +0 -1
  424. package/node_modules/typescript-7/dist/api/node/node.generated.js +0 -835
  425. package/node_modules/typescript-7/dist/api/node/node.generated.js.map +0 -1
  426. package/node_modules/typescript-7/dist/api/node/node.infrastructure.d.ts +0 -62
  427. package/node_modules/typescript-7/dist/api/node/node.infrastructure.d.ts.map +0 -1
  428. package/node_modules/typescript-7/dist/api/node/node.infrastructure.js +0 -122
  429. package/node_modules/typescript-7/dist/api/node/node.infrastructure.js.map +0 -1
  430. package/node_modules/typescript-7/dist/api/node/node.js +0 -298
  431. package/node_modules/typescript-7/dist/api/node/node.js.map +0 -1
  432. package/node_modules/typescript-7/dist/api/node/protocol.d.ts +0 -29
  433. package/node_modules/typescript-7/dist/api/node/protocol.d.ts.map +0 -1
  434. package/node_modules/typescript-7/dist/api/node/protocol.generated.d.ts +0 -4
  435. package/node_modules/typescript-7/dist/api/node/protocol.generated.d.ts.map +0 -1
  436. package/node_modules/typescript-7/dist/api/node/protocol.generated.js +0 -241
  437. package/node_modules/typescript-7/dist/api/node/protocol.generated.js.map +0 -1
  438. package/node_modules/typescript-7/dist/api/node/protocol.js +0 -30
  439. package/node_modules/typescript-7/dist/api/node/protocol.js.map +0 -1
  440. package/node_modules/typescript-7/dist/api/node/wtf8.d.ts +0 -6
  441. package/node_modules/typescript-7/dist/api/node/wtf8.d.ts.map +0 -1
  442. package/node_modules/typescript-7/dist/api/node/wtf8.js +0 -61
  443. package/node_modules/typescript-7/dist/api/node/wtf8.js.map +0 -1
  444. package/node_modules/typescript-7/dist/api/options.d.ts +0 -32
  445. package/node_modules/typescript-7/dist/api/options.d.ts.map +0 -1
  446. package/node_modules/typescript-7/dist/api/options.js +0 -11
  447. package/node_modules/typescript-7/dist/api/options.js.map +0 -1
  448. package/node_modules/typescript-7/dist/api/path.d.ts +0 -110
  449. package/node_modules/typescript-7/dist/api/path.d.ts.map +0 -1
  450. package/node_modules/typescript-7/dist/api/path.js +0 -508
  451. package/node_modules/typescript-7/dist/api/path.js.map +0 -1
  452. package/node_modules/typescript-7/dist/api/proto.d.ts +0 -239
  453. package/node_modules/typescript-7/dist/api/proto.d.ts.map +0 -1
  454. package/node_modules/typescript-7/dist/api/proto.js +0 -37
  455. package/node_modules/typescript-7/dist/api/proto.js.map +0 -1
  456. package/node_modules/typescript-7/dist/api/sourceFileCache.d.ts +0 -79
  457. package/node_modules/typescript-7/dist/api/sourceFileCache.d.ts.map +0 -1
  458. package/node_modules/typescript-7/dist/api/sourceFileCache.js +0 -169
  459. package/node_modules/typescript-7/dist/api/sourceFileCache.js.map +0 -1
  460. package/node_modules/typescript-7/dist/api/sync/api.d.ts +0 -529
  461. package/node_modules/typescript-7/dist/api/sync/api.d.ts.map +0 -1
  462. package/node_modules/typescript-7/dist/api/sync/api.js +0 -1665
  463. package/node_modules/typescript-7/dist/api/sync/api.js.map +0 -1
  464. package/node_modules/typescript-7/dist/api/sync/client.d.ts +0 -30
  465. package/node_modules/typescript-7/dist/api/sync/client.d.ts.map +0 -1
  466. package/node_modules/typescript-7/dist/api/sync/client.js +0 -124
  467. package/node_modules/typescript-7/dist/api/sync/client.js.map +0 -1
  468. package/node_modules/typescript-7/dist/api/sync/types.d.ts +0 -310
  469. package/node_modules/typescript-7/dist/api/sync/types.d.ts.map +0 -1
  470. package/node_modules/typescript-7/dist/api/sync/types.js +0 -2
  471. package/node_modules/typescript-7/dist/api/sync/types.js.map +0 -1
  472. package/node_modules/typescript-7/dist/api/syncChannel.d.ts +0 -114
  473. package/node_modules/typescript-7/dist/api/syncChannel.d.ts.map +0 -1
  474. package/node_modules/typescript-7/dist/api/syncChannel.js +0 -508
  475. package/node_modules/typescript-7/dist/api/syncChannel.js.map +0 -1
  476. package/node_modules/typescript-7/dist/api/timing.d.ts +0 -175
  477. package/node_modules/typescript-7/dist/api/timing.d.ts.map +0 -1
  478. package/node_modules/typescript-7/dist/api/timing.js +0 -149
  479. package/node_modules/typescript-7/dist/api/timing.js.map +0 -1
  480. package/node_modules/typescript-7/dist/ast/ast.d.ts +0 -100
  481. package/node_modules/typescript-7/dist/ast/ast.d.ts.map +0 -1
  482. package/node_modules/typescript-7/dist/ast/ast.generated.d.ts +0 -1161
  483. package/node_modules/typescript-7/dist/ast/ast.generated.d.ts.map +0 -1
  484. package/node_modules/typescript-7/dist/ast/ast.generated.js +0 -4
  485. package/node_modules/typescript-7/dist/ast/ast.generated.js.map +0 -1
  486. package/node_modules/typescript-7/dist/ast/ast.js +0 -7
  487. package/node_modules/typescript-7/dist/ast/ast.js.map +0 -1
  488. package/node_modules/typescript-7/dist/ast/astnav.d.ts +0 -19
  489. package/node_modules/typescript-7/dist/ast/astnav.d.ts.map +0 -1
  490. package/node_modules/typescript-7/dist/ast/astnav.js +0 -596
  491. package/node_modules/typescript-7/dist/ast/astnav.js.map +0 -1
  492. package/node_modules/typescript-7/dist/ast/clone.d.ts +0 -16
  493. package/node_modules/typescript-7/dist/ast/clone.d.ts.map +0 -1
  494. package/node_modules/typescript-7/dist/ast/clone.js +0 -104
  495. package/node_modules/typescript-7/dist/ast/clone.js.map +0 -1
  496. package/node_modules/typescript-7/dist/ast/factory.generated.d.ts +0 -520
  497. package/node_modules/typescript-7/dist/ast/factory.generated.d.ts.map +0 -1
  498. package/node_modules/typescript-7/dist/ast/factory.generated.js +0 -3057
  499. package/node_modules/typescript-7/dist/ast/factory.generated.js.map +0 -1
  500. package/node_modules/typescript-7/dist/ast/index.d.ts +0 -20
  501. package/node_modules/typescript-7/dist/ast/index.d.ts.map +0 -1
  502. package/node_modules/typescript-7/dist/ast/index.js +0 -20
  503. package/node_modules/typescript-7/dist/ast/index.js.map +0 -1
  504. package/node_modules/typescript-7/dist/ast/is.d.ts +0 -35
  505. package/node_modules/typescript-7/dist/ast/is.d.ts.map +0 -1
  506. package/node_modules/typescript-7/dist/ast/is.generated.d.ts +0 -329
  507. package/node_modules/typescript-7/dist/ast/is.generated.d.ts.map +0 -1
  508. package/node_modules/typescript-7/dist/ast/is.generated.js +0 -1103
  509. package/node_modules/typescript-7/dist/ast/is.generated.js.map +0 -1
  510. package/node_modules/typescript-7/dist/ast/is.js +0 -233
  511. package/node_modules/typescript-7/dist/ast/is.js.map +0 -1
  512. package/node_modules/typescript-7/dist/ast/jsdoc.d.ts +0 -11
  513. package/node_modules/typescript-7/dist/ast/jsdoc.d.ts.map +0 -1
  514. package/node_modules/typescript-7/dist/ast/jsdoc.js +0 -202
  515. package/node_modules/typescript-7/dist/ast/jsdoc.js.map +0 -1
  516. package/node_modules/typescript-7/dist/ast/scanner.d.ts +0 -97
  517. package/node_modules/typescript-7/dist/ast/scanner.d.ts.map +0 -1
  518. package/node_modules/typescript-7/dist/ast/scanner.js +0 -2230
  519. package/node_modules/typescript-7/dist/ast/scanner.js.map +0 -1
  520. package/node_modules/typescript-7/dist/ast/utils.d.ts +0 -17
  521. package/node_modules/typescript-7/dist/ast/utils.d.ts.map +0 -1
  522. package/node_modules/typescript-7/dist/ast/utils.js +0 -67
  523. package/node_modules/typescript-7/dist/ast/utils.js.map +0 -1
  524. package/node_modules/typescript-7/dist/ast/visitor.d.ts +0 -14
  525. package/node_modules/typescript-7/dist/ast/visitor.d.ts.map +0 -1
  526. package/node_modules/typescript-7/dist/ast/visitor.generated.d.ts +0 -50
  527. package/node_modules/typescript-7/dist/ast/visitor.generated.d.ts.map +0 -1
  528. package/node_modules/typescript-7/dist/ast/visitor.generated.js +0 -978
  529. package/node_modules/typescript-7/dist/ast/visitor.generated.js.map +0 -1
  530. package/node_modules/typescript-7/dist/ast/visitor.js +0 -47
  531. package/node_modules/typescript-7/dist/ast/visitor.js.map +0 -1
  532. package/node_modules/typescript-7/dist/enums/characterCodes.d.ts +0 -2
  533. package/node_modules/typescript-7/dist/enums/characterCodes.d.ts.map +0 -1
  534. package/node_modules/typescript-7/dist/enums/characterCodes.enum.d.ts +0 -129
  535. package/node_modules/typescript-7/dist/enums/characterCodes.enum.d.ts.map +0 -1
  536. package/node_modules/typescript-7/dist/enums/characterCodes.enum.js +0 -132
  537. package/node_modules/typescript-7/dist/enums/characterCodes.enum.js.map +0 -1
  538. package/node_modules/typescript-7/dist/enums/characterCodes.js +0 -130
  539. package/node_modules/typescript-7/dist/enums/characterCodes.js.map +0 -1
  540. package/node_modules/typescript-7/dist/enums/commentDirectiveType.d.ts +0 -2
  541. package/node_modules/typescript-7/dist/enums/commentDirectiveType.d.ts.map +0 -1
  542. package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.d.ts +0 -5
  543. package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.d.ts.map +0 -1
  544. package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.js +0 -6
  545. package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.js.map +0 -1
  546. package/node_modules/typescript-7/dist/enums/commentDirectiveType.js +0 -6
  547. package/node_modules/typescript-7/dist/enums/commentDirectiveType.js.map +0 -1
  548. package/node_modules/typescript-7/dist/enums/completionItemKind.d.ts +0 -2
  549. package/node_modules/typescript-7/dist/enums/completionItemKind.d.ts.map +0 -1
  550. package/node_modules/typescript-7/dist/enums/completionItemKind.enum.d.ts +0 -28
  551. package/node_modules/typescript-7/dist/enums/completionItemKind.enum.d.ts.map +0 -1
  552. package/node_modules/typescript-7/dist/enums/completionItemKind.enum.js +0 -30
  553. package/node_modules/typescript-7/dist/enums/completionItemKind.enum.js.map +0 -1
  554. package/node_modules/typescript-7/dist/enums/completionItemKind.js +0 -30
  555. package/node_modules/typescript-7/dist/enums/completionItemKind.js.map +0 -1
  556. package/node_modules/typescript-7/dist/enums/diagnosticCategory.d.ts +0 -2
  557. package/node_modules/typescript-7/dist/enums/diagnosticCategory.d.ts.map +0 -1
  558. package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.d.ts +0 -7
  559. package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.d.ts.map +0 -1
  560. package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.js +0 -9
  561. package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.js.map +0 -1
  562. package/node_modules/typescript-7/dist/enums/diagnosticCategory.js +0 -9
  563. package/node_modules/typescript-7/dist/enums/diagnosticCategory.js.map +0 -1
  564. package/node_modules/typescript-7/dist/enums/elementFlags.d.ts +0 -2
  565. package/node_modules/typescript-7/dist/enums/elementFlags.d.ts.map +0 -1
  566. package/node_modules/typescript-7/dist/enums/elementFlags.enum.d.ts +0 -12
  567. package/node_modules/typescript-7/dist/enums/elementFlags.enum.d.ts.map +0 -1
  568. package/node_modules/typescript-7/dist/enums/elementFlags.enum.js +0 -14
  569. package/node_modules/typescript-7/dist/enums/elementFlags.enum.js.map +0 -1
  570. package/node_modules/typescript-7/dist/enums/elementFlags.js +0 -14
  571. package/node_modules/typescript-7/dist/enums/elementFlags.js.map +0 -1
  572. package/node_modules/typescript-7/dist/enums/internalSymbolName.d.ts +0 -2
  573. package/node_modules/typescript-7/dist/enums/internalSymbolName.d.ts.map +0 -1
  574. package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.d.ts +0 -23
  575. package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.d.ts.map +0 -1
  576. package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.js +0 -25
  577. package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.js.map +0 -1
  578. package/node_modules/typescript-7/dist/enums/internalSymbolName.js +0 -25
  579. package/node_modules/typescript-7/dist/enums/internalSymbolName.js.map +0 -1
  580. package/node_modules/typescript-7/dist/enums/jsxEmit.d.ts +0 -2
  581. package/node_modules/typescript-7/dist/enums/jsxEmit.d.ts.map +0 -1
  582. package/node_modules/typescript-7/dist/enums/jsxEmit.enum.d.ts +0 -9
  583. package/node_modules/typescript-7/dist/enums/jsxEmit.enum.d.ts.map +0 -1
  584. package/node_modules/typescript-7/dist/enums/jsxEmit.enum.js +0 -11
  585. package/node_modules/typescript-7/dist/enums/jsxEmit.enum.js.map +0 -1
  586. package/node_modules/typescript-7/dist/enums/jsxEmit.js +0 -11
  587. package/node_modules/typescript-7/dist/enums/jsxEmit.js.map +0 -1
  588. package/node_modules/typescript-7/dist/enums/languageVariant.d.ts +0 -2
  589. package/node_modules/typescript-7/dist/enums/languageVariant.d.ts.map +0 -1
  590. package/node_modules/typescript-7/dist/enums/languageVariant.enum.d.ts +0 -5
  591. package/node_modules/typescript-7/dist/enums/languageVariant.enum.d.ts.map +0 -1
  592. package/node_modules/typescript-7/dist/enums/languageVariant.enum.js +0 -6
  593. package/node_modules/typescript-7/dist/enums/languageVariant.enum.js.map +0 -1
  594. package/node_modules/typescript-7/dist/enums/languageVariant.js +0 -6
  595. package/node_modules/typescript-7/dist/enums/languageVariant.js.map +0 -1
  596. package/node_modules/typescript-7/dist/enums/modifierFlags.d.ts +0 -2
  597. package/node_modules/typescript-7/dist/enums/modifierFlags.d.ts.map +0 -1
  598. package/node_modules/typescript-7/dist/enums/modifierFlags.enum.d.ts +0 -42
  599. package/node_modules/typescript-7/dist/enums/modifierFlags.enum.d.ts.map +0 -1
  600. package/node_modules/typescript-7/dist/enums/modifierFlags.enum.js +0 -44
  601. package/node_modules/typescript-7/dist/enums/modifierFlags.enum.js.map +0 -1
  602. package/node_modules/typescript-7/dist/enums/modifierFlags.js +0 -44
  603. package/node_modules/typescript-7/dist/enums/modifierFlags.js.map +0 -1
  604. package/node_modules/typescript-7/dist/enums/moduleDetectionKind.d.ts +0 -2
  605. package/node_modules/typescript-7/dist/enums/moduleDetectionKind.d.ts.map +0 -1
  606. package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.d.ts +0 -7
  607. package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.d.ts.map +0 -1
  608. package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.js +0 -9
  609. package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.js.map +0 -1
  610. package/node_modules/typescript-7/dist/enums/moduleDetectionKind.js +0 -9
  611. package/node_modules/typescript-7/dist/enums/moduleDetectionKind.js.map +0 -1
  612. package/node_modules/typescript-7/dist/enums/moduleKind.d.ts +0 -2
  613. package/node_modules/typescript-7/dist/enums/moduleKind.d.ts.map +0 -1
  614. package/node_modules/typescript-7/dist/enums/moduleKind.enum.d.ts +0 -17
  615. package/node_modules/typescript-7/dist/enums/moduleKind.enum.d.ts.map +0 -1
  616. package/node_modules/typescript-7/dist/enums/moduleKind.enum.js +0 -19
  617. package/node_modules/typescript-7/dist/enums/moduleKind.enum.js.map +0 -1
  618. package/node_modules/typescript-7/dist/enums/moduleKind.js +0 -19
  619. package/node_modules/typescript-7/dist/enums/moduleKind.js.map +0 -1
  620. package/node_modules/typescript-7/dist/enums/moduleResolutionKind.d.ts +0 -2
  621. package/node_modules/typescript-7/dist/enums/moduleResolutionKind.d.ts.map +0 -1
  622. package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.d.ts +0 -9
  623. package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.d.ts.map +0 -1
  624. package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.js +0 -11
  625. package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.js.map +0 -1
  626. package/node_modules/typescript-7/dist/enums/moduleResolutionKind.js +0 -11
  627. package/node_modules/typescript-7/dist/enums/moduleResolutionKind.js.map +0 -1
  628. package/node_modules/typescript-7/dist/enums/newLineKind.d.ts +0 -2
  629. package/node_modules/typescript-7/dist/enums/newLineKind.d.ts.map +0 -1
  630. package/node_modules/typescript-7/dist/enums/newLineKind.enum.d.ts +0 -6
  631. package/node_modules/typescript-7/dist/enums/newLineKind.enum.d.ts.map +0 -1
  632. package/node_modules/typescript-7/dist/enums/newLineKind.enum.js +0 -8
  633. package/node_modules/typescript-7/dist/enums/newLineKind.enum.js.map +0 -1
  634. package/node_modules/typescript-7/dist/enums/newLineKind.js +0 -8
  635. package/node_modules/typescript-7/dist/enums/newLineKind.js.map +0 -1
  636. package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.d.ts +0 -2
  637. package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.d.ts.map +0 -1
  638. package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.d.ts +0 -36
  639. package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.d.ts.map +0 -1
  640. package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.js +0 -38
  641. package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.js.map +0 -1
  642. package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.js +0 -38
  643. package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.js.map +0 -1
  644. package/node_modules/typescript-7/dist/enums/nodeFlags.d.ts +0 -2
  645. package/node_modules/typescript-7/dist/enums/nodeFlags.d.ts.map +0 -1
  646. package/node_modules/typescript-7/dist/enums/nodeFlags.enum.d.ts +0 -44
  647. package/node_modules/typescript-7/dist/enums/nodeFlags.enum.d.ts.map +0 -1
  648. package/node_modules/typescript-7/dist/enums/nodeFlags.enum.js +0 -46
  649. package/node_modules/typescript-7/dist/enums/nodeFlags.enum.js.map +0 -1
  650. package/node_modules/typescript-7/dist/enums/nodeFlags.js +0 -46
  651. package/node_modules/typescript-7/dist/enums/nodeFlags.js.map +0 -1
  652. package/node_modules/typescript-7/dist/enums/objectFlags.d.ts +0 -2
  653. package/node_modules/typescript-7/dist/enums/objectFlags.d.ts.map +0 -1
  654. package/node_modules/typescript-7/dist/enums/objectFlags.enum.d.ts +0 -50
  655. package/node_modules/typescript-7/dist/enums/objectFlags.enum.d.ts.map +0 -1
  656. package/node_modules/typescript-7/dist/enums/objectFlags.enum.js +0 -52
  657. package/node_modules/typescript-7/dist/enums/objectFlags.enum.js.map +0 -1
  658. package/node_modules/typescript-7/dist/enums/objectFlags.js +0 -52
  659. package/node_modules/typescript-7/dist/enums/objectFlags.js.map +0 -1
  660. package/node_modules/typescript-7/dist/enums/outerExpressionKinds.d.ts +0 -2
  661. package/node_modules/typescript-7/dist/enums/outerExpressionKinds.d.ts.map +0 -1
  662. package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.d.ts +0 -16
  663. package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.d.ts.map +0 -1
  664. package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.js +0 -18
  665. package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.js.map +0 -1
  666. package/node_modules/typescript-7/dist/enums/outerExpressionKinds.js +0 -18
  667. package/node_modules/typescript-7/dist/enums/outerExpressionKinds.js.map +0 -1
  668. package/node_modules/typescript-7/dist/enums/regularExpressionFlags.d.ts +0 -2
  669. package/node_modules/typescript-7/dist/enums/regularExpressionFlags.d.ts.map +0 -1
  670. package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.d.ts +0 -13
  671. package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.d.ts.map +0 -1
  672. package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.js +0 -14
  673. package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.js.map +0 -1
  674. package/node_modules/typescript-7/dist/enums/regularExpressionFlags.js +0 -14
  675. package/node_modules/typescript-7/dist/enums/regularExpressionFlags.js.map +0 -1
  676. package/node_modules/typescript-7/dist/enums/scriptKind.d.ts +0 -2
  677. package/node_modules/typescript-7/dist/enums/scriptKind.d.ts.map +0 -1
  678. package/node_modules/typescript-7/dist/enums/scriptKind.enum.d.ts +0 -11
  679. package/node_modules/typescript-7/dist/enums/scriptKind.enum.d.ts.map +0 -1
  680. package/node_modules/typescript-7/dist/enums/scriptKind.enum.js +0 -12
  681. package/node_modules/typescript-7/dist/enums/scriptKind.enum.js.map +0 -1
  682. package/node_modules/typescript-7/dist/enums/scriptKind.js +0 -12
  683. package/node_modules/typescript-7/dist/enums/scriptKind.js.map +0 -1
  684. package/node_modules/typescript-7/dist/enums/scriptTarget.d.ts +0 -2
  685. package/node_modules/typescript-7/dist/enums/scriptTarget.d.ts.map +0 -1
  686. package/node_modules/typescript-7/dist/enums/scriptTarget.enum.d.ts +0 -17
  687. package/node_modules/typescript-7/dist/enums/scriptTarget.enum.d.ts.map +0 -1
  688. package/node_modules/typescript-7/dist/enums/scriptTarget.enum.js +0 -18
  689. package/node_modules/typescript-7/dist/enums/scriptTarget.enum.js.map +0 -1
  690. package/node_modules/typescript-7/dist/enums/scriptTarget.js +0 -18
  691. package/node_modules/typescript-7/dist/enums/scriptTarget.js.map +0 -1
  692. package/node_modules/typescript-7/dist/enums/signatureFlags.d.ts +0 -2
  693. package/node_modules/typescript-7/dist/enums/signatureFlags.d.ts.map +0 -1
  694. package/node_modules/typescript-7/dist/enums/signatureFlags.enum.d.ts +0 -15
  695. package/node_modules/typescript-7/dist/enums/signatureFlags.enum.d.ts.map +0 -1
  696. package/node_modules/typescript-7/dist/enums/signatureFlags.enum.js +0 -17
  697. package/node_modules/typescript-7/dist/enums/signatureFlags.enum.js.map +0 -1
  698. package/node_modules/typescript-7/dist/enums/signatureFlags.js +0 -17
  699. package/node_modules/typescript-7/dist/enums/signatureFlags.js.map +0 -1
  700. package/node_modules/typescript-7/dist/enums/signatureKind.d.ts +0 -2
  701. package/node_modules/typescript-7/dist/enums/signatureKind.d.ts.map +0 -1
  702. package/node_modules/typescript-7/dist/enums/signatureKind.enum.d.ts +0 -5
  703. package/node_modules/typescript-7/dist/enums/signatureKind.enum.d.ts.map +0 -1
  704. package/node_modules/typescript-7/dist/enums/signatureKind.enum.js +0 -7
  705. package/node_modules/typescript-7/dist/enums/signatureKind.enum.js.map +0 -1
  706. package/node_modules/typescript-7/dist/enums/signatureKind.js +0 -7
  707. package/node_modules/typescript-7/dist/enums/signatureKind.js.map +0 -1
  708. package/node_modules/typescript-7/dist/enums/symbolFlags.d.ts +0 -2
  709. package/node_modules/typescript-7/dist/enums/symbolFlags.d.ts.map +0 -1
  710. package/node_modules/typescript-7/dist/enums/symbolFlags.enum.d.ts +0 -71
  711. package/node_modules/typescript-7/dist/enums/symbolFlags.enum.d.ts.map +0 -1
  712. package/node_modules/typescript-7/dist/enums/symbolFlags.enum.js +0 -73
  713. package/node_modules/typescript-7/dist/enums/symbolFlags.enum.js.map +0 -1
  714. package/node_modules/typescript-7/dist/enums/symbolFlags.js +0 -73
  715. package/node_modules/typescript-7/dist/enums/symbolFlags.js.map +0 -1
  716. package/node_modules/typescript-7/dist/enums/syntaxKind.d.ts +0 -2
  717. package/node_modules/typescript-7/dist/enums/syntaxKind.d.ts.map +0 -1
  718. package/node_modules/typescript-7/dist/enums/syntaxKind.enum.d.ts +0 -389
  719. package/node_modules/typescript-7/dist/enums/syntaxKind.enum.d.ts.map +0 -1
  720. package/node_modules/typescript-7/dist/enums/syntaxKind.enum.js +0 -391
  721. package/node_modules/typescript-7/dist/enums/syntaxKind.enum.js.map +0 -1
  722. package/node_modules/typescript-7/dist/enums/syntaxKind.js +0 -391
  723. package/node_modules/typescript-7/dist/enums/syntaxKind.js.map +0 -1
  724. package/node_modules/typescript-7/dist/enums/tokenFlags.d.ts +0 -2
  725. package/node_modules/typescript-7/dist/enums/tokenFlags.d.ts.map +0 -1
  726. package/node_modules/typescript-7/dist/enums/tokenFlags.enum.d.ts +0 -30
  727. package/node_modules/typescript-7/dist/enums/tokenFlags.enum.d.ts.map +0 -1
  728. package/node_modules/typescript-7/dist/enums/tokenFlags.enum.js +0 -32
  729. package/node_modules/typescript-7/dist/enums/tokenFlags.enum.js.map +0 -1
  730. package/node_modules/typescript-7/dist/enums/tokenFlags.js +0 -32
  731. package/node_modules/typescript-7/dist/enums/tokenFlags.js.map +0 -1
  732. package/node_modules/typescript-7/dist/enums/typeFlags.d.ts +0 -2
  733. package/node_modules/typescript-7/dist/enums/typeFlags.d.ts.map +0 -1
  734. package/node_modules/typescript-7/dist/enums/typeFlags.enum.d.ts +0 -76
  735. package/node_modules/typescript-7/dist/enums/typeFlags.enum.d.ts.map +0 -1
  736. package/node_modules/typescript-7/dist/enums/typeFlags.enum.js +0 -78
  737. package/node_modules/typescript-7/dist/enums/typeFlags.enum.js.map +0 -1
  738. package/node_modules/typescript-7/dist/enums/typeFlags.js +0 -78
  739. package/node_modules/typescript-7/dist/enums/typeFlags.js.map +0 -1
  740. package/node_modules/typescript-7/dist/enums/typePredicateKind.d.ts +0 -2
  741. package/node_modules/typescript-7/dist/enums/typePredicateKind.d.ts.map +0 -1
  742. package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.d.ts +0 -7
  743. package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.d.ts.map +0 -1
  744. package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.js +0 -9
  745. package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.js.map +0 -1
  746. package/node_modules/typescript-7/dist/enums/typePredicateKind.js +0 -9
  747. package/node_modules/typescript-7/dist/enums/typePredicateKind.js.map +0 -1
  748. package/node_modules/typescript-7/dist/internal/utils.d.ts +0 -23
  749. package/node_modules/typescript-7/dist/internal/utils.d.ts.map +0 -1
  750. package/node_modules/typescript-7/dist/internal/utils.js +0 -25
  751. package/node_modules/typescript-7/dist/internal/utils.js.map +0 -1
  752. package/node_modules/typescript-7/lib/getExePath.d.ts +0 -2
  753. package/node_modules/typescript-7/lib/getExePath.js +0 -70
  754. package/node_modules/typescript-7/lib/tsc.js +0 -28
  755. package/node_modules/typescript-7/lib/version.cjs +0 -3
  756. package/node_modules/typescript-7/lib/version.d.cts +0 -2
  757. package/node_modules/typescript-7/package.json +0 -87
  758. package/node_modules/typescript-7/vendor/vscode-jsonrpc/License.txt +0 -11
  759. package/node_modules/typescript-7/vendor/vscode-jsonrpc/README.md +0 -54
  760. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/main.d.ts +0 -17
  761. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/main.js +0 -83
  762. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +0 -22
  763. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/ril.js +0 -210
  764. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/api.d.ts +0 -14
  765. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/api.js +0 -87
  766. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +0 -32
  767. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/cancellation.js +0 -132
  768. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/connection.d.ts +0 -367
  769. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/connection.js +0 -1271
  770. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +0 -9
  771. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/disposable.js +0 -16
  772. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +0 -52
  773. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/encoding.js +0 -70
  774. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/events.d.ts +0 -39
  775. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/events.js +0 -135
  776. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/is.d.ts +0 -7
  777. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/is.js +0 -34
  778. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +0 -55
  779. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/linkedMap.js +0 -412
  780. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +0 -18
  781. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +0 -155
  782. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +0 -77
  783. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageReader.js +0 -246
  784. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +0 -60
  785. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageWriter.js +0 -157
  786. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messages.d.ts +0 -369
  787. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messages.js +0 -436
  788. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/ral.d.ts +0 -74
  789. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/ral.js +0 -23
  790. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +0 -10
  791. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/semaphore.js +0 -74
  792. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +0 -15
  793. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -77
  794. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/main.d.ts +0 -58
  795. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/main.js +0 -289
  796. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/ril.d.ts +0 -12
  797. package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/ril.js +0 -163
  798. package/node_modules/typescript-7/vendor/vscode-jsonrpc/package.json +0 -54
  799. package/node_modules/typescript-7/vendor/vscode-jsonrpc/typings/thenable.d.ts +0 -5
  800. /package/node_modules/@ykdz/{template-workspace/dist/generation-context.js → default-content-authoring/dist/contracts.js} +0 -0
  801. /package/node_modules/@ykdz/{template-workspace → default-content-authoring}/dist/environment-needs.js +0 -0
  802. /package/node_modules/@ykdz/{template-workspace/dist/default-package-role.d.ts → default-content-authoring/dist/package-role.d.ts} +0 -0
  803. /package/node_modules/@ykdz/{template-workspace/dist/default-package-role.js → default-content-authoring/dist/package-role.js} +0 -0
  804. /package/node_modules/@ykdz/{template-workspace/assets/environment → reference-rust-bin/native/resources}/devcontainer/rust.Dockerfile +0 -0
  805. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/agent-instructions.md +0 -0
  806. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/environment/base.Dockerfile +0 -0
  807. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/environment/devcontainer/browser-test.Dockerfile +0 -0
  808. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/environment/devcontainer/github-cli.Dockerfile +0 -0
  809. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/environment/devcontainer/shellcheck.Dockerfile +0 -0
  810. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/environment/devcontainer/workspace-template.json +0 -0
  811. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/environment/editor-customization/capabilities.json +0 -0
  812. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/github/check.yml +0 -0
  813. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/github/dependabot.yml +0 -0
  814. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/gitignore +0 -0
  815. /package/node_modules/@ykdz/{template-workspace/assets → reference-workspace-root/native/resources}/next-steps.md +0 -0
  816. /package/node_modules/@ykdz/{template-workspace → reference-workspace-root/native}/scripts/task-gates.ts +0 -0
  817. /package/node_modules/@ykdz/{template-workspace/dist → reference-workspace-root/native/template-dist}/editor-customization.js +0 -0
@@ -1,9 +1,7 @@
1
1
  import { createHash } from "node:crypto";
2
- import { chmod, copyFile, lstat, mkdir, mkdtemp, readFile, rm, rmdir, writeFile, } from "node:fs/promises";
3
- import { tmpdir } from "node:os";
2
+ import { chmod, copyFile, lstat, mkdir, mkdtemp, readFile, readdir, rename, rm, rmdir, writeFile, } from "node:fs/promises";
4
3
  import path from "node:path";
5
4
  import { diff3Merge } from "node-diff3";
6
- import { renderProject } from "./renderer.js";
7
5
  class ProjectProjectionPathPreconditionError extends Error {
8
6
  conflicts;
9
7
  constructor(conflicts) {
@@ -11,121 +9,12 @@ class ProjectProjectionPathPreconditionError extends Error {
11
9
  this.conflicts = conflicts;
12
10
  }
13
11
  }
14
- function normalizedOutputPath(operation) {
15
- const operationPath = operation.kind === "setExecutable" ? operation.path : operation.to;
16
- if (path.isAbsolute(operationPath)) {
17
- throw new Error(`Project Projection paths must be relative: ${operationPath}`);
18
- }
19
- const normalized = path.posix.normalize(operationPath.split(path.sep).join("/"));
20
- if (normalized === "." ||
21
- normalized === ".." ||
22
- normalized.startsWith("../")) {
23
- throw new Error(`Project Projection path escapes its root: ${operationPath}`);
24
- }
25
- return normalized;
26
- }
27
- function operationDriver(operation) {
28
- switch (operation.kind) {
29
- case "mergeJson":
30
- case "mergeJsonTemplate":
31
- case "writeJson":
32
- return "structured";
33
- case "copyFile":
34
- case "writeText":
35
- case "writeTextFromFragments":
36
- case "writeTextTemplate":
37
- return "text";
38
- case "setExecutable":
39
- return undefined;
40
- }
41
- }
42
- /** Pure structural preflight for a renderer-facing Project Projection plan. */
43
- export function validateProjectProjectionPlan(options) {
44
- const diagnostics = [];
45
- const contentKindByPath = new Map();
46
- const contentTypeByPath = new Map();
47
- const transformationKindByPath = new Map();
48
- const finalPaths = new Set();
49
- for (const operation of options.operations) {
50
- let outputPath;
51
- try {
52
- outputPath = normalizedOutputPath(operation);
53
- }
54
- catch (error) {
55
- diagnostics.push(error instanceof Error ? error.message : String(error));
56
- continue;
57
- }
58
- finalPaths.add(outputPath);
59
- const precedingKind = contentKindByPath.get(outputPath);
60
- if (operation.kind === "setExecutable") {
61
- if (precedingKind === undefined) {
62
- diagnostics.push(`Project Projection ${operation.kind} requires a preceding content-producing operation: ${outputPath}`);
63
- }
64
- if (precedingKind !== undefined) {
65
- transformationKindByPath.set(outputPath, operation.kind);
66
- }
67
- continue;
68
- }
69
- if (operation.kind === "mergeJson" ||
70
- operation.kind === "mergeJsonTemplate") {
71
- const transformationKind = transformationKindByPath.get(outputPath);
72
- if (transformationKind !== undefined) {
73
- diagnostics.push(`Project Projection ${operation.kind} may not overwrite content after ${transformationKind}: ${outputPath}`);
74
- }
75
- if (contentTypeByPath.get(outputPath) === "text") {
76
- diagnostics.push(`Project Projection ${operation.kind} requires JSON-compatible content: ${outputPath} follows ${precedingKind}`);
77
- }
78
- if (precedingKind === undefined) {
79
- contentKindByPath.set(outputPath, operation.kind);
80
- }
81
- contentTypeByPath.set(outputPath, "json");
82
- transformationKindByPath.delete(outputPath);
83
- continue;
84
- }
85
- const overwrite = "overwrite" in operation && operation.overwrite;
86
- const transformationKind = transformationKindByPath.get(outputPath);
87
- if (overwrite && transformationKind !== undefined) {
88
- diagnostics.push(`Project Projection ${operation.kind} may not overwrite content after ${transformationKind}: ${outputPath}`);
89
- }
90
- if (precedingKind !== undefined && !overwrite) {
91
- diagnostics.push(`Project Projection collision at ${outputPath}: ${operation.kind} follows ${precedingKind} without overwrite`);
92
- }
93
- contentKindByPath.set(outputPath, operation.kind);
94
- if (operation.kind === "writeJson") {
95
- contentTypeByPath.set(outputPath, "json");
96
- }
97
- else if (operation.kind === "writeText") {
98
- try {
99
- JSON.parse(operation.text);
100
- contentTypeByPath.set(outputPath, "json");
101
- }
102
- catch {
103
- contentTypeByPath.set(outputPath, "text");
104
- }
105
- }
106
- else {
107
- contentTypeByPath.set(outputPath, "unknown");
108
- }
109
- transformationKindByPath.delete(outputPath);
110
- }
111
- const orderedPaths = [...finalPaths].toSorted();
112
- for (const candidate of orderedPaths) {
113
- const ancestor = orderedPaths.find((other) => other !== candidate && candidate.startsWith(`${other}/`));
114
- if (ancestor !== undefined) {
115
- diagnostics.push(`Project Projection path collision: file ${ancestor} is an ancestor of ${candidate}`);
116
- }
117
- }
118
- const reconciliationPaths = new Set();
119
- for (const reconciliation of options.reconciliation ?? []) {
120
- if (reconciliationPaths.has(reconciliation.path)) {
121
- diagnostics.push(`Project Projection reconciliation paths must be unique: ${reconciliation.path}`);
122
- }
123
- else if (!finalPaths.has(reconciliation.path)) {
124
- diagnostics.push(`Project Projection reconciliation references an unknown path: ${reconciliation.path}`);
125
- }
126
- reconciliationPaths.add(reconciliation.path);
12
+ class ProjectProjectionStalePlanError extends Error {
13
+ conflicts;
14
+ constructor(conflicts) {
15
+ super("规划后相关目标事实已变化");
16
+ this.conflicts = conflicts;
127
17
  }
128
- return diagnostics;
129
18
  }
130
19
  function bytesEqual(left, right) {
131
20
  return (left.byteLength === right.byteLength &&
@@ -139,6 +28,21 @@ function entriesEqual(left, right) {
139
28
  }
140
29
  return left.mode === right.mode && bytesEqual(left.content, right.content);
141
30
  }
31
+ function mergeProjectProjectionSources(...groups) {
32
+ const sources = new Map();
33
+ for (const group of groups) {
34
+ for (const source of group ?? []) {
35
+ if (!sources.has(source.identity)) {
36
+ sources.set(source.identity, { ...source });
37
+ }
38
+ }
39
+ }
40
+ return [...sources.values()];
41
+ }
42
+ function attachConflictSources(conflict, ...groups) {
43
+ const sources = mergeProjectProjectionSources(conflict.sources, ...groups);
44
+ return sources.length === 0 ? conflict : { ...conflict, sources };
45
+ }
142
46
  function decodeText(content) {
143
47
  try {
144
48
  return new TextDecoder("utf8", { fatal: true }).decode(content);
@@ -916,11 +820,13 @@ function mirrorSlotsExtendMonotonically(before, after) {
916
820
  return true;
917
821
  }
918
822
  function reconciliationPoliciesCompatible(left, right) {
823
+ const { sources: _leftSources, ...leftPolicy } = left;
824
+ const { sources: _rightSources, ...rightPolicy } = right;
919
825
  if (left.path !== right.path ||
920
826
  left.driver !== right.driver ||
921
827
  left.driver !== "structured" ||
922
828
  right.driver !== "structured") {
923
- return JSON.stringify(left) === JSON.stringify(right);
829
+ return JSON.stringify(leftPolicy) === JSON.stringify(rightPolicy);
924
830
  }
925
831
  const leftIdentitySets = left.identitySets ?? [];
926
832
  const rightIdentitySets = right.identitySets ?? [];
@@ -1047,11 +953,11 @@ function declaredMirrorSlots(policy) {
1047
953
  return [];
1048
954
  return policy.mirrorSlots ?? [];
1049
955
  }
1050
- export async function reconcileProjectProjections(options) {
1051
- const beforePolicies = assertProjectionContract(options.before);
1052
- const afterPolicies = assertProjectionContract(options.after);
1053
- const beforeByPath = new Map(options.before.entries.map((entry) => [entry.path, entry]));
1054
- const afterByPath = new Map(options.after.entries.map((entry) => [entry.path, entry]));
956
+ function projectionObservationPaths(before, after) {
957
+ const beforePolicies = assertProjectionContract(before);
958
+ const afterPolicies = assertProjectionContract(after);
959
+ const beforeByPath = new Map(before.entries.map((entry) => [entry.path, entry]));
960
+ const afterByPath = new Map(after.entries.map((entry) => [entry.path, entry]));
1055
961
  for (const projectionPath of beforeByPath.keys()) {
1056
962
  const beforePolicy = beforePolicies.get(projectionPath);
1057
963
  const afterPolicy = afterPolicies.get(projectionPath);
@@ -1064,26 +970,146 @@ export async function reconcileProjectProjections(options) {
1064
970
  throw new Error(`Project Projection reconciliation policy changed for ${projectionPath}`);
1065
971
  }
1066
972
  }
1067
- const deltaPathSet = new Set([...new Set([...beforeByPath.keys(), ...afterByPath.keys()])]
973
+ const deltaPaths = [
974
+ ...new Set([...beforeByPath.keys(), ...afterByPath.keys()]),
975
+ ]
1068
976
  .filter((projectionPath) => !entriesEqual(beforeByPath.get(projectionPath), afterByPath.get(projectionPath)))
1069
- .toSorted());
977
+ .toSorted();
1070
978
  const declaredMirrorPaths = new Set();
1071
979
  for (const [projectionPath, policy] of afterPolicies) {
1072
- if (declaredMirrorSlots(policy).length > 0) {
980
+ if (declaredMirrorSlots(policy).length > 0)
1073
981
  declaredMirrorPaths.add(projectionPath);
1074
- }
1075
982
  }
1076
983
  for (const [projectionPath, policy] of beforePolicies) {
1077
- if (declaredMirrorSlots(policy).length > 0) {
984
+ if (declaredMirrorSlots(policy).length > 0)
1078
985
  declaredMirrorPaths.add(projectionPath);
986
+ }
987
+ return [...new Set([...deltaPaths, ...declaredMirrorPaths])].toSorted();
988
+ }
989
+ export function getProjectProjectionReconciliationPaths(options) {
990
+ return projectionObservationPaths(options.before, options.after);
991
+ }
992
+ function assertUniquePreconditions(preconditions) {
993
+ const paths = new Set();
994
+ for (const precondition of preconditions) {
995
+ if (precondition.path === ".") {
996
+ if (precondition.kind !== "directory-empty-or-missing") {
997
+ throw new Error("文件路径前提不能使用点路径。");
998
+ }
999
+ }
1000
+ else {
1001
+ assertNormalizedSafeRelativePath(precondition.path, "entry");
1002
+ }
1003
+ if (paths.has(precondition.path)) {
1004
+ throw new Error(`投影路径前提必须唯一:${precondition.path}`);
1005
+ }
1006
+ paths.add(precondition.path);
1007
+ }
1008
+ }
1009
+ export function getProjectProjectionObservationPaths(options) {
1010
+ const preconditions = options.preconditions ?? [];
1011
+ assertUniquePreconditions(preconditions);
1012
+ const additionalPaths = options.additionalPaths ?? [];
1013
+ for (const additionalPath of additionalPaths) {
1014
+ assertNormalizedSafeRelativePath(additionalPath, "entry");
1015
+ }
1016
+ const leaves = new Set([
1017
+ ...projectionObservationPaths(options.before, options.after),
1018
+ ...preconditions.map((precondition) => precondition.path),
1019
+ ...additionalPaths,
1020
+ ]);
1021
+ const observations = new Set(leaves);
1022
+ for (const leaf of leaves) {
1023
+ for (let parent = path.posix.dirname(leaf); parent !== "." && parent !== ""; parent = path.posix.dirname(parent)) {
1024
+ observations.add(parent);
1025
+ }
1026
+ }
1027
+ return [...observations].toSorted();
1028
+ }
1029
+ export async function readProjectProjectionCurrent(options) {
1030
+ const targetRoot = path.resolve(options.targetRoot);
1031
+ const preconditions = options.preconditions ?? [];
1032
+ const paths = getProjectProjectionObservationPaths({
1033
+ before: options.before,
1034
+ after: options.after,
1035
+ preconditions,
1036
+ ...(options.additionalPaths === undefined
1037
+ ? {}
1038
+ : { additionalPaths: options.additionalPaths }),
1039
+ });
1040
+ const leafPaths = new Set([
1041
+ ...projectionObservationPaths(options.before, options.after),
1042
+ ...(options.additionalPaths ?? []),
1043
+ ]);
1044
+ const preconditionPaths = new Set(preconditions.map((precondition) => precondition.path));
1045
+ const ancestorPaths = new Set();
1046
+ for (const leaf of [...leafPaths, ...preconditionPaths]) {
1047
+ for (let parent = path.posix.dirname(leaf); parent !== "." && parent !== ""; parent = path.posix.dirname(parent)) {
1048
+ ancestorPaths.add(parent);
1049
+ }
1050
+ }
1051
+ const emptyDirectoryPaths = new Set(preconditions
1052
+ .filter((precondition) => precondition.kind === "directory-empty-or-missing")
1053
+ .map((precondition) => precondition.path));
1054
+ const facts = await Promise.all(paths.map((projectionPath) => readCurrentProjectionEntry(targetRoot, projectionPath, {
1055
+ includeDirectoryContents: emptyDirectoryPaths.has(projectionPath),
1056
+ includeFileContents: leafPaths.has(projectionPath),
1057
+ ...(ancestorPaths.has(projectionPath)
1058
+ ? { observation: "ancestor" }
1059
+ : preconditionPaths.has(projectionPath)
1060
+ ? { observation: "precondition" }
1061
+ : {}),
1062
+ })));
1063
+ return { targetRoot, facts };
1064
+ }
1065
+ function explicitCurrentByPath(current) {
1066
+ const result = new Map();
1067
+ for (const fact of current) {
1068
+ if (result.has(fact.path)) {
1069
+ throw new Error(`Current 事实路径必须唯一:${fact.path}`);
1079
1070
  }
1071
+ result.set(fact.path, fact);
1080
1072
  }
1081
- const reconcilePaths = [
1082
- ...new Set([...deltaPathSet, ...declaredMirrorPaths]),
1083
- ].toSorted();
1073
+ return result;
1074
+ }
1075
+ function currentEntry(fact) {
1076
+ return fact.kind === "missing" ? undefined : fact;
1077
+ }
1078
+ function assertCurrentFactPaths(options) {
1079
+ const permitsRoot = options.preconditions.some((precondition) => precondition.path === "." &&
1080
+ precondition.kind === "directory-empty-or-missing");
1081
+ for (const fact of options.facts) {
1082
+ if (fact.path === ".") {
1083
+ if (!permitsRoot) {
1084
+ throw new Error("点路径事实只能用于初始化目标前提。");
1085
+ }
1086
+ continue;
1087
+ }
1088
+ try {
1089
+ assertNormalizedSafeRelativePath(fact.path, "entry");
1090
+ }
1091
+ catch (error) {
1092
+ throw new Error(`Current 事实路径必须是安全的标准相对路径:${fact.path}`, { cause: error });
1093
+ }
1094
+ }
1095
+ }
1096
+ export function reconcileProjectProjections(options) {
1097
+ const beforePolicies = assertProjectionContract(options.before);
1098
+ const afterPolicies = assertProjectionContract(options.after);
1099
+ const currentByPath = explicitCurrentByPath(options.current);
1100
+ const beforeByPath = new Map(options.before.entries.map((entry) => [entry.path, entry]));
1101
+ const afterByPath = new Map(options.after.entries.map((entry) => [entry.path, entry]));
1102
+ const reconcilePaths = projectionObservationPaths(options.before, options.after);
1103
+ const deltaPathSet = new Set([...new Set([...beforeByPath.keys(), ...afterByPath.keys()])]
1104
+ .filter((projectionPath) => !entriesEqual(beforeByPath.get(projectionPath), afterByPath.get(projectionPath)))
1105
+ .toSorted());
1084
1106
  const mutations = [];
1085
1107
  const conflicts = [];
1086
1108
  for (const projectionPath of reconcilePaths) {
1109
+ const currentFact = currentByPath.get(projectionPath);
1110
+ if (currentFact === undefined) {
1111
+ throw new Error(`Current 事实缺少必要路径:${projectionPath}`);
1112
+ }
1087
1113
  const before = beforeByPath.get(projectionPath);
1088
1114
  const after = afterByPath.get(projectionPath);
1089
1115
  const beforePolicy = beforePolicies.get(projectionPath);
@@ -1092,7 +1118,7 @@ export async function reconcileProjectProjections(options) {
1092
1118
  const driver = policy.driver;
1093
1119
  const mirrorSlots = declaredMirrorSlots(policy);
1094
1120
  const isDeltaPath = deltaPathSet.has(projectionPath);
1095
- const current = await options.readCurrent(projectionPath);
1121
+ const current = currentEntry(currentFact);
1096
1122
  if (entriesEqual(current, after))
1097
1123
  continue;
1098
1124
  if (entriesEqual(current, before)) {
@@ -1200,20 +1226,393 @@ export async function reconcileProjectProjections(options) {
1200
1226
  }
1201
1227
  return conflicts.length === 0
1202
1228
  ? { ok: true, mutations }
1203
- : { ok: false, conflicts };
1229
+ : {
1230
+ ok: false,
1231
+ conflicts: conflicts.map((conflict) => attachConflictSources(conflict, beforeByPath.get(conflict.path)?.sources, currentByPath.get(conflict.path)?.sources, afterByPath.get(conflict.path)?.sources, beforePolicies.get(conflict.path)?.sources, afterPolicies.get(conflict.path)?.sources)),
1232
+ };
1233
+ }
1234
+ const storedProjectProjectionPlans = new WeakMap();
1235
+ function cloneProjectionEntry(entry) {
1236
+ return {
1237
+ ...entry,
1238
+ content: new Uint8Array(entry.content),
1239
+ ...(entry.sources === undefined
1240
+ ? {}
1241
+ : { sources: mergeProjectProjectionSources(entry.sources) }),
1242
+ };
1243
+ }
1244
+ function cloneCurrentFact(fact) {
1245
+ return fact.kind === "file" ? cloneProjectionEntry(fact) : { ...fact };
1246
+ }
1247
+ function currentFactsEqual(left, right) {
1248
+ if (left.path !== right.path || left.kind !== right.kind)
1249
+ return false;
1250
+ if (left.kind === "file" && right.kind === "file") {
1251
+ return (left.mode === right.mode &&
1252
+ left.observation === right.observation &&
1253
+ bytesEqual(left.content, right.content));
1254
+ }
1255
+ if (left.kind === "directory" && right.kind === "directory") {
1256
+ return left.empty === right.empty && left.observation === right.observation;
1257
+ }
1258
+ return left.observation === right.observation;
1259
+ }
1260
+ function preconditionConflict(precondition, fact) {
1261
+ if (precondition.kind === "must-not-exist" && fact.kind === "missing") {
1262
+ return undefined;
1263
+ }
1264
+ if (precondition.kind === "directory-empty-or-missing" &&
1265
+ (fact.kind === "missing" || (fact.kind === "directory" && fact.empty))) {
1266
+ return undefined;
1267
+ }
1268
+ const current = fact.kind === "directory" && fact.empty === true
1269
+ ? "空目录"
1270
+ : fact.kind === "missing"
1271
+ ? "缺失"
1272
+ : fact.kind === "other"
1273
+ ? "非普通文件"
1274
+ : fact.kind === "symbolic-link"
1275
+ ? "符号链接"
1276
+ : fact.kind === "directory"
1277
+ ? "目录"
1278
+ : "文件";
1279
+ return {
1280
+ path: precondition.path,
1281
+ driver: "precondition",
1282
+ reason: `${precondition.reason};当前为${current}`,
1283
+ before: precondition.kind === "must-not-exist" ? "缺失" : "空目录或缺失",
1284
+ current,
1285
+ after: "为本次提交预留",
1286
+ ...(precondition.sources === undefined
1287
+ ? {}
1288
+ : { sources: precondition.sources }),
1289
+ };
1290
+ }
1291
+ function ancestorFactConflict(fact) {
1292
+ if (fact.observation !== "ancestor" ||
1293
+ fact.kind === "missing" ||
1294
+ fact.kind === "directory") {
1295
+ return undefined;
1296
+ }
1297
+ const current = fact.kind === "other"
1298
+ ? "非普通文件"
1299
+ : fact.kind === "symbolic-link"
1300
+ ? "符号链接"
1301
+ : "文件";
1302
+ return {
1303
+ path: fact.path,
1304
+ driver: "precondition",
1305
+ reason: "输出路径的祖先必须是目录或缺失",
1306
+ before: "目录或缺失",
1307
+ current,
1308
+ after: "目录或缺失",
1309
+ };
1310
+ }
1311
+ function sourcesForBlockedDescendants(options) {
1312
+ const prefix = options.path === "." ? "" : `${options.path}/`;
1313
+ const isDescendant = (candidate) => candidate !== options.path && candidate.startsWith(prefix);
1314
+ const groups = [];
1315
+ for (const entry of options.before.entries) {
1316
+ if (isDescendant(entry.path))
1317
+ groups.push(entry.sources);
1318
+ }
1319
+ for (const policy of options.before.reconciliation) {
1320
+ if (isDescendant(policy.path))
1321
+ groups.push(policy.sources);
1322
+ }
1323
+ for (const entry of options.after.entries) {
1324
+ if (isDescendant(entry.path))
1325
+ groups.push(entry.sources);
1326
+ }
1327
+ for (const policy of options.after.reconciliation) {
1328
+ if (isDescendant(policy.path))
1329
+ groups.push(policy.sources);
1330
+ }
1331
+ for (const precondition of options.preconditions) {
1332
+ if (isDescendant(precondition.path))
1333
+ groups.push(precondition.sources);
1334
+ }
1335
+ return mergeProjectProjectionSources(...groups);
1336
+ }
1337
+ function ancestorFactsRemainUsable(expected, current) {
1338
+ return (expected.observation === "ancestor" &&
1339
+ current.observation === "ancestor" &&
1340
+ (current.kind === "missing" || current.kind === "directory"));
1341
+ }
1342
+ export function planProjectProjections(options) {
1343
+ if (!path.isAbsolute(options.current.targetRoot)) {
1344
+ throw new Error("Current 事实的目标目录必须是绝对路径");
1345
+ }
1346
+ const preconditions = options.preconditions ?? [];
1347
+ assertCurrentFactPaths({
1348
+ facts: [...options.current.facts, ...(options.readFacts ?? [])],
1349
+ preconditions,
1350
+ });
1351
+ const paths = getProjectProjectionObservationPaths({
1352
+ before: options.before,
1353
+ after: options.after,
1354
+ preconditions,
1355
+ });
1356
+ const currentByPath = explicitCurrentByPath(options.current.facts);
1357
+ const readFactConflicts = [];
1358
+ const afterByPath = new Map(options.after.entries.map((entry) => [entry.path, entry]));
1359
+ const drivers = new Map([
1360
+ ...options.after.reconciliation.map((policy) => [policy.path, policy.driver]),
1361
+ ...options.before.reconciliation.map((policy) => [policy.path, policy.driver]),
1362
+ ]);
1363
+ for (const readFact of options.readFacts ?? []) {
1364
+ const currentFact = currentByPath.get(readFact.path);
1365
+ if (currentFact === undefined) {
1366
+ currentByPath.set(readFact.path, cloneCurrentFact(readFact));
1367
+ continue;
1368
+ }
1369
+ if (currentFactsEqual(readFact, currentFact))
1370
+ continue;
1371
+ readFactConflicts.push(attachConflictSources({
1372
+ path: readFact.path,
1373
+ driver: drivers.get(readFact.path) ?? "precondition",
1374
+ reason: "准备计算使用的Current事实与规划时读取的事实不一致,请重新准备",
1375
+ before: describeEntry(readFact),
1376
+ current: describeEntry(currentFact),
1377
+ after: afterByPath.has(readFact.path)
1378
+ ? describeEntry(afterByPath.get(readFact.path))
1379
+ : "保留准备时读取的事实",
1380
+ }, readFact.sources, currentFact.sources, afterByPath.get(readFact.path)?.sources));
1381
+ }
1382
+ for (const projectionPath of paths) {
1383
+ const fact = currentByPath.get(projectionPath);
1384
+ if (fact === undefined) {
1385
+ throw new Error(`Current 事实缺少必要路径:${projectionPath}`);
1386
+ }
1387
+ }
1388
+ const observations = [...currentByPath.values()].map(cloneCurrentFact);
1389
+ const preconditionConflicts = preconditions.flatMap((precondition) => {
1390
+ const fact = currentByPath.get(precondition.path);
1391
+ const conflict = preconditionConflict(precondition, fact);
1392
+ return conflict === undefined ? [] : [conflict];
1393
+ });
1394
+ const conflictingPreconditionPaths = new Set(preconditionConflicts.map((conflict) => conflict.path));
1395
+ const invalidAncestorFacts = observations.filter((fact) => ancestorFactConflict(fact) !== undefined);
1396
+ const ancestorConflicts = invalidAncestorFacts.flatMap((fact) => {
1397
+ if (conflictingPreconditionPaths.has(fact.path) ||
1398
+ invalidAncestorFacts.some((ancestor) => ancestor.path !== fact.path &&
1399
+ fact.path.startsWith(`${ancestor.path}/`))) {
1400
+ return [];
1401
+ }
1402
+ const conflict = ancestorFactConflict(fact);
1403
+ return conflict === undefined
1404
+ ? []
1405
+ : [
1406
+ attachConflictSources(conflict, sourcesForBlockedDescendants({
1407
+ path: fact.path,
1408
+ before: options.before,
1409
+ after: options.after,
1410
+ preconditions,
1411
+ })),
1412
+ ];
1413
+ });
1414
+ const inputConflicts = [
1415
+ ...readFactConflicts,
1416
+ ...preconditionConflicts,
1417
+ ...ancestorConflicts,
1418
+ ];
1419
+ if (inputConflicts.length > 0) {
1420
+ return { ok: false, conflicts: inputConflicts };
1421
+ }
1422
+ const reconciliation = reconcileProjectProjections({
1423
+ before: options.before,
1424
+ current: observations,
1425
+ after: options.after,
1426
+ });
1427
+ if (!reconciliation.ok)
1428
+ return reconciliation;
1429
+ const beforePaths = new Set(options.before.entries.map((entry) => entry.path));
1430
+ const afterPolicies = new Map(options.after.reconciliation.map((policy) => [policy.path, policy.driver]));
1431
+ const beforePolicies = new Map(options.before.reconciliation.map((policy) => [policy.path, policy.driver]));
1432
+ const actions = reconciliation.mutations.map((mutation) => ({
1433
+ path: mutation.path,
1434
+ driver: afterPolicies.get(mutation.path) ?? beforePolicies.get(mutation.path),
1435
+ action: beforePaths.has(mutation.path)
1436
+ ? "update"
1437
+ : "create",
1438
+ }));
1439
+ const changeDrivers = new Map([
1440
+ ...afterPolicies,
1441
+ ...beforePolicies,
1442
+ ]);
1443
+ for (const precondition of preconditions)
1444
+ changeDrivers.set(precondition.path, "precondition");
1445
+ const beforeEntries = new Map(options.before.entries.map((entry) => [entry.path, entry]));
1446
+ const preconditionsByPath = new Map(preconditions.map((item) => [item.path, item]));
1447
+ const sourcesByPath = new Map();
1448
+ for (const projectionPath of new Set([
1449
+ ...beforeEntries.keys(),
1450
+ ...currentByPath.keys(),
1451
+ ...afterByPath.keys(),
1452
+ ...preconditionsByPath.keys(),
1453
+ ])) {
1454
+ const sources = mergeProjectProjectionSources(beforeEntries.get(projectionPath)?.sources, currentByPath.get(projectionPath)?.sources, afterByPath.get(projectionPath)?.sources, options.before.reconciliation.find((policy) => policy.path === projectionPath)?.sources, options.after.reconciliation.find((policy) => policy.path === projectionPath)?.sources, preconditionsByPath.get(projectionPath)?.sources);
1455
+ if (sources.length > 0)
1456
+ sourcesByPath.set(projectionPath, sources);
1457
+ }
1458
+ for (const fact of observations) {
1459
+ if (fact.observation !== "ancestor")
1460
+ continue;
1461
+ const sources = sourcesForBlockedDescendants({
1462
+ path: fact.path,
1463
+ before: options.before,
1464
+ after: options.after,
1465
+ preconditions,
1466
+ });
1467
+ if (sources.length === 0)
1468
+ continue;
1469
+ sourcesByPath.set(fact.path, mergeProjectProjectionSources(sourcesByPath.get(fact.path), sources));
1470
+ }
1471
+ const publicPlan = Object.freeze({
1472
+ mutations: Object.freeze(reconciliation.mutations.map(cloneProjectionEntry)),
1473
+ observations: Object.freeze(observations.map(cloneCurrentFact)),
1474
+ preconditions: Object.freeze(preconditions.map((precondition) => Object.freeze({ ...precondition }))),
1475
+ actions: Object.freeze(actions.map((action) => Object.freeze({ ...action }))),
1476
+ });
1477
+ storedProjectProjectionPlans.set(publicPlan, {
1478
+ targetRoot: options.current.targetRoot,
1479
+ mutations: reconciliation.mutations.map(cloneProjectionEntry),
1480
+ observations: observations.map(cloneCurrentFact),
1481
+ preconditions: preconditions.map((precondition) => ({ ...precondition })),
1482
+ actions: actions.map((action) => ({ ...action })),
1483
+ drivers: changeDrivers,
1484
+ afterByPath: new Map(options.after.entries.map((entry) => [
1485
+ entry.path,
1486
+ cloneProjectionEntry(entry),
1487
+ ])),
1488
+ sourcesByPath,
1489
+ });
1490
+ return { ok: true, plan: publicPlan };
1204
1491
  }
1205
- async function readCurrentProjectionEntry(targetRoot, projectionPath) {
1492
+ async function readStoredPlanObservations(options) {
1493
+ const preconditions = new Map(options.plan.preconditions.map((precondition) => [
1494
+ precondition.path,
1495
+ precondition,
1496
+ ]));
1497
+ return Promise.all(options.plan.observations.map((fact) => {
1498
+ const precondition = preconditions.get(fact.path);
1499
+ return readCurrentProjectionEntry(options.targetRoot, fact.path, {
1500
+ includeDirectoryContents: precondition?.kind === "directory-empty-or-missing" &&
1501
+ fact.kind === "directory",
1502
+ includeFileContents: fact.kind === "file",
1503
+ ...(fact.observation === undefined
1504
+ ? {}
1505
+ : { observation: fact.observation }),
1506
+ });
1507
+ }));
1508
+ }
1509
+ async function stalePlanConflicts(options) {
1510
+ const current = await readStoredPlanObservations(options);
1511
+ const conflicts = [];
1512
+ for (const [index, before] of options.plan.observations.entries()) {
1513
+ const actual = current[index];
1514
+ if (currentFactsEqual(before, actual))
1515
+ continue;
1516
+ if (ancestorFactsRemainUsable(before, actual))
1517
+ continue;
1518
+ const after = options.plan.afterByPath.get(before.path);
1519
+ conflicts.push(attachConflictSources({
1520
+ path: before.path,
1521
+ driver: options.plan.drivers.get(before.path) ?? "precondition",
1522
+ reason: "规划后相关目标事实已变化,请重新规划",
1523
+ before: describeEntry(before),
1524
+ current: describeEntry(actual),
1525
+ after: after === undefined ? "保留已规划路径约束" : describeEntry(after),
1526
+ }, options.plan.sourcesByPath.get(before.path), actual.sources, after?.sources));
1527
+ }
1528
+ return conflicts;
1529
+ }
1530
+ export async function commitProjectProjectionPlan(options) {
1531
+ const stored = storedProjectProjectionPlans.get(options.plan);
1532
+ if (stored === undefined) {
1533
+ throw new Error("计划必须在当前进程中由 planProjectProjections 创建");
1534
+ }
1535
+ const targetRoot = path.resolve(options.targetRoot);
1536
+ if (targetRoot !== stored.targetRoot) {
1537
+ return {
1538
+ ok: false,
1539
+ conflicts: [
1540
+ {
1541
+ path: ".",
1542
+ driver: "precondition",
1543
+ reason: "计划只能提交到原目标目录",
1544
+ before: stored.targetRoot,
1545
+ current: targetRoot,
1546
+ after: stored.targetRoot,
1547
+ },
1548
+ ],
1549
+ };
1550
+ }
1551
+ const checkFreshness = async () => {
1552
+ const conflicts = await stalePlanConflicts({ targetRoot, plan: stored });
1553
+ if (conflicts.length > 0)
1554
+ throw new ProjectProjectionStalePlanError(conflicts);
1555
+ };
1556
+ const staleConflicts = await stalePlanConflicts({ targetRoot, plan: stored });
1557
+ if (staleConflicts.length > 0) {
1558
+ return { ok: false, conflicts: staleConflicts };
1559
+ }
1560
+ if (stored.mutations.length === 0) {
1561
+ return { ok: true, changedPaths: [], actions: [] };
1562
+ }
1563
+ try {
1564
+ await applyProjectionMutationsAtomically({
1565
+ targetRoot,
1566
+ mutations: stored.mutations,
1567
+ preconditions: stored.preconditions,
1568
+ beforeCommit: async () => {
1569
+ await options.dependencies?.beforeCommit?.();
1570
+ await checkFreshness();
1571
+ },
1572
+ ...(options.dependencies?.commitMutation === undefined
1573
+ ? {}
1574
+ : { commitMutation: options.dependencies.commitMutation }),
1575
+ });
1576
+ }
1577
+ catch (error) {
1578
+ if (error instanceof ProjectProjectionPathPreconditionError ||
1579
+ error instanceof ProjectProjectionStalePlanError) {
1580
+ return { ok: false, conflicts: error.conflicts };
1581
+ }
1582
+ throw error;
1583
+ }
1584
+ return {
1585
+ ok: true,
1586
+ changedPaths: stored.mutations.map((mutation) => mutation.path),
1587
+ actions: stored.actions,
1588
+ };
1589
+ }
1590
+ async function readCurrentProjectionEntry(targetRoot, projectionPath, options = {}) {
1206
1591
  const filePath = path.join(targetRoot, projectionPath);
1207
1592
  try {
1208
1593
  const fileStat = await lstat(filePath);
1209
1594
  if (!fileStat.isFile()) {
1595
+ const isDirectory = fileStat.isDirectory();
1210
1596
  return {
1211
1597
  path: projectionPath,
1212
- kind: fileStat.isDirectory()
1598
+ kind: isDirectory
1213
1599
  ? "directory"
1214
1600
  : fileStat.isSymbolicLink()
1215
1601
  ? "symbolic-link"
1216
1602
  : "other",
1603
+ ...(options.observation === undefined
1604
+ ? {}
1605
+ : { observation: options.observation }),
1606
+ ...(isDirectory && options.includeDirectoryContents
1607
+ ? { empty: (await readdir(filePath)).length === 0 }
1608
+ : {}),
1609
+ };
1610
+ }
1611
+ if (options.includeFileContents === false) {
1612
+ return {
1613
+ path: projectionPath,
1614
+ kind: "file-kind",
1615
+ observation: options.observation ?? "ancestor",
1217
1616
  };
1218
1617
  }
1219
1618
  const mode = fileStat.mode & 0o111;
@@ -1222,59 +1621,45 @@ async function readCurrentProjectionEntry(targetRoot, projectionPath) {
1222
1621
  kind: "file",
1223
1622
  content: new Uint8Array(await readFile(filePath)),
1224
1623
  mode,
1624
+ ...(options.observation === undefined
1625
+ ? {}
1626
+ : { observation: options.observation }),
1225
1627
  };
1226
1628
  }
1227
1629
  catch (error) {
1228
1630
  if (error instanceof Error && "code" in error && error.code === "ENOENT") {
1229
- return undefined;
1631
+ return {
1632
+ path: projectionPath,
1633
+ kind: "missing",
1634
+ ...(options.observation === undefined
1635
+ ? {}
1636
+ : { observation: options.observation }),
1637
+ };
1230
1638
  }
1231
- throw error;
1232
- }
1233
- }
1234
- async function readCurrentPathKind(targetRoot, relativePath) {
1235
- try {
1236
- const fileStat = await lstat(path.join(targetRoot, relativePath));
1237
- return fileStat.isFile()
1238
- ? "file"
1239
- : fileStat.isDirectory()
1240
- ? "directory"
1241
- : fileStat.isSymbolicLink()
1242
- ? "symbolic-link"
1243
- : "other";
1244
- }
1245
- catch (error) {
1246
- if (error instanceof Error && "code" in error) {
1247
- if (error.code === "ENOENT")
1248
- return undefined;
1249
- if (error.code === "ENOTDIR")
1250
- return "other";
1639
+ if (error instanceof Error && "code" in error && error.code === "ENOTDIR") {
1640
+ return {
1641
+ path: projectionPath,
1642
+ kind: "other",
1643
+ ...(options.observation === undefined
1644
+ ? {}
1645
+ : { observation: options.observation }),
1646
+ };
1251
1647
  }
1252
1648
  throw error;
1253
1649
  }
1254
1650
  }
1255
- function pathPreconditionConflict(precondition, current) {
1256
- return {
1257
- path: precondition.path,
1258
- driver: "precondition",
1259
- reason: `${precondition.reason}; found ${current === "existing path" ? current : `existing ${current}`}`,
1260
- before: "missing",
1261
- current,
1262
- after: "reserved for transaction",
1263
- };
1264
- }
1265
1651
  async function evaluatePathPreconditions(options) {
1266
- const paths = new Set();
1652
+ assertUniquePreconditions(options.preconditions);
1267
1653
  const conflicts = [];
1268
1654
  for (const precondition of options.preconditions) {
1269
- assertNormalizedSafeRelativePath(precondition.path, "entry");
1270
- if (paths.has(precondition.path)) {
1271
- throw new Error(`Project Projection Path Precondition paths must be unique: ${precondition.path}`);
1272
- }
1273
- paths.add(precondition.path);
1274
- const current = await readCurrentPathKind(options.targetRoot, precondition.path);
1275
- if (current === undefined)
1276
- continue;
1277
- conflicts.push(pathPreconditionConflict(precondition, current));
1655
+ const fact = await readCurrentProjectionEntry(options.targetRoot, precondition.path, {
1656
+ includeDirectoryContents: precondition.kind === "directory-empty-or-missing",
1657
+ includeFileContents: false,
1658
+ observation: "precondition",
1659
+ });
1660
+ const conflict = preconditionConflict(precondition, fact);
1661
+ if (conflict !== undefined)
1662
+ conflicts.push(conflict);
1278
1663
  }
1279
1664
  return conflicts;
1280
1665
  }
@@ -1299,6 +1684,7 @@ async function releasePathReservations(options) {
1299
1684
  }
1300
1685
  }
1301
1686
  async function acquirePathReservations(options) {
1687
+ const targetRoot = path.resolve(options.targetRoot);
1302
1688
  const conflicts = await evaluatePathPreconditions(options);
1303
1689
  if (conflicts.length > 0) {
1304
1690
  throw new ProjectProjectionPathPreconditionError(conflicts);
@@ -1306,7 +1692,16 @@ async function acquirePathReservations(options) {
1306
1692
  const reservations = [];
1307
1693
  try {
1308
1694
  for (const precondition of options.preconditions) {
1309
- const reservationPath = path.join(path.resolve(options.targetRoot), precondition.path);
1695
+ if (precondition.kind === "directory-empty-or-missing") {
1696
+ const current = await readCurrentProjectionEntry(options.targetRoot, precondition.path, { includeDirectoryContents: true, includeFileContents: false });
1697
+ if (current.kind === "directory" && current.empty === true)
1698
+ continue;
1699
+ if (current.kind !== "missing") {
1700
+ const conflict = preconditionConflict(precondition, current);
1701
+ throw new ProjectProjectionPathPreconditionError([conflict]);
1702
+ }
1703
+ }
1704
+ const reservationPath = path.join(targetRoot, precondition.path);
1310
1705
  let firstCreatedPath;
1311
1706
  try {
1312
1707
  firstCreatedPath = await mkdir(reservationPath, { recursive: true });
@@ -1319,9 +1714,19 @@ async function acquirePathReservations(options) {
1319
1714
  }
1320
1715
  }
1321
1716
  if (firstCreatedPath === undefined) {
1322
- throw new ProjectProjectionPathPreconditionError([
1323
- pathPreconditionConflict(precondition, "existing path"),
1324
- ]);
1717
+ const current = await readCurrentProjectionEntry(targetRoot, precondition.path, {
1718
+ includeDirectoryContents: precondition.kind === "directory-empty-or-missing",
1719
+ includeFileContents: false,
1720
+ });
1721
+ const conflict = preconditionConflict(precondition, current) ?? {
1722
+ path: precondition.path,
1723
+ driver: "precondition",
1724
+ reason: `${precondition.reason};路径在提交时已变化`,
1725
+ before: "缺失",
1726
+ current: current.kind,
1727
+ after: "为本次提交预留",
1728
+ };
1729
+ throw new ProjectProjectionPathPreconditionError([conflict]);
1325
1730
  }
1326
1731
  reservations.push({
1327
1732
  path: precondition.path,
@@ -1352,9 +1757,11 @@ async function applyProjectionMutationsAtomically(options) {
1352
1757
  const targetRoot = path.resolve(options.targetRoot);
1353
1758
  const parent = path.dirname(targetRoot);
1354
1759
  const prefix = `.${path.basename(targetRoot)}.template-projection-`;
1760
+ await mkdir(parent, { recursive: true });
1355
1761
  const stagingRoot = await mkdtemp(path.join(parent, `${prefix}stage-`));
1356
1762
  const backupRoot = await mkdtemp(path.join(parent, `${prefix}backup-`));
1357
1763
  const backedUpPaths = new Set();
1764
+ const backupModes = new Map();
1358
1765
  const committedPaths = [];
1359
1766
  let reservations = [];
1360
1767
  try {
@@ -1365,9 +1772,16 @@ async function applyProjectionMutationsAtomically(options) {
1365
1772
  await chmod(stagedPath, 0o644 | mutation.mode);
1366
1773
  const targetPath = path.join(targetRoot, mutation.path);
1367
1774
  try {
1775
+ const targetStat = await lstat(targetPath);
1776
+ if (!targetStat.isFile()) {
1777
+ throw new Error(`提交目标不是普通文件:${mutation.path}`);
1778
+ }
1368
1779
  const backupPath = path.join(backupRoot, mutation.path);
1369
1780
  await mkdir(path.dirname(backupPath), { recursive: true });
1370
1781
  await copyFile(targetPath, backupPath);
1782
+ const mode = targetStat.mode & 0o777;
1783
+ await chmod(backupPath, mode);
1784
+ backupModes.set(mutation.path, mode);
1371
1785
  backedUpPaths.add(mutation.path);
1372
1786
  }
1373
1787
  catch (error) {
@@ -1380,27 +1794,51 @@ async function applyProjectionMutationsAtomically(options) {
1380
1794
  }
1381
1795
  try {
1382
1796
  await options.beforeCommit?.();
1383
- reservations = await acquirePathReservations({
1384
- targetRoot,
1385
- preconditions: options.preconditions,
1386
- });
1387
- for (const mutation of options.mutations) {
1388
- const targetPath = path.join(targetRoot, mutation.path);
1389
- await mkdir(path.dirname(targetPath), { recursive: true });
1390
- committedPaths.push(mutation.path);
1391
- const commit = async () => {
1392
- await copyFile(path.join(stagingRoot, mutation.path), targetPath);
1393
- };
1394
- if (options.commitMutation === undefined) {
1395
- await commit();
1797
+ const initializationPrecondition = options.preconditions.find((precondition) => precondition.path === "." &&
1798
+ precondition.kind === "directory-empty-or-missing");
1799
+ if (initializationPrecondition !== undefined) {
1800
+ const conflicts = await evaluatePathPreconditions({
1801
+ targetRoot,
1802
+ preconditions: options.preconditions,
1803
+ });
1804
+ if (conflicts.length > 0) {
1805
+ throw new ProjectProjectionPathPreconditionError(conflicts);
1396
1806
  }
1397
- else {
1398
- await options.commitMutation({
1399
- relativePath: mutation.path,
1400
- stagingRoot,
1401
- targetRoot,
1402
- commit,
1403
- });
1807
+ try {
1808
+ await rename(stagingRoot, targetRoot);
1809
+ }
1810
+ catch (error) {
1811
+ await options.beforeCommit?.();
1812
+ throw error;
1813
+ }
1814
+ }
1815
+ else {
1816
+ reservations = await acquirePathReservations({
1817
+ targetRoot,
1818
+ preconditions: options.preconditions,
1819
+ });
1820
+ for (const mutation of options.mutations) {
1821
+ const targetPath = path.join(targetRoot, mutation.path);
1822
+ await mkdir(path.dirname(targetPath), { recursive: true });
1823
+ committedPaths.push(mutation.path);
1824
+ const commit = async () => {
1825
+ await copyFile(path.join(stagingRoot, mutation.path), targetPath);
1826
+ const existingMode = backupModes.get(mutation.path);
1827
+ await chmod(targetPath, existingMode === undefined
1828
+ ? 0o644 | mutation.mode
1829
+ : (existingMode & 0o666) | mutation.mode);
1830
+ };
1831
+ if (options.commitMutation === undefined) {
1832
+ await commit();
1833
+ }
1834
+ else {
1835
+ await options.commitMutation({
1836
+ relativePath: mutation.path,
1837
+ stagingRoot,
1838
+ targetRoot,
1839
+ commit,
1840
+ });
1841
+ }
1404
1842
  }
1405
1843
  }
1406
1844
  reservations = [];
@@ -1410,6 +1848,7 @@ async function applyProjectionMutationsAtomically(options) {
1410
1848
  const targetPath = path.join(targetRoot, committedPath);
1411
1849
  if (backedUpPaths.has(committedPath)) {
1412
1850
  await copyFile(path.join(backupRoot, committedPath), targetPath);
1851
+ await chmod(targetPath, backupModes.get(committedPath));
1413
1852
  }
1414
1853
  else {
1415
1854
  await rm(targetPath, { force: true });
@@ -1429,126 +1868,3 @@ async function applyProjectionMutationsAtomically(options) {
1429
1868
  ]);
1430
1869
  }
1431
1870
  }
1432
- export function createProjectProjectionReconciler(dependencies = {}) {
1433
- return async (options) => {
1434
- const preconditionConflicts = await evaluatePathPreconditions({
1435
- targetRoot: options.targetRoot,
1436
- preconditions: options.preconditions ?? [],
1437
- });
1438
- if (preconditionConflicts.length > 0) {
1439
- return { ok: false, conflicts: preconditionConflicts };
1440
- }
1441
- const [before, after] = await Promise.all([
1442
- materializeProjectProjection(options.before),
1443
- materializeProjectProjection(options.after),
1444
- ]);
1445
- const reconciliation = await reconcileProjectProjections({
1446
- before,
1447
- after,
1448
- readCurrent: async (projectionPath) => readCurrentProjectionEntry(options.targetRoot, projectionPath),
1449
- });
1450
- if (!reconciliation.ok)
1451
- return reconciliation;
1452
- const beforePaths = new Set(before.entries.map((entry) => entry.path));
1453
- const drivers = new Map(after.reconciliation.map((policy) => [policy.path, policy.driver]));
1454
- const actions = reconciliation.mutations.map((mutation) => ({
1455
- path: mutation.path,
1456
- driver: drivers.get(mutation.path),
1457
- action: beforePaths.has(mutation.path)
1458
- ? "update"
1459
- : "create",
1460
- }));
1461
- if (!options.dryRun) {
1462
- try {
1463
- await applyProjectionMutationsAtomically({
1464
- targetRoot: options.targetRoot,
1465
- mutations: reconciliation.mutations,
1466
- preconditions: options.preconditions ?? [],
1467
- ...(dependencies.beforeCommit === undefined
1468
- ? {}
1469
- : { beforeCommit: dependencies.beforeCommit }),
1470
- ...(dependencies.commitMutation === undefined
1471
- ? {}
1472
- : { commitMutation: dependencies.commitMutation }),
1473
- });
1474
- }
1475
- catch (error) {
1476
- if (error instanceof ProjectProjectionPathPreconditionError) {
1477
- return { ok: false, conflicts: error.conflicts };
1478
- }
1479
- throw error;
1480
- }
1481
- }
1482
- return {
1483
- ok: true,
1484
- changedPaths: reconciliation.mutations.map((mutation) => mutation.path),
1485
- actions,
1486
- };
1487
- };
1488
- }
1489
- export const reconcileAndApplyProjectProjections = createProjectProjectionReconciler();
1490
- export async function materializeProjectProjection(options) {
1491
- const planDiagnostics = validateProjectProjectionPlan(options);
1492
- if (planDiagnostics.length > 0) {
1493
- throw new Error(planDiagnostics.join("\n"));
1494
- }
1495
- const finalPaths = new Set();
1496
- const contentPaths = new Set();
1497
- const policies = new Map();
1498
- for (const operation of options.operations) {
1499
- const outputPath = normalizedOutputPath(operation);
1500
- finalPaths.add(outputPath);
1501
- if (operation.kind === "setExecutable") {
1502
- if (!contentPaths.has(outputPath)) {
1503
- throw new Error(`Project Projection setExecutable requires a preceding content-producing operation: ${outputPath}`);
1504
- }
1505
- }
1506
- else {
1507
- contentPaths.add(outputPath);
1508
- }
1509
- const driver = operationDriver(operation);
1510
- if (driver !== undefined) {
1511
- policies.set(outputPath, { path: outputPath, driver });
1512
- }
1513
- }
1514
- const declaredReconciliationPaths = new Set();
1515
- for (const reconciliation of options.reconciliation ?? []) {
1516
- assertNormalizedSafeRelativePath(reconciliation.path, "reconciliation");
1517
- if (declaredReconciliationPaths.has(reconciliation.path)) {
1518
- throw new Error(`Project Projection reconciliation paths must be unique: ${reconciliation.path}`);
1519
- }
1520
- if (!finalPaths.has(reconciliation.path)) {
1521
- throw new Error(`Project Projection reconciliation references an unknown path: ${reconciliation.path}`);
1522
- }
1523
- declaredReconciliationPaths.add(reconciliation.path);
1524
- policies.set(reconciliation.path, reconciliation);
1525
- }
1526
- const targetRoot = await mkdtemp(path.join(tmpdir(), "template-project-projection-"));
1527
- try {
1528
- await renderProject({
1529
- targetRoot,
1530
- operations: [...options.operations],
1531
- });
1532
- const entries = await Promise.all([...finalPaths].toSorted().map(async (relativePath) => {
1533
- const filePath = path.join(targetRoot, relativePath);
1534
- const fileStat = await lstat(filePath);
1535
- if (!fileStat.isFile()) {
1536
- throw new Error(`Project Projection output must be a file: ${relativePath}`);
1537
- }
1538
- const mode = fileStat.mode & 0o111;
1539
- return {
1540
- path: relativePath,
1541
- kind: "file",
1542
- content: new Uint8Array(await readFile(filePath)),
1543
- mode,
1544
- };
1545
- }));
1546
- return {
1547
- entries,
1548
- reconciliation: [...policies.values()].toSorted((left, right) => left.path.localeCompare(right.path)),
1549
- };
1550
- }
1551
- finally {
1552
- await rm(targetRoot, { recursive: true, force: true });
1553
- }
1554
- }