@servicenow/sdk-build-plugins 3.0.2 → 4.0.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/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 +37 -0
- package/dist/atf/step-configs.js +2236 -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 +591 -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 +157 -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 +2284 -0
- package/src/atf/test-plugin.ts +728 -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 +170 -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 +651 -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 -1628
- 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 -2070
- 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,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const sdk_build_core_1 = require("@servicenow/sdk-build-core");
|
|
4
|
-
const ServerModulePlugin_1 = require("./ServerModulePlugin");
|
|
5
|
-
const repack_1 = require("./repack");
|
|
6
|
-
exports.default = (0, sdk_build_core_1.Plugin)({
|
|
7
|
-
name: 'PackageJson',
|
|
8
|
-
extractors: {
|
|
9
|
-
entity: {
|
|
10
|
-
json: {
|
|
11
|
-
SourceFile(file, context) {
|
|
12
|
-
if (file.getBaseName() !== 'package.json') {
|
|
13
|
-
return { handled: false };
|
|
14
|
-
}
|
|
15
|
-
return {
|
|
16
|
-
handled: true,
|
|
17
|
-
diagnostics: [],
|
|
18
|
-
data: new ServerModulePlugin_1.ModuleEntityData(file.getFilePath(), file.getFullText(), file, context),
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
composers: {
|
|
25
|
-
entity: {
|
|
26
|
-
async module(module, context) {
|
|
27
|
-
if (!module.getProperty('path', 'string')?.getValue().endsWith('package.json')) {
|
|
28
|
-
return Promise.resolve(undefined);
|
|
29
|
-
}
|
|
30
|
-
// eslint-disable-next-line prefer-const
|
|
31
|
-
let { path, content } = module.getValue();
|
|
32
|
-
/**
|
|
33
|
-
* We do this to avoid having package plugin depend on the server module plugin to get resolved versions of dependencies.
|
|
34
|
-
*/
|
|
35
|
-
content = await fixDependencyVersion(content, context);
|
|
36
|
-
return Promise.resolve({
|
|
37
|
-
kind: 'module',
|
|
38
|
-
guid: module.getGuid(),
|
|
39
|
-
node: module.getNode(),
|
|
40
|
-
data: {
|
|
41
|
-
path,
|
|
42
|
-
content,
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
async function fixDependencyVersion(jsonString, context) {
|
|
50
|
-
const json = JSON.parse(jsonString);
|
|
51
|
-
const { dependencies: packageDependencies } = json;
|
|
52
|
-
if (!packageDependencies) {
|
|
53
|
-
return jsonString;
|
|
54
|
-
}
|
|
55
|
-
const repack = await repack_1.RepackService.create(context.logger, context.fs, context.app.rootDir);
|
|
56
|
-
for (const [name] of Object.entries(packageDependencies)) {
|
|
57
|
-
const { name: rname, version: rversion } = await repack.getResolvedDepDetails(name);
|
|
58
|
-
packageDependencies[rname] = rversion;
|
|
59
|
-
}
|
|
60
|
-
json.dependencies = packageDependencies;
|
|
61
|
-
return JSON.stringify(json, null, 2);
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=PackageJsonPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PackageJsonPlugin.js","sourceRoot":"","sources":["../src/PackageJsonPlugin.ts"],"names":[],"mappings":";;AAAA,+DAA4D;AAC5D,6DAAuD;AACvD,qCAAwC;AAExC,kBAAe,IAAA,uBAAM,EAAC;IAClB,IAAI,EAAE,aAAa;IACnB,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE;gBACF,UAAU,CAAC,IAAI,EAAE,OAAO;oBACpB,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,cAAc,EAAE,CAAC;wBACxC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;oBAC7B,CAAC;oBAED,OAAO;wBACH,OAAO,EAAE,IAAI;wBACb,WAAW,EAAE,EAAE;wBACf,IAAI,EAAE,IAAI,qCAAgB,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC;qBACpF,CAAA;gBACL,CAAC;aACJ;SACJ;KACJ;IACD,SAAS,EAAE;QACP,MAAM,EAAE;YACJ,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO;gBACxB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM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C,KAAK,CAAC,GAAG,QAAQ,CAAA;IACzC,CAAC;IAED,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAA;IACvC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AACxC,CAAC"}
|
package/dist/PropertyPlugin.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { EntityData } from '@servicenow/sdk-build-core';
|
|
2
|
-
import { Diagnostic, ts } from '@servicenow/sdk-project';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
readonly name: "Property";
|
|
5
|
-
readonly ownedTables: {
|
|
6
|
-
readonly sys_properties: {
|
|
7
|
-
readonly diagnosticLevel: Diagnostic.Level.Warn;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
readonly extractors: {
|
|
11
|
-
readonly entity: {
|
|
12
|
-
readonly fluent: {
|
|
13
|
-
readonly CallExpression: (node: ts.CallExpression<ts.ts.CallExpression>, context: import("@servicenow/sdk-build-core").Context) => import("@servicenow/sdk-build-core").ExtractionResult<EntityData<{
|
|
14
|
-
$id: Now.Internal.ExplicitKey | string | number;
|
|
15
|
-
$meta?: {
|
|
16
|
-
installMethod?: "first install" | "demo";
|
|
17
|
-
};
|
|
18
|
-
} & {
|
|
19
|
-
name: string;
|
|
20
|
-
type?: "" | "string" | "boolean" | "integer" | "image" | "password2" | "date_format" | "choicelist" | "time_format" | "color" | "uploaded_image" | "password" | "timezone" | "short_string";
|
|
21
|
-
value?: string | number | boolean;
|
|
22
|
-
description?: string;
|
|
23
|
-
ignoreCache?: boolean;
|
|
24
|
-
isPrivate?: boolean;
|
|
25
|
-
choices?: string[];
|
|
26
|
-
roles?: {
|
|
27
|
-
read?: (import("@servicenow/sdk-core/runtime/app").Role | string)[] | undefined;
|
|
28
|
-
write?: (import("@servicenow/sdk-core/runtime/app").Role | string)[] | undefined;
|
|
29
|
-
};
|
|
30
|
-
} & import("@servicenow/sdk-core/runtime/util").ExtraColumns>>;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
readonly composers: {
|
|
35
|
-
readonly entity: {
|
|
36
|
-
readonly property: (entity: EntityData<globalThis.Record<string, unknown>>, context: import("@servicenow/sdk-build-core").Context) => Promise<undefined> | Promise<import("@servicenow/sdk-build-core").LinkedDocument[]>;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
readonly generators: {
|
|
40
|
-
readonly record: (document: any, context: any) => import("@servicenow/sdk-build-core").LinkedDocument<string, ts.CallExpression<ts.ts.CallExpression>> | undefined;
|
|
41
|
-
};
|
|
42
|
-
readonly transformers: {
|
|
43
|
-
readonly record: {
|
|
44
|
-
readonly CallExpression: (document: import("@servicenow/sdk-build-core").Document<any, ts.CallExpression<ts.ts.CallExpression>> & {
|
|
45
|
-
entity?: EntityData;
|
|
46
|
-
node: ts.CallExpression<ts.ts.CallExpression>;
|
|
47
|
-
} & import("@servicenow/sdk-build-core").Arranged, context: import("@servicenow/sdk-build-core").Context) => boolean;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export default _default;
|
package/dist/PropertyPlugin.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const app_1 = require("@servicenow/sdk-core/runtime/app");
|
|
4
|
-
const db_1 = require("@servicenow/sdk-core/runtime/db");
|
|
5
|
-
const fluent_1 = require("@servicenow/sdk-core/runtime/fluent");
|
|
6
|
-
const sdk_build_core_1 = require("@servicenow/sdk-build-core");
|
|
7
|
-
const RecordPlugin_1 = require("./db/RecordPlugin");
|
|
8
|
-
const zod_1 = require("zod");
|
|
9
|
-
const lodash_1 = require("lodash");
|
|
10
|
-
const sdk_project_1 = require("@servicenow/sdk-project");
|
|
11
|
-
const RolePlugin_1 = require("./aclAndRole/RolePlugin");
|
|
12
|
-
const PropertySchema = zod_1.z.object({
|
|
13
|
-
$id: zod_1.z.string().or(zod_1.z.number()),
|
|
14
|
-
name: zod_1.z.string(),
|
|
15
|
-
type: fluent_1.PropertyType.or(zod_1.z.literal('')).default(''),
|
|
16
|
-
value: zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean()]).default(''),
|
|
17
|
-
description: zod_1.z.string().default(''),
|
|
18
|
-
ignoreCache: zod_1.z.boolean().default(false),
|
|
19
|
-
isPrivate: zod_1.z.boolean().default(false),
|
|
20
|
-
choices: zod_1.z.array(zod_1.z.string()).default([]),
|
|
21
|
-
roles: zod_1.z
|
|
22
|
-
.record(zod_1.z.union([zod_1.z.literal('read'), zod_1.z.literal('write')]), zod_1.z.array(zod_1.z.union([app_1.roleSchema, zod_1.z.string()])).optional())
|
|
23
|
-
.default({ read: [], write: [] }),
|
|
24
|
-
});
|
|
25
|
-
const PropertyConfigSchema = zod_1.z.object({
|
|
26
|
-
name: PropertySchema.shape.name,
|
|
27
|
-
type: zod_1.z.string().default(''),
|
|
28
|
-
value: PropertySchema.shape.value.optional(),
|
|
29
|
-
description: PropertySchema.shape.description,
|
|
30
|
-
is_private: PropertySchema.shape.isPrivate,
|
|
31
|
-
ignore_cache: PropertySchema.shape.ignoreCache,
|
|
32
|
-
read_roles: zod_1.z.string().optional(),
|
|
33
|
-
write_roles: zod_1.z.string().optional(),
|
|
34
|
-
choices: zod_1.z.string().optional(),
|
|
35
|
-
});
|
|
36
|
-
const transformProperties = (data, xmlRoles) => {
|
|
37
|
-
const { read_roles, write_roles, ...rest } = data;
|
|
38
|
-
let roles;
|
|
39
|
-
if (read_roles !== undefined || write_roles !== undefined) {
|
|
40
|
-
roles = {
|
|
41
|
-
...(xmlRoles.read_roles !== undefined && { read: (0, app_1.getRolesArray)(xmlRoles.read_roles) }),
|
|
42
|
-
...(xmlRoles.write_roles !== undefined && { write: (0, app_1.getRolesArray)(xmlRoles.write_roles) }),
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const result = {
|
|
46
|
-
name: rest.name,
|
|
47
|
-
type: rest.type,
|
|
48
|
-
value: rest.value,
|
|
49
|
-
description: rest.description,
|
|
50
|
-
ignoreCache: rest.ignore_cache,
|
|
51
|
-
isPrivate: rest.is_private,
|
|
52
|
-
roles: roles,
|
|
53
|
-
choices: rest.choices
|
|
54
|
-
?.split(/\r?\n/)
|
|
55
|
-
.map((choice) => choice.trim())
|
|
56
|
-
.filter((choice) => choice),
|
|
57
|
-
};
|
|
58
|
-
return (0, lodash_1.pickBy)(result, (v) => v !== undefined);
|
|
59
|
-
};
|
|
60
|
-
exports.default = (0, sdk_build_core_1.Plugin)({
|
|
61
|
-
name: 'Property',
|
|
62
|
-
ownedTables: {
|
|
63
|
-
sys_properties: { diagnosticLevel: sdk_project_1.Diagnostic.Level.Warn },
|
|
64
|
-
},
|
|
65
|
-
extractors: {
|
|
66
|
-
entity: {
|
|
67
|
-
fluent: {
|
|
68
|
-
CallExpression: (node, context) => {
|
|
69
|
-
const result = (0, sdk_build_core_1.extractCallExpression)(app_1.Property, 'property', node, context, (prop) => context.registerExplicitId('sys_properties', prop.$id));
|
|
70
|
-
if (!result.handled || !result.data) {
|
|
71
|
-
return result;
|
|
72
|
-
}
|
|
73
|
-
const propertyData = result.data;
|
|
74
|
-
const diagnostics = result.diagnostics;
|
|
75
|
-
const scope = context.app.config.scope;
|
|
76
|
-
const nameData = propertyData.getProperty('name');
|
|
77
|
-
const nameNode = nameData.getNode();
|
|
78
|
-
if (!(0, sdk_build_core_1.isSNScope)(scope) && !nameData.getValue().startsWith(`${scope}.`)) {
|
|
79
|
-
diagnostics.push(new sdk_build_core_1.FluentDiagnostic(nameNode, `Property name must begin with '${scope}.'`));
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
handled: true,
|
|
83
|
-
diagnostics,
|
|
84
|
-
data: propertyData,
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
composers: {
|
|
91
|
-
entity: {
|
|
92
|
-
property(entity, context) {
|
|
93
|
-
const scope = context.app.config.scope;
|
|
94
|
-
const property = PropertySchema.and(zod_1.z.any()).safeParse(entity.getValue());
|
|
95
|
-
if (!property.success) {
|
|
96
|
-
return Promise.resolve(undefined);
|
|
97
|
-
}
|
|
98
|
-
const { $id, name, value, isPrivate, ignoreCache, choices, type, roles: _, ...rest } = property.data;
|
|
99
|
-
const roles = entity.getProperty('roles', 'object');
|
|
100
|
-
const readRoles = roles?.getProperty('read', 'array');
|
|
101
|
-
const writeRoles = roles?.getProperty('write', 'array');
|
|
102
|
-
const readRolesString = readRoles ? (0, RolePlugin_1.getRolesString)(readRoles) : '';
|
|
103
|
-
const writeRolesString = writeRoles ? (0, RolePlugin_1.getRolesString)(writeRoles) : '';
|
|
104
|
-
const suffix = name.replace(new RegExp(`^${scope}\\.`), '');
|
|
105
|
-
const propertyRecord = (0, db_1.Record)({
|
|
106
|
-
table: 'sys_properties',
|
|
107
|
-
$id,
|
|
108
|
-
data: {
|
|
109
|
-
name,
|
|
110
|
-
suffix,
|
|
111
|
-
...rest,
|
|
112
|
-
...(type === '' ? {} : { type }),
|
|
113
|
-
value: `${value}`, // TODO: Should be allowed to assign non-strings to string columns
|
|
114
|
-
is_private: isPrivate,
|
|
115
|
-
ignore_cache: ignoreCache,
|
|
116
|
-
choices: choices.join('\n'),
|
|
117
|
-
read_roles: readRolesString,
|
|
118
|
-
write_roles: writeRolesString,
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
return context.composeEntities([
|
|
122
|
-
new sdk_build_core_1.EntityData('record', entity.getGuid(), sdk_build_core_1.ObjectData.fromObjectValue(propertyRecord, entity.getNode()), entity.getNode(), entity.getInstallMethod()),
|
|
123
|
-
], [RecordPlugin_1.RecordPlugin]);
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
generators: {
|
|
128
|
-
record(document, context) {
|
|
129
|
-
const tableName = document.data['table'];
|
|
130
|
-
if (tableName !== 'sys_properties') {
|
|
131
|
-
return undefined;
|
|
132
|
-
}
|
|
133
|
-
return (0, sdk_build_core_1.linkDocument)(document, (0, sdk_build_core_1.generateCallExpressionExportForDocument)(context, {
|
|
134
|
-
sourceFile: (0, sdk_build_core_1.getOrCreateEntitySourceFile)(context, (0, sdk_build_core_1.getSysUpdateName)(document, 'sys_properties')),
|
|
135
|
-
moduleSpecifier: '@servicenow/sdk/core',
|
|
136
|
-
}, app_1.Property, { $id: document.guid }).getExpressionIfKindOrThrow(sdk_project_1.ts.SyntaxKind.CallExpression));
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
transformers: {
|
|
140
|
-
record: {
|
|
141
|
-
CallExpression(document, context) {
|
|
142
|
-
if ((0, sdk_build_core_1.getCallExpressionName)(document.node) !== app_1.Property.name) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
if (document.action === 'DELETE') {
|
|
146
|
-
(0, sdk_build_core_1.removeNode)(document.node);
|
|
147
|
-
return true;
|
|
148
|
-
}
|
|
149
|
-
if (!document.changedData) {
|
|
150
|
-
return false;
|
|
151
|
-
}
|
|
152
|
-
const { read_roles, write_roles } = document.xmlData.data;
|
|
153
|
-
const data = transformProperties(document.changedData['data'], {
|
|
154
|
-
read_roles,
|
|
155
|
-
write_roles,
|
|
156
|
-
});
|
|
157
|
-
const [args] = document.node.getArguments();
|
|
158
|
-
if (!sdk_project_1.ts.Node.isObjectLiteralExpression(args)) {
|
|
159
|
-
return false;
|
|
160
|
-
}
|
|
161
|
-
(0, sdk_build_core_1.transformCustomizedProperties)(app_1.Property, document.node, document.changedData['data'], data);
|
|
162
|
-
(0, sdk_build_core_1.transformFunctionArguments)(document.node, app_1.Property, data);
|
|
163
|
-
if (data.roles) {
|
|
164
|
-
removeEmptyRoles(args, data);
|
|
165
|
-
(0, sdk_build_core_1.writePropertyAsReference)(context.logger, args, 'roles', '{}', data.roles);
|
|
166
|
-
}
|
|
167
|
-
return true;
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
});
|
|
172
|
-
function removeEmptyRoles(arg, data) {
|
|
173
|
-
;
|
|
174
|
-
['read', 'write'].forEach((type) => {
|
|
175
|
-
if (data.roles?.[type].length === 0) {
|
|
176
|
-
arg.getProperty('roles')?.asKind(sdk_project_1.ts.SyntaxKind.ObjectLiteralExpression)?.getProperty(type)?.remove();
|
|
177
|
-
delete data.roles?.[type];
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
//# sourceMappingURL=PropertyPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyPlugin.js","sourceRoot":"","sources":["../src/PropertyPlugin.ts"],"names":[],"mappings":";;AAAA,0DAAsF;AACtF,wDAAwD;AACxD,gEAAkE;AAClE,+DAgBmC;AACnC,oDAAgD;AAChD,6BAAuB;AACvB,mCAA+B;AAC/B,yDAAwD;AACxD,wDAAwD;AAExD,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,qBAAY,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAChD,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACjE,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IACnC,WAAW,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACvC,S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AO,IAAI,CAAA;YACf,CAAC;SACJ;KACJ;CACJ,CAAC,CAAA;AAEF,SAAS,gBAAgB,CAAC,GAA+B,EAAE,IAAuB;IAC9E,CAAC;IAAA,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAChC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClC,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,gBAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;YACpG,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAA;QAC7B,CAAC;IACL,CAAC,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ts } from '@servicenow/sdk-project';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
readonly name: "scriptTemplate";
|
|
4
|
-
readonly extractors: {
|
|
5
|
-
readonly raw: {
|
|
6
|
-
readonly fluent: {
|
|
7
|
-
readonly TaggedTemplateExpression: (node: ts.TaggedTemplateExpression, context: import("@servicenow/sdk-build-core").Context) => import("@servicenow/sdk-build-core").ExtractionResult;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
|
13
|
-
export declare function processScript(args: ts.ObjectLiteralExpression, argName: string, script: string): void;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.processScript = processScript;
|
|
4
|
-
const sdk_build_core_1 = require("@servicenow/sdk-build-core");
|
|
5
|
-
const sdk_project_1 = require("@servicenow/sdk-project");
|
|
6
|
-
const IncludePlugin_1 = require("./IncludePlugin");
|
|
7
|
-
exports.default = (0, sdk_build_core_1.Plugin)({
|
|
8
|
-
name: 'scriptTemplate',
|
|
9
|
-
extractors: {
|
|
10
|
-
raw: {
|
|
11
|
-
fluent: {
|
|
12
|
-
TaggedTemplateExpression(node, context) {
|
|
13
|
-
if (node.getTag().getText() !== 'script') {
|
|
14
|
-
return { handled: false };
|
|
15
|
-
}
|
|
16
|
-
return context.extractAst(node.getTemplate());
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
function processScript(args, argName, script) {
|
|
23
|
-
if (!args.getProperty(argName)) {
|
|
24
|
-
createNewScriptTemplate(args, argName, script);
|
|
25
|
-
}
|
|
26
|
-
else if ((0, IncludePlugin_1.fieldHasNowIncludeCallExpression)(args, argName)) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
const prop = args.getProperty(argName).asKindOrThrow(sdk_project_1.ts.SyntaxKind.PropertyAssignment);
|
|
31
|
-
const kind = prop.getInitializer()?.getKind();
|
|
32
|
-
if (kind === sdk_project_1.ts.SyntaxKind.TaggedTemplateExpression) {
|
|
33
|
-
const taggedTempExp = prop.getInitializer()?.asKind(sdk_project_1.ts.SyntaxKind.TaggedTemplateExpression);
|
|
34
|
-
updateTaggedTempExpWithScript(taggedTempExp, script);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
args.getProperty(argName)?.remove();
|
|
38
|
-
createNewScriptTemplate(args, argName, script);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function createNewScriptTemplate(args, argName, script) {
|
|
43
|
-
const prop = args.addPropertyAssignment({ name: argName, initializer: '"place_holder"' });
|
|
44
|
-
script = (0, sdk_build_core_1.escapeStringLiteralValues)(script);
|
|
45
|
-
prop.setInitializer((writer) => {
|
|
46
|
-
writer.write('`');
|
|
47
|
-
writer.write(script);
|
|
48
|
-
writer.write('`');
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function updateTaggedTempExpWithScript(node, script) {
|
|
52
|
-
const literal = node.getTemplate().asKind(sdk_project_1.ts.SyntaxKind.NoSubstitutionTemplateLiteral);
|
|
53
|
-
literal.setLiteralValue((0, sdk_build_core_1.escapeStringLiteralValues)(script));
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=ScriptTemplatePlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScriptTemplatePlugin.js","sourceRoot":"","sources":["../src/ScriptTemplatePlugin.ts"],"names":[],"mappings":";;AAqBA,sCAgBC;AArCD,+DAA8E;AAC9E,yDAA4C;AAC5C,mDAAkE;AAElE,kBAAe,IAAA,uBAAM,EAAC;IAClB,IAAI,EAAE,gBAAgB;IACtB,UAAU,EAAE;QACR,GAAG,EAAE;YACD,MAAM,EAAE;gBACJ,wBAAwB,CAAC,IAAI,EAAE,OAAO;oBAClC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;wBACvC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;oBAC7B,CAAC;oBAED,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAA;gBACjD,CAAC;aACJ;SACJ;KACJ;CACJ,CAAC,CAAA;AAEF,SAAgB,aAAa,CAAC,IAAgC,EAAE,OAAe,EAAE,MAAc;IAC3F,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;IAClD,CAAC;SAAM,IAAI,IAAA,gDAAgC,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;QACzD,OAAM;IACV,CAAC;SAAM,CAAC;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAE,CAAC,aAAa,CAAC,gBAAE,CAAC,UAAU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C"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { Context, Data, EntityData, ExtractionResult, LinkedDocument, ObjectData } from '@servicenow/sdk-build-core';
|
|
2
|
-
import { Diagnostic, ts, SupportedNode } from '@servicenow/sdk-project';
|
|
3
|
-
export declare class ModuleEntityData extends EntityData {
|
|
4
|
-
constructor(path: string, content: string, node: SupportedNode, context: Context);
|
|
5
|
-
}
|
|
6
|
-
export declare class ModuleFunctionData extends ObjectData<{
|
|
7
|
-
exportName: string;
|
|
8
|
-
modulePath: string;
|
|
9
|
-
isDefault: boolean;
|
|
10
|
-
}> {
|
|
11
|
-
constructor(name: string, module: ModuleEntityData, node: ts.FunctionDeclaration | ts.VariableDeclaration);
|
|
12
|
-
getGlueCode(callExpressionProvider: (functionName: string) => string): string;
|
|
13
|
-
static getGlueCode(scriptData: Data | ReturnType<ModuleFunctionData['getValue']> | undefined, callExpressionProvider: (functionName: string) => string): string;
|
|
14
|
-
}
|
|
15
|
-
declare function extractFunctionDeclaration(node: ts.FunctionDeclaration | ts.VariableDeclaration, context: Context): ExtractionResult<ModuleFunctionData>;
|
|
16
|
-
declare function extractDependency(node: ts.ImportDeclaration | ts.ExportDeclaration | ts.CallExpression, context: Context): ExtractionResult<EntityData<{
|
|
17
|
-
name: string;
|
|
18
|
-
version: string;
|
|
19
|
-
[entry: string]: string;
|
|
20
|
-
}>>;
|
|
21
|
-
declare const _default: {
|
|
22
|
-
readonly name: "ServerModule";
|
|
23
|
-
readonly extractors: {
|
|
24
|
-
readonly raw: {
|
|
25
|
-
readonly module: {
|
|
26
|
-
readonly FunctionDeclaration: typeof extractFunctionDeclaration;
|
|
27
|
-
readonly FunctionExpression: (node: ts.FunctionExpression, context: Context) => ExtractionResult<ModuleFunctionData>;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
readonly entity: {
|
|
31
|
-
readonly module: {
|
|
32
|
-
readonly SourceFile: (file: ts.SourceFile, context: Context) => {
|
|
33
|
-
handled: false;
|
|
34
|
-
diagnostics?: never;
|
|
35
|
-
data?: never;
|
|
36
|
-
} | {
|
|
37
|
-
handled: false;
|
|
38
|
-
diagnostics: Diagnostic[];
|
|
39
|
-
data?: never;
|
|
40
|
-
} | {
|
|
41
|
-
handled: true;
|
|
42
|
-
diagnostics: never[];
|
|
43
|
-
data: ModuleEntityData;
|
|
44
|
-
};
|
|
45
|
-
readonly ImportDeclaration: typeof extractDependency;
|
|
46
|
-
readonly ExportDeclaration: typeof extractDependency;
|
|
47
|
-
readonly CallExpression: typeof extractDependency;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
readonly composers: {
|
|
52
|
-
readonly entity: {
|
|
53
|
-
readonly module: (module: EntityData<Record<string, unknown>>) => Promise<undefined> | Promise<{
|
|
54
|
-
kind: string;
|
|
55
|
-
guid: string;
|
|
56
|
-
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;
|
|
57
|
-
data: Record<string, unknown>;
|
|
58
|
-
}>;
|
|
59
|
-
readonly dependency: (module: EntityData<Record<string, unknown>>, context: Context) => Promise<LinkedDocument[]>;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
readonly serializers: {
|
|
63
|
-
readonly module: (module: import("@servicenow/sdk-build-core").Document<string> & import("@servicenow/sdk-build-core").Arranged, context: Context) => {
|
|
64
|
-
name: `sys_module_${string}.xml`;
|
|
65
|
-
directory: "update";
|
|
66
|
-
content: string;
|
|
67
|
-
};
|
|
68
|
-
readonly dependency: (module: import("@servicenow/sdk-build-core").Document<string> & import("@servicenow/sdk-build-core").Arranged, context: Context) => {
|
|
69
|
-
name: `sys_module_${string}.xml`;
|
|
70
|
-
directory: "update";
|
|
71
|
-
content: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
export default _default;
|