devflare 1.0.0-next.39 → 1.0.0-next.40

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 (277) hide show
  1. package/dist/_chunks/account-BtWcv3X9.js +462 -0
  2. package/dist/_chunks/account-resources-CsmVowJp.js +159 -0
  3. package/dist/_chunks/ai-CBEuLdoP.js +322 -0
  4. package/dist/_chunks/api-TzdliH-6.js +568 -0
  5. package/dist/_chunks/build-3T6O4uIg.js +24 -0
  6. package/dist/_chunks/build-artifacts-8TqBSQkG.js +483 -0
  7. package/dist/_chunks/cli-BTF1X4SG.js +1128 -0
  8. package/dist/_chunks/cloudflare-BaloqI3H.js +157 -0
  9. package/dist/_chunks/colors-DiK6wPJ5.js +13 -0
  10. package/dist/_chunks/command-utils-BsfkmTqh.js +45 -0
  11. package/dist/_chunks/compiler-uoyAQ8zW.js +424 -0
  12. package/dist/_chunks/config-D5u-bEkn.js +78 -0
  13. package/dist/_chunks/config-path-DCPto4XB.js +42 -0
  14. package/dist/_chunks/context-CX50Y2Kb.js +2250 -0
  15. package/dist/_chunks/decorators-QmV57ixr.js +19 -0
  16. package/dist/_chunks/dependencies-C2oxFjU_.js +57 -0
  17. package/dist/_chunks/deploy-DMTr6JeR.js +915 -0
  18. package/dist/_chunks/dev-CvRHmRFZ.js +3456 -0
  19. package/dist/_chunks/doctor-DIG8DoFU.js +219 -0
  20. package/dist/_chunks/durable-object-DMtH0XYX.js +234 -0
  21. package/dist/_chunks/env-S0_nMVz1.js +125 -0
  22. package/dist/_chunks/family-DXC5SdFK.js +143 -0
  23. package/dist/_chunks/generated-artifacts-dMJY4KAt.js +32 -0
  24. package/dist/_chunks/glob-CmQOvunB.js +56 -0
  25. package/dist/_chunks/init-3moXTgpb.js +165 -0
  26. package/dist/_chunks/loader-DLXO60RO.js +1153 -0
  27. package/dist/_chunks/local-dev-vars-CTSa-wvF.js +81 -0
  28. package/dist/_chunks/local-hyperdrive-CJ90j46O.js +119 -0
  29. package/dist/_chunks/local-media-bindings-DsAW4AMF.js +335 -0
  30. package/dist/_chunks/local-secrets-DMmEOygL.js +123 -0
  31. package/dist/_chunks/local-workflow-entrypoints-Wip3o1u8.js +90 -0
  32. package/dist/_chunks/login-BmnDzDlH.js +51 -0
  33. package/dist/_chunks/package-metadata-DAuCkyvK.js +39 -0
  34. package/dist/_chunks/preferences-BKp_7XJx.js +241 -0
  35. package/dist/_chunks/preview-BhqDmq8I.js +456 -0
  36. package/dist/_chunks/preview-registry-ClAbLTHH.js +1186 -0
  37. package/dist/_chunks/preview-resources-DdXj8LMM.js +358 -0
  38. package/dist/_chunks/previews-Dlr13x5M.js +1134 -0
  39. package/dist/_chunks/productions-D3AnOHac.js +411 -0
  40. package/dist/_chunks/ref-CYJNAAe_.js +178 -0
  41. package/dist/_chunks/remote-CZnP-HLJ.js +79 -0
  42. package/dist/_chunks/remote-config-D39BY9ji.js +132 -0
  43. package/dist/_chunks/resolve-package-Y84HB3Nt.js +133 -0
  44. package/dist/_chunks/rolldown-runtime-CvQ6eiug.js +14 -0
  45. package/dist/_chunks/routes-C3FqES2W.js +796 -0
  46. package/dist/_chunks/runtime-FvXvfuZ2.js +550 -0
  47. package/dist/_chunks/schema-normalization-DWVleVxo.js +477 -0
  48. package/dist/_chunks/secrets-70eN0Q6C.js +95 -0
  49. package/dist/_chunks/token-kguIDmej.js +333 -0
  50. package/dist/_chunks/tokens-iVcgNXi-.js +221 -0
  51. package/dist/_chunks/types-OrLbzv4I.js +476 -0
  52. package/dist/_chunks/ui-BUoZApvE.js +103 -0
  53. package/dist/_chunks/usage-BBTGzjon.js +272 -0
  54. package/dist/_chunks/vite-CsI0E-uV.js +1235 -0
  55. package/dist/_chunks/vite-utils-OVLMV605.js +183 -0
  56. package/dist/_chunks/worker-CS1jgNFE.js +410 -0
  57. package/dist/_chunks/worker-bundler-dTTnYU3n.js +458 -0
  58. package/dist/_chunks/worker-entrypoint-CQW77lG8.js +247 -0
  59. package/dist/_chunks/workerName-CFJsLZA-.js +23 -0
  60. package/dist/bridge/index.d.ts +6 -6
  61. package/dist/bridge/miniflare.d.ts +2 -2
  62. package/dist/bridge/proxy.d.ts +1 -1
  63. package/dist/bridge/v2/body-streams.d.ts +1 -1
  64. package/dist/bridge/v2/codec.d.ts +4 -4
  65. package/dist/bridge/v2/index.d.ts +10 -10
  66. package/dist/bridge/v2/serialization.d.ts +1 -1
  67. package/dist/bridge/v2/value-codec.d.ts +1 -1
  68. package/dist/bridge/v2/value-serialization.d.ts.map +1 -1
  69. package/dist/bridge/v2/ws-relay.d.ts +3 -3
  70. package/dist/browser-shim/index.d.ts +2 -2
  71. package/dist/browser.d.ts +70 -70
  72. package/dist/browser.js +74 -2462
  73. package/dist/bundler/do-bundler.d.ts +1 -1
  74. package/dist/bundler/index.d.ts +3 -3
  75. package/dist/bundler/rolldown-shared.d.ts +1 -1
  76. package/dist/bundler/worker-bundler.d.ts +1 -1
  77. package/dist/cli/build-manifest.d.ts +1 -1
  78. package/dist/cli/command-utils.d.ts +1 -1
  79. package/dist/cli/commands/account.d.ts +1 -1
  80. package/dist/cli/commands/ai.d.ts +1 -1
  81. package/dist/cli/commands/build-artifacts.d.ts +5 -5
  82. package/dist/cli/commands/build.d.ts +1 -1
  83. package/dist/cli/commands/config.d.ts +1 -1
  84. package/dist/cli/commands/deploy/prepare.d.ts +2 -2
  85. package/dist/cli/commands/deploy/runtime.d.ts +1 -1
  86. package/dist/cli/commands/deploy/verification.d.ts +1 -1
  87. package/dist/cli/commands/deploy.d.ts +1 -1
  88. package/dist/cli/commands/dev.d.ts +1 -1
  89. package/dist/cli/commands/doctor.d.ts +1 -1
  90. package/dist/cli/commands/init.d.ts +1 -1
  91. package/dist/cli/commands/login.d.ts +1 -1
  92. package/dist/cli/commands/previews-support/cleanup.d.ts +1 -1
  93. package/dist/cli/commands/previews-support/family.d.ts +3 -3
  94. package/dist/cli/commands/previews-support/render.d.ts +3 -3
  95. package/dist/cli/commands/previews-support/theme.d.ts +2 -2
  96. package/dist/cli/commands/previews-support/types.d.ts +2 -2
  97. package/dist/cli/commands/previews.d.ts +1 -1
  98. package/dist/cli/commands/productions.d.ts +1 -1
  99. package/dist/cli/commands/remote.d.ts +1 -1
  100. package/dist/cli/commands/secrets.d.ts +1 -1
  101. package/dist/cli/commands/token.d.ts +1 -1
  102. package/dist/cli/commands/type-generation/discovery.d.ts +2 -2
  103. package/dist/cli/commands/type-generation/generator.d.ts +3 -3
  104. package/dist/cli/commands/type-generation/models.d.ts +1 -1
  105. package/dist/cli/commands/types.d.ts +1 -1
  106. package/dist/cli/commands/worker.d.ts +1 -1
  107. package/dist/cli/deploy-strategy.d.ts +1 -1
  108. package/dist/cli/deploy-target.d.ts +1 -1
  109. package/dist/cli/help-pages/pages/account.d.ts +1 -1
  110. package/dist/cli/help-pages/pages/core.d.ts +1 -1
  111. package/dist/cli/help-pages/pages/index.d.ts +1 -1
  112. package/dist/cli/help-pages/pages/misc.d.ts +1 -1
  113. package/dist/cli/help-pages/pages/previews.d.ts +1 -1
  114. package/dist/cli/help-pages/pages/productions.d.ts +1 -1
  115. package/dist/cli/help-pages/render.d.ts +2 -2
  116. package/dist/cli/help-pages/shared.d.ts +1 -1
  117. package/dist/cli/help.d.ts +2 -2
  118. package/dist/cli/index.js +2 -1383
  119. package/dist/cli/preview-bindings.d.ts +3 -3
  120. package/dist/cli/preview.d.ts +1 -1
  121. package/dist/cli/wrangler-auth.d.ts +1 -1
  122. package/dist/cloudflare/account-core.d.ts +2 -2
  123. package/dist/cloudflare/account-resources.d.ts +2 -2
  124. package/dist/cloudflare/account-status.d.ts +1 -1
  125. package/dist/cloudflare/account-workers.d.ts +2 -2
  126. package/dist/cloudflare/account.d.ts +7 -7
  127. package/dist/cloudflare/auth.d.ts +1 -1
  128. package/dist/cloudflare/index.d.ts +13 -13
  129. package/dist/cloudflare/index.js +4 -59
  130. package/dist/cloudflare/kv-namespace.d.ts +1 -1
  131. package/dist/cloudflare/preview-registry-cache.d.ts +1 -1
  132. package/dist/cloudflare/preview-registry-inference.d.ts +2 -2
  133. package/dist/cloudflare/preview-registry-records.d.ts +3 -3
  134. package/dist/cloudflare/preview-registry-shape.d.ts +2 -2
  135. package/dist/cloudflare/preview-registry-store.d.ts +3 -3
  136. package/dist/cloudflare/preview-registry-transport.d.ts +2 -2
  137. package/dist/cloudflare/preview-registry-types.d.ts +2 -2
  138. package/dist/cloudflare/preview-registry.d.ts +5 -5
  139. package/dist/cloudflare/tokens.d.ts +2 -2
  140. package/dist/cloudflare/usage.d.ts +2 -2
  141. package/dist/config/binding-resolution-helpers.d.ts +1 -1
  142. package/dist/config/compiler/bindings.d.ts +2 -2
  143. package/dist/config/compiler/core-helpers.d.ts +2 -2
  144. package/dist/config/compiler/do-workers.d.ts +2 -2
  145. package/dist/config/compiler/paths.d.ts +1 -1
  146. package/dist/config/compiler.d.ts +6 -6
  147. package/dist/config/define.d.ts +2 -2
  148. package/dist/config/deploy-resources.d.ts +5 -5
  149. package/dist/config/env-vars.d.ts +1 -1
  150. package/dist/config/framework-providers.d.ts +1 -1
  151. package/dist/config/index.d.ts +12 -12
  152. package/dist/config/loader.d.ts +2 -2
  153. package/dist/config/local-dev-vars.d.ts +1 -1
  154. package/dist/config/preview-resources.d.ts +4 -4
  155. package/dist/config/preview.d.ts +1 -1
  156. package/dist/config/ref.d.ts +2 -2
  157. package/dist/config/resolve-phased.d.ts +4 -4
  158. package/dist/config/resolve.d.ts +1 -1
  159. package/dist/config/resource-resolution.d.ts +6 -6
  160. package/dist/config/schema-env.d.ts +20 -20
  161. package/dist/config/schema-normalization.d.ts +1 -1
  162. package/dist/config/schema-types-bindings.d.ts +4 -4
  163. package/dist/config/schema-types-build.d.ts +1 -1
  164. package/dist/config/schema-types.d.ts +7 -7
  165. package/dist/config/schema.d.ts +46 -46
  166. package/dist/config/service-bindings-validation.d.ts +1 -1
  167. package/dist/config-entry.d.ts +6 -6
  168. package/dist/config-entry.js +3 -8
  169. package/dist/decorators/index.d.ts +2 -2
  170. package/dist/decorators/index.js +2 -9
  171. package/dist/dev-server/d1-migrations.d.ts +1 -1
  172. package/dist/dev-server/dev-server-state.d.ts +6 -6
  173. package/dist/dev-server/gateway-script.d.ts +1 -1
  174. package/dist/dev-server/index.d.ts +1 -1
  175. package/dist/dev-server/miniflare-bindings.d.ts +1 -1
  176. package/dist/dev-server/miniflare-dev-config.d.ts +5 -5
  177. package/dist/dev-server/miniflare-worker-config.d.ts +3 -3
  178. package/dist/dev-server/server-startup-helpers.d.ts +6 -6
  179. package/dist/dev-server/worker-surface-paths.d.ts +2 -2
  180. package/dist/index.d.ts +8 -8
  181. package/dist/index.js +9 -22
  182. package/dist/runtime/context-events.d.ts +1 -1
  183. package/dist/runtime/context.d.ts +3 -3
  184. package/dist/runtime/exports.d.ts +2 -2
  185. package/dist/runtime/index.d.ts +10 -10
  186. package/dist/runtime/index.js +5 -57
  187. package/dist/runtime/middleware.d.ts +1 -1
  188. package/dist/runtime/router/index.d.ts +3 -3
  189. package/dist/runtime/validation.d.ts +1 -1
  190. package/dist/secrets/local-secrets.d.ts +1 -1
  191. package/dist/shims/local-media-bindings.d.ts +1 -1
  192. package/dist/sveltekit/index.d.ts +1 -1
  193. package/dist/sveltekit/index.js +327 -9
  194. package/dist/sveltekit/local-bindings.d.ts +1 -1
  195. package/dist/sveltekit/platform.d.ts +1 -1
  196. package/dist/test/binding-hints.d.ts +2 -2
  197. package/dist/test/cf.d.ts +19 -19
  198. package/dist/test/index.d.ts +18 -18
  199. package/dist/test/index.js +4495 -46
  200. package/dist/test/offline-bindings.d.ts +3 -3
  201. package/dist/test/resolve-service-bindings.d.ts +1 -1
  202. package/dist/test/simple-context-bindings.d.ts +1 -1
  203. package/dist/test/simple-context-durable-objects.d.ts +1 -1
  204. package/dist/test/simple-context-env.d.ts +2 -2
  205. package/dist/test/simple-context-handlers.d.ts +2 -2
  206. package/dist/test/simple-context-lifecycle.d.ts +2 -2
  207. package/dist/test/simple-context-mfconfig.d.ts +1 -1
  208. package/dist/test/simple-context-multi-worker.d.ts +2 -2
  209. package/dist/test/simple-context-runtime.d.ts +1 -1
  210. package/dist/test/simple-context-startup.d.ts +1 -1
  211. package/dist/test/simple-context.d.ts +1 -1
  212. package/dist/test/utilities/env.d.ts +3 -3
  213. package/dist/test/utilities.d.ts +10 -10
  214. package/dist/test/worker.d.ts +1 -1
  215. package/dist/transform/index.d.ts +2 -2
  216. package/dist/utils/send-email.js +163 -19
  217. package/dist/vite/config-file.d.ts +2 -2
  218. package/dist/vite/index.d.ts +3 -3
  219. package/dist/vite/index.js +2 -31
  220. package/dist/vite/plugin-config-hook.d.ts +1 -1
  221. package/dist/vite/plugin-context.d.ts +3 -3
  222. package/dist/vite/plugin-durable-objects.d.ts +2 -2
  223. package/dist/vite/plugin-programmatic.d.ts +1 -1
  224. package/dist/vite/plugin-service-bindings.d.ts +2 -2
  225. package/dist/vite/plugin.d.ts +3 -3
  226. package/dist/worker-entry/composed-worker.d.ts +1 -1
  227. package/dist/worker-entry/routes.d.ts +2 -2
  228. package/dist/worker-entry/surface-paths.d.ts +1 -1
  229. package/dist/workflows/local-workflow-entrypoints.d.ts +1 -1
  230. package/package.json +5 -3
  231. package/dist/account-4tgh03a8.js +0 -484
  232. package/dist/ai-r3zqmxan.js +0 -261
  233. package/dist/api-6z01z734.js +0 -33
  234. package/dist/build-kw625v84.js +0 -51
  235. package/dist/config-ghk2bxj3.js +0 -102
  236. package/dist/deploy-9kee65n9.js +0 -1062
  237. package/dist/dev-x8zr249a.js +0 -3569
  238. package/dist/doctor-0ng5qrr1.js +0 -258
  239. package/dist/durable-object-0ybmg08a.js +0 -13
  240. package/dist/index-04wh9bxx.js +0 -514
  241. package/dist/index-0cc05hzv.js +0 -74
  242. package/dist/index-2yv7w548.js +0 -185
  243. package/dist/index-37x76zdn.js +0 -4
  244. package/dist/index-3cpzsr47.js +0 -125
  245. package/dist/index-3t6rypgc.js +0 -13
  246. package/dist/index-4mmpccrb.js +0 -309
  247. package/dist/index-5dkjffqz.js +0 -25
  248. package/dist/index-5hy7jmv3.js +0 -890
  249. package/dist/index-627srx16.js +0 -45
  250. package/dist/index-7m557715.js +0 -283
  251. package/dist/index-a8pnvg3r.js +0 -52
  252. package/dist/index-aabgympv.js +0 -39
  253. package/dist/index-atwc3csp.js +0 -256
  254. package/dist/index-cv4cvrxe.js +0 -2046
  255. package/dist/index-h7r11y4a.js +0 -539
  256. package/dist/index-hvtd936d.js +0 -1229
  257. package/dist/index-kcp7y951.js +0 -136
  258. package/dist/index-maw0jjnn.js +0 -147
  259. package/dist/index-mek9msfv.js +0 -705
  260. package/dist/index-n4xkaymm.js +0 -236
  261. package/dist/index-nkk59p3y.js +0 -579
  262. package/dist/index-phcrvs6d.js +0 -342
  263. package/dist/index-se4kw8tm.js +0 -460
  264. package/dist/index-x8s9rwfh.js +0 -2020
  265. package/dist/index-y7w3x9p1.js +0 -18
  266. package/dist/index-z9gy8w6b.js +0 -57
  267. package/dist/index-zdd0d9qa.js +0 -199
  268. package/dist/init-tb8jqgvr.js +0 -180
  269. package/dist/login-4h1sfsed.js +0 -75
  270. package/dist/previews-qr7c5j8h.js +0 -1336
  271. package/dist/productions-xpmd6bw8.js +0 -505
  272. package/dist/remote-kqcvhnfx.js +0 -192
  273. package/dist/secrets-6wbdsdek.js +0 -89
  274. package/dist/token-yp1qa70y.js +0 -419
  275. package/dist/types-15yv4cj3.js +0 -701
  276. package/dist/worker-1yg72jxg.js +0 -510
  277. package/dist/worker-entrypoint-y8s9kdcx.js +0 -15
@@ -1,258 +0,0 @@
1
- import {
2
- getGeneratedArtifactPaths
3
- } from "./index-aabgympv.js";
4
- import {
5
- formatSupportedConfigFilenames,
6
- resolveConfigCandidatePath
7
- } from "./index-a8pnvg3r.js";
8
- import {
9
- getDependencies
10
- } from "./index-z9gy8w6b.js";
11
- import {
12
- detectViteProject
13
- } from "./index-zdd0d9qa.js";
14
- import {
15
- getPackageVersion
16
- } from "./index-627srx16.js";
17
- import {
18
- bold,
19
- createCliTheme,
20
- dim,
21
- green,
22
- logLine,
23
- red,
24
- yellow
25
- } from "./index-maw0jjnn.js";
26
- import"./index-3t6rypgc.js";
27
- import"./index-5dkjffqz.js";
28
- import {
29
- loadConfig
30
- } from "./index-x8s9rwfh.js";
31
- import"./index-h7r11y4a.js";
32
- import"./index-04wh9bxx.js";
33
- import"./index-37x76zdn.js";
34
-
35
- // src/cli/commands/doctor.ts
36
- import { basename, dirname, relative, resolve } from "pathe";
37
- async function runDoctorCommand(parsed, logger, options) {
38
- const cwd = options.cwd || process.cwd();
39
- const theme = createCliTheme(parsed.options);
40
- const requestedConfigOption = parsed.options.config;
41
- const scope = parsed.options.scope ?? "all";
42
- if (!["all", "local", "deploy"].includes(scope)) {
43
- logger.error(`Unsupported doctor scope: ${scope}`);
44
- logger.info("Supported scopes: all, local, deploy");
45
- return { exitCode: 1 };
46
- }
47
- const requestedConfigPath = requestedConfigOption ? resolve(cwd, requestedConfigOption) : cwd;
48
- const checks = [];
49
- const { fs } = await getDependencies();
50
- const viteProject = await detectViteProject(cwd, fs);
51
- logLine(logger);
52
- logLine(logger, `${bold("doctor", theme)} ${dim("Running diagnostics", theme)}`);
53
- logLine(logger);
54
- const configPath = await resolveConfigCandidatePath(requestedConfigPath);
55
- if (configPath) {
56
- checks.push({
57
- name: "Config File",
58
- status: "pass",
59
- message: `Found: ${configPath}`
60
- });
61
- try {
62
- const config = requestedConfigOption ? await loadConfig({
63
- cwd: dirname(configPath),
64
- configFile: basename(configPath)
65
- }) : await loadConfig({ cwd });
66
- checks.push({
67
- name: "Config Valid",
68
- status: "pass",
69
- message: `Project: ${config.name}`
70
- });
71
- } catch (error) {
72
- checks.push({
73
- name: "Config Valid",
74
- status: "fail",
75
- message: error instanceof Error ? error.message : "Unknown error"
76
- });
77
- }
78
- } else {
79
- checks.push({
80
- name: "Config File",
81
- status: "fail",
82
- message: `${formatSupportedConfigFilenames()} not found. Run \`devflare init\` to create one.`
83
- });
84
- }
85
- const packageJsonPath = resolve(cwd, "package.json");
86
- try {
87
- await fs.access(packageJsonPath);
88
- const content = await fs.readFile(packageJsonPath, "utf-8");
89
- const pkg = JSON.parse(content);
90
- checks.push({
91
- name: "package.json",
92
- status: "pass",
93
- message: `Found: ${pkg.name || "unnamed"}`
94
- });
95
- const deps = { ...pkg.dependencies, ...pkg.devDependencies };
96
- if (deps.devflare) {
97
- const resolvedVersion = await getPackageVersion();
98
- checks.push({
99
- name: "devflare dep",
100
- status: "pass",
101
- message: `package.json: ${deps.devflare}, resolved: ${resolvedVersion}`
102
- });
103
- } else {
104
- checks.push({
105
- name: "devflare dep",
106
- status: "warn",
107
- message: "devflare not in dependencies"
108
- });
109
- }
110
- } catch {
111
- checks.push({
112
- name: "package.json",
113
- status: "fail",
114
- message: "package.json not found"
115
- });
116
- }
117
- if (viteProject.wantsViteIntegration) {
118
- checks.push({
119
- name: "Vite Integration",
120
- status: "pass",
121
- message: "Enabled for this package"
122
- });
123
- if (viteProject.hasLocalViteDependency) {
124
- checks.push({
125
- name: "vite dep",
126
- status: "pass",
127
- message: "Found in package.json"
128
- });
129
- } else {
130
- checks.push({
131
- name: "vite dep",
132
- status: "warn",
133
- message: "Not declared in this package.json (workspace-hoisted installs may still work)"
134
- });
135
- }
136
- if (viteProject.hasLocalCloudflareVitePluginDependency) {
137
- checks.push({
138
- name: "@cloudflare/vite-plugin",
139
- status: "pass",
140
- message: "Found in package.json"
141
- });
142
- } else {
143
- checks.push({
144
- name: "@cloudflare/vite-plugin",
145
- status: "pass",
146
- message: "Optional: not declared in this package.json. Install it only when your Vite config calls the Cloudflare Vite plugin directly."
147
- });
148
- }
149
- if (viteProject.viteConfigPath) {
150
- checks.push({
151
- name: "Vite Config",
152
- status: "pass",
153
- message: `Found: ${viteProject.viteConfigPath}`
154
- });
155
- } else {
156
- checks.push({
157
- name: "Vite Config",
158
- status: "warn",
159
- message: "No vite.config found. Create one with @cloudflare/vite-plugin"
160
- });
161
- }
162
- } else {
163
- checks.push({
164
- name: "Vite Integration",
165
- status: "pass",
166
- message: "Not enabled for this package (worker-only mode)"
167
- });
168
- }
169
- try {
170
- await fs.access(resolve(cwd, "tsconfig.json"));
171
- checks.push({
172
- name: "tsconfig.json",
173
- status: "pass",
174
- message: "Found"
175
- });
176
- } catch {
177
- checks.push({
178
- name: "tsconfig.json",
179
- status: "warn",
180
- message: "tsconfig.json not found"
181
- });
182
- }
183
- const artifactPaths = getGeneratedArtifactPaths(cwd);
184
- if (scope === "all" || scope === "local") {
185
- try {
186
- await fs.access(artifactPaths.devWranglerConfigPath);
187
- checks.push({
188
- name: "Generated dev config",
189
- status: "pass",
190
- message: `Found: ${relative(cwd, artifactPaths.devWranglerConfigPath)}`
191
- });
192
- } catch {
193
- checks.push({
194
- name: "Generated dev config",
195
- status: "warn",
196
- message: "Local readiness: not found. Run `devflare dev` or start `devflare/vite` to populate `.devflare/wrangler.jsonc`."
197
- });
198
- }
199
- }
200
- if (scope === "all" || scope === "deploy") {
201
- try {
202
- await fs.access(artifactPaths.buildWranglerConfigPath);
203
- checks.push({
204
- name: "Generated deploy config",
205
- status: "pass",
206
- message: `Found: ${relative(cwd, artifactPaths.buildWranglerConfigPath)}`
207
- });
208
- } catch {
209
- checks.push({
210
- name: "Generated deploy config",
211
- status: "warn",
212
- message: "Deploy readiness: not found. Run `devflare build` or `devflare deploy` to generate `.devflare/build/wrangler.jsonc`."
213
- });
214
- }
215
- try {
216
- await fs.access(artifactPaths.deployRedirectPath);
217
- checks.push({
218
- name: "Wrangler deploy redirect",
219
- status: "pass",
220
- message: `Found: ${relative(cwd, artifactPaths.deployRedirectPath)}`
221
- });
222
- } catch {
223
- checks.push({
224
- name: "Wrangler deploy redirect",
225
- status: "warn",
226
- message: "Deploy readiness: not found. Run `devflare build` or `devflare deploy` to generate `.wrangler/deploy/config.json`."
227
- });
228
- }
229
- }
230
- let hasFailures = false;
231
- let hasWarnings = false;
232
- for (const check of checks) {
233
- const icon = check.status === "pass" ? "✓" : check.status === "warn" ? "⚠" : "✗";
234
- if (check.status === "pass") {
235
- logLine(logger, `${green(icon, theme)} ${bold(check.name, theme)}${dim(" — ", theme)}${check.message}`);
236
- } else if (check.status === "warn") {
237
- logLine(logger, `${yellow(icon, theme)} ${bold(check.name, theme)}${dim(" — ", theme)}${check.message}`);
238
- hasWarnings = true;
239
- } else {
240
- logLine(logger, `${red(icon, theme)} ${bold(check.name, theme)}${dim(" — ", theme)}${check.message}`);
241
- hasFailures = true;
242
- }
243
- }
244
- logLine(logger);
245
- if (hasFailures) {
246
- logger.error("Some checks failed. Please fix the issues above.");
247
- return { exitCode: 1 };
248
- }
249
- if (hasWarnings) {
250
- logger.warn("All critical checks passed, but there are warnings.");
251
- return { exitCode: 0 };
252
- }
253
- logger.success("All checks passed!");
254
- return { exitCode: 0 };
255
- }
256
- export {
257
- runDoctorCommand
258
- };
@@ -1,13 +0,0 @@
1
- import {
2
- findDurableObjectClasses,
3
- findDurableObjectClassesDetailed,
4
- generateWrapper,
5
- transformDurableObject
6
- } from "./index-4mmpccrb.js";
7
- import"./index-37x76zdn.js";
8
- export {
9
- transformDurableObject,
10
- generateWrapper,
11
- findDurableObjectClassesDetailed,
12
- findDurableObjectClasses
13
- };