@stacksjs/actions 0.70.95 → 0.70.97
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/dist/dev/api.js +2 -1
- package/dist/helpers/utils.d.ts +1 -0
- package/dist/helpers/utils.js +4 -1
- package/package.json +16 -16
package/dist/dev/api.js
CHANGED
|
@@ -4,8 +4,9 @@ import { parseOptions } from "@stacksjs/cli";
|
|
|
4
4
|
import { config, overridesReady } from "@stacksjs/config";
|
|
5
5
|
import { path } from "@stacksjs/path";
|
|
6
6
|
import { route } from "@stacksjs/router";
|
|
7
|
-
import { generateAutoImportFiles, injectGlobalAutoImports } from "@stacksjs/server";
|
|
7
|
+
import { generateAutoImportFiles, generateServerAutoImportTypes, injectGlobalAutoImports } from "@stacksjs/server";
|
|
8
8
|
const _options = parseOptions();
|
|
9
|
+
await generateServerAutoImportTypes();
|
|
9
10
|
await overridesReady;
|
|
10
11
|
const port = Number(process.env.PORT_API) || config.ports?.api || 3008, modelsIndex = path.storagePath("framework/auto-imports/models.ts");
|
|
11
12
|
if (!existsSync(modelsIndex))
|
package/dist/helpers/utils.d.ts
CHANGED
package/dist/helpers/utils.js
CHANGED
|
@@ -6,6 +6,9 @@ import { buddyOptions, runCommand, runCommands } from "@stacksjs/cli";
|
|
|
6
6
|
import { err } from "@stacksjs/error-handling";
|
|
7
7
|
import { log } from "@stacksjs/logging";
|
|
8
8
|
import * as p from "@stacksjs/path";
|
|
9
|
+
export function developmentConditionForProject(projectRoot) {
|
|
10
|
+
return existsSync(join(projectRoot, "storage/framework/core")) && existsSync(join(projectRoot, "node_modules/@stacksjs/env/src/index.ts")) ? "--conditions development" : "";
|
|
11
|
+
}
|
|
9
12
|
async function resolveActionFile(action) {
|
|
10
13
|
const candidates = [];
|
|
11
14
|
candidates.push(p.actionsPath(`src/${action}.ts`));
|
|
@@ -67,7 +70,7 @@ export async function runAction(action, options) {
|
|
|
67
70
|
if (!path)
|
|
68
71
|
return err(`Action '${action}' not found in storage/framework/core/actions/src or @stacksjs/actions`);
|
|
69
72
|
log.debug(`[action] Resolved: ${action} \u2192 ${path}`);
|
|
70
|
-
const isDevAction = action.startsWith("dev/"), watchFlag = isDevAction ? "--watch" : "", opts = isDevAction ? "" : buddyOptions(options) || "", cmd =
|
|
73
|
+
const isDevAction = action.startsWith("dev/"), watchFlag = isDevAction ? "--watch" : "", developmentCondition = developmentConditionForProject(p.projectPath()), opts = isDevAction ? "" : buddyOptions(options) || "", cmd = ["bun", developmentCondition, watchFlag, path, opts].filter(Boolean).join(" "), pantryNodePath = p.projectPath("pantry"), existingNodePath = process.env.NODE_PATH, nodePath = existingNodePath ? `${pantryNodePath}:${existingNodePath}` : pantryNodePath, shouldInherit = options?.verbose || isDevAction && !options?.quiet, optionsWithCwd = {
|
|
71
74
|
cwd: options?.cwd || p.projectPath(),
|
|
72
75
|
...options,
|
|
73
76
|
stdout: shouldInherit ? "inherit" : void 0,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/actions",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.97",
|
|
6
6
|
"description": "The Stacks actions.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -69,23 +69,23 @@
|
|
|
69
69
|
"@stacksjs/ts-md": "^0.1.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@stacksjs/api": "0.70.
|
|
73
|
-
"@stacksjs/cli": "0.70.
|
|
74
|
-
"@stacksjs/config": "0.70.
|
|
75
|
-
"@stacksjs/database": "0.70.
|
|
72
|
+
"@stacksjs/api": "0.70.97",
|
|
73
|
+
"@stacksjs/cli": "0.70.97",
|
|
74
|
+
"@stacksjs/config": "0.70.97",
|
|
75
|
+
"@stacksjs/database": "0.70.97",
|
|
76
76
|
"@stacksjs/tlsx": "^0.13.2",
|
|
77
77
|
"better-dx": "^0.2.16",
|
|
78
|
-
"@stacksjs/dns": "0.70.
|
|
79
|
-
"@stacksjs/enums": "0.70.
|
|
80
|
-
"@stacksjs/env": "0.70.
|
|
81
|
-
"@stacksjs/error-handling": "0.70.
|
|
82
|
-
"@stacksjs/logging": "0.70.
|
|
83
|
-
"@stacksjs/path": "0.70.
|
|
84
|
-
"@stacksjs/security": "0.70.
|
|
85
|
-
"@stacksjs/storage": "0.70.
|
|
86
|
-
"@stacksjs/strings": "0.70.
|
|
87
|
-
"@stacksjs/utils": "0.70.
|
|
88
|
-
"@stacksjs/validation": "0.70.
|
|
78
|
+
"@stacksjs/dns": "0.70.97",
|
|
79
|
+
"@stacksjs/enums": "0.70.97",
|
|
80
|
+
"@stacksjs/env": "0.70.97",
|
|
81
|
+
"@stacksjs/error-handling": "0.70.97",
|
|
82
|
+
"@stacksjs/logging": "0.70.97",
|
|
83
|
+
"@stacksjs/path": "0.70.97",
|
|
84
|
+
"@stacksjs/security": "0.70.97",
|
|
85
|
+
"@stacksjs/storage": "0.70.97",
|
|
86
|
+
"@stacksjs/strings": "0.70.97",
|
|
87
|
+
"@stacksjs/utils": "0.70.97",
|
|
88
|
+
"@stacksjs/validation": "0.70.97"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"pickier": "^0.1.28"
|