@processfocus/cli 0.1.0-next.2 → 0.1.0-next.4

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 (45) hide show
  1. package/README.md +89 -698
  2. package/dist/bundle-organisation.mjs +2 -0
  3. package/dist/bundled-db-import.mjs +103 -120
  4. package/dist/bundled-graphql-schema.mjs +17 -15
  5. package/dist/command-reference.md +571 -0
  6. package/dist/main.mjs +326 -303
  7. package/dist/pfcli.usage.kdl +377 -0
  8. package/dist/prepare-deployment-artifact.mjs +2 -2
  9. package/dist/resources/cedar/policies.cedar +80 -38
  10. package/dist/resources/cedar/schema.cedarschema +39 -21
  11. package/dist/resources/system-migrations/20260925020504_panoramic_klaw/migration.sql +1 -0
  12. package/dist/resources/system-migrations/20260925020504_panoramic_klaw/snapshot.json +7708 -0
  13. package/dist/resources/system-migrations/20261013060336_pretty_mulholland_black/migration.sql +14 -0
  14. package/dist/resources/system-migrations/20261013060336_pretty_mulholland_black/snapshot.json +7852 -0
  15. package/dist/resources/system-migrations/20261019050118_aberrant_jetstream/migration.sql +4 -0
  16. package/dist/resources/system-migrations/20261019050118_aberrant_jetstream/snapshot.json +7908 -0
  17. package/dist/resources/system-migrations/20261023074259_previous_falcon/migration.sql +1 -0
  18. package/dist/resources/system-migrations/20261023074259_previous_falcon/snapshot.json +7918 -0
  19. package/dist/resources/system-migrations/20261023211931_black_vision/migration.sql +1 -0
  20. package/dist/resources/system-migrations/20261023211931_black_vision/snapshot.json +7928 -0
  21. package/dist/resources/system-migrations/20261024022040_magenta_dreaming_celestial/migration.sql +4 -0
  22. package/dist/resources/system-migrations/20261024022040_magenta_dreaming_celestial/snapshot.json +7968 -0
  23. package/dist/resources/system-migrations/20261025201326_confused_mordo/migration.sql +25 -0
  24. package/dist/resources/system-migrations/20261025201326_confused_mordo/snapshot.json +8141 -0
  25. package/dist/resources/system-migrations/20261025225809_pink_mysterio/migration.sql +20 -0
  26. package/dist/resources/system-migrations/20261025225809_pink_mysterio/snapshot.json +8350 -0
  27. package/dist/resources/system-migrations/20261030073445_fuzzy_patriot/migration.sql +1 -0
  28. package/dist/resources/system-migrations/20261030073445_fuzzy_patriot/snapshot.json +8360 -0
  29. package/dist/resources/system-migrations/20261101232313_curved_siren/migration.sql +3 -0
  30. package/dist/resources/system-migrations/20261101232313_curved_siren/snapshot.json +8390 -0
  31. package/dist/resources/system-migrations/20261111225459_real_overlord/migration.sql +13 -0
  32. package/dist/resources/system-migrations/20261111225459_real_overlord/snapshot.json +8511 -0
  33. package/dist/resources/system-migrations/20261112002154_fresh_mikhail_rasputin/migration.sql +1 -0
  34. package/dist/resources/system-migrations/20261112002154_fresh_mikhail_rasputin/snapshot.json +8501 -0
  35. package/dist/resources/system-migrations/20261116032801_numerous_taskmaster/migration.sql +1 -0
  36. package/dist/resources/system-migrations/20261116032801_numerous_taskmaster/snapshot.json +8511 -0
  37. package/dist/resources/system-migrations/20261119201444_settings-login-audit-index/migration.sql +3 -0
  38. package/dist/resources/system-migrations/20261119201444_settings-login-audit-index/snapshot.json +8511 -0
  39. package/dist/resources/system-migrations/20261119223342_lucky_lester/migration.sql +3 -0
  40. package/dist/resources/system-migrations/20261119223342_lucky_lester/snapshot.json +8367 -0
  41. package/dist/resources/system-migrations/20261123050259_sad_dagger/migration.sql +1 -0
  42. package/dist/resources/system-migrations/20261123050259_sad_dagger/snapshot.json +8377 -0
  43. package/dist/resources/system-migrations/20261127002114_worthless_hairball/migration.sql +17 -0
  44. package/dist/resources/system-migrations/20261127002114_worthless_hairball/snapshot.json +8550 -0
  45. package/package.json +11 -9
@@ -23,13 +23,7 @@ namespace PF {
23
23
  };
24
24
 
25
25
  entity PublicLink {
26
- todo: Todo,
27
- };
28
-
29
- entity Todo in [Step, Process] {
30
- step?: Step,
31
- role?: Role,
32
- assignedTo?: ProviderUser,
26
+ todoId: String,
33
27
  };
34
28
 
35
29
  entity Step in [Process] {
@@ -50,7 +44,7 @@ namespace PF {
50
44
  action skipScheduleWaits appliesTo {
51
45
  principal: [ProviderUser, ServiceAccount, Delegation],
52
46
  resource: Process,
53
- context: { requestTime: datetime, nodeEnv: String }
47
+ context: RequestContext
54
48
  };
55
49
 
56
50
  entity List in [OrgUnit] {
@@ -59,10 +53,13 @@ namespace PF {
59
53
 
60
54
  entity Execution in [Process, OrgUnit] {
61
55
  startedBy?: ProviderUser,
56
+ startedByServiceAccount?: ServiceAccount,
57
+ deploymentProjectGranted?: Bool,
62
58
  startedByRole?: Role,
63
59
  };
64
60
 
65
61
  entity File in [OrgUnit] {
62
+ serviceAccountOwner?: ServiceAccount,
66
63
  owner: ProviderUser,
67
64
  documentStore: String,
68
65
  };
@@ -71,26 +68,50 @@ namespace PF {
71
68
 
72
69
  entity GraphQLField {
73
70
  tag?: String,
71
+ step?: Step,
74
72
  };
75
73
 
76
74
  // Context available for all authorization requests
77
75
  type RequestContext = {
78
76
  requestTime: datetime,
77
+ // Lowercase English weekday of requestTime's configured local date.
78
+ weekday: String,
79
79
  nodeEnv: String,
80
+ runtimeMode: String,
81
+ stage: String,
82
+ environment: String,
83
+ };
84
+
85
+ // Instance facts resolved by the runtime, never supplied by the client.
86
+ type CompletionContext = {
87
+ requestTime: datetime,
88
+ weekday: String,
89
+ nodeEnv: String,
90
+ runtimeMode: String,
91
+ stage: String,
92
+ environment: String,
93
+ todoId?: String,
94
+ assignedTo?: ProviderUser,
95
+ cronStart?: Bool,
96
+ };
97
+
98
+ action viewEmbeddedForm appliesTo {
99
+ principal: [ProviderUser, Delegation, ServiceAccount],
100
+ resource: Step,
101
+ context: RequestContext,
80
102
  };
81
103
 
82
- // Complete action for steps
83
104
  action complete appliesTo {
84
105
  principal: [ProviderUser, Delegation, ServiceAccount, PublicLink],
85
- resource: [Step, Todo],
86
- context: RequestContext,
106
+ resource: Step,
107
+ context: CompletionContext,
87
108
  };
88
109
 
89
110
  // Provider-user action for correcting Public Completion delivery failures.
90
111
  action publicCompletionCorrection appliesTo {
91
112
  principal: [ProviderUser, Delegation],
92
- resource: Todo,
93
- context: RequestContext,
113
+ resource: Step,
114
+ context: CompletionContext,
94
115
  };
95
116
 
96
117
  // View action for executions and lists
@@ -114,7 +135,6 @@ namespace PF {
114
135
  context: RequestContext,
115
136
  };
116
137
 
117
- // Update action for lists
118
138
  action create appliesTo {
119
139
  principal: [ProviderUser, Delegation],
120
140
  resource: List,
@@ -139,12 +159,6 @@ namespace PF {
139
159
  context: RequestContext,
140
160
  };
141
161
 
142
- action requestProviderUserPermissions appliesTo {
143
- principal: [Delegation, ServiceAccount],
144
- resource: ProviderUser,
145
- context: RequestContext,
146
- };
147
-
148
162
  action actOnBehalfOf appliesTo {
149
163
  principal: [ProviderUser, Delegation, ServiceAccount],
150
164
  resource: ProviderUser,
@@ -156,7 +170,11 @@ namespace PF {
156
170
  resource: ProviderUser,
157
171
  context: {
158
172
  requestTime: datetime,
173
+ weekday: String,
159
174
  nodeEnv: String,
175
+ runtimeMode: String,
176
+ stage: String,
177
+ environment: String,
160
178
  ownerProviderUserId: String,
161
179
  humanSession: Bool,
162
180
  humanAuthentication?: {
@@ -220,7 +238,7 @@ namespace PF {
220
238
 
221
239
  // Delete action for files and lists
222
240
  action delete appliesTo {
223
- principal: [ProviderUser, Delegation],
241
+ principal: [ProviderUser, Delegation, ServiceAccount],
224
242
  resource: [File, List],
225
243
  context: RequestContext,
226
244
  };
@@ -0,0 +1 @@
1
+ CREATE INDEX `pf_process_execution_processstateidx_idx` ON `pf_process_execution` (`process_state_id`) WHERE _deleted = 0;