@loopress/cli 0.8.0 → 0.10.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 +40 -71
- package/dist/commands/composer/pull.d.ts +0 -3
- package/dist/commands/composer/pull.js +0 -1
- package/dist/commands/composer/push.d.ts +0 -3
- package/dist/commands/composer/push.js +0 -1
- package/dist/commands/plugin/add.d.ts +0 -3
- package/dist/commands/plugin/add.js +0 -1
- package/dist/commands/plugin/pull.d.ts +0 -3
- package/dist/commands/plugin/pull.js +0 -1
- package/dist/commands/plugin/push.d.ts +3 -3
- package/dist/commands/plugin/push.js +63 -32
- package/dist/commands/sentry-test.d.ts +6 -0
- package/dist/commands/sentry-test.js +8 -0
- package/dist/commands/snippet/list.d.ts +0 -3
- package/dist/commands/snippet/list.js +1 -6
- package/dist/commands/snippet/pull.d.ts +0 -3
- package/dist/commands/snippet/pull.js +16 -23
- package/dist/commands/snippet/push.d.ts +1 -3
- package/dist/commands/snippet/push.js +25 -24
- package/dist/hooks/finally.d.ts +3 -0
- package/dist/hooks/finally.js +21 -0
- package/dist/hooks/init.d.ts +3 -0
- package/dist/hooks/init.js +18 -0
- package/dist/lib/base.d.ts +0 -5
- package/dist/lib/base.js +1 -29
- package/dist/lib/sentry.d.ts +8 -0
- package/dist/lib/sentry.js +24 -0
- package/dist/types/config.d.ts +1 -19
- package/dist/types/global-config.generated.d.ts +59 -0
- package/dist/types/global-config.generated.js +2 -0
- package/dist/types/project-config.generated.d.ts +31 -0
- package/dist/types/project-config.generated.js +2 -0
- package/dist/types/snippet.generated.d.ts +46 -0
- package/dist/types/snippet.generated.js +2 -0
- package/dist/utils/loopress-config.d.ts +2 -7
- package/oclif.manifest.json +118 -292
- package/package.json +16 -3
- package/schemas/global-config.schema.json +83 -0
- package/schemas/project-config.schema.json +48 -0
- package/schemas/snippet.schema.json +61 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loopress.dev/schema/snippet.json",
|
|
4
|
+
"title": "Loopress snippet metadata",
|
|
5
|
+
"description": "Sidecar .json file paired with a snippet's code file in the snippets directory (e.g. `123-my-snippet.php` + `123-my-snippet.json`).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "integer",
|
|
14
|
+
"description": "Remote snippet id. Omitted until the snippet has been pushed for the first time."
|
|
15
|
+
},
|
|
16
|
+
"name": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Snippet name/title. Defaults to the code file's name when omitted."
|
|
19
|
+
},
|
|
20
|
+
"type": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Snippet language. Defaults to the type inferred from the code file's extension when omitted.",
|
|
23
|
+
"enum": ["css", "html", "js", "php", "text"]
|
|
24
|
+
},
|
|
25
|
+
"active": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"description": "Whether the snippet is enabled.",
|
|
28
|
+
"default": false
|
|
29
|
+
},
|
|
30
|
+
"location": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Where the snippet runs. Supported values depend on the target plugin and snippet type.",
|
|
33
|
+
"enum": ["admin", "body", "everywhere", "footer", "frontend", "header", "once"]
|
|
34
|
+
},
|
|
35
|
+
"description": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Free-text note about the snippet."
|
|
38
|
+
},
|
|
39
|
+
"tags": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"description": "Tags for organizing snippets.",
|
|
42
|
+
"items": {"type": "string"}
|
|
43
|
+
},
|
|
44
|
+
"insertMethod": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "How the snippet is inserted into the page.",
|
|
47
|
+
"enum": ["auto", "shortcode"],
|
|
48
|
+
"default": "auto"
|
|
49
|
+
},
|
|
50
|
+
"priority": {
|
|
51
|
+
"type": "integer",
|
|
52
|
+
"description": "Execution priority. Lower runs earlier.",
|
|
53
|
+
"default": 10
|
|
54
|
+
},
|
|
55
|
+
"shortcodeAttributes": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"description": "Attribute names accepted by the snippet's shortcode, used when insertMethod is \"shortcode\".",
|
|
58
|
+
"items": {"type": "string"}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|