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.
- package/.husky/commit-msg +4 -0
- package/README.md +11 -31
- package/lib/handlers/clientsidepages.d.ts +13 -13
- package/lib/handlers/clientsidepages.js +77 -60
- package/lib/handlers/clientsidepages.js.map +1 -0
- package/lib/handlers/composedlook.d.ts +6 -6
- package/lib/handlers/composedlook.js +24 -17
- package/lib/handlers/composedlook.js.map +1 -0
- package/lib/handlers/contenttypes.d.ts +20 -20
- package/lib/handlers/contenttypes.js +77 -59
- package/lib/handlers/contenttypes.js.map +1 -0
- package/lib/handlers/customactions.d.ts +7 -7
- package/lib/handlers/customactions.js +24 -17
- package/lib/handlers/customactions.js.map +1 -0
- package/lib/handlers/exports.d.ts +3 -3
- package/lib/handlers/exports.js +15 -11
- package/lib/handlers/exports.js.map +1 -0
- package/lib/handlers/features.d.ts +7 -7
- package/lib/handlers/features.js +24 -22
- package/lib/handlers/features.js.map +1 -0
- package/lib/handlers/files.d.ts +44 -44
- package/lib/handlers/files.js +229 -159
- package/lib/handlers/files.js.map +1 -0
- package/lib/handlers/handlerbase.d.ts +21 -11
- package/lib/handlers/handlerbase.js +51 -16
- package/lib/handlers/handlerbase.js.map +1 -0
- package/lib/handlers/hooks.d.ts +22 -0
- package/lib/handlers/hooks.js +230 -0
- package/lib/handlers/hooks.js.map +1 -0
- package/lib/handlers/lists.d.ts +45 -45
- package/lib/handlers/lists.js +184 -150
- package/lib/handlers/lists.js.map +1 -0
- package/lib/handlers/navigation.d.ts +10 -10
- package/lib/handlers/navigation.js +40 -31
- package/lib/handlers/navigation.js.map +1 -0
- package/lib/handlers/propertybagentries.d.ts +7 -7
- package/lib/handlers/propertybagentries.js +30 -25
- package/lib/handlers/propertybagentries.js.map +1 -0
- package/lib/handlers/sitefields.d.ts +11 -11
- package/lib/handlers/sitefields.js +40 -29
- package/lib/handlers/sitefields.js.map +1 -0
- package/lib/handlers/websettings.d.ts +7 -7
- package/lib/handlers/websettings.js +36 -33
- package/lib/handlers/websettings.js.map +1 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -0
- package/lib/provisioningconfig.d.ts +2 -2
- package/lib/provisioningconfig.js +2 -0
- package/lib/provisioningconfig.js.map +1 -0
- package/lib/provisioningcontext.d.ts +1 -5
- package/lib/provisioningcontext.js +2 -4
- package/lib/provisioningcontext.js.map +1 -0
- package/lib/schema.d.ts +18 -4
- package/lib/schema.js +2 -0
- package/lib/schema.js.map +1 -0
- package/lib/util/index.d.ts +3 -6
- package/lib/util/index.js +20 -29
- package/lib/util/index.js.map +1 -0
- package/lib/util/tokenhelper.d.ts +3 -3
- package/lib/util/tokenhelper.js +30 -29
- package/lib/util/tokenhelper.js.map +1 -0
- package/lib/webprovisioner.d.ts +16 -16
- package/lib/webprovisioner.js +42 -29
- package/lib/webprovisioner.js.map +1 -0
- package/package.json +118 -36
- package/sample-schemas/all-simple.ts +85 -76
- package/AUTHORS +0 -3
- package/LICENSE +0 -25
- package/debug/debug.ts +0 -68
- package/debug/example.ts +0 -42
- package/gulptasks/@configuration.js +0 -58
- package/gulptasks/build.js +0 -84
- package/gulptasks/clean.js +0 -23
- package/gulptasks/docs.js +0 -11
- package/gulptasks/index.js +0 -8
- package/gulptasks/lint.js +0 -18
- package/gulptasks/package.js +0 -44
- package/gulptasks/publish.js +0 -232
- package/gulptasks/test.js +0 -40
- package/gulptasks/watch.js +0 -15
- package/jsdoc.json +0 -26
- package/pnpm-lock.yaml +0 -6582
- package/shrinkwrap.yaml +0 -6513
- package/webpack.config.js +0 -58
package/lib/handlers/files.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HandlerBase } from
|
|
2
|
-
import { IFile } from
|
|
3
|
-
import { Web } from
|
|
4
|
-
import { ProvisioningContext } from
|
|
5
|
-
import { IProvisioningConfig } from
|
|
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
|
|
14
|
+
* @param config - Provisioning config
|
|
15
15
|
*/
|
|
16
16
|
constructor(config: IProvisioningConfig);
|
|
17
17
|
/**
|
|
18
18
|
* Provisioning Files
|
|
19
19
|
*
|
|
20
|
-
* @param
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
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
|
|
24
|
+
ProvisionObjects(web: Web, files: IFile[], context?: ProvisioningContext): Promise<void>;
|
|
25
25
|
/**
|
|
26
26
|
* Get blob for a file
|
|
27
27
|
*
|
|
28
|
-
* @param
|
|
28
|
+
* @param file - The file
|
|
29
29
|
*/
|
|
30
|
-
private getFileBlob
|
|
30
|
+
private getFileBlob;
|
|
31
31
|
/**
|
|
32
32
|
* Procceses a file
|
|
33
33
|
*
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
34
|
+
* @param web - The web
|
|
35
|
+
* @param file - The file
|
|
36
|
+
* @param webServerRelativeUrl - ServerRelativeUrl for the web
|
|
37
37
|
*/
|
|
38
|
-
private processFile
|
|
38
|
+
private processFile;
|
|
39
39
|
/**
|
|
40
40
|
* Remove exisiting webparts if specified
|
|
41
41
|
*
|
|
42
|
-
* @param
|
|
43
|
-
* @param
|
|
44
|
-
* @param
|
|
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
|
|
46
|
+
private removeExistingWebParts;
|
|
47
47
|
/**
|
|
48
48
|
* Processes web parts
|
|
49
49
|
*
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
52
|
-
* @param
|
|
50
|
+
* @param file - The file
|
|
51
|
+
* @param webServerRelativeUrl - ServerRelativeUrl for the web
|
|
52
|
+
* @param fileServerRelativeUrl - ServerRelativeUrl for the file
|
|
53
53
|
*/
|
|
54
|
-
private processWebParts
|
|
54
|
+
private processWebParts;
|
|
55
55
|
/**
|
|
56
56
|
* Fetches web part contents
|
|
57
57
|
*
|
|
58
|
-
* @param
|
|
59
|
-
* @param
|
|
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
|
|
66
|
-
* @param
|
|
67
|
-
* @param
|
|
65
|
+
* @param web - The web
|
|
66
|
+
* @param webParts - Web parts
|
|
67
|
+
* @param fileServerRelativeUrl - ServerRelativeUrl for the file
|
|
68
68
|
*/
|
|
69
|
-
private processPageListViews
|
|
69
|
+
private processPageListViews;
|
|
70
70
|
/**
|
|
71
71
|
* Processes page list view
|
|
72
72
|
*
|
|
73
|
-
* @param
|
|
74
|
-
* @param
|
|
75
|
-
* @param
|
|
73
|
+
* @param web - The web
|
|
74
|
+
* @param listView - List view
|
|
75
|
+
* @param fileServerRelativeUrl - ServerRelativeUrl for the file
|
|
76
76
|
*/
|
|
77
|
-
private processPageListView
|
|
77
|
+
private processPageListView;
|
|
78
78
|
/**
|
|
79
79
|
* Process list item properties for the file
|
|
80
80
|
*
|
|
81
|
-
* @param
|
|
82
|
-
* @param
|
|
83
|
-
* @param
|
|
81
|
+
* @param web - The web
|
|
82
|
+
* @param pnpFile - The PnP file
|
|
83
|
+
* @param properties - The properties to set
|
|
84
84
|
*/
|
|
85
|
-
private processProperties
|
|
85
|
+
private processProperties;
|
|
86
86
|
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
private replaceWebPartXmlTokens
|
|
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
|
}
|