@devpad/cli 2.0.4 → 2.1.2

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 -56
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -6,25 +6,43 @@ var __getProtoOf = Object.getPrototypeOf;
6
6
  var __defProp = Object.defineProperty;
7
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ function __accessProp(key) {
10
+ return this[key];
11
+ }
12
+ var __toESMCache_node;
13
+ var __toESMCache_esm;
9
14
  var __toESM = (mod, isNodeMode, target) => {
15
+ var canCache = mod != null && typeof mod === "object";
16
+ if (canCache) {
17
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
18
+ var cached = cache.get(mod);
19
+ if (cached)
20
+ return cached;
21
+ }
10
22
  target = mod != null ? __create(__getProtoOf(mod)) : {};
11
23
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
12
24
  for (let key of __getOwnPropNames(mod))
13
25
  if (!__hasOwnProp.call(to, key))
14
26
  __defProp(to, key, {
15
- get: () => mod[key],
27
+ get: __accessProp.bind(mod, key),
16
28
  enumerable: true
17
29
  });
30
+ if (canCache)
31
+ cache.set(mod, to);
18
32
  return to;
19
33
  };
20
34
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
35
+ var __returnValue = (v) => v;
36
+ function __exportSetter(name, newValue) {
37
+ this[name] = __returnValue.bind(null, newValue);
38
+ }
21
39
  var __export = (target, all) => {
22
40
  for (var name in all)
23
41
  __defProp(target, name, {
24
42
  get: all[name],
25
43
  enumerable: true,
26
44
  configurable: true,
27
- set: (newValue) => all[name] = () => newValue
45
+ set: __exportSetter.bind(all, name)
28
46
  });
29
47
  };
30
48
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
@@ -8291,47 +8309,7 @@ var coerce = {
8291
8309
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
8292
8310
  };
8293
8311
  var NEVER = INVALID;
8294
- // ../api/dist/chunk-XGQQPYSB.js
8295
- var ArrayBufferedQueue = class {
8296
- constructor(_capacity) {
8297
- this._capacity = _capacity;
8298
- this._entries = [];
8299
- this._head = 0;
8300
- this._tail = 0;
8301
- this._size = 0;
8302
- }
8303
- latest() {
8304
- if (this._size === 0)
8305
- return null;
8306
- return this._entries[this._tail - 1] ?? null;
8307
- }
8308
- list() {
8309
- if (this._size === 0)
8310
- return [];
8311
- if (this._head < this._tail) {
8312
- return this._entries.slice(this._head, this._tail);
8313
- }
8314
- return this._entries.slice(this._head).concat(this._entries.slice(0, this._tail));
8315
- }
8316
- add(item) {
8317
- if (this._size === this._capacity) {
8318
- this._head = (this._head + 1) % this._capacity;
8319
- } else {
8320
- this._size++;
8321
- }
8322
- this._entries[this._tail] = item;
8323
- this._tail = (this._tail + 1) % this._capacity;
8324
- }
8325
- size() {
8326
- return this._size;
8327
- }
8328
- clear() {
8329
- this._entries = [];
8330
- this._head = 0;
8331
- this._tail = 0;
8332
- this._size = 0;
8333
- }
8334
- };
8312
+ // ../api/dist/chunk-7SQVSGWV.js
8335
8313
  var upsert_project = exports_external.object({
8336
8314
  id: exports_external.string().optional().nullable(),
8337
8315
  project_id: exports_external.string(),
@@ -8366,13 +8344,6 @@ var upsert_todo = exports_external.object({
8366
8344
  force: exports_external.boolean().optional().describe("Override protection on user-modified entities")
8367
8345
  });
8368
8346
  var update_action = exports_external.union([exports_external.literal("CONFIRM"), exports_external.literal("UNLINK"), exports_external.literal("CREATE"), exports_external.literal("IGNORE"), exports_external.literal("DELETE"), exports_external.literal("COMPLETE")]);
8369
- var ConfigSchema = exports_external.object({
8370
- tags: exports_external.array(exports_external.object({
8371
- name: exports_external.string(),
8372
- match: exports_external.array(exports_external.string())
8373
- })),
8374
- ignore: exports_external.array(exports_external.string().regex(/^[^]*$/, "Invalid path"))
8375
- });
8376
8347
  var upsert_tag = exports_external.object({
8377
8348
  id: exports_external.string().optional(),
8378
8349
  title: exports_external.string(),
@@ -9934,6 +9905,46 @@ function handleNetworkError(error) {
9934
9905
  const message = error instanceof Error ? error.message : "Unknown network error";
9935
9906
  throw new NetworkError(message);
9936
9907
  }
9908
+ var ArrayBufferedQueue = class {
9909
+ constructor(_capacity) {
9910
+ this._capacity = _capacity;
9911
+ this._entries = [];
9912
+ this._head = 0;
9913
+ this._tail = 0;
9914
+ this._size = 0;
9915
+ }
9916
+ latest() {
9917
+ if (this._size === 0)
9918
+ return null;
9919
+ return this._entries[this._tail - 1] ?? null;
9920
+ }
9921
+ list() {
9922
+ if (this._size === 0)
9923
+ return [];
9924
+ if (this._head < this._tail) {
9925
+ return this._entries.slice(this._head, this._tail);
9926
+ }
9927
+ return this._entries.slice(this._head).concat(this._entries.slice(0, this._tail));
9928
+ }
9929
+ add(item) {
9930
+ if (this._size === this._capacity) {
9931
+ this._head = (this._head + 1) % this._capacity;
9932
+ } else {
9933
+ this._size++;
9934
+ }
9935
+ this._entries[this._tail] = item;
9936
+ this._tail = (this._tail + 1) % this._capacity;
9937
+ }
9938
+ size() {
9939
+ return this._size;
9940
+ }
9941
+ clear() {
9942
+ this._entries = [];
9943
+ this._head = 0;
9944
+ this._tail = 0;
9945
+ this._size = 0;
9946
+ }
9947
+ };
9937
9948
  var ApiClient = class {
9938
9949
  constructor(options) {
9939
9950
  this.category = "api";
@@ -10243,7 +10254,8 @@ var ApiClient2 = class {
10243
10254
  name: data.name ?? milestone.name,
10244
10255
  description: data.description ?? milestone.description,
10245
10256
  target_time: data.target_time ?? milestone.target_time,
10246
- target_version: data.target_version ?? milestone.target_version
10257
+ target_version: data.target_version ?? milestone.target_version,
10258
+ finished_at: data.finished_at !== undefined ? data.finished_at : milestone.finished_at
10247
10259
  };
10248
10260
  return this.clients.milestones.patch(`/milestones/${id}`, {
10249
10261
  body: updateData
@@ -10268,7 +10280,8 @@ var ApiClient2 = class {
10268
10280
  milestone_id: goal.milestone_id,
10269
10281
  name: data.name ?? goal.name,
10270
10282
  description: data.description ?? goal.description,
10271
- target_time: data.target_time ?? goal.target_time
10283
+ target_time: data.target_time ?? goal.target_time,
10284
+ finished_at: data.finished_at !== undefined ? data.finished_at : goal.finished_at
10272
10285
  };
10273
10286
  return this.clients.goals.patch(`/goals/${id}`, {
10274
10287
  body: updateData
@@ -10624,13 +10637,15 @@ var tools = {
10624
10637
  name: input.name,
10625
10638
  description: input.description,
10626
10639
  target_time: input.target_time,
10627
- target_version: input.target_version
10640
+ target_version: input.target_version,
10641
+ finished_at: input.finished_at
10628
10642
  }) : await client.milestones.create({
10629
10643
  project_id: input.project_id,
10630
10644
  name: input.name,
10631
10645
  description: input.description,
10632
10646
  target_time: input.target_time,
10633
- target_version: input.target_version
10647
+ target_version: input.target_version,
10648
+ finished_at: input.finished_at
10634
10649
  }))
10635
10650
  },
10636
10651
  devpad_goals_list: {
@@ -10652,12 +10667,14 @@ var tools = {
10652
10667
  execute: async (client, input) => unwrap2(input.id ? await client.goals.update(input.id, {
10653
10668
  name: input.name,
10654
10669
  description: input.description,
10655
- target_time: input.target_time
10670
+ target_time: input.target_time,
10671
+ finished_at: input.finished_at
10656
10672
  }) : await client.goals.create({
10657
10673
  milestone_id: input.milestone_id,
10658
10674
  name: input.name,
10659
10675
  description: input.description,
10660
- target_time: input.target_time
10676
+ target_time: input.target_time,
10677
+ finished_at: input.finished_at
10661
10678
  }))
10662
10679
  },
10663
10680
  devpad_tags_list: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/cli",
3
- "version": "2.0.4",
3
+ "version": "2.1.2",
4
4
  "description": "Command line interface for devpad project management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -44,8 +44,8 @@
44
44
  },
45
45
  "dependencies": {},
46
46
  "devDependencies": {
47
- "@devpad/api": "^2.0.4",
48
- "@devpad/schema": "^2.0.4",
47
+ "@devpad/api": "^2.1.2",
48
+ "@devpad/schema": "^2.1.2",
49
49
  "@types/node": "^20.11.24",
50
50
  "bun-types": "latest",
51
51
  "chalk": "^5.3.0",