@workflow/cli 4.0.1-beta.44 → 4.0.1-beta.46

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.
Files changed (2) hide show
  1. package/bin/run.js +21 -0
  2. package/package.json +9 -8
package/bin/run.js CHANGED
@@ -1,5 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { existsSync } from 'node:fs';
4
+ import { resolve } from 'node:path';
3
5
  import { execute } from '@oclif/core';
6
+ import { config } from 'dotenv';
7
+
8
+ // Load .env file if it exists
9
+ const envPath = resolve(process.cwd(), '.env');
10
+ if (existsSync(envPath)) {
11
+ const envResult = config({ path: envPath });
12
+ if (envResult.error && envResult.error.code !== 'ENOENT') {
13
+ console.warn(`Warning: Failed to load .env file: ${envResult.error.message}`);
14
+ }
15
+ }
16
+
17
+ // Load .env.local file if it exists (overrides .env)
18
+ const envLocalPath = resolve(process.cwd(), '.env.local');
19
+ if (existsSync(envLocalPath)) {
20
+ const envLocalResult = config({ path: envLocalPath, override: true });
21
+ if (envLocalResult.error && envLocalResult.error.code !== 'ENOENT') {
22
+ console.warn(`Warning: Failed to load .env.local file: ${envLocalResult.error.message}`);
23
+ }
24
+ }
4
25
 
5
26
  await execute({ type: 'esm', development: false, dir: import.meta.url });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workflow/cli",
3
- "version": "4.0.1-beta.44",
3
+ "version": "4.0.1-beta.46",
4
4
  "description": "Command-line interface for Workflow DevKit",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,6 +42,7 @@
42
42
  "chalk": "5.6.2",
43
43
  "chokidar": "4.0.3",
44
44
  "date-fns": "4.1.0",
45
+ "dotenv": "^16.4.7",
45
46
  "easy-table": "1.2.0",
46
47
  "enhanced-resolve": "5.18.2",
47
48
  "esbuild": "^0.25.11",
@@ -53,15 +54,15 @@
53
54
  "tinyglobby": "0.2.14",
54
55
  "xdg-app-paths": "5.1.0",
55
56
  "zod": "4.1.11",
56
- "@workflow/builders": "4.0.1-beta.36",
57
- "@workflow/swc-plugin": "4.0.1-beta.12",
57
+ "@workflow/builders": "4.0.1-beta.38",
58
+ "@workflow/swc-plugin": "4.0.1-beta.13",
58
59
  "@workflow/utils": "4.0.1-beta.10",
59
60
  "@workflow/errors": "4.0.1-beta.13",
60
- "@workflow/core": "4.0.1-beta.36",
61
- "@workflow/web": "4.0.1-beta.26",
62
- "@workflow/world": "4.0.1-beta.12",
63
- "@workflow/world-local": "4.0.1-beta.25",
64
- "@workflow/world-vercel": "4.0.1-beta.26"
61
+ "@workflow/core": "4.0.1-beta.38",
62
+ "@workflow/web": "4.0.1-beta.27",
63
+ "@workflow/world": "4.0.1-beta.13",
64
+ "@workflow/world-local": "4.0.1-beta.26",
65
+ "@workflow/world-vercel": "4.0.1-beta.27"
65
66
  },
66
67
  "scripts": {
67
68
  "build": "tsc && chmod +x bin/run.js",