hap-cli 0.9.13__tar.gz → 0.9.14__tar.gz

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 (213) hide show
  1. {hap_cli-0.9.13 → hap_cli-0.9.14}/PKG-INFO +1 -1
  2. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/__init__.py +1 -1
  3. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/auth_cmd.py +2 -1
  4. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/context.py +4 -0
  5. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/chart.py +3 -3
  6. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/relogin.py +4 -0
  7. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/session.py +34 -0
  8. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/i18n.py +35 -4
  9. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli.egg-info/PKG-INFO +1 -1
  10. {hap_cli-0.9.13 → hap_cli-0.9.14}/MANIFEST.in +0 -0
  11. {hap_cli-0.9.13 → hap_cli-0.9.14}/README.md +0 -0
  12. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/README.md +0 -0
  13. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/README_CN.md +0 -0
  14. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/__main__.py +0 -0
  15. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/_entry.py +0 -0
  16. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/__init__.py +0 -0
  17. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/app_cmd.py +0 -0
  18. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/app_creator_cmd.py +0 -0
  19. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/app_editor_cmd.py +0 -0
  20. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/attachment_cmd.py +0 -0
  21. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/calendar_cmd.py +0 -0
  22. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/chart_cmd.py +0 -0
  23. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/chat_cmd.py +0 -0
  24. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/chatbot_cmd.py +0 -0
  25. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/config_cmd.py +0 -0
  26. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/contact_cmd.py +0 -0
  27. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/department_cmd.py +0 -0
  28. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/group_cmd.py +0 -0
  29. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/guide_cmd.py +0 -0
  30. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/icon_cmd.py +0 -0
  31. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/instance_cmd.py +0 -0
  32. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/node_cmd.py +0 -0
  33. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/optionset_cmd.py +0 -0
  34. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/page_cmd.py +0 -0
  35. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/post_cmd.py +0 -0
  36. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/record_cmd.py +0 -0
  37. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/region_cmd.py +0 -0
  38. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/role_cmd.py +0 -0
  39. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/update_cmd.py +0 -0
  40. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/upload_cmd.py +0 -0
  41. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/v3_registry.py +0 -0
  42. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/workflow_cmd.py +0 -0
  43. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/commands/worksheet_cmd.py +0 -0
  44. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/__init__.py +0 -0
  45. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/action_spec_adapter.py +0 -0
  46. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app.py +0 -0
  47. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/__init__.py +0 -0
  48. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/_hapmeta/__init__.py +0 -0
  49. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/_hapmeta/control_type_codes.py +0 -0
  50. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/_hapmeta/worksheet_templates.py +0 -0
  51. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/charts.py +0 -0
  52. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/cleanup.py +0 -0
  53. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/compiler.py +0 -0
  54. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/config.py +0 -0
  55. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/design/design.schema.json +0 -0
  56. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/errors.py +0 -0
  57. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/examples/minimal.design.json +0 -0
  58. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/executor.py +0 -0
  59. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/fields.py +0 -0
  60. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/hap.py +0 -0
  61. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/merge.py +0 -0
  62. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/__init__.py +0 -0
  63. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/console.py +0 -0
  64. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/jsonl.py +0 -0
  65. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/mirror.py +0 -0
  66. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/recording/report.py +0 -0
  67. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/schema.py +0 -0
  68. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/INSTRUCTIONS.md +0 -0
  69. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/__init__.py +0 -0
  70. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/cli.py +0 -0
  71. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/executor.py +0 -0
  72. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/resources/attachments.json +0 -0
  73. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/resources/sample.docx +0 -0
  74. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/resources/sample.pdf +0 -0
  75. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/resources/sample_images.json +0 -0
  76. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/seed/template.py +0 -0
  77. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/selftest.py +0 -0
  78. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/smoke.py +0 -0
  79. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/steps.py +0 -0
  80. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/store.py +0 -0
  81. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/validate.py +0 -0
  82. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/app_creator/workflow_dsl.py +0 -0
  83. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/attachment.py +0 -0
  84. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/auth.py +0 -0
  85. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/calendar_mod.py +0 -0
  86. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/chat.py +0 -0
  87. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/chatbot.py +0 -0
  88. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/cli_access.py +0 -0
  89. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/condition_dsl.py +0 -0
  90. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/contact.py +0 -0
  91. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/control_type_codes.py +0 -0
  92. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/department.py +0 -0
  93. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/__init__.py +0 -0
  94. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/_hapmeta/__init__.py +0 -0
  95. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/_hapmeta/control_type_codes.py +0 -0
  96. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/apply.py +0 -0
  97. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/componentlower.py +0 -0
  98. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/editspec/component.schema.json +0 -0
  99. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/editspec/custom-action.schema.json +0 -0
  100. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/editspec/envelope.schema.json +0 -0
  101. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/editspec/field.schema.json +0 -0
  102. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/editspec.py +0 -0
  103. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/errors.py +0 -0
  104. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/fieldlower.py +0 -0
  105. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/jsonschema_mini.py +0 -0
  106. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/models.py +0 -0
  107. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/ops.py +0 -0
  108. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/planner.py +0 -0
  109. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/editor/reader.py +0 -0
  110. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/field_normalizer.py +0 -0
  111. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/field_spec_adapter.py +0 -0
  112. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/filter_translator.py +0 -0
  113. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/filter_v3.py +0 -0
  114. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/flow_node.py +0 -0
  115. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/global_meta.py +0 -0
  116. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/group.py +0 -0
  117. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/guide.py +0 -0
  118. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/icon_index.py +0 -0
  119. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/instance.py +0 -0
  120. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/layout_check.py +0 -0
  121. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/logger.py +0 -0
  122. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/optionset.py +0 -0
  123. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/page.py +0 -0
  124. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/post.py +0 -0
  125. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/record.py +0 -0
  126. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/record_defaults.py +0 -0
  127. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/record_discussions.py +0 -0
  128. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/record_form_checks.py +0 -0
  129. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/record_lookups.py +0 -0
  130. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/record_rules.py +0 -0
  131. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/relation_scope.py +0 -0
  132. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/response_crypto.py +0 -0
  133. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/role.py +0 -0
  134. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/role_perm_builder.py +0 -0
  135. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/rule_spec_adapter.py +0 -0
  136. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/token_crypto.py +0 -0
  137. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/update.py +0 -0
  138. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/upload.py +0 -0
  139. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/v3/__init__.py +0 -0
  140. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/v3/dispatcher.py +0 -0
  141. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/v3/render.py +0 -0
  142. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/v3/schema.py +0 -0
  143. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/view_spec_adapter.py +0 -0
  144. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/workflow.py +0 -0
  145. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/workflow_node_dsl.py +0 -0
  146. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/worksheet.py +0 -0
  147. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/worksheet_form.py +0 -0
  148. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/worksheet_reference.py +0 -0
  149. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/core/worksheet_templates.py +0 -0
  150. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/approval.md +0 -0
  151. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/chart.md +0 -0
  152. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/messages.md +0 -0
  153. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/overview.md +0 -0
  154. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/post.md +0 -0
  155. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/record.md +0 -0
  156. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/setup.md +0 -0
  157. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/skills.md +0 -0
  158. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/workflow.md +0 -0
  159. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/en/worksheet.md +0 -0
  160. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/index.json +0 -0
  161. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/approval.md +0 -0
  162. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/chart.md +0 -0
  163. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/messages.md +0 -0
  164. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/overview.md +0 -0
  165. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/post.md +0 -0
  166. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/record.md +0 -0
  167. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/setup.md +0 -0
  168. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/skills.md +0 -0
  169. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/workflow.md +0 -0
  170. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/guide/zh-Hans/worksheet.md +0 -0
  171. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/locale/__init__.py +0 -0
  172. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/locale/messages.json +0 -0
  173. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/locale/messages.schema.json +0 -0
  174. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/utils/__init__.py +0 -0
  175. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/utils/atomic_write.py +0 -0
  176. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/utils/confirm.py +0 -0
  177. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/utils/formatting.py +0 -0
  178. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/utils/options.py +0 -0
  179. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli/utils/parameter_mapping.py +0 -0
  180. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli.egg-info/SOURCES.txt +0 -0
  181. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli.egg-info/dependency_links.txt +0 -0
  182. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli.egg-info/entry_points.txt +0 -0
  183. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli.egg-info/requires.txt +0 -0
  184. {hap_cli-0.9.13 → hap_cli-0.9.14}/hap_cli.egg-info/top_level.txt +0 -0
  185. {hap_cli-0.9.13 → hap_cli-0.9.14}/setup.cfg +0 -0
  186. {hap_cli-0.9.13 → hap_cli-0.9.14}/setup.py +0 -0
  187. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/INDEX.json +0 -0
  188. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/add_member_to_role.yaml +0 -0
  189. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/batch_delete_records.yaml +0 -0
  190. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/create_optionset.yaml +0 -0
  191. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/create_role.yaml +0 -0
  192. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/delete_optionset.yaml +0 -0
  193. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/delete_record.yaml +0 -0
  194. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/delete_role.yaml +0 -0
  195. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/delete_worksheet.yaml +0 -0
  196. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_app_info.yaml +0 -0
  197. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_app_knowledge_list.yaml +0 -0
  198. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_app_worksheets_list.yaml +0 -0
  199. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_optionset_list.yaml +0 -0
  200. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_details.yaml +0 -0
  201. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_discussions.yaml +0 -0
  202. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_list.yaml +0 -0
  203. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_logs.yaml +0 -0
  204. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_pivot_data.yaml +0 -0
  205. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_relations.yaml +0 -0
  206. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_record_share_link.yaml +0 -0
  207. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_regions.yaml +0 -0
  208. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_role_details.yaml +0 -0
  209. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/get_role_list.yaml +0 -0
  210. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/knowledge_search.yaml +0 -0
  211. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/leave_all_roles.yaml +0 -0
  212. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/remove_member_from_role.yaml +0 -0
  213. {hap_cli-0.9.13 → hap_cli-0.9.14}/sources/v3-api-schema/update_optionset.yaml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hap-cli
3
- Version: 0.9.13
3
+ Version: 0.9.14
4
4
  Summary: CLI harness for Mingdao HAP - Enterprise no-code platform
5
5
  Author: hap-cli
6
6
  License: Apache-2.0
@@ -3,7 +3,7 @@
3
3
  import sys as _sys
4
4
  import types as _types
5
5
 
6
- __version__ = "0.9.13"
6
+ __version__ = "0.9.14"
7
7
 
8
8
  # The command tree used to live in hap_cli/hap_cli.py. A module named
9
9
  # after the package it sits in shadows that package: run python with the
@@ -21,7 +21,7 @@ from hap_cli.core.session import (
21
21
  from hap_cli.core import auth as auth_mod
22
22
  from hap_cli.core import global_meta as gm
23
23
  from hap_cli.utils.formatting import output_json, output_kv
24
- from hap_cli.i18n import t
24
+ from hap_cli.i18n import lang_from_hap_account, t
25
25
 
26
26
 
27
27
  SERVER_HELP = (
@@ -85,6 +85,7 @@ def _save_and_report(ctx, token, webui, user_info, meta, profile_name):
85
85
  session.server_url = webui
86
86
  session.auth_token = token
87
87
  session.account_id = str(user_info.get("id") or "")
88
+ session.account_lang = lang_from_hap_account(str(user_info.get("lang") or ""))
88
89
  session.default_app_id = ""
89
90
  session.default_project_id = ""
90
91
  session.default_project_name = ""
@@ -65,6 +65,10 @@ class Context:
65
65
  if self.session is None:
66
66
  self.session = Session.load(self.profile)
67
67
  self.session.relogin_notice = _relogin_notice
68
+ # Defaults written into an application follow this account's
69
+ # language, not the display language every profile shares.
70
+ from hap_cli.i18n import set_content_language_resolver
71
+ set_content_language_resolver(self.session.account_language)
68
72
  # One-time migration for sessions logged in before account_id
69
73
  # was persisted. Some HAP controllers (notably
70
74
  # Invitation/InviteUser) silently degrade when the AccountId
@@ -119,7 +119,7 @@ _VALUELESS_FILTER_TYPES = frozenset({7, 8, 41, 42})
119
119
 
120
120
  def default_chart_filter() -> dict[str, Any]:
121
121
  """A fresh copy of DEFAULT_CHART_FILTER, its range labelled in the
122
- CLI's language rather than always in Chinese."""
122
+ account's language rather than always in Chinese."""
123
123
  from hap_cli.i18n import content_default
124
124
 
125
125
  filter_block = dict(DEFAULT_CHART_FILTER)
@@ -132,9 +132,9 @@ def _summary_label(summary_type: Any) -> str:
132
132
  entry = _SUMMARY_TYPE_NAMES.get(summary_type)
133
133
  if not entry:
134
134
  return ""
135
- from hap_cli.i18n import get_active_language
135
+ from hap_cli.i18n import content_language
136
136
 
137
- return entry.get(get_active_language()) or entry["en"]
137
+ return entry.get(content_language()) or entry["en"]
138
138
 
139
139
 
140
140
  def _fill_summary_name(block: Any) -> None:
@@ -199,6 +199,10 @@ def _apply_login(session: Any, token: str, meta: dict, user_info: dict) -> None:
199
199
  session.auth_token = token
200
200
  if new_account:
201
201
  session.account_id = new_account
202
+ if user_info.get("lang"):
203
+ from hap_cli.i18n import lang_from_hap_account
204
+
205
+ session.account_lang = lang_from_hap_account(str(user_info["lang"]))
202
206
  endpoints = gm.extract_service_endpoints(meta)
203
207
  if endpoints:
204
208
  session.service_endpoints = endpoints
@@ -267,6 +267,10 @@ class Session:
267
267
  # Cached routing table from Global/GetGlobalMeta. See DEFAULT_CONFIG.
268
268
  self.service_endpoints: dict[str, Any] = {}
269
269
  self._global_meta_cache: Optional[dict[str, Any]] = None
270
+ # The account's own language (a CLI language code), saved per
271
+ # profile at login. Defaults written into an application use it;
272
+ # see hap_cli.i18n.content_language.
273
+ self.account_lang = ""
270
274
  # Which named profile this session loads from / saves back to.
271
275
  # Empty until load()/save() binds it.
272
276
  self._profile_name: str = ""
@@ -966,6 +970,33 @@ class Session:
966
970
  except Exception as exc:
967
971
  logger.debug("Failed to backfill account_id lazily: %s", exc)
968
972
 
973
+ def account_language(self) -> str:
974
+ """The language of the account this session writes as.
975
+
976
+ Profiles saved before it was recorded learn it from the account
977
+ once and keep it. Empty when the account cannot be read.
978
+ """
979
+ if self.account_lang:
980
+ return self.account_lang
981
+ try:
982
+ meta = self.get_global_meta()
983
+ account = (meta.get("md.global") or {}).get("Account") or {}
984
+ except Exception as exc:
985
+ logger.warning("Could not read the account language: %s", exc)
986
+ return ""
987
+ if not account:
988
+ return ""
989
+ from hap_cli.i18n import lang_from_hap_account
990
+
991
+ self.account_lang = lang_from_hap_account(str(account.get("lang") or ""))
992
+ if self._profile_name:
993
+ try:
994
+ save_profile(self._profile_name,
995
+ {"account_lang": self.account_lang})
996
+ except Exception as exc:
997
+ logger.warning("Could not save the account language: %s", exc)
998
+ return self.account_lang
999
+
969
1000
  def get_global_meta(self, refresh: bool = False) -> dict[str, Any]:
970
1001
  """Return cached Global/GetGlobalMeta data for service routing."""
971
1002
  if refresh or self._global_meta_cache is None:
@@ -1052,6 +1083,7 @@ class Session:
1052
1083
  auth_token=auth_token,
1053
1084
  )
1054
1085
  session.account_id = config.get("account_id", "")
1086
+ session.account_lang = config.get("account_lang", "")
1055
1087
  session.default_app_id = config.get("default_app_id", "")
1056
1088
  # Read new keys, fall back to legacy ``default_project_id`` /
1057
1089
  # ``default_project_name`` so configs written before the rename
@@ -1085,6 +1117,7 @@ class Session:
1085
1117
  "login_url": self._login_url,
1086
1118
  "auth_token": encrypted,
1087
1119
  "account_id": self.account_id,
1120
+ "account_lang": self.account_lang,
1088
1121
  "default_app_id": self.default_app_id,
1089
1122
  "default_org_id": self.default_project_id,
1090
1123
  "default_org_name": self.default_project_name,
@@ -1174,6 +1207,7 @@ PROFILE_FIELDS = (
1174
1207
  "login_url",
1175
1208
  "auth_token",
1176
1209
  "account_id",
1210
+ "account_lang",
1177
1211
  "default_app_id",
1178
1212
  "default_org_id",
1179
1213
  "default_org_name",
@@ -38,7 +38,7 @@ import logging
38
38
  import os
39
39
  from functools import lru_cache
40
40
  from pathlib import Path
41
- from typing import Any, Iterable, Optional
41
+ from typing import Any, Callable, Iterable, Optional
42
42
 
43
43
  logger = logging.getLogger("hap_cli")
44
44
 
@@ -288,16 +288,47 @@ CONTENT_DEFAULTS: dict[str, dict[str, str]] = {
288
288
  DEFAULT_VIEW_NAMES = frozenset(CONTENT_DEFAULTS["view.all"].values())
289
289
 
290
290
 
291
+ # Returns the language of the account the CLI is writing as. Installed
292
+ # by the CLI context when it loads a session; None outside a command.
293
+ _content_language_resolver: Optional[Callable[[], str]] = None
294
+
295
+
296
+ def set_content_language_resolver(fn: Optional[Callable[[], str]]) -> None:
297
+ global _content_language_resolver
298
+ _content_language_resolver = fn
299
+
300
+
301
+ def content_language() -> str:
302
+ """The language stored text is written in.
303
+
304
+ Defaults saved into an application are read by everyone who opens
305
+ it, so they follow the account being written as — the web editor
306
+ writes them in its user's language. The display language is one
307
+ setting shared by every profile, so it only fills in when the
308
+ account's language is unknown.
309
+ """
310
+ if _content_language_resolver is not None:
311
+ try:
312
+ lang = _content_language_resolver()
313
+ except Exception:
314
+ logger.warning("Could not resolve the account language",
315
+ exc_info=True)
316
+ lang = ""
317
+ if lang in LANG_OPTIONS:
318
+ return lang
319
+ return get_active_language()
320
+
321
+
291
322
  def content_default(key: str) -> str:
292
- """Return the default *content* string for ``key`` in the active
293
- language, falling back to English.
323
+ """Return the default *content* string for ``key`` in the content
324
+ language (see :func:`content_language`), falling back to English.
294
325
 
295
326
  Raises ``KeyError`` for an unknown key — these are our own payload
296
327
  defaults, so a miss is a programming error rather than a missing
297
328
  translation.
298
329
  """
299
330
  entry = CONTENT_DEFAULTS[key]
300
- return entry.get(get_active_language()) or entry["en"]
331
+ return entry.get(content_language()) or entry["en"]
301
332
 
302
333
 
303
334
  def lang_from_hap_account(account_lang: str) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hap-cli
3
- Version: 0.9.13
3
+ Version: 0.9.14
4
4
  Summary: CLI harness for Mingdao HAP - Enterprise no-code platform
5
5
  Author: hap-cli
6
6
  License: Apache-2.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes