mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
feat(cron): expose run receipts and modularize execution
Return committed trigger IDs and add CLI wait and trigger-specific logs while preserving API, CLI, transaction, deduplication and unknown-result semantics. Move scheduling, lifecycle, settlement, queries and legacy adapters into back/cron; remove obsolete internal import paths and circular dependencies. Apply project formatting across the repository, cover CJS/MJS in formatting hooks, add prettier:check and require formatting checks in AGENTS.md. Validation: backend build; 1398 backend/frontend tests passed (17 platform skips); 327 CLI tests passed (6 platform skips); 670 files pass format checks.
This commit is contained in:
1 parent
77ece406ac
commit
c5458596c8
346 files changed
+32133
-11556
No files matched your search
@@ -5,7 +5,11 @@ const path = require('node:path');
|
||||
const { createRequire } = require('node:module');
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
assert.equal(process.versions.node, fs.readFileSync('.nvmrc', 'utf8').trim(), 'Node runtime differs from the production version');
|
||||
assert.equal(
|
||||
process.versions.node,
|
||||
fs.readFileSync('.nvmrc', 'utf8').trim(),
|
||||
'Node runtime differs from the production version',
|
||||
);
|
||||
|
||||
const panelRequire = createRequire(path.resolve('package.json'));
|
||||
const manifest = panelRequire('./package.json');
|
||||
@@ -13,9 +17,17 @@ const lock = yaml.load(fs.readFileSync('pnpm-lock.yaml', 'utf8'));
|
||||
|
||||
function verifyDirect(name) {
|
||||
const entry = lock.dependencies[name];
|
||||
assert.equal(entry?.specifier, manifest.dependencies[name], `${name}: manifest/lock mismatch`);
|
||||
assert.equal(
|
||||
entry?.specifier,
|
||||
manifest.dependencies[name],
|
||||
`${name}: manifest/lock mismatch`,
|
||||
);
|
||||
// pnpm appends peer resolution context, e.g. 6.37.8(@whyour/sqlite3@1.1.5).
|
||||
assert.equal(panelRequire(`${name}/package.json`).version, entry.version.split('(')[0], `${name}: installed/lock mismatch`);
|
||||
assert.equal(
|
||||
panelRequire(`${name}/package.json`).version,
|
||||
entry.version.split('(')[0],
|
||||
`${name}: installed/lock mismatch`,
|
||||
);
|
||||
return entry.version;
|
||||
}
|
||||
|
||||
@@ -23,13 +35,22 @@ for (const name of ['@grpc/grpc-js', 'compression', 'multer', 'sequelize']) {
|
||||
verifyDirect(name);
|
||||
}
|
||||
|
||||
for (const [parent, name] of [['express', 'proxy-addr'], ['sockjs', 'websocket-driver']]) {
|
||||
for (const [parent, name] of [
|
||||
['express', 'proxy-addr'],
|
||||
['sockjs', 'websocket-driver'],
|
||||
]) {
|
||||
const version = verifyDirect(parent);
|
||||
const expected = lock.packages[`/${parent}@${version}`]?.dependencies?.[name];
|
||||
assert.ok(expected, `${parent} > ${name}: missing lock entry`);
|
||||
const parentRequire = createRequire(panelRequire.resolve(parent));
|
||||
assert.equal(parentRequire(`${name}/package.json`).version, expected.split('(')[0], `${parent} > ${name}: installed/lock mismatch`);
|
||||
assert.equal(
|
||||
parentRequire(`${name}/package.json`).version,
|
||||
expected.split('(')[0],
|
||||
`${parent} > ${name}: installed/lock mismatch`,
|
||||
);
|
||||
}
|
||||
|
||||
for (const name of ['sqlite3', 'nodemailer', 'undici']) panelRequire(name);
|
||||
console.log('Production dependencies match the manifest and lockfile; runtime imports verified');
|
||||
console.log(
|
||||
'Production dependencies match the manifest and lockfile; runtime imports verified',
|
||||
);
|
||||
Reference in new issue
Block a user