@stacksjs/actions 0.75.35 → 0.75.37

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.
@@ -1 +1 @@
1
- import process from"node:process";import{log}from"@stacksjs/logging";import{startProcessor,stopProcessor}from"@stacksjs/queue";process.on("unhandledRejection",(reason)=>{log.error(`Unhandled Rejection in queue worker: ${reason}`)});process.on("uncaughtException",(error)=>{log.error(`Uncaught Exception in queue worker: ${error.message}`)});const SHUTDOWN_GRACE_MS=Number(process.env.STACKS_QUEUE_SHUTDOWN_GRACE_MS)||1e4;let shuttingDown=!1;async function gracefulShutdown(signal){if(shuttingDown)return;shuttingDown=!0;log.info(`[queue] Worker received ${signal}, draining in-flight jobs (max ${SHUTDOWN_GRACE_MS/1000}s)\u2026`);setTimeout(()=>{console.error("[queue] Drain window exceeded - forcing worker exit.");process.exit(1)},SHUTDOWN_GRACE_MS+2000).unref();try{await stopProcessor({graceMs:SHUTDOWN_GRACE_MS})}catch(error){await log.error("[queue] Error while draining worker on shutdown:",error)}process.exit(0)}process.on("SIGTERM",()=>{gracefulShutdown("SIGTERM")});process.on("SIGINT",()=>{gracefulShutdown("SIGINT")});const options=parseArgs(),queue=options.queue,concurrency=Number(options.concurrency)||1;log.info(`Starting queue worker with ${concurrency} concurrent worker(s)...`);const result=await startProcessor(queue,{concurrency});if(result.isErr){await log.error("Failed to start queue worker:",result.error);process.exit(1)}log.success("Queue worker started successfully!");await new Promise(()=>{});function parseArgs(){const args={},argv=process.argv;for(let index=0;index<argv.length;index++){const arg=argv[index];if(!arg?.startsWith("--"))continue;const[key,inline]=arg.slice(2).split("=");if(!key)continue;if(inline!==void 0){args[key]=inline;continue}const next=argv[index+1];if(next!==void 0&&!next.startsWith("-")){args[key]=next;index++;continue}args[key]="true"}return args}
1
+ import process from"node:process";import{log}from"@stacksjs/logging";import{startProcessor,stopProcessor}from"@stacksjs/queue";import{injectGlobalAutoImports}from"@stacksjs/server";process.on("unhandledRejection",(reason)=>{log.error(`Unhandled Rejection in queue worker: ${reason}`)});process.on("uncaughtException",(error)=>{log.error(`Uncaught Exception in queue worker: ${error.message}`)});const SHUTDOWN_GRACE_MS=Number(process.env.STACKS_QUEUE_SHUTDOWN_GRACE_MS)||1e4;let shuttingDown=!1;async function gracefulShutdown(signal){if(shuttingDown)return;shuttingDown=!0;log.info(`[queue] Worker received ${signal}, draining in-flight jobs (max ${SHUTDOWN_GRACE_MS/1000}s)\u2026`);setTimeout(()=>{console.error("[queue] Drain window exceeded - forcing worker exit.");process.exit(1)},SHUTDOWN_GRACE_MS+2000).unref();try{await stopProcessor({graceMs:SHUTDOWN_GRACE_MS})}catch(error){await log.error("[queue] Error while draining worker on shutdown:",error)}process.exit(0)}process.on("SIGTERM",()=>{gracefulShutdown("SIGTERM")});process.on("SIGINT",()=>{gracefulShutdown("SIGINT")});const options=parseArgs(),queue=options.queue,concurrency=Number(options.concurrency)||1;await injectGlobalAutoImports();log.info(`Starting queue worker with ${concurrency} concurrent worker(s)...`);const result=await startProcessor(queue,{concurrency});if(result.isErr){await log.error("Failed to start queue worker:",result.error);process.exit(1)}log.success("Queue worker started successfully!");await new Promise(()=>{});function parseArgs(){const args={},argv=process.argv;for(let index=0;index<argv.length;index++){const arg=argv[index];if(!arg?.startsWith("--"))continue;const[key,inline]=arg.slice(2).split("=");if(!key)continue;if(inline!==void 0){args[key]=inline;continue}const next=argv[index+1];if(next!==void 0&&!next.startsWith("-")){args[key]=next;index++;continue}args[key]="true"}return args}
@@ -1 +1 @@
1
- import{log}from"@stacksjs/logging";import{runScheduler}from"@stacksjs/scheduler";const result=await runScheduler();if(result?.isErr){console.error(result.error);log.error("Schedule run failed",result.error)}
1
+ import{log}from"@stacksjs/logging";import{runScheduler}from"@stacksjs/scheduler";import{injectGlobalAutoImports}from"@stacksjs/server";await injectGlobalAutoImports();const result=await runScheduler();if(result?.isErr){console.error(result.error);log.error("Schedule run failed",result.error)}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.35",
5
+ "version": "0.75.37",
6
6
  "description": "The Stacks actions.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -60,52 +60,52 @@
60
60
  "prepublishOnly": "bun run build"
61
61
  },
62
62
  "dependencies": {
63
- "@stacksjs/action-runner": "0.75.35",
64
- "@stacksjs/ai": "0.75.35",
65
- "@stacksjs/analytics": "0.75.35",
66
- "@stacksjs/api": "0.75.35",
67
- "@stacksjs/auth": "0.75.35",
68
- "@stacksjs/build": "0.75.35",
63
+ "@stacksjs/action-runner": "0.75.37",
64
+ "@stacksjs/ai": "0.75.37",
65
+ "@stacksjs/analytics": "0.75.37",
66
+ "@stacksjs/api": "0.75.37",
67
+ "@stacksjs/auth": "0.75.37",
68
+ "@stacksjs/build": "0.75.37",
69
69
  "@stacksjs/bumpx": "^0.2.6",
70
70
  "@stacksjs/bunpress": "^0.2.8",
71
- "@stacksjs/cli": "0.75.35",
72
- "@stacksjs/cloud": "0.75.35",
73
- "@stacksjs/cms": "0.75.35",
71
+ "@stacksjs/cli": "0.75.37",
72
+ "@stacksjs/cloud": "0.75.37",
73
+ "@stacksjs/cms": "0.75.37",
74
74
  "@stacksjs/components": "^0.2.343",
75
- "@stacksjs/config": "0.75.35",
76
- "@stacksjs/database": "0.75.35",
77
- "@stacksjs/desktop-build": "0.75.35",
78
- "@stacksjs/dns": "0.75.35",
79
- "@stacksjs/enums": "0.75.35",
80
- "@stacksjs/env": "0.75.35",
81
- "@stacksjs/error-handling": "0.75.35",
75
+ "@stacksjs/config": "0.75.37",
76
+ "@stacksjs/database": "0.75.37",
77
+ "@stacksjs/desktop-build": "0.75.37",
78
+ "@stacksjs/dns": "0.75.37",
79
+ "@stacksjs/enums": "0.75.37",
80
+ "@stacksjs/env": "0.75.37",
81
+ "@stacksjs/error-handling": "0.75.37",
82
82
  "@stacksjs/gitit": "^0.2.5",
83
- "@stacksjs/i18n": "0.75.35",
84
- "@stacksjs/image": "0.75.35",
85
- "@stacksjs/logging": "0.75.35",
83
+ "@stacksjs/i18n": "0.75.37",
84
+ "@stacksjs/image": "0.75.37",
85
+ "@stacksjs/logging": "0.75.37",
86
86
  "@stacksjs/logsmith": "^0.2.3",
87
- "@stacksjs/orm": "0.75.35",
88
- "@stacksjs/path": "0.75.35",
89
- "@stacksjs/payments": "0.75.35",
90
- "@stacksjs/queue": "0.75.35",
91
- "@stacksjs/registry": "0.75.35",
92
- "@stacksjs/router": "0.75.35",
87
+ "@stacksjs/orm": "0.75.37",
88
+ "@stacksjs/path": "0.75.37",
89
+ "@stacksjs/payments": "0.75.37",
90
+ "@stacksjs/queue": "0.75.37",
91
+ "@stacksjs/registry": "0.75.37",
92
+ "@stacksjs/router": "0.75.37",
93
93
  "@stacksjs/rpx": "^0.11.54",
94
- "@stacksjs/scheduler": "0.75.35",
95
- "@stacksjs/search-engine": "0.75.35",
96
- "@stacksjs/security": "0.75.35",
97
- "@stacksjs/server": "0.75.35",
98
- "@stacksjs/sites": "0.75.35",
99
- "@stacksjs/storage": "0.75.35",
100
- "@stacksjs/strings": "0.75.35",
94
+ "@stacksjs/scheduler": "0.75.37",
95
+ "@stacksjs/search-engine": "0.75.37",
96
+ "@stacksjs/security": "0.75.37",
97
+ "@stacksjs/server": "0.75.37",
98
+ "@stacksjs/sites": "0.75.37",
99
+ "@stacksjs/storage": "0.75.37",
100
+ "@stacksjs/strings": "0.75.37",
101
101
  "@stacksjs/stx": "^0.2.343",
102
102
  "@stacksjs/tlsx": "^0.13.19",
103
103
  "@stacksjs/ts-cloud": "^0.16.15",
104
104
  "@stacksjs/ts-md": "^0.1.1",
105
- "@stacksjs/tunnel": "0.75.35",
106
- "@stacksjs/types": "0.75.35",
107
- "@stacksjs/utils": "0.75.35",
108
- "@stacksjs/whois": "0.75.35",
105
+ "@stacksjs/tunnel": "0.75.37",
106
+ "@stacksjs/types": "0.75.37",
107
+ "@stacksjs/utils": "0.75.37",
108
+ "@stacksjs/whois": "0.75.37",
109
109
  "bun-plugin-stx": "^0.2.343"
110
110
  },
111
111
  "peerDependencies": {
@@ -121,7 +121,7 @@
121
121
  }
122
122
  },
123
123
  "devDependencies": {
124
- "@stacksjs/validation": "0.75.35",
124
+ "@stacksjs/validation": "0.75.37",
125
125
  "better-dx": "^0.2.24"
126
126
  }
127
127
  }