@zintrust/core 0.1.22 → 0.1.23
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/bin/z.d.ts +1 -1
- package/bin/z.js +1 -1
- package/bin/zin.d.ts +1 -1
- package/bin/zin.js +1 -1
- package/bin/zintrust-main.d.ts +1 -1
- package/bin/zintrust-main.js +2 -2
- package/bin/zintrust-microservices.d.ts +1 -1
- package/bin/zintrust-microservices.js +1 -1
- package/bin/zintrust.d.ts +1 -1
- package/bin/zintrust.js +1 -1
- package/bin/zt.d.ts +1 -1
- package/bin/zt.js +1 -1
- package/package.json +2 -3
- package/public/index.html +3 -3
- package/routes/api.js +1 -1
- package/routes/health.d.ts +3 -4
- package/routes/health.d.ts.map +1 -1
- package/routes/health.js +3 -125
- package/src/boot/Application.d.ts.map +1 -1
- package/src/boot/Application.js +11 -22
- package/src/boot/bootstrap.d.ts +1 -1
- package/src/boot/bootstrap.js +48 -7
- package/src/builder/BundleOptimizer.d.ts +1 -1
- package/src/builder/BundleOptimizer.js +1 -1
- package/src/cache/drivers/KVRemoteDriver.d.ts +1 -1
- package/src/cache/drivers/KVRemoteDriver.js +1 -1
- package/src/cli/CLI.d.ts.map +1 -1
- package/src/cli/CLI.js +15 -1
- package/src/cli/ErrorHandler.js +3 -3
- package/src/cli/commands/AddCommand.d.ts +1 -1
- package/src/cli/commands/AddCommand.d.ts.map +1 -1
- package/src/cli/commands/AddCommand.js +1 -1
- package/src/cli/commands/DbSeedCommand.js +1 -1
- package/src/cli/commands/MakeMailTemplateCommand.js +2 -1
- package/src/cli/commands/MakeNotificationTemplateCommand.js +2 -1
- package/src/cli/commands/MigrateWorkerCommand.d.ts +9 -0
- package/src/cli/commands/MigrateWorkerCommand.d.ts.map +1 -0
- package/src/cli/commands/MigrateWorkerCommand.js +182 -0
- package/src/cli/commands/NewCommand.d.ts +1 -1
- package/src/cli/commands/NewCommand.d.ts.map +1 -1
- package/src/cli/commands/NewCommand.js +21 -7
- package/src/cli/commands/PublishCommand.d.ts +5 -0
- package/src/cli/commands/PublishCommand.d.ts.map +1 -0
- package/src/cli/commands/PublishCommand.js +54 -0
- package/src/cli/commands/QACommand.js +4 -4
- package/src/cli/commands/ResourceControlCommand.d.ts +6 -0
- package/src/cli/commands/ResourceControlCommand.d.ts.map +1 -0
- package/src/cli/commands/ResourceControlCommand.js +43 -0
- package/src/cli/commands/SimulateCommand.d.ts +1 -1
- package/src/cli/commands/SimulateCommand.js +4 -4
- package/src/cli/commands/StartCommand.d.ts.map +1 -1
- package/src/cli/commands/StartCommand.js +19 -7
- package/src/cli/commands/UpgradeCommand.d.ts +1 -1
- package/src/cli/commands/UpgradeCommand.js +2 -2
- package/src/cli/commands/WorkerCommands.d.ts +17 -0
- package/src/cli/commands/WorkerCommands.d.ts.map +1 -0
- package/src/cli/commands/WorkerCommands.js +264 -0
- package/src/cli/commands/index.d.ts +2 -0
- package/src/cli/commands/index.d.ts.map +1 -1
- package/src/cli/commands/index.js +2 -0
- package/src/cli/config/ConfigSchema.d.ts +1 -1
- package/src/cli/config/ConfigSchema.d.ts.map +1 -1
- package/src/cli/config/ConfigSchema.js +4 -3
- package/src/cli/scaffolding/ProjectScaffolder.js +5 -5
- package/src/cli/scaffolding/RouteGenerator.d.ts.map +1 -1
- package/src/cli/scaffolding/RouteGenerator.js +21 -2
- package/src/cli/scaffolding/TemplateEngine.js +1 -1
- package/src/cli/utils/EnvFileLoader.d.ts.map +1 -1
- package/src/common/ExternalServiceUtils.d.ts +63 -0
- package/src/common/ExternalServiceUtils.d.ts.map +1 -0
- package/src/common/ExternalServiceUtils.js +116 -0
- package/src/common/HealthRoutes.d.ts +10 -0
- package/src/common/HealthRoutes.d.ts.map +1 -0
- package/src/common/HealthRoutes.js +114 -0
- package/src/config/SecretsManager.d.ts.map +1 -1
- package/src/config/SecretsManager.js +2 -1
- package/src/config/app.d.ts +2 -1
- package/src/config/app.d.ts.map +1 -1
- package/src/config/app.js +98 -52
- package/src/config/broadcast.d.ts.map +1 -1
- package/src/config/broadcast.js +1 -1
- package/src/config/cache.d.ts.map +1 -1
- package/src/config/cache.js +2 -2
- package/src/config/database.d.ts.map +1 -1
- package/src/config/database.js +24 -5
- package/src/config/env.d.ts +43 -1
- package/src/config/env.d.ts.map +1 -1
- package/src/config/env.js +68 -21
- package/src/config/index.d.ts +10 -1
- package/src/config/index.d.ts.map +1 -1
- package/src/config/index.js +1 -0
- package/src/config/mail.d.ts.map +1 -1
- package/src/config/mail.js +3 -3
- package/src/config/middleware.d.ts.map +1 -1
- package/src/config/middleware.js +1 -1
- package/src/config/notification.d.ts.map +1 -1
- package/src/config/notification.js +2 -2
- package/src/config/queue.d.ts +14 -0
- package/src/config/queue.d.ts.map +1 -1
- package/src/config/queue.js +61 -36
- package/src/config/security.js +2 -2
- package/src/config/storage.d.ts.map +1 -1
- package/src/config/storage.js +1 -1
- package/src/config/type.d.ts +111 -0
- package/src/config/type.d.ts.map +1 -1
- package/src/config/workers.d.ts +13 -0
- package/src/config/workers.d.ts.map +1 -0
- package/src/config/workers.js +173 -0
- package/src/database/Paginator.d.ts +37 -0
- package/src/database/Paginator.d.ts.map +1 -0
- package/src/database/Paginator.js +81 -0
- package/src/exceptions/ZintrustError.d.ts +5 -2
- package/src/exceptions/ZintrustError.d.ts.map +1 -1
- package/src/exceptions/ZintrustError.js +6 -2
- package/src/features/Auth.d.ts +1 -1
- package/src/features/Auth.d.ts.map +1 -1
- package/src/features/Auth.js +3 -2
- package/src/features/Queue.d.ts.map +1 -1
- package/src/features/Queue.js +0 -2
- package/src/index.d.ts +15 -5
- package/src/index.d.ts.map +1 -1
- package/src/index.js +24 -3
- package/src/microservices/MicroserviceBootstrap.d.ts.map +1 -1
- package/src/microservices/MicroserviceBootstrap.js +3 -1
- package/src/microservices/MicroserviceGenerator.js +4 -4
- package/src/microservices/MicroserviceManager.d.ts +1 -1
- package/src/microservices/MicroserviceManager.js +1 -1
- package/src/middleware/RateLimiter.d.ts.map +1 -1
- package/src/middleware/RateLimiter.js +4 -3
- package/src/node-singletons/crypto.d.ts +1 -1
- package/src/node-singletons/crypto.d.ts.map +1 -1
- package/src/node-singletons/crypto.js +1 -1
- package/src/node-singletons/os.d.ts +10 -1
- package/src/node-singletons/os.d.ts.map +1 -1
- package/src/node-singletons/os.js +10 -1
- package/src/openapi/OpenApiGenerator.js +2 -2
- package/src/orm/ConnectionManager.d.ts +1 -1
- package/src/orm/ConnectionManager.d.ts.map +1 -1
- package/src/orm/ConnectionManager.js +37 -19
- package/src/orm/Model.d.ts +8 -1
- package/src/orm/Model.d.ts.map +1 -1
- package/src/orm/Model.js +85 -24
- package/src/orm/QueryBuilder.d.ts +12 -2
- package/src/orm/QueryBuilder.d.ts.map +1 -1
- package/src/orm/QueryBuilder.js +438 -38
- package/src/orm/Relationships.d.ts +61 -1
- package/src/orm/Relationships.d.ts.map +1 -1
- package/src/orm/Relationships.js +190 -0
- package/src/orm/adapters/D1RemoteAdapter.d.ts +1 -1
- package/src/orm/adapters/D1RemoteAdapter.js +1 -1
- package/src/performance/Optimizer.d.ts.map +1 -1
- package/src/performance/Optimizer.js +2 -4
- package/src/routing/CoreRoutes.d.ts +1 -1
- package/src/routing/CoreRoutes.d.ts.map +1 -1
- package/src/routing/CoreRoutes.js +2 -116
- package/src/routing/error.d.ts.map +1 -1
- package/src/routing/error.js +3 -2
- package/src/routing/publicRoot.d.ts.map +1 -1
- package/src/routing/publicRoot.js +4 -2
- package/src/runtime/PluginAutoImports.d.ts.map +1 -1
- package/src/runtime/PluginAutoImports.js +20 -4
- package/src/runtime/PluginManager.d.ts.map +1 -1
- package/src/runtime/PluginManager.js +23 -6
- package/src/runtime/RuntimeAdapter.d.ts +3 -3
- package/src/runtime/RuntimeAdapter.d.ts.map +1 -1
- package/src/runtime/StartupConfigFileRegistry.d.ts +2 -1
- package/src/runtime/StartupConfigFileRegistry.d.ts.map +1 -1
- package/src/runtime/StartupConfigFileRegistry.js +2 -1
- package/src/runtime/adapters/CloudflareAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/CloudflareAdapter.js +1 -1
- package/src/runtime/adapters/DenoAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/DenoAdapter.js +1 -1
- package/src/runtime/adapters/FargateAdapter.d.ts +2 -2
- package/src/runtime/adapters/FargateAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/FargateAdapter.js +1 -1
- package/src/runtime/adapters/LambdaAdapter.d.ts +1 -1
- package/src/runtime/adapters/LambdaAdapter.d.ts.map +1 -1
- package/src/runtime/adapters/LambdaAdapter.js +6 -4
- package/src/runtime/adapters/NodeServerAdapter.js +1 -1
- package/src/scripts/GenerateEnvArtifacts.js +1 -1
- package/src/security/SignedRequest.js +1 -1
- package/src/security/StartupSecretValidation.d.ts.map +1 -1
- package/src/security/StartupSecretValidation.js +7 -1
- package/src/start.d.ts.map +1 -1
- package/src/start.js +0 -2
- package/src/templates/features/Auth.ts.tpl +4 -4
- package/src/templates/project/basic/README.md.tpl +1 -1
- package/src/templates/project/basic/app/Middleware/index.ts.tpl +1 -1
- package/src/templates/project/basic/config/notification.ts.tpl +1 -1
- package/src/templates/project/basic/routes/api.ts.tpl +1 -3
- package/src/templates/project/basic/src/index.ts.tpl +1 -1
- package/src/templates/project/basic/src/zintrust.plugins.ts.tpl +1 -1
- package/src/templates/project/basic/template.json +1 -1
- package/src/toolkit/Secrets/index.d.ts.map +1 -1
- package/src/toolkit/Secrets/index.js +13 -9
- package/src/toolkit/Secrets/providers/AwsSecretsManager.d.ts.map +1 -1
- package/src/toolkit/Secrets/providers/AwsSecretsManager.js +20 -7
- package/src/toolkit/Secrets/providers/CloudflareKv.d.ts.map +1 -1
- package/src/toolkit/Secrets/providers/CloudflareKv.js +19 -6
- package/src/tools/http/Http.js +1 -1
- package/src/tools/mail/drivers/Ses.d.ts.map +1 -1
- package/src/tools/mail/drivers/Ses.js +5 -4
- package/src/tools/mail/templates/index.js +2 -2
- package/src/tools/notification/drivers/Termii.d.ts.map +1 -1
- package/src/tools/notification/drivers/Termii.js +6 -17
- package/src/tools/notification/testingHelpers.d.ts.map +1 -1
- package/src/tools/queue/Queue.d.ts.map +1 -1
- package/src/tools/queue/Queue.js +3 -5
- package/src/tools/queue/drivers/Redis.d.ts.map +1 -1
- package/src/tools/queue/drivers/Redis.js +7 -1
- package/src/tools/storage/drivers/S3.d.ts.map +1 -1
- package/src/tools/storage/drivers/S3.js +16 -3
- package/src/routes/health.d.ts +0 -2
- package/src/routes/health.d.ts.map +0 -1
- package/src/routes/health.js +0 -1
- package/src/runtime/RuntimeDetector.d.ts +0 -15
- package/src/runtime/RuntimeDetector.d.ts.map +0 -1
- package/src/runtime/RuntimeDetector.js +0 -271
- package/src/templates/project/basic/routes/health.ts.tpl +0 -143
- package/src/templates/project/basic/routes/metrics.ts.tpl +0 -22
- package/src/workers/BroadcastWorker.d.ts +0 -22
- package/src/workers/BroadcastWorker.d.ts.map +0 -1
- package/src/workers/BroadcastWorker.js +0 -24
- package/src/workers/NotificationWorker.d.ts +0 -22
- package/src/workers/NotificationWorker.d.ts.map +0 -1
- package/src/workers/NotificationWorker.js +0 -23
- package/src/workers/createQueueWorker.d.ts +0 -24
- package/src/workers/createQueueWorker.d.ts.map +0 -1
- package/src/workers/createQueueWorker.js +0 -114
package/src/orm/Relationships.js
CHANGED
|
@@ -114,3 +114,193 @@ export const BelongsToMany = Object.freeze({
|
|
|
114
114
|
};
|
|
115
115
|
},
|
|
116
116
|
});
|
|
117
|
+
/**
|
|
118
|
+
* MorphOne Relationship
|
|
119
|
+
* Polymorphic one-to-one relationship
|
|
120
|
+
* Sealed namespace object following Pattern 2
|
|
121
|
+
*
|
|
122
|
+
* @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
|
|
123
|
+
*/
|
|
124
|
+
export const MorphOne = Object.freeze({
|
|
125
|
+
create(relatedModel, morphName, morphType, morphId, localKeyColumn = 'id') {
|
|
126
|
+
const morphTypeColumn = morphType ?? `${morphName}_type`;
|
|
127
|
+
const morphIdColumn = morphId ?? `${morphName}_id`;
|
|
128
|
+
return {
|
|
129
|
+
type: 'morphOne',
|
|
130
|
+
related: relatedModel,
|
|
131
|
+
foreignKey: morphIdColumn,
|
|
132
|
+
localKey: localKeyColumn,
|
|
133
|
+
morphType: morphTypeColumn,
|
|
134
|
+
morphId: morphIdColumn,
|
|
135
|
+
morphName,
|
|
136
|
+
async get(instance) {
|
|
137
|
+
const value = instance.getAttribute(localKeyColumn);
|
|
138
|
+
if (value === undefined || value === null || value === '')
|
|
139
|
+
return null;
|
|
140
|
+
const modelName = instance.getTable();
|
|
141
|
+
return relatedModel
|
|
142
|
+
.query()
|
|
143
|
+
.where(morphTypeColumn, '=', modelName)
|
|
144
|
+
.where(morphIdColumn, '=', value)
|
|
145
|
+
.first();
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
/**
|
|
151
|
+
* MorphMany Relationship
|
|
152
|
+
* Polymorphic one-to-many relationship
|
|
153
|
+
* Sealed namespace object following Pattern 2
|
|
154
|
+
*
|
|
155
|
+
* @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
|
|
156
|
+
*/
|
|
157
|
+
export const MorphMany = Object.freeze({
|
|
158
|
+
create(relatedModel, morphName, morphType, morphId, localKeyColumn = 'id') {
|
|
159
|
+
const morphTypeColumn = morphType ?? `${morphName}_type`;
|
|
160
|
+
const morphIdColumn = morphId ?? `${morphName}_id`;
|
|
161
|
+
return {
|
|
162
|
+
type: 'morphMany',
|
|
163
|
+
related: relatedModel,
|
|
164
|
+
foreignKey: morphIdColumn,
|
|
165
|
+
localKey: localKeyColumn,
|
|
166
|
+
morphType: morphTypeColumn,
|
|
167
|
+
morphId: morphIdColumn,
|
|
168
|
+
morphName,
|
|
169
|
+
async get(instance) {
|
|
170
|
+
const value = instance.getAttribute(localKeyColumn);
|
|
171
|
+
if (value === undefined || value === null || value === '')
|
|
172
|
+
return [];
|
|
173
|
+
const modelName = instance.getTable();
|
|
174
|
+
return relatedModel
|
|
175
|
+
.query()
|
|
176
|
+
.where(morphTypeColumn, '=', modelName)
|
|
177
|
+
.where(morphIdColumn, '=', value)
|
|
178
|
+
.get();
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
/**
|
|
184
|
+
* MorphTo Relationship
|
|
185
|
+
* Inverse of polymorphic relationships
|
|
186
|
+
* Sealed namespace object following Pattern 2
|
|
187
|
+
*
|
|
188
|
+
* @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
|
|
189
|
+
*/
|
|
190
|
+
export const MorphTo = Object.freeze({
|
|
191
|
+
create(morphName, morphMap, morphType, morphId) {
|
|
192
|
+
const morphTypeColumn = morphType ?? `${morphName}_type`;
|
|
193
|
+
const morphIdColumn = morphId ?? `${morphName}_id`;
|
|
194
|
+
return {
|
|
195
|
+
type: 'morphTo',
|
|
196
|
+
related: Object.values(morphMap)[0],
|
|
197
|
+
foreignKey: morphIdColumn,
|
|
198
|
+
localKey: 'id',
|
|
199
|
+
morphType: morphTypeColumn,
|
|
200
|
+
morphId: morphIdColumn,
|
|
201
|
+
morphName,
|
|
202
|
+
morphMap,
|
|
203
|
+
async get(instance) {
|
|
204
|
+
const type = instance.getAttribute(morphTypeColumn);
|
|
205
|
+
const id = instance.getAttribute(morphIdColumn);
|
|
206
|
+
if (type === undefined ||
|
|
207
|
+
type === null ||
|
|
208
|
+
type === '' ||
|
|
209
|
+
id === undefined ||
|
|
210
|
+
id === null ||
|
|
211
|
+
id === '') {
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
const relatedModel = morphMap[String(type)];
|
|
215
|
+
if (relatedModel === undefined) {
|
|
216
|
+
throw ErrorFactory.createConfigError(`Unknown morph type: ${String(type)}. Available types: ${Object.keys(morphMap).join(', ')}`);
|
|
217
|
+
}
|
|
218
|
+
return relatedModel.query().where('id', '=', id).first();
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
/**
|
|
224
|
+
* HasOneThrough Relationship
|
|
225
|
+
* Access a distant relation through an intermediate model
|
|
226
|
+
* Example: Country -> User -> Post (Country hasOneThrough Post through User)
|
|
227
|
+
* Sealed namespace object following Pattern 2
|
|
228
|
+
*
|
|
229
|
+
* @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
|
|
230
|
+
*/
|
|
231
|
+
export const HasOneThrough = Object.freeze({
|
|
232
|
+
create(relatedModel, through, foreignKey, throughForeignKey, localKey, secondLocalKey) {
|
|
233
|
+
const throughTable = getRelatedTableName(through);
|
|
234
|
+
const relatedTable = getRelatedTableName(relatedModel);
|
|
235
|
+
// Default keys
|
|
236
|
+
const firstKey = throughForeignKey ?? 'id';
|
|
237
|
+
const secondKey = foreignKey ?? `${throughTable.slice(0, -1)}_id`;
|
|
238
|
+
const localKeyColumn = localKey ?? 'id';
|
|
239
|
+
const secondLocalKeyColumn = secondLocalKey ?? 'id';
|
|
240
|
+
return {
|
|
241
|
+
type: 'hasOneThrough',
|
|
242
|
+
related: relatedModel,
|
|
243
|
+
foreignKey: secondKey,
|
|
244
|
+
localKey: localKeyColumn,
|
|
245
|
+
through,
|
|
246
|
+
throughForeignKey: firstKey,
|
|
247
|
+
secondLocalKey: secondLocalKeyColumn,
|
|
248
|
+
async get(instance) {
|
|
249
|
+
const value = instance.getAttribute(localKeyColumn);
|
|
250
|
+
if (value === undefined || value === null || value === '')
|
|
251
|
+
return null;
|
|
252
|
+
// Join through intermediate table
|
|
253
|
+
// SELECT related.* FROM related
|
|
254
|
+
// INNER JOIN through ON related.through_id = through.id
|
|
255
|
+
// WHERE through.parent_id = value
|
|
256
|
+
return relatedModel
|
|
257
|
+
.query()
|
|
258
|
+
.join(throughTable, `${relatedTable}.${secondKey} = ${throughTable}.${secondLocalKeyColumn}`)
|
|
259
|
+
.where(`${throughTable}.${firstKey}`, '=', value)
|
|
260
|
+
.first();
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
/**
|
|
266
|
+
* HasManyThrough Relationship
|
|
267
|
+
* Access distant relations through an intermediate model
|
|
268
|
+
* Example: Country -> User -> Post (Country hasManyThrough Posts through Users)
|
|
269
|
+
* Sealed namespace object following Pattern 2
|
|
270
|
+
*
|
|
271
|
+
* @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
|
|
272
|
+
*/
|
|
273
|
+
export const HasManyThrough = Object.freeze({
|
|
274
|
+
create(relatedModel, through, foreignKey, throughForeignKey, localKey, secondLocalKey) {
|
|
275
|
+
const throughTable = getRelatedTableName(through);
|
|
276
|
+
const relatedTable = getRelatedTableName(relatedModel);
|
|
277
|
+
// Default keys
|
|
278
|
+
const firstKey = throughForeignKey ?? 'id';
|
|
279
|
+
const secondKey = foreignKey ?? `${throughTable.slice(0, -1)}_id`;
|
|
280
|
+
const localKeyColumn = localKey ?? 'id';
|
|
281
|
+
const secondLocalKeyColumn = secondLocalKey ?? 'id';
|
|
282
|
+
return {
|
|
283
|
+
type: 'hasManyThrough',
|
|
284
|
+
related: relatedModel,
|
|
285
|
+
foreignKey: secondKey,
|
|
286
|
+
localKey: localKeyColumn,
|
|
287
|
+
through,
|
|
288
|
+
throughForeignKey: firstKey,
|
|
289
|
+
secondLocalKey: secondLocalKeyColumn,
|
|
290
|
+
async get(instance) {
|
|
291
|
+
const value = instance.getAttribute(localKeyColumn);
|
|
292
|
+
if (value === undefined || value === null || value === '')
|
|
293
|
+
return [];
|
|
294
|
+
// Join through intermediate table
|
|
295
|
+
// SELECT related.* FROM related
|
|
296
|
+
// INNER JOIN through ON related.through_id = through.id
|
|
297
|
+
// WHERE through.parent_id = value
|
|
298
|
+
return relatedModel
|
|
299
|
+
.query()
|
|
300
|
+
.join(throughTable, `${relatedTable}.${secondKey} = ${throughTable}.${secondLocalKeyColumn}`)
|
|
301
|
+
.where(`${throughTable}.${firstKey}`, '=', value)
|
|
302
|
+
.get();
|
|
303
|
+
},
|
|
304
|
+
};
|
|
305
|
+
},
|
|
306
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* D1 Remote Database Adapter
|
|
3
3
|
*
|
|
4
|
-
* Calls a
|
|
4
|
+
* Calls a ZinTrust Cloudflare Worker proxy over HTTPS.
|
|
5
5
|
*/
|
|
6
6
|
import type { DatabaseConfig, IDatabaseAdapter } from '../DatabaseAdapter';
|
|
7
7
|
export declare const D1RemoteAdapter: Readonly<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* D1 Remote Database Adapter
|
|
3
3
|
*
|
|
4
|
-
* Calls a
|
|
4
|
+
* Calls a ZinTrust Cloudflare Worker proxy over HTTPS.
|
|
5
5
|
*/
|
|
6
6
|
import { RemoteSignedJson } from '../../common/RemoteSignedJson.js';
|
|
7
7
|
import { Env } from '../../config/env.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Optimizer.d.ts","sourceRoot":"","sources":["../../../src/performance/Optimizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC3E,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChF,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,QAAQ,IAAI,OAAO,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAA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,CAAC;IAC7F,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,QAAQ,IAAI;QACV,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,WAAW,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC;KAC/C,CAAC;IACF,SAAS,IAAI,IAAI,CAAC;IAClB,KAAK,IAAI,IAAI,CAAC;CACf;AASD;;;GAGG;AACH,eAAO,MAAM,oBAAoB;IAC/B;;OAEG;cACO,qBAAqB;EAoE/B,CAAC;AA2HH,eAAe,oBAAoB,CAAC"}
|
|
@@ -180,6 +180,7 @@ function createCacheInstance(state) {
|
|
|
180
180
|
}
|
|
181
181
|
const payload = JSON.stringify({ code, timestamp: Date.now() }, null, 2);
|
|
182
182
|
scheduleCacheWrite(state, key, payload);
|
|
183
|
+
return Promise.resolve();
|
|
183
184
|
},
|
|
184
185
|
/**
|
|
185
186
|
* Save cache to disk (async)
|
|
@@ -283,9 +284,6 @@ async function getCacheStats(state) {
|
|
|
283
284
|
keys: Array.from(state.cache.keys()),
|
|
284
285
|
};
|
|
285
286
|
}
|
|
286
|
-
/**
|
|
287
|
-
* Format bytes as human-readable
|
|
288
|
-
*/
|
|
289
287
|
function formatBytes(bytes) {
|
|
290
288
|
const units = ['B', 'KB', 'MB'];
|
|
291
289
|
let size = bytes;
|
|
@@ -301,8 +299,8 @@ function formatBytes(bytes) {
|
|
|
301
299
|
*/
|
|
302
300
|
function getCacheKey(type, params) {
|
|
303
301
|
// Use a more efficient key generation
|
|
304
|
-
const paramStr = JSON.stringify(params);
|
|
305
302
|
// Simple hash-like string for the key
|
|
303
|
+
const paramStr = JSON.stringify(params, Object.keys(params).sort((a, b) => a.localeCompare(b)));
|
|
306
304
|
let hash = 0;
|
|
307
305
|
for (let i = 0; i < paramStr.length; i++) {
|
|
308
306
|
const char = paramStr.codePointAt(i);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoreRoutes.d.ts","sourceRoot":"","sources":["../../../src/routing/CoreRoutes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"CoreRoutes.d.ts","sourceRoot":"","sources":["../../../src/routing/CoreRoutes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAwBhD;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,OAAO,KAAG,IAMpD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -3,127 +3,13 @@
|
|
|
3
3
|
* Health, metrics, and documentation endpoints
|
|
4
4
|
* Not customizable by developers; provide env-based configuration
|
|
5
5
|
*/
|
|
6
|
-
import { RuntimeHealthProbes } from '../health/RuntimeHealthProbes.js';
|
|
7
6
|
import { PrometheusMetrics } from '../observability/PrometheusMetrics.js';
|
|
8
|
-
import {
|
|
7
|
+
import { Router } from '../routing/Router.js';
|
|
8
|
+
import { registerHealthRoutes } from '../common/HealthRoutes.js';
|
|
9
9
|
import { Env } from '../config/env.js';
|
|
10
|
-
import { Logger } from '../config/logger.js';
|
|
11
|
-
import { useDatabase } from '../orm/Database.js';
|
|
12
|
-
import { QueryBuilder } from '../orm/QueryBuilder.js';
|
|
13
10
|
import { registerDocRoutes } from './doc.js';
|
|
14
11
|
import { registerErrorRoutes } from './error.js';
|
|
15
12
|
import { registerErrorPagesRoutes } from './errorPages.js';
|
|
16
|
-
import { Router } from './Router.js';
|
|
17
|
-
/**
|
|
18
|
-
* Register health endpoints
|
|
19
|
-
*/
|
|
20
|
-
async function handleHealthRoute(_req, res) {
|
|
21
|
-
const environment = Env.NODE_ENV ?? 'development';
|
|
22
|
-
try {
|
|
23
|
-
const db = useDatabase();
|
|
24
|
-
const maybeIsConnected = db.isConnected;
|
|
25
|
-
const maybeConnect = db.connect;
|
|
26
|
-
if (typeof maybeIsConnected === 'function' && maybeIsConnected.call(db) === false) {
|
|
27
|
-
if (typeof maybeConnect === 'function') {
|
|
28
|
-
await maybeConnect.call(db);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
await QueryBuilder.ping(db);
|
|
32
|
-
const uptime = typeof process !== 'undefined' && typeof process.uptime === 'function' ? process.uptime() : 0;
|
|
33
|
-
res.json({
|
|
34
|
-
status: 'healthy',
|
|
35
|
-
timestamp: new Date().toISOString(),
|
|
36
|
-
uptime,
|
|
37
|
-
database: 'connected',
|
|
38
|
-
environment,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
Logger.error('Health check failed:', error);
|
|
43
|
-
const isProd = environment === 'production' || environment === 'prod';
|
|
44
|
-
res.setStatus(503).json({
|
|
45
|
-
status: 'unhealthy',
|
|
46
|
-
timestamp: new Date().toISOString(),
|
|
47
|
-
database: 'disconnected',
|
|
48
|
-
error: isProd ? 'Service unavailable' : error.message,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function handleHealthLiveRoute(_req, res) {
|
|
53
|
-
const uptime = typeof process !== 'undefined' && typeof process.uptime === 'function' ? process.uptime() : 0;
|
|
54
|
-
res.json({
|
|
55
|
-
status: 'alive',
|
|
56
|
-
timestamp: new Date().toISOString(),
|
|
57
|
-
uptime,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
async function handleHealthReadyRoute(_req, res) {
|
|
61
|
-
const startTime = Date.now();
|
|
62
|
-
const environment = appConfig.environment;
|
|
63
|
-
let databaseResponseTime = null;
|
|
64
|
-
let cacheResponseTime = null;
|
|
65
|
-
try {
|
|
66
|
-
const db = useDatabase();
|
|
67
|
-
const maybeIsConnected = db.isConnected;
|
|
68
|
-
const maybeConnect = db.connect;
|
|
69
|
-
if (typeof maybeIsConnected === 'function' && maybeIsConnected.call(db) === false) {
|
|
70
|
-
if (typeof maybeConnect === 'function') {
|
|
71
|
-
await maybeConnect.call(db);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
await QueryBuilder.ping(db);
|
|
75
|
-
databaseResponseTime = Date.now() - startTime;
|
|
76
|
-
cacheResponseTime = await RuntimeHealthProbes.pingKvCache(2000);
|
|
77
|
-
res.json({
|
|
78
|
-
status: 'ready',
|
|
79
|
-
timestamp: new Date().toISOString(),
|
|
80
|
-
environment,
|
|
81
|
-
dependencies: {
|
|
82
|
-
database: {
|
|
83
|
-
status: 'ready',
|
|
84
|
-
responseTime: databaseResponseTime,
|
|
85
|
-
},
|
|
86
|
-
...(cacheResponseTime === null
|
|
87
|
-
? {}
|
|
88
|
-
: {
|
|
89
|
-
cache: {
|
|
90
|
-
status: 'ready',
|
|
91
|
-
responseTime: cacheResponseTime,
|
|
92
|
-
},
|
|
93
|
-
}),
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
Logger.error('Readiness check failed:', error);
|
|
99
|
-
const isProd = environment === 'production';
|
|
100
|
-
const responseTime = Date.now() - startTime;
|
|
101
|
-
const dependencies = {
|
|
102
|
-
database: {
|
|
103
|
-
status: databaseResponseTime === null ? 'unavailable' : 'ready',
|
|
104
|
-
responseTime: databaseResponseTime ?? responseTime,
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
if (RuntimeHealthProbes.getCacheDriverName() === 'kv') {
|
|
108
|
-
dependencies['cache'] = {
|
|
109
|
-
status: 'unavailable',
|
|
110
|
-
responseTime: cacheResponseTime ?? responseTime,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
res.setStatus(503).json({
|
|
114
|
-
status: 'not_ready',
|
|
115
|
-
timestamp: new Date().toISOString(),
|
|
116
|
-
environment,
|
|
117
|
-
dependencies,
|
|
118
|
-
error: isProd ? 'Service unavailable' : error.message,
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function registerHealthRoutes(router) {
|
|
123
|
-
Router.get(router, '/health', handleHealthRoute);
|
|
124
|
-
Router.get(router, '/health/live', handleHealthLiveRoute);
|
|
125
|
-
Router.get(router, '/health/ready', handleHealthReadyRoute);
|
|
126
|
-
}
|
|
127
13
|
/**
|
|
128
14
|
* Register metrics endpoint
|
|
129
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/routing/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/routing/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA0J/C;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,OAAO,KAAG,IAGrD,CAAC;AAEF,eAAO,MAAM,YAAY;;kCALmB,OAAO,KAAG,IAAI;8BAlGzB,QAAQ,YAAY,SAAS,cAAc,MAAM,KAAG,IAAI;qDAiB9E,QAAQ,YACP,SAAS,SACZ,OAAO,cACF,MAAM,KACjB,IAAI;wCA0DoC,IAAI,CAAC,cAAc,KAAG,IAAI;EA8BnE,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
package/src/routing/error.js
CHANGED
|
@@ -9,11 +9,12 @@ import { ErrorPageRenderer } from '../http/error-pages/ErrorPageRenderer.js';
|
|
|
9
9
|
import { ErrorResponse } from '../http/ErrorResponse.js';
|
|
10
10
|
import { getPublicRoot } from './publicRoot.js';
|
|
11
11
|
import { Router } from './Router.js';
|
|
12
|
+
// Cache Set at module level to avoid repeated creation
|
|
13
|
+
const REDACTED_HEADERS = new Set(['authorization', 'cookie', 'set-cookie', 'x-api-key']);
|
|
12
14
|
const redactHeaders = (headers) => {
|
|
13
|
-
const redacted = new Set(['authorization', 'cookie', 'set-cookie', 'x-api-key']);
|
|
14
15
|
const out = {};
|
|
15
16
|
for (const [key, value] of Object.entries(headers)) {
|
|
16
|
-
if (
|
|
17
|
+
if (REDACTED_HEADERS.has(key.toLowerCase())) {
|
|
17
18
|
out[key] = '[redacted]';
|
|
18
19
|
continue;
|
|
19
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicRoot.d.ts","sourceRoot":"","sources":["../../../src/routing/publicRoot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,MAalD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAkB3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAO,MAAM,EAIhD,CAAC;AAEF,eAAO,MAAM,4BAA4B,QAAa,OAAO,CAAC,MAAM,EAAE,CAIrE,CAAC;
|
|
1
|
+
{"version":3,"file":"publicRoot.d.ts","sourceRoot":"","sources":["../../../src/routing/publicRoot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,MAalD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAkB3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAO,MAAM,EAIhD,CAAC;AAEF,eAAO,MAAM,4BAA4B,QAAa,OAAO,CAAC,MAAM,EAAE,CAIrE,CAAC;AAKF;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,MAgBhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAa,OAAO,CAAC,MAAM,CA+BzD,CAAC"}
|
|
@@ -59,12 +59,14 @@ export const getFrameworkPublicRootsAsync = async () => {
|
|
|
59
59
|
const packageRoot = await findPackageRootAsync(thisDir);
|
|
60
60
|
return [path.join(packageRoot, 'dist/public'), path.join(packageRoot, 'public')];
|
|
61
61
|
};
|
|
62
|
+
// Cache process.cwd() at module load time
|
|
63
|
+
const projectCwd = process.cwd();
|
|
62
64
|
/**
|
|
63
65
|
* Resolve the effective public root.
|
|
64
66
|
* Prefers app-local `public/` when present; otherwise falls back to framework public roots.
|
|
65
67
|
*/
|
|
66
68
|
export const getPublicRoot = () => {
|
|
67
|
-
const appRoots = [path.join(
|
|
69
|
+
const appRoots = [path.join(projectCwd, 'public')];
|
|
68
70
|
const candidates = [...appRoots, ...getFrameworkPublicRoots()];
|
|
69
71
|
// Prefer a root that contains an index.html (common for docs + dev portal).
|
|
70
72
|
const hasIndex = (root) => fs.existsSync(path.join(root, 'index.html'));
|
|
@@ -82,7 +84,7 @@ export const getPublicRoot = () => {
|
|
|
82
84
|
* Resolve the effective public root (async).
|
|
83
85
|
*/
|
|
84
86
|
export const getPublicRootAsync = async () => {
|
|
85
|
-
const appRoots = [path.join(
|
|
87
|
+
const appRoots = [path.join(projectCwd, 'public')];
|
|
86
88
|
const fwRoots = await getFrameworkPublicRootsAsync();
|
|
87
89
|
const candidates = [...appRoots, ...fwRoots];
|
|
88
90
|
const exists = async (p) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginAutoImports.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginAutoImports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PluginAutoImports.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginAutoImports.ts"],"names":[],"mappings":"AAOA,KAAK,YAAY,GACb;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAChC;IACE,EAAE,EAAE,KAAK,CAAC;IACV,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,GAAG,eAAe,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAmCN,eAAO,MAAM,iBAAiB;IAC5B;;;;;;OAMG;mCACkC,OAAO,CAAC,YAAY,CAAC;EAgC1D,CAAC"}
|
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import { pathToFileURL } from '../node-singletons/url.js';
|
|
2
|
+
import { Env } from '../config/env.js';
|
|
2
3
|
import { Logger } from '../config/logger.js';
|
|
3
4
|
import { ErrorFactory } from '../exceptions/ZintrustError.js';
|
|
4
5
|
import { existsSync } from '../node-singletons/fs.js';
|
|
5
6
|
import * as path from '../node-singletons/path.js';
|
|
7
|
+
const readEnvString = (key) => {
|
|
8
|
+
const anyEnv = Env;
|
|
9
|
+
const fromEnv = typeof anyEnv.get === 'function' ? anyEnv.get(key, '') : '';
|
|
10
|
+
if (typeof fromEnv === 'string' && fromEnv.trim() !== '')
|
|
11
|
+
return fromEnv;
|
|
12
|
+
if (typeof process !== 'undefined') {
|
|
13
|
+
const raw = process.env?.[key];
|
|
14
|
+
if (typeof raw === 'string')
|
|
15
|
+
return raw;
|
|
16
|
+
}
|
|
17
|
+
return fromEnv ?? '';
|
|
18
|
+
};
|
|
19
|
+
const getProjectCwd = () => process.cwd();
|
|
20
|
+
const getProjectRootEnv = () => readEnvString('ZINTRUST_PROJECT_ROOT');
|
|
6
21
|
const resolveProjectRoot = () => {
|
|
7
|
-
const
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
10
|
-
|
|
22
|
+
const projectRootEnv = getProjectRootEnv();
|
|
23
|
+
if (projectRootEnv.trim().length > 0) {
|
|
24
|
+
return projectRootEnv.trim();
|
|
25
|
+
}
|
|
26
|
+
return getProjectCwd();
|
|
11
27
|
};
|
|
12
28
|
const getCandidates = (projectRoot) => {
|
|
13
29
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PluginManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginManager.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AA2ShE,eAAO,MAAM,aAAa;IACxB;;OAEG;YACK,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAIxC;;OAEG;yBACkB,MAAM,GAAG,MAAM,GAAG,IAAI;IAW3C;;OAEG;0BACyB,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA0DrD;;OAEG;sBACqB,MAAM,YAAY;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BrF;;;;OAIG;wBACuB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;EA2ChD,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { execSync } from '../node-singletons/child-process.js';
|
|
7
7
|
import { SpawnUtil } from '../cli/utils/spawn.js';
|
|
8
8
|
import { esmDirname, resolvePackageManager } from '../common/index.js';
|
|
9
|
+
import { Env } from '../config/env.js';
|
|
9
10
|
import { Logger } from '../config/logger.js';
|
|
10
11
|
import { ErrorFactory } from '../exceptions/ZintrustError.js';
|
|
11
12
|
import { existsSync, fsPromises as fs } from '../node-singletons/fs.js';
|
|
@@ -26,11 +27,27 @@ function findPackageRoot(startDir) {
|
|
|
26
27
|
// Fallback to a reasonable default if package.json isn't found.
|
|
27
28
|
return path.resolve(startDir, '../..');
|
|
28
29
|
}
|
|
30
|
+
const readEnvString = (key) => {
|
|
31
|
+
const anyEnv = Env;
|
|
32
|
+
const fromEnv = typeof anyEnv.get === 'function' ? anyEnv.get(key, '') : '';
|
|
33
|
+
if (typeof fromEnv === 'string' && fromEnv.trim() !== '')
|
|
34
|
+
return fromEnv;
|
|
35
|
+
if (typeof process !== 'undefined') {
|
|
36
|
+
const raw = process.env?.[key];
|
|
37
|
+
if (typeof raw === 'string')
|
|
38
|
+
return raw;
|
|
39
|
+
}
|
|
40
|
+
return fromEnv ?? '';
|
|
41
|
+
};
|
|
42
|
+
const getProjectCwd = () => process.cwd();
|
|
43
|
+
const getProjectRootEnv = () => readEnvString('ZINTRUST_PROJECT_ROOT');
|
|
44
|
+
const getAllowPostInstallEnv = () => readEnvString('ZINTRUST_ALLOW_POSTINSTALL').trim();
|
|
29
45
|
function resolveProjectRoot() {
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
return
|
|
33
|
-
|
|
46
|
+
const projectRootEnv = getProjectRootEnv();
|
|
47
|
+
if (projectRootEnv.trim().length > 0) {
|
|
48
|
+
return projectRootEnv.trim();
|
|
49
|
+
}
|
|
50
|
+
return getProjectCwd();
|
|
34
51
|
}
|
|
35
52
|
function resolveTemplateRootOrThrow() {
|
|
36
53
|
const packageRoot = findPackageRoot(__dirname);
|
|
@@ -172,7 +189,7 @@ async function ensurePluginAutoImports(plugin) {
|
|
|
172
189
|
const pluginFile = path.join(projectRoot, 'src', 'zintrust.plugins.ts');
|
|
173
190
|
await fs.mkdir(path.dirname(pluginFile), { recursive: true });
|
|
174
191
|
const header = '/**\n' +
|
|
175
|
-
' *
|
|
192
|
+
' * ZinTrust plugin auto-imports\n' +
|
|
176
193
|
' *\n' +
|
|
177
194
|
' * This file is managed by `zin plugin install` and contains side-effect\n' +
|
|
178
195
|
' * imports that register optional adapters/drivers into core registries.\n' +
|
|
@@ -219,7 +236,7 @@ function runPostInstall(plugin) {
|
|
|
219
236
|
if (plugin.postInstall.command !== undefined) {
|
|
220
237
|
// Post-install command execution is opt-in. To avoid arbitrary command execution
|
|
221
238
|
// and reduce supply-chain risk, we only execute when ZINTRUST_ALLOW_POSTINSTALL=1
|
|
222
|
-
const allow =
|
|
239
|
+
const allow = getAllowPostInstallEnv() === '1';
|
|
223
240
|
if (allow) {
|
|
224
241
|
Logger.info(`Running post-install command: ${plugin.postInstall.command}...`);
|
|
225
242
|
try {
|
|
@@ -40,7 +40,7 @@ export interface RuntimeAdapter {
|
|
|
40
40
|
*/
|
|
41
41
|
parseRequest(event: unknown): PlatformRequest;
|
|
42
42
|
/**
|
|
43
|
-
* Convert
|
|
43
|
+
* Convert ZinTrust response to platform-specific format
|
|
44
44
|
*/
|
|
45
45
|
formatResponse(response: PlatformResponse): unknown;
|
|
46
46
|
/**
|
|
@@ -60,7 +60,7 @@ export interface RuntimeAdapter {
|
|
|
60
60
|
* Get environment configuration object
|
|
61
61
|
*/
|
|
62
62
|
getEnvironment(): {
|
|
63
|
-
nodeEnv:
|
|
63
|
+
nodeEnv: NodeJS.ProcessEnv['NODE_ENV'];
|
|
64
64
|
runtime: string;
|
|
65
65
|
dbConnection: string;
|
|
66
66
|
dbHost?: string;
|
|
@@ -69,7 +69,7 @@ export interface RuntimeAdapter {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* Request handler that processes HTTP requests through
|
|
72
|
+
* Request handler that processes HTTP requests through ZinTrust framework
|
|
73
73
|
*/
|
|
74
74
|
export type ZintrustHandler = (req: IncomingMessage, res: ServerResponse, body: Tbody) => Promise<void>;
|
|
75
75
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeAdapter.d.ts","sourceRoot":"","sources":["../../../src/runtime/RuntimeAdapter.ts"],"names":[],"mappings":"AAAA,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,MAAM,WAAW,MAAM,YAAY,OAAO,GAAG,aAAa;EAW7E,CAAC;AAEH;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,eAAe,GAAG;IAC/D,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,YAAY,EAAE;QACZ,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;QAC3C,IAAI,EAAE,KAAK,CAAC;KACb,CAAC;CACH,CA+DA"}
|
|
@@ -7,8 +7,9 @@ export declare const StartupConfigFile: {
|
|
|
7
7
|
readonly Notification: "config/notification.ts";
|
|
8
8
|
readonly Queue: "config/queue.ts";
|
|
9
9
|
readonly Storage: "config/storage.ts";
|
|
10
|
+
readonly Workers: "config/workers.ts";
|
|
10
11
|
};
|
|
11
|
-
export type StartupConfigFileTyps = typeof StartupConfigFile.Broadcast | typeof StartupConfigFile.Cache | typeof StartupConfigFile.Database | typeof StartupConfigFile.Mail | typeof StartupConfigFile.Middleware | typeof StartupConfigFile.Notification | typeof StartupConfigFile.Queue | typeof StartupConfigFile.Storage;
|
|
12
|
+
export type StartupConfigFileTyps = typeof StartupConfigFile.Broadcast | typeof StartupConfigFile.Cache | typeof StartupConfigFile.Database | typeof StartupConfigFile.Mail | typeof StartupConfigFile.Middleware | typeof StartupConfigFile.Notification | typeof StartupConfigFile.Queue | typeof StartupConfigFile.Storage | typeof StartupConfigFile.Workers;
|
|
12
13
|
export declare const StartupConfigFileRegistry: Readonly<{
|
|
13
14
|
preload(files: readonly StartupConfigFileTyps[]): Promise<void>;
|
|
14
15
|
isPreloaded(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartupConfigFileRegistry.d.ts","sourceRoot":"","sources":["../../../src/runtime/StartupConfigFileRegistry.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"StartupConfigFileRegistry.d.ts","sourceRoot":"","sources":["../../../src/runtime/StartupConfigFileRegistry.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;CAUpB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC7B,OAAO,iBAAiB,CAAC,SAAS,GAClC,OAAO,iBAAiB,CAAC,KAAK,GAC9B,OAAO,iBAAiB,CAAC,QAAQ,GACjC,OAAO,iBAAiB,CAAC,IAAI,GAC7B,OAAO,iBAAiB,CAAC,UAAU,GACnC,OAAO,iBAAiB,CAAC,YAAY,GACrC,OAAO,iBAAiB,CAAC,KAAK,GAC9B,OAAO,iBAAiB,CAAC,OAAO,GAChC,OAAO,iBAAiB,CAAC,OAAO,CAAC;AAKrC,eAAO,MAAM,yBAAyB;mBACf,SAAS,qBAAqB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;mBAetD,OAAO;QAIlB,CAAC,QAAQ,qBAAqB,GAAG,CAAC,GAAG,SAAS;cAIxC,qBAAqB,GAAG,OAAO;IAIzC,+BAA+B;aACtB,IAAI;EAIb,CAAC;AAEH,eAAe,yBAAyB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import useFileLoader from '
|
|
1
|
+
import useFileLoader from './useFileLoader.js';
|
|
2
2
|
export const StartupConfigFile = {
|
|
3
3
|
Broadcast: 'config/broadcast.ts',
|
|
4
4
|
Cache: 'config/cache.ts',
|
|
@@ -8,6 +8,7 @@ export const StartupConfigFile = {
|
|
|
8
8
|
Notification: 'config/notification.ts',
|
|
9
9
|
Queue: 'config/queue.ts',
|
|
10
10
|
Storage: 'config/storage.ts',
|
|
11
|
+
Workers: 'config/workers.ts',
|
|
11
12
|
};
|
|
12
13
|
const cache = new Map();
|
|
13
14
|
let preloaded = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudflareAdapter.d.ts","sourceRoot":"","sources":["../../../../src/runtime/adapters/CloudflareAdapter.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,aAAa,EAGb,cAAc,
|
|
1
|
+
{"version":3,"file":"CloudflareAdapter.d.ts","sourceRoot":"","sources":["../../../../src/runtime/adapters/CloudflareAdapter.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,aAAa,EAGb,cAAc,EACf,MAAM,yBAAyB,CAAC;AAGjC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;mBACY,aAAa,GAAG,cAAc;IAoD7C;;;OAGG;qBACc,OAAO;IAKxB;;;OAGG;qBACc,MAAM,GAAG,OAAO;EAIjC,CAAC;AA4IH;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,OAAO;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACjC,EAAE,CAAC,EAAE;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH"}
|