@xano/cli 1.3.0 → 1.3.1-beta.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.
- package/README.md +269 -1
- package/dist/base-command.d.ts +12 -1
- package/dist/base-command.js +36 -22
- package/dist/commands/branch/set_live/index.d.ts +22 -0
- package/dist/commands/branch/set_live/index.js +60 -1
- package/dist/commands/ephemeral/push/index.js +6 -1
- package/dist/commands/function/create/index.d.ts +15 -0
- package/dist/commands/function/create/index.js +40 -0
- package/dist/commands/function/edit/index.d.ts +15 -0
- package/dist/commands/function/edit/index.js +40 -0
- package/dist/commands/policy/catalogue/index.d.ts +15 -0
- package/dist/commands/policy/catalogue/index.js +29 -0
- package/dist/commands/policy/create/index.d.ts +18 -0
- package/dist/commands/policy/create/index.js +39 -0
- package/dist/commands/policy/delete/index.d.ts +19 -0
- package/dist/commands/policy/delete/index.js +61 -0
- package/dist/commands/policy/evaluate/index.d.ts +32 -0
- package/dist/commands/policy/evaluate/index.js +71 -0
- package/dist/commands/policy/list/index.d.ts +14 -0
- package/dist/commands/policy/list/index.js +21 -0
- package/dist/commands/policy/parse/index.d.ts +19 -0
- package/dist/commands/policy/parse/index.js +18 -0
- package/dist/commands/policy/publish/index.d.ts +20 -0
- package/dist/commands/policy/publish/index.js +38 -0
- package/dist/commands/policy/runs/index.d.ts +54 -0
- package/dist/commands/policy/runs/index.js +273 -0
- package/dist/commands/policy/status/index.d.ts +21 -0
- package/dist/commands/policy/status/index.js +54 -0
- package/dist/commands/release/create/index.js +7 -0
- package/dist/commands/release/deploy/index.d.ts +28 -0
- package/dist/commands/release/deploy/index.js +90 -6
- package/dist/commands/release/import/index.js +5 -1
- package/dist/commands/release/list/index.d.ts +7 -0
- package/dist/commands/release/list/index.js +54 -10
- package/dist/commands/release/push/index.js +19 -1
- package/dist/commands/sandbox/push/index.js +6 -1
- package/dist/commands/skills/pull/index.d.ts +30 -0
- package/dist/commands/skills/pull/index.js +118 -0
- package/dist/commands/tenant/create/index.d.ts +3 -0
- package/dist/commands/tenant/create/index.js +21 -0
- package/dist/commands/tenant/deploy_release/index.d.ts +40 -0
- package/dist/commands/tenant/deploy_release/index.js +186 -4
- package/dist/commands/tenant/edit/index.d.ts +2 -0
- package/dist/commands/tenant/edit/index.js +39 -4
- package/dist/commands/tenant_deploy_request/bypass/index.d.ts +31 -0
- package/dist/commands/tenant_deploy_request/bypass/index.js +109 -0
- package/dist/commands/tenant_deploy_request/create/index.d.ts +21 -0
- package/dist/commands/tenant_deploy_request/create/index.js +108 -0
- package/dist/commands/tenant_deploy_request/edit/index.d.ts +22 -0
- package/dist/commands/tenant_deploy_request/edit/index.js +103 -0
- package/dist/commands/tenant_deploy_request/get/index.d.ts +25 -0
- package/dist/commands/tenant_deploy_request/get/index.js +116 -0
- package/dist/commands/tenant_deploy_request/list/index.d.ts +20 -0
- package/dist/commands/tenant_deploy_request/list/index.js +122 -0
- package/dist/commands/tenant_deploy_request/revision/index.d.ts +21 -0
- package/dist/commands/tenant_deploy_request/revision/index.js +83 -0
- package/dist/commands/tenant_deploy_request/set_status/index.d.ts +38 -0
- package/dist/commands/tenant_deploy_request/set_status/index.js +159 -0
- package/dist/commands/workspace/pull/index.d.ts +10 -0
- package/dist/commands/workspace/pull/index.js +70 -7
- package/dist/commands/workspace/push/index.d.ts +19 -0
- package/dist/commands/workspace/push/index.js +124 -5
- package/dist/policy-command.d.ts +90 -0
- package/dist/policy-command.js +94 -0
- package/dist/utils/document-parser.d.ts +10 -0
- package/dist/utils/document-parser.js +21 -0
- package/dist/utils/multidoc-push.d.ts +55 -2
- package/dist/utils/multidoc-push.js +103 -27
- package/dist/utils/policy/catalogue.d.ts +7 -0
- package/dist/utils/policy/catalogue.js +72 -0
- package/dist/utils/policy/errors.d.ts +12 -0
- package/dist/utils/policy/errors.js +61 -0
- package/dist/utils/policy/feedback.d.ts +68 -0
- package/dist/utils/policy/feedback.js +165 -0
- package/dist/utils/policy/findings.d.ts +23 -0
- package/dist/utils/policy/findings.js +65 -0
- package/dist/utils/policy/gate.d.ts +161 -0
- package/dist/utils/policy/gate.js +201 -0
- package/dist/utils/policy/goal.d.ts +46 -0
- package/dist/utils/policy/goal.js +95 -0
- package/dist/utils/policy/permission.d.ts +23 -0
- package/dist/utils/policy/permission.js +84 -0
- package/dist/utils/policy/push-gate.d.ts +5 -0
- package/dist/utils/policy/push-gate.js +29 -0
- package/dist/utils/policy/release.d.ts +85 -0
- package/dist/utils/policy/release.js +115 -0
- package/dist/utils/policy/request.d.ts +55 -0
- package/dist/utils/policy/request.js +115 -0
- package/dist/utils/policy/runs.d.ts +30 -0
- package/dist/utils/policy/runs.js +101 -0
- package/dist/utils/policy/status.d.ts +47 -0
- package/dist/utils/policy/status.js +117 -0
- package/dist/utils/policy/types.d.ts +185 -0
- package/dist/utils/policy/types.js +1 -0
- package/oclif.manifest.json +6132 -3133
- package/package.json +7 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/** The shapes the policy routes answer with. Policy grammar belongs to the platform. */
|
|
2
|
+
export interface PolicyCatalogueEntry {
|
|
3
|
+
description?: string;
|
|
4
|
+
fix_hint?: string;
|
|
5
|
+
id: string;
|
|
6
|
+
/** The check's human name. */
|
|
7
|
+
label: string;
|
|
8
|
+
object_kinds?: string[];
|
|
9
|
+
params?: Record<string, {
|
|
10
|
+
required?: boolean;
|
|
11
|
+
type?: string;
|
|
12
|
+
}>;
|
|
13
|
+
/** Params of which a rule must set at least one. */
|
|
14
|
+
requires_one_of?: string[];
|
|
15
|
+
}
|
|
16
|
+
/** One rule as a run snapshot records it: the settings the check ran with, plus the check's label. */
|
|
17
|
+
export interface PolicySnapshotRule {
|
|
18
|
+
check?: string;
|
|
19
|
+
id?: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
/** The resolved settings; PHP sends an empty map as `[]`. */
|
|
22
|
+
params?: unknown;
|
|
23
|
+
title?: string;
|
|
24
|
+
}
|
|
25
|
+
/** One policy as a run snapshot records it, including the description it carried at run time. */
|
|
26
|
+
export interface PolicySnapshotPolicy {
|
|
27
|
+
key?: string;
|
|
28
|
+
rules?: PolicySnapshotRule[];
|
|
29
|
+
/** The policy description as written at run time. */
|
|
30
|
+
statement?: string;
|
|
31
|
+
title?: string;
|
|
32
|
+
/** The Version History index this run evaluated. */
|
|
33
|
+
version?: number;
|
|
34
|
+
}
|
|
35
|
+
export interface PolicyRuleResult {
|
|
36
|
+
check_id?: string;
|
|
37
|
+
checked?: number;
|
|
38
|
+
message?: string;
|
|
39
|
+
policy_key?: string;
|
|
40
|
+
status?: string;
|
|
41
|
+
warnings?: string[];
|
|
42
|
+
}
|
|
43
|
+
export interface PolicyFinding {
|
|
44
|
+
/** Stable finding id, used to tell a blocking finding from an advisory one. */
|
|
45
|
+
id?: string;
|
|
46
|
+
message?: string;
|
|
47
|
+
object?: {
|
|
48
|
+
name?: string;
|
|
49
|
+
type?: string;
|
|
50
|
+
};
|
|
51
|
+
policy_key?: string;
|
|
52
|
+
policy_title?: string;
|
|
53
|
+
rule_id?: string;
|
|
54
|
+
rule_title?: string;
|
|
55
|
+
severity?: string;
|
|
56
|
+
}
|
|
57
|
+
/** The verdict every `policy_check` carries. */
|
|
58
|
+
export interface PolicyVerdict {
|
|
59
|
+
/** True when an active, mandatory policy failed; it decides the exit code whatever the status. */
|
|
60
|
+
blocking?: boolean;
|
|
61
|
+
/** The platform's verdict, including the names of rules that checked no objects. */
|
|
62
|
+
message?: string;
|
|
63
|
+
run_id?: number;
|
|
64
|
+
/**
|
|
65
|
+
* `pass`, `fail` or `error` (a check could not run) for an evaluation; `disabled`,
|
|
66
|
+
* `not_applicable`, `forbidden` or `unavailable` when nothing was evaluated.
|
|
67
|
+
*/
|
|
68
|
+
status?: string;
|
|
69
|
+
}
|
|
70
|
+
/** A run's finding counts: every finding, the blocking ones, and the rules that could not run. */
|
|
71
|
+
export interface PolicyCounts {
|
|
72
|
+
/** The findings that do not block; the run summary serves it, a push's feedback does not. */
|
|
73
|
+
advisory?: number;
|
|
74
|
+
blocking: number;
|
|
75
|
+
errors: number;
|
|
76
|
+
findings: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A push's `policy_check`: the verdict with its findings and results, since a push answers no run.
|
|
80
|
+
* The lists hold the first 100 each, in the platform's order; the stored run (`run_id`) has them all.
|
|
81
|
+
*/
|
|
82
|
+
export interface PushPolicyCheck extends PolicyVerdict {
|
|
83
|
+
/** The first blocking findings. */
|
|
84
|
+
blocking_findings?: PolicyFinding[];
|
|
85
|
+
/** What the lists are out of. */
|
|
86
|
+
counts?: PolicyCounts;
|
|
87
|
+
/** The first findings, blocking first. */
|
|
88
|
+
findings?: PolicyFinding[];
|
|
89
|
+
results?: PolicyRuleResult[];
|
|
90
|
+
/** Every finding, listed or not. */
|
|
91
|
+
total?: number;
|
|
92
|
+
/** Whether either list was cut. */
|
|
93
|
+
truncated?: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** A policy's place in its branch's newest run, as the platform serves it on every policy. */
|
|
96
|
+
export interface PolicyCoverage {
|
|
97
|
+
enforcement: null | string;
|
|
98
|
+
/** Whether the newest run evaluated this policy at all. */
|
|
99
|
+
included: boolean;
|
|
100
|
+
/** 0 when the branch has no run. */
|
|
101
|
+
run_id: number;
|
|
102
|
+
/** True only when the newest run evaluated a different version of this policy. */
|
|
103
|
+
stale: boolean;
|
|
104
|
+
version: null | number;
|
|
105
|
+
}
|
|
106
|
+
export interface Policy {
|
|
107
|
+
active: boolean;
|
|
108
|
+
enforcement: string;
|
|
109
|
+
id: number;
|
|
110
|
+
key: string;
|
|
111
|
+
latest_run?: PolicyCoverage;
|
|
112
|
+
rules?: Array<{
|
|
113
|
+
id: string;
|
|
114
|
+
}>;
|
|
115
|
+
title?: string;
|
|
116
|
+
/** When the policy was last written, as served; sent back as `last_updated_at` to refuse acting on a stale read. */
|
|
117
|
+
updated_at?: number | string;
|
|
118
|
+
/** The index of the policy's newest Version History entry; it moves only when the definition changes. */
|
|
119
|
+
version: number;
|
|
120
|
+
}
|
|
121
|
+
/** One stored run as the run list serves it: the verdict and counts, without findings or results. */
|
|
122
|
+
export interface PolicyRunSummary {
|
|
123
|
+
counts: {
|
|
124
|
+
blocking: number;
|
|
125
|
+
errors: number;
|
|
126
|
+
findings: number;
|
|
127
|
+
};
|
|
128
|
+
finished_at?: string;
|
|
129
|
+
id: number;
|
|
130
|
+
objects_checked: number;
|
|
131
|
+
started_at?: string;
|
|
132
|
+
status: string;
|
|
133
|
+
trigger?: string;
|
|
134
|
+
}
|
|
135
|
+
/** One run in full, as `GET run/{id}` serves it. */
|
|
136
|
+
export interface PolicyRun {
|
|
137
|
+
findings?: PolicyFinding[];
|
|
138
|
+
finished_at?: number | string;
|
|
139
|
+
/** 0 for an evaluation that was not stored. */
|
|
140
|
+
id?: number;
|
|
141
|
+
/** How many workspace objects the run inspected. */
|
|
142
|
+
objects_checked?: number;
|
|
143
|
+
/** The snapshot of the policies as they were when the run went out. */
|
|
144
|
+
policies?: PolicySnapshotPolicy[];
|
|
145
|
+
results?: PolicyRuleResult[];
|
|
146
|
+
started_at?: number | string;
|
|
147
|
+
status?: string;
|
|
148
|
+
trigger?: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* What `policy evaluate` answers: the run as `GET run/{id}` serves it, whether it was stored, and the verdict.
|
|
152
|
+
* With no active policy on the branch it is no run at all: `id` 0, `status` `not_applicable`, nothing evaluated.
|
|
153
|
+
*/
|
|
154
|
+
export interface PolicyEvaluation extends PolicyRun {
|
|
155
|
+
/** The summary answer's counts (`--summary`). */
|
|
156
|
+
counts?: PolicyCounts;
|
|
157
|
+
/** `blocking_total`: every blocking finding, beside the summary answer's listed ones. */
|
|
158
|
+
policy_check?: PolicyVerdict & {
|
|
159
|
+
blocking_finding_ids?: string[];
|
|
160
|
+
blocking_total?: number;
|
|
161
|
+
};
|
|
162
|
+
stored?: boolean;
|
|
163
|
+
/** The summary answer: every finding, and whether `findings` lists only the first. */
|
|
164
|
+
total?: number;
|
|
165
|
+
truncated?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/** One run without its findings, as `GET run/{id}/summary` serves it. */
|
|
168
|
+
export interface PolicyRunHead extends PolicyRun {
|
|
169
|
+
counts?: PolicyCounts;
|
|
170
|
+
/** The snapshot, each policy with its verdict in this run. */
|
|
171
|
+
policies?: Array<PolicySnapshotPolicy & {
|
|
172
|
+
blocking?: boolean;
|
|
173
|
+
findings?: number;
|
|
174
|
+
objects_checked?: number;
|
|
175
|
+
status?: string;
|
|
176
|
+
}>;
|
|
177
|
+
}
|
|
178
|
+
/** One page of a run's findings, as `GET run/{id}/findings` serves it. */
|
|
179
|
+
export interface PolicyFindingsPage {
|
|
180
|
+
items: PolicyFinding[];
|
|
181
|
+
limit: number;
|
|
182
|
+
offset: number;
|
|
183
|
+
/** The findings that match the filters, listed or not. */
|
|
184
|
+
total: number;
|
|
185
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|