@devpad/cli 2.4.1 → 2.4.3

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 (2) hide show
  1. package/dist/index.js +73 -17
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -15824,7 +15824,7 @@ var require_mime = __commonJS(function(exports, module) {
15824
15824
  module.exports = new Mime(require_standard(), require_other());
15825
15825
  });
15826
15826
 
15827
- // ../api/dist/chunk-HWPYBI52.js
15827
+ // ../api/dist/chunk-T36ENKOA.js
15828
15828
  init_drizzle_orm();
15829
15829
  init_sqlite_core();
15830
15830
  init_zod();
@@ -16862,6 +16862,7 @@ var upsert_hook = exports_external.object({
16862
16862
  trigger: hook_trigger,
16863
16863
  action: hook_action_input
16864
16864
  });
16865
+ var toggle_hook_enabled = exports_external.object({ enabled: exports_external.boolean() });
16865
16866
 
16866
16867
  // ../api/dist/chunk-5L3AUVMM.js
16867
16868
  init_dist();
@@ -17530,6 +17531,9 @@ var ApiClient2 = class {
17530
17531
  this.milestones = {
17531
17532
  list: () => wrap(() => this.clients.milestones.get("/milestones")),
17532
17533
  getByProject: (project_id) => wrap(() => this.clients.milestones.get(`/projects/${project_id}/milestones`)),
17534
+ lens: (project_id, depth) => wrap(() => this.clients.milestones.get(`/projects/${project_id}/milestones/lens`, {
17535
+ query: depth ? { depth: String(depth) } : {}
17536
+ })),
17533
17537
  find: (id2) => wrap(async () => {
17534
17538
  try {
17535
17539
  return await this.clients.milestones.get(`/milestones/${id2}`);
@@ -17565,6 +17569,7 @@ var ApiClient2 = class {
17565
17569
  list: (project_id) => wrap(() => this.clients.hooks.get("/hooks", { query: { project_id } })),
17566
17570
  upsert: (data) => wrap(() => data.id ? this.clients.hooks.patch(`/hooks/${data.id}`, { body: data }) : this.clients.hooks.post("/hooks", { body: data })),
17567
17571
  delete: (id2) => wrap(() => this.clients.hooks.delete(`/hooks/${id2}`)),
17572
+ setEnabled: (id2, enabled) => wrap(() => this.clients.hooks.patch(`/hooks/${id2}/enabled`, { body: { enabled } })),
17568
17573
  deliveries: (id2, status) => wrap(() => this.clients.hooks.get(`/hooks/${id2}/deliveries`, status ? { query: { status } } : {}))
17569
17574
  };
17570
17575
  this.goals = {
@@ -17650,10 +17655,11 @@ var ApiClient2 = class {
17650
17655
  return this.clients.tasks.get("/tasks/ready", Object.keys(query).length > 0 ? { query } : {});
17651
17656
  }),
17652
17657
  tree: (id2, depth) => wrap(() => this.clients.tasks.get(`/tasks/${id2}/tree`, depth ? { query: { depth: String(depth) } } : {})),
17653
- near: (id2) => wrap(() => this.clients.tasks.get(`/tasks/${id2}/near`)),
17658
+ near: (id2, depth) => wrap(() => this.clients.tasks.get(`/tasks/${id2}/near`, depth ? { query: { depth: String(depth) } } : {})),
17654
17659
  ancestors: (id2) => wrap(() => this.clients.tasks.get(`/tasks/${id2}/ancestors`)),
17655
17660
  claim: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/claim`, { body: data })),
17656
17661
  done: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/done`, { body: data })),
17662
+ reopen: (id2) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/reopen`)),
17657
17663
  advanceStage: (id2, data) => wrap(() => this.clients.tasks.post(`/tasks/${id2}/stage`, { body: data })),
17658
17664
  link: (data) => wrap(() => this.clients.tasks.post("/tasks/link", { body: data })),
17659
17665
  unlink: (link_id) => wrap(() => this.clients.tasks.delete(`/tasks/link/${link_id}`)),
@@ -17672,6 +17678,10 @@ var ApiClient2 = class {
17672
17678
  push: (data) => wrap(() => this.clients.docs.post("/docs", { body: data })),
17673
17679
  pull: (id2, version2) => wrap(() => this.clients.docs.get(`/docs/${id2}`, version2 ? { query: { version: version2 } } : {})),
17674
17680
  versions: (id2) => wrap(() => this.clients.docs.get(`/docs/${id2}/versions`)),
17681
+ renderUrl: (id2, version2) => {
17682
+ const query = version2 ? `?version=${encodeURIComponent(version2)}` : "";
17683
+ return `${this.clients.docs.url()}/docs/${id2}/render${query}`;
17684
+ },
17675
17685
  createThread: (document_id, data) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads`, { body: data })),
17676
17686
  replyThread: (document_id, thread_id, body) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/reply`, { body: { body } })),
17677
17687
  resolveThread: (document_id, thread_id) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/resolve`, {})),
@@ -17695,6 +17705,7 @@ var ApiClient2 = class {
17695
17705
  this.signoffs = {
17696
17706
  request: (data) => wrap(() => this.clients.signoffs.post("/signoffs", { body: data })),
17697
17707
  find: (id2) => wrap(() => this.clients.signoffs.get(`/signoffs/${id2}`)),
17708
+ findPending: (filters) => wrap(() => this.clients.signoffs.get("/signoffs", { query: filters })),
17698
17709
  decide: (id2, data) => wrap(() => this.clients.signoffs.post(`/signoffs/${id2}/decide`, { body: data }))
17699
17710
  };
17700
17711
  this.reviews = {
@@ -17845,7 +17856,8 @@ var ApiClient2 = class {
17845
17856
  })
17846
17857
  };
17847
17858
  this.admin = {
17848
- verifyFold: () => wrap(() => this.clients.admin.get("/admin/verify-fold"))
17859
+ verifyFold: () => wrap(() => this.clients.admin.get("/admin/verify-fold")),
17860
+ reconcileDocsCss: () => wrap(() => this.clients.admin.post("/admin/reconcile-docs-css"))
17849
17861
  };
17850
17862
  this.user = {
17851
17863
  me: () => wrap(() => this.clients.auth.get("/user/me")),
@@ -18342,6 +18354,12 @@ var tools = {
18342
18354
  inputSchema: exports_external.object({}),
18343
18355
  execute: async (client) => unwrap2(await client.admin.verifyFold())
18344
18356
  }),
18357
+ devpad_admin_reconcile_docs_css: define_tool({
18358
+ name: "devpad_admin_reconcile_docs_css",
18359
+ description: "Re-scrub CSS exfil vectors (@import, url()) out of every already-stored doc's <style> blocks for the authenticated account's own projects",
18360
+ inputSchema: exports_external.object({}),
18361
+ execute: async (client) => unwrap2(await client.admin.reconcileDocsCss())
18362
+ }),
18345
18363
  devpad_projects_delete: define_tool({
18346
18364
  name: "devpad_projects_delete",
18347
18365
  description: "Delete a project",
@@ -20156,6 +20174,9 @@ var ApiClient22 = class {
20156
20174
  this.milestones = {
20157
20175
  list: () => wrap2(() => this.clients.milestones.get("/milestones")),
20158
20176
  getByProject: (project_id) => wrap2(() => this.clients.milestones.get(`/projects/${project_id}/milestones`)),
20177
+ lens: (project_id, depth) => wrap2(() => this.clients.milestones.get(`/projects/${project_id}/milestones/lens`, {
20178
+ query: depth ? { depth: String(depth) } : {}
20179
+ })),
20159
20180
  find: (id2) => wrap2(async () => {
20160
20181
  try {
20161
20182
  return await this.clients.milestones.get(`/milestones/${id2}`);
@@ -20191,6 +20212,7 @@ var ApiClient22 = class {
20191
20212
  list: (project_id) => wrap2(() => this.clients.hooks.get("/hooks", { query: { project_id } })),
20192
20213
  upsert: (data) => wrap2(() => data.id ? this.clients.hooks.patch(`/hooks/${data.id}`, { body: data }) : this.clients.hooks.post("/hooks", { body: data })),
20193
20214
  delete: (id2) => wrap2(() => this.clients.hooks.delete(`/hooks/${id2}`)),
20215
+ setEnabled: (id2, enabled) => wrap2(() => this.clients.hooks.patch(`/hooks/${id2}/enabled`, { body: { enabled } })),
20194
20216
  deliveries: (id2, status) => wrap2(() => this.clients.hooks.get(`/hooks/${id2}/deliveries`, status ? { query: { status } } : {}))
20195
20217
  };
20196
20218
  this.goals = {
@@ -20276,10 +20298,11 @@ var ApiClient22 = class {
20276
20298
  return this.clients.tasks.get("/tasks/ready", Object.keys(query).length > 0 ? { query } : {});
20277
20299
  }),
20278
20300
  tree: (id2, depth) => wrap2(() => this.clients.tasks.get(`/tasks/${id2}/tree`, depth ? { query: { depth: String(depth) } } : {})),
20279
- near: (id2) => wrap2(() => this.clients.tasks.get(`/tasks/${id2}/near`)),
20301
+ near: (id2, depth) => wrap2(() => this.clients.tasks.get(`/tasks/${id2}/near`, depth ? { query: { depth: String(depth) } } : {})),
20280
20302
  ancestors: (id2) => wrap2(() => this.clients.tasks.get(`/tasks/${id2}/ancestors`)),
20281
20303
  claim: (id2, data) => wrap2(() => this.clients.tasks.post(`/tasks/${id2}/claim`, { body: data })),
20282
20304
  done: (id2, data) => wrap2(() => this.clients.tasks.post(`/tasks/${id2}/done`, { body: data })),
20305
+ reopen: (id2) => wrap2(() => this.clients.tasks.post(`/tasks/${id2}/reopen`)),
20283
20306
  advanceStage: (id2, data) => wrap2(() => this.clients.tasks.post(`/tasks/${id2}/stage`, { body: data })),
20284
20307
  link: (data) => wrap2(() => this.clients.tasks.post("/tasks/link", { body: data })),
20285
20308
  unlink: (link_id) => wrap2(() => this.clients.tasks.delete(`/tasks/link/${link_id}`)),
@@ -20298,6 +20321,10 @@ var ApiClient22 = class {
20298
20321
  push: (data) => wrap2(() => this.clients.docs.post("/docs", { body: data })),
20299
20322
  pull: (id2, version2) => wrap2(() => this.clients.docs.get(`/docs/${id2}`, version2 ? { query: { version: version2 } } : {})),
20300
20323
  versions: (id2) => wrap2(() => this.clients.docs.get(`/docs/${id2}/versions`)),
20324
+ renderUrl: (id2, version2) => {
20325
+ const query = version2 ? `?version=${encodeURIComponent(version2)}` : "";
20326
+ return `${this.clients.docs.url()}/docs/${id2}/render${query}`;
20327
+ },
20301
20328
  createThread: (document_id, data) => wrap2(() => this.clients.docs.post(`/docs/${document_id}/threads`, { body: data })),
20302
20329
  replyThread: (document_id, thread_id, body) => wrap2(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/reply`, { body: { body } })),
20303
20330
  resolveThread: (document_id, thread_id) => wrap2(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/resolve`, {})),
@@ -20321,6 +20348,7 @@ var ApiClient22 = class {
20321
20348
  this.signoffs = {
20322
20349
  request: (data) => wrap2(() => this.clients.signoffs.post("/signoffs", { body: data })),
20323
20350
  find: (id2) => wrap2(() => this.clients.signoffs.get(`/signoffs/${id2}`)),
20351
+ findPending: (filters) => wrap2(() => this.clients.signoffs.get("/signoffs", { query: filters })),
20324
20352
  decide: (id2, data) => wrap2(() => this.clients.signoffs.post(`/signoffs/${id2}/decide`, { body: data }))
20325
20353
  };
20326
20354
  this.reviews = {
@@ -20471,7 +20499,8 @@ var ApiClient22 = class {
20471
20499
  })
20472
20500
  };
20473
20501
  this.admin = {
20474
- verifyFold: () => wrap2(() => this.clients.admin.get("/admin/verify-fold"))
20502
+ verifyFold: () => wrap2(() => this.clients.admin.get("/admin/verify-fold")),
20503
+ reconcileDocsCss: () => wrap2(() => this.clients.admin.post("/admin/reconcile-docs-css"))
20475
20504
  };
20476
20505
  this.user = {
20477
20506
  me: () => wrap2(() => this.clients.auth.get("/user/me")),
@@ -20968,6 +20997,12 @@ var tools2 = {
20968
20997
  inputSchema: exports_external.object({}),
20969
20998
  execute: async (client) => unwrap3(await client.admin.verifyFold())
20970
20999
  }),
21000
+ devpad_admin_reconcile_docs_css: define_tool2({
21001
+ name: "devpad_admin_reconcile_docs_css",
21002
+ description: "Re-scrub CSS exfil vectors (@import, url()) out of every already-stored doc's <style> blocks for the authenticated account's own projects",
21003
+ inputSchema: exports_external.object({}),
21004
+ execute: async (client) => unwrap3(await client.admin.reconcileDocsCss())
21005
+ }),
20971
21006
  devpad_projects_delete: define_tool2({
20972
21007
  name: "devpad_projects_delete",
20973
21008
  description: "Delete a project",
@@ -22880,6 +22915,15 @@ function register_admin_commands(program2, get_client) {
22880
22915
  await print_json(result);
22881
22916
  process.exit(1);
22882
22917
  });
22918
+ admin.command("reconcile-docs-css").description("Re-scrub CSS exfil vectors (@import, url()) out of already-stored docs' <style> blocks").action(async () => {
22919
+ const spinner = make_spinner("Reconciling stored docs...").start();
22920
+ const tool = getTool2("devpad_admin_reconcile_docs_css");
22921
+ if (!tool)
22922
+ return fail_with(spinner, "Tool not found: devpad_admin_reconcile_docs_css");
22923
+ const result = await tool.execute(get_client(), {});
22924
+ spinner.succeed(`Scanned ${String(result.scanned)} doc(s), reconciled ${String(result.reconciled.length)}`);
22925
+ await print_json(result);
22926
+ });
22883
22927
  }
22884
22928
 
22885
22929
  // src/commands/pipelines.ts
@@ -25931,6 +25975,7 @@ var upsert_hook2 = exports_external.object({
25931
25975
  trigger: hook_trigger2,
25932
25976
  action: hook_action_input2
25933
25977
  });
25978
+ var toggle_hook_enabled2 = exports_external.object({ enabled: exports_external.boolean() });
25934
25979
 
25935
25980
  // src/graph-commands.ts
25936
25981
  async function print_json2(data) {
@@ -26061,8 +26106,9 @@ function normalize_declarations(files) {
26061
26106
  }
26062
26107
  // ../core/src/services/docs/markers.ts
26063
26108
  var MARKER_COMMENT_RE = new RegExp(`<!--\\s*devpad:thread:(?:begin\\s+\\S+\\s+[A-Za-z0-9+/=]+|end\\s+\\S+)\\s*-->`, "g");
26064
- // ../core/src/services/docs/reviews.ts
26109
+ // ../core/src/services/docs/reconcile.ts
26065
26110
  init_dist();
26111
+
26066
26112
  // ../../node_modules/hast-util-sanitize/lib/schema.js
26067
26113
  var aria = ["ariaDescribedBy", "ariaLabel", "ariaLabelledBy"];
26068
26114
  var defaultSchema = {
@@ -26237,13 +26283,19 @@ var defaultSchema = {
26237
26283
  ]
26238
26284
  };
26239
26285
  // ../core/src/services/docs/sanitize.ts
26286
+ var permit_any_class_name = (defs) => defs.map((entry) => Array.isArray(entry) && entry[0] === "className" ? "className" : entry);
26287
+ var attributes = Object.fromEntries(Object.entries(defaultSchema.attributes ?? {}).map(([tag3, defs]) => [tag3, permit_any_class_name(defs)]));
26288
+ attributes["*"] = [...attributes["*"] ?? [], "className"];
26240
26289
  var schema = {
26241
26290
  ...defaultSchema,
26242
26291
  allowComments: false,
26243
26292
  allowDoctypes: false,
26244
26293
  tagNames: [...defaultSchema.tagNames ?? [], "style"],
26294
+ attributes,
26245
26295
  strip: [...defaultSchema.strip ?? [], "iframe", "object", "embed", "form"]
26246
26296
  };
26297
+ var CLOBBER_PREFIX = defaultSchema.clobberPrefix ?? "user-content-";
26298
+ var FRAGMENT_HREF_RE = new RegExp(`(href=["'])#(?!${CLOBBER_PREFIX})`, "gi");
26247
26299
  var TEXT_ESCAPES = {
26248
26300
  "&": "&amp;",
26249
26301
  "<": "&lt;",
@@ -26254,33 +26306,37 @@ var TEXT_ESCAPES = {
26254
26306
  function sanitize_text(text3) {
26255
26307
  return text3.replace(/[&<>"']/g, (ch) => TEXT_ESCAPES[ch] ?? ch);
26256
26308
  }
26257
- // ../core/src/services/docs/signoff.ts
26309
+
26310
+ // ../core/src/services/docs/store.ts
26258
26311
  init_dist();
26312
+ init_zod();
26259
26313
 
26260
26314
  // ../core/src/services/errors.ts
26261
26315
  init_dist();
26262
26316
 
26263
26317
  // ../schema/dist/errors.js
26264
26318
  init_dist();
26265
- // ../core/src/services/graph/completion.ts
26266
- init_dist();
26267
-
26268
- // ../core/src/services/graph/graph.ts
26269
- init_dist();
26270
-
26271
26319
  // ../core/src/services/graph/outbox.ts
26272
26320
  init_dist();
26273
- // ../core/src/services/graph/rollup.ts
26274
- init_dist();
26275
26321
 
26276
26322
  // ../core/src/services/docs/store.ts
26277
- init_dist();
26278
- init_zod();
26279
26323
  var DocContentSchema = exports_external.object({
26280
26324
  title: exports_external.string().min(1),
26281
26325
  html: exports_external.string()
26282
26326
  });
26283
26327
  var base_definition = define_store("devpad-docs", json_codec(DocContentSchema));
26328
+ // ../core/src/services/docs/reviews.ts
26329
+ init_dist();
26330
+ // ../core/src/services/docs/signoff.ts
26331
+ init_dist();
26332
+
26333
+ // ../core/src/services/graph/completion.ts
26334
+ init_dist();
26335
+
26336
+ // ../core/src/services/graph/graph.ts
26337
+ init_dist();
26338
+ // ../core/src/services/graph/rollup.ts
26339
+ init_dist();
26284
26340
  // ../core/src/services/docs/stage.ts
26285
26341
  init_dist();
26286
26342
  // ../core/src/services/docs/threads.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/cli",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "description": "Command line interface for devpad project management",
5
5
  "keywords": [
6
6
  "cli",
@@ -50,11 +50,11 @@
50
50
  "mime": "^3.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@devpad/api": "^2.4.1",
54
- "@devpad/core": "^2.4.1",
55
- "@devpad/pipeline-fakes": "^2.4.1",
56
- "@devpad/pipeline-templates": "^2.4.1",
57
- "@devpad/schema": "^2.4.1",
53
+ "@devpad/api": "^2.4.3",
54
+ "@devpad/core": "^2.4.3",
55
+ "@devpad/pipeline-fakes": "^2.4.3",
56
+ "@devpad/pipeline-templates": "^2.4.3",
57
+ "@devpad/schema": "^2.4.3",
58
58
  "@types/node": "^20.11.24",
59
59
  "bun-types": "latest",
60
60
  "chalk": "^5.3.0",