@salsita-ai/sdk 0.50.0-develop.9ed52379e9 → 0.50.0-develop.a3e5495063

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 (1308) hide show
  1. package/README.md +19 -14
  2. package/dist/admin/default-admin-elements.d.ts +9 -0
  3. package/dist/admin/default-admin-elements.js +1 -0
  4. package/dist/admin/default-elements/built-in-entity-element.d.ts +10 -0
  5. package/dist/admin/default-elements/built-in-entity-element.js +1 -0
  6. package/dist/admin/default-elements/built-in-layout-element.d.ts +10 -0
  7. package/dist/admin/default-elements/built-in-layout-element.js +1 -0
  8. package/dist/admin/default-elements/index.d.ts +2 -0
  9. package/dist/admin/default-elements/index.js +1 -0
  10. package/dist/admin/index.d.ts +1 -0
  11. package/dist/admin/index.js +1 -1
  12. package/dist/application/index.d.ts +1 -0
  13. package/dist/application/index.js +1 -1
  14. package/dist/application/mount-application.d.ts +1 -1
  15. package/dist/application/mount-application.js +1 -1
  16. package/dist/application/mount-configurator.d.ts +19 -0
  17. package/dist/application/mount-configurator.js +1 -0
  18. package/dist/application/mounted-application-runtime.d.ts +4 -0
  19. package/dist/application/mounted-application-runtime.js +1 -0
  20. package/dist/application/register-web-component.d.ts +2 -0
  21. package/dist/application/register-web-component.js +1 -0
  22. package/dist/application-spec/caching/content-diff.js +1 -1
  23. package/dist/application-spec/core/application-file.d.ts +0 -2
  24. package/dist/application-spec/core/application-file.js +1 -1
  25. package/dist/application-spec/core/components/component-filter.d.ts +53 -0
  26. package/dist/application-spec/core/components/component-filter.js +1 -0
  27. package/dist/application-spec/core/components/index.d.ts +2 -0
  28. package/dist/application-spec/core/components/index.js +1 -0
  29. package/dist/application-spec/core/components/sdk-code-ref.d.ts +9 -0
  30. package/dist/application-spec/core/components/sdk-code-ref.js +1 -0
  31. package/dist/application-spec/core/enhanced-json-value.d.ts +0 -68
  32. package/dist/application-spec/core/enhanced-json-value.js +1 -1
  33. package/dist/application-spec/core/expressions/index.d.ts +2 -0
  34. package/dist/application-spec/core/expressions/index.js +1 -0
  35. package/dist/application-spec/core/expressions/relation-expression-params.d.ts +11 -0
  36. package/dist/application-spec/core/expressions/sdk-expression-implementation.d.ts +24 -0
  37. package/dist/application-spec/core/expressions/sdk-expression-implementation.js +1 -0
  38. package/dist/application-spec/core/index.d.ts +2 -0
  39. package/dist/application-spec/core/index.js +1 -1
  40. package/dist/application-spec/core/json-value.d.ts +1 -1
  41. package/dist/application-spec/{core → enhanced-json}/eval-to-constant.d.ts +1 -1
  42. package/dist/application-spec/enhanced-json/index.d.ts +4 -0
  43. package/dist/application-spec/enhanced-json/index.js +1 -0
  44. package/dist/application-spec/enhanced-json/is-enhanced-json-array.d.ts +2 -0
  45. package/dist/application-spec/enhanced-json/is-enhanced-json-array.js +1 -0
  46. package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.d.ts +18 -0
  47. package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.js +1 -0
  48. package/dist/application-spec/enhanced-json/schema-from-value.d.ts +24 -0
  49. package/dist/application-spec/enhanced-json/schema-from-value.js +1 -0
  50. package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.d.ts +14 -0
  51. package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.js +1 -0
  52. package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.d.ts +12 -0
  53. package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.js +1 -0
  54. package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.d.ts +13 -0
  55. package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.js +1 -0
  56. package/dist/application-spec/errors/diagnostic-codes.d.ts +23 -0
  57. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  58. package/dist/application-spec/errors/diagnostic-messages.d.ts +27 -1
  59. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  60. package/dist/application-spec/generate-application/code/common/code-imports.js +1 -1
  61. package/dist/application-spec/generate-application/code/common/env-reader.js +2 -2
  62. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  63. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  64. package/dist/application-spec/generate-application/code/common/single-quoted-string.d.ts +6 -0
  65. package/dist/application-spec/generate-application/code/common/single-quoted-string.js +1 -0
  66. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  67. package/dist/application-spec/generate-application/code/generate-application-code.d.ts +3 -2
  68. package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
  69. package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +22 -14
  70. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  71. package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +2 -2
  72. package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
  73. package/dist/application-spec/generate-application/code/story-files.js +1 -1
  74. package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -0
  75. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  76. package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
  77. package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
  78. package/dist/application-spec/generate-application/code/templates/common/format-property-key.d.ts +7 -0
  79. package/dist/application-spec/generate-application/code/templates/common/format-property-key.js +1 -0
  80. package/dist/application-spec/generate-application/code/templates/common/schema-to-type-string.js +3 -3
  81. package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
  82. package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
  83. package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
  84. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +35 -0
  85. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +5 -0
  86. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.d.ts +1 -0
  87. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.js +1 -0
  88. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.d.ts +1 -1
  89. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +7 -7
  90. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.d.ts +4 -2
  91. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js +1 -1
  92. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +69 -73
  93. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +8 -0
  94. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
  95. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
  96. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-presets.js +1 -1
  97. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
  98. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
  99. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +21 -21
  100. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.d.ts +1 -1
  101. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.js +2 -2
  102. package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +3 -2
  103. package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
  104. package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
  105. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  106. package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
  107. package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
  108. package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
  109. package/dist/application-spec/generate-application/code/templates/gitignore.js +0 -3
  110. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
  111. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
  112. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
  113. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.d.ts +43 -0
  114. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +33 -0
  115. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +2 -0
  116. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  117. package/dist/application-spec/generate-application/code/templates/globals.js +24 -43
  118. package/dist/application-spec/generate-application/code/templates/index.d.ts +3 -4
  119. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  120. package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
  121. package/dist/application-spec/generate-application/code/templates/lingui-rc.js +4 -4
  122. package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
  123. package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
  124. package/dist/application-spec/generate-application/code/templates/root-tsconfig.d.ts +6 -0
  125. package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
  126. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
  127. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +1 -1
  128. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +5 -5
  129. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +9 -3
  130. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  131. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +2 -2
  132. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +33 -7
  133. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  134. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +58 -0
  135. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -0
  136. package/dist/application-spec/generate-application/code/templates/spec-code/index.d.ts +2 -0
  137. package/dist/application-spec/generate-application/code/templates/spec-code/index.js +1 -0
  138. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.d.ts +18 -0
  139. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.js +41 -0
  140. package/dist/application-spec/generate-application/code/templates/spec-messages/index.d.ts +1 -0
  141. package/dist/application-spec/generate-application/code/templates/spec-messages/index.js +1 -0
  142. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.d.ts +20 -0
  143. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.js +6 -0
  144. package/dist/application-spec/generate-application/code/templates/story/phx-module.d.ts +8 -2
  145. package/dist/application-spec/generate-application/code/templates/story/phx-module.js +15 -3
  146. package/dist/application-spec/generate-application/code/templates/story/wrapper.d.ts +3 -0
  147. package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -1
  148. package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
  149. package/dist/application-spec/generate-application/code/templates/tsconfig.js +1 -1
  150. package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
  151. package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
  152. package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -3
  153. package/dist/application-spec/generate-application/implementations/phx-application-types.d.ts +25 -0
  154. package/dist/application-spec/generate-application/implementations/phx-application-types.js +1 -0
  155. package/dist/application-spec/generate-application/implementations/phx-domain.d.ts +36 -0
  156. package/dist/application-spec/generate-application/implementations/phx-domain.js +1 -0
  157. package/dist/application-spec/generate-application/implementations/phx-model.d.ts +24 -0
  158. package/dist/application-spec/generate-application/implementations/phx-model.js +1 -0
  159. package/dist/application-spec/generate-application/implementations/phx.d.ts +22 -0
  160. package/dist/application-spec/generate-application/implementations/phx.js +1 -0
  161. package/dist/application-spec/generate-application/index.d.ts +4 -0
  162. package/dist/application-spec/generate-application/index.js +1 -1
  163. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +6 -4
  164. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +1 -1
  165. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +12 -4
  166. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
  167. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.d.ts +16 -0
  168. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +1 -0
  169. package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +2 -2
  170. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +35 -10
  171. package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
  172. package/dist/application-spec/generate-application/runtime/application-spec-slice.d.ts +71 -0
  173. package/dist/application-spec/generate-application/runtime/application-spec-slice.js +1 -0
  174. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +7 -5
  175. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +1 -1
  176. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +12 -7
  177. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  178. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.d.ts +16 -0
  179. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
  180. package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +2 -2
  181. package/dist/application-spec/generate-application/runtime/create-application.d.ts +57 -0
  182. package/dist/application-spec/generate-application/runtime/create-application.js +1 -0
  183. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +43 -0
  184. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js +1 -0
  185. package/dist/application-spec/generate-application/runtime/factory-data/index.d.ts +3 -0
  186. package/dist/application-spec/generate-application/runtime/factory-data/index.js +1 -0
  187. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +13 -0
  188. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -0
  189. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +16 -0
  190. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -0
  191. package/dist/application-spec/generate-application/runtime/index.d.ts +8 -0
  192. package/dist/application-spec/generate-application/runtime/index.js +1 -0
  193. package/dist/application-spec/generate-application/runtime/migrations/index.d.ts +1 -0
  194. package/dist/application-spec/generate-application/runtime/migrations/index.js +1 -0
  195. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +53 -0
  196. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +1 -0
  197. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +2 -2
  198. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +3 -2
  199. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  200. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +2 -1
  201. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +1 -1
  202. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +5 -1
  203. package/dist/application-spec/generate-application/runtime/sections/component-optic.js +1 -1
  204. package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +4 -4
  205. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +15 -6
  206. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  207. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +9 -5
  208. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
  209. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +3 -1
  210. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.js +1 -1
  211. package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +2 -2
  212. package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +4 -6
  213. package/dist/application-spec/generate-application/runtime/spec-code/index.d.ts +2 -0
  214. package/dist/application-spec/generate-application/runtime/spec-code/index.js +1 -0
  215. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +18 -0
  216. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.js +1 -0
  217. package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.d.ts +17 -0
  218. package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.js +1 -0
  219. package/dist/application-spec/generate-application/runtime/spec-runtime.d.ts +21 -0
  220. package/dist/application-spec/generate-application/runtime/spec-runtime.js +1 -0
  221. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.d.ts +9 -0
  222. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.js +1 -0
  223. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.d.ts +8 -0
  224. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.js +1 -0
  225. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +28 -0
  226. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.js +1 -0
  227. package/dist/application-spec/generate-application/runtime-spec/index.d.ts +5 -0
  228. package/dist/application-spec/generate-application/runtime-spec/index.js +1 -0
  229. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +103 -0
  230. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -0
  231. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +40 -0
  232. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.js +1 -0
  233. package/dist/application-spec/index.d.ts +1 -0
  234. package/dist/application-spec/index.js +1 -1
  235. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +34 -0
  236. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  237. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
  238. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
  239. package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.d.ts +9 -0
  240. package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
  241. package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
  242. package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
  243. package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
  244. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +47 -4
  245. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  246. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  247. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
  248. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  249. package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
  250. package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
  251. package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.d.ts +3 -0
  252. package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.js +1 -0
  253. package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +5 -0
  254. package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -0
  255. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
  256. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
  257. package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.d.ts +8 -0
  258. package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.js +1 -0
  259. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.d.ts +10 -0
  260. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.js +1 -0
  261. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.d.ts +98 -0
  262. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.js +1 -0
  263. package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.d.ts +13 -0
  264. package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.js +1 -0
  265. package/dist/application-spec/parse-application-files/spec/components/bindings/index.d.ts +2 -0
  266. package/dist/application-spec/parse-application-files/spec/components/bindings/index.js +1 -1
  267. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.d.ts +24 -0
  268. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.js +1 -0
  269. package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +1 -9
  270. package/dist/application-spec/parse-application-files/spec/components/component-entry.js +1 -1
  271. package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +1 -54
  272. package/dist/application-spec/parse-application-files/spec/components/component-filter.js +1 -1
  273. package/dist/application-spec/parse-application-files/spec/components/component-state-type.d.ts +8 -0
  274. package/dist/application-spec/parse-application-files/spec/components/component-state-type.js +1 -0
  275. package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.d.ts +13 -0
  276. package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.js +1 -0
  277. package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -1
  278. package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
  279. package/dist/application-spec/parse-application-files/spec/components/static-entity-id.d.ts +14 -0
  280. package/dist/application-spec/parse-application-files/spec/components/static-entity-id.js +1 -0
  281. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +6 -0
  282. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  283. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +7 -4
  284. package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
  285. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +24 -0
  286. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
  287. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
  288. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.js +1 -0
  289. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts +9 -0
  290. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js +1 -0
  291. package/dist/application-spec/parse-application-files/spec/expressions/expression.d.ts +1 -28
  292. package/dist/application-spec/parse-application-files/spec/expressions/expression.js +1 -1
  293. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -3
  294. package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
  295. package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
  296. package/dist/application-spec/parse-application-files/spec/expressions/index.js +1 -1
  297. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
  298. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +3 -1
  299. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  300. package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +2 -2
  301. package/dist/application-spec/parse-application-files/spec/invariants/invariants.js +1 -1
  302. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +7 -2
  303. package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
  304. package/dist/application-spec/parse-application-files/spec/model/index.d.ts +1 -0
  305. package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
  306. package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.d.ts +10 -0
  307. package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.js +1 -0
  308. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
  309. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
  310. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
  311. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
  312. package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
  313. package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
  314. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
  315. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
  316. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
  317. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  318. package/dist/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
  319. package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
  320. package/dist/client/authorized-client.d.ts +3 -1
  321. package/dist/client/authorized-client.js +1 -1
  322. package/dist/client/contract.d.ts +17 -0
  323. package/dist/client/index.d.ts +1 -1
  324. package/dist/client/local-authorized-client.d.ts +3 -1
  325. package/dist/client/local-authorized-client.js +1 -1
  326. package/dist/client/memory-authorized-client.d.ts +4 -1
  327. package/dist/client/memory-authorized-client.js +1 -1
  328. package/dist/client/phoenix-api.d.ts +809 -118
  329. package/dist/configurator/ConfiguratorApp.js +1 -1
  330. package/dist/configurator/app-loader-content/DefaultAppLoaderContent.d.ts +2 -0
  331. package/dist/configurator/app-loader-content/DefaultAppLoaderContent.js +5 -0
  332. package/dist/configurator/app-loader-content/index.d.ts +1 -0
  333. package/dist/configurator/app-loader-content/index.js +1 -0
  334. package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
  335. package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
  336. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  337. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +54 -3
  338. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  339. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +40 -7
  340. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  341. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +1 -1
  342. package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
  343. package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
  344. package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
  345. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
  346. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
  347. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
  348. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  349. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.d.ts +12 -0
  350. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.js +1 -0
  351. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +14 -1
  352. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  353. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +70 -7
  354. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  355. package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.d.ts +11 -0
  356. package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.js +1 -0
  357. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
  358. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  359. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  360. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -2
  361. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  362. package/dist/configurator/common/configurator-interface.d.ts +145 -5
  363. package/dist/configurator/common/configurator-interface.js +1 -1
  364. package/dist/configurator/common/index.d.ts +3 -1
  365. package/dist/configurator/common/index.js +1 -1
  366. package/dist/configurator/common/use-reset-camera.d.ts +6 -0
  367. package/dist/configurator/common/use-reset-camera.js +1 -0
  368. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.d.ts +5 -0
  369. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.js +1 -0
  370. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +6 -0
  371. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -0
  372. package/dist/configurator/configuration-not-found-page/index.d.ts +2 -0
  373. package/dist/configurator/configuration-not-found-page/index.js +1 -0
  374. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +12 -0
  375. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -0
  376. package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
  377. package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
  378. package/dist/configurator/configurator-context/ViewportStateSync.d.ts +2 -2
  379. package/dist/configurator/configurator-context/ViewportStateSync.js +1 -1
  380. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +11 -1
  381. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +1 -1
  382. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +6 -0
  383. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -0
  384. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +7 -0
  385. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -0
  386. package/dist/configurator/configurator-error-page/index.d.ts +2 -0
  387. package/dist/configurator/configurator-error-page/index.js +1 -0
  388. package/dist/configurator/index.d.ts +10 -0
  389. package/dist/configurator/index.js +1 -1
  390. package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
  391. package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
  392. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  393. package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +3 -2
  394. package/dist/configurator/pages/DefaultNotAuthenticatedPage.d.ts +8 -0
  395. package/dist/configurator/pages/DefaultNotAuthenticatedPage.js +1 -0
  396. package/dist/configurator/pages/DefaultPresetUi.d.ts +7 -0
  397. package/dist/configurator/pages/DefaultPresetUi.js +1 -0
  398. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  399. package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
  400. package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
  401. package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
  402. package/dist/configurator/pages/RootPage.js +1 -1
  403. package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
  404. package/dist/configurator/pages/configurator-layout-name.js +1 -0
  405. package/dist/configurator/pages/default-configurator-elements.d.ts +13 -0
  406. package/dist/configurator/pages/default-configurator-elements.js +1 -0
  407. package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
  408. package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
  409. package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
  410. package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
  411. package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
  412. package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
  413. package/dist/configurator/pages/default-elements/index.d.ts +5 -0
  414. package/dist/configurator/pages/default-elements/index.js +1 -0
  415. package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
  416. package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
  417. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
  418. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
  419. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
  420. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
  421. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
  422. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
  423. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
  424. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
  425. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
  426. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
  427. package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
  428. package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
  429. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
  430. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
  431. package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
  432. package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
  433. package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
  434. package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
  435. package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
  436. package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
  437. package/dist/configurator/pages/index.d.ts +1 -0
  438. package/dist/configurator/pages/index.js +1 -1
  439. package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.d.ts +4 -0
  440. package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.js +1 -0
  441. package/dist/configurator/preset-screen-elements/PresetPageActionElement.d.ts +4 -0
  442. package/dist/configurator/preset-screen-elements/PresetPageActionElement.js +1 -0
  443. package/dist/configurator/preset-screen-elements/index.d.ts +2 -0
  444. package/dist/configurator/preset-screen-elements/index.js +1 -0
  445. package/dist/configurator/scene/index.d.ts +1 -0
  446. package/dist/configurator/scene/index.js +1 -1
  447. package/dist/configurator/scene/scene-controls/DeleteEntityFab.js +1 -1
  448. package/dist/configurator/scene/scene-controls/SelectionHotspot.js +1 -1
  449. package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
  450. package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
  451. package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragHandle.d.ts +1 -1
  452. package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts +1 -1
  453. package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
  454. package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicator.d.ts +1 -1
  455. package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts +1 -1
  456. package/dist/configurator/scene/scene-entity/drag-and-drop/shared.d.ts +2 -2
  457. package/dist/configurator/scene/scene-entity/drag-and-drop/use-drag-object.d.ts +1 -1
  458. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
  459. package/dist/configurator/scene/scene-entity/objects/SceneEntityObjectTextDecal.d.ts +1 -1
  460. package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
  461. package/dist/configurator/toolbar-actions/index.d.ts +3 -0
  462. package/dist/configurator/toolbar-actions/index.js +1 -0
  463. package/dist/configurator/toolbar-actions/use-assistant-panel.d.ts +18 -0
  464. package/dist/configurator/toolbar-actions/use-assistant-panel.js +1 -0
  465. package/dist/configurator/toolbar-actions/use-measurements.d.ts +35 -0
  466. package/dist/configurator/toolbar-actions/use-measurements.js +1 -0
  467. package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
  468. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
  469. package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
  470. package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
  471. package/dist/configurator/ui/assistant/AssistantChips.d.ts +10 -3
  472. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  473. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -2
  474. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  475. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  476. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  477. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +8 -0
  478. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
  479. package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
  480. package/dist/configurator/ui/assistant/alert/index.js +1 -0
  481. package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
  482. package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
  483. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +13 -0
  484. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -0
  485. package/dist/configurator/ui/assistant/entity-link/entity-link-selection.d.ts +22 -0
  486. package/dist/configurator/ui/assistant/entity-link/entity-link-selection.js +1 -0
  487. package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +27 -0
  488. package/dist/configurator/ui/assistant/entity-link/entity-link-state.js +1 -0
  489. package/dist/configurator/ui/assistant/entity-link/index.d.ts +2 -0
  490. package/dist/configurator/ui/assistant/entity-link/index.js +1 -0
  491. package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +19 -0
  492. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
  493. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +11 -0
  494. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
  495. package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
  496. package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
  497. package/dist/configurator/ui/assistant/form/form-model.d.ts +37 -0
  498. package/dist/configurator/ui/assistant/form/form-model.js +1 -0
  499. package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
  500. package/dist/configurator/ui/assistant/form/form-state.js +1 -0
  501. package/dist/configurator/ui/assistant/form/index.d.ts +4 -0
  502. package/dist/configurator/ui/assistant/form/index.js +1 -0
  503. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +10 -0
  504. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
  505. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
  506. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
  507. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
  508. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
  509. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
  510. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
  511. package/dist/configurator/ui/assistant/form/registry/form-element-definition.d.ts +16 -0
  512. package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
  513. package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +31 -0
  514. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
  515. package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
  516. package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
  517. package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
  518. package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
  519. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
  520. package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
  521. package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +9 -0
  522. package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
  523. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +6 -0
  524. package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
  525. package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +9 -0
  526. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
  527. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +6 -0
  528. package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
  529. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +6 -0
  530. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
  531. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
  532. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
  533. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +6 -0
  534. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
  535. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
  536. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
  537. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +38 -0
  538. package/dist/configurator/ui/assistant/form-elements/form-element-props.js +1 -0
  539. package/dist/configurator/ui/assistant/form-elements/index.d.ts +9 -0
  540. package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
  541. package/dist/configurator/ui/assistant/index.d.ts +3 -0
  542. package/dist/configurator/ui/assistant/index.js +1 -1
  543. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +16 -0
  544. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
  545. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
  546. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
  547. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
  548. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
  549. package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
  550. package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
  551. package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
  552. package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
  553. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
  554. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
  555. package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +9 -0
  556. package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -0
  557. package/dist/configurator/ui/assistant/resource-image/index.d.ts +3 -0
  558. package/dist/configurator/ui/assistant/resource-image/index.js +1 -0
  559. package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +2 -0
  560. package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -0
  561. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.d.ts +5 -0
  562. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.js +1 -0
  563. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
  564. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
  565. package/dist/configurator/ui/assistant/screenshots/index.d.ts +2 -0
  566. package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
  567. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +22 -0
  568. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
  569. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
  570. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
  571. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +4 -2
  572. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  573. package/dist/configurator/ui/assistant/thread-items.d.ts +8 -1
  574. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  575. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  576. package/dist/configurator/ui/assistant/use-follow-stream.js +1 -1
  577. package/dist/configurator/ui/configurator-layout/sidebar-keys/index.d.ts +1 -0
  578. package/dist/configurator/ui/configurator-layout/sidebar-keys/index.js +1 -0
  579. package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.d.ts +11 -0
  580. package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.js +1 -0
  581. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  582. package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
  583. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.d.ts +101 -0
  584. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +16 -0
  585. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.d.ts +1 -0
  586. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.js +1 -0
  587. package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.d.ts +1 -1
  588. package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.js +1 -1
  589. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.d.ts +4 -4
  590. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
  591. package/dist/configurator/ui/configurator-layout/slots/services/Services.js +1 -1
  592. package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.d.ts +3 -6
  593. package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.js +1 -1
  594. package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.d.ts +1 -1
  595. package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.js +1 -1
  596. package/dist/configurator/ui/configurator-layout/slots/slots.d.ts +1 -0
  597. package/dist/configurator/ui/configurator-layout/slots/slots.js +1 -1
  598. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +0 -74
  599. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
  600. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  601. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
  602. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
  603. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  604. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  605. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  606. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
  607. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
  608. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
  609. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
  610. package/dist/configurator/ui/index.d.ts +1 -0
  611. package/dist/configurator/ui/index.js +1 -1
  612. package/dist/configurator/ui/legacy/layout/common/CommonFinalizeButton.js +1 -1
  613. package/dist/configurator/ui/legacy/layout/common/CommonSummaryButton.js +1 -1
  614. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  615. package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
  616. package/dist/configurator/ui/legacy/layout/common/ResponsiveFinalizeButton.js +1 -1
  617. package/dist/configurator/ui/legacy/layout/common/SummaryReadLayout.js +1 -1
  618. package/dist/configurator/ui/legacy/layout/simple/SimpleOwnerLayout.js +1 -1
  619. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  620. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.d.ts +2 -2
  621. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  622. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  623. package/dist/configurator/ui/legacy/layout/steps/StepsSidebarFooter.js +1 -1
  624. package/dist/configurator/ui/legacy/layout/tabs/TabsOwnerLayout.js +1 -1
  625. package/dist/configurator/ui/legacy/toolbar/common/DimensionUnitSelector.js +1 -1
  626. package/dist/configurator/ui/legacy/toolbar/common/MeasurementsIndicatorsSwitch.js +1 -1
  627. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/FullscreenToolbarAction.js +1 -1
  628. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/HelpToolbarAction.js +1 -1
  629. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/MeasurementsToolbarAction.js +1 -1
  630. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/UndoRedoToolbarGroup.js +1 -1
  631. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.d.ts +0 -7
  632. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -6
  633. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  634. package/dist/configurator/ui/phoenix-layout-elements/EnterFullscreenToolbarButton.js +1 -1
  635. package/dist/configurator/ui/phoenix-layout-elements/ExitFullscreenToolbarButton.js +1 -1
  636. package/dist/configurator/ui/phoenix-layout-elements/HelpToolbarButton.js +1 -1
  637. package/dist/configurator/ui/phoenix-layout-elements/LanguageMenuAction.js +1 -1
  638. package/dist/configurator/ui/phoenix-layout-elements/LanguageToolbarButton.js +1 -1
  639. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.d.ts +1 -0
  640. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.js +1 -1
  641. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.d.ts +1 -0
  642. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.js +1 -1
  643. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsMenuAction.js +1 -1
  644. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
  645. package/dist/configurator/ui/phoenix-layout-elements/RedoToolbarButton.js +1 -1
  646. package/dist/configurator/ui/phoenix-layout-elements/ShareToolbarButton.js +1 -1
  647. package/dist/configurator/ui/phoenix-layout-elements/UndoToolbarButton.js +1 -1
  648. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  649. package/dist/configurator/ui/phoenix-layout-elements/header/common/horizontal-tabs/DesktopHorizontalTabs.js +1 -1
  650. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.d.ts +1 -1
  651. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.js +1 -1
  652. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -8
  653. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  654. package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +8 -1
  655. package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
  656. package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
  657. package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
  658. package/dist/configurator/ui/phoenix-layout-elements/share/ShareModal.js +1 -1
  659. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.d.ts +7 -8
  660. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.js +1 -1
  661. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/BasicFinalizeButton.js +1 -1
  662. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/CustomFinalizeButton.js +1 -1
  663. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/EnterSummaryButton.js +1 -1
  664. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/FinalizeActions.js +1 -1
  665. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
  666. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  667. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  668. package/dist/configurator/ui/preset-layout/PresetUi.d.ts +4 -2
  669. package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
  670. package/dist/configurator/ui/preset-layout/index.d.ts +6 -1
  671. package/dist/configurator/ui/preset-layout/index.js +1 -1
  672. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.d.ts +10 -0
  673. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -0
  674. package/dist/configurator/ui/save-message-snackbars/index.d.ts +1 -0
  675. package/dist/configurator/ui/save-message-snackbars/index.js +1 -0
  676. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +16 -19
  677. package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
  678. package/dist/docs/complex-use-cases/sketching.mdx +0 -38
  679. package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
  680. package/dist/docs/controls/select-child-entity/cardselect.mdx +1 -0
  681. package/dist/docs/dimensions/3d-scene-integration/dimension-indicators.mdx +2 -2
  682. package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +1 -1
  683. package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +1 -1
  684. package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +1 -1
  685. package/dist/docs/drag-and-drop/drag-handle.mdx +1 -1
  686. package/dist/docs/drag-and-drop/hotspot-handle.mdx +1 -1
  687. package/dist/docs/drag-and-drop/planes.mdx +1 -1
  688. package/dist/docs/drag-and-drop/rotatable.mdx +2 -2
  689. package/dist/docs/fabs/basic.mdx +6 -2
  690. package/dist/docs/index.json +136 -1
  691. package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -0
  692. package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
  693. package/dist/docs/layouts/custom-layout.mdx +2597 -0
  694. package/dist/docs/layouts/gallery/ardent-compressor.mdx +3516 -0
  695. package/dist/docs/layouts/gallery/corvid-drone.mdx +3428 -0
  696. package/dist/docs/layouts/gallery/fenwick-window.mdx +2803 -0
  697. package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6567 -0
  698. package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
  699. package/dist/docs/layouts/gallery/nightjar-guitar.mdx +3698 -0
  700. package/dist/docs/layouts/gallery/sunfold-solar.mdx +2683 -0
  701. package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +5203 -0
  702. package/dist/docs/layouts/header/fixed.mdx +2 -2
  703. package/dist/docs/layouts/header/floating.mdx +2 -2
  704. package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +380 -0
  705. package/dist/docs/layouts/sidebar-footer/basic.mdx +32 -77
  706. package/dist/docs/other-features/client-side-rendering/declarative.mdx +2 -2
  707. package/dist/docs/other-features/error-5xx.mdx +1 -1
  708. package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
  709. package/dist/docs/other-features/not-found-404.mdx +1 -1
  710. package/dist/docs/other-features/side-effects.mdx +8 -11
  711. package/dist/docs/other-features/transformers.mdx +4 -0
  712. package/dist/docs/other-features/violation-messages.mdx +52 -56
  713. package/dist/docs/phoenix/application-states.mdx +9 -7
  714. package/dist/docs/phoenix/clerk-sign-in.mdx +1 -1
  715. package/dist/docs/phoenix/components.mdx +6 -0
  716. package/dist/docs/phoenix/configurator-interface.mdx +377 -83
  717. package/dist/docs/phoenix/deployments.mdx +2 -6
  718. package/dist/docs/phoenix/domain-model.mdx +6 -0
  719. package/dist/docs/phoenix/finalization.mdx +1 -1
  720. package/dist/docs/phoenix/getting-started.mdx +6 -3
  721. package/dist/docs/phoenix/layout-slots.mdx +116 -0
  722. package/dist/docs/phoenix/localization.mdx +10 -6
  723. package/dist/docs/phoenix/migration-guide.mdx +24 -11
  724. package/dist/docs/phoenix/phoenix-cli.mdx +88 -44
  725. package/dist/docs/phoenix/project-structure.mdx +78 -36
  726. package/dist/docs/phoenix/quickstart.mdx +9 -9
  727. package/dist/docs/phoenix/sdk-builder-workflow.mdx +13 -11
  728. package/dist/docs/phoenix/sessions-and-access.mdx +2 -0
  729. package/dist/docs/phoenix/testing.mdx +148 -0
  730. package/dist/docs/phoenix/webhook-membership.mdx +10 -9
  731. package/dist/docs/phoenix/webhooks.mdx +23 -6
  732. package/dist/docs/selection-and-highlight/hotspots.mdx +2 -0
  733. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -11
  734. package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
  735. package/dist/domain/admin-domain/index.js +1 -1
  736. package/dist/domain/application/GetApplicationWrapperHandler.d.ts +1 -1
  737. package/dist/domain/application/application-config.d.ts +7 -3
  738. package/dist/domain/application/assistant/assistant-fields.d.ts +12 -0
  739. package/dist/domain/application/assistant/assistant-fields.js +1 -0
  740. package/dist/domain/application/assistant/assistant-manifest.d.ts +25 -2
  741. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +46 -3
  742. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
  743. package/dist/domain/application/assistant/build-assistant-lenses.d.ts +14 -0
  744. package/dist/domain/application/assistant/build-assistant-lenses.js +5 -0
  745. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  746. package/dist/domain/application/assistant/create-assistant-execution-schema.d.ts +32 -0
  747. package/dist/domain/application/assistant/create-assistant-execution-schema.js +1 -0
  748. package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
  749. package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
  750. package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +174 -0
  751. package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
  752. package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
  753. package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
  754. package/dist/domain/application/assistant/form/index.d.ts +4 -0
  755. package/dist/domain/application/assistant/form/index.js +1 -0
  756. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  757. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  758. package/dist/domain/application/assistant/index.d.ts +8 -2
  759. package/dist/domain/application/assistant/index.js +1 -1
  760. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
  761. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
  762. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
  763. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
  764. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +50 -0
  765. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
  766. package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
  767. package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
  768. package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
  769. package/dist/domain/application/assistant/session-setup/index.js +1 -0
  770. package/dist/domain/application/assistant-recipe-groups.d.ts +3 -1
  771. package/dist/domain/application/configurator-builder.d.ts +11 -2
  772. package/dist/domain/application/configurator-builder.js +1 -1
  773. package/dist/domain/application/create-initial-published-data.d.ts +5 -5
  774. package/dist/domain/application/index.d.ts +1 -2
  775. package/dist/domain/application/index.js +1 -1
  776. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
  777. package/dist/domain/application/published-data/map-published-data.d.ts +7 -3
  778. package/dist/domain/application/standard-properties.js +1 -1
  779. package/dist/domain/application/web-component-property.d.ts +3 -1
  780. package/dist/domain/application/web-component-property.js +1 -1
  781. package/dist/domain/available-system-components.d.ts +1 -1
  782. package/dist/domain/available-system-components.js +1 -1
  783. package/dist/domain/core/component/domain-component-optic.d.ts +1 -2
  784. package/dist/domain/core/component/domain-component-optic.js +2 -2
  785. package/dist/domain/core/component/system-component-filter.d.ts +15 -2
  786. package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
  787. package/dist/domain/core/expression/custom-expression.d.ts +16 -3
  788. package/dist/domain/core/invariant/custom-invariants.d.ts +6 -14
  789. package/dist/domain/core/invariant/invariants.d.ts +1 -4
  790. package/dist/domain/core/invariant/violation.d.ts +50 -2
  791. package/dist/domain/core/invariant/violation.js +1 -1
  792. package/dist/domain/core/model/model.d.ts +1 -1
  793. package/dist/domain/core/recipe/recipes.d.ts +18 -50
  794. package/dist/domain/core/recipe/recipes.js +1 -1
  795. package/dist/domain/core/relation/all-of-type-relation.d.ts +8 -21
  796. package/dist/domain/core/relation/all-of-type-relation.js +1 -1
  797. package/dist/domain/core/relation/direct-relation.d.ts +13 -24
  798. package/dist/domain/core/relation/index.d.ts +0 -1
  799. package/dist/domain/core/relation/indirect-relation.d.ts +12 -67
  800. package/dist/domain/core/relation/indirect-relation.js +1 -1
  801. package/dist/domain/core/relation/relation-factory.d.ts +19 -15
  802. package/dist/domain/core/relation/relation-factory.js +1 -1
  803. package/dist/domain/core/schema/extended-schema-validator.js +1 -1
  804. package/dist/domain/core/state/state.d.ts +1 -1
  805. package/dist/domain/domain-builder.d.ts +9 -3
  806. package/dist/domain/domain-builder.js +1 -1
  807. package/dist/domain/domain-context/index.d.ts +1 -1
  808. package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
  809. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  810. package/dist/domain/domain-context/undo-system.d.ts +28 -1
  811. package/dist/domain/domain-context/undo-system.js +1 -1
  812. package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
  813. package/dist/domain/domain-runtime/access/selectors.js +1 -1
  814. package/dist/domain/domain-runtime/access/types.d.ts +2 -0
  815. package/dist/domain/domain-runtime/access/types.js +1 -1
  816. package/dist/domain/domain-runtime/application.d.ts +39 -0
  817. package/dist/domain/domain-runtime/application.js +1 -0
  818. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +15 -13
  819. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  820. package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
  821. package/dist/domain/domain-runtime/domain-runtime.d.ts +76 -20
  822. package/dist/domain/domain-runtime/domain-runtime.js +1 -1
  823. package/dist/domain/domain-runtime/environment/initialize.d.ts +1 -1
  824. package/dist/domain/domain-runtime/environment/types.d.ts +1 -1
  825. package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +21 -0
  826. package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
  827. package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
  828. package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
  829. package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
  830. package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
  831. package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
  832. package/dist/domain/domain-runtime/errors/index.js +1 -0
  833. package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
  834. package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
  835. package/dist/domain/domain-runtime/index.d.ts +2 -0
  836. package/dist/domain/domain-runtime/index.js +1 -1
  837. package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +24 -0
  838. package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -0
  839. package/dist/domain/domain-runtime/spec/index.d.ts +2 -2
  840. package/dist/domain/domain-runtime/spec/index.js +1 -1
  841. package/dist/domain/domain-runtime/spec/initialize.d.ts +11 -0
  842. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  843. package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +27 -12
  844. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
  845. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
  846. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
  847. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +4 -2
  848. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
  849. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.d.ts +23 -0
  850. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +1 -0
  851. package/dist/domain/domain-runtime/spec/module-checks/project-modules.d.ts +8 -1
  852. package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -1
  853. package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -1
  854. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +3 -4
  855. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
  856. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +7 -7
  857. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -1
  858. package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.d.ts +2 -2
  859. package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -1
  860. package/dist/domain/domain-runtime/spec/selectors.d.ts +3 -1
  861. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  862. package/dist/domain/domain-runtime/spec/types.d.ts +2 -0
  863. package/dist/domain/domain-runtime/web-component/actions.d.ts +3 -0
  864. package/dist/domain/domain-runtime/web-component/actions.js +1 -1
  865. package/dist/domain/domain-runtime/web-component/initialize.d.ts +1 -0
  866. package/dist/domain/domain-runtime/web-component/initialize.js +1 -1
  867. package/dist/domain/domain-runtime/web-component/selectors.d.ts +2 -0
  868. package/dist/domain/domain-runtime/web-component/selectors.js +1 -1
  869. package/dist/domain/domain-runtime/web-component/types.d.ts +6 -3
  870. package/dist/domain/extensions/attribute-switch.d.ts +1 -1
  871. package/dist/domain/extensions/attribute-switch.js +1 -1
  872. package/dist/domain/extensions/canvas-config.d.ts +1 -1
  873. package/dist/domain/extensions/common/angle-indicator-schema.d.ts +2 -2
  874. package/dist/domain/extensions/common/dimension-indicator-schema.d.ts +2 -2
  875. package/dist/domain/extensions/editable-angle-indicator.d.ts +1 -1
  876. package/dist/domain/extensions/editable-distance-dimension-indicator.d.ts +1 -1
  877. package/dist/domain/extensions/editable-offset-indicator.d.ts +1 -1
  878. package/dist/domain/extensions/editable-offset-indicator.js +1 -1
  879. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +24 -0
  880. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
  881. package/dist/domain/extensions/export-images/client-side-image.d.ts +14 -0
  882. package/dist/domain/extensions/export-images/client-side-image.js +1 -0
  883. package/dist/domain/extensions/export-images/index.d.ts +3 -0
  884. package/dist/domain/extensions/export-images/index.js +1 -0
  885. package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +4 -4
  886. package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
  887. package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -1
  888. package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -1
  889. package/dist/domain/extensions/horizontal-tabs.d.ts +2 -2
  890. package/dist/domain/extensions/index.d.ts +1 -2
  891. package/dist/domain/extensions/index.js +1 -1
  892. package/dist/domain/extensions/list-selector-dimension-indicator.d.ts +1 -1
  893. package/dist/domain/extensions/navigation-steps.d.ts +2 -2
  894. package/dist/domain/extensions/offset-indicator.js +1 -1
  895. package/dist/domain/extensions/rotation-handle.d.ts +2 -2
  896. package/dist/domain/extensions/scene-entity-animation.js +1 -1
  897. package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
  898. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +27 -9
  899. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  900. package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
  901. package/dist/domain/mocks/create-mock-domain.js +1 -1
  902. package/dist/domain/mocks/create-mock-state.d.ts +2 -2
  903. package/dist/domain/mocks/create-test-application-config.d.ts +59 -0
  904. package/dist/domain/mocks/create-test-application-config.js +1 -0
  905. package/dist/domain/mocks/index.d.ts +1 -0
  906. package/dist/domain/mocks/index.js +1 -1
  907. package/dist/domain/projections/blender-projections/camera.d.ts +1 -1
  908. package/dist/domain/system-components/application-config.d.ts +2 -2
  909. package/dist/domain/system-components/child-entity-selection.js +1 -1
  910. package/dist/domain/system-components/collision-box-geometry.d.ts +4 -2
  911. package/dist/domain/system-components/collision-geometry.d.ts +4 -2
  912. package/dist/domain/system-components/collision-point-geometry.d.ts +4 -2
  913. package/dist/domain/system-components/common/material-override-schema.d.ts +2 -2
  914. package/dist/domain/system-components/common/recipes.d.ts +21 -3
  915. package/dist/domain/system-components/common/recipes.js +1 -1
  916. package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
  917. package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
  918. package/dist/domain/system-components/constraint.d.ts +10 -23
  919. package/dist/domain/system-components/drag-handle.d.ts +1 -1
  920. package/dist/domain/system-components/drag-handle.js +1 -1
  921. package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
  922. package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
  923. package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
  924. package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
  925. package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
  926. package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
  927. package/dist/domain/system-components/material-swatch.js +1 -1
  928. package/dist/domain/system-components/scene-entity-material-override.d.ts +1 -1
  929. package/dist/domain/system-components/scene-entity-object-material-override.d.ts +1 -1
  930. package/dist/domain/system-components/scene-entity-object-text-decal.d.ts +1 -1
  931. package/dist/domain/system-components/scene-entity-object-transimissive-material-override.d.ts +1 -1
  932. package/dist/domain/system-components/scene-entity-transimissive-material-override.d.ts +1 -1
  933. package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
  934. package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
  935. package/dist/domain/utils/eval-cache.d.ts +1 -1
  936. package/dist/domain/utils/map-nested-object.d.ts +1 -1
  937. package/dist/editor/Editor.d.ts +7 -0
  938. package/dist/editor/Editor.js +1 -1
  939. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  940. package/dist/editor/domain-editors/apply-spec-update.d.ts +10 -2
  941. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  942. package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -16
  943. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  944. package/dist/editor/mocks/CreateMockYaml.js +2 -2
  945. package/dist/editor/mocks/EditorMockContext.d.ts +2 -0
  946. package/dist/editor/mocks/EditorMockContext.js +1 -1
  947. package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
  948. package/dist/globals/index.d.ts +2 -0
  949. package/dist/i18n/locales/cs/messages.js +1 -1
  950. package/dist/i18n/locales/da/messages.js +1 -1
  951. package/dist/i18n/locales/de/messages.js +1 -1
  952. package/dist/i18n/locales/de-AT/messages.js +1 -1
  953. package/dist/i18n/locales/en/messages.js +1 -1
  954. package/dist/i18n/locales/en-AU/messages.js +1 -1
  955. package/dist/i18n/locales/en-GB/messages.js +1 -1
  956. package/dist/i18n/locales/es/messages.js +1 -1
  957. package/dist/i18n/locales/fr/messages.js +1 -1
  958. package/dist/i18n/locales/hu/messages.js +1 -1
  959. package/dist/i18n/locales/it/messages.js +1 -1
  960. package/dist/i18n/locales/nl/messages.js +1 -1
  961. package/dist/i18n/locales/pl/messages.js +1 -1
  962. package/dist/i18n/locales/pt/messages.js +1 -1
  963. package/dist/i18n/locales/ro/messages.js +1 -1
  964. package/dist/i18n/locales/sk/messages.js +1 -1
  965. package/dist/i18n/locales/tr/messages.js +1 -1
  966. package/dist/legacy/domain-cli/gen/configurator-builder.js +13 -12
  967. package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -1
  968. package/dist/legacy/domain-cli/gen/defaults.js +1 -7
  969. package/dist/legacy/domain-cli/gen/invariants.js +3 -4
  970. package/dist/legacy/domain-cli/gen/relations.js +1 -1
  971. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  972. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  973. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +176 -148
  974. package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
  975. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  976. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  977. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  978. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +13 -1
  979. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +15 -13
  980. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +15 -14
  981. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
  982. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +14 -13
  983. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
  984. package/dist/phoenix/application-spec/application-spec-builder.d.ts +0 -2
  985. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  986. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +0 -2
  987. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  988. package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
  989. package/dist/phoenix/application-spec/generate-project-files.d.ts +0 -2
  990. package/dist/phoenix/application-spec/project-files.js +1 -1
  991. package/dist/phoenix/bin.d.ts +2 -0
  992. package/dist/phoenix/bin.js +2 -0
  993. package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
  994. package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
  995. package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
  996. package/dist/phoenix/check-configs/eslint-config.js +1 -0
  997. package/dist/phoenix/check-configs/index.d.ts +8 -0
  998. package/dist/phoenix/check-configs/index.js +1 -0
  999. package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
  1000. package/dist/phoenix/check-configs/typescript-project.js +1 -0
  1001. package/dist/phoenix/cli.d.ts +0 -1
  1002. package/dist/phoenix/cli.js +1 -2
  1003. package/dist/phoenix/commands/build.js +1 -1
  1004. package/dist/phoenix/commands/check.js +1 -1
  1005. package/dist/phoenix/commands/clean.js +1 -1
  1006. package/dist/phoenix/commands/deploy.js +2 -2
  1007. package/dist/phoenix/commands/deps/deps.d.ts +73 -0
  1008. package/dist/phoenix/commands/deps/deps.js +3 -0
  1009. package/dist/phoenix/commands/deps/index.d.ts +1 -0
  1010. package/dist/phoenix/commands/deps/index.js +1 -0
  1011. package/dist/phoenix/commands/deps/sdk-manifest.d.ts +12 -0
  1012. package/dist/phoenix/commands/deps/sdk-manifest.js +1 -0
  1013. package/dist/phoenix/commands/dev.js +5 -5
  1014. package/dist/phoenix/commands/fix.js +1 -1
  1015. package/dist/phoenix/commands/index.d.ts +1 -0
  1016. package/dist/phoenix/commands/index.js +1 -1
  1017. package/dist/phoenix/commands/init.d.ts +17 -5
  1018. package/dist/phoenix/commands/init.js +1 -1
  1019. package/dist/phoenix/commands/link.js +1 -1
  1020. package/dist/phoenix/commands/prettier.js +1 -1
  1021. package/dist/phoenix/commands/sync.js +1 -1
  1022. package/dist/phoenix/commands/unlink.js +1 -1
  1023. package/dist/phoenix/services/application-spec-project-watcher.d.ts +2 -2
  1024. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  1025. package/dist/phoenix/services/lingui.d.ts +8 -0
  1026. package/dist/phoenix/services/lingui.js +1 -1
  1027. package/dist/phoenix/services/source-archive.d.ts +1 -0
  1028. package/dist/phoenix/services/source-archive.js +1 -1
  1029. package/dist/phoenix/services/swc.js +1 -1
  1030. package/dist/phoenix/services/vite-config.js +1 -1
  1031. package/dist/phoenix/utils/git/index.d.ts +1 -0
  1032. package/dist/phoenix/utils/git/index.js +1 -0
  1033. package/dist/phoenix/utils/git/is-inside-git-repository.d.ts +6 -0
  1034. package/dist/phoenix/utils/git/is-inside-git-repository.js +1 -0
  1035. package/dist/phoenix/utils/index.d.ts +5 -2
  1036. package/dist/phoenix/utils/index.js +1 -1
  1037. package/dist/phoenix/utils/node-version/index.d.ts +1 -0
  1038. package/dist/phoenix/utils/node-version/index.js +1 -0
  1039. package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
  1040. package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
  1041. package/dist/phoenix/utils/package-info.d.ts +0 -9
  1042. package/dist/phoenix/utils/package-info.js +1 -1
  1043. package/dist/phoenix/utils/package-manager/index.d.ts +2 -0
  1044. package/dist/phoenix/utils/package-manager/index.js +1 -0
  1045. package/dist/phoenix/utils/package-manager/package-manager-commands.d.ts +19 -0
  1046. package/dist/phoenix/utils/package-manager/package-manager-commands.js +1 -0
  1047. package/dist/phoenix/utils/package-manager/pnpm-project.d.ts +9 -0
  1048. package/dist/phoenix/utils/package-manager/pnpm-project.js +1 -0
  1049. package/dist/phoenix/utils/run-command.d.ts +11 -0
  1050. package/dist/phoenix/utils/run-command.js +1 -1
  1051. package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
  1052. package/dist/phoenix/utils/sdk-tool/index.js +1 -0
  1053. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
  1054. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
  1055. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +1 -1
  1056. package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.d.ts +6 -0
  1057. package/dist/react-sdk/application-runtime/common-services/analytics/frontend-analytics.js +1 -0
  1058. package/dist/react-sdk/application-runtime/common-services/analytics/index.d.ts +1 -0
  1059. package/dist/react-sdk/application-runtime/common-services/analytics/index.js +1 -1
  1060. package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
  1061. package/dist/react-sdk/application-runtime/hooks/index.d.ts +2 -0
  1062. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  1063. package/dist/react-sdk/application-runtime/hooks/loading/index.d.ts +5 -0
  1064. package/dist/react-sdk/application-runtime/hooks/loading/index.js +1 -0
  1065. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.d.ts +11 -0
  1066. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.js +1 -0
  1067. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.d.ts +8 -0
  1068. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.js +1 -0
  1069. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.d.ts +7 -0
  1070. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.js +1 -0
  1071. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.d.ts +9 -0
  1072. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.js +1 -0
  1073. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.d.ts +24 -0
  1074. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.js +1 -0
  1075. package/dist/react-sdk/application-runtime/hooks/responsive/index.d.ts +3 -0
  1076. package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
  1077. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
  1078. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
  1079. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +26 -0
  1080. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
  1081. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
  1082. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
  1083. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
  1084. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
  1085. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +7 -0
  1086. package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
  1087. package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
  1088. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.d.ts +4 -11
  1089. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.js +1 -1
  1090. package/dist/react-sdk/application-runtime/hooks/use-web-component.d.ts +5 -0
  1091. package/dist/react-sdk/application-runtime/hooks/use-web-component.js +1 -1
  1092. package/dist/react-sdk/application-runtime/host-properties/actions.d.ts +15 -0
  1093. package/dist/react-sdk/application-runtime/host-properties/actions.js +1 -0
  1094. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.d.ts +30 -0
  1095. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.js +1 -0
  1096. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.d.ts +7 -0
  1097. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.js +1 -0
  1098. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.d.ts +21 -0
  1099. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.js +1 -0
  1100. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.d.ts +42 -0
  1101. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.js +1 -0
  1102. package/dist/react-sdk/application-runtime/host-properties/index.d.ts +8 -0
  1103. package/dist/react-sdk/application-runtime/host-properties/index.js +1 -0
  1104. package/dist/react-sdk/application-runtime/host-properties/initialize.d.ts +7 -0
  1105. package/dist/react-sdk/application-runtime/host-properties/initialize.js +1 -0
  1106. package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +54 -0
  1107. package/dist/react-sdk/application-runtime/host-properties/selectors.js +1 -0
  1108. package/dist/react-sdk/application-runtime/host-properties/types.d.ts +18 -0
  1109. package/dist/react-sdk/application-runtime/host-properties/types.js +1 -0
  1110. package/dist/react-sdk/application-runtime/index.d.ts +3 -0
  1111. package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
  1112. package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
  1113. package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
  1114. package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
  1115. package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
  1116. package/dist/react-sdk/application-runtime/loading/actions.d.ts +45 -0
  1117. package/dist/react-sdk/application-runtime/loading/actions.js +1 -0
  1118. package/dist/react-sdk/application-runtime/loading/index.d.ts +4 -0
  1119. package/dist/react-sdk/application-runtime/loading/index.js +1 -0
  1120. package/dist/react-sdk/application-runtime/loading/initialize.d.ts +3 -0
  1121. package/dist/react-sdk/application-runtime/loading/initialize.js +1 -0
  1122. package/dist/react-sdk/application-runtime/loading/selectors.d.ts +18 -0
  1123. package/dist/react-sdk/application-runtime/loading/selectors.js +1 -0
  1124. package/dist/react-sdk/application-runtime/loading/types.d.ts +59 -0
  1125. package/dist/react-sdk/application-runtime/loading/types.js +1 -0
  1126. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  1127. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.d.ts +6 -0
  1128. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.js +1 -1
  1129. package/dist/react-sdk/application-runtime/provider/ApplicationType.d.ts +7 -0
  1130. package/dist/react-sdk/application-runtime/provider/ApplicationType.js +1 -1
  1131. package/dist/react-sdk/application-runtime/responsive/actions.d.ts +47 -0
  1132. package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
  1133. package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
  1134. package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
  1135. package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
  1136. package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
  1137. package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
  1138. package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
  1139. package/dist/react-sdk/application-runtime/responsive/types.d.ts +104 -0
  1140. package/dist/react-sdk/application-runtime/responsive/types.js +1 -0
  1141. package/dist/react-sdk/application-runtime/routing/access-service.d.ts +1 -0
  1142. package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
  1143. package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
  1144. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +346 -26
  1145. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  1146. package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
  1147. package/dist/react-sdk/domain-application-context/DomainLifecycleBoundary.js +1 -1
  1148. package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
  1149. package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
  1150. package/dist/react-sdk/domain-context/common-hooks/index.d.ts +9 -0
  1151. package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
  1152. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
  1153. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.js +1 -0
  1154. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +41 -0
  1155. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -0
  1156. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +5 -4
  1157. package/dist/react-sdk/domain-context/component-hooks/index.d.ts +1 -0
  1158. package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
  1159. package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
  1160. package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
  1161. package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
  1162. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
  1163. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
  1164. package/dist/react-sdk/domain-context/index.d.ts +9 -1
  1165. package/dist/react-sdk/domain-context/index.js +1 -1
  1166. package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
  1167. package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
  1168. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +8 -0
  1169. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -0
  1170. package/dist/react-sdk/domain-context/system-hooks/hover-hooks.js +1 -1
  1171. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.d.ts +24 -0
  1172. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.js +1 -0
  1173. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +11 -0
  1174. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  1175. package/dist/react-sdk/domain-context/system-hooks/selection-hooks.js +1 -1
  1176. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.d.ts +32 -0
  1177. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.js +1 -0
  1178. package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.d.ts +57 -0
  1179. package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.js +1 -0
  1180. package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.d.ts +61 -0
  1181. package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -0
  1182. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.d.ts +20 -0
  1183. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -0
  1184. package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
  1185. package/dist/react-sdk/handlers/FinalizeActionRunner.d.ts +13 -0
  1186. package/dist/react-sdk/handlers/FinalizeActionRunner.js +1 -0
  1187. package/dist/react-sdk/handlers/FinalizeActionsHost.d.ts +10 -0
  1188. package/dist/react-sdk/handlers/FinalizeActionsHost.js +1 -0
  1189. package/dist/react-sdk/handlers/FinalizeActionsProvider.d.ts +11 -0
  1190. package/dist/react-sdk/handlers/FinalizeActionsProvider.js +1 -0
  1191. package/dist/react-sdk/handlers/finalize-actions-context.d.ts +6 -0
  1192. package/dist/react-sdk/handlers/finalize-actions-context.js +1 -0
  1193. package/dist/react-sdk/handlers/finalize-actions-store.d.ts +23 -0
  1194. package/dist/react-sdk/handlers/finalize-actions-store.js +1 -0
  1195. package/dist/react-sdk/handlers/index.d.ts +6 -0
  1196. package/dist/react-sdk/handlers/index.js +1 -1
  1197. package/dist/react-sdk/handlers/use-finalize-action.d.ts +32 -0
  1198. package/dist/react-sdk/handlers/use-finalize-action.js +1 -0
  1199. package/dist/react-sdk/handlers/use-finalize-actions.d.ts +53 -0
  1200. package/dist/react-sdk/handlers/use-finalize-actions.js +1 -0
  1201. package/dist/react-sdk/index.d.ts +2 -0
  1202. package/dist/react-sdk/index.js +1 -1
  1203. package/dist/react-sdk/loading-state/LoaderHost.d.ts +20 -0
  1204. package/dist/react-sdk/loading-state/LoaderHost.js +1 -0
  1205. package/dist/react-sdk/loading-state/built-in-loading-phase.d.ts +9 -0
  1206. package/dist/react-sdk/loading-state/built-in-loading-phase.js +1 -0
  1207. package/dist/react-sdk/loading-state/create-app-loader.d.ts +18 -0
  1208. package/dist/react-sdk/loading-state/create-app-loader.js +1 -0
  1209. package/dist/react-sdk/loading-state/index.d.ts +4 -2
  1210. package/dist/react-sdk/loading-state/index.js +1 -1
  1211. package/dist/react-sdk/loading-state/{LoadingStateProvider.d.ts → loading-state-hooks.d.ts} +3 -12
  1212. package/dist/react-sdk/loading-state/loading-state-hooks.js +1 -0
  1213. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.d.ts +17 -0
  1214. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.js +1 -0
  1215. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.d.ts +17 -0
  1216. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.js +1 -0
  1217. package/dist/react-sdk/page-elements/configurator-error-page-props.d.ts +20 -0
  1218. package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
  1219. package/dist/react-sdk/page-elements/create-configuration-not-found-page.d.ts +15 -0
  1220. package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
  1221. package/dist/react-sdk/page-elements/create-configurator-error-page.d.ts +14 -0
  1222. package/dist/react-sdk/page-elements/create-configurator-error-page.js +1 -0
  1223. package/dist/react-sdk/page-elements/create-preset-ui.d.ts +9 -0
  1224. package/dist/react-sdk/page-elements/create-preset-ui.js +1 -0
  1225. package/dist/react-sdk/page-elements/index.d.ts +6 -0
  1226. package/dist/react-sdk/page-elements/index.js +1 -0
  1227. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
  1228. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
  1229. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
  1230. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
  1231. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
  1232. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
  1233. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
  1234. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
  1235. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
  1236. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
  1237. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
  1238. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
  1239. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
  1240. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
  1241. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
  1242. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
  1243. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
  1244. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
  1245. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
  1246. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
  1247. package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
  1248. package/dist/react-sdk/scene-control-elements/index.js +1 -0
  1249. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
  1250. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.js +1 -0
  1251. package/dist/react-sdk/session/NotAuthenticatedPage.d.ts +4 -0
  1252. package/dist/react-sdk/session/NotAuthenticatedPage.js +1 -1
  1253. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  1254. package/dist/react-sdk/web-component/create-web-component.js +1 -1
  1255. package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
  1256. package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
  1257. package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
  1258. package/dist/react-sdk/web-component/god-mode/index.js +1 -0
  1259. package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
  1260. package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
  1261. package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
  1262. package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
  1263. package/dist/ui-sdk/icons/__generated/index.d.ts +4 -0
  1264. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  1265. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  1266. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +9 -0
  1267. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.js +1 -1
  1268. package/dist/ui-sdk/responsive-application/index.d.ts +1 -0
  1269. package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +59 -0
  1270. package/dist/ui-sdk/responsive-application/responsive-state-store.js +1 -0
  1271. package/dist/ui-sdk/responsive-application/use-store-responsive-info.d.ts +7 -0
  1272. package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -0
  1273. package/dist/ui-sdk/theme/types.d.ts +5 -1
  1274. package/dist/webhook/builders/webhook-builder.js +1 -1
  1275. package/package.json +58 -36
  1276. package/schema/domain-spec.json +1341 -217
  1277. package/dist/application-spec/generate-application/code/templates/nvmrc.d.ts +0 -1
  1278. package/dist/application-spec/generate-application/code/templates/nvmrc.js +0 -2
  1279. package/dist/application-spec/generate-application/code/templates/package-json.d.ts +0 -10
  1280. package/dist/application-spec/generate-application/code/templates/package-json.js +0 -1
  1281. package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
  1282. package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
  1283. package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
  1284. package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
  1285. package/dist/configurator/common/frontend-analytics.js +0 -1
  1286. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.d.ts +0 -4
  1287. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.js +0 -1
  1288. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.d.ts +0 -4
  1289. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.js +0 -1
  1290. package/dist/domain/application/resource-builder.d.ts +0 -13
  1291. package/dist/domain/application/resource-builder.js +0 -1
  1292. package/dist/domain/core/relation/relation-implementation.d.ts +0 -7
  1293. package/dist/domain/domain-runtime/spec/invariant-builder.d.ts +0 -26
  1294. package/dist/domain/domain-runtime/spec/invariant-builder.js +0 -1
  1295. package/dist/domain/extensions/client-side-image.d.ts +0 -14
  1296. package/dist/domain/extensions/client-side-image.js +0 -1
  1297. package/dist/domain/extensions/save-template-thumbnail.js +0 -1
  1298. package/dist/phoenix/commands/generate-project-files.d.ts +0 -6
  1299. package/dist/phoenix/commands/generate-project-files.js +0 -1
  1300. package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
  1301. package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
  1302. package/dist/react-sdk/loading-state/LoadingStateProvider.js +0 -1
  1303. package/dist/react-sdk/loading-state/loading-state-manager.d.ts +0 -32
  1304. package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
  1305. /package/dist/{domain/core/relation/relation-implementation.js → application-spec/core/expressions/relation-expression-params.js} +0 -0
  1306. /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.d.ts +0 -0
  1307. /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.js +0 -0
  1308. /package/dist/application-spec/{core → enhanced-json}/eval-to-constant.js +0 -0
@@ -0,0 +1,3 @@
1
+ import{existsSync as e}from"fs";import{readFile as r,writeFile as t}from"fs/promises";import{join as a}from"path";import{lt as n,minVersion as i,satisfies as o,validRange as s}from"semver";import{RuntimeReferenceStore as d,buildPhoenixDefinitions as p,parseApplicationFiles as l}from"#package/application-spec";import{getAllPhxDefinitions as c}from"#package/domain";import{readApplicationFiles as f}from"../../application-spec/application-spec-file-reader.js";import{swcEvalExpressionParser as m,swcModuleAnalyzer as u}from"../../application-spec/swc-module-analyzer.js";import{findPackageManagerCommands as h,naturalCompare as g}from"../../utils/index.js";import{readSdkManifest as v}from"./sdk-manifest.js";let k=["@salsita-ai/platform-project-sdk","@salsita-ai/platform-common","@salsita-ai/platform-contracts","@salsita-ai/common","@salsita-ai/contracts"],j=["dependencies","devDependencies","optionalDependencies"],$=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),w=async t=>{let a;if(!e(t))throw Error(`phoenix deps found no package.json at ${t}. It brings the dependencies of an existing project in line with the SDK, so run it in the project folder.`);let n=await r(t,"utf-8");try{a=JSON.parse(n)}catch(e){throw Error(`phoenix deps could not read package.json because it is not valid JSON: ${e instanceof Error?e.message:String(e)} Fix the file and run phoenix deps again.`)}if(!$(a))throw Error("phoenix deps could not read package.json because it is not a JSON object. Fix the file and run phoenix deps again.");return{content:n,packageJson:a}},x=async(e,r)=>{let t=l({rawProjectFiles:await f({projectRoot:e,envs:{}}),phxDefinitions:p(c())},{analyzer:u,evalExpressionParser:m,referenceStore:new d,logger:r});if(!t.ok)throw Error(`phoenix deps could not parse the application spec, which says through useClerk whether the project needs @clerk/clerk-react:
2
+ ${t.errors.map(e=>` [${e.code}] ${e.message}`).join("\n")}
3
+ Fix these errors and run phoenix deps again.`);return t.value.applicationSpec.appMetadata.useClerk},y=e=>Object.fromEntries(j.map(r=>{let t=e[r];return[r,$(t)?Object.fromEntries(Object.entries(t).filter(e=>"string"==typeof e[1])):{}]})),S=({peer:e,found:r})=>void 0===r?{kind:"add",field:e.field,name:e.name,to:e.version}:{kind:"update",field:r.field,name:e.name,from:r.specifier,to:e.version,range:e.range},b=(e,r)=>{let t=new Set(r.flatMap(e=>"remove"===e.kind?[e.name]:[])),a=new Map(r.flatMap(e=>"update"===e.kind?[[e.name,e.to]]:[])),n=r.flatMap(e=>"add"===e.kind?[e]:[]),i=Object.entries($(e)?e:{}).filter(([e])=>!t.has(e)).map(([e,r])=>[e,a.get(e)??r]);return Object.fromEntries([...n].sort((e,r)=>g(e.name,r.name)).reduce((e,r)=>{var t,a;let n;return t=r.name,a=r.to,-1===(n=e.findIndex(([e])=>g(e,t)>0))?[...e,[t,a]]:[...e.slice(0,n),[t,a],...e.slice(n)]},i))},M=(e,r)=>{let t=e=>r.filter(r=>r.field===e),a=j.filter(e=>t(e).length>0);return Object.fromEntries([...Object.entries(e).map(([e,r])=>{let n=a.find(r=>r===e);return void 0===n?[e,r]:[e,b(r,t(n))]}),...a.filter(r=>!(r in e)).map(e=>[e,b(void 0,t(e))])])},D=e=>{switch(e.kind){case"add":return` ${e.field}: added ${e.name} ${e.to}`;case"update":var r,t;let a;return(r=e.from,t=e.to,null!==(a=i(r))&&n(t,a))?` ${e.field}: downgraded ${e.name} ${e.from} → ${e.to}, because the SDK supports ${e.range}`:` ${e.field}: updated ${e.name} ${e.from} → ${e.to}`;case"remove":return` ${e.field}: removed ${e.name}, which @salsita-ai/sdk replaces`}};export const findSdkPeerMismatches=({packageJson:e,useClerk:r})=>{let t=y(e);return(e=>{let{peerDependencies:r,optionalPeers:t}=v();return Object.entries(r).filter(([r])=>"@clerk/clerk-react"===r&&e||!t.includes(r)).map(([e,r])=>((e,r)=>{let t=i(r);if(null===t)throw Error(`The SDK's peer range "${r}" for ${e} matches no version, so no version of it can be required. The SDK installation is damaged; reinstall @salsita-ai/sdk.`);return{name:e,range:r,version:t.version,field:e.startsWith("@types/")?"devDependencies":"dependencies"}})(e,r))})(r).flatMap(e=>{let r=j.flatMap(r=>{let a=t[r]?.[e.name];return void 0===a?[]:[{field:r,specifier:a}]});return 0===r.length?[{peer:e,found:void 0}]:r.filter(r=>!((e,r)=>{if(null===s(e))return!0;let t=i(e);return null!==t&&o(t,r,{includePrerelease:!0})})(r.specifier,e.range)).map(r=>({peer:e,found:r}))})};export const addMissingDependencies=(e,r)=>{let t=y(e);return M(e,r.filter(({name:e})=>j.every(r=>t[r]?.[e]===void 0)).map(({name:e,version:r,field:t})=>({kind:"add",field:t,name:e,to:r})))};export const addMissingSdkPeers=(e,{useClerk:r})=>{let t=findSdkPeerMismatches({packageJson:e,useClerk:r}).flatMap(({peer:e,found:r})=>void 0===r?[{name:e.name,version:e.version,field:e.field}]:[]);return addMissingDependencies(e,t)};export const runDepsCommand=async(e,{logger:r})=>{var n,i;let o,s,d,p,l,c=a(e.projectRoot,"package.json"),{content:f,packageJson:m}=await w(c),u=await x(e.projectRoot,r),g=(n=findSdkPeerMismatches({packageJson:m,useClerk:u}),o=y(m),s=j.flatMap(e=>k.filter(r=>o[e]?.[r]!==void 0).map(r=>({kind:"remove",field:e,name:r}))),[...n.map(S),...s]);if(0===g.length)return void r.success("package.json already declares every package the SDK needs. Nothing to change.");await t(c,(i=M(m,g),d=/^[ \t]+(?=")/m.exec(f)?.[0]??" ",p=f.includes("\r\n")?"\r\n":"\n",l=/\r?\n$/.test(f)?p:"",JSON.stringify(i,null,d).replace(/\n/g,p)+l));let v=h(process.env.npm_config_user_agent),$=void 0===v?"install the dependencies with your package manager":v.install;r.success("Updated package.json:"),r.info(["",...g.map(D),"",`Next step: ${$}`].join("\n"))};
@@ -0,0 +1 @@
1
+ export { type MissingDependency, addMissingDependencies, addMissingSdkPeers, findSdkPeerMismatches, runDepsCommand, } from './deps.js';
@@ -0,0 +1 @@
1
+ export{addMissingDependencies,addMissingSdkPeers,findSdkPeerMismatches,runDepsCommand}from"./deps.js";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The part of the SDK's own `package.json` that says which packages a project must install next to it. The SDK's
3
+ * `peerDependencies` are the single source of those versions: `phoenix deps` writes them into a project.
4
+ */
5
+ export interface SdkManifest {
6
+ /** Peer name to the semver range the SDK supports. */
7
+ readonly peerDependencies: Readonly<Record<string, string>>;
8
+ /** Peers the SDK marks optional, which a project installs only when it uses the feature behind them. */
9
+ readonly optionalPeers: readonly string[];
10
+ }
11
+ /** Reads the manifest of the SDK this CLI runs from. */
12
+ export declare const readSdkManifest: () => SdkManifest;
@@ -0,0 +1 @@
1
+ import{readFileSync as e}from"fs";import{dirname as r,join as t}from"path";import{fileURLToPath as a}from"url";import{z as o}from"zod";let s=o.object({peerDependencies:o.record(o.string(),o.string()).default({}),peerDependenciesMeta:o.record(o.string(),o.object({optional:o.boolean().optional()})).default({})}),i=t(r(a(import.meta.url)),"../../../../package.json");export const readSdkManifest=()=>{let r=s.safeParse(JSON.parse(e(i,"utf-8")));if(!r.success)throw Error(`The SDK's package.json at ${i} has no readable peerDependencies: ${r.error.message}. The SDK installation is damaged; reinstall @salsita-ai/sdk.`);let{peerDependencies:t,peerDependenciesMeta:a}=r.data;return{peerDependencies:t,optionalPeers:Object.entries(a).filter(([,e])=>!0===e.optional).map(([e])=>e)}};
@@ -1,5 +1,5 @@
1
- import{format as e}from"node:util";import{createServer as r}from"vite";import{startEditorServer as t}from"../editor-server/index.js";import{getDevelopmentCredentialHint as o}from"../services/development-credential.js";import{ApplicationSpecProjectWatcher as n,LinguiWatcher as s,LogBus as i,MockTemplateWatcher as a,PhoenixApplication as l,PhoenixPubSub as c,PhoenixStore as p,VariantPreviewService as d,WebhookTunnelMonitor as u,createBusLogger as m,getViteDevConfig as w,patchConsole as g,setViteLogSink as v}from"../services/index.js";import{prepareDevelopmentEnvironment as h}from"../services/prepare-development-environment.js";import{createWebhookTunnelTransport as f,readOrCreateTunnelSessionId as E,startWebhookService as b}from"../services/webhook-service/index.js";import{startTui as S}from"../tui/index.js";import{FileLogger as I,createLogger as k,exists as $}from"../utils/index.js";import{buildWebhooks as j,setLogger as x,webhookLogContext as P}from"../webhooks/index.js";import{generateProjectFilesAndInstallDependencies as R}from"./generate-project-files.js";import{readGeneratedEnvMarkers as T}from"./generated-env-markers.js";export const runDevCommand=async(N,D)=>{let{logger:y}=D,{sdkVersion:_,projectSlug:O,environmentSlug:L,cliUseWorkspace:U,enableEditor:V,editorWsPort:M,debug:W=!1,withLingui:G=!1,persistenceMode:Y,force:C=!1,tui:H=!1,serverUrl:B,credential:X,skipUpload:q}=N,F=null,J=null,Q=null,z=null,A=null,K=null,Z=null,ee=new I,er=new c,et=new i,eo=H&&!!process.stdout.isTTY&&!!process.stdin.isTTY,en=!eo,es=null;H&&!eo&&y.warn("TUI requested but stdin/stdout is not an interactive terminal — falling back to plain log output. Run phoenix dev --tui directly in a terminal to use the TUI.");let ei=null,ea=y,el=null,ec=()=>{es&&(es(),es=null),ei&&(ei.unmount(),ei=null,ea=k({debug:W,fileLogger:ee}))},ep=(e=0)=>el||(el=(async()=>{process.off("SIGINT",ed),process.off("SIGTERM",ed),process.off("uncaughtException",eu),ec(),ea.debug("Shutting down...");let r=[];for(let e of[{name:"lingui watcher",close:()=>z?.close()},{name:"project watcher",close:()=>K?.close()},{name:"mock template watcher",close:()=>A?.close()},{name:"editor server",close:()=>Q?.close()},{name:"variant previews",close:()=>Z?.close()},{name:"vite server",close:()=>F?.close()},{name:"webhook tunnel",close:()=>J?.stop()}])try{ea.debug(`Shutting down ${e.name}`),await e.close()}catch(t){r.push(`${e.name}: ${t instanceof Error?t.message:String(t)}`)}r.length>0&&ea.warn(`Cleanup warnings:
2
- ${r.join("\n ")}`),ea.debug("Shutdown complete"),await ee.close(),process.exit(e)})()),ed=()=>{ep(0)},eu=e=>{ec(),ea.error(`Uncaught exception: ${e.message}`),ep(1)};process.once("SIGINT",ed),process.once("SIGTERM",ed),process.once("uncaughtException",eu);try{await ee.init(".phoenix"),ea=m({bus:et,stream:"spec",debug:W,fileLogger:ee,echo:!0}),v((e,r)=>et.push("vite",e,r),{echo:en}),x({transports:[],log:(r,...t)=>{et.push("webhook","warn"===r||"error"===r?r:"info",e(...t)),en&&process.stdout.write(`${e(r,...t)}
3
- `)}}),er.browserConsole$.subscribe(e=>{et.push("browser",e.level,e.source?`[${e.source}] ${e.message}`:e.message);let r=`[${e.source?`browser:${e.source}`:"browser"}] ${e.message}`;ee.write("warn",r),en&&process.stderr.write(`⚠️ ${r}
4
- `)}),en&&(es=g(et,{echo:!0})),process.env.NODE_ENV="development",Y&&(process.env.PERSISTENCE_MODE=Y);let i=!Y||"server"===Y;i&&B&&(process.env.SERVER_URL=B);let c=i&&B?new u(B):void 0;if(ea.step("Starting development mode"),!await $("spec")){ea.error('Spec folder not found. Run "phoenix init" first.'),await ep(1);return}if(i){if(!B||!X)throw Error("Server persistence needs a server and a credential. Run `phoenix login <workspace>`, or create a development environment in Studio and paste its .env block into .env.");let e=await T(".env.generated");e?.PHOENIX_PROJECT_SLUG!==O||e.PHOENIX_ENVIRONMENT_SLUG!==L||e.PHOENIX_SERVER_URL!==B?(ea.step("Preparing development deployment"),await h({serverUrl:B,projectSlug:O,environmentSlug:L,credential:X,outFile:".env.generated",skipUpload:q,overrideSchema:!0,debug:W,projectVersion:_},{logger:ea})):ea.debug(".env.generated matches the current development environment, skipping prepare")}ea.step("Building project files");let{templateFiles:I}=await R({sdkVersion:_,projectSlug:O,environmentSlug:L,cliUseWorkspace:U,enableEditor:V,withLingui:G,force:C},{logger:ea});if(ea.success("Project files built successfully"),eo&&(ea=m({bus:et,stream:"spec",debug:W,fileLogger:ee}),es=g(et),ei=S(et,{onQuit:()=>void ep(0)})),G?(z=new s({logger:ea})).start():ea.warn("Lingui is disabled: i18n messages are not extracted or compiled during dev. Pass --withLingui or set WITH_LINGUI=true to enable."),i&&(ea.step("Building webhooks"),await P.run("webhook",async()=>{await j({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js"})})),i&&B&&X){let e=await T(".env.generated");if(!e?.DEPLOYMENT_ID)throw Error("Webhook tunnel cannot start because .env.generated has no DEPLOYMENT_ID. Rerun phoenix dev to prepare the development deployment.");let r=await E();J=await b({experimental:!0,transport:f({serverUrl:B,credential:X,projectSlug:O,environmentSlug:L}),rejectionHint:o(X,O),environmentSlug:L,deploymentId:e.DEPLOYMENT_ID,sessionId:r,onStatus:(t,o)=>{c?.setStatus(t,{deploymentId:e.DEPLOYMENT_ID,sessionId:r,message:o??null})},onRequest:e=>c?.record(e)}),c?.setStatus("waiting",{deploymentId:e.DEPLOYMENT_ID,sessionId:r}),J.stopped.catch(e=>{ec(),ea.error(`Webhook tunnel failed: ${e instanceof Error?e.message:String(e)}`),ep(1)}),ea.success("Webhook tunnel started")}K=new n({pubsub:er,logger:ea,onRebuilt:()=>z?.trigger(),onViteServerChange:e=>{F=e},sdkVersion:_,projectSlug:O,environmentSlug:L,cliUseWorkspace:U,enableEditor:V??!0,inlineTemplates:!1,useServer:i});let k=new p;if(Z=new l({store:k,pubsub:er,variantPreviews:new d({projectRoot:process.cwd()},{store:k,logger:ea,projectWatcher:K})}),V&&M){ea.step("Starting editor WebSocket server");let e=parseInt(M,10);Q=t({port:e,projectRoot:process.cwd(),application:Z,logger:ea,logBus:et,tunnelMonitor:c,debug:W,prepareDeployment:i&&B&&X?()=>h({serverUrl:B,projectSlug:O,environmentSlug:L,credential:X,outFile:".env.generated",skipUpload:!0,overrideSchema:!0,debug:!1,projectVersion:_},{logger:ea}):void 0}),await Q.ready,ea.debug(`Editor WebSocket server started on port ${e}`),(A=new a({projectRoot:process.cwd(),pubsub:er,logger:ea})).start()}let N=await w({templateFiles:I});F=await r(N),await F.listen(),ea.step("Starting Vite dev server"),K.start(F);let D=F.resolvedUrls?.local[0];if(eo)ea.success("Vite dev server started — watching for changes"),D&&ea.info(`Preview: ${D}`),V&&M&&ea.info(`Editor WebSocket: ws://localhost:${M}`);else if(W)ea.success("Vite dev server started"),D&&ea.info(`Preview: ${D}`);else{let e=e=>{et.push("spec","info",e),process.stdout.write(`${e}
5
- `)};e("\n\uD83D\uDE80 Phoenix Dev Server\n"),D&&(e(`Preview: ${D}`),ee.write("info",`Preview: ${D}`)),V&&M&&e(`Editor WebSocket: ws://localhost:${M}`),e("\n\uD83D\uDC40 Watching for changes...\n")}}catch(e){ec(),ea.error(`Dev mode failed: ${e instanceof Error?e.message:String(e)}`,e),await ep(1)}};
1
+ import{mkdir as e}from"node:fs/promises";import{dirname as r}from"node:path";import{format as t}from"node:util";import{createServer as o}from"vite";import{resolveGeneratedEnvFile as s}from"@salsita-ai/common/env";import{generateProjectFiles as n}from"../application-spec/index.js";import{startEditorServer as i}from"../editor-server/index.js";import{getDevelopmentCredentialHint as a}from"../services/development-credential.js";import{ApplicationSpecProjectWatcher as l,LinguiWatcher as c,LogBus as p,MockTemplateWatcher as d,PhoenixApplication as u,PhoenixPubSub as m,PhoenixStore as w,VariantPreviewService as v,WebhookTunnelMonitor as g,createBusLogger as h,getViteDevConfig as f,patchConsole as E,setViteLogSink as b}from"../services/index.js";import{prepareDevelopmentEnvironment as S}from"../services/prepare-development-environment.js";import{createWebhookTunnelTransport as k,readOrCreateTunnelSessionId as I,startWebhookService as $}from"../services/webhook-service/index.js";import{startTui as x}from"../tui/index.js";import{FileLogger as j,createLogger as P,exists as R}from"../utils/index.js";import{buildWebhooks as T,setLogger as N,webhookLogContext as y}from"../webhooks/index.js";import{readGeneratedEnvMarkers as D}from"./generated-env-markers.js";export const runDevCommand=async(_,U)=>{let{logger:O}=U,{sdkVersion:L,projectSlug:M,environmentSlug:V,cliUseWorkspace:W,enableEditor:G,editorWsPort:Y,debug:C=!1,withLingui:H=!1,persistenceMode:B,force:X=!1,tui:q=!1,serverUrl:J,credential:Q,skipUpload:z}=_,A=null,F=null,K=null,Z=null,ee=null,er=null,et=null,eo=new j,es=new m,en=new p,ei=q&&!!process.stdout.isTTY&&!!process.stdin.isTTY,ea=!ei,el=null;q&&!ei&&O.warn("TUI requested but stdin/stdout is not an interactive terminal — falling back to plain log output. Run phoenix dev --tui directly in a terminal to use the TUI.");let ec=null,ep=O,ed=null,eu=async(t,o)=>{let n=s(".");await e(r(n),{recursive:!0}),await S({serverUrl:t.serverUrl,projectSlug:M,environmentSlug:V,credential:t.credential,outFile:n,skipUpload:o.skipUpload,overrideSchema:!0,debug:o.debug,projectVersion:L},{logger:ep})},em=()=>{el&&(el(),el=null),ec&&(ec.unmount(),ec=null,ep=P({debug:C,fileLogger:eo}))},ew=(e=0)=>ed||(ed=(async()=>{process.off("SIGINT",ev),process.off("SIGTERM",ev),process.off("uncaughtException",eg),em(),ep.debug("Shutting down...");let r=[];for(let e of[{name:"lingui watcher",close:()=>Z?.close()},{name:"project watcher",close:()=>er?.close()},{name:"mock template watcher",close:()=>ee?.close()},{name:"editor server",close:()=>K?.close()},{name:"variant previews",close:()=>et?.close()},{name:"vite server",close:()=>A?.close()},{name:"webhook tunnel",close:()=>F?.stop()}])try{ep.debug(`Shutting down ${e.name}`),await e.close()}catch(t){r.push(`${e.name}: ${t instanceof Error?t.message:String(t)}`)}r.length>0&&ep.warn(`Cleanup warnings:
2
+ ${r.join("\n ")}`),ep.debug("Shutdown complete"),await eo.close(),process.exit(e)})()),ev=()=>{ew(0)},eg=e=>{em(),ep.error(`Uncaught exception: ${e.message}`),ew(1)};process.once("SIGINT",ev),process.once("SIGTERM",ev),process.once("uncaughtException",eg);try{await eo.init(".phoenix"),ep=h({bus:en,stream:"spec",debug:C,fileLogger:eo,echo:!0}),b((e,r)=>en.push("vite",e,r),{echo:ea}),N({transports:[],log:(e,...r)=>{en.push("webhook","warn"===e||"error"===e?e:"info",t(...r)),ea&&process.stdout.write(`${t(e,...r)}
3
+ `)}}),es.browserConsole$.subscribe(e=>{en.push("browser",e.level,e.source?`[${e.source}] ${e.message}`:e.message);let r=`[${e.source?`browser:${e.source}`:"browser"}] ${e.message}`;eo.write("warn",r),ea&&process.stderr.write(`⚠️ ${r}
4
+ `)}),ea&&(el=E(en,{echo:!0})),process.env.NODE_ENV="development",B&&(process.env.PERSISTENCE_MODE=B);let e=!B||"server"===B;e&&J&&(process.env.SERVER_URL=J);let r=e&&J?new g(J):void 0;if(ep.step("Starting development mode"),!await R("spec")){ep.error('Spec folder not found. Run "phoenix init" first.'),await ew(1);return}if(e){if(!J||!Q)throw Error("Server persistence needs a server and a credential. Run `phoenix login <workspace>`, or create a development environment in Studio and paste its .env block into .env.");let e=s("."),r=await D(e);r?.PHOENIX_PROJECT_SLUG!==M||r.PHOENIX_ENVIRONMENT_SLUG!==V||r.PHOENIX_SERVER_URL!==J?(ep.step("Preparing development deployment"),await eu({serverUrl:J,credential:Q},{skipUpload:z,debug:C})):ep.debug(`${e} matches the current development environment, skipping prepare`)}ep.step("Building project files");let{templateFiles:p}=await n({sdkVersion:L,projectSlug:M,environmentSlug:V,cliUseWorkspace:W,enableEditor:G,withLingui:H,force:X},{logger:ep});if(ep.success("Project files built successfully"),ei&&(ep=h({bus:en,stream:"spec",debug:C,fileLogger:eo}),el=E(en),ec=x(en,{onQuit:()=>void ew(0)})),H?(Z=new c({logger:ep})).start():ep.warn("Lingui is disabled: i18n messages are not extracted or compiled during dev. Pass --withLingui or set WITH_LINGUI=true to enable."),e&&(ep.step("Building webhooks"),await y.run("webhook",async()=>{await T({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js"})})),e&&J&&Q){let e=s("."),t=await D(e);if(!t?.DEPLOYMENT_ID)throw Error(`Webhook tunnel cannot start because ${e} has no DEPLOYMENT_ID. Rerun phoenix dev to prepare the development deployment.`);let o=await I();F=await $({experimental:!0,transport:k({serverUrl:J,credential:Q,projectSlug:M,environmentSlug:V}),rejectionHint:a(Q,M),environmentSlug:V,deploymentId:t.DEPLOYMENT_ID,sessionId:o,onStatus:(e,s)=>{r?.setStatus(e,{deploymentId:t.DEPLOYMENT_ID,sessionId:o,message:s??null})},onRequest:e=>r?.record(e)}),r?.setStatus("waiting",{deploymentId:t.DEPLOYMENT_ID,sessionId:o}),F.stopped.catch(e=>{em(),ep.error(`Webhook tunnel failed: ${e instanceof Error?e.message:String(e)}`),ew(1)}),ep.success("Webhook tunnel started")}er=new l({pubsub:es,logger:ep,onRebuilt:()=>Z?.trigger(),onViteServerChange:e=>{A=e},sdkVersion:L,projectSlug:M,environmentSlug:V,cliUseWorkspace:W,enableEditor:G??!0,inlineTemplates:!1,useServer:e});let m=new w;if(et=new u({store:m,pubsub:es,variantPreviews:new v({projectRoot:process.cwd()},{store:m,logger:ep,projectWatcher:er})}),G&&Y){ep.step("Starting editor WebSocket server");let t=parseInt(Y,10);K=i({port:t,projectRoot:process.cwd(),application:et,logger:ep,logBus:en,tunnelMonitor:r,debug:C,prepareDeployment:e&&J&&Q?()=>eu({serverUrl:J,credential:Q},{skipUpload:!0,debug:!1}):void 0}),await K.ready,ep.debug(`Editor WebSocket server started on port ${t}`),(ee=new d({projectRoot:process.cwd(),pubsub:es,logger:ep})).start()}let S=await f({templateFiles:p});A=await o(S),await A.listen(),ep.step("Starting Vite dev server"),er.start(A);let j=A.resolvedUrls?.local[0];if(ei)ep.success("Vite dev server started — watching for changes"),j&&ep.info(`Preview: ${j}`),G&&Y&&ep.info(`Editor WebSocket: ws://localhost:${Y}`);else if(C)ep.success("Vite dev server started"),j&&ep.info(`Preview: ${j}`);else{let e=e=>{en.push("spec","info",e),process.stdout.write(`${e}
5
+ `)};e("\n\uD83D\uDE80 Phoenix Dev Server\n"),j&&(e(`Preview: ${j}`),eo.write("info",`Preview: ${j}`)),G&&Y&&e(`Editor WebSocket: ws://localhost:${Y}`),e("\n\uD83D\uDC40 Watching for changes...\n")}}catch(e){em(),ep.error(`Dev mode failed: ${e instanceof Error?e.message:String(e)}`,e),await ew(1)}};
@@ -1 +1 @@
1
- import{runCommand as t}from"../utils/index.js";import{formatFiles as e}from"./prettier.js";export const runFixCommand=async(i,r)=>{let{logger:s}=r,o=!0===i.lint||!0===i.format,n=!o||!0===i.lint,c=!o||!0===i.format;try{s.step("Running fixes"),n&&await t({command:"eslint",args:["src","--fix"],description:"ESLint fix",quiet:!0},{logger:s}),c&&(s.step("Prettier fix"),await e(".",{logger:s}),s.success("Prettier fix completed")),s.success("Fixes completed!")}catch(t){s.error(`Fix failed: ${t instanceof Error?t.message:String(t)}`,t),process.exit(1)}};
1
+ import{eslintConfigArgs as e}from"../check-configs/index.js";import{runSdkTool as t}from"../utils/index.js";import{formatFiles as r}from"./prettier.js";export const runFixCommand=async(i,s)=>{let{logger:o}=s,n=!0===i.lint||!0===i.format,a=!n||!0===i.lint,c=!n||!0===i.format;try{o.step("Running fixes"),a&&await t({tool:{packageName:"eslint",binName:"eslint"},args:["src","--fix","--no-error-on-unmatched-pattern",...e()],description:"ESLint fix",quiet:!0},{logger:o}),c&&(o.step("Prettier fix"),await r(".",{logger:o}),o.success("Prettier fix completed")),o.success("Fixes completed!")}catch(e){o.error(`Fix failed: ${e instanceof Error?e.message:String(e)}`,e),process.exit(1)}};
@@ -12,6 +12,7 @@ export { prepareDevelopmentEnvironment } from '../services/prepare-development-e
12
12
  export { prepareLocalEnvironment } from './prepare-local-environment-command.js';
13
13
  export { runFinishDeploymentCommand } from './finish-deployment-command.js';
14
14
  export { runDeploymentBuildEnvsCommand } from './deployment-build-envs-command.js';
15
+ export { runDepsCommand } from './deps/index.js';
15
16
  export { runDevCommand } from './dev.js';
16
17
  export { runFixCommand } from './fix.js';
17
18
  export { runLinkCommand } from './link.js';
@@ -1 +1 @@
1
- export{runBuildCommand}from"./build.js";export{runCheckCommand}from"./check.js";export{runCleanCommand}from"./clean.js";export{runActivateDeploymentCommand}from"./activate-deployment.js";export{runCreateEnvironmentCommand}from"./create-environment.js";export{runCleanupEnvironmentCommand}from"./cleanup-environment.js";export{runListEnvironmentsCommand}from"./list-environments.js";export{runRegisterDeploymentCommand}from"./register-deployment.js";export{runPrepareDeploymentCommand}from"./prepare-deployment-command.js";export{prepareDevelopmentEnvironment}from"../services/prepare-development-environment.js";export{prepareLocalEnvironment}from"./prepare-local-environment-command.js";export{runFinishDeploymentCommand}from"./finish-deployment-command.js";export{runDeploymentBuildEnvsCommand}from"./deployment-build-envs-command.js";export{runDevCommand}from"./dev.js";export{runFixCommand}from"./fix.js";export{runLinkCommand}from"./link.js";export{runUnlinkCommand}from"./unlink.js";export{runPrepareCiCommand}from"./prepare-ci.js";export{runStoryCommand}from"./story.js";export{runStoryBuildCommand}from"./story-build.js";export{runStoryCreateCommand}from"./story-create.js";export{runStoryDevCommand}from"./story-dev.js";export{runInitCommand}from"./init.js";export{runSyncCommand}from"./sync.js";export{runChangelogCommand}from"./changelog.js";export{runDocsCommand}from"./docs.js";export{runInspectAssetsCommand}from"./inspect-assets.js";export{runScreenshotCommand}from"./screenshot.js";export{runStateCommand}from"./state.js";export{runDataCommand}from"./data.js";export{runSceneCommand}from"./scene.js";export{runVariantsCommand}from"./variants.js";export{runLoginCommand}from"./login.js";export{runLogoutCommand}from"./logout.js";export{runDeployCommand}from"./deploy.js";export{runFeedbackCommand}from"./feedback.js";export{runExtractSourcesCommand}from"./extract-sources-command.js";
1
+ export{runBuildCommand}from"./build.js";export{runCheckCommand}from"./check.js";export{runCleanCommand}from"./clean.js";export{runActivateDeploymentCommand}from"./activate-deployment.js";export{runCreateEnvironmentCommand}from"./create-environment.js";export{runCleanupEnvironmentCommand}from"./cleanup-environment.js";export{runListEnvironmentsCommand}from"./list-environments.js";export{runRegisterDeploymentCommand}from"./register-deployment.js";export{runPrepareDeploymentCommand}from"./prepare-deployment-command.js";export{prepareDevelopmentEnvironment}from"../services/prepare-development-environment.js";export{prepareLocalEnvironment}from"./prepare-local-environment-command.js";export{runFinishDeploymentCommand}from"./finish-deployment-command.js";export{runDeploymentBuildEnvsCommand}from"./deployment-build-envs-command.js";export{runDepsCommand}from"./deps/index.js";export{runDevCommand}from"./dev.js";export{runFixCommand}from"./fix.js";export{runLinkCommand}from"./link.js";export{runUnlinkCommand}from"./unlink.js";export{runPrepareCiCommand}from"./prepare-ci.js";export{runStoryCommand}from"./story.js";export{runStoryBuildCommand}from"./story-build.js";export{runStoryCreateCommand}from"./story-create.js";export{runStoryDevCommand}from"./story-dev.js";export{runInitCommand}from"./init.js";export{runSyncCommand}from"./sync.js";export{runChangelogCommand}from"./changelog.js";export{runDocsCommand}from"./docs.js";export{runInspectAssetsCommand}from"./inspect-assets.js";export{runScreenshotCommand}from"./screenshot.js";export{runStateCommand}from"./state.js";export{runDataCommand}from"./data.js";export{runSceneCommand}from"./scene.js";export{runVariantsCommand}from"./variants.js";export{runLoginCommand}from"./login.js";export{runLogoutCommand}from"./logout.js";export{runDeployCommand}from"./deploy.js";export{runFeedbackCommand}from"./feedback.js";export{runExtractSourcesCommand}from"./extract-sources-command.js";
@@ -1,15 +1,27 @@
1
1
  import type { CommandContext } from './types.js';
2
+ /**
3
+ * The versions of the tools the SDK runs itself and editors load from the project, taken from the SDK's own
4
+ * `dependencies`, so the editor and `phoenix check` use the same release.
5
+ */
6
+ export interface EditorToolVersions {
7
+ readonly eslint: string;
8
+ readonly prettier: string;
9
+ }
2
10
  export interface InitCommandProps {
3
11
  readonly sdkVersion: string;
12
+ readonly editorToolVersions: EditorToolVersions;
4
13
  /** Directory to initialize; defaults to the working directory. */
5
14
  readonly projectRoot?: string;
6
15
  }
7
16
  /**
8
- * Starts a Phoenix project: writes a `package.json` that depends on this CLI's SDK version when the folder has none,
9
- * the starter spec and the pnpm settings the first install needs, and switches the project to the application-spec
10
- * pipeline. It touches no server and asks
11
- * nothing: the starter spec names the default project of whichever workspace the developer signs in to, and
12
- * everything else is generated by sync or the build.
17
+ * Starts a Phoenix project: writes a `package.json` that depends on this CLI's SDK version when the folder has none
18
+ * and the starter spec, and switches the project to the application-spec pipeline. The project's `package.json` gains
19
+ * what it does not have yet: the SDK's required peers, ESLint and Prettier, and the `dev`, `build`, `deploy`, `check`
20
+ * and `fix` scripts. An entry the project already has stays as it is. It writes no package-manager settings or
21
+ * `packageManager` field: the project installs with any package manager, and its maintainer owns those settings.
22
+ * The next steps it prints name the package manager that ran it. It touches no server and asks nothing: the starter
23
+ * spec names the default project of whichever workspace the developer signs in to, and everything else is generated
24
+ * by sync or the build.
13
25
  *
14
26
  * Refuses when a `spec/` folder exists, and when an existing `package.json` does not depend on the SDK.
15
27
  */
@@ -1 +1 @@
1
- import{existsSync as e}from"fs";import{mkdir as n,readFile as t,writeFile as i}from"fs/promises";import{basename as o,dirname as r,join as p}from"path";import{ensureWorkspaceInstallSettings as a}from"../utils/index.js";import{starterSpecFiles as s}from"./init-starter-spec.js";let c="@salsita-ai/sdk",l=async e=>{let n=`Install the SDK first (\`pnpm add ${c}\`), then rerun \`pnpm phoenix init\`.`,i=JSON.parse(await t(e,"utf-8"));if("object"!=typeof i||null===i||Array.isArray(i))throw Error(`phoenix init could not read package.json because it is not a JSON object. ${n}`);if(!["dependencies","devDependencies"].some(e=>{let n=Reflect.get(i,e);return"object"==typeof n&&null!==n&&c in n}))throw Error(`phoenix init found no ${c} dependency in package.json. ${n}`);return{...i}},d=async e=>{for(let t of s){let o=p(e,t.path);await n(r(o),{recursive:!0}),await i(o,t.content)}},m=async(e,n)=>{let t=n.phoenix;await i(e,JSON.stringify({...n,phoenix:{..."object"==typeof t&&null!==t?t:{},applicationFlow:!0}},null,2)+"\n")};export const runInitCommand=async(t,{logger:i})=>{var r,s;let f,u=t.projectRoot??process.cwd(),h=p(u,"package.json");if(e(p(u,"spec")))throw Error("phoenix init found an existing spec/ folder. init only starts new projects, and writing a starter spec would overwrite or mix with the existing one. To update an existing project, run `pnpm phoenix sync`; to start over, run init in an empty project folder.");let w=e(h)?await l(h):(r=u,s=t.sdkVersion,{name:(f=o(r).toLowerCase().replace(/[^a-z0-9._-]+/g,"-").replace(/^[._-]+|[-]+$/g,"")).length>0?f:"phoenix-configurator",private:!0,type:"module",dependencies:{[c]:s},devDependencies:{"@lingui/cli":"5.9.5","@lingui/swc-plugin":"5.11.0"}});i.step(`Writing the starter project to ${u}`),await n(u,{recursive:!0}),await d(u),await m(h,w),a(u),i.success(`Phoenix project created in ${u}.`),i.info("\nNext steps, in the project folder:\n pnpm install\n pnpm phoenix sync\n pnpm phoenix login <workspace>\n pnpm phoenix dev\n pnpm phoenix deploy\n\nDeveloping against a Studio development environment instead? Paste its .env block into .env before phoenix dev.")};
1
+ import{existsSync as e}from"fs";import{mkdir as t,readFile as i,writeFile as n}from"fs/promises";import{basename as o,dirname as r,join as a}from"path";import{findPackageManagerCommands as s}from"../utils/index.js";import{addMissingDependencies as p,addMissingSdkPeers as c}from"./deps/index.js";import{starterSpecFiles as d}from"./init-starter-spec.js";let l="@salsita-ai/sdk",h={dev:"phoenix dev",build:"phoenix build",deploy:"phoenix deploy",check:"phoenix check",fix:"phoenix fix"},f=(e,t)=>void 0===e?`\`phoenix ${t}\` through your package manager`:`\`${e.phoenix(t)}\``,u=async(e,t)=>{let n=void 0===t?`add ${l} with your package manager`:`\`${t.add(l)}\``,o=`Install the SDK first (${n}), then rerun ${f(t,"init")}.`,r=JSON.parse(await i(e,"utf-8"));if("object"!=typeof r||null===r||Array.isArray(r))throw Error(`phoenix init could not read package.json because it is not a JSON object. ${o}`);if(!["dependencies","devDependencies"].some(e=>{let t=Reflect.get(r,e);return"object"==typeof t&&null!==t&&l in t}))throw Error(`phoenix init found no ${l} dependency in package.json. ${o}`);return{...r}},m=async e=>{for(let i of d){let o=a(e,i.path);await t(r(o),{recursive:!0}),await n(o,i.content)}},x=async(e,t,i)=>{let o=t.phoenix,r=t.scripts,a="object"==typeof r&&null!==r?r:{},s=Object.fromEntries(Object.entries(h).filter(([e])=>!(e in a))),d=p(c({...t,scripts:{...a,...s}},{useClerk:!1}),Object.entries(i).map(([e,t])=>({name:e,version:t,field:"devDependencies"})));await n(e,JSON.stringify({...d,phoenix:{..."object"==typeof o&&null!==o?o:{},applicationFlow:!0}},null,2)+"\n")};export const runInitCommand=async(i,{logger:n})=>{var r,p;let c,d,h=i.projectRoot??process.cwd(),g=a(h,"package.json"),j=s(process.env.npm_config_user_agent);if(e(a(h,"spec")))throw Error(`phoenix init found an existing spec/ folder. init only starts new projects, and writing a starter spec would overwrite or mix with the existing one. To update an existing project, run ${f(j,"sync")}; to start over, run init in an empty project folder.`);let y=e(g)?await u(g,j):(r=h,p=i.sdkVersion,{name:(c=o(r).toLowerCase().replace(/[^a-z0-9._-]+/g,"-").replace(/^[._-]+|[-]+$/g,"")).length>0?c:"phoenix-configurator",private:!0,type:"module",scripts:{},dependencies:{[l]:p}});n.step(`Writing the starter project to ${h}`),await t(h,{recursive:!0}),await m(h),await x(g,y,i.editorToolVersions),n.success(`Phoenix project created in ${h}.`),n.info(["",...(d=["sync","login <workspace>","dev","deploy"],void 0===j?["Next steps, in the project folder, through your package manager:"," install the dependencies",...d.map(e=>` phoenix ${e}`)]:["Next steps, in the project folder:",` ${j.install}`,...d.map(e=>` ${j.phoenix(e)}`)]),"","Developing against a Studio development environment instead? Paste its .env block into .env before phoenix dev."].join("\n"))};
@@ -1 +1 @@
1
- import{relative as e,resolve as t}from"path";import{addWorkspaceOverrides as a,getSdkPackages as i,getWorkspaceDir as n,runCommand as o}from"../utils/index.js";export const runLinkCommand=async(s,r)=>{let{logger:c}=r,l=s.sdkPath??"../configurator-phoenix";try{c.step("Linking local SDK packages");let s=t(l);c.debug(`SDK path: ${s}`);let r=i(s);c.debug(`Found ${r.length} packages to link`);let p=n(),g={};r.forEach(({name:t,path:a})=>{let i=e(p,a);g[t]=`file:${i}`,c.debug(` ${t} -> ${i}`)}),a(g),c.success(`Linked ${r.length} SDK packages`),await o({command:"pnpm",args:["install","--config.optimistic-repeat-install=false"],description:"Installing packages",quiet:!0},{logger:c}),c.info("\nNext step:"),c.info(" Run: phoenix dev")}catch(e){throw c.error(`Failed to link SDK packages: ${e instanceof Error?e.message:String(e)}. The SDK path must contain a packages/libs directory. Use --sdk-path flag to specify correct SDK location.`,e),e}};
1
+ import{relative as e,resolve as t}from"path";import{addWorkspaceOverrides as o,assertPnpmProject as r,getSdkPackages as a,getWorkspaceDir as n}from"../utils/index.js";export const runLinkCommand=async(s,i)=>{let{logger:c}=i,l=s.sdkPath??"../configurator-phoenix";try{r({projectRoot:process.cwd(),command:"link"})}catch(e){throw c.error(e instanceof Error?e.message:String(e)),e}try{c.step("Linking local SDK packages");let r=t(l);c.debug(`SDK path: ${r}`);let s=a(r);c.debug(`Found ${s.length} packages to link`);let i=n(),p={};s.forEach(({name:t,path:o})=>{let r=e(i,o);p[t]=`file:${r}`,c.debug(` ${t} -> ${r}`)}),o(p),c.success(`Linked ${s.length} SDK packages`),c.info("\nNext steps:\n pnpm install --config.optimistic-repeat-install=false\n phoenix dev")}catch(e){throw c.error(`Failed to link SDK packages: ${e instanceof Error?e.message:String(e)}. The SDK path must contain a packages/libs directory. Use --sdk-path flag to specify correct SDK location.`,e),e}};
@@ -1 +1 @@
1
- import{readFile as t,writeFile as e}from"fs/promises";import{globby as o}from"globby";import{resolve as i}from"path";import*as r from"prettier";let a=["**/node_modules/**","**/dist/**","**/.git/**","**/.phoenix/**","**/locales/*/*.ts","pnpm-lock.yaml",".linguirc"];export const formatFiles=async(n,l)=>{let{logger:f}=l,s=await o("."===n?"**/*":n,{gitignore:!0,ignore:a}),c=0;for(let o of s)try{let a=i(o),n=await t(a,"utf-8"),l=await r.resolveConfig(a);if((await r.getFileInfo(a)).ignored)continue;let f=await r.format(n,{...l,filepath:a});f!==n&&(await e(a,f,"utf-8"),c++)}catch(t){}c>0&&f.info(`Formatted ${c} file${1!==c?"s":""}`)};export const checkFiles=async(e,n)=>{let{logger:l}=n,f=await o("."===e?"**/*":e,{gitignore:!0,ignore:a}),s=[];for(let e of f)try{let o=i(e),a=await t(o,"utf-8"),n=await r.resolveConfig(o);if((await r.getFileInfo(o)).ignored)continue;await r.check(a,{...n,filepath:o})||s.push(e)}catch(t){}return!(s.length>0)||(l.error(`Found ${s.length} unformatted file${1!==s.length?"s":""}:`),s.forEach(t=>{console.error(` - ${t}`)}),!1)};
1
+ import{readFile as t,writeFile as o}from"fs/promises";import{globby as e}from"globby";import{resolve as r}from"path";import*as i from"prettier";import{prettierrc as a}from"@salsita-ai/common/prettier";let n=["**/node_modules/**","**/dist/**","**/.git/**","**/.phoenix/**","**/locales/*/*.ts","pnpm-lock.yaml","pnpm-workspace.yaml","package-lock.json","npm-shrinkwrap.json","yarn.lock",".yarnrc.yml","bun.lock","bun.lockb",".linguirc"];export const formatFiles=async(l,f)=>{let{logger:c}=f,s=await e("."===l?"**/*":l,{gitignore:!0,ignore:n}),m=0;for(let e of s)try{let n=r(e),l=await t(n,"utf-8"),f=await i.resolveConfig(n)??a;if((await i.getFileInfo(n)).ignored)continue;let c=await i.format(l,{...f,filepath:n});c!==l&&(await o(n,c,"utf-8"),m++)}catch(t){}m>0&&c.info(`Formatted ${m} file${1!==m?"s":""}`)};export const checkFiles=async(o,l)=>{let{logger:f}=l,c=await e("."===o?"**/*":o,{gitignore:!0,ignore:n}),s=[];for(let o of c)try{let e=r(o),n=await t(e,"utf-8"),l=await i.resolveConfig(e)??a;if((await i.getFileInfo(e)).ignored)continue;await i.check(n,{...l,filepath:e})||s.push(o)}catch(t){}return!(s.length>0)||(f.error(`Found ${s.length} unformatted file${1!==s.length?"s":""}:`),s.forEach(t=>{console.error(` - ${t}`)}),!1)};
@@ -1 +1 @@
1
- import{ensureWorkspaceInstallSettings as e,runCommand as s}from"../utils/index.js";import{generateProjectFilesAndInstallDependencies as c}from"./generate-project-files.js";export const runSyncCommand=async(t,i)=>{let{logger:r}=i,{sdkVersion:n,projectSlug:o,environmentSlug:l,cliUseWorkspace:a,enableEditor:p,force:m=!1,analyze:u=!1}=t;try{r.step("Syncing Phoenix project files"),e(process.cwd()),await s({command:"pnpm",args:["install"],description:"Installing packages",quiet:!0},{logger:r}),r.step("Building project files"),await c({sdkVersion:n,projectSlug:o,environmentSlug:l,cliUseWorkspace:a,enableEditor:p,inlineTemplates:!0,force:m,analyze:u},i),r.success("Project files built successfully"),r.success("Sync completed successfully!")}catch(e){r.error(`Sync failed: ${e instanceof Error?e.message:String(e)}`,e),process.exit(1)}};
1
+ import{generateProjectFiles as e}from"../application-spec/index.js";export const runSyncCommand=async(s,c)=>{let{logger:i}=c,{sdkVersion:r,projectSlug:t,environmentSlug:n,cliUseWorkspace:o,enableEditor:l,force:p=!1,analyze:a=!1}=s;try{i.step("Syncing Phoenix project files"),i.step("Building project files"),await e({sdkVersion:r,projectSlug:t,environmentSlug:n,cliUseWorkspace:o,enableEditor:l,inlineTemplates:!0,force:p,analyze:a},c),i.success("Project files built successfully"),i.success("Sync completed successfully!")}catch(e){i.error(`Sync failed: ${e instanceof Error?e.message:String(e)}`,e),process.exit(1)}};
@@ -1 +1 @@
1
- import{getLocalOverrides as n,removeWorkspaceOverrides as e,runCommand as i}from"../utils/index.js";export const runUnlinkCommand=async a=>{let{logger:s}=a;try{s.step("Unlinking local SDK packages");let a=n();if(0===a.length)return void s.info("No linked SDK packages found");s.debug(`Found ${a.length} linked packages`),a.forEach(n=>{s.debug(` Unlinked ${n}`)}),e(a),s.success(`Unlinked ${a.length} SDK packages`),await i({command:"pnpm",args:["install","--config.optimistic-repeat-install=false"],description:"Installing packages",quiet:!0},{logger:s}),s.info("\nNext step:"),s.info(" Run: phoenix dev")}catch(n){throw s.error(`Failed to unlink SDK packages: ${n instanceof Error?n.message:String(n)}. pnpm-workspace.yaml may be missing or invalid. Check that an overrides section exists in pnpm-workspace.yaml.`),n}};
1
+ import{assertPnpmProject as n,getLocalOverrides as e,removeWorkspaceOverrides as r}from"../utils/index.js";export const runUnlinkCommand=async o=>{let{logger:i}=o;try{n({projectRoot:process.cwd(),command:"unlink"})}catch(n){throw i.error(n instanceof Error?n.message:String(n)),n}try{i.step("Unlinking local SDK packages");let n=e();if(0===n.length)return void i.info("No linked SDK packages found");i.debug(`Found ${n.length} linked packages`),n.forEach(n=>{i.debug(` Unlinked ${n}`)}),r(n),i.success(`Unlinked ${n.length} SDK packages`),i.info("\nNext steps:\n pnpm install --config.optimistic-repeat-install=false\n phoenix dev")}catch(n){throw i.error(`Failed to unlink SDK packages: ${n instanceof Error?n.message:String(n)}. pnpm-workspace.yaml may be missing or invalid. Check that an overrides section exists in pnpm-workspace.yaml.`),n}};
@@ -2,6 +2,8 @@ import { type ViteDevServer } from 'vite';
2
2
  import type { Logger } from '../utils/index.js';
3
3
  import type { PhoenixPubSub } from './phoenix-pubsub.js';
4
4
  import type { VariantFileEdit } from './variant-file-session.js';
5
+ export declare const WATCH_PATTERNS: string[];
6
+ export declare const IGNORED_PATTERNS: string[];
5
7
  /** Configuration for {@link ApplicationSpecProjectWatcher}. */
6
8
  export interface ApplicationSpecProjectWatcherConfig {
7
9
  readonly pubsub: PhoenixPubSub;
@@ -12,8 +14,6 @@ export interface ApplicationSpecProjectWatcherConfig {
12
14
  readonly projectSlug: string;
13
15
  readonly environmentSlug: string;
14
16
  readonly cliUseWorkspace?: boolean;
15
- readonly name?: string;
16
- readonly description?: string;
17
17
  readonly enableEditor: boolean;
18
18
  readonly inlineTemplates: boolean;
19
19
  readonly useServer: boolean;
@@ -1,4 +1,4 @@
1
- import{resolve as e}from"path";import t from"promise-queue";import{Subject as i,buffer as s,debounceTime as r}from"rxjs";import{createServer as o,normalizePath as n}from"vite";import{watch as l}from"#package/watch";import{ApplicationSpecBuilder as h}from"../application-spec/application-spec-builder.js";import{logDiagnostics as a}from"../application-spec/metrics/index.js";import{syncTemplateFiles as c}from"../application-spec/template-files.js";import{buildWebhooks as u}from"../webhooks/index.js";import{getViteDevConfig as p}from"./vite-config.js";let g=["spec/**/*.{yaml,yml}","src/**/*.{ts,tsx,yaml,yml,json,html,css}","templates/*.html",".env",".env.generated"],d=["src/locales/**/*.{ts,tsx}",".phoenix/**"];export class ApplicationSpecProjectWatcher{watcher=null;subscription=null;rebuildQueue=new t(1,1/0);changeSubject$=new i;viteServer=null;pubsub;logger;onRebuilt;onViteServerChange;builder;useServer;isShuttingDown=!1;suspended=!1;heldChanges=new Set;constructor(e){this.pubsub=e.pubsub,this.logger=e.logger,this.onRebuilt=e.onRebuilt,this.onViteServerChange=e.onViteServerChange,this.builder=new h({logger:e.logger,sdkVersion:e.sdkVersion,projectSlug:e.projectSlug,environmentSlug:e.environmentSlug,cliUseWorkspace:e.cliUseWorkspace,name:e.name,description:e.description,enableEditor:e.enableEditor,inlineTemplates:e.inlineTemplates}),this.useServer=e.useServer}start(e){this.viteServer=e,this.setupFileWatcher(),this.setupRebuildSubscription()}applyVariantFiles(e){this.rebuildQueue.add(async()=>{this.isShuttingDown||await this.rebuild(new Set(e.map(e=>e.fileName)),!1,!0)})}suspend(){this.suspended=!0}resume(){for(let e of(this.suspended=!1,this.heldChanges))this.changeSubject$.next(e);this.heldChanges.clear()}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){this.watcher=l(g,{ignored:d,cwd:process.cwd(),persistent:!0,ignoreInitial:!1}),this.watcher.on("all",(e,t)=>{if("change"===e||"add"===e||"unlink"===e){if(this.suspended)return void this.heldChanges.add(t);this.logger.info(`
2
- 📝 Detected ${e}: ${t}`),this.changeSubject$.next(t)}})}setupRebuildSubscription(){let e=this.changeSubject$.pipe(r(10));this.subscription=this.changeSubject$.pipe(s(e)).subscribe(e=>{let t=new Set(e),i=t.has(".env");this.rebuildQueue.add(async()=>{this.isShuttingDown||(this.logger.info(`
1
+ import{mkdirSync as e}from"fs";import{resolve as t}from"path";import i from"promise-queue";import{Subject as s,buffer as r,debounceTime as o}from"rxjs";import{createServer as n,normalizePath as l}from"vite";import{watch as h}from"#package/watch";import{ApplicationSpecBuilder as a}from"../application-spec/application-spec-builder.js";import{logDiagnostics as c}from"../application-spec/metrics/index.js";import{syncTemplateFiles as u}from"../application-spec/template-files.js";import{buildWebhooks as p}from"../webhooks/index.js";import{getViteDevConfig as g}from"./vite-config.js";export const WATCH_PATTERNS=["spec/**/*.{yaml,yml}","src/**/*.{ts,tsx,yaml,yml,json,html,css}","templates/*.html",".env",".env.generated",".phoenix/.env.generated"];export const IGNORED_PATTERNS=["src/locales/**/*.{ts,tsx}",".phoenix/!(.env.generated)/**"];export class ApplicationSpecProjectWatcher{watcher=null;subscription=null;rebuildQueue=new i(1,1/0);changeSubject$=new s;viteServer=null;pubsub;logger;onRebuilt;onViteServerChange;builder;useServer;isShuttingDown=!1;suspended=!1;heldChanges=new Set;constructor(e){this.pubsub=e.pubsub,this.logger=e.logger,this.onRebuilt=e.onRebuilt,this.onViteServerChange=e.onViteServerChange,this.builder=new a({logger:e.logger,sdkVersion:e.sdkVersion,projectSlug:e.projectSlug,environmentSlug:e.environmentSlug,cliUseWorkspace:e.cliUseWorkspace,enableEditor:e.enableEditor,inlineTemplates:e.inlineTemplates}),this.useServer=e.useServer}start(e){this.viteServer=e,this.setupFileWatcher(),this.setupRebuildSubscription()}applyVariantFiles(e){this.rebuildQueue.add(async()=>{this.isShuttingDown||await this.rebuild(new Set(e.map(e=>e.fileName)),!1,!0)})}suspend(){this.suspended=!0}resume(){for(let e of(this.suspended=!1,this.heldChanges))this.changeSubject$.next(e);this.heldChanges.clear()}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){e(t(process.cwd(),"src"),{recursive:!0}),this.watcher=h(WATCH_PATTERNS,{ignored:IGNORED_PATTERNS,cwd:process.cwd(),persistent:!0,ignoreInitial:!1}),this.watcher.on("all",(e,t)=>{if("change"===e||"add"===e||"unlink"===e){if(this.suspended)return void this.heldChanges.add(t);this.logger.info(`
2
+ 📝 Detected ${e}: ${t}`),this.changeSubject$.next(t)}})}setupRebuildSubscription(){let e=this.changeSubject$.pipe(o(10));this.subscription=this.changeSubject$.pipe(r(e)).subscribe(e=>{let t=new Set(e),i=t.has(".env");this.rebuildQueue.add(async()=>{this.isShuttingDown||(this.logger.info(`
3
3
  🔨 Rebuilding spec files...
4
- `),await this.rebuild(t,i,!1))})})}async rebuild(t,i,s){try{let r=this.viteServer;if(!r)throw Error("Cannot rebuild the project: the watcher has no Vite server yet, because it was not started. Start the watcher before applying files");let l=await c();if(this.isShuttingDown)return;let h=await this.builder.build({compile:!s});if(this.isShuttingDown)return;if(a(h.diagnostics,this.logger),!h.ok){for(let e of h.errors)this.logger.error(`[${e.code}] ${e.message}${e.file?` (${e.file})`:""}`);this.pubsub.specFile$.next({rawProjectFiles:h.rawProjectFiles,projectRoot:process.cwd()});return}this.onRebuilt?.();let{application:g,changedFiles:d}=h,w=r.moduleGraph,b=Date.now(),f=new Set,m=process.cwd(),S=e=>{let t=w.getModulesByFile(n(e));if(t)for(let e of t)w.invalidateModule(e,f,b,!0)};for(let i of t)S(e(m,i));for(let t of d)S(e(m,`.phoenix/${t.path}`));if(this.pubsub.specFile$.next({rawProjectFiles:g.rawProjectFiles,projectRoot:process.cwd(),configurationSchemaHash:g.applicationSpec.configurator.configurationSchema.hash}),this.isShuttingDown)return;if(i){if(await r.close(),this.isShuttingDown)return;let e=await p({templateFiles:l});if(this.isShuttingDown)return;let t=await o(e);if(this.isShuttingDown||(await t.listen(),this.isShuttingDown))return void await t.close();this.viteServer=t,this.onViteServerChange?.(t),this.logger.success("Vite server restarted (env changed)")}if(this.useServer&&!s){if(this.logger.step("Building webhooks"),await u({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js",preserveExistingOutput:!0}),this.isShuttingDown)return;this.logger.success("Webhooks rebuilt successfully")}this.logger.success("Project files rebuilt successfully")}catch(e){this.logger.error(`Build failed: ${e instanceof Error?e.message:String(e)}`,e)}}}
4
+ `),await this.rebuild(t,i,!1))})})}async rebuild(e,i,s){try{let r=this.viteServer;if(!r)throw Error("Cannot rebuild the project: the watcher has no Vite server yet, because it was not started. Start the watcher before applying files");let o=await u();if(this.isShuttingDown)return;let h=await this.builder.build({compile:!s});if(this.isShuttingDown)return;if(c(h.diagnostics,this.logger),!h.ok){for(let e of h.errors)this.logger.error(`[${e.code}] ${e.message}${e.file?` (${e.file})`:""}`);this.pubsub.specFile$.next({rawProjectFiles:h.rawProjectFiles,projectRoot:process.cwd()});return}this.onRebuilt?.();let{application:a,changedFiles:d}=h,w=r.moduleGraph,b=Date.now(),f=new Set,S=process.cwd(),m=e=>{let t=w.getModulesByFile(l(e));if(t)for(let e of t)w.invalidateModule(e,f,b,!0)};for(let i of e)m(t(S,i));for(let e of d)m(t(S,`.phoenix/${e.path}`));if(this.pubsub.specFile$.next({rawProjectFiles:a.rawProjectFiles,projectRoot:process.cwd(),configurationSchemaHash:a.applicationSpec.configurator.configurationSchema.hash}),this.isShuttingDown)return;if(i){if(await r.close(),this.isShuttingDown)return;let e=await g({templateFiles:o});if(this.isShuttingDown)return;let t=await n(e);if(this.isShuttingDown||(await t.listen(),this.isShuttingDown))return void await t.close();this.viteServer=t,this.onViteServerChange?.(t),this.logger.success("Vite server restarted (env changed)")}if(this.useServer&&!s){if(this.logger.step("Building webhooks"),await p({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js",preserveExistingOutput:!0}),this.isShuttingDown)return;this.logger.success("Webhooks rebuilt successfully")}this.logger.success("Project files rebuilt successfully")}catch(e){this.logger.error(`Build failed: ${e instanceof Error?e.message:String(e)}`,e)}}}
@@ -1,4 +1,12 @@
1
1
  import { type Logger } from '../utils/index.js';
2
+ /**
3
+ * The project's Lingui configuration, which sync generates, relative to the project root. The Lingui
4
+ * CLI, the Lingui Vite plugin and the Lingui macros in the Vite builds are always given this path, so a
5
+ * `.linguirc` that earlier SDK versions left in the project root is not read. Lingui searches the
6
+ * working directory instead only when the named file is missing; generation writes it with the rest of
7
+ * `.phoenix/` before Phoenix runs Lingui or Vite.
8
+ */
9
+ export declare const LINGUI_CONFIG_PATH = ".phoenix/.linguirc";
2
10
  interface LinguiCommandContext {
3
11
  readonly logger: Logger;
4
12
  }
@@ -1 +1 @@
1
- import{runCommand as i}from"../utils/index.js";let n=async n=>{await i({command:"lingui",args:["extract"],description:"Extracting i18n messages",quiet:!0,extraEnv:{LC_ALL:"en_US.UTF-8"}},n)};export const compileLingui=async n=>{await i({command:"lingui",args:["compile"],description:"Compiling i18n messages",quiet:!0},n)};export const extractAndCompileLingui=async i=>{await n(i),await compileLingui(i)};
1
+ import{runSdkTool as i}from"../utils/index.js";export const LINGUI_CONFIG_PATH=".phoenix/.linguirc";let n=async n=>{await i({tool:{packageName:"@lingui/cli",binName:"lingui"},args:["extract","--config",LINGUI_CONFIG_PATH],description:"Extracting i18n messages",quiet:!0,extraEnv:{LC_ALL:"en_US.UTF-8"}},n)};export const compileLingui=async n=>{await i({tool:{packageName:"@lingui/cli",binName:"lingui"},args:["compile","--config",LINGUI_CONFIG_PATH],description:"Compiling i18n messages",quiet:!0},n)};export const extractAndCompileLingui=async i=>{await n(i),await compileLingui(i)};
@@ -3,6 +3,7 @@ export interface SourceArchive {
3
3
  readonly path: string;
4
4
  readonly fileCount: number;
5
5
  readonly size: number;
6
+ readonly hasConversationLog: boolean;
6
7
  readonly cleanup: () => Promise<void>;
7
8
  }
8
9
  /** What `extractSourceArchive` wrote and what it left out. */
@@ -1 +1 @@
1
- import{execFile as e}from"node:child_process";import{createReadStream as r,createWriteStream as t}from"node:fs";import{lstat as o,mkdir as i,mkdtemp as a,readdir as n,rm as s,stat as c,writeFile as l}from"node:fs/promises";import{tmpdir as h}from"node:os";import{dirname as p,join as f}from"node:path";import{Transform as d}from"node:stream";import{pipeline as w}from"node:stream/promises";import{promisify as m}from"node:util";import{createGunzip as u}from"node:zlib";import{extract as g}from"tar-stream";import{isProjectFile as y,listProjectEntries as v}from"../application-spec/project-files.js";let x=m(e);export const createSourceArchive=async e=>{let r=await Promise.all((await v(e)).map(async r=>({name:r,entry:await o(f(e,r))}))),t=r.filter(({entry:e})=>!e.isDirectory()&&(!e.isFile()||e.nlink>1)),i=r.filter(({entry:e})=>e.isFile()).map(({name:e})=>e);if(t.length>0)throw Error(`These project files are links or special files, which builds do not accept: ${t.map(({name:e})=>e).join(", ")}. Replace them with regular files and deploy again.`);if(0===i.length)throw Error(`No project files were found in ${e}, so there is nothing to deploy. Run phoenix deploy in the folder of an application-spec project.`);let n=await a(f(h(),"phoenix-deploy-")),p="sources.tgz",d=f(n,p),w=f(n,"files");try{await l(w,i.join("\0")),await x("tar",["-czf",p,"-C",e,"--null","-T",w],{cwd:n,env:{...process.env,COPYFILE_DISABLE:"1"}})}catch(r){await s(n,{recursive:!0,force:!0});let e=r instanceof Error?r.message:String(r);throw Error(`Packing the project with tar failed: ${e}. Check that tar is installed and on the PATH.`)}return{path:d,fileCount:i.length,size:(await c(d)).size,cleanup:()=>s(n,{recursive:!0,force:!0})}};let E=(e,...r)=>e instanceof Error&&"code"in e&&"string"==typeof e.code&&r.includes(e.code),j=async e=>{try{return 0===(await n(e)).length}catch(e){if(E(e,"ENOENT"))return!0;throw e}},T=class ArchiveRefusal extends Error{},b=e=>e.length>0&&!e.startsWith("/")&&!e.includes("\\")&&!/^[A-Za-z]:/.test(e)&&!/[\x00-\x1f\x7f]/.test(e)&&!e.split("/").includes("..");export const extractSourceArchive=async e=>{let o,a,{archivePath:n,targetDir:l}=e,h=(await c(n)).size;if(h>0xc800000)throw Error(`The source archive is ${h} bytes, over the 209715200 byte limit. Remove large files from the project and deploy again.`);if(!await j(l))throw Error(`The folder ${l} is not empty, and extracted sources must not mix with existing files. Extract into a new or empty folder.`);let m=g(),v=new AbortController,x=w(r(n),u(),(a=0,new d({transform(e,r,t){(a+=e.length)>0x40000000?t(new T("The source archive extracts to more than 1073741824 bytes. Remove large files from the project and deploy again.")):t(null,e)}})),m).catch(e=>{o??=e,v.abort()}),$=[],z=0,R=0;try{for await(let e of m){let{type:r}=e.header,o=e.header.name.replace(/^(\.\/)+/,""),a=JSON.stringify(o);if("directory"===r){e.resume();continue}if((R+=1)>1e5)throw new T("The source archive has more than 100000 files. Remove generated or unused files from the project and deploy again.");if(!b(o))throw new T(`The source archive contains ${a}, which is not a plain relative path inside the project. Pack the project with phoenix deploy.`);if("file"!==r)throw new T(`The source archive contains ${a}, which is a ${r??"special file"}. Builds accept only regular files; replace it with a regular file and deploy again.`);if(!y(o)){$.push(o),e.resume();continue}let n=f(l,...o.split("/"));try{await i(p(n),{recursive:!0}),await w(e,t(n,{flags:"wx"}),{signal:v.signal})}catch(e){if(E(e,"EEXIST","ENOTDIR","EISDIR"))throw new T(`The source archive contains ${a}, which repeats or collides with an earlier entry, so its content is ambiguous. Pack the project with phoenix deploy.`);throw e}z+=1}if(await x,void 0!==o)throw o}catch(t){let e=t instanceof T?t:o??t;if(m.destroy(),await x,await s(l,{recursive:!0,force:!0}),e instanceof T)throw e;let r=e instanceof Error?e.message:String(e);throw Error(`The source archive could not be read: ${r}. It is truncated or not a gzip tarball; pack the project with phoenix deploy.`)}return{fileCount:z,skipped:$}};
1
+ import{execFile as e}from"node:child_process";import{createReadStream as r,createWriteStream as t}from"node:fs";import{lstat as o,mkdir as i,mkdtemp as a,readdir as n,rm as s,stat as c,writeFile as l}from"node:fs/promises";import{tmpdir as h}from"node:os";import{dirname as p,join as f}from"node:path";import{Transform as d}from"node:stream";import{pipeline as w}from"node:stream/promises";import{promisify as m}from"node:util";import{createGunzip as u}from"node:zlib";import{extract as g}from"tar-stream";import{isProjectFile as y,listProjectEntries as v}from"../application-spec/project-files.js";let x=m(e);export const createSourceArchive=async e=>{let r=(await n(e)).includes("conversation.log"),t=[...await v(e),...r?["conversation.log"]:[]],i=await Promise.all(t.map(async r=>({name:r,entry:await o(f(e,r))})));if(i.some(({name:e,entry:r})=>"conversation.log"===e&&r.isDirectory()))throw Error("conversation.log is a directory. Replace it with a regular transcript file and deploy again.");let p=i.filter(({entry:e})=>!e.isDirectory()&&(!e.isFile()||e.nlink>1)),d=i.filter(({entry:e})=>e.isFile()).map(({name:e})=>e);if(p.length>0)throw Error(`These project files are links or special files, which builds do not accept: ${p.map(({name:e})=>e).join(", ")}. Replace them with regular files and deploy again.`);if(0===d.length)throw Error(`No project files were found in ${e}, so there is nothing to deploy. Run phoenix deploy in the folder of an application-spec project.`);let w=await a(f(h(),"phoenix-deploy-")),m="sources.tgz",u=f(w,m),g=f(w,"files");try{await l(g,d.join("\0")),await x("tar",["-czf",m,"-C",e,"--null","-T",g],{cwd:w,env:{...process.env,COPYFILE_DISABLE:"1"}})}catch(r){await s(w,{recursive:!0,force:!0});let e=r instanceof Error?r.message:String(r);throw Error(`Packing the project with tar failed: ${e}. Check that tar is installed and on the PATH.`)}return{path:u,fileCount:d.length,size:(await c(u)).size,hasConversationLog:r,cleanup:()=>s(w,{recursive:!0,force:!0})}};let E=(e,...r)=>e instanceof Error&&"code"in e&&"string"==typeof e.code&&r.includes(e.code),j=async e=>{try{return 0===(await n(e)).length}catch(e){if(E(e,"ENOENT"))return!0;throw e}},T=class ArchiveRefusal extends Error{},b=e=>e.length>0&&!e.startsWith("/")&&!e.includes("\\")&&!/^[A-Za-z]:/.test(e)&&!/[\x00-\x1f\x7f]/.test(e)&&!e.split("/").includes("..");export const extractSourceArchive=async e=>{let o,a,{archivePath:n,targetDir:l}=e,h=(await c(n)).size;if(h>0xc800000)throw Error(`The source archive is ${h} bytes, over the 209715200 byte limit. Remove large files from the project and deploy again.`);if(!await j(l))throw Error(`The folder ${l} is not empty, and extracted sources must not mix with existing files. Extract into a new or empty folder.`);let m=g(),v=new AbortController,x=w(r(n),u(),(a=0,new d({transform(e,r,t){(a+=e.length)>0x40000000?t(new T("The source archive extracts to more than 1073741824 bytes. Remove large files from the project and deploy again.")):t(null,e)}})),m).catch(e=>{o??=e,v.abort()}),$=[],R=0,z=0;try{for await(let e of m){let{type:r}=e.header,o=e.header.name.replace(/^(\.\/)+/,""),a=JSON.stringify(o);if("directory"===r){e.resume();continue}if((z+=1)>1e5)throw new T("The source archive has more than 100000 files. Remove generated or unused files from the project and deploy again.");if(!b(o))throw new T(`The source archive contains ${a}, which is not a plain relative path inside the project. Pack the project with phoenix deploy.`);if("file"!==r)throw new T(`The source archive contains ${a}, which is a ${r??"special file"}. Builds accept only regular files; replace it with a regular file and deploy again.`);if(!y(o)){$.push(o),e.resume();continue}let n=f(l,...o.split("/"));try{await i(p(n),{recursive:!0}),await w(e,t(n,{flags:"wx"}),{signal:v.signal})}catch(e){if(E(e,"EEXIST","ENOTDIR","EISDIR"))throw new T(`The source archive contains ${a}, which repeats or collides with an earlier entry, so its content is ambiguous. Pack the project with phoenix deploy.`);throw e}R+=1}if(await x,void 0!==o)throw o}catch(t){let e=t instanceof T?t:o??t;if(m.destroy(),await x,await s(l,{recursive:!0,force:!0}),e instanceof T)throw e;let r=e instanceof Error?e.message:String(e);throw Error(`The source archive could not be read: ${r}. It is truncated or not a gzip tarball; pack the project with phoenix deploy.`)}return{fileCount:R,skipped:$}};
@@ -1,3 +1,3 @@
1
- import{transform as e}from"@swc/core";import{remove as t}from"fs-extra";import{copyFile as s,mkdir as o,readFile as a,writeFile as i}from"fs/promises";import{globby as r}from"globby";import{dirname as c,relative as l,resolve as n}from"path";import{Subject as p}from"rxjs";import{watch as m}from"#package/watch";import{createLogger as w}from"../utils/index.js";let u=()=>({sourceMaps:!0,module:{type:"es6"},jsc:{target:"es2022",parser:{syntax:"typescript",tsx:!0},transform:{react:{runtime:"automatic"}},keepClassNames:!0,experimental:{plugins:[["@lingui/swc-plugin",{}]]}}}),d=async(e,t,a)=>{let i=process.cwd(),p=n(i,e),m=n(i,t),w=await r(["**/*.{html,css,json,txt,md}","**/.env*"],{cwd:p,ignore:["**/*.{spec,test}.{html,css,json,txt,md}","**/__tests__/**","**/__mocks__/**","**/tsconfig.json"],absolute:!1}),u=0,d=0;for(let e of w)try{let t=n(p,e),a=n(m,e);await o(c(a),{recursive:!0}),await s(t,a),u++}catch(t){d++,console.error(`Failed to copy ${l(i,n(p,e))}:`,t)}if(d>0)throw Error(`Failed to copy ${d} file(s)`);u>0&&a.debug(`Copied ${u} non-compilable file(s)`)};export const compileWithSwc=async(s,p)=>{let{sourceDir:m="src",outDir:f="./node_modules/.phoenix"}=s??{},g=p?.logger??w(),h=process.cwd(),x=n(h,m),_=n(h,f);await t(_);let y=await r(["**/*.{ts,tsx}"],{cwd:x,ignore:["**/*.{spec,test}.{ts,tsx}","**/__tests__/**","**/__mocks__/**"],absolute:!1}),b=u(),$=0,j=0;for(let t of y)try{let s=n(x,t),r=n(_,t.replace(/\.tsx?$/,".js")),l=await a(s,"utf-8"),p=await e(l,{...b,filename:s,sourceMaps:!0,outputPath:r});await o(c(r),{recursive:!0}),await i(r,p.code,"utf-8"),p.map&&await i(`${r}.map`,p.map,"utf-8"),$++}catch(e){j++,console.error(`Failed to compile ${l(h,n(x,t))}:`,e)}if(j>0)throw Error(`Failed to compile ${j} file(s)`);g.isDebug&&g.debug(`Compiled ${$} file(s) with swc`),await d(m,f,g)};let f=async(t,s,r)=>{let l=process.cwd(),p=n(l,s),m=n(l,r),w=u(),d=n(p,t),f=n(m,t.replace(/\.tsx?$/,".js")),g=await a(d,"utf-8"),h=await e(g,{...w,filename:d,sourceMaps:!0,outputPath:f});await o(c(f),{recursive:!0}),await i(f,h.code,"utf-8"),h.map&&await i(`${f}.map`,h.map,"utf-8")},g=async(e,t,a)=>{let i=process.cwd(),r=n(i,t),l=n(i,a),p=n(r,e),m=n(l,e);await o(c(m),{recursive:!0}),await s(p,m)};export const watchWithSwc=async(e,t)=>{let{sourceDir:s="src",outDir:o="./node_modules/.phoenix"}=e??{},a=t?.logger??w(),i=n(process.cwd(),s);a.isDebug&&a.step("Running initial SWC compilation"),await compileWithSwc({sourceDir:s,outDir:o},t),a.isDebug&&a.success("Initial compilation complete");let r=new p,c=m(["**/*.{ts,tsx,html,css,json,txt,md}","../.env*"],{cwd:i,ignored:["**/*.{spec,test}.{ts,tsx}","**/__tests__/**","**/cache.json"],persistent:!0,ignoreInitial:!0});return c.on("all",(e,t)=>{("change"===e||"add"===e)&&r.next({file:t,type:e})}),r.subscribe(async({file:e})=>{let t=l(i,n(i,e));try{e.match(/\.tsx?$/)?(await f(t,s,o),a.fileChanged(t)):(e.match(/\.(html|css|json|txt|md)$/)||e.match(/\.env/))&&(await g(t,s,o),a.fileChanged(t))}catch(e){a.error(`Failed to process ${t}`),a.isDebug&&console.error(e)}}),a.isDebug&&console.log(`
1
+ import{transform as e}from"@swc/core";import{remove as t}from"fs-extra";import{copyFile as s,mkdir as o,readFile as a,writeFile as r}from"fs/promises";import{globby as i}from"globby";import{createRequire as c}from"node:module";import{dirname as l,relative as n,resolve as p}from"path";import{Subject as m}from"rxjs";import{watch as w}from"#package/watch";import{createLogger as d}from"../utils/index.js";let u=()=>({sourceMaps:!0,module:{type:"es6"},jsc:{target:"es2022",parser:{syntax:"typescript",tsx:!0},transform:{react:{runtime:"automatic"}},keepClassNames:!0,experimental:{plugins:[[c(import.meta.url).resolve("@lingui/swc-plugin"),{}]],cacheRoot:"node_modules/.cache/swc"}}}),f=async(e,t,a)=>{let r=process.cwd(),c=p(r,e),m=p(r,t),w=await i(["**/*.{html,css,json,txt,md}","**/.env*"],{cwd:c,ignore:["**/*.{spec,test}.{html,css,json,txt,md}","**/__tests__/**","**/__mocks__/**","**/tsconfig.json",".env.generated"],absolute:!1}),d=0,u=0;for(let e of w)try{let t=p(c,e),a=p(m,e);await o(l(a),{recursive:!0}),await s(t,a),d++}catch(t){u++,console.error(`Failed to copy ${n(r,p(c,e))}:`,t)}if(u>0)throw Error(`Failed to copy ${u} file(s)`);d>0&&a.debug(`Copied ${d} non-compilable file(s)`)};export const compileWithSwc=async(s,c)=>{let{sourceDir:m="src",outDir:w="./node_modules/.phoenix"}=s??{},g=c?.logger??d(),h=process.cwd(),_=p(h,m),x=p(h,w);await t(x);let y=await i(["**/*.{ts,tsx}"],{cwd:_,ignore:["**/*.{spec,test}.{ts,tsx}","**/__tests__/**","**/__mocks__/**"],absolute:!1}),b=u(),$=0,j=0;for(let t of y)try{let s=p(_,t),i=p(x,t.replace(/\.tsx?$/,".js")),c=await a(s,"utf-8"),n=await e(c,{...b,filename:s,sourceMaps:!0,outputPath:i});await o(l(i),{recursive:!0}),await r(i,n.code,"utf-8"),n.map&&await r(`${i}.map`,n.map,"utf-8"),$++}catch(e){j++,console.error(`Failed to compile ${n(h,p(_,t))}:`,e)}if(j>0)throw Error(`Failed to compile ${j} file(s)`);g.isDebug&&g.debug(`Compiled ${$} file(s) with swc`),await f(m,w,g)};let g=async(t,s,i)=>{let c=process.cwd(),n=p(c,s),m=p(c,i),w=u(),d=p(n,t),f=p(m,t.replace(/\.tsx?$/,".js")),g=await a(d,"utf-8"),h=await e(g,{...w,filename:d,sourceMaps:!0,outputPath:f});await o(l(f),{recursive:!0}),await r(f,h.code,"utf-8"),h.map&&await r(`${f}.map`,h.map,"utf-8")},h=async(e,t,a)=>{let r=process.cwd(),i=p(r,t),c=p(r,a),n=p(i,e),m=p(c,e);await o(l(m),{recursive:!0}),await s(n,m)};export const watchWithSwc=async(e,t)=>{let{sourceDir:s="src",outDir:o="./node_modules/.phoenix"}=e??{},a=t?.logger??d(),r=p(process.cwd(),s);a.isDebug&&a.step("Running initial SWC compilation"),await compileWithSwc({sourceDir:s,outDir:o},t),a.isDebug&&a.success("Initial compilation complete");let i=new m,c=w(["**/*.{ts,tsx,html,css,json,txt,md}","../.env*"],{cwd:r,ignored:["**/*.{spec,test}.{ts,tsx}","**/__tests__/**","**/cache.json"],persistent:!0,ignoreInitial:!0});return c.on("all",(e,t)=>{("change"===e||"add"===e)&&i.next({file:t,type:e})}),i.subscribe(async({file:e})=>{let t=n(r,p(r,e));try{e.match(/\.tsx?$/)?(await g(t,s,o),a.fileChanged(t)):(e.match(/\.(html|css|json|txt|md)$/)||e.match(/\.env/))&&(await h(t,s,o),a.fileChanged(t))}catch(e){a.error(`Failed to process ${t}`),a.isDebug&&console.error(e)}}),a.isDebug&&console.log(`
2
2
  👀 Watching ${s} for changes...
3
3
  `),{stop:async()=>{await c.close(),a.isDebug&&a.info("SWC watcher stopped")}}};
@@ -1 +1 @@
1
- import{lingui as e}from"@lingui/vite-plugin";import i from"@vitejs/plugin-react";import{mkdir as t,readFile as n,writeFile as r}from"fs/promises";import o from"lodash-es/camelCase.js";import{createRequire as a}from"node:module";import{dirname as s,resolve as m}from"path";import{createLogger as l}from"vite";import p from"vite-plugin-css-injected-by-js";import{isUsingLocalSdk as d}from"../utils/package-info.js";import{loadFrontendConfigModule as f}from"./frontend-config.js";import{phxBannerPlugin as c}from"./phx-banner-plugin.js";import{phxCspNoncePlugin as g}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as u}from"./phx-global-isolation-plugin.js";import{phxLicensesPlugin as h}from"./phx-licenses-plugin.js";import{phxVariantPreviewsPlugin as S}from"./phx-variant-previews-plugin.js";let b=null;export const setViteLogSink=(e,i={})=>{b={sink:e,echo:i.echo??!1}};let y=["react","react-dom","three","@react-three/fiber","@react-three/drei","@react-three/postprocessing","its-fine","@emotion/react","@emotion/styled","@mui/material","@mui/system","@tanstack/react-query","rxjs"],O=e=>{let i=e.DEPLOYMENT_ID;if("string"!=typeof i)throw Error("DEPLOYMENT_ID is required in runtime config");return i};export const getViteDevConfig=async t=>{var n,r;let o,p,c=d(),g=f(),h=g.readRuntimeConfig(),x=g.frontendBuildConfig,D=Object.fromEntries((t?.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...b&&{customLogger:(n=b.sink,r=b.echo,o=l(),{get hasWarned(){return o.hasWarned},info:(e,i)=>{n("info",e),r&&o.info(e,i)},warn:(e,i)=>{n("warn",e),r&&o.warn(e,i)},warnOnce:(e,i)=>{n("warn",e),r&&o.warnOnce(e,i)},error:(e,i)=>{n("error",e),r&&o.error(e,i)},clearScreen:e=>{r&&o.clearScreen(e)},hasErrorLogged:e=>o.hasErrorLogged(e)}),...b.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...c&&{entries:["index.html","admin.html",...t?.templateFiles??[]],force:!0}},...c&&{resolve:{alias:(p=a(m(process.cwd(),"package.json")),y.flatMap(e=>{try{let i=s(p.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[i({babel:{plugins:["macros"]}}),e(),{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=g.readRuntimeConfig(),t=g.frontendBuildConfig;return{...e,define:{...e.define,"phx.frontendEnv":JSON.stringify(i),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(t.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(t.gltfDecoder)}}}},u({getDeploymentId:()=>O(g.readRuntimeConfig())}),S()],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(h),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(x.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(x.gltfDecoder)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...D}}},root:m(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]}}}};export const getViteBuildConfigs=async a=>{let l=f(),d=l.readRuntimeConfig(),S=l.frontendBuildConfig,b=h(),y=c({sdkVersion:a.sdkVersion,banner:a.banner}),x=[{name:"salsita-configurator",entryFile:"./configurator.ts",mainScriptPath:"./configurator.ts",htmlFiles:["./index.html",...{templateFiles:a.templateFiles}.templateFiles],main:!0,format:"iife"},{name:"salsita-admin",entryFile:"./admin.ts",mainScriptPath:"./admin.ts",htmlFiles:["./admin.html"],main:!1,format:"iife"},{name:"salsita-embedded-admin",entryFile:"./embedded-admin.ts",mainScriptPath:"./embedded-admin.ts",htmlFiles:[],main:!1,format:"es"},{name:"salsita-embedded-configurator",entryFile:"./embedded-configurator.ts",mainScriptPath:"./embedded-configurator.ts",htmlFiles:[],main:!1,format:"es"}].map(f=>({plugins:[i({babel:{plugins:["macros"]}}),e(),p({useStrictCSP:!0}),g(),u({getDeploymentId:()=>O(l.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!f.htmlFiles.length)return;let e="iife"===f.format?`${f.name}.iife.js`:`${f.name}.js`;for(let i of f.htmlFiles){if(f.main&&a.enableEditor&&"./index.html"===i)continue;let o=m("./.phoenix",i),l=m("./.phoenix/dist/frontend",i);await t(s(l),{recursive:!0});let p=(await n(o,"utf-8")).replace(f.mainScriptPath,e);await r(l,p,"utf-8")}}},b,y],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:f.entryFile,name:o(f.name),formats:[f.format],fileName:()=>"iife"===f.format?`${f.name}.iife.js`:`${f.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${f.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(d),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}));return a.enableEditor?[...x,{plugins:[i({babel:{plugins:["macros"]}}),e(),p({useStrictCSP:!0}),g(),b,y],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(d),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}]:x};
1
+ import{getConfig as e}from"@lingui/conf";import{lingui as i}from"@lingui/vite-plugin";import t from"@vitejs/plugin-react";import{mkdir as n,readFile as r,writeFile as o}from"fs/promises";import a from"lodash-es/camelCase.js";import{createRequire as s}from"node:module";import{dirname as l,resolve as m}from"path";import{createLogger as f}from"vite";import p from"vite-plugin-css-injected-by-js";import{isUsingLocalSdk as d}from"../utils/package-info.js";import{loadFrontendConfigModule as c}from"./frontend-config.js";import{LINGUI_CONFIG_PATH as g}from"./lingui.js";import{phxBannerPlugin as u}from"./phx-banner-plugin.js";import{phxCspNoncePlugin as h}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as b}from"./phx-global-isolation-plugin.js";import{phxLicensesPlugin as S}from"./phx-licenses-plugin.js";import{phxVariantPreviewsPlugin as y}from"./phx-variant-previews-plugin.js";let O=null;export const setViteLogSink=(e,i={})=>{O={sink:e,echo:i.echo??!1}};let x=["react","react-dom","three","@react-three/fiber","@react-three/drei","@react-three/postprocessing","its-fine","@emotion/react","@emotion/styled","@mui/material","@mui/system","@tanstack/react-query","rxjs"],D=()=>[s(import.meta.url).resolve("@lingui/babel-plugin-lingui-macro"),{linguiConfig:e({configPath:g})}],E=e=>{let i=e.DEPLOYMENT_ID;if("string"!=typeof i)throw Error("DEPLOYMENT_ID is required in runtime config");return i};export const getViteDevConfig=async e=>{var n,r;let o,a,p=d(),u=c(),h=u.readRuntimeConfig(),S=u.frontendBuildConfig,v=D(),j=Object.fromEntries((e?.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...O&&{customLogger:(n=O.sink,r=O.echo,o=f(),{get hasWarned(){return o.hasWarned},info:(e,i)=>{n("info",e),r&&o.info(e,i)},warn:(e,i)=>{n("warn",e),r&&o.warn(e,i)},warnOnce:(e,i)=>{n("warn",e),r&&o.warnOnce(e,i)},error:(e,i)=>{n("error",e),r&&o.error(e,i)},clearScreen:e=>{r&&o.clearScreen(e)},hasErrorLogged:e=>o.hasErrorLogged(e)}),...O.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...p&&{entries:["index.html","admin.html",...e?.templateFiles??[]],force:!0}},...p&&{resolve:{alias:(a=s(m(process.cwd(),"package.json")),x.flatMap(e=>{try{let i=l(a.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[t({babel:{plugins:[v]}}),i({configPath:g}),{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=u.readRuntimeConfig(),t=u.frontendBuildConfig;return{...e,define:{...e.define,"phx.frontendEnv":JSON.stringify(i),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(t.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(t.gltfDecoder)}}}},b({getDeploymentId:()=>E(u.readRuntimeConfig())}),y()],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(h),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...j}}},root:m(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]}}}};export const getViteBuildConfigs=async e=>{let s=c(),f=s.readRuntimeConfig(),d=s.frontendBuildConfig,y=D(),O=S(),x=u({sdkVersion:e.sdkVersion,banner:e.banner}),v=[{name:"salsita-configurator",entryFile:"./configurator.ts",mainScriptPath:"./configurator.ts",htmlFiles:["./index.html",...{templateFiles:e.templateFiles}.templateFiles],main:!0,format:"iife"},{name:"salsita-admin",entryFile:"./admin.ts",mainScriptPath:"./admin.ts",htmlFiles:["./admin.html"],main:!1,format:"iife"},{name:"salsita-embedded-admin",entryFile:"./embedded-admin.ts",mainScriptPath:"./embedded-admin.ts",htmlFiles:[],main:!1,format:"es"},{name:"salsita-embedded-configurator",entryFile:"./embedded-configurator.ts",mainScriptPath:"./embedded-configurator.ts",htmlFiles:[],main:!1,format:"es"}].map(c=>({plugins:[t({babel:{plugins:[y]}}),i({configPath:g}),p({useStrictCSP:!0}),h(),b({getDeploymentId:()=>E(s.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!c.htmlFiles.length)return;let i="iife"===c.format?`${c.name}.iife.js`:`${c.name}.js`;for(let t of c.htmlFiles){if(c.main&&e.enableEditor&&"./index.html"===t)continue;let a=m("./.phoenix",t),s=m("./.phoenix/dist/frontend",t);await n(l(s),{recursive:!0});let f=(await r(a,"utf-8")).replace(c.mainScriptPath,i);await o(s,f,"utf-8")}}},O,x],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:c.entryFile,name:a(c.name),formats:[c.format],fileName:()=>"iife"===c.format?`${c.name}.iife.js`:`${c.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${c.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(d.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(d.gltfDecoder)}}));return e.enableEditor?[...v,{plugins:[t({babel:{plugins:[y]}}),i({configPath:g}),p({useStrictCSP:!0}),h(),O,x],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(d.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(d.gltfDecoder)}}]:v};
@@ -0,0 +1 @@
1
+ export { isInsideGitRepository } from './is-inside-git-repository.js';
@@ -0,0 +1 @@
1
+ export{isInsideGitRepository}from"./is-inside-git-repository.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Whether a folder is inside a git work tree: the folder or one of its parents, up to the file-system root, holds a
3
+ * `.git` entry. The entry is a directory in a plain checkout and a file in a linked worktree or a submodule; both
4
+ * count. Only the file system is read, so the answer does not depend on git being installed.
5
+ */
6
+ export declare const isInsideGitRepository: (folder: string) => boolean;
@@ -0,0 +1 @@
1
+ import{existsSync as t,realpathSync as r}from"fs";import{dirname as e,join as i,resolve as o}from"path";export const isInsideGitRepository=f=>{let n=(t=>{let e=o(t);try{return r(e)}catch{return e}})(f);for(;;){if(t(i(n,".git")))return!0;let r=e(n);if(r===n)return!1;n=r}};
@@ -4,9 +4,12 @@ export { formatEnvContent, formatEnvLine } from './env-file.js';
4
4
  export { parseChangelog, getLatestVersion, getVersion, paginateVersions, getVersionNumbers, type ChangelogVersion, type PaginatedVersions, } from './changelog-parser.js';
5
5
  export { createDirectoryFromYaml, exists, scanFolderForFiles, syncChangedFiles, syncExistingFolders, validateFolders, writeFileIfNotExists, writeFilesIfNotExists, writeRawFiles, } from './file-system.js';
6
6
  export { FileLogger } from './file-logger.js';
7
+ export { isInsideGitRepository } from './git/index.js';
7
8
  export { type Logger, type CreateLoggerOptions, createLogger } from './logger.js';
8
- export { addWorkspaceOverrides, ensureWorkspaceInstallSettings, getLocalOverrides, getSdkPackages, getWorkspaceDir, hasLocalOverrides, readPackageJson, removeWorkspaceOverrides, } from './package-info.js';
9
+ export { addWorkspaceOverrides, getLocalOverrides, getSdkPackages, getWorkspaceDir, hasLocalOverrides, readPackageJson, removeWorkspaceOverrides, } from './package-info.js';
10
+ export { naturalCompare } from './natural-compare.js';
11
+ export { type PackageManagerCommands, assertPnpmProject, findPackageManagerCommands } from './package-manager/index.js';
9
12
  export { toPascalCase } from './pascal-case.js';
10
13
  export { readGitCommit } from './read-git-commit.js';
11
- export { type RunCommandProps, runCommand } from './run-command.js';
14
+ export { type RunCommandProps, type RunSdkToolProps, runCommand, runSdkTool } from './run-command.js';
12
15
  export { type FileUploadInfo, type UploadLinksData, uploadFilesWithPresignedUrls, readUploadLinks, } from './upload-utils.js';
@@ -1 +1 @@
1
- export{askQuestion}from"./ask-question.js";export{checkBundleSizeBudgets}from"./check-bundle-size-budgets.js";export{formatEnvContent,formatEnvLine}from"./env-file.js";export{parseChangelog,getLatestVersion,getVersion,paginateVersions,getVersionNumbers}from"./changelog-parser.js";export{createDirectoryFromYaml,exists,scanFolderForFiles,syncChangedFiles,syncExistingFolders,validateFolders,writeFileIfNotExists,writeFilesIfNotExists,writeRawFiles}from"./file-system.js";export{FileLogger}from"./file-logger.js";export{createLogger}from"./logger.js";export{addWorkspaceOverrides,ensureWorkspaceInstallSettings,getLocalOverrides,getSdkPackages,getWorkspaceDir,hasLocalOverrides,readPackageJson,removeWorkspaceOverrides}from"./package-info.js";export{toPascalCase}from"./pascal-case.js";export{readGitCommit}from"./read-git-commit.js";export{runCommand}from"./run-command.js";export{uploadFilesWithPresignedUrls,readUploadLinks}from"./upload-utils.js";
1
+ export{askQuestion}from"./ask-question.js";export{checkBundleSizeBudgets}from"./check-bundle-size-budgets.js";export{formatEnvContent,formatEnvLine}from"./env-file.js";export{parseChangelog,getLatestVersion,getVersion,paginateVersions,getVersionNumbers}from"./changelog-parser.js";export{createDirectoryFromYaml,exists,scanFolderForFiles,syncChangedFiles,syncExistingFolders,validateFolders,writeFileIfNotExists,writeFilesIfNotExists,writeRawFiles}from"./file-system.js";export{FileLogger}from"./file-logger.js";export{isInsideGitRepository}from"./git/index.js";export{createLogger}from"./logger.js";export{addWorkspaceOverrides,getLocalOverrides,getSdkPackages,getWorkspaceDir,hasLocalOverrides,readPackageJson,removeWorkspaceOverrides}from"./package-info.js";export{naturalCompare}from"./natural-compare.js";export{assertPnpmProject,findPackageManagerCommands}from"./package-manager/index.js";export{toPascalCase}from"./pascal-case.js";export{readGitCommit}from"./read-git-commit.js";export{runCommand,runSdkTool}from"./run-command.js";export{uploadFilesWithPresignedUrls,readUploadLinks}from"./upload-utils.js";
@@ -0,0 +1 @@
1
+ export { assertSupportedNodeVersion, findUnsupportedNodeVersionMessage } from './supported-node-version.js';
@@ -0,0 +1 @@
1
+ export{assertSupportedNodeVersion,findUnsupportedNodeVersionMessage}from"./supported-node-version.js";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Explains why the SDK cannot run on the given Node.js version, or returns `undefined` when the version satisfies the
3
+ * SDK's `engines.node` range.
4
+ */
5
+ export declare const findUnsupportedNodeVersionMessage: (version: string) => string | undefined;
6
+ /**
7
+ * Stops the process with a non-zero exit code when the running Node.js does not satisfy the SDK's `engines.node`
8
+ * range. The `phoenix` binary's entry module (`bin.ts`) calls it and only then loads `cli.ts` with a dynamic import:
9
+ * static imports are evaluated before the importing module's body, so on an older Node.js the CLI's own imports could
10
+ * fail with an unrelated error before a check in its body ran.
11
+ */
12
+ export declare const assertSupportedNodeVersion: () => void;
@@ -0,0 +1,4 @@
1
+ import{readFileSync as e}from"node:fs";import{satisfies as o}from"semver";import{z as s}from"zod";let r=s.object({name:s.string(),engines:s.object({node:s.string()})});export const findUnsupportedNodeVersionMessage=s=>{let{name:t,engines:n}=r.parse(JSON.parse(e(new URL("../../../../package.json",import.meta.url),"utf-8")));if(!o(s,n.node,{includePrerelease:!0}))return`${t} requires Node.js ${n.node}, but this is Node.js ${s}.
2
+ The SDK and the tools it runs use Node.js features that older versions do not have, so a command would fail part way through.
3
+ Switch to a Node.js version that satisfies ${n.node} and run the command again.`};export const assertSupportedNodeVersion=()=>{let e=findUnsupportedNodeVersionMessage(process.version);void 0!==e&&(process.stderr.write(`${e}
4
+ `),process.exit(1))};
@@ -10,15 +10,6 @@ export declare const readPackageJson: (path?: string) => PackageJson;
10
10
  export declare const getWorkspaceDir: () => string;
11
11
  export declare const addWorkspaceOverrides: (entries: Record<string, string>) => void;
12
12
  export declare const removeWorkspaceOverrides: (names: readonly string[]) => void;
13
- /**
14
- * Makes a standalone project installable with pnpm 11: its `pnpm-workspace.yaml` decides the build scripts of the
15
- * SDK's dependencies and exempts the SDK's own packages from the minimum release age. Only missing answers are
16
- * added, so a value the project set stays, and the file travels with a deploy so the server-side install follows it.
17
- *
18
- * A project inside a monorepo is left alone: the workspace root owns these settings, and a file in the project
19
- * folder would turn it into a workspace root of its own.
20
- */
21
- export declare const ensureWorkspaceInstallSettings: (projectRoot: string) => void;
22
13
  export declare const hasLocalOverrides: () => boolean;
23
14
  export declare const getLocalOverrides: () => string[];
24
15
  export declare const hasLocalSymlinks: () => boolean;
@@ -1 +1 @@
1
- import{existsSync as e,lstatSync as t,readFileSync as r,readdirSync as s,writeFileSync as o}from"fs";import{dirname as a,join as i,resolve as l}from"path";import{isMap as n,isScalar as c,isSeq as d,parse as p,parseDocument as m}from"yaml";let u="pnpm-workspace.yaml",f="@salsita-ai/";export const readPackageJson=(t=".")=>{let s=l(t,"package.json");if(!e(s))throw Error(`package.json not found at ${s}`);return JSON.parse(r(s,"utf8"))};let g=(t=process.cwd())=>{let r=l(t);for(;;){let t=i(r,u);if(e(t))return t;let s=a(r);if(s===r)return;r=s}},k=()=>g()??i(process.cwd(),u),h=()=>{try{let e=g();if(!e)return{};let t=p(r(e,"utf8"));return t?.overrides??{}}catch{return{}}};export const getWorkspaceDir=()=>a(k());export const addWorkspaceOverrides=t=>{let s=k(),a=m(e(s)?r(s,"utf8"):"");Object.entries(t).forEach(([e,t])=>{a.setIn(["overrides",e],t)}),a.setIn(["optimisticRepeatInstall"],!1),o(s,a.toString())};export const removeWorkspaceOverrides=e=>{let t=g();if(!t)return;let s=m(r(t,"utf8"));e.forEach(e=>{s.deleteIn(["overrides",e])});let a=s.getIn(["overrides"]);n(a)&&0===a.items.length&&s.delete("overrides"),s.delete("optimisticRepeatInstall"),o(t,s.toString())};let x={"@swc/core":!0,esbuild:!0,"es5-ext":!1},y=`${f}*`;export const ensureWorkspaceInstallSettings=t=>{let s=i(t,u);if(!e(s)&&g(t))return;let a=e(s)?r(s,"utf8"):"",l=m(a);n(l.get("allowBuilds"))||l.set("allowBuilds",l.createNode({})),Object.entries(x).forEach(([e,t])=>{"boolean"!=typeof l.getIn(["allowBuilds",e])&&l.setIn(["allowBuilds",e],t)});let p=l.getIn(["minimumReleaseAgeExclude"]);d(p)?p.items.some(e=>c(e)&&e.value===y)||p.add(y):l.setIn(["minimumReleaseAgeExclude"],l.createNode([y]));let f=l.toString();f!==a&&o(s,f)};export const hasLocalOverrides=()=>Object.keys(h()).some(e=>e.startsWith(f));export const getLocalOverrides=()=>Object.keys(h()).filter(e=>e.startsWith(f));let v=["@salsita-ai/common","@salsita-ai/contracts","@salsita-ai/sdk"];export const hasLocalSymlinks=()=>v.some(e=>{let r=l("node_modules",e);try{return t(r).isSymbolicLink()}catch{return!1}});export const isUsingLocalSdk=()=>hasLocalOverrides()||hasLocalSymlinks();export const getSdkPackages=t=>{let r=l(t,"packages/libs");if(!e(r))throw Error(`SDK libs directory not found at ${r}`);return s(r,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).map(e=>{let t=i(r,e),s=readPackageJson(t);if(!s.name)throw Error(`Package at ${t} has no name in package.json`);return{name:s.name,path:t}})};
1
+ import{existsSync as e,lstatSync as t,readFileSync as r,readdirSync as s,writeFileSync as o}from"fs";import{dirname as a,join as i,resolve as n}from"path";import{isMap as c,parse as l,parseDocument as p}from"yaml";let m="pnpm-workspace.yaml",d="@salsita-ai/";export const readPackageJson=(t=".")=>{let s=n(t,"package.json");if(!e(s))throw Error(`package.json not found at ${s}`);return JSON.parse(r(s,"utf8"))};let f=(t=process.cwd())=>{let r=n(t);for(;;){let t=i(r,m);if(e(t))return t;let s=a(r);if(s===r)return;r=s}},k=()=>f()??i(process.cwd(),m),h=()=>{try{let e=f();if(!e)return{};let t=l(r(e,"utf8"));return t?.overrides??{}}catch{return{}}};export const getWorkspaceDir=()=>a(k());export const addWorkspaceOverrides=t=>{let s=k(),a=p(e(s)?r(s,"utf8"):"");Object.entries(t).forEach(([e,t])=>{a.setIn(["overrides",e],t)}),a.setIn(["optimisticRepeatInstall"],!1),o(s,a.toString())};export const removeWorkspaceOverrides=e=>{let t=f();if(!t)return;let s=p(r(t,"utf8"));e.forEach(e=>{s.deleteIn(["overrides",e])});let a=s.getIn(["overrides"]);c(a)&&0===a.items.length&&s.delete("overrides"),s.delete("optimisticRepeatInstall"),o(t,s.toString())};export const hasLocalOverrides=()=>Object.keys(h()).some(e=>e.startsWith(d));export const getLocalOverrides=()=>Object.keys(h()).filter(e=>e.startsWith(d));let u=["@salsita-ai/common","@salsita-ai/contracts","@salsita-ai/sdk"];export const hasLocalSymlinks=()=>u.some(e=>{let r=n("node_modules",e);try{return t(r).isSymbolicLink()}catch{return!1}});export const isUsingLocalSdk=()=>hasLocalOverrides()||hasLocalSymlinks();export const getSdkPackages=t=>{let r=n(t,"packages/libs");if(!e(r))throw Error(`SDK libs directory not found at ${r}`);return s(r,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name).map(e=>{let t=i(r,e),s=readPackageJson(t);if(!s.name)throw Error(`Package at ${t} has no name in package.json`);return{name:s.name,path:t}})};
@@ -0,0 +1,2 @@
1
+ export { type PackageManagerCommands, findPackageManagerCommands } from './package-manager-commands.js';
2
+ export { assertPnpmProject } from './pnpm-project.js';
@@ -0,0 +1 @@
1
+ export{findPackageManagerCommands}from"./package-manager-commands.js";export{assertPnpmProject}from"./pnpm-project.js";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The commands of a package manager the CLI names in the next steps it prints, so a developer can copy the one for
3
+ * the package manager they use. Phoenix works with any package manager; these only phrase the hints.
4
+ */
5
+ export interface PackageManagerCommands {
6
+ /** Installs the project's dependencies, such as `npm install`. */
7
+ readonly install: string;
8
+ /** Adds a package to the project's dependencies, such as `npm install @salsita-ai/sdk`. */
9
+ readonly add: (packageName: string) => string;
10
+ /** Runs a `phoenix` command from the project's install, such as `npx phoenix sync`. */
11
+ readonly phoenix: (args: string) => string;
12
+ }
13
+ /**
14
+ * The commands of the package manager that started the CLI, read from the `npm_config_user_agent` value npm, pnpm,
15
+ * Yarn and Bun set for the binaries they run (`pnpm/11.1.3 npm/? node/v22.13.0 linux x64`). `undefined` when the CLI
16
+ * was started some other way, such as straight from `node_modules/.bin`, or by a package manager it does not know;
17
+ * the hint then names no package manager.
18
+ */
19
+ export declare const findPackageManagerCommands: (userAgent: string | undefined) => PackageManagerCommands | undefined;
@@ -0,0 +1 @@
1
+ let n=new Map([["pnpm",{install:"pnpm install",add:n=>`pnpm add ${n}`,phoenix:n=>`pnpm phoenix ${n}`}],["npm",{install:"npm install",add:n=>`npm install ${n}`,phoenix:n=>`npx phoenix ${n}`}],["yarn",{install:"yarn install",add:n=>`yarn add ${n}`,phoenix:n=>`yarn phoenix ${n}`}],["bun",{install:"bun install",add:n=>`bun add ${n}`,phoenix:n=>`bunx phoenix ${n}`}]]);export const findPackageManagerCommands=a=>{let p=a?.split("/")[0]?.trim();return void 0===p?void 0:n.get(p)};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Stops a pnpm-only command in a project that clearly installs with another package manager: one with another
3
+ * package manager's lockfile and no `pnpm-lock.yaml`. A project without any lockfile is let through, as it has not
4
+ * installed yet. Only the project folder is looked at.
5
+ */
6
+ export declare const assertPnpmProject: (props: {
7
+ readonly projectRoot: string;
8
+ readonly command: string;
9
+ }) => void;
@@ -0,0 +1 @@
1
+ import{existsSync as o}from"fs";import{join as t}from"path";let n=["package-lock.json","npm-shrinkwrap.json","yarn.lock","bun.lock","bun.lockb"];export const assertPnpmProject=r=>{if(o(t(r.projectRoot,"pnpm-lock.yaml")))return;let a=n.find(n=>o(t(r.projectRoot,n)));if(void 0!==a)throw Error(`phoenix ${r.command} works with pnpm only, and this project installs with another package manager: it has ${a} and no pnpm-lock.yaml. It is an internal tool for linking a local SDK checkout through the overrides in pnpm-workspace.yaml. Use it in a project that installs with pnpm.`)};