@dreamlake/dreamlake-cli 0.107.0 → 0.107.1
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/api/memo-facade.d.ts +1 -1
- package/dist/api/memos.d.ts +2 -2
- package/dist/api/workspace.d.ts +2 -1
- package/dist/cli/help-examples.generated.js +1 -1
- package/dist/cli/memos/index.d.ts +1 -0
- package/dist/cli/memos/index.js +11 -2
- package/dist/cli/share.js +3 -3
- package/dist/cli/version.d.ts +1 -1
- package/dist/cli/version.js +1 -1
- package/package.json +9 -9
|
@@ -248,7 +248,7 @@ export interface MemosFacade {
|
|
|
248
248
|
namespace: string;
|
|
249
249
|
name?: string;
|
|
250
250
|
text?: string;
|
|
251
|
-
visibility?: "private" | "public";
|
|
251
|
+
visibility?: "private" | "public" | "unlisted";
|
|
252
252
|
projects?: string[];
|
|
253
253
|
}): Promise<CreatedMemo>;
|
|
254
254
|
/** The namespace-scoped API for a dynamic namespace (a bare literal, `dl.notes("fortyfive")`, is the same object). */
|
package/dist/api/memos.d.ts
CHANGED
|
@@ -154,7 +154,7 @@ export declare function memosApi(t: Transport, namespace: string): {
|
|
|
154
154
|
get: () => Promise<Record<string, unknown>>;
|
|
155
155
|
create: (role?: "read" | "write") => Promise<unknown>;
|
|
156
156
|
revoke: (revokeAccepted?: boolean) => Promise<unknown>;
|
|
157
|
-
visibility: (visibility: "
|
|
157
|
+
visibility: (visibility: import("./workspace.js").MemoVisibility) => Promise<unknown>;
|
|
158
158
|
access: () => Promise<unknown>;
|
|
159
159
|
remove: (userId: string) => Promise<unknown>;
|
|
160
160
|
};
|
|
@@ -258,7 +258,7 @@ export declare function memosApi(t: Transport, namespace: string): {
|
|
|
258
258
|
name: string;
|
|
259
259
|
summary?: string;
|
|
260
260
|
projects?: string[];
|
|
261
|
-
visibility?: "private" | "public";
|
|
261
|
+
visibility?: "private" | "public" | "unlisted";
|
|
262
262
|
}) => Promise<{
|
|
263
263
|
note: MemoRow;
|
|
264
264
|
rtc: {
|
package/dist/api/workspace.d.ts
CHANGED
|
@@ -210,11 +210,12 @@ export declare function connectionsApi(t: Transport, namespace: string): {
|
|
|
210
210
|
delete: (id: string, expectedSettingsRevision: number, key: string) => Promise<unknown>;
|
|
211
211
|
};
|
|
212
212
|
export type ArtifactVisibility = "private" | "public" | "unlisted";
|
|
213
|
+
export type MemoVisibility = "private" | "public" | "unlisted";
|
|
213
214
|
export declare function sharingApi<K extends "notes" | "artifacts">(t: Transport, namespace: string, kind: K, id: string): {
|
|
214
215
|
get: () => Promise<Record<string, unknown>>;
|
|
215
216
|
create: (role?: "read" | "write") => Promise<unknown>;
|
|
216
217
|
revoke: (revokeAccepted?: boolean) => Promise<unknown>;
|
|
217
|
-
visibility: (visibility: K extends "artifacts" ? ArtifactVisibility :
|
|
218
|
+
visibility: (visibility: K extends "artifacts" ? ArtifactVisibility : MemoVisibility) => Promise<unknown>;
|
|
218
219
|
access: () => Promise<unknown>;
|
|
219
220
|
remove: (userId: string) => Promise<unknown>;
|
|
220
221
|
};
|
|
@@ -125,7 +125,7 @@ export const helpExamples = {
|
|
|
125
125
|
"memos diff": "MEMO_ID=release-plan\ndreamlake memos read \"$MEMO_ID\" --json > baseline.json\nHASH=$(jq -er .hash baseline.json)\ndreamlake memos diff \"$MEMO_ID\" --since \"$HASH\" --format diff",
|
|
126
126
|
"memos sections": "dreamlake memos sections release-plan\ndreamlake memos sections release-plan --json",
|
|
127
127
|
"memos share": "# Find the release plan and inspect its source and current sharing.\ndreamlake memos search \"release plan\"\nMEMO=\"release-plan\" # Replace with the id or slug from search.\ndreamlake memos read \"$MEMO\"\ndreamlake memos share get \"$MEMO\"\n\n# Give signed-in recipients read access, then verify the returned link.\ndreamlake memos share create \"$MEMO\" --role read\ndreamlake memos share get \"$MEMO\"\n\n# When link access is no longer needed, revoke it and verify.\ndreamlake memos share revoke \"$MEMO\"\ndreamlake memos share get \"$MEMO\"",
|
|
128
|
-
"memos visibility": "MEMO=\"release-plan\" # Your existing memo id or slug.\ndreamlake memos visibility \"$MEMO\" public\ndreamlake memos visibility \"$MEMO\" private",
|
|
128
|
+
"memos visibility": "MEMO=\"release-plan\" # Your existing memo id or slug.\ndreamlake memos visibility \"$MEMO\" unlisted\ndreamlake memos visibility \"$MEMO\" public\ndreamlake memos visibility \"$MEMO\" private",
|
|
129
129
|
"memos share revoke": "MEMO=\"release-plan\" # Your existing memo id or slug.\ndreamlake memos share revoke \"$MEMO\" --revoke-accepted",
|
|
130
130
|
"memos share access": "MEMO=\"release-plan\" # Your existing memo id or slug.\n# List acceptance records and stored roles as a readable table.\ndreamlake memos share access \"$MEMO\"",
|
|
131
131
|
"memos share remove": "MEMO=\"release-plan\" # Your existing memo id or slug.\nUSER_ID=\"user-id-from-access-list\"\ndreamlake memos share remove \"$MEMO\" \"$USER_ID\"",
|
package/dist/cli/memos/index.js
CHANGED
|
@@ -237,7 +237,8 @@ export function registerMemosCommand(program) {
|
|
|
237
237
|
.option("--project <slug>", "file the new Memo in this same-namespace project (repeatable)", (value, previous) => [...previous, value], [])
|
|
238
238
|
.option("--file <path>", "initial body from a file ('-' for stdin)")
|
|
239
239
|
.option("--text <string>", "initial body, inline")
|
|
240
|
-
.option("--public", "anyone can read it
|
|
240
|
+
.option("--public", "anyone can read it and see it on the public profile")
|
|
241
|
+
.option("--visibility <visibility>", "private, unlisted or public (default: private)")
|
|
241
242
|
.option("--namespace <slug>", "whose memos (default: selected CLI namespace, otherwise personal)")
|
|
242
243
|
.option("--json", "emit JSON")
|
|
243
244
|
.action(async (name, opts) => { process.exitCode = await runMemosCreate(name, opts); });
|
|
@@ -1139,6 +1140,14 @@ async function runLegacyNotesAppend(ref, opts) {
|
|
|
1139
1140
|
}
|
|
1140
1141
|
}
|
|
1141
1142
|
export async function runMemosCreate(name, opts) {
|
|
1143
|
+
if (opts.visibility !== undefined && !["private", "unlisted", "public"].includes(opts.visibility)) {
|
|
1144
|
+
fail("--visibility must be private, unlisted or public");
|
|
1145
|
+
return 1;
|
|
1146
|
+
}
|
|
1147
|
+
if (opts.public && opts.visibility !== undefined && opts.visibility !== "public") {
|
|
1148
|
+
fail("--public conflicts with --visibility");
|
|
1149
|
+
return 1;
|
|
1150
|
+
}
|
|
1142
1151
|
// Notes API contract: the title is optional and an omitted one displays as Untitled.
|
|
1143
1152
|
name ??= "Untitled";
|
|
1144
1153
|
const c = await ctx(opts);
|
|
@@ -1153,7 +1162,7 @@ export async function runMemosCreate(name, opts) {
|
|
|
1153
1162
|
try {
|
|
1154
1163
|
const created = await requestJson(c.remote, `/namespaces/${seg(c.ns)}/notes`, {
|
|
1155
1164
|
method: "POST",
|
|
1156
|
-
json: { name, visibility: opts.public ? "public" : "private", ...(opts.project?.length ? { projects: [...new Set(opts.project)] } : {}) },
|
|
1165
|
+
json: { name, visibility: opts.visibility ?? (opts.public ? "public" : "private"), ...(opts.project?.length ? { projects: [...new Set(opts.project)] } : {}) },
|
|
1157
1166
|
token: c.token,
|
|
1158
1167
|
});
|
|
1159
1168
|
const id = created.note.id;
|
package/dist/cli/share.js
CHANGED
|
@@ -10,7 +10,7 @@ export async function runShare(kind, operation, ref, opts) {
|
|
|
10
10
|
fail("--role must be read or write");
|
|
11
11
|
return 1;
|
|
12
12
|
}
|
|
13
|
-
const visibilities =
|
|
13
|
+
const visibilities = ["private", "public", "unlisted"];
|
|
14
14
|
if (operation === "visibility" && !visibilities.includes(opts.visibility ?? "")) {
|
|
15
15
|
fail(`visibility must be ${visibilities.join(", ")}`);
|
|
16
16
|
return 1;
|
|
@@ -96,7 +96,7 @@ export async function runShare(kind, operation, ref, opts) {
|
|
|
96
96
|
const url = `${webBase(c.remote)}/${encodeURIComponent(ns)}/${kind === "notes" ? "notes" : "artifacts"}/${encodeURIComponent(urlId)}`;
|
|
97
97
|
const result = {
|
|
98
98
|
url, visibility: row.visibility,
|
|
99
|
-
publicUrl: row.visibility === "public" ||
|
|
99
|
+
publicUrl: row.visibility === "public" || row.visibility === "unlisted" ? url : null,
|
|
100
100
|
shareUrl: row.shareToken ? `${url}?share=${encodeURIComponent(row.shareToken)}` : null,
|
|
101
101
|
shareRole: kind === "notes" ? row.shareRole ?? null : row.shareToken ? "read" : null,
|
|
102
102
|
// An omitted token is redacted, not evidence that sharing is disabled.
|
|
@@ -136,7 +136,7 @@ export function registerShareCommands(parent, kind) {
|
|
|
136
136
|
else
|
|
137
137
|
cmd.action(async (ref, opts) => { process.exit(await runShare(kind, operation, ref, opts)); });
|
|
138
138
|
}
|
|
139
|
-
withConnFlags(parent.command("visibility").argument("<resource>").argument("<visibility>",
|
|
139
|
+
withConnFlags(parent.command("visibility").argument("<resource>").argument("<visibility>", "private, public or unlisted")
|
|
140
140
|
.description("set read visibility; does not revoke share links or accepted access")
|
|
141
141
|
.option("--namespace <slug>", "namespace").option("--json", "emit structured JSON"))
|
|
142
142
|
.action(async (ref, visibility, opts) => { process.exit(await runShare(kind, "visibility", ref, { ...opts, visibility })); });
|
package/dist/cli/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.107.
|
|
1
|
+
export declare const VERSION = "0.107.1";
|
package/dist/cli/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dreamlake/dreamlake-cli",
|
|
3
|
-
"version": "0.107.
|
|
3
|
+
"version": "0.107.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dreamlake-ai/dreamlake-cli.git"
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"node": ">=18"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@dreamlake/dreamlake-cli-darwin-arm64": "0.107.
|
|
40
|
-
"@dreamlake/dreamlake-cli-darwin-x64": "0.107.
|
|
41
|
-
"@dreamlake/dreamlake-cli-linux-x64": "0.107.
|
|
42
|
-
"@dreamlake/dreamlake-cli-linux-arm64": "0.107.
|
|
43
|
-
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.107.
|
|
44
|
-
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.107.
|
|
45
|
-
"@dreamlake/dreamlake-cli-win32-x64": "0.107.
|
|
46
|
-
"@dreamlake/dreamlake-cli-win32-arm64": "0.107.
|
|
39
|
+
"@dreamlake/dreamlake-cli-darwin-arm64": "0.107.1",
|
|
40
|
+
"@dreamlake/dreamlake-cli-darwin-x64": "0.107.1",
|
|
41
|
+
"@dreamlake/dreamlake-cli-linux-x64": "0.107.1",
|
|
42
|
+
"@dreamlake/dreamlake-cli-linux-arm64": "0.107.1",
|
|
43
|
+
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.107.1",
|
|
44
|
+
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.107.1",
|
|
45
|
+
"@dreamlake/dreamlake-cli-win32-x64": "0.107.1",
|
|
46
|
+
"@dreamlake/dreamlake-cli-win32-arm64": "0.107.1"
|
|
47
47
|
}
|
|
48
48
|
}
|