@verentis/cli 0.2.19 → 0.2.20

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/index.js CHANGED
@@ -316,7 +316,9 @@ var SCOPES = {
316
316
  packageCreate: "marketplace.package.create",
317
317
  packagePublish: "marketplace.package.publish",
318
318
  installCreate: "marketplace.install.create",
319
- installDelete: "marketplace.install.delete"
319
+ installDelete: "marketplace.install.delete",
320
+ resourceReadAll: "resources.resource.read-all",
321
+ resourceUpdate: "resources.resource.update"
320
322
  };
321
323
 
322
324
  // src/api/scopes.ts
@@ -3291,9 +3293,13 @@ function registerRegistry(program2) {
3291
3293
  const api = await createApiClient();
3292
3294
  const { package: pkg } = await resolvePackageRef(api, ref);
3293
3295
  const installationId = await api.request("POST", "/v1/installations", {
3294
- // Marketplace forwards this token to Node for the extraction, so it needs
3295
- // the node scope and must be bound to the target workspace.
3296
- scopes: [SCOPES.installCreate, "node.node.create"],
3296
+ // Marketplace forwards this workspace-bound token to Node for extraction
3297
+ // and to Resource for the administrator's consent decision.
3298
+ scopes: [
3299
+ SCOPES.installCreate,
3300
+ "node.node.create",
3301
+ ...pkg.kind === "Application" ? [SCOPES.resourceReadAll, SCOPES.resourceUpdate] : []
3302
+ ],
3297
3303
  tokenWorkspaceId: workspaceId,
3298
3304
  body: {
3299
3305
  workspaceId,