@lightward/mechanic-cli 0.1.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/LICENSE +21 -0
- package/README.md +424 -0
- package/bin/mechanic.js +5 -0
- package/dist/auth.d.ts +10 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +104 -0
- package/dist/base-command.d.ts +20 -0
- package/dist/base-command.d.ts.map +1 -0
- package/dist/base-command.js +82 -0
- package/dist/client.d.ts +40 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +172 -0
- package/dist/commands/auth/login.d.ts +10 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +36 -0
- package/dist/commands/auth/logout.d.ts +6 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +10 -0
- package/dist/commands/doctor.d.ts +7 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +106 -0
- package/dist/commands/github/init.d.ts +10 -0
- package/dist/commands/github/init.d.ts.map +1 -0
- package/dist/commands/github/init.js +50 -0
- package/dist/commands/help.d.ts +7 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +10 -0
- package/dist/commands/init.d.ts +13 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +72 -0
- package/dist/commands/shop/status.d.ts +10 -0
- package/dist/commands/shop/status.d.ts.map +1 -0
- package/dist/commands/shop/status.js +138 -0
- package/dist/commands/tasks/bundle.d.ts +16 -0
- package/dist/commands/tasks/bundle.d.ts.map +1 -0
- package/dist/commands/tasks/bundle.js +83 -0
- package/dist/commands/tasks/diff.d.ts +16 -0
- package/dist/commands/tasks/diff.d.ts.map +1 -0
- package/dist/commands/tasks/diff.js +124 -0
- package/dist/commands/tasks/list.d.ts +11 -0
- package/dist/commands/tasks/list.d.ts.map +1 -0
- package/dist/commands/tasks/list.js +57 -0
- package/dist/commands/tasks/open.d.ts +13 -0
- package/dist/commands/tasks/open.d.ts.map +1 -0
- package/dist/commands/tasks/open.js +64 -0
- package/dist/commands/tasks/preview.d.ts +45 -0
- package/dist/commands/tasks/preview.d.ts.map +1 -0
- package/dist/commands/tasks/preview.js +373 -0
- package/dist/commands/tasks/publish.d.ts +16 -0
- package/dist/commands/tasks/publish.d.ts.map +1 -0
- package/dist/commands/tasks/publish.js +16 -0
- package/dist/commands/tasks/pull.d.ts +14 -0
- package/dist/commands/tasks/pull.d.ts.map +1 -0
- package/dist/commands/tasks/pull.js +96 -0
- package/dist/commands/tasks/push.d.ts +60 -0
- package/dist/commands/tasks/push.d.ts.map +1 -0
- package/dist/commands/tasks/push.js +370 -0
- package/dist/commands/tasks/status.d.ts +30 -0
- package/dist/commands/tasks/status.d.ts.map +1 -0
- package/dist/commands/tasks/status.js +183 -0
- package/dist/commands/tasks/unbundle.d.ts +16 -0
- package/dist/commands/tasks/unbundle.d.ts.map +1 -0
- package/dist/commands/tasks/unbundle.js +84 -0
- package/dist/commands/tasks/validate.d.ts +15 -0
- package/dist/commands/tasks/validate.d.ts.map +1 -0
- package/dist/commands/tasks/validate.js +78 -0
- package/dist/config.d.ts +15 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +227 -0
- package/dist/errors.d.ts +10 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +18 -0
- package/dist/fs.d.ts +10 -0
- package/dist/fs.d.ts.map +1 -0
- package/dist/fs.js +51 -0
- package/dist/github-workflows.d.ts +6 -0
- package/dist/github-workflows.d.ts.map +1 -0
- package/dist/github-workflows.js +293 -0
- package/dist/hash.d.ts +2 -0
- package/dist/hash.d.ts.map +1 -0
- package/dist/hash.js +5 -0
- package/dist/json.d.ts +4 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +30 -0
- package/dist/tasks.d.ts +48 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +546 -0
- package/dist/types.d.ts +144 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +80 -0
- package/schemas/mechanic.schema.json +13 -0
- package/schemas/task-config.schema.json +23 -0
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lightward/mechanic-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Develop, preview, diff, and publish Mechanic Shopify automation tasks from local files",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"mechanic",
|
|
8
|
+
"shopify",
|
|
9
|
+
"automation",
|
|
10
|
+
"cli",
|
|
11
|
+
"liquid",
|
|
12
|
+
"tasks",
|
|
13
|
+
"shopify-automation",
|
|
14
|
+
"shopify-liquid",
|
|
15
|
+
"workflow-automation",
|
|
16
|
+
"mechanic-tasks",
|
|
17
|
+
"shopify-apps"
|
|
18
|
+
],
|
|
19
|
+
"author": "Lightward",
|
|
20
|
+
"homepage": "https://learn.mechanic.dev/platform/mechanic-cli",
|
|
21
|
+
"bin": {
|
|
22
|
+
"mechanic": "./bin/mechanic.js"
|
|
23
|
+
},
|
|
24
|
+
"oclif": {
|
|
25
|
+
"bin": "mechanic",
|
|
26
|
+
"commands": "./dist/commands",
|
|
27
|
+
"dirname": "mechanic-cli",
|
|
28
|
+
"theme": {
|
|
29
|
+
"bin": "cyan",
|
|
30
|
+
"command": "cyan",
|
|
31
|
+
"commandSummary": "white",
|
|
32
|
+
"dollarSign": "dim",
|
|
33
|
+
"flag": "cyan",
|
|
34
|
+
"sectionHeader": "magentaBright",
|
|
35
|
+
"topic": "cyan"
|
|
36
|
+
},
|
|
37
|
+
"topicSeparator": " ",
|
|
38
|
+
"topics": {
|
|
39
|
+
"auth": {
|
|
40
|
+
"description": "Manage the stored API token for this project."
|
|
41
|
+
},
|
|
42
|
+
"github": {
|
|
43
|
+
"description": "Generate GitHub Actions workflows for Mechanic task updates."
|
|
44
|
+
},
|
|
45
|
+
"shop": {
|
|
46
|
+
"description": "Inspect this shop's Mechanic queue and backlog."
|
|
47
|
+
},
|
|
48
|
+
"tasks": {
|
|
49
|
+
"description": "List, pull, edit, diff, and publish Mechanic tasks."
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"files": [
|
|
54
|
+
"bin",
|
|
55
|
+
"dist",
|
|
56
|
+
"schemas",
|
|
57
|
+
"README.md"
|
|
58
|
+
],
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "tsc -p tsconfig.json",
|
|
61
|
+
"test": "npm run build && node --import ./test/v1/no-color.mjs --test test/v1/*.test.mjs",
|
|
62
|
+
"prepack": "npm run build",
|
|
63
|
+
"prepare": "npm run build"
|
|
64
|
+
},
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=22"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public"
|
|
70
|
+
},
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@oclif/core": "^4.5.6",
|
|
73
|
+
"terminal-link": "^5.0.0"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@types/node": "^22.19.19",
|
|
77
|
+
"typescript": "^5.8.3"
|
|
78
|
+
},
|
|
79
|
+
"license": "MIT"
|
|
80
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Mechanic CLI project config",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["shop_domain", "api_base_url", "tasks_dir"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"shop_domain": { "type": "string", "minLength": 1 },
|
|
8
|
+
"api_base_url": { "type": "string", "format": "uri" },
|
|
9
|
+
"app_url": { "type": "string", "format": "uri" },
|
|
10
|
+
"tasks_dir": { "type": "string", "minLength": 1 }
|
|
11
|
+
},
|
|
12
|
+
"additionalProperties": false
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Mechanic task config",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["name"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": { "type": "string", "minLength": 1 },
|
|
8
|
+
"enabled": { "type": "boolean" },
|
|
9
|
+
"shopify_api_version": { "type": "string" },
|
|
10
|
+
"perform_action_runs_in_sequence": { "type": "boolean" },
|
|
11
|
+
"halt_action_run_sequence_on_error": { "type": "boolean" },
|
|
12
|
+
"options": { "type": "object" },
|
|
13
|
+
"preview_event_definitions": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": { "type": "object" }
|
|
16
|
+
},
|
|
17
|
+
"tags": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": { "type": "string" }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": true
|
|
23
|
+
}
|