@microsoft/sp-module-interfaces 1.21.0-beta.0 → 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.
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 +15 -3
  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
@@ -746,8 +746,6 @@ export declare interface IClientSideWebPartManifest<TProperties> extends IClient
746
746
  * ```
747
747
  * @remarks
748
748
  * Ensure this remains up to date with IFlexibleControlSizingData in FlexibleControl.types.ts
749
- *
750
- * @beta
751
749
  */
752
750
  flexibleLayoutSizing?: IFlexibleLayoutSizing;
753
751
  }
@@ -1054,7 +1052,7 @@ export declare interface IComponentModuleConfiguration extends IModuleConfigurat
1054
1052
 
1055
1053
  /**
1056
1054
  * Flexible layout sizing data
1057
- * @beta
1055
+ * @public
1058
1056
  */
1059
1057
  export declare interface IFlexibleLayoutSizing {
1060
1058
  /**
@@ -1300,6 +1298,16 @@ export declare interface IPathModuleConfiguration extends IModuleConfigurationBa
1300
1298
 
1301
1299
  /* Excluded from this release type: IPrefabAppManifest */
1302
1300
 
1301
+ /* Excluded from this release type: IPrefabAppOnDemandSiteScript */
1302
+
1303
+ /* Excluded from this release type: IPrefabAppOnInstallSiteScript */
1304
+
1305
+ /* Excluded from this release type: IPrefabAppSiteScriptBase */
1306
+
1307
+ /* Excluded from this release type: IPrefabAppSiteSettingsLink */
1308
+
1309
+ /* Excluded from this release type: IPrefabAppToolboxEntry */
1310
+
1303
1311
  /* Excluded from this release type: IPreloadOptions */
1304
1312
 
1305
1313
  /* Excluded from this release type: ISiteScriptActionBase */
@@ -1379,4 +1387,8 @@ export declare const enum PredefinedGroup {
1379
1387
  Local = "8b7bf6f1-a56a-4aa3-8657-7eb6e7e6af61"
1380
1388
  }
1381
1389
 
1390
+ /* Excluded from this release type: PrefabAppSiteScript */
1391
+
1392
+ /* Excluded from this release type: SiteScriptType */
1393
+
1382
1394
  export { }
@@ -359,7 +359,20 @@ export declare interface IClientSideWebPartManifest<TProperties> extends IClient
359
359
  * and will be hosted as a Teams application (supportedHosts contains any of Teams hosts).
360
360
  */
361
361
  supportsSelfFramingInTeams?: boolean;
362
- /* Excluded from this release type: flexibleLayoutSizing */
362
+ /**
363
+ * Definition: Defines the default sizing of webpart in flexible sections, as well as if it supports dynamic resizing.
364
+ * Example:
365
+ * ```
366
+ * flexibleLayoutSizing: {
367
+ * supportsDynamicResizing: false,
368
+ * defaultColumnWidth: 22,
369
+ * defaultRowHeight: 21
370
+ * }
371
+ * ```
372
+ * @remarks
373
+ * Ensure this remains up to date with IFlexibleControlSizingData in FlexibleControl.types.ts
374
+ */
375
+ flexibleLayoutSizing?: IFlexibleLayoutSizing;
363
376
  }
364
377
 
365
378
  /**
@@ -585,7 +598,25 @@ export declare interface ICommandSetExtensionManifest extends IClientSideExtensi
585
598
 
586
599
  /* Excluded from this release type: IComponentModuleConfiguration */
587
600
 
588
- /* Excluded from this release type: IFlexibleLayoutSizing */
601
+ /**
602
+ * Flexible layout sizing data
603
+ * @public
604
+ */
605
+ export declare interface IFlexibleLayoutSizing {
606
+ /**
607
+ * If true webpart can resize to any width between minimum and 70 columns
608
+ * Otherwise webpart is slot resized to 22, 34, 48, or 70 columns
609
+ */
610
+ supportsDynamicResizing?: boolean;
611
+ /**
612
+ * Default column width for the webpart, used by drop hint
613
+ */
614
+ defaultColumnWidth?: number;
615
+ /**
616
+ * Default row height for the webpart, used by drop hint
617
+ */
618
+ defaultRowHeight?: number;
619
+ }
589
620
 
590
621
  /* Excluded from this release type: IIntegrityPath */
591
622
 
@@ -645,6 +676,16 @@ export declare interface ILocalizedString {
645
676
 
646
677
  /* Excluded from this release type: IPrefabAppManifest */
647
678
 
679
+ /* Excluded from this release type: IPrefabAppOnDemandSiteScript */
680
+
681
+ /* Excluded from this release type: IPrefabAppOnInstallSiteScript */
682
+
683
+ /* Excluded from this release type: IPrefabAppSiteScriptBase */
684
+
685
+ /* Excluded from this release type: IPrefabAppSiteSettingsLink */
686
+
687
+ /* Excluded from this release type: IPrefabAppToolboxEntry */
688
+
648
689
  /* Excluded from this release type: IPreloadOptions */
649
690
 
650
691
  /* Excluded from this release type: ISiteScriptActionBase */
@@ -653,4 +694,8 @@ export declare interface ILocalizedString {
653
694
 
654
695
  /* Excluded from this release type: PredefinedGroup */
655
696
 
697
+ /* Excluded from this release type: PrefabAppSiteScript */
698
+
699
+ /* Excluded from this release type: SiteScriptType */
700
+
656
701
  export { }
@@ -746,8 +746,6 @@ export declare interface IClientSideWebPartManifest<TProperties> extends IClient
746
746
  * ```
747
747
  * @remarks
748
748
  * Ensure this remains up to date with IFlexibleControlSizingData in FlexibleControl.types.ts
749
- *
750
- * @beta
751
749
  */
752
750
  flexibleLayoutSizing?: IFlexibleLayoutSizing;
753
751
  }
@@ -1054,7 +1052,7 @@ export declare interface IComponentModuleConfiguration extends IModuleConfigurat
1054
1052
 
1055
1053
  /**
1056
1054
  * Flexible layout sizing data
1057
- * @beta
1055
+ * @public
1058
1056
  */
1059
1057
  export declare interface IFlexibleLayoutSizing {
1060
1058
  /**
@@ -1300,6 +1298,16 @@ export declare interface IPathModuleConfiguration extends IModuleConfigurationBa
1300
1298
 
1301
1299
  /* Excluded from this release type: IPrefabAppManifest */
1302
1300
 
1301
+ /* Excluded from this release type: IPrefabAppOnDemandSiteScript */
1302
+
1303
+ /* Excluded from this release type: IPrefabAppOnInstallSiteScript */
1304
+
1305
+ /* Excluded from this release type: IPrefabAppSiteScriptBase */
1306
+
1307
+ /* Excluded from this release type: IPrefabAppSiteSettingsLink */
1308
+
1309
+ /* Excluded from this release type: IPrefabAppToolboxEntry */
1310
+
1303
1311
  /* Excluded from this release type: IPreloadOptions */
1304
1312
 
1305
1313
  /* Excluded from this release type: ISiteScriptActionBase */
@@ -1379,4 +1387,8 @@ export declare const enum PredefinedGroup {
1379
1387
  Local = "8b7bf6f1-a56a-4aa3-8657-7eb6e7e6af61"
1380
1388
  }
1381
1389
 
1390
+ /* Excluded from this release type: PrefabAppSiteScript */
1391
+
1392
+ /* Excluded from this release type: SiteScriptType */
1393
+
1382
1394
  export { }
@@ -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