summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/Cargo.toml2
-rw-r--r--runtime/build.rs3
-rw-r--r--runtime/js/90_deno_ns.js2
-rw-r--r--runtime/lib.rs1
-rw-r--r--runtime/web_worker.rs2
-rw-r--r--runtime/worker.rs2
6 files changed, 12 insertions, 0 deletions
diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml
index 4634d758a..7c60fd4a8 100644
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -44,6 +44,7 @@ deno_broadcast_channel.workspace = true
deno_cache.workspace = true
deno_console.workspace = true
deno_core.workspace = true
+deno_cron.workspace = true
deno_crypto.workspace = true
deno_fetch.workspace = true
deno_ffi.workspace = true
@@ -71,6 +72,7 @@ deno_broadcast_channel.workspace = true
deno_cache.workspace = true
deno_console.workspace = true
deno_core.workspace = true
+deno_cron.workspace = true
deno_crypto.workspace = true
deno_fetch.workspace = true
deno_ffi.workspace = true
diff --git a/runtime/build.rs b/runtime/build.rs
index ce1896e6f..2c6f0a4d8 100644
--- a/runtime/build.rs
+++ b/runtime/build.rs
@@ -223,6 +223,9 @@ mod startup_snapshot {
deno_kv::deno_kv::init_ops_and_esm(deno_kv::sqlite::SqliteDbHandler::<
Permissions,
>::new(None, None)),
+ deno_cron::deno_cron::init_ops_and_esm(
+ deno_cron::local::LocalCronHandler::new(),
+ ),
deno_napi::deno_napi::init_ops_and_esm::<Permissions>(),
deno_http::deno_http::init_ops_and_esm::<DefaultHttpPropertyExtractor>(),
deno_io::deno_io::init_ops_and_esm(Default::default()),
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index 5364a60ee..c44c14bbe 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -24,6 +24,7 @@ import * as tty from "ext:runtime/40_tty.js";
// TODO(bartlomieju): this is funky we have two `http` imports
import * as httpRuntime from "ext:runtime/40_http.js";
import * as kv from "ext:deno_kv/01_db.ts";
+import * as cron from "ext:deno_cron/01_cron.ts";
const denoNs = {
metrics: core.metrics,
@@ -179,6 +180,7 @@ const denoNsUnstable = {
Kv: kv.Kv,
KvU64: kv.KvU64,
KvListIterator: kv.KvListIterator,
+ cron: cron.cron,
};
export { denoNs, denoNsUnstable };
diff --git a/runtime/lib.rs b/runtime/lib.rs
index bc49a2fef..c49446375 100644
--- a/runtime/lib.rs
+++ b/runtime/lib.rs
@@ -4,6 +4,7 @@ pub use deno_broadcast_channel;
pub use deno_cache;
pub use deno_console;
pub use deno_core;
+pub use deno_cron;
pub use deno_crypto;
pub use deno_fetch;
pub use deno_ffi;
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index de69ce43b..5c42d752f 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -36,6 +36,7 @@ use deno_core::RuntimeOptions;
use deno_core::SharedArrayBufferStore;
use deno_core::Snapshot;
use deno_core::SourceMapGetter;
+use deno_cron::local::LocalCronHandler;
use deno_fs::FileSystem;
use deno_http::DefaultHttpPropertyExtractor;
use deno_io::Stdio;
@@ -450,6 +451,7 @@ impl WebWorker {
},
),
),
+ deno_cron::deno_cron::init_ops_and_esm(LocalCronHandler::new()),
deno_napi::deno_napi::init_ops_and_esm::<PermissionsContainer>(),
deno_http::deno_http::init_ops_and_esm::<DefaultHttpPropertyExtractor>(),
deno_io::deno_io::init_ops_and_esm(Some(options.stdio)),
diff --git a/runtime/worker.rs b/runtime/worker.rs
index f0fc25aa2..2e2910109 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -31,6 +31,7 @@ use deno_core::RuntimeOptions;
use deno_core::SharedArrayBufferStore;
use deno_core::Snapshot;
use deno_core::SourceMapGetter;
+use deno_cron::local::LocalCronHandler;
use deno_fs::FileSystem;
use deno_http::DefaultHttpPropertyExtractor;
use deno_io::Stdio;
@@ -273,6 +274,7 @@ impl MainWorker {
},
),
),
+ deno_cron::deno_cron::init_ops_and_esm(LocalCronHandler::new()),
deno_napi::deno_napi::init_ops_and_esm::<PermissionsContainer>(),
deno_http::deno_http::init_ops_and_esm::<DefaultHttpPropertyExtractor>(),
deno_io::deno_io::init_ops_and_esm(Some(options.stdio)),