@vite-hub/schedule 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.
|
@@ -127,7 +127,7 @@ interface ViteHubConsoleOperationAction {
|
|
|
127
127
|
operation: string;
|
|
128
128
|
input: Readonly<Record<string, string>>;
|
|
129
129
|
/**
|
|
130
|
-
* The result is `{ url }`, such as a
|
|
130
|
+
* The result is `{ url }`, such as a provider sign-in: the Console opens it in a new tab, and loads
|
|
131
131
|
* the list again when the person comes back. The URL must be `https:`, or `http:` on a loopback host.
|
|
132
132
|
*/
|
|
133
133
|
tab?: true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ViteHubConsoleRecord } from "../console-
|
|
1
|
+
import { t as ViteHubConsoleRecord } from "../console-BdlDJUfS.js";
|
|
2
2
|
/** The Cron column of the Console: the cron, with the time zone when it is not UTC. */
|
|
3
3
|
export declare function scheduleConsoleTiming(cron: string, timeZone: string): string;
|
|
4
4
|
/**
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ViteHubInspectionPluginMetadata, n as ViteHubConsoleRuntimeRecordTableSection, r as ViteHubDefinitionSummary } from "./console-
|
|
1
|
+
import { i as ViteHubInspectionPluginMetadata, n as ViteHubConsoleRuntimeRecordTableSection, r as ViteHubDefinitionSummary } from "./console-BdlDJUfS.js";
|
|
2
2
|
import { n as OperationContributionEntry } from "./operation-definition-CqZkx1Rm.js";
|
|
3
3
|
import { t as DiscoveredScheduleDefinition } from "./types-DTVPVY5O.js";
|
|
4
4
|
/** The host that ViteHub builds for: the `host` option of `vitehub()` and the value of `VITEHUB_HOST`. */
|
package/dist/vite.js
CHANGED
|
@@ -410,7 +410,11 @@ function encodeProviderOutputAliases(configAliases) {
|
|
|
410
410
|
/** Select the runtime constants from one resolved Vite configuration. */
|
|
411
411
|
function resolveViteHubBundleDefines(config) {
|
|
412
412
|
const defines = {};
|
|
413
|
-
for (const name of [
|
|
413
|
+
for (const name of [
|
|
414
|
+
"__VITEHUB_PUBLIC_URL__",
|
|
415
|
+
"__VITEHUB_APP_BASE_URL__",
|
|
416
|
+
"__VITEHUB_CONSOLE_URL__"
|
|
417
|
+
]) {
|
|
414
418
|
const value = config.define?.[name];
|
|
415
419
|
if (typeof value === "string") defines[name] = value;
|
|
416
420
|
}
|
|
@@ -805,20 +809,20 @@ function createFileUrlPlugin() {
|
|
|
805
809
|
}
|
|
806
810
|
};
|
|
807
811
|
}
|
|
808
|
-
/**
|
|
809
|
-
* Copies a `.wasm?module` import next to the bundle and keeps it as a relative `.wasm` import. Wrangler and Nitro load
|
|
810
|
-
* such an import as a compiled WebAssembly module, which Workers need because they can't compile WebAssembly bytes.
|
|
811
|
-
* Node.js compiles WebAssembly bytes, so there the import becomes the bytes of the file.
|
|
812
|
-
*/
|
|
813
812
|
function createWasmModulePlugin(outdir, workingDir, copy) {
|
|
814
813
|
return {
|
|
815
814
|
name: "vitehub-wasm-module",
|
|
816
815
|
async resolveId(source, importer, extra) {
|
|
817
|
-
|
|
818
|
-
|
|
816
|
+
const explicitModule = source.endsWith(".wasm?module");
|
|
817
|
+
if (!explicitModule && (!copy || !source.endsWith(".wasm") || extra.custom?.[skipMarkdownTemplateResolve])) return;
|
|
818
|
+
const path = explicitModule ? source.slice(0, -7) : source;
|
|
819
|
+
const resolved = await this.resolve(path, importerFor(importer, workingDir), {
|
|
819
820
|
custom: extra.custom,
|
|
820
|
-
|
|
821
|
+
isEntry: extra.isEntry,
|
|
822
|
+
kind: extra.kind,
|
|
823
|
+
skipSelf: true
|
|
821
824
|
});
|
|
825
|
+
if (!explicitModule && (!isFileResolution(resolved) || !resolved.id.endsWith(".wasm"))) return resolved ?? void 0;
|
|
822
826
|
if (!isFileResolution(resolved)) this.error(`[vitehub] Could not resolve ${JSON.stringify(source)}.`);
|
|
823
827
|
if (!copy) return resolved.id;
|
|
824
828
|
const bytes = await readFile(resolved.id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-hub/schedule",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Schedule primitives and definition discovery for ViteHub.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@valibot/to-json-schema": "^1.8.0",
|
|
78
|
-
"@vite-hub/runtime": "0.
|
|
78
|
+
"@vite-hub/runtime": "0.6.0",
|
|
79
79
|
"cron-schedule": "^8.0.1",
|
|
80
80
|
"nostics": "1.4.0",
|
|
81
81
|
"valibot": "^1.5.0"
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/node": "^24.19.2",
|
|
85
85
|
"@vite-hub/internal": "0.0.1",
|
|
86
|
-
"@vite-hub/kv": "0.
|
|
86
|
+
"@vite-hub/kv": "0.6.0",
|
|
87
87
|
"esbuild": "^0.28.2",
|
|
88
88
|
"postgres": "^3.4.9",
|
|
89
89
|
"publint": "^0.3.25",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"vitest": "5.1.0"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
|
-
"@vite-hub/kv": "0.
|
|
96
|
+
"@vite-hub/kv": "0.6.0",
|
|
97
97
|
"vite": ">=8.0.0"
|
|
98
98
|
},
|
|
99
99
|
"peerDependenciesMeta": {
|