@pnp/cli-microsoft365 12.0.0 → 12.1.0-beta.3545352
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/.mocharc.json +1 -1
- package/README.md +2 -2
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/cli/cli.js +29 -23
- package/dist/m365/base/AppCommand.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +4 -4
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +2 -2
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-remove.js +5 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-roleassignment-add.js +3 -3
- package/dist/m365/entra/commands/app/app-add.js +106 -150
- package/dist/m365/entra/commands/app/app-get.js +22 -38
- package/dist/m365/entra/commands/app/app-list.js +10 -22
- package/dist/m365/entra/commands/app/app-permission-add.js +36 -50
- package/dist/m365/entra/commands/app/app-permission-list.js +29 -48
- package/dist/m365/entra/commands/app/app-permission-remove.js +44 -82
- package/dist/m365/entra/commands/app/app-remove.js +21 -38
- package/dist/m365/entra/commands/app/app-role-add.js +32 -46
- package/dist/m365/entra/commands/app/app-role-list.js +20 -25
- package/dist/m365/entra/commands/app/app-role-remove.js +33 -41
- package/dist/m365/entra/commands/app/app-set.js +46 -69
- package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +2 -2
- package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +2 -2
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +2 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +2 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +2 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-remove.js +2 -2
- package/dist/m365/entra/commands/group/group-get.js +1 -1
- package/dist/m365/entra/commands/group/group-member-add.js +1 -1
- package/dist/m365/entra/commands/group/group-member-list.js +1 -1
- package/dist/m365/entra/commands/group/group-member-remove.js +1 -1
- package/dist/m365/entra/commands/group/group-member-set.js +1 -1
- package/dist/m365/entra/commands/group/group-remove.js +1 -1
- package/dist/m365/entra/commands/group/group-set.js +1 -1
- package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +1 -1
- package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +1 -1
- package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +1 -1
- package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +1 -1
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-get.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-remove.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-renew.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-set.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +2 -2
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +2 -2
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +1 -1
- package/dist/m365/entra/commands/organization/organization-set.js +1 -1
- package/dist/m365/entra/commands/pim/pim-role-assignment-add.js +5 -5
- package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +2 -2
- package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +2 -2
- package/dist/m365/entra/commands/pim/pim-role-assignment-remove.js +5 -5
- package/dist/m365/entra/commands/pim/pim-role-request-list.js +2 -2
- package/dist/m365/entra/commands/roleassignment/roleassignment-add.js +7 -7
- package/dist/m365/entra/commands/roledefinition/roledefinition-get.js +1 -1
- package/dist/m365/entra/commands/roledefinition/roledefinition-remove.js +1 -1
- package/dist/m365/entra/commands/roledefinition/roledefinition-set.js +1 -1
- package/dist/m365/entra/commands/user/user-add.js +1 -1
- package/dist/m365/entra/commands/user/user-get.js +1 -1
- package/dist/m365/entra/commands/user/user-groupmembership-list.js +1 -1
- package/dist/m365/entra/commands/user/user-license-add.js +1 -1
- package/dist/m365/entra/commands/user/user-license-list.js +1 -1
- package/dist/m365/entra/commands/user/user-license-remove.js +1 -1
- package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +1 -1
- package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +1 -1
- package/dist/m365/entra/commands/user/user-remove.js +1 -1
- package/dist/m365/entra/commands/user/user-session-revoke.js +1 -1
- package/dist/m365/entra/commands/user/user-set.js +2 -2
- package/dist/m365/entra/commands/user/user-signin-list.js +2 -2
- package/dist/m365/flow/commands/flow-export.js +1 -1
- package/dist/m365/flow/commands/flow-remove.js +1 -1
- package/dist/m365/flow/commands/owner/owner-ensure.js +1 -1
- package/dist/m365/flow/commands/owner/owner-list.js +1 -1
- package/dist/m365/flow/commands/owner/owner-remove.js +1 -1
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-restore.js +1 -1
- package/dist/m365/flow/commands/run/run-cancel.js +1 -1
- package/dist/m365/flow/commands/run/run-get.js +1 -1
- package/dist/m365/flow/commands/run/run-list.js +1 -1
- package/dist/m365/flow/commands/run/run-resubmit.js +1 -1
- package/dist/m365/graph/commands/directoryextension/directoryextension-get.js +3 -3
- package/dist/m365/graph/commands/directoryextension/directoryextension-list.js +2 -2
- package/dist/m365/graph/commands/directoryextension/directoryextension-remove.js +3 -3
- package/dist/m365/outlook/commands/mail/mail-searchfolder-add.js +1 -1
- package/dist/m365/outlook/commands/mailbox/mailbox-settings-get.js +1 -1
- package/dist/m365/pp/commands/website/website-get.js +1 -1
- package/dist/m365/pp/commands/website/website-remove.js +1 -1
- package/dist/m365/pp/commands/website/website-webrole-list.js +1 -1
- package/dist/m365/spe/commands/container/container-add.js +1 -1
- package/dist/m365/spe/commands/container/container-get.js +1 -1
- package/dist/m365/spe/commands/container/container-permission-add.js +1 -1
- package/dist/m365/spe/commands/container/container-permission-list.js +1 -1
- package/dist/m365/spe/commands/container/container-permission-remove.js +1 -1
- package/dist/m365/spe/commands/container/container-permission-set.js +1 -1
- package/dist/m365/spe/commands/container/container-recyclebinitem-list.js +1 -1
- package/dist/m365/spe/commands/container/container-recyclebinitem-remove.js +1 -1
- package/dist/m365/spe/commands/container/container-recyclebinitem-restore.js +1 -1
- package/dist/m365/spe/commands/container/container-remove.js +1 -1
- package/dist/m365/spe/commands/containertype/containertype-add.js +1 -1
- package/dist/m365/spe/commands/containertype/containertype-get.js +1 -1
- package/dist/m365/spe/commands/containertype/containertype-remove.js +1 -1
- package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +15 -0
- package/dist/m365/spfx/commands/package/package-generate.js +31 -52
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +27 -62
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.2.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/spfx-deps.js +5 -2
- package/dist/m365/spfx/commands/project/project-doctor.js +22 -52
- package/dist/m365/spfx/commands/project/project-externalize.js +16 -26
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +28 -65
- package/dist/m365/spfx/commands/project/project-permissions-grant.js +4 -2
- package/dist/m365/spfx/commands/project/project-rename.js +17 -29
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001036_DEP_microsoft_sp_copilot_component.js +10 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.2.js +57 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -4
- package/dist/m365/spfx/commands/spfx-doctor.js +23 -47
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +39 -65
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +28 -56
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +40 -68
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +24 -66
- package/dist/m365/spo/commands/file/file-add.js +51 -77
- package/dist/m365/spo/commands/file/file-archive.js +1 -1
- package/dist/m365/spo/commands/file/file-checkin.js +35 -64
- package/dist/m365/spo/commands/file/file-checkout-undo.js +25 -49
- package/dist/m365/spo/commands/file/file-checkout.js +24 -47
- package/dist/m365/spo/commands/file/file-copy.js +37 -68
- package/dist/m365/spo/commands/file/file-get.js +44 -79
- package/dist/m365/spo/commands/file/file-list.js +16 -39
- package/dist/m365/spo/commands/file/file-move.js +30 -68
- package/dist/m365/spo/commands/file/file-remove.js +27 -56
- package/dist/m365/spo/commands/file/file-rename.js +15 -36
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +26 -51
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +25 -50
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +47 -75
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +39 -70
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +26 -52
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +25 -49
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +24 -47
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +46 -70
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +33 -57
- package/dist/m365/spo/commands/file/file-sharinglink-get.js +25 -47
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +32 -53
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +26 -51
- package/dist/m365/spo/commands/file/file-sharinglink-set.js +29 -55
- package/dist/m365/spo/commands/file/file-unarchive.js +1 -1
- package/dist/m365/spo/commands/file/file-version-clear.js +25 -45
- package/dist/m365/spo/commands/file/file-version-get.js +25 -43
- package/dist/m365/spo/commands/file/file-version-keep.js +1 -1
- package/dist/m365/spo/commands/file/file-version-list.js +24 -41
- package/dist/m365/spo/commands/file/file-version-remove.js +26 -47
- package/dist/m365/spo/commands/file/file-version-restore.js +26 -47
- package/dist/m365/spo/commands/folder/folder-add.js +19 -48
- package/dist/m365/spo/commands/folder/folder-archive.js +1 -1
- package/dist/m365/spo/commands/folder/folder-copy.js +36 -62
- package/dist/m365/spo/commands/folder/folder-get.js +30 -51
- package/dist/m365/spo/commands/folder/folder-list.js +16 -39
- package/dist/m365/spo/commands/folder/folder-move.js +36 -62
- package/dist/m365/spo/commands/folder/folder-remove.js +15 -36
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +30 -48
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +30 -50
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +49 -79
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +37 -67
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +15 -36
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +14 -33
- package/dist/m365/spo/commands/folder/folder-set.js +28 -48
- package/dist/m365/spo/commands/folder/folder-sharinglink-add.js +58 -86
- package/dist/m365/spo/commands/folder/folder-sharinglink-clear.js +33 -50
- package/dist/m365/spo/commands/folder/folder-sharinglink-get.js +33 -42
- package/dist/m365/spo/commands/folder/folder-sharinglink-list.js +32 -47
- package/dist/m365/spo/commands/folder/folder-sharinglink-remove.js +34 -41
- package/dist/m365/spo/commands/folder/folder-sharinglink-set.js +38 -43
- package/dist/m365/spo/commands/folder/folder-unarchive.js +1 -1
- package/dist/m365/spo/commands/group/group-add.js +19 -60
- package/dist/m365/spo/commands/group/group-get.js +32 -45
- package/dist/m365/spo/commands/group/group-list.js +13 -27
- package/dist/m365/spo/commands/group/group-member-add.js +52 -84
- package/dist/m365/spo/commands/group/group-member-list.js +24 -38
- package/dist/m365/spo/commands/group/group-member-remove.js +49 -68
- package/dist/m365/spo/commands/group/group-remove.js +25 -45
- package/dist/m365/spo/commands/group/group-set.js +36 -79
- package/dist/m365/spo/commands/list/list-defaultvalue-clear.js +1 -1
- package/dist/m365/spo/commands/list/list-defaultvalue-get.js +1 -1
- package/dist/m365/spo/commands/list/list-defaultvalue-list.js +1 -1
- package/dist/m365/spo/commands/list/list-defaultvalue-remove.js +1 -1
- package/dist/m365/spo/commands/list/list-defaultvalue-set.js +1 -1
- package/dist/m365/spo/commands/list/list-sensitivitylabel-remove.js +1 -1
- package/dist/m365/spo/commands/list/list-view-add.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +3 -3
- package/dist/m365/spo/commands/listitem/listitem-batch-set.js +1 -1
- package/dist/m365/spo/commands/page/page-add.js +32 -69
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +74 -101
- package/dist/m365/spo/commands/page/page-column-get.js +15 -32
- package/dist/m365/spo/commands/page/page-column-list.js +14 -27
- package/dist/m365/spo/commands/page/page-control-get.js +18 -27
- package/dist/m365/spo/commands/page/page-control-list.js +13 -20
- package/dist/m365/spo/commands/page/page-control-remove.js +1 -1
- package/dist/m365/spo/commands/page/page-control-set.js +51 -61
- package/dist/m365/spo/commands/page/page-copy.js +15 -31
- package/dist/m365/spo/commands/page/page-header-set.js +25 -89
- package/dist/m365/spo/commands/page/page-list.js +12 -18
- package/dist/m365/spo/commands/page/page-remove.js +16 -39
- package/dist/m365/spo/commands/page/page-section-add.js +108 -173
- package/dist/m365/spo/commands/page/page-section-get.js +17 -27
- package/dist/m365/spo/commands/page/page-section-list.js +13 -20
- package/dist/m365/spo/commands/page/page-section-remove.js +4 -1
- package/dist/m365/spo/commands/page/page-set.js +50 -100
- package/dist/m365/spo/commands/page/page-template-list.js +12 -18
- package/dist/m365/spo/commands/page/page-text-add.js +23 -45
- package/dist/m365/spo/commands/propertybag/propertybag-get.js +14 -29
- package/dist/m365/spo/commands/propertybag/propertybag-list.js +13 -27
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +15 -32
- package/dist/m365/spo/commands/propertybag/propertybag-set.js +15 -31
- package/dist/m365/spo/commands/roledefinition/roledefinition-add.js +45 -44
- package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +14 -25
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +12 -18
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +15 -35
- package/dist/m365/spo/commands/site/site-hubsite-connect.js +1 -1
- package/dist/m365/spo/commands/tenant/tenant-site-get.js +1 -1
- package/dist/m365/spo/commands/user/user-get.js +1 -1
- package/dist/m365/spo/commands/web/web-rule-get.js +1 -1
- package/dist/m365/spo/commands/web/web-rule-list.js +2 -2
- package/dist/m365/spo/commands/web/web-rule-remove.js +1 -1
- package/dist/m365/spp/commands/autofillcolumn/autofillcolumn-set.js +2 -2
- package/dist/m365/spp/commands/model/model-apply.js +2 -2
- package/dist/m365/teams/commands/callrecord/callrecord-get.js +1 -1
- package/dist/m365/teams/commands/callrecord/callrecord-list.js +1 -1
- package/dist/m365/teams/commands/chat/chatUtil.js +1 -1
- package/dist/m365/viva/commands/connections/connections-app-create.js +36 -42
- package/dist/m365/viva/commands/engage/engage-community-add.js +75 -71
- package/dist/m365/viva/commands/engage/engage-community-get.js +8 -16
- package/dist/m365/viva/commands/engage/engage-community-list.js +5 -0
- package/dist/m365/viva/commands/engage/engage-community-remove.js +28 -48
- package/dist/m365/viva/commands/engage/engage-community-set.js +43 -66
- package/dist/m365/viva/commands/engage/engage-community-user-add.js +8 -13
- package/dist/m365/viva/commands/engage/engage-community-user-list.js +1 -1
- package/dist/m365/viva/commands/engage/engage-community-user-remove.js +4 -2
- package/dist/m365/viva/commands/engage/engage-message-add.js +22 -52
- package/dist/m365/viva/commands/engage/engage-message-get.js +8 -23
- package/dist/m365/viva/commands/engage/engage-message-like-set.js +10 -39
- package/dist/m365/viva/commands/engage/engage-message-list.js +22 -66
- package/dist/m365/viva/commands/engage/engage-message-remove.js +9 -32
- package/dist/m365/viva/commands/engage/engage-network-list.js +8 -22
- package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-role-list.js +5 -0
- package/dist/m365/viva/commands/engage/engage-role-member-add.js +3 -5
- package/dist/m365/viva/commands/engage/engage-role-member-list.js +1 -1
- package/dist/m365/viva/commands/engage/engage-role-member-remove.js +4 -2
- package/dist/m365/viva/commands/engage/engage-search.js +16 -65
- package/dist/m365/viva/commands/engage/engage-user-get.js +15 -33
- package/dist/m365/viva/commands/engage/engage-user-list.js +22 -57
- package/dist/utils/formatting.js +5 -4
- package/dist/utils/zod.js +2 -1
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-add.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-batch-remove.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-batch-set.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-get.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-isrecord.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-list.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-lock.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-unlock.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-remove.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-ensure.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-remove.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +23 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +23 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-reset.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-set.mdx +19 -0
- package/docs/docs/cmd/spo/page/page-text-add.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-get.mdx +5 -0
- package/docs/docs/cmd/viva/engage/engage-community-add.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-get.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-remove.mdx +21 -0
- package/docs/docs/cmd/viva/engage/engage-community-set.mdx +19 -0
- package/npm-shrinkwrap.json +592 -929
- package/package.json +32 -31
|
@@ -1,13 +1,8 @@
|
|
|
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 _SpfxProjectGithubWorkflowAddCommand_instances, _a, _SpfxProjectGithubWorkflowAddCommand_initTelemetry, _SpfxProjectGithubWorkflowAddCommand_initOptions, _SpfxProjectGithubWorkflowAddCommand_initValidators;
|
|
7
1
|
import fs from 'fs';
|
|
8
2
|
import path from 'path';
|
|
9
3
|
import yaml from 'yaml';
|
|
10
|
-
import {
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { globalOptionsZod, CommandError } from '../../../../Command.js';
|
|
11
6
|
import { fsUtil } from '../../../../utils/fsUtil.js';
|
|
12
7
|
import { validation } from '../../../../utils/validation.js';
|
|
13
8
|
import commands from '../../commands.js';
|
|
@@ -15,6 +10,16 @@ import { workflow } from './DeployWorkflow.js';
|
|
|
15
10
|
import { BaseProjectCommand } from './base-project-command.js';
|
|
16
11
|
import { versions } from '../SpfxCompatibilityMatrix.js';
|
|
17
12
|
import { spfx } from '../../../../utils/spfx.js';
|
|
13
|
+
export const options = z.strictObject({
|
|
14
|
+
...globalOptionsZod.shape,
|
|
15
|
+
name: z.string().alias('n').optional(),
|
|
16
|
+
branchName: z.string().alias('b').optional(),
|
|
17
|
+
manuallyTrigger: z.boolean().alias('m').optional(),
|
|
18
|
+
loginMethod: z.enum(['application', 'user']).alias('l').optional(),
|
|
19
|
+
scope: z.enum(['tenant', 'sitecollection']).alias('s').optional(),
|
|
20
|
+
siteUrl: z.string().alias('u').optional(),
|
|
21
|
+
skipFeatureDeployment: z.boolean().optional()
|
|
22
|
+
});
|
|
18
23
|
class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
|
|
19
24
|
get name() {
|
|
20
25
|
return commands.PROJECT_GITHUB_WORKFLOW_ADD;
|
|
@@ -22,17 +27,26 @@ class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
|
|
|
22
27
|
get description() {
|
|
23
28
|
return 'Adds a GitHub workflow for a SharePoint Framework project.';
|
|
24
29
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
get schema() {
|
|
31
|
+
return options;
|
|
32
|
+
}
|
|
33
|
+
getRefinedSchema(schema) {
|
|
34
|
+
return schema
|
|
35
|
+
.refine(opts => !opts.scope || opts.scope !== 'sitecollection' || opts.siteUrl, {
|
|
36
|
+
error: `siteUrl option has to be defined when scope set to sitecollection`,
|
|
37
|
+
params: {
|
|
38
|
+
customCode: 'required'
|
|
39
|
+
},
|
|
40
|
+
path: ['siteUrl']
|
|
41
|
+
})
|
|
42
|
+
.refine(opts => !opts.scope || opts.scope !== 'sitecollection' || !opts.siteUrl || validation.isValidSharePointUrl(opts.siteUrl) === true, {
|
|
43
|
+
error: issue => validation.isValidSharePointUrl(issue.input.siteUrl)
|
|
44
|
+
});
|
|
31
45
|
}
|
|
32
46
|
async commandAction(logger, args) {
|
|
33
47
|
this.projectRootPath = this.getProjectRoot(process.cwd());
|
|
34
48
|
if (this.projectRootPath === null) {
|
|
35
|
-
throw new CommandError(`Couldn't find project root folder`,
|
|
49
|
+
throw new CommandError(`Couldn't find project root folder`, SpfxProjectGithubWorkflowAddCommand.ERROR_NO_PROJECT_ROOT_FOLDER);
|
|
36
50
|
}
|
|
37
51
|
try {
|
|
38
52
|
const project = { path: this.projectRootPath };
|
|
@@ -122,57 +136,6 @@ class SpfxProjectGithubWorkflowAddCommand extends BaseProjectCommand {
|
|
|
122
136
|
return workflow.jobs['build-and-deploy'].steps;
|
|
123
137
|
}
|
|
124
138
|
}
|
|
125
|
-
_a = SpfxProjectGithubWorkflowAddCommand, _SpfxProjectGithubWorkflowAddCommand_instances = new WeakSet(), _SpfxProjectGithubWorkflowAddCommand_initTelemetry = function _SpfxProjectGithubWorkflowAddCommand_initTelemetry() {
|
|
126
|
-
this.telemetry.push((args) => {
|
|
127
|
-
Object.assign(this.telemetryProperties, {
|
|
128
|
-
name: typeof args.options.name !== 'undefined',
|
|
129
|
-
branchName: typeof args.options.branchName !== 'undefined',
|
|
130
|
-
manuallyTrigger: !!args.options.manuallyTrigger,
|
|
131
|
-
loginMethod: typeof args.options.loginMethod !== 'undefined',
|
|
132
|
-
scope: typeof args.options.scope !== 'undefined',
|
|
133
|
-
skipFeatureDeployment: !!args.options.skipFeatureDeployment
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
}, _SpfxProjectGithubWorkflowAddCommand_initOptions = function _SpfxProjectGithubWorkflowAddCommand_initOptions() {
|
|
137
|
-
this.options.unshift({
|
|
138
|
-
option: '-n, --name [name]'
|
|
139
|
-
}, {
|
|
140
|
-
option: '-b, --branchName [branchName]'
|
|
141
|
-
}, {
|
|
142
|
-
option: '-m, --manuallyTrigger'
|
|
143
|
-
}, {
|
|
144
|
-
option: '-l, --loginMethod [loginMethod]',
|
|
145
|
-
autocomplete: _a.loginMethod
|
|
146
|
-
}, {
|
|
147
|
-
option: '-s, --scope [scope]',
|
|
148
|
-
autocomplete: _a.scope
|
|
149
|
-
}, {
|
|
150
|
-
option: '-u, --siteUrl [siteUrl]'
|
|
151
|
-
}, {
|
|
152
|
-
option: '--skipFeatureDeployment'
|
|
153
|
-
});
|
|
154
|
-
}, _SpfxProjectGithubWorkflowAddCommand_initValidators = function _SpfxProjectGithubWorkflowAddCommand_initValidators() {
|
|
155
|
-
this.validators.push(async (args) => {
|
|
156
|
-
if (args.options.scope && args.options.scope === 'sitecollection') {
|
|
157
|
-
if (!args.options.siteUrl) {
|
|
158
|
-
return `siteUrl option has to be defined when scope set to ${args.options.scope}`;
|
|
159
|
-
}
|
|
160
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.siteUrl);
|
|
161
|
-
if (isValidSharePointUrl !== true) {
|
|
162
|
-
return isValidSharePointUrl;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
if (args.options.loginMethod && _a.loginMethod.indexOf(args.options.loginMethod) < 0) {
|
|
166
|
-
return `${args.options.loginMethod} is not a valid login method. Allowed values are ${_a.loginMethod.join(', ')}`;
|
|
167
|
-
}
|
|
168
|
-
if (args.options.scope && _a.scope.indexOf(args.options.scope) < 0) {
|
|
169
|
-
return `${args.options.scope} is not a valid scope. Allowed values are ${_a.scope.join(', ')}`;
|
|
170
|
-
}
|
|
171
|
-
return true;
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
SpfxProjectGithubWorkflowAddCommand.loginMethod = ['application', 'user'];
|
|
175
|
-
SpfxProjectGithubWorkflowAddCommand.scope = ['tenant', 'sitecollection'];
|
|
176
139
|
SpfxProjectGithubWorkflowAddCommand.ERROR_NO_PROJECT_ROOT_FOLDER = 1;
|
|
177
140
|
export default new SpfxProjectGithubWorkflowAddCommand();
|
|
178
141
|
//# sourceMappingURL=project-github-workflow-add.js.map
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
4
|
import { cli } from '../../../../cli/cli.js';
|
|
4
5
|
import { CommandError } from '../../../../Command.js';
|
|
5
6
|
import spoServicePrincipalGrantAddCommand from '../../../spo/commands/serviceprincipal/serviceprincipal-grant-add.js';
|
|
6
7
|
import commands from '../../commands.js';
|
|
7
8
|
import { BaseProjectCommand } from './base-project-command.js';
|
|
9
|
+
export const options = globalOptionsZod.strict();
|
|
8
10
|
class SpfxProjectPermissionSGrantCommand extends BaseProjectCommand {
|
|
9
11
|
get name() {
|
|
10
12
|
return commands.PROJECT_PERMISSIONS_GRANT;
|
|
@@ -12,8 +14,8 @@ class SpfxProjectPermissionSGrantCommand extends BaseProjectCommand {
|
|
|
12
14
|
get description() {
|
|
13
15
|
return 'Grants API permissions defined in the current SPFx project';
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
get schema() {
|
|
18
|
+
return options;
|
|
17
19
|
}
|
|
18
20
|
async commandAction(logger) {
|
|
19
21
|
this.projectRootPath = this.getProjectRoot(process.cwd());
|
|
@@ -1,25 +1,19 @@
|
|
|
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 _SpfxProjectRenameCommand_instances, _SpfxProjectRenameCommand_initTelemetry, _SpfxProjectRenameCommand_initOptions;
|
|
7
1
|
import fs from 'fs';
|
|
8
2
|
import path from 'path';
|
|
9
3
|
import { v4 } from 'uuid';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
10
6
|
import { CommandError } from '../../../../Command.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
12
8
|
import { BaseProjectCommand } from './base-project-command.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
newName: z.string().alias('n'),
|
|
12
|
+
generateNewId: z.boolean().optional()
|
|
13
|
+
});
|
|
13
14
|
class SpfxProjectRenameCommand extends BaseProjectCommand {
|
|
14
|
-
get name() {
|
|
15
|
-
return commands.PROJECT_RENAME;
|
|
16
|
-
}
|
|
17
|
-
get description() {
|
|
18
|
-
return 'Renames SharePoint Framework project';
|
|
19
|
-
}
|
|
20
15
|
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
_SpfxProjectRenameCommand_instances.add(this);
|
|
16
|
+
super(...arguments);
|
|
23
17
|
this.generateNewId = () => {
|
|
24
18
|
return v4();
|
|
25
19
|
};
|
|
@@ -132,8 +126,15 @@ class SpfxProjectRenameCommand extends BaseProjectCommand {
|
|
|
132
126
|
}
|
|
133
127
|
}
|
|
134
128
|
};
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
}
|
|
130
|
+
get name() {
|
|
131
|
+
return commands.PROJECT_RENAME;
|
|
132
|
+
}
|
|
133
|
+
get description() {
|
|
134
|
+
return 'Renames SharePoint Framework project';
|
|
135
|
+
}
|
|
136
|
+
get schema() {
|
|
137
|
+
return options;
|
|
137
138
|
}
|
|
138
139
|
async commandAction(logger, args) {
|
|
139
140
|
this.projectRootPath = this.getProjectRoot(process.cwd());
|
|
@@ -165,19 +166,6 @@ class SpfxProjectRenameCommand extends BaseProjectCommand {
|
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
|
-
_SpfxProjectRenameCommand_instances = new WeakSet(), _SpfxProjectRenameCommand_initTelemetry = function _SpfxProjectRenameCommand_initTelemetry() {
|
|
169
|
-
this.telemetry.push((args) => {
|
|
170
|
-
Object.assign(this.telemetryProperties, {
|
|
171
|
-
generateNewId: args.options.generateNewId
|
|
172
|
-
});
|
|
173
|
-
});
|
|
174
|
-
}, _SpfxProjectRenameCommand_initOptions = function _SpfxProjectRenameCommand_initOptions() {
|
|
175
|
-
this.options.unshift({
|
|
176
|
-
option: '-n, --newName <newName>'
|
|
177
|
-
}, {
|
|
178
|
-
option: '--generateNewId'
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
169
|
SpfxProjectRenameCommand.ERROR_NO_PROJECT_ROOT_FOLDER = 1;
|
|
182
170
|
export default new SpfxProjectRenameCommand();
|
|
183
171
|
//# sourceMappingURL=project-rename.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DependencyRule } from './DependencyRule.js';
|
|
2
|
+
export class FN001036_DEP_microsoft_sp_copilot_component extends DependencyRule {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super({ ...options, packageName: '@microsoft/sp-copilot-component', isOptional: true });
|
|
5
|
+
}
|
|
6
|
+
get id() {
|
|
7
|
+
return 'FN001036';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=FN001036_DEP_microsoft_sp_copilot_component.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { FN001036_DEP_microsoft_sp_copilot_component } from './rules/FN001036_DEP_microsoft_sp_copilot_component.js';
|
|
22
|
+
import { FN002002_DEVDEP_microsoft_sp_module_interfaces } from './rules/FN002002_DEVDEP_microsoft_sp_module_interfaces.js';
|
|
23
|
+
import { FN002022_DEVDEP_microsoft_eslint_plugin_spfx } from './rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js';
|
|
24
|
+
import { FN002023_DEVDEP_microsoft_eslint_config_spfx } from './rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js';
|
|
25
|
+
import { FN002030_DEVDEP_microsoft_spfx_web_build_rig } from './rules/FN002030_DEVDEP_microsoft_spfx_web_build_rig.js';
|
|
26
|
+
import { FN002034_DEVDEP_microsoft_spfx_heft_plugins } from './rules/FN002034_DEVDEP_microsoft_spfx_heft_plugins.js';
|
|
27
|
+
import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
|
|
28
|
+
export default [
|
|
29
|
+
new FN001001_DEP_microsoft_sp_core_library({ packageVersion: '1.24.2' }),
|
|
30
|
+
new FN001002_DEP_microsoft_sp_lodash_subset({ packageVersion: '1.24.2' }),
|
|
31
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core({ packageVersion: '1.24.2' }),
|
|
32
|
+
new FN001004_DEP_microsoft_sp_webpart_base({ packageVersion: '1.24.2' }),
|
|
33
|
+
new FN001011_DEP_microsoft_sp_dialog({ packageVersion: '1.24.2' }),
|
|
34
|
+
new FN001012_DEP_microsoft_sp_application_base({ packageVersion: '1.24.2' }),
|
|
35
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility({ packageVersion: '1.24.2' }),
|
|
36
|
+
new FN001021_DEP_microsoft_sp_property_pane({ packageVersion: '1.24.2' }),
|
|
37
|
+
new FN001023_DEP_microsoft_sp_component_base({ packageVersion: '1.24.2' }),
|
|
38
|
+
new FN001024_DEP_microsoft_sp_diagnostics({ packageVersion: '1.24.2' }),
|
|
39
|
+
new FN001025_DEP_microsoft_sp_dynamic_data({ packageVersion: '1.24.2' }),
|
|
40
|
+
new FN001026_DEP_microsoft_sp_extension_base({ packageVersion: '1.24.2' }),
|
|
41
|
+
new FN001027_DEP_microsoft_sp_http({ packageVersion: '1.24.2' }),
|
|
42
|
+
new FN001028_DEP_microsoft_sp_list_subscription({ packageVersion: '1.24.2' }),
|
|
43
|
+
new FN001029_DEP_microsoft_sp_loader({ packageVersion: '1.24.2' }),
|
|
44
|
+
new FN001030_DEP_microsoft_sp_module_interfaces({ packageVersion: '1.24.2' }),
|
|
45
|
+
new FN001031_DEP_microsoft_sp_odata_types({ packageVersion: '1.24.2' }),
|
|
46
|
+
new FN001032_DEP_microsoft_sp_page_context({ packageVersion: '1.24.2' }),
|
|
47
|
+
new FN001013_DEP_microsoft_decorators({ packageVersion: '1.24.2' }),
|
|
48
|
+
new FN001034_DEP_microsoft_sp_adaptive_card_extension_base({ packageVersion: '1.24.2' }),
|
|
49
|
+
new FN001036_DEP_microsoft_sp_copilot_component({ packageVersion: '1.24.2' }),
|
|
50
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces({ packageVersion: '1.24.2' }),
|
|
51
|
+
new FN002022_DEVDEP_microsoft_eslint_plugin_spfx({ packageVersion: '1.24.2' }),
|
|
52
|
+
new FN002023_DEVDEP_microsoft_eslint_config_spfx({ packageVersion: '1.24.2' }),
|
|
53
|
+
new FN002030_DEVDEP_microsoft_spfx_web_build_rig({ packageVersion: '1.24.2' }),
|
|
54
|
+
new FN002034_DEVDEP_microsoft_spfx_heft_plugins({ packageVersion: '1.24.2' }),
|
|
55
|
+
new FN010001_YORC_version({ version: '1.24.2' })
|
|
56
|
+
];
|
|
57
|
+
//# sourceMappingURL=upgrade-1.24.2.js.map
|
|
@@ -25,9 +25,6 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
|
|
|
25
25
|
get description() {
|
|
26
26
|
return 'Upgrades SharePoint Framework project to the specified version';
|
|
27
27
|
}
|
|
28
|
-
get allowedOutputs() {
|
|
29
|
-
return ['json', 'text', 'md', 'tour'];
|
|
30
|
-
}
|
|
31
28
|
get schema() {
|
|
32
29
|
return options;
|
|
33
30
|
}
|
|
@@ -89,7 +86,8 @@ class SpfxProjectUpgradeCommand extends BaseProjectCommand {
|
|
|
89
86
|
'1.23.0',
|
|
90
87
|
'1.23.2',
|
|
91
88
|
'1.24.0',
|
|
92
|
-
'1.24.1'
|
|
89
|
+
'1.24.1',
|
|
90
|
+
'1.24.2'
|
|
93
91
|
];
|
|
94
92
|
}
|
|
95
93
|
async commandAction(logger, args) {
|
|
@@ -1,15 +1,26 @@
|
|
|
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 _SpfxDoctorCommand_instances, _SpfxDoctorCommand_initTelemetry, _SpfxDoctorCommand_initOptions, _SpfxDoctorCommand_initValidators;
|
|
7
1
|
import child_process from 'child_process';
|
|
8
2
|
import { satisfies } from 'semver';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { globalOptionsZod } from '../../../Command.js';
|
|
9
5
|
import { CheckStatus, formatting } from '../../../utils/formatting.js';
|
|
6
|
+
import { zod } from '../../../utils/zod.js';
|
|
10
7
|
import commands from '../commands.js';
|
|
11
8
|
import { BaseProjectCommand } from './project/base-project-command.js';
|
|
12
9
|
import { SharePointVersion, versions } from './SpfxCompatibilityMatrix.js';
|
|
10
|
+
const environments = {
|
|
11
|
+
sp2016: 'sp2016',
|
|
12
|
+
sp2019: 'sp2019',
|
|
13
|
+
spo: 'spo'
|
|
14
|
+
};
|
|
15
|
+
const spfxVersions = Object.keys(versions);
|
|
16
|
+
export const options = z.strictObject({
|
|
17
|
+
...globalOptionsZod.shape,
|
|
18
|
+
env: zod.coercedEnum(environments).optional().alias('e'),
|
|
19
|
+
spfxVersion: z.enum(spfxVersions, {
|
|
20
|
+
error: `The specified version is not a supported SharePoint Framework version. Supported versions are ${spfxVersions.join(', ')}`
|
|
21
|
+
}).optional().alias('v'),
|
|
22
|
+
output: z.enum(['text', 'json']).optional().alias('o')
|
|
23
|
+
});
|
|
13
24
|
/**
|
|
14
25
|
* Where to search for the particular npm package: only in the current project,
|
|
15
26
|
* in global packages or both
|
|
@@ -29,8 +40,10 @@ var HandlePromise;
|
|
|
29
40
|
HandlePromise[HandlePromise["Continue"] = 1] = "Continue";
|
|
30
41
|
})(HandlePromise || (HandlePromise = {}));
|
|
31
42
|
class SpfxDoctorCommand extends BaseProjectCommand {
|
|
32
|
-
|
|
33
|
-
|
|
43
|
+
constructor() {
|
|
44
|
+
super(...arguments);
|
|
45
|
+
this.output = '';
|
|
46
|
+
this.resultsObject = [];
|
|
34
47
|
}
|
|
35
48
|
get name() {
|
|
36
49
|
return commands.DOCTOR;
|
|
@@ -38,14 +51,8 @@ class SpfxDoctorCommand extends BaseProjectCommand {
|
|
|
38
51
|
get description() {
|
|
39
52
|
return 'Verifies environment configuration for using the specific version of the SharePoint Framework';
|
|
40
53
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
_SpfxDoctorCommand_instances.add(this);
|
|
44
|
-
this.output = '';
|
|
45
|
-
this.resultsObject = [];
|
|
46
|
-
__classPrivateFieldGet(this, _SpfxDoctorCommand_instances, "m", _SpfxDoctorCommand_initTelemetry).call(this);
|
|
47
|
-
__classPrivateFieldGet(this, _SpfxDoctorCommand_instances, "m", _SpfxDoctorCommand_initOptions).call(this);
|
|
48
|
-
__classPrivateFieldGet(this, _SpfxDoctorCommand_instances, "m", _SpfxDoctorCommand_initValidators).call(this);
|
|
54
|
+
get schema() {
|
|
55
|
+
return options;
|
|
49
56
|
}
|
|
50
57
|
async commandAction(logger, args) {
|
|
51
58
|
if (!args.options.output) {
|
|
@@ -430,36 +437,5 @@ class SpfxDoctorCommand extends BaseProjectCommand {
|
|
|
430
437
|
}
|
|
431
438
|
}
|
|
432
439
|
}
|
|
433
|
-
_SpfxDoctorCommand_instances = new WeakSet(), _SpfxDoctorCommand_initTelemetry = function _SpfxDoctorCommand_initTelemetry() {
|
|
434
|
-
this.telemetry.push((args) => {
|
|
435
|
-
Object.assign(this.telemetryProperties, {
|
|
436
|
-
env: args.options.env,
|
|
437
|
-
spfxVersion: args.options.spfxVersion
|
|
438
|
-
});
|
|
439
|
-
});
|
|
440
|
-
}, _SpfxDoctorCommand_initOptions = function _SpfxDoctorCommand_initOptions() {
|
|
441
|
-
this.options.unshift({
|
|
442
|
-
option: '-e, --env [env]',
|
|
443
|
-
autocomplete: ['sp2016', 'sp2019', 'spo']
|
|
444
|
-
}, {
|
|
445
|
-
option: '-v, --spfxVersion [spfxVersion]',
|
|
446
|
-
autocomplete: Object.keys(versions)
|
|
447
|
-
});
|
|
448
|
-
}, _SpfxDoctorCommand_initValidators = function _SpfxDoctorCommand_initValidators() {
|
|
449
|
-
this.validators.push(async (args) => {
|
|
450
|
-
if (args.options.env) {
|
|
451
|
-
const sp = this.spVersionStringToEnum(args.options.env);
|
|
452
|
-
if (!sp) {
|
|
453
|
-
return `${args.options.env} is not a valid SharePoint version. Valid versions are sp2016, sp2019 or spo`;
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
if (args.options.spfxVersion) {
|
|
457
|
-
if (!versions[args.options.spfxVersion]) {
|
|
458
|
-
return `${args.options.spfxVersion} is not a supported SharePoint Framework version. Supported versions are ${Object.keys(versions).join(', ')}`;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
return true;
|
|
462
|
-
});
|
|
463
|
-
};
|
|
464
440
|
export default new SpfxDoctorCommand();
|
|
465
441
|
//# sourceMappingURL=spfx-doctor.js.map
|
|
@@ -1,16 +1,28 @@
|
|
|
1
|
-
|
|
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 _SpoEventreceiverGetCommand_instances, _SpoEventreceiverGetCommand_initTelemetry, _SpoEventreceiverGetCommand_initOptions, _SpoEventreceiverGetCommand_initValidators, _SpoEventreceiverGetCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
6
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
11
7
|
import { validation } from '../../../../utils/validation.js';
|
|
12
8
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
9
|
import commands from '../../commands.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
webUrl: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
14
|
+
}).alias('u'),
|
|
15
|
+
listId: z.string().refine(val => validation.isValidGuid(val), {
|
|
16
|
+
error: e => `${e.input} is not a valid GUID.`
|
|
17
|
+
}).optional(),
|
|
18
|
+
listTitle: z.string().optional(),
|
|
19
|
+
listUrl: z.string().optional(),
|
|
20
|
+
id: z.string().refine(val => validation.isValidGuid(val), {
|
|
21
|
+
error: e => `${e.input} is not a valid GUID.`
|
|
22
|
+
}).optional().alias('i'),
|
|
23
|
+
name: z.string().optional().alias('n'),
|
|
24
|
+
scope: z.enum(['web', 'site']).optional().alias('s')
|
|
25
|
+
});
|
|
14
26
|
class SpoEventreceiverGetCommand extends SpoCommand {
|
|
15
27
|
get name() {
|
|
16
28
|
return commands.EVENTRECEIVER_GET;
|
|
@@ -18,13 +30,27 @@ class SpoEventreceiverGetCommand extends SpoCommand {
|
|
|
18
30
|
get description() {
|
|
19
31
|
return 'Gets a specific event receiver attached to the web, site or list (if any of the list options are filled in) by receiver name of id';
|
|
20
32
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
get schema() {
|
|
34
|
+
return options;
|
|
35
|
+
}
|
|
36
|
+
getRefinedSchema(schema) {
|
|
37
|
+
return schema
|
|
38
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
39
|
+
message: `Specify either 'id' or 'name', but not both.`,
|
|
40
|
+
params: {
|
|
41
|
+
customCode: 'optionSet',
|
|
42
|
+
options: ['id', 'name']
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
.refine(opts => {
|
|
46
|
+
const listOptions = [opts.listId, opts.listTitle, opts.listUrl];
|
|
47
|
+
return !(listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1);
|
|
48
|
+
}, {
|
|
49
|
+
message: `Specify either list id or title or list url`
|
|
50
|
+
})
|
|
51
|
+
.refine(opts => !(opts.scope === 'site' && (opts.listId || opts.listUrl || opts.listTitle)), {
|
|
52
|
+
message: 'Scope cannot be set to site when retrieving list event receivers.'
|
|
53
|
+
});
|
|
28
54
|
}
|
|
29
55
|
async commandAction(logger, args) {
|
|
30
56
|
try {
|
|
@@ -83,57 +109,5 @@ class SpoEventreceiverGetCommand extends SpoCommand {
|
|
|
83
109
|
}
|
|
84
110
|
}
|
|
85
111
|
}
|
|
86
|
-
_SpoEventreceiverGetCommand_instances = new WeakSet(), _SpoEventreceiverGetCommand_initTelemetry = function _SpoEventreceiverGetCommand_initTelemetry() {
|
|
87
|
-
this.telemetry.push((args) => {
|
|
88
|
-
Object.assign(this.telemetryProperties, {
|
|
89
|
-
listId: typeof args.options.listId !== 'undefined',
|
|
90
|
-
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
91
|
-
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
92
|
-
scope: typeof args.options.scope !== 'undefined',
|
|
93
|
-
id: typeof args.options.id !== 'undefined',
|
|
94
|
-
name: typeof args.options.name !== 'undefined'
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}, _SpoEventreceiverGetCommand_initOptions = function _SpoEventreceiverGetCommand_initOptions() {
|
|
98
|
-
this.options.unshift({
|
|
99
|
-
option: '-u, --webUrl <webUrl>'
|
|
100
|
-
}, {
|
|
101
|
-
option: '--listTitle [listTitle]'
|
|
102
|
-
}, {
|
|
103
|
-
option: '--listId [listId]'
|
|
104
|
-
}, {
|
|
105
|
-
option: '--listUrl [listUrl]'
|
|
106
|
-
}, {
|
|
107
|
-
option: '-n, --name [name]'
|
|
108
|
-
}, {
|
|
109
|
-
option: '-i, --id [id]'
|
|
110
|
-
}, {
|
|
111
|
-
option: '-s, --scope [scope]',
|
|
112
|
-
autocomplete: ['web', 'site']
|
|
113
|
-
});
|
|
114
|
-
}, _SpoEventreceiverGetCommand_initValidators = function _SpoEventreceiverGetCommand_initValidators() {
|
|
115
|
-
this.validators.push(async (args) => {
|
|
116
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
117
|
-
if (isValidSharePointUrl !== true) {
|
|
118
|
-
return isValidSharePointUrl;
|
|
119
|
-
}
|
|
120
|
-
const listOptions = [args.options.listId, args.options.listTitle, args.options.listUrl];
|
|
121
|
-
if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
|
|
122
|
-
return `Specify either list id or title or list url`;
|
|
123
|
-
}
|
|
124
|
-
if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
|
|
125
|
-
return `${args.options.listId} is not a valid GUID`;
|
|
126
|
-
}
|
|
127
|
-
if (args.options.scope && ['web', 'site'].indexOf(args.options.scope) === -1) {
|
|
128
|
-
return `${args.options.scope} is not a valid type value. Allowed values web|site.`;
|
|
129
|
-
}
|
|
130
|
-
if (args.options.scope && args.options.scope === 'site' && (args.options.listId || args.options.listUrl || args.options.listTitle)) {
|
|
131
|
-
return 'Scope cannot be set to site when retrieving list event receivers.';
|
|
132
|
-
}
|
|
133
|
-
return true;
|
|
134
|
-
});
|
|
135
|
-
}, _SpoEventreceiverGetCommand_initOptionSets = function _SpoEventreceiverGetCommand_initOptionSets() {
|
|
136
|
-
this.optionSets.push({ options: ['name', 'id'] });
|
|
137
|
-
};
|
|
138
112
|
export default new SpoEventreceiverGetCommand();
|
|
139
113
|
//# sourceMappingURL=eventreceiver-get.js.map
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 _SpoEventreceiverListCommand_instances, _SpoEventreceiverListCommand_initTelemetry, _SpoEventreceiverListCommand_initOptions, _SpoEventreceiverListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
4
|
import { odata } from '../../../../utils/odata.js';
|
|
9
5
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
webUrl: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
13
|
+
}).alias('u'),
|
|
14
|
+
listId: z.string().refine(val => validation.isValidGuid(val), {
|
|
15
|
+
error: e => `${e.input} is not a valid GUID.`
|
|
16
|
+
}).optional(),
|
|
17
|
+
listTitle: z.string().optional(),
|
|
18
|
+
listUrl: z.string().optional(),
|
|
19
|
+
scope: z.enum(['web', 'site']).optional().alias('s')
|
|
20
|
+
});
|
|
13
21
|
class SpoEventreceiverListCommand extends SpoCommand {
|
|
14
22
|
get name() {
|
|
15
23
|
return commands.EVENTRECEIVER_LIST;
|
|
@@ -20,12 +28,20 @@ class SpoEventreceiverListCommand extends SpoCommand {
|
|
|
20
28
|
defaultProperties() {
|
|
21
29
|
return ['ReceiverId', 'ReceiverName'];
|
|
22
30
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
get schema() {
|
|
32
|
+
return options;
|
|
33
|
+
}
|
|
34
|
+
getRefinedSchema(schema) {
|
|
35
|
+
return schema
|
|
36
|
+
.refine(opts => {
|
|
37
|
+
const listOptions = [opts.listId, opts.listTitle, opts.listUrl];
|
|
38
|
+
return !(listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1);
|
|
39
|
+
}, {
|
|
40
|
+
message: `Specify either list id or title or list url`
|
|
41
|
+
})
|
|
42
|
+
.refine(opts => !(opts.scope === 'site' && (opts.listId || opts.listUrl || opts.listTitle)), {
|
|
43
|
+
message: 'Scope cannot be set to site when retrieving list event receivers.'
|
|
44
|
+
});
|
|
29
45
|
}
|
|
30
46
|
async commandAction(logger, args) {
|
|
31
47
|
let requestUrl = `${args.options.webUrl}/_api/`;
|
|
@@ -55,49 +71,5 @@ class SpoEventreceiverListCommand extends SpoCommand {
|
|
|
55
71
|
}
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
|
-
_SpoEventreceiverListCommand_instances = new WeakSet(), _SpoEventreceiverListCommand_initTelemetry = function _SpoEventreceiverListCommand_initTelemetry() {
|
|
59
|
-
this.telemetry.push((args) => {
|
|
60
|
-
Object.assign(this.telemetryProperties, {
|
|
61
|
-
listId: typeof args.options.listId !== 'undefined',
|
|
62
|
-
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
63
|
-
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
64
|
-
scope: typeof args.options.scope !== 'undefined'
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
}, _SpoEventreceiverListCommand_initOptions = function _SpoEventreceiverListCommand_initOptions() {
|
|
68
|
-
this.options.unshift({
|
|
69
|
-
option: '-u, --webUrl <webUrl>'
|
|
70
|
-
}, {
|
|
71
|
-
option: '--listTitle [listTitle]'
|
|
72
|
-
}, {
|
|
73
|
-
option: '--listId [listId]'
|
|
74
|
-
}, {
|
|
75
|
-
option: '--listUrl [listUrl]'
|
|
76
|
-
}, {
|
|
77
|
-
option: '-s, --scope [scope]',
|
|
78
|
-
autocomplete: ['web', 'site']
|
|
79
|
-
});
|
|
80
|
-
}, _SpoEventreceiverListCommand_initValidators = function _SpoEventreceiverListCommand_initValidators() {
|
|
81
|
-
this.validators.push(async (args) => {
|
|
82
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
83
|
-
if (isValidSharePointUrl !== true) {
|
|
84
|
-
return isValidSharePointUrl;
|
|
85
|
-
}
|
|
86
|
-
const listOptions = [args.options.listId, args.options.listTitle, args.options.listUrl];
|
|
87
|
-
if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
|
|
88
|
-
return `Specify either list id or title or list url`;
|
|
89
|
-
}
|
|
90
|
-
if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
|
|
91
|
-
return `${args.options.listId} is not a valid GUID`;
|
|
92
|
-
}
|
|
93
|
-
if (args.options.scope && ['web', 'site'].indexOf(args.options.scope) === -1) {
|
|
94
|
-
return `${args.options.scope} is not a valid type value. Allowed values web|site.`;
|
|
95
|
-
}
|
|
96
|
-
if (args.options.scope && args.options.scope === 'site' && (args.options.listId || args.options.listUrl || args.options.listTitle)) {
|
|
97
|
-
return 'Scope cannot be set to site when retrieving list event receivers.';
|
|
98
|
-
}
|
|
99
|
-
return true;
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
74
|
export default new SpoEventreceiverListCommand();
|
|
103
75
|
//# sourceMappingURL=eventreceiver-list.js.map
|