@microsoft/sp-module-interfaces 1.20.2 → 1.21.0-beta.2
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/index-internal-beta.d.ts +59 -1
- package/dist/index-internal-public.d.ts +53 -1
- package/dist/index-internal.d.ts +760 -15
- package/lib-commonjs/index.js +31 -28
- package/lib-commonjs/manifestHelpers.js +22 -19
- package/lib-commonjs/manifestSchemaValidator.js +100 -63
- package/lib-commonjs/manifestSchemas/IAdaptiveCardExtensionManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideApplicationManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideAssemblyManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideComponentLoaderConfiguration.js +11 -3
- package/lib-commonjs/manifestSchemas/IClientSideComponentManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideExtensionManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideLibraryManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideManifestBase.js +10 -3
- package/lib-commonjs/manifestSchemas/IClientSideMultiVersionManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IClientSideWebPartManifest.js +62 -67
- package/lib-commonjs/manifestSchemas/ICommandSetExtensionManifest.js +5 -2
- package/lib-commonjs/manifestSchemas/IPrefabAppManifest.js +6 -0
- package/lib-commonjs/manifestSchemas/ManifestType.js +18 -13
- package/lib-commonjs/manifestSchemas/examples/application_1.manifest.js +24 -6
- package/lib-commonjs/manifestSchemas/examples/application_2.manifest.js +28 -7
- package/lib-commonjs/manifestSchemas/examples/application_3.manifest.js +22 -5
- package/lib-commonjs/manifestSchemas/examples/assembly_1.manifest.js +18 -4
- package/lib-commonjs/manifestSchemas/examples/commandSet_1.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/extension_1.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/extension_2.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/extension_3.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/extension_4.manifest.js +15 -3
- package/lib-commonjs/manifestSchemas/examples/library_1.manifest.js +18 -4
- package/lib-commonjs/manifestSchemas/examples/multi-version_1.manifest.js +24 -6
- package/lib-commonjs/manifestSchemas/examples/prefab_1.manifest.js +354 -0
- package/lib-commonjs/manifestSchemas/examples/prefab_2.manifest.js +391 -0
- package/lib-commonjs/manifestSchemas/examples/prefabapp.manifest.json +379 -0
- package/lib-commonjs/manifestSchemas/examples/webpart_1.manifest.js +24 -6
- package/lib-commonjs/manifestSchemas/examples/webpart_2.manifest.js +47 -12
- package/lib-commonjs/manifestSchemas/jsonSchemas/adaptive-card-extension-manifest.schema.json +8 -0
- package/lib-commonjs/manifestSchemas/jsonSchemas/client-side-component-manifest.schema.json +5 -2
- package/lib-commonjs/manifestSchemas/jsonSchemas/client-side-web-part-manifest.schema.json +23 -0
- package/lib-commonjs/manifestSchemas/jsonSchemas/prefab-app-manifest.schema.json +176 -0
- package/lib-commonjs/manifestSchemas/remote/draft-04.schema.json +137 -0
- package/lib-commonjs/manifestSchemas/remote/site-design-script-actions.schema.json +1158 -0
- package/{lib-commonjs → lib-dts}/index.d.ts +1 -0
- package/{lib-commonjs → lib-dts}/manifestSchemaValidator.d.ts +4 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/IAdaptiveCardExtensionManifest.d.ts +6 -0
- package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideComponentManifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideWebPartManifest.d.ts +33 -0
- package/lib-dts/manifestSchemas/IPrefabAppManifest.d.ts +255 -0
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/application_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/application_2.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/application_3.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/assembly_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/commandSet_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_2.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_3.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_4.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/library_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/multi-version_1.manifest.d.ts +1 -1
- package/lib-dts/manifestSchemas/examples/prefab_1.manifest.d.ts +4 -0
- package/lib-dts/manifestSchemas/examples/prefab_2.manifest.d.ts +4 -0
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/webpart_1.manifest.d.ts +1 -1
- package/{lib-commonjs → lib-dts}/manifestSchemas/examples/webpart_2.manifest.d.ts +1 -1
- package/{dist → lib-dts}/tsdoc-metadata.json +1 -1
- package/lib-esm/index.js +15 -0
- package/lib-esm/manifestHelpers.js +21 -0
- package/lib-esm/manifestSchemaValidator.js +135 -0
- package/lib-esm/manifestSchemas/IAdaptiveCardExtensionManifest.js +9 -0
- package/lib-esm/manifestSchemas/IClientSideApplicationManifest.js +5 -0
- package/lib-esm/manifestSchemas/IClientSideAssemblyManifest.js +7 -0
- package/lib-esm/manifestSchemas/IClientSideComponentLoaderConfiguration.js +17 -0
- package/lib-esm/manifestSchemas/IClientSideComponentManifest.js +27 -0
- package/lib-esm/manifestSchemas/IClientSideExtensionManifest.js +7 -0
- package/lib-esm/manifestSchemas/IClientSideLibraryManifest.js +7 -0
- package/lib-esm/manifestSchemas/IClientSideManifestBase.js +7 -0
- package/lib-esm/manifestSchemas/IClientSideMultiVersionManifest.js +25 -0
- package/lib-esm/manifestSchemas/IClientSideWebPartManifest.js +62 -0
- package/lib-esm/manifestSchemas/ICommandSetExtensionManifest.js +8 -0
- package/lib-esm/manifestSchemas/IPrefabAppManifest.js +7 -0
- package/lib-esm/manifestSchemas/ManifestType.js +15 -0
- package/lib-esm/manifestSchemas/examples/application.manifest.json +346 -0
- package/lib-esm/manifestSchemas/examples/application_1.manifest.js +344 -0
- package/lib-esm/manifestSchemas/examples/application_2.manifest.js +47 -0
- package/lib-esm/manifestSchemas/examples/application_3.manifest.js +42 -0
- package/lib-esm/manifestSchemas/examples/assembly.manifest.json +331 -0
- package/lib-esm/manifestSchemas/examples/assembly_1.manifest.js +336 -0
- package/lib-esm/manifestSchemas/examples/commandSet_1.manifest.js +42 -0
- package/lib-esm/manifestSchemas/examples/commandset.manifest.json +38 -0
- package/lib-esm/manifestSchemas/examples/extension.manifest.json +20 -0
- package/lib-esm/manifestSchemas/examples/extension_1.manifest.js +25 -0
- package/lib-esm/manifestSchemas/examples/extension_2.manifest.js +24 -0
- package/lib-esm/manifestSchemas/examples/extension_3.manifest.js +23 -0
- package/lib-esm/manifestSchemas/examples/extension_4.manifest.js +23 -0
- package/lib-esm/manifestSchemas/examples/library.manifest.json +330 -0
- package/lib-esm/manifestSchemas/examples/library_1.manifest.js +335 -0
- package/lib-esm/manifestSchemas/examples/multi-version_1.manifest.js +673 -0
- package/lib-esm/manifestSchemas/examples/multi-version_1.manifest.json +336 -0
- package/lib-esm/manifestSchemas/examples/prefab_1.manifest.js +344 -0
- package/lib-esm/manifestSchemas/examples/prefab_2.manifest.js +381 -0
- package/lib-esm/manifestSchemas/examples/prefabapp.manifest.json +379 -0
- package/lib-esm/manifestSchemas/examples/webpart.manifest.json +380 -0
- package/lib-esm/manifestSchemas/examples/webpart_1.manifest.js +350 -0
- package/lib-esm/manifestSchemas/examples/webpart_2.manifest.js +388 -0
- package/lib-esm/manifestSchemas/jsonSchemas/adaptive-card-extension-manifest.schema.json +230 -0
- package/lib-esm/manifestSchemas/jsonSchemas/any-value.schema.json +8 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-application-manifest.schema.json +138 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-assembly-manifest.schema.json +45 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-component-loader-configuration.schema.json +273 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-component-manifest.schema.json +131 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-extension-manifest.schema.json +61 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-library-manifest.schema.json +39 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-manifest-base.schema.json +25 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-multi-version-manifest.schema.json +118 -0
- package/lib-esm/manifestSchemas/jsonSchemas/client-side-web-part-manifest.schema.json +348 -0
- package/lib-esm/manifestSchemas/jsonSchemas/command-set-extension-manifest.schema.json +81 -0
- package/lib-esm/manifestSchemas/jsonSchemas/guid.schema.json +6 -0
- package/lib-esm/manifestSchemas/jsonSchemas/localized-string.schema.json +33 -0
- package/lib-esm/manifestSchemas/jsonSchemas/prefab-app-manifest.schema.json +176 -0
- package/lib-esm/manifestSchemas/jsonSchemas/semver.schema.json +8 -0
- package/lib-esm/manifestSchemas/remote/draft-04.schema.json +137 -0
- package/lib-esm/manifestSchemas/remote/site-design-script-actions.schema.json +1158 -0
- package/package.json +32 -11
- package/lib-commonjs/index.d.ts.map +0 -1
- package/lib-commonjs/manifestHelpers.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemaValidator.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IAdaptiveCardExtensionManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideApplicationManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideAssemblyManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideComponentLoaderConfiguration.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideComponentManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideExtensionManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideLibraryManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideManifestBase.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideMultiVersionManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/IClientSideWebPartManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/ICommandSetExtensionManifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/ManifestType.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/application_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/application_2.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/application_3.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/assembly_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/commandSet_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/extension_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/extension_2.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/extension_3.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/extension_4.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/library_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/multi-version_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/webpart_1.manifest.d.ts.map +0 -1
- package/lib-commonjs/manifestSchemas/examples/webpart_2.manifest.d.ts.map +0 -1
- /package/{lib-commonjs → lib-dts}/manifestHelpers.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideApplicationManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideAssemblyManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideComponentLoaderConfiguration.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideExtensionManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideLibraryManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideManifestBase.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideMultiVersionManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/ICommandSetExtensionManifest.d.ts +0 -0
- /package/{lib-commonjs → lib-dts}/manifestSchemas/ManifestType.d.ts +0 -0
package/lib-commonjs/index.js
CHANGED
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
_export_star(require("./manifestSchemas/IClientSideApplicationManifest"), exports);
|
|
6
|
+
_export_star(require("./manifestSchemas/IClientSideAssemblyManifest"), exports);
|
|
7
|
+
_export_star(require("./manifestSchemas/IClientSideComponentLoaderConfiguration"), exports);
|
|
8
|
+
_export_star(require("./manifestSchemas/IClientSideComponentManifest"), exports);
|
|
9
|
+
_export_star(require("./manifestSchemas/IClientSideExtensionManifest"), exports);
|
|
10
|
+
_export_star(require("./manifestSchemas/IClientSideLibraryManifest"), exports);
|
|
11
|
+
_export_star(require("./manifestSchemas/IClientSideManifestBase"), exports);
|
|
12
|
+
_export_star(require("./manifestSchemas/IClientSideMultiVersionManifest"), exports);
|
|
13
|
+
_export_star(require("./manifestSchemas/IClientSideWebPartManifest"), exports);
|
|
14
|
+
_export_star(require("./manifestSchemas/ICommandSetExtensionManifest"), exports);
|
|
15
|
+
_export_star(require("./manifestSchemas/ManifestType"), exports);
|
|
16
|
+
_export_star(require("./manifestSchemas/IAdaptiveCardExtensionManifest"), exports);
|
|
17
|
+
_export_star(require("./manifestSchemas/IPrefabAppManifest"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
|
+
Object.keys(from).forEach(function(k) {
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return from;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#sourceMappingUrl=./index.js.map
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isLocalizedPath: function() {
|
|
13
|
+
return isLocalizedPath;
|
|
14
|
+
},
|
|
15
|
+
isMultiVersionManifest: function() {
|
|
16
|
+
return isMultiVersionManifest;
|
|
17
|
+
},
|
|
18
|
+
isPath: function() {
|
|
19
|
+
return isPath;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
9
22
|
function isMultiVersionManifest(manifest) {
|
|
10
23
|
return !!manifest.versions;
|
|
11
24
|
}
|
|
12
|
-
exports.isMultiVersionManifest = isMultiVersionManifest;
|
|
13
|
-
/**
|
|
14
|
-
* @param config - The module loader configuration for the module.
|
|
15
|
-
* @returns If the module loads as a localized path.
|
|
16
|
-
*/
|
|
17
25
|
function isLocalizedPath(config) {
|
|
18
26
|
return config.type === 'localizedPath';
|
|
19
27
|
}
|
|
20
|
-
exports.isLocalizedPath = isLocalizedPath;
|
|
21
|
-
/**
|
|
22
|
-
* @param config - The module loader configuration for the module.
|
|
23
|
-
* @returns If the module loads as a non-localized path.
|
|
24
|
-
*/
|
|
25
28
|
function isPath(config) {
|
|
26
29
|
return config.type === 'path';
|
|
27
30
|
}
|
|
28
|
-
|
|
29
|
-
//#
|
|
31
|
+
|
|
32
|
+
//#sourceMappingUrl=./manifestHelpers.js.map
|
|
@@ -1,47 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
default: function() {
|
|
13
|
+
return ManifestValidator;
|
|
14
|
+
},
|
|
15
|
+
zSchemaOptions: function() {
|
|
16
|
+
return zSchemaOptions;
|
|
7
17
|
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
|
|
19
|
+
const _zschema = /*#__PURE__*/ _interop_require_default(require("z-schema"));
|
|
20
|
+
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
21
|
+
const _clientsidecomponentmanifestschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/jsonSchemas/client-side-component-manifest.schema.json"));
|
|
22
|
+
const _clientsideapplicationmanifestschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/jsonSchemas/client-side-application-manifest.schema.json"));
|
|
23
|
+
const _prefabappmanifestschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/jsonSchemas/prefab-app-manifest.schema.json"));
|
|
24
|
+
const _clientsidewebpartmanifestschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/jsonSchemas/client-side-web-part-manifest.schema.json"));
|
|
25
|
+
const _commandsetextensionmanifestschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/jsonSchemas/command-set-extension-manifest.schema.json"));
|
|
26
|
+
const _clientsideextensionmanifestschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/jsonSchemas/client-side-extension-manifest.schema.json"));
|
|
27
|
+
const _clientsidelibrarymanifestschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/jsonSchemas/client-side-library-manifest.schema.json"));
|
|
28
|
+
const _clientsideassemblymanifestschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/jsonSchemas/client-side-assembly-manifest.schema.json"));
|
|
29
|
+
const _clientsidemultiversionmanifestschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/jsonSchemas/client-side-multi-version-manifest.schema.json"));
|
|
30
|
+
const _sitedesignscriptactionsschemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/remote/site-design-script-actions.schema.json"));
|
|
31
|
+
const _draft04schemajson = /*#__PURE__*/ _interop_require_default(require("./manifestSchemas/remote/draft-04.schema.json"));
|
|
32
|
+
function _interop_require_default(obj) {
|
|
33
|
+
return obj && obj.__esModule ? obj : {
|
|
34
|
+
default: obj
|
|
35
|
+
};
|
|
36
|
+
}
|
|
32
37
|
// Discover the schema files
|
|
33
|
-
const schemasDirectory =
|
|
34
|
-
const schemaFiles =
|
|
35
|
-
const schemas = schemaFiles.map((schemaFile)
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
const schemasDirectory = `${__dirname}/manifestSchemas/jsonSchemas`;
|
|
39
|
+
const schemaFiles = _nodecorelibrary.FileSystem.readFolderItemNames(schemasDirectory);
|
|
40
|
+
const schemas = schemaFiles.map((schemaFile)=>require(`${schemasDirectory}/${schemaFile}`));
|
|
41
|
+
const SITE_SCRIPTS_SCHEMA_URL = 'https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json';
|
|
42
|
+
const DRAFT_07_SCHEMA_URL = 'http://json-schema.org/draft-07/schema#';
|
|
43
|
+
const siteScriptsSchemaPromise = fetch(SITE_SCRIPTS_SCHEMA_URL).then((response)=>{
|
|
44
|
+
return response.text();
|
|
45
|
+
}).catch((error)=>{
|
|
46
|
+
// eslint-disable-next-line no-console
|
|
47
|
+
console.error(`Failed to fetch remote schema: ${error}`);
|
|
48
|
+
// fallback to local copy
|
|
49
|
+
return JSON.stringify(_sitedesignscriptactionsschemajson.default);
|
|
50
|
+
});
|
|
51
|
+
const zSchemaOptions = {
|
|
45
52
|
breakOnFirstError: true,
|
|
46
53
|
forceAdditional: true,
|
|
47
54
|
forceItems: true,
|
|
@@ -51,56 +58,86 @@ exports.zSchemaOptions = {
|
|
|
51
58
|
noTypeless: true,
|
|
52
59
|
noEmptyStrings: true
|
|
53
60
|
};
|
|
54
|
-
const schemaValidator = new
|
|
55
|
-
|
|
61
|
+
const schemaValidator = new _zschema.default(zSchemaOptions);
|
|
62
|
+
const draft07ValidationOptions = {
|
|
63
|
+
strictMode: false,
|
|
64
|
+
ignoreUnresolvableReferences: true,
|
|
65
|
+
ignoreUnknownFormats: true
|
|
66
|
+
};
|
|
67
|
+
//
|
|
68
|
+
// this one is needed for the site scripts reference.
|
|
69
|
+
// We're faking draft-07 schema with draft-04 schema as z-schema doesn't support draft-07
|
|
70
|
+
//
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
+
schemaValidator.setRemoteReference(DRAFT_07_SCHEMA_URL, _draft04schemajson.default, draft07ValidationOptions);
|
|
73
|
+
siteScriptsSchemaPromise.then((remoteSchema)=>{
|
|
74
|
+
// ZSchema typedef doesn't contain setRemoteReference method. But it does exist in the implementation and referenced in the documentation.
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
76
|
+
schemaValidator.setRemoteReference(SITE_SCRIPTS_SCHEMA_URL, JSON.parse(remoteSchema), {
|
|
77
|
+
strictMode: false,
|
|
78
|
+
ignoreUnresolvableReferences: true
|
|
79
|
+
});
|
|
80
|
+
schemaValidator.validateSchema(schemas);
|
|
81
|
+
}).catch((error)=>{
|
|
82
|
+
// swallowing the error here
|
|
83
|
+
});
|
|
56
84
|
class ManifestValidator {
|
|
85
|
+
static registerRemoteSchemaReferences() {
|
|
86
|
+
return siteScriptsSchemaPromise.then(()=>{
|
|
87
|
+
// no-op;
|
|
88
|
+
}).catch(()=>{
|
|
89
|
+
// no-op;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
57
92
|
static validateApplicationManifest(manifest) {
|
|
58
|
-
return ManifestValidator._validateManifest(manifest,
|
|
93
|
+
return ManifestValidator._validateManifest(manifest, _clientsideapplicationmanifestschemajson.default);
|
|
94
|
+
}
|
|
95
|
+
static validatePrefabAppManifest(manifest) {
|
|
96
|
+
return ManifestValidator._validateManifest(manifest, _prefabappmanifestschemajson.default);
|
|
59
97
|
}
|
|
60
98
|
static validateCommandSetManifest(manifest) {
|
|
61
|
-
return ManifestValidator._validateManifest(manifest,
|
|
99
|
+
return ManifestValidator._validateManifest(manifest, _commandsetextensionmanifestschemajson.default);
|
|
62
100
|
}
|
|
63
101
|
static validateExtensionManifest(manifest) {
|
|
64
|
-
return ManifestValidator._validateManifest(manifest,
|
|
102
|
+
return ManifestValidator._validateManifest(manifest, _clientsideextensionmanifestschemajson.default);
|
|
65
103
|
}
|
|
66
|
-
static validateWebPartManifest(
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
104
|
+
static validateWebPartManifest(// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
105
|
manifest) {
|
|
69
|
-
return ManifestValidator._validateManifest(manifest,
|
|
106
|
+
return ManifestValidator._validateManifest(manifest, _clientsidewebpartmanifestschemajson.default);
|
|
70
107
|
}
|
|
71
108
|
static validateLibraryManifest(manifest) {
|
|
72
|
-
return ManifestValidator._validateManifest(manifest,
|
|
109
|
+
return ManifestValidator._validateManifest(manifest, _clientsidelibrarymanifestschemajson.default);
|
|
73
110
|
}
|
|
74
111
|
static validateAssemblyManifest(manifest) {
|
|
75
|
-
return ManifestValidator._validateManifest(manifest,
|
|
112
|
+
return ManifestValidator._validateManifest(manifest, _clientsideassemblymanifestschemajson.default);
|
|
76
113
|
}
|
|
77
|
-
static validateMultiVersionManifest(
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
114
|
+
static validateMultiVersionManifest(// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
115
|
manifest) {
|
|
80
|
-
return ManifestValidator._validateManifest(manifest,
|
|
116
|
+
return ManifestValidator._validateManifest(manifest, _clientsidemultiversionmanifestschemajson.default);
|
|
81
117
|
}
|
|
82
118
|
static validateManifest(manifest) {
|
|
83
|
-
return ManifestValidator._validateManifest(manifest,
|
|
119
|
+
return ManifestValidator._validateManifest(manifest, _clientsidecomponentmanifestschemajson.default);
|
|
84
120
|
}
|
|
85
121
|
static extractInnerErrorMessages(errors) {
|
|
86
|
-
const printZSchemaError = (error)
|
|
122
|
+
const printZSchemaError = (error)=>{
|
|
87
123
|
let innerErrors = [];
|
|
88
|
-
(error.inner || []).forEach((innerErr)
|
|
124
|
+
(error.inner || []).forEach((innerErr)=>{
|
|
89
125
|
innerErrors = innerErrors.concat(printZSchemaError(innerErr));
|
|
90
126
|
});
|
|
91
|
-
return [
|
|
127
|
+
return [
|
|
128
|
+
`(${error.path}) ${error.message}`
|
|
129
|
+
].concat(innerErrors);
|
|
92
130
|
};
|
|
93
131
|
let errorList = [];
|
|
94
|
-
errors.map((error)
|
|
132
|
+
errors.map((error)=>{
|
|
95
133
|
errorList = errorList.concat(printZSchemaError(error));
|
|
96
134
|
});
|
|
97
135
|
return errorList;
|
|
98
136
|
}
|
|
99
137
|
static getFormattedErrorMessage(errors) {
|
|
100
|
-
return this.extractInnerErrorMessages(errors).join(
|
|
138
|
+
return this.extractInnerErrorMessages(errors).join('\n');
|
|
101
139
|
}
|
|
102
|
-
static _validateManifest(
|
|
103
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
140
|
+
static _validateManifest(// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
104
141
|
manifest, schema) {
|
|
105
142
|
if (!schema) {
|
|
106
143
|
throw new Error('Unable to find the manifest schema.');
|
|
@@ -115,5 +152,5 @@ class ManifestValidator {
|
|
|
115
152
|
};
|
|
116
153
|
}
|
|
117
154
|
}
|
|
118
|
-
|
|
119
|
-
//#
|
|
155
|
+
|
|
156
|
+
//#sourceMappingUrl=./manifestSchemaValidator.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
|
|
6
|
+
//#sourceMappingUrl=./IAdaptiveCardExtensionManifest.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
|
|
6
|
+
//#sourceMappingUrl=./IClientSideApplicationManifest.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
|
|
6
|
+
//#sourceMappingUrl=./IClientSideAssemblyManifest.js.map
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This interface describes how a client-side component is to be loaded and initialized by a SharePoint client
|
|
3
|
+
* framework. It contains all data for loading an entrypoint script and its dependency scripts.
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
*/ "use strict";
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
//#sourceMappingUrl=./IClientSideComponentLoaderConfiguration.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
|
|
6
|
+
//#sourceMappingUrl=./IClientSideComponentManifest.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
|
|
6
|
+
//#sourceMappingUrl=./IClientSideExtensionManifest.js.map
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This interface defines members that are common between all deployable manifests.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/ "use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
//#sourceMappingUrl=./IClientSideManifestBase.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
|
|
6
|
+
//#sourceMappingUrl=./IClientSideMultiVersionManifest.js.map
|
|
@@ -1,77 +1,72 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "PredefinedGroup", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return PredefinedGroup;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
9
11
|
var PredefinedGroup;
|
|
10
|
-
(function
|
|
12
|
+
(function(PredefinedGroup) {
|
|
11
13
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
PredefinedGroup["TextMediaAndContent"] = "cf066440-0614-43d6-98ae-0b31cf14c7c3";
|
|
14
|
+
* Text, media and content.
|
|
15
|
+
*
|
|
16
|
+
* This group includes web parts that display text, multi-media, documents, information from the web, and other
|
|
17
|
+
* rich content.
|
|
18
|
+
*
|
|
19
|
+
* @beta
|
|
20
|
+
*/ PredefinedGroup["TextMediaAndContent"] = "cf066440-0614-43d6-98ae-0b31cf14c7c3";
|
|
20
21
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
PredefinedGroup["DocumentsListsAndLibraries"] = "1edbd9a8-0bfb-4aa2-9afd-14b8c45dd489";
|
|
22
|
+
* Discovery.
|
|
23
|
+
*
|
|
24
|
+
* This group includes web parts that organize, group, and filter content to help users discover information.
|
|
25
|
+
*
|
|
26
|
+
* @beta
|
|
27
|
+
*/ PredefinedGroup["DocumentsListsAndLibraries"] = "1edbd9a8-0bfb-4aa2-9afd-14b8c45dd489";
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
PredefinedGroup["Feeds"] = "75e22ed5-fa14-4829-850a-c890608aca2d";
|
|
29
|
+
* Communication and collaboration.
|
|
30
|
+
*
|
|
31
|
+
* This group includes web parts that facilitate information sharing, team work, and social interactions.
|
|
32
|
+
*
|
|
33
|
+
* @beta
|
|
34
|
+
*/ PredefinedGroup["Feeds"] = "75e22ed5-fa14-4829-850a-c890608aca2d";
|
|
36
35
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
PredefinedGroup["NewsPeopleAndEvents"] = "1bc7927e-4a5e-4520-b540-71305c79c20a";
|
|
36
|
+
* Planning and process.
|
|
37
|
+
*
|
|
38
|
+
* This group includes web parts that empower team productivity with the use of planning and process tools.
|
|
39
|
+
*
|
|
40
|
+
* @beta
|
|
41
|
+
*/ PredefinedGroup["NewsPeopleAndEvents"] = "1bc7927e-4a5e-4520-b540-71305c79c20a";
|
|
44
42
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
PredefinedGroup["DataAnalysis"] = "4aca9e90-eff5-4fa1-bac7-728f5f157b66";
|
|
43
|
+
* Business and intelligence.
|
|
44
|
+
*
|
|
45
|
+
* This group includes web parts for tracking and analyzing data, and for integrating business flow with pages.
|
|
46
|
+
*
|
|
47
|
+
* @beta
|
|
48
|
+
*/ PredefinedGroup["DataAnalysis"] = "4aca9e90-eff5-4fa1-bac7-728f5f157b66";
|
|
52
49
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
PredefinedGroup["RegionalInformation"] = "cfc8bda5-cb9b-49e3-8526-2ee6e52b256a";
|
|
50
|
+
* Regional information
|
|
51
|
+
*
|
|
52
|
+
* This group includes web parts that display information based on current region and geographical location
|
|
53
|
+
*
|
|
54
|
+
* @beta
|
|
55
|
+
*/ PredefinedGroup["RegionalInformation"] = "cfc8bda5-cb9b-49e3-8526-2ee6e52b256a";
|
|
60
56
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
PredefinedGroup["Advanced"] = "5c03119e-3074-46fd-976b-c60198311f70";
|
|
57
|
+
* Other.
|
|
58
|
+
*
|
|
59
|
+
* This group includes web parts not in other groups.
|
|
60
|
+
*
|
|
61
|
+
* @beta
|
|
62
|
+
*/ PredefinedGroup["Advanced"] = "5c03119e-3074-46fd-976b-c60198311f70";
|
|
68
63
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
//#
|
|
64
|
+
* Other.
|
|
65
|
+
*
|
|
66
|
+
* This group includes local web parts.
|
|
67
|
+
*
|
|
68
|
+
* @beta
|
|
69
|
+
*/ PredefinedGroup["Local"] = "8b7bf6f1-a56a-4aa3-8657-7eb6e7e6af61";
|
|
70
|
+
})(PredefinedGroup || (PredefinedGroup = {}));
|
|
71
|
+
|
|
72
|
+
//#sourceMappingUrl=./IClientSideWebPartManifest.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
|
|
6
|
+
//#sourceMappingUrl=./ICommandSetExtensionManifest.js.map
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ManifestType = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* The type of the manifest.
|
|
6
3
|
*
|
|
7
4
|
* @alpha
|
|
8
|
-
*/
|
|
5
|
+
*/ "use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
Object.defineProperty(exports, "ManifestType", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return ManifestType;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
9
15
|
var ManifestType;
|
|
10
|
-
(function
|
|
16
|
+
(function(ManifestType) {
|
|
11
17
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ManifestType["component"] = "Component";
|
|
18
|
+
* The component manifest type.
|
|
19
|
+
*/ ManifestType["component"] = "Component";
|
|
15
20
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//#
|
|
21
|
+
* The container manifest type. This is used for manifests that contain other manifests, like multiversion manifests.
|
|
22
|
+
*/ ManifestType["container"] = "Container";
|
|
23
|
+
})(ManifestType || (ManifestType = {}));
|
|
24
|
+
|
|
25
|
+
//#sourceMappingUrl=./ManifestType.js.map
|