@pnp/cli-microsoft365 11.5.0-beta.960ec81 → 11.5.0-beta.9dbb2e8
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/allCommandsFull.json +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.22.2.js +21 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.22.2.js +55 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +3 -2
- package/dist/m365/spfx/commands/spfx-doctor.js +23 -8
- package/dist/m365/spo/commands/site/site-hubsite-connect.js +26 -30
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +26 -28
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-hubsite-connect.mdx +32 -2
- package/docs/docs/cmd/spo/site/site-hubsite-disconnect.mdx +32 -2
- package/npm-shrinkwrap.json +1215 -380
- package/package.json +15 -15
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FN002021_DEVDEP_rushstack_eslint_config } from '../project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js';
|
|
2
|
+
import { FN001008_DEP_react } from './rules/FN001008_DEP_react.js';
|
|
3
|
+
import { FN001009_DEP_react_dom } from './rules/FN001009_DEP_react_dom.js';
|
|
4
|
+
import { FN001035_DEP_fluentui_react } from './rules/FN001035_DEP_fluentui_react.js';
|
|
5
|
+
import { FN002013_DEVDEP_types_webpack_env } from './rules/FN002013_DEVDEP_types_webpack_env.js';
|
|
6
|
+
import { FN002015_DEVDEP_types_react } from './rules/FN002015_DEVDEP_types_react.js';
|
|
7
|
+
import { FN002016_DEVDEP_types_react_dom } from './rules/FN002016_DEVDEP_types_react_dom.js';
|
|
8
|
+
import { FN002022_DEVDEP_typescript } from './rules/FN002022_DEVDEP_typescript.js';
|
|
9
|
+
import { FN021001_PKG_spfx_deps_versions_match_project_version } from './rules/FN021001_PKG_spfx_deps_versions_match_project_version.js';
|
|
10
|
+
export default [
|
|
11
|
+
new FN001008_DEP_react('17'),
|
|
12
|
+
new FN001009_DEP_react_dom('17'),
|
|
13
|
+
new FN001035_DEP_fluentui_react('^8.106.4'),
|
|
14
|
+
new FN002013_DEVDEP_types_webpack_env('~1.15.2'),
|
|
15
|
+
new FN002015_DEVDEP_types_react('17'),
|
|
16
|
+
new FN002016_DEVDEP_types_react_dom('17'),
|
|
17
|
+
new FN002021_DEVDEP_rushstack_eslint_config('4.5.2'),
|
|
18
|
+
new FN002022_DEVDEP_typescript('~5.8.0'),
|
|
19
|
+
new FN021001_PKG_spfx_deps_versions_match_project_version(true)
|
|
20
|
+
];
|
|
21
|
+
//# sourceMappingURL=doctor-1.22.2.js.map
|
|
@@ -75,7 +75,8 @@ class SpfxProjectDoctorCommand extends BaseProjectCommand {
|
|
|
75
75
|
'1.21.0',
|
|
76
76
|
'1.21.1',
|
|
77
77
|
'1.22.0',
|
|
78
|
-
'1.22.1'
|
|
78
|
+
'1.22.1',
|
|
79
|
+
'1.22.2'
|
|
79
80
|
];
|
|
80
81
|
__classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initTelemetry).call(this);
|
|
81
82
|
__classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initOptions).call(this);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { FN001001_DEP_microsoft_sp_core_library } from './rules/FN001001_DEP_microsoft_sp_core_library.js';
|
|
2
|
+
import { FN001002_DEP_microsoft_sp_lodash_subset } from './rules/FN001002_DEP_microsoft_sp_lodash_subset.js';
|
|
3
|
+
import { FN001003_DEP_microsoft_sp_office_ui_fabric_core } from './rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core.js';
|
|
4
|
+
import { FN001004_DEP_microsoft_sp_webpart_base } from './rules/FN001004_DEP_microsoft_sp_webpart_base.js';
|
|
5
|
+
import { FN001011_DEP_microsoft_sp_dialog } from './rules/FN001011_DEP_microsoft_sp_dialog.js';
|
|
6
|
+
import { FN001012_DEP_microsoft_sp_application_base } from './rules/FN001012_DEP_microsoft_sp_application_base.js';
|
|
7
|
+
import { FN001013_DEP_microsoft_decorators } from './rules/FN001013_DEP_microsoft_decorators.js';
|
|
8
|
+
import { FN001014_DEP_microsoft_sp_listview_extensibility } from './rules/FN001014_DEP_microsoft_sp_listview_extensibility.js';
|
|
9
|
+
import { FN001021_DEP_microsoft_sp_property_pane } from './rules/FN001021_DEP_microsoft_sp_property_pane.js';
|
|
10
|
+
import { FN001023_DEP_microsoft_sp_component_base } from './rules/FN001023_DEP_microsoft_sp_component_base.js';
|
|
11
|
+
import { FN001024_DEP_microsoft_sp_diagnostics } from './rules/FN001024_DEP_microsoft_sp_diagnostics.js';
|
|
12
|
+
import { FN001025_DEP_microsoft_sp_dynamic_data } from './rules/FN001025_DEP_microsoft_sp_dynamic_data.js';
|
|
13
|
+
import { FN001026_DEP_microsoft_sp_extension_base } from './rules/FN001026_DEP_microsoft_sp_extension_base.js';
|
|
14
|
+
import { FN001027_DEP_microsoft_sp_http } from './rules/FN001027_DEP_microsoft_sp_http.js';
|
|
15
|
+
import { FN001028_DEP_microsoft_sp_list_subscription } from './rules/FN001028_DEP_microsoft_sp_list_subscription.js';
|
|
16
|
+
import { FN001029_DEP_microsoft_sp_loader } from './rules/FN001029_DEP_microsoft_sp_loader.js';
|
|
17
|
+
import { FN001030_DEP_microsoft_sp_module_interfaces } from './rules/FN001030_DEP_microsoft_sp_module_interfaces.js';
|
|
18
|
+
import { FN001031_DEP_microsoft_sp_odata_types } from './rules/FN001031_DEP_microsoft_sp_odata_types.js';
|
|
19
|
+
import { FN001032_DEP_microsoft_sp_page_context } from './rules/FN001032_DEP_microsoft_sp_page_context.js';
|
|
20
|
+
import { FN001034_DEP_microsoft_sp_adaptive_card_extension_base } from './rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js';
|
|
21
|
+
import { FN002002_DEVDEP_microsoft_sp_module_interfaces } from './rules/FN002002_DEVDEP_microsoft_sp_module_interfaces.js';
|
|
22
|
+
import { FN002022_DEVDEP_microsoft_eslint_plugin_spfx } from './rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js';
|
|
23
|
+
import { FN002023_DEVDEP_microsoft_eslint_config_spfx } from './rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js';
|
|
24
|
+
import { FN002030_DEVDEP_microsoft_spfx_web_build_rig } from './rules/FN002030_DEVDEP_microsoft_spfx_web_build_rig.js';
|
|
25
|
+
import { FN002034_DEVDEP_microsoft_spfx_heft_plugins } from './rules/FN002034_DEVDEP_microsoft_spfx_heft_plugins.js';
|
|
26
|
+
import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
|
|
27
|
+
export default [
|
|
28
|
+
new FN001001_DEP_microsoft_sp_core_library('1.22.2'),
|
|
29
|
+
new FN001002_DEP_microsoft_sp_lodash_subset('1.22.2'),
|
|
30
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.22.2'),
|
|
31
|
+
new FN001004_DEP_microsoft_sp_webpart_base('1.22.2'),
|
|
32
|
+
new FN001011_DEP_microsoft_sp_dialog('1.22.2'),
|
|
33
|
+
new FN001012_DEP_microsoft_sp_application_base('1.22.2'),
|
|
34
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility('1.22.2'),
|
|
35
|
+
new FN001021_DEP_microsoft_sp_property_pane('1.22.2'),
|
|
36
|
+
new FN001023_DEP_microsoft_sp_component_base('1.22.2'),
|
|
37
|
+
new FN001024_DEP_microsoft_sp_diagnostics('1.22.2'),
|
|
38
|
+
new FN001025_DEP_microsoft_sp_dynamic_data('1.22.2'),
|
|
39
|
+
new FN001026_DEP_microsoft_sp_extension_base('1.22.2'),
|
|
40
|
+
new FN001027_DEP_microsoft_sp_http('1.22.2'),
|
|
41
|
+
new FN001028_DEP_microsoft_sp_list_subscription('1.22.2'),
|
|
42
|
+
new FN001029_DEP_microsoft_sp_loader('1.22.2'),
|
|
43
|
+
new FN001030_DEP_microsoft_sp_module_interfaces('1.22.2'),
|
|
44
|
+
new FN001031_DEP_microsoft_sp_odata_types('1.22.2'),
|
|
45
|
+
new FN001032_DEP_microsoft_sp_page_context('1.22.2'),
|
|
46
|
+
new FN001013_DEP_microsoft_decorators('1.22.2'),
|
|
47
|
+
new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.22.2'),
|
|
48
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.22.2'),
|
|
49
|
+
new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.22.2'),
|
|
50
|
+
new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.22.2'),
|
|
51
|
+
new FN002030_DEVDEP_microsoft_spfx_web_build_rig('1.22.2'),
|
|
52
|
+
new FN002034_DEVDEP_microsoft_spfx_heft_plugins('1.22.2'),
|
|
53
|
+
new FN010001_YORC_version('1.22.2')
|
|
54
|
+
];
|
|
55
|
+
//# sourceMappingURL=upgrade-1.22.2.js.map
|
|
@@ -16,7 +16,7 @@ export const options = z.strictObject({
|
|
|
16
16
|
preview: z.boolean().optional(),
|
|
17
17
|
toVersion: z.string().optional().alias('v'),
|
|
18
18
|
shell: z.enum(['bash', 'powershell', 'cmd']).default('powershell'),
|
|
19
|
-
output: z.enum(['json', 'text', 'md', 'tour', 'csv', 'none']).optional()
|
|
19
|
+
output: z.enum(['json', 'text', 'md', 'tour', 'csv', 'none']).alias('o').optional()
|
|
20
20
|
});
|
|
21
21
|
class SpfxProjectUpgradeCommand extends BaseProjectCommand {
|
|
22
22
|
get name() {
|
|
@@ -84,7 +84,8 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
|
|
|
84
84
|
'1.21.0',
|
|
85
85
|
'1.21.1',
|
|
86
86
|
'1.22.0',
|
|
87
|
-
'1.22.1'
|
|
87
|
+
'1.22.1',
|
|
88
|
+
'1.22.2'
|
|
88
89
|
];
|
|
89
90
|
}
|
|
90
91
|
async commandAction(logger, args) {
|
|
@@ -597,8 +597,8 @@ class SpfxDoctorCommand extends BaseProjectCommand {
|
|
|
597
597
|
fix: 'npm i -g gulp-cli@3'
|
|
598
598
|
},
|
|
599
599
|
node: {
|
|
600
|
-
range: '>=22.14.0 <
|
|
601
|
-
fix: 'Install Node.js >=22.14.0 <
|
|
600
|
+
range: '>=22.14.0 <23.0.0',
|
|
601
|
+
fix: 'Install Node.js >=22.14.0 <23.0.0'
|
|
602
602
|
},
|
|
603
603
|
sp: SharePointVersion.SPO,
|
|
604
604
|
yo: {
|
|
@@ -612,8 +612,8 @@ class SpfxDoctorCommand extends BaseProjectCommand {
|
|
|
612
612
|
fix: 'npm i -g gulp-cli@3'
|
|
613
613
|
},
|
|
614
614
|
node: {
|
|
615
|
-
range: '>=22.14.0 <
|
|
616
|
-
fix: 'Install Node.js >=22.14.0 <
|
|
615
|
+
range: '>=22.14.0 <23.0.0',
|
|
616
|
+
fix: 'Install Node.js >=22.14.0 <23.0.0'
|
|
617
617
|
},
|
|
618
618
|
sp: SharePointVersion.SPO,
|
|
619
619
|
yo: {
|
|
@@ -627,8 +627,8 @@ class SpfxDoctorCommand extends BaseProjectCommand {
|
|
|
627
627
|
fix: 'npm i -g @rushstack/heft@1'
|
|
628
628
|
},
|
|
629
629
|
node: {
|
|
630
|
-
range: '>=22.14.0 <
|
|
631
|
-
fix: 'Install Node.js >=22.14.0 <
|
|
630
|
+
range: '>=22.14.0 <23.0.0',
|
|
631
|
+
fix: 'Install Node.js >=22.14.0 <23.0.0'
|
|
632
632
|
},
|
|
633
633
|
sp: SharePointVersion.SPO,
|
|
634
634
|
yo: {
|
|
@@ -642,8 +642,23 @@ class SpfxDoctorCommand extends BaseProjectCommand {
|
|
|
642
642
|
fix: 'npm i -g @rushstack/heft@1'
|
|
643
643
|
},
|
|
644
644
|
node: {
|
|
645
|
-
range: '>=22.14.0 <
|
|
646
|
-
fix: 'Install Node.js >=22.14.0 <
|
|
645
|
+
range: '>=22.14.0 <23.0.0',
|
|
646
|
+
fix: 'Install Node.js >=22.14.0 <23.0.0'
|
|
647
|
+
},
|
|
648
|
+
sp: SharePointVersion.SPO,
|
|
649
|
+
yo: {
|
|
650
|
+
range: '^4 || ^5 || ^6',
|
|
651
|
+
fix: 'npm i -g yo@6'
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
'1.22.2': {
|
|
655
|
+
heft: {
|
|
656
|
+
range: '^1',
|
|
657
|
+
fix: 'npm i -g @rushstack/heft@1'
|
|
658
|
+
},
|
|
659
|
+
node: {
|
|
660
|
+
range: '>=22.14.0 <23.0.0',
|
|
661
|
+
fix: 'Install Node.js >=22.14.0 <23.0.0'
|
|
647
662
|
},
|
|
648
663
|
sp: SharePointVersion.SPO,
|
|
649
664
|
yo: {
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoSiteHubSiteConnectCommand_instances, _SpoSiteHubSiteConnectCommand_initOptions, _SpoSiteHubSiteConnectCommand_initValidators;
|
|
7
1
|
import request from '../../../../request.js';
|
|
8
2
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
3
|
import { validation } from '../../../../utils/validation.js';
|
|
10
4
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
5
|
import commands from '../../commands.js';
|
|
6
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { spo } from '../../../../utils/spo.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
siteUrl: z.string()
|
|
12
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
14
|
+
})
|
|
15
|
+
.alias('u'),
|
|
16
|
+
id: z.uuid().alias('i'),
|
|
17
|
+
asAdmin: z.boolean().optional()
|
|
18
|
+
});
|
|
12
19
|
class SpoSiteHubSiteConnectCommand extends SpoCommand {
|
|
13
20
|
get name() {
|
|
14
21
|
return commands.SITE_HUBSITE_CONNECT;
|
|
@@ -16,11 +23,8 @@ class SpoSiteHubSiteConnectCommand extends SpoCommand {
|
|
|
16
23
|
get description() {
|
|
17
24
|
return 'Connects the specified site collection to the given hub site';
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoSiteHubSiteConnectCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoSiteHubSiteConnectCommand_instances, "m", _SpoSiteHubSiteConnectCommand_initOptions).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoSiteHubSiteConnectCommand_instances, "m", _SpoSiteHubSiteConnectCommand_initValidators).call(this);
|
|
26
|
+
get schema() {
|
|
27
|
+
return options;
|
|
24
28
|
}
|
|
25
29
|
async commandAction(logger, args) {
|
|
26
30
|
try {
|
|
@@ -28,12 +32,22 @@ class SpoSiteHubSiteConnectCommand extends SpoCommand {
|
|
|
28
32
|
await logger.logToStderr(`Connecting site collection ${args.options.siteUrl} to hub site ${args.options.id}...`);
|
|
29
33
|
}
|
|
30
34
|
const requestOptions = {
|
|
31
|
-
url: `${args.options.siteUrl}/_api/site/JoinHubSite('${formatting.encodeQueryParameter(args.options.id)}')`,
|
|
32
35
|
headers: {
|
|
33
36
|
accept: 'application/json;odata=nometadata'
|
|
34
37
|
},
|
|
35
38
|
responseType: 'json'
|
|
36
39
|
};
|
|
40
|
+
if (!args.options.asAdmin) {
|
|
41
|
+
requestOptions.url = `${args.options.siteUrl}/_api/site/JoinHubSite('${formatting.encodeQueryParameter(args.options.id)}')`;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const tenantAdminUrl = await spo.getSpoAdminUrl(logger, this.verbose);
|
|
45
|
+
requestOptions.url = `${tenantAdminUrl}/_api/SPO.Tenant/ConnectSiteToHubSiteById`;
|
|
46
|
+
requestOptions.data = {
|
|
47
|
+
siteUrl: args.options.siteUrl,
|
|
48
|
+
hubSiteId: args.options.id
|
|
49
|
+
};
|
|
50
|
+
}
|
|
37
51
|
await request.post(requestOptions);
|
|
38
52
|
}
|
|
39
53
|
catch (err) {
|
|
@@ -41,23 +55,5 @@ class SpoSiteHubSiteConnectCommand extends SpoCommand {
|
|
|
41
55
|
}
|
|
42
56
|
}
|
|
43
57
|
}
|
|
44
|
-
_SpoSiteHubSiteConnectCommand_instances = new WeakSet(), _SpoSiteHubSiteConnectCommand_initOptions = function _SpoSiteHubSiteConnectCommand_initOptions() {
|
|
45
|
-
this.options.unshift({
|
|
46
|
-
option: '-u, --siteUrl <siteUrl>'
|
|
47
|
-
}, {
|
|
48
|
-
option: '-i, --id <id>'
|
|
49
|
-
});
|
|
50
|
-
}, _SpoSiteHubSiteConnectCommand_initValidators = function _SpoSiteHubSiteConnectCommand_initValidators() {
|
|
51
|
-
this.validators.push(async (args) => {
|
|
52
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.siteUrl);
|
|
53
|
-
if (isValidSharePointUrl !== true) {
|
|
54
|
-
return isValidSharePointUrl;
|
|
55
|
-
}
|
|
56
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
57
|
-
return `${args.options.id} is not a valid GUID`;
|
|
58
|
-
}
|
|
59
|
-
return true;
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
58
|
export default new SpoSiteHubSiteConnectCommand();
|
|
63
59
|
//# sourceMappingURL=site-hubsite-connect.js.map
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoSiteHubSiteDisconnectCommand_instances, _SpoSiteHubSiteDisconnectCommand_initTelemetry, _SpoSiteHubSiteDisconnectCommand_initOptions, _SpoSiteHubSiteDisconnectCommand_initValidators;
|
|
7
1
|
import { cli } from '../../../../cli/cli.js';
|
|
8
2
|
import request from '../../../../request.js';
|
|
9
3
|
import { validation } from '../../../../utils/validation.js';
|
|
10
4
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
5
|
import commands from '../../commands.js';
|
|
6
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { spo } from '../../../../utils/spo.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
siteUrl: z.string()
|
|
12
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
14
|
+
})
|
|
15
|
+
.alias('u'),
|
|
16
|
+
asAdmin: z.boolean().optional(),
|
|
17
|
+
force: z.boolean().alias('f').optional()
|
|
18
|
+
});
|
|
12
19
|
class SpoSiteHubSiteDisconnectCommand extends SpoCommand {
|
|
13
20
|
get name() {
|
|
14
21
|
return commands.SITE_HUBSITE_DISCONNECT;
|
|
@@ -16,12 +23,8 @@ class SpoSiteHubSiteDisconnectCommand extends SpoCommand {
|
|
|
16
23
|
get description() {
|
|
17
24
|
return 'Disconnects the specified site collection from its hub site';
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoSiteHubSiteDisconnectCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoSiteHubSiteDisconnectCommand_instances, "m", _SpoSiteHubSiteDisconnectCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoSiteHubSiteDisconnectCommand_instances, "m", _SpoSiteHubSiteDisconnectCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoSiteHubSiteDisconnectCommand_instances, "m", _SpoSiteHubSiteDisconnectCommand_initValidators).call(this);
|
|
26
|
+
get schema() {
|
|
27
|
+
return options;
|
|
25
28
|
}
|
|
26
29
|
async commandAction(logger, args) {
|
|
27
30
|
if (args.options.force) {
|
|
@@ -40,12 +43,22 @@ class SpoSiteHubSiteDisconnectCommand extends SpoCommand {
|
|
|
40
43
|
await logger.logToStderr(`Disconnecting site collection ${args.options.siteUrl} from its hub site...`);
|
|
41
44
|
}
|
|
42
45
|
const requestOptions = {
|
|
43
|
-
url: `${args.options.siteUrl}/_api/site/JoinHubSite('00000000-0000-0000-0000-000000000000')`,
|
|
44
46
|
headers: {
|
|
45
47
|
accept: 'application/json;odata=nometadata'
|
|
46
48
|
},
|
|
47
49
|
responseType: 'json'
|
|
48
50
|
};
|
|
51
|
+
if (!args.options.asAdmin) {
|
|
52
|
+
requestOptions.url = `${args.options.siteUrl}/_api/site/JoinHubSite('00000000-0000-0000-0000-000000000000')`;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
const tenantAdminUrl = await spo.getSpoAdminUrl(logger, this.verbose);
|
|
56
|
+
requestOptions.url = `${tenantAdminUrl}/_api/SPO.Tenant/ConnectSiteToHubSiteById`;
|
|
57
|
+
requestOptions.data = {
|
|
58
|
+
siteUrl: args.options.siteUrl,
|
|
59
|
+
hubSiteId: '00000000-0000-0000-0000-000000000000'
|
|
60
|
+
};
|
|
61
|
+
}
|
|
49
62
|
await request.post(requestOptions);
|
|
50
63
|
}
|
|
51
64
|
catch (err) {
|
|
@@ -53,20 +66,5 @@ class SpoSiteHubSiteDisconnectCommand extends SpoCommand {
|
|
|
53
66
|
}
|
|
54
67
|
}
|
|
55
68
|
}
|
|
56
|
-
_SpoSiteHubSiteDisconnectCommand_instances = new WeakSet(), _SpoSiteHubSiteDisconnectCommand_initTelemetry = function _SpoSiteHubSiteDisconnectCommand_initTelemetry() {
|
|
57
|
-
this.telemetry.push((args) => {
|
|
58
|
-
Object.assign(this.telemetryProperties, {
|
|
59
|
-
force: args.options.force || false
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
}, _SpoSiteHubSiteDisconnectCommand_initOptions = function _SpoSiteHubSiteDisconnectCommand_initOptions() {
|
|
63
|
-
this.options.unshift({
|
|
64
|
-
option: '-u, --siteUrl <siteUrl>'
|
|
65
|
-
}, {
|
|
66
|
-
option: '-f, --force'
|
|
67
|
-
});
|
|
68
|
-
}, _SpoSiteHubSiteDisconnectCommand_initValidators = function _SpoSiteHubSiteDisconnectCommand_initValidators() {
|
|
69
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.siteUrl));
|
|
70
|
-
};
|
|
71
69
|
export default new SpoSiteHubSiteDisconnectCommand();
|
|
72
70
|
//# sourceMappingURL=site-hubsite-disconnect.js.map
|
|
@@ -45,7 +45,7 @@ m365 spfx project upgrade [options]
|
|
|
45
45
|
|
|
46
46
|
## Remarks
|
|
47
47
|
|
|
48
|
-
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.
|
|
48
|
+
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.22.2).
|
|
49
49
|
|
|
50
50
|
This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
|
|
51
51
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo site hubsite connect
|
|
4
6
|
|
|
@@ -14,10 +16,13 @@ m365 spo site hubsite connect [options]
|
|
|
14
16
|
|
|
15
17
|
```md definition-list
|
|
16
18
|
`-u, --siteUrl <siteUrl>`
|
|
17
|
-
: The URL of the site collection to connect to the hub site
|
|
19
|
+
: The URL of the site collection to connect to the hub site.
|
|
18
20
|
|
|
19
21
|
`-i, --id <id>`
|
|
20
|
-
: The ID of the hub site to which to connect the site collection
|
|
22
|
+
: The ID of the hub site to which to connect the site collection.
|
|
23
|
+
|
|
24
|
+
`--asAdmin`
|
|
25
|
+
: Connect the site to a hub site as SharePoint admin.
|
|
21
26
|
```
|
|
22
27
|
|
|
23
28
|
<Global />
|
|
@@ -28,6 +33,25 @@ If the specified site collection is already connected to a hub site, it will be
|
|
|
28
33
|
|
|
29
34
|
If the specified `id` doesn't point to a valid hub site, you will get a `ResourceNotFoundException` error.
|
|
30
35
|
|
|
36
|
+
## Permissions
|
|
37
|
+
|
|
38
|
+
<Tabs>
|
|
39
|
+
<TabItem value="Delegated">
|
|
40
|
+
|
|
41
|
+
| Resource | Permissions |
|
|
42
|
+
|------------|----------------------|
|
|
43
|
+
| SharePoint | AllSites.FullControl |
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="Application">
|
|
47
|
+
|
|
48
|
+
| Resource | Permissions |
|
|
49
|
+
|------------|-----------------------|
|
|
50
|
+
| SharePoint | Sites.FullControl.All |
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
</Tabs>
|
|
54
|
+
|
|
31
55
|
## Examples
|
|
32
56
|
|
|
33
57
|
Connect a specific site collection to a hub site
|
|
@@ -36,6 +60,12 @@ Connect a specific site collection to a hub site
|
|
|
36
60
|
m365 spo site hubsite connect --siteUrl https://contoso.sharepoint.com/sites/contoso-sales --id 255a50b2-527f-4413-8485-57f4c17a24d1
|
|
37
61
|
```
|
|
38
62
|
|
|
63
|
+
Connect a specific site collection to a hub site as SharePoint admin
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
m365 spo site hubsite connect --siteUrl https://contoso.sharepoint.com/sites/contoso-sales --id 255a50b2-527f-4413-8485-57f4c17a24d1 --asAdmin
|
|
67
|
+
```
|
|
68
|
+
|
|
39
69
|
## Response
|
|
40
70
|
|
|
41
71
|
The command won't return a response on success.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo site hubsite disconnect
|
|
4
6
|
|
|
@@ -14,14 +16,36 @@ m365 spo site hubsite disconnect [options]
|
|
|
14
16
|
|
|
15
17
|
```md definition-list
|
|
16
18
|
`-u, --siteUrl <siteUrl>`
|
|
17
|
-
: URL of the site collection to disconnect from its hub site
|
|
19
|
+
: URL of the site collection to disconnect from its hub site.
|
|
20
|
+
|
|
21
|
+
`--asAdmin`
|
|
22
|
+
: Disconnect the site from a hub site as SharePoint admin.
|
|
18
23
|
|
|
19
24
|
`-f, --force`
|
|
20
|
-
: Don't prompt for confirmation
|
|
25
|
+
: Don't prompt for confirmation.
|
|
21
26
|
```
|
|
22
27
|
|
|
23
28
|
<Global />
|
|
24
29
|
|
|
30
|
+
## Permissions
|
|
31
|
+
|
|
32
|
+
<Tabs>
|
|
33
|
+
<TabItem value="Delegated">
|
|
34
|
+
|
|
35
|
+
| Resource | Permissions |
|
|
36
|
+
|------------|----------------------|
|
|
37
|
+
| SharePoint | AllSites.FullControl |
|
|
38
|
+
|
|
39
|
+
</TabItem>
|
|
40
|
+
<TabItem value="Application">
|
|
41
|
+
|
|
42
|
+
| Resource | Permissions |
|
|
43
|
+
|------------|-----------------------|
|
|
44
|
+
| SharePoint | Sites.FullControl.All |
|
|
45
|
+
|
|
46
|
+
</TabItem>
|
|
47
|
+
</Tabs>
|
|
48
|
+
|
|
25
49
|
## Examples
|
|
26
50
|
|
|
27
51
|
Disconnect a specific site collection from its hub site. Will prompt for confirmation before disconnecting from the hub site.
|
|
@@ -30,6 +54,12 @@ Disconnect a specific site collection from its hub site. Will prompt for confirm
|
|
|
30
54
|
m365 spo site hubsite disconnect --siteUrl https://contoso.sharepoint.com/sites/sales
|
|
31
55
|
```
|
|
32
56
|
|
|
57
|
+
Disconnect a specific site collection from its hub site as SharePoint admin.
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
m365 spo site hubsite disconnect --siteUrl https://contoso.sharepoint.com/sites/sales --asAdmin
|
|
61
|
+
```
|
|
62
|
+
|
|
33
63
|
Disconnect a specific site collection from its hub site without prompting for confirmation.
|
|
34
64
|
|
|
35
65
|
```sh
|