@vite-hub/queue 0.0.0 → 0.0.2
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.
- package/README.md +89 -1
- package/dist/_app-D29AwUdD.d.ts +11 -0
- package/dist/app-BZpq2cwC.js +10 -0
- package/dist/client-CBDT9GL9.js +93 -0
- package/dist/cloudflare-GosJefIK.js +26 -0
- package/dist/cloudflare-client-w5vphoNn.js +99 -0
- package/dist/cloudflare-resource-name-R8zYQiZb.js +34 -0
- package/dist/cloudflare-vite-BNBVtEwG.js +92 -0
- package/dist/cloudflare-vite-krY8T3zM.d.ts +24 -0
- package/dist/config-B7xkD1v0.js +47 -0
- package/dist/delivery-error-glgYWC9g.js +45 -0
- package/dist/errors-CjuG_qr-.js +108 -0
- package/dist/index.d.ts +91 -0
- package/dist/index.js +28 -0
- package/dist/internal/runtime/cloudflare-client.d.ts +6 -0
- package/dist/internal/runtime/cloudflare-client.js +2 -0
- package/dist/internal/runtime/vercel-client.d.ts +6 -0
- package/dist/internal/runtime/vercel-client.js +114 -0
- package/dist/nuxt.d.ts +19 -0
- package/dist/nuxt.js +29 -0
- package/dist/runtime/cloudflare-vite.d.ts +2 -0
- package/dist/runtime/cloudflare-vite.js +2 -0
- package/dist/runtime/hosted.d.ts +11 -0
- package/dist/runtime/hosted.js +53 -0
- package/dist/runtime/state.d.ts +16 -0
- package/dist/runtime/state.js +2 -0
- package/dist/runtime/vercel-vite.d.ts +20 -0
- package/dist/runtime/vercel-vite.js +49 -0
- package/dist/state-BfUFGeC2.js +105 -0
- package/dist/types-CwvoMATy.d.ts +169 -0
- package/dist/vercel-C_4vqxcl.js +8 -0
- package/dist/vercel-runtime-package-copy-B8AEFWXT.js +66 -0
- package/dist/virtual.d.ts +4 -0
- package/dist/vite-C6yK76Sw.js +1823 -0
- package/dist/vite.d.ts +129 -0
- package/dist/vite.js +2 -0
- package/package.json +73 -5
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { m as QueueModuleOptions } from "./types-CwvoMATy.js";
|
|
2
|
+
import { Plugin } from "vite";
|
|
3
|
+
|
|
4
|
+
//#region ../internal/src/provision.d.ts
|
|
5
|
+
type ProvisionProvider = "cloudflare" | "vercel";
|
|
6
|
+
interface ProvisionLogger {
|
|
7
|
+
log: (message: string) => void;
|
|
8
|
+
warn: (message: string) => void;
|
|
9
|
+
}
|
|
10
|
+
interface ProvisionContext {
|
|
11
|
+
env: Record<string, string | undefined>;
|
|
12
|
+
fetch: typeof globalThis.fetch;
|
|
13
|
+
logger: ProvisionLogger;
|
|
14
|
+
}
|
|
15
|
+
interface ProvisionState {
|
|
16
|
+
cloudflare?: Record<string, Record<string, string>>;
|
|
17
|
+
vercel?: Record<string, Record<string, string>>;
|
|
18
|
+
}
|
|
19
|
+
interface ProvisionResult {
|
|
20
|
+
ids?: ProvisionState;
|
|
21
|
+
}
|
|
22
|
+
interface ProvisionAction {
|
|
23
|
+
kind: string;
|
|
24
|
+
name: string;
|
|
25
|
+
exists: boolean;
|
|
26
|
+
apply: () => Promise<ProvisionResult>;
|
|
27
|
+
}
|
|
28
|
+
interface ProvisionStep {
|
|
29
|
+
id: string;
|
|
30
|
+
provider: ProvisionProvider;
|
|
31
|
+
plan: (context: ProvisionContext) => Promise<ProvisionAction[]>;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region ../internal/src/cli.d.ts
|
|
35
|
+
interface ViteHubCliStreams {
|
|
36
|
+
stderr: {
|
|
37
|
+
write: (chunk: string | Uint8Array) => unknown;
|
|
38
|
+
};
|
|
39
|
+
stdout: {
|
|
40
|
+
write: (chunk: string | Uint8Array) => unknown;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
interface ViteHubCliSpawnResult {
|
|
44
|
+
exitCode: number | null;
|
|
45
|
+
signal?: NodeJS.Signals | null;
|
|
46
|
+
}
|
|
47
|
+
interface ViteHubCliSpawnOptions {
|
|
48
|
+
cwd?: string;
|
|
49
|
+
env?: NodeJS.ProcessEnv;
|
|
50
|
+
stderr?: "inherit" | "pipe";
|
|
51
|
+
stdout?: "inherit" | "pipe";
|
|
52
|
+
}
|
|
53
|
+
type ViteHubCliSpawn = (command: string, args: string[], options?: ViteHubCliSpawnOptions) => Promise<ViteHubCliSpawnResult>;
|
|
54
|
+
interface ViteHubCliContext extends ViteHubCliStreams {
|
|
55
|
+
cwd: string;
|
|
56
|
+
env: NodeJS.ProcessEnv;
|
|
57
|
+
rootDir: string;
|
|
58
|
+
spawn: ViteHubCliSpawn;
|
|
59
|
+
}
|
|
60
|
+
interface ViteHubCliFeature {
|
|
61
|
+
description?: string;
|
|
62
|
+
name: string;
|
|
63
|
+
run: (args: string[], context: ViteHubCliContext) => Promise<number | void> | number | void;
|
|
64
|
+
usage?: string;
|
|
65
|
+
}
|
|
66
|
+
interface ViteHubCliCommandNamespace {
|
|
67
|
+
description?: string;
|
|
68
|
+
features: ViteHubCliFeature[];
|
|
69
|
+
name: string;
|
|
70
|
+
}
|
|
71
|
+
interface ViteHubCliContributor {
|
|
72
|
+
namespaces: ViteHubCliCommandNamespace[];
|
|
73
|
+
provision?: ProvisionStep[];
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/internal/vite-build.d.ts
|
|
77
|
+
interface CloudflareQueueConfigOptions {
|
|
78
|
+
compatibilityDate?: string;
|
|
79
|
+
rootDir?: string;
|
|
80
|
+
}
|
|
81
|
+
interface CloudflareQueueConfig {
|
|
82
|
+
assets?: {
|
|
83
|
+
directory?: string;
|
|
84
|
+
run_worker_first: string[];
|
|
85
|
+
};
|
|
86
|
+
compatibility_date: string;
|
|
87
|
+
compatibility_flags: string[];
|
|
88
|
+
main: string;
|
|
89
|
+
name?: string;
|
|
90
|
+
observability: {
|
|
91
|
+
enabled: true;
|
|
92
|
+
};
|
|
93
|
+
queues?: {
|
|
94
|
+
consumers: Array<{
|
|
95
|
+
queue: string;
|
|
96
|
+
}>;
|
|
97
|
+
producers: Array<{
|
|
98
|
+
binding: string;
|
|
99
|
+
queue: string;
|
|
100
|
+
}>;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
declare function createCloudflareQueueConfig(options?: CloudflareQueueConfigOptions): Promise<CloudflareQueueConfig>;
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/vite.d.ts
|
|
106
|
+
interface QueueProvisionContributingPlugin {
|
|
107
|
+
vitehub?: {
|
|
108
|
+
cli?: () => Promise<ViteHubCliContributor>;
|
|
109
|
+
queue?: {
|
|
110
|
+
createNitroConfig: (options: QueueNitroConfigOptions) => Promise<Record<string, unknown>>;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
type QueueVitePlugin = Plugin & QueueProvisionContributingPlugin;
|
|
115
|
+
interface QueueNitroConfigOptions {
|
|
116
|
+
nitro: Record<string, unknown>;
|
|
117
|
+
projectRoot: string;
|
|
118
|
+
root: string;
|
|
119
|
+
serverDirs?: string[];
|
|
120
|
+
}
|
|
121
|
+
declare function createQueueNitroConfig(plugin: QueueVitePlugin, options: QueueNitroConfigOptions): Promise<Record<string, unknown>>;
|
|
122
|
+
declare function hubQueue(options?: QueueModuleOptions): QueueVitePlugin;
|
|
123
|
+
declare module "vite" {
|
|
124
|
+
interface UserConfig {
|
|
125
|
+
queue?: QueueModuleOptions;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
export { type CloudflareQueueConfig, type CloudflareQueueConfigOptions, QueueNitroConfigOptions, QueueVitePlugin, createCloudflareQueueConfig, createQueueNitroConfig, hubQueue };
|
package/dist/vite.js
ADDED
package/package.json
CHANGED
|
@@ -1,9 +1,77 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-hub/queue",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Queue primitives and Vite deployment integration for ViteHub.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cloudflare",
|
|
7
|
+
"h3",
|
|
8
|
+
"queue",
|
|
9
|
+
"vercel",
|
|
10
|
+
"vite",
|
|
11
|
+
"vitehub"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/vite-hub/vitehub#readme",
|
|
14
|
+
"bugs": "https://github.com/vite-hub/vitehub/issues",
|
|
5
15
|
"license": "Apache-2.0",
|
|
6
|
-
"
|
|
7
|
-
|
|
16
|
+
"author": "onmax <maximogarciamtnez@gmail.com>",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/vite-hub/vitehub.git",
|
|
20
|
+
"directory": "packages/queue"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"package.json"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": "./dist/index.js",
|
|
31
|
+
"./internal/runtime/cloudflare-client": "./dist/internal/runtime/cloudflare-client.js",
|
|
32
|
+
"./internal/runtime/vercel-client": "./dist/internal/runtime/vercel-client.js",
|
|
33
|
+
"./nuxt": "./dist/nuxt.js",
|
|
34
|
+
"./runtime/cloudflare-vite": "./dist/runtime/cloudflare-vite.js",
|
|
35
|
+
"./runtime/hosted": "./dist/runtime/hosted.js",
|
|
36
|
+
"./runtime/state": "./dist/runtime/state.js",
|
|
37
|
+
"./runtime/vercel-vite": "./dist/runtime/vercel-vite.js",
|
|
38
|
+
"./vite": "./dist/vite.js",
|
|
39
|
+
"./package.json": "./package.json"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@vercel/functions": "^3.7.5",
|
|
43
|
+
"@vercel/queue": "^0.0.0-alpha.40",
|
|
44
|
+
"defu": "^6.1.7",
|
|
45
|
+
"esbuild": "^0.27.7",
|
|
46
|
+
"h3": "2.0.1-rc.25",
|
|
47
|
+
"pathe": "^2.0.3",
|
|
48
|
+
"@vite-hub/runtime": "0.0.2"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^24.13.3",
|
|
52
|
+
"nuxt": "^4.4.8",
|
|
53
|
+
"publint": "^0.3.21",
|
|
54
|
+
"typescript": "^6.0.3",
|
|
55
|
+
"vite": "^8.0.8",
|
|
56
|
+
"vite-plus": "^0.1.24",
|
|
57
|
+
"vitest": "^4.1.4",
|
|
58
|
+
"@vite-hub/internal": "0.0.1"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"vite": ">=8.0.0"
|
|
62
|
+
},
|
|
63
|
+
"peerDependenciesMeta": {
|
|
64
|
+
"vite": {
|
|
65
|
+
"optional": true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"node": ">=24.0.0"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "vp pack",
|
|
73
|
+
"dev": "vp pack --watch",
|
|
74
|
+
"typecheck": "tsc --noEmit -p ./tsconfig.json",
|
|
75
|
+
"test": "vp run -t @vite-hub/queue#build && vp test"
|
|
8
76
|
}
|
|
9
|
-
}
|
|
77
|
+
}
|