@vitnode/node-cron 0.0.1-canary.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.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 aXenDev Maciej Balcerzak
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # (VitNode) Node-cron Adapter
2
+
3
+ This package provides the Node-cron adapter for VitNode, enabling cron job scheduling and management within your VitNode applications.
4
+
5
+ <p align="center">
6
+ <br>
7
+ <a href="https://vitnode.com/" target="_blank">
8
+ <picture>
9
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/VitNode/vitnode/canary/assets/logo/vitnode_logo_dark.svg">
10
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/VitNode/vitnode/canary/assets/logo/vitnode_logo_light.svg">
11
+ <img alt="VitNode Logo" src="https://raw.githubusercontent.com/VitNode/vitnode/canary/assets/logo/vitnode_logo_light.svg" width="400">
12
+ </picture>
13
+ </a>
14
+ <br>
15
+ <br>
16
+ </p>
17
+
18
+ | Cloud | Self-Hosted | Links | Documentation |
19
+ | ---------------- | ------------ | ------------------------------------------------------ | --------------------------------------------------- |
20
+ | ❌ Not Supported | ✅ Supported | [NPM Package](https://www.npmjs.com/package/node-cron) | [Docs](https://vitnode.com/docs/dev/cron/node-cron) |
@@ -0,0 +1,3 @@
1
+ import { type CronAdapter } from "@vitnode/core/api/lib/cron";
2
+ export declare const NodeCronAdapter: () => CronAdapter;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,4BAA4B,CAAC;AAG9E,eAAO,MAAM,eAAe,QAAO,WAQlC,CAAC"}
@@ -0,0 +1 @@
1
+ import{handleCronJobs}from"@vitnode/core/api/lib/cron";import{schedule}from"node-cron";export const NodeCronAdapter=()=>{return{schedule(){schedule("*/1 * * * *",async()=>{await handleCronJobs()})}}};
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@vitnode/node-cron",
3
+ "version": "0.0.1-canary.0",
4
+ "description": "Node-cron adapter for VitNode, enabling cron job scheduling and management.",
5
+ "author": "VitNode Team",
6
+ "license": "MIT",
7
+ "homepage": "https://vitnode.com",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/aXenDeveloper/vitnode.git",
11
+ "directory": "packages/node-cron"
12
+ },
13
+ "keywords": [
14
+ "vitnode",
15
+ "node-cron",
16
+ "cron",
17
+ "scheduler"
18
+ ],
19
+ "type": "module",
20
+ "exports": {
21
+ ".": {
22
+ "import": "./dist/src/index.js",
23
+ "types": "./dist/src/index.d.ts",
24
+ "default": "./dist/src/index.js"
25
+ }
26
+ },
27
+ "dependencies": {
28
+ "node-cron": "^4.6.0"
29
+ },
30
+ "devDependencies": {
31
+ "@swc/cli": "^0.8.1",
32
+ "@swc/core": "^1.15.46",
33
+ "eslint": "^10.7.0",
34
+ "tsc-alias": "^1.9.1",
35
+ "typescript": "^6.0.3",
36
+ "@vitnode/config": "0.0.1-canary.0",
37
+ "@vitnode/core": "0.0.1-canary.0"
38
+ },
39
+ "scripts": {
40
+ "build:plugins": "vitnode build",
41
+ "dev:plugins": "vitnode dev",
42
+ "lint": "eslint .",
43
+ "lint:fix": "eslint . --fix"
44
+ }
45
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./tsconfig.json",
4
+ "exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
5
+ }