pptb-standard-sample-tool 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +192 -0
- package/dist/index.html +78 -0
- package/npm-shrinkwrap.json +95 -6
- package/package.json +5 -4
- package/pptb.config.json +23 -0
package/dist/app.js
CHANGED
|
@@ -21,9 +21,11 @@ let currentConnection = null;
|
|
|
21
21
|
let secondaryConnection = null;
|
|
22
22
|
let currentTerminal = null;
|
|
23
23
|
let createdId = null;
|
|
24
|
+
let currentLaunchContext = null;
|
|
24
25
|
let securitySuites = null;
|
|
25
26
|
let terminalFeature = null;
|
|
26
27
|
let fileSystemFeature = null;
|
|
28
|
+
let inputEntityName = null;
|
|
27
29
|
/**
|
|
28
30
|
* Initialize the application
|
|
29
31
|
*/
|
|
@@ -61,6 +63,7 @@ async function initialize() {
|
|
|
61
63
|
showNotification,
|
|
62
64
|
log,
|
|
63
65
|
});
|
|
66
|
+
await identifyLaunchContext();
|
|
64
67
|
// Setup UI event handlers
|
|
65
68
|
setupEventHandlers();
|
|
66
69
|
// Apply theme
|
|
@@ -73,6 +76,41 @@ async function initialize() {
|
|
|
73
76
|
log(`Initialization error: ${error.message}`, "error");
|
|
74
77
|
}
|
|
75
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Identifying Launch Context
|
|
81
|
+
*/
|
|
82
|
+
async function identifyLaunchContext() {
|
|
83
|
+
try {
|
|
84
|
+
const ctx = await toolbox.invocation.getLaunchContext();
|
|
85
|
+
log(`Launch context: ${ctx}`, "info");
|
|
86
|
+
if (ctx !== null) {
|
|
87
|
+
// Tool was launched via inter-tool invocation
|
|
88
|
+
inputEntityName = ctx.entityName;
|
|
89
|
+
currentLaunchContext = ctx;
|
|
90
|
+
log(`Launched with context for entity: ${inputEntityName}`, "success");
|
|
91
|
+
// Set iti-entity-name value with the entity name from the launch context
|
|
92
|
+
const entityNameInput = document.getElementById("iti-entity-name");
|
|
93
|
+
if (entityNameInput) {
|
|
94
|
+
entityNameInput.value = inputEntityName;
|
|
95
|
+
}
|
|
96
|
+
// Set default fetchXML to query the launched entity
|
|
97
|
+
const defaultFetchOutput = document.getElementById("iti-default-fetch-output");
|
|
98
|
+
if (defaultFetchOutput) {
|
|
99
|
+
defaultFetchOutput.textContent = `
|
|
100
|
+
<fetch top="10">
|
|
101
|
+
<entity name="${inputEntityName}">
|
|
102
|
+
<attribute name="name" />
|
|
103
|
+
<attribute name="${inputEntityName}id" />
|
|
104
|
+
<order attribute="name" />
|
|
105
|
+
</entity>
|
|
106
|
+
</fetch>`;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
log(`Error getting launch context: ${error.message}`, "error");
|
|
112
|
+
}
|
|
113
|
+
}
|
|
76
114
|
/**
|
|
77
115
|
* Refresh connection information
|
|
78
116
|
*/
|
|
@@ -231,6 +269,9 @@ function setupEventHandlers() {
|
|
|
231
269
|
document.getElementById("list-flows-btn")?.addEventListener("click", listPowerAutomateFlows);
|
|
232
270
|
document.getElementById("list-environments-btn")?.addEventListener("click", listEnvironments);
|
|
233
271
|
document.getElementById("get-governance-btn")?.addEventListener("click", getGovernanceData);
|
|
272
|
+
document.getElementById("query-role-definitions-btn")?.addEventListener("click", queryRoleDefinitions);
|
|
273
|
+
document.getElementById("assign-role-btn")?.addEventListener("click", assignRole);
|
|
274
|
+
document.getElementById("query-role-assignments-btn")?.addEventListener("click", queryRoleAssignments);
|
|
234
275
|
// Clear log button
|
|
235
276
|
document.getElementById("clear-log-btn")?.addEventListener("click", clearLog);
|
|
236
277
|
// Advanced utilities demos
|
|
@@ -239,6 +280,21 @@ function setupEventHandlers() {
|
|
|
239
280
|
// Settings buttons
|
|
240
281
|
document.getElementById("load-setting-btn")?.addEventListener("click", loadToolSetting);
|
|
241
282
|
document.getElementById("save-setting-btn")?.addEventListener("click", saveToolSetting);
|
|
283
|
+
// Inter-tool invocation buttons
|
|
284
|
+
document.getElementById("iti-return-value-btn")?.addEventListener("click", async () => {
|
|
285
|
+
const fetchXML = document.getElementById("iti-default-fetch-output")?.textContent;
|
|
286
|
+
await toolbox.invocation.returnData({
|
|
287
|
+
fetchXml: fetchXML,
|
|
288
|
+
});
|
|
289
|
+
log(`Returned data to caller: ${fetchXML}`, "info");
|
|
290
|
+
// PPTB automatically closes this window after delivering the result.
|
|
291
|
+
});
|
|
292
|
+
document.getElementById("iti-launch-fetchxml-btn")?.addEventListener("click", async () => {
|
|
293
|
+
const entityName = document.getElementById("iti-entity-logical-name").value;
|
|
294
|
+
const result = await toolbox.invocation.launchTool("@mohsinonxrm/pptb-fetchxml-studio", // npm package name of the target tool
|
|
295
|
+
{ entityName: entityName });
|
|
296
|
+
log(`Launched entity picker with result: ${JSON.stringify(result)}`, "info");
|
|
297
|
+
});
|
|
242
298
|
}
|
|
243
299
|
/**
|
|
244
300
|
* Show notification
|
|
@@ -1020,6 +1076,142 @@ async function getGovernanceData() {
|
|
|
1020
1076
|
log(`Error getting governance data: ${error.message}`, "error");
|
|
1021
1077
|
}
|
|
1022
1078
|
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Query role definitions from Power Platform Authorization API
|
|
1081
|
+
* Retrieves all available role definitions with their IDs and names
|
|
1082
|
+
*/
|
|
1083
|
+
async function queryRoleDefinitions() {
|
|
1084
|
+
const output = document.getElementById("role-definitions-output");
|
|
1085
|
+
try {
|
|
1086
|
+
if (output)
|
|
1087
|
+
output.textContent = "Fetching role definitions...\n";
|
|
1088
|
+
// Call the Power Platform Authorization API to get role definitions
|
|
1089
|
+
const result = await powerplatform.Authorization.Get("roleDefinitions?api-version=2024-10-01");
|
|
1090
|
+
if (output) {
|
|
1091
|
+
const roleDefinitions = result.value || [];
|
|
1092
|
+
output.textContent = `Found ${roleDefinitions.length} role definition(s):\n\n`;
|
|
1093
|
+
if (roleDefinitions.length === 0) {
|
|
1094
|
+
output.textContent += "No role definitions found.";
|
|
1095
|
+
}
|
|
1096
|
+
else {
|
|
1097
|
+
// Display role definitions in a formatted table
|
|
1098
|
+
roleDefinitions.forEach((role, index) => {
|
|
1099
|
+
output.textContent += `${index + 1}. ${role.roleDefinitionName}\n`;
|
|
1100
|
+
output.textContent += ` ID: ${role.roleDefinitionId}\n`;
|
|
1101
|
+
if (role.description)
|
|
1102
|
+
output.textContent += ` Description: ${role.description}\n`;
|
|
1103
|
+
output.textContent += "\n";
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
log(`Retrieved ${roleDefinitions.length} role definitions`, "success");
|
|
1107
|
+
await showNotification("Role Definitions Retrieved", `Found ${roleDefinitions.length} role definition(s)`, "success");
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
catch (error) {
|
|
1111
|
+
const errorMessage = error.message;
|
|
1112
|
+
if (output)
|
|
1113
|
+
output.textContent = `Error: ${errorMessage}`;
|
|
1114
|
+
log(`Error querying role definitions: ${errorMessage}`, "error");
|
|
1115
|
+
await showNotification("Error", `Failed to retrieve role definitions: ${errorMessage}`, "error");
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Assign a role to a principal (user, service principal, or enterprise app)
|
|
1120
|
+
* Creates a role assignment in the Power Platform Authorization API
|
|
1121
|
+
*/
|
|
1122
|
+
async function assignRole() {
|
|
1123
|
+
const output = document.getElementById("role-assignment-output");
|
|
1124
|
+
const tenantId = document.getElementById("role-assign-tenant-id")?.value;
|
|
1125
|
+
const principalObjectId = document.getElementById("role-assign-principal-object-id")?.value;
|
|
1126
|
+
const principalType = document.getElementById("role-assign-principal-type")?.value || "ApplicationUser";
|
|
1127
|
+
const roleDefinitionId = document.getElementById("role-assign-role-definition-id")?.value;
|
|
1128
|
+
if (!tenantId || !principalObjectId || !roleDefinitionId) {
|
|
1129
|
+
await showNotification("Missing Fields", "Please fill in all required fields", "warning");
|
|
1130
|
+
if (output)
|
|
1131
|
+
output.textContent = "Please provide Tenant ID, Principal Object ID, and Role Definition ID.";
|
|
1132
|
+
return;
|
|
1133
|
+
}
|
|
1134
|
+
try {
|
|
1135
|
+
if (output)
|
|
1136
|
+
output.textContent = "Assigning role...\n";
|
|
1137
|
+
// Build the request body
|
|
1138
|
+
const body = {
|
|
1139
|
+
roleDefinitionId,
|
|
1140
|
+
principalObjectId,
|
|
1141
|
+
principalType,
|
|
1142
|
+
scope: `/tenants/${tenantId}`,
|
|
1143
|
+
};
|
|
1144
|
+
// Call the Power Platform Authorization API to assign role
|
|
1145
|
+
const result = await powerplatform.Authorization.Post("roleAssignments?api-version=2024-10-01", body);
|
|
1146
|
+
if (output) {
|
|
1147
|
+
output.textContent = "Role assignment created successfully!\n\n";
|
|
1148
|
+
output.textContent += "Assignment Details:\n";
|
|
1149
|
+
output.textContent += `ID: ${result.id || result.roleAssignmentId}\n`;
|
|
1150
|
+
output.textContent += `Role Definition ID: ${result.roleDefinitionId}\n`;
|
|
1151
|
+
output.textContent += `Principal Object ID: ${result.principalObjectId}\n`;
|
|
1152
|
+
output.textContent += `Principal Type: ${result.principalType}\n`;
|
|
1153
|
+
output.textContent += `Scope: ${result.scope}\n`;
|
|
1154
|
+
}
|
|
1155
|
+
log(`Role assigned successfully to ${principalObjectId}`, "success");
|
|
1156
|
+
await showNotification("Role Assigned", `Role assigned to ${principalObjectId}`, "success");
|
|
1157
|
+
}
|
|
1158
|
+
catch (error) {
|
|
1159
|
+
const errorMessage = error.message;
|
|
1160
|
+
if (output)
|
|
1161
|
+
output.textContent = `Error: ${errorMessage}`;
|
|
1162
|
+
log(`Error assigning role: ${errorMessage}`, "error");
|
|
1163
|
+
await showNotification("Error", `Failed to assign role: ${errorMessage}`, "error");
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* Query existing role assignments from Power Platform Authorization API
|
|
1168
|
+
* Optionally filter by principal object ID
|
|
1169
|
+
*/
|
|
1170
|
+
async function queryRoleAssignments() {
|
|
1171
|
+
const output = document.getElementById("role-assignments-list-output");
|
|
1172
|
+
const filterPrincipalId = document.getElementById("query-role-assign-principal-id")?.value;
|
|
1173
|
+
try {
|
|
1174
|
+
if (output)
|
|
1175
|
+
output.textContent = "Fetching role assignments...\n";
|
|
1176
|
+
// Call the Power Platform Authorization API to get role assignments
|
|
1177
|
+
const result = await powerplatform.Authorization.Get("roleAssignments?api-version=2024-10-01");
|
|
1178
|
+
if (output) {
|
|
1179
|
+
const roleAssignments = result.value || [];
|
|
1180
|
+
// Filter by principal object ID if provided
|
|
1181
|
+
let filteredAssignments = roleAssignments;
|
|
1182
|
+
if (filterPrincipalId && filterPrincipalId.trim()) {
|
|
1183
|
+
filteredAssignments = roleAssignments.filter((assignment) => assignment.principalObjectId === filterPrincipalId);
|
|
1184
|
+
output.textContent = `Found ${filteredAssignments.length} role assignment(s) for principal ${filterPrincipalId}:\n\n`;
|
|
1185
|
+
}
|
|
1186
|
+
else {
|
|
1187
|
+
output.textContent = `Found ${roleAssignments.length} total role assignment(s):\n\n`;
|
|
1188
|
+
}
|
|
1189
|
+
if (filteredAssignments.length === 0) {
|
|
1190
|
+
output.textContent += "No role assignments found.";
|
|
1191
|
+
}
|
|
1192
|
+
else {
|
|
1193
|
+
// Display role assignments in a formatted table
|
|
1194
|
+
filteredAssignments.forEach((assignment, index) => {
|
|
1195
|
+
output.textContent += `${index + 1}. Role Assignment ID: ${assignment.roleAssignmentId || assignment.id}\n`;
|
|
1196
|
+
output.textContent += ` Role Definition ID: ${assignment.roleDefinitionId}\n`;
|
|
1197
|
+
output.textContent += ` Principal Object ID: ${assignment.principalObjectId}\n`;
|
|
1198
|
+
output.textContent += ` Principal Type: ${assignment.principalType}\n`;
|
|
1199
|
+
output.textContent += ` Scope: ${assignment.scope}\n`;
|
|
1200
|
+
output.textContent += "\n";
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
log(`Retrieved ${filteredAssignments.length} role assignment(s)${filterPrincipalId ? ` for ${filterPrincipalId}` : ""}`, "success");
|
|
1204
|
+
await showNotification("Role Assignments Retrieved", `Found ${filteredAssignments.length} role assignment(s)`, "success");
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
catch (error) {
|
|
1208
|
+
const errorMessage = error.message;
|
|
1209
|
+
if (output)
|
|
1210
|
+
output.textContent = `Error: ${errorMessage}`;
|
|
1211
|
+
log(`Error querying role assignments: ${errorMessage}`, "error");
|
|
1212
|
+
await showNotification("Error", `Failed to retrieve role assignments: ${errorMessage}`, "error");
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1023
1215
|
// Initialize when DOM is ready
|
|
1024
1216
|
if (document.readyState === "loading") {
|
|
1025
1217
|
document.addEventListener("DOMContentLoaded", initialize);
|
package/dist/index.html
CHANGED
|
@@ -220,6 +220,84 @@
|
|
|
220
220
|
</div>
|
|
221
221
|
<div id="governance-output" class="output"></div>
|
|
222
222
|
</div>
|
|
223
|
+
|
|
224
|
+
<div class="example-group">
|
|
225
|
+
<h3>Authorization API</h3>
|
|
226
|
+
<div class="button-group">
|
|
227
|
+
<button id="query-role-definitions-btn" class="btn btn-primary">Query Role Definitions</button>
|
|
228
|
+
</div>
|
|
229
|
+
<div id="role-definitions-output" class="output"></div>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<div class="example-group">
|
|
233
|
+
<h3>Authorization API - Role Assignment</h3>
|
|
234
|
+
<div class="input-group">
|
|
235
|
+
<label for="role-assign-tenant-id">Tenant ID:</label>
|
|
236
|
+
<input type="text" id="role-assign-tenant-id" placeholder="e.g., 15263562-2ed2-4856-8562-42edf998128b" />
|
|
237
|
+
</div>
|
|
238
|
+
<div class="input-group">
|
|
239
|
+
<label for="role-assign-principal-object-id">Principal Object ID:</label>
|
|
240
|
+
<input type="text" id="role-assign-principal-object-id" placeholder="e.g., 78541268-7456-7856-a7ba-04424f177c7c" />
|
|
241
|
+
</div>
|
|
242
|
+
<div class="input-group">
|
|
243
|
+
<label for="role-assign-principal-type">Principal Type:</label>
|
|
244
|
+
<select id="role-assign-principal-type">
|
|
245
|
+
<option value="ApplicationUser">ApplicationUser</option>
|
|
246
|
+
<option value="ServicePrincipal">ServicePrincipal</option>
|
|
247
|
+
<option value="User">User</option>
|
|
248
|
+
</select>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="input-group">
|
|
251
|
+
<label for="role-assign-role-definition-id">Role Definition ID:</label>
|
|
252
|
+
<input type="text" id="role-assign-role-definition-id" placeholder="e.g., ff954d61-a89a-4fbe-ace9-01c367b89f87" />
|
|
253
|
+
</div>
|
|
254
|
+
<div class="button-group">
|
|
255
|
+
<button id="assign-role-btn" class="btn btn-success">Assign Role</button>
|
|
256
|
+
</div>
|
|
257
|
+
<div id="role-assignment-output" class="output"></div>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
<div class="example-group">
|
|
261
|
+
<h3>Authorization API - Query Role Assignments</h3>
|
|
262
|
+
<div class="input-group">
|
|
263
|
+
<label for="query-role-assign-principal-id">Principal Object ID (Optional - filters results):</label>
|
|
264
|
+
<input type="text" id="query-role-assign-principal-id" placeholder="e.g., 78541268-7456-7856-a7ba-04424f177c7c" />
|
|
265
|
+
</div>
|
|
266
|
+
<div class="button-group">
|
|
267
|
+
<button id="query-role-assignments-btn" class="btn">Query Role Assignments</button>
|
|
268
|
+
</div>
|
|
269
|
+
<div id="role-assignments-list-output" class="output"></div>
|
|
270
|
+
</div>
|
|
271
|
+
</section>
|
|
272
|
+
|
|
273
|
+
<!-- Inter-tool Invocation Example -->
|
|
274
|
+
<section class="card">
|
|
275
|
+
<h2>⚡ Inter-tool Invocation Example</h2>
|
|
276
|
+
<p style="margin: 4px 0 15px; font-size: 12px; opacity: 0.85">Demonstrates how to invoke other tools or read invoked values within the Power Platform ToolBox.</p>
|
|
277
|
+
|
|
278
|
+
<div class="example-group">
|
|
279
|
+
<h3>Tool Launched by Another Tool or Agent</h3>
|
|
280
|
+
<div class="input-group">
|
|
281
|
+
<label for="iti-entity-name">Entity Name:</label>
|
|
282
|
+
<input type="text" id="iti-entity-name" readonly />
|
|
283
|
+
</div>
|
|
284
|
+
<div class="button-group">
|
|
285
|
+
<button id="iti-return-value-btn" class="btn">Return Default FetchXml (shown below)</button>
|
|
286
|
+
</div>
|
|
287
|
+
<div id="iti-default-fetch-output" class="output"></div>
|
|
288
|
+
</div>
|
|
289
|
+
<div class="example-group">
|
|
290
|
+
<h3>Launch Fetch XML Studio</h3>
|
|
291
|
+
<div class="input-group">
|
|
292
|
+
<label for="iti-entity-logical-name">Entity Logical Name:</label>
|
|
293
|
+
<input type="text" id="iti-entity-logical-name" placeholder="account" />
|
|
294
|
+
</div>
|
|
295
|
+
<div class="button-group">
|
|
296
|
+
<button id="iti-launch-fetchxml-btn" class="btn">Launch Fetch XML Studio</button>
|
|
297
|
+
</div>
|
|
298
|
+
<h4>Returned FetchXML:</h4>
|
|
299
|
+
<div id="iti-returned-fetch-output" class="output"></div>
|
|
300
|
+
</div>
|
|
223
301
|
</section>
|
|
224
302
|
|
|
225
303
|
<!-- Event Log -->
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pptb-standard-sample-tool",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pptb-standard-sample-tool",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.2.0",
|
|
10
10
|
"license": "GPL-3.0",
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@pptb/types": "^1.2.4-beta.
|
|
12
|
+
"@pptb/types": "^1.2.4-beta.4",
|
|
13
13
|
"shx": "^0.4.0",
|
|
14
14
|
"typescript": "^5.0.0"
|
|
15
15
|
},
|
|
@@ -17,6 +17,19 @@
|
|
|
17
17
|
"node": ">=18.0.0"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
+
"node_modules/@isaacs/fs-minipass": {
|
|
21
|
+
"version": "4.0.1",
|
|
22
|
+
"resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
|
|
23
|
+
"integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==",
|
|
24
|
+
"dev": true,
|
|
25
|
+
"license": "ISC",
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"minipass": "^7.0.4"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18.0.0"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
20
33
|
"node_modules/@nodelib/fs.scandir": {
|
|
21
34
|
"version": "2.1.5",
|
|
22
35
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
|
@@ -56,15 +69,31 @@
|
|
|
56
69
|
}
|
|
57
70
|
},
|
|
58
71
|
"node_modules/@pptb/types": {
|
|
59
|
-
"version": "1.2.4-beta.
|
|
60
|
-
"resolved": "https://registry.npmjs.org/@pptb/types/-/types-1.2.4-beta.
|
|
61
|
-
"integrity": "sha512-
|
|
72
|
+
"version": "1.2.4-beta.4",
|
|
73
|
+
"resolved": "https://registry.npmjs.org/@pptb/types/-/types-1.2.4-beta.4.tgz",
|
|
74
|
+
"integrity": "sha512-ipoQFehrZ6ndWAsIFZF1MBInM5hY0epUOsNf513oURnfie0Orcx2+7alt6B09LR2OG0egLf0BFxxg4iVDwMvNw==",
|
|
62
75
|
"dev": true,
|
|
63
76
|
"license": "GPL-3.0",
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"@pptb/validate": "^0.0.2"
|
|
79
|
+
},
|
|
64
80
|
"bin": {
|
|
65
81
|
"pptb-validate": "bin/pptb-validate.js"
|
|
66
82
|
}
|
|
67
83
|
},
|
|
84
|
+
"node_modules/@pptb/validate": {
|
|
85
|
+
"version": "0.0.2",
|
|
86
|
+
"resolved": "https://registry.npmjs.org/@pptb/validate/-/validate-0.0.2.tgz",
|
|
87
|
+
"integrity": "sha512-QsuimcuDgEbblqC4uAeXE+ONm5KJ5twKbGFh9d8e4leF2jsISgVpVzYPgivSLUA9iomDGmMnXcklHPgb4jEf1A==",
|
|
88
|
+
"dev": true,
|
|
89
|
+
"license": "GPL-3.0",
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"tar": "^7.5.16"
|
|
92
|
+
},
|
|
93
|
+
"bin": {
|
|
94
|
+
"pptb-validate": "dist/cli.js"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
68
97
|
"node_modules/braces": {
|
|
69
98
|
"version": "3.0.3",
|
|
70
99
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
|
@@ -78,6 +107,16 @@
|
|
|
78
107
|
"node": ">=8"
|
|
79
108
|
}
|
|
80
109
|
},
|
|
110
|
+
"node_modules/chownr": {
|
|
111
|
+
"version": "3.0.0",
|
|
112
|
+
"resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",
|
|
113
|
+
"integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==",
|
|
114
|
+
"dev": true,
|
|
115
|
+
"license": "BlueOak-1.0.0",
|
|
116
|
+
"engines": {
|
|
117
|
+
"node": ">=18"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
81
120
|
"node_modules/cross-spawn": {
|
|
82
121
|
"version": "6.0.6",
|
|
83
122
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz",
|
|
@@ -323,6 +362,29 @@
|
|
|
323
362
|
"url": "https://github.com/sponsors/ljharb"
|
|
324
363
|
}
|
|
325
364
|
},
|
|
365
|
+
"node_modules/minipass": {
|
|
366
|
+
"version": "7.1.3",
|
|
367
|
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
|
|
368
|
+
"integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
|
|
369
|
+
"dev": true,
|
|
370
|
+
"license": "BlueOak-1.0.0",
|
|
371
|
+
"engines": {
|
|
372
|
+
"node": ">=16 || 14 >=14.17"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"node_modules/minizlib": {
|
|
376
|
+
"version": "3.1.0",
|
|
377
|
+
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz",
|
|
378
|
+
"integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==",
|
|
379
|
+
"dev": true,
|
|
380
|
+
"license": "MIT",
|
|
381
|
+
"dependencies": {
|
|
382
|
+
"minipass": "^7.1.2"
|
|
383
|
+
},
|
|
384
|
+
"engines": {
|
|
385
|
+
"node": ">= 18"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
326
388
|
"node_modules/nice-try": {
|
|
327
389
|
"version": "1.0.5",
|
|
328
390
|
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
|
@@ -592,6 +654,23 @@
|
|
|
592
654
|
"url": "https://github.com/sponsors/ljharb"
|
|
593
655
|
}
|
|
594
656
|
},
|
|
657
|
+
"node_modules/tar": {
|
|
658
|
+
"version": "7.5.16",
|
|
659
|
+
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.16.tgz",
|
|
660
|
+
"integrity": "sha512-56adEpPMouktRlBLXiaYFFzZ/3+JXa8P9n7WbR+ibIjtviN55mEaOkiysCnPnWm+7kkui1Dn8J9l+g6zV8731w==",
|
|
661
|
+
"dev": true,
|
|
662
|
+
"license": "BlueOak-1.0.0",
|
|
663
|
+
"dependencies": {
|
|
664
|
+
"@isaacs/fs-minipass": "^4.0.0",
|
|
665
|
+
"chownr": "^3.0.0",
|
|
666
|
+
"minipass": "^7.1.2",
|
|
667
|
+
"minizlib": "^3.1.0",
|
|
668
|
+
"yallist": "^5.0.0"
|
|
669
|
+
},
|
|
670
|
+
"engines": {
|
|
671
|
+
"node": ">=18"
|
|
672
|
+
}
|
|
673
|
+
},
|
|
595
674
|
"node_modules/to-regex-range": {
|
|
596
675
|
"version": "5.0.1",
|
|
597
676
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
|
@@ -638,6 +717,16 @@
|
|
|
638
717
|
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
|
639
718
|
"dev": true,
|
|
640
719
|
"license": "ISC"
|
|
720
|
+
},
|
|
721
|
+
"node_modules/yallist": {
|
|
722
|
+
"version": "5.0.0",
|
|
723
|
+
"resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
|
|
724
|
+
"integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==",
|
|
725
|
+
"dev": true,
|
|
726
|
+
"license": "BlueOak-1.0.0",
|
|
727
|
+
"engines": {
|
|
728
|
+
"node": ">=18"
|
|
729
|
+
}
|
|
641
730
|
}
|
|
642
731
|
}
|
|
643
732
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pptb-standard-sample-tool",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"displayName": "HTML Sample Tool",
|
|
5
5
|
"description": "A sample Power Platform ToolBox tool built with HTML, CSS, and TypeScript",
|
|
6
6
|
"main": "index.html",
|
|
@@ -45,15 +45,16 @@
|
|
|
45
45
|
"copy-css": "shx cp src/styles.css dist/",
|
|
46
46
|
"copy-icon": "shx cp -r icon/ dist/icon/",
|
|
47
47
|
"finalize-package": "npm shrinkwrap",
|
|
48
|
-
"
|
|
48
|
+
"validate": "pptb-validate"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@pptb/types": "^1.2.4-beta.
|
|
51
|
+
"@pptb/types": "^1.2.4-beta.4",
|
|
52
52
|
"shx": "^0.4.0",
|
|
53
53
|
"typescript": "^5.0.0"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
56
56
|
"dist",
|
|
57
|
-
"npm-shrinkwrap.json"
|
|
57
|
+
"npm-shrinkwrap.json",
|
|
58
|
+
"pptb.config.json"
|
|
58
59
|
]
|
|
59
60
|
}
|
package/pptb.config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"invocation": {
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"agentInvokable": true,
|
|
5
|
+
"capabilities": [
|
|
6
|
+
"fetchxml"
|
|
7
|
+
],
|
|
8
|
+
"prefill": {
|
|
9
|
+
"properties": {
|
|
10
|
+
"entityName": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"returnTopic": {
|
|
16
|
+
"properties": {
|
|
17
|
+
"fetchXml": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|