openxiangda 1.0.111 → 1.0.112

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/lib/cli.js +14 -1
  2. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -5313,7 +5313,7 @@ function readResourceItems(baseDir, spec) {
5313
5313
 
5314
5314
  const dirPath = path.join(baseDir, spec.dir);
5315
5315
  if (fs.existsSync(dirPath)) {
5316
- for (const filePath of listJsonFiles(dirPath)) {
5316
+ for (const filePath of listResourceJsonFiles(dirPath, spec)) {
5317
5317
  items.push(...readResourceItemsFromFile(filePath, spec));
5318
5318
  }
5319
5319
  }
@@ -5426,6 +5426,19 @@ function listJsonFiles(dirPath) {
5426
5426
  .sort();
5427
5427
  }
5428
5428
 
5429
+ function listResourceJsonFiles(dirPath, spec) {
5430
+ return listJsonFiles(dirPath).filter(filePath =>
5431
+ shouldReadResourceJsonFile(filePath, dirPath, spec)
5432
+ );
5433
+ }
5434
+
5435
+ function shouldReadResourceJsonFile(filePath, dirPath, spec) {
5436
+ if (spec.key !== 'workflows') return true;
5437
+ const relativeParts = path.relative(dirPath, filePath).split(path.sep);
5438
+ if (relativeParts.length <= 1) return true;
5439
+ return path.basename(filePath) === 'workflow.json';
5440
+ }
5441
+
5429
5442
  function validateWorkspaceResources(manifest) {
5430
5443
  const errors = [];
5431
5444
  const warnings = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openxiangda",
3
- "version": "1.0.111",
3
+ "version": "1.0.112",
4
4
  "description": "OpenXiangda CLI, workspace build tools, runtime SDK, and form components.",
5
5
  "private": false,
6
6
  "bin": {