Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
98b7409
Fix validator throwing incorrect errors
justin-medeiros Feb 20, 2026
3adc081
Test
justin-medeiros Feb 20, 2026
b5c5791
Revert scopeGenerics
justin-medeiros Feb 20, 2026
a10ae5e
Remove commented out test
justin-medeiros Feb 20, 2026
88b90c0
Fix issue with local generics not being honored during SDK recall of …
KetanReddy Feb 26, 2026
1956fe4
Fix issue where top level variable exports that were in the custom pr…
KetanReddy Feb 27, 2026
4ba6897
Support types exported under namespaces as part of type export
KetanReddy Feb 27, 2026
13ae438
Fix issue with cross namespace collisions for type exports and variab…
KetanReddy Feb 27, 2026
4ffb6f7
Update reference XLRs & fix associated tests
KetanReddy Feb 28, 2026
dca1dc0
Support Schema validation
KetanReddy Feb 28, 2026
2ce50af
Fix issue with double registering of DataTypes/Formatters/Validators …
KetanReddy Mar 3, 2026
43aa28f
Improve tests for xlr utils
KetanReddy Mar 3, 2026
e63aefc
null safe access for default on schema node
KetanReddy Mar 5, 2026
d735738
Don't unpack escaped properties with quotes as that behavior was remo…
KetanReddy Mar 5, 2026
8db3a56
Fix issue where Validation Function args would fail to validate if ar…
KetanReddy Mar 10, 2026
fad1b99
Handle type unions in default value
KetanReddy Mar 10, 2026
414fead
Fix release
KetanReddy Feb 25, 2026
9177166
Fix bad merge
KetanReddy Feb 25, 2026
ab2a2f5
lint/misc cleanup
KetanReddy Feb 25, 2026
d0c581e
Fix fluent deps
KetanReddy Feb 25, 2026
d04716e
Update CHANGELOG.md [skip ci]
intuit-svc Mar 12, 2026
7eeed52
Merge branch 'main' of https://github.com/player-ui/tools into schema…
KetanReddy Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/src/commands/xlr/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default class XLRCompile extends BaseCommand {
const tsManifestFile = `${[...(capabilities.capabilities?.values() ?? [])]
.flat(2)
.map((capability) => {
return `const ${capability} = require("./${capability}.json")`;
return `const ${capability.replace(".", "_")} = require("./${capability}.json")`;
})
.join("\n")}

Expand All @@ -164,7 +164,7 @@ export default class XLRCompile extends BaseCommand {
"capabilities": {
${[...(capabilities.capabilities?.entries() ?? [])]
.map(([capabilityName, provides]) => {
return `"${capabilityName}":[${provides.join(",")}],`;
return `"${capabilityName}":[${provides.join(",").replaceAll(".", "_")}],`;
})
.join("\n\t\t")}
},
Expand Down
2 changes: 2 additions & 0 deletions cli/src/utils/xlr/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export const customPrimitives = [
"AssetWrapper",
"Schema.DataType",
"ExpressionHandler",
"FormatType",
"ValidatorFunction",
];

export enum Mode {
Expand Down
12 changes: 10 additions & 2 deletions cli/src/utils/xlr/visitors/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function runPlayerPostProcessing(
*/
function generateXLR(
node: ts.Node,
capabilityType: string,
checker: ts.TypeChecker,
converter: TsConverter,
outputDirectory: string,
Expand All @@ -126,7 +127,7 @@ function generateXLR(
capabilityDescription,
checker,
);
const capabilityName = capabilityDescription?.name ?? "error";
const capabilityName = `${capabilityType}.${capabilityDescription?.name ?? "error"}`;
fs.writeFileSync(
path.join(outputDirectory, `${capabilityName}.json`),
JSON.stringify(capabilityDescription, undefined, 4),
Expand Down Expand Up @@ -194,7 +195,13 @@ export function pluginVisitor(args: VisitorProps): Manifest | undefined {
if (ts.isTupleTypeNode(exportedCapabilities)) {
const capabilityNames = exportedCapabilities.elements.map(
(element) =>
generateXLR(element, checker, converter, outputDirectory),
generateXLR(
element,
capabilityType,
checker,
converter,
outputDirectory,
),
);

provides.set(capabilityType, capabilityNames);
Expand All @@ -204,6 +211,7 @@ export function pluginVisitor(args: VisitorProps): Manifest | undefined {
) {
const capabilityName = generateXLR(
exportedCapabilities,
capabilityType,
checker,
converter,
outputDirectory,
Expand Down
2 changes: 1 addition & 1 deletion common/static-xlrs/src/core/xlr/Asset.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"source": "src/index.ts",
"name": "Asset",
"type": "object",
"source": "src/index.ts",
"properties": {
"id": {
"required": true,
Expand Down
2 changes: 1 addition & 1 deletion common/static-xlrs/src/core/xlr/AssetBinding.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"source": "src/index.ts",
"name": "AssetBinding",
"type": "object",
"source": "src/index.ts",
"properties": {
"binding": {
"required": true,
Expand Down
28 changes: 13 additions & 15 deletions common/static-xlrs/src/core/xlr/AssetSwitch.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "AssetSwitch",
"source": "src/index.ts",
"name": "AssetSwitch",
"type": "or",
"or": [
{
"name": "StaticSwitch",
"type": "object",
"source": "src/index.ts",
"name": "StaticSwitch<T>",
"type": "object",
"properties": {
"staticSwitch": {
"required": true,
"node": {
"name": "Switch",
"source": "src/index.ts",
"name": "Switch<T>",
"type": "array",
"elementType": {
"name": "SwitchCase",
"type": "object",
"source": "src/index.ts",
"name": "SwitchCase<T>",
"type": "object",
"properties": {
"asset": {
"required": true,
Expand All @@ -40,8 +40,7 @@
},
{
"type": "boolean",
"const": true,
"title": "SwitchCase.case"
"const": true
}
],
"title": "SwitchCase.case",
Expand Down Expand Up @@ -101,20 +100,20 @@
]
},
{
"name": "DynamicSwitch",
"type": "object",
"source": "src/index.ts",
"name": "DynamicSwitch<T>",
"type": "object",
"properties": {
"dynamicSwitch": {
"required": true,
"node": {
"name": "Switch",
"source": "src/index.ts",
"name": "Switch<T>",
"type": "array",
"elementType": {
"name": "SwitchCase",
"type": "object",
"source": "src/index.ts",
"name": "SwitchCase<T>",
"type": "object",
"properties": {
"asset": {
"required": true,
Expand All @@ -137,8 +136,7 @@
},
{
"type": "boolean",
"const": true,
"title": "SwitchCase.case"
"const": true
}
],
"title": "SwitchCase.case",
Expand Down
2 changes: 1 addition & 1 deletion common/static-xlrs/src/core/xlr/AssetWrapper.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AssetWrapper",
"source": "src/index.ts",
"name": "AssetWrapper",
"type": "object",
"properties": {
"asset": {
Expand Down
28 changes: 13 additions & 15 deletions common/static-xlrs/src/core/xlr/AssetWrapperOrSwitch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AssetWrapperOrSwitch",
"source": "src/index.ts",
"name": "AssetWrapperOrSwitch",
"type": "or",
"or": [
{
Expand Down Expand Up @@ -44,20 +44,20 @@
"type": "and",
"and": [
{
"name": "StaticSwitch",
"type": "object",
"source": "src/index.ts",
"name": "StaticSwitch<T>",
"type": "object",
"properties": {
"staticSwitch": {
"required": true,
"node": {
"name": "Switch",
"source": "src/index.ts",
"name": "Switch<T>",
"type": "array",
"elementType": {
"name": "SwitchCase",
"type": "object",
"source": "src/index.ts",
"name": "SwitchCase<T>",
"type": "object",
"properties": {
"asset": {
"required": true,
Expand All @@ -80,8 +80,7 @@
},
{
"type": "boolean",
"const": true,
"title": "SwitchCase.case"
"const": true
}
],
"title": "SwitchCase.case",
Expand Down Expand Up @@ -168,20 +167,20 @@
"type": "and",
"and": [
{
"name": "DynamicSwitch",
"type": "object",
"source": "src/index.ts",
"name": "DynamicSwitch<T>",
"type": "object",
"properties": {
"dynamicSwitch": {
"required": true,
"node": {
"name": "Switch",
"source": "src/index.ts",
"name": "Switch<T>",
"type": "array",
"elementType": {
"name": "SwitchCase",
"type": "object",
"source": "src/index.ts",
"name": "SwitchCase<T>",
"type": "object",
"properties": {
"asset": {
"required": true,
Expand All @@ -204,8 +203,7 @@
},
{
"type": "boolean",
"const": true,
"title": "SwitchCase.case"
"const": true
}
],
"title": "SwitchCase.case",
Expand Down
2 changes: 1 addition & 1 deletion common/static-xlrs/src/core/xlr/Binding.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Binding",
"source": "src/index.ts",
"name": "Binding",
"type": "string",
"title": "Binding",
"description": "Bindings describe locations in the data model."
Expand Down
2 changes: 1 addition & 1 deletion common/static-xlrs/src/core/xlr/BindingRef.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "BindingRef",
"source": "src/index.ts",
"name": "BindingRef",
"type": "template",
"format": "{{.*}}",
"title": "BindingRef"
Expand Down
2 changes: 1 addition & 1 deletion common/static-xlrs/src/core/xlr/DataModel.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "DataModel",
"source": "src/index.ts",
"name": "DataModel",
"type": "record",
"keyType": {
"type": "any"
Expand Down
11 changes: 5 additions & 6 deletions common/static-xlrs/src/core/xlr/DynamicSwitch.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"source": "src/index.ts",
"name": "DynamicSwitch",
"type": "object",
"source": "src/index.ts",
"properties": {
"dynamicSwitch": {
"required": true,
"node": {
"name": "Switch",
"source": "src/index.ts",
"name": "Switch<T>",
"type": "array",
"elementType": {
"name": "SwitchCase",
"type": "object",
"source": "src/index.ts",
"name": "SwitchCase<T>",
"type": "object",
"properties": {
"asset": {
"required": true,
Expand All @@ -35,8 +35,7 @@
},
{
"type": "boolean",
"const": true,
"title": "SwitchCase.case"
"const": true
}
],
"title": "SwitchCase.case",
Expand Down
2 changes: 1 addition & 1 deletion common/static-xlrs/src/core/xlr/Expression.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Expression",
"source": "src/index.ts",
"name": "Expression",
"type": "or",
"or": [
{
Expand Down
2 changes: 1 addition & 1 deletion common/static-xlrs/src/core/xlr/ExpressionObject.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"source": "src/index.ts",
"name": "ExpressionObject",
"type": "object",
"source": "src/index.ts",
"properties": {
"exp": {
"required": false,
Expand Down
2 changes: 1 addition & 1 deletion common/static-xlrs/src/core/xlr/ExpressionRef.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ExpressionRef",
"source": "src/index.ts",
"name": "ExpressionRef",
"type": "template",
"format": "@[.*]@",
"title": "ExpressionRef"
Expand Down
Loading