@revoengine/cli 2.1.1 → 2.2.0

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +111 -12
  3. package/dist/src/application-access.d.ts +4 -0
  4. package/dist/src/application-access.js +18 -0
  5. package/dist/src/application-cors.d.ts +2 -0
  6. package/dist/src/application-cors.js +19 -0
  7. package/dist/src/argument-contract.js +24 -4
  8. package/dist/src/automation-contract.generated.d.ts +165 -6
  9. package/dist/src/automation-contract.generated.js +198 -6
  10. package/dist/src/cli.js +10 -2
  11. package/dist/src/client.d.ts +53 -1
  12. package/dist/src/client.js +84 -0
  13. package/dist/src/commands/applications.d.ts +2 -0
  14. package/dist/src/commands/applications.js +44 -0
  15. package/dist/src/commands/emulate.d.ts +1 -0
  16. package/dist/src/commands/emulate.js +79 -3
  17. package/dist/src/commands/index.d.ts +2 -0
  18. package/dist/src/commands/index.js +2 -0
  19. package/dist/src/commands/migrate.js +10 -2
  20. package/dist/src/commands/sites.d.ts +2 -0
  21. package/dist/src/commands/sites.js +156 -0
  22. package/dist/src/component-lock.d.ts +2 -1
  23. package/dist/src/component-lock.js +22 -1
  24. package/dist/src/endpoint-application.d.ts +25 -0
  25. package/dist/src/endpoint-application.js +75 -0
  26. package/dist/src/endpoint-emulator.d.ts +5 -0
  27. package/dist/src/endpoint-emulator.js +29 -0
  28. package/dist/src/endpoint-storage-transports.d.ts +2 -0
  29. package/dist/src/endpoint-storage-transports.js +8 -0
  30. package/dist/src/metadata-backfill.d.ts +1 -1
  31. package/dist/src/metadata-backfill.js +10 -1
  32. package/dist/src/migration.d.ts +6 -2
  33. package/dist/src/migration.js +104 -41
  34. package/dist/src/project.d.ts +8 -1
  35. package/dist/src/project.js +4 -0
  36. package/dist/src/request-contract.d.ts +5 -0
  37. package/dist/src/request-contract.js +12 -0
  38. package/dist/src/resource-inventory.d.ts +4 -2
  39. package/dist/src/resource-inventory.js +16 -1
  40. package/dist/src/resource-syncs/account-principal.d.ts +2 -0
  41. package/dist/src/resource-syncs/account-principal.js +3 -0
  42. package/dist/src/resource-syncs/application-principals.d.ts +60 -0
  43. package/dist/src/resource-syncs/application-principals.js +151 -0
  44. package/dist/src/resource-syncs/application-sync.d.ts +110 -0
  45. package/dist/src/resource-syncs/application-sync.js +328 -0
  46. package/dist/src/resource-syncs/endpoint-sync.d.ts +38 -0
  47. package/dist/src/resource-syncs/endpoint-sync.js +278 -14
  48. package/dist/src/resource-syncs/group-sync.d.ts +12 -0
  49. package/dist/src/resource-syncs/group-sync.js +60 -6
  50. package/dist/src/resource-syncs/runtime-definition-validation.js +26 -1
  51. package/dist/src/resource-syncs/service-account-sync.d.ts +10 -0
  52. package/dist/src/resource-syncs/service-account-sync.js +32 -4
  53. package/dist/src/reviewed-plan.js +2 -2
  54. package/dist/src/sync-omit-write-fence.js +4 -1
  55. package/dist/src/sync-omit.d.ts +1 -1
  56. package/dist/src/sync-omit.js +7 -2
  57. package/dist/src/tracked-resources.d.ts +1 -1
  58. package/dist/src/tracked-resources.js +3 -2
  59. package/dist/src/types.d.ts +30 -0
  60. package/dist/src/ui.js +2 -0
  61. package/dist/src/workspace-diff.js +1 -0
  62. package/dist/src/workspace-digests.js +2 -0
  63. package/dist/src/workspace-prune.js +67 -9
  64. package/package.json +2 -2
@@ -1,6 +1,8 @@
1
+ import { type EndpointApplicationReference } from '../endpoint-application.ts';
1
2
  import { type PortableExecutionPolicy } from './account-principal.ts';
2
3
  import { type FieldChange } from '../diff-details.ts';
3
4
  import type { RevoClient } from '../client.ts';
5
+ import type { VerifiedServiceAccount } from './service-account-sync.ts';
4
6
  export declare const ENDPOINTS_DIRECTORY = "Endpoints";
5
7
  export declare const ENDPOINT_MANIFEST_FILE = "endpoint.json";
6
8
  export type EndpointComponentBinding = {
@@ -19,11 +21,13 @@ export type EndpointManifest = {
19
21
  description?: string;
20
22
  metadata: Record<string, unknown>;
21
23
  active: boolean;
24
+ allowUnauthenticated?: boolean;
22
25
  timeout?: number;
23
26
  route: {
24
27
  method: string;
25
28
  path: string;
26
29
  };
30
+ application?: EndpointApplicationReference;
27
31
  options?: Record<string, unknown>;
28
32
  execution?: EndpointComponentBinding;
29
33
  executionPolicy?: PortableExecutionPolicy;
@@ -45,7 +49,22 @@ export type EndpointPullResult = {
45
49
  };
46
50
  declare const ENDPOINT_PLAN_STATUS_ORDER: readonly ["create", "restore", "safe-update", "remote-changed", "conflict", "missing-lock", "restore-blocked", "collision", "clean", "orphan", "skipped"];
47
51
  export type EndpointPlanStatus = typeof ENDPOINT_PLAN_STATUS_ORDER[number];
52
+ export type AnonymousExecutionDependency = {
53
+ stableKey?: string;
54
+ serviceAccountUserId: string;
55
+ version: number;
56
+ revisionHash: string;
57
+ };
48
58
  export type EndpointPlanItem = {
59
+ anonymousExecutionDependency?: AnonymousExecutionDependency;
60
+ applicationDependency?: {
61
+ key: string;
62
+ readiness: string;
63
+ serviceId?: string;
64
+ version?: number;
65
+ desiredHash?: string;
66
+ revisionHash?: string;
67
+ };
49
68
  fieldChanges?: FieldChange[];
50
69
  status: EndpointPlanStatus;
51
70
  stableKey?: string;
@@ -69,6 +88,18 @@ export type ProjectedEndpointComponentDependency = {
69
88
  desiredHash: string;
70
89
  state: 'ready' | 'pending-create' | 'pending-update' | 'pending-adopt';
71
90
  };
91
+ export type ProjectedEndpointApplicationDependency = {
92
+ key: string;
93
+ desiredHash: string;
94
+ state: 'ready' | 'pending-create' | 'pending-update' | 'pending-adopt';
95
+ };
96
+ export type VerifiedEndpointApplication = {
97
+ key: string;
98
+ serviceId: string;
99
+ version: number;
100
+ desiredHash: string;
101
+ revisionHash: string;
102
+ };
72
103
  export type EndpointDependencyReadiness = 'ready' | 'pending-component-create' | 'pending-component-update' | 'pending-component-adopt' | 'blocked';
73
104
  export type EndpointDependencyEdge = {
74
105
  relation: 'execution' | 'schema';
@@ -113,6 +144,10 @@ export declare function buildEndpointsPlan(input: {
113
144
  envName: string;
114
145
  stableKeyName: string;
115
146
  projectedComponents?: ProjectedEndpointComponentDependency[];
147
+ projectedApplications?: ProjectedEndpointApplicationDependency[];
148
+ reviewedPlan?: EndpointPlan;
149
+ verifiedServiceAccounts?: VerifiedServiceAccount[];
150
+ verifiedApplications?: VerifiedEndpointApplication[];
116
151
  projectedServiceAccounts?: string[];
117
152
  includeDependencyBlockers?: boolean;
118
153
  }): Promise<EndpointPlan>;
@@ -122,6 +157,9 @@ export declare function pushEndpoints(input: {
122
157
  envName: string;
123
158
  stableKeyName: string;
124
159
  force?: boolean;
160
+ reviewedPlan?: EndpointPlan;
161
+ verifiedServiceAccounts?: VerifiedServiceAccount[];
162
+ verifiedApplications?: VerifiedEndpointApplication[];
125
163
  }): Promise<{
126
164
  plan: EndpointPlan;
127
165
  results: EndpointPushResult[];