mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
feat(ql3): rehearse legacy sqlite upgrade
This commit is contained in:
@@ -1786,8 +1786,13 @@ test('confines adoption and Package command authorities to owner CLI subpaths',
|
||||
);
|
||||
const sourceDirectory = path.join(root, 'packages/ql3-local-owner-cli/src');
|
||||
const lifecycleDirectory = path.join(sourceDirectory, 'lifecycle');
|
||||
const sqliteAdoptionDirectory = path.join(
|
||||
lifecycleDirectory,
|
||||
'sqlite-adoption',
|
||||
);
|
||||
const pluginPackageDirectory = path.join(sourceDirectory, 'plugin-package');
|
||||
fs.mkdirSync(lifecycleDirectory, { recursive: true });
|
||||
fs.mkdirSync(sqliteAdoptionDirectory, { recursive: true });
|
||||
fs.mkdirSync(pluginPackageDirectory, { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(lifecycleDirectory, 'adoption.ts'),
|
||||
@@ -1799,6 +1804,13 @@ test('confines adoption and Package command authorities to owner CLI subpaths',
|
||||
"import { forbidden } from '@qinglong/local-admin/runtime';",
|
||||
].join('\n'),
|
||||
);
|
||||
fs.writeFileSync(
|
||||
path.join(sqliteAdoptionDirectory, 'command.ts'),
|
||||
[
|
||||
"import { inspectLegacySqlitePath } from '@qinglong/local-admin';",
|
||||
"import { forbidden } from '@qinglong/local-admin/runtime';",
|
||||
].join('\n'),
|
||||
);
|
||||
const applicationCommandDirectory = path.join(
|
||||
sourceDirectory,
|
||||
'application-command',
|
||||
@@ -1866,6 +1878,12 @@ test('confines adoption and Package command authorities to owner CLI subpaths',
|
||||
file: 'packages/ql3-local-owner-cli/src/lifecycle/adoption.ts',
|
||||
specifier: '@qinglong/local-admin/runtime',
|
||||
},
|
||||
{
|
||||
code: 'FORBIDDEN_LOCAL_ADOPTION_CLI_AUTHORITY_IMPORT',
|
||||
file:
|
||||
'packages/ql3-local-owner-cli/src/lifecycle/sqlite-adoption/command.ts',
|
||||
specifier: '@qinglong/local-admin/runtime',
|
||||
},
|
||||
{
|
||||
code: 'FORBIDDEN_LOCAL_ADOPTION_CLI_AUTHORITY_IMPORT',
|
||||
file: 'packages/ql3-local-owner-cli/src/unrelated.ts',
|
||||
|
||||
Reference in New Issue
Block a user