@shipfox/client-runners 0.2.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 (120) hide show
  1. package/.storybook/main.ts +1 -0
  2. package/.storybook/preview.css +4 -0
  3. package/.storybook/preview.tsx +64 -0
  4. package/.turbo/turbo-build.log +2 -0
  5. package/.turbo/turbo-type$colon$emit.log +1 -0
  6. package/.turbo/turbo-type.log +1 -0
  7. package/CHANGELOG.md +112 -0
  8. package/LICENSE +21 -0
  9. package/dist/components/create-manual-registration-token-form.d.ts +10 -0
  10. package/dist/components/create-manual-registration-token-form.d.ts.map +1 -0
  11. package/dist/components/create-manual-registration-token-form.js +206 -0
  12. package/dist/components/create-manual-registration-token-form.js.map +1 -0
  13. package/dist/components/create-provisioner-token-form.d.ts +10 -0
  14. package/dist/components/create-provisioner-token-form.d.ts.map +1 -0
  15. package/dist/components/create-provisioner-token-form.js +206 -0
  16. package/dist/components/create-provisioner-token-form.js.map +1 -0
  17. package/dist/components/form-errors.d.ts +6 -0
  18. package/dist/components/form-errors.d.ts.map +1 -0
  19. package/dist/components/form-errors.js +9 -0
  20. package/dist/components/form-errors.js.map +1 -0
  21. package/dist/components/manual-registration-token-errors.d.ts +2 -0
  22. package/dist/components/manual-registration-token-errors.d.ts.map +1 -0
  23. package/dist/components/manual-registration-token-errors.js +14 -0
  24. package/dist/components/manual-registration-token-errors.js.map +1 -0
  25. package/dist/components/manual-registration-token-format.d.ts +5 -0
  26. package/dist/components/manual-registration-token-format.d.ts.map +1 -0
  27. package/dist/components/manual-registration-token-format.js +14 -0
  28. package/dist/components/manual-registration-token-format.js.map +1 -0
  29. package/dist/components/manual-registration-token-list.d.ts +8 -0
  30. package/dist/components/manual-registration-token-list.d.ts.map +1 -0
  31. package/dist/components/manual-registration-token-list.js +293 -0
  32. package/dist/components/manual-registration-token-list.js.map +1 -0
  33. package/dist/components/manual-registration-tokens-settings-section.d.ts +4 -0
  34. package/dist/components/manual-registration-tokens-settings-section.d.ts.map +1 -0
  35. package/dist/components/manual-registration-tokens-settings-section.js +109 -0
  36. package/dist/components/manual-registration-tokens-settings-section.js.map +1 -0
  37. package/dist/components/provisioner-token-errors.d.ts +2 -0
  38. package/dist/components/provisioner-token-errors.d.ts.map +1 -0
  39. package/dist/components/provisioner-token-errors.js +13 -0
  40. package/dist/components/provisioner-token-errors.js.map +1 -0
  41. package/dist/components/provisioner-token-form-errors.d.ts +6 -0
  42. package/dist/components/provisioner-token-form-errors.d.ts.map +1 -0
  43. package/dist/components/provisioner-token-form-errors.js +9 -0
  44. package/dist/components/provisioner-token-form-errors.js.map +1 -0
  45. package/dist/components/provisioner-token-format.d.ts +21 -0
  46. package/dist/components/provisioner-token-format.d.ts.map +1 -0
  47. package/dist/components/provisioner-token-format.js +36 -0
  48. package/dist/components/provisioner-token-format.js.map +1 -0
  49. package/dist/components/provisioner-token-list.d.ts +9 -0
  50. package/dist/components/provisioner-token-list.d.ts.map +1 -0
  51. package/dist/components/provisioner-token-list.js +344 -0
  52. package/dist/components/provisioner-token-list.js.map +1 -0
  53. package/dist/components/provisioner-tokens-settings-section.d.ts +4 -0
  54. package/dist/components/provisioner-tokens-settings-section.d.ts.map +1 -0
  55. package/dist/components/provisioner-tokens-settings-section.js +117 -0
  56. package/dist/components/provisioner-tokens-settings-section.js.map +1 -0
  57. package/dist/components/token-date.d.ts +6 -0
  58. package/dist/components/token-date.d.ts.map +1 -0
  59. package/dist/components/token-date.js +27 -0
  60. package/dist/components/token-date.js.map +1 -0
  61. package/dist/components/token-expiration-select.d.ts +11 -0
  62. package/dist/components/token-expiration-select.d.ts.map +1 -0
  63. package/dist/components/token-expiration-select.js +68 -0
  64. package/dist/components/token-expiration-select.js.map +1 -0
  65. package/dist/components/token-name.d.ts +4 -0
  66. package/dist/components/token-name.d.ts.map +1 -0
  67. package/dist/components/token-name.js +24 -0
  68. package/dist/components/token-name.js.map +1 -0
  69. package/dist/components/token-settings-sections.stories.d.ts +26 -0
  70. package/dist/components/token-settings-sections.stories.d.ts.map +1 -0
  71. package/dist/components/token-settings-sections.stories.js +370 -0
  72. package/dist/components/token-settings-sections.stories.js.map +1 -0
  73. package/dist/hooks/api/manual-registration-tokens.d.ts +83 -0
  74. package/dist/hooks/api/manual-registration-tokens.d.ts.map +1 -0
  75. package/dist/hooks/api/manual-registration-tokens.js +53 -0
  76. package/dist/hooks/api/manual-registration-tokens.js.map +1 -0
  77. package/dist/hooks/api/provisioner-tokens.d.ts +125 -0
  78. package/dist/hooks/api/provisioner-tokens.d.ts.map +1 -0
  79. package/dist/hooks/api/provisioner-tokens.js +81 -0
  80. package/dist/hooks/api/provisioner-tokens.js.map +1 -0
  81. package/dist/index.d.ts +5 -0
  82. package/dist/index.d.ts.map +1 -0
  83. package/dist/index.js +6 -0
  84. package/dist/index.js.map +1 -0
  85. package/dist/tsconfig.test.tsbuildinfo +1 -0
  86. package/package.json +88 -0
  87. package/src/components/create-manual-registration-token-form.tsx +197 -0
  88. package/src/components/create-provisioner-token-form.tsx +193 -0
  89. package/src/components/form-errors.test.ts +24 -0
  90. package/src/components/form-errors.ts +9 -0
  91. package/src/components/manual-registration-token-errors.ts +13 -0
  92. package/src/components/manual-registration-token-format.test.ts +48 -0
  93. package/src/components/manual-registration-token-format.ts +18 -0
  94. package/src/components/manual-registration-token-list.tsx +246 -0
  95. package/src/components/manual-registration-tokens-settings-section.test.tsx +251 -0
  96. package/src/components/manual-registration-tokens-settings-section.tsx +110 -0
  97. package/src/components/provisioner-token-errors.ts +12 -0
  98. package/src/components/provisioner-token-form-errors.test.ts +35 -0
  99. package/src/components/provisioner-token-form-errors.ts +9 -0
  100. package/src/components/provisioner-token-format.test.ts +96 -0
  101. package/src/components/provisioner-token-format.ts +40 -0
  102. package/src/components/provisioner-token-list.tsx +280 -0
  103. package/src/components/provisioner-tokens-settings-section.test.tsx +362 -0
  104. package/src/components/provisioner-tokens-settings-section.tsx +114 -0
  105. package/src/components/token-date.tsx +27 -0
  106. package/src/components/token-expiration-select.tsx +64 -0
  107. package/src/components/token-name.tsx +19 -0
  108. package/src/components/token-settings-sections.stories.tsx +360 -0
  109. package/src/hooks/api/manual-registration-tokens.test.ts +87 -0
  110. package/src/hooks/api/manual-registration-tokens.ts +71 -0
  111. package/src/hooks/api/provisioner-tokens.test.ts +127 -0
  112. package/src/hooks/api/provisioner-tokens.ts +102 -0
  113. package/src/index.ts +4 -0
  114. package/test/setup.ts +3 -0
  115. package/tsconfig.build.json +9 -0
  116. package/tsconfig.build.tsbuildinfo +1 -0
  117. package/tsconfig.json +3 -0
  118. package/tsconfig.test.json +8 -0
  119. package/vercel.json +8 -0
  120. package/vitest.config.ts +74 -0
@@ -0,0 +1,74 @@
1
+ import * as path from 'node:path';
2
+ import {fileURLToPath} from 'node:url';
3
+ import {argosVitestPlugin} from '@argos-ci/storybook/vitest-plugin';
4
+ import {defineConfig, type UserConfigExport} from '@shipfox/vitest';
5
+ import {storybookTest} from '@storybook/addon-vitest/vitest-plugin';
6
+ import tailwindcss from '@tailwindcss/vite';
7
+ import react from '@vitejs/plugin-react';
8
+ import {playwright} from '@vitest/browser-playwright';
9
+
10
+ const dirname =
11
+ typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
12
+
13
+ export default defineConfig(
14
+ {
15
+ plugins: [react(), tailwindcss()],
16
+ test: {
17
+ projects: [
18
+ {
19
+ extends: true,
20
+ test: {
21
+ name: 'node',
22
+ environment: 'node',
23
+ include: ['src/**/*.test.ts'],
24
+ },
25
+ },
26
+ {
27
+ extends: true,
28
+ test: {
29
+ name: 'dom',
30
+ environment: 'jsdom',
31
+ // Files are isolation-safe (test/setup.ts resets DOM + api client), so reuse the
32
+ // module graph across files in a worker instead of re-importing it per file.
33
+ isolate: false,
34
+ include: ['src/**/*.test.tsx'],
35
+ setupFiles: ['test/setup.ts'],
36
+ },
37
+ },
38
+ {
39
+ extends: true,
40
+ plugins: [
41
+ storybookTest({configDir: path.join(dirname, '.storybook')}),
42
+ argosVitestPlugin({
43
+ uploadToArgos: !!process.env.CI,
44
+ ...(process.env.ARGOS_TOKEN ? {token: process.env.ARGOS_TOKEN} : {}),
45
+ buildName: 'client-runners',
46
+ argosCSS: `
47
+ *, *::before, *::after {
48
+ animation-delay: 0s !important;
49
+ animation-duration: 0s !important;
50
+ transition-delay: 0s !important;
51
+ transition-duration: 0s !important;
52
+ }
53
+ `,
54
+ }),
55
+ ],
56
+ test: {
57
+ name: 'storybook',
58
+ browser: {
59
+ enabled: true,
60
+ headless: true,
61
+ provider: playwright({
62
+ launchOptions: {
63
+ args: ['--disable-lcd-text', '--font-render-hinting=none'],
64
+ },
65
+ }),
66
+ instances: [{browser: 'chromium'}],
67
+ },
68
+ },
69
+ },
70
+ ],
71
+ },
72
+ },
73
+ import.meta.url,
74
+ ) as UserConfigExport;