@onlineapps/cookbook-core 2.1.8 → 2.1.9
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/package.json
CHANGED
|
@@ -35,11 +35,11 @@ const loadSchemaFile = (filename) => {
|
|
|
35
35
|
if (fs.existsSync(schemaPath)) {
|
|
36
36
|
return JSON.parse(fs.readFileSync(schemaPath, 'utf-8'));
|
|
37
37
|
}
|
|
38
|
-
// Fallback to default schema
|
|
39
|
-
return JSON.parse(fs.readFileSync(path.join(__dirname, '../../schemas/cookbook.schema.json'), 'utf-8'));
|
|
38
|
+
// Fallback to default v2 schema
|
|
39
|
+
return JSON.parse(fs.readFileSync(path.join(__dirname, '../../schemas/cookbook.v2.schema.json'), 'utf-8'));
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
const cookbookSchema = loadSchemaFile('cookbook.schema.json');
|
|
42
|
+
const cookbookSchema = loadSchemaFile('cookbook.v2.schema.json');
|
|
43
43
|
const strictSchema = loadSchemaFile('cookbook.strict.schema.json');
|
|
44
44
|
const relaxedSchema = loadSchemaFile('cookbook.relaxed.schema.json');
|
|
45
45
|
|
|
@@ -37,10 +37,10 @@ function loadSchema(version = '2.0') {
|
|
|
37
37
|
throw new CookbookValidationError('V1 FORMAT BANNED! Use version 2.x.x');
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
const schemaPath = path.join(__dirname, '../../schemas/cookbook.schema.json');
|
|
40
|
+
const schemaPath = path.join(__dirname, '../../schemas/cookbook.v2.schema.json');
|
|
41
41
|
|
|
42
42
|
if (!fs.existsSync(schemaPath)) {
|
|
43
|
-
throw new CookbookValidationError('Schema file not found: cookbook.schema.json');
|
|
43
|
+
throw new CookbookValidationError('Schema file not found: cookbook.v2.schema.json');
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
return JSON.parse(fs.readFileSync(schemaPath, 'utf-8'));
|
package/src/schema.js
CHANGED
|
@@ -22,15 +22,15 @@ function loadSchema(mode = 'default') {
|
|
|
22
22
|
schemaFile = 'cookbook.relaxed.schema.json';
|
|
23
23
|
break;
|
|
24
24
|
default:
|
|
25
|
-
schemaFile = 'cookbook.schema.json';
|
|
25
|
+
schemaFile = 'cookbook.v2.schema.json';
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const schemaPath = path.join(__dirname, '../schemas', schemaFile);
|
|
29
29
|
|
|
30
30
|
// Check if file exists
|
|
31
31
|
if (!fs.existsSync(schemaPath)) {
|
|
32
|
-
// Fall back to default schema
|
|
33
|
-
const defaultPath = path.join(__dirname, '../schemas/cookbook.schema.json');
|
|
32
|
+
// Fall back to default v2 schema
|
|
33
|
+
const defaultPath = path.join(__dirname, '../schemas/cookbook.v2.schema.json');
|
|
34
34
|
return JSON.parse(fs.readFileSync(defaultPath, 'utf-8'));
|
|
35
35
|
}
|
|
36
36
|
|
|
File without changes
|