@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.
Files changed (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +424 -0
  3. package/bin/mechanic.js +5 -0
  4. package/dist/auth.d.ts +10 -0
  5. package/dist/auth.d.ts.map +1 -0
  6. package/dist/auth.js +104 -0
  7. package/dist/base-command.d.ts +20 -0
  8. package/dist/base-command.d.ts.map +1 -0
  9. package/dist/base-command.js +82 -0
  10. package/dist/client.d.ts +40 -0
  11. package/dist/client.d.ts.map +1 -0
  12. package/dist/client.js +172 -0
  13. package/dist/commands/auth/login.d.ts +10 -0
  14. package/dist/commands/auth/login.d.ts.map +1 -0
  15. package/dist/commands/auth/login.js +36 -0
  16. package/dist/commands/auth/logout.d.ts +6 -0
  17. package/dist/commands/auth/logout.d.ts.map +1 -0
  18. package/dist/commands/auth/logout.js +10 -0
  19. package/dist/commands/doctor.d.ts +7 -0
  20. package/dist/commands/doctor.d.ts.map +1 -0
  21. package/dist/commands/doctor.js +106 -0
  22. package/dist/commands/github/init.d.ts +10 -0
  23. package/dist/commands/github/init.d.ts.map +1 -0
  24. package/dist/commands/github/init.js +50 -0
  25. package/dist/commands/help.d.ts +7 -0
  26. package/dist/commands/help.d.ts.map +1 -0
  27. package/dist/commands/help.js +10 -0
  28. package/dist/commands/init.d.ts +13 -0
  29. package/dist/commands/init.d.ts.map +1 -0
  30. package/dist/commands/init.js +72 -0
  31. package/dist/commands/shop/status.d.ts +10 -0
  32. package/dist/commands/shop/status.d.ts.map +1 -0
  33. package/dist/commands/shop/status.js +138 -0
  34. package/dist/commands/tasks/bundle.d.ts +16 -0
  35. package/dist/commands/tasks/bundle.d.ts.map +1 -0
  36. package/dist/commands/tasks/bundle.js +83 -0
  37. package/dist/commands/tasks/diff.d.ts +16 -0
  38. package/dist/commands/tasks/diff.d.ts.map +1 -0
  39. package/dist/commands/tasks/diff.js +124 -0
  40. package/dist/commands/tasks/list.d.ts +11 -0
  41. package/dist/commands/tasks/list.d.ts.map +1 -0
  42. package/dist/commands/tasks/list.js +57 -0
  43. package/dist/commands/tasks/open.d.ts +13 -0
  44. package/dist/commands/tasks/open.d.ts.map +1 -0
  45. package/dist/commands/tasks/open.js +64 -0
  46. package/dist/commands/tasks/preview.d.ts +45 -0
  47. package/dist/commands/tasks/preview.d.ts.map +1 -0
  48. package/dist/commands/tasks/preview.js +373 -0
  49. package/dist/commands/tasks/publish.d.ts +16 -0
  50. package/dist/commands/tasks/publish.d.ts.map +1 -0
  51. package/dist/commands/tasks/publish.js +16 -0
  52. package/dist/commands/tasks/pull.d.ts +14 -0
  53. package/dist/commands/tasks/pull.d.ts.map +1 -0
  54. package/dist/commands/tasks/pull.js +96 -0
  55. package/dist/commands/tasks/push.d.ts +60 -0
  56. package/dist/commands/tasks/push.d.ts.map +1 -0
  57. package/dist/commands/tasks/push.js +370 -0
  58. package/dist/commands/tasks/status.d.ts +30 -0
  59. package/dist/commands/tasks/status.d.ts.map +1 -0
  60. package/dist/commands/tasks/status.js +183 -0
  61. package/dist/commands/tasks/unbundle.d.ts +16 -0
  62. package/dist/commands/tasks/unbundle.d.ts.map +1 -0
  63. package/dist/commands/tasks/unbundle.js +84 -0
  64. package/dist/commands/tasks/validate.d.ts +15 -0
  65. package/dist/commands/tasks/validate.d.ts.map +1 -0
  66. package/dist/commands/tasks/validate.js +78 -0
  67. package/dist/config.d.ts +15 -0
  68. package/dist/config.d.ts.map +1 -0
  69. package/dist/config.js +227 -0
  70. package/dist/errors.d.ts +10 -0
  71. package/dist/errors.d.ts.map +1 -0
  72. package/dist/errors.js +18 -0
  73. package/dist/fs.d.ts +10 -0
  74. package/dist/fs.d.ts.map +1 -0
  75. package/dist/fs.js +51 -0
  76. package/dist/github-workflows.d.ts +6 -0
  77. package/dist/github-workflows.d.ts.map +1 -0
  78. package/dist/github-workflows.js +293 -0
  79. package/dist/hash.d.ts +2 -0
  80. package/dist/hash.d.ts.map +1 -0
  81. package/dist/hash.js +5 -0
  82. package/dist/json.d.ts +4 -0
  83. package/dist/json.d.ts.map +1 -0
  84. package/dist/json.js +30 -0
  85. package/dist/tasks.d.ts +48 -0
  86. package/dist/tasks.d.ts.map +1 -0
  87. package/dist/tasks.js +546 -0
  88. package/dist/types.d.ts +144 -0
  89. package/dist/types.d.ts.map +1 -0
  90. package/dist/types.js +1 -0
  91. package/package.json +80 -0
  92. package/schemas/mechanic.schema.json +13 -0
  93. 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
+ }