@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
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModuleFunctionData = exports.ModuleEntityData = void 0;
|
|
4
|
-
const sdk_build_core_1 = require("@servicenow/sdk-build-core");
|
|
5
|
-
const sdk_project_1 = require("@servicenow/sdk-project");
|
|
6
|
-
class ModuleEntityData extends sdk_build_core_1.EntityData {
|
|
7
|
-
constructor(path, content, node, context) {
|
|
8
|
-
const { scope } = context.app.config;
|
|
9
|
-
const { name: packageName, version } = context.app.package;
|
|
10
|
-
const relativePath = sdk_project_1.path.relative(context.app.rootDir, path);
|
|
11
|
-
// Module resolution at runtime requires this format
|
|
12
|
-
const modulePath = sdk_project_1.path.join(scope, packageName, version, relativePath);
|
|
13
|
-
super('module', context.registerExplicitId('sys_module', relativePath.replaceAll(/[./\\]/g, '_')), new sdk_build_core_1.ObjectData({
|
|
14
|
-
path: new sdk_build_core_1.StringData(modulePath, node),
|
|
15
|
-
content: new sdk_build_core_1.StringData(content, node),
|
|
16
|
-
}, node), node);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.ModuleEntityData = ModuleEntityData;
|
|
20
|
-
class ModuleFunctionData extends sdk_build_core_1.ObjectData {
|
|
21
|
-
constructor(name, module, node) {
|
|
22
|
-
super({
|
|
23
|
-
exportName: new sdk_build_core_1.StringData(name, node),
|
|
24
|
-
modulePath: new sdk_build_core_1.StringData(module.getPropertyOrThrow('path', 'string').getValue(), node),
|
|
25
|
-
isDefault: new sdk_build_core_1.BooleanData(node.isDefaultExport(), node),
|
|
26
|
-
}, node);
|
|
27
|
-
}
|
|
28
|
-
getGlueCode(callExpressionProvider) {
|
|
29
|
-
return ModuleFunctionData.getGlueCode(this, callExpressionProvider);
|
|
30
|
-
}
|
|
31
|
-
static getGlueCode(scriptData, callExpressionProvider) {
|
|
32
|
-
if (sdk_build_core_1.Data.isString(scriptData)) {
|
|
33
|
-
return scriptData.getValue();
|
|
34
|
-
}
|
|
35
|
-
else if (!scriptData) {
|
|
36
|
-
return '';
|
|
37
|
-
}
|
|
38
|
-
scriptData = scriptData instanceof ModuleFunctionData ? scriptData.getValue() : scriptData;
|
|
39
|
-
if (scriptData instanceof sdk_build_core_1.Data) {
|
|
40
|
-
throw new Error(`Unsupported script data type: ${scriptData.getNode().getText()}`);
|
|
41
|
-
}
|
|
42
|
-
const { exportName, modulePath, isDefault } = scriptData;
|
|
43
|
-
return isDefault
|
|
44
|
-
? `const ${exportName} = require('${modulePath}').default;\n${callExpressionProvider(exportName)};`
|
|
45
|
-
: `const { ${exportName} } = require('${modulePath}');\n${callExpressionProvider(exportName)};`;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.ModuleFunctionData = ModuleFunctionData;
|
|
49
|
-
function applyModulePathMappings(path, context) {
|
|
50
|
-
const { modulePaths } = context.app.config;
|
|
51
|
-
if (!modulePaths) {
|
|
52
|
-
return path;
|
|
53
|
-
}
|
|
54
|
-
const relativePath = sdk_project_1.path.relative(context.app.rootDir, path);
|
|
55
|
-
// TODO: Naive implementation for now that just supports simple patterns. We can explore supporting more complex patterns later.
|
|
56
|
-
for (const [source, target] of Object.entries(modulePaths)) {
|
|
57
|
-
const match = relativePath.match(`${source.replace(/\./, '\\.').replace(/\*+/, '(.*)')}$`)?.[1];
|
|
58
|
-
if (match !== undefined) {
|
|
59
|
-
return sdk_project_1.path.join(context.app.rootDir, target.replace(/\*+/, match));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return path;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Removes invalid control characters that would cause XML parsing errors.
|
|
66
|
-
* Regex taken from: https://github.com/oozcitak/xmlbuilder-js/blob/b20136cd1591d0f17ab2f184053c7150150428b2/src/XMLStringifier.coffee#L119C15-L119C127
|
|
67
|
-
*/
|
|
68
|
-
function removeInvalidControlCharacters(content) {
|
|
69
|
-
return content.replace(
|
|
70
|
-
// eslint-disable-next-line no-control-regex
|
|
71
|
-
/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g, '');
|
|
72
|
-
}
|
|
73
|
-
function sanitizeModuleContent(content) {
|
|
74
|
-
return (0, sdk_build_core_1.sanitizeNestedCdataTags)(removeInvalidControlCharacters(content));
|
|
75
|
-
}
|
|
76
|
-
function extractFunctionDeclaration(node, context) {
|
|
77
|
-
const result = context.extractEntities(node.getSourceFile());
|
|
78
|
-
if (!result.handled) {
|
|
79
|
-
const path = node.getSourceFile().getFilePath();
|
|
80
|
-
const dir = `${context.app.config.tsconfigPath ? 'tsconfig.rootDir' : 'serverModulesDir'}`;
|
|
81
|
-
return {
|
|
82
|
-
handled: true,
|
|
83
|
-
diagnostics: [
|
|
84
|
-
new sdk_build_core_1.FluentDiagnostic(node, `File ${path} is not under ${dir}. ${dir} is expected to contain all source files.`),
|
|
85
|
-
],
|
|
86
|
-
data: new ModuleFunctionData('name', new ModuleEntityData('', '', node, context), node),
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
const module = result.data;
|
|
90
|
-
if (!(module instanceof ModuleEntityData)) {
|
|
91
|
-
return { handled: false };
|
|
92
|
-
}
|
|
93
|
-
const name = node.getName() ?? 'functionModule';
|
|
94
|
-
if (!name) {
|
|
95
|
-
return {
|
|
96
|
-
handled: true,
|
|
97
|
-
diagnostics: [new sdk_build_core_1.FluentDiagnostic(node, 'Function declaration must have a name')],
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
return {
|
|
101
|
-
handled: true,
|
|
102
|
-
diagnostics: [],
|
|
103
|
-
data: new ModuleFunctionData(name, module, node),
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
function getEmitOutput(file, fs, context) {
|
|
107
|
-
const path = file.getFilePath();
|
|
108
|
-
if (!path.endsWith('.ts')) {
|
|
109
|
-
return file.getFullText();
|
|
110
|
-
}
|
|
111
|
-
let project;
|
|
112
|
-
let sourceFile;
|
|
113
|
-
if (context.app.config.tsconfigPath) {
|
|
114
|
-
project = new sdk_project_1.ts.Project({
|
|
115
|
-
fileSystem: new sdk_project_1.TsMorphFileSystemWrapper(fs),
|
|
116
|
-
tsConfigFilePath: sdk_project_1.path.join(context.app.rootDir, context.app.config.tsconfigPath),
|
|
117
|
-
});
|
|
118
|
-
sourceFile = project.getSourceFile(path);
|
|
119
|
-
if (!sourceFile) {
|
|
120
|
-
return [new sdk_build_core_1.FluentDiagnostic(file, `Failed to get emit output for module: ${path}`)];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
project = new sdk_project_1.ts.Project({
|
|
125
|
-
fileSystem: new sdk_project_1.TsMorphFileSystemWrapper(fs),
|
|
126
|
-
compilerOptions: {
|
|
127
|
-
target: sdk_project_1.ts.ScriptTarget.ES2022,
|
|
128
|
-
module: sdk_project_1.ts.ModuleKind.ES2022,
|
|
129
|
-
declaration: false,
|
|
130
|
-
sourceMap: false,
|
|
131
|
-
},
|
|
132
|
-
});
|
|
133
|
-
sourceFile = project.createSourceFile('module.ts', file.getFullText(), {
|
|
134
|
-
overwrite: true,
|
|
135
|
-
scriptKind: sdk_project_1.ts.ScriptKind.TS,
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
const emitResult = sourceFile.getEmitOutput();
|
|
139
|
-
const diagnostics = emitResult
|
|
140
|
-
.getDiagnostics()
|
|
141
|
-
.map((d) => new sdk_project_1.TypeScriptDiagnostic(d))
|
|
142
|
-
.filter((d) => d.level === sdk_project_1.Diagnostic.Level.Error);
|
|
143
|
-
if (diagnostics.length > 0) {
|
|
144
|
-
return diagnostics;
|
|
145
|
-
}
|
|
146
|
-
const output = emitResult.getOutputFiles()[0];
|
|
147
|
-
if (!output) {
|
|
148
|
-
return [new sdk_build_core_1.FluentDiagnostic(file, `Failed to get emit output for module: ${path}`)];
|
|
149
|
-
}
|
|
150
|
-
return output.getText();
|
|
151
|
-
}
|
|
152
|
-
function isValidRequireCall(callExpression, requirePath) {
|
|
153
|
-
const expression = callExpression.getExpression();
|
|
154
|
-
const isRequire = sdk_project_1.ts.Node.isIdentifier(expression) && expression.getText() === 'require';
|
|
155
|
-
const isRelativePath = requirePath.getLiteralText().startsWith('../') || requirePath.getLiteralText().startsWith('./');
|
|
156
|
-
return isRequire && !isRelativePath;
|
|
157
|
-
}
|
|
158
|
-
const dependencyIgnoreList = ['@servicenow/glide', '@servicenow/sdk'];
|
|
159
|
-
function ignoreDependency(name) {
|
|
160
|
-
return dependencyIgnoreList.some((dependency) => name.startsWith(dependency));
|
|
161
|
-
}
|
|
162
|
-
function isKeysFile(path, context) {
|
|
163
|
-
return path === context.getKeysSourceFile().getFilePath();
|
|
164
|
-
}
|
|
165
|
-
function validateAndGetModuleSpecifier(name) {
|
|
166
|
-
const scopedRegex = /@[a-z\d][\w\-.]+\/[a-z\d][\w\-.]*/gi;
|
|
167
|
-
scopedRegex.test(name);
|
|
168
|
-
const idx = scopedRegex.lastIndex;
|
|
169
|
-
const isSubPathImport = name.indexOf('/', idx);
|
|
170
|
-
if (isSubPathImport > 0) {
|
|
171
|
-
return { name: name.slice(0, isSubPathImport), entry: name.slice(isSubPathImport + 1) };
|
|
172
|
-
}
|
|
173
|
-
return { name };
|
|
174
|
-
}
|
|
175
|
-
function extractDependency(node, context) {
|
|
176
|
-
const path = node.getSourceFile().getFilePath();
|
|
177
|
-
if (isKeysFile(path, context)) {
|
|
178
|
-
return { handled: false };
|
|
179
|
-
}
|
|
180
|
-
let moduleName;
|
|
181
|
-
if (sdk_project_1.ts.Node.isImportDeclaration(node) && !node.isModuleSpecifierRelative()) {
|
|
182
|
-
moduleName = node.getModuleSpecifierValue();
|
|
183
|
-
}
|
|
184
|
-
if (sdk_project_1.ts.Node.isExportDeclaration(node) && node.hasModuleSpecifier() && !node.isModuleSpecifierRelative()) {
|
|
185
|
-
moduleName = node.getModuleSpecifierValue();
|
|
186
|
-
}
|
|
187
|
-
if (sdk_project_1.ts.Node.isCallExpression(node)) {
|
|
188
|
-
const args = node.getArguments();
|
|
189
|
-
const requirePath = args[0];
|
|
190
|
-
if (!sdk_project_1.ts.Node.isStringLiteral(requirePath) || !isValidRequireCall(node, requirePath)) {
|
|
191
|
-
return { handled: false };
|
|
192
|
-
}
|
|
193
|
-
moduleName = requirePath.getLiteralValue();
|
|
194
|
-
}
|
|
195
|
-
if (!moduleName || ignoreDependency(moduleName)) {
|
|
196
|
-
return { handled: false };
|
|
197
|
-
}
|
|
198
|
-
const dependencies = context.app.package.dependencies ?? {};
|
|
199
|
-
const { name, entry } = validateAndGetModuleSpecifier(moduleName);
|
|
200
|
-
if (!(name in dependencies)) {
|
|
201
|
-
return {
|
|
202
|
-
handled: true,
|
|
203
|
-
diagnostics: [new sdk_build_core_1.FluentDiagnostic(node, `Dependency ${name} is not found in package.json`)],
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
const entryPoint = entry ?? '.';
|
|
207
|
-
const entityData = new sdk_build_core_1.EntityData('dependency', name, new sdk_build_core_1.ObjectData({
|
|
208
|
-
name: new sdk_build_core_1.StringData(name, node),
|
|
209
|
-
[entryPoint]: new sdk_build_core_1.StringData(entryPoint, node),
|
|
210
|
-
version: new sdk_build_core_1.StringData(dependencies[name], node),
|
|
211
|
-
}, node), node);
|
|
212
|
-
return {
|
|
213
|
-
handled: true,
|
|
214
|
-
diagnostics: [],
|
|
215
|
-
data: entityData,
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
exports.default = (0, sdk_build_core_1.Plugin)({
|
|
219
|
-
name: 'ServerModule',
|
|
220
|
-
extractors: {
|
|
221
|
-
raw: {
|
|
222
|
-
module: {
|
|
223
|
-
FunctionDeclaration: extractFunctionDeclaration,
|
|
224
|
-
FunctionExpression(node, context) {
|
|
225
|
-
const parent = node.getParentIfKind(sdk_project_1.ts.SyntaxKind.VariableDeclaration);
|
|
226
|
-
if (!parent) {
|
|
227
|
-
return { handled: false };
|
|
228
|
-
}
|
|
229
|
-
return extractFunctionDeclaration(parent, context);
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
entity: {
|
|
234
|
-
module: {
|
|
235
|
-
SourceFile(file, context) {
|
|
236
|
-
const path = file.getFilePath();
|
|
237
|
-
if (isKeysFile(path, context)) {
|
|
238
|
-
return { handled: false };
|
|
239
|
-
}
|
|
240
|
-
const mappedPath = applyModulePathMappings(path, context);
|
|
241
|
-
const mappedFile = context.compiler.getSourceFile(mappedPath) ??
|
|
242
|
-
context.compiler.addSourceFileAtPathIfExists(mappedPath);
|
|
243
|
-
if (!mappedFile) {
|
|
244
|
-
context.logger.debug(`Module path was mapped from '${path}' to '${mappedPath}' but no file exists at the mapped location.`);
|
|
245
|
-
return { handled: false };
|
|
246
|
-
}
|
|
247
|
-
const content = getEmitOutput(mappedFile, context.fs, context);
|
|
248
|
-
if (Array.isArray(content)) {
|
|
249
|
-
return {
|
|
250
|
-
handled: false,
|
|
251
|
-
diagnostics: content,
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
return {
|
|
255
|
-
handled: true,
|
|
256
|
-
diagnostics: [],
|
|
257
|
-
data: new ModuleEntityData(mappedPath, content, file, context),
|
|
258
|
-
};
|
|
259
|
-
},
|
|
260
|
-
ImportDeclaration: extractDependency,
|
|
261
|
-
ExportDeclaration: extractDependency,
|
|
262
|
-
CallExpression: extractDependency,
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
},
|
|
266
|
-
composers: {
|
|
267
|
-
entity: {
|
|
268
|
-
module(module) {
|
|
269
|
-
if (module.getProperty('path', 'string')?.getValue().endsWith('package.json')) {
|
|
270
|
-
return Promise.resolve(undefined);
|
|
271
|
-
}
|
|
272
|
-
return Promise.resolve({
|
|
273
|
-
kind: 'module',
|
|
274
|
-
guid: module.getGuid(),
|
|
275
|
-
node: module.getNode(),
|
|
276
|
-
data: module.getValue(),
|
|
277
|
-
});
|
|
278
|
-
},
|
|
279
|
-
async dependency(module, context) {
|
|
280
|
-
const { Lint } = await import('./repack/lint/index.js');
|
|
281
|
-
const { RepackService } = await import('./repack/index.js');
|
|
282
|
-
const { name, version, ...entry } = module.getProperties();
|
|
283
|
-
const id = `${name?.getValue()}@${version?.getValue()}`;
|
|
284
|
-
const repack = await RepackService.create(context.logger, context.fs, context.app.rootDir);
|
|
285
|
-
const buildResult = await repack.execute({
|
|
286
|
-
id,
|
|
287
|
-
entry: Object.keys(entry),
|
|
288
|
-
});
|
|
289
|
-
if (!buildResult) {
|
|
290
|
-
throw new Error(`Failed to build dependency ${id}`);
|
|
291
|
-
}
|
|
292
|
-
const builtEntities = [];
|
|
293
|
-
for (const currentDep of buildResult) {
|
|
294
|
-
const { packagePath, files, updatedManifest } = currentDep;
|
|
295
|
-
const { name, version } = updatedManifest;
|
|
296
|
-
const currentId = `${name}@${version}`;
|
|
297
|
-
for (const file of files) {
|
|
298
|
-
const guid = context.registerCompositeId('sys_module', {
|
|
299
|
-
module: currentId,
|
|
300
|
-
file: file,
|
|
301
|
-
});
|
|
302
|
-
const lint = new Lint();
|
|
303
|
-
const fileExt = sdk_project_1.path.extname(file);
|
|
304
|
-
const fileContent = context.fs.readFileSync(sdk_project_1.path.join(packagePath, file)).toString('utf-8');
|
|
305
|
-
if (/(.js|.cjs|.mjs)$/.test(fileExt)) {
|
|
306
|
-
const result = await lint.check(fileContent);
|
|
307
|
-
if (result) {
|
|
308
|
-
context.logger.warn(`Use of unsupported APIs detected in npm dependency ${name}`);
|
|
309
|
-
context.logger.warn(result);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
builtEntities.push({
|
|
313
|
-
kind: 'dependency',
|
|
314
|
-
guid: guid,
|
|
315
|
-
node: module.getNode(),
|
|
316
|
-
data: {
|
|
317
|
-
name,
|
|
318
|
-
version,
|
|
319
|
-
packagePath,
|
|
320
|
-
file,
|
|
321
|
-
fileContent,
|
|
322
|
-
},
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
return builtEntities;
|
|
327
|
-
},
|
|
328
|
-
},
|
|
329
|
-
},
|
|
330
|
-
serializers: {
|
|
331
|
-
module(module, context) {
|
|
332
|
-
const { path, content } = module.data;
|
|
333
|
-
return {
|
|
334
|
-
name: `sys_module_${module.guid}.xml`,
|
|
335
|
-
directory: 'update',
|
|
336
|
-
content: `<?xml version="1.0"?>
|
|
337
|
-
<record_update>
|
|
338
|
-
<sys_module action="INSERT_OR_UPDATE">
|
|
339
|
-
<sys_scope>${context.app.config.scopeId}</sys_scope>
|
|
340
|
-
<sys_id>${module.guid}</sys_id>
|
|
341
|
-
<path>${path}</path>
|
|
342
|
-
<external_source>false</external_source>
|
|
343
|
-
<content><![CDATA[${sanitizeModuleContent(content)}]]></content>
|
|
344
|
-
</sys_module>
|
|
345
|
-
</record_update>`,
|
|
346
|
-
};
|
|
347
|
-
},
|
|
348
|
-
dependency(module, context) {
|
|
349
|
-
const { name, version, file, fileContent } = module.data;
|
|
350
|
-
const modulePath = sdk_project_1.path.join(context.app.config.scope, name, version, file);
|
|
351
|
-
return {
|
|
352
|
-
name: `sys_module_${module.guid}.xml`,
|
|
353
|
-
directory: 'update',
|
|
354
|
-
content: `<?xml version="1.0"?>
|
|
355
|
-
<record_update>
|
|
356
|
-
<sys_module action="INSERT_OR_UPDATE">
|
|
357
|
-
<sys_scope>${context.app.config.scopeId}</sys_scope>
|
|
358
|
-
<sys_id>${module.guid}</sys_id>
|
|
359
|
-
<path>${modulePath}</path>
|
|
360
|
-
<external_source>true</external_source>
|
|
361
|
-
<content><![CDATA[${sanitizeModuleContent(fileContent)}]]></content>
|
|
362
|
-
</sys_module>
|
|
363
|
-
</record_update>`,
|
|
364
|
-
};
|
|
365
|
-
},
|
|
366
|
-
},
|
|
367
|
-
});
|
|
368
|
-
//# sourceMappingURL=ServerModulePlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"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,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;YAE3E,OAAO;gBACH,IAAI,EAAE,cAAc,MAAM,CAAC,IAAI,MAAM;gBACrC,SAAS,EAAE,QAAQ;gBACnB,OAAO,EAAE;;;aAGZ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO;UAC7B,MAAM,CAAC,IAAI;QACb,UAAU;;oBAEE,qBAAqB,CAAC,WAAW,CAAC;;iBAErC;aACJ,CAAA;QACL,CAAC;KACJ;CACJ,CAAC,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { EntityData } from '@servicenow/sdk-build-core';
|
|
2
|
-
import { Diagnostic } from '@servicenow/sdk-project';
|
|
3
|
-
import { Record } from '@servicenow/sdk-core/runtime/db';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
readonly name: "UserPreference";
|
|
6
|
-
readonly ownedTables: {
|
|
7
|
-
readonly sys_user_preference: {
|
|
8
|
-
readonly diagnosticLevel: Diagnostic.Level.Warn;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
readonly extractors: {
|
|
12
|
-
readonly entity: {
|
|
13
|
-
readonly fluent: {
|
|
14
|
-
readonly CallExpression: (node: import("ts-morph").CallExpression<import("@servicenow/sdk-project").tsc.CallExpression>, context: import("@servicenow/sdk-build-core").Context) => import("@servicenow/sdk-build-core").ExtractionResult<EntityData<Record<keyof Now.Internal.Tables>>>;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export default _default;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const app_1 = require("@servicenow/sdk-core/runtime/app");
|
|
4
|
-
const sdk_build_core_1 = require("@servicenow/sdk-build-core");
|
|
5
|
-
const RecordPlugin_1 = require("./db/RecordPlugin");
|
|
6
|
-
const sdk_project_1 = require("@servicenow/sdk-project");
|
|
7
|
-
function asRecord(entity) {
|
|
8
|
-
const node = entity.getNode();
|
|
9
|
-
const { $id, value, ...rest } = entity.getProperties();
|
|
10
|
-
return new sdk_build_core_1.ObjectData({
|
|
11
|
-
table: new sdk_build_core_1.StringData('sys_user_preference', node),
|
|
12
|
-
$id,
|
|
13
|
-
data: new sdk_build_core_1.ObjectData({
|
|
14
|
-
...rest,
|
|
15
|
-
value: new sdk_build_core_1.StringData(value.getValue().toString(), value.getNode()),
|
|
16
|
-
}, node),
|
|
17
|
-
}, node);
|
|
18
|
-
}
|
|
19
|
-
exports.default = (0, sdk_build_core_1.Plugin)({
|
|
20
|
-
name: 'UserPreference',
|
|
21
|
-
ownedTables: {
|
|
22
|
-
sys_user_preference: { diagnosticLevel: sdk_project_1.Diagnostic.Level.Warn },
|
|
23
|
-
},
|
|
24
|
-
extractors: {
|
|
25
|
-
entity: {
|
|
26
|
-
fluent: {
|
|
27
|
-
CallExpression: (node, context) => (0, RecordPlugin_1.extractCallExpressionAsRecord)(app_1.UserPreference, asRecord, (pref) => context.registerExplicitId('sys_user_preference', pref.$id), node, context),
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=UserPreferencePlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferencePlugin.js","sourceRoot":"","sources":["../src/UserPreferencePlugin.ts"],"names":[],"mappings":";;AAAA,0DAAuF;AACvF,+DAAuF;AACvF,oDAAiE;AACjE,yDAAoD;AAGpD,SAAS,QAAQ,CAAC,MAAwC;IACtD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;IAC7B,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC,aAAa,EAAE,CAAA;IACtD,OAAO,IAAI,2BAAU,CACjB;QACI,KAAK,EAAE,IAAI,2BAAU,CAAC,qBAAqB,EAAE,IAAI,CAAC;QAClD,GAAG;QACH,IAAI,EAAE,IAAI,2BAAU,CAChB;YACI,GAAG,IAAI;YACP,KAAK,EAAE,IAAI,2BAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;SACtE,EACD,IAAI,CACP;KACJ,EACD,IAAI,CACP,CAAA;AACL,CAAC;AAED,kBAAe,IAAA,uBAAM,EAAC;IAClB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE;QACT,mBAAmB,EAAE,EAAE,eAAe,EAAE,wBAAU,CAAC,KAAK,CAAC,IAAI,EAAE;KAClE;IACD,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,MAAM,EAAE;gBACJ,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAC9B,IAAA,4CAA6B,EACzB,oBAAc,EACd,QAAQ,EACR,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,IAAI,CAAC,GAAa,CAAC,EAC/E,IAAI,EACJ,OAAO,CACV;aACR;SACJ;KACJ;CACJ,CAAC,CAAA"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Acl } from '@servicenow/sdk-core/runtime/app';
|
|
2
|
-
import { FluentDiagnostic, EntityData } from '@servicenow/sdk-build-core';
|
|
3
|
-
import { ts } from '@servicenow/sdk-project';
|
|
4
|
-
import { Diagnostic } from '@servicenow/sdk-project';
|
|
5
|
-
declare const _default: {
|
|
6
|
-
readonly name: "Acl";
|
|
7
|
-
readonly ownedTables: {
|
|
8
|
-
readonly sys_security_acl: {
|
|
9
|
-
readonly diagnosticLevel: Diagnostic.Level.Warn;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
readonly extractors: {
|
|
13
|
-
readonly entity: {
|
|
14
|
-
readonly fluent: {
|
|
15
|
-
readonly CallExpression: (node: ts.CallExpression<ts.ts.CallExpression>, context: import("@servicenow/sdk-build-core").Context) => {
|
|
16
|
-
handled: false;
|
|
17
|
-
} | {
|
|
18
|
-
handled: true;
|
|
19
|
-
data?: EntityData<Acl<keyof Now.Internal.Tables> & import("@servicenow/sdk-core/runtime/util").ExtraColumns> | undefined;
|
|
20
|
-
diagnostics: FluentDiagnostic[];
|
|
21
|
-
} | {
|
|
22
|
-
handled: true;
|
|
23
|
-
diagnostics: FluentDiagnostic[];
|
|
24
|
-
data: EntityData<{
|
|
25
|
-
readonly records: [{
|
|
26
|
-
data: any;
|
|
27
|
-
table: "sys_security_acl";
|
|
28
|
-
$id: any;
|
|
29
|
-
}, ...{
|
|
30
|
-
readonly table: "sys_security_acl_role";
|
|
31
|
-
readonly $id: string;
|
|
32
|
-
readonly data: {
|
|
33
|
-
readonly sys_security_acl: string;
|
|
34
|
-
readonly sys_user_role: string;
|
|
35
|
-
};
|
|
36
|
-
}[]];
|
|
37
|
-
}>;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
readonly composers: {
|
|
43
|
-
readonly entity: {
|
|
44
|
-
readonly acl: (entity: EntityData<Record<string, unknown>>, context: import("@servicenow/sdk-build-core").Context) => Promise<{
|
|
45
|
-
kind: string;
|
|
46
|
-
guid: string;
|
|
47
|
-
node: ts.CallExpression<ts.ts.CallExpression> | ts.StringLiteral | ts.SourceFile | ts.TypeAliasDeclaration | ts.TypeReferenceNode | ts.TypeLiteralNode | ts.PropertySignature | ts.TupleTypeNode | ts.FunctionExpression | ts.FunctionDeclaration | ts.ArrayLiteralExpression | ts.NumericLiteral | ts.TrueLiteral | ts.FalseLiteral | ts.Identifier | ts.VariableDeclaration | ts.ClassDeclaration | ts.ExportDeclaration | ts.ObjectLiteralExpression | ts.AsExpression | ts.ComputedPropertyName | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.PropertyAccessExpression<ts.ts.PropertyAccessExpression> | ts.NoSubstitutionTemplateLiteral | ts.ExpressionStatement | ts.TaggedTemplateExpression | ts.ExportAssignment | ts.ElementAccessExpression<ts.ts.ElementAccessExpression> | ts.TemplateExpression | ts.ImportClause | ts.ImportSpecifier | ts.ImportDeclaration | ts.NamedImports | ts.VariableStatement | ts.VariableDeclarationList | ts.Node<ts.ts.PlusToken> | ts.Node<ts.ts.EndOfFileToken> | ts.Node<ts.ts.ExportKeyword> | ts.Node<ts.ts.KeywordTypeNode<ts.ts.SyntaxKind.AnyKeyword>> | ts.ModuleDeclaration | ts.ModuleBlock | ts.Block | ts.ParameterDeclaration | ts.Node<ts.ts.EqualsGreaterThanToken> | ts.ArrowFunction | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateSpan | ts.TemplateTail | ts.PrefixUnaryExpression;
|
|
48
|
-
directory: string | undefined;
|
|
49
|
-
cdataFields: string[];
|
|
50
|
-
data: {
|
|
51
|
-
$id: unknown;
|
|
52
|
-
table: unknown;
|
|
53
|
-
data: unknown;
|
|
54
|
-
};
|
|
55
|
-
}[]>;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
readonly arrangers: {
|
|
59
|
-
readonly record: (document: import("@servicenow/sdk-build-core").Document<string>, context: import("@servicenow/sdk-build-core").Context) => {
|
|
60
|
-
handled: false;
|
|
61
|
-
result?: never;
|
|
62
|
-
} | {
|
|
63
|
-
handled: true;
|
|
64
|
-
result: {
|
|
65
|
-
kind: string;
|
|
66
|
-
guid: any;
|
|
67
|
-
} | undefined;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
readonly generators: {
|
|
71
|
-
readonly record: (document: any, context: any, linkedDocuments: any) => any;
|
|
72
|
-
};
|
|
73
|
-
readonly transformers: {
|
|
74
|
-
readonly record: {
|
|
75
|
-
readonly CallExpression: (document: import("@servicenow/sdk-build-core").Document<any, ts.CallExpression<ts.ts.CallExpression>> & {
|
|
76
|
-
entity?: EntityData;
|
|
77
|
-
node: ts.CallExpression<ts.ts.CallExpression>;
|
|
78
|
-
} & import("@servicenow/sdk-build-core").Arranged, context: import("@servicenow/sdk-build-core").Context) => boolean;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
export default _default;
|