@devpad/cli 2.4.2 → 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 +69 -15
  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 = {
@@ -17673,6 +17678,10 @@ var ApiClient2 = class {
17673
17678
  push: (data) => wrap(() => this.clients.docs.post("/docs", { body: data })),
17674
17679
  pull: (id2, version2) => wrap(() => this.clients.docs.get(`/docs/${id2}`, version2 ? { query: { version: version2 } } : {})),
17675
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
+ },
17676
17685
  createThread: (document_id, data) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads`, { body: data })),
17677
17686
  replyThread: (document_id, thread_id, body) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/reply`, { body: { body } })),
17678
17687
  resolveThread: (document_id, thread_id) => wrap(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/resolve`, {})),
@@ -17696,6 +17705,7 @@ var ApiClient2 = class {
17696
17705
  this.signoffs = {
17697
17706
  request: (data) => wrap(() => this.clients.signoffs.post("/signoffs", { body: data })),
17698
17707
  find: (id2) => wrap(() => this.clients.signoffs.get(`/signoffs/${id2}`)),
17708
+ findPending: (filters) => wrap(() => this.clients.signoffs.get("/signoffs", { query: filters })),
17699
17709
  decide: (id2, data) => wrap(() => this.clients.signoffs.post(`/signoffs/${id2}/decide`, { body: data }))
17700
17710
  };
17701
17711
  this.reviews = {
@@ -17846,7 +17856,8 @@ var ApiClient2 = class {
17846
17856
  })
17847
17857
  };
17848
17858
  this.admin = {
17849
- 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"))
17850
17861
  };
17851
17862
  this.user = {
17852
17863
  me: () => wrap(() => this.clients.auth.get("/user/me")),
@@ -18343,6 +18354,12 @@ var tools = {
18343
18354
  inputSchema: exports_external.object({}),
18344
18355
  execute: async (client) => unwrap2(await client.admin.verifyFold())
18345
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
+ }),
18346
18363
  devpad_projects_delete: define_tool({
18347
18364
  name: "devpad_projects_delete",
18348
18365
  description: "Delete a project",
@@ -20157,6 +20174,9 @@ var ApiClient22 = class {
20157
20174
  this.milestones = {
20158
20175
  list: () => wrap2(() => this.clients.milestones.get("/milestones")),
20159
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
+ })),
20160
20180
  find: (id2) => wrap2(async () => {
20161
20181
  try {
20162
20182
  return await this.clients.milestones.get(`/milestones/${id2}`);
@@ -20192,6 +20212,7 @@ var ApiClient22 = class {
20192
20212
  list: (project_id) => wrap2(() => this.clients.hooks.get("/hooks", { query: { project_id } })),
20193
20213
  upsert: (data) => wrap2(() => data.id ? this.clients.hooks.patch(`/hooks/${data.id}`, { body: data }) : this.clients.hooks.post("/hooks", { body: data })),
20194
20214
  delete: (id2) => wrap2(() => this.clients.hooks.delete(`/hooks/${id2}`)),
20215
+ setEnabled: (id2, enabled) => wrap2(() => this.clients.hooks.patch(`/hooks/${id2}/enabled`, { body: { enabled } })),
20195
20216
  deliveries: (id2, status) => wrap2(() => this.clients.hooks.get(`/hooks/${id2}/deliveries`, status ? { query: { status } } : {}))
20196
20217
  };
20197
20218
  this.goals = {
@@ -20300,6 +20321,10 @@ var ApiClient22 = class {
20300
20321
  push: (data) => wrap2(() => this.clients.docs.post("/docs", { body: data })),
20301
20322
  pull: (id2, version2) => wrap2(() => this.clients.docs.get(`/docs/${id2}`, version2 ? { query: { version: version2 } } : {})),
20302
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
+ },
20303
20328
  createThread: (document_id, data) => wrap2(() => this.clients.docs.post(`/docs/${document_id}/threads`, { body: data })),
20304
20329
  replyThread: (document_id, thread_id, body) => wrap2(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/reply`, { body: { body } })),
20305
20330
  resolveThread: (document_id, thread_id) => wrap2(() => this.clients.docs.post(`/docs/${document_id}/threads/${thread_id}/resolve`, {})),
@@ -20323,6 +20348,7 @@ var ApiClient22 = class {
20323
20348
  this.signoffs = {
20324
20349
  request: (data) => wrap2(() => this.clients.signoffs.post("/signoffs", { body: data })),
20325
20350
  find: (id2) => wrap2(() => this.clients.signoffs.get(`/signoffs/${id2}`)),
20351
+ findPending: (filters) => wrap2(() => this.clients.signoffs.get("/signoffs", { query: filters })),
20326
20352
  decide: (id2, data) => wrap2(() => this.clients.signoffs.post(`/signoffs/${id2}/decide`, { body: data }))
20327
20353
  };
20328
20354
  this.reviews = {
@@ -20473,7 +20499,8 @@ var ApiClient22 = class {
20473
20499
  })
20474
20500
  };
20475
20501
  this.admin = {
20476
- 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"))
20477
20504
  };
20478
20505
  this.user = {
20479
20506
  me: () => wrap2(() => this.clients.auth.get("/user/me")),
@@ -20970,6 +20997,12 @@ var tools2 = {
20970
20997
  inputSchema: exports_external.object({}),
20971
20998
  execute: async (client) => unwrap3(await client.admin.verifyFold())
20972
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
+ }),
20973
21006
  devpad_projects_delete: define_tool2({
20974
21007
  name: "devpad_projects_delete",
20975
21008
  description: "Delete a project",
@@ -22882,6 +22915,15 @@ function register_admin_commands(program2, get_client) {
22882
22915
  await print_json(result);
22883
22916
  process.exit(1);
22884
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
+ });
22885
22927
  }
22886
22928
 
22887
22929
  // src/commands/pipelines.ts
@@ -25933,6 +25975,7 @@ var upsert_hook2 = exports_external.object({
25933
25975
  trigger: hook_trigger2,
25934
25976
  action: hook_action_input2
25935
25977
  });
25978
+ var toggle_hook_enabled2 = exports_external.object({ enabled: exports_external.boolean() });
25936
25979
 
25937
25980
  // src/graph-commands.ts
25938
25981
  async function print_json2(data) {
@@ -26063,8 +26106,9 @@ function normalize_declarations(files) {
26063
26106
  }
26064
26107
  // ../core/src/services/docs/markers.ts
26065
26108
  var MARKER_COMMENT_RE = new RegExp(`<!--\\s*devpad:thread:(?:begin\\s+\\S+\\s+[A-Za-z0-9+/=]+|end\\s+\\S+)\\s*-->`, "g");
26066
- // ../core/src/services/docs/reviews.ts
26109
+ // ../core/src/services/docs/reconcile.ts
26067
26110
  init_dist();
26111
+
26068
26112
  // ../../node_modules/hast-util-sanitize/lib/schema.js
26069
26113
  var aria = ["ariaDescribedBy", "ariaLabel", "ariaLabelledBy"];
26070
26114
  var defaultSchema = {
@@ -26239,13 +26283,19 @@ var defaultSchema = {
26239
26283
  ]
26240
26284
  };
26241
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"];
26242
26289
  var schema = {
26243
26290
  ...defaultSchema,
26244
26291
  allowComments: false,
26245
26292
  allowDoctypes: false,
26246
26293
  tagNames: [...defaultSchema.tagNames ?? [], "style"],
26294
+ attributes,
26247
26295
  strip: [...defaultSchema.strip ?? [], "iframe", "object", "embed", "form"]
26248
26296
  };
26297
+ var CLOBBER_PREFIX = defaultSchema.clobberPrefix ?? "user-content-";
26298
+ var FRAGMENT_HREF_RE = new RegExp(`(href=["'])#(?!${CLOBBER_PREFIX})`, "gi");
26249
26299
  var TEXT_ESCAPES = {
26250
26300
  "&": "&amp;",
26251
26301
  "<": "&lt;",
@@ -26256,33 +26306,37 @@ var TEXT_ESCAPES = {
26256
26306
  function sanitize_text(text3) {
26257
26307
  return text3.replace(/[&<>"']/g, (ch) => TEXT_ESCAPES[ch] ?? ch);
26258
26308
  }
26259
- // ../core/src/services/docs/signoff.ts
26309
+
26310
+ // ../core/src/services/docs/store.ts
26260
26311
  init_dist();
26312
+ init_zod();
26261
26313
 
26262
26314
  // ../core/src/services/errors.ts
26263
26315
  init_dist();
26264
26316
 
26265
26317
  // ../schema/dist/errors.js
26266
26318
  init_dist();
26267
- // ../core/src/services/graph/completion.ts
26268
- init_dist();
26269
-
26270
- // ../core/src/services/graph/graph.ts
26271
- init_dist();
26272
-
26273
26319
  // ../core/src/services/graph/outbox.ts
26274
26320
  init_dist();
26275
- // ../core/src/services/graph/rollup.ts
26276
- init_dist();
26277
26321
 
26278
26322
  // ../core/src/services/docs/store.ts
26279
- init_dist();
26280
- init_zod();
26281
26323
  var DocContentSchema = exports_external.object({
26282
26324
  title: exports_external.string().min(1),
26283
26325
  html: exports_external.string()
26284
26326
  });
26285
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();
26286
26340
  // ../core/src/services/docs/stage.ts
26287
26341
  init_dist();
26288
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.2",
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.2",
54
- "@devpad/core": "^2.4.2",
55
- "@devpad/pipeline-fakes": "^2.4.2",
56
- "@devpad/pipeline-templates": "^2.4.2",
57
- "@devpad/schema": "^2.4.2",
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",