@acutis/cli 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/4RAEZKK5.js +1 -0
  3. package/.output/public/_nuxt/B71L_ar8.js +1 -0
  4. package/.output/public/_nuxt/{CsAwRnSX.js → B8-AOuPY.js} +1 -1
  5. package/.output/public/_nuxt/BDJSpxa5.js +1 -0
  6. package/.output/public/_nuxt/BSTaqC8B.js +1 -0
  7. package/.output/public/_nuxt/BX0w1sCd.js +64 -0
  8. package/.output/public/_nuxt/BZkyScXE.js +7 -0
  9. package/.output/public/_nuxt/Bcy6XGvf.js +1 -0
  10. package/.output/public/_nuxt/BwUN2VDn.js +28 -0
  11. package/.output/public/_nuxt/C7ujW0dH.js +1 -0
  12. package/.output/public/_nuxt/CCTDX4Ow.js +1 -0
  13. package/.output/public/_nuxt/CGBjV6IE.js +3 -0
  14. package/.output/public/_nuxt/CJwIJ5vo.js +1 -0
  15. package/.output/public/_nuxt/CRRnxrgg.js +1 -0
  16. package/.output/public/_nuxt/CW-iqL9y.js +1 -0
  17. package/.output/public/_nuxt/CX9rRDYY.js +1 -0
  18. package/.output/public/_nuxt/Cc9wzr_w.js +1 -0
  19. package/.output/public/_nuxt/Cfk1Mt0g.js +1 -0
  20. package/.output/public/_nuxt/Cha4KRz0.js +1 -0
  21. package/.output/public/_nuxt/D229JSjk.js +1 -0
  22. package/.output/public/_nuxt/D24Vvzw2.js +1 -0
  23. package/.output/public/_nuxt/DRoB9fQQ.js +1 -0
  24. package/.output/public/_nuxt/DZ5wax3g.js +1 -0
  25. package/.output/public/_nuxt/DZkgJHFm.js +1 -0
  26. package/.output/public/_nuxt/PIShll5e.js +1 -0
  27. package/.output/public/_nuxt/_oJUkNQ2.js +1 -0
  28. package/.output/public/_nuxt/builds/latest.json +1 -1
  29. package/.output/public/_nuxt/builds/meta/8fa7f7b1-bb54-45e2-9cfc-6ff62eb217e3.json +1 -0
  30. package/.output/public/_nuxt/{entry.BmTN_nlL.css → entry.cOeTFjBb.css} +1 -1
  31. package/.output/public/_nuxt/jaiNplxU.js +1 -0
  32. package/.output/public/_nuxt/{Dn-SWUOQ.js → nocvyJKp.js} +1 -1
  33. package/.output/server/chunks/_/auth2.mjs +2 -2
  34. package/.output/server/chunks/_/environment.mjs +2 -2
  35. package/.output/server/chunks/_/execution.mjs +6 -4
  36. package/.output/server/chunks/_/execution.mjs.map +1 -1
  37. package/.output/server/chunks/_/generation.mjs +2 -2
  38. package/.output/server/chunks/_/project.mjs +1 -1
  39. package/.output/server/chunks/_/project.service.mjs +2 -2
  40. package/.output/server/chunks/_/scenario2.mjs +88 -6
  41. package/.output/server/chunks/_/scenario2.mjs.map +1 -1
  42. package/.output/server/chunks/build/{Alert-CGPbjyet.mjs → Alert-BJf39Ayb.mjs} +1 -1
  43. package/.output/server/chunks/build/{Alert-CGPbjyet.mjs.map → Alert-BJf39Ayb.mjs.map} +1 -1
  44. package/.output/server/chunks/build/Badge-BMpCypXw.mjs +394 -0
  45. package/.output/server/chunks/build/Badge-BMpCypXw.mjs.map +1 -0
  46. package/.output/server/chunks/build/{Container-Bw8GVIe-.mjs → Container-D0WjluxO.mjs} +1 -1
  47. package/.output/server/chunks/build/{Container-Bw8GVIe-.mjs.map → Container-D0WjluxO.mjs.map} +1 -1
  48. package/.output/server/chunks/build/ContextMenu-CC085wXq.mjs +1746 -0
  49. package/.output/server/chunks/build/ContextMenu-CC085wXq.mjs.map +1 -0
  50. package/.output/server/chunks/build/{Pagination-BF2ykxf_.mjs → Pagination-DxUglDxC.mjs} +1 -1
  51. package/.output/server/chunks/build/{Pagination-BF2ykxf_.mjs.map → Pagination-DxUglDxC.mjs.map} +1 -1
  52. package/.output/server/chunks/build/{_...scenario_-CPwSmhfV.mjs → _...scenario_-mkuUQnXV.mjs} +48 -28
  53. package/.output/server/chunks/build/_...scenario_-mkuUQnXV.mjs.map +1 -0
  54. package/.output/server/chunks/build/_run_-CURVtzqt.mjs +649 -0
  55. package/.output/server/chunks/build/_run_-CURVtzqt.mjs.map +1 -0
  56. package/.output/server/chunks/build/{_slug_-DjtFCLa7.mjs → _slug_-CCufladN.mjs} +373 -138
  57. package/.output/server/chunks/build/{_slug_-DjtFCLa7.mjs.map → _slug_-CCufladN.mjs.map} +1 -1
  58. package/.output/server/chunks/build/error-404-B5fzVPdQ.mjs +1 -1
  59. package/.output/server/chunks/build/error-500-Be62wrWs.mjs +1 -1
  60. package/.output/server/chunks/build/{modal-styles.BuQzMyBB.mjs → modal-styles.CyKDxGJQ.mjs} +3 -3
  61. package/.output/server/chunks/build/modal-styles.CyKDxGJQ.mjs.map +1 -0
  62. package/.output/server/chunks/build/{origin-D49r5-BY.mjs → origin-COKNa406.mjs} +102 -396
  63. package/.output/server/chunks/build/{origin-D49r5-BY.mjs.map → origin-COKNa406.mjs.map} +1 -1
  64. package/.output/server/chunks/build/{pages-Dve6n3fN.mjs → pages-BoaPn4t_.mjs} +171 -51
  65. package/.output/server/chunks/build/{pages-Dve6n3fN.mjs.map → pages-BoaPn4t_.mjs.map} +1 -1
  66. package/.output/server/chunks/build/plural-DvfNYUEX.mjs +93 -0
  67. package/.output/server/chunks/build/plural-DvfNYUEX.mjs.map +1 -0
  68. package/.output/server/chunks/build/report-ISc2vlII.mjs +725 -0
  69. package/.output/server/chunks/build/report-ISc2vlII.mjs.map +1 -0
  70. package/.output/server/chunks/build/run-stream-Dfh0fAdN.mjs +198 -0
  71. package/.output/server/chunks/build/run-stream-Dfh0fAdN.mjs.map +1 -0
  72. package/.output/server/chunks/build/{tags-CU5wN20i.mjs → tags-BiGI0PZP.mjs} +16 -299
  73. package/.output/server/chunks/build/tags-BiGI0PZP.mjs.map +1 -0
  74. package/.output/server/chunks/build/{telemetria-CU1QSpLB.mjs → telemetria-CXZfYngH.mjs} +3 -3
  75. package/.output/server/chunks/build/{telemetria-CU1QSpLB.mjs.map → telemetria-CXZfYngH.mjs.map} +1 -1
  76. package/.output/server/chunks/nitro/nitro.mjs +307 -228
  77. package/.output/server/chunks/routes/api/projects/_slug/run-stream.get.mjs +5 -1
  78. package/.output/server/chunks/routes/api/projects/_slug/run-stream.get.mjs.map +1 -1
  79. package/.output/server/chunks/routes/api/projects/_slug/runs.get.mjs +79 -0
  80. package/.output/server/chunks/routes/api/projects/_slug/runs.get.mjs.map +1 -0
  81. package/.output/server/chunks/routes/api/telemetry/report.post.mjs +1 -1
  82. package/.output/server/chunks/routes/renderer.mjs +3 -3
  83. package/.output/server/chunks/routes/ws.mjs +1 -1
  84. package/.output/server/chunks/virtual/entry.mjs +9336 -8497
  85. package/.output/server/chunks/virtual/entry.mjs.map +1 -1
  86. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  87. package/.output/server/chunks/virtual/styles.mjs +1 -1
  88. package/.output/server/package.json +1 -1
  89. package/package.json +1 -1
  90. package/.output/public/_nuxt/2nD-p2HC.js +0 -1
  91. package/.output/public/_nuxt/B9s6bjC6.js +0 -1
  92. package/.output/public/_nuxt/BNt3M20G.js +0 -3
  93. package/.output/public/_nuxt/BVORrxe1.js +0 -1
  94. package/.output/public/_nuxt/BWJi3RB7.js +0 -7
  95. package/.output/public/_nuxt/BZKoKeJ4.js +0 -1
  96. package/.output/public/_nuxt/BdD531YY.js +0 -1
  97. package/.output/public/_nuxt/Bim2Ilco.js +0 -1
  98. package/.output/public/_nuxt/BormXq2m.js +0 -1
  99. package/.output/public/_nuxt/Bv4T7S6_.js +0 -1
  100. package/.output/public/_nuxt/BwcOmYtM.js +0 -1
  101. package/.output/public/_nuxt/CJJvNaNU.js +0 -1
  102. package/.output/public/_nuxt/Dq_3AVr2.js +0 -1
  103. package/.output/public/_nuxt/builds/meta/44d41e51-6d69-442c-af96-a368d70732a5.json +0 -1
  104. package/.output/public/_nuxt/jEu0WM6o.js +0 -28
  105. package/.output/public/_nuxt/x-Ln6s2E.js +0 -64
  106. package/.output/server/chunks/build/_...scenario_-CPwSmhfV.mjs.map +0 -1
  107. package/.output/server/chunks/build/modal-styles.BuQzMyBB.mjs.map +0 -1
  108. package/.output/server/chunks/build/tags-CU5wN20i.mjs.map +0 -1
@@ -1,7 +1,9 @@
1
- import { g as useFetch, M as useState, m as _sfc_main$4, _ as _sfc_main$5, a as useComponentProps, b as useAppConfig, t as tv, P as Primitive, $ as $fetch$1, p as modal_default$1, q as _sfc_main$1$2, o as _sfc_main$6$1, e as _sfc_main$5$1, ab as NuxtLink, ac as formBusInjectionKey, ad as formStateInjectionKey, ae as formErrorsInjectionKey, af as formInputsInjectionKey, ag as formLoadingInjectionKey, ah as formOptionsInjectionKey, B as useVModel, ai as useFormField, s as useComponentIcons, d as _sfc_main$3$1, aj as useEventBus, n as navigateTo, j as extractServerError, ak as looseToNumber } from '../virtual/entry.mjs';
2
- import { a as _sfc_main$1$1, _ as _sfc_main$2$1, b as _sfc_main$7, p as projectOrigin } from './origin-D49r5-BY.mjs';
3
- import { _ as _sfc_main$6 } from './Pagination-BF2ykxf_.mjs';
4
- import { _ as _sfc_main$3 } from './Container-Bw8GVIe-.mjs';
1
+ import { g as useFetch, M as useState, p as _sfc_main$4, _ as _sfc_main$5, a as useComponentProps, b as useAppConfig, t as tv, P as Primitive, $ as $fetch$1, r as modal_default$1, s as _sfc_main$1$2, q as _sfc_main$6$1, e as _sfc_main$5$1, u as useNotify, o as navigateTo, N as NuxtLink, af as formBusInjectionKey, ag as formStateInjectionKey, ah as formErrorsInjectionKey, ai as formInputsInjectionKey, aj as formLoadingInjectionKey, ak as formOptionsInjectionKey, B as useVModel, al as useFormField, k as useComponentIcons, d as _sfc_main$3$1, am as useEventBus, n as extractServerError, an as looseToNumber } from '../virtual/entry.mjs';
2
+ import { _ as _sfc_main$1$1, a as _sfc_main$8, p as projectOrigin, c as confirm_default } from './origin-COKNa406.mjs';
3
+ import { _ as _sfc_main$6 } from './Pagination-DxUglDxC.mjs';
4
+ import { _ as _sfc_main$3 } from './Container-D0WjluxO.mjs';
5
+ import { _ as _sfc_main$7 } from './Badge-BMpCypXw.mjs';
6
+ import { _ as _sfc_main$9 } from './ContextMenu-CC085wXq.mjs';
5
7
  import { defineComponent, ref, watch, computed, withAsyncContext, nextTick, mergeProps, unref, withCtx, isRef, createVNode, createTextVNode, toDisplayString, openBlock, createBlock, Fragment, renderList, createCommentVNode, renderSlot, useModel, reactive, useId, useTemplateRef, inject, provide, readonly, resolveDynamicComponent, useSlots, useSSRContext } from 'vue';
6
8
  import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderSlot, ssrRenderAttr, ssrRenderVNode, ssrRenderClass } from 'vue/server-renderer';
7
9
  import { g as createProjectSchema, e as cloneProjectSchema } from '../_/project2.mjs';
@@ -1191,7 +1193,7 @@ var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
1191
1193
  const _component_UForm = _sfc_main$2;
1192
1194
  const _component_UFormField = _sfc_main$1$2;
1193
1195
  const _component_UInput = _sfc_main$4;
1194
- const _component_UBadge = _sfc_main$2$1;
1196
+ const _component_UBadge = _sfc_main$7;
1195
1197
  const _component_USelect = _sfc_main$6$1;
1196
1198
  const _component_UTextarea = _sfc_main$1;
1197
1199
  const _component_UButton = _sfc_main$5;
@@ -1799,7 +1801,7 @@ var empty_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
1799
1801
  setup(__props, { emit: __emit }) {
1800
1802
  const emit = __emit;
1801
1803
  return (_ctx, _push, _parent, _attrs) => {
1802
- const _component_UCard = _sfc_main$7;
1804
+ const _component_UCard = _sfc_main$8;
1803
1805
  const _component_UIcon = _sfc_main$5$1;
1804
1806
  _push(`<div${ssrRenderAttrs(mergeProps({
1805
1807
  "data-testid": "projeto-vazio",
@@ -1872,29 +1874,151 @@ var card_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
1872
1874
  __name: "card",
1873
1875
  __ssrInlineRender: true,
1874
1876
  props: { project: {} },
1875
- setup(__props) {
1877
+ emits: ["removed"],
1878
+ setup(__props, { emit: __emit }) {
1879
+ const emit = __emit;
1876
1880
  const origin = computed(() => projectOrigin(__props.project));
1881
+ const notify = useNotify();
1882
+ const removeOpen = ref(false);
1883
+ const removing = ref(false);
1884
+ const actions = computed(() => [
1885
+ [
1886
+ {
1887
+ label: "Acessar",
1888
+ icon: "i-ic-round-open-in-new",
1889
+ testid: "projeto-menu-acessar",
1890
+ onSelect: () => navigateTo(`/projects/${__props.project.slug}`)
1891
+ },
1892
+ {
1893
+ label: "Ver o relatório",
1894
+ icon: "i-ic-round-assessment",
1895
+ testid: "projeto-menu-relatorio",
1896
+ onSelect: () => navigateTo(`/projects/${__props.project.slug}/report`)
1897
+ },
1898
+ {
1899
+ label: "Gravar cenário público",
1900
+ icon: "i-ic-round-public",
1901
+ testid: "projeto-menu-gravar-publico",
1902
+ onSelect: () => navigateTo(`/projects/${__props.project.slug}?gravar=publico`)
1903
+ },
1904
+ {
1905
+ label: "Gravar cenário autenticado",
1906
+ icon: "i-ic-round-lock",
1907
+ testid: "projeto-menu-gravar-autenticado",
1908
+ onSelect: () => navigateTo(`/projects/${__props.project.slug}?gravar=autenticado`)
1909
+ }
1910
+ ],
1911
+ [{
1912
+ label: "Abrir no VS Code",
1913
+ icon: "i-simple-icons-visualstudiocode",
1914
+ testid: "projeto-menu-vscode",
1915
+ to: `vscode://file${__props.project.path}`,
1916
+ target: "_blank"
1917
+ }, {
1918
+ label: "Copiar caminho",
1919
+ icon: "i-ic-round-content-copy",
1920
+ testid: "projeto-menu-copiar",
1921
+ onSelect: () => copyPath()
1922
+ }],
1923
+ [{
1924
+ label: "Remover",
1925
+ icon: "i-ic-round-delete",
1926
+ color: "error",
1927
+ testid: "projeto-menu-remover",
1928
+ onSelect: () => {
1929
+ removeOpen.value = true;
1930
+ }
1931
+ }]
1932
+ ]);
1933
+ async function copyPath() {
1934
+ await (void 0).clipboard.writeText(__props.project.path);
1935
+ notify.success("Caminho copiado.");
1936
+ }
1937
+ async function remove() {
1938
+ removing.value = true;
1939
+ try {
1940
+ await $fetch$1(`/api/projects/${__props.project.slug}`, { method: "DELETE" });
1941
+ removeOpen.value = false;
1942
+ emit("removed");
1943
+ } catch (error) {
1944
+ notify.failure(error, "Não foi possível remover o projeto.");
1945
+ } finally {
1946
+ removing.value = false;
1947
+ }
1948
+ }
1877
1949
  return (_ctx, _push, _parent, _attrs) => {
1950
+ const _component_UContextMenu = _sfc_main$9;
1878
1951
  const _component_NuxtLink = NuxtLink;
1879
- const _component_UCard = _sfc_main$7;
1880
- const _component_UBadge = _sfc_main$2$1;
1881
- _push(ssrRenderComponent(_component_NuxtLink, mergeProps({ to: `/projects/${__props.project.slug}` }, _attrs), {
1952
+ const _component_UCard = _sfc_main$8;
1953
+ const _component_UBadge = _sfc_main$7;
1954
+ const _component_BaseConfirm = confirm_default;
1955
+ _push(`<!--[-->`);
1956
+ _push(ssrRenderComponent(_component_UContextMenu, { items: unref(actions) }, {
1957
+ "item-label": withCtx(({ item }, _push, _parent, _scopeId) => {
1958
+ if (_push) _push(`<span${ssrRenderAttr("data-testid", item.testid)}${_scopeId}>${ssrInterpolate(item.label)}</span>`);
1959
+ else return [createVNode("span", { "data-testid": item.testid }, toDisplayString(item.label), 9, ["data-testid"])];
1960
+ }),
1882
1961
  default: withCtx((_, _push, _parent, _scopeId) => {
1883
- if (_push) _push(ssrRenderComponent(_component_UCard, {
1884
- "data-testid": "projeto-card",
1885
- class: "transition-colors hover:bg-accented/75"
1886
- }, {
1962
+ if (_push) _push(ssrRenderComponent(_component_NuxtLink, { to: `/projects/${__props.project.slug}` }, {
1887
1963
  default: withCtx((_, _push, _parent, _scopeId) => {
1888
- if (_push) {
1889
- _push(`<div class="flex flex-col gap-2"${_scopeId}><p class="font-semibold truncate"${_scopeId}>${ssrInterpolate(__props.project.name)}</p><p class="text-sm text-muted truncate"${ssrRenderAttr("title", __props.project.repository ?? void 0)}${_scopeId}>${ssrInterpolate(__props.project.path)}</p>`);
1890
- _push(ssrRenderComponent(_component_UBadge, {
1891
- icon: unref(origin).icon,
1892
- label: unref(origin).label,
1893
- class: "self-start",
1894
- "data-testid": "projeto-origem"
1895
- }, null, _parent, _scopeId));
1896
- _push(`</div>`);
1897
- } else return [createVNode("div", { class: "flex flex-col gap-2" }, [
1964
+ if (_push) _push(ssrRenderComponent(_component_UCard, {
1965
+ "data-testid": "projeto-card",
1966
+ class: "transition-colors hover:bg-accented/75"
1967
+ }, {
1968
+ default: withCtx((_, _push, _parent, _scopeId) => {
1969
+ if (_push) {
1970
+ _push(`<div class="flex flex-col gap-2"${_scopeId}><p class="font-semibold truncate"${_scopeId}>${ssrInterpolate(__props.project.name)}</p><p class="text-sm text-muted truncate"${ssrRenderAttr("title", __props.project.repository ?? void 0)}${_scopeId}>${ssrInterpolate(__props.project.path)}</p>`);
1971
+ _push(ssrRenderComponent(_component_UBadge, {
1972
+ icon: unref(origin).icon,
1973
+ label: unref(origin).label,
1974
+ class: "self-start",
1975
+ "data-testid": "projeto-origem"
1976
+ }, null, _parent, _scopeId));
1977
+ _push(`</div>`);
1978
+ } else return [createVNode("div", { class: "flex flex-col gap-2" }, [
1979
+ createVNode("p", { class: "font-semibold truncate" }, toDisplayString(__props.project.name), 1),
1980
+ createVNode("p", {
1981
+ class: "text-sm text-muted truncate",
1982
+ title: __props.project.repository ?? void 0
1983
+ }, toDisplayString(__props.project.path), 9, ["title"]),
1984
+ createVNode(_component_UBadge, {
1985
+ icon: unref(origin).icon,
1986
+ label: unref(origin).label,
1987
+ class: "self-start",
1988
+ "data-testid": "projeto-origem"
1989
+ }, null, 8, ["icon", "label"])
1990
+ ])];
1991
+ }),
1992
+ _: 1
1993
+ }, _parent, _scopeId));
1994
+ else return [createVNode(_component_UCard, {
1995
+ "data-testid": "projeto-card",
1996
+ class: "transition-colors hover:bg-accented/75"
1997
+ }, {
1998
+ default: withCtx(() => [createVNode("div", { class: "flex flex-col gap-2" }, [
1999
+ createVNode("p", { class: "font-semibold truncate" }, toDisplayString(__props.project.name), 1),
2000
+ createVNode("p", {
2001
+ class: "text-sm text-muted truncate",
2002
+ title: __props.project.repository ?? void 0
2003
+ }, toDisplayString(__props.project.path), 9, ["title"]),
2004
+ createVNode(_component_UBadge, {
2005
+ icon: unref(origin).icon,
2006
+ label: unref(origin).label,
2007
+ class: "self-start",
2008
+ "data-testid": "projeto-origem"
2009
+ }, null, 8, ["icon", "label"])
2010
+ ])]),
2011
+ _: 1
2012
+ })];
2013
+ }),
2014
+ _: 1
2015
+ }, _parent, _scopeId));
2016
+ else return [createVNode(_component_NuxtLink, { to: `/projects/${__props.project.slug}` }, {
2017
+ default: withCtx(() => [createVNode(_component_UCard, {
2018
+ "data-testid": "projeto-card",
2019
+ class: "transition-colors hover:bg-accented/75"
2020
+ }, {
2021
+ default: withCtx(() => [createVNode("div", { class: "flex flex-col gap-2" }, [
1898
2022
  createVNode("p", { class: "font-semibold truncate" }, toDisplayString(__props.project.name), 1),
1899
2023
  createVNode("p", {
1900
2024
  class: "text-sm text-muted truncate",
@@ -1906,32 +2030,26 @@ var card_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
1906
2030
  class: "self-start",
1907
2031
  "data-testid": "projeto-origem"
1908
2032
  }, null, 8, ["icon", "label"])
1909
- ])];
1910
- }),
1911
- _: 1
1912
- }, _parent, _scopeId));
1913
- else return [createVNode(_component_UCard, {
1914
- "data-testid": "projeto-card",
1915
- class: "transition-colors hover:bg-accented/75"
1916
- }, {
1917
- default: withCtx(() => [createVNode("div", { class: "flex flex-col gap-2" }, [
1918
- createVNode("p", { class: "font-semibold truncate" }, toDisplayString(__props.project.name), 1),
1919
- createVNode("p", {
1920
- class: "text-sm text-muted truncate",
1921
- title: __props.project.repository ?? void 0
1922
- }, toDisplayString(__props.project.path), 9, ["title"]),
1923
- createVNode(_component_UBadge, {
1924
- icon: unref(origin).icon,
1925
- label: unref(origin).label,
1926
- class: "self-start",
1927
- "data-testid": "projeto-origem"
1928
- }, null, 8, ["icon", "label"])
1929
- ])]),
2033
+ ])]),
2034
+ _: 1
2035
+ })]),
1930
2036
  _: 1
1931
- })];
2037
+ }, 8, ["to"])];
1932
2038
  }),
1933
2039
  _: 1
1934
2040
  }, _parent));
2041
+ _push(ssrRenderComponent(_component_BaseConfirm, {
2042
+ open: unref(removeOpen),
2043
+ "onUpdate:open": ($event) => isRef(removeOpen) ? removeOpen.value = $event : null,
2044
+ title: "Remover projeto",
2045
+ description: `Isso apaga a pasta ${__props.project.path} e todos os testes dentro dela.`,
2046
+ "confirm-label": "Remover",
2047
+ "confirm-color": "error",
2048
+ "confirm-testid": "projeto-remover-confirmar",
2049
+ loading: unref(removing),
2050
+ onConfirm: remove
2051
+ }, null, _parent));
2052
+ _push(`<!--]-->`);
1935
2053
  };
1936
2054
  }
1937
2055
  });
@@ -1973,7 +2091,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
1973
2091
  "page[number]": page.value,
1974
2092
  "page[size]": pageSize.value
1975
2093
  }));
1976
- const { data, status } = ([__temp, __restore] = withAsyncContext(() => useFetch("/api/projects", { query }, "$yhDhzWqC9C")), __temp = await __temp, __restore(), __temp);
2094
+ const { data, status, refresh } = ([__temp, __restore] = withAsyncContext(() => useFetch("/api/projects", { query }, "$yhDhzWqC9C")), __temp = await __temp, __restore(), __temp);
1977
2095
  const projects = computed(() => data.value?.data ?? []);
1978
2096
  const total = computed(() => data.value?.meta.total ?? 0);
1979
2097
  /** Quantos cards cabem na altura que sobra da tela, medindo o card e a grade do DOM. */
@@ -2072,7 +2190,8 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
2072
2190
  ssrRenderList(unref(projects), (project) => {
2073
2191
  _push(ssrRenderComponent(_component_ProjectCard, {
2074
2192
  key: project.slug,
2075
- project
2193
+ project,
2194
+ onRemoved: unref(refresh)
2076
2195
  }, null, _parent, _scopeId));
2077
2196
  });
2078
2197
  _push(`<!--]--></div>`);
@@ -2140,8 +2259,9 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
2140
2259
  }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(projects), (project) => {
2141
2260
  return openBlock(), createBlock(_component_ProjectCard, {
2142
2261
  key: project.slug,
2143
- project
2144
- }, null, 8, ["project"]);
2262
+ project,
2263
+ onRemoved: unref(refresh)
2264
+ }, null, 8, ["project", "onRemoved"]);
2145
2265
  }), 128))], 512)),
2146
2266
  unref(projects).length > 0 ? (openBlock(), createBlock("div", {
2147
2267
  key: 3,
@@ -2178,4 +2298,4 @@ index_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
2178
2298
  var pages_default = index_vue_vue_type_script_setup_true_lang_default;
2179
2299
 
2180
2300
  export { pages_default as default };
2181
- //# sourceMappingURL=pages-Dve6n3fN.mjs.map
2301
+ //# sourceMappingURL=pages-BoaPn4t_.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pages-Dve6n3fN.mjs","sources":["../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/utils/form.js","../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/types/form.js","../../../../virtual:nuxt:node_modules%2F.cache%2Fnuxt%2F.nuxt%2Fui%2Fform.ts","../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/components/Form.vue","../../../../virtual:nuxt:node_modules%2F.cache%2Fnuxt%2F.nuxt%2Fui%2Ftextarea.ts","../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/components/Textarea.vue","../../../../app/components/project/form/modal.vue","../../../../virtual:nuxt:node_modules%2F.cache%2Fnuxt%2F.nuxt%2Fui%2Fskeleton.ts","../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/components/Skeleton.vue","../../../../app/components/project/empty.vue","../../../../app/components/project/card.vue","../../../../app/pages/index.vue"],"names":["$attrs","_sfc_main$3","_sfc_main$4","$fetch"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,7,8]}
1
+ {"version":3,"file":"pages-BoaPn4t_.mjs","sources":["../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/utils/form.js","../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/types/form.js","../../../../virtual:nuxt:node_modules%2F.cache%2Fnuxt%2F.nuxt%2Fui%2Fform.ts","../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/components/Form.vue","../../../../virtual:nuxt:node_modules%2F.cache%2Fnuxt%2F.nuxt%2Fui%2Ftextarea.ts","../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/components/Textarea.vue","../../../../app/components/project/form/modal.vue","../../../../virtual:nuxt:node_modules%2F.cache%2Fnuxt%2F.nuxt%2Fui%2Fskeleton.ts","../../../../node_modules/.pnpm/@nuxt+ui@4.10.0_e9e3fcf18fb997bdd8dc5f7c218a2205/node_modules/@nuxt/ui/dist/runtime/components/Skeleton.vue","../../../../app/components/project/empty.vue","../../../../app/components/project/card.vue","../../../../app/pages/index.vue"],"names":["$attrs","_sfc_main$3","_sfc_main$4","$fetch"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,7,8]}
@@ -0,0 +1,93 @@
1
+ import { defineComponent, mergeProps, computed, unref, useSSRContext } from 'vue';
2
+ import { ssrRenderAttrs, ssrInterpolate, ssrRenderClass, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer';
3
+
4
+ //#region app/components/project/report/metric.vue?vue&type=script&setup=true&lang.ts
5
+ var metric_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
6
+ __name: "metric",
7
+ __ssrInlineRender: true,
8
+ props: {
9
+ name: {},
10
+ label: {},
11
+ value: {},
12
+ hint: { default: "" },
13
+ tone: { default: "neutral" }
14
+ },
15
+ setup(__props) {
16
+ const toneClass = {
17
+ neutral: "text-highlighted",
18
+ success: "text-success",
19
+ error: "text-error"
20
+ };
21
+ return (_ctx, _push, _parent, _attrs) => {
22
+ _push(`<div${ssrRenderAttrs(mergeProps({
23
+ class: "rounded-lg bg-elevated px-4 py-3",
24
+ "data-metrica": __props.name
25
+ }, _attrs))}><p class="text-xs uppercase tracking-wide text-dimmed">${ssrInterpolate(__props.label)}</p><p class="${ssrRenderClass([toneClass[__props.tone], "text-2xl font-semibold tabular-nums"])}">${ssrInterpolate(__props.value)}</p>`);
26
+ if (__props.hint) _push(`<p class="text-xs text-muted">${ssrInterpolate(__props.hint)}</p>`);
27
+ else _push(`<!---->`);
28
+ _push(`</div>`);
29
+ };
30
+ }
31
+ });
32
+ //#endregion
33
+ //#region app/components/project/report/metric.vue
34
+ var _sfc_setup$1 = metric_vue_vue_type_script_setup_true_lang_default.setup;
35
+ metric_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
36
+ const ssrContext = useSSRContext();
37
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/project/report/metric.vue");
38
+ return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
39
+ };
40
+ var metric_default = Object.assign(metric_vue_vue_type_script_setup_true_lang_default, { __name: "ProjectReportMetric" });
41
+ //#endregion
42
+ //#region app/components/project/report/ranking.vue?vue&type=script&setup=true&lang.ts
43
+ var ranking_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
44
+ __name: "ranking",
45
+ __ssrInlineRender: true,
46
+ props: {
47
+ title: {},
48
+ empty: {},
49
+ items: {},
50
+ tone: { default: "primary" },
51
+ testid: {}
52
+ },
53
+ setup(__props) {
54
+ const widest = computed(() => Math.max(...__props.items.map((item) => item.value), 1));
55
+ return (_ctx, _push, _parent, _attrs) => {
56
+ _push(`<div${ssrRenderAttrs(mergeProps({
57
+ class: "rounded-lg bg-elevated p-4",
58
+ "data-testid": __props.testid
59
+ }, _attrs))}><p class="mb-3 text-sm font-semibold">${ssrInterpolate(__props.title)}</p>`);
60
+ if (__props.items.length === 0) _push(`<p class="text-sm text-dimmed">${ssrInterpolate(__props.empty)}</p>`);
61
+ else {
62
+ _push(`<ul class="flex flex-col gap-2"><!--[-->`);
63
+ ssrRenderList(__props.items, (item) => {
64
+ _push(`<li class="flex flex-col gap-1"><div class="flex items-baseline justify-between gap-3 text-sm"><span class="truncate">${ssrInterpolate(item.label)}</span><span class="shrink-0 text-muted tabular-nums">${ssrInterpolate(item.display)}</span></div><div class="h-1.5 rounded-full bg-accented"><div class="${ssrRenderClass([__props.tone === "error" ? "bg-error" : "bg-primary", "h-full rounded-full"])}" style="${ssrRenderStyle({ width: `${Math.max(item.value / unref(widest) * 100, 3)}%` })}"></div></div></li>`);
65
+ });
66
+ _push(`<!--]--></ul>`);
67
+ }
68
+ _push(`</div>`);
69
+ };
70
+ }
71
+ });
72
+ //#endregion
73
+ //#region app/components/project/report/ranking.vue
74
+ var _sfc_setup = ranking_vue_vue_type_script_setup_true_lang_default.setup;
75
+ ranking_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
76
+ const ssrContext = useSSRContext();
77
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/project/report/ranking.vue");
78
+ return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
79
+ };
80
+ var ranking_default = Object.assign(ranking_vue_vue_type_script_setup_true_lang_default, { __name: "ProjectReportRanking" });
81
+ //#endregion
82
+ //#region app/utils/plural.ts
83
+ /** A palavra que concorda com a quantidade: `plural(1, 'cenário', 'cenários')`. */
84
+ function plural(count, singular, many) {
85
+ return count === 1 ? singular : many;
86
+ }
87
+ /** A contagem por extenso, com uma frase própria para o zero: `counted(0, ..., 'nenhum falhou')`. */
88
+ function counted(count, singular, many, none) {
89
+ return count === 0 ? none : `${count} ${plural(count, singular, many)}`;
90
+ }
91
+
92
+ export { counted as c, metric_default as m, plural as p, ranking_default as r };
93
+ //# sourceMappingURL=plural-DvfNYUEX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plural-DvfNYUEX.mjs","sources":["../../../../app/components/project/report/metric.vue","../../../../app/components/project/report/ranking.vue","../../../../app/utils/plural.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiBA,EAAA,MAAM,SAAA,GAAY;GAChB,OAAA,EAAS,kBAAA;GACT,OAAA,EAAS,cAAA;GACT,KAAA,EAAO;AACT,GAAA;;;IAKI,KAAA,EAAM,kCAAA;AACL,IAAA,cAAA,EAAc,OAAA,CAAA;IAGV,EAAA,MAAA,CAAA,CAAA,CAAA,wDAAA,EAAA,eAAA,OAAA,CAAA,KAAK,CAAA,CAAA,cAAA,EAIA,cAAA,CAAA,CAAA,UAAU,OAAA,CAAA,IAAA,CAAA,EAAI,qCAAA,CAAA,CAAA,CAAA,IAEnB,cAAA,CAAA,OAAA,CAAA,KAAK,CAAA,CAAA,IAAA,CAAA,CAAA;GAGF,IAAA,OAAA,CAAA,MAGH,KAAA,CAAA,CAAA,8BAAA,EAAA,eAAA,OAAA,CAAA,IAAI,EAAA,IAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzBb,EAAA,MAAM,MAAA,GAAS,QAAA,CAAA,MAAe,IAAA,CAAK,GAAA,CAAI,GAAG,OAAA,CAAA,KAAA,CAAM,GAAA,CAAA,CAAI,IAAA,KAAQ,IAAA,CAAK,KAAK,CAAA,EAAG,CAAC,CAAC,CAAA;;;IAKvE,KAAA,EAAM,4BAAA;AACL,IAAA,aAAA,EAAa,OAAA,CAAA;IAGT,EAAA,MAAA,CAAA,CAAA,CAAA,uCAAA,EAAA,eAAA,OAAA,CAAA,KAAK,EAAA,IAAA,CAAA,CAAA;GAIF,IAAA,OAAA,CAAA,KAAA,CAAM,MAAA,KAAM,CAAA,EAGf,KAAA,CAAA,kCAAA,cAAA,CAAA,OAAA,CAAA,KAAK,CAAA,CAAA,IAAA,CAAA,CAAA;;;IAQS,aAAA,CAAA,OAAA,CAAA,QAAR,IAAA,KAAI;AAKiB,KAAA,KAAA,CAAA,yHAAA,cAAA,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA,wDACc,cAAA,CAAA,IAAA,CAAK,OAAO,CAAA,CAAA,uEAKpD,cAAA,CAAA,CAAA,QAAA,IAAA,KAAI,OAAA,GAAA,aAAA,YAAA,EAAA,qBAAA,CAAA,CAAA,CAAA,WACQ,cAAA,CAAA,EAAA,OAAA,CAAA,EAAA,IAAA,CAAK,IAAK,IAAA,CAAK,KAAA,GAAQ,KAAA,CAAA,MAAA,IAAM,GAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA,EAAA,mBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;ACpD7D,SAAgB,MAAA,CAAO,KAAA,EAAe,QAAA,EAAkB,IAAA,EAAsB;CAC5E,OAAO,KAAA,KAAU,IAAI,QAAA,GAAW,IAAA;AAClC;;AAGA,SAAgB,OAAA,CAAQ,KAAA,EAAe,QAAA,EAAkB,IAAA,EAAc,IAAA,EAAsB;CAC3F,OAAO,KAAA,KAAU,IAAI,IAAA,GAAO,CAAA,EAAG,MAAM,CAAA,EAAG,MAAA,CAAO,KAAA,EAAO,QAAA,EAAU,IAAI,CAAA,CAAA,CAAA;AACtE;;;;"}