Skip to content

Commit 4383cd1

Browse files
committed
chore(nx-infra-plugin): standardize executor schema.json to canonical Nx format
1 parent 1ccce2c commit 4383cd1

24 files changed

Lines changed: 125 additions & 63 deletions

File tree

packages/nx-infra-plugin/src/executors/add-license-headers/schema.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "https://json-schema.org/draft-07/schema",
3-
"title": "Add License Headers Executor",
4-
"description": "Add license headers to compiled files with support for custom templates",
2+
"$schema": "https://json-schema.org/schema",
3+
"title": "Add License Headers Executor Schema",
4+
"description": "Add license headers to compiled files",
55
"type": "object",
66
"properties": {
77
"targetDirectory": {
@@ -62,6 +62,5 @@
6262
"enum": ["eula", "mit"],
6363
"description": "Selects which bundled license template to use. 'eula' references the DevExtreme EULA URL; 'mit' references MIT terms and a GitHub repo URL. When licenseTemplateFile is provided, mode is ignored."
6464
}
65-
},
66-
"required": []
65+
}
6766
}

packages/nx-infra-plugin/src/executors/babel-transform/schema.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"$schema": "http://json-schema.org/schema",
2+
"$schema": "https://json-schema.org/schema",
3+
"title": "Babel Transform Executor Schema",
4+
"description": "Transform JavaScript/TypeScript files using Babel with configurable presets",
35
"type": "object",
4-
"title": "Babel Transform Executor",
56
"properties": {
67
"babelConfigPath": {
78
"type": "string",
@@ -53,10 +54,17 @@
5354
"description": "Destination path relative to outDir."
5455
}
5556
},
56-
"required": ["from", "to"]
57+
"required": [
58+
"from",
59+
"to"
60+
]
5761
}
5862
}
5963
},
60-
"required": ["babelConfigPath", "configKey", "sourcePattern", "outDir"],
61-
"additionalProperties": false
64+
"required": [
65+
"babelConfigPath",
66+
"configKey",
67+
"sourcePattern",
68+
"outDir"
69+
]
6270
}

packages/nx-infra-plugin/src/executors/build-angular-library/schema.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"$schema": "http://json-schema.org/schema",
2+
"$schema": "https://json-schema.org/schema",
3+
"title": "Build Angular Library Executor Schema",
4+
"description": "Build Angular libraries using ng-packagr",
35
"type": "object",
4-
"title": "Build Angular Library Executor",
5-
"description": "Build Angular libraries using ng-packagr programmatically. This executor invokes ng-packagr to compile Angular components, generate metadata, and package the library for distribution.",
66
"properties": {
77
"project": {
88
"type": "string",
@@ -18,6 +18,7 @@
1818
"description": "Output directory path relative to project root where the built library will be written. Contains compiled JavaScript, type definitions, and package metadata. If not specified, uses the 'dest' value from ng-package.json configuration."
1919
}
2020
},
21-
"required": ["project"],
22-
"additionalProperties": false
21+
"required": [
22+
"project"
23+
]
2324
}

packages/nx-infra-plugin/src/executors/build-typescript/schema.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{
2-
"$schema": "http://json-schema.org/schema",
2+
"$schema": "https://json-schema.org/schema",
3+
"title": "Build Typescript Executor Schema",
4+
"description": "Build TypeScript modules (CJS or ESM) with configurable output format",
35
"type": "object",
4-
"title": "Build TypeScript Executor",
5-
"description": "Compile TypeScript code to CommonJS or ESM modules",
66
"properties": {
77
"module": {
88
"type": "string",
99
"description": "Target module format",
10-
"enum": ["cjs", "esm"],
10+
"enum": [
11+
"cjs",
12+
"esm"
13+
],
1114
"default": "esm"
1215
},
1316
"srcPattern": {
@@ -41,7 +44,5 @@
4144
"type": "string",
4245
"description": "Base directory for path alias resolution (used as aliasRoot for tsc-alias). Relative to project root. Required when resolvePaths is true. Example: './js' for DevExtreme's __internal TypeScript compilation."
4346
}
44-
},
45-
"required": [],
46-
"additionalProperties": false
47+
}
4748
}

packages/nx-infra-plugin/src/executors/bundle/schema.json

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
22
"$schema": "https://json-schema.org/schema",
3+
"title": "Bundle Executor Schema",
4+
"description": "Bundle JavaScript files using webpack with debug or production mode",
35
"type": "object",
46
"properties": {
57
"entries": {
68
"type": "array",
7-
"items": { "type": "string" },
9+
"items": {
10+
"type": "string"
11+
},
812
"description": "Bundle entry point paths relative to sourceDir"
913
},
1014
"sourceDir": {
@@ -17,7 +21,10 @@
1721
},
1822
"mode": {
1923
"type": "string",
20-
"enum": ["debug", "production"],
24+
"enum": [
25+
"debug",
26+
"production"
27+
],
2128
"description": "Bundle mode"
2229
},
2330
"webpackConfigPath": {
@@ -41,7 +48,10 @@
4148
},
4249
"mode": {
4350
"type": "string",
44-
"enum": ["eula", "mit"],
51+
"enum": [
52+
"eula",
53+
"mit"
54+
],
4555
"description": "Selects which bundled license template to use when licenseTemplateFile is omitted"
4656
},
4757
"eulaUrl": {
@@ -54,7 +64,10 @@
5464
},
5565
"commentType": {
5666
"type": "string",
57-
"enum": ["!", "*"],
67+
"enum": [
68+
"!",
69+
"*"
70+
],
5871
"description": "Comment marker placed after /* in the banner opening"
5972
},
6073
"separator": {
@@ -67,22 +80,33 @@
6780
},
6881
"filenameMode": {
6982
"type": "string",
70-
"enum": ["relative", "basename"],
83+
"enum": [
84+
"relative",
85+
"basename"
86+
],
7187
"description": "Filename token used in the banner template"
7288
},
7389
"includePatterns": {
7490
"type": "array",
75-
"items": { "type": "string" },
91+
"items": {
92+
"type": "string"
93+
},
7694
"description": "Glob patterns of files within outDir to add headers to"
7795
},
7896
"excludePatterns": {
7997
"type": "array",
80-
"items": { "type": "string" },
98+
"items": {
99+
"type": "string"
100+
},
81101
"description": "Glob patterns of files within outDir to skip"
82102
}
83103
}
84104
}
85105
},
86-
"required": ["entries", "sourceDir", "outDir", "mode"],
87-
"additionalProperties": false
106+
"required": [
107+
"entries",
108+
"sourceDir",
109+
"outDir",
110+
"mode"
111+
]
88112
}

packages/nx-infra-plugin/src/executors/clean/schema.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"$schema": "https://json-schema.org/schema",
3+
"title": "Clean Executor Schema",
4+
"description": "Clean directories with support for simple or recursive mode",
25
"type": "object",
36
"properties": {
47
"targetDirectory": {
@@ -14,6 +17,5 @@
1417
},
1518
"default": []
1619
}
17-
},
18-
"required": []
20+
}
1921
}

packages/nx-infra-plugin/src/executors/compress/schema.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"$schema": "https://json-schema.org/schema",
3+
"title": "Compress Executor Schema",
4+
"description": "Compress JavaScript files",
35
"type": "object",
46
"properties": {
57
"files": {

packages/nx-infra-plugin/src/executors/concatenate-files/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"$schema": "https://json-schema.org/schema",
3+
"title": "Concatenate Files Executor Schema",
4+
"description": "Concatenate files with optional content extraction and transforms",
35
"type": "object",
4-
"description": "Concatenate files with optional content extraction and transforms.",
56
"properties": {
67
"sourceFiles": {
78
"type": "array",

packages/nx-infra-plugin/src/executors/copy-files/schema.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
2-
"$schema": "http://json-schema.org/schema",
2+
"$schema": "https://json-schema.org/schema",
3+
"title": "Copy Files Executor Schema",
4+
"description": "Copy files to destination",
35
"type": "object",
46
"properties": {
57
"files": {

packages/nx-infra-plugin/src/executors/create-dual-mode-manifest/schema.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"$schema": "http://json-schema.org/schema",
2+
"$schema": "https://json-schema.org/schema",
3+
"title": "Create Dual Mode Manifest Executor Schema",
4+
"description": "Generate package.json files for dual-mode (ESM + CJS) package support",
35
"type": "object",
4-
"title": "Create Dual-Mode Manifest Executor",
5-
"description": "Generate package.json files for dual-mode (ESM + CJS) package support with main, module, typings, and sideEffects fields",
66
"properties": {
77
"esmDir": {
88
"type": "string",
@@ -35,6 +35,10 @@
3535
"description": "List of generated .d.ts files that don't exist in srcDir but are generated during build (paths relative to srcDir)"
3636
}
3737
},
38-
"required": ["esmDir", "cjsDir", "outputDir", "srcDir"],
39-
"additionalProperties": false
38+
"required": [
39+
"esmDir",
40+
"cjsDir",
41+
"outputDir",
42+
"srcDir"
43+
]
4044
}

0 commit comments

Comments
 (0)