@quadient/skillshare 1.20.2 → 1.20.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.
- package/dist/help.js +1 -1
- package/dist/index.js +2 -1
- package/dist/pages-comments.js +2 -2
- package/dist/pages-secrets.js +1 -1
- package/package.json +1 -1
package/dist/help.js
CHANGED
|
@@ -99,7 +99,7 @@ export const COMMANDS = [
|
|
|
99
99
|
'pages dev [directory] [--slug <slug>] [--port <port>] [--build <command> --watch-dir <sources>]',
|
|
100
100
|
' [--celld <executable>] [--user-id <id>] [--user-name <name>] [--user-email <email>]',
|
|
101
101
|
],
|
|
102
|
-
description: 'An upload replaces all content of the page. Without --slug the directory name is used; build output folders such as dist need an explicit --slug. Pages owned by someone else are refused unless you are an admin. pages secrets manages the write-only secrets an app reads through SKILLSHARE_SECRETS (owner or admin only, at most 32 per page, 16 KiB each); set reads the value from piped stdin or a masked prompt, never from the command line. pages runtime set is for administrators: --external moves the app into its own pod (its data is copied, the app is briefly unavailable), --internal back into SkillShare; external apps get memory automatically between --min and --max MiB, and --always-on keeps an app running without traffic. pages comments reads and writes the annotations reviewers leave on a Page at /pa/<slug>/ (enable and disable decide whether the regular /p/<slug>/ address shows them too); add creates a page note, text without an argument (or -) is read from stdin, and list hides resolved threads unless --resolved is given.',
|
|
102
|
+
description: 'An upload replaces all content of the page. Without --slug the directory name is used; build output folders such as dist need an explicit --slug. Pages owned by someone else are refused unless you are their co-owner or an admin. pages secrets manages the write-only secrets an app reads through SKILLSHARE_SECRETS (owner or admin only, at most 32 per page, 16 KiB each); set reads the value from piped stdin or a masked prompt, never from the command line. pages runtime set is for administrators: --external moves the app into its own pod (its data is copied, the app is briefly unavailable), --internal back into SkillShare; external apps get memory automatically between --min and --max MiB, and --always-on keeps an app running without traffic. pages comments reads and writes the annotations reviewers leave on a Page at /pa/<slug>/ (enable and disable decide whether the regular /p/<slug>/ address shows them too); add creates a page note, text without an argument (or -) is read from stdin, and list hides resolved threads unless --resolved is given.',
|
|
103
103
|
examples: ['skillshare pages upload ./site --slug release-notes', 'skillshare pages dev . --slug my-app', 'skillshare pages secrets set my-app API_TOKEN', 'printf %s "$TOKEN" | skillshare pages secrets set my-app API_TOKEN', 'skillshare pages comments list my-app --author mine', 'skillshare pages comments reply my-app 12 "Fixed in revision 4"'],
|
|
104
104
|
flags: ['slug', 'path', 'author', 'resolved', 'external', 'internal', 'min', 'max', 'always-on', 'json'],
|
|
105
105
|
},
|
package/dist/index.js
CHANGED
|
@@ -1437,7 +1437,8 @@ async function describePageUploadTarget(client, slug) {
|
|
|
1437
1437
|
throw error;
|
|
1438
1438
|
}
|
|
1439
1439
|
const me = await client.get('/api/auth/me');
|
|
1440
|
-
const isOwner = me.storedUserId != null && me.storedUserId === page.ownerUserId
|
|
1440
|
+
const isOwner = me.storedUserId != null && (me.storedUserId === page.ownerUserId
|
|
1441
|
+
|| (page.coOwners ?? []).some((owner) => owner.userId === me.storedUserId));
|
|
1441
1442
|
if (!isOwner && !me.isAdmin) {
|
|
1442
1443
|
throw new Error(`Page /p/${slug}/ belongs to ${page.ownerDisplayName}. Choose another --slug.`);
|
|
1443
1444
|
}
|
package/dist/pages-comments.js
CHANGED
|
@@ -131,8 +131,8 @@ async function expectJson(slug, response, id) {
|
|
|
131
131
|
return await response.json();
|
|
132
132
|
if (response.status === 403) {
|
|
133
133
|
throw new Error(id
|
|
134
|
-
? `Only the comment's author,
|
|
135
|
-
: `Only
|
|
134
|
+
? `Only the comment's author, an owner of /p/${slug}/ or an administrator can change #${id}.`
|
|
135
|
+
: `Only an owner of /p/${slug}/ or an administrator can change its annotation settings.`);
|
|
136
136
|
}
|
|
137
137
|
if (response.status === 404)
|
|
138
138
|
throw new Error(id ? `Comment #${id} on /p/${slug}/ was not found.` : `Page /p/${slug}/ was not found.`);
|
package/dist/pages-secrets.js
CHANGED
|
@@ -50,7 +50,7 @@ async function expectSecrets(slug, response, name) {
|
|
|
50
50
|
if (response.ok)
|
|
51
51
|
return await response.json();
|
|
52
52
|
if (response.status === 403)
|
|
53
|
-
throw new Error(`Only the owner of /p/${slug}/ or an administrator can manage its secrets.`);
|
|
53
|
+
throw new Error(`Only the owner or a co-owner of /p/${slug}/ or an administrator can manage its secrets.`);
|
|
54
54
|
if (response.status === 404) {
|
|
55
55
|
throw new Error(name ? `Page /p/${slug}/ or its secret ${name} was not found.` : `Page /p/${slug}/ was not found.`);
|
|
56
56
|
}
|