@lark-apaas/fullstack-cli 1.1.46 → 1.1.47-alpha.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/dist/index.js +19 -1
- package/package.json +1 -1
- package/templates/scripts/dev.js +0 -11
package/dist/index.js
CHANGED
|
@@ -2612,6 +2612,19 @@ async function run2(options) {
|
|
|
2612
2612
|
console.log("[fullstack-cli] Skip syncing (not a valid npm project)");
|
|
2613
2613
|
process.exit(0);
|
|
2614
2614
|
}
|
|
2615
|
+
const sparkMetaPath = path5.join(userProjectRoot, ".spark", "meta.json");
|
|
2616
|
+
if (fs7.existsSync(sparkMetaPath)) {
|
|
2617
|
+
try {
|
|
2618
|
+
const meta = JSON.parse(fs7.readFileSync(sparkMetaPath, "utf-8"));
|
|
2619
|
+
if (Number(meta.archType) === 2) {
|
|
2620
|
+
console.log("[fullstack-cli] Skip syncing (.spark/meta.json archType=2)");
|
|
2621
|
+
process.exit(0);
|
|
2622
|
+
}
|
|
2623
|
+
} catch (error) {
|
|
2624
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2625
|
+
console.warn(`[fullstack-cli] \u26A0 Failed to read .spark/meta.json, fallback to default sync: ${message}`);
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2615
2628
|
try {
|
|
2616
2629
|
console.log("[fullstack-cli] Starting sync...");
|
|
2617
2630
|
const config = genSyncConfig({
|
|
@@ -4454,10 +4467,15 @@ import fs15 from "fs";
|
|
|
4454
4467
|
import { createRequire as createRequire2 } from "module";
|
|
4455
4468
|
import path13 from "path";
|
|
4456
4469
|
var CAPABILITIES_DIR = "server/capabilities";
|
|
4470
|
+
var SHARED_CAPABILITIES_DIR = "shared/capabilities";
|
|
4457
4471
|
function getProjectRoot2() {
|
|
4458
4472
|
return process.cwd();
|
|
4459
4473
|
}
|
|
4460
4474
|
function getCapabilitiesDir() {
|
|
4475
|
+
const sharedDir = path13.join(getProjectRoot2(), SHARED_CAPABILITIES_DIR);
|
|
4476
|
+
if (fs15.existsSync(sharedDir)) {
|
|
4477
|
+
return sharedDir;
|
|
4478
|
+
}
|
|
4461
4479
|
return path13.join(getProjectRoot2(), CAPABILITIES_DIR);
|
|
4462
4480
|
}
|
|
4463
4481
|
function getCapabilityPath(id) {
|
|
@@ -4632,7 +4650,7 @@ function logError(message) {
|
|
|
4632
4650
|
async function list2(options) {
|
|
4633
4651
|
try {
|
|
4634
4652
|
if (!capabilitiesDirExists()) {
|
|
4635
|
-
logError("
|
|
4653
|
+
logError("capabilities directory not found (looked for shared/capabilities and server/capabilities)");
|
|
4636
4654
|
process.exit(1);
|
|
4637
4655
|
}
|
|
4638
4656
|
if (options.id) {
|
package/package.json
CHANGED
package/templates/scripts/dev.js
CHANGED
|
@@ -239,21 +239,10 @@ process.on('SIGTERM', cleanup);
|
|
|
239
239
|
process.on('SIGINT', cleanup);
|
|
240
240
|
process.on('SIGHUP', cleanup);
|
|
241
241
|
|
|
242
|
-
// Stale dist makes nest --watch skip missing files; watcher won't self-heal.
|
|
243
|
-
function cleanStaleDist() {
|
|
244
|
-
const distPath = path.join(PROJECT_ROOT, 'dist');
|
|
245
|
-
if (fs.existsSync(distPath)) {
|
|
246
|
-
fs.rmSync(distPath, { recursive: true, force: true });
|
|
247
|
-
logEvent('INFO', 'main', 'Cleaned dist/ to force full rebuild');
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
242
|
// ── Main ──────────────────────────────────────────────────────────────────────
|
|
252
243
|
async function main() {
|
|
253
244
|
logEvent('INFO', 'main', '========== Dev session started ==========');
|
|
254
245
|
|
|
255
|
-
cleanStaleDist();
|
|
256
|
-
|
|
257
246
|
// Initialize action plugins
|
|
258
247
|
writeOutput('\n🔌 Initializing action plugins...\n');
|
|
259
248
|
try {
|