@lightward/mechanic-cli 0.1.9 → 0.1.11
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 +14 -0
- package/dist/client.d.ts +2 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -0
- package/dist/commands/shop/deprecations.d.ts +20 -0
- package/dist/commands/shop/deprecations.d.ts.map +1 -0
- package/dist/commands/shop/deprecations.js +95 -0
- package/dist/commands/tasks/list.d.ts.map +1 -1
- package/dist/commands/tasks/list.js +12 -1
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -126,6 +126,7 @@ mechanic auth login [--token <token>]
|
|
|
126
126
|
mechanic auth logout
|
|
127
127
|
mechanic github init [--force]
|
|
128
128
|
mechanic shop status [--json]
|
|
129
|
+
mechanic shop deprecations [task] [--json]
|
|
129
130
|
mechanic tasks list [--verbose] [--json]
|
|
130
131
|
mechanic tasks new <name> [--force] [--json]
|
|
131
132
|
mechanic tasks open <task>
|
|
@@ -191,6 +192,19 @@ unless you pass `--force`. It does not create anything in Mechanic until you run
|
|
|
191
192
|
running runs, waiting runs, queue lag, and the largest backlog groups by task,
|
|
192
193
|
action, and event topic.
|
|
193
194
|
|
|
195
|
+
`shop deprecations` shows unresolved Shopify API deprecations reported by tasks
|
|
196
|
+
in the configured shop. Pass a task slug, task file, helper directory, or linked
|
|
197
|
+
remote task ID to focus on one task:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
mechanic shop deprecations
|
|
201
|
+
mechanic shop deprecations order-tagger
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The output includes the task's configured Shopify API version and the Shopify API
|
|
205
|
+
version seen in the deprecated request. Use `--json` for monitoring scripts,
|
|
206
|
+
agents, or dashboards.
|
|
207
|
+
|
|
194
208
|
`tasks status` shows whether local task JSON files are linked, ready to publish,
|
|
195
209
|
and in sync with their remote Mechanic tasks. Use `--local` when you only want
|
|
196
210
|
the fast offline check for JSON validity, link state, and helper-folder drift.
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonObject, ShopStatusResponse, TaskEnvelope, TaskListResponse, TaskPreviewResponse } from "./types.js";
|
|
1
|
+
import type { JsonObject, ShopDeprecationsResponse, ShopStatusResponse, TaskEnvelope, TaskListResponse, TaskPreviewResponse } from "./types.js";
|
|
2
2
|
export declare const USER_AGENT: string;
|
|
3
3
|
type RequestOptions = {
|
|
4
4
|
method?: string;
|
|
@@ -27,6 +27,7 @@ export declare class MechanicClient {
|
|
|
27
27
|
request<T>(pathname: string, options?: RequestOptions): Promise<T>;
|
|
28
28
|
verifyAuth(): Promise<AuthVerification>;
|
|
29
29
|
getShopStatus(): Promise<ShopStatusResponse>;
|
|
30
|
+
getShopDeprecations(taskId?: string): Promise<ShopDeprecationsResponse>;
|
|
30
31
|
listTasks(): Promise<TaskListResponse>;
|
|
31
32
|
getTask(id: string): Promise<TaskEnvelope>;
|
|
32
33
|
previewTask(task: JsonObject, id?: string): Promise<TaskPreviewResponse>;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,UAAU,EACV,wBAAwB,EACxB,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAKpB,eAAO,MAAM,UAAU,QAAkD,CAAC;AAE1E,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,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AAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAQ5E,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC;CAM3H"}
|
package/dist/client.js
CHANGED
|
@@ -141,6 +141,10 @@ export class MechanicClient {
|
|
|
141
141
|
getShopStatus() {
|
|
142
142
|
return this.request("/v1/shop/status");
|
|
143
143
|
}
|
|
144
|
+
getShopDeprecations(taskId) {
|
|
145
|
+
const search = taskId ? `?${new URLSearchParams({ task_id: taskId }).toString()}` : "";
|
|
146
|
+
return this.request(`/v1/shop/deprecations${search}`);
|
|
147
|
+
}
|
|
144
148
|
listTasks() {
|
|
145
149
|
return this.request("/v1/tasks");
|
|
146
150
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from "../../base-command.js";
|
|
2
|
+
import type { Project, ShopDeprecationsResponse } from "../../types.js";
|
|
3
|
+
type ShopDeprecation = ShopDeprecationsResponse["deprecations"][number];
|
|
4
|
+
export default class ShopDeprecations extends BaseCommand {
|
|
5
|
+
static summary: string;
|
|
6
|
+
static description: string;
|
|
7
|
+
static args: {
|
|
8
|
+
task: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
static flags: {
|
|
11
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
taskIdForSelector(project: Project, input: string): Promise<string>;
|
|
15
|
+
deprecationsTable(response: ShopDeprecationsResponse): string[][];
|
|
16
|
+
deprecationCountSummary(response: ShopDeprecationsResponse): string;
|
|
17
|
+
requestSummary(deprecation: ShopDeprecation): string;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=deprecations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecations.d.ts","sourceRoot":"","sources":["../../../src/commands/shop/deprecations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,KAAK,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAExE,KAAK,eAAe,GAAG,wBAAwB,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAUxE,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,OAAgB,OAAO,SAA6D;IACpF,OAAgB,WAAW,SAAqH;IAEhJ,OAAgB,IAAI;;MAKlB;IAEF,OAAgB,KAAK;;MAInB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAyCpB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUzE,iBAAiB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,EAAE,EAAE;IAcjE,uBAAuB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM;IAOnE,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,MAAM;CAcrD"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Args, Flags } from "@oclif/core";
|
|
2
|
+
import { BaseCommand } from "../../base-command.js";
|
|
3
|
+
import { CliError } from "../../errors.js";
|
|
4
|
+
import { resolveTaskSelector } from "../../tasks.js";
|
|
5
|
+
function formatCount(value) {
|
|
6
|
+
return typeof value === "number" ? value.toLocaleString() : "--";
|
|
7
|
+
}
|
|
8
|
+
function formatValue(value) {
|
|
9
|
+
return value && value.trim() ? value : "--";
|
|
10
|
+
}
|
|
11
|
+
export default class ShopDeprecations extends BaseCommand {
|
|
12
|
+
static summary = "Show unresolved Shopify API deprecations for this shop.";
|
|
13
|
+
static description = "Show unresolved Shopify API deprecations reported by this shop's tasks, optionally filtered to one linked task.";
|
|
14
|
+
static args = {
|
|
15
|
+
task: Args.string({
|
|
16
|
+
description: "Optional task selector, linked task ID, local slug, task JSON file, or helper directory.",
|
|
17
|
+
required: false,
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
static flags = {
|
|
21
|
+
json: Flags.boolean({
|
|
22
|
+
description: "Print deprecations as JSON for agents, scripts, or editor integrations.",
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
async run() {
|
|
26
|
+
const { args, flags } = await this.parse(ShopDeprecations);
|
|
27
|
+
const project = await this.loadProject();
|
|
28
|
+
const client = await this.verifiedClientForProject(project);
|
|
29
|
+
const taskId = args.task ? await this.taskIdForSelector(project, args.task) : undefined;
|
|
30
|
+
const response = await client.getShopDeprecations(taskId);
|
|
31
|
+
if (flags.json) {
|
|
32
|
+
this.outputJson(response);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this.log(`${this.accent("Shop")} ${response.shop.shopify_domain}`);
|
|
36
|
+
if (taskId) {
|
|
37
|
+
this.log(`${this.accent("Task")} ${this.taskId(project, taskId)}`);
|
|
38
|
+
}
|
|
39
|
+
if (response.deprecations.length === 0) {
|
|
40
|
+
this.log("");
|
|
41
|
+
this.log(this.success("No unresolved Shopify API deprecations."));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.log(`${this.accent("Deprecations")} ${this.deprecationCountSummary(response)}`);
|
|
45
|
+
if (response.truncated) {
|
|
46
|
+
const limit = typeof response.limit === "number" ? response.limit.toLocaleString() : response.deprecations.length.toLocaleString();
|
|
47
|
+
this.log(this.color("yellow", `Showing the first ${limit} unresolved deprecations. Filter with "mechanic shop deprecations <task>" for one task.`));
|
|
48
|
+
}
|
|
49
|
+
this.log("");
|
|
50
|
+
this.table(this.deprecationsTable(response));
|
|
51
|
+
this.log("");
|
|
52
|
+
this.log(this.accent("Details"));
|
|
53
|
+
response.deprecations.forEach((deprecation, index) => {
|
|
54
|
+
this.log(`${index + 1}. ${this.taskName(deprecation.task_name || deprecation.task_id)}`);
|
|
55
|
+
this.log(` ${this.muted("Request")} ${this.requestSummary(deprecation)}`);
|
|
56
|
+
this.log(` ${this.muted("Reason")} ${formatValue(deprecation.reason)}`);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async taskIdForSelector(project, input) {
|
|
60
|
+
const selector = await resolveTaskSelector(project, input, { allowHelperDir: true, allowRemoteId: true });
|
|
61
|
+
if (!selector.remoteId) {
|
|
62
|
+
throw new CliError(`${input} is not linked to a remote Mechanic task. Pull or publish it first.`, 2);
|
|
63
|
+
}
|
|
64
|
+
return selector.remoteId;
|
|
65
|
+
}
|
|
66
|
+
deprecationsTable(response) {
|
|
67
|
+
return [
|
|
68
|
+
["#", "Task", "Task API", "Request API", "Last seen", "Count"],
|
|
69
|
+
...response.deprecations.map((deprecation, index) => [
|
|
70
|
+
String(index + 1),
|
|
71
|
+
this.taskName(deprecation.task_name || deprecation.task_id),
|
|
72
|
+
formatValue(deprecation.task_shopify_api_version),
|
|
73
|
+
formatValue(deprecation.shopify_api_version),
|
|
74
|
+
this.muted(formatValue(deprecation.last_occurrence_at)),
|
|
75
|
+
formatCount(deprecation.occurrences_count),
|
|
76
|
+
]),
|
|
77
|
+
];
|
|
78
|
+
}
|
|
79
|
+
deprecationCountSummary(response) {
|
|
80
|
+
const shown = response.deprecations.length;
|
|
81
|
+
const total = typeof response.total_count === "number" ? response.total_count : shown;
|
|
82
|
+
return `${shown.toLocaleString()}/${total.toLocaleString()} shown`;
|
|
83
|
+
}
|
|
84
|
+
requestSummary(deprecation) {
|
|
85
|
+
const method = formatValue(deprecation.request_method);
|
|
86
|
+
const path = formatValue(deprecation.request_path);
|
|
87
|
+
if (method === "--") {
|
|
88
|
+
return path;
|
|
89
|
+
}
|
|
90
|
+
if (path === "--") {
|
|
91
|
+
return method;
|
|
92
|
+
}
|
|
93
|
+
return `${method} ${path}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/tasks/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/tasks/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAcpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;IAChD,OAAgB,OAAO,SAAkD;IACzE,OAAgB,WAAW,SAAsF;IAEjH,OAAgB,KAAK;;;MAQnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoD3B"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { Flags } from "@oclif/core";
|
|
2
2
|
import { BaseCommand } from "../../base-command.js";
|
|
3
3
|
import { slugForRemoteId } from "../../config.js";
|
|
4
|
+
function taskShopifyApiVersion(envelope) {
|
|
5
|
+
if (typeof envelope.shopify_api_version === "string" && envelope.shopify_api_version.trim()) {
|
|
6
|
+
return envelope.shopify_api_version;
|
|
7
|
+
}
|
|
8
|
+
const version = envelope.task?.shopify_api_version;
|
|
9
|
+
return typeof version === "string" && version.trim() ? version : null;
|
|
10
|
+
}
|
|
4
11
|
export default class TasksList extends BaseCommand {
|
|
5
12
|
static summary = "List remote tasks without changing anything.";
|
|
6
13
|
static description = "List remote Mechanic tasks without pulling, publishing, or changing local files.";
|
|
@@ -28,6 +35,7 @@ export default class TasksList extends BaseCommand {
|
|
|
28
35
|
id: envelope.id,
|
|
29
36
|
name: typeof envelope.task?.name === "string" ? envelope.task.name : "",
|
|
30
37
|
updated_at: envelope.updated_at || null,
|
|
38
|
+
shopify_api_version: taskShopifyApiVersion(envelope),
|
|
31
39
|
content_hash: envelope.content_hash || null,
|
|
32
40
|
linked: Boolean(link),
|
|
33
41
|
slug: slug || null,
|
|
@@ -37,13 +45,16 @@ export default class TasksList extends BaseCommand {
|
|
|
37
45
|
});
|
|
38
46
|
return;
|
|
39
47
|
}
|
|
40
|
-
const rows = flags.verbose
|
|
48
|
+
const rows = flags.verbose
|
|
49
|
+
? [["Name", "File", "API version", "Updated", "ID", "Hash"]]
|
|
50
|
+
: [["Name", "File", "API version", "Updated", "ID"]];
|
|
41
51
|
for (const envelope of response.tasks || []) {
|
|
42
52
|
const slug = slugForRemoteId(project, envelope.id);
|
|
43
53
|
const link = slug ? project.links.tasks[slug] : null;
|
|
44
54
|
const row = [
|
|
45
55
|
this.taskName(String(envelope.task?.name || "")),
|
|
46
56
|
link ? this.taskName(link.file || `${project.tasksDirName}/${slug}.json`) : this.muted("--"),
|
|
57
|
+
taskShopifyApiVersion(envelope) || this.muted("--"),
|
|
47
58
|
this.muted(envelope.updated_at || ""),
|
|
48
59
|
this.taskId(project, envelope.id),
|
|
49
60
|
];
|
package/dist/types.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export type TaskEnvelope = {
|
|
|
30
30
|
updated_at?: string;
|
|
31
31
|
content_hash: string;
|
|
32
32
|
enabled?: boolean | null;
|
|
33
|
+
shopify_api_version?: string | null;
|
|
33
34
|
task: JsonObject;
|
|
34
35
|
};
|
|
35
36
|
export type TaskListResponse = {
|
|
@@ -154,4 +155,26 @@ export type ShopStatusResponse = {
|
|
|
154
155
|
};
|
|
155
156
|
checked_at: string;
|
|
156
157
|
};
|
|
158
|
+
export type ShopDeprecationsResponse = {
|
|
159
|
+
shop: {
|
|
160
|
+
shopify_domain: string;
|
|
161
|
+
};
|
|
162
|
+
total_count?: number;
|
|
163
|
+
limit?: number;
|
|
164
|
+
truncated?: boolean;
|
|
165
|
+
deprecations: Array<{
|
|
166
|
+
id: number;
|
|
167
|
+
task_id: string;
|
|
168
|
+
task_name?: string | null;
|
|
169
|
+
task_shopify_api_version?: string | null;
|
|
170
|
+
reason: string;
|
|
171
|
+
shopify_api_version?: string | null;
|
|
172
|
+
request_method?: string | null;
|
|
173
|
+
request_path?: string | null;
|
|
174
|
+
response_code?: number | null;
|
|
175
|
+
occurrences_count?: number | null;
|
|
176
|
+
first_occurrence_at?: string | null;
|
|
177
|
+
last_occurrence_at?: string | null;
|
|
178
|
+
}>;
|
|
179
|
+
};
|
|
157
180
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,wBAAwB,EAAE,MAAM,CAAC;IACjC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAA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B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAClC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACpC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACpC,CAAC,CAAC;CACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightward/mechanic-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Develop, preview, diff, and publish Mechanic Shopify automation tasks from local files",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"description": "Generate optional GitHub Actions workflows for Mechanic task updates."
|
|
51
51
|
},
|
|
52
52
|
"shop": {
|
|
53
|
-
"description": "Inspect this shop's Mechanic queue and
|
|
53
|
+
"description": "Inspect this shop's Mechanic queue, backlog, and deprecations."
|
|
54
54
|
},
|
|
55
55
|
"tasks": {
|
|
56
56
|
"description": "List, pull, edit, diff, and publish Mechanic tasks."
|
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
"README.md"
|
|
65
65
|
],
|
|
66
66
|
"scripts": {
|
|
67
|
-
"
|
|
67
|
+
"clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
68
|
+
"build": "npm run clean && tsc -p tsconfig.json",
|
|
68
69
|
"test": "npm run build && node --import ./test/v1/no-color.mjs --test test/v1/*.test.mjs",
|
|
69
70
|
"prepack": "npm run build",
|
|
70
71
|
"prepare": "npm run build"
|