ente-cli 0.4.85 → 0.4.86
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/dist/cli.mjs +105 -6
- package/dist/cli.mjs.map +4 -4
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3800,7 +3800,7 @@ async function runCli(cli2, argv, context) {
|
|
|
3800
3800
|
}
|
|
3801
3801
|
|
|
3802
3802
|
// ente/version.ts
|
|
3803
|
-
var VERSION = "0.4.
|
|
3803
|
+
var VERSION = "0.4.86";
|
|
3804
3804
|
|
|
3805
3805
|
// ente/branding.ts
|
|
3806
3806
|
var NPM_REGISTRY = "https://registry.npmjs.org";
|
|
@@ -11948,10 +11948,12 @@ var EntityCreate = class extends ProfileCommand {
|
|
|
11948
11948
|
if (this.parent && this.pin?.length) throw new Error("Use --parent for atomic child creation, or --pin for legacy parent linking, not both.");
|
|
11949
11949
|
const parentEntityId = this.parent ? await resolveEntityC(caller, this.parent) : void 0;
|
|
11950
11950
|
const attributes = parseAttrs(this.attr);
|
|
11951
|
+
const type = ENTITY_TYPE_VALUES.find((type2) => type2 === this.type);
|
|
11952
|
+
if (!type) throw new Error(`Invalid entity type '${this.type}'. Use one of: ${ENTITY_TYPE_VALUES.join(" | ")}.`);
|
|
11951
11953
|
const entityId = await caller.mutation(entitiesCreate, {
|
|
11952
11954
|
spaceId,
|
|
11953
11955
|
name: this.name,
|
|
11954
|
-
type
|
|
11956
|
+
type,
|
|
11955
11957
|
...parentEntityId ? { parentEntityId, exclusiveParent: this.exclusiveParent } : {}
|
|
11956
11958
|
});
|
|
11957
11959
|
if (this.alias) for (const a of this.alias) await caller.mutation(entitiesAddAlias, { id: entityId, alias: a });
|
|
@@ -12382,6 +12384,51 @@ var ENTITY_COMMANDS = [
|
|
|
12382
12384
|
import { readFileSync as readFileSync9 } from "node:fs";
|
|
12383
12385
|
import { basename as basename2 } from "node:path";
|
|
12384
12386
|
|
|
12387
|
+
// ../packages/shared/src/activity-dates.ts
|
|
12388
|
+
var DEFAULT_DEADLINE_TIME_ZONE = "Europe/Berlin";
|
|
12389
|
+
var deadlineJsonSchema = {
|
|
12390
|
+
anyOf: [
|
|
12391
|
+
{
|
|
12392
|
+
type: "object",
|
|
12393
|
+
properties: {
|
|
12394
|
+
date: {
|
|
12395
|
+
type: "string",
|
|
12396
|
+
description: "Local calendar date in YYYY-MM-DD format, for example 2026-05-23."
|
|
12397
|
+
},
|
|
12398
|
+
time: {
|
|
12399
|
+
anyOf: [{ type: "string" }, { type: "null" }],
|
|
12400
|
+
description: "Optional local time in 24-hour HH:mm format. Use null or omit for date-only tasks."
|
|
12401
|
+
},
|
|
12402
|
+
timezone: {
|
|
12403
|
+
type: "string",
|
|
12404
|
+
description: `IANA timezone for the local date/time. Defaults to ${DEFAULT_DEADLINE_TIME_ZONE}.`
|
|
12405
|
+
}
|
|
12406
|
+
},
|
|
12407
|
+
required: ["date"],
|
|
12408
|
+
additionalProperties: false
|
|
12409
|
+
},
|
|
12410
|
+
{
|
|
12411
|
+
type: "number",
|
|
12412
|
+
description: "Legacy UTC epoch milliseconds. Prefer the object format instead of calculating this."
|
|
12413
|
+
}
|
|
12414
|
+
],
|
|
12415
|
+
description: `Prefer { "date": "YYYY-MM-DD", "time": "HH:mm" or null, "timezone": "${DEFAULT_DEADLINE_TIME_ZONE}" }. Do not calculate epoch milliseconds unless a legacy client requires it.`
|
|
12416
|
+
};
|
|
12417
|
+
var nullableDeadlineJsonSchema = {
|
|
12418
|
+
anyOf: [{ type: "null" }, ...deadlineJsonSchema.anyOf],
|
|
12419
|
+
description: `${deadlineJsonSchema.description} Use null to clear an existing deadline.`
|
|
12420
|
+
};
|
|
12421
|
+
|
|
12422
|
+
// ../packages/shared/src/activity-contracts.ts
|
|
12423
|
+
var ACTIVITY_TYPE_VALUES = ["note", "conversation", "meeting", "call", "message", "task"];
|
|
12424
|
+
|
|
12425
|
+
// ente/activityType.ts
|
|
12426
|
+
function parseActivityType(value) {
|
|
12427
|
+
const type = ACTIVITY_TYPE_VALUES.find((type2) => type2 === value);
|
|
12428
|
+
if (!type) throw new Error(`Invalid activity type '${value}'. Use one of: ${ACTIVITY_TYPE_VALUES.join(" | ")}.`);
|
|
12429
|
+
return type;
|
|
12430
|
+
}
|
|
12431
|
+
|
|
12385
12432
|
// ente/content.ts
|
|
12386
12433
|
import { readFileSync as readFileSync7 } from "node:fs";
|
|
12387
12434
|
function readContentOption(content, contentFile) {
|
|
@@ -12760,7 +12807,7 @@ var ActivityCreate = class extends ProfileCommand {
|
|
|
12760
12807
|
ownerSpaceId: spaceId,
|
|
12761
12808
|
grantMissingEntityAccess: this.autoLink,
|
|
12762
12809
|
...this.entitySpaceGrantFingerprint ? { entitySpaceGrantFingerprint: this.entitySpaceGrantFingerprint } : {},
|
|
12763
|
-
type: this.type,
|
|
12810
|
+
type: parseActivityType(this.type),
|
|
12764
12811
|
...this.agentAssignee?.length ? { agentAssigneeIds: this.agentAssignee } : {},
|
|
12765
12812
|
title: this.title,
|
|
12766
12813
|
...content !== void 0 ? { contentMarkdown: content } : {},
|
|
@@ -12790,7 +12837,7 @@ var ActivitySearch = class extends ProfileCommand {
|
|
|
12790
12837
|
let results = await caller.query(activitiesSearchRich, {
|
|
12791
12838
|
spaceId,
|
|
12792
12839
|
query: this.query,
|
|
12793
|
-
...this.type ? { type: this.type } : {},
|
|
12840
|
+
...this.type ? { type: parseActivityType(this.type) } : {},
|
|
12794
12841
|
...this.limit ? { limit: Number(this.limit) } : {}
|
|
12795
12842
|
});
|
|
12796
12843
|
if (this.entity) {
|
|
@@ -13774,6 +13821,49 @@ var TASK_COMMANDS = [
|
|
|
13774
13821
|
import { readFileSync as readFileSync10 } from "node:fs";
|
|
13775
13822
|
|
|
13776
13823
|
// ../packages/shared/src/agent-icon.ts
|
|
13824
|
+
var legacyCustomIconIds = [
|
|
13825
|
+
"rocket",
|
|
13826
|
+
"flask-conical",
|
|
13827
|
+
"palette",
|
|
13828
|
+
"atom",
|
|
13829
|
+
"scale",
|
|
13830
|
+
"sticky-note",
|
|
13831
|
+
"notebook-pen",
|
|
13832
|
+
"pen-line",
|
|
13833
|
+
"highlighter",
|
|
13834
|
+
"quote",
|
|
13835
|
+
"list",
|
|
13836
|
+
"list-checks",
|
|
13837
|
+
"clipboard-list",
|
|
13838
|
+
"paperclip",
|
|
13839
|
+
"link",
|
|
13840
|
+
"at-sign",
|
|
13841
|
+
"hash",
|
|
13842
|
+
"calendar",
|
|
13843
|
+
"clock-3",
|
|
13844
|
+
"bell",
|
|
13845
|
+
"mic",
|
|
13846
|
+
"camera",
|
|
13847
|
+
"image",
|
|
13848
|
+
"code",
|
|
13849
|
+
"terminal",
|
|
13850
|
+
"database",
|
|
13851
|
+
"folder-open",
|
|
13852
|
+
"archive",
|
|
13853
|
+
"inbox",
|
|
13854
|
+
"send",
|
|
13855
|
+
"audio-lines",
|
|
13856
|
+
"video",
|
|
13857
|
+
"scan-text",
|
|
13858
|
+
"fingerprint",
|
|
13859
|
+
"circle-dashed",
|
|
13860
|
+
"magnet",
|
|
13861
|
+
"megaphone",
|
|
13862
|
+
"mountain",
|
|
13863
|
+
"shell",
|
|
13864
|
+
"feather",
|
|
13865
|
+
"flower-2"
|
|
13866
|
+
];
|
|
13777
13867
|
var entityCustomIconIds = [
|
|
13778
13868
|
"lightbulb",
|
|
13779
13869
|
"star",
|
|
@@ -13839,6 +13929,14 @@ function parseAgentIconInput(raw) {
|
|
|
13839
13929
|
return { icon: input.icon };
|
|
13840
13930
|
}
|
|
13841
13931
|
|
|
13932
|
+
// ente/entityIcon.ts
|
|
13933
|
+
var ICONS = [...AGENT_ICON_IDS, ...legacyCustomIconIds];
|
|
13934
|
+
function parseEntityIcon(value) {
|
|
13935
|
+
const icon = ICONS.find((icon2) => icon2 === value);
|
|
13936
|
+
if (!icon) throw new Error(`Invalid entity icon '${value}'.`);
|
|
13937
|
+
return icon;
|
|
13938
|
+
}
|
|
13939
|
+
|
|
13842
13940
|
// ente/databaseList.ts
|
|
13843
13941
|
var COLUMN_TYPES = ["text", "number", "boolean", "single-select", "multi-select"];
|
|
13844
13942
|
var SELECT_TYPES = /* @__PURE__ */ new Set(["single-select", "multi-select"]);
|
|
@@ -14236,6 +14334,7 @@ var ListCreate = class extends ProfileCommand {
|
|
|
14236
14334
|
}
|
|
14237
14335
|
const columns = (this.column ?? []).map(parseColumn);
|
|
14238
14336
|
if (this.icon !== void 0) assertListIcon(this.icon, this.type);
|
|
14337
|
+
const icon = this.icon !== void 0 ? parseEntityIcon(this.icon) : void 0;
|
|
14239
14338
|
const caller = await resolveCaller();
|
|
14240
14339
|
const spaceId = await resolveSpaceByNameC(caller, this.space);
|
|
14241
14340
|
const entityId = await caller.mutation(entitiesCreate2, {
|
|
@@ -14253,8 +14352,8 @@ var ListCreate = class extends ProfileCommand {
|
|
|
14253
14352
|
if (this.description) {
|
|
14254
14353
|
await caller.mutation(setDescriptionFromMarkdown, { entityId, markdown: this.description });
|
|
14255
14354
|
}
|
|
14256
|
-
if (
|
|
14257
|
-
await caller.mutation(setCustomIcon, { id: entityId, icon
|
|
14355
|
+
if (icon) {
|
|
14356
|
+
await caller.mutation(setCustomIcon, { id: entityId, icon });
|
|
14258
14357
|
}
|
|
14259
14358
|
const pins = await pinToTargets(caller, entityId, this.pin ?? [], {
|
|
14260
14359
|
shareParents: this.shareParents,
|