@pnp/cli-microsoft365 11.10.0 → 11.11.0-beta.1cb40cb
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/entra/commands/agent/agent-list.js +48 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +23 -41
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-list.js +9 -24
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +24 -44
- package/dist/m365/pp/commands/copilot/copilot-get.js +23 -41
- package/dist/m365/pp/commands/copilot/copilot-list.js +9 -24
- package/dist/m365/pp/commands/copilot/copilot-remove.js +24 -44
- package/dist/m365/pp/commands/dataverse/dataverse-table-get.js +10 -26
- package/dist/m365/pp/commands/dataverse/dataverse-table-list.js +9 -24
- package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +11 -29
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-list.js +21 -33
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +25 -46
- package/dist/m365/pp/commands/gateway/gateway-get.js +10 -23
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +24 -36
- package/dist/m365/pp/commands/managementapp/managementapp-list.js +5 -0
- package/dist/m365/pp/commands/solution/solution-get.js +23 -41
- package/dist/m365/pp/commands/solution/solution-list.js +9 -24
- package/dist/m365/pp/commands/solution/solution-publish.js +25 -45
- package/dist/m365/pp/commands/solution/solution-publisher-add.js +26 -49
- package/dist/m365/pp/commands/solution/solution-publisher-get.js +23 -41
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +10 -27
- package/dist/m365/pp/commands/solution/solution-publisher-remove.js +24 -44
- package/dist/m365/pp/commands/solution/solution-remove.js +24 -44
- package/dist/m365/pp/commands/tenant/tenant-settings-set.js +81 -170
- package/dist/m365/spo/commands/folder/folder-add.js +1 -1
- package/docs/docs/cmd/entra/agent/agent-list.mdx +209 -0
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-version-get.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-version-list.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-add.mdx +20 -1
- package/docs/docs/cmd/spo/folder/folder-archive.mdx +2 -3
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +19 -0
- package/docs/docs/cmd/spo/folder/folder-get.mdx +19 -0
- package/docs/docs/cmd/spo/folder/folder-list.mdx +19 -0
- package/docs/docs/cmd/spo/folder/folder-move.mdx +19 -0
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-set.mdx +21 -0
- package/docs/docs/cmd/todo/list/list-add.mdx +19 -0
- package/docs/docs/cmd/todo/list/list-get.mdx +19 -0
- package/docs/docs/cmd/todo/list/list-list.mdx +19 -0
- package/docs/docs/cmd/todo/list/list-remove.mdx +21 -0
- package/docs/docs/cmd/todo/list/list-set.mdx +21 -0
- package/docs/docs/cmd/todo/task/task-add.mdx +19 -0
- package/docs/docs/cmd/todo/task/task-get.mdx +19 -0
- package/docs/docs/cmd/todo/task/task-list.mdx +19 -0
- package/docs/docs/cmd/todo/task/task-remove.mdx +21 -0
- package/docs/docs/cmd/todo/task/task-set.mdx +19 -0
- package/npm-shrinkwrap.json +356 -190
- package/package.json +14 -14
|
@@ -1,14 +1,17 @@
|
|
|
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 _PpDataverseTableRemoveCommand_instances, _PpDataverseTableRemoveCommand_initTelemetry, _PpDataverseTableRemoveCommand_initOptions;
|
|
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 { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
10
6
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
environmentName: z.string().alias('e'),
|
|
11
|
+
name: z.string().alias('n'),
|
|
12
|
+
asAdmin: z.boolean().optional(),
|
|
13
|
+
force: z.boolean().optional().alias('f')
|
|
14
|
+
});
|
|
12
15
|
class PpDataverseTableRemoveCommand extends PowerPlatformCommand {
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.DATAVERSE_TABLE_REMOVE;
|
|
@@ -16,11 +19,8 @@ class PpDataverseTableRemoveCommand extends PowerPlatformCommand {
|
|
|
16
19
|
get description() {
|
|
17
20
|
return 'Removes a dataverse table in a given environment';
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_PpDataverseTableRemoveCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _PpDataverseTableRemoveCommand_instances, "m", _PpDataverseTableRemoveCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _PpDataverseTableRemoveCommand_instances, "m", _PpDataverseTableRemoveCommand_initOptions).call(this);
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
24
24
|
}
|
|
25
25
|
async commandAction(logger, args) {
|
|
26
26
|
if (this.verbose) {
|
|
@@ -53,23 +53,5 @@ class PpDataverseTableRemoveCommand extends PowerPlatformCommand {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
_PpDataverseTableRemoveCommand_instances = new WeakSet(), _PpDataverseTableRemoveCommand_initTelemetry = function _PpDataverseTableRemoveCommand_initTelemetry() {
|
|
57
|
-
this.telemetry.push((args) => {
|
|
58
|
-
Object.assign(this.telemetryProperties, {
|
|
59
|
-
asAdmin: !!args.options.asAdmin,
|
|
60
|
-
force: !!args.options.force
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}, _PpDataverseTableRemoveCommand_initOptions = function _PpDataverseTableRemoveCommand_initOptions() {
|
|
64
|
-
this.options.unshift({
|
|
65
|
-
option: '-e, --environmentName <environmentName>'
|
|
66
|
-
}, {
|
|
67
|
-
option: '-n, --name <name>'
|
|
68
|
-
}, {
|
|
69
|
-
option: '--asAdmin'
|
|
70
|
-
}, {
|
|
71
|
-
option: '-f, --force'
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
56
|
export default new PpDataverseTableRemoveCommand();
|
|
75
57
|
//# sourceMappingURL=dataverse-table-remove.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
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 _PpDataverseTableRowListCommand_instances, _PpDataverseTableRowListCommand_initTelemetry, _PpDataverseTableRowListCommand_initOptions, _PpDataverseTableRowListCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { odata } from '../../../../utils/odata.js';
|
|
9
5
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
10
6
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
environmentName: z.string().alias('e'),
|
|
11
|
+
entitySetName: z.string().optional(),
|
|
12
|
+
tableName: z.string().optional(),
|
|
13
|
+
asAdmin: z.boolean().optional()
|
|
14
|
+
});
|
|
12
15
|
class PpDataverseTableRowListCommand extends PowerPlatformCommand {
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.DATAVERSE_TABLE_ROW_LIST;
|
|
@@ -16,12 +19,18 @@ class PpDataverseTableRowListCommand extends PowerPlatformCommand {
|
|
|
16
19
|
get description() {
|
|
17
20
|
return 'Lists table rows for the given Dataverse table';
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
getRefinedSchema(schema) {
|
|
26
|
+
return schema
|
|
27
|
+
.refine(opts => [opts.entitySetName, opts.tableName].filter(x => x !== undefined).length === 1, {
|
|
28
|
+
error: `Specify either 'entitySetName' or 'tableName', but not both.`,
|
|
29
|
+
params: {
|
|
30
|
+
customCode: 'optionSet',
|
|
31
|
+
options: ['entitySetName', 'tableName']
|
|
32
|
+
}
|
|
33
|
+
});
|
|
25
34
|
}
|
|
26
35
|
async commandAction(logger, args) {
|
|
27
36
|
if (this.verbose) {
|
|
@@ -55,26 +64,5 @@ class PpDataverseTableRowListCommand extends PowerPlatformCommand {
|
|
|
55
64
|
return response.EntitySetName;
|
|
56
65
|
}
|
|
57
66
|
}
|
|
58
|
-
_PpDataverseTableRowListCommand_instances = new WeakSet(), _PpDataverseTableRowListCommand_initTelemetry = function _PpDataverseTableRowListCommand_initTelemetry() {
|
|
59
|
-
this.telemetry.push((args) => {
|
|
60
|
-
Object.assign(this.telemetryProperties, {
|
|
61
|
-
entitySetName: typeof args.options.entitySetName !== 'undefined',
|
|
62
|
-
tableName: typeof args.options.tableName !== 'undefined',
|
|
63
|
-
asAdmin: !!args.options.asAdmin
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}, _PpDataverseTableRowListCommand_initOptions = function _PpDataverseTableRowListCommand_initOptions() {
|
|
67
|
-
this.options.unshift({
|
|
68
|
-
option: '-e, --environmentName <environmentName>'
|
|
69
|
-
}, {
|
|
70
|
-
option: '--entitySetName [entitySetName]'
|
|
71
|
-
}, {
|
|
72
|
-
option: '--tableName [tableName]'
|
|
73
|
-
}, {
|
|
74
|
-
option: '--asAdmin'
|
|
75
|
-
});
|
|
76
|
-
}, _PpDataverseTableRowListCommand_initOptionSets = function _PpDataverseTableRowListCommand_initOptionSets() {
|
|
77
|
-
this.optionSets.push({ options: ['entitySetName', 'tableName'] });
|
|
78
|
-
};
|
|
79
67
|
export default new PpDataverseTableRowListCommand();
|
|
80
68
|
//# sourceMappingURL=dataverse-table-row-list.js.map
|
|
@@ -1,15 +1,22 @@
|
|
|
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 _PpDataverseTableRowRemoveCommand_instances, _PpDataverseTableRowRemoveCommand_initTelemetry, _PpDataverseTableRowRemoveCommand_initOptions, _PpDataverseTableRowRemoveCommand_initValidators, _PpDataverseTableRowRemoveCommand_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 { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
environmentName: z.string().alias('e'),
|
|
12
|
+
id: z.string().refine(val => validation.isValidGuid(val), {
|
|
13
|
+
error: 'The value must be a valid GUID.'
|
|
14
|
+
}).alias('i'),
|
|
15
|
+
entitySetName: z.string().optional(),
|
|
16
|
+
tableName: z.string().optional(),
|
|
17
|
+
asAdmin: z.boolean().optional(),
|
|
18
|
+
force: z.boolean().optional().alias('f')
|
|
19
|
+
});
|
|
13
20
|
class PpDataverseTableRowRemoveCommand extends PowerPlatformCommand {
|
|
14
21
|
get name() {
|
|
15
22
|
return commands.DATAVERSE_TABLE_ROW_REMOVE;
|
|
@@ -17,13 +24,18 @@ class PpDataverseTableRowRemoveCommand extends PowerPlatformCommand {
|
|
|
17
24
|
get description() {
|
|
18
25
|
return 'Removes a specific row from a dataverse table in the specified Power Platform environment.';
|
|
19
26
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
get schema() {
|
|
28
|
+
return options;
|
|
29
|
+
}
|
|
30
|
+
getRefinedSchema(schema) {
|
|
31
|
+
return schema
|
|
32
|
+
.refine(opts => [opts.entitySetName, opts.tableName].filter(x => x !== undefined).length === 1, {
|
|
33
|
+
error: `Specify either 'entitySetName' or 'tableName', but not both.`,
|
|
34
|
+
params: {
|
|
35
|
+
customCode: 'optionSet',
|
|
36
|
+
options: ['entitySetName', 'tableName']
|
|
37
|
+
}
|
|
38
|
+
});
|
|
27
39
|
}
|
|
28
40
|
async commandAction(logger, args) {
|
|
29
41
|
if (this.verbose) {
|
|
@@ -74,38 +86,5 @@ class PpDataverseTableRowRemoveCommand extends PowerPlatformCommand {
|
|
|
74
86
|
return response.EntitySetName;
|
|
75
87
|
}
|
|
76
88
|
}
|
|
77
|
-
_PpDataverseTableRowRemoveCommand_instances = new WeakSet(), _PpDataverseTableRowRemoveCommand_initTelemetry = function _PpDataverseTableRowRemoveCommand_initTelemetry() {
|
|
78
|
-
this.telemetry.push((args) => {
|
|
79
|
-
Object.assign(this.telemetryProperties, {
|
|
80
|
-
entitySetName: typeof args.options.entitySetName !== 'undefined',
|
|
81
|
-
tableName: typeof args.options.tableName !== 'undefined',
|
|
82
|
-
asAdmin: !!args.options.asAdmin,
|
|
83
|
-
force: !!args.options.force
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
}, _PpDataverseTableRowRemoveCommand_initOptions = function _PpDataverseTableRowRemoveCommand_initOptions() {
|
|
87
|
-
this.options.unshift({
|
|
88
|
-
option: '-e, --environmentName <environmentName>'
|
|
89
|
-
}, {
|
|
90
|
-
option: '-i, --id <id>'
|
|
91
|
-
}, {
|
|
92
|
-
option: '--entitySetName [entitySetName]'
|
|
93
|
-
}, {
|
|
94
|
-
option: '--tableName [tableName]'
|
|
95
|
-
}, {
|
|
96
|
-
option: '--asAdmin'
|
|
97
|
-
}, {
|
|
98
|
-
option: '-f, --force'
|
|
99
|
-
});
|
|
100
|
-
}, _PpDataverseTableRowRemoveCommand_initValidators = function _PpDataverseTableRowRemoveCommand_initValidators() {
|
|
101
|
-
this.validators.push(async (args) => {
|
|
102
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
103
|
-
return `${args.options.id} is not a valid GUID`;
|
|
104
|
-
}
|
|
105
|
-
return true;
|
|
106
|
-
});
|
|
107
|
-
}, _PpDataverseTableRowRemoveCommand_initOptionSets = function _PpDataverseTableRowRemoveCommand_initOptionSets() {
|
|
108
|
-
this.optionSets.push({ options: ['entitySetName', 'tableName'] });
|
|
109
|
-
};
|
|
110
89
|
export default new PpDataverseTableRowRemoveCommand();
|
|
111
90
|
//# sourceMappingURL=dataverse-table-row-remove.js.map
|
|
@@ -1,14 +1,16 @@
|
|
|
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 _PpGatewayGetCommand_instances, _PpGatewayGetCommand_initOptions, _PpGatewayGetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from "../../../../Command.js";
|
|
7
3
|
import request from "../../../../request.js";
|
|
8
4
|
import { formatting } from "../../../../utils/formatting.js";
|
|
9
5
|
import { validation } from "../../../../utils/validation.js";
|
|
10
6
|
import PowerBICommand from "../../../base/PowerBICommand.js";
|
|
11
7
|
import commands from "../../commands.js";
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
id: z.string().refine(val => validation.isValidGuid(val), {
|
|
11
|
+
error: 'The value must be a valid GUID.'
|
|
12
|
+
}).alias('i')
|
|
13
|
+
});
|
|
12
14
|
class PpGatewayGetCommand extends PowerBICommand {
|
|
13
15
|
get name() {
|
|
14
16
|
return commands.GATEWAY_GET;
|
|
@@ -16,11 +18,8 @@ class PpGatewayGetCommand extends PowerBICommand {
|
|
|
16
18
|
get description() {
|
|
17
19
|
return "Gets information about the specified gateway.";
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_PpGatewayGetCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _PpGatewayGetCommand_instances, "m", _PpGatewayGetCommand_initOptions).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _PpGatewayGetCommand_instances, "m", _PpGatewayGetCommand_initValidators).call(this);
|
|
21
|
+
get schema() {
|
|
22
|
+
return options;
|
|
24
23
|
}
|
|
25
24
|
async commandAction(logger, args) {
|
|
26
25
|
try {
|
|
@@ -42,17 +41,5 @@ class PpGatewayGetCommand extends PowerBICommand {
|
|
|
42
41
|
return request.get(requestOptions);
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
|
-
_PpGatewayGetCommand_instances = new WeakSet(), _PpGatewayGetCommand_initOptions = function _PpGatewayGetCommand_initOptions() {
|
|
46
|
-
this.options.unshift({
|
|
47
|
-
option: "-i, --id <id>"
|
|
48
|
-
});
|
|
49
|
-
}, _PpGatewayGetCommand_initValidators = function _PpGatewayGetCommand_initValidators() {
|
|
50
|
-
this.validators.push(async (args) => {
|
|
51
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
52
|
-
return `${args.options.id} is not a valid GUID`;
|
|
53
|
-
}
|
|
54
|
-
return true;
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
44
|
export default new PpGatewayGetCommand();
|
|
58
45
|
//# sourceMappingURL=gateway-get.js.map
|
|
@@ -1,14 +1,20 @@
|
|
|
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 _PpManagementAppAddCommand_instances, _PpManagementAppAddCommand_initTelemetry, _PpManagementAppAddCommand_initOptions, _PpManagementAppAddCommand_initValidators, _PpManagementAppAddCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
11
7
|
import { entraApp } from '../../../../utils/entraApp.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
appId: z.string().refine(val => validation.isValidGuid(val), {
|
|
11
|
+
error: 'The value must be a valid GUID.'
|
|
12
|
+
}).optional(),
|
|
13
|
+
objectId: z.string().refine(val => validation.isValidGuid(val), {
|
|
14
|
+
error: 'The value must be a valid GUID.'
|
|
15
|
+
}).optional(),
|
|
16
|
+
name: z.string().optional()
|
|
17
|
+
});
|
|
12
18
|
class PpManagementAppAddCommand extends PowerPlatformCommand {
|
|
13
19
|
get name() {
|
|
14
20
|
return commands.MANAGEMENTAPP_ADD;
|
|
@@ -16,13 +22,18 @@ class PpManagementAppAddCommand extends PowerPlatformCommand {
|
|
|
16
22
|
get description() {
|
|
17
23
|
return 'Registers management application for Power Platform';
|
|
18
24
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
get schema() {
|
|
26
|
+
return options;
|
|
27
|
+
}
|
|
28
|
+
getRefinedSchema(schema) {
|
|
29
|
+
return schema
|
|
30
|
+
.refine(opts => [opts.appId, opts.objectId, opts.name].filter(x => x !== undefined).length === 1, {
|
|
31
|
+
error: `Specify either 'appId', 'objectId', or 'name', but not multiple.`,
|
|
32
|
+
params: {
|
|
33
|
+
customCode: 'optionSet',
|
|
34
|
+
options: ['appId', 'objectId', 'name']
|
|
35
|
+
}
|
|
36
|
+
});
|
|
26
37
|
}
|
|
27
38
|
async commandAction(logger, args) {
|
|
28
39
|
try {
|
|
@@ -57,28 +68,5 @@ class PpManagementAppAddCommand extends PowerPlatformCommand {
|
|
|
57
68
|
}
|
|
58
69
|
}
|
|
59
70
|
}
|
|
60
|
-
_PpManagementAppAddCommand_instances = new WeakSet(), _PpManagementAppAddCommand_initTelemetry = function _PpManagementAppAddCommand_initTelemetry() {
|
|
61
|
-
this.telemetry.push((args) => {
|
|
62
|
-
Object.assign(this.telemetryProperties, {
|
|
63
|
-
appId: typeof args.options.appId !== 'undefined',
|
|
64
|
-
objectId: typeof args.options.objectId !== 'undefined',
|
|
65
|
-
name: typeof args.options.name !== 'undefined'
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
}, _PpManagementAppAddCommand_initOptions = function _PpManagementAppAddCommand_initOptions() {
|
|
69
|
-
this.options.unshift({ option: '--appId [appId]' }, { option: '--objectId [objectId]' }, { option: '--name [name]' });
|
|
70
|
-
}, _PpManagementAppAddCommand_initValidators = function _PpManagementAppAddCommand_initValidators() {
|
|
71
|
-
this.validators.push(async (args) => {
|
|
72
|
-
if (args.options.appId && !validation.isValidGuid(args.options.appId)) {
|
|
73
|
-
return `${args.options.appId} is not a valid GUID`;
|
|
74
|
-
}
|
|
75
|
-
if (args.options.objectId && !validation.isValidGuid(args.options.objectId)) {
|
|
76
|
-
return `${args.options.objectId} is not a valid GUID`;
|
|
77
|
-
}
|
|
78
|
-
return true;
|
|
79
|
-
});
|
|
80
|
-
}, _PpManagementAppAddCommand_initOptionSets = function _PpManagementAppAddCommand_initOptionSets() {
|
|
81
|
-
this.optionSets.push({ options: ['appId', 'objectId', 'name'] });
|
|
82
|
-
};
|
|
83
71
|
export default new PpManagementAppAddCommand();
|
|
84
72
|
//# sourceMappingURL=managementapp-add.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
2
|
import { odata } from '../../../../utils/odata.js';
|
|
2
3
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
3
4
|
import commands from '../../commands.js';
|
|
5
|
+
export const options = globalOptionsZod.strict();
|
|
4
6
|
class PpManagementAppListCommand extends PowerPlatformCommand {
|
|
5
7
|
get name() {
|
|
6
8
|
return commands.MANAGEMENTAPP_LIST;
|
|
@@ -8,6 +10,9 @@ class PpManagementAppListCommand extends PowerPlatformCommand {
|
|
|
8
10
|
get description() {
|
|
9
11
|
return 'Lists management applications for Power Platform';
|
|
10
12
|
}
|
|
13
|
+
get schema() {
|
|
14
|
+
return options;
|
|
15
|
+
}
|
|
11
16
|
async commandAction(logger) {
|
|
12
17
|
const endpoint = `${this.resource}/providers/Microsoft.BusinessAppPlatform/adminApplications?api-version=2020-06-01`;
|
|
13
18
|
try {
|
|
@@ -1,15 +1,20 @@
|
|
|
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 _PpSolutionGetCommand_instances, _PpSolutionGetCommand_initTelemetry, _PpSolutionGetCommand_initOptions, _PpSolutionGetCommand_initOptionSets, _PpSolutionGetCommand_initValidators;
|
|
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 { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
environmentName: z.string().alias('e'),
|
|
12
|
+
id: z.string().refine(val => validation.isValidGuid(val), {
|
|
13
|
+
error: 'The value must be a valid GUID.'
|
|
14
|
+
}).optional().alias('i'),
|
|
15
|
+
name: z.string().optional().alias('n'),
|
|
16
|
+
asAdmin: z.boolean().optional()
|
|
17
|
+
});
|
|
13
18
|
class PpSolutionGetCommand extends PowerPlatformCommand {
|
|
14
19
|
get name() {
|
|
15
20
|
return commands.SOLUTION_GET;
|
|
@@ -17,13 +22,18 @@ class PpSolutionGetCommand extends PowerPlatformCommand {
|
|
|
17
22
|
get description() {
|
|
18
23
|
return 'Gets a specific solution in a given environment.';
|
|
19
24
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
get schema() {
|
|
26
|
+
return options;
|
|
27
|
+
}
|
|
28
|
+
getRefinedSchema(schema) {
|
|
29
|
+
return schema
|
|
30
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
31
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
32
|
+
params: {
|
|
33
|
+
customCode: 'optionSet',
|
|
34
|
+
options: ['id', 'name']
|
|
35
|
+
}
|
|
36
|
+
});
|
|
27
37
|
}
|
|
28
38
|
async commandAction(logger, args) {
|
|
29
39
|
if (this.verbose) {
|
|
@@ -62,33 +72,5 @@ class PpSolutionGetCommand extends PowerPlatformCommand {
|
|
|
62
72
|
return request.get(requestOptions);
|
|
63
73
|
}
|
|
64
74
|
}
|
|
65
|
-
_PpSolutionGetCommand_instances = new WeakSet(), _PpSolutionGetCommand_initTelemetry = function _PpSolutionGetCommand_initTelemetry() {
|
|
66
|
-
this.telemetry.push((args) => {
|
|
67
|
-
Object.assign(this.telemetryProperties, {
|
|
68
|
-
id: typeof args.options.id !== 'undefined',
|
|
69
|
-
name: typeof args.options.name !== 'undefined',
|
|
70
|
-
asAdmin: !!args.options.asAdmin
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
}, _PpSolutionGetCommand_initOptions = function _PpSolutionGetCommand_initOptions() {
|
|
74
|
-
this.options.unshift({
|
|
75
|
-
option: '-e, --environmentName <environmentName>'
|
|
76
|
-
}, {
|
|
77
|
-
option: '-i, --id [id]'
|
|
78
|
-
}, {
|
|
79
|
-
option: '-n, --name [name]'
|
|
80
|
-
}, {
|
|
81
|
-
option: '--asAdmin'
|
|
82
|
-
});
|
|
83
|
-
}, _PpSolutionGetCommand_initOptionSets = function _PpSolutionGetCommand_initOptionSets() {
|
|
84
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
85
|
-
}, _PpSolutionGetCommand_initValidators = function _PpSolutionGetCommand_initValidators() {
|
|
86
|
-
this.validators.push(async (args) => {
|
|
87
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
88
|
-
return `${args.options.id} is not a valid GUID`;
|
|
89
|
-
}
|
|
90
|
-
return true;
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
75
|
export default new PpSolutionGetCommand();
|
|
94
76
|
//# sourceMappingURL=solution-get.js.map
|
|
@@ -1,14 +1,15 @@
|
|
|
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 _PpSolutionListCommand_instances, _PpSolutionListCommand_initTelemetry, _PpSolutionListCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import { odata } from '../../../../utils/odata.js';
|
|
9
5
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
10
6
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
environmentName: z.string().alias('e'),
|
|
11
|
+
asAdmin: z.boolean().optional()
|
|
12
|
+
});
|
|
12
13
|
class PpSolutionListCommand extends PowerPlatformCommand {
|
|
13
14
|
get name() {
|
|
14
15
|
return commands.SOLUTION_LIST;
|
|
@@ -19,11 +20,8 @@ class PpSolutionListCommand extends PowerPlatformCommand {
|
|
|
19
20
|
defaultProperties() {
|
|
20
21
|
return ['uniquename', 'version', 'publisher'];
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_PpSolutionListCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _PpSolutionListCommand_instances, "m", _PpSolutionListCommand_initTelemetry).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _PpSolutionListCommand_instances, "m", _PpSolutionListCommand_initOptions).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
27
25
|
}
|
|
28
26
|
async commandAction(logger, args) {
|
|
29
27
|
if (this.verbose) {
|
|
@@ -52,18 +50,5 @@ class PpSolutionListCommand extends PowerPlatformCommand {
|
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
}
|
|
55
|
-
_PpSolutionListCommand_instances = new WeakSet(), _PpSolutionListCommand_initTelemetry = function _PpSolutionListCommand_initTelemetry() {
|
|
56
|
-
this.telemetry.push((args) => {
|
|
57
|
-
Object.assign(this.telemetryProperties, {
|
|
58
|
-
asAdmin: !!args.options.asAdmin
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}, _PpSolutionListCommand_initOptions = function _PpSolutionListCommand_initOptions() {
|
|
62
|
-
this.options.unshift({
|
|
63
|
-
option: '-e, --environmentName <environmentName>'
|
|
64
|
-
}, {
|
|
65
|
-
option: '--asAdmin'
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
53
|
export default new PpSolutionListCommand();
|
|
69
54
|
//# sourceMappingURL=solution-list.js.map
|
|
@@ -1,15 +1,21 @@
|
|
|
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 _PpSolutionPublishCommand_instances, _PpSolutionPublishCommand_initTelemetry, _PpSolutionPublishCommand_initOptions, _PpSolutionPublishCommand_initOptionSets, _PpSolutionPublishCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
5
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
environmentName: z.string().alias('e'),
|
|
12
|
+
id: z.string().refine(val => validation.isValidGuid(val), {
|
|
13
|
+
error: 'The value must be a valid GUID.'
|
|
14
|
+
}).optional().alias('i'),
|
|
15
|
+
name: z.string().optional().alias('n'),
|
|
16
|
+
asAdmin: z.boolean().optional(),
|
|
17
|
+
wait: z.boolean().optional()
|
|
18
|
+
});
|
|
13
19
|
class PpSolutionPublishCommand extends PowerPlatformCommand {
|
|
14
20
|
get name() {
|
|
15
21
|
return commands.SOLUTION_PUBLISH;
|
|
@@ -17,17 +23,22 @@ class PpSolutionPublishCommand extends PowerPlatformCommand {
|
|
|
17
23
|
get description() {
|
|
18
24
|
return 'Publishes the components of a solution in a given Power Platform environment';
|
|
19
25
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
get schema() {
|
|
27
|
+
return options;
|
|
28
|
+
}
|
|
29
|
+
getRefinedSchema(schema) {
|
|
30
|
+
return schema
|
|
31
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
32
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
33
|
+
params: {
|
|
34
|
+
customCode: 'optionSet',
|
|
35
|
+
options: ['id', 'name']
|
|
36
|
+
}
|
|
37
|
+
});
|
|
27
38
|
}
|
|
28
39
|
async commandAction(logger, args) {
|
|
29
40
|
try {
|
|
30
|
-
const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
41
|
+
const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
31
42
|
const solutionId = await this.getSolutionId(args, dynamicsApiUrl, logger);
|
|
32
43
|
const solutionComponents = await this.getSolutionComponents(dynamicsApiUrl, solutionId, logger);
|
|
33
44
|
const parameterXml = await this.buildXmlRequestObject(solutionComponents, logger);
|
|
@@ -94,36 +105,5 @@ class PpSolutionPublishCommand extends PowerPlatformCommand {
|
|
|
94
105
|
return `<importexportxml>${formatting.objectToXml(result)}</importexportxml>`;
|
|
95
106
|
}
|
|
96
107
|
}
|
|
97
|
-
_PpSolutionPublishCommand_instances = new WeakSet(), _PpSolutionPublishCommand_initTelemetry = function _PpSolutionPublishCommand_initTelemetry() {
|
|
98
|
-
this.telemetry.push((args) => {
|
|
99
|
-
Object.assign(this.telemetryProperties, {
|
|
100
|
-
id: typeof args.options.id !== 'undefined',
|
|
101
|
-
name: typeof args.options.name !== 'undefined',
|
|
102
|
-
asAdmin: !!args.options.asAdmin,
|
|
103
|
-
wait: !!args.options.wait
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
}, _PpSolutionPublishCommand_initOptions = function _PpSolutionPublishCommand_initOptions() {
|
|
107
|
-
this.options.unshift({
|
|
108
|
-
option: '-e, --environmentName <environmentName>'
|
|
109
|
-
}, {
|
|
110
|
-
option: '-i, --id [id]'
|
|
111
|
-
}, {
|
|
112
|
-
option: '-n, --name [name]'
|
|
113
|
-
}, {
|
|
114
|
-
option: '--asAdmin'
|
|
115
|
-
}, {
|
|
116
|
-
option: '--wait'
|
|
117
|
-
});
|
|
118
|
-
}, _PpSolutionPublishCommand_initOptionSets = function _PpSolutionPublishCommand_initOptionSets() {
|
|
119
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
120
|
-
}, _PpSolutionPublishCommand_initValidators = function _PpSolutionPublishCommand_initValidators() {
|
|
121
|
-
this.validators.push(async (args) => {
|
|
122
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
123
|
-
return `${args.options.id} is not a valid GUID`;
|
|
124
|
-
}
|
|
125
|
-
return true;
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
108
|
export default new PpSolutionPublishCommand();
|
|
129
109
|
//# sourceMappingURL=solution-publish.js.map
|