public
imalexnord
read
Slot
Calendar-first scheduling powered by Cloudflare Workers and Google Calendar.
Languages
Repository composition by tracked source files.
TypeScript
79%
CSS
19%
SQL
2%
HTML
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/user/imalexnord/slot.git
ssh://[email protected]:2222/user/imalexnord/slot.git
Trace
scripts/setup.mjs
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
setup.mjs
on main
Author
Date
Commit
Line
Code
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1
import { spawnSync } from 'node:child_process';
import { spawnSync } from 'node:child_process';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2
import { randomBytes } from 'node:crypto';
import { randomBytes } from 'node:crypto';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 3
import fs from 'node:fs';
import fs from 'node:fs';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 4
import path from 'node:path';
import path from 'node:path';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 5
import { stdin as input, stdout as output } from 'node:process';
import { stdin as input, stdout as output } from 'node:process';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 6
import { createInterface } from 'node:readline/promises';
import { createInterface } from 'node:readline/promises';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 7
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 8
const root = process.cwd();
const root = process.cwd();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 9
const workerConfigPath = path.join(root, 'wrangler.jsonc');
const workerConfigPath = path.join(root, 'wrangler.jsonc');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 10
const wranglerCli = path.join(root, 'node_modules', 'wrangler', 'bin', 'wrangler.js');
const wranglerCli = path.join(root, 'node_modules', 'wrangler', 'bin', 'wrangler.js');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 11
const viteCli = path.join(root, 'node_modules', 'vite', 'bin', 'vite.js');
const viteCli = path.join(root, 'node_modules', 'vite', 'bin', 'vite.js');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 12
const requiredSecrets = [
const requiredSecrets = [
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 13
'APP_URL',
'APP_URL',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 14
'ADMIN_EMAIL',
'ADMIN_EMAIL',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 15
'GOOGLE_CLIENT_ID',
'GOOGLE_CLIENT_ID',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 16
'GOOGLE_CLIENT_SECRET',
'GOOGLE_CLIENT_SECRET',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 17
'SESSION_SECRET',
'SESSION_SECRET',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 18
'TOKEN_ENCRYPTION_KEY',
'TOKEN_ENCRYPTION_KEY',
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 19
'STRIPE_SECRET_KEY',
'STRIPE_SECRET_KEY',
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 20
'STRIPE_WEBHOOK_SECRET',
'STRIPE_WEBHOOK_SECRET',
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 21
];
];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 22
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 23
function fail(message) {
function fail(message) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 24
console.error(`\nSetup failed: ${message}`);
console.error(`\nSetup failed: ${message}`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 25
process.exit(1);
process.exit(1);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 26
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 27
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 28
function ensureProjectRoot() {
function ensureProjectRoot() {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 29
if (!fs.existsSync(workerConfigPath)) {
if (!fs.existsSync(workerConfigPath)) {
Alex Nord
3 days ago
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 30
fail('Run npm run setup from the Slot project root.');
fail('Run npm run setup from the Slot project root.');
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 31
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 32
if (!fs.existsSync(wranglerCli) || !fs.existsSync(viteCli)) {
if (!fs.existsSync(wranglerCli) || !fs.existsSync(viteCli)) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 33
fail('Dependencies are missing. Run npm install, then npm run setup again.');
fail('Dependencies are missing. Run npm install, then npm run setup again.');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 34
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 35
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 36
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 37
function runNodeCli(label, scriptPath, args, options = {}) {
function runNodeCli(label, scriptPath, args, options = {}) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 38
const { allowFailure = false, capture = false } = options;
const { allowFailure = false, capture = false } = options;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 39
const result = spawnSync(process.execPath, [scriptPath, ...args], {
const result = spawnSync(process.execPath, [scriptPath, ...args], {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 40
cwd: root,
cwd: root,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 41
shell: false,
shell: false,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 42
stdio: capture ? ['ignore', 'pipe', 'pipe'] : 'inherit',
stdio: capture ? ['ignore', 'pipe', 'pipe'] : 'inherit',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 43
encoding: capture ? 'utf8' : undefined,
encoding: capture ? 'utf8' : undefined,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 44
env: { ...process.env, NO_COLOR: process.env.NO_COLOR ?? '1' },
env: { ...process.env, NO_COLOR: process.env.NO_COLOR ?? '1' },
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 45
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 46
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 47
if (result.error) {
if (result.error) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 48
if (allowFailure) return result;
if (allowFailure) return result;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 49
throw result.error;
throw result.error;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 50
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 51
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 52
if ((result.status ?? 1) !== 0 && !allowFailure) {
if ((result.status ?? 1) !== 0 && !allowFailure) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 53
process.exit(result.status ?? 1);
process.exit(result.status ?? 1);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 54
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 55
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 56
return result;
return result;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 57
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 58
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 59
function wrangler(args, options) {
function wrangler(args, options) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 60
return runNodeCli('wrangler', wranglerCli, args, options);
return runNodeCli('wrangler', wranglerCli, args, options);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 61
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 62
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 63
function build() {
function build() {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 64
runNodeCli('vite', viteCli, ['build']);
runNodeCli('vite', viteCli, ['build']);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 65
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 66
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 67
function parseJsonOutput(result, fallback) {
function parseJsonOutput(result, fallback) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 68
const text = `${result.stdout ?? ''}`.trim();
const text = `${result.stdout ?? ''}`.trim();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 69
if (!text) return fallback;
if (!text) return fallback;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 70
try {
try {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 71
return JSON.parse(text);
return JSON.parse(text);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 72
} catch {
} catch {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 73
return fallback;
return fallback;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 74
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 75
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 76
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 77
function readConfig() {
function readConfig() {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 78
return JSON.parse(fs.readFileSync(workerConfigPath, 'utf8'));
return JSON.parse(fs.readFileSync(workerConfigPath, 'utf8'));
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 79
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 80
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 81
function writeConfig(config) {
function writeConfig(config) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 82
fs.writeFileSync(workerConfigPath, `${JSON.stringify(config, null, 2)}\n`);
fs.writeFileSync(workerConfigPath, `${JSON.stringify(config, null, 2)}\n`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 83
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 84
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 85
function dbNameFromConfig(config) {
function dbNameFromConfig(config) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 86
return config.d1_databases?.find((db) => db.binding === 'DB')?.database_name ?? `${config.name}-db`;
return config.d1_databases?.find((db) => db.binding === 'DB')?.database_name ?? `${config.name}-db`;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 87
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 88
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 89
function updateD1Config(database) {
function updateD1Config(database) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 90
const config = readConfig();
const config = readConfig();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 91
const databases = Array.isArray(config.d1_databases) ? config.d1_databases : [];
const databases = Array.isArray(config.d1_databases) ? config.d1_databases : [];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 92
const index = databases.findIndex((db) => db.binding === 'DB');
const index = databases.findIndex((db) => db.binding === 'DB');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 93
const current = index >= 0 ? databases[index] : { binding: 'DB' };
const current = index >= 0 ? databases[index] : { binding: 'DB' };
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 94
const next = {
const next = {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 95
...current,
...current,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 96
binding: 'DB',
binding: 'DB',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 97
database_name: database.name,
database_name: database.name,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 98
database_id: database.uuid,
database_id: database.uuid,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 99
migrations_dir: current.migrations_dir ?? 'migrations',
migrations_dir: current.migrations_dir ?? 'migrations',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 100
};
};
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 101
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 102
if (index >= 0) databases[index] = next;
if (index >= 0) databases[index] = next;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 103
else databases.push(next);
else databases.push(next);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 104
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 105
writeConfig({ ...config, d1_databases: databases });
writeConfig({ ...config, d1_databases: databases });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 106
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 107
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 108
function ensureD1Database() {
function ensureD1Database() {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 109
const config = readConfig();
const config = readConfig();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 110
const configured = config.d1_databases?.find((db) => db.binding === 'DB');
const configured = config.d1_databases?.find((db) => db.binding === 'DB');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 111
const databaseName = configured?.database_name ?? dbNameFromConfig(config);
const databaseName = configured?.database_name ?? dbNameFromConfig(config);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 112
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 113
if (configured?.database_id) {
if (configured?.database_id) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 114
console.log(`D1 database configured: ${databaseName}`);
console.log(`D1 database configured: ${databaseName}`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 115
return databaseName;
return databaseName;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 116
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 117
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 118
const listResult = wrangler(['d1', 'list', '--json'], { capture: true });
const listResult = wrangler(['d1', 'list', '--json'], { capture: true });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 119
const databases = parseJsonOutput(listResult, []);
const databases = parseJsonOutput(listResult, []);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 120
const existing = Array.isArray(databases)
const existing = Array.isArray(databases)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 121
? databases.find((db) => db.name === databaseName && db.uuid)
? databases.find((db) => db.name === databaseName && db.uuid)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 122
: null;
: null;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 123
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 124
if (existing) {
if (existing) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 125
updateD1Config(existing);
updateD1Config(existing);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 126
console.log(`Reusing D1 database: ${databaseName}`);
console.log(`Reusing D1 database: ${databaseName}`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 127
return databaseName;
return databaseName;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 128
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 129
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 130
console.log(`Creating D1 database: ${databaseName}`);
console.log(`Creating D1 database: ${databaseName}`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 131
const createResult = wrangler(['d1', 'create', databaseName], { capture: true });
const createResult = wrangler(['d1', 'create', databaseName], { capture: true });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 132
const outputText = `${createResult.stdout ?? ''}\n${createResult.stderr ?? ''}`;
const outputText = `${createResult.stdout ?? ''}\n${createResult.stderr ?? ''}`;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 133
const id = outputText.match(/database_id\s*=\s*"([^"]+)"/)?.[1]
const id = outputText.match(/database_id\s*=\s*"([^"]+)"/)?.[1]
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 134
?? outputText.match(/"database_id"\s*:\s*"([^"]+)"/)?.[1]
?? outputText.match(/"database_id"\s*:\s*"([^"]+)"/)?.[1]
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 135
?? outputText.match(/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i)?.[1];
?? outputText.match(/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i)?.[1];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 136
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 137
if (!id) {
if (!id) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 138
console.log(outputText.trim());
console.log(outputText.trim());
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 139
fail('Could not read the new D1 database ID from Wrangler output.');
fail('Could not read the new D1 database ID from Wrangler output.');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 140
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 141
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 142
updateD1Config({ name: databaseName, uuid: id });
updateD1Config({ name: databaseName, uuid: id });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 143
return databaseName;
return databaseName;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 144
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 145
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 146
function listExistingSecrets() {
function listExistingSecrets() {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 147
const result = wrangler(['secret', 'list', '--format', 'json'], {
const result = wrangler(['secret', 'list', '--format', 'json'], {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 148
allowFailure: true,
allowFailure: true,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 149
capture: true,
capture: true,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 150
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 151
if ((result.status ?? 1) !== 0) return null;
if ((result.status ?? 1) !== 0) return null;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 152
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 153
const parsed = parseJsonOutput(result, []);
const parsed = parseJsonOutput(result, []);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 154
if (!Array.isArray(parsed)) return new Set();
if (!Array.isArray(parsed)) return new Set();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 155
return new Set(parsed.map((secret) => secret.name).filter(Boolean));
return new Set(parsed.map((secret) => secret.name).filter(Boolean));
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 156
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 157
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 158
async function promptForConfiguration() {
async function promptForConfiguration() {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 159
const rl = createInterface({ input, output });
const rl = createInterface({ input, output });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 160
try {
try {
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 161
console.log('\nGoogle + app + Stripe configuration\n');
console.log('\nGoogle + app + Stripe configuration\n');
Alex Nord
3 days ago
56fdb61
Remove personal domain defaults
- Full commit hash
56fdb6196bb38f86706331fa1d085936c70c7ac8- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 162
const appUrl = (await rl.question('Public URL, for example https://book.example.com: ')).trim().replace(/\/+$/, '');
const appUrl = (await rl.question('Public URL, for example https://book.example.com: ')).trim().replace(/\/+$/, '');
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 163
const adminEmail = (await rl.question('Google account allowed to administer this calendar: ')).trim();
const adminEmail = (await rl.question('Google account allowed to administer this calendar: ')).trim();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 164
const clientId = (await rl.question('Google OAuth Client ID: ')).trim();
const clientId = (await rl.question('Google OAuth Client ID: ')).trim();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 165
const clientSecret = (await rl.question('Google OAuth Client Secret: ')).trim();
const clientSecret = (await rl.question('Google OAuth Client Secret: ')).trim();
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 166
console.log('\nStripe configuration');
console.log('\nStripe configuration');
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 167
console.log('Use Stripe test-mode values while testing.');
console.log('Use Stripe test-mode values while testing.');
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 168
const stripeSecretKey = (await rl.question('Stripe Secret Key (sk_test_... or sk_live_...): ')).trim();
const stripeSecretKey = (await rl.question('Stripe Secret Key (sk_test_... or sk_live_...): ')).trim();
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 169
const stripeWebhookSecret = (await rl.question('Stripe Webhook Signing Secret (whsec_...): ')).trim();
const stripeWebhookSecret = (await rl.question('Stripe Webhook Signing Secret (whsec_...): ')).trim();
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 170
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 171
if (!/^https?:\/\//.test(appUrl)) {
if (!/^https?:\/\//.test(appUrl)) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 172
throw new Error('Public URL must begin with https:// (or http:// for local development).');
throw new Error('Public URL must begin with https:// (or http:// for local development).');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 173
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 174
if (!adminEmail || !clientId || !clientSecret) {
if (!adminEmail || !clientId || !clientSecret) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 175
throw new Error('Admin email and Google OAuth credentials are required.');
throw new Error('Admin email and Google OAuth credentials are required.');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 176
}
}
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 177
if (!/^sk_(test|live)_/.test(stripeSecretKey)) {
if (!/^sk_(test|live)_/.test(stripeSecretKey)) {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 178
throw new Error('Stripe Secret Key must begin with sk_test_ or sk_live_.');
throw new Error('Stripe Secret Key must begin with sk_test_ or sk_live_.');
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 179
}
}
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 180
if (!/^whsec_/.test(stripeWebhookSecret)) {
if (!/^whsec_/.test(stripeWebhookSecret)) {
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 181
throw new Error('Stripe Webhook Signing Secret must begin with whsec_.');
throw new Error('Stripe Webhook Signing Secret must begin with whsec_.');
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 182
}
}
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 183
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 184
console.log(`\nGoogle Authorized redirect URI (required):\n ${appUrl}/auth/google/callback`);
console.log(`\nGoogle Authorized redirect URI (required):\n ${appUrl}/auth/google/callback`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 185
console.log(`Google Authorized JavaScript origin (optional here):\n ${appUrl}\n`);
console.log(`Google Authorized JavaScript origin (optional here):\n ${appUrl}\n`);
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 186
return { appUrl, adminEmail, clientId, clientSecret, stripeSecretKey, stripeWebhookSecret };
return { appUrl, adminEmail, clientId, clientSecret, stripeSecretKey, stripeWebhookSecret };
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 187
} finally {
} finally {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 188
rl.close();
rl.close();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 189
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 190
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 191
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 192
function uploadSecrets(answers, existingSecrets) {
function uploadSecrets(answers, existingSecrets) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 193
const secrets = {
const secrets = {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 194
APP_URL: answers.appUrl,
APP_URL: answers.appUrl,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 195
ADMIN_EMAIL: answers.adminEmail,
ADMIN_EMAIL: answers.adminEmail,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 196
GOOGLE_CLIENT_ID: answers.clientId,
GOOGLE_CLIENT_ID: answers.clientId,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 197
GOOGLE_CLIENT_SECRET: answers.clientSecret,
GOOGLE_CLIENT_SECRET: answers.clientSecret,
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 198
STRIPE_SECRET_KEY: answers.stripeSecretKey,
STRIPE_SECRET_KEY: answers.stripeSecretKey,
same change
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 199
STRIPE_WEBHOOK_SECRET: answers.stripeWebhookSecret,
STRIPE_WEBHOOK_SECRET: answers.stripeWebhookSecret,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 200
};
};
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 201
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 202
if (!existingSecrets.has('SESSION_SECRET')) {
if (!existingSecrets.has('SESSION_SECRET')) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 203
secrets.SESSION_SECRET = randomBytes(48).toString('base64url');
secrets.SESSION_SECRET = randomBytes(48).toString('base64url');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 204
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 205
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 206
if (!existingSecrets.has('TOKEN_ENCRYPTION_KEY')) {
if (!existingSecrets.has('TOKEN_ENCRYPTION_KEY')) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 207
secrets.TOKEN_ENCRYPTION_KEY = randomBytes(32).toString('base64');
secrets.TOKEN_ENCRYPTION_KEY = randomBytes(32).toString('base64');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 208
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 209
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 210
const secretFile = path.join(root, `.meet-secrets-${process.pid}.json`);
const secretFile = path.join(root, `.meet-secrets-${process.pid}.json`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 211
try {
try {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 212
fs.writeFileSync(secretFile, JSON.stringify(secrets), { mode: 0o600 });
fs.writeFileSync(secretFile, JSON.stringify(secrets), { mode: 0o600 });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 213
const result = wrangler(['secret', 'bulk', secretFile], { allowFailure: true, capture: true });
const result = wrangler(['secret', 'bulk', secretFile], { allowFailure: true, capture: true });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 214
if ((result.status ?? 1) === 0) {
if ((result.status ?? 1) === 0) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 215
process.stdout.write(result.stdout ?? '');
process.stdout.write(result.stdout ?? '');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 216
process.stderr.write(result.stderr ?? '');
process.stderr.write(result.stderr ?? '');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 217
return;
return;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 218
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 219
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 220
const outputText = `${result.stdout ?? ''}\n${result.stderr ?? ''}`;
const outputText = `${result.stdout ?? ''}\n${result.stderr ?? ''}`;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 221
if (!/Worker ".+" not found|run `wrangler deploy` first/i.test(outputText)) {
if (!/Worker ".+" not found|run `wrangler deploy` first/i.test(outputText)) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 222
process.stdout.write(result.stdout ?? '');
process.stdout.write(result.stdout ?? '');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 223
process.stderr.write(result.stderr ?? '');
process.stderr.write(result.stderr ?? '');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 224
process.exit(result.status ?? 1);
process.exit(result.status ?? 1);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 225
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 226
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 227
console.log('Creating the Worker shell so secrets can be attached...');
console.log('Creating the Worker shell so secrets can be attached...');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 228
wrangler(['deploy']);
wrangler(['deploy']);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 229
wrangler(['secret', 'bulk', secretFile]);
wrangler(['secret', 'bulk', secretFile]);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 230
} finally {
} finally {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 231
fs.rmSync(secretFile, { force: true });
fs.rmSync(secretFile, { force: true });
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 232
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 233
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 234
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 235
function assertSecrets(existingSecrets) {
function assertSecrets(existingSecrets) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 236
const missing = requiredSecrets.filter((key) => !existingSecrets.has(key));
const missing = requiredSecrets.filter((key) => !existingSecrets.has(key));
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 237
if (missing.length) {
if (missing.length) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 238
fail(`Missing Worker secrets after upload: ${missing.join(', ')}`);
fail(`Missing Worker secrets after upload: ${missing.join(', ')}`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 239
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 240
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 241
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 242
ensureProjectRoot();
ensureProjectRoot();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 243
Alex Nord
3 days ago
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 244
console.log('\nSlot setup\n==========');
console.log('\nSlot setup\n==========');
Alex Nord
1 day ago
9abcc27
Added Stripe payments
- Full commit hash
9abcc271f095921a2c76e260009e53cda98d817a- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 245
console.log('Cloudflare + Google Calendar + Stripe. No GitHub Actions, no Pages project, no API token.\n');
console.log('Cloudflare + Google Calendar + Stripe. No GitHub Actions, no Pages project, no API token.\n');
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 246
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 247
if ((wrangler(['whoami'], { allowFailure: true, capture: true }).status ?? 1) !== 0) {
if ((wrangler(['whoami'], { allowFailure: true, capture: true }).status ?? 1) !== 0) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 248
console.log('Opening Cloudflare login...');
console.log('Opening Cloudflare login...');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 249
wrangler(['login']);
wrangler(['login']);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 250
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 251
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 252
console.log('\n1/6 Building the Worker and static assets...');
console.log('\n1/6 Building the Worker and static assets...');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 253
build();
build();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 254
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 255
console.log('\n2/6 Provisioning or reusing the D1 database...');
console.log('\n2/6 Provisioning or reusing the D1 database...');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 256
const databaseName = ensureD1Database();
const databaseName = ensureD1Database();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 257
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 258
console.log('\n3/6 Preparing Worker secrets...');
console.log('\n3/6 Preparing Worker secrets...');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 259
const existingSecrets = listExistingSecrets() ?? new Set();
const existingSecrets = listExistingSecrets() ?? new Set();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 260
const answers = await promptForConfiguration();
const answers = await promptForConfiguration();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 261
uploadSecrets(answers, existingSecrets);
uploadSecrets(answers, existingSecrets);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 262
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 263
console.log('\n4/6 Applying D1 migrations...');
console.log('\n4/6 Applying D1 migrations...');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 264
wrangler(['d1', 'migrations', 'apply', databaseName, '--remote']);
wrangler(['d1', 'migrations', 'apply', databaseName, '--remote']);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 265
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 266
console.log('\n5/6 Verifying Worker secrets...');
console.log('\n5/6 Verifying Worker secrets...');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 267
assertSecrets(listExistingSecrets() ?? new Set());
assertSecrets(listExistingSecrets() ?? new Set());
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 268
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 269
console.log('\n6/6 Deploying the Worker and static assets...');
console.log('\n6/6 Deploying the Worker and static assets...');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 270
wrangler(['deploy']);
wrangler(['deploy']);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 271
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 272
console.log('\nDone.\n');
console.log('\nDone.\n');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 273
console.log(`Booking page: ${answers.appUrl}`);
console.log(`Booking page: ${answers.appUrl}`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 274
console.log(`Admin: ${answers.appUrl}/admin`);
console.log(`Admin: ${answers.appUrl}/admin`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 275
console.log(`OAuth route: ${answers.appUrl}/auth/google/callback`);
console.log(`OAuth route: ${answers.appUrl}/auth/google/callback`);
Alex Nord
3 days ago
56fdb61
Remove personal domain defaults
- Full commit hash
56fdb6196bb38f86706331fa1d085936c70c7ac8- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 276
console.log('\nAttach a custom domain in Cloudflare Workers & Pages -> your Worker -> Settings -> Domains & Routes if you have not already done so.');
console.log('\nAttach a custom domain in Cloudflare Workers & Pages -> your Worker -> Settings -> Domains & Routes if you have not already done so.');
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 277
console.log('Then open /admin and connect the configured Google account.\n');
console.log('Then open /admin and connect the configured Google account.\n');