@microsoft/sp-module-interfaces 1.15.0-beta.1 → 1.15.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 (24) hide show
  1. package/dist/index-internal-beta.d.ts +32 -43
  2. package/dist/index-internal-public.d.ts +3 -1
  3. package/dist/index-internal.d.ts +15 -718
  4. package/dist/tsdoc-metadata.json +1 -1
  5. package/lib-commonjs/index.js +5 -1
  6. package/lib-commonjs/manifestHelpers.d.ts +20 -0
  7. package/lib-commonjs/manifestHelpers.d.ts.map +1 -0
  8. package/lib-commonjs/manifestHelpers.js +29 -0
  9. package/lib-commonjs/manifestSchemaValidator.js +5 -1
  10. package/lib-commonjs/manifestSchemas/IClientSideComponentLoaderConfiguration.d.ts +21 -33
  11. package/lib-commonjs/manifestSchemas/IClientSideComponentLoaderConfiguration.d.ts.map +1 -1
  12. package/lib-commonjs/manifestSchemas/examples/application.manifest.json +36 -36
  13. package/lib-commonjs/manifestSchemas/examples/application_1.manifest.js +36 -36
  14. package/lib-commonjs/manifestSchemas/examples/assembly.manifest.json +37 -37
  15. package/lib-commonjs/manifestSchemas/examples/assembly_1.manifest.js +36 -36
  16. package/lib-commonjs/manifestSchemas/examples/library.manifest.json +36 -36
  17. package/lib-commonjs/manifestSchemas/examples/library_1.manifest.js +36 -36
  18. package/lib-commonjs/manifestSchemas/examples/multi-version_1.manifest.js +72 -72
  19. package/lib-commonjs/manifestSchemas/examples/multi-version_1.manifest.json +36 -36
  20. package/lib-commonjs/manifestSchemas/examples/webpart.manifest.json +36 -36
  21. package/lib-commonjs/manifestSchemas/examples/webpart_1.manifest.js +36 -36
  22. package/lib-commonjs/manifestSchemas/examples/webpart_2.manifest.js +36 -36
  23. package/lib-commonjs/manifestSchemas/jsonSchemas/client-side-component-loader-configuration.schema.json +12 -18
  24. package/package.json +2 -2
@@ -975,7 +975,8 @@ export declare interface ICommandSetExtensionManifest extends IClientSideExtensi
975
975
  *
976
976
  * @beta
977
977
  */
978
- export declare interface IComponentModuleConfiguration extends IModuleConfiguration {
978
+ export declare interface IComponentModuleConfiguration extends IModuleConfigurationBase {
979
+ type: 'component';
979
980
  /**
980
981
  * The version of the framework-supplied component to be loaded. For framework runtime component such as
981
982
  * `@microsoft/sp-client-base`, it is recommended the version of the framework component the component was developed
@@ -1011,7 +1012,23 @@ export declare interface IComponentModuleConfiguration extends IModuleConfigurat
1011
1012
  *
1012
1013
  * Example: `"https://code.jquery.com/jquery-2.2.4.min.js"`
1013
1014
  */
1014
- failoverPath?: string | IPath;
1015
+ failoverPath?: string | IIntegrityPath;
1016
+ }
1017
+
1018
+ /**
1019
+ * A path with the subresource integrity hash of the resource.
1020
+ *
1021
+ * @beta
1022
+ */
1023
+ export declare interface IIntegrityPath {
1024
+ /**
1025
+ * The path to the resource.
1026
+ */
1027
+ path: string;
1028
+ /**
1029
+ * The subresource integrity hash of the resource referenced in {@link IIntegrityPath.path}.
1030
+ */
1031
+ integrity?: string;
1015
1032
  }
1016
1033
 
1017
1034
  /**
@@ -1024,7 +1041,8 @@ export declare interface IComponentModuleConfiguration extends IModuleConfigurat
1024
1041
  *
1025
1042
  * @beta
1026
1043
  */
1027
- export declare interface ILocalizedPathModuleConfiguration extends IModuleConfiguration {
1044
+ export declare interface ILocalizedPathModuleConfiguration extends IModuleConfigurationBase {
1045
+ type: 'localizedPath';
1028
1046
  /**
1029
1047
  * A path to this module's default locale javascript resource either as a fully-qualified URL or as a
1030
1048
  * path under the paths provided in the "internalModuleBaseUrls" field.
@@ -1039,7 +1057,7 @@ export declare interface ILocalizedPathModuleConfiguration extends IModuleConfig
1039
1057
  *
1040
1058
  * Example: `"master_2015-04-20/my-application_strings_default_af378e0d.js"`
1041
1059
  */
1042
- defaultPath: string | IPath;
1060
+ defaultPath: string | IIntegrityPath;
1043
1061
  /**
1044
1062
  * This is a dictionary of locale keys (in the `"ll-cc"` format) to paths to this module's locale
1045
1063
  * javascript resource either as a fully-qualified URL or as a path under the paths provided in the
@@ -1066,7 +1084,7 @@ export declare interface ILocalizedPathModuleConfiguration extends IModuleConfig
1066
1084
  * ```
1067
1085
  */
1068
1086
  paths?: {
1069
- [locale: string]: string | IPath;
1087
+ [locale: string]: string | IIntegrityPath;
1070
1088
  };
1071
1089
  }
1072
1090
 
@@ -1116,12 +1134,17 @@ export declare interface ILocalizedString {
1116
1134
  [locale: string]: string | undefined;
1117
1135
  }
1118
1136
 
1137
+ /**
1138
+ * @beta
1139
+ */
1140
+ export declare type IModuleConfiguration = IComponentModuleConfiguration | IPathModuleConfiguration | ILocalizedPathModuleConfiguration;
1141
+
1119
1142
  /**
1120
1143
  * This is the base interface for a script module's definition.
1121
1144
  *
1122
1145
  * @beta
1123
1146
  */
1124
- export declare interface IModuleConfiguration {
1147
+ export declare interface IModuleConfigurationBase {
1125
1148
  /**
1126
1149
  * The type of the script block. `"component"` modules come from a component,
1127
1150
  * `"path"` and `"localizedPath"` modules must be available on the paths provided in
@@ -1153,48 +1176,14 @@ export declare interface IModuleConfiguration {
1153
1176
  shouldNotPreload?: boolean;
1154
1177
  }
1155
1178
 
1156
- /**
1157
- * This is the base interface for a set of debug and non-debug/minimized paths. The paths in this object are
1158
- * loaded in exactly the same way as any other internal path.
1159
- *
1160
- * @beta
1161
- */
1162
- export declare interface IPath {
1163
- /**
1164
- * A path to this module's javascript resource either as a fully-qualified URL or as a path under the
1165
- * paths provided in the "internalModuleBaseUrls" field. The script referenced by this field is loaded by default
1166
- * unless a debug version of the script is provided and explicitly requested.
1167
- *
1168
- * @remarks
1169
- *
1170
- * Supported values: The path to the default/non-debug script either as a fully-qualified URL or as a path under the
1171
- * paths provided in the "internalModuleBaseUrls" field.
1172
- *
1173
- * Example: `"master_2015-04-20/my-application.bundle_1928f8a0.js"`
1174
- */
1175
- default: string;
1176
- /**
1177
- * A path to this module's debug javascript resource either as a fully-qualified URL or as a path under
1178
- * the paths provided in the "internalModuleBaseUrls" field. The script referenced by this field is only loaded if
1179
- * it is present and debug scripts are explicitly requested.
1180
- *
1181
- * @remarks
1182
- *
1183
- * Supported values: The path to the debug script either as a fully-qualified URL or as a path under the
1184
- * paths provided in the `"internalModuleBaseUrls"` field.
1185
- *
1186
- * Example: `"master_2015-04-20/my-application.bundle_18182c39.debug.js"`
1187
- */
1188
- debug?: string;
1189
- }
1190
-
1191
1179
  /**
1192
1180
  * This is the interface for a script module with the "path" type. Modules of this type must be provided by the
1193
1181
  * component developer.
1194
1182
  *
1195
1183
  * @beta
1196
1184
  */
1197
- export declare interface IPathModuleConfiguration extends IModuleConfiguration {
1185
+ export declare interface IPathModuleConfiguration extends IModuleConfigurationBase {
1186
+ type: 'path';
1198
1187
  /**
1199
1188
  * A path to this module's javascript resource either as a fully-qualified URL or as a path under the
1200
1189
  * paths provided in the `internalModuleBaseUrls` field.
@@ -1215,7 +1204,7 @@ export declare interface IPathModuleConfiguration extends IModuleConfiguration {
1215
1204
  *
1216
1205
  * Example: `"master_2015-04-20/my-application.bundle_1928f8a0.js"`
1217
1206
  */
1218
- path: string | IPath;
1207
+ path: string | IIntegrityPath;
1219
1208
  /**
1220
1209
  * If this property is specified, this module is considered non-AMD and
1221
1210
  * the module loader will not expect "define" or "require" to be called.
@@ -564,6 +564,8 @@ export declare interface ICommandSetExtensionManifest extends IClientSideExtensi
564
564
 
565
565
  /* Excluded from this release type: IComponentModuleConfiguration */
566
566
 
567
+ /* Excluded from this release type: IIntegrityPath */
568
+
567
569
  /* Excluded from this release type: ILocalizedPathModuleConfiguration */
568
570
 
569
571
  /**
@@ -614,7 +616,7 @@ export declare interface ILocalizedString {
614
616
 
615
617
  /* Excluded from this release type: IModuleConfiguration */
616
618
 
617
- /* Excluded from this release type: IPath */
619
+ /* Excluded from this release type: IModuleConfigurationBase */
618
620
 
619
621
  /* Excluded from this release type: IPathModuleConfiguration */
620
622