Skip to content

Commit

Permalink
[FEATURE] specVersion 3.2: depCache bundling mode (#673)
Browse files Browse the repository at this point in the history
This change provide a `ui5.yaml` schema definition for the following
feature: SAP/ui5-builder#951

JIRA: CPOUI5FOUNDATION-744
  • Loading branch information
d3xter666 authored Dec 1, 2023
1 parent 13293d7 commit 68c5278
Show file tree
Hide file tree
Showing 16 changed files with 1,613 additions and 835 deletions.
2 changes: 1 addition & 1 deletion lib/specifications/SpecificationVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const SPEC_VERSION_PATTERN = /^\d+\.\d+$/;
const SUPPORTED_VERSIONS = [
"0.1", "1.0", "1.1",
"2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6",
"3.0", "3.1"
"3.0", "3.1", "3.2"
];

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/validation/schema/specVersion/kind/extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "object",
"required": ["specVersion", "kind", "type", "metadata"],
"properties": {
"specVersion": { "enum": ["3.1", "3.0", "2.6", "2.5", "2.4", "2.3", "2.2", "2.1", "2.0"] },
"specVersion": { "enum": ["3.2", "3.1", "3.0", "2.6", "2.5", "2.4", "2.3", "2.2", "2.1", "2.0"] },
"kind": {
"enum": ["extension"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"required": ["specVersion", "kind", "type", "metadata", "shims"],
"if": {
"properties": {
"specVersion": { "enum": ["3.0", "3.1"] }
"specVersion": { "enum": ["3.0", "3.1", "3.2"] }
}
},
"then": {
"additionalProperties": false,
"properties": {
"specVersion": {
"enum": ["3.0", "3.1"]
"enum": ["3.0", "3.1", "3.2"]
},
"kind": {
"enum": ["extension"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"required": ["specVersion", "kind", "type", "metadata", "middleware"],
"if": {
"properties": {
"specVersion": { "enum": ["3.0", "3.1"] }
"specVersion": { "enum": ["3.0", "3.1", "3.2"] }
}
},
"then": {
"additionalProperties": false,
"properties": {
"specVersion": { "enum": ["3.0", "3.1"] },
"specVersion": { "enum": ["3.0", "3.1", "3.2"] },
"kind": {
"enum": ["extension"]
},
Expand Down
4 changes: 2 additions & 2 deletions lib/validation/schema/specVersion/kind/extension/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"required": ["specVersion", "kind", "type", "metadata", "task"],
"if": {
"properties": {
"specVersion": { "enum": ["3.0", "3.1"] }
"specVersion": { "enum": ["3.0", "3.1", "3.2"] }
}
},
"then": {
"additionalProperties": false,
"properties": {
"specVersion": { "enum": ["3.0", "3.1"] },
"specVersion": { "enum": ["3.0", "3.1", "3.2"] },
"kind": {
"enum": ["extension"]
},
Expand Down
76 changes: 75 additions & 1 deletion lib/validation/schema/specVersion/kind/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "object",
"required": ["specVersion", "type"],
"properties": {
"specVersion": { "enum": ["3.1", "3.0", "2.6", "2.5", "2.4", "2.3", "2.2", "2.1", "2.0"] },
"specVersion": { "enum": ["3.2", "3.1", "3.0", "2.6", "2.5", "2.4", "2.3", "2.2", "2.1", "2.0"] },
"kind": {
"enum": ["project", null],
"$comment": "Using null to allow not defining 'kind' which defaults to project"
Expand Down Expand Up @@ -191,6 +191,22 @@
}
}
},
"builder-bundles-3.2": {
"type": "array",
"additionalProperties": false,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"bundleDefinition": {
"$ref": "#/definitions/builder-bundles-bundleDefinition-3.2"
},
"bundleOptions": {
"$ref": "#/definitions/builder-bundles-bundleOptions-3.0"
}
}
}
},
"builder-bundles-bundleDefinition": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -307,6 +323,64 @@
}
}
},
"builder-bundles-bundleDefinition-3.2": {
"type": "object",
"additionalProperties": false,
"required": ["name"],
"properties": {
"name": {
"type": "string"
},
"defaultFileTypes": {
"type": "array",
"items": {
"type": "string"
}
},
"sections": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["mode", "filters"],
"properties": {
"name": {
"type": "string"
},
"mode": {
"enum": ["raw", "preload", "require", "provided", "bundleInfo", "depCache"]
},
"filters": {
"type": "array",
"items": {
"type": "string"
}
},
"resolve": {
"type": "boolean",
"default": false
},
"resolveConditional": {
"type": "boolean",
"default": false
},
"renderer": {
"type": "boolean",
"default": false
},
"sort": {
"type": "boolean",
"default": true
},
"declareRawModules": {
"type": "boolean",
"default": false
}
}
}
}
}
},
"builder-bundles-bundleOptions": {
"type": "object",
"additionalProperties": false,
Expand Down
Loading

0 comments on commit 68c5278

Please sign in to comment.