@servicenow/sdk-build-plugins 3.0.3 → 4.0.1
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/acl-plugin.d.ts +19 -0
- package/dist/acl-plugin.js +210 -0
- package/dist/acl-plugin.js.map +1 -0
- package/dist/application-menu-plugin.d.ts +18 -0
- package/dist/application-menu-plugin.js +104 -0
- package/dist/application-menu-plugin.js.map +1 -0
- package/dist/arrow-function-plugin.d.ts +16 -0
- package/dist/arrow-function-plugin.js +107 -0
- package/dist/arrow-function-plugin.js.map +1 -0
- package/dist/atf/step-configs.d.ts +39 -0
- package/dist/atf/step-configs.js +2334 -0
- package/dist/atf/step-configs.js.map +1 -0
- package/dist/atf/test-plugin.d.ts +4 -0
- package/dist/atf/test-plugin.js +600 -0
- package/dist/atf/test-plugin.js.map +1 -0
- package/dist/basic-syntax-plugin.d.ts +2 -0
- package/dist/basic-syntax-plugin.js +636 -0
- package/dist/basic-syntax-plugin.js.map +1 -0
- package/dist/business-rule-plugin.d.ts +3 -0
- package/dist/business-rule-plugin.js +205 -0
- package/dist/business-rule-plugin.js.map +1 -0
- package/dist/call-expression-plugin.d.ts +2 -0
- package/dist/call-expression-plugin.js +175 -0
- package/dist/call-expression-plugin.js.map +1 -0
- package/dist/client-script-plugin.d.ts +29 -0
- package/dist/client-script-plugin.js +164 -0
- package/dist/client-script-plugin.js.map +1 -0
- package/dist/column/column-helper.d.ts +12 -0
- package/dist/column/column-helper.js +84 -0
- package/dist/column/column-helper.js.map +1 -0
- package/dist/column/column-to-record.d.ts +3 -0
- package/dist/column/column-to-record.js +105 -0
- package/dist/column/column-to-record.js.map +1 -0
- package/dist/column-plugin.d.ts +8 -0
- package/dist/column-plugin.js +453 -0
- package/dist/column-plugin.js.map +1 -0
- package/dist/cross-scope-privilege-plugin.d.ts +15 -0
- package/dist/cross-scope-privilege-plugin.js +82 -0
- package/dist/cross-scope-privilege-plugin.js.map +1 -0
- package/dist/html-import-plugin.d.ts +2 -0
- package/dist/html-import-plugin.js +72 -0
- package/dist/html-import-plugin.js.map +1 -0
- package/dist/index.d.ts +37 -21
- package/dist/index.js +40 -45
- package/dist/index.js.map +1 -1
- package/dist/json-plugin.d.ts +15 -0
- package/dist/json-plugin.js +104 -0
- package/dist/json-plugin.js.map +1 -0
- package/dist/list-plugin.d.ts +2 -0
- package/dist/list-plugin.js +191 -0
- package/dist/list-plugin.js.map +1 -0
- package/dist/now-config-plugin.d.ts +4 -0
- package/dist/now-config-plugin.js +154 -0
- package/dist/now-config-plugin.js.map +1 -0
- package/dist/now-id-plugin.d.ts +11 -0
- package/dist/now-id-plugin.js +71 -0
- package/dist/now-id-plugin.js.map +1 -0
- package/dist/now-include-plugin.d.ts +16 -0
- package/dist/now-include-plugin.js +118 -0
- package/dist/now-include-plugin.js.map +1 -0
- package/dist/now-ref-plugin.d.ts +2 -0
- package/dist/now-ref-plugin.js +43 -0
- package/dist/now-ref-plugin.js.map +1 -0
- package/dist/now-unresolved-plugin.d.ts +2 -0
- package/dist/now-unresolved-plugin.js +32 -0
- package/dist/now-unresolved-plugin.js.map +1 -0
- package/dist/package-json-plugin.d.ts +2 -0
- package/dist/package-json-plugin.js +70 -0
- package/dist/package-json-plugin.js.map +1 -0
- package/dist/property-plugin.d.ts +2 -0
- package/dist/property-plugin.js +105 -0
- package/dist/property-plugin.js.map +1 -0
- package/dist/record-plugin.d.ts +43 -0
- package/dist/record-plugin.js +147 -0
- package/dist/record-plugin.js.map +1 -0
- package/dist/repack/index.d.ts +1 -0
- package/dist/repack/index.js +10 -2
- package/dist/repack/index.js.map +1 -1
- package/dist/repack/lint/Rules.d.ts +1 -1
- package/dist/repack/lint/Rules.js +7 -3
- package/dist/repack/lint/Rules.js.map +1 -1
- package/dist/repack/lint/index.js +1 -1
- package/dist/rest-api-plugin.d.ts +2 -0
- package/dist/rest-api-plugin.js +469 -0
- package/dist/rest-api-plugin.js.map +1 -0
- package/dist/role-plugin.d.ts +2 -0
- package/dist/role-plugin.js +117 -0
- package/dist/role-plugin.js.map +1 -0
- package/dist/script-action-plugin.d.ts +2 -0
- package/dist/script-action-plugin.js +62 -0
- package/dist/script-action-plugin.js.map +1 -0
- package/dist/script-include-plugin.d.ts +2 -0
- package/dist/script-include-plugin.js +102 -0
- package/dist/script-include-plugin.js.map +1 -0
- package/dist/server-module-plugin/index.d.ts +14 -0
- package/dist/server-module-plugin/index.js +378 -0
- package/dist/server-module-plugin/index.js.map +1 -0
- package/dist/server-module-plugin/sbom-builder.d.ts +45 -0
- package/dist/server-module-plugin/sbom-builder.js +179 -0
- package/dist/server-module-plugin/sbom-builder.js.map +1 -0
- package/dist/service-portal/angular-provider-plugin.d.ts +2 -0
- package/dist/service-portal/angular-provider-plugin.js +78 -0
- package/dist/service-portal/angular-provider-plugin.js.map +1 -0
- package/dist/service-portal/dependency-plugin.d.ts +2 -0
- package/dist/service-portal/dependency-plugin.js +235 -0
- package/dist/service-portal/dependency-plugin.js.map +1 -0
- package/dist/service-portal/widget-plugin.d.ts +6 -0
- package/dist/service-portal/widget-plugin.js +230 -0
- package/dist/service-portal/widget-plugin.js.map +1 -0
- package/dist/static-content-plugin.d.ts +2 -0
- package/dist/static-content-plugin.js +272 -0
- package/dist/static-content-plugin.js.map +1 -0
- package/dist/table-plugin.d.ts +3 -0
- package/dist/table-plugin.js +1324 -0
- package/dist/table-plugin.js.map +1 -0
- package/dist/ui-action-plugin.d.ts +2 -0
- package/dist/ui-action-plugin.js +291 -0
- package/dist/ui-action-plugin.js.map +1 -0
- package/dist/ui-page-plugin.d.ts +2 -0
- package/dist/ui-page-plugin.js +165 -0
- package/dist/ui-page-plugin.js.map +1 -0
- package/dist/user-preference-plugin.d.ts +15 -0
- package/dist/user-preference-plugin.js +63 -0
- package/dist/user-preference-plugin.js.map +1 -0
- package/dist/utils.d.ts +17 -0
- package/dist/utils.js +72 -0
- package/dist/utils.js.map +1 -0
- package/dist/view-plugin.d.ts +2 -0
- package/dist/view-plugin.js +45 -0
- package/dist/view-plugin.js.map +1 -0
- package/package.json +17 -13
- package/src/acl-plugin.ts +256 -0
- package/src/application-menu-plugin.ts +109 -0
- package/src/arrow-function-plugin.ts +127 -0
- package/src/atf/step-configs.ts +2384 -0
- package/src/atf/test-plugin.ts +739 -0
- package/src/basic-syntax-plugin.ts +729 -0
- package/src/business-rule-plugin.ts +266 -0
- package/src/call-expression-plugin.ts +202 -0
- package/src/client-script-plugin.ts +179 -0
- package/src/column/column-helper.ts +119 -0
- package/src/column/column-to-record.ts +131 -0
- package/src/column-plugin.ts +506 -0
- package/src/cross-scope-privilege-plugin.ts +82 -0
- package/src/html-import-plugin.ts +79 -0
- package/src/index.ts +39 -21
- package/src/json-plugin.ts +128 -0
- package/src/list-plugin.ts +222 -0
- package/src/now-config-plugin.ts +194 -0
- package/src/now-id-plugin.ts +78 -0
- package/src/now-include-plugin.ts +140 -0
- package/src/now-ref-plugin.ts +48 -0
- package/src/now-unresolved-plugin.ts +30 -0
- package/src/package-json-plugin.ts +87 -0
- package/src/property-plugin.ts +118 -0
- package/src/record-plugin.ts +171 -0
- package/src/repack/index.ts +10 -1
- package/src/repack/lint/Rules.ts +5 -4
- package/src/repack/lint/index.ts +1 -1
- package/src/rest-api-plugin.ts +658 -0
- package/src/role-plugin.ts +128 -0
- package/src/script-action-plugin.ts +63 -0
- package/src/script-include-plugin.ts +110 -0
- package/src/server-module-plugin/index.ts +470 -0
- package/src/server-module-plugin/sbom-builder.ts +183 -0
- package/src/service-portal/angular-provider-plugin.ts +83 -0
- package/src/service-portal/dependency-plugin.ts +284 -0
- package/src/service-portal/widget-plugin.ts +263 -0
- package/src/static-content-plugin.ts +254 -0
- package/src/table-plugin.ts +1698 -0
- package/src/ui-action-plugin.ts +324 -0
- package/src/ui-page-plugin.ts +168 -0
- package/src/user-preference-plugin.ts +62 -0
- package/src/utils.ts +69 -0
- package/src/view-plugin.ts +46 -0
- package/dist/AttachmentPlugin.d.ts +0 -254
- package/dist/AttachmentPlugin.js +0 -220
- package/dist/AttachmentPlugin.js.map +0 -1
- package/dist/BusinessRulePlugin.d.ts +0 -30
- package/dist/BusinessRulePlugin.js +0 -149
- package/dist/BusinessRulePlugin.js.map +0 -1
- package/dist/CrossScopePrivilegePlugin.d.ts +0 -35
- package/dist/CrossScopePrivilegePlugin.js +0 -80
- package/dist/CrossScopePrivilegePlugin.js.map +0 -1
- package/dist/DefaultPlugin.d.ts +0 -86
- package/dist/DefaultPlugin.js +0 -226
- package/dist/DefaultPlugin.js.map +0 -1
- package/dist/HtmlTemplatePlugin.d.ts +0 -21
- package/dist/HtmlTemplatePlugin.js +0 -29
- package/dist/HtmlTemplatePlugin.js.map +0 -1
- package/dist/IdPlugin.d.ts +0 -28
- package/dist/IdPlugin.js +0 -68
- package/dist/IdPlugin.js.map +0 -1
- package/dist/IncludePlugin.d.ts +0 -34
- package/dist/IncludePlugin.js +0 -155
- package/dist/IncludePlugin.js.map +0 -1
- package/dist/JsonPlugin.d.ts +0 -28
- package/dist/JsonPlugin.js +0 -69
- package/dist/JsonPlugin.js.map +0 -1
- package/dist/ListPlugin.d.ts +0 -93
- package/dist/ListPlugin.js +0 -456
- package/dist/ListPlugin.js.map +0 -1
- package/dist/NowConfigPlugin.d.ts +0 -45
- package/dist/NowConfigPlugin.js +0 -64
- package/dist/NowConfigPlugin.js.map +0 -1
- package/dist/PackageJsonPlugin.d.ts +0 -34
- package/dist/PackageJsonPlugin.js +0 -63
- package/dist/PackageJsonPlugin.js.map +0 -1
- package/dist/PropertyPlugin.d.ts +0 -51
- package/dist/PropertyPlugin.js +0 -181
- package/dist/PropertyPlugin.js.map +0 -1
- package/dist/ScriptTemplatePlugin.d.ts +0 -13
- package/dist/ScriptTemplatePlugin.js +0 -55
- package/dist/ScriptTemplatePlugin.js.map +0 -1
- package/dist/ServerModulePlugin.d.ts +0 -75
- package/dist/ServerModulePlugin.js +0 -368
- package/dist/ServerModulePlugin.js.map +0 -1
- package/dist/UserPreferencePlugin.d.ts +0 -19
- package/dist/UserPreferencePlugin.js +0 -32
- package/dist/UserPreferencePlugin.js.map +0 -1
- package/dist/aclAndRole/AclPlugin.d.ts +0 -82
- package/dist/aclAndRole/AclPlugin.js +0 -262
- package/dist/aclAndRole/AclPlugin.js.map +0 -1
- package/dist/aclAndRole/RolePlugin.d.ts +0 -66
- package/dist/aclAndRole/RolePlugin.js +0 -179
- package/dist/aclAndRole/RolePlugin.js.map +0 -1
- package/dist/aclAndRole/Util.d.ts +0 -3
- package/dist/aclAndRole/Util.js +0 -90
- package/dist/aclAndRole/Util.js.map +0 -1
- package/dist/app/ApplicationMenuPlugin.d.ts +0 -34
- package/dist/app/ApplicationMenuPlugin.js +0 -112
- package/dist/app/ApplicationMenuPlugin.js.map +0 -1
- package/dist/db/ColumnPlugins.d.ts +0 -750
- package/dist/db/ColumnPlugins.js +0 -114
- package/dist/db/ColumnPlugins.js.map +0 -1
- package/dist/db/DBUtils.d.ts +0 -2
- package/dist/db/DBUtils.js +0 -27
- package/dist/db/DBUtils.js.map +0 -1
- package/dist/db/DocumentationPlugin.d.ts +0 -67
- package/dist/db/DocumentationPlugin.js +0 -258
- package/dist/db/DocumentationPlugin.js.map +0 -1
- package/dist/db/LicensingPlugin.d.ts +0 -60
- package/dist/db/LicensingPlugin.js +0 -117
- package/dist/db/LicensingPlugin.js.map +0 -1
- package/dist/db/RecordPlugin.d.ts +0 -133
- package/dist/db/RecordPlugin.js +0 -337
- package/dist/db/RecordPlugin.js.map +0 -1
- package/dist/db/TablePlugin.d.ts +0 -231
- package/dist/db/TablePlugin.js +0 -1630
- package/dist/db/TablePlugin.js.map +0 -1
- package/dist/db/index.d.ts +0 -6
- package/dist/db/index.js +0 -32
- package/dist/db/index.js.map +0 -1
- package/dist/scriptedRESTAPI/RESTDeserializationUtils.d.ts +0 -10
- package/dist/scriptedRESTAPI/RESTDeserializationUtils.js +0 -373
- package/dist/scriptedRESTAPI/RESTDeserializationUtils.js.map +0 -1
- package/dist/scriptedRESTAPI/RESTSerializationUtils.d.ts +0 -13
- package/dist/scriptedRESTAPI/RESTSerializationUtils.js +0 -177
- package/dist/scriptedRESTAPI/RESTSerializationUtils.js.map +0 -1
- package/dist/scriptedRESTAPI/RestApiPlugin.d.ts +0 -81
- package/dist/scriptedRESTAPI/RestApiPlugin.js +0 -345
- package/dist/scriptedRESTAPI/RestApiPlugin.js.map +0 -1
- package/dist/scriptedRESTAPI/RestSchemaUtils.d.ts +0 -190
- package/dist/scriptedRESTAPI/RestSchemaUtils.js +0 -53
- package/dist/scriptedRESTAPI/RestSchemaUtils.js.map +0 -1
- package/dist/scriptedRESTAPI/RestUtils.d.ts +0 -69
- package/dist/scriptedRESTAPI/RestUtils.js +0 -497
- package/dist/scriptedRESTAPI/RestUtils.js.map +0 -1
- package/dist/scripts/ClientScriptPlugin.d.ts +0 -64
- package/dist/scripts/ClientScriptPlugin.js +0 -170
- package/dist/scripts/ClientScriptPlugin.js.map +0 -1
- package/dist/scripts/scriptUtils.d.ts +0 -1
- package/dist/scripts/scriptUtils.js +0 -9
- package/dist/scripts/scriptUtils.js.map +0 -1
- package/dist/uxf/ExperiencePlugin.d.ts +0 -45
- package/dist/uxf/ExperiencePlugin.js +0 -61
- package/dist/uxf/ExperiencePlugin.js.map +0 -1
- package/dist/uxf/RoutesPlugin.d.ts +0 -29
- package/dist/uxf/RoutesPlugin.js +0 -181
- package/dist/uxf/RoutesPlugin.js.map +0 -1
- package/dist/uxf/UxfFormulaParser/cleanUxValue.d.ts +0 -4
- package/dist/uxf/UxfFormulaParser/cleanUxValue.js +0 -65
- package/dist/uxf/UxfFormulaParser/cleanUxValue.js.map +0 -1
- package/dist/uxf/UxfFormulaParser/grammerParser/api.d.ts +0 -189
- package/dist/uxf/UxfFormulaParser/grammerParser/api.js +0 -158
- package/dist/uxf/UxfFormulaParser/grammerParser/api.js.map +0 -1
- package/dist/uxf/UxfFormulaParser/grammerParser/clientTransformMap.d.ts +0 -13
- package/dist/uxf/UxfFormulaParser/grammerParser/clientTransformMap.js +0 -604
- package/dist/uxf/UxfFormulaParser/grammerParser/clientTransformMap.js.map +0 -1
- package/dist/uxf/UxfFormulaParser/grammerParser/grammarParser.d.ts +0 -12
- package/dist/uxf/UxfFormulaParser/grammerParser/grammarParser.js +0 -551
- package/dist/uxf/UxfFormulaParser/grammerParser/grammarParser.js.map +0 -1
- package/dist/uxf/UxfFormulaParser/grammerParser/spanHelpers.d.ts +0 -31
- package/dist/uxf/UxfFormulaParser/grammerParser/spanHelpers.js +0 -64
- package/dist/uxf/UxfFormulaParser/grammerParser/spanHelpers.js.map +0 -1
- package/dist/uxf/UxfFormulaParser/index.d.ts +0 -3
- package/dist/uxf/UxfFormulaParser/index.js +0 -11
- package/dist/uxf/UxfFormulaParser/index.js.map +0 -1
- package/dist/uxf/UxfFormulaParser/parser.d.ts +0 -8
- package/dist/uxf/UxfFormulaParser/parser.js +0 -87
- package/dist/uxf/UxfFormulaParser/parser.js.map +0 -1
- package/dist/uxf/UxfFormulaParser/utils/getErrorMsg.d.ts +0 -8
- package/dist/uxf/UxfFormulaParser/utils/getErrorMsg.js +0 -17
- package/dist/uxf/UxfFormulaParser/utils/getErrorMsg.js.map +0 -1
- package/dist/uxf/constants.d.ts +0 -2
- package/dist/uxf/constants.js +0 -8
- package/dist/uxf/constants.js.map +0 -1
- package/dist/uxf/index.d.ts +0 -2
- package/dist/uxf/index.js +0 -11
- package/dist/uxf/index.js.map +0 -1
- package/dist/uxf/tectonicIdGenerator.d.ts +0 -12
- package/dist/uxf/tectonicIdGenerator.js +0 -79
- package/dist/uxf/tectonicIdGenerator.js.map +0 -1
- package/src/AttachmentPlugin.ts +0 -268
- package/src/BusinessRulePlugin.ts +0 -238
- package/src/CrossScopePrivilegePlugin.ts +0 -115
- package/src/DefaultPlugin.ts +0 -288
- package/src/HtmlTemplatePlugin.ts +0 -31
- package/src/IdPlugin.ts +0 -74
- package/src/IncludePlugin.ts +0 -206
- package/src/JsonPlugin.ts +0 -76
- package/src/ListPlugin.ts +0 -570
- package/src/NowConfigPlugin.ts +0 -69
- package/src/PackageJsonPlugin.ts +0 -68
- package/src/PropertyPlugin.ts +0 -237
- package/src/ScriptTemplatePlugin.ts +0 -53
- package/src/ServerModulePlugin.ts +0 -480
- package/src/UserPreferencePlugin.ts +0 -45
- package/src/aclAndRole/AclPlugin.ts +0 -420
- package/src/aclAndRole/RolePlugin.ts +0 -254
- package/src/aclAndRole/Util.ts +0 -113
- package/src/app/ApplicationMenuPlugin.ts +0 -165
- package/src/db/ColumnPlugins.ts +0 -114
- package/src/db/DBUtils.ts +0 -36
- package/src/db/DocumentationPlugin.ts +0 -316
- package/src/db/LicensingPlugin.ts +0 -138
- package/src/db/RecordPlugin.ts +0 -459
- package/src/db/TablePlugin.ts +0 -2072
- package/src/db/index.ts +0 -6
- package/src/scriptedRESTAPI/RESTDeserializationUtils.ts +0 -419
- package/src/scriptedRESTAPI/RESTSerializationUtils.ts +0 -228
- package/src/scriptedRESTAPI/RestApiPlugin.ts +0 -469
- package/src/scriptedRESTAPI/RestSchemaUtils.ts +0 -72
- package/src/scriptedRESTAPI/RestUtils.ts +0 -569
- package/src/scripts/ClientScriptPlugin.ts +0 -257
- package/src/scripts/scriptUtils.ts +0 -5
- package/src/uxf/ExperiencePlugin.ts +0 -67
- package/src/uxf/RoutesPlugin.ts +0 -211
- package/src/uxf/UxfFormulaParser/cleanUxValue.ts +0 -73
- package/src/uxf/UxfFormulaParser/grammerParser/api.js +0 -166
- package/src/uxf/UxfFormulaParser/grammerParser/clientTransformMap.js +0 -606
- package/src/uxf/UxfFormulaParser/grammerParser/grammarParser.js +0 -551
- package/src/uxf/UxfFormulaParser/grammerParser/spanHelpers.js +0 -65
- package/src/uxf/UxfFormulaParser/index.ts +0 -4
- package/src/uxf/UxfFormulaParser/parser.ts +0 -64
- package/src/uxf/UxfFormulaParser/utils/getErrorMsg.ts +0 -13
- package/src/uxf/constants.ts +0 -4
- package/src/uxf/index.ts +0 -2
- package/src/uxf/tectonicIdGenerator.ts +0 -78
package/src/index.ts
CHANGED
|
@@ -1,21 +1,39 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
1
|
+
export * from './application-menu-plugin'
|
|
2
|
+
export * from './basic-syntax-plugin'
|
|
3
|
+
export * from './call-expression-plugin'
|
|
4
|
+
export * from './client-script-plugin'
|
|
5
|
+
export * from './cross-scope-privilege-plugin'
|
|
6
|
+
export * from './record-plugin'
|
|
7
|
+
export * from './now-id-plugin'
|
|
8
|
+
export * from './now-ref-plugin'
|
|
9
|
+
export * from './now-unresolved-plugin'
|
|
10
|
+
export * from './property-plugin'
|
|
11
|
+
export * from './role-plugin'
|
|
12
|
+
export * from './acl-plugin'
|
|
13
|
+
export * from './server-module-plugin'
|
|
14
|
+
export * from './view-plugin'
|
|
15
|
+
export * from './json-plugin'
|
|
16
|
+
export * from './now-config-plugin'
|
|
17
|
+
export * from './package-json-plugin'
|
|
18
|
+
export * from './business-rule-plugin'
|
|
19
|
+
export * from './user-preference-plugin'
|
|
20
|
+
export * from './now-include-plugin'
|
|
21
|
+
export * from './table-plugin'
|
|
22
|
+
export * from './column-plugin'
|
|
23
|
+
export * from './ui-page-plugin'
|
|
24
|
+
export * from './list-plugin'
|
|
25
|
+
export * from './ui-action-plugin'
|
|
26
|
+
export * from './script-include-plugin'
|
|
27
|
+
export * from './arrow-function-plugin'
|
|
28
|
+
export * from './atf/test-plugin'
|
|
29
|
+
export * from './service-portal/widget-plugin'
|
|
30
|
+
export * from './service-portal/dependency-plugin'
|
|
31
|
+
export * from './service-portal/angular-provider-plugin'
|
|
32
|
+
export * from './rest-api-plugin'
|
|
33
|
+
export * from './html-import-plugin'
|
|
34
|
+
export * from './static-content-plugin'
|
|
35
|
+
export * from './script-action-plugin'
|
|
36
|
+
|
|
37
|
+
// non-plugins
|
|
38
|
+
export * from './atf/step-configs'
|
|
39
|
+
export { REPACK_OUTPUT_DIR } from './repack'
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ts,
|
|
3
|
+
JSON5,
|
|
4
|
+
CallExpressionShape,
|
|
5
|
+
type ObjectShape,
|
|
6
|
+
Plugin,
|
|
7
|
+
Shape,
|
|
8
|
+
type Source,
|
|
9
|
+
SourceFileShape,
|
|
10
|
+
StringShape,
|
|
11
|
+
} from '@servicenow/sdk-build-core'
|
|
12
|
+
|
|
13
|
+
export class JsonStringifyShape extends CallExpressionShape {
|
|
14
|
+
constructor({ source, json }: { source: Source; json: NonNullable<object> | ObjectShape }) {
|
|
15
|
+
super({ source, callee: 'JSON.stringify', args: [json] })
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
getJson(): ObjectShape {
|
|
19
|
+
return this.getArgument(0).asObject()
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
override getValue(): string {
|
|
23
|
+
return JSON.stringify(this.getJson().getValue())
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class JsonFileShape extends SourceFileShape {
|
|
28
|
+
private readonly json: ObjectShape
|
|
29
|
+
|
|
30
|
+
constructor(file: SourceFileShape, json: ObjectShape) {
|
|
31
|
+
super({ file: file.getSource() })
|
|
32
|
+
this.json = json
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
getJson(): ObjectShape {
|
|
36
|
+
return this.json
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const JsonPlugin = Plugin.create({
|
|
41
|
+
name: 'JsonPlugin',
|
|
42
|
+
shapes: [
|
|
43
|
+
{
|
|
44
|
+
shape: SourceFileShape,
|
|
45
|
+
fileTypes: ['json'],
|
|
46
|
+
toSubclass(file) {
|
|
47
|
+
const rawContent = file.getContent().trim()
|
|
48
|
+
const jsonContent = rawContent || '{}'
|
|
49
|
+
|
|
50
|
+
let json: ObjectShape
|
|
51
|
+
try {
|
|
52
|
+
json = Shape.from(
|
|
53
|
+
file.getSource().getFirstDescendantByKind(ts.SyntaxKind.ObjectLiteralExpression) ?? file,
|
|
54
|
+
JSON5.parse(jsonContent)
|
|
55
|
+
).asObject('Expected JSON file content to be a JSON object')
|
|
56
|
+
} catch (e) {
|
|
57
|
+
throw new Error(`Failed to parse JSON content from file (${file.getPath()})`, { cause: e })
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
success: true,
|
|
62
|
+
value: new JsonFileShape(file, json),
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
shape: CallExpressionShape,
|
|
68
|
+
fileTypes: ['fluent'],
|
|
69
|
+
toSubclass(callExpression, { diagnostics }) {
|
|
70
|
+
if (callExpression.getCallee() !== 'JSON.stringify') {
|
|
71
|
+
return { success: false }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (callExpression.getArguments().length > 1) {
|
|
75
|
+
diagnostics.error(
|
|
76
|
+
callExpression.getArgument(1),
|
|
77
|
+
'Additional arguments to JSON.stringify are not supported'
|
|
78
|
+
)
|
|
79
|
+
return { success: false }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const arg = callExpression.getArgument(0)
|
|
83
|
+
if (!arg.isObject() && !arg.is(JsonFileShape)) {
|
|
84
|
+
diagnostics.error(arg, 'Argument to JSON.stringify must be an object or an import from a JSON file')
|
|
85
|
+
return { success: false }
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
success: true,
|
|
90
|
+
value: new JsonStringifyShape({
|
|
91
|
+
source: callExpression,
|
|
92
|
+
json: arg.if(JsonFileShape)?.getJson() ?? arg,
|
|
93
|
+
}),
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
shape: StringShape,
|
|
99
|
+
async commit(shape, target, { logger, transform, commit }) {
|
|
100
|
+
const result = await transform.toShape(target)
|
|
101
|
+
if (!result.success) {
|
|
102
|
+
return { success: false }
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const { value: targetShape } = result
|
|
106
|
+
if (targetShape.is(JsonStringifyShape)) {
|
|
107
|
+
await commit(shape, targetShape.getJson().getOriginalNode())
|
|
108
|
+
return { success: true }
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (!targetShape.isObject() && !targetShape.is(JsonFileShape)) {
|
|
112
|
+
return { success: false }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
let json: ObjectShape
|
|
116
|
+
try {
|
|
117
|
+
json = Shape.from(shape, JSON5.parse(shape.getValue())).asObject()
|
|
118
|
+
} catch (e) {
|
|
119
|
+
logger.info('Incoming string value could not be parsed as JSON and will overwrite the node')
|
|
120
|
+
return { success: false }
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
await commit(json, (targetShape.if(JsonFileShape)?.getJson() ?? targetShape).getOriginalNode())
|
|
124
|
+
return { success: true }
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
})
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CallExpressionShape,
|
|
3
|
+
Plugin,
|
|
4
|
+
IdentifierShape,
|
|
5
|
+
Record,
|
|
6
|
+
StringShape,
|
|
7
|
+
type ObjectShape,
|
|
8
|
+
type Diagnostics,
|
|
9
|
+
} from '@servicenow/sdk-build-core'
|
|
10
|
+
import { create } from 'xmlbuilder2'
|
|
11
|
+
import { generateDeprecatedDiagnostics } from './utils'
|
|
12
|
+
|
|
13
|
+
const DEFAULT_VIEW = 'Default view'
|
|
14
|
+
const listElementAliases = {
|
|
15
|
+
averageValue: ['average_value'],
|
|
16
|
+
maxValue: ['max_value'],
|
|
17
|
+
minValue: ['min_value'],
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function generateListColumnProps(column: ObjectShape, index: number, diagnostics: Diagnostics) {
|
|
21
|
+
const props = column
|
|
22
|
+
.withAliasedKeys(listElementAliases)
|
|
23
|
+
.transform(({ $ }) => ({
|
|
24
|
+
element: $.from('element'),
|
|
25
|
+
position: $.from('position').map((p) => (p.ifUndefined() ? index : p)),
|
|
26
|
+
max_value: $.from('maxValue'),
|
|
27
|
+
min_value: $.from('minValue'),
|
|
28
|
+
average_value: $.from('averageValue'),
|
|
29
|
+
sum: $,
|
|
30
|
+
}))
|
|
31
|
+
.properties()
|
|
32
|
+
generateDeprecatedDiagnostics(column, diagnostics)
|
|
33
|
+
return props
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const ListPlugin = Plugin.create({
|
|
37
|
+
name: 'ListPlugin',
|
|
38
|
+
records: {
|
|
39
|
+
sys_ui_list: {
|
|
40
|
+
coalesce: ['name', 'view', 'sys_domain', 'element', 'relationship', 'parent'],
|
|
41
|
+
relationships: {
|
|
42
|
+
sys_ui_list_element: {
|
|
43
|
+
via: 'list_id',
|
|
44
|
+
descendant: true,
|
|
45
|
+
},
|
|
46
|
+
sys_ui_view: {
|
|
47
|
+
via: 'view',
|
|
48
|
+
inverse: true,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
toShape(record, { descendants }) {
|
|
52
|
+
return {
|
|
53
|
+
success: true,
|
|
54
|
+
value: new CallExpressionShape({
|
|
55
|
+
source: record,
|
|
56
|
+
callee: 'List',
|
|
57
|
+
args: [
|
|
58
|
+
record.transform(({ $ }) => ({
|
|
59
|
+
table: $.from('name').map((n) => n.ifString()?.getValue() ?? ''),
|
|
60
|
+
view: $.map((v) =>
|
|
61
|
+
v.equals(DEFAULT_VIEW)
|
|
62
|
+
? new IdentifierShape({ source: record, name: 'default_view' })
|
|
63
|
+
: (v.ifString() ?? v.toRecordId())
|
|
64
|
+
),
|
|
65
|
+
parent: $.def(''),
|
|
66
|
+
relationship: $.def(''),
|
|
67
|
+
columns: $.val(
|
|
68
|
+
descendants
|
|
69
|
+
.query('sys_ui_list_element')
|
|
70
|
+
.sort(
|
|
71
|
+
(a, b) =>
|
|
72
|
+
a.get('position').toNumber().getValue() -
|
|
73
|
+
b.get('position').toNumber().getValue()
|
|
74
|
+
)
|
|
75
|
+
.map((element) => {
|
|
76
|
+
const averageValue = element.get('average_value').equals('true')
|
|
77
|
+
const maxValue = element.get('max_value').equals('true')
|
|
78
|
+
const minValue = element.get('min_value').equals('true')
|
|
79
|
+
const sum = element.get('sum').equals('true')
|
|
80
|
+
|
|
81
|
+
if (!averageValue && !minValue && !maxValue && !sum) {
|
|
82
|
+
// Element can be represented as a simple string because it does not have any special configuration
|
|
83
|
+
return element.get('element')
|
|
84
|
+
} else {
|
|
85
|
+
// Element has special configuration, so we need to return an object
|
|
86
|
+
return element
|
|
87
|
+
.transform(({ $ }) => ({
|
|
88
|
+
element: $.from('element'),
|
|
89
|
+
averageValue: $.val(averageValue || undefined),
|
|
90
|
+
maxValue: $.val(maxValue || undefined),
|
|
91
|
+
minValue: $.val(minValue || undefined),
|
|
92
|
+
sum: $.val(sum || undefined),
|
|
93
|
+
}))
|
|
94
|
+
.withAliasedKeys(listElementAliases)
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
),
|
|
98
|
+
})),
|
|
99
|
+
],
|
|
100
|
+
}),
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
toFile(list, { config, descendants }) {
|
|
104
|
+
if (!list.has('name')) {
|
|
105
|
+
// Probably generated from a deleted key
|
|
106
|
+
return { success: false }
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const listName = list.get('name').asString().getValue()
|
|
110
|
+
const xml = create().ele('record_update')
|
|
111
|
+
const root = xml.ele('sys_ui_list', { table: listName })
|
|
112
|
+
|
|
113
|
+
descendants.query('sys_ui_list_element').forEach((element) => {
|
|
114
|
+
const child = root.ele('sys_ui_list_element', { action: 'INSERT_OR_UPDATE' })
|
|
115
|
+
child.ele('sys_id').txt(element.getId().getValue())
|
|
116
|
+
child
|
|
117
|
+
.ele('list_id', { display_value: listName, ...list.getId().resolveKeys() })
|
|
118
|
+
.txt(list.getId().getValue())
|
|
119
|
+
|
|
120
|
+
for (const prop of ['element', 'position', 'min_value', 'max_value', 'average_value', 'sum']) {
|
|
121
|
+
element
|
|
122
|
+
.get(prop)
|
|
123
|
+
.ifDefined()
|
|
124
|
+
?.toString()
|
|
125
|
+
.pipe((p) => child.ele(prop).txt(p.getValue()))
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
const child = root.ele('sys_ui_list', { action: 'INSERT_OR_UPDATE' })
|
|
130
|
+
child.ele('sys_id').txt(list.getId().getValue())
|
|
131
|
+
child.ele('sys_scope', { display_value: config.scope }).txt(config.scopeId)
|
|
132
|
+
|
|
133
|
+
const view = list.get('view').toRecordId()
|
|
134
|
+
child.ele('view', view.resolveKeys()).txt(view.getValue())
|
|
135
|
+
|
|
136
|
+
const name = list.get('name')
|
|
137
|
+
if (name.isDefined()) {
|
|
138
|
+
child.ele('name').txt(name.asString().getValue())
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const parent = list.get('parent')
|
|
142
|
+
if (parent.isDefined()) {
|
|
143
|
+
child.ele('parent').txt(parent.asString().getValue())
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const relationship = list.get('relationship')
|
|
147
|
+
if (relationship.isDefined()) {
|
|
148
|
+
child
|
|
149
|
+
.ele('relationship', relationship.ifRecord()?.getId().resolveKeys())
|
|
150
|
+
.txt(relationship.ifString()?.getValue() ?? relationship.asRecord().getId().getValue())
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return {
|
|
154
|
+
success: true,
|
|
155
|
+
value: {
|
|
156
|
+
name: `sys_ui_list_${list.getId().getValue()}.xml`,
|
|
157
|
+
category: list.getInstallCategory(),
|
|
158
|
+
content: xml.end({ prettyPrint: true }),
|
|
159
|
+
},
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
sys_ui_list_element: {
|
|
164
|
+
coalesce: ['list_id', 'element'],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
shapes: [
|
|
168
|
+
{
|
|
169
|
+
shape: CallExpressionShape,
|
|
170
|
+
fileTypes: ['fluent'],
|
|
171
|
+
async toRecord(callExpression, { factory, diagnostics }) {
|
|
172
|
+
if (callExpression.getCallee() !== 'List') {
|
|
173
|
+
return { success: false }
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const arg = callExpression.getArgument(0).asObject()
|
|
177
|
+
const columns = arg.get('columns').ifArray()?.getElements() ?? []
|
|
178
|
+
const list = factory.createRecord({
|
|
179
|
+
source: callExpression,
|
|
180
|
+
table: 'sys_ui_list',
|
|
181
|
+
explicitId: arg.get('$id'),
|
|
182
|
+
properties: arg.transform(({ $ }) => ({
|
|
183
|
+
name: $.from('table'),
|
|
184
|
+
view: $.map((v) =>
|
|
185
|
+
v.ifString()
|
|
186
|
+
? factory.createReference({
|
|
187
|
+
source: v,
|
|
188
|
+
table: 'sys_ui_view',
|
|
189
|
+
keys: {
|
|
190
|
+
name: v,
|
|
191
|
+
},
|
|
192
|
+
})
|
|
193
|
+
: v
|
|
194
|
+
),
|
|
195
|
+
parent: $,
|
|
196
|
+
relationship: $.map((v) => v.if([Record, StringShape])),
|
|
197
|
+
sys_domain: $.val('global'), // TODO: Domain support?
|
|
198
|
+
})),
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
return {
|
|
202
|
+
success: true,
|
|
203
|
+
value: list.with(
|
|
204
|
+
...columns.map((column, index) =>
|
|
205
|
+
factory.createRecord({
|
|
206
|
+
source: callExpression,
|
|
207
|
+
table: 'sys_ui_list_element',
|
|
208
|
+
properties: {
|
|
209
|
+
list_id: list,
|
|
210
|
+
position: index,
|
|
211
|
+
...(column.isString()
|
|
212
|
+
? { element: column }
|
|
213
|
+
: generateListColumnProps(column.asObject(), index, diagnostics)),
|
|
214
|
+
},
|
|
215
|
+
})
|
|
216
|
+
)
|
|
217
|
+
),
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
})
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { NowConfig, ObjectShape, Plugin, Shape } from '@servicenow/sdk-build-core'
|
|
2
|
+
|
|
3
|
+
import { JsonFileShape } from './json-plugin'
|
|
4
|
+
|
|
5
|
+
export class NowConfigShape extends ObjectShape {}
|
|
6
|
+
|
|
7
|
+
export const NowConfigPlugin = Plugin.create({
|
|
8
|
+
name: 'NowConfigPlugin',
|
|
9
|
+
files: [
|
|
10
|
+
{
|
|
11
|
+
matcher: /\Wnow\.config\.json$/,
|
|
12
|
+
entryPoint: true,
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
records: {
|
|
16
|
+
sys_app: {
|
|
17
|
+
toShape(record, { packageJson }) {
|
|
18
|
+
const { name: packageName } = packageJson
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
success: true,
|
|
22
|
+
value: new NowConfigShape({
|
|
23
|
+
source: record,
|
|
24
|
+
properties: record.transform(({ $ }) => ({
|
|
25
|
+
name: $.toString().def(packageName),
|
|
26
|
+
active: $.toBoolean().def(true),
|
|
27
|
+
accessControls: $.from(
|
|
28
|
+
'scoped_administration',
|
|
29
|
+
'restrict_table_access',
|
|
30
|
+
'can_edit_in_studio',
|
|
31
|
+
'runtime_access_tracking',
|
|
32
|
+
'private',
|
|
33
|
+
'trackable',
|
|
34
|
+
'uninstall_blocked',
|
|
35
|
+
'hide_on_ui',
|
|
36
|
+
'user_role'
|
|
37
|
+
)
|
|
38
|
+
.def({
|
|
39
|
+
scopedAdministration: false,
|
|
40
|
+
restrictTableAccess: false,
|
|
41
|
+
canEditInStudio: true,
|
|
42
|
+
runtimeAccessTracking: 'permissive',
|
|
43
|
+
private: false,
|
|
44
|
+
trackable: true,
|
|
45
|
+
uninstallBlocked: false,
|
|
46
|
+
hideOnUI: false,
|
|
47
|
+
userRole: '',
|
|
48
|
+
})
|
|
49
|
+
.map(
|
|
50
|
+
(
|
|
51
|
+
scoped_administration,
|
|
52
|
+
restrict_table_access,
|
|
53
|
+
can_edit_in_studio,
|
|
54
|
+
runtime_access_tracking,
|
|
55
|
+
p,
|
|
56
|
+
trackable,
|
|
57
|
+
uninstall_blocked,
|
|
58
|
+
hide_on_ui,
|
|
59
|
+
user_role
|
|
60
|
+
) => ({
|
|
61
|
+
scopedAdministration: scoped_administration.ifBoolean()?.toBoolean(),
|
|
62
|
+
restrictTableAccess: restrict_table_access.ifBoolean()?.toBoolean(),
|
|
63
|
+
canEditInStudio: can_edit_in_studio.ifBoolean()?.toBoolean(),
|
|
64
|
+
runtimeAccessTracking:
|
|
65
|
+
runtime_access_tracking.toString().getValue() === ''
|
|
66
|
+
? 'none'
|
|
67
|
+
: runtime_access_tracking.toString(),
|
|
68
|
+
private: p.ifBoolean()?.toBoolean(),
|
|
69
|
+
trackable: trackable.ifBoolean()?.toBoolean(),
|
|
70
|
+
uninstallBlocked: uninstall_blocked.ifBoolean()?.toBoolean(),
|
|
71
|
+
hideOnUI: hide_on_ui.ifBoolean()?.toBoolean(),
|
|
72
|
+
userRole: user_role.toString(),
|
|
73
|
+
})
|
|
74
|
+
),
|
|
75
|
+
licensing: $.from(
|
|
76
|
+
'licensable',
|
|
77
|
+
'enforce_license',
|
|
78
|
+
'license_model',
|
|
79
|
+
'subscription_entitlement',
|
|
80
|
+
'license_category'
|
|
81
|
+
)
|
|
82
|
+
.def({
|
|
83
|
+
licensable: true,
|
|
84
|
+
enforceLicense: 'log',
|
|
85
|
+
licenseModel: 'none',
|
|
86
|
+
subscriptionEntitlement: '',
|
|
87
|
+
licenseCategory: 'none',
|
|
88
|
+
})
|
|
89
|
+
.map(
|
|
90
|
+
(
|
|
91
|
+
licensable,
|
|
92
|
+
enforce_license,
|
|
93
|
+
license_model,
|
|
94
|
+
subscription_entitlement,
|
|
95
|
+
license_category
|
|
96
|
+
) => ({
|
|
97
|
+
licensable: licensable.ifBoolean()?.toBoolean(),
|
|
98
|
+
enforceLicense: enforce_license.toString().getValue()
|
|
99
|
+
? enforce_license.toString()
|
|
100
|
+
: 'log',
|
|
101
|
+
licenseModel: license_model.toString().getValue()
|
|
102
|
+
? license_model.toString()
|
|
103
|
+
: 'none',
|
|
104
|
+
subscriptionEntitlement: subscription_entitlement.toString(),
|
|
105
|
+
licenseCategory: license_category.toString().getValue()
|
|
106
|
+
? license_category.toString()
|
|
107
|
+
: 'none',
|
|
108
|
+
})
|
|
109
|
+
),
|
|
110
|
+
|
|
111
|
+
jsLevel: $.from('js_level').toString().def('es_latest'),
|
|
112
|
+
menu: $.toString().def(''),
|
|
113
|
+
description: $.from('short_description').toString().def(''),
|
|
114
|
+
logo: $.toString().def(''),
|
|
115
|
+
guidedSetupGuid: $.from('guided_setup_guid').toString().def(''),
|
|
116
|
+
installedAsDependency: $.from('installed_as_dependency').toBoolean().def(false),
|
|
117
|
+
})),
|
|
118
|
+
}),
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
shapes: [
|
|
124
|
+
{
|
|
125
|
+
shape: JsonFileShape,
|
|
126
|
+
toRecord(file, { factory, config: rawConfig, packageJson }) {
|
|
127
|
+
if (file.getBaseName() !== NowConfig.FILE_NAME) {
|
|
128
|
+
return { success: false }
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const config = Shape.from(file.getJson(), rawConfig).asObject()
|
|
132
|
+
const scope = config.get('scope').asString().getValue()
|
|
133
|
+
|
|
134
|
+
const { name: packageName, version } = packageJson
|
|
135
|
+
const name = config.get('name').isDefined() ? config.get('name').asString().getValue() : packageName
|
|
136
|
+
|
|
137
|
+
const accessControls = config.get('accessControls').ifDefined()?.asObject()
|
|
138
|
+
const licensing = config.get('licensing').ifDefined()?.asObject()
|
|
139
|
+
|
|
140
|
+
return {
|
|
141
|
+
success: true,
|
|
142
|
+
value: factory.createRecord({
|
|
143
|
+
source: config,
|
|
144
|
+
table: 'sys_app',
|
|
145
|
+
properties: config.transform(({ $ }) => ({
|
|
146
|
+
active: $.toBoolean().def(true),
|
|
147
|
+
scoped_administration: $.val(accessControls?.get('scopedAdministration'))
|
|
148
|
+
.toBoolean()
|
|
149
|
+
.def(false),
|
|
150
|
+
can_edit_in_studio: $.val(accessControls?.get('canEditInStudio')).toBoolean().def(true),
|
|
151
|
+
js_level: $.from('jsLevel').toString().def('es_latest'),
|
|
152
|
+
restrict_table_access: $.val(accessControls?.get('restrictTableAccess'))
|
|
153
|
+
.toBoolean()
|
|
154
|
+
.def(false),
|
|
155
|
+
runtime_access_tracking: $.map(() => {
|
|
156
|
+
const rac = accessControls?.get('runtimeAccessTracking').getValue()
|
|
157
|
+
if (!rac) {
|
|
158
|
+
return 'permissive'
|
|
159
|
+
} else if (rac === 'none') {
|
|
160
|
+
return undefined
|
|
161
|
+
}
|
|
162
|
+
return rac
|
|
163
|
+
}),
|
|
164
|
+
licensable: $.val(licensing?.get('licensable')).toBoolean().def(true),
|
|
165
|
+
enforce_license: $.val(licensing?.get('enforceLicense')).toString().def('log'),
|
|
166
|
+
license_model: $.val(licensing?.get('licenseModel')).toString().def('none'),
|
|
167
|
+
menu: $.toString().def(''),
|
|
168
|
+
user_role: $.val(accessControls?.get('userRole')).toString().def(''),
|
|
169
|
+
short_description: $.from('description').toString().def(''),
|
|
170
|
+
logo: $.toString().def(''),
|
|
171
|
+
guided_setup_guid: $.from('guidedSetupGuid').toString().def(''),
|
|
172
|
+
subscription_entitlement: $.val(licensing?.get('subscriptionEntitlement'))
|
|
173
|
+
.toString()
|
|
174
|
+
.def(''),
|
|
175
|
+
private: $.val(accessControls?.get('private')).toBoolean().def(false),
|
|
176
|
+
trackable: $.val(accessControls?.get('trackable')).toBoolean().def(true),
|
|
177
|
+
uninstall_blocked: $.val(accessControls?.get('uninstallBlocked')).toBoolean().def(false),
|
|
178
|
+
hide_on_ui: $.val(accessControls?.get('hideOnUI')).toBoolean().def(false),
|
|
179
|
+
installed_as_dependency: $.toBoolean().def(false),
|
|
180
|
+
license_category: $.val(licensing?.get('licenseCategory')).toString().def('none'),
|
|
181
|
+
|
|
182
|
+
scope: $.val(scope),
|
|
183
|
+
package_json: $.val(`${scope}/${packageName}/${version}/package.json`),
|
|
184
|
+
name: $.val(name),
|
|
185
|
+
source: $.val(scope),
|
|
186
|
+
sys_id: $.from('scopeId'),
|
|
187
|
+
version: $.val(version),
|
|
188
|
+
})),
|
|
189
|
+
}),
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
})
|