webspresso 0.0.104 → 0.0.106
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/.agents/AGENTS.md +21 -2
- package/.agents/ARCHITECTURE.md +23 -0
- package/.agents/CACHE.md +147 -0
- package/.agents/CLI.md +220 -8
- package/.agents/EARLY_HINTS.md +120 -0
- package/.agents/FLAGS.md +118 -0
- package/.agents/HEALTH.md +118 -0
- package/.agents/LIMITS.md +109 -0
- package/.agents/LOGGING.md +93 -0
- package/.agents/METRICS.md +127 -0
- package/.agents/MIGRATION_JOBS.md +95 -0
- package/.agents/ORM.md +155 -1
- package/.agents/PLUGINS.md +38 -3
- package/.agents/QUEUE.md +42 -0
- package/.agents/RATE_LIMIT.md +147 -0
- package/.agents/RESILIENCE.md +235 -0
- package/.agents/SCALE_OUT.md +109 -0
- package/.agents/SECRETS.md +117 -0
- package/AGENTS.md +16 -0
- package/README.md +2 -2
- package/bin/commands/add-aws.js +396 -0
- package/bin/commands/add-ci.js +523 -0
- package/bin/commands/add-cloudflare.js +240 -0
- package/bin/commands/add-cloudrun.js +381 -0
- package/bin/commands/add-docker.js +6 -6
- package/bin/commands/add-migration-job.js +396 -0
- package/bin/commands/assets-sync.js +209 -0
- package/bin/commands/client-generate.js +52 -0
- package/bin/commands/console.js +53 -0
- package/bin/commands/db-migrate.js +47 -2
- package/bin/commands/db-studio.js +84 -0
- package/bin/commands/deploy-check.js +242 -13
- package/bin/commands/dev.js +1 -1
- package/bin/commands/export.js +87 -0
- package/bin/commands/new.js +5 -5
- package/bin/commands/openapi.js +1 -1
- package/bin/commands/secrets-pull.js +208 -0
- package/bin/commands/start.js +1 -1
- package/bin/utils/db.js +7 -1
- package/bin/utils/project.js +2 -2
- package/bin/webspresso.js +22 -0
- package/core/app.js +421 -0
- package/core/auth/authenticate.js +93 -0
- package/core/auth/hash.js +5 -4
- package/core/auth/index.js +34 -4
- package/core/auth/jwt.js +5 -54
- package/core/auth/magic-link.js +4 -5
- package/core/auth/manager.js +53 -10
- package/core/auth/middleware.js +16 -68
- package/core/auth/oauth.js +8 -17
- package/core/auth/redis-session.js +1008 -0
- package/core/auth/sessions.js +156 -0
- package/core/auth/totp.js +2 -1
- package/core/cache/byte-size.js +123 -0
- package/core/cache/cdn.js +296 -0
- package/core/cache/index.js +33 -0
- package/core/cache/lru.js +477 -0
- package/core/cache/tagged-lru.js +354 -0
- package/core/commands/registry.js +6 -20
- package/core/console/commands.js +148 -0
- package/core/console/context.js +260 -0
- package/core/console/eval.js +70 -0
- package/core/console/index.js +22 -0
- package/core/console/repl.js +102 -0
- package/core/early-hints/index.js +267 -0
- package/core/errors/domain.js +49 -0
- package/core/errors/http.js +31 -0
- package/core/errors/index.js +10 -0
- package/core/errors/normalize.js +88 -2
- package/core/events/discovery.js +6 -24
- package/core/events/dispatcher.js +9 -7
- package/core/events/signal.js +7 -0
- package/core/export/discovery.js +191 -0
- package/core/export/exporter.js +277 -0
- package/core/export/index.js +24 -0
- package/core/flags/evaluator.js +252 -0
- package/core/flags/hasher.js +37 -0
- package/core/flags/index.js +21 -0
- package/core/flags/manager.js +263 -0
- package/core/flags/store.js +126 -0
- package/core/health/index.js +41 -0
- package/core/health/middleware.js +213 -0
- package/core/health/normalize.js +140 -0
- package/core/health/probes.js +203 -0
- package/core/http/adapter.js +74 -0
- package/core/http/express-adapter.js +46 -0
- package/core/http/hono-adapter.js +531 -0
- package/core/http/index.js +41 -0
- package/core/http/pipeline.js +485 -0
- package/core/index.js +336 -0
- package/core/limits/index.js +34 -0
- package/core/limits/middleware.js +325 -0
- package/core/limits/normalize.js +222 -0
- package/core/logger/formatters.js +264 -0
- package/core/logger/index.js +260 -0
- package/core/logger/trace.js +137 -0
- package/core/metrics/collectors.js +125 -0
- package/core/metrics/index.js +45 -0
- package/core/metrics/middleware.js +230 -0
- package/core/metrics/registry.js +366 -0
- package/core/orm/batch.js +70 -0
- package/core/orm/cache/fingerprint.js +2 -2
- package/core/orm/cache/memory-provider.js +27 -110
- package/core/orm/d1.js +265 -0
- package/core/orm/index.js +176 -13
- package/core/orm/json-fields.js +22 -8
- package/core/orm/migrate-cloud.js +194 -0
- package/core/orm/model.js +10 -0
- package/core/orm/pool.js +97 -0
- package/core/orm/query-builder.js +72 -9
- package/core/orm/repository.js +318 -19
- package/core/orm/schema-helpers.js +8 -10
- package/core/orm/scopes.js +321 -1
- package/core/orm/transaction.js +10 -2
- package/core/orm/utils.js +4 -86
- package/core/queue/adapters/cloudflare.js +131 -0
- package/core/queue/adapters/database.js +4 -8
- package/core/queue/adapters/pubsub.js +400 -0
- package/core/queue/adapters/sqs.js +419 -0
- package/core/queue/adapters/wait-until.js +77 -0
- package/core/queue/index.js +8 -0
- package/core/queue/manager.js +66 -41
- package/core/rate-limit/index.js +22 -0
- package/core/rate-limit/limiter.js +219 -0
- package/core/rate-limit/stores/memory.js +129 -0
- package/core/rate-limit/stores/redis.js +151 -0
- package/core/rate-limit/utils.js +112 -0
- package/core/resilience/circuit-breaker.js +422 -0
- package/core/resilience/errors.js +63 -0
- package/core/resilience/index.js +53 -0
- package/core/resilience/registry.js +97 -0
- package/core/resilience/retry.js +203 -0
- package/core/schema-cache.js +9 -2
- package/core/secrets/index.js +113 -0
- package/core/secrets/manager.js +308 -0
- package/core/secrets/providers/aws.js +288 -0
- package/core/secrets/providers/env.js +44 -0
- package/core/secrets/providers/gcp.js +307 -0
- package/core/secrets/providers/memory.js +76 -0
- package/core/shutdown/http-adapter.js +4 -1
- package/core/shutdown/shutdown-manager.js +129 -19
- package/core/stream/index.js +19 -0
- package/core/stream/text-stream.js +326 -0
- package/core/studio/index.js +43 -0
- package/core/studio/inspector.js +258 -0
- package/core/studio/server.js +325 -0
- package/core/studio/ui.js +681 -0
- package/core/utils/array.js +12 -0
- package/core/utils/base64url.js +8 -0
- package/core/utils/crypto.js +118 -0
- package/core/utils/ensure-leading-slash.js +6 -0
- package/core/utils/escape-regexp.js +7 -0
- package/core/utils/fetch.js +6 -5
- package/core/utils/fs.js +144 -0
- package/core/utils/hmac.js +6 -0
- package/core/utils/json.js +98 -0
- package/core/utils/object.js +106 -0
- package/core/utils/random.js +9 -0
- package/core/utils/regex.js +77 -0
- package/core/utils/sha256.js +6 -0
- package/core/utils/string.js +87 -0
- package/core/utils/strip-trailing-slash.js +6 -0
- package/core/utils/time.js +96 -0
- package/core/utils/timeout.js +348 -0
- package/core/utils/url.js +106 -0
- package/core/utils/walk.js +7 -0
- package/index.d.ts +1549 -2
- package/index.js +272 -2
- package/package.json +3 -2
- package/plugins/admin-panel/core/api-extensions.js +2 -5
- package/plugins/admin-panel/index.js +13 -6
- package/plugins/admin-panel/modules/menu.js +1 -1
- package/plugins/api-key/crypto.js +3 -3
- package/plugins/api-key/index.js +3 -2
- package/plugins/api-key/scopes.js +5 -7
- package/plugins/audit-log/api-handlers.js +6 -15
- package/plugins/audit-log/index.js +3 -1
- package/plugins/audit-log/parse.js +3 -3
- package/plugins/basic-auth/index.js +3 -2
- package/plugins/cors.js +3 -2
- package/plugins/csrf/index.js +9 -12
- package/plugins/csv/index.js +8 -5
- package/plugins/dashboard/app.js +2 -2
- package/plugins/dashboard/index.js +5 -5
- package/plugins/data-exchange/record-selection.js +2 -5
- package/plugins/email/api-handlers.js +5 -18
- package/plugins/email/auth-bridge.js +3 -2
- package/plugins/email/index.js +11 -9
- package/plugins/health-check.js +2 -1
- package/plugins/index.js +5 -0
- package/plugins/lazy.js +5 -6
- package/plugins/mcp/discovery.js +18 -17
- package/plugins/polar/src/api.js +2 -1
- package/plugins/polar/src/webhooks.js +5 -6
- package/plugins/queue/index.js +18 -2
- package/plugins/rate-limit/index.js +3 -1
- package/plugins/redirect/index.js +16 -9
- package/plugins/rls/index.js +170 -0
- package/plugins/seo-checker/index.js +2 -2
- package/plugins/site-analytics/index.js +3 -1
- package/plugins/site-analytics/tracking.js +2 -2
- package/plugins/sitemap.js +3 -2
- package/plugins/swagger.js +12 -5
- package/plugins/upload/gcs-provider.js +148 -0
- package/plugins/upload/index.js +136 -77
- package/plugins/upload/orphan-pruner.js +4 -3
- package/plugins/upload/s3-provider.js +257 -0
- package/plugins/webhooks/crypto.js +6 -11
- package/plugins/webhooks/dispatcher.js +8 -8
- package/plugins/webhooks/index.js +33 -23
- package/plugins/webhooks/matcher.js +7 -11
- package/plugins/webhooks/sender.js +8 -11
- package/plugins/xlsx/index.js +7 -5
- package/src/api/api-loader.js +12 -95
- package/src/api/define-api.js +1 -0
- package/src/app-context.js +41 -5
- package/src/client-runtime/constants.js +10 -0
- package/src/client-runtime/mount.js +2 -3
- package/src/dev/banner.js +6 -2
- package/src/dev/client-gen.js +458 -0
- package/src/discovery/scan-routes.js +5 -2
- package/src/file-router.js +3 -3
- package/src/helpers.js +212 -24
- package/src/modules/module-discovery.js +1 -9
- package/src/pages/page-loader.js +13 -154
- package/src/plugin-manager.js +99 -18
- package/src/server.js +335 -133
- package/src/services/discovery.js +19 -40
- package/src/services/executor.js +95 -25
- package/src/services/memoize.js +3 -25
- package/src/services/registry.js +15 -1
- package/src/services/validator.js +38 -20
- package/src/template/precompile.js +8 -19
package/bin/commands/openapi.js
CHANGED
|
@@ -23,7 +23,7 @@ function registerCommand(program) {
|
|
|
23
23
|
.option('--title <title>', 'OpenAPI specification title override')
|
|
24
24
|
.option('--api-version <version>', 'OpenAPI specification version override')
|
|
25
25
|
.option('--description <desc>', 'OpenAPI specification description override')
|
|
26
|
-
.option('--server <url>', 'Default server URL in spec', 'http://localhost:
|
|
26
|
+
.option('--server <url>', 'Default server URL in spec', 'http://localhost:7331')
|
|
27
27
|
.option('--include-orm', 'Include ORM model schemas in components', false)
|
|
28
28
|
.option('--indent <spaces>', 'JSON indentation spaces', '2')
|
|
29
29
|
.option('-p, --print', 'Print specification JSON to stdout', false)
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: webspresso secrets:pull
|
|
3
|
+
* Pulls production/staging secrets from Google Cloud Secret Manager or AWS Secrets Manager into a local .env.local file.
|
|
4
|
+
*
|
|
5
|
+
* @module bin/commands/secrets-pull
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const { createSecretManager } = require('../../core/secrets');
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Format key-value pairs as .env file content
|
|
16
|
+
* @param {Record<string, string>} entries
|
|
17
|
+
* @returns {string}
|
|
18
|
+
*/
|
|
19
|
+
function formatEnvFile(entries) {
|
|
20
|
+
const lines = [
|
|
21
|
+
'# Generated by Webspresso (webspresso secrets:pull)',
|
|
22
|
+
`# Date: ${new Date().toISOString()}`,
|
|
23
|
+
'',
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
for (const [key, val] of Object.entries(entries)) {
|
|
27
|
+
const stringVal = String(val ?? '');
|
|
28
|
+
// Wrap in quotes if it contains spaces, newlines, or quotes
|
|
29
|
+
if (stringVal.includes('\n') || stringVal.includes(' ') || stringVal.includes('"') || stringVal.includes('#')) {
|
|
30
|
+
const escaped = stringVal.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n');
|
|
31
|
+
lines.push(`${key}="${escaped}"`);
|
|
32
|
+
} else {
|
|
33
|
+
lines.push(`${key}=${stringVal}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return lines.join('\n') + '\n';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Extract keys from an existing .env or .env.example file to know which secrets to pull
|
|
42
|
+
* @param {string} cwd
|
|
43
|
+
* @returns {string[]}
|
|
44
|
+
*/
|
|
45
|
+
function discoverExpectedSecretKeys(cwd) {
|
|
46
|
+
const candidates = ['.env.example', '.env.template', '.env.production', '.env'];
|
|
47
|
+
for (const candidate of candidates) {
|
|
48
|
+
const fullPath = path.join(cwd, candidate);
|
|
49
|
+
if (fs.existsSync(fullPath)) {
|
|
50
|
+
try {
|
|
51
|
+
const content = fs.readFileSync(fullPath, 'utf8');
|
|
52
|
+
const keys = [];
|
|
53
|
+
for (const line of content.split('\n')) {
|
|
54
|
+
const trimmed = line.trim();
|
|
55
|
+
if (trimmed && !trimmed.startsWith('#') && trimmed.includes('=')) {
|
|
56
|
+
const key = trimmed.split('=')[0].trim();
|
|
57
|
+
if (key) keys.push(key);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (keys.length > 0) return keys;
|
|
61
|
+
} catch (_) {}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return ['SESSION_SECRET', 'DATABASE_URL', 'REDIS_URL'];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Execute secrets:pull command logic
|
|
69
|
+
* @param {Object} options
|
|
70
|
+
* @returns {Promise<{ success: boolean, count: number, output: string, values: Record<string, string> }>}
|
|
71
|
+
*/
|
|
72
|
+
async function runSecretsPull(options = {}) {
|
|
73
|
+
const cwd = options.cwd || process.cwd();
|
|
74
|
+
const platform = options.platform || 'auto';
|
|
75
|
+
const format = options.format || 'env';
|
|
76
|
+
const outputFile = options.output || '.env.local';
|
|
77
|
+
const dryRun = Boolean(options.dryRun);
|
|
78
|
+
|
|
79
|
+
const manager = createSecretManager({
|
|
80
|
+
provider: platform,
|
|
81
|
+
projectId: options.project,
|
|
82
|
+
region: options.region,
|
|
83
|
+
cache: false,
|
|
84
|
+
httpTransport: options.httpTransport,
|
|
85
|
+
token: options.token,
|
|
86
|
+
credentials: options.credentials,
|
|
87
|
+
accessKeyId: options.accessKeyId,
|
|
88
|
+
secretAccessKey: options.secretAccessKey,
|
|
89
|
+
...options,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const pulledValues = {};
|
|
93
|
+
|
|
94
|
+
// 1. Pull JSON secret bundle if specified
|
|
95
|
+
if (options.bundle) {
|
|
96
|
+
const bundleContent = await manager.loadBundle(options.bundle, { inject: false });
|
|
97
|
+
Object.assign(pulledValues, bundleContent);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// 2. Pull individual secrets
|
|
101
|
+
let secretKeys = [];
|
|
102
|
+
if (options.secrets && options.secrets.length > 0) {
|
|
103
|
+
secretKeys = Array.isArray(options.secrets) ? options.secrets : String(options.secrets).split(',').map((s) => s.trim());
|
|
104
|
+
} else if (!options.bundle) {
|
|
105
|
+
secretKeys = discoverExpectedSecretKeys(cwd);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
for (const item of secretKeys) {
|
|
109
|
+
if (!item) continue;
|
|
110
|
+
let envKey = item;
|
|
111
|
+
let secretName = item;
|
|
112
|
+
|
|
113
|
+
if (item.includes('=')) {
|
|
114
|
+
const parts = item.split('=');
|
|
115
|
+
envKey = parts[0].trim();
|
|
116
|
+
secretName = parts[1].trim();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
const val = await manager.get(secretName);
|
|
121
|
+
if (val !== null && val !== undefined) {
|
|
122
|
+
pulledValues[envKey] = typeof val === 'object' ? JSON.stringify(val) : String(val);
|
|
123
|
+
}
|
|
124
|
+
} catch (_) {
|
|
125
|
+
// Secret not found or network error, skip
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const count = Object.keys(pulledValues).length;
|
|
130
|
+
const formattedContent = format === 'json'
|
|
131
|
+
? JSON.stringify(pulledValues, null, 2)
|
|
132
|
+
: formatEnvFile(pulledValues);
|
|
133
|
+
|
|
134
|
+
if (!dryRun && count > 0) {
|
|
135
|
+
const outputPath = path.isAbsolute(outputFile) ? outputFile : path.join(cwd, outputFile);
|
|
136
|
+
fs.writeFileSync(outputPath, formattedContent, 'utf8');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return {
|
|
140
|
+
success: count > 0,
|
|
141
|
+
count,
|
|
142
|
+
output: formattedContent,
|
|
143
|
+
values: pulledValues,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Register command with Commander
|
|
149
|
+
* @param {import('commander').Command} program
|
|
150
|
+
*/
|
|
151
|
+
function registerCommand(program) {
|
|
152
|
+
program
|
|
153
|
+
.command('secrets:pull')
|
|
154
|
+
.alias('pull:secrets')
|
|
155
|
+
.alias('secrets:fetch')
|
|
156
|
+
.description('Pull secrets from Google Cloud Secret Manager or AWS Secrets Manager into a local .env.local file')
|
|
157
|
+
.option('-p, --platform <platform>', 'Cloud platform (cloudrun, gcp, aws, or auto)', 'auto')
|
|
158
|
+
.option('-s, --secrets <names...>', 'Secret identifiers or key=secret mappings')
|
|
159
|
+
.option('-b, --bundle <name>', 'JSON secret bundle name to unpack')
|
|
160
|
+
.option('-o, --output <file>', 'Output destination file', '.env.local')
|
|
161
|
+
.option('--format <format>', 'Output format (env or json)', 'env')
|
|
162
|
+
.option('--project <projectId>', 'GCP Project ID override')
|
|
163
|
+
.option('--region <region>', 'AWS Region override')
|
|
164
|
+
.option('--dry-run', 'Print pulled secrets to stdout without writing file', false)
|
|
165
|
+
.action(async (...actionArgs) => {
|
|
166
|
+
const cmd = actionArgs[actionArgs.length - 1];
|
|
167
|
+
const options = (cmd && typeof cmd.opts === 'function')
|
|
168
|
+
? cmd.opts()
|
|
169
|
+
: (actionArgs.find((a) => a && typeof a === 'object') || {});
|
|
170
|
+
|
|
171
|
+
console.log('\n🔐 Webspresso Cloud Secrets Pull');
|
|
172
|
+
console.log('=================================');
|
|
173
|
+
console.log(`Target Platform : ${(options.platform || 'auto').toUpperCase()}`);
|
|
174
|
+
console.log(`Destination : ${options.dryRun ? 'STDOUT (dry-run)' : options.output || '.env.local'}\n`);
|
|
175
|
+
|
|
176
|
+
try {
|
|
177
|
+
const result = await runSecretsPull({
|
|
178
|
+
cwd: process.cwd(),
|
|
179
|
+
...options,
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
if (options.dryRun) {
|
|
183
|
+
console.log(result.output);
|
|
184
|
+
} else {
|
|
185
|
+
if (result.count === 0) {
|
|
186
|
+
console.log('⚠️ No secrets could be resolved from the cloud provider.');
|
|
187
|
+
console.log('👉 Tip: Check your cloud credentials or pass secret names with: -s SESSION_SECRET DATABASE_URL\n');
|
|
188
|
+
} else {
|
|
189
|
+
console.log(`✅ Successfully pulled ${result.count} secret(s) to ${options.output || '.env.local'}.\n`);
|
|
190
|
+
for (const key of Object.keys(result.values)) {
|
|
191
|
+
console.log(` ✓ ${key}`);
|
|
192
|
+
}
|
|
193
|
+
console.log('');
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
} catch (err) {
|
|
197
|
+
console.error(`❌ Failed to pull secrets: ${err.message}\n`);
|
|
198
|
+
process.exit(1);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
module.exports = {
|
|
204
|
+
registerCommand,
|
|
205
|
+
runSecretsPull,
|
|
206
|
+
formatEnvFile,
|
|
207
|
+
discoverExpectedSecretKeys,
|
|
208
|
+
};
|
package/bin/commands/start.js
CHANGED
|
@@ -10,7 +10,7 @@ function registerCommand(program) {
|
|
|
10
10
|
program
|
|
11
11
|
.command('start')
|
|
12
12
|
.description('Start production server')
|
|
13
|
-
.option('-p, --port <port>', 'Port number', '
|
|
13
|
+
.option('-p, --port <port>', 'Port number', '7331')
|
|
14
14
|
.action((options) => {
|
|
15
15
|
if (!fs.existsSync('server.js')) {
|
|
16
16
|
console.error('❌ server.js not found! Make sure you are in a Webspresso project.');
|
package/bin/utils/db.js
CHANGED
|
@@ -38,7 +38,13 @@ function resolveDbConfigIfExists(configPath) {
|
|
|
38
38
|
for (const p of paths) {
|
|
39
39
|
const fullPath = path.resolve(process.cwd(), p);
|
|
40
40
|
if (fs.existsSync(fullPath)) {
|
|
41
|
-
|
|
41
|
+
try {
|
|
42
|
+
if (fs.statSync(fullPath).isFile()) {
|
|
43
|
+
return { config: require(fullPath), path: fullPath };
|
|
44
|
+
}
|
|
45
|
+
} catch {
|
|
46
|
+
// ignore
|
|
47
|
+
}
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
return null;
|
package/bin/utils/project.js
CHANGED
|
@@ -56,7 +56,7 @@ function startDevServer(projectPath, useTailwind) {
|
|
|
56
56
|
stdio: 'inherit',
|
|
57
57
|
shell: true,
|
|
58
58
|
cwd: projectPath,
|
|
59
|
-
env: { ...process.env, PORT: process.env.PORT || '
|
|
59
|
+
env: { ...process.env, PORT: process.env.PORT || '7331', NODE_ENV: 'development' }
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
// Handle exit
|
|
@@ -77,7 +77,7 @@ function startDevServer(projectPath, useTailwind) {
|
|
|
77
77
|
stdio: 'inherit',
|
|
78
78
|
shell: true,
|
|
79
79
|
cwd: projectPath,
|
|
80
|
-
env: { ...process.env, PORT: process.env.PORT || '
|
|
80
|
+
env: { ...process.env, PORT: process.env.PORT || '7331', NODE_ENV: 'development' }
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
server.on('exit', (code) => {
|
package/bin/webspresso.js
CHANGED
|
@@ -24,6 +24,7 @@ const { registerCommand: registerAddEsbuild } = require('./commands/add-esbuild'
|
|
|
24
24
|
const { registerCommand: registerDbMigrate } = require('./commands/db-migrate');
|
|
25
25
|
const { registerCommand: registerDbRollback } = require('./commands/db-rollback');
|
|
26
26
|
const { registerCommand: registerDbStatus } = require('./commands/db-status');
|
|
27
|
+
const { registerCommand: registerDbStudio } = require('./commands/db-studio');
|
|
27
28
|
const { registerCommand: registerDbMake } = require('./commands/db-make');
|
|
28
29
|
const { registerCommand: registerDbScaffold } = require('./commands/db-scaffold');
|
|
29
30
|
const { registerCommand: registerDbMakeMigrations } = require('./commands/db-makemigrations');
|
|
@@ -49,7 +50,15 @@ const { registerCommand: registerMakeJob } = require('./commands/make-job');
|
|
|
49
50
|
const { registerCommand: registerOpenapi } = require('./commands/openapi');
|
|
50
51
|
const { registerCommand: registerTypegen } = require('./commands/typegen');
|
|
51
52
|
const { registerCommand: registerAddDocker } = require('./commands/add-docker');
|
|
53
|
+
const { registerCommand: registerAddCloudflare } = require('./commands/add-cloudflare');
|
|
54
|
+
const { registerCommand: registerAddCloudrun } = require('./commands/add-cloudrun');
|
|
55
|
+
const { registerCommand: registerAddAws } = require('./commands/add-aws');
|
|
56
|
+
const { registerCommand: registerAddCi } = require('./commands/add-ci');
|
|
57
|
+
const { registerCommand: registerAddMigrationJob } = require('./commands/add-migration-job');
|
|
58
|
+
const { registerCommand: registerAssetsSync } = require('./commands/assets-sync');
|
|
59
|
+
const { registerCommand: registerExport } = require('./commands/export');
|
|
52
60
|
const { registerCommand: registerDeployCheck } = require('./commands/deploy-check');
|
|
61
|
+
const { registerCommand: registerSecretsPull } = require('./commands/secrets-pull');
|
|
53
62
|
const { registerCommand: registerRun } = require('./commands/run');
|
|
54
63
|
const { registerCommand: registerList } = require('./commands/list');
|
|
55
64
|
const { registerCommand: registerMakeCommand } = require('./commands/make-command');
|
|
@@ -57,6 +66,8 @@ const { registerCommand: registerMakePolicy } = require('./commands/make-policy'
|
|
|
57
66
|
const { registerCommand: registerMakeFactory } = require('./commands/make-factory');
|
|
58
67
|
const { registerCommand: registerMakeEvent } = require('./commands/make-event');
|
|
59
68
|
const { registerCommand: registerMakeMail } = require('./commands/make-mail');
|
|
69
|
+
const { registerCommand: registerClientGen } = require('./commands/client-generate');
|
|
70
|
+
const { registerCommand: registerConsole } = require('./commands/console');
|
|
60
71
|
|
|
61
72
|
registerNew(program);
|
|
62
73
|
registerPage(program);
|
|
@@ -64,12 +75,20 @@ registerApi(program);
|
|
|
64
75
|
registerDev(program);
|
|
65
76
|
registerStart(program);
|
|
66
77
|
registerBuild(program);
|
|
78
|
+
registerExport(program);
|
|
67
79
|
registerAddTailwind(program);
|
|
68
80
|
registerAddEsbuild(program);
|
|
69
81
|
registerAddDocker(program);
|
|
82
|
+
registerAddCloudflare(program);
|
|
83
|
+
registerAddCloudrun(program);
|
|
84
|
+
registerAddAws(program);
|
|
85
|
+
registerAddCi(program);
|
|
86
|
+
registerAddMigrationJob(program);
|
|
87
|
+
registerAssetsSync(program);
|
|
70
88
|
registerDbMigrate(program);
|
|
71
89
|
registerDbRollback(program);
|
|
72
90
|
registerDbStatus(program);
|
|
91
|
+
registerDbStudio(program);
|
|
73
92
|
registerDbMake(program);
|
|
74
93
|
registerDbScaffold(program);
|
|
75
94
|
registerDbMakeMigrations(program);
|
|
@@ -84,6 +103,7 @@ registerQueuePrune(program);
|
|
|
84
103
|
registerUploadPrune(program);
|
|
85
104
|
registerDoctor(program);
|
|
86
105
|
registerDeployCheck(program);
|
|
106
|
+
registerSecretsPull(program);
|
|
87
107
|
registerUpgrade(program);
|
|
88
108
|
registerOrmMap(program);
|
|
89
109
|
registerService(program);
|
|
@@ -102,6 +122,8 @@ registerRun(program);
|
|
|
102
122
|
registerList(program);
|
|
103
123
|
registerOpenapi(program);
|
|
104
124
|
registerTypegen(program);
|
|
125
|
+
registerClientGen(program);
|
|
126
|
+
registerConsole(program);
|
|
105
127
|
|
|
106
128
|
// Parse arguments
|
|
107
129
|
program.parse();
|