@microsoft/sp-module-interfaces 1.21.0-beta.0 → 1.21.0-rc.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.
Files changed (158) hide show
  1. package/dist/index-internal-beta.d.ts +15 -3
  2. package/dist/index-internal-public.d.ts +47 -2
  3. package/dist/index-internal.d.ts +29 -710
  4. package/lib-commonjs/index.js +31 -29
  5. package/lib-commonjs/manifestHelpers.js +22 -19
  6. package/lib-commonjs/manifestSchemaValidator.js +70 -84
  7. package/lib-commonjs/manifestSchemas/IAdaptiveCardExtensionManifest.js +5 -2
  8. package/lib-commonjs/manifestSchemas/IClientSideApplicationManifest.js +5 -2
  9. package/lib-commonjs/manifestSchemas/IClientSideAssemblyManifest.js +5 -2
  10. package/lib-commonjs/manifestSchemas/IClientSideComponentLoaderConfiguration.js +11 -3
  11. package/lib-commonjs/manifestSchemas/IClientSideComponentManifest.js +5 -2
  12. package/lib-commonjs/manifestSchemas/IClientSideExtensionManifest.js +5 -2
  13. package/lib-commonjs/manifestSchemas/IClientSideLibraryManifest.js +5 -2
  14. package/lib-commonjs/manifestSchemas/IClientSideManifestBase.js +10 -3
  15. package/lib-commonjs/manifestSchemas/IClientSideMultiVersionManifest.js +5 -2
  16. package/lib-commonjs/manifestSchemas/IClientSideWebPartManifest.js +62 -67
  17. package/lib-commonjs/manifestSchemas/ICommandSetExtensionManifest.js +5 -2
  18. package/lib-commonjs/manifestSchemas/IPrefabAppManifest.js +5 -2
  19. package/lib-commonjs/manifestSchemas/ManifestType.js +18 -13
  20. package/lib-commonjs/manifestSchemas/examples/application_1.manifest.js +24 -6
  21. package/lib-commonjs/manifestSchemas/examples/application_2.manifest.js +28 -7
  22. package/lib-commonjs/manifestSchemas/examples/application_3.manifest.js +22 -5
  23. package/lib-commonjs/manifestSchemas/examples/assembly_1.manifest.js +18 -4
  24. package/lib-commonjs/manifestSchemas/examples/commandSet_1.manifest.js +15 -3
  25. package/lib-commonjs/manifestSchemas/examples/extension_1.manifest.js +15 -3
  26. package/lib-commonjs/manifestSchemas/examples/extension_2.manifest.js +15 -3
  27. package/lib-commonjs/manifestSchemas/examples/extension_3.manifest.js +15 -3
  28. package/lib-commonjs/manifestSchemas/examples/extension_4.manifest.js +15 -3
  29. package/lib-commonjs/manifestSchemas/examples/library_1.manifest.js +18 -4
  30. package/lib-commonjs/manifestSchemas/examples/multi-version_1.manifest.js +24 -6
  31. package/lib-commonjs/manifestSchemas/examples/prefab_1.manifest.js +27 -7
  32. package/lib-commonjs/manifestSchemas/examples/prefab_2.manifest.js +61 -9
  33. package/lib-commonjs/manifestSchemas/examples/prefabapp.manifest.json +37 -3
  34. package/lib-commonjs/manifestSchemas/examples/webpart_1.manifest.js +24 -6
  35. package/lib-commonjs/manifestSchemas/examples/webpart_2.manifest.js +47 -12
  36. package/lib-commonjs/manifestSchemas/jsonSchemas/prefab-app-manifest.schema.json +107 -3
  37. package/{lib-commonjs → lib-dts}/manifestSchemaValidator.d.ts +1 -1
  38. package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideWebPartManifest.d.ts +1 -3
  39. package/lib-dts/manifestSchemas/IPrefabAppManifest.d.ts +255 -0
  40. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/application_1.manifest.d.ts +1 -1
  41. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/application_2.manifest.d.ts +1 -1
  42. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/application_3.manifest.d.ts +1 -1
  43. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/assembly_1.manifest.d.ts +1 -1
  44. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/commandSet_1.manifest.d.ts +1 -1
  45. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_1.manifest.d.ts +1 -1
  46. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_2.manifest.d.ts +1 -1
  47. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_3.manifest.d.ts +1 -1
  48. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/extension_4.manifest.d.ts +1 -1
  49. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/library_1.manifest.d.ts +1 -1
  50. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/multi-version_1.manifest.d.ts +1 -1
  51. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/prefab_1.manifest.d.ts +1 -1
  52. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/prefab_2.manifest.d.ts +1 -1
  53. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/webpart_1.manifest.d.ts +1 -1
  54. package/{lib-commonjs → lib-dts}/manifestSchemas/examples/webpart_2.manifest.d.ts +1 -1
  55. package/{dist → lib-dts}/tsdoc-metadata.json +1 -1
  56. package/lib-esm/index.js +15 -0
  57. package/lib-esm/manifestHelpers.js +21 -0
  58. package/lib-esm/manifestSchemaValidator.js +135 -0
  59. package/lib-esm/manifestSchemas/IAdaptiveCardExtensionManifest.js +9 -0
  60. package/lib-esm/manifestSchemas/IClientSideApplicationManifest.js +5 -0
  61. package/lib-esm/manifestSchemas/IClientSideAssemblyManifest.js +7 -0
  62. package/lib-esm/manifestSchemas/IClientSideComponentLoaderConfiguration.js +17 -0
  63. package/lib-esm/manifestSchemas/IClientSideComponentManifest.js +27 -0
  64. package/lib-esm/manifestSchemas/IClientSideExtensionManifest.js +7 -0
  65. package/lib-esm/manifestSchemas/IClientSideLibraryManifest.js +7 -0
  66. package/lib-esm/manifestSchemas/IClientSideManifestBase.js +7 -0
  67. package/lib-esm/manifestSchemas/IClientSideMultiVersionManifest.js +25 -0
  68. package/lib-esm/manifestSchemas/IClientSideWebPartManifest.js +62 -0
  69. package/lib-esm/manifestSchemas/ICommandSetExtensionManifest.js +8 -0
  70. package/lib-esm/manifestSchemas/IPrefabAppManifest.js +7 -0
  71. package/lib-esm/manifestSchemas/ManifestType.js +15 -0
  72. package/lib-esm/manifestSchemas/examples/application.manifest.json +346 -0
  73. package/lib-esm/manifestSchemas/examples/application_1.manifest.js +344 -0
  74. package/lib-esm/manifestSchemas/examples/application_2.manifest.js +47 -0
  75. package/lib-esm/manifestSchemas/examples/application_3.manifest.js +42 -0
  76. package/lib-esm/manifestSchemas/examples/assembly.manifest.json +331 -0
  77. package/lib-esm/manifestSchemas/examples/assembly_1.manifest.js +336 -0
  78. package/lib-esm/manifestSchemas/examples/commandSet_1.manifest.js +42 -0
  79. package/lib-esm/manifestSchemas/examples/commandset.manifest.json +38 -0
  80. package/lib-esm/manifestSchemas/examples/extension.manifest.json +20 -0
  81. package/lib-esm/manifestSchemas/examples/extension_1.manifest.js +25 -0
  82. package/lib-esm/manifestSchemas/examples/extension_2.manifest.js +24 -0
  83. package/lib-esm/manifestSchemas/examples/extension_3.manifest.js +23 -0
  84. package/lib-esm/manifestSchemas/examples/extension_4.manifest.js +23 -0
  85. package/lib-esm/manifestSchemas/examples/library.manifest.json +330 -0
  86. package/lib-esm/manifestSchemas/examples/library_1.manifest.js +335 -0
  87. package/lib-esm/manifestSchemas/examples/multi-version_1.manifest.js +673 -0
  88. package/lib-esm/manifestSchemas/examples/multi-version_1.manifest.json +336 -0
  89. package/lib-esm/manifestSchemas/examples/prefab_1.manifest.js +344 -0
  90. package/lib-esm/manifestSchemas/examples/prefab_2.manifest.js +381 -0
  91. package/lib-esm/manifestSchemas/examples/prefabapp.manifest.json +379 -0
  92. package/lib-esm/manifestSchemas/examples/webpart.manifest.json +380 -0
  93. package/lib-esm/manifestSchemas/examples/webpart_1.manifest.js +350 -0
  94. package/lib-esm/manifestSchemas/examples/webpart_2.manifest.js +388 -0
  95. package/lib-esm/manifestSchemas/jsonSchemas/adaptive-card-extension-manifest.schema.json +230 -0
  96. package/lib-esm/manifestSchemas/jsonSchemas/any-value.schema.json +8 -0
  97. package/lib-esm/manifestSchemas/jsonSchemas/client-side-application-manifest.schema.json +138 -0
  98. package/lib-esm/manifestSchemas/jsonSchemas/client-side-assembly-manifest.schema.json +45 -0
  99. package/lib-esm/manifestSchemas/jsonSchemas/client-side-component-loader-configuration.schema.json +273 -0
  100. package/lib-esm/manifestSchemas/jsonSchemas/client-side-component-manifest.schema.json +131 -0
  101. package/lib-esm/manifestSchemas/jsonSchemas/client-side-extension-manifest.schema.json +61 -0
  102. package/lib-esm/manifestSchemas/jsonSchemas/client-side-library-manifest.schema.json +39 -0
  103. package/lib-esm/manifestSchemas/jsonSchemas/client-side-manifest-base.schema.json +25 -0
  104. package/lib-esm/manifestSchemas/jsonSchemas/client-side-multi-version-manifest.schema.json +118 -0
  105. package/lib-esm/manifestSchemas/jsonSchemas/client-side-web-part-manifest.schema.json +348 -0
  106. package/lib-esm/manifestSchemas/jsonSchemas/command-set-extension-manifest.schema.json +81 -0
  107. package/lib-esm/manifestSchemas/jsonSchemas/guid.schema.json +6 -0
  108. package/lib-esm/manifestSchemas/jsonSchemas/localized-string.schema.json +33 -0
  109. package/lib-esm/manifestSchemas/jsonSchemas/prefab-app-manifest.schema.json +176 -0
  110. package/lib-esm/manifestSchemas/jsonSchemas/semver.schema.json +8 -0
  111. package/lib-esm/manifestSchemas/remote/draft-04.schema.json +137 -0
  112. package/lib-esm/manifestSchemas/remote/site-design-script-actions.schema.json +1158 -0
  113. package/package.json +27 -7
  114. package/lib-commonjs/index.d.ts.map +0 -1
  115. package/lib-commonjs/manifestHelpers.d.ts.map +0 -1
  116. package/lib-commonjs/manifestSchemaValidator.d.ts.map +0 -1
  117. package/lib-commonjs/manifestSchemas/IAdaptiveCardExtensionManifest.d.ts.map +0 -1
  118. package/lib-commonjs/manifestSchemas/IClientSideApplicationManifest.d.ts.map +0 -1
  119. package/lib-commonjs/manifestSchemas/IClientSideAssemblyManifest.d.ts.map +0 -1
  120. package/lib-commonjs/manifestSchemas/IClientSideComponentLoaderConfiguration.d.ts.map +0 -1
  121. package/lib-commonjs/manifestSchemas/IClientSideComponentManifest.d.ts.map +0 -1
  122. package/lib-commonjs/manifestSchemas/IClientSideExtensionManifest.d.ts.map +0 -1
  123. package/lib-commonjs/manifestSchemas/IClientSideLibraryManifest.d.ts.map +0 -1
  124. package/lib-commonjs/manifestSchemas/IClientSideManifestBase.d.ts.map +0 -1
  125. package/lib-commonjs/manifestSchemas/IClientSideMultiVersionManifest.d.ts.map +0 -1
  126. package/lib-commonjs/manifestSchemas/IClientSideWebPartManifest.d.ts.map +0 -1
  127. package/lib-commonjs/manifestSchemas/ICommandSetExtensionManifest.d.ts.map +0 -1
  128. package/lib-commonjs/manifestSchemas/IPrefabAppManifest.d.ts +0 -76
  129. package/lib-commonjs/manifestSchemas/IPrefabAppManifest.d.ts.map +0 -1
  130. package/lib-commonjs/manifestSchemas/ManifestType.d.ts.map +0 -1
  131. package/lib-commonjs/manifestSchemas/examples/application_1.manifest.d.ts.map +0 -1
  132. package/lib-commonjs/manifestSchemas/examples/application_2.manifest.d.ts.map +0 -1
  133. package/lib-commonjs/manifestSchemas/examples/application_3.manifest.d.ts.map +0 -1
  134. package/lib-commonjs/manifestSchemas/examples/assembly_1.manifest.d.ts.map +0 -1
  135. package/lib-commonjs/manifestSchemas/examples/commandSet_1.manifest.d.ts.map +0 -1
  136. package/lib-commonjs/manifestSchemas/examples/extension_1.manifest.d.ts.map +0 -1
  137. package/lib-commonjs/manifestSchemas/examples/extension_2.manifest.d.ts.map +0 -1
  138. package/lib-commonjs/manifestSchemas/examples/extension_3.manifest.d.ts.map +0 -1
  139. package/lib-commonjs/manifestSchemas/examples/extension_4.manifest.d.ts.map +0 -1
  140. package/lib-commonjs/manifestSchemas/examples/library_1.manifest.d.ts.map +0 -1
  141. package/lib-commonjs/manifestSchemas/examples/multi-version_1.manifest.d.ts.map +0 -1
  142. package/lib-commonjs/manifestSchemas/examples/prefab_1.manifest.d.ts.map +0 -1
  143. package/lib-commonjs/manifestSchemas/examples/prefab_2.manifest.d.ts.map +0 -1
  144. package/lib-commonjs/manifestSchemas/examples/webpart_1.manifest.d.ts.map +0 -1
  145. package/lib-commonjs/manifestSchemas/examples/webpart_2.manifest.d.ts.map +0 -1
  146. /package/{lib-commonjs → lib-dts}/index.d.ts +0 -0
  147. /package/{lib-commonjs → lib-dts}/manifestHelpers.d.ts +0 -0
  148. /package/{lib-commonjs → lib-dts}/manifestSchemas/IAdaptiveCardExtensionManifest.d.ts +0 -0
  149. /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideApplicationManifest.d.ts +0 -0
  150. /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideAssemblyManifest.d.ts +0 -0
  151. /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideComponentLoaderConfiguration.d.ts +0 -0
  152. /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideComponentManifest.d.ts +0 -0
  153. /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideExtensionManifest.d.ts +0 -0
  154. /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideLibraryManifest.d.ts +0 -0
  155. /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideManifestBase.d.ts +0 -0
  156. /package/{lib-commonjs → lib-dts}/manifestSchemas/IClientSideMultiVersionManifest.d.ts +0 -0
  157. /package/{lib-commonjs → lib-dts}/manifestSchemas/ICommandSetExtensionManifest.d.ts +0 -0
  158. /package/{lib-commonjs → lib-dts}/manifestSchemas/ManifestType.d.ts +0 -0
@@ -1,30 +1,32 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./manifestSchemas/IClientSideApplicationManifest"), exports);
18
- __exportStar(require("./manifestSchemas/IClientSideAssemblyManifest"), exports);
19
- __exportStar(require("./manifestSchemas/IClientSideComponentLoaderConfiguration"), exports);
20
- __exportStar(require("./manifestSchemas/IClientSideComponentManifest"), exports);
21
- __exportStar(require("./manifestSchemas/IClientSideExtensionManifest"), exports);
22
- __exportStar(require("./manifestSchemas/IClientSideLibraryManifest"), exports);
23
- __exportStar(require("./manifestSchemas/IClientSideManifestBase"), exports);
24
- __exportStar(require("./manifestSchemas/IClientSideMultiVersionManifest"), exports);
25
- __exportStar(require("./manifestSchemas/IClientSideWebPartManifest"), exports);
26
- __exportStar(require("./manifestSchemas/ICommandSetExtensionManifest"), exports);
27
- __exportStar(require("./manifestSchemas/ManifestType"), exports);
28
- __exportStar(require("./manifestSchemas/IAdaptiveCardExtensionManifest"), exports);
29
- __exportStar(require("./manifestSchemas/IPrefabAppManifest"), exports);
30
- //# sourceMappingURL=index.js.map
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", { value: true });
3
- exports.isPath = exports.isLocalizedPath = exports.isMultiVersionManifest = void 0;
4
- /**
5
- * Identifies if a component manifest is a multi-version manifest.
6
- * @param manifest - The manifest for a component, which may have multiple versions
7
- * @returns If the manifest has multiple versions
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
- exports.isPath = isPath;
29
- //# sourceMappingURL=manifestHelpers.js.map
31
+
32
+ //#sourceMappingUrl=./manifestHelpers.js.map
@@ -1,63 +1,54 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
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
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.zSchemaOptions = void 0;
27
- exports.ZSchema = require("z-schema");
28
- // @todo 264263 - utilize the schema validator in sp-build-common
29
- const fs = __importStar(require("fs"));
30
- const os_1 = require("os");
31
- const path = __importStar(require("path"));
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 = path.join(__dirname, 'manifestSchemas', 'jsonSchemas');
34
- const schemaFiles = fs.readdirSync(schemasDirectory);
35
- const schemas = schemaFiles.map((schemaFile) => require(path.join(schemasDirectory, schemaFile)));
36
- const manifestSchema = require('./manifestSchemas/jsonSchemas/client-side-component-manifest.schema.json');
37
- const applicationSchema = require('./manifestSchemas/jsonSchemas/client-side-application-manifest.schema.json');
38
- const prefabAppSchema = require('./manifestSchemas/jsonSchemas/prefab-app-manifest.schema.json');
39
- const webPartSchema = require('./manifestSchemas/jsonSchemas/client-side-web-part-manifest.schema.json');
40
- const commandSetSchema = require('./manifestSchemas/jsonSchemas/command-set-extension-manifest.schema.json');
41
- const extensionSchema = require('./manifestSchemas/jsonSchemas/client-side-extension-manifest.schema.json');
42
- const librarySchema = require('./manifestSchemas/jsonSchemas/client-side-library-manifest.schema.json');
43
- const assemblySchema = require('./manifestSchemas/jsonSchemas/client-side-assembly-manifest.schema.json');
44
- const multiVersionSchema = require('./manifestSchemas/jsonSchemas/client-side-multi-version-manifest.schema.json');
45
- // local copy of site scripts schema and draft-07 schema
46
- const siteScriptsSchema = require('./manifestSchemas/remote/site-design-script-actions.schema.json');
47
- const draft04Schema = require('./manifestSchemas/remote/draft-04.schema.json');
38
+ const schemasDirectory = `${__dirname}/manifestSchemas/jsonSchemas`;
39
+ const schemaFiles = _nodecorelibrary.FileSystem.readFolderItemNames(schemasDirectory);
40
+ const schemas = schemaFiles.map((schemaFile)=>require(`${schemasDirectory}/${schemaFile}`));
48
41
  const SITE_SCRIPTS_SCHEMA_URL = 'https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json';
49
42
  const DRAFT_07_SCHEMA_URL = 'http://json-schema.org/draft-07/schema#';
50
- const siteScriptsSchemaPromise = fetch(SITE_SCRIPTS_SCHEMA_URL)
51
- .then((response) => {
43
+ const siteScriptsSchemaPromise = fetch(SITE_SCRIPTS_SCHEMA_URL).then((response)=>{
52
44
  return response.text();
53
- })
54
- .catch((error) => {
45
+ }).catch((error)=>{
55
46
  // eslint-disable-next-line no-console
56
47
  console.error(`Failed to fetch remote schema: ${error}`);
57
48
  // fallback to local copy
58
- return JSON.stringify(siteScriptsSchema);
49
+ return JSON.stringify(_sitedesignscriptactionsschemajson.default);
59
50
  });
60
- exports.zSchemaOptions = {
51
+ const zSchemaOptions = {
61
52
  breakOnFirstError: true,
62
53
  forceAdditional: true,
63
54
  forceItems: true,
@@ -67,7 +58,7 @@ exports.zSchemaOptions = {
67
58
  noTypeless: true,
68
59
  noEmptyStrings: true
69
60
  };
70
- const schemaValidator = new exports.ZSchema(exports.zSchemaOptions);
61
+ const schemaValidator = new _zschema.default(zSchemaOptions);
71
62
  const draft07ValidationOptions = {
72
63
  strictMode: false,
73
64
  ignoreUnresolvableReferences: true,
@@ -78,9 +69,8 @@ const draft07ValidationOptions = {
78
69
  // We're faking draft-07 schema with draft-04 schema as z-schema doesn't support draft-07
79
70
  //
80
71
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
81
- schemaValidator.setRemoteReference(DRAFT_07_SCHEMA_URL, draft04Schema, draft07ValidationOptions);
82
- siteScriptsSchemaPromise
83
- .then((remoteSchema) => {
72
+ schemaValidator.setRemoteReference(DRAFT_07_SCHEMA_URL, _draft04schemajson.default, draft07ValidationOptions);
73
+ siteScriptsSchemaPromise.then((remoteSchema)=>{
84
74
  // ZSchema typedef doesn't contain setRemoteReference method. But it does exist in the implementation and referenced in the documentation.
85
75
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
86
76
  schemaValidator.setRemoteReference(SITE_SCRIPTS_SCHEMA_URL, JSON.parse(remoteSchema), {
@@ -88,70 +78,66 @@ siteScriptsSchemaPromise
88
78
  ignoreUnresolvableReferences: true
89
79
  });
90
80
  schemaValidator.validateSchema(schemas);
91
- })
92
- .catch((error) => {
93
- // swallowing the error here
81
+ }).catch((error)=>{
82
+ // swallowing the error here
94
83
  });
95
84
  class ManifestValidator {
96
85
  static registerRemoteSchemaReferences() {
97
- return siteScriptsSchemaPromise
98
- .then(() => {
99
- // no-op;
100
- })
101
- .catch(() => {
102
- // no-op;
86
+ return siteScriptsSchemaPromise.then(()=>{
87
+ // no-op;
88
+ }).catch(()=>{
89
+ // no-op;
103
90
  });
104
91
  }
105
92
  static validateApplicationManifest(manifest) {
106
- return ManifestValidator._validateManifest(manifest, applicationSchema);
93
+ return ManifestValidator._validateManifest(manifest, _clientsideapplicationmanifestschemajson.default);
107
94
  }
108
95
  static validatePrefabAppManifest(manifest) {
109
- return ManifestValidator._validateManifest(manifest, prefabAppSchema);
96
+ return ManifestValidator._validateManifest(manifest, _prefabappmanifestschemajson.default);
110
97
  }
111
98
  static validateCommandSetManifest(manifest) {
112
- return ManifestValidator._validateManifest(manifest, commandSetSchema);
99
+ return ManifestValidator._validateManifest(manifest, _commandsetextensionmanifestschemajson.default);
113
100
  }
114
101
  static validateExtensionManifest(manifest) {
115
- return ManifestValidator._validateManifest(manifest, extensionSchema);
102
+ return ManifestValidator._validateManifest(manifest, _clientsideextensionmanifestschemajson.default);
116
103
  }
117
- static validateWebPartManifest(
118
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
+ static validateWebPartManifest(// eslint-disable-next-line @typescript-eslint/no-explicit-any
119
105
  manifest) {
120
- return ManifestValidator._validateManifest(manifest, webPartSchema);
106
+ return ManifestValidator._validateManifest(manifest, _clientsidewebpartmanifestschemajson.default);
121
107
  }
122
108
  static validateLibraryManifest(manifest) {
123
- return ManifestValidator._validateManifest(manifest, librarySchema);
109
+ return ManifestValidator._validateManifest(manifest, _clientsidelibrarymanifestschemajson.default);
124
110
  }
125
111
  static validateAssemblyManifest(manifest) {
126
- return ManifestValidator._validateManifest(manifest, assemblySchema);
112
+ return ManifestValidator._validateManifest(manifest, _clientsideassemblymanifestschemajson.default);
127
113
  }
128
- static validateMultiVersionManifest(
129
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
114
+ static validateMultiVersionManifest(// eslint-disable-next-line @typescript-eslint/no-explicit-any
130
115
  manifest) {
131
- return ManifestValidator._validateManifest(manifest, multiVersionSchema);
116
+ return ManifestValidator._validateManifest(manifest, _clientsidemultiversionmanifestschemajson.default);
132
117
  }
133
118
  static validateManifest(manifest) {
134
- return ManifestValidator._validateManifest(manifest, manifestSchema);
119
+ return ManifestValidator._validateManifest(manifest, _clientsidecomponentmanifestschemajson.default);
135
120
  }
136
121
  static extractInnerErrorMessages(errors) {
137
- const printZSchemaError = (error) => {
122
+ const printZSchemaError = (error)=>{
138
123
  let innerErrors = [];
139
- (error.inner || []).forEach((innerErr) => {
124
+ (error.inner || []).forEach((innerErr)=>{
140
125
  innerErrors = innerErrors.concat(printZSchemaError(innerErr));
141
126
  });
142
- return [`(${error.path}) ${error.message}`].concat(innerErrors);
127
+ return [
128
+ `(${error.path}) ${error.message}`
129
+ ].concat(innerErrors);
143
130
  };
144
131
  let errorList = [];
145
- errors.map((error) => {
132
+ errors.map((error)=>{
146
133
  errorList = errorList.concat(printZSchemaError(error));
147
134
  });
148
135
  return errorList;
149
136
  }
150
137
  static getFormattedErrorMessage(errors) {
151
- return this.extractInnerErrorMessages(errors).join(os_1.EOL);
138
+ return this.extractInnerErrorMessages(errors).join('\n');
152
139
  }
153
- static _validateManifest(
154
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
140
+ static _validateManifest(// eslint-disable-next-line @typescript-eslint/no-explicit-any
155
141
  manifest, schema) {
156
142
  if (!schema) {
157
143
  throw new Error('Unable to find the manifest schema.');
@@ -166,5 +152,5 @@ class ManifestValidator {
166
152
  };
167
153
  }
168
154
  }
169
- exports.default = ManifestValidator;
170
- //# sourceMappingURL=manifestSchemaValidator.js.map
155
+
156
+ //#sourceMappingUrl=./manifestSchemaValidator.js.map
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IAdaptiveCardExtensionManifest.js.map
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", { value: true });
3
- //# sourceMappingURL=IClientSideApplicationManifest.js.map
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", { value: true });
3
- //# sourceMappingURL=IClientSideAssemblyManifest.js.map
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+
6
+ //#sourceMappingUrl=./IClientSideAssemblyManifest.js.map
@@ -1,3 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IClientSideComponentLoaderConfiguration.js.map
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", { value: true });
3
- //# sourceMappingURL=IClientSideComponentManifest.js.map
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", { value: true });
3
- //# sourceMappingURL=IClientSideExtensionManifest.js.map
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+
6
+ //#sourceMappingUrl=./IClientSideExtensionManifest.js.map
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IClientSideLibraryManifest.js.map
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+
6
+ //#sourceMappingUrl=./IClientSideLibraryManifest.js.map
@@ -1,3 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IClientSideManifestBase.js.map
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", { value: true });
3
- //# sourceMappingURL=IClientSideMultiVersionManifest.js.map
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", { value: true });
3
- exports.PredefinedGroup = void 0;
4
- /**
5
- * Predefined web part group.
6
- *
7
- * @beta
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 (PredefinedGroup) {
12
+ (function(PredefinedGroup) {
11
13
  /**
12
- * Text, media and content.
13
- *
14
- * This group includes web parts that display text, multi-media, documents, information from the web, and other
15
- * rich content.
16
- *
17
- * @beta
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
- * Discovery.
22
- *
23
- * This group includes web parts that organize, group, and filter content to help users discover information.
24
- *
25
- * @beta
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
- * Communication and collaboration.
30
- *
31
- * This group includes web parts that facilitate information sharing, team work, and social interactions.
32
- *
33
- * @beta
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
- * Planning and process.
38
- *
39
- * This group includes web parts that empower team productivity with the use of planning and process tools.
40
- *
41
- * @beta
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
- * Business and intelligence.
46
- *
47
- * This group includes web parts for tracking and analyzing data, and for integrating business flow with pages.
48
- *
49
- * @beta
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
- * Regional information
54
- *
55
- * This group includes web parts that display information based on current region and geographical location
56
- *
57
- * @beta
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
- * Other.
62
- *
63
- * This group includes web parts not in other groups.
64
- *
65
- * @beta
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
- * Other.
70
- *
71
- * This group includes local web parts.
72
- *
73
- * @beta
74
- */
75
- PredefinedGroup["Local"] = "8b7bf6f1-a56a-4aa3-8657-7eb6e7e6af61";
76
- })(PredefinedGroup || (exports.PredefinedGroup = PredefinedGroup = {}));
77
- //# sourceMappingURL=IClientSideWebPartManifest.js.map
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", { value: true });
3
- //# sourceMappingURL=ICommandSetExtensionManifest.js.map
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+
6
+ //#sourceMappingUrl=./ICommandSetExtensionManifest.js.map
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IPrefabAppManifest.js.map
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+
6
+ //#sourceMappingUrl=./IPrefabAppManifest.js.map