patram 0.10.0 → 0.12.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/bin/patram.js +4 -4
- package/lib/cli/arguments.types.d.ts +1 -0
- package/lib/cli/commands/check.js +27 -15
- package/lib/cli/commands/fields.js +0 -4
- package/lib/cli/commands/queries.js +179 -1
- package/lib/cli/commands/query.js +1 -8
- package/lib/cli/commands/refs.js +3 -10
- package/lib/cli/commands/show.js +1 -8
- package/lib/cli/help-metadata.js +106 -111
- package/lib/cli/main.js +10 -10
- package/lib/cli/parse-arguments-helpers.js +416 -66
- package/lib/cli/parse-arguments.js +4 -4
- package/lib/cli/render-help.js +10 -4
- package/lib/config/defaults.js +33 -25
- package/lib/config/load-patram-config.d.ts +19 -33
- package/lib/config/load-patram-config.js +18 -121
- package/lib/config/load-patram-config.types.d.ts +3 -40
- package/lib/config/manage-stored-queries-helpers.d.ts +69 -0
- package/lib/config/manage-stored-queries-helpers.js +320 -0
- package/lib/config/manage-stored-queries-jsonc.d.ts +31 -0
- package/lib/config/manage-stored-queries-jsonc.js +95 -0
- package/lib/config/manage-stored-queries.d.ts +77 -0
- package/lib/config/manage-stored-queries.js +300 -0
- package/lib/config/patram-config.d.ts +34 -34
- package/lib/config/patram-config.js +3 -3
- package/lib/config/patram-config.types.d.ts +5 -11
- package/lib/config/resolve-patram-graph-config.d.ts +5 -1
- package/lib/config/resolve-patram-graph-config.js +3 -119
- package/lib/config/schema.d.ts +158 -269
- package/lib/config/schema.js +72 -210
- package/lib/config/validate-patram-config-value.d.ts +13 -0
- package/lib/config/validate-patram-config-value.js +94 -0
- package/lib/config/validation.d.ts +2 -12
- package/lib/config/validation.js +125 -483
- package/lib/find-close-match.d.ts +4 -1
- package/lib/graph/build-graph-identity.d.ts +1 -32
- package/lib/graph/build-graph-identity.js +5 -269
- package/lib/graph/build-graph.d.ts +13 -4
- package/lib/graph/build-graph.js +347 -488
- package/lib/graph/build-graph.types.d.ts +8 -9
- package/lib/graph/check-directive-metadata-helpers.d.ts +30 -0
- package/lib/graph/check-directive-metadata-helpers.js +126 -0
- package/lib/graph/check-directive-metadata.d.ts +8 -9
- package/lib/graph/check-directive-metadata.js +70 -561
- package/lib/graph/check-directive-path-target.d.ts +6 -13
- package/lib/graph/check-directive-path-target.js +26 -57
- package/lib/graph/check-directive-value.d.ts +1 -5
- package/lib/graph/check-directive-value.js +40 -180
- package/lib/graph/check-graph.d.ts +5 -5
- package/lib/graph/check-graph.js +8 -6
- package/lib/graph/document-node-identity.d.ts +23 -7
- package/lib/graph/document-node-identity.js +417 -160
- package/lib/graph/graph-node.d.ts +42 -0
- package/lib/graph/graph-node.js +83 -0
- package/lib/graph/inspect-reverse-references.js +16 -11
- package/lib/graph/load-project-graph.d.ts +7 -7
- package/lib/graph/load-project-graph.js +7 -7
- package/lib/graph/parse-where-clause.types.d.ts +3 -2
- package/lib/graph/query/cypher-reader.d.ts +59 -0
- package/lib/graph/query/cypher-reader.js +151 -0
- package/lib/graph/query/cypher-support.d.ts +79 -0
- package/lib/graph/query/cypher-support.js +213 -0
- package/lib/graph/query/cypher-tokenize.d.ts +13 -0
- package/lib/graph/query/cypher-tokenize.js +225 -0
- package/lib/graph/query/cypher.types.d.ts +43 -0
- package/lib/graph/query/execute.d.ts +7 -7
- package/lib/graph/query/execute.js +71 -33
- package/lib/graph/query/inspect.js +58 -24
- package/lib/graph/query/parse-cypher-patterns.d.ts +27 -0
- package/lib/graph/query/parse-cypher-patterns.js +382 -0
- package/lib/graph/query/parse-cypher.d.ts +7 -0
- package/lib/graph/query/parse-cypher.js +580 -0
- package/lib/graph/query/parse-query.d.ts +13 -0
- package/lib/graph/query/parse-query.js +97 -0
- package/lib/graph/query/resolve.d.ts +6 -0
- package/lib/graph/query/resolve.js +81 -24
- package/lib/output/command-output.js +12 -5
- package/lib/output/compact-layout.js +221 -0
- package/lib/output/format-output-item-block.js +31 -1
- package/lib/output/format-output-metadata.js +16 -29
- package/lib/output/format-stored-query-block.js +95 -0
- package/lib/output/layout-incoming-references.js +101 -19
- package/lib/output/layout-stored-queries.js +23 -330
- package/lib/output/list-queries.js +1 -1
- package/lib/output/render-field-discovery.js +11 -2
- package/lib/output/render-output-view.js +9 -5
- package/lib/output/renderers/json.js +5 -26
- package/lib/output/renderers/plain.js +155 -35
- package/lib/output/renderers/rich.js +250 -36
- package/lib/output/resolve-check-target.js +120 -11
- package/lib/output/resolved-link-layout.js +43 -0
- package/lib/output/rich-source/render.js +193 -35
- package/lib/output/show-document.js +25 -18
- package/lib/output/view-model/index.js +124 -103
- package/lib/parse/jsdoc/parse-jsdoc-blocks.js +1 -1
- package/lib/parse/jsdoc/parse-jsdoc-claims.js +12 -6
- package/lib/parse/markdown/parse-markdown-claims.js +99 -62
- package/lib/parse/markdown/parse-markdown-directives.d.ts +10 -6
- package/lib/parse/markdown/parse-markdown-directives.js +104 -18
- package/lib/parse/markdown/parse-markdown-prose.d.ts +27 -0
- package/lib/parse/markdown/parse-markdown-prose.js +243 -0
- package/lib/parse/parse-claims.d.ts +2 -6
- package/lib/parse/parse-claims.js +11 -53
- package/lib/parse/tagged-fenced/tagged-fenced-blocks.d.ts +4 -4
- package/lib/parse/tagged-fenced/tagged-fenced-blocks.js +4 -4
- package/lib/parse/yaml/parse-yaml-claims.js +4 -4
- package/lib/patram.d.ts +9 -3
- package/lib/patram.js +1 -1
- package/lib/scan/discover-fields.js +194 -55
- package/lib/scan/list-source-files.d.ts +4 -4
- package/lib/scan/list-source-files.js +4 -4
- package/package.json +2 -1
- package/lib/directive-validation-test-helpers.js +0 -87
- package/lib/graph/query/parse.d.ts +0 -75
- package/lib/graph/query/parse.js +0 -1064
- package/lib/output/derived-summary.js +0 -280
- package/lib/output/format-derived-summary-row.js +0 -9
package/lib/cli/help-metadata.js
CHANGED
|
@@ -87,14 +87,15 @@ const COMMAND_DEFINITIONS = {
|
|
|
87
87
|
'patram check',
|
|
88
88
|
'patram check docs',
|
|
89
89
|
'patram check docs/patram.md',
|
|
90
|
+
'patram check docs docs/patram.md',
|
|
90
91
|
],
|
|
91
|
-
extra_positionals_message: 'Check accepts
|
|
92
|
+
extra_positionals_message: 'Check accepts zero or more paths.',
|
|
92
93
|
help_topics: [],
|
|
93
|
-
max_positionals:
|
|
94
|
+
max_positionals: Number.POSITIVE_INFINITY,
|
|
94
95
|
min_positionals: 0,
|
|
95
96
|
missing_argument_examples: [],
|
|
96
97
|
missing_argument_label: null,
|
|
97
|
-
missing_usage_lines: ['patram check [path]'],
|
|
98
|
+
missing_usage_lines: ['patram check [path ...]'],
|
|
98
99
|
option_column_width: 10,
|
|
99
100
|
options: [
|
|
100
101
|
{
|
|
@@ -110,7 +111,7 @@ const COMMAND_DEFINITIONS = {
|
|
|
110
111
|
root_summary: 'Validate a project, directory, or file',
|
|
111
112
|
summary:
|
|
112
113
|
'Validate a project, directory, or file and report graph diagnostics.',
|
|
113
|
-
usage_lines: ['patram check [path] [options]'],
|
|
114
|
+
usage_lines: ['patram check [path ...] [options]'],
|
|
114
115
|
},
|
|
115
116
|
fields: {
|
|
116
117
|
allowed_option_names: new Set(),
|
|
@@ -141,41 +142,42 @@ const COMMAND_DEFINITIONS = {
|
|
|
141
142
|
},
|
|
142
143
|
query: {
|
|
143
144
|
allowed_option_names: new Set([
|
|
145
|
+
'cypher',
|
|
144
146
|
'explain',
|
|
145
147
|
'limit',
|
|
146
148
|
'lint',
|
|
147
149
|
'offset',
|
|
148
|
-
'where',
|
|
149
150
|
]),
|
|
150
151
|
examples: [
|
|
151
152
|
'patram query active-plans',
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"patram query --
|
|
155
|
-
|
|
153
|
+
'patram query --cypher "MATCH (n:Plan) WHERE n.status = \'active\' RETURN n"',
|
|
154
|
+
'patram query --cypher "MATCH (n) WHERE id(n) = \'plan:v0/worktracking-agent-guidance\' RETURN n"',
|
|
155
|
+
"patram query --cypher \"MATCH (n) WHERE n.status NOT IN ['done', 'dropped', 'superseded'] RETURN n\"",
|
|
156
|
+
'patram query --cypher "MATCH (n:Plan) WHERE NOT EXISTS { MATCH (decision:Decision)-[:TRACKED_IN]->(n) } RETURN n"',
|
|
157
|
+
'patram query --cypher "MATCH (n:Decision) WHERE COUNT { MATCH (task:Task)-[:DECIDED_BY]->(n) } = 0 RETURN n"',
|
|
156
158
|
'patram query ready-tasks --explain',
|
|
157
|
-
|
|
159
|
+
'patram query --cypher "MATCH (n:Decision) WHERE n.status = \'accepted\' AND COUNT { MATCH (task:Task)-[:DECIDED_BY]->(n) } = 0 RETURN n" --lint',
|
|
158
160
|
'patram query active-plans --limit 10 --offset 20',
|
|
159
161
|
],
|
|
160
162
|
extra_positionals_message:
|
|
161
|
-
'Query accepts
|
|
163
|
+
'Query accepts "--cypher" or a stored query name.',
|
|
162
164
|
help_topics: ['query-language'],
|
|
163
165
|
max_positionals: 1,
|
|
164
166
|
min_positionals: 0,
|
|
165
167
|
missing_argument_examples: [
|
|
166
168
|
'patram query active-plans',
|
|
167
|
-
|
|
169
|
+
'patram query --cypher "MATCH (n:Plan) WHERE n.status = \'active\' RETURN n"',
|
|
168
170
|
],
|
|
169
|
-
missing_argument_label: "<name> or --
|
|
171
|
+
missing_argument_label: "<name> or --cypher '<query>'",
|
|
170
172
|
missing_usage_lines: [
|
|
171
173
|
'patram query <name> [options]',
|
|
172
|
-
|
|
174
|
+
`patram query --cypher '<query>' [options]`,
|
|
173
175
|
],
|
|
174
176
|
option_column_width: 19,
|
|
175
177
|
options: [
|
|
176
178
|
{
|
|
177
|
-
description: 'Run an ad hoc query instead of a stored query',
|
|
178
|
-
label: '--
|
|
179
|
+
description: 'Run an ad hoc Cypher query instead of a stored query',
|
|
180
|
+
label: '--cypher <query>',
|
|
179
181
|
},
|
|
180
182
|
{
|
|
181
183
|
description: 'Skip the first N matches',
|
|
@@ -203,35 +205,57 @@ const COMMAND_DEFINITIONS = {
|
|
|
203
205
|
},
|
|
204
206
|
],
|
|
205
207
|
related: ['queries', 'show'],
|
|
206
|
-
root_summary: 'Run a stored query or an ad hoc
|
|
208
|
+
root_summary: 'Run a stored query or an ad hoc Cypher query',
|
|
207
209
|
summary:
|
|
208
|
-
'Run a stored query or an ad hoc
|
|
210
|
+
'Run a stored query or an ad hoc Cypher query against graph nodes.',
|
|
209
211
|
syntax_lines: [
|
|
210
|
-
'
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
'
|
|
214
|
-
'
|
|
215
|
-
'none(<traversal>, <term> and <term>)',
|
|
216
|
-
'count(<traversal>, <term> and <term>) <comparison> <number>',
|
|
212
|
+
'MATCH (n) RETURN n',
|
|
213
|
+
"MATCH (n:Label) WHERE n.status = 'active' RETURN n",
|
|
214
|
+
"MATCH (n) WHERE id(n) = 'command:query' RETURN n",
|
|
215
|
+
'MATCH (n) WHERE EXISTS { MATCH ... } RETURN n',
|
|
216
|
+
'MATCH (n) WHERE COUNT { MATCH ... } = 0 RETURN n',
|
|
217
217
|
],
|
|
218
218
|
usage_lines: [
|
|
219
219
|
'patram query <name> [options]',
|
|
220
|
-
|
|
220
|
+
`patram query --cypher '<query>' [options]`,
|
|
221
221
|
],
|
|
222
222
|
},
|
|
223
223
|
queries: {
|
|
224
|
-
allowed_option_names: new Set(),
|
|
225
|
-
examples: [
|
|
226
|
-
|
|
224
|
+
allowed_option_names: new Set(['cypher', 'desc', 'name']),
|
|
225
|
+
examples: [
|
|
226
|
+
'patram queries',
|
|
227
|
+
`patram queries add active-plans --cypher "MATCH (n:Plan) WHERE n.status = 'active' RETURN n"`,
|
|
228
|
+
"patram queries update ready-tasks --desc 'Show tasks that are ready.'",
|
|
229
|
+
`patram queries update ready-tasks --cypher "MATCH (n:Task) WHERE n.status = 'ready' RETURN n"`,
|
|
230
|
+
'patram queries remove ready-tasks',
|
|
231
|
+
],
|
|
232
|
+
extra_positionals_message:
|
|
233
|
+
'Queries accepts no positionals unless using add, update, or remove.',
|
|
227
234
|
help_topics: [],
|
|
228
|
-
max_positionals:
|
|
235
|
+
max_positionals: 2,
|
|
229
236
|
min_positionals: 0,
|
|
230
237
|
missing_argument_examples: [],
|
|
231
238
|
missing_argument_label: null,
|
|
232
|
-
missing_usage_lines: [
|
|
233
|
-
|
|
239
|
+
missing_usage_lines: [
|
|
240
|
+
'patram queries',
|
|
241
|
+
'patram queries add <name> --cypher <query>',
|
|
242
|
+
'patram queries update <name> [--name <new_name>] [--cypher <query>] [--desc <text>]',
|
|
243
|
+
'patram queries remove <name>',
|
|
244
|
+
],
|
|
245
|
+
option_column_width: 19,
|
|
234
246
|
options: [
|
|
247
|
+
{
|
|
248
|
+
description: 'Persist a new stored Cypher query',
|
|
249
|
+
label: '--cypher <query>',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
description: 'Set or rename the stored query name for update',
|
|
253
|
+
label: '--name <new_name>',
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
description: 'Set or clear the stored query description',
|
|
257
|
+
label: '--desc <text>',
|
|
258
|
+
},
|
|
235
259
|
{
|
|
236
260
|
description: 'Print plain text output',
|
|
237
261
|
label: '--plain',
|
|
@@ -242,15 +266,21 @@ const COMMAND_DEFINITIONS = {
|
|
|
242
266
|
},
|
|
243
267
|
],
|
|
244
268
|
related: ['query'],
|
|
245
|
-
root_summary: 'List stored queries',
|
|
246
|
-
summary:
|
|
247
|
-
|
|
269
|
+
root_summary: 'List and manage stored queries',
|
|
270
|
+
summary:
|
|
271
|
+
'List stored queries or mutate them through add, update, and remove.',
|
|
272
|
+
usage_lines: [
|
|
273
|
+
'patram queries [options]',
|
|
274
|
+
`patram queries add <name> --cypher <query> [--desc <text>] [options]`,
|
|
275
|
+
'patram queries update <name> [--name <new_name>] [--cypher <query>] [--desc <text>] [options]',
|
|
276
|
+
'patram queries remove <name> [options]',
|
|
277
|
+
],
|
|
248
278
|
},
|
|
249
279
|
refs: {
|
|
250
|
-
allowed_option_names: new Set(['
|
|
280
|
+
allowed_option_names: new Set(['cypher']),
|
|
251
281
|
examples: [
|
|
252
282
|
'patram refs docs/decisions/query-language.md',
|
|
253
|
-
|
|
283
|
+
'patram refs docs/decisions/query-language.md --cypher "MATCH (n:Document) RETURN n"',
|
|
254
284
|
'patram refs docs/decisions/query-language.md --json',
|
|
255
285
|
],
|
|
256
286
|
extra_positionals_message: 'Refs accepts exactly one file path.',
|
|
@@ -259,15 +289,15 @@ const COMMAND_DEFINITIONS = {
|
|
|
259
289
|
min_positionals: 1,
|
|
260
290
|
missing_argument_examples: [
|
|
261
291
|
'patram refs docs/decisions/query-language.md',
|
|
262
|
-
|
|
292
|
+
'patram refs docs/patram.md --cypher "MATCH (n:Document) RETURN n"',
|
|
263
293
|
],
|
|
264
294
|
missing_argument_label: '<file>',
|
|
265
295
|
missing_usage_lines: ['patram refs <file>'],
|
|
266
296
|
option_column_width: 19,
|
|
267
297
|
options: [
|
|
268
298
|
{
|
|
269
|
-
description: 'Filter incoming source nodes with a
|
|
270
|
-
label: '--
|
|
299
|
+
description: 'Filter incoming source nodes with a Cypher query',
|
|
300
|
+
label: '--cypher <query>',
|
|
271
301
|
},
|
|
272
302
|
{
|
|
273
303
|
description: 'Print plain text output',
|
|
@@ -320,102 +350,67 @@ const COMMAND_DEFINITIONS = {
|
|
|
320
350
|
const HELP_TOPIC_DEFINITIONS = {
|
|
321
351
|
'query-language': {
|
|
322
352
|
examples: [
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
'
|
|
327
|
-
'
|
|
328
|
-
'
|
|
329
|
-
'implements_command=command:query',
|
|
330
|
-
'status not in [done, dropped, superseded]',
|
|
331
|
-
'any(in:tracked_in, $class=task and status in [pending, ready, in_progress, blocked])',
|
|
332
|
-
'none(in:tracked_in, $class=decision)',
|
|
333
|
-
'count(in:decided_by, $class=task) = 0',
|
|
334
|
-
'not uses_term=term:graph',
|
|
353
|
+
"MATCH (n:Decision) WHERE n.status = 'accepted' RETURN n",
|
|
354
|
+
"MATCH (n:Task) WHERE n.status IN ['pending', 'ready'] RETURN n",
|
|
355
|
+
"MATCH (n) WHERE path(n) ENDS WITH '/README.md' RETURN n",
|
|
356
|
+
'MATCH (n:Plan) WHERE NOT EXISTS { MATCH (decision:Decision)-[:TRACKED_IN]->(n) } RETURN n',
|
|
357
|
+
'MATCH (n:Decision) WHERE COUNT { MATCH (task:Task)-[:DECIDED_BY]->(n) } = 0 RETURN n',
|
|
358
|
+
"MATCH (n) WHERE EXISTS { MATCH (n)-[:IMPLEMENTS_COMMAND]->(command:Command) WHERE id(command) = 'command:query' } RETURN n",
|
|
335
359
|
],
|
|
336
|
-
lead: 'Query language
|
|
360
|
+
lead: 'Query language uses a constrained Cypher subset for graph node selection.',
|
|
337
361
|
operators: [
|
|
338
362
|
{
|
|
339
|
-
description: '
|
|
340
|
-
label: '=',
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
description: 'Prefix match for structural id and path',
|
|
344
|
-
label: '^=',
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
description: 'Contains text for title',
|
|
348
|
-
label: '~',
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
description: 'Set membership for supported fields',
|
|
352
|
-
label: 'in',
|
|
363
|
+
description: 'Equality and exact value comparison',
|
|
364
|
+
label: '= | <>',
|
|
353
365
|
},
|
|
354
366
|
{
|
|
355
|
-
description: '
|
|
356
|
-
label: '
|
|
367
|
+
description: 'String prefix, suffix, and contains checks',
|
|
368
|
+
label: 'STARTS WITH | ENDS WITH | CONTAINS',
|
|
357
369
|
},
|
|
358
370
|
{
|
|
359
|
-
description: '
|
|
360
|
-
label: '
|
|
371
|
+
description: 'Set membership checks',
|
|
372
|
+
label: 'IN | NOT IN',
|
|
361
373
|
},
|
|
362
374
|
{
|
|
363
|
-
description: '
|
|
364
|
-
label: '
|
|
375
|
+
description: 'Boolean composition',
|
|
376
|
+
label: 'AND | OR | NOT',
|
|
365
377
|
},
|
|
366
378
|
{
|
|
367
|
-
description: '
|
|
368
|
-
label: '
|
|
379
|
+
description: 'Relation existence subqueries',
|
|
380
|
+
label: 'EXISTS { ... }',
|
|
369
381
|
},
|
|
370
382
|
{
|
|
371
|
-
description: '
|
|
372
|
-
label: '
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
description: 'Count comparisons',
|
|
376
|
-
label: '!= < > >= <=',
|
|
383
|
+
description: 'Related-node count comparisons',
|
|
384
|
+
label: 'COUNT { ... }',
|
|
377
385
|
},
|
|
378
386
|
],
|
|
379
387
|
relation_terms: [
|
|
380
388
|
{
|
|
381
|
-
description: '
|
|
382
|
-
label: '
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
description: 'Match nodes linked to an exact target id',
|
|
386
|
-
label: '<relation>=<target-id>',
|
|
389
|
+
description: 'Outgoing relation match',
|
|
390
|
+
label: '(n)-[:RELATION]->(target)',
|
|
387
391
|
},
|
|
388
392
|
{
|
|
389
|
-
description: '
|
|
390
|
-
label: '
|
|
393
|
+
description: 'Incoming relation match',
|
|
394
|
+
label: '(source)-[:RELATION]->(n)',
|
|
391
395
|
},
|
|
392
396
|
{
|
|
393
|
-
description: '
|
|
394
|
-
label: '
|
|
397
|
+
description: 'Label-qualified related node pattern',
|
|
398
|
+
label: '(n)-[:RELATION]->(target:Label)',
|
|
395
399
|
},
|
|
396
400
|
],
|
|
397
401
|
terms: [
|
|
398
|
-
'
|
|
399
|
-
'
|
|
400
|
-
'
|
|
401
|
-
'
|
|
402
|
+
'Root match: MATCH (n) or MATCH (n:Label)',
|
|
403
|
+
'Return shape: RETURN n',
|
|
404
|
+
'Structural functions: id(n), path(n)',
|
|
405
|
+
'Labels select class membership: MATCH (n:Label)',
|
|
406
|
+
'Common fields: n.title, n.status, n.kind',
|
|
407
|
+
'Subqueries: EXISTS { MATCH ... WHERE ... } and COUNT { MATCH ... WHERE ... }',
|
|
402
408
|
],
|
|
403
409
|
usage_lines: [
|
|
404
|
-
'
|
|
405
|
-
'
|
|
406
|
-
'
|
|
407
|
-
'
|
|
408
|
-
'<field> in [<value>, ...]',
|
|
409
|
-
'<field> not in [<value>, ...]',
|
|
410
|
-
'<relation>:*',
|
|
411
|
-
'<relation>=<target-id>',
|
|
412
|
-
'any(<traversal>, <term> and <term>)',
|
|
413
|
-
'none(<traversal>, <term> and <term>)',
|
|
414
|
-
'count(<traversal>, <term> and <term>) <comparison> <number>',
|
|
415
|
-
'not <term>',
|
|
416
|
-
'<term> and <term>',
|
|
417
|
-
'<term> or <term>',
|
|
418
|
-
'(<expression>)',
|
|
410
|
+
'MATCH (n) RETURN n',
|
|
411
|
+
'MATCH (n:Label) WHERE <predicate> RETURN n',
|
|
412
|
+
'MATCH (n) WHERE EXISTS { MATCH ... } RETURN n',
|
|
413
|
+
'MATCH (n) WHERE COUNT { MATCH ... } <comparison> <number> RETURN n',
|
|
419
414
|
],
|
|
420
415
|
},
|
|
421
416
|
};
|
|
@@ -529,7 +524,7 @@ function listOptionLabels(command_name) {
|
|
|
529
524
|
} else {
|
|
530
525
|
option_labels.add('--limit');
|
|
531
526
|
option_labels.add('--offset');
|
|
532
|
-
option_labels.add('--
|
|
527
|
+
option_labels.add('--cypher');
|
|
533
528
|
}
|
|
534
529
|
|
|
535
530
|
return [...option_labels];
|
package/lib/cli/main.js
CHANGED
|
@@ -16,16 +16,16 @@ import { runShowCommand } from './commands/show.js';
|
|
|
16
16
|
* Loads repo state and routes `check`, `fields`, `query`, `queries`, and
|
|
17
17
|
* `show` through the shared output pipeline.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
19
|
+
* kind: cli
|
|
20
|
+
* status: active
|
|
21
|
+
* implements_command: ../../docs/reference/commands/check.md
|
|
22
|
+
* implements_command: ../../docs/reference/commands/query.md
|
|
23
|
+
* implements_command: ../../docs/reference/commands/queries.md
|
|
24
|
+
* implements_command: ../../docs/reference/commands/refs.md
|
|
25
|
+
* implements_command: ../../docs/reference/commands/show.md
|
|
26
|
+
* tracked_in: ../../docs/plans/v0/source-anchor-dogfooding.md
|
|
27
|
+
* decided_by: ../../docs/decisions/cli-output-architecture.md
|
|
28
|
+
* decided_by: ../../docs/decisions/cli-argument-parser.md
|
|
29
29
|
* @patram
|
|
30
30
|
* @see {@link ./parse-arguments.js}
|
|
31
31
|
* @see {@link ./commands/query.js}
|