Skip to content

Commit e3b9acc

Browse files
committed
Merge remote-tracking branch 'origin/master' into cocalc-api-20250927
2 parents 9756779 + 70a0a43 commit e3b9acc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2671
-465
lines changed

src/.claude/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"Bash(git checkout:*)",
1818
"Bash(git commit:*)",
1919
"Bash(git diff:*)",
20+
"Bash(git log:*)",
2021
"Bash(git push:*)",
2122
"Bash(grep:*)",
2223
"Bash(ln:*)",

src/packages/api-client/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"scripts": {
77
"preinstall": "npx only-allow pnpm",
88
"build": "../node_modules/.bin/tsc --build",
9-
"tsc": "../node_modules/.bin/tsc --watch --pretty --preserveWatchOutput",
109
"depcheck": "pnpx depcheck --ignores @cocalc/api-client "
1110
},
1211
"files": ["dist/**", "bin/**", "README.md", "package.json"],

src/packages/backend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"preinstall": "npx only-allow pnpm",
1919
"clean": "rm -rf dist node_modules",
2020
"build": "pnpm exec tsc --build",
21-
"tsc": "pnpm exec tsc --watch --pretty --preserveWatchOutput",
2221
"test": "pnpm exec jest --forceExit",
2322
"test-conat": " pnpm exec jest --forceExit conat",
2423
"testp": "pnpm exec jest --forceExit",

src/packages/comm/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"scripts": {
1818
"preinstall": "npx only-allow pnpm",
1919
"build": "../node_modules/.bin/tsc --build",
20-
"tsc": "../node_modules/.bin/tsc --watch --pretty --preserveWatchOutput",
2120
"depcheck": "pnpx depcheck --ignores @types/node"
2221
},
2322
"author": "SageMath, Inc.",

src/packages/conat/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"preinstall": "npx only-allow pnpm",
2121
"build": "pnpm exec tsc --build",
2222
"clean": "rm -rf dist node_modules",
23-
"tsc": "pnpm exec tsc --watch --pretty --preserveWatchOutput",
2423
"test": "pnpm exec jest",
2524
"depcheck": "pnpx depcheck --ignores events,bufferutil,utf-8-validate"
2625
},

src/packages/database/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"random-key": "^0.3.2",
3333
"read": "^1.0.7",
3434
"sql-string-escape": "^1.1.6",
35-
"validator": "^13.6.0"
35+
"validator": "^13.15.20"
3636
},
3737
"devDependencies": {
3838
"@types/lodash": "^4.14.202",
@@ -44,7 +44,6 @@
4444
"preinstall": "npx only-allow pnpm",
4545
"build": "../node_modules/.bin/tsc --build && coffee -c -o dist/ ./",
4646
"clean": "rm -rf dist",
47-
"tsc": "../node_modules/.bin/tsc --watch --pretty --preserveWatchOutput",
4847
"test": "pnpm exec jest --forceExit --runInBand",
4948
"depcheck": "pnpx depcheck | grep -Ev '\\.coffee|coffee$'",
5049
"prepublishOnly": "pnpm test"

src/packages/database/postgres/registration-tokens.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ interface Query {
1111
expires?: Date;
1212
limit?: number;
1313
disabled?: boolean;
14+
ephemeral?: boolean;
15+
customize?;
1416
}
1517

1618
export default async function registrationTokensQuery(
1719
db: PostgreSQL,
1820
options: { delete?: boolean }[],
19-
query: Query
21+
query: Query,
2022
) {
2123
if (isDelete(options) && query.token) {
2224
// delete if option is set and there is a token which is defined and not an empty string
@@ -37,22 +39,27 @@ export default async function registrationTokensQuery(
3739
return rows;
3840
} else if (query.token) {
3941
// upsert an existing one
40-
const { token, descr, expires, limit, disabled } = query;
42+
const { token, descr, expires, limit, disabled, ephemeral, customize } =
43+
query;
4144
const { rows } = await callback2(db._query, {
42-
query: `INSERT INTO registration_tokens ("token","descr","expires","limit","disabled")
43-
VALUES ($1, $2, $3, $4, $5) ON CONFLICT (token)
45+
query: `INSERT INTO registration_tokens ("token","descr","expires","limit","disabled","ephemeral","customize")
46+
VALUES ($1, $2, $3, $4, $5, $6, $7) ON CONFLICT (token)
4447
DO UPDATE SET
4548
"token" = EXCLUDED.token,
4649
"descr" = EXCLUDED.descr,
4750
"expires" = EXCLUDED.expires,
4851
"limit" = EXCLUDED.limit,
49-
"disabled" = EXCLUDED.disabled`,
52+
"disabled" = EXCLUDED.disabled,
53+
"ephemeral" = EXCLUDED.ephemeral,
54+
"customize" = EXCLUDED.customize`,
5055
params: [
5156
token,
5257
descr ? descr : null,
5358
expires ? expires : null,
5459
limit == null ? null : limit, // if undefined make it null
5560
disabled != null ? disabled : false,
61+
ephemeral == null ? null : ephemeral,
62+
customize == null ? null : customize,
5663
],
5764
});
5865
return rows;

src/packages/file-server/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"scripts": {
1010
"preinstall": "npx only-allow pnpm",
1111
"build": "pnpm exec tsc --build",
12-
"tsc": "pnpm exec tsc --watch --pretty --preserveWatchOutput",
1312
"test": "pnpm exec jest",
1413
"depcheck": "pnpx depcheck",
1514
"clean": "rm -rf node_modules dist"

src/packages/frontend/account/table.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export class AccountTable extends Table {
4646
last_active: null,
4747
ssh_keys: null,
4848
created: null,
49+
ephemeral: null,
50+
customize: null,
4951
unlisted: null,
5052
tags: null,
5153
tours: null,

src/packages/frontend/account/types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ export interface AccountState {
3636
name?: string;
3737
unlisted?: boolean;
3838
profile: TypedMap<{ color: string }>;
39+
customize?: {
40+
disableCollaborators?: boolean;
41+
disableAI?: boolean;
42+
[key: string]: any;
43+
};
3944
email_address?: string;
4045
editor_settings: TypedMap<{
4146
jupyter_classic?: boolean;
@@ -90,6 +95,7 @@ export interface AccountState {
9095
is_ready: boolean; // user signed in and account settings have been loaded.
9196
lti_id?: List<string>;
9297
created?: Date;
98+
ephemeral?: number;
9399
strategies?: List<TypedMap<PassportStrategyFrontend>>;
94100
token?: boolean; // whether or not a registration token is required when creating an account
95101
keyboard_variant_options?: List<any>;

0 commit comments

Comments
 (0)