@pnp/cli-microsoft365 12.1.0-beta.ab87e08 → 12.1.0-beta.cb17125
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 +12 -7
- 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-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/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.js +20 -51
- 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.js +0 -3
- package/dist/m365/spfx/commands/spfx-doctor.js +23 -47
- package/dist/m365/spo/commands/folder/folder-archive.js +1 -1
- package/dist/m365/spo/commands/folder/folder-unarchive.js +1 -1
- 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/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/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/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-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/user/user-get.mdx +5 -0
- package/npm-shrinkwrap.json +537 -874
- package/package.json +31 -30
|
@@ -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
|
|
@@ -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
|
}
|
|
@@ -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
|
|
@@ -15,7 +15,7 @@ export const options = z.strictObject({
|
|
|
15
15
|
})
|
|
16
16
|
.alias('u'),
|
|
17
17
|
url: z.string().optional(),
|
|
18
|
-
id: z.
|
|
18
|
+
id: z.guid().optional().alias('i'),
|
|
19
19
|
force: z.boolean().optional().alias('f')
|
|
20
20
|
});
|
|
21
21
|
class SpoFolderArchiveCommand extends SpoCommand {
|
|
@@ -15,7 +15,7 @@ export const options = z.strictObject({
|
|
|
15
15
|
})
|
|
16
16
|
.alias('u'),
|
|
17
17
|
url: z.string().optional(),
|
|
18
|
-
id: z.
|
|
18
|
+
id: z.guid().optional().alias('i'),
|
|
19
19
|
force: z.boolean().optional().alias('f')
|
|
20
20
|
});
|
|
21
21
|
class SpoFolderUnarchiveCommand extends SpoCommand {
|
|
@@ -15,7 +15,7 @@ export const options = z.strictObject({
|
|
|
15
15
|
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
16
|
})
|
|
17
17
|
.alias('u'),
|
|
18
|
-
listId: z.
|
|
18
|
+
listId: z.guid().optional().alias('i'),
|
|
19
19
|
listTitle: z.string().optional().alias('t'),
|
|
20
20
|
listUrl: z.string().optional(),
|
|
21
21
|
fieldName: z.string().optional(),
|
|
@@ -14,7 +14,7 @@ export const options = z.strictObject({
|
|
|
14
14
|
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
15
15
|
})
|
|
16
16
|
.alias('u'),
|
|
17
|
-
listId: z.
|
|
17
|
+
listId: z.guid().optional().alias('i'),
|
|
18
18
|
listTitle: z.string().optional().alias('t'),
|
|
19
19
|
listUrl: z.string().optional(),
|
|
20
20
|
fieldName: z.string(),
|
|
@@ -14,7 +14,7 @@ export const options = z.strictObject({
|
|
|
14
14
|
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
15
15
|
})
|
|
16
16
|
.alias('u'),
|
|
17
|
-
listId: z.
|
|
17
|
+
listId: z.guid().optional().alias('i'),
|
|
18
18
|
listTitle: z.string().optional().alias('t'),
|
|
19
19
|
listUrl: z.string().optional(),
|
|
20
20
|
folderUrl: z.string().optional()
|
|
@@ -15,7 +15,7 @@ export const options = z.strictObject({
|
|
|
15
15
|
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
16
|
})
|
|
17
17
|
.alias('u'),
|
|
18
|
-
listId: z.
|
|
18
|
+
listId: z.guid().optional().alias('i'),
|
|
19
19
|
listTitle: z.string().optional().alias('t'),
|
|
20
20
|
listUrl: z.string().optional(),
|
|
21
21
|
fieldName: z.string(),
|
|
@@ -14,7 +14,7 @@ export const options = z.strictObject({
|
|
|
14
14
|
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
15
15
|
})
|
|
16
16
|
.alias('u'),
|
|
17
|
-
listId: z.
|
|
17
|
+
listId: z.guid().optional().alias('i'),
|
|
18
18
|
listTitle: z.string().optional().alias('t'),
|
|
19
19
|
listUrl: z.string().optional(),
|
|
20
20
|
fieldName: z.string(),
|
|
@@ -15,7 +15,7 @@ export const options = z.strictObject({
|
|
|
15
15
|
})
|
|
16
16
|
.alias('u'),
|
|
17
17
|
listTitle: z.string().optional().alias('t'),
|
|
18
|
-
listId: z.
|
|
18
|
+
listId: z.guid().optional().alias('l'),
|
|
19
19
|
listUrl: z.string().optional(),
|
|
20
20
|
force: z.boolean().optional().alias('f')
|
|
21
21
|
});
|
|
@@ -13,7 +13,7 @@ export const options = z.strictObject({
|
|
|
13
13
|
error: 'webUrl is not a valid SharePoint site URL.'
|
|
14
14
|
})
|
|
15
15
|
.alias('u'),
|
|
16
|
-
listId: z.
|
|
16
|
+
listId: z.guid().optional(),
|
|
17
17
|
listTitle: z.string().optional(),
|
|
18
18
|
listUrl: z.string().optional(),
|
|
19
19
|
title: z.string().min(1, 'Cannot be empty.'),
|
|
@@ -60,7 +60,7 @@ class SpoListItemBatchAddCommand extends SpoCommand {
|
|
|
60
60
|
await logger.logToStderr(`Starting to create batch items from csv ${args.options.filePath ? `at path ${args.options.filePath}` : 'from content'}`);
|
|
61
61
|
}
|
|
62
62
|
const csvContent = args.options.filePath ? fs.readFileSync(args.options.filePath, 'utf8') : args.options.csvContent;
|
|
63
|
-
const jsonContent = formatting.parseCsvToJson(csvContent);
|
|
63
|
+
const jsonContent = formatting.parseCsvToJson(csvContent, { cast: false });
|
|
64
64
|
await this.addItemsAsBatch(jsonContent, args.options, logger);
|
|
65
65
|
}
|
|
66
66
|
catch (err) {
|
|
@@ -27,7 +27,7 @@ export const options = z.strictObject({
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
const fileContent = fs.readFileSync(path, 'utf-8');
|
|
30
|
-
const jsonContent = formatting.parseCsvToJson(fileContent);
|
|
30
|
+
const jsonContent = formatting.parseCsvToJson(fileContent, { cast: false });
|
|
31
31
|
const idKey = Object.keys(jsonContent[0]).find(key => key.toLowerCase() === 'id');
|
|
32
32
|
if (!idKey) {
|
|
33
33
|
ctx.addIssue({ code: 'custom', message: `The file does not contain the required header row with the column name 'ID'.` });
|
|
@@ -88,9 +88,9 @@ class SpoListItemBatchRemoveCommand extends SpoCommand {
|
|
|
88
88
|
let idsToRemove = [];
|
|
89
89
|
if (args.options.filePath) {
|
|
90
90
|
const csvContent = fs.readFileSync(args.options.filePath, 'utf-8');
|
|
91
|
-
const jsonContent = formatting.parseCsvToJson(csvContent);
|
|
91
|
+
const jsonContent = formatting.parseCsvToJson(csvContent, { cast: false });
|
|
92
92
|
const idKey = Object.keys(jsonContent[0]).find(key => key.toLowerCase() === 'id');
|
|
93
|
-
idsToRemove = jsonContent.map((item) => item[idKey]);
|
|
93
|
+
idsToRemove = jsonContent.map((item) => item[idKey].toString().trim());
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
96
|
idsToRemove = formatting.splitAndTrim(args.options.ids);
|
|
@@ -58,7 +58,7 @@ class SpoListItemBatchSetCommand extends SpoCommand {
|
|
|
58
58
|
await logger.logToStderr(`Starting to create batch items from csv at path ${args.options.filePath}`);
|
|
59
59
|
}
|
|
60
60
|
const csvContent = fs.readFileSync(args.options.filePath, 'utf8');
|
|
61
|
-
const jsonContent = formatting.parseCsvToJson(csvContent);
|
|
61
|
+
const jsonContent = formatting.parseCsvToJson(csvContent, { cast: false });
|
|
62
62
|
const amountOfRows = jsonContent.length;
|
|
63
63
|
const idColumn = args.options.idColumn || 'ID';
|
|
64
64
|
if (!Object.prototype.hasOwnProperty.call(jsonContent[0], idColumn)) {
|
|
@@ -13,7 +13,7 @@ export const options = z.strictObject({
|
|
|
13
13
|
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
14
14
|
})
|
|
15
15
|
.alias('u'),
|
|
16
|
-
id: z.
|
|
16
|
+
id: z.guid().alias('i'),
|
|
17
17
|
asAdmin: z.boolean().optional()
|
|
18
18
|
});
|
|
19
19
|
class SpoSiteHubSiteConnectCommand extends SpoCommand {
|
|
@@ -9,7 +9,7 @@ import commands from '../../commands.js';
|
|
|
9
9
|
import { cli } from '../../../../cli/cli.js';
|
|
10
10
|
export const options = z.strictObject({
|
|
11
11
|
...globalOptionsZod.shape,
|
|
12
|
-
id: z.
|
|
12
|
+
id: z.guid().optional().alias('i'),
|
|
13
13
|
title: z.string().optional().alias('t'),
|
|
14
14
|
url: z.string().refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
15
|
message: 'Specify a valid SharePoint site URL'
|
|
@@ -11,7 +11,7 @@ const options = z.strictObject({
|
|
|
11
11
|
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
12
|
error: e => `'${e.input}' is not a valid SharePoint URL.`
|
|
13
13
|
}),
|
|
14
|
-
id: z.
|
|
14
|
+
id: z.guid()
|
|
15
15
|
});
|
|
16
16
|
class SpoWebRuleGetCommand extends SpoCommand {
|
|
17
17
|
get name() {
|
|
@@ -14,13 +14,13 @@ export const options = z.strictObject({
|
|
|
14
14
|
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
15
|
error: e => `'${e.input}' is not a valid SharePoint site URL.`
|
|
16
16
|
}),
|
|
17
|
-
listId: z.
|
|
17
|
+
listId: z.guid().optional(),
|
|
18
18
|
listUrl: z.string().optional(),
|
|
19
19
|
listTitle: z.string().optional(),
|
|
20
20
|
userName: z.string().optional().refine(upn => typeof upn === 'undefined' || validation.isValidUserPrincipalName(upn), {
|
|
21
21
|
error: e => `'${e.input}' is not a valid UPN.`
|
|
22
22
|
}),
|
|
23
|
-
userId: z.
|
|
23
|
+
userId: z.guid().optional()
|
|
24
24
|
});
|
|
25
25
|
class SpoWebRuleListCommand extends SpoCommand {
|
|
26
26
|
get name() {
|
|
@@ -12,7 +12,7 @@ const options = z.strictObject({
|
|
|
12
12
|
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
13
|
error: e => `'${e.input}' is not a valid SharePoint URL.`
|
|
14
14
|
}),
|
|
15
|
-
id: z.
|
|
15
|
+
id: z.guid(),
|
|
16
16
|
force: z.boolean().optional().alias('f')
|
|
17
17
|
});
|
|
18
18
|
class SpoWebRuleRemoveCommand extends SpoCommand {
|
|
@@ -28,12 +28,12 @@ export const options = z.strictObject({
|
|
|
28
28
|
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
29
29
|
}).alias('u'),
|
|
30
30
|
listTitle: z.string().optional(),
|
|
31
|
-
listId: z.
|
|
31
|
+
listId: z.guid()
|
|
32
32
|
.refine(value => validation.isValidGuid(value), {
|
|
33
33
|
error: e => `'${e.input}' in parameter listId is not a valid GUID.`
|
|
34
34
|
}).optional(),
|
|
35
35
|
listUrl: z.string().optional(),
|
|
36
|
-
columnId: z.
|
|
36
|
+
columnId: z.guid()
|
|
37
37
|
.refine(value => validation.isValidGuid(value), {
|
|
38
38
|
error: e => `'${e.input}' in parameter columnId is not a valid GUID.`
|
|
39
39
|
}).optional().alias('i'),
|
|
@@ -19,10 +19,10 @@ export const options = z.strictObject({
|
|
|
19
19
|
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
20
20
|
})
|
|
21
21
|
.alias('u'),
|
|
22
|
-
id: z.
|
|
22
|
+
id: z.guid().optional().alias('i'),
|
|
23
23
|
title: z.string().optional().alias('t'),
|
|
24
24
|
listTitle: z.string().optional(),
|
|
25
|
-
listId: z.
|
|
25
|
+
listId: z.guid().optional(),
|
|
26
26
|
listUrl: z.string().optional(),
|
|
27
27
|
viewOption: z.enum(['NewViewAsDefault', 'DoNotChangeDefault', 'TileViewAsDefault']).optional()
|
|
28
28
|
});
|
|
@@ -5,7 +5,7 @@ import GraphApplicationCommand from '../../../base/GraphApplicationCommand.js';
|
|
|
5
5
|
import request from '../../../../request.js';
|
|
6
6
|
export const options = z.strictObject({
|
|
7
7
|
...globalOptionsZod.shape,
|
|
8
|
-
id: z.
|
|
8
|
+
id: z.guid().alias('i')
|
|
9
9
|
});
|
|
10
10
|
class TeamsCallRecordGetCommand extends GraphApplicationCommand {
|
|
11
11
|
get name() {
|
|
@@ -7,7 +7,7 @@ import { entraUser } from '../../../../utils/entraUser.js';
|
|
|
7
7
|
import { odata } from '../../../../utils/odata.js';
|
|
8
8
|
export const options = z.strictObject({
|
|
9
9
|
...globalOptionsZod.shape,
|
|
10
|
-
userId: z.
|
|
10
|
+
userId: z.guid().optional(),
|
|
11
11
|
userName: z.string()
|
|
12
12
|
.refine((val) => validation.isValidUserPrincipalName(val), {
|
|
13
13
|
message: 'Invalid user principal name.'
|
|
@@ -1,16 +1,31 @@
|
|
|
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 _VivaConnectionsAppCreateCommand_instances, _VivaConnectionsAppCreateCommand_initOptions, _VivaConnectionsAppCreateCommand_initValidators;
|
|
7
1
|
import AdmZip from 'adm-zip';
|
|
8
2
|
import fs from 'fs';
|
|
9
3
|
import path from 'path';
|
|
10
4
|
import { v4 } from 'uuid';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
11
7
|
import AnonymousCommand from '../../../base/AnonymousCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
13
9
|
import { spo } from '../../../../utils/spo.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
portalUrl: z.string(),
|
|
13
|
+
name: z.string().max(30, { message: 'App name must not exceed 30 characters' }),
|
|
14
|
+
description: z.string().max(80, { message: 'Description must not exceed 80 characters' }),
|
|
15
|
+
longDescription: z.string().max(4000, { message: 'Long description must not exceed 4000 characters' }),
|
|
16
|
+
privacyPolicyUrl: z.string().optional(),
|
|
17
|
+
termsOfUseUrl: z.string().optional(),
|
|
18
|
+
companyName: z.string(),
|
|
19
|
+
companyWebsiteUrl: z.string(),
|
|
20
|
+
coloredIconPath: z.string().refine(val => fs.existsSync(path.resolve(val)), {
|
|
21
|
+
error: e => `File ${path.resolve(e.input)} doesn't exist`
|
|
22
|
+
}),
|
|
23
|
+
outlineIconPath: z.string().refine(val => fs.existsSync(path.resolve(val)), {
|
|
24
|
+
error: e => `File ${path.resolve(e.input)} doesn't exist`
|
|
25
|
+
}),
|
|
26
|
+
accentColor: z.string().optional(),
|
|
27
|
+
force: z.boolean().optional()
|
|
28
|
+
});
|
|
14
29
|
class VivaConnectionsAppCreateCommand extends AnonymousCommand {
|
|
15
30
|
get name() {
|
|
16
31
|
return commands.CONNECTIONS_APP_CREATE;
|
|
@@ -18,11 +33,20 @@ class VivaConnectionsAppCreateCommand extends AnonymousCommand {
|
|
|
18
33
|
get description() {
|
|
19
34
|
return 'Creates Viva Connections app';
|
|
20
35
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
36
|
+
get schema() {
|
|
37
|
+
return options;
|
|
38
|
+
}
|
|
39
|
+
getRefinedSchema(schema) {
|
|
40
|
+
return schema
|
|
41
|
+
.superRefine((opts, ctx) => {
|
|
42
|
+
const appFilePath = path.resolve(`${opts.name}.zip`);
|
|
43
|
+
if (fs.existsSync(appFilePath) && !opts.force) {
|
|
44
|
+
ctx.addIssue({
|
|
45
|
+
message: `File ${path.resolve(`${opts.name}.zip`)} already exists. Delete the file or use the --force option to overwrite the existing file`,
|
|
46
|
+
code: z.ZodIssueCode.custom
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
26
50
|
}
|
|
27
51
|
async commandAction(logger, args) {
|
|
28
52
|
try {
|
|
@@ -133,40 +157,10 @@ class VivaConnectionsAppCreateCommand extends AnonymousCommand {
|
|
|
133
157
|
}
|
|
134
158
|
async getWeb(args, logger) {
|
|
135
159
|
if (this.verbose) {
|
|
136
|
-
await logger.logToStderr(`Checking if site ${args.options.
|
|
160
|
+
await logger.logToStderr(`Checking if site ${args.options.portalUrl} exists...`);
|
|
137
161
|
}
|
|
138
162
|
return await spo.getWeb(args.options.portalUrl, logger, this.verbose);
|
|
139
163
|
}
|
|
140
164
|
}
|
|
141
|
-
_VivaConnectionsAppCreateCommand_instances = new WeakSet(), _VivaConnectionsAppCreateCommand_initOptions = function _VivaConnectionsAppCreateCommand_initOptions() {
|
|
142
|
-
this.options.unshift({ option: '--portalUrl <portalUrl>' }, { option: '--name <name>' }, { option: '--description <description>' }, { option: '--longDescription <longDescription>' }, { option: '--privacyPolicyUrl [privacyPolicyUrl]' }, { option: '--termsOfUseUrl [termsOfUseUrl]' }, { option: '--companyName <companyName>' }, { option: '--companyWebsiteUrl <companyWebsiteUrl>' }, { option: '--coloredIconPath <coloredIconPath>' }, { option: '--outlineIconPath <outlineIconPath>' }, { option: '--accentColor [accentColor]' }, { option: '--force' });
|
|
143
|
-
}, _VivaConnectionsAppCreateCommand_initValidators = function _VivaConnectionsAppCreateCommand_initValidators() {
|
|
144
|
-
this.validators.push(async (args) => {
|
|
145
|
-
if (args.options.name.length > 30) {
|
|
146
|
-
return `App name must not exceed 30 characters`;
|
|
147
|
-
}
|
|
148
|
-
if (args.options.description &&
|
|
149
|
-
args.options.description.length > 80) {
|
|
150
|
-
return 'Description must not exceed 80 characters';
|
|
151
|
-
}
|
|
152
|
-
if (args.options.longDescription &&
|
|
153
|
-
args.options.longDescription.length > 4000) {
|
|
154
|
-
return 'Long description must not exceed 4000 characters';
|
|
155
|
-
}
|
|
156
|
-
const appFilePath = path.resolve(`${args.options.name}.zip`);
|
|
157
|
-
if (fs.existsSync(appFilePath) && !args.options.force) {
|
|
158
|
-
return `File ${appFilePath} already exists. Delete the file or use the --force option to overwrite the existing file`;
|
|
159
|
-
}
|
|
160
|
-
const coloredIconPath = path.resolve(args.options.coloredIconPath);
|
|
161
|
-
if (!fs.existsSync(coloredIconPath)) {
|
|
162
|
-
return `File ${coloredIconPath} doesn't exist`;
|
|
163
|
-
}
|
|
164
|
-
const outlineIconPath = path.resolve(args.options.outlineIconPath);
|
|
165
|
-
if (!fs.existsSync(outlineIconPath)) {
|
|
166
|
-
return `File ${outlineIconPath} doesn't exist`;
|
|
167
|
-
}
|
|
168
|
-
return true;
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
165
|
export default new VivaConnectionsAppCreateCommand();
|
|
172
166
|
//# sourceMappingURL=connections-app-create.js.map
|