@servicenow/sdk-build-plugins 4.5.0 → 4.6.0
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/dist/column-plugin.js +3 -7
- package/dist/column-plugin.js.map +1 -1
- package/dist/flow/flow-logic/flow-logic-diagnostics.js +5 -5
- package/dist/flow/flow-logic/flow-logic-diagnostics.js.map +1 -1
- package/dist/flow/plugins/flow-action-definition-plugin.js +1229 -54
- package/dist/flow/plugins/flow-action-definition-plugin.js.map +1 -1
- package/dist/flow/plugins/flow-data-pill-plugin.js +5 -2
- package/dist/flow/plugins/flow-data-pill-plugin.js.map +1 -1
- package/dist/flow/plugins/flow-definition-plugin.js +16 -42
- package/dist/flow/plugins/flow-definition-plugin.js.map +1 -1
- package/dist/flow/plugins/flow-diagnostics-plugin.d.ts +2 -2
- package/dist/flow/plugins/flow-diagnostics-plugin.js +2 -2
- package/dist/flow/plugins/flow-instance-plugin.js +68 -22
- package/dist/flow/plugins/flow-instance-plugin.js.map +1 -1
- package/dist/flow/plugins/step-definition-plugin.js +2 -1
- package/dist/flow/plugins/step-definition-plugin.js.map +1 -1
- package/dist/flow/plugins/step-instance-plugin.d.ts +9 -1
- package/dist/flow/plugins/step-instance-plugin.js +649 -136
- package/dist/flow/plugins/step-instance-plugin.js.map +1 -1
- package/dist/flow/plugins/wfa-datapill-plugin.js +20 -5
- package/dist/flow/plugins/wfa-datapill-plugin.js.map +1 -1
- package/dist/flow/post-install.js +1 -0
- package/dist/flow/post-install.js.map +1 -1
- package/dist/flow/utils/complex-object-resolver.js +4 -1
- package/dist/flow/utils/complex-object-resolver.js.map +1 -1
- package/dist/flow/utils/complex-objects.js +1 -1
- package/dist/flow/utils/complex-objects.js.map +1 -1
- package/dist/flow/utils/flow-constants.d.ts +66 -2
- package/dist/flow/utils/flow-constants.js +402 -6
- package/dist/flow/utils/flow-constants.js.map +1 -1
- package/dist/flow/utils/flow-io-to-record.d.ts +1 -1
- package/dist/flow/utils/flow-io-to-record.js +37 -16
- package/dist/flow/utils/flow-io-to-record.js.map +1 -1
- package/dist/flow/utils/flow-shapes.js +4 -0
- package/dist/flow/utils/flow-shapes.js.map +1 -1
- package/dist/flow/utils/label-cache-parser.d.ts +9 -2
- package/dist/flow/utils/label-cache-parser.js +32 -4
- package/dist/flow/utils/label-cache-parser.js.map +1 -1
- package/dist/flow/utils/pill-shape-helpers.d.ts +15 -0
- package/dist/flow/utils/pill-shape-helpers.js +35 -0
- package/dist/flow/utils/pill-shape-helpers.js.map +1 -0
- package/dist/flow/utils/pill-string-parser.js +1 -0
- package/dist/flow/utils/pill-string-parser.js.map +1 -1
- package/dist/flow/utils/schema-to-flow-object.d.ts +6 -1
- package/dist/flow/utils/schema-to-flow-object.js +131 -15
- package/dist/flow/utils/schema-to-flow-object.js.map +1 -1
- package/dist/flow/utils/utils.d.ts +1 -0
- package/dist/flow/utils/utils.js +6 -1
- package/dist/flow/utils/utils.js.map +1 -1
- package/dist/form-plugin.js +7 -9
- package/dist/form-plugin.js.map +1 -1
- package/dist/inbound-email-action-plugin.d.ts +10 -0
- package/dist/inbound-email-action-plugin.js +128 -0
- package/dist/inbound-email-action-plugin.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/instance-scan-plugin.js +0 -5
- package/dist/instance-scan-plugin.js.map +1 -1
- package/dist/property-plugin.js +1 -1
- package/dist/property-plugin.js.map +1 -1
- package/dist/record-plugin.d.ts +7 -0
- package/dist/record-plugin.js +10 -2
- package/dist/record-plugin.js.map +1 -1
- package/dist/rest-api-plugin.js +8 -1
- package/dist/rest-api-plugin.js.map +1 -1
- package/dist/schedule-script/scheduled-script-plugin.js +8 -3
- package/dist/schedule-script/scheduled-script-plugin.js.map +1 -1
- package/dist/service-catalog/service-catalog-base.d.ts +18 -18
- package/dist/service-catalog/service-catalog-base.js +22 -22
- package/dist/service-catalog/service-catalog-base.js.map +1 -1
- package/dist/service-portal/header-footer-plugin.d.ts +2 -0
- package/dist/service-portal/header-footer-plugin.js +50 -0
- package/dist/service-portal/header-footer-plugin.js.map +1 -0
- package/dist/service-portal/menu-plugin.js +3 -22
- package/dist/service-portal/menu-plugin.js.map +1 -1
- package/dist/service-portal/page-plugin.js +3 -24
- package/dist/service-portal/page-plugin.js.map +1 -1
- package/dist/service-portal/page-route-map-plugin.d.ts +2 -0
- package/dist/service-portal/page-route-map-plugin.js +114 -0
- package/dist/service-portal/page-route-map-plugin.js.map +1 -0
- package/dist/service-portal/portal-plugin.js +21 -8
- package/dist/service-portal/portal-plugin.js.map +1 -1
- package/dist/service-portal/utils.d.ts +40 -2
- package/dist/service-portal/utils.js +283 -2
- package/dist/service-portal/utils.js.map +1 -1
- package/dist/service-portal/widget-plugin.js +9 -218
- package/dist/service-portal/widget-plugin.js.map +1 -1
- package/dist/static-content-plugin.js +4 -0
- package/dist/static-content-plugin.js.map +1 -1
- package/dist/table-plugin.js +190 -26
- package/dist/table-plugin.js.map +1 -1
- package/dist/ui-action-plugin.js +1 -4
- package/dist/ui-action-plugin.js.map +1 -1
- package/dist/ui-page-plugin.js +68 -13
- package/dist/ui-page-plugin.js.map +1 -1
- package/dist/view-plugin.js +8 -3
- package/dist/view-plugin.js.map +1 -1
- package/dist/workspace-plugin.js +39 -36
- package/dist/workspace-plugin.js.map +1 -1
- package/package.json +5 -4
- package/src/column-plugin.ts +3 -8
- package/src/flow/flow-logic/flow-logic-diagnostics.ts +5 -6
- package/src/flow/plugins/flow-action-definition-plugin.ts +1581 -61
- package/src/flow/plugins/flow-data-pill-plugin.ts +5 -2
- package/src/flow/plugins/flow-definition-plugin.ts +12 -47
- package/src/flow/plugins/flow-diagnostics-plugin.ts +2 -2
- package/src/flow/plugins/flow-instance-plugin.ts +98 -22
- package/src/flow/plugins/step-definition-plugin.ts +2 -1
- package/src/flow/plugins/step-instance-plugin.ts +772 -156
- package/src/flow/plugins/wfa-datapill-plugin.ts +25 -5
- package/src/flow/post-install.ts +1 -0
- package/src/flow/utils/complex-object-resolver.ts +4 -1
- package/src/flow/utils/complex-objects.ts +1 -1
- package/src/flow/utils/flow-constants.ts +421 -5
- package/src/flow/utils/flow-io-to-record.ts +43 -17
- package/src/flow/utils/flow-shapes.ts +4 -0
- package/src/flow/utils/label-cache-parser.ts +33 -4
- package/src/flow/utils/pill-shape-helpers.ts +42 -0
- package/src/flow/utils/pill-string-parser.ts +1 -0
- package/src/flow/utils/schema-to-flow-object.ts +183 -15
- package/src/flow/utils/utils.ts +12 -1
- package/src/form-plugin.ts +1 -3
- package/src/inbound-email-action-plugin.ts +145 -0
- package/src/index.ts +4 -0
- package/src/instance-scan-plugin.ts +0 -5
- package/src/property-plugin.ts +4 -1
- package/src/record-plugin.ts +14 -4
- package/src/rest-api-plugin.ts +7 -1
- package/src/schedule-script/scheduled-script-plugin.ts +14 -3
- package/src/service-catalog/service-catalog-base.ts +22 -22
- package/src/service-portal/header-footer-plugin.ts +57 -0
- package/src/service-portal/menu-plugin.ts +1 -23
- package/src/service-portal/page-plugin.ts +3 -28
- package/src/service-portal/page-route-map-plugin.ts +124 -0
- package/src/service-portal/portal-plugin.ts +33 -10
- package/src/service-portal/utils.ts +404 -3
- package/src/service-portal/widget-plugin.ts +14 -290
- package/src/static-content-plugin.ts +3 -0
- package/src/table-plugin.ts +226 -36
- package/src/ui-action-plugin.ts +1 -8
- package/src/ui-page-plugin.ts +76 -13
- package/src/view-plugin.ts +10 -4
- package/src/workspace-plugin.ts +43 -43
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicenow/sdk-build-plugins",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "ServiceNow SDK Build System Plugins",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"eslint": "9.39.4",
|
|
19
19
|
"eslint-formatter-stylish": "8.40.0",
|
|
20
20
|
"fast-xml-parser": "5.3.7",
|
|
21
|
+
"htmlparser2": "8.0.2",
|
|
21
22
|
"globals": "17.3.0",
|
|
22
23
|
"jsonschema": "1.5.0",
|
|
23
24
|
"lodash": "4.17.23",
|
|
@@ -27,9 +28,9 @@
|
|
|
27
28
|
"xmlbuilder2": "3.1.1",
|
|
28
29
|
"xml-js": "1.6.11",
|
|
29
30
|
"zod": "3.23.8",
|
|
30
|
-
"@servicenow/sdk-
|
|
31
|
-
"@servicenow/sdk-core": "4.
|
|
32
|
-
"@servicenow/sdk-
|
|
31
|
+
"@servicenow/sdk-build-core": "4.6.0",
|
|
32
|
+
"@servicenow/sdk-core": "4.6.0",
|
|
33
|
+
"@servicenow/sdk-repack": "4.6.0"
|
|
33
34
|
},
|
|
34
35
|
"overrides": {
|
|
35
36
|
"micromatch": "4.0.7"
|
package/src/column-plugin.ts
CHANGED
|
@@ -92,11 +92,6 @@ export const ColumnPlugin = Plugin.create({
|
|
|
92
92
|
value: `sys_choice_${record.get('name').getValue()}_${record.get('element').getValue()}`,
|
|
93
93
|
}),
|
|
94
94
|
async toFile(choiceSet, { config, descendants, transform }) {
|
|
95
|
-
if (config.tableOutputFormat === 'bootstrap' && config.type === 'package') {
|
|
96
|
-
// Defer to table plugin
|
|
97
|
-
return { success: false }
|
|
98
|
-
}
|
|
99
|
-
|
|
100
95
|
const tableName = choiceSet.get('name').asString().getValue()
|
|
101
96
|
const elementName = choiceSet.get('element').asString().getValue()
|
|
102
97
|
const xml = create().ele('record_update')
|
|
@@ -165,14 +160,14 @@ export const ColumnPlugin = Plugin.create({
|
|
|
165
160
|
factory,
|
|
166
161
|
diagnostics,
|
|
167
162
|
true,
|
|
168
|
-
config.
|
|
163
|
+
config.defaultLanguage
|
|
169
164
|
)
|
|
170
165
|
const choiceRecords = await getChoiceRecords(
|
|
171
166
|
callExpression,
|
|
172
167
|
choiceAliases,
|
|
173
168
|
factory,
|
|
174
169
|
diagnostics,
|
|
175
|
-
config.
|
|
170
|
+
config.defaultLanguage
|
|
176
171
|
)
|
|
177
172
|
const choiceSetRecords: Record[] = []
|
|
178
173
|
if (choiceRecords.length > 0) {
|
|
@@ -356,7 +351,7 @@ export const ColumnPlugin = Plugin.create({
|
|
|
356
351
|
.map((f) => f.isString() && f.getValue() !== '')
|
|
357
352
|
.def(false),
|
|
358
353
|
column_label: $.from('label')
|
|
359
|
-
.map((label) => getLabelForDefaultLanguage(label, config.
|
|
354
|
+
.map((label) => getLabelForDefaultLanguage(label, config.defaultLanguage))
|
|
360
355
|
.def(column.get('name').asString()),
|
|
361
356
|
mandatory: $.toBoolean().def(false),
|
|
362
357
|
max_length: $.from('maxLength')
|
|
@@ -433,7 +433,7 @@ function validateSetFlowVariables(expr: FlowLogicInstanceShape): string | undefi
|
|
|
433
433
|
* Performs comprehensive validation of arguments, types, structure, and placement.
|
|
434
434
|
*
|
|
435
435
|
* **Validations performed:**
|
|
436
|
-
* 1. Placement: Must be within a Subflow
|
|
436
|
+
* 1. Placement: Must be within a Subflow() definition (not in regular Flow)
|
|
437
437
|
* 2. Argument count: Must have exactly 3 arguments
|
|
438
438
|
* 3. Config object: Must contain required $id property
|
|
439
439
|
* 4. Schema argument: Must be params.outputs (schema reference)
|
|
@@ -450,7 +450,7 @@ function validateSetFlowVariables(expr: FlowLogicInstanceShape): string | undefi
|
|
|
450
450
|
* - Datapills: params.action.result, params.complexObject (PropertyAccessShape)
|
|
451
451
|
* - Template expressions: `Result: ${params.action.result}` (TemplateExpressionShape)
|
|
452
452
|
*
|
|
453
|
-
* **Important:** AssignSubflowOutputs can ONLY be used within Subflow
|
|
453
|
+
* **Important:** AssignSubflowOutputs can ONLY be used within a Subflow() definition.
|
|
454
454
|
* Using it in a regular Flow will result in a validation error.
|
|
455
455
|
*
|
|
456
456
|
* @param expr - The AssignSubflowOutputs flow logic instance shape
|
|
@@ -473,12 +473,11 @@ function validateAssignSubflowOutputs(expr: FlowLogicInstanceShape): string | un
|
|
|
473
473
|
return undefined
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
// Validate that this is called within a
|
|
476
|
+
// Validate that this is called within a Subflow() definition
|
|
477
477
|
const node = expr.getOriginalNode()
|
|
478
|
-
const subflowAncestor =
|
|
479
|
-
findAncestorByCalleeName(node, 'SubflowDefinition') || findAncestorByCalleeName(node, 'Subflow')
|
|
478
|
+
const subflowAncestor = findAncestorByCalleeName(node, 'Subflow')
|
|
480
479
|
if (!subflowAncestor) {
|
|
481
|
-
return 'AssignSubflowOutputs can only be used within a
|
|
480
|
+
return 'AssignSubflowOutputs can only be used within a Subflow'
|
|
482
481
|
}
|
|
483
482
|
|
|
484
483
|
// Validate argument count
|