@zintrust/core 2.5.1 → 2.5.2
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/package.json +1 -1
- package/src/cli/OptionalCliExtensions.d.ts.map +1 -1
- package/src/cli/OptionalCliExtensions.js +12 -0
- package/src/cli/commands/D1MigrateCommand.d.ts.map +1 -1
- package/src/cli/commands/D1MigrateCommand.js +14 -2
- package/src/cli/d1/WranglerD1.d.ts +2 -0
- package/src/cli/d1/WranglerD1.d.ts.map +1 -1
- package/src/cli/d1/WranglerD1.js +6 -0
- package/src/index.js +3 -3
- package/src/runtime/OfficialPlugins.d.ts.map +1 -1
- package/src/runtime/OfficialPlugins.js +5 -0
- package/src/runtime/PluginRegistry.d.ts.map +1 -1
- package/src/runtime/PluginRegistry.js +7 -0
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalCliExtensions.d.ts","sourceRoot":"","sources":["../../../src/cli/OptionalCliExtensions.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAEF,KAAK,8BAA8B,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAE3F,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,8BAA8B,CAAC;CACxC,CAAC,CAAC;AAEH,KAAK,+BAA+B,GAAG,QAAQ,CAAC;IAC9C,WAAW,CAAC,EAAE,OAAO,CAA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AAC,MAAM,EAAE,OAAO,CAAC,YACnB,+BAA+B,KACxC,IAAI;8CAkIE,oBAAoB,YACjB,+BAA+B,KACxC,OAAO,CAAC,OAAO,CAAC;qCA0BV,oBAAoB,YACjB,+BAA+B,KACxC,OAAO,CAAC,OAAO,CAAC;uCAgCV,oBAAoB,YACjB,+BAA+B,KACxC,OAAO,CAAC,OAAO,CAAC;gCAuBV,oBAAoB,YACjB,+BAA+B,KACxC,OAAO,CAAC,0BAA0B,CAAC;gCAmDH,MAAM,EAAE,KAAG,MAAM,GAAG,SAAS;mCAU1B,MAAM,EAAE,KAAG,oBAAoB,GAAG,SAAS;8BAOhD,MAAM,EAAE,KAAG,OAAO;uCAlNT,oBAAoB,KAAG,MAAM,EAAE;gCAwBtC,oBAAoB,KAAG,MAAM,EAAE;EAgQhE,CAAC"}
|
|
@@ -87,6 +87,18 @@ const OPTIONAL_CLI_EXTENSIONS = Object.freeze([
|
|
|
87
87
|
path.join(packageRoot, 'dist', 'packages', 'trace', 'src', 'cli-register.js'),
|
|
88
88
|
],
|
|
89
89
|
},
|
|
90
|
+
{
|
|
91
|
+
packageName: '@zintrust/queue-cloudflare',
|
|
92
|
+
specifier: '@zintrust/queue-cloudflare/cli-register',
|
|
93
|
+
commands: ['migrate:queue-cloudflare', 'queue-cloudflare:migrate'],
|
|
94
|
+
installCommand: 'npm install @zintrust/queue-cloudflare',
|
|
95
|
+
localCandidates: [
|
|
96
|
+
path.join(packageRoot, 'packages', 'queue-cloudflare', 'src', 'cli-register.ts'),
|
|
97
|
+
path.join(packageRoot, 'packages', 'queue-cloudflare', 'src', 'cli-register.js'),
|
|
98
|
+
path.join(packageRoot, 'packages', 'queue-cloudflare', 'dist', 'cli-register.js'),
|
|
99
|
+
path.join(packageRoot, 'dist', 'packages', 'queue-cloudflare', 'src', 'cli-register.js'),
|
|
100
|
+
],
|
|
101
|
+
},
|
|
90
102
|
{
|
|
91
103
|
packageName: '@zintrust/expose',
|
|
92
104
|
specifier: '@zintrust/expose/register',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"D1MigrateCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/D1MigrateCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"D1MigrateCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/D1MigrateCommand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAuIrE;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;OAEG;cACO,YAAY;EA2BtB,CAAC"}
|
|
@@ -35,6 +35,8 @@ const buildExecutionContext = (options) => {
|
|
|
35
35
|
const isLocal = options['local'] === true || options['remote'] !== true;
|
|
36
36
|
const projectRoot = process.cwd();
|
|
37
37
|
const dbName = getDbName(projectRoot, options);
|
|
38
|
+
const env = typeof options['env'] === 'string' ? options['env'].trim() : undefined;
|
|
39
|
+
const config = typeof options['config'] === 'string' ? options['config'].trim() : undefined;
|
|
38
40
|
const migrationsRelDir = isWorkerCommand
|
|
39
41
|
? path.join('database', 'migrations', 'd1')
|
|
40
42
|
: WranglerConfig.getD1MigrationsDir(projectRoot, dbName);
|
|
@@ -48,6 +50,8 @@ const buildExecutionContext = (options) => {
|
|
|
48
50
|
migrationsRelDir,
|
|
49
51
|
sourceMigrationsDir,
|
|
50
52
|
outputDir: path.join(projectRoot, migrationsRelDir),
|
|
53
|
+
env,
|
|
54
|
+
config,
|
|
51
55
|
};
|
|
52
56
|
};
|
|
53
57
|
const handleMigrationError = (cmd, error) => {
|
|
@@ -77,7 +81,13 @@ const executeD1Migrate = async (cmd, options) => {
|
|
|
77
81
|
outputDir: ctx.outputDir,
|
|
78
82
|
});
|
|
79
83
|
cmd.info(`Generated ${generated.length} SQL migration file(s).`);
|
|
80
|
-
const output = WranglerD1.applyMigrations({
|
|
84
|
+
const output = WranglerD1.applyMigrations({
|
|
85
|
+
cmd,
|
|
86
|
+
dbName: ctx.dbName,
|
|
87
|
+
isLocal: ctx.isLocal,
|
|
88
|
+
env: ctx.env,
|
|
89
|
+
config: ctx.config,
|
|
90
|
+
});
|
|
81
91
|
if (output !== '')
|
|
82
92
|
cmd.info(output);
|
|
83
93
|
cmd.info('✓ D1 migrations completed successfully');
|
|
@@ -102,7 +112,9 @@ export const D1MigrateCommand = Object.freeze({
|
|
|
102
112
|
command
|
|
103
113
|
.option('--local', 'Run against local D1 database (via wrangler dev)')
|
|
104
114
|
.option('--remote', 'Run against remote D1 database (production)')
|
|
105
|
-
.option('--database <name>', 'Wrangler D1 identifier. Accepts database_name or binding; defaults to the configured wrangler d1_databases entry when available.')
|
|
115
|
+
.option('--database <name>', 'Wrangler D1 identifier. Accepts database_name or binding; defaults to the configured wrangler d1_databases entry when available.')
|
|
116
|
+
.option('--env <name>', 'Wrangler environment to use (e.g., staging, production)')
|
|
117
|
+
.option('--config <path>', 'Path to wrangler config file (e.g., wrangler.dev.jsonc)');
|
|
106
118
|
};
|
|
107
119
|
const cmd = BaseCommand.create({
|
|
108
120
|
name: 'd1:migrate',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WranglerD1.d.ts","sourceRoot":"","sources":["../../../../src/cli/d1/WranglerD1.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,YAAY,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"WranglerD1.d.ts","sourceRoot":"","sources":["../../../../src/cli/d1/WranglerD1.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,YAAY,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,YAAY,CAAC;CACpB,CAAC;AAmCF,eAAO,MAAM,UAAU;0BACC,YAAY,GAAG,MAAM;qBAc1B,iBAAiB,GAAG,MAAM;EAe3C,CAAC"}
|
package/src/cli/d1/WranglerD1.js
CHANGED
|
@@ -35,6 +35,12 @@ const runWrangler = (args, cmd) => {
|
|
|
35
35
|
export const WranglerD1 = Object.freeze({
|
|
36
36
|
applyMigrations(opts) {
|
|
37
37
|
const args = ['d1', 'migrations', 'apply', opts.dbName, opts.isLocal ? '--local' : '--remote'];
|
|
38
|
+
if (opts.env !== undefined && opts.env !== null && opts.env.trim() !== '') {
|
|
39
|
+
args.push('--env', opts.env);
|
|
40
|
+
}
|
|
41
|
+
if (opts.config !== undefined && opts.config !== null && opts.config.trim() !== '') {
|
|
42
|
+
args.push('--config', opts.config);
|
|
43
|
+
}
|
|
38
44
|
return runWrangler(args, opts.cmd);
|
|
39
45
|
},
|
|
40
46
|
executeSql(opts) {
|
package/src/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @zintrust/core v2.5.
|
|
2
|
+
* @zintrust/core v2.5.2
|
|
3
3
|
*
|
|
4
4
|
* ZinTrust Framework - Production-Grade TypeScript Backend
|
|
5
5
|
* Built for performance, type safety, and exceptional developer experience
|
|
6
6
|
*
|
|
7
7
|
* Build Information:
|
|
8
|
-
* Built: 2026-06-
|
|
8
|
+
* Built: 2026-06-11T16:05:23.053Z
|
|
9
9
|
* Node: >=20.0.0
|
|
10
10
|
* License: MIT
|
|
11
11
|
*
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* Available at runtime for debugging and health checks
|
|
22
22
|
*/
|
|
23
23
|
export const ZINTRUST_VERSION = '0.1.41';
|
|
24
|
-
export const ZINTRUST_BUILD_DATE = '2026-06-
|
|
24
|
+
export const ZINTRUST_BUILD_DATE = '2026-06-11T16:05:23.018Z'; // Replaced during build
|
|
25
25
|
export { Application } from './boot/Application.js';
|
|
26
26
|
export { AwsSigV4 } from './common/index.js';
|
|
27
27
|
export { SignedRequest } from './security/SignedRequest.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OfficialPlugins.d.ts","sourceRoot":"","sources":["../../../src/runtime/OfficialPlugins.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"OfficialPlugins.d.ts","sourceRoot":"","sources":["../../../src/runtime/OfficialPlugins.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,QAAQ,CAAC;AA8JxD,eAAO,MAAM,eAAe;;;;;uBAKR,uBAAuB,GAAY,aAAa,CAAC,MAAM,CAAC;0BAGrD,uBAAuB,GAAY,aAAa,CAAC,MAAM,CAAC;EAG7E,CAAC"}
|
|
@@ -62,6 +62,11 @@ const baseRegistrations = Object.freeze([
|
|
|
62
62
|
specifier: '@zintrust/queue-sqs/register',
|
|
63
63
|
isEnabled: () => isSelected(['QUEUE_DRIVER'], ['sqs']),
|
|
64
64
|
},
|
|
65
|
+
{
|
|
66
|
+
packageName: '@zintrust/queue-cloudflare',
|
|
67
|
+
specifier: '@zintrust/queue-cloudflare/register',
|
|
68
|
+
isEnabled: () => isSelected(['QUEUE_DRIVER'], ['cloudflare', 'cloudflare-queues', 'cf-queues']),
|
|
69
|
+
},
|
|
65
70
|
{
|
|
66
71
|
packageName: '@zintrust/cache-redis',
|
|
67
72
|
specifier: '@zintrust/cache-redis/register',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginRegistry.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,kBAAkB,GAAG,SAAS,GAAG,QAAQ,CAAC;IAChD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;IACJ,WAAW,CAAC,EAAE;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AA2DD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"PluginRegistry.d.ts","sourceRoot":"","sources":["../../../src/runtime/PluginRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,kBAAkB,GAAG,SAAS,GAAG,QAAQ,CAAC;IAChD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;IACJ,WAAW,CAAC,EAAE;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AA2DD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA0J3D,CAAC"}
|
|
@@ -83,6 +83,13 @@ export const PluginRegistry = {
|
|
|
83
83
|
dependencies: ['@zintrust/queue-sqs', '@aws-sdk/client-sqs'],
|
|
84
84
|
autoImports: ['@zintrust/queue-sqs/register'],
|
|
85
85
|
}),
|
|
86
|
+
'driver:queue-cloudflare': driver({
|
|
87
|
+
name: 'Cloudflare Queues Driver',
|
|
88
|
+
description: 'Cloudflare Queues driver (installs @zintrust/queue-cloudflare)',
|
|
89
|
+
aliases: ['queue:cloudflare', 'queue:cloudflare-queues', 'queue:cf'],
|
|
90
|
+
dependencies: ['@zintrust/queue-cloudflare'],
|
|
91
|
+
autoImports: ['@zintrust/queue-cloudflare/register'],
|
|
92
|
+
}),
|
|
86
93
|
'driver:broadcast-redis': driver({
|
|
87
94
|
name: 'Redis Broadcast Driver',
|
|
88
95
|
description: 'Redis-backed broadcast driver (installs redis client dependency)',
|