sp-js-provisioning 1.0.4 → 1.1.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 (85) hide show
  1. package/.husky/commit-msg +4 -0
  2. package/README.md +11 -31
  3. package/lib/handlers/clientsidepages.d.ts +13 -13
  4. package/lib/handlers/clientsidepages.js +77 -60
  5. package/lib/handlers/clientsidepages.js.map +1 -0
  6. package/lib/handlers/composedlook.d.ts +6 -6
  7. package/lib/handlers/composedlook.js +24 -17
  8. package/lib/handlers/composedlook.js.map +1 -0
  9. package/lib/handlers/contenttypes.d.ts +20 -20
  10. package/lib/handlers/contenttypes.js +77 -59
  11. package/lib/handlers/contenttypes.js.map +1 -0
  12. package/lib/handlers/customactions.d.ts +7 -7
  13. package/lib/handlers/customactions.js +24 -17
  14. package/lib/handlers/customactions.js.map +1 -0
  15. package/lib/handlers/exports.d.ts +3 -3
  16. package/lib/handlers/exports.js +15 -11
  17. package/lib/handlers/exports.js.map +1 -0
  18. package/lib/handlers/features.d.ts +7 -7
  19. package/lib/handlers/features.js +24 -22
  20. package/lib/handlers/features.js.map +1 -0
  21. package/lib/handlers/files.d.ts +44 -44
  22. package/lib/handlers/files.js +229 -159
  23. package/lib/handlers/files.js.map +1 -0
  24. package/lib/handlers/handlerbase.d.ts +21 -11
  25. package/lib/handlers/handlerbase.js +51 -16
  26. package/lib/handlers/handlerbase.js.map +1 -0
  27. package/lib/handlers/hooks.d.ts +22 -0
  28. package/lib/handlers/hooks.js +230 -0
  29. package/lib/handlers/hooks.js.map +1 -0
  30. package/lib/handlers/lists.d.ts +45 -45
  31. package/lib/handlers/lists.js +184 -150
  32. package/lib/handlers/lists.js.map +1 -0
  33. package/lib/handlers/navigation.d.ts +10 -10
  34. package/lib/handlers/navigation.js +40 -31
  35. package/lib/handlers/navigation.js.map +1 -0
  36. package/lib/handlers/propertybagentries.d.ts +7 -7
  37. package/lib/handlers/propertybagentries.js +30 -25
  38. package/lib/handlers/propertybagentries.js.map +1 -0
  39. package/lib/handlers/sitefields.d.ts +11 -11
  40. package/lib/handlers/sitefields.js +40 -29
  41. package/lib/handlers/sitefields.js.map +1 -0
  42. package/lib/handlers/websettings.d.ts +7 -7
  43. package/lib/handlers/websettings.js +36 -33
  44. package/lib/handlers/websettings.js.map +1 -0
  45. package/lib/index.d.ts +3 -3
  46. package/lib/index.js +3 -2
  47. package/lib/index.js.map +1 -0
  48. package/lib/provisioningconfig.d.ts +2 -2
  49. package/lib/provisioningconfig.js +2 -0
  50. package/lib/provisioningconfig.js.map +1 -0
  51. package/lib/provisioningcontext.d.ts +1 -5
  52. package/lib/provisioningcontext.js +2 -4
  53. package/lib/provisioningcontext.js.map +1 -0
  54. package/lib/schema.d.ts +18 -4
  55. package/lib/schema.js +2 -0
  56. package/lib/schema.js.map +1 -0
  57. package/lib/util/index.d.ts +3 -6
  58. package/lib/util/index.js +20 -29
  59. package/lib/util/index.js.map +1 -0
  60. package/lib/util/tokenhelper.d.ts +3 -3
  61. package/lib/util/tokenhelper.js +30 -29
  62. package/lib/util/tokenhelper.js.map +1 -0
  63. package/lib/webprovisioner.d.ts +16 -16
  64. package/lib/webprovisioner.js +42 -29
  65. package/lib/webprovisioner.js.map +1 -0
  66. package/package.json +118 -36
  67. package/sample-schemas/all-simple.ts +85 -76
  68. package/AUTHORS +0 -3
  69. package/LICENSE +0 -25
  70. package/debug/debug.ts +0 -68
  71. package/debug/example.ts +0 -42
  72. package/gulptasks/@configuration.js +0 -58
  73. package/gulptasks/build.js +0 -84
  74. package/gulptasks/clean.js +0 -23
  75. package/gulptasks/docs.js +0 -11
  76. package/gulptasks/index.js +0 -8
  77. package/gulptasks/lint.js +0 -18
  78. package/gulptasks/package.js +0 -44
  79. package/gulptasks/publish.js +0 -232
  80. package/gulptasks/test.js +0 -40
  81. package/gulptasks/watch.js +0 -15
  82. package/jsdoc.json +0 -26
  83. package/pnpm-lock.yaml +0 -6582
  84. package/shrinkwrap.yaml +0 -6513
  85. package/webpack.config.js +0 -58
@@ -1,8 +1,8 @@
1
- import { HandlerBase } from "./handlerbase";
2
- import { IFile } from "../schema";
3
- import { Web } from "@pnp/sp";
4
- import { ProvisioningContext } from "../provisioningcontext";
5
- import { IProvisioningConfig } from "../provisioningconfig";
1
+ import { HandlerBase } from './handlerbase';
2
+ import { IFile } from '../schema';
3
+ import { Web } from '@pnp/sp';
4
+ import { ProvisioningContext } from '../provisioningcontext';
5
+ import { IProvisioningConfig } from '../provisioningconfig';
6
6
  /**
7
7
  * Describes the Features Object Handler
8
8
  */
@@ -11,83 +11,83 @@ export declare class Files extends HandlerBase {
11
11
  /**
12
12
  * Creates a new instance of the Files class
13
13
  *
14
- * @param {IProvisioningConfig} config Provisioning config
14
+ * @param config - Provisioning config
15
15
  */
16
16
  constructor(config: IProvisioningConfig);
17
17
  /**
18
18
  * Provisioning Files
19
19
  *
20
- * @param {Web} web The web
21
- * @param {IFile[]} files The files to provision
22
- * @param {ProvisioningContext} context Provisioning context
20
+ * @param web - The web
21
+ * @param files - The files to provision
22
+ * @param context - Provisioning context
23
23
  */
24
- ProvisionObjects(web: Web, files: IFile[], context: ProvisioningContext): Promise<void>;
24
+ ProvisionObjects(web: Web, files: IFile[], context?: ProvisioningContext): Promise<void>;
25
25
  /**
26
26
  * Get blob for a file
27
27
  *
28
- * @param {IFile} file The file
28
+ * @param file - The file
29
29
  */
30
- private getFileBlob(file);
30
+ private getFileBlob;
31
31
  /**
32
32
  * Procceses a file
33
33
  *
34
- * @param {Web} web The web
35
- * @param {IFile} file The fileAddError
36
- * @param {string} webServerRelativeUrl ServerRelativeUrl for the web
34
+ * @param web - The web
35
+ * @param file - The file
36
+ * @param webServerRelativeUrl - ServerRelativeUrl for the web
37
37
  */
38
- private processFile(web, file, webServerRelativeUrl);
38
+ private processFile;
39
39
  /**
40
40
  * Remove exisiting webparts if specified
41
41
  *
42
- * @param {string} webServerRelativeUrl ServerRelativeUrl for the web
43
- * @param {string} fileServerRelativeUrl ServerRelativeUrl for the file
44
- * @param {boolean} shouldRemove Should web parts be removed
42
+ * @param webServerRelativeUrl - ServerRelativeUrl for the web
43
+ * @param fileServerRelativeUrl - ServerRelativeUrl for the file
44
+ * @param shouldRemove - Should web parts be removed
45
45
  */
46
- private removeExistingWebParts(webServerRelativeUrl, fileServerRelativeUrl, shouldRemove);
46
+ private removeExistingWebParts;
47
47
  /**
48
48
  * Processes web parts
49
49
  *
50
- * @param {IFile} file The file
51
- * @param {string} webServerRelativeUrl ServerRelativeUrl for the web
52
- * @param {string} fileServerRelativeUrl ServerRelativeUrl for the file
50
+ * @param file - The file
51
+ * @param webServerRelativeUrl - ServerRelativeUrl for the web
52
+ * @param fileServerRelativeUrl - ServerRelativeUrl for the file
53
53
  */
54
- private processWebParts(file, webServerRelativeUrl, fileServerRelativeUrl);
54
+ private processWebParts;
55
55
  /**
56
56
  * Fetches web part contents
57
57
  *
58
- * @param {Array<IWebPart>} webParts Web parts
59
- * @param {Function} callbackFunc Callback function that takes index of the the webpart and the retrieved XML
58
+ * @param webParts - Web parts
59
+ * @param callbackFunc - Callback function that takes index of the the webpart and the retrieved XML
60
60
  */
61
61
  private fetchWebPartContents;
62
62
  /**
63
63
  * Processes page list views
64
64
  *
65
- * @param {Web} web The web
66
- * @param {Array<IWebPart>} webParts Web parts
67
- * @param {string} fileServerRelativeUrl ServerRelativeUrl for the file
65
+ * @param web - The web
66
+ * @param webParts - Web parts
67
+ * @param fileServerRelativeUrl - ServerRelativeUrl for the file
68
68
  */
69
- private processPageListViews(web, webParts, fileServerRelativeUrl);
69
+ private processPageListViews;
70
70
  /**
71
71
  * Processes page list view
72
72
  *
73
- * @param {Web} web The web
74
- * @param {any} listView List view
75
- * @param {string} fileServerRelativeUrl ServerRelativeUrl for the file
73
+ * @param web - The web
74
+ * @param listView - List view
75
+ * @param fileServerRelativeUrl - ServerRelativeUrl for the file
76
76
  */
77
- private processPageListView(web, listView, fileServerRelativeUrl);
77
+ private processPageListView;
78
78
  /**
79
79
  * Process list item properties for the file
80
80
  *
81
- * @param {Web} web The web
82
- * @param {File} pnpFile The PnP file
83
- * @param {Object} properties The properties to set
81
+ * @param web - The web
82
+ * @param pnpFile - The PnP file
83
+ * @param properties - The properties to set
84
84
  */
85
- private processProperties(web, pnpFile, file);
85
+ private processProperties;
86
86
  /**
87
- * Replaces tokens in a string, e.g. {site}
88
- *
89
- * @param {string} str The string
90
- * @param {SP.ClientContext} ctx Client context
91
- */
92
- private replaceWebPartXmlTokens(str, ctx);
87
+ * Replaces tokens in a string, e.g. `{site}`
88
+ *
89
+ * @param str - The string
90
+ * @param ctx - Client context
91
+ */
92
+ private replaceWebPartXmlTokens;
93
93
  }