qa360 2.2.9 → 2.2.10

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.

Potentially problematic release.


This version of qa360 might be problematic. Click here for more details.

@@ -20,7 +20,15 @@ export class PackValidator {
20
20
  // Load schema (ES modules compatible)
21
21
  const __filename = fileURLToPath(import.meta.url);
22
22
  const __dirname = dirname(__filename);
23
- const schemaPath = join(__dirname, '../../schemas/pack.schema.json');
23
+ // Try multiple paths to handle both development and bundled environments
24
+ let schemaPath = join(__dirname, '../../schemas/pack.schema.json');
25
+ try {
26
+ readFileSync(schemaPath, 'utf8');
27
+ }
28
+ catch {
29
+ // Fallback for bundled environment (cli/dist/core/pack/*.js)
30
+ schemaPath = join(__dirname, '../schemas/pack.schema.json');
31
+ }
24
32
  this.schema = JSON.parse(readFileSync(schemaPath, 'utf8'));
25
33
  this.ajv.addSchema(this.schema, 'pack-v1');
26
34
  }
@@ -370,7 +370,8 @@ export class PackValidatorV2 {
370
370
  // Validate auth profile reference
371
371
  if (gate.auth) {
372
372
  // Will be validated against profiles in auth section
373
- if (!gate.adapter?.includes('api') && !gate.adapter?.includes('ui')) {
373
+ const adapter = typeof gate.adapter === 'string' ? gate.adapter : '';
374
+ if (adapter && !adapter.includes('api') && !adapter.includes('ui')) {
374
375
  warnings.push({
375
376
  code: 'QP2V019',
376
377
  message: `Auth profile specified but adapter may not support auth`,
@@ -593,7 +594,7 @@ export class PackValidatorV2 {
593
594
  return { errors, warnings };
594
595
  }
595
596
  // Check for API gate with api auth but no auth profile
596
- const apiGates = Object.entries(pack.gates).filter(([_, g]) => g.adapter?.includes('api'));
597
+ const apiGates = Object.entries(pack.gates).filter(([_, g]) => typeof g.adapter === 'string' && g.adapter.includes('api'));
597
598
  if (apiGates.length > 0 && !pack.auth?.api && !pack.auth?.profiles) {
598
599
  warnings.push({
599
600
  code: 'QP2V034',
@@ -603,7 +604,7 @@ export class PackValidatorV2 {
603
604
  });
604
605
  }
605
606
  // Check for UI gate with ui auth but no auth profile
606
- const uiGates = Object.entries(pack.gates).filter(([_, g]) => g.adapter?.includes('ui'));
607
+ const uiGates = Object.entries(pack.gates).filter(([_, g]) => typeof g.adapter === 'string' && g.adapter.includes('ui'));
607
608
  if (uiGates.length > 0 && !pack.auth?.ui && !pack.auth?.profiles) {
608
609
  warnings.push({
609
610
  code: 'QP2V035',
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qa360",
3
- "version": "2.2.9",
3
+ "version": "2.2.10",
4
4
  "description": "QA360 Proof CLI - Quality as Cryptographic Proof",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qa360",
3
- "version": "2.2.9",
3
+ "version": "2.2.10",
4
4
  "description": "Transform software testing into verifiable, signed, and traceable proofs",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@9.12.2",