@vite-hub/workspace 0.0.2 → 0.0.4

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 (95) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +48 -2
  3. package/dist/{ai-Cztw4eLk.js → ai-BqCC8BpY.js} +15 -4
  4. package/dist/{ai-hFdsvDHC.d.ts → ai-CjxvGqM0.d.ts} +1 -1
  5. package/dist/ai.d.ts +2 -2
  6. package/dist/ai.js +1 -1
  7. package/dist/{asset-registry-CaG9b7tf.js → asset-registry-8QI3ML3K.js} +1 -1
  8. package/dist/chunk-2rV9d50f.js +35 -0
  9. package/dist/cloudflare.d.ts +4 -2
  10. package/dist/cloudflare.js +1 -2
  11. package/dist/collections.d.ts +2 -2
  12. package/dist/collections.js +1 -1
  13. package/dist/{config--r5unwPc.js → config-Bc3c4Su1.js} +213 -120
  14. package/dist/{config-DCQ6y30R.js → config-CHLLWklZ.js} +9 -3
  15. package/dist/{config-Ca5DM8fF.d.ts → config-DE9xlaIw.d.ts} +1 -1
  16. package/dist/{file-B2q9NE18.js → file-Bc1X7pco.js} +9 -10
  17. package/dist/{files-xy0le-_U.js → files-Q6xZjDHA.js} +20 -9
  18. package/dist/{github-lIO6-2sH.js → github-DHnjxQIX.js} +27 -23
  19. package/dist/glob-CEZKeZFC.js +18 -0
  20. package/dist/host-DJH8cuoU.js +1030 -0
  21. package/dist/{artifacts-store-BAV9jZpd.js → hosted-RPeJOCFz.js} +146 -30
  22. package/dist/hosted-vercel-blob-d6C8ND5j.js +23580 -0
  23. package/dist/hosted-vercel-blob.d.ts +1 -1
  24. package/dist/hosted-vercel-blob.js +1 -25
  25. package/dist/hosted.d.ts +1 -1
  26. package/dist/hosted.js +1 -29
  27. package/dist/index.d.ts +61 -78
  28. package/dist/index.js +133 -435
  29. package/dist/lifecycle-LrL3sA4n.js +316 -0
  30. package/dist/loader.d.ts +1 -1
  31. package/dist/loader.js +1 -1
  32. package/dist/metadata-target-B0tOmVW7.js +717 -0
  33. package/dist/mountx.d.ts +10 -0
  34. package/dist/mountx.js +143 -0
  35. package/dist/nitro.d.ts +1 -1
  36. package/dist/nitro.js +1 -1
  37. package/dist/nuxt.d.ts +1 -1
  38. package/dist/nuxt.js +8 -2
  39. package/dist/{path-CNI6wKIU.js → path-Cp59koVz.js} +28 -4
  40. package/dist/{provider-CeQciesl.js → provider-B1yLjCJJ.js} +194 -47
  41. package/dist/providers/github/store.d.ts +1 -1
  42. package/dist/providers/github/store.js +1 -361
  43. package/dist/publish.d.ts +1 -1
  44. package/dist/publish.js +2 -2
  45. package/dist/registry-D3yzt8HQ.js +127 -0
  46. package/dist/{registry-CoC9JxVt.d.ts → registry-Uj6IVxes.d.ts} +3 -3
  47. package/dist/{request-execution-C8qRcReq.js → request-execution-B-dSFlGB.js} +8 -4
  48. package/dist/runtime/assets.d.ts +1 -1
  49. package/dist/runtime/assets.js +4 -2
  50. package/dist/runtime/empty-assets-registry.d.ts +1 -1
  51. package/dist/runtime/empty-registry.d.ts +1 -1
  52. package/dist/runtime/state.d.ts +4 -4
  53. package/dist/runtime/state.js +10 -7
  54. package/dist/runtime/workspace.d.ts +1 -1
  55. package/dist/runtime/workspace.js +1 -1
  56. package/dist/runtime-options-BsPSv5O7.js +13 -0
  57. package/dist/runtime-type-iEE6BjQJ.js +34 -0
  58. package/dist/runtime.d.ts +42 -7
  59. package/dist/runtime.js +276 -100
  60. package/dist/{search-C4REyHj9.js → search-BpiCF2Tw.js} +2 -2
  61. package/dist/server.d.ts +2 -2
  62. package/dist/server.js +24 -51
  63. package/dist/{shared-BRycRSbo.js → shared-DTR1Hhma.js} +115 -39
  64. package/dist/source-metadata.d.ts +9 -2
  65. package/dist/source-metadata.js +34 -2
  66. package/dist/{state-DSAHEsq6.d.ts → state-tYcRWEh2.d.ts} +13 -12
  67. package/dist/store-Dt_Jyys3.js +608 -0
  68. package/dist/{sync-DO42ypji.js → sync-DnTQwt8r.js} +6 -5
  69. package/dist/test.d.ts +1 -1
  70. package/dist/test.js +1 -1
  71. package/dist/token-CVzURBxC.js +61 -0
  72. package/dist/{types-DHkae7Cb.d.ts → types-CYuwjJ4V.d.ts} +94 -43
  73. package/dist/{use-d_PlAdOu.js → use-BTNDR5Rd.js} +147 -50
  74. package/dist/{use-D16tf8Ph.d.ts → use-BiHzt0xA.d.ts} +21 -4
  75. package/dist/vite-BptCrpv2.js +4526 -0
  76. package/dist/vite-CtA9guIM.d.ts +66 -0
  77. package/dist/vite.d.ts +2 -50
  78. package/dist/vite.js +2 -2
  79. package/dist/{workspace-n4wBmdaM.js → workspace-Dq08Yn72.js} +224 -545
  80. package/dist/{workspace-f2DBLmPZ.d.ts → workspace-Xddf4G1B.d.ts} +1 -1
  81. package/package.json +20 -38
  82. package/dist/chunk-8H4AJuhK.js +0 -14
  83. package/dist/cli.d.ts +0 -31
  84. package/dist/cli.js +0 -303
  85. package/dist/cloudflare-env-CKxUs2fa.js +0 -20
  86. package/dist/glob-DeH0dzZX.js +0 -23
  87. package/dist/host-I-_vDs05.js +0 -370
  88. package/dist/lifecycle-Lhk3dAMt.js +0 -176
  89. package/dist/providers/cloudflare/artifacts-store.d.ts +0 -6
  90. package/dist/providers/cloudflare/artifacts-store.js +0 -2
  91. package/dist/providers/vercel/blob-store.d.ts +0 -6
  92. package/dist/providers/vercel/blob-store.js +0 -235
  93. package/dist/registry-C7DMdBXN.js +0 -74
  94. package/dist/utils-BPdaCyI6.js +0 -55
  95. package/dist/vite-NWC9mFjI.js +0 -1882
@@ -0,0 +1,66 @@
1
+ import { rt as WorkspaceModuleOptions } from "./types-CYuwjJ4V.js";
2
+ import { Plugin } from "vite";
3
+
4
+ //#region src/hosts/vite/plugin.d.ts
5
+ interface WorkspaceNitroConfigOptions {
6
+ aliases?: Record<string, string>;
7
+ command?: "build" | "serve";
8
+ env?: Record<string, string | undefined>;
9
+ hosting?: string;
10
+ nitro?: unknown;
11
+ viteRoot?: string;
12
+ workspace?: false | WorkspaceModuleOptions;
13
+ }
14
+ type NitroConfig = {
15
+ cloudflare?: {
16
+ wrangler?: {
17
+ artifacts?: Array<{
18
+ binding: string;
19
+ namespace: string;
20
+ }>;
21
+ compatibility_flags?: string[];
22
+ } & Record<string, unknown>;
23
+ } & Record<string, unknown>;
24
+ plugins?: unknown[];
25
+ rollupConfig?: {
26
+ external?: unknown;
27
+ } & Record<string, unknown>;
28
+ } & Record<string, unknown>;
29
+ declare function createWorkspaceNitroConfig(options?: WorkspaceNitroConfigOptions): Promise<NitroConfig | null>;
30
+ interface WorkspaceVitePluginAPI {
31
+ getWorkspaces: () => Array<{
32
+ name: string;
33
+ }>;
34
+ }
35
+ interface WorkspaceCliContributingPlugin {
36
+ vitehub?: {
37
+ cli?: () => unknown | Promise<unknown>;
38
+ };
39
+ }
40
+ declare const setWorkspacePluginHosting: unique symbol;
41
+ type WorkspacePluginHosting = string | (() => string | undefined);
42
+ type WorkspaceVitePlugin = Plugin & WorkspaceCliContributingPlugin & {
43
+ [setWorkspacePluginHosting]?: (hosting: WorkspacePluginHosting) => void;
44
+ api: WorkspaceVitePluginAPI;
45
+ };
46
+ declare function hubWorkspace(options?: WorkspaceModuleOptions): WorkspaceVitePlugin;
47
+ declare module "vite" {
48
+ interface UserConfig {
49
+ workspace?: false | WorkspaceModuleOptions;
50
+ }
51
+ }
52
+ //#endregion
53
+ //#region src/build/discovery.d.ts
54
+ interface DiscoveredWorkspaceDefinition {
55
+ handler: string;
56
+ name: string;
57
+ path: string;
58
+ source?: string;
59
+ sourceRootDir?: string;
60
+ }
61
+ declare function discoverViteWorkspaceDefinitions(rootDir: string, options?: {
62
+ serverDirs?: string[];
63
+ serverRootDir?: string;
64
+ }): DiscoveredWorkspaceDefinition[];
65
+ //#endregion
66
+ export { WorkspaceVitePlugin as a, hubWorkspace as c, WorkspaceNitroConfigOptions as i, discoverViteWorkspaceDefinitions as n, WorkspaceVitePluginAPI as o, NitroConfig as r, createWorkspaceNitroConfig as s, DiscoveredWorkspaceDefinition as t };
package/dist/vite.d.ts CHANGED
@@ -1,50 +1,2 @@
1
- import { nt as WorkspaceModuleOptions } from "./types-DHkae7Cb.js";
2
- import { Plugin } from "vite";
3
-
4
- //#region src/hosts/vite/plugin.d.ts
5
- interface WorkspaceNitroConfigOptions {
6
- aliases?: Record<string, string>;
7
- command?: "build" | "serve";
8
- env?: Record<string, string | undefined>;
9
- hosting?: string;
10
- nitro?: unknown;
11
- viteRoot?: string;
12
- workspace?: false | WorkspaceModuleOptions;
13
- }
14
- type NitroConfig = {
15
- cloudflare?: {
16
- wrangler?: {
17
- artifacts?: Array<{
18
- binding: string;
19
- namespace: string;
20
- }>;
21
- compatibility_flags?: string[];
22
- } & Record<string, unknown>;
23
- } & Record<string, unknown>;
24
- plugins?: unknown[];
25
- rollupConfig?: {
26
- external?: unknown;
27
- } & Record<string, unknown>;
28
- } & Record<string, unknown>;
29
- declare function createWorkspaceNitroConfig(options?: WorkspaceNitroConfigOptions): Promise<NitroConfig | null>;
30
- interface WorkspaceVitePluginAPI {
31
- getWorkspaces: () => Array<{
32
- name: string;
33
- }>;
34
- }
35
- interface WorkspaceCliContributingPlugin {
36
- vitehub?: {
37
- cli?: () => unknown | Promise<unknown>;
38
- };
39
- }
40
- type WorkspaceVitePlugin = Plugin & WorkspaceCliContributingPlugin & {
41
- api: WorkspaceVitePluginAPI;
42
- };
43
- declare function hubWorkspace(options?: WorkspaceModuleOptions): WorkspaceVitePlugin;
44
- declare module "vite" {
45
- interface UserConfig {
46
- workspace?: false | WorkspaceModuleOptions;
47
- }
48
- }
49
- //#endregion
50
- export { NitroConfig, WorkspaceNitroConfigOptions, WorkspaceVitePlugin, WorkspaceVitePluginAPI, createWorkspaceNitroConfig, hubWorkspace };
1
+ import { a as WorkspaceVitePlugin, c as hubWorkspace, i as WorkspaceNitroConfigOptions, n as discoverViteWorkspaceDefinitions, o as WorkspaceVitePluginAPI, r as NitroConfig, s as createWorkspaceNitroConfig, t as DiscoveredWorkspaceDefinition } from "./vite-CtA9guIM.js";
2
+ export { type DiscoveredWorkspaceDefinition, type NitroConfig, type WorkspaceNitroConfigOptions, type WorkspaceVitePlugin, type WorkspaceVitePluginAPI, createWorkspaceNitroConfig, discoverViteWorkspaceDefinitions, hubWorkspace };
package/dist/vite.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as hubWorkspace, t as createWorkspaceNitroConfig } from "./vite-NWC9mFjI.js";
2
- export { createWorkspaceNitroConfig, hubWorkspace };
1
+ import { i as discoverViteWorkspaceDefinitions, n as hubWorkspace, t as createWorkspaceNitroConfig } from "./vite-BptCrpv2.js";
2
+ export { createWorkspaceNitroConfig, discoverViteWorkspaceDefinitions, hubWorkspace };